# `Jidoka.Runtime.Controls.OperationContext`
[🔗](https://github.com/agentjido/jidoka/blob/v0.9.0/lib/jidoka/runtime/controls/operation_context.ex#L1)

Runtime context passed to controls at the operation boundary.

Although the module is in the Runtime namespace, this data type is a
supported input contract for custom operation controls.

This is deliberately data-only. Operation controls can inspect the pending
operation request and turn state, but they do not execute the operation.

# `t`

```elixir
@type t() :: %Jidoka.Runtime.Controls.OperationContext{
  agent_state: any(),
  arguments: map(),
  boundary: :operation,
  context: map(),
  control: atom(),
  control_name: binary(),
  ctx: nil | nil | term(),
  idempotency: (((:pure | :idempotent) | :dedupe) | :reconcile) | :unsafe_once,
  idempotency_key: nil | nil | binary(),
  input: binary(),
  intent: any(),
  kind:
    (((((((((:action | :operation) | :tool) | :ash_resource) | :browser)
         | :skill)
        | :mcp)
       | :catalog)
      | :workflow)
     | :subagent)
    | :handoff,
  metadata: map(),
  operation: binary(),
  operation_kind:
    (((((((((:action | :operation) | :tool) | :ash_resource) | :browser)
         | :skill)
        | :mcp)
       | :catalog)
      | :workflow)
     | :subagent)
    | :handoff,
  operation_match: map(),
  operation_metadata: map(),
  operation_request: any(),
  operation_spec: nil | nil | any(),
  plan: any(),
  request: any(),
  request_metadata: map(),
  source: nil | nil | binary(),
  spec: any(),
  type: :control
}
```

# `new`

```elixir
@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}
```

Builds operation control context from keyword or map attributes.

# `new!`

```elixir
@spec new!(keyword() | map()) :: t()
```

Builds operation control context and raises if the attributes are invalid.

# `schema`

```elixir
@spec schema() :: Zoi.schema()
```

Returns the Zoi schema for operation control context.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
