Jidoka.Review.Interrupt (Jidoka v0.8.0-beta.1)

Copy Markdown View Source

Durable pause point produced by a runtime control.

Interrupts are data. They describe why a turn paused and what pending effect may continue after an application supplies a review response.

Summary

Types

t()

@type t() :: %Jidoka.Review.Interrupt{
  agent_id: binary(),
  arguments: map(),
  boundary: :operation | binary(),
  control: atom(),
  control_name: binary(),
  created_at_ms: nil | nil | integer(),
  effect_id: binary(),
  effect_kind: :operation | binary(),
  expires_at_ms: nil | nil | integer(),
  id: binary(),
  idempotency:
    nil
    | nil
    | (:pure | :idempotent | :dedupe | :reconcile | :unsafe_once)
    | binary(),
  idempotency_key: nil | nil | binary(),
  loop_index: integer(),
  metadata: map(),
  operation: binary(),
  operation_kind:
    (:action
     | :operation
     | :tool
     | :ash_resource
     | :browser
     | :skill
     | :mcp
     | :workflow
     | :subagent
     | :handoff)
    | binary(),
  reason: any(),
  request_id: binary()
}

Functions

expired?(interrupt, now_ms)

@spec expired?(t(), non_neg_integer()) :: boolean()

from_input(interrupt)

@spec from_input(t() | keyword() | map()) :: {:ok, t()} | {:error, term()}

new(attrs)

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

new!(attrs)

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

schema()

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

stable_id(parts)

@spec stable_id([term()]) :: String.t()

with_review_window(interrupt, now_ms, ttl_ms)

@spec with_review_window(t(), non_neg_integer(), pos_integer() | nil) :: t()