@openclaw/codex 2026.9.1-beta.1 → 2026.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +5 -6
- package/dist/{attempt-client-cleanup-bfsmcQ6m.js → attempt-client-cleanup-DYHcRQAa.js} +31 -45
- package/dist/attempt-context-DmQUNWwT.js +634 -0
- package/dist/{auth-binding-B4FfbcCg.js → auth-binding-Ds_QVm-X.js} +18 -3
- package/dist/{binding-connection-BMvPX73o.js → binding-connection-E6uDsPlx.js} +2 -2
- package/dist/{bounded-turn-B7iBUcuP.js → bounded-turn-wzJrwKKe.js} +15 -20
- package/dist/{capabilities-BRMh0aIq.js → capabilities-dIjNVCYH.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{command-formatters-DEsIufkt.js → command-formatters-CLHhEB1Q.js} +5 -4
- package/dist/{command-handlers-D_-1_qRp.js → command-handlers-CTGb2csu.js} +124 -101
- package/dist/{compact-BglNFZrQ.js → compact-_t0HQrUS.js} +38 -29
- package/dist/{config-giW8X0QA.js → config-BhmfC1s6.js} +294 -282
- package/dist/{context-compaction-activity-BOeJf7yo.js → context-compaction-activity-CMla5FPJ.js} +4 -1
- package/dist/{conversation-binding-data-CW2GuupV.js → conversation-binding-data-BiodpIzq.js} +2 -1
- package/dist/doctor-contract-api.js +143 -12
- package/dist/{dynamic-tools-Dnlfa--w.js → dynamic-tools-BU9tmlYm.js} +599 -655
- package/dist/{effective-mcp-catalog-CTeGrnfO.js → effective-mcp-catalog-DzYBW4h1.js} +2 -2
- package/dist/{event-projector-assistant-message-C5-Ds8mA.js → event-projector-assistant-message-DHRFXKbS.js} +4 -4
- package/dist/{event-projector-usage-Bk1I90Bg.js → event-projector-usage-C5mcrGjp.js} +15 -148
- package/dist/{harness-Csz0F-DK.js → harness-DXVZ5II5.js} +42 -52
- package/dist/harness.js +1 -1
- package/dist/index.js +458 -404
- package/dist/{isolated-completion-Cv6FqygM.js → isolated-completion-kg9kv4iH.js} +4 -4
- package/dist/launch-args-RXQwn8zV.js +90 -0
- package/dist/{managed-binary-DFYK4DWq.js → managed-binary-4-Vjz5GH.js} +14 -9
- package/dist/media-understanding-provider.js +1 -1
- package/dist/model-catalog-CUM68Hkl.js +101 -0
- package/dist/{models-TS3HBU-q.js → models-sYnEc0gd.js} +25 -28
- package/dist/{native-subagent-monitor-4Mfq2HDs.js → native-subagent-monitor-CnH147jH.js} +55 -115
- package/dist/{node-exec-server.runtime-BpWqJO1V.js → node-exec-server.runtime-CstNHCmC.js} +9 -6
- package/dist/{plugin-approval-roundtrip-bUm777tR.js → plugin-approval-roundtrip-CNe-Xrjx.js} +30 -3
- package/dist/{plugin-marketplace-discovery-B9DvaAG-.js → plugin-marketplace-discovery-CfFlKqDl.js} +15 -14
- package/dist/{plugin-metadata-cache-CTCT3w5L.js → plugin-metadata-cache-BFrPhb2c.js} +6 -6
- package/dist/provider-capabilities-DW5p4k9w.js +101 -0
- package/dist/{rate-limits-C5_D8Gmb.js → rate-limits-CawQJfUS.js} +3 -2
- package/dist/{sandbox-guard-kuWTn9C5.js → request-DYAI5FQE.js} +195 -2
- package/dist/{run-attempt-DYc0QCBF.js → run-attempt-D1hJO4fX.js} +828 -2100
- package/dist/{runtime-artifact-BvyT1uyd.js → runtime-artifact-C3jVimFn.js} +21 -14
- package/dist/{session-binding-Bcynfd-_.js → session-binding-BHuTCRZQ.js} +198 -127
- package/dist/{session-catalog-DaLKVtpH.js → session-catalog-yyvTWFOw.js} +564 -408
- package/dist/{session-cli-DMc4oS2w.js → session-cli-CmFEXMAM.js} +1 -1
- package/dist/session-history-C5J1AKzG.js +87 -0
- package/dist/session-initialization-BeWzjGiR.js +74 -0
- package/dist/{session-permission-policy-BrNH1bjy.js → session-permission-policy-DeWVTCMj.js} +2 -2
- package/dist/session-retirement-BujDjXVF.js +97 -0
- package/dist/{session-upstream-marker-BIkusb95.js → session-upstream-marker-C351-5Qw.js} +19 -4
- package/dist/settled-turn-context-D3SNWtUn.js +268 -0
- package/dist/settled-turn-finalizer-BVJx4yoc.js +104 -0
- package/dist/{shared-client-DKz23hHY.js → shared-client-DxcfF9KX.js} +3480 -679
- package/dist/{side-question-DjA_jsNe.js → side-question-BTZAII4l.js} +108 -70
- package/dist/{thread-lifecycle-L7oEkTlq.js → thread-lifecycle-DAcEJ_Om.js} +2188 -1915
- package/dist/{thread-ownership-DZeuKH1j.js → thread-ownership-zGokd8i1.js} +25 -14
- package/dist/thread-policy-g4KbJPzp.js +54 -0
- package/dist/{plugin-app-cache-key-C1CAdfcP.js → thread-resume-C7pyVKeW.js} +59 -7
- package/dist/{transcript-mirror-DsCMWBca.js → transcript-mirror-DTUxFWa_.js} +79 -17
- package/dist/transport-stdio-CyPldczm.js +726 -0
- package/dist/{upstream-prompt-provenance-CFmsKwr9.js → upstream-prompt-provenance-LphB8slG.js} +8 -4
- package/dist/upstream-session-fork-CYlBIGVt.js +966 -0
- package/dist/{usage-ROIaW3wo.js → usage-Bj-rrzkR.js} +3 -3
- package/dist/{web-search-provider.runtime-ClaNPV7N.js → web-search-provider.runtime-D2FWSK4w.js} +3 -3
- package/openclaw.plugin.json +1 -30
- package/package.json +6 -6
- package/dist/command-rpc-CCeCkf_v.js +0 -90
- package/dist/incognito-session-ET_ufDH-.js +0 -2
- package/dist/model-catalog-i9rNBthX.js +0 -48
- package/dist/protocol-validators-VeJxxJ0U.js +0 -2421
- package/dist/request-DXXGHko0.js +0 -157
- package/dist/session-catalog-home-id-BNwAJ9D7.js +0 -18
- package/dist/session-retirement-CcNC3YSY.js +0 -36
- package/dist/settled-turn-finalizer-Dc3ApjU4.js +0 -328
- package/dist/thread-resume-BE9qNEW0.js +0 -30
- package/dist/transport-stdio-DhoGy33Z.js +0 -99
- package/dist/upstream-session-fork-DlaHxSLC.js +0 -326
|
@@ -1,2421 +0,0 @@
|
|
|
1
|
-
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
import { Compile } from "typebox/compile";
|
|
3
|
-
//#region extensions/codex/src/app-server/protocol-generated/json/DynamicToolCallParams.json
|
|
4
|
-
var DynamicToolCallParams_default = {
|
|
5
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
6
|
-
properties: {
|
|
7
|
-
"arguments": true,
|
|
8
|
-
"callId": { "type": "string" },
|
|
9
|
-
"namespace": { "type": ["string", "null"] },
|
|
10
|
-
"threadId": { "type": "string" },
|
|
11
|
-
"tool": { "type": "string" },
|
|
12
|
-
"turnId": { "type": "string" }
|
|
13
|
-
},
|
|
14
|
-
required: [
|
|
15
|
-
"arguments",
|
|
16
|
-
"callId",
|
|
17
|
-
"threadId",
|
|
18
|
-
"tool",
|
|
19
|
-
"turnId"
|
|
20
|
-
],
|
|
21
|
-
title: "DynamicToolCallParams",
|
|
22
|
-
type: "object"
|
|
23
|
-
};
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region extensions/codex/src/app-server/protocol-generated/json/v2/CodexAppServerProtocolDefinitions.json
|
|
26
|
-
var definitions = {
|
|
27
|
-
"AbsolutePathBuf": {
|
|
28
|
-
"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.",
|
|
29
|
-
"type": "string"
|
|
30
|
-
},
|
|
31
|
-
"Account": { "oneOf": [
|
|
32
|
-
{
|
|
33
|
-
"properties": { "type": {
|
|
34
|
-
"enum": ["apiKey"],
|
|
35
|
-
"title": "ApiKeyAccountType",
|
|
36
|
-
"type": "string"
|
|
37
|
-
} },
|
|
38
|
-
"required": ["type"],
|
|
39
|
-
"title": "ApiKeyAccount",
|
|
40
|
-
"type": "object"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"properties": {
|
|
44
|
-
"email": { "type": ["string", "null"] },
|
|
45
|
-
"planType": { "$ref": "#/definitions/PlanType" },
|
|
46
|
-
"type": {
|
|
47
|
-
"enum": ["chatgpt"],
|
|
48
|
-
"title": "ChatgptAccountType",
|
|
49
|
-
"type": "string"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"required": [
|
|
53
|
-
"email",
|
|
54
|
-
"planType",
|
|
55
|
-
"type"
|
|
56
|
-
],
|
|
57
|
-
"title": "ChatgptAccount",
|
|
58
|
-
"type": "object"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"properties": {
|
|
62
|
-
"type": {
|
|
63
|
-
"enum": ["amazonBedrock"],
|
|
64
|
-
"title": "AmazonBedrockAccountType",
|
|
65
|
-
"type": "string"
|
|
66
|
-
},
|
|
67
|
-
"usesCodexManagedCredentials": {
|
|
68
|
-
"default": false,
|
|
69
|
-
"type": "boolean"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"required": ["type"],
|
|
73
|
-
"title": "AmazonBedrockAccount",
|
|
74
|
-
"type": "object"
|
|
75
|
-
}
|
|
76
|
-
] },
|
|
77
|
-
"ActivePermissionProfile": {
|
|
78
|
-
"properties": {
|
|
79
|
-
"extends": {
|
|
80
|
-
"default": null,
|
|
81
|
-
"description": "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
|
|
82
|
-
"type": ["string", "null"]
|
|
83
|
-
},
|
|
84
|
-
"id": {
|
|
85
|
-
"description": "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
|
|
86
|
-
"type": "string"
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"required": ["id"],
|
|
90
|
-
"type": "object"
|
|
91
|
-
},
|
|
92
|
-
"AgentMessageDelivery": {
|
|
93
|
-
"enum": ["async"],
|
|
94
|
-
"type": "string"
|
|
95
|
-
},
|
|
96
|
-
"AgentPath": { "type": "string" },
|
|
97
|
-
"ApprovalsReviewer": {
|
|
98
|
-
"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`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
|
|
99
|
-
"enum": [
|
|
100
|
-
"user",
|
|
101
|
-
"auto_review",
|
|
102
|
-
"guardian_subagent"
|
|
103
|
-
],
|
|
104
|
-
"type": "string"
|
|
105
|
-
},
|
|
106
|
-
"AskForApproval": { "oneOf": [{
|
|
107
|
-
"additionalProperties": false,
|
|
108
|
-
"properties": { "granular": {
|
|
109
|
-
"properties": {
|
|
110
|
-
"mcp_elicitations": { "type": "boolean" },
|
|
111
|
-
"request_permissions": {
|
|
112
|
-
"default": false,
|
|
113
|
-
"type": "boolean"
|
|
114
|
-
},
|
|
115
|
-
"rules": { "type": "boolean" },
|
|
116
|
-
"sandbox_approval": { "type": "boolean" },
|
|
117
|
-
"skill_approval": {
|
|
118
|
-
"default": false,
|
|
119
|
-
"type": "boolean"
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"required": [
|
|
123
|
-
"mcp_elicitations",
|
|
124
|
-
"rules",
|
|
125
|
-
"sandbox_approval"
|
|
126
|
-
],
|
|
127
|
-
"type": "object"
|
|
128
|
-
} },
|
|
129
|
-
"required": ["granular"],
|
|
130
|
-
"title": "GranularAskForApproval",
|
|
131
|
-
"type": "object"
|
|
132
|
-
}, {
|
|
133
|
-
"enum": [
|
|
134
|
-
"untrusted",
|
|
135
|
-
"on-request",
|
|
136
|
-
"never"
|
|
137
|
-
],
|
|
138
|
-
"type": "string"
|
|
139
|
-
}] },
|
|
140
|
-
"ByteRange": {
|
|
141
|
-
"properties": {
|
|
142
|
-
"end": {
|
|
143
|
-
"format": "uint",
|
|
144
|
-
"minimum": 0,
|
|
145
|
-
"type": "integer"
|
|
146
|
-
},
|
|
147
|
-
"start": {
|
|
148
|
-
"format": "uint",
|
|
149
|
-
"minimum": 0,
|
|
150
|
-
"type": "integer"
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"required": ["end", "start"],
|
|
154
|
-
"type": "object"
|
|
155
|
-
},
|
|
156
|
-
"CodexErrorInfo": {
|
|
157
|
-
"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.",
|
|
158
|
-
"oneOf": [
|
|
159
|
-
{
|
|
160
|
-
"additionalProperties": false,
|
|
161
|
-
"properties": { "httpConnectionFailed": {
|
|
162
|
-
"properties": { "httpStatusCode": {
|
|
163
|
-
"format": "uint16",
|
|
164
|
-
"minimum": 0,
|
|
165
|
-
"type": ["integer", "null"]
|
|
166
|
-
} },
|
|
167
|
-
"type": "object"
|
|
168
|
-
} },
|
|
169
|
-
"required": ["httpConnectionFailed"],
|
|
170
|
-
"title": "HttpConnectionFailedCodexErrorInfo",
|
|
171
|
-
"type": "object"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"additionalProperties": false,
|
|
175
|
-
"description": "Failed to connect to the response SSE stream.",
|
|
176
|
-
"properties": { "responseStreamConnectionFailed": {
|
|
177
|
-
"properties": { "httpStatusCode": {
|
|
178
|
-
"format": "uint16",
|
|
179
|
-
"minimum": 0,
|
|
180
|
-
"type": ["integer", "null"]
|
|
181
|
-
} },
|
|
182
|
-
"type": "object"
|
|
183
|
-
} },
|
|
184
|
-
"required": ["responseStreamConnectionFailed"],
|
|
185
|
-
"title": "ResponseStreamConnectionFailedCodexErrorInfo",
|
|
186
|
-
"type": "object"
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
"additionalProperties": false,
|
|
190
|
-
"description": "The response SSE stream disconnected in the middle of a turn before completion.",
|
|
191
|
-
"properties": { "responseStreamDisconnected": {
|
|
192
|
-
"properties": { "httpStatusCode": {
|
|
193
|
-
"format": "uint16",
|
|
194
|
-
"minimum": 0,
|
|
195
|
-
"type": ["integer", "null"]
|
|
196
|
-
} },
|
|
197
|
-
"type": "object"
|
|
198
|
-
} },
|
|
199
|
-
"required": ["responseStreamDisconnected"],
|
|
200
|
-
"title": "ResponseStreamDisconnectedCodexErrorInfo",
|
|
201
|
-
"type": "object"
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"additionalProperties": false,
|
|
205
|
-
"description": "Reached the retry limit for responses.",
|
|
206
|
-
"properties": { "responseTooManyFailedAttempts": {
|
|
207
|
-
"properties": { "httpStatusCode": {
|
|
208
|
-
"format": "uint16",
|
|
209
|
-
"minimum": 0,
|
|
210
|
-
"type": ["integer", "null"]
|
|
211
|
-
} },
|
|
212
|
-
"type": "object"
|
|
213
|
-
} },
|
|
214
|
-
"required": ["responseTooManyFailedAttempts"],
|
|
215
|
-
"title": "ResponseTooManyFailedAttemptsCodexErrorInfo",
|
|
216
|
-
"type": "object"
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
"additionalProperties": false,
|
|
220
|
-
"description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.",
|
|
221
|
-
"properties": { "activeTurnNotSteerable": {
|
|
222
|
-
"properties": { "turnKind": { "$ref": "#/definitions/NonSteerableTurnKind" } },
|
|
223
|
-
"required": ["turnKind"],
|
|
224
|
-
"type": "object"
|
|
225
|
-
} },
|
|
226
|
-
"required": ["activeTurnNotSteerable"],
|
|
227
|
-
"title": "ActiveTurnNotSteerableCodexErrorInfo",
|
|
228
|
-
"type": "object"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"enum": [
|
|
232
|
-
"contextWindowExceeded",
|
|
233
|
-
"sessionBudgetExceeded",
|
|
234
|
-
"usageLimitExceeded",
|
|
235
|
-
"serverOverloaded",
|
|
236
|
-
"cyberPolicy",
|
|
237
|
-
"misalignmentPolicyViolation",
|
|
238
|
-
"internalServerError",
|
|
239
|
-
"unauthorized",
|
|
240
|
-
"badRequest",
|
|
241
|
-
"threadRollbackFailed",
|
|
242
|
-
"sandboxError",
|
|
243
|
-
"other"
|
|
244
|
-
],
|
|
245
|
-
"type": "string"
|
|
246
|
-
}
|
|
247
|
-
]
|
|
248
|
-
},
|
|
249
|
-
"CollabAgentState": {
|
|
250
|
-
"properties": {
|
|
251
|
-
"message": { "type": ["string", "null"] },
|
|
252
|
-
"status": { "$ref": "#/definitions/CollabAgentStatus" }
|
|
253
|
-
},
|
|
254
|
-
"required": ["status"],
|
|
255
|
-
"type": "object"
|
|
256
|
-
},
|
|
257
|
-
"CollabAgentStatus": {
|
|
258
|
-
"enum": [
|
|
259
|
-
"pendingInit",
|
|
260
|
-
"running",
|
|
261
|
-
"interrupted",
|
|
262
|
-
"completed",
|
|
263
|
-
"errored",
|
|
264
|
-
"shutdown",
|
|
265
|
-
"notFound"
|
|
266
|
-
],
|
|
267
|
-
"type": "string"
|
|
268
|
-
},
|
|
269
|
-
"CollabAgentTool": {
|
|
270
|
-
"enum": [
|
|
271
|
-
"spawnAgent",
|
|
272
|
-
"sendInput",
|
|
273
|
-
"resumeAgent",
|
|
274
|
-
"wait",
|
|
275
|
-
"closeAgent",
|
|
276
|
-
"sendMessage",
|
|
277
|
-
"followupTask",
|
|
278
|
-
"interruptAgent",
|
|
279
|
-
"listAgents"
|
|
280
|
-
],
|
|
281
|
-
"type": "string"
|
|
282
|
-
},
|
|
283
|
-
"CollabAgentToolCallStatus": {
|
|
284
|
-
"enum": [
|
|
285
|
-
"inProgress",
|
|
286
|
-
"completed",
|
|
287
|
-
"failed",
|
|
288
|
-
"interrupted"
|
|
289
|
-
],
|
|
290
|
-
"type": "string"
|
|
291
|
-
},
|
|
292
|
-
"CommandAction": { "oneOf": [
|
|
293
|
-
{
|
|
294
|
-
"properties": {
|
|
295
|
-
"command": { "type": "string" },
|
|
296
|
-
"name": { "type": "string" },
|
|
297
|
-
"path": { "$ref": "#/definitions/LegacyAppPathString" },
|
|
298
|
-
"type": {
|
|
299
|
-
"enum": ["read"],
|
|
300
|
-
"title": "ReadCommandActionType",
|
|
301
|
-
"type": "string"
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
"required": [
|
|
305
|
-
"command",
|
|
306
|
-
"name",
|
|
307
|
-
"path",
|
|
308
|
-
"type"
|
|
309
|
-
],
|
|
310
|
-
"title": "ReadCommandAction",
|
|
311
|
-
"type": "object"
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
"properties": {
|
|
315
|
-
"command": { "type": "string" },
|
|
316
|
-
"path": { "type": ["string", "null"] },
|
|
317
|
-
"type": {
|
|
318
|
-
"enum": ["listFiles"],
|
|
319
|
-
"title": "ListFilesCommandActionType",
|
|
320
|
-
"type": "string"
|
|
321
|
-
}
|
|
322
|
-
},
|
|
323
|
-
"required": ["command", "type"],
|
|
324
|
-
"title": "ListFilesCommandAction",
|
|
325
|
-
"type": "object"
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
"properties": {
|
|
329
|
-
"command": { "type": "string" },
|
|
330
|
-
"path": { "type": ["string", "null"] },
|
|
331
|
-
"query": { "type": ["string", "null"] },
|
|
332
|
-
"type": {
|
|
333
|
-
"enum": ["search"],
|
|
334
|
-
"title": "SearchCommandActionType",
|
|
335
|
-
"type": "string"
|
|
336
|
-
}
|
|
337
|
-
},
|
|
338
|
-
"required": ["command", "type"],
|
|
339
|
-
"title": "SearchCommandAction",
|
|
340
|
-
"type": "object"
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
"properties": {
|
|
344
|
-
"command": { "type": "string" },
|
|
345
|
-
"type": {
|
|
346
|
-
"enum": ["unknown"],
|
|
347
|
-
"title": "UnknownCommandActionType",
|
|
348
|
-
"type": "string"
|
|
349
|
-
}
|
|
350
|
-
},
|
|
351
|
-
"required": ["command", "type"],
|
|
352
|
-
"title": "UnknownCommandAction",
|
|
353
|
-
"type": "object"
|
|
354
|
-
}
|
|
355
|
-
] },
|
|
356
|
-
"CommandExecutionSource": {
|
|
357
|
-
"enum": [
|
|
358
|
-
"agent",
|
|
359
|
-
"userShell",
|
|
360
|
-
"unifiedExecStartup",
|
|
361
|
-
"unifiedExecInteraction"
|
|
362
|
-
],
|
|
363
|
-
"type": "string"
|
|
364
|
-
},
|
|
365
|
-
"CommandExecutionStatus": {
|
|
366
|
-
"enum": [
|
|
367
|
-
"inProgress",
|
|
368
|
-
"completed",
|
|
369
|
-
"failed",
|
|
370
|
-
"declined"
|
|
371
|
-
],
|
|
372
|
-
"type": "string"
|
|
373
|
-
},
|
|
374
|
-
"DynamicToolCallOutputContentItem": { "oneOf": [
|
|
375
|
-
{
|
|
376
|
-
"properties": {
|
|
377
|
-
"text": { "type": "string" },
|
|
378
|
-
"type": {
|
|
379
|
-
"enum": ["inputText"],
|
|
380
|
-
"title": "InputTextDynamicToolCallOutputContentItemType",
|
|
381
|
-
"type": "string"
|
|
382
|
-
}
|
|
383
|
-
},
|
|
384
|
-
"required": ["text", "type"],
|
|
385
|
-
"title": "InputTextDynamicToolCallOutputContentItem",
|
|
386
|
-
"type": "object"
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
"properties": {
|
|
390
|
-
"imageUrl": { "type": "string" },
|
|
391
|
-
"type": {
|
|
392
|
-
"enum": ["inputImage"],
|
|
393
|
-
"title": "InputImageDynamicToolCallOutputContentItemType",
|
|
394
|
-
"type": "string"
|
|
395
|
-
}
|
|
396
|
-
},
|
|
397
|
-
"required": ["imageUrl", "type"],
|
|
398
|
-
"title": "InputImageDynamicToolCallOutputContentItem",
|
|
399
|
-
"type": "object"
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
"properties": {
|
|
403
|
-
"audioUrl": { "type": "string" },
|
|
404
|
-
"type": {
|
|
405
|
-
"enum": ["inputAudio"],
|
|
406
|
-
"title": "InputAudioDynamicToolCallOutputContentItemType",
|
|
407
|
-
"type": "string"
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
"required": ["audioUrl", "type"],
|
|
411
|
-
"title": "InputAudioDynamicToolCallOutputContentItem",
|
|
412
|
-
"type": "object"
|
|
413
|
-
}
|
|
414
|
-
] },
|
|
415
|
-
"DynamicToolCallStatus": {
|
|
416
|
-
"enum": [
|
|
417
|
-
"inProgress",
|
|
418
|
-
"completed",
|
|
419
|
-
"failed"
|
|
420
|
-
],
|
|
421
|
-
"type": "string"
|
|
422
|
-
},
|
|
423
|
-
"FileUpdateChange": {
|
|
424
|
-
"properties": {
|
|
425
|
-
"diff": { "type": "string" },
|
|
426
|
-
"kind": { "$ref": "#/definitions/PatchChangeKind" },
|
|
427
|
-
"path": { "type": "string" }
|
|
428
|
-
},
|
|
429
|
-
"required": [
|
|
430
|
-
"diff",
|
|
431
|
-
"kind",
|
|
432
|
-
"path"
|
|
433
|
-
],
|
|
434
|
-
"type": "object"
|
|
435
|
-
},
|
|
436
|
-
"GitInfo": {
|
|
437
|
-
"properties": {
|
|
438
|
-
"branch": { "type": ["string", "null"] },
|
|
439
|
-
"originUrl": { "type": ["string", "null"] },
|
|
440
|
-
"sha": { "type": ["string", "null"] }
|
|
441
|
-
},
|
|
442
|
-
"type": "object"
|
|
443
|
-
},
|
|
444
|
-
"HookPromptFragment": {
|
|
445
|
-
"properties": {
|
|
446
|
-
"hookRunId": { "type": "string" },
|
|
447
|
-
"text": { "type": "string" }
|
|
448
|
-
},
|
|
449
|
-
"required": ["hookRunId", "text"],
|
|
450
|
-
"type": "object"
|
|
451
|
-
},
|
|
452
|
-
"ImageDetail": {
|
|
453
|
-
"enum": [
|
|
454
|
-
"auto",
|
|
455
|
-
"low",
|
|
456
|
-
"high",
|
|
457
|
-
"original"
|
|
458
|
-
],
|
|
459
|
-
"type": "string"
|
|
460
|
-
},
|
|
461
|
-
"ImageGenerationFailure": { "oneOf": [{
|
|
462
|
-
"properties": {
|
|
463
|
-
"limitId": { "type": "string" },
|
|
464
|
-
"resetsAt": {
|
|
465
|
-
"format": "int64",
|
|
466
|
-
"type": ["integer", "null"]
|
|
467
|
-
},
|
|
468
|
-
"type": {
|
|
469
|
-
"enum": ["usageLimitExceeded"],
|
|
470
|
-
"title": "UsageLimitExceededImageGenerationFailureType",
|
|
471
|
-
"type": "string"
|
|
472
|
-
}
|
|
473
|
-
},
|
|
474
|
-
"required": ["limitId", "type"],
|
|
475
|
-
"title": "UsageLimitExceededImageGenerationFailure",
|
|
476
|
-
"type": "object"
|
|
477
|
-
}] },
|
|
478
|
-
"InputModality": {
|
|
479
|
-
"description": "Canonical user-input modality tags advertised by a model.",
|
|
480
|
-
"oneOf": [
|
|
481
|
-
{
|
|
482
|
-
"description": "Plain text turns and tool payloads.",
|
|
483
|
-
"enum": ["text"],
|
|
484
|
-
"type": "string"
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
"description": "Image attachments included in user turns.",
|
|
488
|
-
"enum": ["image"],
|
|
489
|
-
"type": "string"
|
|
490
|
-
},
|
|
491
|
-
{
|
|
492
|
-
"description": "Audio attachments included in user turns.",
|
|
493
|
-
"enum": ["audio"],
|
|
494
|
-
"type": "string"
|
|
495
|
-
}
|
|
496
|
-
]
|
|
497
|
-
},
|
|
498
|
-
"LegacyAppPathString": { "type": "string" },
|
|
499
|
-
"McpToolCallAppContext": {
|
|
500
|
-
"properties": {
|
|
501
|
-
"actionName": { "type": ["string", "null"] },
|
|
502
|
-
"appName": { "type": ["string", "null"] },
|
|
503
|
-
"connectorId": { "type": "string" },
|
|
504
|
-
"linkId": { "type": ["string", "null"] },
|
|
505
|
-
"resourceUri": { "type": ["string", "null"] }
|
|
506
|
-
},
|
|
507
|
-
"required": ["connectorId"],
|
|
508
|
-
"type": "object"
|
|
509
|
-
},
|
|
510
|
-
"McpToolCallError": {
|
|
511
|
-
"properties": { "message": { "type": "string" } },
|
|
512
|
-
"required": ["message"],
|
|
513
|
-
"type": "object"
|
|
514
|
-
},
|
|
515
|
-
"McpToolCallResult": {
|
|
516
|
-
"properties": {
|
|
517
|
-
"_meta": true,
|
|
518
|
-
"content": {
|
|
519
|
-
"items": true,
|
|
520
|
-
"type": "array"
|
|
521
|
-
},
|
|
522
|
-
"structuredContent": true
|
|
523
|
-
},
|
|
524
|
-
"required": ["content"],
|
|
525
|
-
"type": "object"
|
|
526
|
-
},
|
|
527
|
-
"McpToolCallStatus": {
|
|
528
|
-
"enum": [
|
|
529
|
-
"inProgress",
|
|
530
|
-
"completed",
|
|
531
|
-
"failed"
|
|
532
|
-
],
|
|
533
|
-
"type": "string"
|
|
534
|
-
},
|
|
535
|
-
"MemoryCitation": {
|
|
536
|
-
"properties": {
|
|
537
|
-
"entries": {
|
|
538
|
-
"items": { "$ref": "#/definitions/MemoryCitationEntry" },
|
|
539
|
-
"type": "array"
|
|
540
|
-
},
|
|
541
|
-
"threadIds": {
|
|
542
|
-
"items": { "type": "string" },
|
|
543
|
-
"type": "array"
|
|
544
|
-
}
|
|
545
|
-
},
|
|
546
|
-
"required": ["entries", "threadIds"],
|
|
547
|
-
"type": "object"
|
|
548
|
-
},
|
|
549
|
-
"MemoryCitationEntry": {
|
|
550
|
-
"properties": {
|
|
551
|
-
"lineEnd": {
|
|
552
|
-
"format": "uint32",
|
|
553
|
-
"minimum": 0,
|
|
554
|
-
"type": "integer"
|
|
555
|
-
},
|
|
556
|
-
"lineStart": {
|
|
557
|
-
"format": "uint32",
|
|
558
|
-
"minimum": 0,
|
|
559
|
-
"type": "integer"
|
|
560
|
-
},
|
|
561
|
-
"note": { "type": "string" },
|
|
562
|
-
"path": { "type": "string" }
|
|
563
|
-
},
|
|
564
|
-
"required": [
|
|
565
|
-
"lineEnd",
|
|
566
|
-
"lineStart",
|
|
567
|
-
"note",
|
|
568
|
-
"path"
|
|
569
|
-
],
|
|
570
|
-
"type": "object"
|
|
571
|
-
},
|
|
572
|
-
"MessagePhase": {
|
|
573
|
-
"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.",
|
|
574
|
-
"oneOf": [{
|
|
575
|
-
"description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
|
|
576
|
-
"enum": ["commentary"],
|
|
577
|
-
"type": "string"
|
|
578
|
-
}, {
|
|
579
|
-
"description": "The assistant's terminal answer text for the current turn.",
|
|
580
|
-
"enum": ["final_answer"],
|
|
581
|
-
"type": "string"
|
|
582
|
-
}]
|
|
583
|
-
},
|
|
584
|
-
"Model": {
|
|
585
|
-
"properties": {
|
|
586
|
-
"additionalSpeedTiers": {
|
|
587
|
-
"default": [],
|
|
588
|
-
"description": "Deprecated: use `serviceTiers` instead.",
|
|
589
|
-
"items": { "type": "string" },
|
|
590
|
-
"type": "array"
|
|
591
|
-
},
|
|
592
|
-
"availabilityNux": { "anyOf": [{ "$ref": "#/definitions/ModelAvailabilityNux" }, { "type": "null" }] },
|
|
593
|
-
"defaultReasoningEffort": { "$ref": "#/definitions/ReasoningEffort" },
|
|
594
|
-
"defaultServiceTier": {
|
|
595
|
-
"default": null,
|
|
596
|
-
"description": "Catalog default service tier id for this model, when one is configured.",
|
|
597
|
-
"type": ["string", "null"]
|
|
598
|
-
},
|
|
599
|
-
"description": { "type": "string" },
|
|
600
|
-
"displayName": { "type": "string" },
|
|
601
|
-
"hidden": { "type": "boolean" },
|
|
602
|
-
"id": { "type": "string" },
|
|
603
|
-
"inputModalities": {
|
|
604
|
-
"default": ["text", "image"],
|
|
605
|
-
"items": { "$ref": "#/definitions/InputModality" },
|
|
606
|
-
"type": "array"
|
|
607
|
-
},
|
|
608
|
-
"isDefault": { "type": "boolean" },
|
|
609
|
-
"model": { "type": "string" },
|
|
610
|
-
"modelSpecialty": {
|
|
611
|
-
"default": null,
|
|
612
|
-
"type": ["string", "null"]
|
|
613
|
-
},
|
|
614
|
-
"multiAgentVersion": {
|
|
615
|
-
"anyOf": [{ "$ref": "#/definitions/MultiAgentVersion" }, { "type": "null" }],
|
|
616
|
-
"description": "Multi-agent runtime declared by this model, when available."
|
|
617
|
-
},
|
|
618
|
-
"serviceTiers": {
|
|
619
|
-
"default": [],
|
|
620
|
-
"items": { "$ref": "#/definitions/ModelServiceTier" },
|
|
621
|
-
"type": "array"
|
|
622
|
-
},
|
|
623
|
-
"supportedReasoningEfforts": {
|
|
624
|
-
"items": { "$ref": "#/definitions/ReasoningEffortOption" },
|
|
625
|
-
"type": "array"
|
|
626
|
-
},
|
|
627
|
-
"supportsPersonality": {
|
|
628
|
-
"default": false,
|
|
629
|
-
"type": "boolean"
|
|
630
|
-
},
|
|
631
|
-
"upgrade": { "type": ["string", "null"] },
|
|
632
|
-
"upgradeInfo": { "anyOf": [{ "$ref": "#/definitions/ModelUpgradeInfo" }, { "type": "null" }] }
|
|
633
|
-
},
|
|
634
|
-
"required": [
|
|
635
|
-
"defaultReasoningEffort",
|
|
636
|
-
"description",
|
|
637
|
-
"displayName",
|
|
638
|
-
"hidden",
|
|
639
|
-
"id",
|
|
640
|
-
"isDefault",
|
|
641
|
-
"model",
|
|
642
|
-
"supportedReasoningEfforts"
|
|
643
|
-
],
|
|
644
|
-
"type": "object"
|
|
645
|
-
},
|
|
646
|
-
"ModelAvailabilityNux": {
|
|
647
|
-
"properties": { "message": { "type": "string" } },
|
|
648
|
-
"required": ["message"],
|
|
649
|
-
"type": "object"
|
|
650
|
-
},
|
|
651
|
-
"ModelServiceTier": {
|
|
652
|
-
"properties": {
|
|
653
|
-
"description": { "type": "string" },
|
|
654
|
-
"id": { "type": "string" },
|
|
655
|
-
"name": { "type": "string" }
|
|
656
|
-
},
|
|
657
|
-
"required": [
|
|
658
|
-
"description",
|
|
659
|
-
"id",
|
|
660
|
-
"name"
|
|
661
|
-
],
|
|
662
|
-
"type": "object"
|
|
663
|
-
},
|
|
664
|
-
"ModelUpgradeInfo": {
|
|
665
|
-
"properties": {
|
|
666
|
-
"migrationMarkdown": { "type": ["string", "null"] },
|
|
667
|
-
"model": { "type": "string" },
|
|
668
|
-
"modelLink": { "type": ["string", "null"] },
|
|
669
|
-
"retirementAt": {
|
|
670
|
-
"description": "Informational Unix timestamp for this upgrade's scheduled retirement, if known.",
|
|
671
|
-
"format": "int64",
|
|
672
|
-
"type": ["integer", "null"]
|
|
673
|
-
},
|
|
674
|
-
"upgradeCopy": { "type": ["string", "null"] }
|
|
675
|
-
},
|
|
676
|
-
"required": ["model"],
|
|
677
|
-
"type": "object"
|
|
678
|
-
},
|
|
679
|
-
"MultiAgentMode": {
|
|
680
|
-
"description": "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.",
|
|
681
|
-
"oneOf": [{
|
|
682
|
-
"additionalProperties": false,
|
|
683
|
-
"properties": { "custom": { "type": "string" } },
|
|
684
|
-
"required": ["custom"],
|
|
685
|
-
"title": "CustomMultiAgentMode",
|
|
686
|
-
"type": "object"
|
|
687
|
-
}, {
|
|
688
|
-
"enum": ["explicitRequestOnly", "proactive"],
|
|
689
|
-
"type": "string"
|
|
690
|
-
}]
|
|
691
|
-
},
|
|
692
|
-
"MultiAgentVersion": {
|
|
693
|
-
"description": "Multi-agent runtime supported by a model.",
|
|
694
|
-
"enum": [
|
|
695
|
-
"disabled",
|
|
696
|
-
"v1",
|
|
697
|
-
"v2"
|
|
698
|
-
],
|
|
699
|
-
"type": "string"
|
|
700
|
-
},
|
|
701
|
-
"NetworkAccess": {
|
|
702
|
-
"enum": ["restricted", "enabled"],
|
|
703
|
-
"type": "string"
|
|
704
|
-
},
|
|
705
|
-
"NonSteerableTurnKind": {
|
|
706
|
-
"enum": ["review", "compact"],
|
|
707
|
-
"type": "string"
|
|
708
|
-
},
|
|
709
|
-
"PatchApplyStatus": {
|
|
710
|
-
"enum": [
|
|
711
|
-
"inProgress",
|
|
712
|
-
"completed",
|
|
713
|
-
"failed",
|
|
714
|
-
"declined"
|
|
715
|
-
],
|
|
716
|
-
"type": "string"
|
|
717
|
-
},
|
|
718
|
-
"PatchChangeKind": { "oneOf": [
|
|
719
|
-
{
|
|
720
|
-
"properties": { "type": {
|
|
721
|
-
"enum": ["add"],
|
|
722
|
-
"title": "AddPatchChangeKindType",
|
|
723
|
-
"type": "string"
|
|
724
|
-
} },
|
|
725
|
-
"required": ["type"],
|
|
726
|
-
"title": "AddPatchChangeKind",
|
|
727
|
-
"type": "object"
|
|
728
|
-
},
|
|
729
|
-
{
|
|
730
|
-
"properties": { "type": {
|
|
731
|
-
"enum": ["delete"],
|
|
732
|
-
"title": "DeletePatchChangeKindType",
|
|
733
|
-
"type": "string"
|
|
734
|
-
} },
|
|
735
|
-
"required": ["type"],
|
|
736
|
-
"title": "DeletePatchChangeKind",
|
|
737
|
-
"type": "object"
|
|
738
|
-
},
|
|
739
|
-
{
|
|
740
|
-
"properties": {
|
|
741
|
-
"move_path": { "type": ["string", "null"] },
|
|
742
|
-
"type": {
|
|
743
|
-
"enum": ["update"],
|
|
744
|
-
"title": "UpdatePatchChangeKindType",
|
|
745
|
-
"type": "string"
|
|
746
|
-
}
|
|
747
|
-
},
|
|
748
|
-
"required": ["type"],
|
|
749
|
-
"title": "UpdatePatchChangeKind",
|
|
750
|
-
"type": "object"
|
|
751
|
-
}
|
|
752
|
-
] },
|
|
753
|
-
"PlanType": {
|
|
754
|
-
"enum": [
|
|
755
|
-
"free",
|
|
756
|
-
"go",
|
|
757
|
-
"plus",
|
|
758
|
-
"pro",
|
|
759
|
-
"prolite",
|
|
760
|
-
"team",
|
|
761
|
-
"self_serve_business_prolite",
|
|
762
|
-
"self_serve_business_usage_based",
|
|
763
|
-
"business",
|
|
764
|
-
"ent26",
|
|
765
|
-
"enterprise_cbp_automation",
|
|
766
|
-
"enterprise_cbp_usage_based",
|
|
767
|
-
"enterprise",
|
|
768
|
-
"edu",
|
|
769
|
-
"edu_plus",
|
|
770
|
-
"edu_pro",
|
|
771
|
-
"unknown"
|
|
772
|
-
],
|
|
773
|
-
"type": "string"
|
|
774
|
-
},
|
|
775
|
-
"ReasoningEffort": {
|
|
776
|
-
"description": "A non-empty reasoning effort value advertised by the model.",
|
|
777
|
-
"minLength": 1,
|
|
778
|
-
"type": "string"
|
|
779
|
-
},
|
|
780
|
-
"ReasoningEffortOption": {
|
|
781
|
-
"properties": {
|
|
782
|
-
"description": { "type": "string" },
|
|
783
|
-
"reasoningEffort": { "$ref": "#/definitions/ReasoningEffort" }
|
|
784
|
-
},
|
|
785
|
-
"required": ["description", "reasoningEffort"],
|
|
786
|
-
"type": "object"
|
|
787
|
-
},
|
|
788
|
-
"SandboxPolicy": { "oneOf": [
|
|
789
|
-
{
|
|
790
|
-
"properties": { "type": {
|
|
791
|
-
"enum": ["dangerFullAccess"],
|
|
792
|
-
"title": "DangerFullAccessSandboxPolicyType",
|
|
793
|
-
"type": "string"
|
|
794
|
-
} },
|
|
795
|
-
"required": ["type"],
|
|
796
|
-
"title": "DangerFullAccessSandboxPolicy",
|
|
797
|
-
"type": "object"
|
|
798
|
-
},
|
|
799
|
-
{
|
|
800
|
-
"properties": {
|
|
801
|
-
"networkAccess": {
|
|
802
|
-
"default": false,
|
|
803
|
-
"type": "boolean"
|
|
804
|
-
},
|
|
805
|
-
"type": {
|
|
806
|
-
"enum": ["readOnly"],
|
|
807
|
-
"title": "ReadOnlySandboxPolicyType",
|
|
808
|
-
"type": "string"
|
|
809
|
-
}
|
|
810
|
-
},
|
|
811
|
-
"required": ["type"],
|
|
812
|
-
"title": "ReadOnlySandboxPolicy",
|
|
813
|
-
"type": "object"
|
|
814
|
-
},
|
|
815
|
-
{
|
|
816
|
-
"properties": {
|
|
817
|
-
"networkAccess": {
|
|
818
|
-
"allOf": [{ "$ref": "#/definitions/NetworkAccess" }],
|
|
819
|
-
"default": "restricted"
|
|
820
|
-
},
|
|
821
|
-
"type": {
|
|
822
|
-
"enum": ["externalSandbox"],
|
|
823
|
-
"title": "ExternalSandboxSandboxPolicyType",
|
|
824
|
-
"type": "string"
|
|
825
|
-
}
|
|
826
|
-
},
|
|
827
|
-
"required": ["type"],
|
|
828
|
-
"title": "ExternalSandboxSandboxPolicy",
|
|
829
|
-
"type": "object"
|
|
830
|
-
},
|
|
831
|
-
{
|
|
832
|
-
"properties": {
|
|
833
|
-
"excludeSlashTmp": {
|
|
834
|
-
"default": false,
|
|
835
|
-
"type": "boolean"
|
|
836
|
-
},
|
|
837
|
-
"excludeTmpdirEnvVar": {
|
|
838
|
-
"default": false,
|
|
839
|
-
"type": "boolean"
|
|
840
|
-
},
|
|
841
|
-
"networkAccess": {
|
|
842
|
-
"default": false,
|
|
843
|
-
"type": "boolean"
|
|
844
|
-
},
|
|
845
|
-
"type": {
|
|
846
|
-
"enum": ["workspaceWrite"],
|
|
847
|
-
"title": "WorkspaceWriteSandboxPolicyType",
|
|
848
|
-
"type": "string"
|
|
849
|
-
},
|
|
850
|
-
"writableRoots": {
|
|
851
|
-
"default": [],
|
|
852
|
-
"items": { "$ref": "#/definitions/AbsolutePathBuf" },
|
|
853
|
-
"type": "array"
|
|
854
|
-
}
|
|
855
|
-
},
|
|
856
|
-
"required": ["type"],
|
|
857
|
-
"title": "WorkspaceWriteSandboxPolicy",
|
|
858
|
-
"type": "object"
|
|
859
|
-
}
|
|
860
|
-
] },
|
|
861
|
-
"SessionSource": { "oneOf": [
|
|
862
|
-
{
|
|
863
|
-
"additionalProperties": false,
|
|
864
|
-
"properties": { "custom": { "type": "string" } },
|
|
865
|
-
"required": ["custom"],
|
|
866
|
-
"title": "CustomSessionSource",
|
|
867
|
-
"type": "object"
|
|
868
|
-
},
|
|
869
|
-
{
|
|
870
|
-
"additionalProperties": false,
|
|
871
|
-
"properties": { "subAgent": { "$ref": "#/definitions/SubAgentSource" } },
|
|
872
|
-
"required": ["subAgent"],
|
|
873
|
-
"title": "SubAgentSessionSource",
|
|
874
|
-
"type": "object"
|
|
875
|
-
},
|
|
876
|
-
{
|
|
877
|
-
"enum": [
|
|
878
|
-
"cli",
|
|
879
|
-
"vscode",
|
|
880
|
-
"exec",
|
|
881
|
-
"appServer",
|
|
882
|
-
"unknown"
|
|
883
|
-
],
|
|
884
|
-
"type": "string"
|
|
885
|
-
}
|
|
886
|
-
] },
|
|
887
|
-
"SubAgentActivityKind": {
|
|
888
|
-
"enum": [
|
|
889
|
-
"started",
|
|
890
|
-
"interacted",
|
|
891
|
-
"interrupted",
|
|
892
|
-
"completed"
|
|
893
|
-
],
|
|
894
|
-
"type": "string"
|
|
895
|
-
},
|
|
896
|
-
"SubAgentSource": { "oneOf": [
|
|
897
|
-
{
|
|
898
|
-
"additionalProperties": false,
|
|
899
|
-
"properties": { "thread_spawn": {
|
|
900
|
-
"properties": {
|
|
901
|
-
"agent_nickname": {
|
|
902
|
-
"default": null,
|
|
903
|
-
"type": ["string", "null"]
|
|
904
|
-
},
|
|
905
|
-
"agent_path": {
|
|
906
|
-
"anyOf": [{ "$ref": "#/definitions/AgentPath" }, { "type": "null" }],
|
|
907
|
-
"default": null
|
|
908
|
-
},
|
|
909
|
-
"agent_role": {
|
|
910
|
-
"default": null,
|
|
911
|
-
"type": ["string", "null"]
|
|
912
|
-
},
|
|
913
|
-
"depth": {
|
|
914
|
-
"format": "int32",
|
|
915
|
-
"type": "integer"
|
|
916
|
-
},
|
|
917
|
-
"parent_thread_id": { "$ref": "#/definitions/ThreadId" }
|
|
918
|
-
},
|
|
919
|
-
"required": ["depth", "parent_thread_id"],
|
|
920
|
-
"type": "object"
|
|
921
|
-
} },
|
|
922
|
-
"required": ["thread_spawn"],
|
|
923
|
-
"title": "ThreadSpawnSubAgentSource",
|
|
924
|
-
"type": "object"
|
|
925
|
-
},
|
|
926
|
-
{
|
|
927
|
-
"additionalProperties": false,
|
|
928
|
-
"properties": { "other": { "type": "string" } },
|
|
929
|
-
"required": ["other"],
|
|
930
|
-
"title": "OtherSubAgentSource",
|
|
931
|
-
"type": "object"
|
|
932
|
-
},
|
|
933
|
-
{
|
|
934
|
-
"enum": [
|
|
935
|
-
"review",
|
|
936
|
-
"compact",
|
|
937
|
-
"memory_consolidation"
|
|
938
|
-
],
|
|
939
|
-
"type": "string"
|
|
940
|
-
}
|
|
941
|
-
] },
|
|
942
|
-
"TextElement": {
|
|
943
|
-
"properties": {
|
|
944
|
-
"byteRange": {
|
|
945
|
-
"allOf": [{ "$ref": "#/definitions/ByteRange" }],
|
|
946
|
-
"description": "Byte range in the parent `text` buffer that this element occupies."
|
|
947
|
-
},
|
|
948
|
-
"placeholder": {
|
|
949
|
-
"description": "Optional human-readable placeholder for the element, displayed in the UI.",
|
|
950
|
-
"type": ["string", "null"]
|
|
951
|
-
}
|
|
952
|
-
},
|
|
953
|
-
"required": ["byteRange"],
|
|
954
|
-
"type": "object"
|
|
955
|
-
},
|
|
956
|
-
"Thread": {
|
|
957
|
-
"properties": {
|
|
958
|
-
"agentNickname": {
|
|
959
|
-
"description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent.",
|
|
960
|
-
"type": ["string", "null"]
|
|
961
|
-
},
|
|
962
|
-
"agentRole": {
|
|
963
|
-
"description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.",
|
|
964
|
-
"type": ["string", "null"]
|
|
965
|
-
},
|
|
966
|
-
"canAcceptDirectInput": {
|
|
967
|
-
"description": "Whether the app server accepts direct turn input for this loaded thread. `None` means the capability is unavailable, such as for an unloaded stored thread.",
|
|
968
|
-
"type": ["boolean", "null"]
|
|
969
|
-
},
|
|
970
|
-
"cliVersion": {
|
|
971
|
-
"description": "Version of the CLI that created the thread.",
|
|
972
|
-
"type": "string"
|
|
973
|
-
},
|
|
974
|
-
"createdAt": {
|
|
975
|
-
"description": "Unix timestamp (in seconds) when the thread was created.",
|
|
976
|
-
"format": "int64",
|
|
977
|
-
"type": "integer"
|
|
978
|
-
},
|
|
979
|
-
"cwd": {
|
|
980
|
-
"allOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }],
|
|
981
|
-
"description": "Working directory captured for the thread."
|
|
982
|
-
},
|
|
983
|
-
"ephemeral": {
|
|
984
|
-
"description": "Whether the thread is ephemeral and should not be materialized on disk.",
|
|
985
|
-
"type": "boolean"
|
|
986
|
-
},
|
|
987
|
-
"extra": {
|
|
988
|
-
"anyOf": [{ "$ref": "#/definitions/ThreadExtra" }, { "type": "null" }],
|
|
989
|
-
"description": "Optional implementation-specific thread data."
|
|
990
|
-
},
|
|
991
|
-
"forkedFromId": {
|
|
992
|
-
"description": "Source thread id when this thread was created by forking another thread.",
|
|
993
|
-
"type": ["string", "null"]
|
|
994
|
-
},
|
|
995
|
-
"gitInfo": {
|
|
996
|
-
"anyOf": [{ "$ref": "#/definitions/GitInfo" }, { "type": "null" }],
|
|
997
|
-
"description": "Optional Git metadata captured when the thread was created."
|
|
998
|
-
},
|
|
999
|
-
"historyMode": {
|
|
1000
|
-
"allOf": [{ "$ref": "#/definitions/ThreadHistoryMode" }],
|
|
1001
|
-
"default": "legacy",
|
|
1002
|
-
"description": "Persisted thread history contract selected when this thread was created."
|
|
1003
|
-
},
|
|
1004
|
-
"id": {
|
|
1005
|
-
"description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
|
|
1006
|
-
"type": "string"
|
|
1007
|
-
},
|
|
1008
|
-
"modelProvider": {
|
|
1009
|
-
"description": "Model provider used for this thread (for example, 'openai').",
|
|
1010
|
-
"type": "string"
|
|
1011
|
-
},
|
|
1012
|
-
"name": {
|
|
1013
|
-
"description": "Optional user-facing thread title.",
|
|
1014
|
-
"type": ["string", "null"]
|
|
1015
|
-
},
|
|
1016
|
-
"parentThreadId": {
|
|
1017
|
-
"description": "The ID of the parent thread. This will only be set if this thread is a subagent.",
|
|
1018
|
-
"type": ["string", "null"]
|
|
1019
|
-
},
|
|
1020
|
-
"path": {
|
|
1021
|
-
"description": "[UNSTABLE] Path to the thread on disk.",
|
|
1022
|
-
"type": ["string", "null"]
|
|
1023
|
-
},
|
|
1024
|
-
"preview": {
|
|
1025
|
-
"description": "Usually the first user message in the thread, if available.",
|
|
1026
|
-
"type": "string"
|
|
1027
|
-
},
|
|
1028
|
-
"projectId": {
|
|
1029
|
-
"description": "Canonical project assignment owned by app-server, if any.",
|
|
1030
|
-
"type": ["string", "null"]
|
|
1031
|
-
},
|
|
1032
|
-
"recencyAt": {
|
|
1033
|
-
"description": "Unix timestamp (in seconds) used for thread recency ordering.",
|
|
1034
|
-
"format": "int64",
|
|
1035
|
-
"type": ["integer", "null"]
|
|
1036
|
-
},
|
|
1037
|
-
"section": {
|
|
1038
|
-
"anyOf": [{ "$ref": "#/definitions/ThreadSection" }, { "type": "null" }],
|
|
1039
|
-
"default": null,
|
|
1040
|
-
"description": "The independently persisted section selected for this thread, if any."
|
|
1041
|
-
},
|
|
1042
|
-
"sectionEnteredAt": {
|
|
1043
|
-
"default": null,
|
|
1044
|
-
"description": "Unix timestamp in seconds when the thread entered its current section.",
|
|
1045
|
-
"format": "int64",
|
|
1046
|
-
"type": ["integer", "null"]
|
|
1047
|
-
},
|
|
1048
|
-
"sessionId": {
|
|
1049
|
-
"description": "Session id shared by threads that belong to the same session tree.",
|
|
1050
|
-
"type": "string"
|
|
1051
|
-
},
|
|
1052
|
-
"source": {
|
|
1053
|
-
"allOf": [{ "$ref": "#/definitions/SessionSource" }],
|
|
1054
|
-
"description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)."
|
|
1055
|
-
},
|
|
1056
|
-
"status": {
|
|
1057
|
-
"allOf": [{ "$ref": "#/definitions/ThreadStatus" }],
|
|
1058
|
-
"description": "Current runtime status for the thread."
|
|
1059
|
-
},
|
|
1060
|
-
"threadSource": {
|
|
1061
|
-
"anyOf": [{ "$ref": "#/definitions/ThreadSource" }, { "type": "null" }],
|
|
1062
|
-
"description": "Optional analytics source classification for this thread."
|
|
1063
|
-
},
|
|
1064
|
-
"turns": {
|
|
1065
|
-
"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.",
|
|
1066
|
-
"items": { "$ref": "#/definitions/Turn" },
|
|
1067
|
-
"type": "array"
|
|
1068
|
-
},
|
|
1069
|
-
"updatedAt": {
|
|
1070
|
-
"description": "Unix timestamp (in seconds) when the thread was last updated.",
|
|
1071
|
-
"format": "int64",
|
|
1072
|
-
"type": "integer"
|
|
1073
|
-
}
|
|
1074
|
-
},
|
|
1075
|
-
"required": [
|
|
1076
|
-
"cliVersion",
|
|
1077
|
-
"createdAt",
|
|
1078
|
-
"cwd",
|
|
1079
|
-
"ephemeral",
|
|
1080
|
-
"id",
|
|
1081
|
-
"modelProvider",
|
|
1082
|
-
"preview",
|
|
1083
|
-
"projectId",
|
|
1084
|
-
"sessionId",
|
|
1085
|
-
"source",
|
|
1086
|
-
"status",
|
|
1087
|
-
"turns",
|
|
1088
|
-
"updatedAt"
|
|
1089
|
-
],
|
|
1090
|
-
"type": "object"
|
|
1091
|
-
},
|
|
1092
|
-
"ThreadActiveFlag": {
|
|
1093
|
-
"enum": ["waitingOnApproval", "waitingOnUserInput"],
|
|
1094
|
-
"type": "string"
|
|
1095
|
-
},
|
|
1096
|
-
"ThreadExtra": {
|
|
1097
|
-
"description": "Extra app-server data for a thread.",
|
|
1098
|
-
"type": "object"
|
|
1099
|
-
},
|
|
1100
|
-
"ThreadHistoryMode": {
|
|
1101
|
-
"enum": ["legacy", "paginated"],
|
|
1102
|
-
"type": "string"
|
|
1103
|
-
},
|
|
1104
|
-
"ThreadId": { "type": "string" },
|
|
1105
|
-
"ThreadItem": { "oneOf": [
|
|
1106
|
-
{
|
|
1107
|
-
"properties": {
|
|
1108
|
-
"clientId": { "type": ["string", "null"] },
|
|
1109
|
-
"content": {
|
|
1110
|
-
"items": { "$ref": "#/definitions/UserInput" },
|
|
1111
|
-
"type": "array"
|
|
1112
|
-
},
|
|
1113
|
-
"id": { "type": "string" },
|
|
1114
|
-
"type": {
|
|
1115
|
-
"enum": ["userMessage"],
|
|
1116
|
-
"title": "UserMessageThreadItemType",
|
|
1117
|
-
"type": "string"
|
|
1118
|
-
}
|
|
1119
|
-
},
|
|
1120
|
-
"required": [
|
|
1121
|
-
"content",
|
|
1122
|
-
"id",
|
|
1123
|
-
"type"
|
|
1124
|
-
],
|
|
1125
|
-
"title": "UserMessageThreadItem",
|
|
1126
|
-
"type": "object"
|
|
1127
|
-
},
|
|
1128
|
-
{
|
|
1129
|
-
"properties": {
|
|
1130
|
-
"fragments": {
|
|
1131
|
-
"items": { "$ref": "#/definitions/HookPromptFragment" },
|
|
1132
|
-
"type": "array"
|
|
1133
|
-
},
|
|
1134
|
-
"id": { "type": "string" },
|
|
1135
|
-
"type": {
|
|
1136
|
-
"enum": ["hookPrompt"],
|
|
1137
|
-
"title": "HookPromptThreadItemType",
|
|
1138
|
-
"type": "string"
|
|
1139
|
-
}
|
|
1140
|
-
},
|
|
1141
|
-
"required": [
|
|
1142
|
-
"fragments",
|
|
1143
|
-
"id",
|
|
1144
|
-
"type"
|
|
1145
|
-
],
|
|
1146
|
-
"title": "HookPromptThreadItem",
|
|
1147
|
-
"type": "object"
|
|
1148
|
-
},
|
|
1149
|
-
{
|
|
1150
|
-
"properties": {
|
|
1151
|
-
"delivery": {
|
|
1152
|
-
"anyOf": [{ "$ref": "#/definitions/AgentMessageDelivery" }, { "type": "null" }],
|
|
1153
|
-
"default": null
|
|
1154
|
-
},
|
|
1155
|
-
"id": { "type": "string" },
|
|
1156
|
-
"memoryCitation": {
|
|
1157
|
-
"anyOf": [{ "$ref": "#/definitions/MemoryCitation" }, { "type": "null" }],
|
|
1158
|
-
"default": null
|
|
1159
|
-
},
|
|
1160
|
-
"phase": {
|
|
1161
|
-
"anyOf": [{ "$ref": "#/definitions/MessagePhase" }, { "type": "null" }],
|
|
1162
|
-
"default": null
|
|
1163
|
-
},
|
|
1164
|
-
"text": { "type": "string" },
|
|
1165
|
-
"type": {
|
|
1166
|
-
"enum": ["agentMessage"],
|
|
1167
|
-
"title": "AgentMessageThreadItemType",
|
|
1168
|
-
"type": "string"
|
|
1169
|
-
}
|
|
1170
|
-
},
|
|
1171
|
-
"required": [
|
|
1172
|
-
"id",
|
|
1173
|
-
"text",
|
|
1174
|
-
"type"
|
|
1175
|
-
],
|
|
1176
|
-
"title": "AgentMessageThreadItem",
|
|
1177
|
-
"type": "object"
|
|
1178
|
-
},
|
|
1179
|
-
{
|
|
1180
|
-
"description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
|
|
1181
|
-
"properties": {
|
|
1182
|
-
"id": { "type": "string" },
|
|
1183
|
-
"text": { "type": "string" },
|
|
1184
|
-
"type": {
|
|
1185
|
-
"enum": ["plan"],
|
|
1186
|
-
"title": "PlanThreadItemType",
|
|
1187
|
-
"type": "string"
|
|
1188
|
-
}
|
|
1189
|
-
},
|
|
1190
|
-
"required": [
|
|
1191
|
-
"id",
|
|
1192
|
-
"text",
|
|
1193
|
-
"type"
|
|
1194
|
-
],
|
|
1195
|
-
"title": "PlanThreadItem",
|
|
1196
|
-
"type": "object"
|
|
1197
|
-
},
|
|
1198
|
-
{
|
|
1199
|
-
"properties": {
|
|
1200
|
-
"content": {
|
|
1201
|
-
"default": [],
|
|
1202
|
-
"items": { "type": "string" },
|
|
1203
|
-
"type": "array"
|
|
1204
|
-
},
|
|
1205
|
-
"id": { "type": "string" },
|
|
1206
|
-
"summary": {
|
|
1207
|
-
"default": [],
|
|
1208
|
-
"items": { "type": "string" },
|
|
1209
|
-
"type": "array"
|
|
1210
|
-
},
|
|
1211
|
-
"type": {
|
|
1212
|
-
"enum": ["reasoning"],
|
|
1213
|
-
"title": "ReasoningThreadItemType",
|
|
1214
|
-
"type": "string"
|
|
1215
|
-
}
|
|
1216
|
-
},
|
|
1217
|
-
"required": ["id", "type"],
|
|
1218
|
-
"title": "ReasoningThreadItem",
|
|
1219
|
-
"type": "object"
|
|
1220
|
-
},
|
|
1221
|
-
{
|
|
1222
|
-
"properties": {
|
|
1223
|
-
"aggregatedOutput": {
|
|
1224
|
-
"description": "The command's output, aggregated from stdout and stderr.",
|
|
1225
|
-
"type": ["string", "null"]
|
|
1226
|
-
},
|
|
1227
|
-
"command": {
|
|
1228
|
-
"description": "The command to be executed.",
|
|
1229
|
-
"type": "string"
|
|
1230
|
-
},
|
|
1231
|
-
"commandActions": {
|
|
1232
|
-
"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.",
|
|
1233
|
-
"items": { "$ref": "#/definitions/CommandAction" },
|
|
1234
|
-
"type": "array"
|
|
1235
|
-
},
|
|
1236
|
-
"cwd": {
|
|
1237
|
-
"allOf": [{ "$ref": "#/definitions/LegacyAppPathString" }],
|
|
1238
|
-
"description": "The command's working directory."
|
|
1239
|
-
},
|
|
1240
|
-
"durationMs": {
|
|
1241
|
-
"description": "The duration of the command execution in milliseconds.",
|
|
1242
|
-
"format": "int64",
|
|
1243
|
-
"type": ["integer", "null"]
|
|
1244
|
-
},
|
|
1245
|
-
"exitCode": {
|
|
1246
|
-
"description": "The command's exit code.",
|
|
1247
|
-
"format": "int32",
|
|
1248
|
-
"type": ["integer", "null"]
|
|
1249
|
-
},
|
|
1250
|
-
"id": { "type": "string" },
|
|
1251
|
-
"pluginId": {
|
|
1252
|
-
"default": null,
|
|
1253
|
-
"description": "Trusted first-party plugin id when this command resolves to one plugin script.",
|
|
1254
|
-
"type": ["string", "null"]
|
|
1255
|
-
},
|
|
1256
|
-
"processId": {
|
|
1257
|
-
"description": "Identifier for the underlying PTY process (when available).",
|
|
1258
|
-
"type": ["string", "null"]
|
|
1259
|
-
},
|
|
1260
|
-
"scriptPath": {
|
|
1261
|
-
"default": null,
|
|
1262
|
-
"description": "Safe plugin-relative path when this command resolves to one plugin script.",
|
|
1263
|
-
"type": ["string", "null"]
|
|
1264
|
-
},
|
|
1265
|
-
"source": {
|
|
1266
|
-
"allOf": [{ "$ref": "#/definitions/CommandExecutionSource" }],
|
|
1267
|
-
"default": "agent"
|
|
1268
|
-
},
|
|
1269
|
-
"status": { "$ref": "#/definitions/CommandExecutionStatus" },
|
|
1270
|
-
"type": {
|
|
1271
|
-
"enum": ["commandExecution"],
|
|
1272
|
-
"title": "CommandExecutionThreadItemType",
|
|
1273
|
-
"type": "string"
|
|
1274
|
-
}
|
|
1275
|
-
},
|
|
1276
|
-
"required": [
|
|
1277
|
-
"command",
|
|
1278
|
-
"commandActions",
|
|
1279
|
-
"cwd",
|
|
1280
|
-
"id",
|
|
1281
|
-
"status",
|
|
1282
|
-
"type"
|
|
1283
|
-
],
|
|
1284
|
-
"title": "CommandExecutionThreadItem",
|
|
1285
|
-
"type": "object"
|
|
1286
|
-
},
|
|
1287
|
-
{
|
|
1288
|
-
"properties": {
|
|
1289
|
-
"changes": {
|
|
1290
|
-
"items": { "$ref": "#/definitions/FileUpdateChange" },
|
|
1291
|
-
"type": "array"
|
|
1292
|
-
},
|
|
1293
|
-
"id": { "type": "string" },
|
|
1294
|
-
"status": { "$ref": "#/definitions/PatchApplyStatus" },
|
|
1295
|
-
"type": {
|
|
1296
|
-
"enum": ["fileChange"],
|
|
1297
|
-
"title": "FileChangeThreadItemType",
|
|
1298
|
-
"type": "string"
|
|
1299
|
-
}
|
|
1300
|
-
},
|
|
1301
|
-
"required": [
|
|
1302
|
-
"changes",
|
|
1303
|
-
"id",
|
|
1304
|
-
"status",
|
|
1305
|
-
"type"
|
|
1306
|
-
],
|
|
1307
|
-
"title": "FileChangeThreadItem",
|
|
1308
|
-
"type": "object"
|
|
1309
|
-
},
|
|
1310
|
-
{
|
|
1311
|
-
"properties": {
|
|
1312
|
-
"appContext": { "anyOf": [{ "$ref": "#/definitions/McpToolCallAppContext" }, { "type": "null" }] },
|
|
1313
|
-
"arguments": true,
|
|
1314
|
-
"durationMs": {
|
|
1315
|
-
"description": "The duration of the MCP tool call in milliseconds.",
|
|
1316
|
-
"format": "int64",
|
|
1317
|
-
"type": ["integer", "null"]
|
|
1318
|
-
},
|
|
1319
|
-
"error": { "anyOf": [{ "$ref": "#/definitions/McpToolCallError" }, { "type": "null" }] },
|
|
1320
|
-
"id": { "type": "string" },
|
|
1321
|
-
"mcpAppResourceUri": {
|
|
1322
|
-
"description": "Deprecated: use `appContext.resourceUri` instead.",
|
|
1323
|
-
"type": ["string", "null"]
|
|
1324
|
-
},
|
|
1325
|
-
"pluginId": { "type": ["string", "null"] },
|
|
1326
|
-
"readOnlyHint": { "type": ["boolean", "null"] },
|
|
1327
|
-
"result": { "anyOf": [{ "$ref": "#/definitions/McpToolCallResult" }, { "type": "null" }] },
|
|
1328
|
-
"server": { "type": "string" },
|
|
1329
|
-
"status": { "$ref": "#/definitions/McpToolCallStatus" },
|
|
1330
|
-
"tool": { "type": "string" },
|
|
1331
|
-
"type": {
|
|
1332
|
-
"enum": ["mcpToolCall"],
|
|
1333
|
-
"title": "McpToolCallThreadItemType",
|
|
1334
|
-
"type": "string"
|
|
1335
|
-
}
|
|
1336
|
-
},
|
|
1337
|
-
"required": [
|
|
1338
|
-
"arguments",
|
|
1339
|
-
"id",
|
|
1340
|
-
"server",
|
|
1341
|
-
"status",
|
|
1342
|
-
"tool",
|
|
1343
|
-
"type"
|
|
1344
|
-
],
|
|
1345
|
-
"title": "McpToolCallThreadItem",
|
|
1346
|
-
"type": "object"
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
"properties": {
|
|
1350
|
-
"arguments": true,
|
|
1351
|
-
"contentItems": {
|
|
1352
|
-
"items": { "$ref": "#/definitions/DynamicToolCallOutputContentItem" },
|
|
1353
|
-
"type": ["array", "null"]
|
|
1354
|
-
},
|
|
1355
|
-
"durationMs": {
|
|
1356
|
-
"description": "The duration of the dynamic tool call in milliseconds.",
|
|
1357
|
-
"format": "int64",
|
|
1358
|
-
"type": ["integer", "null"]
|
|
1359
|
-
},
|
|
1360
|
-
"id": { "type": "string" },
|
|
1361
|
-
"namespace": { "type": ["string", "null"] },
|
|
1362
|
-
"status": { "$ref": "#/definitions/DynamicToolCallStatus" },
|
|
1363
|
-
"success": { "type": ["boolean", "null"] },
|
|
1364
|
-
"tool": { "type": "string" },
|
|
1365
|
-
"type": {
|
|
1366
|
-
"enum": ["dynamicToolCall"],
|
|
1367
|
-
"title": "DynamicToolCallThreadItemType",
|
|
1368
|
-
"type": "string"
|
|
1369
|
-
}
|
|
1370
|
-
},
|
|
1371
|
-
"required": [
|
|
1372
|
-
"arguments",
|
|
1373
|
-
"id",
|
|
1374
|
-
"status",
|
|
1375
|
-
"tool",
|
|
1376
|
-
"type"
|
|
1377
|
-
],
|
|
1378
|
-
"title": "DynamicToolCallThreadItem",
|
|
1379
|
-
"type": "object"
|
|
1380
|
-
},
|
|
1381
|
-
{
|
|
1382
|
-
"properties": {
|
|
1383
|
-
"agentsStates": {
|
|
1384
|
-
"additionalProperties": { "$ref": "#/definitions/CollabAgentState" },
|
|
1385
|
-
"description": "Last known status of the target agents, when available.",
|
|
1386
|
-
"type": "object"
|
|
1387
|
-
},
|
|
1388
|
-
"id": {
|
|
1389
|
-
"description": "Unique identifier for this collab tool call.",
|
|
1390
|
-
"type": "string"
|
|
1391
|
-
},
|
|
1392
|
-
"model": {
|
|
1393
|
-
"description": "Model requested for the spawned agent, when applicable.",
|
|
1394
|
-
"type": ["string", "null"]
|
|
1395
|
-
},
|
|
1396
|
-
"prompt": {
|
|
1397
|
-
"description": "Prompt text sent as part of the collab tool call, when available.",
|
|
1398
|
-
"type": ["string", "null"]
|
|
1399
|
-
},
|
|
1400
|
-
"reasoningEffort": {
|
|
1401
|
-
"anyOf": [{ "$ref": "#/definitions/ReasoningEffort" }, { "type": "null" }],
|
|
1402
|
-
"description": "Reasoning effort requested for the spawned agent, when applicable."
|
|
1403
|
-
},
|
|
1404
|
-
"receiverThreadIds": {
|
|
1405
|
-
"description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
|
|
1406
|
-
"items": { "type": "string" },
|
|
1407
|
-
"type": "array"
|
|
1408
|
-
},
|
|
1409
|
-
"senderThreadId": {
|
|
1410
|
-
"description": "Thread ID of the agent issuing the collab request.",
|
|
1411
|
-
"type": "string"
|
|
1412
|
-
},
|
|
1413
|
-
"status": {
|
|
1414
|
-
"allOf": [{ "$ref": "#/definitions/CollabAgentToolCallStatus" }],
|
|
1415
|
-
"description": "Current status of the collab tool call."
|
|
1416
|
-
},
|
|
1417
|
-
"tool": {
|
|
1418
|
-
"allOf": [{ "$ref": "#/definitions/CollabAgentTool" }],
|
|
1419
|
-
"description": "Name of the collab tool that was invoked."
|
|
1420
|
-
},
|
|
1421
|
-
"type": {
|
|
1422
|
-
"enum": ["collabAgentToolCall"],
|
|
1423
|
-
"title": "CollabAgentToolCallThreadItemType",
|
|
1424
|
-
"type": "string"
|
|
1425
|
-
}
|
|
1426
|
-
},
|
|
1427
|
-
"required": [
|
|
1428
|
-
"agentsStates",
|
|
1429
|
-
"id",
|
|
1430
|
-
"receiverThreadIds",
|
|
1431
|
-
"senderThreadId",
|
|
1432
|
-
"status",
|
|
1433
|
-
"tool",
|
|
1434
|
-
"type"
|
|
1435
|
-
],
|
|
1436
|
-
"title": "CollabAgentToolCallThreadItem",
|
|
1437
|
-
"type": "object"
|
|
1438
|
-
},
|
|
1439
|
-
{
|
|
1440
|
-
"properties": {
|
|
1441
|
-
"agentPath": { "type": "string" },
|
|
1442
|
-
"agentThreadId": { "type": "string" },
|
|
1443
|
-
"id": { "type": "string" },
|
|
1444
|
-
"kind": { "$ref": "#/definitions/SubAgentActivityKind" },
|
|
1445
|
-
"type": {
|
|
1446
|
-
"enum": ["subAgentActivity"],
|
|
1447
|
-
"title": "SubAgentActivityThreadItemType",
|
|
1448
|
-
"type": "string"
|
|
1449
|
-
}
|
|
1450
|
-
},
|
|
1451
|
-
"required": [
|
|
1452
|
-
"agentPath",
|
|
1453
|
-
"agentThreadId",
|
|
1454
|
-
"id",
|
|
1455
|
-
"kind",
|
|
1456
|
-
"type"
|
|
1457
|
-
],
|
|
1458
|
-
"title": "SubAgentActivityThreadItem",
|
|
1459
|
-
"type": "object"
|
|
1460
|
-
},
|
|
1461
|
-
{
|
|
1462
|
-
"properties": {
|
|
1463
|
-
"action": { "anyOf": [{ "$ref": "#/definitions/WebSearchAction" }, { "type": "null" }] },
|
|
1464
|
-
"id": { "type": "string" },
|
|
1465
|
-
"query": { "type": "string" },
|
|
1466
|
-
"results": {
|
|
1467
|
-
"default": null,
|
|
1468
|
-
"description": "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.",
|
|
1469
|
-
"items": true,
|
|
1470
|
-
"type": ["array", "null"]
|
|
1471
|
-
},
|
|
1472
|
-
"type": {
|
|
1473
|
-
"enum": ["webSearch"],
|
|
1474
|
-
"title": "WebSearchThreadItemType",
|
|
1475
|
-
"type": "string"
|
|
1476
|
-
}
|
|
1477
|
-
},
|
|
1478
|
-
"required": [
|
|
1479
|
-
"id",
|
|
1480
|
-
"query",
|
|
1481
|
-
"type"
|
|
1482
|
-
],
|
|
1483
|
-
"title": "WebSearchThreadItem",
|
|
1484
|
-
"type": "object"
|
|
1485
|
-
},
|
|
1486
|
-
{
|
|
1487
|
-
"properties": {
|
|
1488
|
-
"id": { "type": "string" },
|
|
1489
|
-
"path": { "$ref": "#/definitions/LegacyAppPathString" },
|
|
1490
|
-
"type": {
|
|
1491
|
-
"enum": ["imageView"],
|
|
1492
|
-
"title": "ImageViewThreadItemType",
|
|
1493
|
-
"type": "string"
|
|
1494
|
-
}
|
|
1495
|
-
},
|
|
1496
|
-
"required": [
|
|
1497
|
-
"id",
|
|
1498
|
-
"path",
|
|
1499
|
-
"type"
|
|
1500
|
-
],
|
|
1501
|
-
"title": "ImageViewThreadItem",
|
|
1502
|
-
"type": "object"
|
|
1503
|
-
},
|
|
1504
|
-
{
|
|
1505
|
-
"description": "Display item emitted by the interruptible `clock.sleep` tool.",
|
|
1506
|
-
"properties": {
|
|
1507
|
-
"durationMs": {
|
|
1508
|
-
"format": "uint64",
|
|
1509
|
-
"minimum": 0,
|
|
1510
|
-
"type": "integer"
|
|
1511
|
-
},
|
|
1512
|
-
"id": { "type": "string" },
|
|
1513
|
-
"type": {
|
|
1514
|
-
"enum": ["sleep"],
|
|
1515
|
-
"title": "SleepThreadItemType",
|
|
1516
|
-
"type": "string"
|
|
1517
|
-
}
|
|
1518
|
-
},
|
|
1519
|
-
"required": [
|
|
1520
|
-
"durationMs",
|
|
1521
|
-
"id",
|
|
1522
|
-
"type"
|
|
1523
|
-
],
|
|
1524
|
-
"title": "SleepThreadItem",
|
|
1525
|
-
"type": "object"
|
|
1526
|
-
},
|
|
1527
|
-
{
|
|
1528
|
-
"properties": {
|
|
1529
|
-
"failure": {
|
|
1530
|
-
"anyOf": [{ "$ref": "#/definitions/ImageGenerationFailure" }, { "type": "null" }],
|
|
1531
|
-
"default": null
|
|
1532
|
-
},
|
|
1533
|
-
"id": { "type": "string" },
|
|
1534
|
-
"result": { "type": "string" },
|
|
1535
|
-
"revisedPrompt": { "type": ["string", "null"] },
|
|
1536
|
-
"savedPath": { "anyOf": [{ "$ref": "#/definitions/AbsolutePathBuf" }, { "type": "null" }] },
|
|
1537
|
-
"status": { "type": "string" },
|
|
1538
|
-
"transparentBackground": {
|
|
1539
|
-
"default": null,
|
|
1540
|
-
"type": ["boolean", "null"]
|
|
1541
|
-
},
|
|
1542
|
-
"type": {
|
|
1543
|
-
"enum": ["imageGeneration"],
|
|
1544
|
-
"title": "ImageGenerationThreadItemType",
|
|
1545
|
-
"type": "string"
|
|
1546
|
-
}
|
|
1547
|
-
},
|
|
1548
|
-
"required": [
|
|
1549
|
-
"id",
|
|
1550
|
-
"result",
|
|
1551
|
-
"status",
|
|
1552
|
-
"type"
|
|
1553
|
-
],
|
|
1554
|
-
"title": "ImageGenerationThreadItem",
|
|
1555
|
-
"type": "object"
|
|
1556
|
-
},
|
|
1557
|
-
{
|
|
1558
|
-
"properties": {
|
|
1559
|
-
"id": { "type": "string" },
|
|
1560
|
-
"review": { "type": "string" },
|
|
1561
|
-
"type": {
|
|
1562
|
-
"enum": ["enteredReviewMode"],
|
|
1563
|
-
"title": "EnteredReviewModeThreadItemType",
|
|
1564
|
-
"type": "string"
|
|
1565
|
-
}
|
|
1566
|
-
},
|
|
1567
|
-
"required": [
|
|
1568
|
-
"id",
|
|
1569
|
-
"review",
|
|
1570
|
-
"type"
|
|
1571
|
-
],
|
|
1572
|
-
"title": "EnteredReviewModeThreadItem",
|
|
1573
|
-
"type": "object"
|
|
1574
|
-
},
|
|
1575
|
-
{
|
|
1576
|
-
"properties": {
|
|
1577
|
-
"id": { "type": "string" },
|
|
1578
|
-
"review": { "type": "string" },
|
|
1579
|
-
"type": {
|
|
1580
|
-
"enum": ["exitedReviewMode"],
|
|
1581
|
-
"title": "ExitedReviewModeThreadItemType",
|
|
1582
|
-
"type": "string"
|
|
1583
|
-
}
|
|
1584
|
-
},
|
|
1585
|
-
"required": [
|
|
1586
|
-
"id",
|
|
1587
|
-
"review",
|
|
1588
|
-
"type"
|
|
1589
|
-
],
|
|
1590
|
-
"title": "ExitedReviewModeThreadItem",
|
|
1591
|
-
"type": "object"
|
|
1592
|
-
},
|
|
1593
|
-
{
|
|
1594
|
-
"properties": {
|
|
1595
|
-
"id": { "type": "string" },
|
|
1596
|
-
"type": {
|
|
1597
|
-
"enum": ["contextCompaction"],
|
|
1598
|
-
"title": "ContextCompactionThreadItemType",
|
|
1599
|
-
"type": "string"
|
|
1600
|
-
}
|
|
1601
|
-
},
|
|
1602
|
-
"required": ["id", "type"],
|
|
1603
|
-
"title": "ContextCompactionThreadItem",
|
|
1604
|
-
"type": "object"
|
|
1605
|
-
}
|
|
1606
|
-
] },
|
|
1607
|
-
"ThreadSection": {
|
|
1608
|
-
"description": "An independently persisted, user-visible thread section.",
|
|
1609
|
-
"properties": {
|
|
1610
|
-
"appearance": {
|
|
1611
|
-
"anyOf": [{ "$ref": "#/definitions/ThreadSectionAppearance" }, { "type": "null" }],
|
|
1612
|
-
"default": null,
|
|
1613
|
-
"description": "Optional appearance synchronized across clients."
|
|
1614
|
-
},
|
|
1615
|
-
"id": {
|
|
1616
|
-
"description": "Opaque UUIDv7 identity that remains stable when the section is renamed.",
|
|
1617
|
-
"type": "string"
|
|
1618
|
-
},
|
|
1619
|
-
"name": {
|
|
1620
|
-
"description": "The current user-visible section name.",
|
|
1621
|
-
"type": "string"
|
|
1622
|
-
}
|
|
1623
|
-
},
|
|
1624
|
-
"required": ["id", "name"],
|
|
1625
|
-
"type": "object"
|
|
1626
|
-
},
|
|
1627
|
-
"ThreadSectionAppearance": {
|
|
1628
|
-
"description": "Extensible visual presentation for a custom thread section.",
|
|
1629
|
-
"properties": {
|
|
1630
|
-
"color": { "type": ["string", "null"] },
|
|
1631
|
-
"icon": { "type": ["string", "null"] }
|
|
1632
|
-
},
|
|
1633
|
-
"type": "object"
|
|
1634
|
-
},
|
|
1635
|
-
"ThreadSource": { "type": "string" },
|
|
1636
|
-
"ThreadStatus": { "oneOf": [
|
|
1637
|
-
{
|
|
1638
|
-
"properties": { "type": {
|
|
1639
|
-
"enum": ["notLoaded"],
|
|
1640
|
-
"title": "NotLoadedThreadStatusType",
|
|
1641
|
-
"type": "string"
|
|
1642
|
-
} },
|
|
1643
|
-
"required": ["type"],
|
|
1644
|
-
"title": "NotLoadedThreadStatus",
|
|
1645
|
-
"type": "object"
|
|
1646
|
-
},
|
|
1647
|
-
{
|
|
1648
|
-
"properties": { "type": {
|
|
1649
|
-
"enum": ["idle"],
|
|
1650
|
-
"title": "IdleThreadStatusType",
|
|
1651
|
-
"type": "string"
|
|
1652
|
-
} },
|
|
1653
|
-
"required": ["type"],
|
|
1654
|
-
"title": "IdleThreadStatus",
|
|
1655
|
-
"type": "object"
|
|
1656
|
-
},
|
|
1657
|
-
{
|
|
1658
|
-
"properties": { "type": {
|
|
1659
|
-
"enum": ["systemError"],
|
|
1660
|
-
"title": "SystemErrorThreadStatusType",
|
|
1661
|
-
"type": "string"
|
|
1662
|
-
} },
|
|
1663
|
-
"required": ["type"],
|
|
1664
|
-
"title": "SystemErrorThreadStatus",
|
|
1665
|
-
"type": "object"
|
|
1666
|
-
},
|
|
1667
|
-
{
|
|
1668
|
-
"properties": {
|
|
1669
|
-
"activeFlags": {
|
|
1670
|
-
"items": { "$ref": "#/definitions/ThreadActiveFlag" },
|
|
1671
|
-
"type": "array"
|
|
1672
|
-
},
|
|
1673
|
-
"type": {
|
|
1674
|
-
"enum": ["active"],
|
|
1675
|
-
"title": "ActiveThreadStatusType",
|
|
1676
|
-
"type": "string"
|
|
1677
|
-
}
|
|
1678
|
-
},
|
|
1679
|
-
"required": ["activeFlags", "type"],
|
|
1680
|
-
"title": "ActiveThreadStatus",
|
|
1681
|
-
"type": "object"
|
|
1682
|
-
}
|
|
1683
|
-
] },
|
|
1684
|
-
"Turn": {
|
|
1685
|
-
"properties": {
|
|
1686
|
-
"completedAt": {
|
|
1687
|
-
"description": "Unix timestamp (in seconds) when the turn completed.",
|
|
1688
|
-
"format": "int64",
|
|
1689
|
-
"type": ["integer", "null"]
|
|
1690
|
-
},
|
|
1691
|
-
"durationMs": {
|
|
1692
|
-
"description": "Duration between turn start and completion in milliseconds, if known.",
|
|
1693
|
-
"format": "int64",
|
|
1694
|
-
"type": ["integer", "null"]
|
|
1695
|
-
},
|
|
1696
|
-
"error": {
|
|
1697
|
-
"anyOf": [{ "$ref": "#/definitions/TurnError" }, { "type": "null" }],
|
|
1698
|
-
"description": "Only populated when the Turn's status is failed."
|
|
1699
|
-
},
|
|
1700
|
-
"id": {
|
|
1701
|
-
"description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
|
|
1702
|
-
"type": "string"
|
|
1703
|
-
},
|
|
1704
|
-
"items": {
|
|
1705
|
-
"description": "Thread items currently included in this turn payload.",
|
|
1706
|
-
"items": { "$ref": "#/definitions/ThreadItem" },
|
|
1707
|
-
"type": "array"
|
|
1708
|
-
},
|
|
1709
|
-
"itemsView": {
|
|
1710
|
-
"allOf": [{ "$ref": "#/definitions/TurnItemsView" }],
|
|
1711
|
-
"default": "full",
|
|
1712
|
-
"description": "Describes how much of `items` has been loaded for this turn."
|
|
1713
|
-
},
|
|
1714
|
-
"startedAt": {
|
|
1715
|
-
"description": "Unix timestamp (in seconds) when the turn started.",
|
|
1716
|
-
"format": "int64",
|
|
1717
|
-
"type": ["integer", "null"]
|
|
1718
|
-
},
|
|
1719
|
-
"status": { "$ref": "#/definitions/TurnStatus" }
|
|
1720
|
-
},
|
|
1721
|
-
"required": [
|
|
1722
|
-
"id",
|
|
1723
|
-
"items",
|
|
1724
|
-
"status"
|
|
1725
|
-
],
|
|
1726
|
-
"type": "object"
|
|
1727
|
-
},
|
|
1728
|
-
"TurnError": {
|
|
1729
|
-
"properties": {
|
|
1730
|
-
"additionalDetails": {
|
|
1731
|
-
"default": null,
|
|
1732
|
-
"type": ["string", "null"]
|
|
1733
|
-
},
|
|
1734
|
-
"codexErrorInfo": { "anyOf": [{ "$ref": "#/definitions/CodexErrorInfo" }, { "type": "null" }] },
|
|
1735
|
-
"message": { "type": "string" }
|
|
1736
|
-
},
|
|
1737
|
-
"required": ["message"],
|
|
1738
|
-
"type": "object"
|
|
1739
|
-
},
|
|
1740
|
-
"TurnItemsView": { "oneOf": [
|
|
1741
|
-
{
|
|
1742
|
-
"description": "`items` was not loaded for this turn. The field is intentionally empty.",
|
|
1743
|
-
"enum": ["notLoaded"],
|
|
1744
|
-
"type": "string"
|
|
1745
|
-
},
|
|
1746
|
-
{
|
|
1747
|
-
"description": "`items` contains only a display summary for this turn.",
|
|
1748
|
-
"enum": ["summary"],
|
|
1749
|
-
"type": "string"
|
|
1750
|
-
},
|
|
1751
|
-
{
|
|
1752
|
-
"description": "`items` contains every ThreadItem available from persisted app-server history for this turn.",
|
|
1753
|
-
"enum": ["full"],
|
|
1754
|
-
"type": "string"
|
|
1755
|
-
}
|
|
1756
|
-
] },
|
|
1757
|
-
"TurnStatus": {
|
|
1758
|
-
"enum": [
|
|
1759
|
-
"completed",
|
|
1760
|
-
"interrupted",
|
|
1761
|
-
"failed",
|
|
1762
|
-
"inProgress"
|
|
1763
|
-
],
|
|
1764
|
-
"type": "string"
|
|
1765
|
-
},
|
|
1766
|
-
"TurnsPage": {
|
|
1767
|
-
"properties": {
|
|
1768
|
-
"backwardsCursor": { "type": ["string", "null"] },
|
|
1769
|
-
"data": {
|
|
1770
|
-
"items": { "$ref": "#/definitions/Turn" },
|
|
1771
|
-
"type": "array"
|
|
1772
|
-
},
|
|
1773
|
-
"nextCursor": { "type": ["string", "null"] }
|
|
1774
|
-
},
|
|
1775
|
-
"required": ["data"],
|
|
1776
|
-
"type": "object"
|
|
1777
|
-
},
|
|
1778
|
-
"UserInput": { "oneOf": [
|
|
1779
|
-
{
|
|
1780
|
-
"properties": {
|
|
1781
|
-
"text": { "type": "string" },
|
|
1782
|
-
"text_elements": {
|
|
1783
|
-
"default": [],
|
|
1784
|
-
"description": "UI-defined spans within `text` used to render or persist special elements.",
|
|
1785
|
-
"items": { "$ref": "#/definitions/TextElement" },
|
|
1786
|
-
"type": "array"
|
|
1787
|
-
},
|
|
1788
|
-
"type": {
|
|
1789
|
-
"enum": ["text"],
|
|
1790
|
-
"title": "TextUserInputType",
|
|
1791
|
-
"type": "string"
|
|
1792
|
-
}
|
|
1793
|
-
},
|
|
1794
|
-
"required": ["text", "type"],
|
|
1795
|
-
"title": "TextUserInput",
|
|
1796
|
-
"type": "object"
|
|
1797
|
-
},
|
|
1798
|
-
{
|
|
1799
|
-
"properties": {
|
|
1800
|
-
"detail": {
|
|
1801
|
-
"anyOf": [{ "$ref": "#/definitions/ImageDetail" }, { "type": "null" }],
|
|
1802
|
-
"default": null
|
|
1803
|
-
},
|
|
1804
|
-
"type": {
|
|
1805
|
-
"enum": ["image"],
|
|
1806
|
-
"title": "ImageUserInputType",
|
|
1807
|
-
"type": "string"
|
|
1808
|
-
},
|
|
1809
|
-
"url": { "type": "string" }
|
|
1810
|
-
},
|
|
1811
|
-
"required": ["type", "url"],
|
|
1812
|
-
"title": "ImageUserInput",
|
|
1813
|
-
"type": "object"
|
|
1814
|
-
},
|
|
1815
|
-
{
|
|
1816
|
-
"properties": {
|
|
1817
|
-
"detail": {
|
|
1818
|
-
"anyOf": [{ "$ref": "#/definitions/ImageDetail" }, { "type": "null" }],
|
|
1819
|
-
"default": null
|
|
1820
|
-
},
|
|
1821
|
-
"path": { "type": "string" },
|
|
1822
|
-
"type": {
|
|
1823
|
-
"enum": ["localImage"],
|
|
1824
|
-
"title": "LocalImageUserInputType",
|
|
1825
|
-
"type": "string"
|
|
1826
|
-
}
|
|
1827
|
-
},
|
|
1828
|
-
"required": ["path", "type"],
|
|
1829
|
-
"title": "LocalImageUserInput",
|
|
1830
|
-
"type": "object"
|
|
1831
|
-
},
|
|
1832
|
-
{
|
|
1833
|
-
"properties": {
|
|
1834
|
-
"type": {
|
|
1835
|
-
"enum": ["audio"],
|
|
1836
|
-
"title": "AudioUserInputType",
|
|
1837
|
-
"type": "string"
|
|
1838
|
-
},
|
|
1839
|
-
"url": { "type": "string" }
|
|
1840
|
-
},
|
|
1841
|
-
"required": ["type", "url"],
|
|
1842
|
-
"title": "AudioUserInput",
|
|
1843
|
-
"type": "object"
|
|
1844
|
-
},
|
|
1845
|
-
{
|
|
1846
|
-
"properties": {
|
|
1847
|
-
"path": { "type": "string" },
|
|
1848
|
-
"type": {
|
|
1849
|
-
"enum": ["localAudio"],
|
|
1850
|
-
"title": "LocalAudioUserInputType",
|
|
1851
|
-
"type": "string"
|
|
1852
|
-
}
|
|
1853
|
-
},
|
|
1854
|
-
"required": ["path", "type"],
|
|
1855
|
-
"title": "LocalAudioUserInput",
|
|
1856
|
-
"type": "object"
|
|
1857
|
-
},
|
|
1858
|
-
{
|
|
1859
|
-
"properties": {
|
|
1860
|
-
"name": { "type": "string" },
|
|
1861
|
-
"path": { "type": "string" },
|
|
1862
|
-
"type": {
|
|
1863
|
-
"enum": ["skill"],
|
|
1864
|
-
"title": "SkillUserInputType",
|
|
1865
|
-
"type": "string"
|
|
1866
|
-
}
|
|
1867
|
-
},
|
|
1868
|
-
"required": [
|
|
1869
|
-
"name",
|
|
1870
|
-
"path",
|
|
1871
|
-
"type"
|
|
1872
|
-
],
|
|
1873
|
-
"title": "SkillUserInput",
|
|
1874
|
-
"type": "object"
|
|
1875
|
-
},
|
|
1876
|
-
{
|
|
1877
|
-
"properties": {
|
|
1878
|
-
"name": { "type": "string" },
|
|
1879
|
-
"path": { "type": "string" },
|
|
1880
|
-
"type": {
|
|
1881
|
-
"enum": ["mention"],
|
|
1882
|
-
"title": "MentionUserInputType",
|
|
1883
|
-
"type": "string"
|
|
1884
|
-
}
|
|
1885
|
-
},
|
|
1886
|
-
"required": [
|
|
1887
|
-
"name",
|
|
1888
|
-
"path",
|
|
1889
|
-
"type"
|
|
1890
|
-
],
|
|
1891
|
-
"title": "MentionUserInput",
|
|
1892
|
-
"type": "object"
|
|
1893
|
-
}
|
|
1894
|
-
] },
|
|
1895
|
-
"WebSearchAction": { "oneOf": [
|
|
1896
|
-
{
|
|
1897
|
-
"properties": {
|
|
1898
|
-
"queries": {
|
|
1899
|
-
"items": { "type": "string" },
|
|
1900
|
-
"type": ["array", "null"]
|
|
1901
|
-
},
|
|
1902
|
-
"query": { "type": ["string", "null"] },
|
|
1903
|
-
"type": {
|
|
1904
|
-
"enum": ["search"],
|
|
1905
|
-
"title": "SearchWebSearchActionType",
|
|
1906
|
-
"type": "string"
|
|
1907
|
-
}
|
|
1908
|
-
},
|
|
1909
|
-
"required": ["type"],
|
|
1910
|
-
"title": "SearchWebSearchAction",
|
|
1911
|
-
"type": "object"
|
|
1912
|
-
},
|
|
1913
|
-
{
|
|
1914
|
-
"properties": {
|
|
1915
|
-
"type": {
|
|
1916
|
-
"enum": ["openPage"],
|
|
1917
|
-
"title": "OpenPageWebSearchActionType",
|
|
1918
|
-
"type": "string"
|
|
1919
|
-
},
|
|
1920
|
-
"url": { "type": ["string", "null"] }
|
|
1921
|
-
},
|
|
1922
|
-
"required": ["type"],
|
|
1923
|
-
"title": "OpenPageWebSearchAction",
|
|
1924
|
-
"type": "object"
|
|
1925
|
-
},
|
|
1926
|
-
{
|
|
1927
|
-
"properties": {
|
|
1928
|
-
"pattern": { "type": ["string", "null"] },
|
|
1929
|
-
"type": {
|
|
1930
|
-
"enum": ["findInPage"],
|
|
1931
|
-
"title": "FindInPageWebSearchActionType",
|
|
1932
|
-
"type": "string"
|
|
1933
|
-
},
|
|
1934
|
-
"url": { "type": ["string", "null"] }
|
|
1935
|
-
},
|
|
1936
|
-
"required": ["type"],
|
|
1937
|
-
"title": "FindInPageWebSearchAction",
|
|
1938
|
-
"type": "object"
|
|
1939
|
-
},
|
|
1940
|
-
{
|
|
1941
|
-
"properties": { "type": {
|
|
1942
|
-
"enum": ["other"],
|
|
1943
|
-
"title": "OtherWebSearchActionType",
|
|
1944
|
-
"type": "string"
|
|
1945
|
-
} },
|
|
1946
|
-
"required": ["type"],
|
|
1947
|
-
"title": "OtherWebSearchAction",
|
|
1948
|
-
"type": "object"
|
|
1949
|
-
}
|
|
1950
|
-
] }
|
|
1951
|
-
};
|
|
1952
|
-
//#endregion
|
|
1953
|
-
//#region extensions/codex/src/app-server/protocol-generated/json/v2/ErrorNotification.json
|
|
1954
|
-
var ErrorNotification_default = {
|
|
1955
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
1956
|
-
properties: {
|
|
1957
|
-
"error": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/TurnError" },
|
|
1958
|
-
"threadId": { "type": "string" },
|
|
1959
|
-
"turnId": { "type": "string" },
|
|
1960
|
-
"willRetry": { "type": "boolean" }
|
|
1961
|
-
},
|
|
1962
|
-
required: [
|
|
1963
|
-
"error",
|
|
1964
|
-
"threadId",
|
|
1965
|
-
"turnId",
|
|
1966
|
-
"willRetry"
|
|
1967
|
-
],
|
|
1968
|
-
title: "ErrorNotification",
|
|
1969
|
-
type: "object"
|
|
1970
|
-
};
|
|
1971
|
-
//#endregion
|
|
1972
|
-
//#region extensions/codex/src/app-server/protocol-generated/json/v2/ModelListResponse.json
|
|
1973
|
-
var ModelListResponse_default = {
|
|
1974
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
1975
|
-
properties: {
|
|
1976
|
-
"data": {
|
|
1977
|
-
"items": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/Model" },
|
|
1978
|
-
"type": "array"
|
|
1979
|
-
},
|
|
1980
|
-
"nextCursor": {
|
|
1981
|
-
"description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.",
|
|
1982
|
-
"type": ["string", "null"]
|
|
1983
|
-
}
|
|
1984
|
-
},
|
|
1985
|
-
required: ["data"],
|
|
1986
|
-
title: "ModelListResponse",
|
|
1987
|
-
type: "object"
|
|
1988
|
-
};
|
|
1989
|
-
//#endregion
|
|
1990
|
-
//#region extensions/codex/src/app-server/protocol-generated/json/v2/ThreadResumeResponse.json
|
|
1991
|
-
var ThreadResumeResponse_default = {
|
|
1992
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
1993
|
-
properties: {
|
|
1994
|
-
"activePermissionProfile": {
|
|
1995
|
-
"anyOf": [{ "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/ActivePermissionProfile" }, { "type": "null" }],
|
|
1996
|
-
"default": null,
|
|
1997
|
-
"description": "Named or implicit built-in profile that produced the active permissions, when known."
|
|
1998
|
-
},
|
|
1999
|
-
"approvalPolicy": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/AskForApproval" },
|
|
2000
|
-
"approvalsReviewer": {
|
|
2001
|
-
"allOf": [{ "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/ApprovalsReviewer" }],
|
|
2002
|
-
"description": "Reviewer currently used for approval requests on this thread."
|
|
2003
|
-
},
|
|
2004
|
-
"cwd": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/AbsolutePathBuf" },
|
|
2005
|
-
"initialTurnsPage": {
|
|
2006
|
-
"anyOf": [{ "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/TurnsPage" }, { "type": "null" }],
|
|
2007
|
-
"default": null,
|
|
2008
|
-
"description": "`thread/turns/list` page returned when requested by `initialTurnsPage`."
|
|
2009
|
-
},
|
|
2010
|
-
"instructionSources": {
|
|
2011
|
-
"default": [],
|
|
2012
|
-
"description": "Environment-native paths to instruction source files currently loaded for this thread.",
|
|
2013
|
-
"items": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/LegacyAppPathString" },
|
|
2014
|
-
"type": "array"
|
|
2015
|
-
},
|
|
2016
|
-
"itemsBackwardsCursor": {
|
|
2017
|
-
"default": null,
|
|
2018
|
-
"description": "Opaque cursor for hydrating paginated items backwards.\n\nPass this as `cursor` to `thread/items/list` with `sortDirection: \"desc\"`. The first page includes the item identified by the cursor.",
|
|
2019
|
-
"type": ["string", "null"]
|
|
2020
|
-
},
|
|
2021
|
-
"model": { "type": "string" },
|
|
2022
|
-
"modelProvider": { "type": "string" },
|
|
2023
|
-
"multiAgentMode": {
|
|
2024
|
-
"allOf": [{ "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/MultiAgentMode" }],
|
|
2025
|
-
"default": "explicitRequestOnly",
|
|
2026
|
-
"description": "@deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior."
|
|
2027
|
-
},
|
|
2028
|
-
"reasoningEffort": { "anyOf": [{ "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/ReasoningEffort" }, { "type": "null" }] },
|
|
2029
|
-
"runtimeWorkspaceRoots": {
|
|
2030
|
-
"default": [],
|
|
2031
|
-
"description": "Thread-scoped runtime workspace roots used to materialize `:workspace_roots`.",
|
|
2032
|
-
"items": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/AbsolutePathBuf" },
|
|
2033
|
-
"type": "array"
|
|
2034
|
-
},
|
|
2035
|
-
"sandbox": {
|
|
2036
|
-
"allOf": [{ "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/SandboxPolicy" }],
|
|
2037
|
-
"description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance."
|
|
2038
|
-
},
|
|
2039
|
-
"serviceTier": { "type": ["string", "null"] },
|
|
2040
|
-
"thread": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/Thread" },
|
|
2041
|
-
"turnsBackwardsCursor": {
|
|
2042
|
-
"default": null,
|
|
2043
|
-
"description": "Opaque cursor for hydrating paginated turns backwards.\n\nPass this as `cursor` to `thread/turns/list` with `sortDirection: \"desc\"`. The first page includes the turn identified by the cursor.",
|
|
2044
|
-
"type": ["string", "null"]
|
|
2045
|
-
}
|
|
2046
|
-
},
|
|
2047
|
-
required: [
|
|
2048
|
-
"approvalPolicy",
|
|
2049
|
-
"approvalsReviewer",
|
|
2050
|
-
"cwd",
|
|
2051
|
-
"model",
|
|
2052
|
-
"modelProvider",
|
|
2053
|
-
"sandbox",
|
|
2054
|
-
"thread"
|
|
2055
|
-
],
|
|
2056
|
-
title: "ThreadResumeResponse",
|
|
2057
|
-
type: "object"
|
|
2058
|
-
};
|
|
2059
|
-
//#endregion
|
|
2060
|
-
//#region extensions/codex/src/app-server/protocol-generated/json/v2/ThreadStartResponse.json
|
|
2061
|
-
var ThreadStartResponse_default = {
|
|
2062
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
2063
|
-
properties: {
|
|
2064
|
-
"activePermissionProfile": {
|
|
2065
|
-
"anyOf": [{ "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/ActivePermissionProfile" }, { "type": "null" }],
|
|
2066
|
-
"default": null,
|
|
2067
|
-
"description": "Named or implicit built-in profile that produced the active permissions, when known."
|
|
2068
|
-
},
|
|
2069
|
-
"approvalPolicy": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/AskForApproval" },
|
|
2070
|
-
"approvalsReviewer": {
|
|
2071
|
-
"allOf": [{ "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/ApprovalsReviewer" }],
|
|
2072
|
-
"description": "Reviewer currently used for approval requests on this thread."
|
|
2073
|
-
},
|
|
2074
|
-
"cwd": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/AbsolutePathBuf" },
|
|
2075
|
-
"instructionSources": {
|
|
2076
|
-
"default": [],
|
|
2077
|
-
"description": "Environment-native paths to instruction source files currently loaded for this thread.",
|
|
2078
|
-
"items": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/LegacyAppPathString" },
|
|
2079
|
-
"type": "array"
|
|
2080
|
-
},
|
|
2081
|
-
"model": { "type": "string" },
|
|
2082
|
-
"modelProvider": { "type": "string" },
|
|
2083
|
-
"multiAgentMode": {
|
|
2084
|
-
"allOf": [{ "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/MultiAgentMode" }],
|
|
2085
|
-
"default": "explicitRequestOnly",
|
|
2086
|
-
"description": "@deprecated Always `explicitRequestOnly`. Use `reasoningEffort` for Ultra behavior."
|
|
2087
|
-
},
|
|
2088
|
-
"reasoningEffort": { "anyOf": [{ "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/ReasoningEffort" }, { "type": "null" }] },
|
|
2089
|
-
"runtimeWorkspaceRoots": {
|
|
2090
|
-
"default": [],
|
|
2091
|
-
"description": "Thread-scoped runtime workspace roots used to materialize `:workspace_roots`.",
|
|
2092
|
-
"items": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/AbsolutePathBuf" },
|
|
2093
|
-
"type": "array"
|
|
2094
|
-
},
|
|
2095
|
-
"sandbox": {
|
|
2096
|
-
"allOf": [{ "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/SandboxPolicy" }],
|
|
2097
|
-
"description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance."
|
|
2098
|
-
},
|
|
2099
|
-
"serviceTier": { "type": ["string", "null"] },
|
|
2100
|
-
"thread": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/Thread" }
|
|
2101
|
-
},
|
|
2102
|
-
required: [
|
|
2103
|
-
"approvalPolicy",
|
|
2104
|
-
"approvalsReviewer",
|
|
2105
|
-
"cwd",
|
|
2106
|
-
"model",
|
|
2107
|
-
"modelProvider",
|
|
2108
|
-
"sandbox",
|
|
2109
|
-
"thread"
|
|
2110
|
-
],
|
|
2111
|
-
title: "ThreadStartResponse",
|
|
2112
|
-
type: "object"
|
|
2113
|
-
};
|
|
2114
|
-
//#endregion
|
|
2115
|
-
//#region extensions/codex/src/app-server/protocol-generated/json/v2/TurnCompletedNotification.json
|
|
2116
|
-
var TurnCompletedNotification_default = {
|
|
2117
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
2118
|
-
properties: {
|
|
2119
|
-
"threadId": { "type": "string" },
|
|
2120
|
-
"turn": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/Turn" }
|
|
2121
|
-
},
|
|
2122
|
-
required: ["threadId", "turn"],
|
|
2123
|
-
title: "TurnCompletedNotification",
|
|
2124
|
-
type: "object"
|
|
2125
|
-
};
|
|
2126
|
-
//#endregion
|
|
2127
|
-
//#region extensions/codex/src/app-server/protocol-generated/json/v2/TurnStartResponse.json
|
|
2128
|
-
var TurnStartResponse_default = {
|
|
2129
|
-
$schema: "http://json-schema.org/draft-07/schema#",
|
|
2130
|
-
properties: { "turn": { "$ref": "./CodexAppServerProtocolDefinitions.json#/definitions/Turn" } },
|
|
2131
|
-
required: ["turn"],
|
|
2132
|
-
title: "TurnStartResponse",
|
|
2133
|
-
type: "object"
|
|
2134
|
-
};
|
|
2135
|
-
//#endregion
|
|
2136
|
-
//#region extensions/codex/src/app-server/protocol-validators.ts
|
|
2137
|
-
/**
|
|
2138
|
-
* Runtime validators for Codex app-server protocol payloads, including schema
|
|
2139
|
-
* normalization for generated JSON Schema before TypeBox compilation.
|
|
2140
|
-
*/
|
|
2141
|
-
const externalDefinitionRefPrefix = "./CodexAppServerProtocolDefinitions.json#/definitions/";
|
|
2142
|
-
const rootExternalDefinitionRefPrefix = "./v2/CodexAppServerProtocolDefinitions.json#/definitions/";
|
|
2143
|
-
const localDefinitionRefPrefix = "#/definitions/";
|
|
2144
|
-
function materializeCodexSchema(schema, externalRefPrefix = externalDefinitionRefPrefix) {
|
|
2145
|
-
const sharedDefinitions = definitions;
|
|
2146
|
-
if (!isRecord(schema) || !isRecord(sharedDefinitions)) return schema;
|
|
2147
|
-
const reachable = collectDefinitionRefs(schema, externalRefPrefix);
|
|
2148
|
-
const pending = [...reachable];
|
|
2149
|
-
while (pending.length > 0) {
|
|
2150
|
-
const name = pending.pop();
|
|
2151
|
-
if (name === void 0) continue;
|
|
2152
|
-
const definition = sharedDefinitions[name];
|
|
2153
|
-
if (definition === void 0) throw new Error(`Missing generated Codex schema definition: ${name}`);
|
|
2154
|
-
for (const dependency of collectDefinitionRefs(definition, localDefinitionRefPrefix)) if (!reachable.has(dependency)) {
|
|
2155
|
-
reachable.add(dependency);
|
|
2156
|
-
pending.push(dependency);
|
|
2157
|
-
}
|
|
2158
|
-
}
|
|
2159
|
-
if (reachable.size === 0) return schema;
|
|
2160
|
-
const definitions$1 = Object.fromEntries(Object.entries(sharedDefinitions).filter(([name]) => reachable.has(name)));
|
|
2161
|
-
return rewriteDefinitionRefs({
|
|
2162
|
-
...schema,
|
|
2163
|
-
definitions: definitions$1
|
|
2164
|
-
}, externalRefPrefix);
|
|
2165
|
-
}
|
|
2166
|
-
function collectDefinitionRefs(value, prefix, names = /* @__PURE__ */ new Set()) {
|
|
2167
|
-
if (Array.isArray(value)) for (const entry of value) collectDefinitionRefs(entry, prefix, names);
|
|
2168
|
-
else if (isRecord(value)) {
|
|
2169
|
-
if (typeof value.$ref === "string" && value.$ref.startsWith(prefix)) {
|
|
2170
|
-
const name = value.$ref.slice(prefix.length).split("/", 1)[0];
|
|
2171
|
-
if (name) names.add(name.replaceAll("~1", "/").replaceAll("~0", "~"));
|
|
2172
|
-
}
|
|
2173
|
-
for (const entry of Object.values(value)) collectDefinitionRefs(entry, prefix, names);
|
|
2174
|
-
}
|
|
2175
|
-
return names;
|
|
2176
|
-
}
|
|
2177
|
-
function rewriteDefinitionRefs(value, externalRefPrefix) {
|
|
2178
|
-
if (Array.isArray(value)) return value.map((entry) => rewriteDefinitionRefs(entry, externalRefPrefix));
|
|
2179
|
-
if (!isRecord(value)) return value;
|
|
2180
|
-
return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, key === "$ref" && typeof entry === "string" && entry.startsWith(externalRefPrefix) ? `${localDefinitionRefPrefix}${entry.slice(externalRefPrefix.length)}` : rewriteDefinitionRefs(entry, externalRefPrefix)]));
|
|
2181
|
-
}
|
|
2182
|
-
const dynamicToolCallParamsSchema = materializeCodexSchema(DynamicToolCallParams_default, rootExternalDefinitionRefPrefix);
|
|
2183
|
-
const errorNotificationSchema = materializeCodexSchema(ErrorNotification_default);
|
|
2184
|
-
const modelListResponseSchema = materializeCodexSchema(ModelListResponse_default);
|
|
2185
|
-
const threadResumeResponseSchema = materializeCodexSchema(ThreadResumeResponse_default);
|
|
2186
|
-
const threadStartResponseSchema = materializeCodexSchema(ThreadStartResponse_default);
|
|
2187
|
-
const turnCompletedNotificationSchema = materializeCodexSchema(TurnCompletedNotification_default);
|
|
2188
|
-
const turnStartResponseSchema = materializeCodexSchema(TurnStartResponse_default);
|
|
2189
|
-
function compileCodexSchema(schema) {
|
|
2190
|
-
const validator = Compile(normalizeJsonSchemaNode(schema));
|
|
2191
|
-
return {
|
|
2192
|
-
check: (value) => validator.Check(value),
|
|
2193
|
-
errors: (value) => [...validator.Errors(value)]
|
|
2194
|
-
};
|
|
2195
|
-
}
|
|
2196
|
-
const schemaMapKeywords = /* @__PURE__ */ new Set([
|
|
2197
|
-
"$defs",
|
|
2198
|
-
"definitions",
|
|
2199
|
-
"dependentSchemas",
|
|
2200
|
-
"patternProperties",
|
|
2201
|
-
"properties"
|
|
2202
|
-
]);
|
|
2203
|
-
const schemaValueKeywords = /* @__PURE__ */ new Set([
|
|
2204
|
-
"additionalItems",
|
|
2205
|
-
"additionalProperties",
|
|
2206
|
-
"contains",
|
|
2207
|
-
"else",
|
|
2208
|
-
"if",
|
|
2209
|
-
"items",
|
|
2210
|
-
"not",
|
|
2211
|
-
"propertyNames",
|
|
2212
|
-
"then",
|
|
2213
|
-
"unevaluatedItems",
|
|
2214
|
-
"unevaluatedProperties"
|
|
2215
|
-
]);
|
|
2216
|
-
const schemaArrayKeywords = /* @__PURE__ */ new Set([
|
|
2217
|
-
"allOf",
|
|
2218
|
-
"anyOf",
|
|
2219
|
-
"oneOf",
|
|
2220
|
-
"prefixItems"
|
|
2221
|
-
]);
|
|
2222
|
-
function schemaTypeIncludes(schema, type) {
|
|
2223
|
-
return schema.type === type || Array.isArray(schema.type) && schema.type.includes(type);
|
|
2224
|
-
}
|
|
2225
|
-
function normalizeSchemaMap(value) {
|
|
2226
|
-
if (!isRecord(value)) return value;
|
|
2227
|
-
return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, normalizeJsonSchemaNode(entry)]));
|
|
2228
|
-
}
|
|
2229
|
-
function expandJsonSchemaTypeArray(schema) {
|
|
2230
|
-
const { type, ...rest } = schema;
|
|
2231
|
-
if (!Array.isArray(type)) return schema;
|
|
2232
|
-
return { anyOf: type.map((entry) => Object.assign({}, rest, { type: entry })) };
|
|
2233
|
-
}
|
|
2234
|
-
function normalizeJsonSchemaNode(schema) {
|
|
2235
|
-
if (Array.isArray(schema)) return schema.map((entry) => normalizeJsonSchemaNode(entry));
|
|
2236
|
-
if (!isRecord(schema)) return schema;
|
|
2237
|
-
const normalizedSchema = expandJsonSchemaTypeArray(schema);
|
|
2238
|
-
return Object.fromEntries(Object.entries(normalizedSchema).map(([key, value]) => {
|
|
2239
|
-
if (schemaMapKeywords.has(key)) return [key, normalizeSchemaMap(value)];
|
|
2240
|
-
if (schemaValueKeywords.has(key) || schemaArrayKeywords.has(key)) return [key, normalizeJsonSchemaNode(value)];
|
|
2241
|
-
return [key, value];
|
|
2242
|
-
}));
|
|
2243
|
-
}
|
|
2244
|
-
function readDefault(schema) {
|
|
2245
|
-
if (!isRecord(schema) || !Object.hasOwn(schema, "default")) return;
|
|
2246
|
-
return structuredClone(schema.default);
|
|
2247
|
-
}
|
|
2248
|
-
function decodePointerSegment(segment) {
|
|
2249
|
-
return segment.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
2250
|
-
}
|
|
2251
|
-
function resolveLocalRef(root, ref) {
|
|
2252
|
-
if (ref === "#") return root;
|
|
2253
|
-
if (!ref.startsWith("#/")) return;
|
|
2254
|
-
let current = root;
|
|
2255
|
-
for (const segment of ref.slice(2).split("/").map(decodePointerSegment)) {
|
|
2256
|
-
if (!isRecord(current)) return;
|
|
2257
|
-
current = current[segment];
|
|
2258
|
-
}
|
|
2259
|
-
return current;
|
|
2260
|
-
}
|
|
2261
|
-
function applySchemaDefaults(schema, value, root = schema, resolvingRefs = /* @__PURE__ */ new Set()) {
|
|
2262
|
-
if (value === void 0) {
|
|
2263
|
-
const defaultValue = readDefault(schema);
|
|
2264
|
-
if (defaultValue !== void 0) return defaultValue;
|
|
2265
|
-
}
|
|
2266
|
-
if (!isRecord(schema)) return value;
|
|
2267
|
-
let nextValue = value;
|
|
2268
|
-
if (typeof schema.$ref === "string" && !resolvingRefs.has(schema.$ref)) {
|
|
2269
|
-
const target = resolveLocalRef(root, schema.$ref);
|
|
2270
|
-
if (target !== void 0) {
|
|
2271
|
-
resolvingRefs.add(schema.$ref);
|
|
2272
|
-
nextValue = applySchemaDefaults(target, nextValue, root, resolvingRefs);
|
|
2273
|
-
resolvingRefs.delete(schema.$ref);
|
|
2274
|
-
}
|
|
2275
|
-
}
|
|
2276
|
-
for (const key of ["allOf"]) {
|
|
2277
|
-
const branches = schema[key];
|
|
2278
|
-
if (Array.isArray(branches)) for (const branch of branches) nextValue = applySchemaDefaults(branch, nextValue, root, resolvingRefs);
|
|
2279
|
-
}
|
|
2280
|
-
if (schemaTypeIncludes(schema, "object") && isRecord(nextValue) && isRecord(schema.properties)) {
|
|
2281
|
-
for (const [key, propertySchema] of Object.entries(schema.properties)) {
|
|
2282
|
-
const currentValue = nextValue[key];
|
|
2283
|
-
const defaultedValue = applySchemaDefaults(propertySchema, currentValue, root, resolvingRefs);
|
|
2284
|
-
if (defaultedValue !== void 0 && defaultedValue !== currentValue) nextValue[key] = defaultedValue;
|
|
2285
|
-
}
|
|
2286
|
-
if (isRecord(schema.additionalProperties)) for (const key of Object.keys(nextValue)) {
|
|
2287
|
-
if (Object.hasOwn(schema.properties, key)) continue;
|
|
2288
|
-
nextValue[key] = applySchemaDefaults(schema.additionalProperties, nextValue[key], root, resolvingRefs);
|
|
2289
|
-
}
|
|
2290
|
-
}
|
|
2291
|
-
if (schemaTypeIncludes(schema, "array") && Array.isArray(nextValue) && isRecord(schema.items)) return nextValue.map((entry) => applySchemaDefaults(schema.items, entry, root, resolvingRefs));
|
|
2292
|
-
return nextValue;
|
|
2293
|
-
}
|
|
2294
|
-
function normalizeWithDefaults(schema, value) {
|
|
2295
|
-
if (value === void 0 || value === null) return value;
|
|
2296
|
-
return applySchemaDefaults(schema, structuredClone(value));
|
|
2297
|
-
}
|
|
2298
|
-
const validateDynamicToolCallParams = compileCodexSchema(dynamicToolCallParamsSchema);
|
|
2299
|
-
const validateErrorNotification = compileCodexSchema(errorNotificationSchema);
|
|
2300
|
-
const validateModelListResponse = compileCodexSchema(modelListResponseSchema);
|
|
2301
|
-
const validateThreadResumeResponse = compileCodexSchema(threadResumeResponseSchema);
|
|
2302
|
-
const validateThreadStartResponse = compileCodexSchema(threadStartResponseSchema);
|
|
2303
|
-
const validateTurnCompletedNotification = compileCodexSchema(turnCompletedNotificationSchema);
|
|
2304
|
-
const validateTurnStartResponse = compileCodexSchema(turnStartResponseSchema);
|
|
2305
|
-
/** Asserts and normalizes a Codex thread/start response. */
|
|
2306
|
-
function assertCodexThreadStartResponse(value) {
|
|
2307
|
-
const normalized = normalizeWithDefaults(threadStartResponseSchema, value);
|
|
2308
|
-
return assertCodexShape(validateThreadStartResponse, normalized, "thread/start response");
|
|
2309
|
-
}
|
|
2310
|
-
/** Asserts and normalizes a Codex thread/fork response. */
|
|
2311
|
-
function assertCodexThreadForkResponse(value) {
|
|
2312
|
-
const normalized = normalizeWithDefaults(threadStartResponseSchema, value);
|
|
2313
|
-
return assertCodexShape(validateThreadStartResponse, normalized, "thread/fork response");
|
|
2314
|
-
}
|
|
2315
|
-
/** Asserts the experimental beforeTurnId request field before it crosses the app-server boundary. */
|
|
2316
|
-
function assertCodexThreadForkParams(value) {
|
|
2317
|
-
if (!isRecord(value) || typeof value.threadId !== "string" || !value.threadId.trim() || value.beforeTurnId !== void 0 && value.beforeTurnId !== null && typeof value.beforeTurnId !== "string") throw new Error("Invalid Codex app-server thread/fork params");
|
|
2318
|
-
return value;
|
|
2319
|
-
}
|
|
2320
|
-
/** Asserts and normalizes a Codex thread/resume response. */
|
|
2321
|
-
function assertCodexThreadResumeResponse(value) {
|
|
2322
|
-
const normalized = normalizeWithDefaults(threadResumeResponseSchema, value);
|
|
2323
|
-
return assertCodexShape(validateThreadResumeResponse, normalized, "thread/resume response");
|
|
2324
|
-
}
|
|
2325
|
-
/** Asserts and normalizes a Codex turn/start response. */
|
|
2326
|
-
function assertCodexTurnStartResponse(value) {
|
|
2327
|
-
const normalized = normalizeWithDefaults(turnStartResponseSchema, normalizeTurnStartResponse(value));
|
|
2328
|
-
return assertCodexShape(validateTurnStartResponse, normalized, "turn/start response");
|
|
2329
|
-
}
|
|
2330
|
-
/** Reads Codex dynamic-tool call params, returning undefined for invalid payloads. */
|
|
2331
|
-
function readCodexDynamicToolCallParams(value) {
|
|
2332
|
-
return readCodexShape(validateDynamicToolCallParams, normalizeWithDefaults(dynamicToolCallParamsSchema, value));
|
|
2333
|
-
}
|
|
2334
|
-
/** Reads a Codex error notification payload if it matches the protocol schema. */
|
|
2335
|
-
function readCodexErrorNotification(value) {
|
|
2336
|
-
return readCodexShape(validateErrorNotification, normalizeWithDefaults(errorNotificationSchema, value));
|
|
2337
|
-
}
|
|
2338
|
-
/** Asserts and normalizes a Codex model/list response. */
|
|
2339
|
-
function assertCodexModelListResponse(value) {
|
|
2340
|
-
return assertCodexShape(validateModelListResponse, normalizeWithDefaults(modelListResponseSchema, value), "model/list response");
|
|
2341
|
-
}
|
|
2342
|
-
/** Reads and normalizes a Codex turn object. */
|
|
2343
|
-
function readCodexTurn(value) {
|
|
2344
|
-
return readCodexShape(validateTurnStartResponse, normalizeWithDefaults(turnStartResponseSchema, { turn: normalizeTurn(value) }))?.turn;
|
|
2345
|
-
}
|
|
2346
|
-
/** Reads a Codex turn/completed notification payload if it matches the protocol schema. */
|
|
2347
|
-
function readCodexTurnCompletedNotification(value) {
|
|
2348
|
-
return readCodexShape(validateTurnCompletedNotification, normalizeWithDefaults(turnCompletedNotificationSchema, normalizeTurnCompletedNotification(value)));
|
|
2349
|
-
}
|
|
2350
|
-
function assertCodexShape(validate, value, label) {
|
|
2351
|
-
if (validate.check(value)) return value;
|
|
2352
|
-
throw new Error(`Invalid Codex app-server ${label}: ${formatValidationErrors(validate, value)}`);
|
|
2353
|
-
}
|
|
2354
|
-
function readCodexShape(validate, value) {
|
|
2355
|
-
return validate.check(value) ? value : void 0;
|
|
2356
|
-
}
|
|
2357
|
-
function normalizeTurn(value) {
|
|
2358
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
2359
|
-
return {
|
|
2360
|
-
error: null,
|
|
2361
|
-
startedAt: null,
|
|
2362
|
-
completedAt: null,
|
|
2363
|
-
durationMs: null,
|
|
2364
|
-
...value,
|
|
2365
|
-
items: Array.isArray(value.items) ? value.items.map(normalizeThreadItem) : []
|
|
2366
|
-
};
|
|
2367
|
-
}
|
|
2368
|
-
function normalizeThreadItem(value) {
|
|
2369
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
2370
|
-
switch (value.type) {
|
|
2371
|
-
case "agentMessage": return {
|
|
2372
|
-
phase: null,
|
|
2373
|
-
delivery: null,
|
|
2374
|
-
memoryCitation: null,
|
|
2375
|
-
...value
|
|
2376
|
-
};
|
|
2377
|
-
case "plan": return {
|
|
2378
|
-
text: "",
|
|
2379
|
-
...value
|
|
2380
|
-
};
|
|
2381
|
-
case "reasoning": return {
|
|
2382
|
-
summary: [],
|
|
2383
|
-
content: [],
|
|
2384
|
-
...value
|
|
2385
|
-
};
|
|
2386
|
-
case "dynamicToolCall": return {
|
|
2387
|
-
namespace: null,
|
|
2388
|
-
arguments: null,
|
|
2389
|
-
status: "completed",
|
|
2390
|
-
contentItems: null,
|
|
2391
|
-
success: null,
|
|
2392
|
-
durationMs: null,
|
|
2393
|
-
...value
|
|
2394
|
-
};
|
|
2395
|
-
default: return value;
|
|
2396
|
-
}
|
|
2397
|
-
}
|
|
2398
|
-
function normalizeTurnStartResponse(value) {
|
|
2399
|
-
if (!value || typeof value !== "object" || Array.isArray(value) || !("turn" in value)) return value;
|
|
2400
|
-
return {
|
|
2401
|
-
...value,
|
|
2402
|
-
turn: normalizeTurn(value.turn)
|
|
2403
|
-
};
|
|
2404
|
-
}
|
|
2405
|
-
function normalizeTurnCompletedNotification(value) {
|
|
2406
|
-
if (!value || typeof value !== "object" || Array.isArray(value) || !("turn" in value)) return value;
|
|
2407
|
-
return {
|
|
2408
|
-
...value,
|
|
2409
|
-
turn: normalizeTurn(value.turn)
|
|
2410
|
-
};
|
|
2411
|
-
}
|
|
2412
|
-
function formatValidationErrors(validate, value) {
|
|
2413
|
-
const errors = validate.errors(value);
|
|
2414
|
-
if (!errors || errors.length === 0) return "schema validation failed";
|
|
2415
|
-
return errors.map((error) => {
|
|
2416
|
-
const message = error.message?.trim() || "schema validation failed";
|
|
2417
|
-
return error.instancePath ? `${error.instancePath} ${message}` : message;
|
|
2418
|
-
}).join("; ");
|
|
2419
|
-
}
|
|
2420
|
-
//#endregion
|
|
2421
|
-
export { assertCodexThreadStartResponse as a, readCodexErrorNotification as c, assertCodexThreadResumeResponse as i, readCodexTurn as l, assertCodexThreadForkParams as n, assertCodexTurnStartResponse as o, assertCodexThreadForkResponse as r, readCodexDynamicToolCallParams as s, assertCodexModelListResponse as t, readCodexTurnCompletedNotification as u };
|