Codex.Thread.Options (Codex SDK v0.3.0)

View Source

Per-thread configuration options.

Summary

Functions

Builds a thread options struct from various inputs.

Types

t()

@type t() :: %Codex.Thread.Options{
  additional_directories: [String.t()],
  approval_hook: module() | nil,
  approval_policy: module() | nil,
  approval_timeout_ms: pos_integer(),
  ask_for_approval:
    :untrusted | :on_failure | :on_request | :never | String.t() | nil,
  attachments: [map()] | [],
  auto_run: boolean(),
  file_search: Codex.FileSearch.t() | nil,
  labels: map(),
  metadata: map(),
  network_access_enabled: boolean() | nil,
  sandbox:
    :default
    | :strict
    | :permissive
    | :read_only
    | :workspace_write
    | :danger_full_access
    | String.t(),
  skip_git_repo_check: boolean(),
  transport: transport(),
  web_search_enabled: boolean(),
  working_directory: String.t() | nil
}

transport()

@type transport() :: :exec | {:app_server, pid()}

Functions

new(opts)

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

Builds a thread options struct from various inputs.