mirror of
https://github.com/openai/codex.git
synced 2026-04-25 07:05:38 +00:00
## Summary
- add `approvals_reviewer = "user" | "guardian_subagent"` as the runtime
control for who reviews approval requests
- route Smart Approvals guardian review through core for command
execution, file changes, managed-network approvals, MCP approvals, and
delegated/subagent approval flows
- expose guardian review in app-server with temporary unstable
`item/autoApprovalReview/{started,completed}` notifications carrying
`targetItemId`, `review`, and `action`
- update the TUI so Smart Approvals can be enabled from `/experimental`,
aligned with the matching `/approvals` mode, and surfaced clearly while
reviews are pending or resolved
## Runtime model
This PR does not introduce a new `approval_policy`.
Instead:
- `approval_policy` still controls when approval is needed
- `approvals_reviewer` controls who reviewable approval requests are
routed to:
- `user`
- `guardian_subagent`
`guardian_subagent` is a carefully prompted reviewer subagent that
gathers relevant context and applies a risk-based decision framework
before approving or denying the request.
The `smart_approvals` feature flag is a rollout/UI gate. Core runtime
behavior keys off `approvals_reviewer`.
When Smart Approvals is enabled from the TUI, it also switches the
current `/approvals` settings to the matching Smart Approvals mode so
users immediately see guardian review in the active thread:
- `approval_policy = on-request`
- `approvals_reviewer = guardian_subagent`
- `sandbox_mode = workspace-write`
Users can still change `/approvals` afterward.
Config-load behavior stays intentionally narrow:
- plain `smart_approvals = true` in `config.toml` remains just the
rollout/UI gate and does not auto-set `approvals_reviewer`
- the deprecated `guardian_approval = true` alias migration does
backfill `approvals_reviewer = "guardian_subagent"` in the same scope
when that reviewer is not already configured there, so old configs
preserve their original guardian-enabled behavior
ARC remains a separate safety check. For MCP tool approvals, ARC
escalations now flow into the configured reviewer instead of always
bypassing guardian and forcing manual review.
## Config stability
The runtime reviewer override is stable, but the config-backed
app-server protocol shape is still settling.
- `thread/start`, `thread/resume`, and `turn/start` keep stable
`approvalsReviewer` overrides
- the config-backed `approvals_reviewer` exposure returned via
`config/read` (including profile-level config) is now marked
`[UNSTABLE]` / experimental in the app-server protocol until we are more
confident in that config surface
## App-server surface
This PR intentionally keeps the guardian app-server shape narrow and
temporary.
It adds generic unstable lifecycle notifications:
- `item/autoApprovalReview/started`
- `item/autoApprovalReview/completed`
with payloads of the form:
- `{ threadId, turnId, targetItemId, review, action? }`
`review` is currently:
- `{ status, riskScore?, riskLevel?, rationale? }`
- where `status` is one of `inProgress`, `approved`, `denied`, or
`aborted`
`action` carries the guardian action summary payload from core when
available. This lets clients render temporary standalone pending-review
UI, including parallel reviews, even when the underlying tool item has
not been emitted yet.
These notifications are explicitly documented as `[UNSTABLE]` and
expected to change soon.
This PR does **not** persist guardian review state onto `thread/read`
tool items. The intended follow-up is to attach guardian review state to
the reviewed tool item lifecycle instead, which would improve
consistency with manual approvals and allow thread history / reconnect
flows to replay guardian review state directly.
## TUI behavior
- `/experimental` exposes the rollout gate as `Smart Approvals`
- enabling it in the TUI enables the feature and switches the current
session to the matching Smart Approvals `/approvals` mode
- disabling it in the TUI clears the persisted `approvals_reviewer`
override when appropriate and returns the session to default manual
review when the effective reviewer changes
- `/approvals` still exposes the reviewer choice directly
- the TUI renders:
- pending guardian review state in the live status footer, including
parallel review aggregation
- resolved approval/denial state in history
## Scope notes
This PR includes the supporting core/runtime work needed to make Smart
Approvals usable end-to-end:
- shell / unified-exec / apply_patch / managed-network / MCP guardian
review
- delegated/subagent approval routing into guardian review
- guardian review risk metadata and action summaries for app-server/TUI
- config/profile/TUI handling for `smart_approvals`, `guardian_approval`
alias migration, and `approvals_reviewer`
- a small internal cleanup of delegated approval forwarding to dedupe
fallback paths and simplify guardian-vs-parent approval waiting (no
intended behavior change)
Out of scope for this PR:
- redesigning the existing manual approval protocol shapes
- persisting guardian review state onto app-server `ThreadItem`s
- delegated MCP elicitation auto-review (the current delegated MCP
guardian shim only covers the legacy `RequestUserInput` path)
---------
Co-authored-by: Codex <noreply@openai.com>
2021 lines
49 KiB
JSON
2021 lines
49 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"AbsolutePathBuf": {
|
|
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
|
|
"type": "string"
|
|
},
|
|
"ApprovalsReviewer": {
|
|
"description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `guardian_subagent` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request.",
|
|
"enum": [
|
|
"user",
|
|
"guardian_subagent"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"AskForApproval": {
|
|
"oneOf": [
|
|
{
|
|
"enum": [
|
|
"untrusted",
|
|
"on-failure",
|
|
"on-request",
|
|
"never"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"granular": {
|
|
"properties": {
|
|
"mcp_elicitations": {
|
|
"type": "boolean"
|
|
},
|
|
"request_permissions": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
},
|
|
"rules": {
|
|
"type": "boolean"
|
|
},
|
|
"sandbox_approval": {
|
|
"type": "boolean"
|
|
},
|
|
"skill_approval": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"mcp_elicitations",
|
|
"rules",
|
|
"sandbox_approval"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"granular"
|
|
],
|
|
"title": "GranularAskForApproval",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"ByteRange": {
|
|
"properties": {
|
|
"end": {
|
|
"format": "uint",
|
|
"minimum": 0.0,
|
|
"type": "integer"
|
|
},
|
|
"start": {
|
|
"format": "uint",
|
|
"minimum": 0.0,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"end",
|
|
"start"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"CodexErrorInfo": {
|
|
"description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.",
|
|
"oneOf": [
|
|
{
|
|
"enum": [
|
|
"contextWindowExceeded",
|
|
"usageLimitExceeded",
|
|
"serverOverloaded",
|
|
"internalServerError",
|
|
"unauthorized",
|
|
"badRequest",
|
|
"threadRollbackFailed",
|
|
"sandboxError",
|
|
"other"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"httpConnectionFailed": {
|
|
"properties": {
|
|
"httpStatusCode": {
|
|
"format": "uint16",
|
|
"minimum": 0.0,
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"httpConnectionFailed"
|
|
],
|
|
"title": "HttpConnectionFailedCodexErrorInfo",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"additionalProperties": false,
|
|
"description": "Failed to connect to the response SSE stream.",
|
|
"properties": {
|
|
"responseStreamConnectionFailed": {
|
|
"properties": {
|
|
"httpStatusCode": {
|
|
"format": "uint16",
|
|
"minimum": 0.0,
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"responseStreamConnectionFailed"
|
|
],
|
|
"title": "ResponseStreamConnectionFailedCodexErrorInfo",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"additionalProperties": false,
|
|
"description": "The response SSE stream disconnected in the middle of a turn before completion.",
|
|
"properties": {
|
|
"responseStreamDisconnected": {
|
|
"properties": {
|
|
"httpStatusCode": {
|
|
"format": "uint16",
|
|
"minimum": 0.0,
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"responseStreamDisconnected"
|
|
],
|
|
"title": "ResponseStreamDisconnectedCodexErrorInfo",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"additionalProperties": false,
|
|
"description": "Reached the retry limit for responses.",
|
|
"properties": {
|
|
"responseTooManyFailedAttempts": {
|
|
"properties": {
|
|
"httpStatusCode": {
|
|
"format": "uint16",
|
|
"minimum": 0.0,
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"responseTooManyFailedAttempts"
|
|
],
|
|
"title": "ResponseTooManyFailedAttemptsCodexErrorInfo",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"CollabAgentState": {
|
|
"properties": {
|
|
"message": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/CollabAgentStatus"
|
|
}
|
|
},
|
|
"required": [
|
|
"status"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"CollabAgentStatus": {
|
|
"enum": [
|
|
"pendingInit",
|
|
"running",
|
|
"completed",
|
|
"errored",
|
|
"shutdown",
|
|
"notFound"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"CollabAgentTool": {
|
|
"enum": [
|
|
"spawnAgent",
|
|
"sendInput",
|
|
"resumeAgent",
|
|
"wait",
|
|
"closeAgent"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"CollabAgentToolCallStatus": {
|
|
"enum": [
|
|
"inProgress",
|
|
"completed",
|
|
"failed"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"CommandAction": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"command": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"read"
|
|
],
|
|
"title": "ReadCommandActionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"command",
|
|
"name",
|
|
"path",
|
|
"type"
|
|
],
|
|
"title": "ReadCommandAction",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"command": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"listFiles"
|
|
],
|
|
"title": "ListFilesCommandActionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"command",
|
|
"type"
|
|
],
|
|
"title": "ListFilesCommandAction",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"command": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"query": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"search"
|
|
],
|
|
"title": "SearchCommandActionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"command",
|
|
"type"
|
|
],
|
|
"title": "SearchCommandAction",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"command": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"unknown"
|
|
],
|
|
"title": "UnknownCommandActionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"command",
|
|
"type"
|
|
],
|
|
"title": "UnknownCommandAction",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"CommandExecutionStatus": {
|
|
"enum": [
|
|
"inProgress",
|
|
"completed",
|
|
"failed",
|
|
"declined"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"DynamicToolCallOutputContentItem": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"inputText"
|
|
],
|
|
"title": "InputTextDynamicToolCallOutputContentItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"text",
|
|
"type"
|
|
],
|
|
"title": "InputTextDynamicToolCallOutputContentItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"imageUrl": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"inputImage"
|
|
],
|
|
"title": "InputImageDynamicToolCallOutputContentItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"imageUrl",
|
|
"type"
|
|
],
|
|
"title": "InputImageDynamicToolCallOutputContentItem",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"DynamicToolCallStatus": {
|
|
"enum": [
|
|
"inProgress",
|
|
"completed",
|
|
"failed"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"FileUpdateChange": {
|
|
"properties": {
|
|
"diff": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"$ref": "#/definitions/PatchChangeKind"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"diff",
|
|
"kind",
|
|
"path"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"GitInfo": {
|
|
"properties": {
|
|
"branch": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"originUrl": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"sha": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"McpToolCallError": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"message"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"McpToolCallResult": {
|
|
"properties": {
|
|
"content": {
|
|
"items": true,
|
|
"type": "array"
|
|
},
|
|
"structuredContent": true
|
|
},
|
|
"required": [
|
|
"content"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"McpToolCallStatus": {
|
|
"enum": [
|
|
"inProgress",
|
|
"completed",
|
|
"failed"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"MessagePhase": {
|
|
"description": "Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as \"phase unknown\" and keep compatibility behavior for legacy models.",
|
|
"oneOf": [
|
|
{
|
|
"description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
|
|
"enum": [
|
|
"commentary"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"description": "The assistant's terminal answer text for the current turn.",
|
|
"enum": [
|
|
"final_answer"
|
|
],
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"NetworkAccess": {
|
|
"enum": [
|
|
"restricted",
|
|
"enabled"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"PatchApplyStatus": {
|
|
"enum": [
|
|
"inProgress",
|
|
"completed",
|
|
"failed",
|
|
"declined"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"PatchChangeKind": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"add"
|
|
],
|
|
"title": "AddPatchChangeKindType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "AddPatchChangeKind",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"delete"
|
|
],
|
|
"title": "DeletePatchChangeKindType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "DeletePatchChangeKind",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"move_path": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"update"
|
|
],
|
|
"title": "UpdatePatchChangeKindType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "UpdatePatchChangeKind",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"ReadOnlyAccess": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"includePlatformDefaults": {
|
|
"default": true,
|
|
"type": "boolean"
|
|
},
|
|
"readableRoots": {
|
|
"default": [],
|
|
"items": {
|
|
"$ref": "#/definitions/AbsolutePathBuf"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"restricted"
|
|
],
|
|
"title": "RestrictedReadOnlyAccessType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "RestrictedReadOnlyAccess",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"fullAccess"
|
|
],
|
|
"title": "FullAccessReadOnlyAccessType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "FullAccessReadOnlyAccess",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"ReasoningEffort": {
|
|
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
|
|
"enum": [
|
|
"none",
|
|
"minimal",
|
|
"low",
|
|
"medium",
|
|
"high",
|
|
"xhigh"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"SandboxPolicy": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"dangerFullAccess"
|
|
],
|
|
"title": "DangerFullAccessSandboxPolicyType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "DangerFullAccessSandboxPolicy",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"access": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/ReadOnlyAccess"
|
|
}
|
|
],
|
|
"default": {
|
|
"type": "fullAccess"
|
|
}
|
|
},
|
|
"networkAccess": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"readOnly"
|
|
],
|
|
"title": "ReadOnlySandboxPolicyType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "ReadOnlySandboxPolicy",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"networkAccess": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/NetworkAccess"
|
|
}
|
|
],
|
|
"default": "restricted"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"externalSandbox"
|
|
],
|
|
"title": "ExternalSandboxSandboxPolicyType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "ExternalSandboxSandboxPolicy",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"excludeSlashTmp": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
},
|
|
"excludeTmpdirEnvVar": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
},
|
|
"networkAccess": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
},
|
|
"readOnlyAccess": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/ReadOnlyAccess"
|
|
}
|
|
],
|
|
"default": {
|
|
"type": "fullAccess"
|
|
}
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"workspaceWrite"
|
|
],
|
|
"title": "WorkspaceWriteSandboxPolicyType",
|
|
"type": "string"
|
|
},
|
|
"writableRoots": {
|
|
"default": [],
|
|
"items": {
|
|
"$ref": "#/definitions/AbsolutePathBuf"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "WorkspaceWriteSandboxPolicy",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"ServiceTier": {
|
|
"enum": [
|
|
"fast",
|
|
"flex"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"SessionSource": {
|
|
"oneOf": [
|
|
{
|
|
"enum": [
|
|
"cli",
|
|
"vscode",
|
|
"exec",
|
|
"appServer",
|
|
"unknown"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"subAgent": {
|
|
"$ref": "#/definitions/SubAgentSource"
|
|
}
|
|
},
|
|
"required": [
|
|
"subAgent"
|
|
],
|
|
"title": "SubAgentSessionSource",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"SubAgentSource": {
|
|
"oneOf": [
|
|
{
|
|
"enum": [
|
|
"review",
|
|
"compact",
|
|
"memory_consolidation"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"thread_spawn": {
|
|
"properties": {
|
|
"agent_nickname": {
|
|
"default": null,
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"agent_role": {
|
|
"default": null,
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"depth": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"parent_thread_id": {
|
|
"$ref": "#/definitions/ThreadId"
|
|
}
|
|
},
|
|
"required": [
|
|
"depth",
|
|
"parent_thread_id"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"thread_spawn"
|
|
],
|
|
"title": "ThreadSpawnSubAgentSource",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"other": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"other"
|
|
],
|
|
"title": "OtherSubAgentSource",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"TextElement": {
|
|
"properties": {
|
|
"byteRange": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/ByteRange"
|
|
}
|
|
],
|
|
"description": "Byte range in the parent `text` buffer that this element occupies."
|
|
},
|
|
"placeholder": {
|
|
"description": "Optional human-readable placeholder for the element, displayed in the UI.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"byteRange"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"Thread": {
|
|
"properties": {
|
|
"agentNickname": {
|
|
"description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"agentRole": {
|
|
"description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"cliVersion": {
|
|
"description": "Version of the CLI that created the thread.",
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"description": "Unix timestamp (in seconds) when the thread was created.",
|
|
"format": "int64",
|
|
"type": "integer"
|
|
},
|
|
"cwd": {
|
|
"description": "Working directory captured for the thread.",
|
|
"type": "string"
|
|
},
|
|
"ephemeral": {
|
|
"description": "Whether the thread is ephemeral and should not be materialized on disk.",
|
|
"type": "boolean"
|
|
},
|
|
"gitInfo": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/GitInfo"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Optional Git metadata captured when the thread was created."
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"modelProvider": {
|
|
"description": "Model provider used for this thread (for example, 'openai').",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "Optional user-facing thread title.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"path": {
|
|
"description": "[UNSTABLE] Path to the thread on disk.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"preview": {
|
|
"description": "Usually the first user message in the thread, if available.",
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/SessionSource"
|
|
}
|
|
],
|
|
"description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)."
|
|
},
|
|
"status": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/ThreadStatus"
|
|
}
|
|
],
|
|
"description": "Current runtime status for the thread."
|
|
},
|
|
"turns": {
|
|
"description": "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.",
|
|
"items": {
|
|
"$ref": "#/definitions/Turn"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"updatedAt": {
|
|
"description": "Unix timestamp (in seconds) when the thread was last updated.",
|
|
"format": "int64",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"cliVersion",
|
|
"createdAt",
|
|
"cwd",
|
|
"ephemeral",
|
|
"id",
|
|
"modelProvider",
|
|
"preview",
|
|
"source",
|
|
"status",
|
|
"turns",
|
|
"updatedAt"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"ThreadActiveFlag": {
|
|
"enum": [
|
|
"waitingOnApproval",
|
|
"waitingOnUserInput"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"ThreadId": {
|
|
"type": "string"
|
|
},
|
|
"ThreadItem": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"content": {
|
|
"items": {
|
|
"$ref": "#/definitions/UserInput"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"userMessage"
|
|
],
|
|
"title": "UserMessageThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"content",
|
|
"id",
|
|
"type"
|
|
],
|
|
"title": "UserMessageThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"phase": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/MessagePhase"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"agentMessage"
|
|
],
|
|
"title": "AgentMessageThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"text",
|
|
"type"
|
|
],
|
|
"title": "AgentMessageThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"plan"
|
|
],
|
|
"title": "PlanThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"text",
|
|
"type"
|
|
],
|
|
"title": "PlanThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"content": {
|
|
"default": [],
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"summary": {
|
|
"default": [],
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"reasoning"
|
|
],
|
|
"title": "ReasoningThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"type"
|
|
],
|
|
"title": "ReasoningThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"aggregatedOutput": {
|
|
"description": "The command's output, aggregated from stdout and stderr.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"command": {
|
|
"description": "The command to be executed.",
|
|
"type": "string"
|
|
},
|
|
"commandActions": {
|
|
"description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.",
|
|
"items": {
|
|
"$ref": "#/definitions/CommandAction"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"cwd": {
|
|
"description": "The command's working directory.",
|
|
"type": "string"
|
|
},
|
|
"durationMs": {
|
|
"description": "The duration of the command execution in milliseconds.",
|
|
"format": "int64",
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"exitCode": {
|
|
"description": "The command's exit code.",
|
|
"format": "int32",
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"processId": {
|
|
"description": "Identifier for the underlying PTY process (when available).",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/CommandExecutionStatus"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"commandExecution"
|
|
],
|
|
"title": "CommandExecutionThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"command",
|
|
"commandActions",
|
|
"cwd",
|
|
"id",
|
|
"status",
|
|
"type"
|
|
],
|
|
"title": "CommandExecutionThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"changes": {
|
|
"items": {
|
|
"$ref": "#/definitions/FileUpdateChange"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/PatchApplyStatus"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"fileChange"
|
|
],
|
|
"title": "FileChangeThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"changes",
|
|
"id",
|
|
"status",
|
|
"type"
|
|
],
|
|
"title": "FileChangeThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"arguments": true,
|
|
"durationMs": {
|
|
"description": "The duration of the MCP tool call in milliseconds.",
|
|
"format": "int64",
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"error": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/McpToolCallError"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"result": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/McpToolCallResult"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"server": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/McpToolCallStatus"
|
|
},
|
|
"tool": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"mcpToolCall"
|
|
],
|
|
"title": "McpToolCallThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"arguments",
|
|
"id",
|
|
"server",
|
|
"status",
|
|
"tool",
|
|
"type"
|
|
],
|
|
"title": "McpToolCallThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"arguments": true,
|
|
"contentItems": {
|
|
"items": {
|
|
"$ref": "#/definitions/DynamicToolCallOutputContentItem"
|
|
},
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
]
|
|
},
|
|
"durationMs": {
|
|
"description": "The duration of the dynamic tool call in milliseconds.",
|
|
"format": "int64",
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/DynamicToolCallStatus"
|
|
},
|
|
"success": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
},
|
|
"tool": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"dynamicToolCall"
|
|
],
|
|
"title": "DynamicToolCallThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"arguments",
|
|
"id",
|
|
"status",
|
|
"tool",
|
|
"type"
|
|
],
|
|
"title": "DynamicToolCallThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"agentsStates": {
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/CollabAgentState"
|
|
},
|
|
"description": "Last known status of the target agents, when available.",
|
|
"type": "object"
|
|
},
|
|
"id": {
|
|
"description": "Unique identifier for this collab tool call.",
|
|
"type": "string"
|
|
},
|
|
"model": {
|
|
"description": "Model requested for the spawned agent, when applicable.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"prompt": {
|
|
"description": "Prompt text sent as part of the collab tool call, when available.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"reasoningEffort": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/ReasoningEffort"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Reasoning effort requested for the spawned agent, when applicable."
|
|
},
|
|
"receiverThreadIds": {
|
|
"description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"senderThreadId": {
|
|
"description": "Thread ID of the agent issuing the collab request.",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/CollabAgentToolCallStatus"
|
|
}
|
|
],
|
|
"description": "Current status of the collab tool call."
|
|
},
|
|
"tool": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/CollabAgentTool"
|
|
}
|
|
],
|
|
"description": "Name of the collab tool that was invoked."
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"collabAgentToolCall"
|
|
],
|
|
"title": "CollabAgentToolCallThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"agentsStates",
|
|
"id",
|
|
"receiverThreadIds",
|
|
"senderThreadId",
|
|
"status",
|
|
"tool",
|
|
"type"
|
|
],
|
|
"title": "CollabAgentToolCallThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"action": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/WebSearchAction"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"query": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"webSearch"
|
|
],
|
|
"title": "WebSearchThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"query",
|
|
"type"
|
|
],
|
|
"title": "WebSearchThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"imageView"
|
|
],
|
|
"title": "ImageViewThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"path",
|
|
"type"
|
|
],
|
|
"title": "ImageViewThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"result": {
|
|
"type": "string"
|
|
},
|
|
"revisedPrompt": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"imageGeneration"
|
|
],
|
|
"title": "ImageGenerationThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"result",
|
|
"status",
|
|
"type"
|
|
],
|
|
"title": "ImageGenerationThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"review": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"enteredReviewMode"
|
|
],
|
|
"title": "EnteredReviewModeThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"review",
|
|
"type"
|
|
],
|
|
"title": "EnteredReviewModeThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"review": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"exitedReviewMode"
|
|
],
|
|
"title": "ExitedReviewModeThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"review",
|
|
"type"
|
|
],
|
|
"title": "ExitedReviewModeThreadItem",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"contextCompaction"
|
|
],
|
|
"title": "ContextCompactionThreadItemType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"type"
|
|
],
|
|
"title": "ContextCompactionThreadItem",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"ThreadStatus": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"notLoaded"
|
|
],
|
|
"title": "NotLoadedThreadStatusType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "NotLoadedThreadStatus",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"idle"
|
|
],
|
|
"title": "IdleThreadStatusType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "IdleThreadStatus",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"systemError"
|
|
],
|
|
"title": "SystemErrorThreadStatusType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "SystemErrorThreadStatus",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"activeFlags": {
|
|
"items": {
|
|
"$ref": "#/definitions/ThreadActiveFlag"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"active"
|
|
],
|
|
"title": "ActiveThreadStatusType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"activeFlags",
|
|
"type"
|
|
],
|
|
"title": "ActiveThreadStatus",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"Turn": {
|
|
"properties": {
|
|
"error": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/TurnError"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Only populated when the Turn's status is failed."
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"items": {
|
|
"description": "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.",
|
|
"items": {
|
|
"$ref": "#/definitions/ThreadItem"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/TurnStatus"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"items",
|
|
"status"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"TurnError": {
|
|
"properties": {
|
|
"additionalDetails": {
|
|
"default": null,
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"codexErrorInfo": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/CodexErrorInfo"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"message"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"TurnStatus": {
|
|
"enum": [
|
|
"completed",
|
|
"interrupted",
|
|
"failed",
|
|
"inProgress"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"UserInput": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"text_elements": {
|
|
"default": [],
|
|
"description": "UI-defined spans within `text` used to render or persist special elements.",
|
|
"items": {
|
|
"$ref": "#/definitions/TextElement"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"text"
|
|
],
|
|
"title": "TextUserInputType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"text",
|
|
"type"
|
|
],
|
|
"title": "TextUserInput",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"image"
|
|
],
|
|
"title": "ImageUserInputType",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"url"
|
|
],
|
|
"title": "ImageUserInput",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"localImage"
|
|
],
|
|
"title": "LocalImageUserInputType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"type"
|
|
],
|
|
"title": "LocalImageUserInput",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"skill"
|
|
],
|
|
"title": "SkillUserInputType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"path",
|
|
"type"
|
|
],
|
|
"title": "SkillUserInput",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"mention"
|
|
],
|
|
"title": "MentionUserInputType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"path",
|
|
"type"
|
|
],
|
|
"title": "MentionUserInput",
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"WebSearchAction": {
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"queries": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
]
|
|
},
|
|
"query": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"search"
|
|
],
|
|
"title": "SearchWebSearchActionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "SearchWebSearchAction",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"openPage"
|
|
],
|
|
"title": "OpenPageWebSearchActionType",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "OpenPageWebSearchAction",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"pattern": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"findInPage"
|
|
],
|
|
"title": "FindInPageWebSearchActionType",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "FindInPageWebSearchAction",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"other"
|
|
],
|
|
"title": "OtherWebSearchActionType",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "OtherWebSearchAction",
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"properties": {
|
|
"approvalPolicy": {
|
|
"$ref": "#/definitions/AskForApproval"
|
|
},
|
|
"approvalsReviewer": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/ApprovalsReviewer"
|
|
}
|
|
],
|
|
"description": "Reviewer currently used for approval requests on this thread."
|
|
},
|
|
"cwd": {
|
|
"type": "string"
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"modelProvider": {
|
|
"type": "string"
|
|
},
|
|
"reasoningEffort": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/ReasoningEffort"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"sandbox": {
|
|
"$ref": "#/definitions/SandboxPolicy"
|
|
},
|
|
"serviceTier": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/ServiceTier"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"thread": {
|
|
"$ref": "#/definitions/Thread"
|
|
}
|
|
},
|
|
"required": [
|
|
"approvalPolicy",
|
|
"approvalsReviewer",
|
|
"cwd",
|
|
"model",
|
|
"modelProvider",
|
|
"sandbox",
|
|
"thread"
|
|
],
|
|
"title": "ThreadResumeResponse",
|
|
"type": "object"
|
|
} |