Codex.Protocol.Ops (Codex SDK v0.14.0)

Copy Markdown View Source

Encoders for Codex protocol operations submitted to the runtime.

Summary

Types

t()

Operation payload wrapper.

Functions

Builds a protocol operation wrapper.

Encodes an operation into a protocol map.

Types

op_type()

@type op_type() ::
  :interrupt
  | :user_input
  | :user_turn
  | :override_turn_context
  | :exec_approval
  | :patch_approval
  | :resolve_elicitation
  | :user_input_answer
  | :add_to_history
  | :get_history_entry_request
  | :list_mcp_tools
  | :refresh_mcp_servers
  | :list_custom_prompts
  | :list_skills
  | :compact
  | :undo
  | :thread_rollback
  | :review
  | :shutdown
  | :run_user_shell_command
  | :list_models

review_decision()

@type review_decision() ::
  :approved
  | :approved_for_session
  | :denied
  | :abort
  | {:approved_execpolicy_amendment, term()}

t()

@type t() :: %Codex.Protocol.Ops{payload: map(), type: op_type()}

Operation payload wrapper.

Functions

new(type, payload \\ %{})

@spec new(op_type(), map()) :: t()

Builds a protocol operation wrapper.

to_map(ops)

@spec to_map(t()) :: map()

Encodes an operation into a protocol map.