authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-24 14:10:02-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-24 14:10:02-07:00
log567783ecdc658c8bf86c4c4980df5df8ebdd9037
treed7bba34da1f5c80bc4bd5abb39d57a733b102209
parentf3cb2a1fee65a55a4083c4cfe9317ca0d1e7c1d5
signature Signed by PGP key B5690EEEBB952194

fix(codex): the protocol generator runs again on Effect rc.115 (#13480)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

3 files changed, 20514 insertions(+), 19043 deletions(-)

apps/server/src/provider/Layers/CodexSessionRuntime.ts+2-2
......@@ -119,7 +119,7 @@ const McpElicitationFormField = Schema.Struct({
119119 type: Schema.optionalKey(NullableMcpElicitationString),
120120 title: Schema.optionalKey(NullableMcpElicitationString),
121121 description: Schema.optionalKey(NullableMcpElicitationString),
122 default: Schema.optionalKey(Schema.Unknown),
122 default: Schema.optionalKey(Schema.Json),
123123 enum: Schema.optionalKey(Schema.NullOr(Schema.Array(Schema.String))),
124124 enumNames: Schema.optionalKey(Schema.NullOr(Schema.Array(Schema.String))),
125125 oneOf: Schema.optionalKey(
......@@ -442,7 +442,7 @@ export function toMcpElicitationResponse(
442442 ? "always"
443443 : undefined;
444444 const form = mcpElicitationFormFields(payload);
445 const content: Record<string, unknown> = {};
445 const content: Record<string, Schema.Json> = {};
446446
447447 for (const [key, field] of Object.entries(form?.properties ?? {})) {
448448 const options = mcpElicitationFieldOptions(field);
packages/effect-codex-app-server/scripts/generate.ts+86-3
......@@ -269,8 +269,13 @@ const ensureGeneratedDir = Effect.fn("ensureGeneratedDir")(function* () {
269269});
270270
271271const fetchText = Effect.fn("fetchText")(function* (url: string) {
272 // Unauthenticated GitHub API calls are capped at 60/hour; set GITHUB_TOKEN to lift that.
273 const token = process.env.GITHUB_TOKEN;
272274 return yield* HttpClientRequest.get(url).pipe(
273275 HttpClientRequest.setHeader("user-agent", USER_AGENT),
276 token && url.startsWith("https://api.github.com/")
277 ? HttpClientRequest.bearerToken(token)
278 : (request) => request,
274279 HttpClient.execute,
275280 Effect.flatMap(HttpClientResponse.filterStatusOk),
276281 Effect.flatMap((okResponse) => okResponse.text),
......@@ -387,6 +392,84 @@ function stripNullDefaults(value: Schema.Json): Schema.Json {
387392 ) as Schema.Json;
388393}
389394
395type JsonSchemaNode = { readonly [key: string]: Schema.Json };
396
397function isJsonSchemaNode(value: Schema.Json | undefined): value is JsonSchemaNode {
398 return value !== null && typeof value === "object" && !Array.isArray(value);
399}
400
401// Adapts Codex's JSON Schema to Effect's importer, visiting only schema
402// positions so a field literally named "properties" is left alone:
403// - Effect imports an object without additionalProperties as an open record.
404// Codex omits it for plain structs, so close objects that list properties.
405// - Effect cannot intersect shared object fields with object alternatives,
406// which Codex uses for "one of these keys plus shared fields"
407// (image_url | file_id). Fold the shared fields into each alternative.
408function adaptSchemaForEffect(value: Schema.Json): Schema.Json {
409 if (!isJsonSchemaNode(value)) {
410 return value;
411 }
412 const node: Record<string, Schema.Json> = { ...value };
413 for (const key of ["items", "additionalProperties"]) {
414 const child = node[key];
415 if (isJsonSchemaNode(child)) node[key] = adaptSchemaForEffect(child);
416 }
417 for (const key of ["anyOf", "oneOf", "allOf"]) {
418 const child = node[key];
419 if (Array.isArray(child)) node[key] = child.map(adaptSchemaForEffect);
420 }
421 for (const key of ["properties", "definitions"]) {
422 const child = node[key];
423 if (isJsonSchemaNode(child)) {
424 node[key] = Object.fromEntries(
425 Object.entries(child).map(([name, schema]) => [name, adaptSchemaForEffect(schema)]),
426 );
427 }
428 }
429
430 const { properties } = node;
431 if (
432 isJsonSchemaNode(properties) &&
433 Object.keys(properties).length > 0 &&
434 !("additionalProperties" in node)
435 ) {
436 node.additionalProperties = false;
437 }
438
439 const alternativesKey = "anyOf" in node ? "anyOf" : "oneOf";
440 const alternatives = node[alternativesKey];
441 if (
442 !isJsonSchemaNode(properties) ||
443 !Array.isArray(alternatives) ||
444 !alternatives.every(
445 (alternative) => isJsonSchemaNode(alternative) && alternative.type === "object",
446 )
447 ) {
448 return node;
449 }
450 const {
451 properties: _shared,
452 required,
453 type: _type,
454 additionalProperties: _closed,
455 ...rest
456 } = node;
457 const sharedRequired = Array.isArray(required) ? required : [];
458 return {
459 ...rest,
460 [alternativesKey]: alternatives.map((alternative) => {
461 const branch = alternative as JsonSchemaNode;
462 const branchProperties = isJsonSchemaNode(branch.properties) ? branch.properties : {};
463 const branchRequired = Array.isArray(branch.required) ? branch.required : [];
464 return {
465 ...branch,
466 properties: { ...properties, ...branchProperties },
467 required: [...new Set([...sharedRequired, ...branchRequired])],
468 };
469 }),
470 };
471}
472
390473// Codex 0.153 adds async questions to agent messages. Keep older protocol
391474// fields until the next full refresh, including every thread history namespace.
392475function addAsyncQuestionFields(value: Schema.Json): Schema.Json {
......@@ -649,7 +732,7 @@ function rewriteExternalRefs(
649732 const definitionName = child.slice("#/definitions/".length);
650733 const localRewrite = localDefinitionNames.get(definitionName);
651734 if (localRewrite) {
652 return [key, `#/definitions/${localRewrite}`];
735 return [key, `#/components/schemas/${localRewrite}`];
653736 }
654737
655738 const candidates = [
......@@ -670,7 +753,7 @@ function rewriteExternalRefs(
670753 throw new Error(`Missing rewritten definition for ref: ${child}`);
671754 }
672755
673 return [key, `#/definitions/${rewritten}`];
756 return [key, `#/components/schemas/${rewritten}`];
674757 }
675758
676759 return [
......@@ -761,7 +844,7 @@ const generateFiles = Effect.fn("generateFiles")(function* () {
761844 for (const [name, schema] of Object.entries(aggregateSchemas).toSorted(([left], [right]) =>
762845 left.localeCompare(right),
763846 )) {
764 aggregateSchemas[name] = addAsyncQuestionFields(schema);
847 aggregateSchemas[name] = adaptSchemaForEffect(addAsyncQuestionFields(schema));
765848 generator.addSchema(name, aggregateSchemas[name] as never);
766849 }
767850
packages/effect-codex-app-server/src/_generated/schema.gen.ts+20426-19038
......@@ -3,6 +3,11 @@
33
44import * as Schema from "effect/Schema";
55
6export type ApplyPatchApprovalParams__ThreadId = string;
7export const ApplyPatchApprovalParams__ThreadId = Schema.String.annotate({
8 identifier: "ApplyPatchApprovalParams__ThreadId",
9});
10
611export type ApplyPatchApprovalParams__FileChange =
712 | { readonly content: string; readonly type: "add" }
813 | { readonly content: string; readonly type: "delete" }
......@@ -24,143 +29,80 @@ export const ApplyPatchApprovalParams__FileChange = Schema.Union(
2429 }).annotate({ title: "UpdateFileChange" }),
2530 ],
2631 { mode: "oneOf" },
27);
28
29export type ApplyPatchApprovalParams__ThreadId = string;
30export const ApplyPatchApprovalParams__ThreadId = Schema.String;
32).annotate({ identifier: "ApplyPatchApprovalParams__FileChange" });
3133
3234export type ApplyPatchApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";
3335export const ApplyPatchApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([
3436 "allow",
3537 "deny",
36]);
38]).annotate({ identifier: "ApplyPatchApprovalResponse__NetworkPolicyRuleAction" });
3739
3840export type ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason = "unauthorized";
39export const ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason =
40 Schema.Literal("unauthorized");
41
42export type ClientRequest__AbsolutePathBuf = string;
43export const ClientRequest__AbsolutePathBuf = Schema.String.annotate({
44 description:
45 "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.",
46});
47
48export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit";
49export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals(["credits", "usage_limit"]);
50
51export type ClientRequest__AdditionalContextKind = "untrusted" | "application";
52export const ClientRequest__AdditionalContextKind = Schema.Literals(["untrusted", "application"]);
53
54export type ClientRequest__AgentMessageInputContent =
55 | { readonly text: string; readonly type: "input_text" }
56 | { readonly encrypted_content: string; readonly type: "encrypted_content" };
57export const ClientRequest__AgentMessageInputContent = Schema.Union(
41export const ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason = Schema.Union(
5842 [
59 Schema.Struct({
60 text: Schema.String,
61 type: Schema.Literal("input_text").annotate({
62 title: "InputTextAgentMessageInputContentType",
63 }),
64 }).annotate({ title: "InputTextAgentMessageInputContent" }),
65 Schema.Struct({
66 encrypted_content: Schema.String,
67 type: Schema.Literal("encrypted_content").annotate({
68 title: "EncryptedContentAgentMessageInputContentType",
69 }),
70 }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
43 Schema.Literal("unauthorized").annotate({
44 description: "Codex attempted a backend request and received `401 Unauthorized`.",
45 }),
7146 ],
7247 { mode: "oneOf" },
73);
48).annotate({ identifier: "ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason" });
7449
75export type ClientRequest__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
76export const ClientRequest__ApprovalsReviewer = Schema.Literals([
77 "user",
78 "auto_review",
79 "guardian_subagent",
80]).annotate({
81 description:
82 "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.",
83});
50export type ClientRequest__RequestId = string | number;
51export const ClientRequest__RequestId = Schema.Union([
52 Schema.String,
53 Schema.Number.annotate({ format: "int64" }).check(
54 Schema.isInt().annotate({ expected: "an integer" }),
55 ),
56]).annotate({ identifier: "ClientRequest__RequestId" });
8457
85export type ClientRequest__AppsInstalledParams = {
86 readonly forceRefresh?: boolean;
87 readonly threadId?: string | null;
58export type ClientRequest__InitializeCapabilities = {
59 readonly experimentalApi?: boolean;
60 readonly mcpServerOpenaiFormElicitation?: boolean;
61 readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
62 readonly requestAttestation?: boolean;
8863};
89export const ClientRequest__AppsInstalledParams = Schema.Struct({
90 forceRefresh: Schema.optionalKey(
64export const ClientRequest__InitializeCapabilities = Schema.Struct({
65 experimentalApi: Schema.optionalKey(
9166 Schema.Boolean.annotate({
92 description:
93 "When true and Apps are permitted, refresh and publish the hosted connector runtime tool snapshot first.",
67 description: "Opt into receiving experimental API methods and fields.",
68 default: false,
9469 }),
9570 ),
96 threadId: Schema.optionalKey(
97 Schema.Union([
98 Schema.String.annotate({
99 description: "Optional loaded thread id used to evaluate effective app configuration.",
100 }),
101 Schema.Null,
102 ]),
103 ),
104}).annotate({ description: "Read the committed installed connector runtime snapshot." });
105
106export type ClientRequest__AppsListParams = {
107 readonly cursor?: string | null;
108 readonly forceRefetch?: boolean;
109 readonly limit?: number | null;
110 readonly threadId?: string | null;
111};
112export const ClientRequest__AppsListParams = Schema.Struct({
113 cursor: Schema.optionalKey(
114 Schema.Union([
115 Schema.String.annotate({
116 description: "Opaque pagination cursor returned by a previous call.",
117 }),
118 Schema.Null,
119 ]),
120 ),
121 forceRefetch: Schema.optionalKey(
71 mcpServerOpenaiFormElicitation: Schema.optionalKey(
12272 Schema.Boolean.annotate({
123 description: "When true, bypass app caches and fetch the latest data from sources.",
73 description: "Allow downstream MCP servers to request OpenAI extended form elicitations.",
12474 }),
12575 ),
126 limit: Schema.optionalKey(
127 Schema.Union([
128 Schema.Number.annotate({
129 description: "Optional page size; defaults to a reasonable server-side value.",
130 format: "uint32",
131 })
132 .check(Schema.isInt())
133 .check(Schema.isGreaterThanOrEqualTo(0)),
134 Schema.Null,
135 ]),
136 ),
137 threadId: Schema.optionalKey(
76 optOutNotificationMethods: Schema.optionalKey(
13877 Schema.Union([
139 Schema.String.annotate({
78 Schema.Array(Schema.String).annotate({
14079 description:
141 "Optional thread id used to evaluate app feature gating from that thread's config.",
80 "Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
14281 }),
14382 Schema.Null,
14483 ]),
14584 ),
146}).annotate({ description: "EXPERIMENTAL - list available apps/connectors." });
147
148export type ClientRequest__AppsReadParams = {
149 readonly appIds: ReadonlyArray<string>;
150 readonly includeTools?: boolean;
151};
152export const ClientRequest__AppsReadParams = Schema.Struct({
153 appIds: Schema.Array(Schema.String).annotate({
154 description:
155 "App ids to read. The server accepts at most 100 ids and deduplicates repeated ids while preserving their first-request order.",
156 }),
157 includeTools: Schema.optionalKey(
85 requestAttestation: Schema.optionalKey(
15886 Schema.Boolean.annotate({
159 description:
160 "When true, include display-only public tool summaries in the returned metadata.",
87 description: "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.",
88 default: false,
16189 }),
16290 ),
163}).annotate({ description: "EXPERIMENTAL - read metadata for specific apps/connectors." });
91}).annotate({
92 description: "Client-declared capabilities negotiated during initialize.",
93 identifier: "ClientRequest__InitializeCapabilities",
94});
95
96export type ClientRequest__ClientInfo = {
97 readonly name: string;
98 readonly title?: string | null;
99 readonly version: string;
100};
101export const ClientRequest__ClientInfo = Schema.Struct({
102 name: Schema.String,
103 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
104 version: Schema.String,
105}).annotate({ identifier: "ClientRequest__ClientInfo" });
164106
165107export type ClientRequest__AskForApproval =
166108 | "untrusted"
......@@ -189,182 +131,229 @@ export const ClientRequest__AskForApproval = Schema.Union(
189131 }).annotate({ title: "GranularAskForApproval" }),
190132 ],
191133 { mode: "oneOf" },
192);
134).annotate({ identifier: "ClientRequest__AskForApproval" });
193135
194export type ClientRequest__CancelLoginAccountParams = { readonly loginId: string };
195export const ClientRequest__CancelLoginAccountParams = Schema.Struct({ loginId: Schema.String });
136export type ClientRequest__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
137export const ClientRequest__ApprovalsReviewer = Schema.Literals([
138 "user",
139 "auto_review",
140 "guardian_subagent",
141]).annotate({
142 description:
143 "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.",
144 identifier: "ClientRequest__ApprovalsReviewer",
145});
196146
197export type ClientRequest__ClientInfo = {
147export type ClientRequest__Personality = "none" | "friendly" | "pragmatic";
148export const ClientRequest__Personality = Schema.Literals([
149 "none",
150 "friendly",
151 "pragmatic",
152]).annotate({ identifier: "ClientRequest__Personality" });
153
154export type ClientRequest__SandboxMode = "read-only" | "workspace-write" | "danger-full-access";
155export const ClientRequest__SandboxMode = Schema.Literals([
156 "read-only",
157 "workspace-write",
158 "danger-full-access",
159]).annotate({ identifier: "ClientRequest__SandboxMode" });
160
161export type ClientRequest__ThreadStartSource = "startup" | "clear";
162export const ClientRequest__ThreadStartSource = Schema.Literals(["startup", "clear"]).annotate({
163 identifier: "ClientRequest__ThreadStartSource",
164});
165
166export type ClientRequest__ThreadSource = string;
167export const ClientRequest__ThreadSource = Schema.String.annotate({
168 identifier: "ClientRequest__ThreadSource",
169});
170
171export type ClientRequest__ThreadArchiveParams = { readonly threadId: string };
172export const ClientRequest__ThreadArchiveParams = Schema.Struct({
173 threadId: Schema.String,
174}).annotate({ identifier: "ClientRequest__ThreadArchiveParams" });
175
176export type ClientRequest__ThreadDeleteParams = { readonly threadId: string };
177export const ClientRequest__ThreadDeleteParams = Schema.Struct({
178 threadId: Schema.String,
179}).annotate({ identifier: "ClientRequest__ThreadDeleteParams" });
180
181export type ClientRequest__ThreadUnsubscribeParams = { readonly threadId: string };
182export const ClientRequest__ThreadUnsubscribeParams = Schema.Struct({
183 threadId: Schema.String,
184}).annotate({ identifier: "ClientRequest__ThreadUnsubscribeParams" });
185
186export type ClientRequest__ThreadSetNameParams = {
198187 readonly name: string;
199 readonly title?: string | null;
200 readonly version: string;
188 readonly threadId: string;
201189};
202export const ClientRequest__ClientInfo = Schema.Struct({
190export const ClientRequest__ThreadSetNameParams = Schema.Struct({
203191 name: Schema.String,
204 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
205 version: Schema.String,
206});
192 threadId: Schema.String,
193}).annotate({ identifier: "ClientRequest__ThreadSetNameParams" });
207194
208export type ClientRequest__CommandExecResizeParams = {
209 readonly processId: string;
210 readonly size: { readonly cols: number; readonly rows: number };
211};
212export const ClientRequest__CommandExecResizeParams = Schema.Struct({
213 processId: Schema.String.annotate({
214 description:
215 "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
216 }),
217 size: Schema.Struct({
218 cols: Schema.Number.annotate({
219 description: "Terminal width in character cells.",
220 format: "uint16",
221 })
222 .check(Schema.isInt())
223 .check(Schema.isGreaterThanOrEqualTo(0)),
224 rows: Schema.Number.annotate({
225 description: "Terminal height in character cells.",
226 format: "uint16",
227 })
228 .check(Schema.isInt())
229 .check(Schema.isGreaterThanOrEqualTo(0)),
230 }).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." }),
231}).annotate({ description: "Resize a running PTY-backed `command/exec` session." });
195export type ClientRequest__ThreadGoalStatus =
196 | "active"
197 | "paused"
198 | "blocked"
199 | "usageLimited"
200 | "budgetLimited"
201 | "complete";
202export const ClientRequest__ThreadGoalStatus = Schema.Literals([
203 "active",
204 "paused",
205 "blocked",
206 "usageLimited",
207 "budgetLimited",
208 "complete",
209]).annotate({ identifier: "ClientRequest__ThreadGoalStatus" });
232210
233export type ClientRequest__CommandExecTerminalSize = {
234 readonly cols: number;
235 readonly rows: number;
236};
237export const ClientRequest__CommandExecTerminalSize = Schema.Struct({
238 cols: Schema.Number.annotate({
239 description: "Terminal width in character cells.",
240 format: "uint16",
241 })
242 .check(Schema.isInt())
243 .check(Schema.isGreaterThanOrEqualTo(0)),
244 rows: Schema.Number.annotate({
245 description: "Terminal height in character cells.",
246 format: "uint16",
247 })
248 .check(Schema.isInt())
249 .check(Schema.isGreaterThanOrEqualTo(0)),
250}).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." });
211export type ClientRequest__ThreadGoalGetParams = { readonly threadId: string };
212export const ClientRequest__ThreadGoalGetParams = Schema.Struct({
213 threadId: Schema.String,
214}).annotate({ identifier: "ClientRequest__ThreadGoalGetParams" });
251215
252export type ClientRequest__CommandExecTerminateParams = { readonly processId: string };
253export const ClientRequest__CommandExecTerminateParams = Schema.Struct({
254 processId: Schema.String.annotate({
255 description:
256 "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
257 }),
258}).annotate({ description: "Terminate a running `command/exec` session." });
216export type ClientRequest__ThreadGoalClearParams = { readonly threadId: string };
217export const ClientRequest__ThreadGoalClearParams = Schema.Struct({
218 threadId: Schema.String,
219}).annotate({ identifier: "ClientRequest__ThreadGoalClearParams" });
259220
260export type ClientRequest__CommandExecWriteParams = {
261 readonly closeStdin?: boolean;
262 readonly deltaBase64?: string | null;
263 readonly processId: string;
221export type ClientRequest__ThreadMetadataGitInfoUpdateParams = {
222 readonly branch?: string | null;
223 readonly originUrl?: string | null;
224 readonly sha?: string | null;
264225};
265export const ClientRequest__CommandExecWriteParams = Schema.Struct({
266 closeStdin: Schema.optionalKey(
267 Schema.Boolean.annotate({
268 description: "Close stdin after writing `deltaBase64`, if present.",
269 }),
270 ),
271 deltaBase64: Schema.optionalKey(
226export const ClientRequest__ThreadMetadataGitInfoUpdateParams = Schema.Struct({
227 branch: Schema.optionalKey(
272228 Schema.Union([
273 Schema.String.annotate({ description: "Optional base64-encoded stdin bytes to write." }),
229 Schema.String.annotate({
230 description:
231 "Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
232 }),
274233 Schema.Null,
275234 ]),
276235 ),
277 processId: Schema.String.annotate({
278 description:
279 "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
280 }),
281}).annotate({
282 description: "Write stdin bytes to a running `command/exec` session, close stdin, or both.",
283});
284
285export type ClientRequest__CommandMigration = { readonly name: string };
286export const ClientRequest__CommandMigration = Schema.Struct({ name: Schema.String });
287
288export type ClientRequest__ConfigReadParams = {
289 readonly cwd?: string | null;
290 readonly includeLayers?: boolean;
291};
292export const ClientRequest__ConfigReadParams = Schema.Struct({
293 cwd: Schema.optionalKey(
236 originUrl: Schema.optionalKey(
294237 Schema.Union([
295238 Schema.String.annotate({
296239 description:
297 "Optional working directory to resolve project config layers. If specified, return the effective config as seen from that directory (i.e., including any project layers between `cwd` and the project/repo root).",
240 "Omit to leave the stored origin URL unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
298241 }),
299242 Schema.Null,
300243 ]),
301244 ),
302 includeLayers: Schema.optionalKey(Schema.Boolean),
303});
304
305export type ClientRequest__ConsumeAccountRateLimitResetCreditParams = {
306 readonly creditId?: string | null;
307 readonly idempotencyKey: string;
308};
309export const ClientRequest__ConsumeAccountRateLimitResetCreditParams = Schema.Struct({
310 creditId: Schema.optionalKey(
245 sha: Schema.optionalKey(
311246 Schema.Union([
312247 Schema.String.annotate({
313248 description:
314 "Opaque reset-credit identifier to redeem. When omitted, the backend selects the next available credit.",
249 "Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
315250 }),
316251 Schema.Null,
317252 ]),
318253 ),
319 idempotencyKey: Schema.String.annotate({
254}).annotate({ identifier: "ClientRequest__ThreadMetadataGitInfoUpdateParams" });
255
256export type ClientRequest__ThreadUnarchiveParams = { readonly threadId: string };
257export const ClientRequest__ThreadUnarchiveParams = Schema.Struct({
258 threadId: Schema.String,
259}).annotate({ identifier: "ClientRequest__ThreadUnarchiveParams" });
260
261export type ClientRequest__ThreadCompactStartParams = { readonly threadId: string };
262export const ClientRequest__ThreadCompactStartParams = Schema.Struct({
263 threadId: Schema.String,
264}).annotate({ identifier: "ClientRequest__ThreadCompactStartParams" });
265
266export type ClientRequest__ThreadShellCommandParams = {
267 readonly command: string;
268 readonly threadId: string;
269};
270export const ClientRequest__ThreadShellCommandParams = Schema.Struct({
271 command: Schema.String.annotate({
320272 description:
321 "Identifies one logical reset attempt. A UUID is recommended; reuse the same value when retrying that attempt.",
273 "Shell command string evaluated by the thread's configured shell. Unlike `command/exec`, this intentionally preserves shell syntax such as pipes, redirects, and quoting. This runs unsandboxed with full access rather than inheriting the thread sandbox policy.",
322274 }),
323});
324
325export type ClientRequest__ConversationTextRole = "user" | "developer" | "assistant";
326export const ClientRequest__ConversationTextRole = Schema.Literals([
327 "user",
328 "developer",
329 "assistant",
330]);
275 threadId: Schema.String,
276}).annotate({ identifier: "ClientRequest__ThreadShellCommandParams" });
331277
332export type ClientRequest__DynamicToolNamespaceTool = {
333 readonly deferLoading?: boolean;
334 readonly description: string;
335 readonly inputSchema: unknown;
336 readonly name: string;
337 readonly type: "function";
278export type ClientRequest__ThreadApproveGuardianDeniedActionParams = {
279 readonly event: Schema.Json;
280 readonly threadId: string;
338281};
339export const ClientRequest__DynamicToolNamespaceTool = Schema.Union(
340 [
341 Schema.Struct({
342 deferLoading: Schema.optionalKey(Schema.Boolean),
343 description: Schema.String,
344 inputSchema: Schema.Unknown,
345 name: Schema.String,
346 type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolNamespaceToolType" }),
347 }).annotate({ title: "FunctionDynamicToolNamespaceTool" }),
348 ],
349 { mode: "oneOf" },
350);
282export const ClientRequest__ThreadApproveGuardianDeniedActionParams = Schema.Struct({
283 event: Schema.Json.annotate({
284 expected: "JSON value",
285 description: "Serialized `codex_protocol::protocol::GuardianAssessmentEvent`.",
286 }),
287 threadId: Schema.String,
288}).annotate({ identifier: "ClientRequest__ThreadApproveGuardianDeniedActionParams" });
351289
352export type ClientRequest__ExperimentalFeatureEnablementSetParams = {
353 readonly enablement: { readonly [x: string]: boolean };
290export type ClientRequest__ThreadRollbackParams = {
291 readonly numTurns: number;
292 readonly threadId: string;
354293};
355export const ClientRequest__ExperimentalFeatureEnablementSetParams = Schema.Struct({
356 enablement: Schema.Record(Schema.String, Schema.Boolean).annotate({
294export const ClientRequest__ThreadRollbackParams = Schema.Struct({
295 numTurns: Schema.Number.annotate({
357296 description:
358 "Process-wide runtime feature enablement keyed by canonical feature name.\n\nOnly named features are updated. Omitted features are left unchanged. Send an empty map for a no-op.",
359 }),
297 "The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.",
298 format: "uint32",
299 })
300 .check(Schema.isInt().annotate({ expected: "an integer" }))
301 .check(
302 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
303 ),
304 threadId: Schema.String,
305}).annotate({
306 description: "DEPRECATED: `thread/rollback` will be removed soon.",
307 identifier: "ClientRequest__ThreadRollbackParams",
360308});
361309
362export type ClientRequest__ExperimentalFeatureListParams = {
310export type ClientRequest__ThreadListCwdFilter = string | ReadonlyArray<string>;
311export const ClientRequest__ThreadListCwdFilter = Schema.Union([
312 Schema.String,
313 Schema.Array(Schema.String),
314]).annotate({ identifier: "ClientRequest__ThreadListCwdFilter" });
315
316export type ClientRequest__SortDirection = "asc" | "desc";
317export const ClientRequest__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
318 identifier: "ClientRequest__SortDirection",
319});
320
321export type ClientRequest__ThreadSortKey = "created_at" | "updated_at" | "recency_at";
322export const ClientRequest__ThreadSortKey = Schema.Literals([
323 "created_at",
324 "updated_at",
325 "recency_at",
326]).annotate({ identifier: "ClientRequest__ThreadSortKey" });
327
328export type ClientRequest__ThreadSourceKind =
329 | "cli"
330 | "vscode"
331 | "exec"
332 | "appServer"
333 | "subAgent"
334 | "subAgentReview"
335 | "subAgentCompact"
336 | "subAgentThreadSpawn"
337 | "subAgentOther"
338 | "unknown";
339export const ClientRequest__ThreadSourceKind = Schema.Literals([
340 "cli",
341 "vscode",
342 "exec",
343 "appServer",
344 "subAgent",
345 "subAgentReview",
346 "subAgentCompact",
347 "subAgentThreadSpawn",
348 "subAgentOther",
349 "unknown",
350]).annotate({ identifier: "ClientRequest__ThreadSourceKind" });
351
352export type ClientRequest__ThreadLoadedListParams = {
363353 readonly cursor?: string | null;
364354 readonly limit?: number | null;
365 readonly threadId?: string | null;
366355};
367export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({
356export const ClientRequest__ThreadLoadedListParams = Schema.Struct({
368357 cursor: Schema.optionalKey(
369358 Schema.Union([
370359 Schema.String.annotate({
......@@ -376,439 +365,385 @@ export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({
376365 limit: Schema.optionalKey(
377366 Schema.Union([
378367 Schema.Number.annotate({
379 description: "Optional page size; defaults to a reasonable server-side value.",
368 description: "Optional page size; defaults to no limit.",
380369 format: "uint32",
381370 })
382 .check(Schema.isInt())
383 .check(Schema.isGreaterThanOrEqualTo(0)),
384 Schema.Null,
385 ]),
386 ),
387 threadId: Schema.optionalKey(
388 Schema.Union([
389 Schema.String.annotate({
390 description:
391 "Optional loaded thread id. Pass this when showing feature state for an existing thread so enablement is computed from that thread's refreshed config, including project-local config for the thread's cwd.",
392 }),
371 .check(Schema.isInt().annotate({ expected: "an integer" }))
372 .check(
373 Schema.isGreaterThanOrEqualTo(0).annotate({
374 expected: "a value greater than or equal to 0",
375 }),
376 ),
393377 Schema.Null,
394378 ]),
395379 ),
396});
380}).annotate({ identifier: "ClientRequest__ThreadLoadedListParams" });
397381
398export type ClientRequest__ExternalAgentConfigDetectParams = {
399 readonly cwds?: ReadonlyArray<string> | null;
400 readonly includeHome?: boolean;
401 readonly migrationSource?: string | null;
402 readonly source?: string | null;
382export type ClientRequest__ThreadReadParams = {
383 readonly includeTurns?: boolean;
384 readonly threadId: string;
403385};
404export const ClientRequest__ExternalAgentConfigDetectParams = Schema.Struct({
405 cwds: Schema.optionalKey(
406 Schema.Union([
407 Schema.Array(Schema.String).annotate({
408 description: "Zero or more working directories to include for repo-scoped detection.",
409 }),
410 Schema.Null,
411 ]),
412 ),
413 includeHome: Schema.optionalKey(
386export const ClientRequest__ThreadReadParams = Schema.Struct({
387 includeTurns: Schema.optionalKey(
414388 Schema.Boolean.annotate({
415 description: "If true, include detection under the user's home directory.",
389 description: "When true, include turns and their items from rollout history.",
416390 }),
417391 ),
418 migrationSource: Schema.optionalKey(
419 Schema.Union([
420 Schema.String.annotate({
421 description:
422 "Optional migration-source selector. Missing or unrecognized values use the default source.",
423 }),
424 Schema.Null,
425 ]),
426 ),
427 source: Schema.optionalKey(
428 Schema.Union([
429 Schema.String.annotate({
430 description:
431 "Deprecated field retained for compatibility. This field is ignored; use `migrationSource` to select the migration source.",
432 }),
433 Schema.Null,
434 ]),
435 ),
436});
437
438export type ClientRequest__ExternalAgentConfigMigrationItemType =
439 | "AGENTS_MD"
440 | "CONFIG"
441 | "SKILLS"
442 | "PLUGINS"
443 | "MCP_SERVER_CONFIG"
444 | "SUBAGENTS"
445 | "HOOKS"
446 | "COMMANDS"
447 | "MEMORY"
448 | "SESSIONS";
449export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Literals([
450 "AGENTS_MD",
451 "CONFIG",
452 "SKILLS",
453 "PLUGINS",
454 "MCP_SERVER_CONFIG",
455 "SUBAGENTS",
456 "HOOKS",
457 "COMMANDS",
458 "MEMORY",
459 "SESSIONS",
460]);
392 threadId: Schema.String,
393}).annotate({ identifier: "ClientRequest__ThreadReadParams" });
461394
462export type ClientRequest__FeedbackUploadParams = {
463 readonly classification: string;
464 readonly extraLogFiles?: ReadonlyArray<string> | null;
465 readonly includeLogs?: boolean;
466 readonly reason?: string | null;
467 readonly tags?: { readonly [x: string]: string } | null;
468 readonly threadId?: string | null;
395export type ClientRequest__ThreadInjectItemsParams = {
396 readonly items: ReadonlyArray<Schema.Json>;
397 readonly threadId: string;
469398};
470export const ClientRequest__FeedbackUploadParams = Schema.Struct({
471 classification: Schema.String,
472 extraLogFiles: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
473 includeLogs: Schema.optionalKey(Schema.Boolean),
474 reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
475 tags: Schema.optionalKey(
476 Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
477 ),
478 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
479});
399export const ClientRequest__ThreadInjectItemsParams = Schema.Struct({
400 items: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
401 description: "Raw Responses API items to append to the thread's model-visible history.",
402 }),
403 threadId: Schema.String,
404}).annotate({ identifier: "ClientRequest__ThreadInjectItemsParams" });
480405
481export type ClientRequest__FsCopyParams = {
482 readonly destinationPath: string;
483 readonly recursive?: boolean;
484 readonly sourcePath: string;
406export type ClientRequest__SkillsListParams = {
407 readonly cwds?: ReadonlyArray<string>;
408 readonly forceReload?: boolean;
485409};
486export const ClientRequest__FsCopyParams = Schema.Struct({
487 destinationPath: Schema.String.annotate({
488 description:
489 "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.",
490 }),
491 recursive: Schema.optionalKey(
410export const ClientRequest__SkillsListParams = Schema.Struct({
411 cwds: Schema.optionalKey(
412 Schema.Array(Schema.String).annotate({
413 description: "When empty, defaults to the current session working directory.",
414 }),
415 ),
416 forceReload: Schema.optionalKey(
492417 Schema.Boolean.annotate({
493 description: "Required for directory copies; ignored for file copies.",
418 description: "When true, bypass the skills cache and re-scan skills from disk.",
494419 }),
495420 ),
496 sourcePath: Schema.String.annotate({
497 description:
498 "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.",
499 }),
500}).annotate({ description: "Copy a file or directory tree on the host filesystem." });
421}).annotate({ identifier: "ClientRequest__SkillsListParams" });
501422
502export type ClientRequest__FsCreateDirectoryParams = {
503 readonly path: string;
504 readonly recursive?: boolean | null;
505};
506export const ClientRequest__FsCreateDirectoryParams = Schema.Struct({
507 path: Schema.String.annotate({
508 description:
509 "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.",
510 }),
511 recursive: Schema.optionalKey(
512 Schema.Union([
513 Schema.Boolean.annotate({
514 description: "Whether parent directories should also be created. Defaults to `true`.",
515 }),
516 Schema.Null,
517 ]),
423export type ClientRequest__AbsolutePathBuf = string;
424export const ClientRequest__AbsolutePathBuf = Schema.String.annotate({
425 description:
426 "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.",
427 identifier: "ClientRequest__AbsolutePathBuf",
428});
429
430export type ClientRequest__HooksListParams = { readonly cwds?: ReadonlyArray<string> };
431export const ClientRequest__HooksListParams = Schema.Struct({
432 cwds: Schema.optionalKey(
433 Schema.Array(Schema.String).annotate({
434 description: "When empty, defaults to the current session working directory.",
435 }),
518436 ),
519}).annotate({ description: "Create a directory on the host filesystem." });
437}).annotate({ identifier: "ClientRequest__HooksListParams" });
520438
521export type ClientRequest__FsGetMetadataParams = { readonly path: string };
522export const ClientRequest__FsGetMetadataParams = Schema.Struct({
523 path: Schema.String.annotate({
524 description:
525 "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.",
526 }),
527}).annotate({ description: "Request metadata for an absolute path." });
439export type ClientRequest__MarketplaceAddParams = {
440 readonly refName?: string | null;
441 readonly source: string;
442 readonly sparsePaths?: ReadonlyArray<string> | null;
443};
444export const ClientRequest__MarketplaceAddParams = Schema.Struct({
445 refName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
446 source: Schema.String,
447 sparsePaths: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
448}).annotate({ identifier: "ClientRequest__MarketplaceAddParams" });
528449
529export type ClientRequest__FsReadDirectoryParams = { readonly path: string };
530export const ClientRequest__FsReadDirectoryParams = Schema.Struct({
531 path: Schema.String.annotate({
532 description:
533 "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.",
534 }),
535}).annotate({ description: "List direct child names for a directory." });
450export type ClientRequest__MarketplaceRemoveParams = { readonly marketplaceName: string };
451export const ClientRequest__MarketplaceRemoveParams = Schema.Struct({
452 marketplaceName: Schema.String,
453}).annotate({ identifier: "ClientRequest__MarketplaceRemoveParams" });
536454
537export type ClientRequest__FsReadFileParams = { readonly path: string };
538export const ClientRequest__FsReadFileParams = Schema.Struct({
539 path: Schema.String.annotate({
540 description:
541 "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.",
542 }),
543}).annotate({ description: "Read a file from the host filesystem." });
455export type ClientRequest__MarketplaceUpgradeParams = { readonly marketplaceName?: string | null };
456export const ClientRequest__MarketplaceUpgradeParams = Schema.Struct({
457 marketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
458}).annotate({ identifier: "ClientRequest__MarketplaceUpgradeParams" });
544459
545export type ClientRequest__FsRemoveParams = {
546 readonly force?: boolean | null;
547 readonly path: string;
548 readonly recursive?: boolean | null;
460export type ClientRequest__PluginListMarketplaceKind =
461 | "local"
462 | "vertical"
463 | "workspace-directory"
464 | "shared-with-me"
465 | "created-by-me-remote";
466export const ClientRequest__PluginListMarketplaceKind = Schema.Literals([
467 "local",
468 "vertical",
469 "workspace-directory",
470 "shared-with-me",
471 "created-by-me-remote",
472]).annotate({ identifier: "ClientRequest__PluginListMarketplaceKind" });
473
474export type ClientRequest__PluginSkillReadParams = {
475 readonly remoteMarketplaceName: string;
476 readonly remotePluginId: string;
477 readonly skillName: string;
549478};
550export const ClientRequest__FsRemoveParams = Schema.Struct({
551 force: Schema.optionalKey(
552 Schema.Union([
553 Schema.Boolean.annotate({
554 description: "Whether missing paths should be ignored. Defaults to `true`.",
555 }),
556 Schema.Null,
557 ]),
558 ),
559 path: Schema.String.annotate({
560 description:
561 "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.",
562 }),
563 recursive: Schema.optionalKey(
564 Schema.Union([
565 Schema.Boolean.annotate({
566 description: "Whether directory removal should recurse. Defaults to `true`.",
567 }),
568 Schema.Null,
569 ]),
570 ),
571}).annotate({ description: "Remove a file or directory tree from the host filesystem." });
479export const ClientRequest__PluginSkillReadParams = Schema.Struct({
480 remoteMarketplaceName: Schema.String,
481 remotePluginId: Schema.String,
482 skillName: Schema.String,
483}).annotate({ identifier: "ClientRequest__PluginSkillReadParams" });
572484
573export type ClientRequest__FsUnwatchParams = { readonly watchId: string };
574export const ClientRequest__FsUnwatchParams = Schema.Struct({
575 watchId: Schema.String.annotate({
576 description: "Watch identifier previously provided to `fs/watch`.",
577 }),
578}).annotate({ description: "Stop filesystem watch notifications for a prior `fs/watch`." });
485export type ClientRequest__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
486export const ClientRequest__PluginShareDiscoverability = Schema.Literals([
487 "LISTED",
488 "UNLISTED",
489 "PRIVATE",
490]).annotate({ identifier: "ClientRequest__PluginShareDiscoverability" });
579491
580export type ClientRequest__FsWatchParams = { readonly path: string; readonly watchId: string };
581export const ClientRequest__FsWatchParams = Schema.Struct({
582 path: Schema.String.annotate({
583 description:
584 "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.",
585 }),
586 watchId: Schema.String.annotate({
587 description: "Connection-scoped watch identifier used for `fs/unwatch` and `fs/changed`.",
588 }),
589}).annotate({ description: "Start filesystem watch notifications for an absolute path." });
492export type ClientRequest__PluginSharePrincipalType = "user" | "group" | "workspace";
493export const ClientRequest__PluginSharePrincipalType = Schema.Literals([
494 "user",
495 "group",
496 "workspace",
497]).annotate({ identifier: "ClientRequest__PluginSharePrincipalType" });
590498
591export type ClientRequest__FsWriteFileParams = {
592 readonly dataBase64: string;
593 readonly path: string;
499export type ClientRequest__PluginShareTargetRole = "reader" | "editor";
500export const ClientRequest__PluginShareTargetRole = Schema.Literals(["reader", "editor"]).annotate({
501 identifier: "ClientRequest__PluginShareTargetRole",
502});
503
504export type ClientRequest__PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE" | "LISTED";
505export const ClientRequest__PluginShareUpdateDiscoverability = Schema.Literals([
506 "UNLISTED",
507 "PRIVATE",
508 "LISTED",
509]).annotate({ identifier: "ClientRequest__PluginShareUpdateDiscoverability" });
510
511export type ClientRequest__PluginShareListParams = { readonly [x: string]: Schema.Json };
512export const ClientRequest__PluginShareListParams = Schema.Record(
513 Schema.String,
514 Schema.Json.annotate({ expected: "JSON value" }),
515).annotate({ identifier: "ClientRequest__PluginShareListParams" });
516
517export type ClientRequest__PluginShareCheckoutParams = { readonly remotePluginId: string };
518export const ClientRequest__PluginShareCheckoutParams = Schema.Struct({
519 remotePluginId: Schema.String,
520}).annotate({ identifier: "ClientRequest__PluginShareCheckoutParams" });
521
522export type ClientRequest__PluginShareDeleteParams = { readonly remotePluginId: string };
523export const ClientRequest__PluginShareDeleteParams = Schema.Struct({
524 remotePluginId: Schema.String,
525}).annotate({ identifier: "ClientRequest__PluginShareDeleteParams" });
526
527export type ClientRequest__AppsReadParams = {
528 readonly appIds: ReadonlyArray<string>;
529 readonly includeTools?: boolean;
594530};
595export const ClientRequest__FsWriteFileParams = Schema.Struct({
596 dataBase64: Schema.String.annotate({ description: "File contents encoded as base64." }),
597 path: Schema.String.annotate({
531export const ClientRequest__AppsReadParams = Schema.Struct({
532 appIds: Schema.Array(Schema.String).annotate({
598533 description:
599 "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.",
534 "App ids to read. The server accepts at most 100 ids and deduplicates repeated ids while preserving their first-request order.",
600535 }),
601}).annotate({ description: "Write a file on the host filesystem." });
602
603export type ClientRequest__FuzzyFileSearchParams = {
604 readonly cancellationToken?: string | null;
605 readonly query: string;
606 readonly roots: ReadonlyArray<string>;
607};
608export const ClientRequest__FuzzyFileSearchParams = Schema.Struct({
609 cancellationToken: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
610 query: Schema.String,
611 roots: Schema.Array(Schema.String),
612});
613
614export type ClientRequest__GetAccountParams = { readonly refreshToken?: boolean };
615export const ClientRequest__GetAccountParams = Schema.Struct({
616 refreshToken: Schema.optionalKey(
536 includeTools: Schema.optionalKey(
617537 Schema.Boolean.annotate({
618538 description:
619 "When `true`, requests a proactive token refresh before returning.\n\nIn managed auth mode this triggers the normal refresh-token flow. In external auth mode this flag is ignored. Clients should refresh tokens themselves and call `account/login/start` with `chatgptAuthTokens`.",
620 }),
621 ),
622});
623
624export type ClientRequest__HookMigration = { readonly name: string };
625export const ClientRequest__HookMigration = Schema.Struct({ name: Schema.String });
626
627export type ClientRequest__HooksListParams = { readonly cwds?: ReadonlyArray<string> };
628export const ClientRequest__HooksListParams = Schema.Struct({
629 cwds: Schema.optionalKey(
630 Schema.Array(Schema.String).annotate({
631 description: "When empty, defaults to the current session working directory.",
539 "When true, include display-only public tool summaries in the returned metadata.",
632540 }),
633541 ),
542}).annotate({
543 description: "EXPERIMENTAL - read metadata for specific apps/connectors.",
544 identifier: "ClientRequest__AppsReadParams",
634545});
635546
636export type ClientRequest__ImageDetail = "auto" | "low" | "high" | "original";
637export const ClientRequest__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
638
639export type ClientRequest__InitializeCapabilities = {
640 readonly experimentalApi?: boolean;
641 readonly mcpServerOpenaiFormElicitation?: boolean;
642 readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
643 readonly requestAttestation?: boolean;
547export type ClientRequest__AppsListParams = {
548 readonly cursor?: string | null;
549 readonly forceRefetch?: boolean;
550 readonly limit?: number | null;
551 readonly threadId?: string | null;
644552};
645export const ClientRequest__InitializeCapabilities = Schema.Struct({
646 experimentalApi: Schema.optionalKey(
647 Schema.Boolean.annotate({
648 description: "Opt into receiving experimental API methods and fields.",
649 default: false,
650 }),
553export const ClientRequest__AppsListParams = Schema.Struct({
554 cursor: Schema.optionalKey(
555 Schema.Union([
556 Schema.String.annotate({
557 description: "Opaque pagination cursor returned by a previous call.",
558 }),
559 Schema.Null,
560 ]),
651561 ),
652 mcpServerOpenaiFormElicitation: Schema.optionalKey(
562 forceRefetch: Schema.optionalKey(
653563 Schema.Boolean.annotate({
654 description: "Allow downstream MCP servers to request OpenAI extended form elicitations.",
564 description: "When true, bypass app caches and fetch the latest data from sources.",
655565 }),
656566 ),
657 optOutNotificationMethods: Schema.optionalKey(
567 limit: Schema.optionalKey(
658568 Schema.Union([
659 Schema.Array(Schema.String).annotate({
569 Schema.Number.annotate({
570 description: "Optional page size; defaults to a reasonable server-side value.",
571 format: "uint32",
572 })
573 .check(Schema.isInt().annotate({ expected: "an integer" }))
574 .check(
575 Schema.isGreaterThanOrEqualTo(0).annotate({
576 expected: "a value greater than or equal to 0",
577 }),
578 ),
579 Schema.Null,
580 ]),
581 ),
582 threadId: Schema.optionalKey(
583 Schema.Union([
584 Schema.String.annotate({
660585 description:
661 "Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
586 "Optional thread id used to evaluate app feature gating from that thread's config.",
662587 }),
663588 Schema.Null,
664589 ]),
665590 ),
666 requestAttestation: Schema.optionalKey(
591}).annotate({
592 description: "EXPERIMENTAL - list available apps/connectors.",
593 identifier: "ClientRequest__AppsListParams",
594});
595
596export type ClientRequest__AppsInstalledParams = {
597 readonly forceRefresh?: boolean;
598 readonly threadId?: string | null;
599};
600export const ClientRequest__AppsInstalledParams = Schema.Struct({
601 forceRefresh: Schema.optionalKey(
667602 Schema.Boolean.annotate({
668 description: "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.",
669 default: false,
603 description:
604 "When true and Apps are permitted, refresh and publish the hosted connector runtime tool snapshot first.",
670605 }),
671606 ),
672}).annotate({ description: "Client-declared capabilities negotiated during initialize." });
607 threadId: Schema.optionalKey(
608 Schema.Union([
609 Schema.String.annotate({
610 description: "Optional loaded thread id used to evaluate effective app configuration.",
611 }),
612 Schema.Null,
613 ]),
614 ),
615}).annotate({
616 description: "Read the committed installed connector runtime snapshot.",
617 identifier: "ClientRequest__AppsInstalledParams",
618});
673619
674export type ClientRequest__InternalChatMessageMetadataPassthrough = {
675 readonly turn_id?: string | null;
676};
677export const ClientRequest__InternalChatMessageMetadataPassthrough = Schema.Struct({
678 turn_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
620export type ClientRequest__FsUnwatchParams = { readonly watchId: string };
621export const ClientRequest__FsUnwatchParams = Schema.Struct({
622 watchId: Schema.String.annotate({
623 description: "Watch identifier previously provided to `fs/watch`.",
624 }),
679625}).annotate({
680 description:
681 "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.",
626 description: "Stop filesystem watch notifications for a prior `fs/watch`.",
627 identifier: "ClientRequest__FsUnwatchParams",
682628});
683629
684export type ClientRequest__LegacyAppPathString = string;
685export const ClientRequest__LegacyAppPathString = Schema.String;
630export type ClientRequest__PluginUninstallParams = { readonly pluginId: string };
631export const ClientRequest__PluginUninstallParams = Schema.Struct({
632 pluginId: Schema.String,
633}).annotate({ identifier: "ClientRequest__PluginUninstallParams" });
686634
687export type ClientRequest__LocalShellAction = {
688 readonly command: ReadonlyArray<string>;
689 readonly env?: { readonly [x: string]: string } | null;
690 readonly timeout_ms?: number | null;
691 readonly type: "exec";
692 readonly user?: string | null;
693 readonly working_directory?: string | null;
694};
695export const ClientRequest__LocalShellAction = Schema.Union(
696 [
697 Schema.Struct({
698 command: Schema.Array(Schema.String),
699 env: Schema.optionalKey(
700 Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
701 ),
702 timeout_ms: Schema.optionalKey(
703 Schema.Union([
704 Schema.Number.annotate({ format: "uint64" })
705 .check(Schema.isInt())
706 .check(Schema.isGreaterThanOrEqualTo(0)),
707 Schema.Null,
708 ]),
709 ),
710 type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
711 user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
712 working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
713 }).annotate({ title: "ExecLocalShellAction" }),
714 ],
715 { mode: "oneOf" },
635export type ClientRequest__ReasoningEffort = string;
636export const ClientRequest__ReasoningEffort = Schema.String.annotate({
637 description: "A non-empty reasoning effort value advertised by the model.",
638}).check(
639 Schema.isMinLength(1).annotate({
640 expected: "a value with a length of at least 1",
641 identifier: "ClientRequest__ReasoningEffort",
642 }),
716643);
717644
718export type ClientRequest__LocalShellStatus = "completed" | "in_progress" | "incomplete";
719export const ClientRequest__LocalShellStatus = Schema.Literals([
720 "completed",
721 "in_progress",
722 "incomplete",
723]);
724
725export type ClientRequest__LoginAppBrand = "codex" | "chatgpt";
726export const ClientRequest__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]);
727
728export type ClientRequest__MarketplaceAddParams = {
729 readonly refName?: string | null;
730 readonly source: string;
731 readonly sparsePaths?: ReadonlyArray<string> | null;
732};
733export const ClientRequest__MarketplaceAddParams = Schema.Struct({
734 refName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
735 source: Schema.String,
736 sparsePaths: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
737});
738
739export type ClientRequest__MarketplaceRemoveParams = { readonly marketplaceName: string };
740export const ClientRequest__MarketplaceRemoveParams = Schema.Struct({
741 marketplaceName: Schema.String,
742});
645export type ClientRequest__ByteRange = { readonly end: number; readonly start: number };
646export const ClientRequest__ByteRange = Schema.Struct({
647 end: Schema.Number.annotate({ format: "uint" })
648 .check(Schema.isInt().annotate({ expected: "an integer" }))
649 .check(
650 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
651 ),
652 start: Schema.Number.annotate({ format: "uint" })
653 .check(Schema.isInt().annotate({ expected: "an integer" }))
654 .check(
655 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
656 ),
657}).annotate({ identifier: "ClientRequest__ByteRange" });
743658
744export type ClientRequest__MarketplaceUpgradeParams = { readonly marketplaceName?: string | null };
745export const ClientRequest__MarketplaceUpgradeParams = Schema.Struct({
746 marketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
747});
659export type ClientRequest__ImageDetail = "auto" | "low" | "high" | "original";
660export const ClientRequest__ImageDetail = Schema.Literals([
661 "auto",
662 "low",
663 "high",
664 "original",
665]).annotate({ identifier: "ClientRequest__ImageDetail" });
748666
749export type ClientRequest__McpResourceReadParams = {
750 readonly server: string;
751 readonly threadId?: string | null;
752 readonly uri: string;
753};
754export const ClientRequest__McpResourceReadParams = Schema.Struct({
755 server: Schema.String,
756 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
757 uri: Schema.String,
667export type ClientRequest__NetworkAccess = "restricted" | "enabled";
668export const ClientRequest__NetworkAccess = Schema.Literals(["restricted", "enabled"]).annotate({
669 identifier: "ClientRequest__NetworkAccess",
758670});
759671
760export type ClientRequest__McpServerMigration = { readonly name: string };
761export const ClientRequest__McpServerMigration = Schema.Struct({ name: Schema.String });
762
763export type ClientRequest__McpServerOauthLoginParams = {
764 readonly name: string;
765 readonly scopes?: ReadonlyArray<string> | null;
766 readonly threadId?: string | null;
767 readonly timeoutSecs?: number | null;
768};
769export const ClientRequest__McpServerOauthLoginParams = Schema.Struct({
770 name: Schema.String,
771 scopes: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
772 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
773 timeoutSecs: Schema.optionalKey(
774 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
775 ),
672export type ClientRequest__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
673export const ClientRequest__ReasoningSummary = Schema.Union(
674 [
675 Schema.Literals(["auto", "concise", "detailed"]),
676 Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
677 ],
678 { mode: "oneOf" },
679).annotate({
680 description:
681 "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
682 identifier: "ClientRequest__ReasoningSummary",
776683});
777684
778export type ClientRequest__McpServerStatusDetail = "full" | "toolsAndAuthOnly";
779export const ClientRequest__McpServerStatusDetail = Schema.Literals(["full", "toolsAndAuthOnly"]);
780
781export type ClientRequest__McpServerToolCallParams = {
782 readonly _meta?: unknown;
783 readonly arguments?: unknown;
784 readonly server: string;
685export type ClientRequest__TurnInterruptParams = {
785686 readonly threadId: string;
786 readonly tool: string;
687 readonly turnId: string;
787688};
788export const ClientRequest__McpServerToolCallParams = Schema.Struct({
789 _meta: Schema.optionalKey(Schema.Unknown),
790 arguments: Schema.optionalKey(Schema.Unknown),
791 server: Schema.String,
689export const ClientRequest__TurnInterruptParams = Schema.Struct({
792690 threadId: Schema.String,
793 tool: Schema.String,
794});
795
796export type ClientRequest__MergeStrategy = "replace" | "upsert";
797export const ClientRequest__MergeStrategy = Schema.Literals(["replace", "upsert"]);
798
799export type ClientRequest__MessagePhase = "commentary" | "final_answer";
800export const ClientRequest__MessagePhase = Schema.Literals(["commentary", "final_answer"]).annotate(
801 {
802 description:
803 '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.',
804 },
805);
691 turnId: Schema.String,
692}).annotate({ identifier: "ClientRequest__TurnInterruptParams" });
806693
807export type ClientRequest__ModeKind = "plan" | "default";
808export const ClientRequest__ModeKind = Schema.Literals(["plan", "default"]).annotate({
809 description: "Initial collaboration mode to use when the TUI starts.",
694export type ClientRequest__ReviewDelivery = "inline" | "detached";
695export const ClientRequest__ReviewDelivery = Schema.Literals(["inline", "detached"]).annotate({
696 identifier: "ClientRequest__ReviewDelivery",
810697});
811698
699export type ClientRequest__ReviewTarget =
700 | { readonly type: "uncommittedChanges" }
701 | { readonly branch: string; readonly type: "baseBranch" }
702 | { readonly sha: string; readonly title?: string | null; readonly type: "commit" }
703 | { readonly instructions: string; readonly type: "custom" };
704export const ClientRequest__ReviewTarget = Schema.Union(
705 [
706 Schema.Struct({
707 type: Schema.Literal("uncommittedChanges").annotate({
708 title: "UncommittedChangesReviewTargetType",
709 }),
710 }).annotate({
711 title: "UncommittedChangesReviewTarget",
712 description: "Review the working tree: staged, unstaged, and untracked files.",
713 }),
714 Schema.Struct({
715 branch: Schema.String,
716 type: Schema.Literal("baseBranch").annotate({ title: "BaseBranchReviewTargetType" }),
717 }).annotate({
718 title: "BaseBranchReviewTarget",
719 description: "Review changes between the current branch and the given base branch.",
720 }),
721 Schema.Struct({
722 sha: Schema.String,
723 title: Schema.optionalKey(
724 Schema.Union([
725 Schema.String.annotate({
726 description: "Optional human-readable label (e.g., commit subject) for UIs.",
727 }),
728 Schema.Null,
729 ]),
730 ),
731 type: Schema.Literal("commit").annotate({ title: "CommitReviewTargetType" }),
732 }).annotate({
733 title: "CommitReviewTarget",
734 description: "Review the changes introduced by a specific commit.",
735 }),
736 Schema.Struct({
737 instructions: Schema.String,
738 type: Schema.Literal("custom").annotate({ title: "CustomReviewTargetType" }),
739 }).annotate({
740 title: "CustomReviewTarget",
741 description: "Arbitrary instructions, equivalent to the old free-form prompt.",
742 }),
743 ],
744 { mode: "oneOf" },
745).annotate({ identifier: "ClientRequest__ReviewTarget" });
746
812747export type ClientRequest__ModelListParams = {
813748 readonly cursor?: string | null;
814749 readonly includeHidden?: boolean | null;
......@@ -837,15 +772,64 @@ export const ClientRequest__ModelListParams = Schema.Struct({
837772 description: "Optional page size; defaults to a reasonable server-side value.",
838773 format: "uint32",
839774 })
840 .check(Schema.isInt())
841 .check(Schema.isGreaterThanOrEqualTo(0)),
775 .check(Schema.isInt().annotate({ expected: "an integer" }))
776 .check(
777 Schema.isGreaterThanOrEqualTo(0).annotate({
778 expected: "a value greater than or equal to 0",
779 }),
780 ),
842781 Schema.Null,
843782 ]),
844783 ),
845});
784}).annotate({ identifier: "ClientRequest__ModelListParams" });
785
786export type ClientRequest__ModelProviderCapabilitiesReadParams = {
787 readonly [x: string]: Schema.Json;
788};
789export const ClientRequest__ModelProviderCapabilitiesReadParams = Schema.Record(
790 Schema.String,
791 Schema.Json.annotate({ expected: "JSON value" }),
792).annotate({ identifier: "ClientRequest__ModelProviderCapabilitiesReadParams" });
846793
847export type ClientRequest__ModelProviderCapabilitiesReadParams = {};
848export const ClientRequest__ModelProviderCapabilitiesReadParams = Schema.Struct({});
794export type ClientRequest__ExperimentalFeatureListParams = {
795 readonly cursor?: string | null;
796 readonly limit?: number | null;
797 readonly threadId?: string | null;
798};
799export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({
800 cursor: Schema.optionalKey(
801 Schema.Union([
802 Schema.String.annotate({
803 description: "Opaque pagination cursor returned by a previous call.",
804 }),
805 Schema.Null,
806 ]),
807 ),
808 limit: Schema.optionalKey(
809 Schema.Union([
810 Schema.Number.annotate({
811 description: "Optional page size; defaults to a reasonable server-side value.",
812 format: "uint32",
813 })
814 .check(Schema.isInt().annotate({ expected: "an integer" }))
815 .check(
816 Schema.isGreaterThanOrEqualTo(0).annotate({
817 expected: "a value greater than or equal to 0",
818 }),
819 ),
820 Schema.Null,
821 ]),
822 ),
823 threadId: Schema.optionalKey(
824 Schema.Union([
825 Schema.String.annotate({
826 description:
827 "Optional loaded thread id. Pass this when showing feature state for an existing thread so enablement is computed from that thread's refreshed config, including project-local config for the thread's cwd.",
828 }),
829 Schema.Null,
830 ]),
831 ),
832}).annotate({ identifier: "ClientRequest__ExperimentalFeatureListParams" });
849833
850834export type ClientRequest__PermissionProfileListParams = {
851835 readonly cursor?: string | null;
......@@ -875,80 +859,274 @@ export const ClientRequest__PermissionProfileListParams = Schema.Struct({
875859 description: "Optional page size; defaults to the full result set.",
876860 format: "uint32",
877861 })
878 .check(Schema.isInt())
879 .check(Schema.isGreaterThanOrEqualTo(0)),
862 .check(Schema.isInt().annotate({ expected: "an integer" }))
863 .check(
864 Schema.isGreaterThanOrEqualTo(0).annotate({
865 expected: "a value greater than or equal to 0",
866 }),
867 ),
880868 Schema.Null,
881869 ]),
882870 ),
883});
871}).annotate({ identifier: "ClientRequest__PermissionProfileListParams" });
884872
885export type ClientRequest__Personality = "none" | "friendly" | "pragmatic";
886export const ClientRequest__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
873export type ClientRequest__ExperimentalFeatureEnablementSetParams = {
874 readonly enablement: { readonly [x: string]: boolean };
875};
876export const ClientRequest__ExperimentalFeatureEnablementSetParams = Schema.Struct({
877 enablement: Schema.Record(Schema.String, Schema.Boolean).annotate({
878 description:
879 "Process-wide runtime feature enablement keyed by canonical feature name.\n\nOnly named features are updated. Omitted features are left unchanged. Send an empty map for a no-op.",
880 }),
881}).annotate({ identifier: "ClientRequest__ExperimentalFeatureEnablementSetParams" });
887882
888export type ClientRequest__PluginListMarketplaceKind =
889 | "local"
890 | "vertical"
891 | "workspace-directory"
892 | "shared-with-me"
893 | "created-by-me-remote";
894export const ClientRequest__PluginListMarketplaceKind = Schema.Literals([
895 "local",
896 "vertical",
897 "workspace-directory",
898 "shared-with-me",
899 "created-by-me-remote",
900]);
883export type ClientRequest__McpServerOauthLoginParams = {
884 readonly name: string;
885 readonly scopes?: ReadonlyArray<string> | null;
886 readonly threadId?: string | null;
887 readonly timeoutSecs?: number | null;
888};
889export const ClientRequest__McpServerOauthLoginParams = Schema.Struct({
890 name: Schema.String,
891 scopes: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
892 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
893 timeoutSecs: Schema.optionalKey(
894 Schema.Union([
895 Schema.Number.annotate({ format: "int64" }).check(
896 Schema.isInt().annotate({ expected: "an integer" }),
897 ),
898 Schema.Null,
899 ]),
900 ),
901}).annotate({ identifier: "ClientRequest__McpServerOauthLoginParams" });
901902
902export type ClientRequest__PluginShareCheckoutParams = { readonly remotePluginId: string };
903export const ClientRequest__PluginShareCheckoutParams = Schema.Struct({
904 remotePluginId: Schema.String,
905});
903export type ClientRequest__McpServerStatusDetail = "full" | "toolsAndAuthOnly";
904export const ClientRequest__McpServerStatusDetail = Schema.Literals([
905 "full",
906 "toolsAndAuthOnly",
907]).annotate({ identifier: "ClientRequest__McpServerStatusDetail" });
906908
907export type ClientRequest__PluginShareDeleteParams = { readonly remotePluginId: string };
908export const ClientRequest__PluginShareDeleteParams = Schema.Struct({
909 remotePluginId: Schema.String,
909export type ClientRequest__McpResourceReadParams = {
910 readonly server: string;
911 readonly threadId?: string | null;
912 readonly uri: string;
913};
914export const ClientRequest__McpResourceReadParams = Schema.Struct({
915 server: Schema.String,
916 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
917 uri: Schema.String,
918}).annotate({ identifier: "ClientRequest__McpResourceReadParams" });
919
920export type ClientRequest__McpServerToolCallParams = {
921 readonly _meta?: Schema.Json;
922 readonly arguments?: Schema.Json;
923 readonly server: string;
924 readonly threadId: string;
925 readonly tool: string;
926};
927export const ClientRequest__McpServerToolCallParams = Schema.Struct({
928 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
929 arguments: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
930 server: Schema.String,
931 threadId: Schema.String,
932 tool: Schema.String,
933}).annotate({ identifier: "ClientRequest__McpServerToolCallParams" });
934
935export type ClientRequest__WindowsSandboxSetupMode = "elevated" | "unelevated";
936export const ClientRequest__WindowsSandboxSetupMode = Schema.Literals([
937 "elevated",
938 "unelevated",
939]).annotate({ identifier: "ClientRequest__WindowsSandboxSetupMode" });
940
941export type ClientRequest__LoginAppBrand = "codex" | "chatgpt";
942export const ClientRequest__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]).annotate({
943 identifier: "ClientRequest__LoginAppBrand",
910944});
911945
912export type ClientRequest__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
913export const ClientRequest__PluginShareDiscoverability = Schema.Literals([
914 "LISTED",
915 "UNLISTED",
916 "PRIVATE",
917]);
946export type ClientRequest__CancelLoginAccountParams = { readonly loginId: string };
947export const ClientRequest__CancelLoginAccountParams = Schema.Struct({
948 loginId: Schema.String,
949}).annotate({ identifier: "ClientRequest__CancelLoginAccountParams" });
918950
919export type ClientRequest__PluginShareListParams = {};
920export const ClientRequest__PluginShareListParams = Schema.Struct({});
951export type ClientRequest__ConsumeAccountRateLimitResetCreditParams = {
952 readonly creditId?: string | null;
953 readonly idempotencyKey: string;
954};
955export const ClientRequest__ConsumeAccountRateLimitResetCreditParams = Schema.Struct({
956 creditId: Schema.optionalKey(
957 Schema.Union([
958 Schema.String.annotate({
959 description:
960 "Opaque reset-credit identifier to redeem. When omitted, the backend selects the next available credit.",
961 }),
962 Schema.Null,
963 ]),
964 ),
965 idempotencyKey: Schema.String.annotate({
966 description:
967 "Identifies one logical reset attempt. A UUID is recommended; reuse the same value when retrying that attempt.",
968 }),
969}).annotate({ identifier: "ClientRequest__ConsumeAccountRateLimitResetCreditParams" });
921970
922export type ClientRequest__PluginSharePrincipalType = "user" | "group" | "workspace";
923export const ClientRequest__PluginSharePrincipalType = Schema.Literals([
924 "user",
925 "group",
926 "workspace",
927]);
971export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit";
972export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals([
973 "credits",
974 "usage_limit",
975]).annotate({ identifier: "ClientRequest__AddCreditsNudgeCreditType" });
928976
929export type ClientRequest__PluginShareTargetRole = "reader" | "editor";
930export const ClientRequest__PluginShareTargetRole = Schema.Literals(["reader", "editor"]);
977export type ClientRequest__FeedbackUploadParams = {
978 readonly classification: string;
979 readonly extraLogFiles?: ReadonlyArray<string> | null;
980 readonly includeLogs?: boolean;
981 readonly reason?: string | null;
982 readonly tags?: { readonly [x: string]: string } | null;
983 readonly threadId?: string | null;
984};
985export const ClientRequest__FeedbackUploadParams = Schema.Struct({
986 classification: Schema.String,
987 extraLogFiles: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
988 includeLogs: Schema.optionalKey(Schema.Boolean),
989 reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
990 tags: Schema.optionalKey(
991 Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
992 ),
993 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
994}).annotate({ identifier: "ClientRequest__FeedbackUploadParams" });
931995
932export type ClientRequest__PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE" | "LISTED";
933export const ClientRequest__PluginShareUpdateDiscoverability = Schema.Literals([
934 "UNLISTED",
935 "PRIVATE",
936 "LISTED",
937]);
996export type ClientRequest__CommandExecTerminalSize = {
997 readonly cols: number;
998 readonly rows: number;
999};
1000export const ClientRequest__CommandExecTerminalSize = Schema.Struct({
1001 cols: Schema.Number.annotate({
1002 description: "Terminal width in character cells.",
1003 format: "uint16",
1004 })
1005 .check(Schema.isInt().annotate({ expected: "an integer" }))
1006 .check(
1007 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
1008 ),
1009 rows: Schema.Number.annotate({
1010 description: "Terminal height in character cells.",
1011 format: "uint16",
1012 })
1013 .check(Schema.isInt().annotate({ expected: "an integer" }))
1014 .check(
1015 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
1016 ),
1017}).annotate({
1018 description: "PTY size in character cells for `command/exec` PTY sessions.",
1019 identifier: "ClientRequest__CommandExecTerminalSize",
1020});
9381021
939export type ClientRequest__PluginSkillReadParams = {
940 readonly remoteMarketplaceName: string;
941 readonly remotePluginId: string;
942 readonly skillName: string;
1022export type ClientRequest__CommandExecWriteParams = {
1023 readonly closeStdin?: boolean;
1024 readonly deltaBase64?: string | null;
1025 readonly processId: string;
9431026};
944export const ClientRequest__PluginSkillReadParams = Schema.Struct({
945 remoteMarketplaceName: Schema.String,
946 remotePluginId: Schema.String,
947 skillName: Schema.String,
1027export const ClientRequest__CommandExecWriteParams = Schema.Struct({
1028 closeStdin: Schema.optionalKey(
1029 Schema.Boolean.annotate({
1030 description: "Close stdin after writing `deltaBase64`, if present.",
1031 }),
1032 ),
1033 deltaBase64: Schema.optionalKey(
1034 Schema.Union([
1035 Schema.String.annotate({ description: "Optional base64-encoded stdin bytes to write." }),
1036 Schema.Null,
1037 ]),
1038 ),
1039 processId: Schema.String.annotate({
1040 description:
1041 "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
1042 }),
1043}).annotate({
1044 description: "Write stdin bytes to a running `command/exec` session, close stdin, or both.",
1045 identifier: "ClientRequest__CommandExecWriteParams",
9481046});
9491047
950export type ClientRequest__PluginUninstallParams = { readonly pluginId: string };
951export const ClientRequest__PluginUninstallParams = Schema.Struct({ pluginId: Schema.String });
1048export type ClientRequest__CommandExecTerminateParams = { readonly processId: string };
1049export const ClientRequest__CommandExecTerminateParams = Schema.Struct({
1050 processId: Schema.String.annotate({
1051 description:
1052 "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
1053 }),
1054}).annotate({
1055 description: "Terminate a running `command/exec` session.",
1056 identifier: "ClientRequest__CommandExecTerminateParams",
1057});
1058
1059export type ClientRequest__ConfigReadParams = {
1060 readonly cwd?: string | null;
1061 readonly includeLayers?: boolean;
1062};
1063export const ClientRequest__ConfigReadParams = Schema.Struct({
1064 cwd: Schema.optionalKey(
1065 Schema.Union([
1066 Schema.String.annotate({
1067 description:
1068 "Optional working directory to resolve project config layers. If specified, return the effective config as seen from that directory (i.e., including any project layers between `cwd` and the project/repo root).",
1069 }),
1070 Schema.Null,
1071 ]),
1072 ),
1073 includeLayers: Schema.optionalKey(Schema.Boolean),
1074}).annotate({ identifier: "ClientRequest__ConfigReadParams" });
1075
1076export type ClientRequest__ExternalAgentConfigDetectParams = {
1077 readonly cwds?: ReadonlyArray<string> | null;
1078 readonly includeHome?: boolean;
1079 readonly migrationSource?: string | null;
1080 readonly source?: string | null;
1081};
1082export const ClientRequest__ExternalAgentConfigDetectParams = Schema.Struct({
1083 cwds: Schema.optionalKey(
1084 Schema.Union([
1085 Schema.Array(Schema.String).annotate({
1086 description: "Zero or more working directories to include for repo-scoped detection.",
1087 }),
1088 Schema.Null,
1089 ]),
1090 ),
1091 includeHome: Schema.optionalKey(
1092 Schema.Boolean.annotate({
1093 description: "If true, include detection under the user's home directory.",
1094 }),
1095 ),
1096 migrationSource: Schema.optionalKey(
1097 Schema.Union([
1098 Schema.String.annotate({
1099 description:
1100 "Optional migration-source selector. Missing or unrecognized values use the default source.",
1101 }),
1102 Schema.Null,
1103 ]),
1104 ),
1105 source: Schema.optionalKey(
1106 Schema.Union([
1107 Schema.String.annotate({
1108 description:
1109 "Deprecated field retained for compatibility. This field is ignored; use `migrationSource` to select the migration source.",
1110 }),
1111 Schema.Null,
1112 ]),
1113 ),
1114}).annotate({ identifier: "ClientRequest__ExternalAgentConfigDetectParams" });
1115
1116export type ClientRequest__CommandMigration = { readonly name: string };
1117export const ClientRequest__CommandMigration = Schema.Struct({ name: Schema.String }).annotate({
1118 identifier: "ClientRequest__CommandMigration",
1119});
1120
1121export type ClientRequest__HookMigration = { readonly name: string };
1122export const ClientRequest__HookMigration = Schema.Struct({ name: Schema.String }).annotate({
1123 identifier: "ClientRequest__HookMigration",
1124});
1125
1126export type ClientRequest__McpServerMigration = { readonly name: string };
1127export const ClientRequest__McpServerMigration = Schema.Struct({ name: Schema.String }).annotate({
1128 identifier: "ClientRequest__McpServerMigration",
1129});
9521130
9531131export type ClientRequest__PluginsMigration = {
9541132 readonly marketplaceName: string;
......@@ -957,12 +1135,160 @@ export type ClientRequest__PluginsMigration = {
9571135export const ClientRequest__PluginsMigration = Schema.Struct({
9581136 marketplaceName: Schema.String,
9591137 pluginNames: Schema.Array(Schema.String),
1138}).annotate({ identifier: "ClientRequest__PluginsMigration" });
1139
1140export type ClientRequest__SessionMigration = {
1141 readonly cwd: string;
1142 readonly path: string;
1143 readonly title?: string | null;
1144};
1145export const ClientRequest__SessionMigration = Schema.Struct({
1146 cwd: Schema.String,
1147 path: Schema.String,
1148 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1149}).annotate({ identifier: "ClientRequest__SessionMigration" });
1150
1151export type ClientRequest__SkillMigration = { readonly name: string };
1152export const ClientRequest__SkillMigration = Schema.Struct({ name: Schema.String }).annotate({
1153 identifier: "ClientRequest__SkillMigration",
9601154});
9611155
962export type ClientRequest__ReasoningEffort = string;
963export const ClientRequest__ReasoningEffort = Schema.String.annotate({
964 description: "A non-empty reasoning effort value advertised by the model.",
965}).check(Schema.isMinLength(1));
1156export type ClientRequest__SubagentMigration = { readonly name: string };
1157export const ClientRequest__SubagentMigration = Schema.Struct({ name: Schema.String }).annotate({
1158 identifier: "ClientRequest__SubagentMigration",
1159});
1160
1161export type ClientRequest__ExternalAgentConfigMigrationItemType =
1162 | "AGENTS_MD"
1163 | "CONFIG"
1164 | "SKILLS"
1165 | "PLUGINS"
1166 | "MCP_SERVER_CONFIG"
1167 | "SUBAGENTS"
1168 | "HOOKS"
1169 | "COMMANDS"
1170 | "MEMORY"
1171 | "SESSIONS";
1172export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Literals([
1173 "AGENTS_MD",
1174 "CONFIG",
1175 "SKILLS",
1176 "PLUGINS",
1177 "MCP_SERVER_CONFIG",
1178 "SUBAGENTS",
1179 "HOOKS",
1180 "COMMANDS",
1181 "MEMORY",
1182 "SESSIONS",
1183]).annotate({ identifier: "ClientRequest__ExternalAgentConfigMigrationItemType" });
1184
1185export type ClientRequest__MergeStrategy = "replace" | "upsert";
1186export const ClientRequest__MergeStrategy = Schema.Literals(["replace", "upsert"]).annotate({
1187 identifier: "ClientRequest__MergeStrategy",
1188});
1189
1190export type ClientRequest__GetAccountParams = { readonly refreshToken?: boolean };
1191export const ClientRequest__GetAccountParams = Schema.Struct({
1192 refreshToken: Schema.optionalKey(
1193 Schema.Boolean.annotate({
1194 description:
1195 "When `true`, requests a proactive token refresh before returning.\n\nIn managed auth mode this triggers the normal refresh-token flow. In external auth mode this flag is ignored. Clients should refresh tokens themselves and call `account/login/start` with `chatgptAuthTokens`.",
1196 }),
1197 ),
1198}).annotate({ identifier: "ClientRequest__GetAccountParams" });
1199
1200export type ClientRequest__FuzzyFileSearchParams = {
1201 readonly cancellationToken?: string | null;
1202 readonly query: string;
1203 readonly roots: ReadonlyArray<string>;
1204};
1205export const ClientRequest__FuzzyFileSearchParams = Schema.Struct({
1206 cancellationToken: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1207 query: Schema.String,
1208 roots: Schema.Array(Schema.String),
1209}).annotate({ identifier: "ClientRequest__FuzzyFileSearchParams" });
1210
1211export type ClientRequest__AdditionalContextKind = "untrusted" | "application";
1212export const ClientRequest__AdditionalContextKind = Schema.Literals([
1213 "untrusted",
1214 "application",
1215]).annotate({ identifier: "ClientRequest__AdditionalContextKind" });
1216
1217export type ClientRequest__ModeKind = "plan" | "default";
1218export const ClientRequest__ModeKind = Schema.Literals(["plan", "default"]).annotate({
1219 description: "Initial collaboration mode to use when the TUI starts.",
1220 identifier: "ClientRequest__ModeKind",
1221});
1222
1223export type ClientRequest__DynamicToolNamespaceTool = {
1224 readonly deferLoading?: boolean;
1225 readonly description: string;
1226 readonly inputSchema: Schema.Json;
1227 readonly name: string;
1228 readonly type: "function";
1229};
1230export const ClientRequest__DynamicToolNamespaceTool = Schema.Union(
1231 [
1232 Schema.Struct({
1233 deferLoading: Schema.optionalKey(Schema.Boolean),
1234 description: Schema.String,
1235 inputSchema: Schema.Json.annotate({ expected: "JSON value" }),
1236 name: Schema.String,
1237 type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolNamespaceToolType" }),
1238 }).annotate({ title: "FunctionDynamicToolNamespaceTool" }),
1239 ],
1240 { mode: "oneOf" },
1241).annotate({ identifier: "ClientRequest__DynamicToolNamespaceTool" });
1242
1243export type ClientRequest__InternalChatMessageMetadataPassthrough = {
1244 readonly turn_id?: string | null;
1245};
1246export const ClientRequest__InternalChatMessageMetadataPassthrough = Schema.Struct({
1247 turn_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1248}).annotate({
1249 description:
1250 "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.",
1251 identifier: "ClientRequest__InternalChatMessageMetadataPassthrough",
1252});
1253
1254export type ClientRequest__MessagePhase = "commentary" | "final_answer";
1255export const ClientRequest__MessagePhase = Schema.Union(
1256 [
1257 Schema.Literal("commentary").annotate({
1258 description:
1259 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
1260 }),
1261 Schema.Literal("final_answer").annotate({
1262 description: "The assistant's terminal answer text for the current turn.",
1263 }),
1264 ],
1265 { mode: "oneOf" },
1266).annotate({
1267 description:
1268 '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.',
1269 identifier: "ClientRequest__MessagePhase",
1270});
1271
1272export type ClientRequest__AgentMessageInputContent =
1273 | { readonly text: string; readonly type: "input_text" }
1274 | { readonly encrypted_content: string; readonly type: "encrypted_content" };
1275export const ClientRequest__AgentMessageInputContent = Schema.Union(
1276 [
1277 Schema.Struct({
1278 text: Schema.String,
1279 type: Schema.Literal("input_text").annotate({
1280 title: "InputTextAgentMessageInputContentType",
1281 }),
1282 }).annotate({ title: "InputTextAgentMessageInputContent" }),
1283 Schema.Struct({
1284 encrypted_content: Schema.String,
1285 type: Schema.Literal("encrypted_content").annotate({
1286 title: "EncryptedContentAgentMessageInputContentType",
1287 }),
1288 }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
1289 ],
1290 { mode: "oneOf" },
1291).annotate({ identifier: "ClientRequest__AgentMessageInputContent" });
9661292
9671293export type ClientRequest__ReasoningItemContent =
9681294 | { readonly text: string; readonly type: "reasoning_text" }
......@@ -981,7 +1307,7 @@ export const ClientRequest__ReasoningItemContent = Schema.Union(
9811307 }).annotate({ title: "TextReasoningItemContent" }),
9821308 ],
9831309 { mode: "oneOf" },
984);
1310).annotate({ identifier: "ClientRequest__ReasoningItemContent" });
9851311
9861312export type ClientRequest__ReasoningItemReasoningSummary = {
9871313 readonly text: string;
......@@ -997,25 +1323,49 @@ export const ClientRequest__ReasoningItemReasoningSummary = Schema.Union(
9971323 }).annotate({ title: "SummaryTextReasoningItemReasoningSummary" }),
9981324 ],
9991325 { mode: "oneOf" },
1000);
1326).annotate({ identifier: "ClientRequest__ReasoningItemReasoningSummary" });
10011327
1002export type ClientRequest__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
1003export const ClientRequest__ReasoningSummary = Schema.Union(
1328export type ClientRequest__LocalShellAction = {
1329 readonly command: ReadonlyArray<string>;
1330 readonly env?: { readonly [x: string]: string } | null;
1331 readonly timeout_ms?: number | null;
1332 readonly type: "exec";
1333 readonly user?: string | null;
1334 readonly working_directory?: string | null;
1335};
1336export const ClientRequest__LocalShellAction = Schema.Union(
10041337 [
1005 Schema.Literals(["auto", "concise", "detailed"]),
1006 Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
1338 Schema.Struct({
1339 command: Schema.Array(Schema.String),
1340 env: Schema.optionalKey(
1341 Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
1342 ),
1343 timeout_ms: Schema.optionalKey(
1344 Schema.Union([
1345 Schema.Number.annotate({ format: "uint64" })
1346 .check(Schema.isInt().annotate({ expected: "an integer" }))
1347 .check(
1348 Schema.isGreaterThanOrEqualTo(0).annotate({
1349 expected: "a value greater than or equal to 0",
1350 }),
1351 ),
1352 Schema.Null,
1353 ]),
1354 ),
1355 type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
1356 user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1357 working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1358 }).annotate({ title: "ExecLocalShellAction" }),
10071359 ],
10081360 { mode: "oneOf" },
1009).annotate({
1010 description:
1011 "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
1012});
1361).annotate({ identifier: "ClientRequest__LocalShellAction" });
10131362
1014export type ClientRequest__RequestId = string | number;
1015export const ClientRequest__RequestId = Schema.Union([
1016 Schema.String,
1017 Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
1018]);
1363export type ClientRequest__LocalShellStatus = "completed" | "in_progress" | "incomplete";
1364export const ClientRequest__LocalShellStatus = Schema.Literals([
1365 "completed",
1366 "in_progress",
1367 "incomplete",
1368]).annotate({ identifier: "ClientRequest__LocalShellStatus" });
10191369
10201370export type ClientRequest__ResponsesApiWebSearchAction =
10211371 | {
......@@ -1055,377 +1405,74 @@ export const ClientRequest__ResponsesApiWebSearchAction = Schema.Union(
10551405 }).annotate({ title: "OtherResponsesApiWebSearchAction" }),
10561406 ],
10571407 { mode: "oneOf" },
1058);
1059
1060export type ClientRequest__ReviewDelivery = "inline" | "detached";
1061export const ClientRequest__ReviewDelivery = Schema.Literals(["inline", "detached"]);
1408).annotate({ identifier: "ClientRequest__ResponsesApiWebSearchAction" });
10621409
1063export type ClientRequest__ReviewTarget =
1064 | { readonly type: "uncommittedChanges" }
1065 | { readonly branch: string; readonly type: "baseBranch" }
1066 | { readonly sha: string; readonly title?: string | null; readonly type: "commit" }
1067 | { readonly instructions: string; readonly type: "custom" };
1068export const ClientRequest__ReviewTarget = Schema.Union(
1410export type ClientRequest__CapabilityRootLocation = {
1411 readonly environmentId: string;
1412 readonly path: string;
1413 readonly type: "environment";
1414};
1415export const ClientRequest__CapabilityRootLocation = Schema.Union(
10691416 [
10701417 Schema.Struct({
1071 type: Schema.Literal("uncommittedChanges").annotate({
1072 title: "UncommittedChangesReviewTargetType",
1418 environmentId: Schema.String,
1419 path: Schema.String.annotate({
1420 description: "Absolute path for the root in the selected environment.",
1421 }),
1422 type: Schema.Literal("environment").annotate({
1423 title: "EnvironmentCapabilityRootLocationType",
10731424 }),
10741425 }).annotate({
1075 title: "UncommittedChangesReviewTarget",
1076 description: "Review the working tree: staged, unstaged, and untracked files.",
1426 title: "EnvironmentCapabilityRootLocation",
1427 description: "A path owned by an execution environment.",
10771428 }),
1078 Schema.Struct({
1079 branch: Schema.String,
1080 type: Schema.Literal("baseBranch").annotate({ title: "BaseBranchReviewTargetType" }),
1081 }).annotate({
1082 title: "BaseBranchReviewTarget",
1083 description: "Review changes between the current branch and the given base branch.",
1429 ],
1430 { mode: "oneOf" },
1431).annotate({
1432 description: "Location used to resolve a selected capability root.",
1433 identifier: "ClientRequest__CapabilityRootLocation",
1434});
1435
1436export type ClientRequest__ConversationTextRole = "user" | "developer" | "assistant";
1437export const ClientRequest__ConversationTextRole = Schema.Literals([
1438 "user",
1439 "developer",
1440 "assistant",
1441]).annotate({ identifier: "ClientRequest__ConversationTextRole" });
1442
1443export type ClientRequest__TurnItemsView = "notLoaded" | "summary" | "full";
1444export const ClientRequest__TurnItemsView = Schema.Union(
1445 [
1446 Schema.Literal("notLoaded").annotate({
1447 description: "`items` was not loaded for this turn. The field is intentionally empty.",
10841448 }),
1085 Schema.Struct({
1086 sha: Schema.String,
1087 title: Schema.optionalKey(
1088 Schema.Union([
1089 Schema.String.annotate({
1090 description: "Optional human-readable label (e.g., commit subject) for UIs.",
1091 }),
1092 Schema.Null,
1093 ]),
1094 ),
1095 type: Schema.Literal("commit").annotate({ title: "CommitReviewTargetType" }),
1096 }).annotate({
1097 title: "CommitReviewTarget",
1098 description: "Review the changes introduced by a specific commit.",
1449 Schema.Literal("summary").annotate({
1450 description: "`items` contains only a display summary for this turn.",
10991451 }),
1100 Schema.Struct({
1101 instructions: Schema.String,
1102 type: Schema.Literal("custom").annotate({ title: "CustomReviewTargetType" }),
1103 }).annotate({
1104 title: "CustomReviewTarget",
1105 description: "Arbitrary instructions, equivalent to the old free-form prompt.",
1452 Schema.Literal("full").annotate({
1453 description:
1454 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
11061455 }),
11071456 ],
11081457 { mode: "oneOf" },
1109);
1110
1111export type ClientRequest__SandboxMode = "read-only" | "workspace-write" | "danger-full-access";
1112export const ClientRequest__SandboxMode = Schema.Literals([
1113 "read-only",
1114 "workspace-write",
1115 "danger-full-access",
1116]);
1458).annotate({ identifier: "ClientRequest__TurnItemsView" });
11171459
1118export type ClientRequest__SessionMigration = {
1119 readonly cwd: string;
1120 readonly path: string;
1121 readonly title?: string | null;
1122};
1123export const ClientRequest__SessionMigration = Schema.Struct({
1124 cwd: Schema.String,
1125 path: Schema.String,
1126 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1460export type ClientRequest__LegacyAppPathString = string;
1461export const ClientRequest__LegacyAppPathString = Schema.String.annotate({
1462 identifier: "ClientRequest__LegacyAppPathString",
11271463});
11281464
1129export type ClientRequest__SkillMigration = { readonly name: string };
1130export const ClientRequest__SkillMigration = Schema.Struct({ name: Schema.String });
1131
1132export type ClientRequest__SkillsListParams = {
1133 readonly cwds?: ReadonlyArray<string>;
1134 readonly forceReload?: boolean;
1135};
1136export const ClientRequest__SkillsListParams = Schema.Struct({
1137 cwds: Schema.optionalKey(
1138 Schema.Array(Schema.String).annotate({
1139 description: "When empty, defaults to the current session working directory.",
1140 }),
1141 ),
1142 forceReload: Schema.optionalKey(
1143 Schema.Boolean.annotate({
1144 description: "When true, bypass the skills cache and re-scan skills from disk.",
1145 }),
1146 ),
1465export type CommandExecutionRequestApprovalParams__AbsolutePathBuf = string;
1466export const CommandExecutionRequestApprovalParams__AbsolutePathBuf = Schema.String.annotate({
1467 description:
1468 "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.",
1469 identifier: "CommandExecutionRequestApprovalParams__AbsolutePathBuf",
11471470});
11481471
1149export type ClientRequest__SortDirection = "asc" | "desc";
1150export const ClientRequest__SortDirection = Schema.Literals(["asc", "desc"]);
1151
1152export type ClientRequest__SubagentMigration = { readonly name: string };
1153export const ClientRequest__SubagentMigration = Schema.Struct({ name: Schema.String });
1154
1155export type ClientRequest__TextElement = {
1156 readonly byteRange: { readonly end: number; readonly start: number };
1157 readonly placeholder?: string | null;
1158};
1159export const ClientRequest__TextElement = Schema.Struct({
1160 byteRange: Schema.Struct({
1161 end: Schema.Number.annotate({ format: "uint" })
1162 .check(Schema.isInt())
1163 .check(Schema.isGreaterThanOrEqualTo(0)),
1164 start: Schema.Number.annotate({ format: "uint" })
1165 .check(Schema.isInt())
1166 .check(Schema.isGreaterThanOrEqualTo(0)),
1167 }).annotate({
1168 description: "Byte range in the parent `text` buffer that this element occupies.",
1169 }),
1170 placeholder: Schema.optionalKey(
1171 Schema.Union([
1172 Schema.String.annotate({
1173 description: "Optional human-readable placeholder for the element, displayed in the UI.",
1174 }),
1175 Schema.Null,
1176 ]),
1177 ),
1178});
1179
1180export type ClientRequest__ThreadApproveGuardianDeniedActionParams = {
1181 readonly event: unknown;
1182 readonly threadId: string;
1183};
1184export const ClientRequest__ThreadApproveGuardianDeniedActionParams = Schema.Struct({
1185 event: Schema.Unknown.annotate({
1186 description: "Serialized `codex_protocol::protocol::GuardianAssessmentEvent`.",
1187 }),
1188 threadId: Schema.String,
1189});
1190
1191export type ClientRequest__ThreadArchiveParams = { readonly threadId: string };
1192export const ClientRequest__ThreadArchiveParams = Schema.Struct({ threadId: Schema.String });
1193
1194export type ClientRequest__ThreadCompactStartParams = { readonly threadId: string };
1195export const ClientRequest__ThreadCompactStartParams = Schema.Struct({ threadId: Schema.String });
1196
1197export type ClientRequest__ThreadDeleteParams = { readonly threadId: string };
1198export const ClientRequest__ThreadDeleteParams = Schema.Struct({ threadId: Schema.String });
1199
1200export type ClientRequest__ThreadGoalClearParams = { readonly threadId: string };
1201export const ClientRequest__ThreadGoalClearParams = Schema.Struct({ threadId: Schema.String });
1202
1203export type ClientRequest__ThreadGoalGetParams = { readonly threadId: string };
1204export const ClientRequest__ThreadGoalGetParams = Schema.Struct({ threadId: Schema.String });
1205
1206export type ClientRequest__ThreadGoalStatus =
1207 | "active"
1208 | "paused"
1209 | "blocked"
1210 | "usageLimited"
1211 | "budgetLimited"
1212 | "complete";
1213export const ClientRequest__ThreadGoalStatus = Schema.Literals([
1214 "active",
1215 "paused",
1216 "blocked",
1217 "usageLimited",
1218 "budgetLimited",
1219 "complete",
1220]);
1221
1222export type ClientRequest__ThreadInjectItemsParams = {
1223 readonly items: ReadonlyArray<unknown>;
1224 readonly threadId: string;
1225};
1226export const ClientRequest__ThreadInjectItemsParams = Schema.Struct({
1227 items: Schema.Array(Schema.Unknown).annotate({
1228 description: "Raw Responses API items to append to the thread's model-visible history.",
1229 }),
1230 threadId: Schema.String,
1231});
1232
1233export type ClientRequest__ThreadListCwdFilter = string | ReadonlyArray<string>;
1234export const ClientRequest__ThreadListCwdFilter = Schema.Union([
1235 Schema.String,
1236 Schema.Array(Schema.String),
1237]);
1238
1239export type ClientRequest__ThreadLoadedListParams = {
1240 readonly cursor?: string | null;
1241 readonly limit?: number | null;
1242};
1243export const ClientRequest__ThreadLoadedListParams = Schema.Struct({
1244 cursor: Schema.optionalKey(
1245 Schema.Union([
1246 Schema.String.annotate({
1247 description: "Opaque pagination cursor returned by a previous call.",
1248 }),
1249 Schema.Null,
1250 ]),
1251 ),
1252 limit: Schema.optionalKey(
1253 Schema.Union([
1254 Schema.Number.annotate({
1255 description: "Optional page size; defaults to no limit.",
1256 format: "uint32",
1257 })
1258 .check(Schema.isInt())
1259 .check(Schema.isGreaterThanOrEqualTo(0)),
1260 Schema.Null,
1261 ]),
1262 ),
1263});
1264
1265export type ClientRequest__ThreadMetadataGitInfoUpdateParams = {
1266 readonly branch?: string | null;
1267 readonly originUrl?: string | null;
1268 readonly sha?: string | null;
1269};
1270export const ClientRequest__ThreadMetadataGitInfoUpdateParams = Schema.Struct({
1271 branch: Schema.optionalKey(
1272 Schema.Union([
1273 Schema.String.annotate({
1274 description:
1275 "Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
1276 }),
1277 Schema.Null,
1278 ]),
1279 ),
1280 originUrl: Schema.optionalKey(
1281 Schema.Union([
1282 Schema.String.annotate({
1283 description:
1284 "Omit to leave the stored origin URL unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
1285 }),
1286 Schema.Null,
1287 ]),
1288 ),
1289 sha: Schema.optionalKey(
1290 Schema.Union([
1291 Schema.String.annotate({
1292 description:
1293 "Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
1294 }),
1295 Schema.Null,
1296 ]),
1297 ),
1298});
1299
1300export type ClientRequest__ThreadReadParams = {
1301 readonly includeTurns?: boolean;
1302 readonly threadId: string;
1303};
1304export const ClientRequest__ThreadReadParams = Schema.Struct({
1305 includeTurns: Schema.optionalKey(
1306 Schema.Boolean.annotate({
1307 description: "When true, include turns and their items from rollout history.",
1308 }),
1309 ),
1310 threadId: Schema.String,
1311});
1312
1313export type ClientRequest__ThreadRollbackParams = {
1314 readonly numTurns: number;
1315 readonly threadId: string;
1316};
1317export const ClientRequest__ThreadRollbackParams = Schema.Struct({
1318 numTurns: Schema.Number.annotate({
1319 description:
1320 "The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.",
1321 format: "uint32",
1322 })
1323 .check(Schema.isInt())
1324 .check(Schema.isGreaterThanOrEqualTo(0)),
1325 threadId: Schema.String,
1326}).annotate({ description: "DEPRECATED: `thread/rollback` will be removed soon." });
1327
1328export type ClientRequest__ThreadSetNameParams = {
1329 readonly name: string;
1330 readonly threadId: string;
1331};
1332export const ClientRequest__ThreadSetNameParams = Schema.Struct({
1333 name: Schema.String,
1334 threadId: Schema.String,
1335});
1336
1337export type ClientRequest__ThreadShellCommandParams = {
1338 readonly command: string;
1339 readonly threadId: string;
1340};
1341export const ClientRequest__ThreadShellCommandParams = Schema.Struct({
1342 command: Schema.String.annotate({
1343 description:
1344 "Shell command string evaluated by the thread's configured shell. Unlike `command/exec`, this intentionally preserves shell syntax such as pipes, redirects, and quoting. This runs unsandboxed with full access rather than inheriting the thread sandbox policy.",
1345 }),
1346 threadId: Schema.String,
1347});
1348
1349export type ClientRequest__ThreadSortKey = "created_at" | "updated_at" | "recency_at";
1350export const ClientRequest__ThreadSortKey = Schema.Literals([
1351 "created_at",
1352 "updated_at",
1353 "recency_at",
1354]);
1355
1356export type ClientRequest__ThreadSource = string;
1357export const ClientRequest__ThreadSource = Schema.String;
1358
1359export type ClientRequest__ThreadSourceKind =
1360 | "cli"
1361 | "vscode"
1362 | "exec"
1363 | "appServer"
1364 | "subAgent"
1365 | "subAgentReview"
1366 | "subAgentCompact"
1367 | "subAgentThreadSpawn"
1368 | "subAgentOther"
1369 | "unknown";
1370export const ClientRequest__ThreadSourceKind = Schema.Literals([
1371 "cli",
1372 "vscode",
1373 "exec",
1374 "appServer",
1375 "subAgent",
1376 "subAgentReview",
1377 "subAgentCompact",
1378 "subAgentThreadSpawn",
1379 "subAgentOther",
1380 "unknown",
1381]);
1382
1383export type ClientRequest__ThreadStartSource = "startup" | "clear";
1384export const ClientRequest__ThreadStartSource = Schema.Literals(["startup", "clear"]);
1385
1386export type ClientRequest__ThreadUnarchiveParams = { readonly threadId: string };
1387export const ClientRequest__ThreadUnarchiveParams = Schema.Struct({ threadId: Schema.String });
1388
1389export type ClientRequest__ThreadUnsubscribeParams = { readonly threadId: string };
1390export const ClientRequest__ThreadUnsubscribeParams = Schema.Struct({ threadId: Schema.String });
1391
1392export type ClientRequest__TurnInterruptParams = {
1393 readonly threadId: string;
1394 readonly turnId: string;
1395};
1396export const ClientRequest__TurnInterruptParams = Schema.Struct({
1397 threadId: Schema.String,
1398 turnId: Schema.String,
1399});
1400
1401export type ClientRequest__TurnItemsView = "notLoaded" | "summary" | "full";
1402export const ClientRequest__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]);
1403
1404export type ClientRequest__WindowsSandboxSetupMode = "elevated" | "unelevated";
1405export const ClientRequest__WindowsSandboxSetupMode = Schema.Literals(["elevated", "unelevated"]);
1406
1407export type CommandExecutionRequestApprovalParams__AbsolutePathBuf = string;
1408export const CommandExecutionRequestApprovalParams__AbsolutePathBuf = Schema.String.annotate({
1409 description:
1410 "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.",
1411});
1412
1413export type CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = {
1414 readonly enabled?: boolean | null;
1415};
1416export const CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
1417 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1418});
1419
1420export type CommandExecutionRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
1421export const CommandExecutionRequestApprovalParams__FileSystemAccessMode = Schema.Literals([
1422 "read",
1423 "write",
1424 "deny",
1425]);
1426
14271472export type CommandExecutionRequestApprovalParams__LegacyAppPathString = string;
1428export const CommandExecutionRequestApprovalParams__LegacyAppPathString = Schema.String;
1473export const CommandExecutionRequestApprovalParams__LegacyAppPathString = Schema.String.annotate({
1474 identifier: "CommandExecutionRequestApprovalParams__LegacyAppPathString",
1475});
14291476
14301477export type CommandExecutionRequestApprovalParams__NetworkApprovalProtocol =
14311478 | "http"
......@@ -1437,19 +1484,33 @@ export const CommandExecutionRequestApprovalParams__NetworkApprovalProtocol = Sc
14371484 "https",
14381485 "socks5Tcp",
14391486 "socks5Udp",
1440]);
1487]).annotate({ identifier: "CommandExecutionRequestApprovalParams__NetworkApprovalProtocol" });
14411488
14421489export type CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction = "allow" | "deny";
14431490export const CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction = Schema.Literals([
14441491 "allow",
14451492 "deny",
1446]);
1493]).annotate({ identifier: "CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction" });
1494
1495export type CommandExecutionRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
1496export const CommandExecutionRequestApprovalParams__FileSystemAccessMode = Schema.Literals([
1497 "read",
1498 "write",
1499 "deny",
1500]).annotate({ identifier: "CommandExecutionRequestApprovalParams__FileSystemAccessMode" });
1501
1502export type CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = {
1503 readonly enabled?: boolean | null;
1504};
1505export const CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
1506 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1507}).annotate({ identifier: "CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions" });
14471508
14481509export type CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";
14491510export const CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([
14501511 "allow",
14511512 "deny",
1452]);
1513]).annotate({ identifier: "CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction" });
14531514
14541515export type DynamicToolCallResponse__DynamicToolCallOutputContentItem =
14551516 | { readonly text: string; readonly type: "inputText" }
......@@ -1477,7 +1538,12 @@ export const DynamicToolCallResponse__DynamicToolCallOutputContentItem = Schema.
14771538 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
14781539 ],
14791540 { mode: "oneOf" },
1480);
1541).annotate({ identifier: "DynamicToolCallResponse__DynamicToolCallOutputContentItem" });
1542
1543export type ExecCommandApprovalParams__ThreadId = string;
1544export const ExecCommandApprovalParams__ThreadId = Schema.String.annotate({
1545 identifier: "ExecCommandApprovalParams__ThreadId",
1546});
14811547
14821548export type ExecCommandApprovalParams__ParsedCommand =
14831549 | { readonly cmd: string; readonly name: string; readonly path: string; readonly type: "read" }
......@@ -1517,34 +1583,41 @@ export const ExecCommandApprovalParams__ParsedCommand = Schema.Union(
15171583 }).annotate({ title: "UnknownParsedCommand" }),
15181584 ],
15191585 { mode: "oneOf" },
1520);
1521
1522export type ExecCommandApprovalParams__ThreadId = string;
1523export const ExecCommandApprovalParams__ThreadId = Schema.String;
1586).annotate({ identifier: "ExecCommandApprovalParams__ParsedCommand" });
15241587
15251588export type ExecCommandApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";
15261589export const ExecCommandApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([
15271590 "allow",
15281591 "deny",
1529]);
1592]).annotate({ identifier: "ExecCommandApprovalResponse__NetworkPolicyRuleAction" });
15301593
15311594export type FileChangeRequestApprovalResponse__FileChangeApprovalDecision =
15321595 | "accept"
15331596 | "acceptForSession"
15341597 | "decline"
15351598 | "cancel";
1536export const FileChangeRequestApprovalResponse__FileChangeApprovalDecision = Schema.Literals([
1537 "accept",
1538 "acceptForSession",
1539 "decline",
1540 "cancel",
1541]);
1599export const FileChangeRequestApprovalResponse__FileChangeApprovalDecision = Schema.Union(
1600 [
1601 Schema.Literal("accept").annotate({ description: "User approved the file changes." }),
1602 Schema.Literal("acceptForSession").annotate({
1603 description:
1604 "User approved the file changes and future changes to the same files should run without prompting.",
1605 }),
1606 Schema.Literal("decline").annotate({
1607 description: "User denied the file changes. The agent will continue the turn.",
1608 }),
1609 Schema.Literal("cancel").annotate({
1610 description: "User denied the file changes. The turn will also be immediately interrupted.",
1611 }),
1612 ],
1613 { mode: "oneOf" },
1614).annotate({ identifier: "FileChangeRequestApprovalResponse__FileChangeApprovalDecision" });
15421615
15431616export type FuzzyFileSearchResponse__FuzzyFileSearchMatchType = "file" | "directory";
15441617export const FuzzyFileSearchResponse__FuzzyFileSearchMatchType = Schema.Literals([
15451618 "file",
15461619 "directory",
1547]);
1620]).annotate({ identifier: "FuzzyFileSearchResponse__FuzzyFileSearchMatchType" });
15481621
15491622export type FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType =
15501623 | "file"
......@@ -1552,50 +1625,36 @@ export type FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType
15521625export const FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType = Schema.Literals([
15531626 "file",
15541627 "directory",
1555]);
1628]).annotate({ identifier: "FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType" });
15561629
15571630export type JSONRPCError__JSONRPCErrorError = {
15581631 readonly code: number;
1559 readonly data?: unknown;
1632 readonly data?: Schema.Json;
15601633 readonly message: string;
15611634};
15621635export const JSONRPCError__JSONRPCErrorError = Schema.Struct({
1563 code: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
1564 data: Schema.optionalKey(Schema.Unknown),
1636 code: Schema.Number.annotate({ format: "int64" }).check(
1637 Schema.isInt().annotate({ expected: "an integer" }),
1638 ),
1639 data: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
15651640 message: Schema.String,
1566});
1641}).annotate({ identifier: "JSONRPCError__JSONRPCErrorError" });
15671642
15681643export type JSONRPCError__RequestId = string | number;
15691644export const JSONRPCError__RequestId = Schema.Union([
15701645 Schema.String,
1571 Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
1572]);
1573
1574export type JSONRPCMessage__JSONRPCErrorError = {
1575 readonly code: number;
1576 readonly data?: unknown;
1577 readonly message: string;
1578};
1579export const JSONRPCMessage__JSONRPCErrorError = Schema.Struct({
1580 code: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
1581 data: Schema.optionalKey(Schema.Unknown),
1582 message: Schema.String,
1583});
1584
1585export type JSONRPCMessage__JSONRPCNotification = {
1586 readonly method: string;
1587 readonly params?: unknown;
1588};
1589export const JSONRPCMessage__JSONRPCNotification = Schema.Struct({
1590 method: Schema.String,
1591 params: Schema.optionalKey(Schema.Unknown),
1592}).annotate({ description: "A notification which does not expect a response." });
1646 Schema.Number.annotate({ format: "int64" }).check(
1647 Schema.isInt().annotate({ expected: "an integer" }),
1648 ),
1649]).annotate({ identifier: "JSONRPCError__RequestId" });
15931650
15941651export type JSONRPCMessage__RequestId = string | number;
15951652export const JSONRPCMessage__RequestId = Schema.Union([
15961653 Schema.String,
1597 Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
1598]);
1654 Schema.Number.annotate({ format: "int64" }).check(
1655 Schema.isInt().annotate({ expected: "an integer" }),
1656 ),
1657]).annotate({ identifier: "JSONRPCMessage__RequestId" });
15991658
16001659export type JSONRPCMessage__W3cTraceContext = {
16011660 readonly traceparent?: string | null;
......@@ -1604,13 +1663,40 @@ export type JSONRPCMessage__W3cTraceContext = {
16041663export const JSONRPCMessage__W3cTraceContext = Schema.Struct({
16051664 traceparent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16061665 tracestate: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1666}).annotate({ identifier: "JSONRPCMessage__W3cTraceContext" });
1667
1668export type JSONRPCMessage__JSONRPCNotification = {
1669 readonly method: string;
1670 readonly params?: Schema.Json;
1671};
1672export const JSONRPCMessage__JSONRPCNotification = Schema.Struct({
1673 method: Schema.String,
1674 params: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
1675}).annotate({
1676 description: "A notification which does not expect a response.",
1677 identifier: "JSONRPCMessage__JSONRPCNotification",
16071678});
16081679
1680export type JSONRPCMessage__JSONRPCErrorError = {
1681 readonly code: number;
1682 readonly data?: Schema.Json;
1683 readonly message: string;
1684};
1685export const JSONRPCMessage__JSONRPCErrorError = Schema.Struct({
1686 code: Schema.Number.annotate({ format: "int64" }).check(
1687 Schema.isInt().annotate({ expected: "an integer" }),
1688 ),
1689 data: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
1690 message: Schema.String,
1691}).annotate({ identifier: "JSONRPCMessage__JSONRPCErrorError" });
1692
16091693export type JSONRPCRequest__RequestId = string | number;
16101694export const JSONRPCRequest__RequestId = Schema.Union([
16111695 Schema.String,
1612 Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
1613]);
1696 Schema.Number.annotate({ format: "int64" }).check(
1697 Schema.isInt().annotate({ expected: "an integer" }),
1698 ),
1699]).annotate({ identifier: "JSONRPCRequest__RequestId" });
16141700
16151701export type JSONRPCRequest__W3cTraceContext = {
16161702 readonly traceparent?: string | null;
......@@ -1619,20 +1705,20 @@ export type JSONRPCRequest__W3cTraceContext = {
16191705export const JSONRPCRequest__W3cTraceContext = Schema.Struct({
16201706 traceparent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16211707 tracestate: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1622});
1708}).annotate({ identifier: "JSONRPCRequest__W3cTraceContext" });
16231709
16241710export type JSONRPCResponse__RequestId = string | number;
16251711export const JSONRPCResponse__RequestId = Schema.Union([
16261712 Schema.String,
1627 Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
1628]);
1629
1630export type McpServerElicitationRequestParams__McpElicitationArrayType = "array";
1631export const McpServerElicitationRequestParams__McpElicitationArrayType = Schema.Literal("array");
1713 Schema.Number.annotate({ format: "int64" }).check(
1714 Schema.isInt().annotate({ expected: "an integer" }),
1715 ),
1716]).annotate({ identifier: "JSONRPCResponse__RequestId" });
16321717
1633export type McpServerElicitationRequestParams__McpElicitationBooleanType = "boolean";
1634export const McpServerElicitationRequestParams__McpElicitationBooleanType =
1635 Schema.Literal("boolean");
1718export type McpServerElicitationRequestParams__McpElicitationStringType = "string";
1719export const McpServerElicitationRequestParams__McpElicitationStringType = Schema.Literal(
1720 "string",
1721).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationStringType" });
16361722
16371723export type McpServerElicitationRequestParams__McpElicitationConstOption = {
16381724 readonly const: string;
......@@ -1641,16 +1727,12 @@ export type McpServerElicitationRequestParams__McpElicitationConstOption = {
16411727export const McpServerElicitationRequestParams__McpElicitationConstOption = Schema.Struct({
16421728 const: Schema.String,
16431729 title: Schema.String,
1644});
1645
1646export type McpServerElicitationRequestParams__McpElicitationNumberType = "number" | "integer";
1647export const McpServerElicitationRequestParams__McpElicitationNumberType = Schema.Literals([
1648 "number",
1649 "integer",
1650]);
1730}).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationConstOption" });
16511731
1652export type McpServerElicitationRequestParams__McpElicitationObjectType = "object";
1653export const McpServerElicitationRequestParams__McpElicitationObjectType = Schema.Literal("object");
1732export type McpServerElicitationRequestParams__McpElicitationArrayType = "array";
1733export const McpServerElicitationRequestParams__McpElicitationArrayType = Schema.Literal(
1734 "array",
1735).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationArrayType" });
16541736
16551737export type McpServerElicitationRequestParams__McpElicitationStringFormat =
16561738 | "email"
......@@ -1662,10 +1744,23 @@ export const McpServerElicitationRequestParams__McpElicitationStringFormat = Sch
16621744 "uri",
16631745 "date",
16641746 "date-time",
1665]);
1747]).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationStringFormat" });
16661748
1667export type McpServerElicitationRequestParams__McpElicitationStringType = "string";
1668export const McpServerElicitationRequestParams__McpElicitationStringType = Schema.Literal("string");
1749export type McpServerElicitationRequestParams__McpElicitationNumberType = "number" | "integer";
1750export const McpServerElicitationRequestParams__McpElicitationNumberType = Schema.Literals([
1751 "number",
1752 "integer",
1753]).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationNumberType" });
1754
1755export type McpServerElicitationRequestParams__McpElicitationBooleanType = "boolean";
1756export const McpServerElicitationRequestParams__McpElicitationBooleanType = Schema.Literal(
1757 "boolean",
1758).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationBooleanType" });
1759
1760export type McpServerElicitationRequestParams__McpElicitationObjectType = "object";
1761export const McpServerElicitationRequestParams__McpElicitationObjectType = Schema.Literal(
1762 "object",
1763).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationObjectType" });
16691764
16701765export type McpServerElicitationRequestResponse__McpServerElicitationAction =
16711766 | "accept"
......@@ -1675,19 +1770,13 @@ export const McpServerElicitationRequestResponse__McpServerElicitationAction = S
16751770 "accept",
16761771 "decline",
16771772 "cancel",
1678]);
1773]).annotate({ identifier: "McpServerElicitationRequestResponse__McpServerElicitationAction" });
16791774
16801775export type PermissionsRequestApprovalParams__AbsolutePathBuf = string;
16811776export const PermissionsRequestApprovalParams__AbsolutePathBuf = Schema.String.annotate({
16821777 description:
16831778 "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.",
1684});
1685
1686export type PermissionsRequestApprovalParams__AdditionalNetworkPermissions = {
1687 readonly enabled?: boolean | null;
1688};
1689export const PermissionsRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
1690 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1779 identifier: "PermissionsRequestApprovalParams__AbsolutePathBuf",
16911780});
16921781
16931782export type PermissionsRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
......@@ -1695,283 +1784,258 @@ export const PermissionsRequestApprovalParams__FileSystemAccessMode = Schema.Lit
16951784 "read",
16961785 "write",
16971786 "deny",
1698]);
1787]).annotate({ identifier: "PermissionsRequestApprovalParams__FileSystemAccessMode" });
16991788
17001789export type PermissionsRequestApprovalParams__LegacyAppPathString = string;
1701export const PermissionsRequestApprovalParams__LegacyAppPathString = Schema.String;
1790export const PermissionsRequestApprovalParams__LegacyAppPathString = Schema.String.annotate({
1791 identifier: "PermissionsRequestApprovalParams__LegacyAppPathString",
1792});
17021793
1703export type PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = {
1794export type PermissionsRequestApprovalParams__AdditionalNetworkPermissions = {
17041795 readonly enabled?: boolean | null;
17051796};
1706export const PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = Schema.Struct({
1797export const PermissionsRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
17071798 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1708});
1799}).annotate({ identifier: "PermissionsRequestApprovalParams__AdditionalNetworkPermissions" });
17091800
17101801export type PermissionsRequestApprovalResponse__FileSystemAccessMode = "read" | "write" | "deny";
17111802export const PermissionsRequestApprovalResponse__FileSystemAccessMode = Schema.Literals([
17121803 "read",
17131804 "write",
17141805 "deny",
1715]);
1806]).annotate({ identifier: "PermissionsRequestApprovalResponse__FileSystemAccessMode" });
17161807
17171808export type PermissionsRequestApprovalResponse__LegacyAppPathString = string;
1718export const PermissionsRequestApprovalResponse__LegacyAppPathString = Schema.String;
1809export const PermissionsRequestApprovalResponse__LegacyAppPathString = Schema.String.annotate({
1810 identifier: "PermissionsRequestApprovalResponse__LegacyAppPathString",
1811});
1812
1813export type PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = {
1814 readonly enabled?: boolean | null;
1815};
1816export const PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = Schema.Struct({
1817 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1818}).annotate({ identifier: "PermissionsRequestApprovalResponse__AdditionalNetworkPermissions" });
1819
1820export type PermissionsRequestApprovalResponse__PermissionGrantScope = "turn" | "session";
1821export const PermissionsRequestApprovalResponse__PermissionGrantScope = Schema.Literals([
1822 "turn",
1823 "session",
1824]).annotate({ identifier: "PermissionsRequestApprovalResponse__PermissionGrantScope" });
1825
1826export type ServerNotification__NonSteerableTurnKind = "review" | "compact";
1827export const ServerNotification__NonSteerableTurnKind = Schema.Literals([
1828 "review",
1829 "compact",
1830]).annotate({ identifier: "ServerNotification__NonSteerableTurnKind" });
17191831
17201832export type ServerNotification__AbsolutePathBuf = string;
17211833export const ServerNotification__AbsolutePathBuf = Schema.String.annotate({
17221834 description:
17231835 "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.",
1836 identifier: "ServerNotification__AbsolutePathBuf",
17241837});
17251838
1726export type ServerNotification__AccountLoginCompletedNotification = {
1727 readonly error?: string | null;
1728 readonly loginId?: string | null;
1729 readonly success: boolean;
1839export type ServerNotification__GitInfo = {
1840 readonly branch?: string | null;
1841 readonly originUrl?: string | null;
1842 readonly sha?: string | null;
17301843};
1731export const ServerNotification__AccountLoginCompletedNotification = Schema.Struct({
1732 error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1733 loginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1734 success: Schema.Boolean,
1735});
1844export const ServerNotification__GitInfo = Schema.Struct({
1845 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1846 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1847 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1848}).annotate({ identifier: "ServerNotification__GitInfo" });
17361849
1737export type ServerNotification__ActivePermissionProfile = {
1738 readonly extends?: string | null;
1739 readonly id: string;
1740};
1741export const ServerNotification__ActivePermissionProfile = Schema.Struct({
1742 extends: Schema.optionalKey(
1743 Schema.Union([
1744 Schema.String.annotate({
1745 description:
1746 "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
1747 }),
1748 Schema.Null,
1749 ]),
1750 ),
1751 id: Schema.String.annotate({
1752 description:
1753 "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
1754 }),
1850export type ServerNotification__AgentPath = string;
1851export const ServerNotification__AgentPath = Schema.String.annotate({
1852 identifier: "ServerNotification__AgentPath",
17551853});
17561854
1757export type ServerNotification__AdditionalNetworkPermissions = {
1758 readonly enabled?: boolean | null;
1759};
1760export const ServerNotification__AdditionalNetworkPermissions = Schema.Struct({
1761 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1855export type ServerNotification__ThreadId = string;
1856export const ServerNotification__ThreadId = Schema.String.annotate({
1857 identifier: "ServerNotification__ThreadId",
17621858});
17631859
1764export type ServerNotification__AgentMessageDeltaNotification = {
1765 readonly delta: string;
1766 readonly itemId: string;
1767 readonly threadId: string;
1768 readonly turnId: string;
1769};
1770export const ServerNotification__AgentMessageDeltaNotification = Schema.Struct({
1771 delta: Schema.String,
1772 itemId: Schema.String,
1773 threadId: Schema.String,
1774 turnId: Schema.String,
1860export type ServerNotification__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
1861export const ServerNotification__ThreadActiveFlag = Schema.Literals([
1862 "waitingOnApproval",
1863 "waitingOnUserInput",
1864]).annotate({ identifier: "ServerNotification__ThreadActiveFlag" });
1865
1866export type ServerNotification__ThreadSource = string;
1867export const ServerNotification__ThreadSource = Schema.String.annotate({
1868 identifier: "ServerNotification__ThreadSource",
17751869});
17761870
1777export type ServerNotification__AgentPath = string;
1778export const ServerNotification__AgentPath = Schema.String;
1871export type ServerNotification__ByteRange = { readonly end: number; readonly start: number };
1872export const ServerNotification__ByteRange = Schema.Struct({
1873 end: Schema.Number.annotate({ format: "uint" })
1874 .check(Schema.isInt().annotate({ expected: "an integer" }))
1875 .check(
1876 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
1877 ),
1878 start: Schema.Number.annotate({ format: "uint" })
1879 .check(Schema.isInt().annotate({ expected: "an integer" }))
1880 .check(
1881 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
1882 ),
1883}).annotate({ identifier: "ServerNotification__ByteRange" });
17791884
1780export type ServerNotification__AppBranding = {
1781 readonly category?: string | null;
1782 readonly developer?: string | null;
1783 readonly isDiscoverableApp: boolean;
1784 readonly privacyPolicy?: string | null;
1785 readonly termsOfService?: string | null;
1786 readonly website?: string | null;
1787};
1788export const ServerNotification__AppBranding = Schema.Struct({
1789 category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1790 developer: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1791 isDiscoverableApp: Schema.Boolean,
1792 privacyPolicy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1793 termsOfService: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1794 website: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1795}).annotate({ description: "EXPERIMENTAL - app metadata returned by app-list APIs." });
1885export type ServerNotification__ImageDetail = "auto" | "low" | "high" | "original";
1886export const ServerNotification__ImageDetail = Schema.Literals([
1887 "auto",
1888 "low",
1889 "high",
1890 "original",
1891]).annotate({ identifier: "ServerNotification__ImageDetail" });
17961892
1797export type ServerNotification__AppReview = { readonly status: string };
1798export const ServerNotification__AppReview = Schema.Struct({ status: Schema.String });
1893export type ServerNotification__HookPromptFragment = {
1894 readonly hookRunId: string;
1895 readonly text: string;
1896};
1897export const ServerNotification__HookPromptFragment = Schema.Struct({
1898 hookRunId: Schema.String,
1899 text: Schema.String,
1900}).annotate({ identifier: "ServerNotification__HookPromptFragment" });
17991901
1800export type ServerNotification__AppScreenshot = {
1801 readonly fileId?: string | null;
1802 readonly url?: string | null;
1803 readonly userPrompt: string;
1902export type ServerNotification__MemoryCitationEntry = {
1903 readonly lineEnd: number;
1904 readonly lineStart: number;
1905 readonly note: string;
1906 readonly path: string;
18041907};
1805export const ServerNotification__AppScreenshot = Schema.Struct({
1806 fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1807 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1808 userPrompt: Schema.String,
1809});
1908export const ServerNotification__MemoryCitationEntry = Schema.Struct({
1909 lineEnd: Schema.Number.annotate({ format: "uint32" })
1910 .check(Schema.isInt().annotate({ expected: "an integer" }))
1911 .check(
1912 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
1913 ),
1914 lineStart: Schema.Number.annotate({ format: "uint32" })
1915 .check(Schema.isInt().annotate({ expected: "an integer" }))
1916 .check(
1917 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
1918 ),
1919 note: Schema.String,
1920 path: Schema.String,
1921}).annotate({ identifier: "ServerNotification__MemoryCitationEntry" });
18101922
1811export type ServerNotification__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
1812export const ServerNotification__ApprovalsReviewer = Schema.Literals([
1813 "user",
1814 "auto_review",
1815 "guardian_subagent",
1816]).annotate({
1923export type ServerNotification__MessagePhase = "commentary" | "final_answer";
1924export const ServerNotification__MessagePhase = Schema.Union(
1925 [
1926 Schema.Literal("commentary").annotate({
1927 description:
1928 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
1929 }),
1930 Schema.Literal("final_answer").annotate({
1931 description: "The assistant's terminal answer text for the current turn.",
1932 }),
1933 ],
1934 { mode: "oneOf" },
1935).annotate({
18171936 description:
1818 "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.",
1937 '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.',
1938 identifier: "ServerNotification__MessagePhase",
18191939});
18201940
1821export type ServerNotification__AskForApproval =
1822 | "untrusted"
1823 | "on-request"
1824 | "never"
1825 | {
1826 readonly granular: {
1827 readonly mcp_elicitations: boolean;
1828 readonly request_permissions?: boolean;
1829 readonly rules: boolean;
1830 readonly sandbox_approval: boolean;
1831 readonly skill_approval?: boolean;
1832 };
1833 };
1834export const ServerNotification__AskForApproval = Schema.Union(
1835 [
1836 Schema.Literals(["untrusted", "on-request", "never"]),
1837 Schema.Struct({
1838 granular: Schema.Struct({
1839 mcp_elicitations: Schema.Boolean,
1840 request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
1841 rules: Schema.Boolean,
1842 sandbox_approval: Schema.Boolean,
1843 skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
1844 }),
1845 }).annotate({ title: "GranularAskForApproval" }),
1846 ],
1847 { mode: "oneOf" },
1848);
1849
1850export type ServerNotification__AuthMode =
1851 | "apikey"
1852 | "chatgpt"
1853 | "chatgptAuthTokens"
1854 | "headers"
1855 | "agentIdentity"
1856 | "personalAccessToken"
1857 | "bedrockApiKey";
1858export const ServerNotification__AuthMode = Schema.Literals([
1859 "apikey",
1860 "chatgpt",
1861 "chatgptAuthTokens",
1862 "headers",
1863 "agentIdentity",
1864 "personalAccessToken",
1865 "bedrockApiKey",
1866]).annotate({ description: "Authentication mode for OpenAI-backed providers." });
1867
1868export type ServerNotification__AutoReviewDecisionSource = "agent";
1869export const ServerNotification__AutoReviewDecisionSource = Schema.Literal("agent").annotate({
1870 description: "[UNSTABLE] Source that produced a terminal approval auto-review decision.",
1941export type ServerNotification__LegacyAppPathString = string;
1942export const ServerNotification__LegacyAppPathString = Schema.String.annotate({
1943 identifier: "ServerNotification__LegacyAppPathString",
18711944});
18721945
1873export type ServerNotification__CollabAgentStatus =
1874 | "pendingInit"
1875 | "running"
1876 | "interrupted"
1946export type ServerNotification__CommandExecutionSource =
1947 | "agent"
1948 | "userShell"
1949 | "unifiedExecStartup"
1950 | "unifiedExecInteraction";
1951export const ServerNotification__CommandExecutionSource = Schema.Literals([
1952 "agent",
1953 "userShell",
1954 "unifiedExecStartup",
1955 "unifiedExecInteraction",
1956]).annotate({ identifier: "ServerNotification__CommandExecutionSource" });
1957
1958export type ServerNotification__CommandExecutionStatus =
1959 | "inProgress"
18771960 | "completed"
1878 | "errored"
1879 | "shutdown"
1880 | "notFound";
1881export const ServerNotification__CollabAgentStatus = Schema.Literals([
1882 "pendingInit",
1883 "running",
1884 "interrupted",
1961 | "failed"
1962 | "declined";
1963export const ServerNotification__CommandExecutionStatus = Schema.Literals([
1964 "inProgress",
18851965 "completed",
1886 "errored",
1887 "shutdown",
1888 "notFound",
1889]);
1890
1891export type ServerNotification__CommandExecOutputDeltaNotification = {
1892 readonly capReached: boolean;
1893 readonly deltaBase64: string;
1894 readonly processId: string;
1895 readonly stream: "stdout" | "stderr";
1896};
1897export const ServerNotification__CommandExecOutputDeltaNotification = Schema.Struct({
1898 capReached: Schema.Boolean.annotate({
1899 description:
1900 "`true` on the final streamed chunk for a stream when `outputBytesCap` truncated later output on that stream.",
1901 }),
1902 deltaBase64: Schema.String.annotate({ description: "Base64-encoded output bytes." }),
1903 processId: Schema.String.annotate({
1904 description:
1905 "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
1906 }),
1907 stream: Schema.Literals(["stdout", "stderr"]).annotate({
1908 description: "Stream label for `command/exec/outputDelta` notifications.",
1909 }),
1910}).annotate({
1911 description:
1912 "Base64-encoded output chunk emitted for a streaming `command/exec` request.\n\nThese notifications are connection-scoped. If the originating connection closes, the server terminates the process.",
1913});
1966 "failed",
1967 "declined",
1968]).annotate({ identifier: "ServerNotification__CommandExecutionStatus" });
19141969
1915export type ServerNotification__CommandExecutionOutputDeltaNotification = {
1916 readonly delta: string;
1917 readonly itemId: string;
1918 readonly threadId: string;
1919 readonly turnId: string;
1920};
1921export const ServerNotification__CommandExecutionOutputDeltaNotification = Schema.Struct({
1922 delta: Schema.String,
1923 itemId: Schema.String,
1924 threadId: Schema.String,
1925 turnId: Schema.String,
1926});
1970export type ServerNotification__PatchChangeKind =
1971 | { readonly type: "add" }
1972 | { readonly type: "delete" }
1973 | { readonly move_path?: string | null; readonly type: "update" };
1974export const ServerNotification__PatchChangeKind = Schema.Union(
1975 [
1976 Schema.Struct({
1977 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
1978 }).annotate({ title: "AddPatchChangeKind" }),
1979 Schema.Struct({
1980 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
1981 }).annotate({ title: "DeletePatchChangeKind" }),
1982 Schema.Struct({
1983 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1984 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
1985 }).annotate({ title: "UpdatePatchChangeKind" }),
1986 ],
1987 { mode: "oneOf" },
1988).annotate({ identifier: "ServerNotification__PatchChangeKind" });
19271989
1928export type ServerNotification__CommandExecutionStatus =
1990export type ServerNotification__PatchApplyStatus =
19291991 | "inProgress"
19301992 | "completed"
19311993 | "failed"
19321994 | "declined";
1933export const ServerNotification__CommandExecutionStatus = Schema.Literals([
1995export const ServerNotification__PatchApplyStatus = Schema.Literals([
19341996 "inProgress",
19351997 "completed",
19361998 "failed",
19371999 "declined",
1938]);
2000]).annotate({ identifier: "ServerNotification__PatchApplyStatus" });
19392001
1940export type ServerNotification__ContextCompactedNotification = {
1941 readonly threadId: string;
1942 readonly turnId: string;
2002export type ServerNotification__McpToolCallAppContext = {
2003 readonly actionName?: string | null;
2004 readonly appName?: string | null;
2005 readonly connectorId: string;
2006 readonly linkId?: string | null;
2007 readonly resourceUri?: string | null;
19432008};
1944export const ServerNotification__ContextCompactedNotification = Schema.Struct({
1945 threadId: Schema.String,
1946 turnId: Schema.String,
1947}).annotate({ description: "Deprecated: Use `ContextCompaction` item type instead." });
2009export const ServerNotification__McpToolCallAppContext = Schema.Struct({
2010 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2011 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2012 connectorId: Schema.String,
2013 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2014 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2015}).annotate({ identifier: "ServerNotification__McpToolCallAppContext" });
19482016
1949export type ServerNotification__CreditsSnapshot = {
1950 readonly balance?: string | null;
1951 readonly hasCredits: boolean;
1952 readonly unlimited: boolean;
1953};
1954export const ServerNotification__CreditsSnapshot = Schema.Struct({
1955 balance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1956 hasCredits: Schema.Boolean,
1957 unlimited: Schema.Boolean,
1958});
2017export type ServerNotification__McpToolCallError = { readonly message: string };
2018export const ServerNotification__McpToolCallError = Schema.Struct({
2019 message: Schema.String,
2020}).annotate({ identifier: "ServerNotification__McpToolCallError" });
19592021
1960export type ServerNotification__DeprecationNoticeNotification = {
1961 readonly details?: string | null;
1962 readonly summary: string;
2022export type ServerNotification__McpToolCallResult = {
2023 readonly _meta?: Schema.Json;
2024 readonly content: ReadonlyArray<Schema.Json>;
2025 readonly structuredContent?: Schema.Json;
19632026};
1964export const ServerNotification__DeprecationNoticeNotification = Schema.Struct({
1965 details: Schema.optionalKey(
1966 Schema.Union([
1967 Schema.String.annotate({
1968 description: "Optional extra guidance, such as migration steps or rationale.",
1969 }),
1970 Schema.Null,
1971 ]),
1972 ),
1973 summary: Schema.String.annotate({ description: "Concise summary of what is deprecated." }),
1974});
2027export const ServerNotification__McpToolCallResult = Schema.Struct({
2028 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
2029 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
2030 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
2031}).annotate({ identifier: "ServerNotification__McpToolCallResult" });
2032
2033export type ServerNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
2034export const ServerNotification__McpToolCallStatus = Schema.Literals([
2035 "inProgress",
2036 "completed",
2037 "failed",
2038]).annotate({ identifier: "ServerNotification__McpToolCallStatus" });
19752039
19762040export type ServerNotification__DynamicToolCallOutputContentItem =
19772041 | { readonly text: string; readonly type: "inputText" }
......@@ -1999,344 +2063,462 @@ export const ServerNotification__DynamicToolCallOutputContentItem = Schema.Union
19992063 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
20002064 ],
20012065 { mode: "oneOf" },
2002);
2066).annotate({ identifier: "ServerNotification__DynamicToolCallOutputContentItem" });
20032067
20042068export type ServerNotification__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
20052069export const ServerNotification__DynamicToolCallStatus = Schema.Literals([
20062070 "inProgress",
20072071 "completed",
20082072 "failed",
2009]);
2073]).annotate({ identifier: "ServerNotification__DynamicToolCallStatus" });
20102074
2011export type ServerNotification__EnvironmentConnectionNotification = {
2012 readonly environmentId: string;
2013 readonly threadId: string;
2014};
2015export const ServerNotification__EnvironmentConnectionNotification = Schema.Struct({
2016 environmentId: Schema.String,
2017 threadId: Schema.String,
2018});
2075export type ServerNotification__CollabAgentStatus =
2076 | "pendingInit"
2077 | "running"
2078 | "interrupted"
2079 | "completed"
2080 | "errored"
2081 | "shutdown"
2082 | "notFound";
2083export const ServerNotification__CollabAgentStatus = Schema.Literals([
2084 "pendingInit",
2085 "running",
2086 "interrupted",
2087 "completed",
2088 "errored",
2089 "shutdown",
2090 "notFound",
2091]).annotate({ identifier: "ServerNotification__CollabAgentStatus" });
20192092
2020export type ServerNotification__ExternalAgentConfigMigrationItemType =
2021 | "AGENTS_MD"
2022 | "CONFIG"
2023 | "SKILLS"
2024 | "PLUGINS"
2025 | "MCP_SERVER_CONFIG"
2026 | "SUBAGENTS"
2027 | "HOOKS"
2028 | "COMMANDS"
2029 | "MEMORY"
2030 | "SESSIONS";
2031export const ServerNotification__ExternalAgentConfigMigrationItemType = Schema.Literals([
2032 "AGENTS_MD",
2033 "CONFIG",
2034 "SKILLS",
2035 "PLUGINS",
2036 "MCP_SERVER_CONFIG",
2037 "SUBAGENTS",
2038 "HOOKS",
2039 "COMMANDS",
2040 "MEMORY",
2041 "SESSIONS",
2042]);
2093export type ServerNotification__ReasoningEffort = string;
2094export const ServerNotification__ReasoningEffort = Schema.String.annotate({
2095 description: "A non-empty reasoning effort value advertised by the model.",
2096}).check(
2097 Schema.isMinLength(1).annotate({
2098 expected: "a value with a length of at least 1",
2099 identifier: "ServerNotification__ReasoningEffort",
2100 }),
2101);
20432102
2044export type ServerNotification__FileChangeOutputDeltaNotification = {
2045 readonly delta: string;
2046 readonly itemId: string;
2047 readonly threadId: string;
2048 readonly turnId: string;
2049};
2050export const ServerNotification__FileChangeOutputDeltaNotification = Schema.Struct({
2051 delta: Schema.String,
2052 itemId: Schema.String,
2053 threadId: Schema.String,
2054 turnId: Schema.String,
2055}).annotate({
2056 description:
2057 "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.",
2058});
2103export type ServerNotification__CollabAgentToolCallStatus =
2104 | "inProgress"
2105 | "completed"
2106 | "failed"
2107 | "interrupted";
2108export const ServerNotification__CollabAgentToolCallStatus = Schema.Literals([
2109 "inProgress",
2110 "completed",
2111 "failed",
2112 "interrupted",
2113]).annotate({ identifier: "ServerNotification__CollabAgentToolCallStatus" });
20592114
2060export type ServerNotification__FileSystemAccessMode = "read" | "write" | "deny";
2061export const ServerNotification__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]);
2115export type ServerNotification__CollabAgentTool =
2116 | "spawnAgent"
2117 | "sendInput"
2118 | "resumeAgent"
2119 | "wait"
2120 | "closeAgent"
2121 | "sendMessage"
2122 | "followupTask"
2123 | "interruptAgent"
2124 | "listAgents";
2125export const ServerNotification__CollabAgentTool = Schema.Literals([
2126 "spawnAgent",
2127 "sendInput",
2128 "resumeAgent",
2129 "wait",
2130 "closeAgent",
2131 "sendMessage",
2132 "followupTask",
2133 "interruptAgent",
2134 "listAgents",
2135]).annotate({ identifier: "ServerNotification__CollabAgentTool" });
20622136
2063export type ServerNotification__FuzzyFileSearchMatchType = "file" | "directory";
2064export const ServerNotification__FuzzyFileSearchMatchType = Schema.Literals(["file", "directory"]);
2137export type ServerNotification__SubAgentActivityKind =
2138 | "started"
2139 | "interacted"
2140 | "interrupted"
2141 | "completed";
2142export const ServerNotification__SubAgentActivityKind = Schema.Literals([
2143 "started",
2144 "interacted",
2145 "interrupted",
2146 "completed",
2147]).annotate({ identifier: "ServerNotification__SubAgentActivityKind" });
20652148
2066export type ServerNotification__FuzzyFileSearchSessionCompletedNotification = {
2067 readonly sessionId: string;
2068};
2069export const ServerNotification__FuzzyFileSearchSessionCompletedNotification = Schema.Struct({
2070 sessionId: Schema.String,
2071});
2149export type ServerNotification__WebSearchAction =
2150 | {
2151 readonly queries?: ReadonlyArray<string> | null;
2152 readonly query?: string | null;
2153 readonly type: "search";
2154 }
2155 | { readonly type: "openPage"; readonly url?: string | null }
2156 | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
2157 | { readonly type: "other" };
2158export const ServerNotification__WebSearchAction = Schema.Union(
2159 [
2160 Schema.Struct({
2161 queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
2162 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2163 type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
2164 }).annotate({ title: "SearchWebSearchAction" }),
2165 Schema.Struct({
2166 type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
2167 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2168 }).annotate({ title: "OpenPageWebSearchAction" }),
2169 Schema.Struct({
2170 pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2171 type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
2172 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2173 }).annotate({ title: "FindInPageWebSearchAction" }),
2174 Schema.Struct({
2175 type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
2176 }).annotate({ title: "OtherWebSearchAction" }),
2177 ],
2178 { mode: "oneOf" },
2179).annotate({ identifier: "ServerNotification__WebSearchAction" });
20722180
2073export type ServerNotification__GitInfo = {
2074 readonly branch?: string | null;
2075 readonly originUrl?: string | null;
2076 readonly sha?: string | null;
2077};
2078export const ServerNotification__GitInfo = Schema.Struct({
2079 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2080 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2081 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2082});
2181export type ServerNotification__TurnItemsView = "notLoaded" | "summary" | "full";
2182export const ServerNotification__TurnItemsView = Schema.Union(
2183 [
2184 Schema.Literal("notLoaded").annotate({
2185 description: "`items` was not loaded for this turn. The field is intentionally empty.",
2186 }),
2187 Schema.Literal("summary").annotate({
2188 description: "`items` contains only a display summary for this turn.",
2189 }),
2190 Schema.Literal("full").annotate({
2191 description:
2192 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
2193 }),
2194 ],
2195 { mode: "oneOf" },
2196).annotate({ identifier: "ServerNotification__TurnItemsView" });
20832197
2084export type ServerNotification__GuardianApprovalReviewStatus =
2085 | "inProgress"
2086 | "approved"
2087 | "denied"
2088 | "timedOut"
2089 | "aborted";
2090export const ServerNotification__GuardianApprovalReviewStatus = Schema.Literals([
2198export type ServerNotification__TurnStatus = "completed" | "interrupted" | "failed" | "inProgress";
2199export const ServerNotification__TurnStatus = Schema.Literals([
2200 "completed",
2201 "interrupted",
2202 "failed",
20912203 "inProgress",
2092 "approved",
2093 "denied",
2094 "timedOut",
2095 "aborted",
2096]).annotate({ description: "[UNSTABLE] Lifecycle state for an approval auto-review." });
2097
2098export type ServerNotification__GuardianCommandSource = "shell" | "unifiedExec";
2099export const ServerNotification__GuardianCommandSource = Schema.Literals(["shell", "unifiedExec"]);
2100
2101export type ServerNotification__GuardianRiskLevel = "low" | "medium" | "high" | "critical";
2102export const ServerNotification__GuardianRiskLevel = Schema.Literals([
2103 "low",
2104 "medium",
2105 "high",
2106 "critical",
2107]).annotate({ description: "[UNSTABLE] Risk level assigned by approval auto-review." });
2204]).annotate({ identifier: "ServerNotification__TurnStatus" });
21082205
2109export type ServerNotification__GuardianUserAuthorization = "unknown" | "low" | "medium" | "high";
2110export const ServerNotification__GuardianUserAuthorization = Schema.Literals([
2111 "unknown",
2112 "low",
2113 "medium",
2114 "high",
2115]).annotate({ description: "[UNSTABLE] Authorization level assigned by approval auto-review." });
2116
2117export type ServerNotification__GuardianWarningNotification = {
2118 readonly message: string;
2119 readonly threadId: string;
2120};
2121export const ServerNotification__GuardianWarningNotification = Schema.Struct({
2122 message: Schema.String.annotate({
2123 description: "Concise guardian warning message for the user.",
2124 }),
2125 threadId: Schema.String.annotate({ description: "Thread target for the guardian warning." }),
2126});
2206export type ServerNotification__ThreadArchivedNotification = { readonly threadId: string };
2207export const ServerNotification__ThreadArchivedNotification = Schema.Struct({
2208 threadId: Schema.String,
2209}).annotate({ identifier: "ServerNotification__ThreadArchivedNotification" });
21272210
2128export type ServerNotification__HookEventName =
2129 | "preToolUse"
2130 | "permissionRequest"
2131 | "postToolUse"
2132 | "preCompact"
2133 | "postCompact"
2134 | "sessionStart"
2135 | "sessionEnd"
2136 | "userPromptSubmit"
2137 | "subagentStart"
2138 | "subagentStop"
2139 | "stop";
2140export const ServerNotification__HookEventName = Schema.Literals([
2141 "preToolUse",
2142 "permissionRequest",
2143 "postToolUse",
2144 "preCompact",
2145 "postCompact",
2146 "sessionStart",
2147 "sessionEnd",
2148 "userPromptSubmit",
2149 "subagentStart",
2150 "subagentStop",
2151 "stop",
2152]);
2211export type ServerNotification__ThreadDeletedNotification = { readonly threadId: string };
2212export const ServerNotification__ThreadDeletedNotification = Schema.Struct({
2213 threadId: Schema.String,
2214}).annotate({ identifier: "ServerNotification__ThreadDeletedNotification" });
21532215
2154export type ServerNotification__HookExecutionMode = "sync" | "async";
2155export const ServerNotification__HookExecutionMode = Schema.Literals(["sync", "async"]);
2216export type ServerNotification__ThreadUnarchivedNotification = { readonly threadId: string };
2217export const ServerNotification__ThreadUnarchivedNotification = Schema.Struct({
2218 threadId: Schema.String,
2219}).annotate({ identifier: "ServerNotification__ThreadUnarchivedNotification" });
21562220
2157export type ServerNotification__HookHandlerType = "command" | "prompt" | "agent";
2158export const ServerNotification__HookHandlerType = Schema.Literals(["command", "prompt", "agent"]);
2221export type ServerNotification__ThreadClosedNotification = { readonly threadId: string };
2222export const ServerNotification__ThreadClosedNotification = Schema.Struct({
2223 threadId: Schema.String,
2224}).annotate({ identifier: "ServerNotification__ThreadClosedNotification" });
21592225
2160export type ServerNotification__HookOutputEntryKind =
2161 | "warning"
2162 | "stop"
2163 | "feedback"
2164 | "context"
2165 | "error";
2166export const ServerNotification__HookOutputEntryKind = Schema.Literals([
2167 "warning",
2168 "stop",
2169 "feedback",
2170 "context",
2171 "error",
2172]);
2226export type ServerNotification__SkillsChangedNotification = { readonly [x: string]: Schema.Json };
2227export const ServerNotification__SkillsChangedNotification = Schema.Record(
2228 Schema.String,
2229 Schema.Json.annotate({ expected: "JSON value" }),
2230).annotate({
2231 description:
2232 "Notification emitted when watched local skill files change.\n\nTreat this as an invalidation signal and re-run `skills/list` with the client's current parameters when refreshed skill metadata is needed.",
2233 identifier: "ServerNotification__SkillsChangedNotification",
2234});
21732235
2174export type ServerNotification__HookPromptFragment = {
2175 readonly hookRunId: string;
2176 readonly text: string;
2236export type ServerNotification__ThreadNameUpdatedNotification = {
2237 readonly threadId: string;
2238 readonly threadName?: string | null;
21772239};
2178export const ServerNotification__HookPromptFragment = Schema.Struct({
2179 hookRunId: Schema.String,
2180 text: Schema.String,
2181});
2240export const ServerNotification__ThreadNameUpdatedNotification = Schema.Struct({
2241 threadId: Schema.String,
2242 threadName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2243}).annotate({ identifier: "ServerNotification__ThreadNameUpdatedNotification" });
21822244
2183export type ServerNotification__HookRunStatus =
2184 | "running"
2185 | "completed"
2186 | "failed"
2245export type ServerNotification__ThreadGoalStatus =
2246 | "active"
2247 | "paused"
21872248 | "blocked"
2188 | "stopped";
2189export const ServerNotification__HookRunStatus = Schema.Literals([
2190 "running",
2191 "completed",
2192 "failed",
2249 | "usageLimited"
2250 | "budgetLimited"
2251 | "complete";
2252export const ServerNotification__ThreadGoalStatus = Schema.Literals([
2253 "active",
2254 "paused",
21932255 "blocked",
2194 "stopped",
2195]);
2196
2197export type ServerNotification__HookScope = "thread" | "turn";
2198export const ServerNotification__HookScope = Schema.Literals(["thread", "turn"]);
2199
2200export type ServerNotification__ImageDetail = "auto" | "low" | "high" | "original";
2201export const ServerNotification__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
2256 "usageLimited",
2257 "budgetLimited",
2258 "complete",
2259]).annotate({ identifier: "ServerNotification__ThreadGoalStatus" });
22022260
2203export type ServerNotification__LegacyAppPathString = string;
2204export const ServerNotification__LegacyAppPathString = Schema.String;
2261export type ServerNotification__ThreadGoalClearedNotification = { readonly threadId: string };
2262export const ServerNotification__ThreadGoalClearedNotification = Schema.Struct({
2263 threadId: Schema.String,
2264}).annotate({ identifier: "ServerNotification__ThreadGoalClearedNotification" });
22052265
2206export type ServerNotification__McpServerOauthLoginCompletedNotification = {
2207 readonly error?: string | null;
2208 readonly name: string;
2209 readonly success: boolean;
2210 readonly threadId?: string | null;
2266export type ServerNotification__EnvironmentConnectionNotification = {
2267 readonly environmentId: string;
2268 readonly threadId: string;
22112269};
2212export const ServerNotification__McpServerOauthLoginCompletedNotification = Schema.Struct({
2213 error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2214 name: Schema.String,
2215 success: Schema.Boolean,
2216 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2217});
2270export const ServerNotification__EnvironmentConnectionNotification = Schema.Struct({
2271 environmentId: Schema.String,
2272 threadId: Schema.String,
2273}).annotate({ identifier: "ServerNotification__EnvironmentConnectionNotification" });
22182274
2219export type ServerNotification__McpServerStartupFailureReason = "reauthenticationRequired";
2220export const ServerNotification__McpServerStartupFailureReason = Schema.Literal(
2221 "reauthenticationRequired",
2222);
2275export type ServerNotification__ActivePermissionProfile = {
2276 readonly extends?: string | null;
2277 readonly id: string;
2278};
2279export const ServerNotification__ActivePermissionProfile = Schema.Struct({
2280 extends: Schema.optionalKey(
2281 Schema.Union([
2282 Schema.String.annotate({
2283 description:
2284 "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
2285 }),
2286 Schema.Null,
2287 ]),
2288 ),
2289 id: Schema.String.annotate({
2290 description:
2291 "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
2292 }),
2293}).annotate({ identifier: "ServerNotification__ActivePermissionProfile" });
22232294
2224export type ServerNotification__McpServerStartupState =
2225 | "starting"
2226 | "ready"
2227 | "failed"
2228 | "cancelled";
2229export const ServerNotification__McpServerStartupState = Schema.Literals([
2230 "starting",
2231 "ready",
2232 "failed",
2233 "cancelled",
2234]);
2295export type ServerNotification__AskForApproval =
2296 | "untrusted"
2297 | "on-request"
2298 | "never"
2299 | {
2300 readonly granular: {
2301 readonly mcp_elicitations: boolean;
2302 readonly request_permissions?: boolean;
2303 readonly rules: boolean;
2304 readonly sandbox_approval: boolean;
2305 readonly skill_approval?: boolean;
2306 };
2307 };
2308export const ServerNotification__AskForApproval = Schema.Union(
2309 [
2310 Schema.Literals(["untrusted", "on-request", "never"]),
2311 Schema.Struct({
2312 granular: Schema.Struct({
2313 mcp_elicitations: Schema.Boolean,
2314 request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
2315 rules: Schema.Boolean,
2316 sandbox_approval: Schema.Boolean,
2317 skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
2318 }),
2319 }).annotate({ title: "GranularAskForApproval" }),
2320 ],
2321 { mode: "oneOf" },
2322).annotate({ identifier: "ServerNotification__AskForApproval" });
22352323
2236export type ServerNotification__McpToolCallAppContext = {
2237 readonly actionName?: string | null;
2238 readonly appName?: string | null;
2239 readonly connectorId: string;
2240 readonly linkId?: string | null;
2241 readonly resourceUri?: string | null;
2242};
2243export const ServerNotification__McpToolCallAppContext = Schema.Struct({
2244 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2245 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2246 connectorId: Schema.String,
2247 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2248 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2324export type ServerNotification__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
2325export const ServerNotification__ApprovalsReviewer = Schema.Literals([
2326 "user",
2327 "auto_review",
2328 "guardian_subagent",
2329]).annotate({
2330 description:
2331 "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.",
2332 identifier: "ServerNotification__ApprovalsReviewer",
22492333});
22502334
2251export type ServerNotification__McpToolCallError = { readonly message: string };
2252export const ServerNotification__McpToolCallError = Schema.Struct({ message: Schema.String });
2335export type ServerNotification__ModeKind = "plan" | "default";
2336export const ServerNotification__ModeKind = Schema.Literals(["plan", "default"]).annotate({
2337 description: "Initial collaboration mode to use when the TUI starts.",
2338 identifier: "ServerNotification__ModeKind",
2339});
22532340
2254export type ServerNotification__McpToolCallProgressNotification = {
2255 readonly itemId: string;
2256 readonly message: string;
2257 readonly threadId: string;
2258 readonly turnId: string;
2259};
2260export const ServerNotification__McpToolCallProgressNotification = Schema.Struct({
2261 itemId: Schema.String,
2262 message: Schema.String,
2263 threadId: Schema.String,
2264 turnId: Schema.String,
2341export type ServerNotification__Personality = "none" | "friendly" | "pragmatic";
2342export const ServerNotification__Personality = Schema.Literals([
2343 "none",
2344 "friendly",
2345 "pragmatic",
2346]).annotate({ identifier: "ServerNotification__Personality" });
2347
2348export type ServerNotification__NetworkAccess = "restricted" | "enabled";
2349export const ServerNotification__NetworkAccess = Schema.Literals([
2350 "restricted",
2351 "enabled",
2352]).annotate({ identifier: "ServerNotification__NetworkAccess" });
2353
2354export type ServerNotification__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
2355export const ServerNotification__ReasoningSummary = Schema.Union(
2356 [
2357 Schema.Literals(["auto", "concise", "detailed"]),
2358 Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
2359 ],
2360 { mode: "oneOf" },
2361).annotate({
2362 description:
2363 "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
2364 identifier: "ServerNotification__ReasoningSummary",
22652365});
22662366
2267export type ServerNotification__McpToolCallResult = {
2268 readonly _meta?: unknown;
2269 readonly content: ReadonlyArray<unknown>;
2270 readonly structuredContent?: unknown;
2367export type ServerNotification__TokenUsageBreakdown = {
2368 readonly cacheWriteInputTokens?: number;
2369 readonly cachedInputTokens: number;
2370 readonly inputTokens: number;
2371 readonly outputTokens: number;
2372 readonly reasoningOutputTokens: number;
2373 readonly totalTokens: number;
22712374};
2272export const ServerNotification__McpToolCallResult = Schema.Struct({
2273 _meta: Schema.optionalKey(Schema.Unknown),
2274 content: Schema.Array(Schema.Unknown),
2275 structuredContent: Schema.optionalKey(Schema.Unknown),
2276});
2375export const ServerNotification__TokenUsageBreakdown = Schema.Struct({
2376 cacheWriteInputTokens: Schema.optionalKey(
2377 Schema.Number.annotate({ default: 0, format: "int64" }).check(
2378 Schema.isInt().annotate({ expected: "an integer" }),
2379 ),
2380 ),
2381 cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(
2382 Schema.isInt().annotate({ expected: "an integer" }),
2383 ),
2384 inputTokens: Schema.Number.annotate({ format: "int64" }).check(
2385 Schema.isInt().annotate({ expected: "an integer" }),
2386 ),
2387 outputTokens: Schema.Number.annotate({ format: "int64" }).check(
2388 Schema.isInt().annotate({ expected: "an integer" }),
2389 ),
2390 reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(
2391 Schema.isInt().annotate({ expected: "an integer" }),
2392 ),
2393 totalTokens: Schema.Number.annotate({ format: "int64" }).check(
2394 Schema.isInt().annotate({ expected: "an integer" }),
2395 ),
2396}).annotate({ identifier: "ServerNotification__TokenUsageBreakdown" });
22772397
2278export type ServerNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
2279export const ServerNotification__McpToolCallStatus = Schema.Literals([
2280 "inProgress",
2281 "completed",
2282 "failed",
2283]);
2398export type ServerNotification__HookOutputEntryKind =
2399 | "warning"
2400 | "stop"
2401 | "feedback"
2402 | "context"
2403 | "error";
2404export const ServerNotification__HookOutputEntryKind = Schema.Literals([
2405 "warning",
2406 "stop",
2407 "feedback",
2408 "context",
2409 "error",
2410]).annotate({ identifier: "ServerNotification__HookOutputEntryKind" });
22842411
2285export type ServerNotification__MemoryCitationEntry = {
2286 readonly lineEnd: number;
2287 readonly lineStart: number;
2288 readonly note: string;
2289 readonly path: string;
2290};
2291export const ServerNotification__MemoryCitationEntry = Schema.Struct({
2292 lineEnd: Schema.Number.annotate({ format: "uint32" })
2293 .check(Schema.isInt())
2294 .check(Schema.isGreaterThanOrEqualTo(0)),
2295 lineStart: Schema.Number.annotate({ format: "uint32" })
2296 .check(Schema.isInt())
2297 .check(Schema.isGreaterThanOrEqualTo(0)),
2298 note: Schema.String,
2299 path: Schema.String,
2300});
2412export type ServerNotification__HookEventName =
2413 | "preToolUse"
2414 | "permissionRequest"
2415 | "postToolUse"
2416 | "preCompact"
2417 | "postCompact"
2418 | "sessionStart"
2419 | "sessionEnd"
2420 | "userPromptSubmit"
2421 | "subagentStart"
2422 | "subagentStop"
2423 | "stop";
2424export const ServerNotification__HookEventName = Schema.Literals([
2425 "preToolUse",
2426 "permissionRequest",
2427 "postToolUse",
2428 "preCompact",
2429 "postCompact",
2430 "sessionStart",
2431 "sessionEnd",
2432 "userPromptSubmit",
2433 "subagentStart",
2434 "subagentStop",
2435 "stop",
2436]).annotate({ identifier: "ServerNotification__HookEventName" });
23012437
2302export type ServerNotification__MessagePhase = "commentary" | "final_answer";
2303export const ServerNotification__MessagePhase = Schema.Literals([
2304 "commentary",
2305 "final_answer",
2306]).annotate({
2307 description:
2308 '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.',
2438export type ServerNotification__HookExecutionMode = "sync" | "async";
2439export const ServerNotification__HookExecutionMode = Schema.Literals(["sync", "async"]).annotate({
2440 identifier: "ServerNotification__HookExecutionMode",
23092441});
23102442
2311export type ServerNotification__ModeKind = "plan" | "default";
2312export const ServerNotification__ModeKind = Schema.Literals(["plan", "default"]).annotate({
2313 description: "Initial collaboration mode to use when the TUI starts.",
2443export type ServerNotification__HookHandlerType = "command" | "prompt" | "agent";
2444export const ServerNotification__HookHandlerType = Schema.Literals([
2445 "command",
2446 "prompt",
2447 "agent",
2448]).annotate({ identifier: "ServerNotification__HookHandlerType" });
2449
2450export type ServerNotification__HookScope = "thread" | "turn";
2451export const ServerNotification__HookScope = Schema.Literals(["thread", "turn"]).annotate({
2452 identifier: "ServerNotification__HookScope",
23142453});
23152454
2316export type ServerNotification__ModelRerouteReason = "highRiskCyberActivity";
2317export const ServerNotification__ModelRerouteReason = Schema.Literal("highRiskCyberActivity");
2455export type ServerNotification__HookSource =
2456 | "system"
2457 | "user"
2458 | "project"
2459 | "mdm"
2460 | "sessionFlags"
2461 | "plugin"
2462 | "cloudRequirements"
2463 | "cloudManagedConfig"
2464 | "legacyManagedConfigFile"
2465 | "legacyManagedConfigMdm"
2466 | "unknown";
2467export const ServerNotification__HookSource = Schema.Literals([
2468 "system",
2469 "user",
2470 "project",
2471 "mdm",
2472 "sessionFlags",
2473 "plugin",
2474 "cloudRequirements",
2475 "cloudManagedConfig",
2476 "legacyManagedConfigFile",
2477 "legacyManagedConfigMdm",
2478 "unknown",
2479]).annotate({ identifier: "ServerNotification__HookSource" });
23182480
2319export type ServerNotification__ModelSafetyBufferingUpdatedNotification = {
2320 readonly fasterModel?: string | null;
2321 readonly model: string;
2322 readonly reasons: ReadonlyArray<string>;
2323 readonly showBufferingUi: boolean;
2481export type ServerNotification__HookRunStatus =
2482 | "running"
2483 | "completed"
2484 | "failed"
2485 | "blocked"
2486 | "stopped";
2487export const ServerNotification__HookRunStatus = Schema.Literals([
2488 "running",
2489 "completed",
2490 "failed",
2491 "blocked",
2492 "stopped",
2493]).annotate({ identifier: "ServerNotification__HookRunStatus" });
2494
2495export type ServerNotification__TurnDiffUpdatedNotification = {
2496 readonly diff: string;
23242497 readonly threadId: string;
23252498 readonly turnId: string;
2326 readonly useCases: ReadonlyArray<string>;
23272499};
2328export const ServerNotification__ModelSafetyBufferingUpdatedNotification = Schema.Struct({
2329 fasterModel: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2330 model: Schema.String,
2331 reasons: Schema.Array(Schema.String),
2332 showBufferingUi: Schema.Boolean,
2500export const ServerNotification__TurnDiffUpdatedNotification = Schema.Struct({
2501 diff: Schema.String,
23332502 threadId: Schema.String,
23342503 turnId: Schema.String,
2335 useCases: Schema.Array(Schema.String),
2504}).annotate({
2505 description:
2506 "Notification that the turn-level unified diff has changed. Contains the latest aggregated diff across all file changes in the turn.",
2507 identifier: "ServerNotification__TurnDiffUpdatedNotification",
23362508});
23372509
2338export type ServerNotification__ModelVerification = "trustedAccessForCyber";
2339export const ServerNotification__ModelVerification = Schema.Literal("trustedAccessForCyber");
2510export type ServerNotification__TurnPlanStepStatus = "pending" | "inProgress" | "completed";
2511export const ServerNotification__TurnPlanStepStatus = Schema.Literals([
2512 "pending",
2513 "inProgress",
2514 "completed",
2515]).annotate({ identifier: "ServerNotification__TurnPlanStepStatus" });
2516
2517export type ServerNotification__GuardianCommandSource = "shell" | "unifiedExec";
2518export const ServerNotification__GuardianCommandSource = Schema.Literals([
2519 "shell",
2520 "unifiedExec",
2521]).annotate({ identifier: "ServerNotification__GuardianCommandSource" });
23402522
23412523export type ServerNotification__NetworkApprovalProtocol =
23422524 | "http"
......@@ -2348,45 +2530,79 @@ export const ServerNotification__NetworkApprovalProtocol = Schema.Literals([
23482530 "https",
23492531 "socks5Tcp",
23502532 "socks5Udp",
2351]);
2533]).annotate({ identifier: "ServerNotification__NetworkApprovalProtocol" });
23522534
2353export type ServerNotification__NonSteerableTurnKind = "review" | "compact";
2354export const ServerNotification__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
2535export type ServerNotification__FileSystemAccessMode = "read" | "write" | "deny";
2536export const ServerNotification__FileSystemAccessMode = Schema.Literals([
2537 "read",
2538 "write",
2539 "deny",
2540]).annotate({ identifier: "ServerNotification__FileSystemAccessMode" });
23552541
2356export type ServerNotification__PatchApplyStatus =
2542export type ServerNotification__AdditionalNetworkPermissions = {
2543 readonly enabled?: boolean | null;
2544};
2545export const ServerNotification__AdditionalNetworkPermissions = Schema.Struct({
2546 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2547}).annotate({ identifier: "ServerNotification__AdditionalNetworkPermissions" });
2548
2549export type ServerNotification__GuardianRiskLevel = "low" | "medium" | "high" | "critical";
2550export const ServerNotification__GuardianRiskLevel = Schema.Literals([
2551 "low",
2552 "medium",
2553 "high",
2554 "critical",
2555]).annotate({
2556 description: "[UNSTABLE] Risk level assigned by approval auto-review.",
2557 identifier: "ServerNotification__GuardianRiskLevel",
2558});
2559
2560export type ServerNotification__GuardianApprovalReviewStatus =
23572561 | "inProgress"
2358 | "completed"
2359 | "failed"
2360 | "declined";
2361export const ServerNotification__PatchApplyStatus = Schema.Literals([
2562 | "approved"
2563 | "denied"
2564 | "timedOut"
2565 | "aborted";
2566export const ServerNotification__GuardianApprovalReviewStatus = Schema.Literals([
23622567 "inProgress",
2363 "completed",
2364 "failed",
2365 "declined",
2366]);
2568 "approved",
2569 "denied",
2570 "timedOut",
2571 "aborted",
2572]).annotate({
2573 description: "[UNSTABLE] Lifecycle state for an approval auto-review.",
2574 identifier: "ServerNotification__GuardianApprovalReviewStatus",
2575});
23672576
2368export type ServerNotification__PatchChangeKind =
2369 | { readonly type: "add" }
2370 | { readonly type: "delete" }
2371 | { readonly move_path?: string | null; readonly type: "update" };
2372export const ServerNotification__PatchChangeKind = Schema.Union(
2373 [
2374 Schema.Struct({
2375 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
2376 }).annotate({ title: "AddPatchChangeKind" }),
2377 Schema.Struct({
2378 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
2379 }).annotate({ title: "DeletePatchChangeKind" }),
2380 Schema.Struct({
2381 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2382 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
2383 }).annotate({ title: "UpdatePatchChangeKind" }),
2384 ],
2385 { mode: "oneOf" },
2386);
2577export type ServerNotification__GuardianUserAuthorization = "unknown" | "low" | "medium" | "high";
2578export const ServerNotification__GuardianUserAuthorization = Schema.Literals([
2579 "unknown",
2580 "low",
2581 "medium",
2582 "high",
2583]).annotate({
2584 description: "[UNSTABLE] Authorization level assigned by approval auto-review.",
2585 identifier: "ServerNotification__GuardianUserAuthorization",
2586});
23872587
2388export type ServerNotification__Personality = "none" | "friendly" | "pragmatic";
2389export const ServerNotification__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
2588export type ServerNotification__AutoReviewDecisionSource = "agent";
2589export const ServerNotification__AutoReviewDecisionSource = Schema.Literal("agent").annotate({
2590 description: "[UNSTABLE] Source that produced a terminal approval auto-review decision.",
2591 identifier: "ServerNotification__AutoReviewDecisionSource",
2592});
2593
2594export type ServerNotification__AgentMessageDeltaNotification = {
2595 readonly delta: string;
2596 readonly itemId: string;
2597 readonly threadId: string;
2598 readonly turnId: string;
2599};
2600export const ServerNotification__AgentMessageDeltaNotification = Schema.Struct({
2601 delta: Schema.String,
2602 itemId: Schema.String,
2603 threadId: Schema.String,
2604 turnId: Schema.String,
2605}).annotate({ identifier: "ServerNotification__AgentMessageDeltaNotification" });
23902606
23912607export type ServerNotification__PlanDeltaNotification = {
23922608 readonly delta: string;
......@@ -2402,45 +2618,36 @@ export const ServerNotification__PlanDeltaNotification = Schema.Struct({
24022618}).annotate({
24032619 description:
24042620 "EXPERIMENTAL - proposed plan streaming deltas for plan items. Clients should not assume concatenated deltas match the completed plan item content.",
2621 identifier: "ServerNotification__PlanDeltaNotification",
24052622});
24062623
2407export type ServerNotification__PlanType =
2408 | "free"
2409 | "go"
2410 | "plus"
2411 | "pro"
2412 | "prolite"
2413 | "team"
2414 | "self_serve_business_prolite"
2415 | "self_serve_business_usage_based"
2416 | "business"
2417 | "ent26"
2418 | "enterprise_cbp_automation"
2419 | "enterprise_cbp_usage_based"
2420 | "enterprise"
2421 | "edu"
2422 | "edu_plus"
2423 | "edu_pro"
2424 | "unknown";
2425export const ServerNotification__PlanType = Schema.Literals([
2426 "free",
2427 "go",
2428 "plus",
2429 "pro",
2430 "prolite",
2431 "team",
2432 "self_serve_business_prolite",
2433 "self_serve_business_usage_based",
2434 "business",
2435 "ent26",
2436 "enterprise_cbp_automation",
2437 "enterprise_cbp_usage_based",
2438 "enterprise",
2439 "edu",
2440 "edu_plus",
2441 "edu_pro",
2442 "unknown",
2443]);
2624export type ServerNotification__CommandExecOutputStream = "stdout" | "stderr";
2625export const ServerNotification__CommandExecOutputStream = Schema.Union(
2626 [
2627 Schema.Literal("stdout").annotate({
2628 description: "stdout stream. PTY mode multiplexes terminal output here.",
2629 }),
2630 Schema.Literal("stderr").annotate({ description: "stderr stream." }),
2631 ],
2632 { mode: "oneOf" },
2633).annotate({
2634 description: "Stream label for `command/exec/outputDelta` notifications.",
2635 identifier: "ServerNotification__CommandExecOutputStream",
2636});
2637
2638export type ServerNotification__ProcessOutputStream = "stdout" | "stderr";
2639export const ServerNotification__ProcessOutputStream = Schema.Union(
2640 [
2641 Schema.Literal("stdout").annotate({
2642 description: "stdout stream. PTY mode multiplexes terminal output here.",
2643 }),
2644 Schema.Literal("stderr").annotate({ description: "stderr stream." }),
2645 ],
2646 { mode: "oneOf" },
2647).annotate({
2648 description: "Stream label for `process/outputDelta` notifications.",
2649 identifier: "ServerNotification__ProcessOutputStream",
2650});
24442651
24452652export type ServerNotification__ProcessExitedNotification = {
24462653 readonly exitCode: number;
......@@ -2452,7 +2659,7 @@ export type ServerNotification__ProcessExitedNotification = {
24522659};
24532660export const ServerNotification__ProcessExitedNotification = Schema.Struct({
24542661 exitCode: Schema.Number.annotate({ description: "Process exit code.", format: "int32" }).check(
2455 Schema.isInt(),
2662 Schema.isInt().annotate({ expected: "an integer" }),
24562663 ),
24572664 processHandle: Schema.String.annotate({
24582665 description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.",
......@@ -2473,146 +2680,195 @@ export const ServerNotification__ProcessExitedNotification = Schema.Struct({
24732680 description:
24742681 "Whether stdout reached `outputBytesCap`.\n\nIn streaming mode, stdout is empty and cap state is also reported on the final stdout `process/outputDelta` notification.",
24752682 }),
2476}).annotate({ description: "Final process exit notification for `process/spawn`." });
2477
2478export type ServerNotification__ProcessOutputDeltaNotification = {
2479 readonly capReached: boolean;
2480 readonly deltaBase64: string;
2481 readonly processHandle: string;
2482 readonly stream: "stdout" | "stderr";
2483};
2484export const ServerNotification__ProcessOutputDeltaNotification = Schema.Struct({
2485 capReached: Schema.Boolean.annotate({
2486 description:
2487 "True on the final streamed chunk for this stream when output was truncated by `outputBytesCap`.",
2488 }),
2489 deltaBase64: Schema.String.annotate({ description: "Base64-encoded output bytes." }),
2490 processHandle: Schema.String.annotate({
2491 description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.",
2492 }),
2493 stream: Schema.Literals(["stdout", "stderr"]).annotate({
2494 description: "Stream label for `process/outputDelta` notifications.",
2495 }),
24962683}).annotate({
2497 description: "Base64-encoded output chunk emitted for a streaming `process/spawn` request.",
2498});
2499
2500export type ServerNotification__RateLimitReachedType =
2501 | "rate_limit_reached"
2502 | "workspace_owner_credits_depleted"
2503 | "workspace_member_credits_depleted"
2504 | "workspace_owner_usage_limit_reached"
2505 | "workspace_member_usage_limit_reached";
2506export const ServerNotification__RateLimitReachedType = Schema.Literals([
2507 "rate_limit_reached",
2508 "workspace_owner_credits_depleted",
2509 "workspace_member_credits_depleted",
2510 "workspace_owner_usage_limit_reached",
2511 "workspace_member_usage_limit_reached",
2512]);
2513
2514export type ServerNotification__RateLimitWindow = {
2515 readonly resetsAt?: number | null;
2516 readonly usedPercent: number;
2517 readonly windowDurationMins?: number | null;
2518};
2519export const ServerNotification__RateLimitWindow = Schema.Struct({
2520 resetsAt: Schema.optionalKey(
2521 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
2522 ),
2523 usedPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
2524 windowDurationMins: Schema.optionalKey(
2525 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
2526 ),
2527});
2528
2529export type ServerNotification__RealtimeConversationVersion = "v1" | "v2" | "v3";
2530export const ServerNotification__RealtimeConversationVersion = Schema.Literals(["v1", "v2", "v3"]);
2531
2532export type ServerNotification__ReasoningEffort = string;
2533export const ServerNotification__ReasoningEffort = Schema.String.annotate({
2534 description: "A non-empty reasoning effort value advertised by the model.",
2535}).check(Schema.isMinLength(1));
2536
2537export type ServerNotification__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
2538export const ServerNotification__ReasoningSummary = Schema.Union(
2539 [
2540 Schema.Literals(["auto", "concise", "detailed"]),
2541 Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
2542 ],
2543 { mode: "oneOf" },
2544).annotate({
2545 description:
2546 "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
2684 description: "Final process exit notification for `process/spawn`.",
2685 identifier: "ServerNotification__ProcessExitedNotification",
25472686});
25482687
2549export type ServerNotification__ReasoningSummaryPartAddedNotification = {
2688export type ServerNotification__CommandExecutionOutputDeltaNotification = {
2689 readonly delta: string;
25502690 readonly itemId: string;
2551 readonly summaryIndex: number;
25522691 readonly threadId: string;
25532692 readonly turnId: string;
25542693};
2555export const ServerNotification__ReasoningSummaryPartAddedNotification = Schema.Struct({
2694export const ServerNotification__CommandExecutionOutputDeltaNotification = Schema.Struct({
2695 delta: Schema.String,
25562696 itemId: Schema.String,
2557 summaryIndex: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
25582697 threadId: Schema.String,
25592698 turnId: Schema.String,
2560});
2699}).annotate({ identifier: "ServerNotification__CommandExecutionOutputDeltaNotification" });
25612700
2562export type ServerNotification__ReasoningSummaryTextDeltaNotification = {
2563 readonly delta: string;
2701export type ServerNotification__TerminalInteractionNotification = {
25642702 readonly itemId: string;
2565 readonly summaryIndex: number;
2703 readonly processId: string;
2704 readonly stdin: string;
25662705 readonly threadId: string;
25672706 readonly turnId: string;
25682707};
2569export const ServerNotification__ReasoningSummaryTextDeltaNotification = Schema.Struct({
2570 delta: Schema.String,
2708export const ServerNotification__TerminalInteractionNotification = Schema.Struct({
25712709 itemId: Schema.String,
2572 summaryIndex: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2710 processId: Schema.String,
2711 stdin: Schema.String,
25732712 threadId: Schema.String,
25742713 turnId: Schema.String,
2575});
2714}).annotate({ identifier: "ServerNotification__TerminalInteractionNotification" });
25762715
2577export type ServerNotification__ReasoningTextDeltaNotification = {
2578 readonly contentIndex: number;
2716export type ServerNotification__FileChangeOutputDeltaNotification = {
25792717 readonly delta: string;
25802718 readonly itemId: string;
25812719 readonly threadId: string;
25822720 readonly turnId: string;
25832721};
2584export const ServerNotification__ReasoningTextDeltaNotification = Schema.Struct({
2585 contentIndex: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2722export const ServerNotification__FileChangeOutputDeltaNotification = Schema.Struct({
25862723 delta: Schema.String,
25872724 itemId: Schema.String,
25882725 threadId: Schema.String,
25892726 turnId: Schema.String,
2727}).annotate({
2728 description:
2729 "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.",
2730 identifier: "ServerNotification__FileChangeOutputDeltaNotification",
25902731});
25912732
2592export type ServerNotification__RemoteControlConnectionStatus =
2593 | "disabled"
2594 | "connecting"
2595 | "connected"
2596 | "errored";
2597export const ServerNotification__RemoteControlConnectionStatus = Schema.Literals([
2598 "disabled",
2599 "connecting",
2600 "connected",
2601 "errored",
2602]);
2603
26042733export type ServerNotification__RequestId = string | number;
26052734export const ServerNotification__RequestId = Schema.Union([
26062735 Schema.String,
2607 Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2608]);
2736 Schema.Number.annotate({ format: "int64" }).check(
2737 Schema.isInt().annotate({ expected: "an integer" }),
2738 ),
2739]).annotate({ identifier: "ServerNotification__RequestId" });
26092740
2610export type ServerNotification__SkillsChangedNotification = {};
2611export const ServerNotification__SkillsChangedNotification = Schema.Struct({}).annotate({
2612 description:
2613 "Notification emitted when watched local skill files change.\n\nTreat this as an invalidation signal and re-run `skills/list` with the client's current parameters when refreshed skill metadata is needed.",
2741export type ServerNotification__McpToolCallProgressNotification = {
2742 readonly itemId: string;
2743 readonly message: string;
2744 readonly threadId: string;
2745 readonly turnId: string;
2746};
2747export const ServerNotification__McpToolCallProgressNotification = Schema.Struct({
2748 itemId: Schema.String,
2749 message: Schema.String,
2750 threadId: Schema.String,
2751 turnId: Schema.String,
2752}).annotate({ identifier: "ServerNotification__McpToolCallProgressNotification" });
2753
2754export type ServerNotification__McpServerOauthLoginCompletedNotification = {
2755 readonly error?: string | null;
2756 readonly name: string;
2757 readonly success: boolean;
2758 readonly threadId?: string | null;
2759};
2760export const ServerNotification__McpServerOauthLoginCompletedNotification = Schema.Struct({
2761 error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2762 name: Schema.String,
2763 success: Schema.Boolean,
2764 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2765}).annotate({ identifier: "ServerNotification__McpServerOauthLoginCompletedNotification" });
2766
2767export type ServerNotification__McpServerStartupFailureReason = "reauthenticationRequired";
2768export const ServerNotification__McpServerStartupFailureReason = Schema.Literal(
2769 "reauthenticationRequired",
2770).annotate({ identifier: "ServerNotification__McpServerStartupFailureReason" });
2771
2772export type ServerNotification__McpServerStartupState =
2773 | "starting"
2774 | "ready"
2775 | "failed"
2776 | "cancelled";
2777export const ServerNotification__McpServerStartupState = Schema.Literals([
2778 "starting",
2779 "ready",
2780 "failed",
2781 "cancelled",
2782]).annotate({ identifier: "ServerNotification__McpServerStartupState" });
2783
2784export type ServerNotification__AuthMode =
2785 | "apikey"
2786 | "chatgpt"
2787 | "chatgptAuthTokens"
2788 | "headers"
2789 | "agentIdentity"
2790 | "personalAccessToken"
2791 | "bedrockApiKey";
2792export const ServerNotification__AuthMode = Schema.Union(
2793 [
2794 Schema.Literal("apikey").annotate({
2795 description: "OpenAI API key provided by the caller and stored by Codex.",
2796 }),
2797 Schema.Literal("chatgpt").annotate({
2798 description: "ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).",
2799 }),
2800 Schema.Literal("chatgptAuthTokens").annotate({
2801 description:
2802 "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE.\n\nChatGPT auth tokens are supplied by an external host app and are only stored in memory. Token refresh must be handled by the external host app.",
2803 }),
2804 Schema.Literal("headers").annotate({
2805 description: "Backend auth supplied as request headers.",
2806 }),
2807 Schema.Literal("agentIdentity").annotate({
2808 description: "Programmatic Codex auth backed by a registered Agent Identity.",
2809 }),
2810 Schema.Literal("personalAccessToken").annotate({
2811 description: "Programmatic Codex auth backed by a personal access token.",
2812 }),
2813 Schema.Literal("bedrockApiKey").annotate({
2814 description: "Amazon Bedrock bearer token managed by Codex.",
2815 }),
2816 ],
2817 { mode: "oneOf" },
2818).annotate({
2819 description: "Authentication mode for OpenAI-backed providers.",
2820 identifier: "ServerNotification__AuthMode",
26142821});
26152822
2823export type ServerNotification__PlanType =
2824 | "free"
2825 | "go"
2826 | "plus"
2827 | "pro"
2828 | "prolite"
2829 | "team"
2830 | "self_serve_business_prolite"
2831 | "self_serve_business_usage_based"
2832 | "business"
2833 | "ent26"
2834 | "enterprise_cbp_automation"
2835 | "enterprise_cbp_usage_based"
2836 | "enterprise"
2837 | "edu"
2838 | "edu_plus"
2839 | "edu_pro"
2840 | "unknown";
2841export const ServerNotification__PlanType = Schema.Literals([
2842 "free",
2843 "go",
2844 "plus",
2845 "pro",
2846 "prolite",
2847 "team",
2848 "self_serve_business_prolite",
2849 "self_serve_business_usage_based",
2850 "business",
2851 "ent26",
2852 "enterprise_cbp_automation",
2853 "enterprise_cbp_usage_based",
2854 "enterprise",
2855 "edu",
2856 "edu_plus",
2857 "edu_pro",
2858 "unknown",
2859]).annotate({ identifier: "ServerNotification__PlanType" });
2860
2861export type ServerNotification__CreditsSnapshot = {
2862 readonly balance?: string | null;
2863 readonly hasCredits: boolean;
2864 readonly unlimited: boolean;
2865};
2866export const ServerNotification__CreditsSnapshot = Schema.Struct({
2867 balance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2868 hasCredits: Schema.Boolean,
2869 unlimited: Schema.Boolean,
2870}).annotate({ identifier: "ServerNotification__CreditsSnapshot" });
2871
26162872export type ServerNotification__SpendControlLimitSnapshot = {
26172873 readonly limit: string;
26182874 readonly remainingPercent: number;
......@@ -2621,62 +2877,271 @@ export type ServerNotification__SpendControlLimitSnapshot = {
26212877};
26222878export const ServerNotification__SpendControlLimitSnapshot = Schema.Struct({
26232879 limit: Schema.String,
2624 remainingPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
2625 resetsAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2880 remainingPercent: Schema.Number.annotate({ format: "int32" }).check(
2881 Schema.isInt().annotate({ expected: "an integer" }),
2882 ),
2883 resetsAt: Schema.Number.annotate({ format: "int64" }).check(
2884 Schema.isInt().annotate({ expected: "an integer" }),
2885 ),
26262886 used: Schema.String,
2887}).annotate({ identifier: "ServerNotification__SpendControlLimitSnapshot" });
2888
2889export type ServerNotification__RateLimitWindow = {
2890 readonly resetsAt?: number | null;
2891 readonly usedPercent: number;
2892 readonly windowDurationMins?: number | null;
2893};
2894export const ServerNotification__RateLimitWindow = Schema.Struct({
2895 resetsAt: Schema.optionalKey(
2896 Schema.Union([
2897 Schema.Number.annotate({ format: "int64" }).check(
2898 Schema.isInt().annotate({ expected: "an integer" }),
2899 ),
2900 Schema.Null,
2901 ]),
2902 ),
2903 usedPercent: Schema.Number.annotate({ format: "int32" }).check(
2904 Schema.isInt().annotate({ expected: "an integer" }),
2905 ),
2906 windowDurationMins: Schema.optionalKey(
2907 Schema.Union([
2908 Schema.Number.annotate({ format: "int64" }).check(
2909 Schema.isInt().annotate({ expected: "an integer" }),
2910 ),
2911 Schema.Null,
2912 ]),
2913 ),
2914}).annotate({ identifier: "ServerNotification__RateLimitWindow" });
2915
2916export type ServerNotification__RateLimitReachedType =
2917 | "rate_limit_reached"
2918 | "workspace_owner_credits_depleted"
2919 | "workspace_member_credits_depleted"
2920 | "workspace_owner_usage_limit_reached"
2921 | "workspace_member_usage_limit_reached";
2922export const ServerNotification__RateLimitReachedType = Schema.Literals([
2923 "rate_limit_reached",
2924 "workspace_owner_credits_depleted",
2925 "workspace_member_credits_depleted",
2926 "workspace_owner_usage_limit_reached",
2927 "workspace_member_usage_limit_reached",
2928]).annotate({ identifier: "ServerNotification__RateLimitReachedType" });
2929
2930export type ServerNotification__AppReview = { readonly status: string };
2931export const ServerNotification__AppReview = Schema.Struct({ status: Schema.String }).annotate({
2932 identifier: "ServerNotification__AppReview",
26272933});
26282934
2629export type ServerNotification__SubAgentActivityKind =
2630 | "started"
2631 | "interacted"
2632 | "interrupted"
2633 | "completed";
2634export const ServerNotification__SubAgentActivityKind = Schema.Literals([
2635 "started",
2636 "interacted",
2637 "interrupted",
2638 "completed",
2639]);
2935export type ServerNotification__AppScreenshot = {
2936 readonly fileId?: string | null;
2937 readonly url?: string | null;
2938 readonly userPrompt: string;
2939};
2940export const ServerNotification__AppScreenshot = Schema.Struct({
2941 fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2942 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2943 userPrompt: Schema.String,
2944}).annotate({ identifier: "ServerNotification__AppScreenshot" });
26402945
2641export type ServerNotification__TerminalInteractionNotification = {
2946export type ServerNotification__AppBranding = {
2947 readonly category?: string | null;
2948 readonly developer?: string | null;
2949 readonly isDiscoverableApp: boolean;
2950 readonly privacyPolicy?: string | null;
2951 readonly termsOfService?: string | null;
2952 readonly website?: string | null;
2953};
2954export const ServerNotification__AppBranding = Schema.Struct({
2955 category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2956 developer: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2957 isDiscoverableApp: Schema.Boolean,
2958 privacyPolicy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2959 termsOfService: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2960 website: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2961}).annotate({
2962 description: "EXPERIMENTAL - app metadata returned by app-list APIs.",
2963 identifier: "ServerNotification__AppBranding",
2964});
2965
2966export type ServerNotification__RemoteControlConnectionStatus =
2967 | "disabled"
2968 | "connecting"
2969 | "connected"
2970 | "errored";
2971export const ServerNotification__RemoteControlConnectionStatus = Schema.Literals([
2972 "disabled",
2973 "connecting",
2974 "connected",
2975 "errored",
2976]).annotate({ identifier: "ServerNotification__RemoteControlConnectionStatus" });
2977
2978export type ServerNotification__ExternalAgentConfigMigrationItemType =
2979 | "AGENTS_MD"
2980 | "CONFIG"
2981 | "SKILLS"
2982 | "PLUGINS"
2983 | "MCP_SERVER_CONFIG"
2984 | "SUBAGENTS"
2985 | "HOOKS"
2986 | "COMMANDS"
2987 | "MEMORY"
2988 | "SESSIONS";
2989export const ServerNotification__ExternalAgentConfigMigrationItemType = Schema.Literals([
2990 "AGENTS_MD",
2991 "CONFIG",
2992 "SKILLS",
2993 "PLUGINS",
2994 "MCP_SERVER_CONFIG",
2995 "SUBAGENTS",
2996 "HOOKS",
2997 "COMMANDS",
2998 "MEMORY",
2999 "SESSIONS",
3000]).annotate({ identifier: "ServerNotification__ExternalAgentConfigMigrationItemType" });
3001
3002export type ServerNotification__ReasoningSummaryTextDeltaNotification = {
3003 readonly delta: string;
26423004 readonly itemId: string;
2643 readonly processId: string;
2644 readonly stdin: string;
3005 readonly summaryIndex: number;
26453006 readonly threadId: string;
26463007 readonly turnId: string;
26473008};
2648export const ServerNotification__TerminalInteractionNotification = Schema.Struct({
3009export const ServerNotification__ReasoningSummaryTextDeltaNotification = Schema.Struct({
3010 delta: Schema.String,
26493011 itemId: Schema.String,
2650 processId: Schema.String,
2651 stdin: Schema.String,
3012 summaryIndex: Schema.Number.annotate({ format: "int64" }).check(
3013 Schema.isInt().annotate({ expected: "an integer" }),
3014 ),
3015 threadId: Schema.String,
3016 turnId: Schema.String,
3017}).annotate({ identifier: "ServerNotification__ReasoningSummaryTextDeltaNotification" });
3018
3019export type ServerNotification__ReasoningSummaryPartAddedNotification = {
3020 readonly itemId: string;
3021 readonly summaryIndex: number;
3022 readonly threadId: string;
3023 readonly turnId: string;
3024};
3025export const ServerNotification__ReasoningSummaryPartAddedNotification = Schema.Struct({
3026 itemId: Schema.String,
3027 summaryIndex: Schema.Number.annotate({ format: "int64" }).check(
3028 Schema.isInt().annotate({ expected: "an integer" }),
3029 ),
3030 threadId: Schema.String,
3031 turnId: Schema.String,
3032}).annotate({ identifier: "ServerNotification__ReasoningSummaryPartAddedNotification" });
3033
3034export type ServerNotification__ReasoningTextDeltaNotification = {
3035 readonly contentIndex: number;
3036 readonly delta: string;
3037 readonly itemId: string;
3038 readonly threadId: string;
3039 readonly turnId: string;
3040};
3041export const ServerNotification__ReasoningTextDeltaNotification = Schema.Struct({
3042 contentIndex: Schema.Number.annotate({ format: "int64" }).check(
3043 Schema.isInt().annotate({ expected: "an integer" }),
3044 ),
3045 delta: Schema.String,
3046 itemId: Schema.String,
3047 threadId: Schema.String,
3048 turnId: Schema.String,
3049}).annotate({ identifier: "ServerNotification__ReasoningTextDeltaNotification" });
3050
3051export type ServerNotification__ContextCompactedNotification = {
3052 readonly threadId: string;
3053 readonly turnId: string;
3054};
3055export const ServerNotification__ContextCompactedNotification = Schema.Struct({
26523056 threadId: Schema.String,
26533057 turnId: Schema.String,
3058}).annotate({
3059 description: "Deprecated: Use `ContextCompaction` item type instead.",
3060 identifier: "ServerNotification__ContextCompactedNotification",
26543061});
26553062
2656export type ServerNotification__TextElement = {
2657 readonly byteRange: { readonly end: number; readonly start: number };
2658 readonly placeholder?: string | null;
3063export type ServerNotification__ModelRerouteReason = "highRiskCyberActivity";
3064export const ServerNotification__ModelRerouteReason = Schema.Literal(
3065 "highRiskCyberActivity",
3066).annotate({ identifier: "ServerNotification__ModelRerouteReason" });
3067
3068export type ServerNotification__ModelVerification = "trustedAccessForCyber";
3069export const ServerNotification__ModelVerification = Schema.Literal(
3070 "trustedAccessForCyber",
3071).annotate({ identifier: "ServerNotification__ModelVerification" });
3072
3073export type ServerNotification__TurnModerationMetadataNotification = {
3074 readonly metadata: Schema.Json;
3075 readonly threadId: string;
3076 readonly turnId: string;
26593077};
2660export const ServerNotification__TextElement = Schema.Struct({
2661 byteRange: Schema.Struct({
2662 end: Schema.Number.annotate({ format: "uint" })
2663 .check(Schema.isInt())
2664 .check(Schema.isGreaterThanOrEqualTo(0)),
2665 start: Schema.Number.annotate({ format: "uint" })
2666 .check(Schema.isInt())
2667 .check(Schema.isGreaterThanOrEqualTo(0)),
2668 }).annotate({
2669 description: "Byte range in the parent `text` buffer that this element occupies.",
3078export const ServerNotification__TurnModerationMetadataNotification = Schema.Struct({
3079 metadata: Schema.Json.annotate({ expected: "JSON value" }),
3080 threadId: Schema.String,
3081 turnId: Schema.String,
3082}).annotate({ identifier: "ServerNotification__TurnModerationMetadataNotification" });
3083
3084export type ServerNotification__ModelSafetyBufferingUpdatedNotification = {
3085 readonly fasterModel?: string | null;
3086 readonly model: string;
3087 readonly reasons: ReadonlyArray<string>;
3088 readonly showBufferingUi: boolean;
3089 readonly threadId: string;
3090 readonly turnId: string;
3091 readonly useCases: ReadonlyArray<string>;
3092};
3093export const ServerNotification__ModelSafetyBufferingUpdatedNotification = Schema.Struct({
3094 fasterModel: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3095 model: Schema.String,
3096 reasons: Schema.Array(Schema.String),
3097 showBufferingUi: Schema.Boolean,
3098 threadId: Schema.String,
3099 turnId: Schema.String,
3100 useCases: Schema.Array(Schema.String),
3101}).annotate({ identifier: "ServerNotification__ModelSafetyBufferingUpdatedNotification" });
3102
3103export type ServerNotification__WarningNotification = {
3104 readonly message: string;
3105 readonly threadId?: string | null;
3106};
3107export const ServerNotification__WarningNotification = Schema.Struct({
3108 message: Schema.String.annotate({ description: "Concise warning message for the user." }),
3109 threadId: Schema.optionalKey(
3110 Schema.Union([
3111 Schema.String.annotate({
3112 description: "Optional thread target when the warning applies to a specific thread.",
3113 }),
3114 Schema.Null,
3115 ]),
3116 ),
3117}).annotate({ identifier: "ServerNotification__WarningNotification" });
3118
3119export type ServerNotification__GuardianWarningNotification = {
3120 readonly message: string;
3121 readonly threadId: string;
3122};
3123export const ServerNotification__GuardianWarningNotification = Schema.Struct({
3124 message: Schema.String.annotate({
3125 description: "Concise guardian warning message for the user.",
26703126 }),
2671 placeholder: Schema.optionalKey(
3127 threadId: Schema.String.annotate({ description: "Thread target for the guardian warning." }),
3128}).annotate({ identifier: "ServerNotification__GuardianWarningNotification" });
3129
3130export type ServerNotification__DeprecationNoticeNotification = {
3131 readonly details?: string | null;
3132 readonly summary: string;
3133};
3134export const ServerNotification__DeprecationNoticeNotification = Schema.Struct({
3135 details: Schema.optionalKey(
26723136 Schema.Union([
26733137 Schema.String.annotate({
2674 description: "Optional human-readable placeholder for the element, displayed in the UI.",
3138 description: "Optional extra guidance, such as migration steps or rationale.",
26753139 }),
26763140 Schema.Null,
26773141 ]),
26783142 ),
2679});
3143 summary: Schema.String.annotate({ description: "Concise summary of what is deprecated." }),
3144}).annotate({ identifier: "ServerNotification__DeprecationNoticeNotification" });
26803145
26813146export type ServerNotification__TextPosition = { readonly column: number; readonly line: number };
26823147export const ServerNotification__TextPosition = Schema.Struct({
......@@ -2684,65 +3149,77 @@ export const ServerNotification__TextPosition = Schema.Struct({
26843149 description: "1-based column number (in Unicode scalar values).",
26853150 format: "uint",
26863151 })
2687 .check(Schema.isInt())
2688 .check(Schema.isGreaterThanOrEqualTo(0)),
3152 .check(Schema.isInt().annotate({ expected: "an integer" }))
3153 .check(
3154 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
3155 ),
26893156 line: Schema.Number.annotate({ description: "1-based line number.", format: "uint" })
2690 .check(Schema.isInt())
2691 .check(Schema.isGreaterThanOrEqualTo(0)),
2692});
3157 .check(Schema.isInt().annotate({ expected: "an integer" }))
3158 .check(
3159 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
3160 ),
3161}).annotate({ identifier: "ServerNotification__TextPosition" });
26933162
2694export type ServerNotification__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
2695export const ServerNotification__ThreadActiveFlag = Schema.Literals([
2696 "waitingOnApproval",
2697 "waitingOnUserInput",
2698]);
3163export type ServerNotification__FuzzyFileSearchMatchType = "file" | "directory";
3164export const ServerNotification__FuzzyFileSearchMatchType = Schema.Literals([
3165 "file",
3166 "directory",
3167]).annotate({ identifier: "ServerNotification__FuzzyFileSearchMatchType" });
26993168
2700export type ServerNotification__ThreadArchivedNotification = { readonly threadId: string };
2701export const ServerNotification__ThreadArchivedNotification = Schema.Struct({
2702 threadId: Schema.String,
2703});
3169export type ServerNotification__FuzzyFileSearchSessionCompletedNotification = {
3170 readonly sessionId: string;
3171};
3172export const ServerNotification__FuzzyFileSearchSessionCompletedNotification = Schema.Struct({
3173 sessionId: Schema.String,
3174}).annotate({ identifier: "ServerNotification__FuzzyFileSearchSessionCompletedNotification" });
27043175
2705export type ServerNotification__ThreadClosedNotification = { readonly threadId: string };
2706export const ServerNotification__ThreadClosedNotification = Schema.Struct({
2707 threadId: Schema.String,
2708});
3176export type ServerNotification__RealtimeConversationVersion = "v1" | "v2" | "v3";
3177export const ServerNotification__RealtimeConversationVersion = Schema.Literals([
3178 "v1",
3179 "v2",
3180 "v3",
3181]).annotate({ identifier: "ServerNotification__RealtimeConversationVersion" });
27093182
2710export type ServerNotification__ThreadDeletedNotification = { readonly threadId: string };
2711export const ServerNotification__ThreadDeletedNotification = Schema.Struct({
3183export type ServerNotification__ThreadRealtimeItemAddedNotification = {
3184 readonly item: Schema.Json;
3185 readonly threadId: string;
3186};
3187export const ServerNotification__ThreadRealtimeItemAddedNotification = Schema.Struct({
3188 item: Schema.Json.annotate({ expected: "JSON value" }),
27123189 threadId: Schema.String,
3190}).annotate({
3191 description: "EXPERIMENTAL - raw non-audio thread realtime item emitted by the backend.",
3192 identifier: "ServerNotification__ThreadRealtimeItemAddedNotification",
27133193});
27143194
2715export type ServerNotification__ThreadGoalClearedNotification = { readonly threadId: string };
2716export const ServerNotification__ThreadGoalClearedNotification = Schema.Struct({
3195export type ServerNotification__ThreadRealtimeTranscriptDeltaNotification = {
3196 readonly delta: string;
3197 readonly role: string;
3198 readonly threadId: string;
3199};
3200export const ServerNotification__ThreadRealtimeTranscriptDeltaNotification = Schema.Struct({
3201 delta: Schema.String.annotate({ description: "Live transcript delta from the realtime event." }),
3202 role: Schema.String,
27173203 threadId: Schema.String,
3204}).annotate({
3205 description:
3206 "EXPERIMENTAL - flat transcript delta emitted whenever realtime transcript text changes.",
3207 identifier: "ServerNotification__ThreadRealtimeTranscriptDeltaNotification",
27183208});
27193209
2720export type ServerNotification__ThreadGoalStatus =
2721 | "active"
2722 | "paused"
2723 | "blocked"
2724 | "usageLimited"
2725 | "budgetLimited"
2726 | "complete";
2727export const ServerNotification__ThreadGoalStatus = Schema.Literals([
2728 "active",
2729 "paused",
2730 "blocked",
2731 "usageLimited",
2732 "budgetLimited",
2733 "complete",
2734]);
2735
2736export type ServerNotification__ThreadId = string;
2737export const ServerNotification__ThreadId = Schema.String;
2738
2739export type ServerNotification__ThreadNameUpdatedNotification = {
3210export type ServerNotification__ThreadRealtimeTranscriptDoneNotification = {
3211 readonly role: string;
3212 readonly text: string;
27403213 readonly threadId: string;
2741 readonly threadName?: string | null;
27423214};
2743export const ServerNotification__ThreadNameUpdatedNotification = Schema.Struct({
3215export const ServerNotification__ThreadRealtimeTranscriptDoneNotification = Schema.Struct({
3216 role: Schema.String,
3217 text: Schema.String.annotate({ description: "Final complete text for the transcript part." }),
27443218 threadId: Schema.String,
2745 threadName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3219}).annotate({
3220 description:
3221 "EXPERIMENTAL - final transcript text emitted when realtime completes a transcript part.",
3222 identifier: "ServerNotification__ThreadRealtimeTranscriptDoneNotification",
27463223});
27473224
27483225export type ServerNotification__ThreadRealtimeAudioChunk = {
......@@ -2756,48 +3233,30 @@ export const ServerNotification__ThreadRealtimeAudioChunk = Schema.Struct({
27563233 data: Schema.String,
27573234 itemId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27583235 numChannels: Schema.Number.annotate({ format: "uint16" })
2759 .check(Schema.isInt())
2760 .check(Schema.isGreaterThanOrEqualTo(0)),
3236 .check(Schema.isInt().annotate({ expected: "an integer" }))
3237 .check(
3238 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
3239 ),
27613240 sampleRate: Schema.Number.annotate({ format: "uint32" })
2762 .check(Schema.isInt())
2763 .check(Schema.isGreaterThanOrEqualTo(0)),
3241 .check(Schema.isInt().annotate({ expected: "an integer" }))
3242 .check(
3243 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
3244 ),
27643245 samplesPerChannel: Schema.optionalKey(
27653246 Schema.Union([
27663247 Schema.Number.annotate({ format: "uint32" })
2767 .check(Schema.isInt())
2768 .check(Schema.isGreaterThanOrEqualTo(0)),
3248 .check(Schema.isInt().annotate({ expected: "an integer" }))
3249 .check(
3250 Schema.isGreaterThanOrEqualTo(0).annotate({
3251 expected: "a value greater than or equal to 0",
3252 }),
3253 ),
27693254 Schema.Null,
27703255 ]),
27713256 ),
2772}).annotate({ description: "EXPERIMENTAL - thread realtime audio chunk." });
2773
2774export type ServerNotification__ThreadRealtimeClosedNotification = {
2775 readonly reason?: string | null;
2776 readonly threadId: string;
2777};
2778export const ServerNotification__ThreadRealtimeClosedNotification = Schema.Struct({
2779 reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2780 threadId: Schema.String,
2781}).annotate({ description: "EXPERIMENTAL - emitted when thread realtime transport closes." });
2782
2783export type ServerNotification__ThreadRealtimeErrorNotification = {
2784 readonly message: string;
2785 readonly threadId: string;
2786};
2787export const ServerNotification__ThreadRealtimeErrorNotification = Schema.Struct({
2788 message: Schema.String,
2789 threadId: Schema.String,
2790}).annotate({ description: "EXPERIMENTAL - emitted when thread realtime encounters an error." });
2791
2792export type ServerNotification__ThreadRealtimeItemAddedNotification = {
2793 readonly item: unknown;
2794 readonly threadId: string;
2795};
2796export const ServerNotification__ThreadRealtimeItemAddedNotification = Schema.Struct({
2797 item: Schema.Unknown,
2798 threadId: Schema.String,
27993257}).annotate({
2800 description: "EXPERIMENTAL - raw non-audio thread realtime item emitted by the backend.",
3258 description: "EXPERIMENTAL - thread realtime audio chunk.",
3259 identifier: "ServerNotification__ThreadRealtimeAudioChunk",
28013260});
28023261
28033262export type ServerNotification__ThreadRealtimeSdpNotification = {
......@@ -2809,189 +3268,202 @@ export const ServerNotification__ThreadRealtimeSdpNotification = Schema.Struct({
28093268 threadId: Schema.String,
28103269}).annotate({
28113270 description: "EXPERIMENTAL - emitted with the remote SDP for a WebRTC realtime session.",
3271 identifier: "ServerNotification__ThreadRealtimeSdpNotification",
28123272});
28133273
2814export type ServerNotification__ThreadRealtimeTranscriptDeltaNotification = {
2815 readonly delta: string;
2816 readonly role: string;
3274export type ServerNotification__ThreadRealtimeErrorNotification = {
3275 readonly message: string;
28173276 readonly threadId: string;
28183277};
2819export const ServerNotification__ThreadRealtimeTranscriptDeltaNotification = Schema.Struct({
2820 delta: Schema.String.annotate({ description: "Live transcript delta from the realtime event." }),
2821 role: Schema.String,
3278export const ServerNotification__ThreadRealtimeErrorNotification = Schema.Struct({
3279 message: Schema.String,
28223280 threadId: Schema.String,
28233281}).annotate({
2824 description:
2825 "EXPERIMENTAL - flat transcript delta emitted whenever realtime transcript text changes.",
3282 description: "EXPERIMENTAL - emitted when thread realtime encounters an error.",
3283 identifier: "ServerNotification__ThreadRealtimeErrorNotification",
28263284});
28273285
2828export type ServerNotification__ThreadRealtimeTranscriptDoneNotification = {
2829 readonly role: string;
2830 readonly text: string;
3286export type ServerNotification__ThreadRealtimeClosedNotification = {
3287 readonly reason?: string | null;
28313288 readonly threadId: string;
28323289};
2833export const ServerNotification__ThreadRealtimeTranscriptDoneNotification = Schema.Struct({
2834 role: Schema.String,
2835 text: Schema.String.annotate({ description: "Final complete text for the transcript part." }),
3290export const ServerNotification__ThreadRealtimeClosedNotification = Schema.Struct({
3291 reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28363292 threadId: Schema.String,
28373293}).annotate({
2838 description:
2839 "EXPERIMENTAL - final transcript text emitted when realtime completes a transcript part.",
3294 description: "EXPERIMENTAL - emitted when thread realtime transport closes.",
3295 identifier: "ServerNotification__ThreadRealtimeClosedNotification",
28403296});
28413297
2842export type ServerNotification__ThreadSource = string;
2843export const ServerNotification__ThreadSource = Schema.String;
3298export type ServerNotification__WindowsWorldWritableWarningNotification = {
3299 readonly extraCount: number;
3300 readonly failedScan: boolean;
3301 readonly samplePaths: ReadonlyArray<string>;
3302};
3303export const ServerNotification__WindowsWorldWritableWarningNotification = Schema.Struct({
3304 extraCount: Schema.Number.annotate({ format: "uint" })
3305 .check(Schema.isInt().annotate({ expected: "an integer" }))
3306 .check(
3307 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
3308 ),
3309 failedScan: Schema.Boolean,
3310 samplePaths: Schema.Array(Schema.String),
3311}).annotate({ identifier: "ServerNotification__WindowsWorldWritableWarningNotification" });
28443312
2845export type ServerNotification__ThreadUnarchivedNotification = { readonly threadId: string };
2846export const ServerNotification__ThreadUnarchivedNotification = Schema.Struct({
2847 threadId: Schema.String,
2848});
3313export type ServerNotification__WindowsSandboxSetupMode = "elevated" | "unelevated";
3314export const ServerNotification__WindowsSandboxSetupMode = Schema.Literals([
3315 "elevated",
3316 "unelevated",
3317]).annotate({ identifier: "ServerNotification__WindowsSandboxSetupMode" });
28493318
2850export type ServerNotification__TokenUsageBreakdown = {
2851 readonly cacheWriteInputTokens?: number;
2852 readonly cachedInputTokens: number;
2853 readonly inputTokens: number;
2854 readonly outputTokens: number;
2855 readonly reasoningOutputTokens: number;
2856 readonly totalTokens: number;
3319export type ServerNotification__AccountLoginCompletedNotification = {
3320 readonly error?: string | null;
3321 readonly loginId?: string | null;
3322 readonly success: boolean;
28573323};
2858export const ServerNotification__TokenUsageBreakdown = Schema.Struct({
2859 cacheWriteInputTokens: Schema.optionalKey(
2860 Schema.Number.annotate({ default: 0, format: "int64" }).check(Schema.isInt()),
3324export const ServerNotification__AccountLoginCompletedNotification = Schema.Struct({
3325 error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3326 loginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3327 success: Schema.Boolean,
3328}).annotate({ identifier: "ServerNotification__AccountLoginCompletedNotification" });
3329
3330export type ServerRequest__RequestId = string | number;
3331export const ServerRequest__RequestId = Schema.Union([
3332 Schema.String,
3333 Schema.Number.annotate({ format: "int64" }).check(
3334 Schema.isInt().annotate({ expected: "an integer" }),
28613335 ),
2862 cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2863 inputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2864 outputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2865 reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2866 totalTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
3336]).annotate({ identifier: "ServerRequest__RequestId" });
3337
3338export type ServerRequest__AbsolutePathBuf = string;
3339export const ServerRequest__AbsolutePathBuf = Schema.String.annotate({
3340 description:
3341 "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.",
3342 identifier: "ServerRequest__AbsolutePathBuf",
28673343});
28683344
2869export type ServerNotification__TurnDiffUpdatedNotification = {
2870 readonly diff: string;
2871 readonly threadId: string;
2872 readonly turnId: string;
2873};
2874export const ServerNotification__TurnDiffUpdatedNotification = Schema.Struct({
2875 diff: Schema.String,
2876 threadId: Schema.String,
2877 turnId: Schema.String,
2878}).annotate({
2879 description:
2880 "Notification that the turn-level unified diff has changed. Contains the latest aggregated diff across all file changes in the turn.",
2881});
2882
2883export type ServerNotification__TurnModerationMetadataNotification = {
2884 readonly metadata: unknown;
2885 readonly threadId: string;
2886 readonly turnId: string;
2887};
2888export const ServerNotification__TurnModerationMetadataNotification = Schema.Struct({
2889 metadata: Schema.Unknown,
2890 threadId: Schema.String,
2891 turnId: Schema.String,
3345export type ServerRequest__LegacyAppPathString = string;
3346export const ServerRequest__LegacyAppPathString = Schema.String.annotate({
3347 identifier: "ServerRequest__LegacyAppPathString",
28923348});
28933349
2894export type ServerNotification__TurnPlanStepStatus = "pending" | "inProgress" | "completed";
2895export const ServerNotification__TurnPlanStepStatus = Schema.Literals([
2896 "pending",
2897 "inProgress",
2898 "completed",
2899]);
3350export type ServerRequest__NetworkApprovalProtocol = "http" | "https" | "socks5Tcp" | "socks5Udp";
3351export const ServerRequest__NetworkApprovalProtocol = Schema.Literals([
3352 "http",
3353 "https",
3354 "socks5Tcp",
3355 "socks5Udp",
3356]).annotate({ identifier: "ServerRequest__NetworkApprovalProtocol" });
29003357
2901export type ServerNotification__TurnStatus = "completed" | "interrupted" | "failed" | "inProgress";
2902export const ServerNotification__TurnStatus = Schema.Literals([
2903 "completed",
2904 "interrupted",
2905 "failed",
2906 "inProgress",
2907]);
3358export type ServerRequest__NetworkPolicyRuleAction = "allow" | "deny";
3359export const ServerRequest__NetworkPolicyRuleAction = Schema.Literals(["allow", "deny"]).annotate({
3360 identifier: "ServerRequest__NetworkPolicyRuleAction",
3361});
29083362
2909export type ServerNotification__WarningNotification = {
2910 readonly message: string;
2911 readonly threadId?: string | null;
3363export type ServerRequest__FileChangeRequestApprovalParams = {
3364 readonly grantRoot?: string | null;
3365 readonly itemId: string;
3366 readonly reason?: string | null;
3367 readonly startedAtMs: number;
3368 readonly threadId: string;
3369 readonly turnId: string;
29123370};
2913export const ServerNotification__WarningNotification = Schema.Struct({
2914 message: Schema.String.annotate({ description: "Concise warning message for the user." }),
2915 threadId: Schema.optionalKey(
3371export const ServerRequest__FileChangeRequestApprovalParams = Schema.Struct({
3372 grantRoot: Schema.optionalKey(
29163373 Schema.Union([
29173374 Schema.String.annotate({
2918 description: "Optional thread target when the warning applies to a specific thread.",
3375 description:
3376 "[UNSTABLE] When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).",
29193377 }),
29203378 Schema.Null,
29213379 ]),
29223380 ),
2923});
3381 itemId: Schema.String,
3382 reason: Schema.optionalKey(
3383 Schema.Union([
3384 Schema.String.annotate({
3385 description: "Optional explanatory reason (e.g. request for extra write access).",
3386 }),
3387 Schema.Null,
3388 ]),
3389 ),
3390 startedAtMs: Schema.Number.annotate({
3391 description: "Unix timestamp (in milliseconds) when this approval request started.",
3392 format: "int64",
3393 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3394 threadId: Schema.String,
3395 turnId: Schema.String,
3396}).annotate({ identifier: "ServerRequest__FileChangeRequestApprovalParams" });
29243397
2925export type ServerNotification__WebSearchAction =
2926 | {
2927 readonly queries?: ReadonlyArray<string> | null;
2928 readonly query?: string | null;
2929 readonly type: "search";
2930 }
2931 | { readonly type: "openPage"; readonly url?: string | null }
2932 | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
2933 | { readonly type: "other" };
2934export const ServerNotification__WebSearchAction = Schema.Union(
2935 [
2936 Schema.Struct({
2937 queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
2938 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2939 type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
2940 }).annotate({ title: "SearchWebSearchAction" }),
2941 Schema.Struct({
2942 type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
2943 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2944 }).annotate({ title: "OpenPageWebSearchAction" }),
2945 Schema.Struct({
2946 pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2947 type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
2948 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2949 }).annotate({ title: "FindInPageWebSearchAction" }),
2950 Schema.Struct({
2951 type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
2952 }).annotate({ title: "OtherWebSearchAction" }),
2953 ],
2954 { mode: "oneOf" },
2955);
3398export type ServerRequest__ToolRequestUserInputOption = {
3399 readonly description: string;
3400 readonly label: string;
3401};
3402export const ServerRequest__ToolRequestUserInputOption = Schema.Struct({
3403 description: Schema.String,
3404 label: Schema.String,
3405}).annotate({
3406 description: "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
3407 identifier: "ServerRequest__ToolRequestUserInputOption",
3408});
29563409
2957export type ServerNotification__WindowsSandboxSetupMode = "elevated" | "unelevated";
2958export const ServerNotification__WindowsSandboxSetupMode = Schema.Literals([
2959 "elevated",
2960 "unelevated",
2961]);
3410export type ServerRequest__McpElicitationStringType = "string";
3411export const ServerRequest__McpElicitationStringType = Schema.Literal("string").annotate({
3412 identifier: "ServerRequest__McpElicitationStringType",
3413});
29623414
2963export type ServerNotification__WindowsWorldWritableWarningNotification = {
2964 readonly extraCount: number;
2965 readonly failedScan: boolean;
2966 readonly samplePaths: ReadonlyArray<string>;
3415export type ServerRequest__McpElicitationConstOption = {
3416 readonly const: string;
3417 readonly title: string;
29673418};
2968export const ServerNotification__WindowsWorldWritableWarningNotification = Schema.Struct({
2969 extraCount: Schema.Number.annotate({ format: "uint" })
2970 .check(Schema.isInt())
2971 .check(Schema.isGreaterThanOrEqualTo(0)),
2972 failedScan: Schema.Boolean,
2973 samplePaths: Schema.Array(Schema.String),
3419export const ServerRequest__McpElicitationConstOption = Schema.Struct({
3420 const: Schema.String,
3421 title: Schema.String,
3422}).annotate({ identifier: "ServerRequest__McpElicitationConstOption" });
3423
3424export type ServerRequest__McpElicitationArrayType = "array";
3425export const ServerRequest__McpElicitationArrayType = Schema.Literal("array").annotate({
3426 identifier: "ServerRequest__McpElicitationArrayType",
29743427});
29753428
2976export type ServerRequest__AbsolutePathBuf = string;
2977export const ServerRequest__AbsolutePathBuf = Schema.String.annotate({
2978 description:
2979 "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.",
3429export type ServerRequest__McpElicitationStringFormat = "email" | "uri" | "date" | "date-time";
3430export const ServerRequest__McpElicitationStringFormat = Schema.Literals([
3431 "email",
3432 "uri",
3433 "date",
3434 "date-time",
3435]).annotate({ identifier: "ServerRequest__McpElicitationStringFormat" });
3436
3437export type ServerRequest__McpElicitationNumberType = "number" | "integer";
3438export const ServerRequest__McpElicitationNumberType = Schema.Literals([
3439 "number",
3440 "integer",
3441]).annotate({ identifier: "ServerRequest__McpElicitationNumberType" });
3442
3443export type ServerRequest__McpElicitationBooleanType = "boolean";
3444export const ServerRequest__McpElicitationBooleanType = Schema.Literal("boolean").annotate({
3445 identifier: "ServerRequest__McpElicitationBooleanType",
29803446});
29813447
2982export type ServerRequest__AdditionalNetworkPermissions = { readonly enabled?: boolean | null };
2983export const ServerRequest__AdditionalNetworkPermissions = Schema.Struct({
2984 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
3448export type ServerRequest__McpElicitationObjectType = "object";
3449export const ServerRequest__McpElicitationObjectType = Schema.Literal("object").annotate({
3450 identifier: "ServerRequest__McpElicitationObjectType",
29853451});
29863452
2987export type ServerRequest__AttestationGenerateParams = {};
2988export const ServerRequest__AttestationGenerateParams = Schema.Struct({});
3453export type ServerRequest__FileSystemAccessMode = "read" | "write" | "deny";
3454export const ServerRequest__FileSystemAccessMode = Schema.Literals([
3455 "read",
3456 "write",
3457 "deny",
3458]).annotate({ identifier: "ServerRequest__FileSystemAccessMode" });
29893459
2990export type ServerRequest__ChatgptAuthTokensRefreshReason = "unauthorized";
2991export const ServerRequest__ChatgptAuthTokensRefreshReason = Schema.Literal("unauthorized");
3460export type ServerRequest__AdditionalNetworkPermissions = { readonly enabled?: boolean | null };
3461export const ServerRequest__AdditionalNetworkPermissions = Schema.Struct({
3462 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
3463}).annotate({ identifier: "ServerRequest__AdditionalNetworkPermissions" });
29923464
29933465export type ServerRequest__DynamicToolCallParams = {
2994 readonly arguments: unknown;
3466 readonly arguments: Schema.Json;
29953467 readonly callId: string;
29963468 readonly namespace?: string | null;
29973469 readonly threadId: string;
......@@ -2999,12 +3471,33 @@ export type ServerRequest__DynamicToolCallParams = {
29993471 readonly turnId: string;
30003472};
30013473export const ServerRequest__DynamicToolCallParams = Schema.Struct({
3002 arguments: Schema.Unknown,
3474 arguments: Schema.Json.annotate({ expected: "JSON value" }),
30033475 callId: Schema.String,
30043476 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
30053477 threadId: Schema.String,
30063478 tool: Schema.String,
30073479 turnId: Schema.String,
3480}).annotate({ identifier: "ServerRequest__DynamicToolCallParams" });
3481
3482export type ServerRequest__ChatgptAuthTokensRefreshReason = "unauthorized";
3483export const ServerRequest__ChatgptAuthTokensRefreshReason = Schema.Union(
3484 [
3485 Schema.Literal("unauthorized").annotate({
3486 description: "Codex attempted a backend request and received `401 Unauthorized`.",
3487 }),
3488 ],
3489 { mode: "oneOf" },
3490).annotate({ identifier: "ServerRequest__ChatgptAuthTokensRefreshReason" });
3491
3492export type ServerRequest__AttestationGenerateParams = { readonly [x: string]: Schema.Json };
3493export const ServerRequest__AttestationGenerateParams = Schema.Record(
3494 Schema.String,
3495 Schema.Json.annotate({ expected: "JSON value" }),
3496).annotate({ identifier: "ServerRequest__AttestationGenerateParams" });
3497
3498export type ServerRequest__ThreadId = string;
3499export const ServerRequest__ThreadId = Schema.String.annotate({
3500 identifier: "ServerRequest__ThreadId",
30083501});
30093502
30103503export type ServerRequest__FileChange =
......@@ -3028,91 +3521,7 @@ export const ServerRequest__FileChange = Schema.Union(
30283521 }).annotate({ title: "UpdateFileChange" }),
30293522 ],
30303523 { mode: "oneOf" },
3031);
3032
3033export type ServerRequest__FileChangeRequestApprovalParams = {
3034 readonly grantRoot?: string | null;
3035 readonly itemId: string;
3036 readonly reason?: string | null;
3037 readonly startedAtMs: number;
3038 readonly threadId: string;
3039 readonly turnId: string;
3040};
3041export const ServerRequest__FileChangeRequestApprovalParams = Schema.Struct({
3042 grantRoot: Schema.optionalKey(
3043 Schema.Union([
3044 Schema.String.annotate({
3045 description:
3046 "[UNSTABLE] When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).",
3047 }),
3048 Schema.Null,
3049 ]),
3050 ),
3051 itemId: Schema.String,
3052 reason: Schema.optionalKey(
3053 Schema.Union([
3054 Schema.String.annotate({
3055 description: "Optional explanatory reason (e.g. request for extra write access).",
3056 }),
3057 Schema.Null,
3058 ]),
3059 ),
3060 startedAtMs: Schema.Number.annotate({
3061 description: "Unix timestamp (in milliseconds) when this approval request started.",
3062 format: "int64",
3063 }).check(Schema.isInt()),
3064 threadId: Schema.String,
3065 turnId: Schema.String,
3066});
3067
3068export type ServerRequest__FileSystemAccessMode = "read" | "write" | "deny";
3069export const ServerRequest__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]);
3070
3071export type ServerRequest__LegacyAppPathString = string;
3072export const ServerRequest__LegacyAppPathString = Schema.String;
3073
3074export type ServerRequest__McpElicitationArrayType = "array";
3075export const ServerRequest__McpElicitationArrayType = Schema.Literal("array");
3076
3077export type ServerRequest__McpElicitationBooleanType = "boolean";
3078export const ServerRequest__McpElicitationBooleanType = Schema.Literal("boolean");
3079
3080export type ServerRequest__McpElicitationConstOption = {
3081 readonly const: string;
3082 readonly title: string;
3083};
3084export const ServerRequest__McpElicitationConstOption = Schema.Struct({
3085 const: Schema.String,
3086 title: Schema.String,
3087});
3088
3089export type ServerRequest__McpElicitationNumberType = "number" | "integer";
3090export const ServerRequest__McpElicitationNumberType = Schema.Literals(["number", "integer"]);
3091
3092export type ServerRequest__McpElicitationObjectType = "object";
3093export const ServerRequest__McpElicitationObjectType = Schema.Literal("object");
3094
3095export type ServerRequest__McpElicitationStringFormat = "email" | "uri" | "date" | "date-time";
3096export const ServerRequest__McpElicitationStringFormat = Schema.Literals([
3097 "email",
3098 "uri",
3099 "date",
3100 "date-time",
3101]);
3102
3103export type ServerRequest__McpElicitationStringType = "string";
3104export const ServerRequest__McpElicitationStringType = Schema.Literal("string");
3105
3106export type ServerRequest__NetworkApprovalProtocol = "http" | "https" | "socks5Tcp" | "socks5Udp";
3107export const ServerRequest__NetworkApprovalProtocol = Schema.Literals([
3108 "http",
3109 "https",
3110 "socks5Tcp",
3111 "socks5Udp",
3112]);
3113
3114export type ServerRequest__NetworkPolicyRuleAction = "allow" | "deny";
3115export const ServerRequest__NetworkPolicyRuleAction = Schema.Literals(["allow", "deny"]);
3524).annotate({ identifier: "ServerRequest__FileChange" });
31163525
31173526export type ServerRequest__ParsedCommand =
31183527 | { readonly cmd: string; readonly name: string; readonly path: string; readonly type: "read" }
......@@ -3152,27 +3561,7 @@ export const ServerRequest__ParsedCommand = Schema.Union(
31523561 }).annotate({ title: "UnknownParsedCommand" }),
31533562 ],
31543563 { mode: "oneOf" },
3155);
3156
3157export type ServerRequest__RequestId = string | number;
3158export const ServerRequest__RequestId = Schema.Union([
3159 Schema.String,
3160 Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
3161]);
3162
3163export type ServerRequest__ThreadId = string;
3164export const ServerRequest__ThreadId = Schema.String;
3165
3166export type ServerRequest__ToolRequestUserInputOption = {
3167 readonly description: string;
3168 readonly label: string;
3169};
3170export const ServerRequest__ToolRequestUserInputOption = Schema.Struct({
3171 description: Schema.String,
3172 label: Schema.String,
3173}).annotate({
3174 description: "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
3175});
3564).annotate({ identifier: "ServerRequest__ParsedCommand" });
31763565
31773566export type ToolRequestUserInputParams__ToolRequestUserInputOption = {
31783567 readonly description: string;
......@@ -3183,6 +3572,7 @@ export const ToolRequestUserInputParams__ToolRequestUserInputOption = Schema.Str
31833572 label: Schema.String,
31843573}).annotate({
31853574 description: "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
3575 identifier: "ToolRequestUserInputParams__ToolRequestUserInputOption",
31863576});
31873577
31883578export type ToolRequestUserInputResponse__ToolRequestUserInputAnswer = {
......@@ -3192,17 +3582,7 @@ export const ToolRequestUserInputResponse__ToolRequestUserInputAnswer = Schema.S
31923582 answers: Schema.Array(Schema.String),
31933583}).annotate({
31943584 description: "EXPERIMENTAL. Captures a user's answer to a request_user_input question.",
3195});
3196
3197export type V1InitializeParams__ClientInfo = {
3198 readonly name: string;
3199 readonly title?: string | null;
3200 readonly version: string;
3201};
3202export const V1InitializeParams__ClientInfo = Schema.Struct({
3203 name: Schema.String,
3204 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3205 version: Schema.String,
3585 identifier: "ToolRequestUserInputResponse__ToolRequestUserInputAnswer",
32063586});
32073587
32083588export type V1InitializeParams__InitializeCapabilities = {
......@@ -3238,7 +3618,28 @@ export const V1InitializeParams__InitializeCapabilities = Schema.Struct({
32383618 default: false,
32393619 }),
32403620 ),
3241}).annotate({ description: "Client-declared capabilities negotiated during initialize." });
3621}).annotate({
3622 description: "Client-declared capabilities negotiated during initialize.",
3623 identifier: "V1InitializeParams__InitializeCapabilities",
3624});
3625
3626export type V1InitializeParams__ClientInfo = {
3627 readonly name: string;
3628 readonly title?: string | null;
3629 readonly version: string;
3630};
3631export const V1InitializeParams__ClientInfo = Schema.Struct({
3632 name: Schema.String,
3633 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3634 version: Schema.String,
3635}).annotate({ identifier: "V1InitializeParams__ClientInfo" });
3636
3637export type V1InitializeResponse__AbsolutePathBuf = string;
3638export const V1InitializeResponse__AbsolutePathBuf = Schema.String.annotate({
3639 description:
3640 "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.",
3641 identifier: "V1InitializeResponse__AbsolutePathBuf",
3642});
32423643
32433644export type V2AccountRateLimitsUpdatedNotification__CreditsSnapshot = {
32443645 readonly balance?: string | null;
......@@ -3249,7 +3650,24 @@ export const V2AccountRateLimitsUpdatedNotification__CreditsSnapshot = Schema.St
32493650 balance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
32503651 hasCredits: Schema.Boolean,
32513652 unlimited: Schema.Boolean,
3252});
3653}).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__CreditsSnapshot" });
3654
3655export type V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = {
3656 readonly limit: string;
3657 readonly remainingPercent: number;
3658 readonly resetsAt: number;
3659 readonly used: string;
3660};
3661export const V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = Schema.Struct({
3662 limit: Schema.String,
3663 remainingPercent: Schema.Number.annotate({ format: "int32" }).check(
3664 Schema.isInt().annotate({ expected: "an integer" }),
3665 ),
3666 resetsAt: Schema.Number.annotate({ format: "int64" }).check(
3667 Schema.isInt().annotate({ expected: "an integer" }),
3668 ),
3669 used: Schema.String,
3670}).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot" });
32533671
32543672export type V2AccountRateLimitsUpdatedNotification__PlanType =
32553673 | "free"
......@@ -3287,7 +3705,34 @@ export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals(
32873705 "edu_plus",
32883706 "edu_pro",
32893707 "unknown",
3290]);
3708]).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__PlanType" });
3709
3710export type V2AccountRateLimitsUpdatedNotification__RateLimitWindow = {
3711 readonly resetsAt?: number | null;
3712 readonly usedPercent: number;
3713 readonly windowDurationMins?: number | null;
3714};
3715export const V2AccountRateLimitsUpdatedNotification__RateLimitWindow = Schema.Struct({
3716 resetsAt: Schema.optionalKey(
3717 Schema.Union([
3718 Schema.Number.annotate({ format: "int64" }).check(
3719 Schema.isInt().annotate({ expected: "an integer" }),
3720 ),
3721 Schema.Null,
3722 ]),
3723 ),
3724 usedPercent: Schema.Number.annotate({ format: "int32" }).check(
3725 Schema.isInt().annotate({ expected: "an integer" }),
3726 ),
3727 windowDurationMins: Schema.optionalKey(
3728 Schema.Union([
3729 Schema.Number.annotate({ format: "int64" }).check(
3730 Schema.isInt().annotate({ expected: "an integer" }),
3731 ),
3732 Schema.Null,
3733 ]),
3734 ),
3735}).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__RateLimitWindow" });
32913736
32923737export type V2AccountRateLimitsUpdatedNotification__RateLimitReachedType =
32933738 | "rate_limit_reached"
......@@ -3301,35 +3746,7 @@ export const V2AccountRateLimitsUpdatedNotification__RateLimitReachedType = Sche
33013746 "workspace_member_credits_depleted",
33023747 "workspace_owner_usage_limit_reached",
33033748 "workspace_member_usage_limit_reached",
3304]);
3305
3306export type V2AccountRateLimitsUpdatedNotification__RateLimitWindow = {
3307 readonly resetsAt?: number | null;
3308 readonly usedPercent: number;
3309 readonly windowDurationMins?: number | null;
3310};
3311export const V2AccountRateLimitsUpdatedNotification__RateLimitWindow = Schema.Struct({
3312 resetsAt: Schema.optionalKey(
3313 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
3314 ),
3315 usedPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
3316 windowDurationMins: Schema.optionalKey(
3317 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
3318 ),
3319});
3320
3321export type V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = {
3322 readonly limit: string;
3323 readonly remainingPercent: number;
3324 readonly resetsAt: number;
3325 readonly used: string;
3326};
3327export const V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = Schema.Struct({
3328 limit: Schema.String,
3329 remainingPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
3330 resetsAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
3331 used: Schema.String,
3332});
3749]).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__RateLimitReachedType" });
33333750
33343751export type V2AccountUpdatedNotification__AuthMode =
33353752 | "apikey"
......@@ -3339,15 +3756,36 @@ export type V2AccountUpdatedNotification__AuthMode =
33393756 | "agentIdentity"
33403757 | "personalAccessToken"
33413758 | "bedrockApiKey";
3342export const V2AccountUpdatedNotification__AuthMode = Schema.Literals([
3343 "apikey",
3344 "chatgpt",
3345 "chatgptAuthTokens",
3346 "headers",
3347 "agentIdentity",
3348 "personalAccessToken",
3349 "bedrockApiKey",
3350]).annotate({ description: "Authentication mode for OpenAI-backed providers." });
3759export const V2AccountUpdatedNotification__AuthMode = Schema.Union(
3760 [
3761 Schema.Literal("apikey").annotate({
3762 description: "OpenAI API key provided by the caller and stored by Codex.",
3763 }),
3764 Schema.Literal("chatgpt").annotate({
3765 description: "ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).",
3766 }),
3767 Schema.Literal("chatgptAuthTokens").annotate({
3768 description:
3769 "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE.\n\nChatGPT auth tokens are supplied by an external host app and are only stored in memory. Token refresh must be handled by the external host app.",
3770 }),
3771 Schema.Literal("headers").annotate({
3772 description: "Backend auth supplied as request headers.",
3773 }),
3774 Schema.Literal("agentIdentity").annotate({
3775 description: "Programmatic Codex auth backed by a registered Agent Identity.",
3776 }),
3777 Schema.Literal("personalAccessToken").annotate({
3778 description: "Programmatic Codex auth backed by a personal access token.",
3779 }),
3780 Schema.Literal("bedrockApiKey").annotate({
3781 description: "Amazon Bedrock bearer token managed by Codex.",
3782 }),
3783 ],
3784 { mode: "oneOf" },
3785).annotate({
3786 description: "Authentication mode for OpenAI-backed providers.",
3787 identifier: "V2AccountUpdatedNotification__AuthMode",
3788});
33513789
33523790export type V2AccountUpdatedNotification__PlanType =
33533791 | "free"
......@@ -3385,7 +3823,23 @@ export const V2AccountUpdatedNotification__PlanType = Schema.Literals([
33853823 "edu_plus",
33863824 "edu_pro",
33873825 "unknown",
3388]);
3826]).annotate({ identifier: "V2AccountUpdatedNotification__PlanType" });
3827
3828export type V2AppListUpdatedNotification__AppReview = { readonly status: string };
3829export const V2AppListUpdatedNotification__AppReview = Schema.Struct({
3830 status: Schema.String,
3831}).annotate({ identifier: "V2AppListUpdatedNotification__AppReview" });
3832
3833export type V2AppListUpdatedNotification__AppScreenshot = {
3834 readonly fileId?: string | null;
3835 readonly url?: string | null;
3836 readonly userPrompt: string;
3837};
3838export const V2AppListUpdatedNotification__AppScreenshot = Schema.Struct({
3839 fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3840 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3841 userPrompt: Schema.String,
3842}).annotate({ identifier: "V2AppListUpdatedNotification__AppScreenshot" });
33893843
33903844export type V2AppListUpdatedNotification__AppBranding = {
33913845 readonly category?: string | null;
......@@ -3402,20 +3856,9 @@ export const V2AppListUpdatedNotification__AppBranding = Schema.Struct({
34023856 privacyPolicy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
34033857 termsOfService: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
34043858 website: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3405}).annotate({ description: "EXPERIMENTAL - app metadata returned by app-list APIs." });
3406
3407export type V2AppListUpdatedNotification__AppReview = { readonly status: string };
3408export const V2AppListUpdatedNotification__AppReview = Schema.Struct({ status: Schema.String });
3409
3410export type V2AppListUpdatedNotification__AppScreenshot = {
3411 readonly fileId?: string | null;
3412 readonly url?: string | null;
3413 readonly userPrompt: string;
3414};
3415export const V2AppListUpdatedNotification__AppScreenshot = Schema.Struct({
3416 fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3417 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3418 userPrompt: Schema.String,
3859}).annotate({
3860 description: "EXPERIMENTAL - app metadata returned by app-list APIs.",
3861 identifier: "V2AppListUpdatedNotification__AppBranding",
34193862});
34203863
34213864export type V2AppsInstalledResponse__InstalledApp = {
......@@ -3443,7 +3886,26 @@ export const V2AppsInstalledResponse__InstalledApp = Schema.Struct({
34433886 Schema.Null,
34443887 ]),
34453888 ),
3446}).annotate({ description: "Installed connector runtime state." });
3889}).annotate({
3890 description: "Installed connector runtime state.",
3891 identifier: "V2AppsInstalledResponse__InstalledApp",
3892});
3893
3894export type V2AppsListResponse__AppReview = { readonly status: string };
3895export const V2AppsListResponse__AppReview = Schema.Struct({ status: Schema.String }).annotate({
3896 identifier: "V2AppsListResponse__AppReview",
3897});
3898
3899export type V2AppsListResponse__AppScreenshot = {
3900 readonly fileId?: string | null;
3901 readonly url?: string | null;
3902 readonly userPrompt: string;
3903};
3904export const V2AppsListResponse__AppScreenshot = Schema.Struct({
3905 fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3906 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3907 userPrompt: Schema.String,
3908}).annotate({ identifier: "V2AppsListResponse__AppScreenshot" });
34473909
34483910export type V2AppsListResponse__AppBranding = {
34493911 readonly category?: string | null;
......@@ -3460,20 +3922,9 @@ export const V2AppsListResponse__AppBranding = Schema.Struct({
34603922 privacyPolicy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
34613923 termsOfService: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
34623924 website: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3463}).annotate({ description: "EXPERIMENTAL - app metadata returned by app-list APIs." });
3464
3465export type V2AppsListResponse__AppReview = { readonly status: string };
3466export const V2AppsListResponse__AppReview = Schema.Struct({ status: Schema.String });
3467
3468export type V2AppsListResponse__AppScreenshot = {
3469 readonly fileId?: string | null;
3470 readonly url?: string | null;
3471 readonly userPrompt: string;
3472};
3473export const V2AppsListResponse__AppScreenshot = Schema.Struct({
3474 fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3475 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3476 userPrompt: Schema.String,
3925}).annotate({
3926 description: "EXPERIMENTAL - app metadata returned by app-list APIs.",
3927 identifier: "V2AppsListResponse__AppBranding",
34773928});
34783929
34793930export type V2AppsReadResponse__AppToolSummary = {
......@@ -3485,18 +3936,42 @@ export const V2AppsReadResponse__AppToolSummary = Schema.Struct({
34853936 description: Schema.String,
34863937 name: Schema.String,
34873938 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3488}).annotate({ description: "EXPERIMENTAL - metadata returned by app/read." });
3939}).annotate({
3940 description: "EXPERIMENTAL - metadata returned by app/read.",
3941 identifier: "V2AppsReadResponse__AppToolSummary",
3942});
34893943
34903944export type V2CancelLoginAccountResponse__CancelLoginAccountStatus = "canceled" | "notFound";
34913945export const V2CancelLoginAccountResponse__CancelLoginAccountStatus = Schema.Literals([
34923946 "canceled",
34933947 "notFound",
3494]);
3948]).annotate({ identifier: "V2CancelLoginAccountResponse__CancelLoginAccountStatus" });
3949
3950export type V2CommandExecOutputDeltaNotification__CommandExecOutputStream = "stdout" | "stderr";
3951export const V2CommandExecOutputDeltaNotification__CommandExecOutputStream = Schema.Union(
3952 [
3953 Schema.Literal("stdout").annotate({
3954 description: "stdout stream. PTY mode multiplexes terminal output here.",
3955 }),
3956 Schema.Literal("stderr").annotate({ description: "stderr stream." }),
3957 ],
3958 { mode: "oneOf" },
3959).annotate({
3960 description: "Stream label for `command/exec/outputDelta` notifications.",
3961 identifier: "V2CommandExecOutputDeltaNotification__CommandExecOutputStream",
3962});
3963
3964export type V2CommandExecParams__NetworkAccess = "restricted" | "enabled";
3965export const V2CommandExecParams__NetworkAccess = Schema.Literals([
3966 "restricted",
3967 "enabled",
3968]).annotate({ identifier: "V2CommandExecParams__NetworkAccess" });
34953969
34963970export type V2CommandExecParams__AbsolutePathBuf = string;
34973971export const V2CommandExecParams__AbsolutePathBuf = Schema.String.annotate({
34983972 description:
34993973 "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.",
3974 identifier: "V2CommandExecParams__AbsolutePathBuf",
35003975});
35013976
35023977export type V2CommandExecParams__CommandExecTerminalSize = {
......@@ -3508,54 +3983,62 @@ export const V2CommandExecParams__CommandExecTerminalSize = Schema.Struct({
35083983 description: "Terminal width in character cells.",
35093984 format: "uint16",
35103985 })
3511 .check(Schema.isInt())
3512 .check(Schema.isGreaterThanOrEqualTo(0)),
3986 .check(Schema.isInt().annotate({ expected: "an integer" }))
3987 .check(
3988 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
3989 ),
35133990 rows: Schema.Number.annotate({
35143991 description: "Terminal height in character cells.",
35153992 format: "uint16",
35163993 })
3517 .check(Schema.isInt())
3518 .check(Schema.isGreaterThanOrEqualTo(0)),
3519}).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." });
3520
3521export type V2ConfigBatchWriteParams__MergeStrategy = "replace" | "upsert";
3522export const V2ConfigBatchWriteParams__MergeStrategy = Schema.Literals(["replace", "upsert"]);
3994 .check(Schema.isInt().annotate({ expected: "an integer" }))
3995 .check(
3996 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
3997 ),
3998}).annotate({
3999 description: "PTY size in character cells for `command/exec` PTY sessions.",
4000 identifier: "V2CommandExecParams__CommandExecTerminalSize",
4001});
35234002
3524export type V2ConfigReadResponse__AbsolutePathBuf = string;
3525export const V2ConfigReadResponse__AbsolutePathBuf = Schema.String.annotate({
3526 description:
3527 "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.",
4003export type V2CommandExecResizeParams__CommandExecTerminalSize = {
4004 readonly cols: number;
4005 readonly rows: number;
4006};
4007export const V2CommandExecResizeParams__CommandExecTerminalSize = Schema.Struct({
4008 cols: Schema.Number.annotate({
4009 description: "Terminal width in character cells.",
4010 format: "uint16",
4011 })
4012 .check(Schema.isInt().annotate({ expected: "an integer" }))
4013 .check(
4014 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
4015 ),
4016 rows: Schema.Number.annotate({
4017 description: "Terminal height in character cells.",
4018 format: "uint16",
4019 })
4020 .check(Schema.isInt().annotate({ expected: "an integer" }))
4021 .check(
4022 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
4023 ),
4024}).annotate({
4025 description: "PTY size in character cells for `command/exec` PTY sessions.",
4026 identifier: "V2CommandExecResizeParams__CommandExecTerminalSize",
35284027});
35294028
3530export type V2ConfigReadResponse__AnalyticsConfig = {
3531 readonly enabled?: boolean | null;
3532 readonly [x: string]: unknown;
4029export type V2ConfigBatchWriteParams__MergeStrategy = "replace" | "upsert";
4030export const V2ConfigBatchWriteParams__MergeStrategy = Schema.Literals([
4031 "replace",
4032 "upsert",
4033]).annotate({ identifier: "V2ConfigBatchWriteParams__MergeStrategy" });
4034
4035export type V2ConfigReadResponse__AnalyticsConfig = { readonly enabled?: boolean | null } & {
4036 readonly [x: string]: Schema.Json;
35334037};
35344038export const V2ConfigReadResponse__AnalyticsConfig = Schema.StructWithRest(
35354039 Schema.Struct({ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }),
3536 [Schema.Record(Schema.String, Schema.Unknown)],
3537);
3538
3539export type V2ConfigReadResponse__AppToolApproval = "auto" | "prompt" | "writes" | "approve";
3540export const V2ConfigReadResponse__AppToolApproval = Schema.Literals([
3541 "auto",
3542 "prompt",
3543 "writes",
3544 "approve",
3545]);
3546
3547export type V2ConfigReadResponse__AppToolsConfig = {};
3548export const V2ConfigReadResponse__AppToolsConfig = Schema.Struct({});
3549
3550export type V2ConfigReadResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
3551export const V2ConfigReadResponse__ApprovalsReviewer = Schema.Literals([
3552 "user",
3553 "auto_review",
3554 "guardian_subagent",
3555]).annotate({
3556 description:
3557 "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.",
3558});
4040 [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))],
4041).annotate({ identifier: "V2ConfigReadResponse__AnalyticsConfig" });
35594042
35604043export type V2ConfigReadResponse__AskForApproval =
35614044 | "untrusted"
......@@ -3584,15 +4067,17 @@ export const V2ConfigReadResponse__AskForApproval = Schema.Union(
35844067 }).annotate({ title: "GranularAskForApproval" }),
35854068 ],
35864069 { mode: "oneOf" },
3587);
4070).annotate({ identifier: "V2ConfigReadResponse__AskForApproval" });
35884071
3589export type V2ConfigReadResponse__AutoCompactTokenLimitScope = "total" | "body_after_prefix";
3590export const V2ConfigReadResponse__AutoCompactTokenLimitScope = Schema.Literals([
3591 "total",
3592 "body_after_prefix",
4072export type V2ConfigReadResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
4073export const V2ConfigReadResponse__ApprovalsReviewer = Schema.Literals([
4074 "user",
4075 "auto_review",
4076 "guardian_subagent",
35934077]).annotate({
35944078 description:
3595 "Selects which part of the active context is charged against `model_auto_compact_token_limit`.",
4079 "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.",
4080 identifier: "V2ConfigReadResponse__ApprovalsReviewer",
35964081});
35974082
35984083export type V2ConfigReadResponse__ForcedChatgptWorkspaceIds = string | ReadonlyArray<string>;
......@@ -3601,15 +4086,40 @@ export const V2ConfigReadResponse__ForcedChatgptWorkspaceIds = Schema.Union([
36014086 Schema.Array(Schema.String),
36024087]).annotate({
36034088 description: "Backward-compatible API shape for ChatGPT workspace login restrictions.",
4089 identifier: "V2ConfigReadResponse__ForcedChatgptWorkspaceIds",
36044090});
36054091
36064092export type V2ConfigReadResponse__ForcedLoginMethod = "chatgpt" | "api";
3607export const V2ConfigReadResponse__ForcedLoginMethod = Schema.Literals(["chatgpt", "api"]);
4093export const V2ConfigReadResponse__ForcedLoginMethod = Schema.Literals(["chatgpt", "api"]).annotate(
4094 { identifier: "V2ConfigReadResponse__ForcedLoginMethod" },
4095);
4096
4097export type V2ConfigReadResponse__AutoCompactTokenLimitScope = "total" | "body_after_prefix";
4098export const V2ConfigReadResponse__AutoCompactTokenLimitScope = Schema.Union(
4099 [
4100 Schema.Literal("total").annotate({
4101 description: "Count the full active context against the limit.",
4102 }),
4103 Schema.Literal("body_after_prefix").annotate({
4104 description: "Count sampled output and later growth after the carried window prefix.",
4105 }),
4106 ],
4107 { mode: "oneOf" },
4108).annotate({
4109 description:
4110 "Selects which part of the active context is charged against `model_auto_compact_token_limit`.",
4111 identifier: "V2ConfigReadResponse__AutoCompactTokenLimitScope",
4112});
36084113
36094114export type V2ConfigReadResponse__ReasoningEffort = string;
36104115export const V2ConfigReadResponse__ReasoningEffort = Schema.String.annotate({
36114116 description: "A non-empty reasoning effort value advertised by the model.",
3612}).check(Schema.isMinLength(1));
4117}).check(
4118 Schema.isMinLength(1).annotate({
4119 expected: "a value with a length of at least 1",
4120 identifier: "V2ConfigReadResponse__ReasoningEffort",
4121 }),
4122);
36134123
36144124export type V2ConfigReadResponse__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
36154125export const V2ConfigReadResponse__ReasoningSummary = Schema.Union(
......@@ -3621,6 +4131,14 @@ export const V2ConfigReadResponse__ReasoningSummary = Schema.Union(
36214131).annotate({
36224132 description:
36234133 "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
4134 identifier: "V2ConfigReadResponse__ReasoningSummary",
4135});
4136
4137export type V2ConfigReadResponse__Verbosity = "low" | "medium" | "high";
4138export const V2ConfigReadResponse__Verbosity = Schema.Literals(["low", "medium", "high"]).annotate({
4139 description:
4140 "Controls output length/detail on GPT-5 models via the Responses API. Serialized with lowercase values to match the OpenAI API.",
4141 identifier: "V2ConfigReadResponse__Verbosity",
36244142});
36254143
36264144export type V2ConfigReadResponse__SandboxMode =
......@@ -3631,7 +4149,7 @@ export const V2ConfigReadResponse__SandboxMode = Schema.Literals([
36314149 "read-only",
36324150 "workspace-write",
36334151 "danger-full-access",
3634]);
4152]).annotate({ identifier: "V2ConfigReadResponse__SandboxMode" });
36354153
36364154export type V2ConfigReadResponse__SandboxWorkspaceWrite = {
36374155 readonly exclude_slash_tmp?: boolean;
......@@ -3644,20 +4162,14 @@ export const V2ConfigReadResponse__SandboxWorkspaceWrite = Schema.Struct({
36444162 exclude_tmpdir_env_var: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
36454163 network_access: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
36464164 writable_roots: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
3647});
3648
3649export type V2ConfigReadResponse__Verbosity = "low" | "medium" | "high";
3650export const V2ConfigReadResponse__Verbosity = Schema.Literals(["low", "medium", "high"]).annotate({
3651 description:
3652 "Controls output length/detail on GPT-5 models via the Responses API. Serialized with lowercase values to match the OpenAI API.",
3653});
4165}).annotate({ identifier: "V2ConfigReadResponse__SandboxWorkspaceWrite" });
36544166
36554167export type V2ConfigReadResponse__WebSearchContextSize = "low" | "medium" | "high";
36564168export const V2ConfigReadResponse__WebSearchContextSize = Schema.Literals([
36574169 "low",
36584170 "medium",
36594171 "high",
3660]);
4172]).annotate({ identifier: "V2ConfigReadResponse__WebSearchContextSize" });
36614173
36624174export type V2ConfigReadResponse__WebSearchLocation = {
36634175 readonly city?: string | null;
......@@ -3670,7 +4182,7 @@ export const V2ConfigReadResponse__WebSearchLocation = Schema.Struct({
36704182 country: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
36714183 region: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
36724184 timezone: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3673});
4185}).annotate({ identifier: "V2ConfigReadResponse__WebSearchLocation" });
36744186
36754187export type V2ConfigReadResponse__WebSearchMode = "disabled" | "cached" | "indexed" | "live";
36764188export const V2ConfigReadResponse__WebSearchMode = Schema.Literals([
......@@ -3678,7 +4190,28 @@ export const V2ConfigReadResponse__WebSearchMode = Schema.Literals([
36784190 "cached",
36794191 "indexed",
36804192 "live",
3681]);
4193]).annotate({ identifier: "V2ConfigReadResponse__WebSearchMode" });
4194
4195export type V2ConfigReadResponse__AbsolutePathBuf = string;
4196export const V2ConfigReadResponse__AbsolutePathBuf = Schema.String.annotate({
4197 description:
4198 "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.",
4199 identifier: "V2ConfigReadResponse__AbsolutePathBuf",
4200});
4201
4202export type V2ConfigReadResponse__AppToolApproval = "auto" | "prompt" | "writes" | "approve";
4203export const V2ConfigReadResponse__AppToolApproval = Schema.Literals([
4204 "auto",
4205 "prompt",
4206 "writes",
4207 "approve",
4208]).annotate({ identifier: "V2ConfigReadResponse__AppToolApproval" });
4209
4210export type V2ConfigReadResponse__AppToolsConfig = { readonly [x: string]: Schema.Json };
4211export const V2ConfigReadResponse__AppToolsConfig = Schema.Record(
4212 Schema.String,
4213 Schema.Json.annotate({ expected: "JSON value" }),
4214).annotate({ identifier: "V2ConfigReadResponse__AppToolsConfig" });
36824215
36834216export type V2ConfigRequirementsReadResponse__AskForApproval =
36844217 | "untrusted"
......@@ -3707,14 +4240,57 @@ export const V2ConfigRequirementsReadResponse__AskForApproval = Schema.Union(
37074240 }).annotate({ title: "GranularAskForApproval" }),
37084241 ],
37094242 { mode: "oneOf" },
3710);
4243).annotate({ identifier: "V2ConfigRequirementsReadResponse__AskForApproval" });
4244
4245export type V2ConfigRequirementsReadResponse__SandboxMode =
4246 | "read-only"
4247 | "workspace-write"
4248 | "danger-full-access";
4249export const V2ConfigRequirementsReadResponse__SandboxMode = Schema.Literals([
4250 "read-only",
4251 "workspace-write",
4252 "danger-full-access",
4253]).annotate({ identifier: "V2ConfigRequirementsReadResponse__SandboxMode" });
4254
4255export type V2ConfigRequirementsReadResponse__WebSearchMode =
4256 | "disabled"
4257 | "cached"
4258 | "indexed"
4259 | "live";
4260export const V2ConfigRequirementsReadResponse__WebSearchMode = Schema.Literals([
4261 "disabled",
4262 "cached",
4263 "indexed",
4264 "live",
4265]).annotate({ identifier: "V2ConfigRequirementsReadResponse__WebSearchMode" });
4266
4267export type V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode = "elevated" | "unelevated";
4268export const V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode = Schema.Literals([
4269 "elevated",
4270 "unelevated",
4271]).annotate({ identifier: "V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode" });
37114272
37124273export type V2ConfigRequirementsReadResponse__ComputerUseRequirements = {
37134274 readonly allowLockedComputerUse?: boolean | null;
37144275};
37154276export const V2ConfigRequirementsReadResponse__ComputerUseRequirements = Schema.Struct({
37164277 allowLockedComputerUse: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
3717});
4278}).annotate({ identifier: "V2ConfigRequirementsReadResponse__ComputerUseRequirements" });
4279
4280export type V2ConfigRequirementsReadResponse__ResidencyRequirement = "us";
4281export const V2ConfigRequirementsReadResponse__ResidencyRequirement = Schema.Literal("us").annotate(
4282 { identifier: "V2ConfigRequirementsReadResponse__ResidencyRequirement" },
4283);
4284
4285export type V2ConfigRequirementsReadResponse__ReasoningEffort = string;
4286export const V2ConfigRequirementsReadResponse__ReasoningEffort = Schema.String.annotate({
4287 description: "A non-empty reasoning effort value advertised by the model.",
4288}).check(
4289 Schema.isMinLength(1).annotate({
4290 expected: "a value with a length of at least 1",
4291 identifier: "V2ConfigRequirementsReadResponse__ReasoningEffort",
4292 }),
4293);
37184294
37194295export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler =
37204296 | {
......@@ -3737,8 +4313,12 @@ export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Un
37374313 timeoutSec: Schema.optionalKey(
37384314 Schema.Union([
37394315 Schema.Number.annotate({ format: "uint64" })
3740 .check(Schema.isInt())
3741 .check(Schema.isGreaterThanOrEqualTo(0)),
4316 .check(Schema.isInt().annotate({ expected: "an integer" }))
4317 .check(
4318 Schema.isGreaterThanOrEqualTo(0).annotate({
4319 expected: "a value greater than or equal to 0",
4320 }),
4321 ),
37424322 Schema.Null,
37434323 ]),
37444324 ),
......@@ -3752,58 +4332,25 @@ export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Un
37524332 }).annotate({ title: "AgentConfiguredHookHandler" }),
37534333 ],
37544334 { mode: "oneOf" },
3755);
4335).annotate({ identifier: "V2ConfigRequirementsReadResponse__ConfiguredHookHandler" });
37564336
37574337export type V2ConfigRequirementsReadResponse__NetworkDomainPermission = "allow" | "deny";
37584338export const V2ConfigRequirementsReadResponse__NetworkDomainPermission = Schema.Literals([
37594339 "allow",
37604340 "deny",
3761]);
4341]).annotate({ identifier: "V2ConfigRequirementsReadResponse__NetworkDomainPermission" });
37624342
37634343export type V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = "allow" | "deny";
37644344export const V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = Schema.Literals([
37654345 "allow",
37664346 "deny",
3767]);
3768
3769export type V2ConfigRequirementsReadResponse__ReasoningEffort = string;
3770export const V2ConfigRequirementsReadResponse__ReasoningEffort = Schema.String.annotate({
3771 description: "A non-empty reasoning effort value advertised by the model.",
3772}).check(Schema.isMinLength(1));
3773
3774export type V2ConfigRequirementsReadResponse__ResidencyRequirement = "us";
3775export const V2ConfigRequirementsReadResponse__ResidencyRequirement = Schema.Literal("us");
3776
3777export type V2ConfigRequirementsReadResponse__SandboxMode =
3778 | "read-only"
3779 | "workspace-write"
3780 | "danger-full-access";
3781export const V2ConfigRequirementsReadResponse__SandboxMode = Schema.Literals([
3782 "read-only",
3783 "workspace-write",
3784 "danger-full-access",
3785]);
3786
3787export type V2ConfigRequirementsReadResponse__WebSearchMode =
3788 | "disabled"
3789 | "cached"
3790 | "indexed"
3791 | "live";
3792export const V2ConfigRequirementsReadResponse__WebSearchMode = Schema.Literals([
3793 "disabled",
3794 "cached",
3795 "indexed",
3796 "live",
3797]);
3798
3799export type V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode = "elevated" | "unelevated";
3800export const V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode = Schema.Literals([
3801 "elevated",
3802 "unelevated",
3803]);
4347]).annotate({ identifier: "V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission" });
38044348
38054349export type V2ConfigValueWriteParams__MergeStrategy = "replace" | "upsert";
3806export const V2ConfigValueWriteParams__MergeStrategy = Schema.Literals(["replace", "upsert"]);
4350export const V2ConfigValueWriteParams__MergeStrategy = Schema.Literals([
4351 "replace",
4352 "upsert",
4353]).annotate({ identifier: "V2ConfigValueWriteParams__MergeStrategy" });
38074354
38084355export type V2ConfigWarningNotification__TextPosition = {
38094356 readonly column: number;
......@@ -3814,21 +4361,28 @@ export const V2ConfigWarningNotification__TextPosition = Schema.Struct({
38144361 description: "1-based column number (in Unicode scalar values).",
38154362 format: "uint",
38164363 })
3817 .check(Schema.isInt())
3818 .check(Schema.isGreaterThanOrEqualTo(0)),
4364 .check(Schema.isInt().annotate({ expected: "an integer" }))
4365 .check(
4366 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
4367 ),
38194368 line: Schema.Number.annotate({ description: "1-based line number.", format: "uint" })
3820 .check(Schema.isInt())
3821 .check(Schema.isGreaterThanOrEqualTo(0)),
3822});
4369 .check(Schema.isInt().annotate({ expected: "an integer" }))
4370 .check(
4371 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
4372 ),
4373}).annotate({ identifier: "V2ConfigWarningNotification__TextPosition" });
38234374
38244375export type V2ConfigWriteResponse__AbsolutePathBuf = string;
38254376export const V2ConfigWriteResponse__AbsolutePathBuf = Schema.String.annotate({
38264377 description:
38274378 "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.",
4379 identifier: "V2ConfigWriteResponse__AbsolutePathBuf",
38284380});
38294381
38304382export type V2ConfigWriteResponse__WriteStatus = "ok" | "okOverridden";
3831export const V2ConfigWriteResponse__WriteStatus = Schema.Literals(["ok", "okOverridden"]);
4383export const V2ConfigWriteResponse__WriteStatus = Schema.Literals(["ok", "okOverridden"]).annotate({
4384 identifier: "V2ConfigWriteResponse__WriteStatus",
4385});
38324386
38334387export type V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome =
38344388 | "reset"
......@@ -3836,101 +4390,72 @@ export type V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimi
38364390 | "noCredit"
38374391 | "alreadyRedeemed";
38384392export const V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome =
3839 Schema.Literals(["reset", "nothingToReset", "noCredit", "alreadyRedeemed"]);
3840
3841export type V2ErrorNotification__NonSteerableTurnKind = "review" | "compact";
3842export const V2ErrorNotification__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
3843
3844export type V2ExperimentalFeatureListResponse__ExperimentalFeature = {
3845 readonly announcement?: string | null;
3846 readonly defaultEnabled: boolean;
3847 readonly description?: string | null;
3848 readonly displayName?: string | null;
3849 readonly enabled: boolean;
3850 readonly name: string;
3851 readonly stage: "beta" | "underDevelopment" | "stable" | "deprecated" | "removed";
3852};
3853export const V2ExperimentalFeatureListResponse__ExperimentalFeature = Schema.Struct({
3854 announcement: Schema.optionalKey(
3855 Schema.Union([
3856 Schema.String.annotate({
3857 description:
3858 "Announcement copy shown to users when the feature is introduced. Null when this feature is not in beta.",
4393 Schema.Union(
4394 [
4395 Schema.Literal("reset").annotate({
4396 description: "A reset credit was consumed and the eligible rate-limit windows were reset.",
38594397 }),
3860 Schema.Null,
3861 ]),
3862 ),
3863 defaultEnabled: Schema.Boolean.annotate({
3864 description: "Whether this feature is enabled by default.",
3865 }),
3866 description: Schema.optionalKey(
3867 Schema.Union([
3868 Schema.String.annotate({
3869 description:
3870 "Short summary describing what the feature does. Null when this feature is not in beta.",
4398 Schema.Literal("nothingToReset").annotate({
4399 description: "No current rate-limit window is eligible for a reset.",
38714400 }),
3872 Schema.Null,
3873 ]),
3874 ),
3875 displayName: Schema.optionalKey(
3876 Schema.Union([
3877 Schema.String.annotate({
3878 description:
3879 "User-facing display name shown in the experimental features UI. Null when this feature is not in beta.",
4401 Schema.Literal("noCredit").annotate({
4402 description: "The account has no earned reset credits available.",
38804403 }),
3881 Schema.Null,
3882 ]),
3883 ),
3884 enabled: Schema.Boolean.annotate({
3885 description: "Whether this feature is currently enabled in the loaded config.",
3886 }),
3887 name: Schema.String.annotate({
3888 description: "Stable key used in config.toml and CLI flag toggles.",
3889 }),
3890 stage: Schema.Literals(["beta", "underDevelopment", "stable", "deprecated", "removed"]).annotate({
3891 description: "Lifecycle stage of this feature flag.",
3892 }),
3893});
4404 Schema.Literal("alreadyRedeemed").annotate({
4405 description: "The same idempotency key already completed a reset successfully.",
4406 }),
4407 ],
4408 { mode: "oneOf" },
4409 ).annotate({
4410 identifier:
4411 "V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome",
4412 });
4413
4414export type V2ErrorNotification__NonSteerableTurnKind = "review" | "compact";
4415export const V2ErrorNotification__NonSteerableTurnKind = Schema.Literals([
4416 "review",
4417 "compact",
4418]).annotate({ identifier: "V2ErrorNotification__NonSteerableTurnKind" });
4419
4420export type V2ExperimentalFeatureListResponse__ExperimentalFeatureStage =
4421 | "beta"
4422 | "underDevelopment"
4423 | "stable"
4424 | "deprecated"
4425 | "removed";
4426export const V2ExperimentalFeatureListResponse__ExperimentalFeatureStage = Schema.Union(
4427 [
4428 Schema.Literal("beta").annotate({
4429 description: "Feature is available for user testing and feedback.",
4430 }),
4431 Schema.Literal("underDevelopment").annotate({
4432 description: "Feature is still being built and not ready for broad use.",
4433 }),
4434 Schema.Literal("stable").annotate({ description: "Feature is production-ready." }),
4435 Schema.Literal("deprecated").annotate({
4436 description: "Feature is deprecated and should be avoided.",
4437 }),
4438 Schema.Literal("removed").annotate({
4439 description: "Feature flag is retained only for backwards compatibility.",
4440 }),
4441 ],
4442 { mode: "oneOf" },
4443).annotate({ identifier: "V2ExperimentalFeatureListResponse__ExperimentalFeatureStage" });
38944444
38954445export type V2ExternalAgentConfigDetectResponse__CommandMigration = { readonly name: string };
38964446export const V2ExternalAgentConfigDetectResponse__CommandMigration = Schema.Struct({
38974447 name: Schema.String,
3898});
3899
3900export type V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType =
3901 | "AGENTS_MD"
3902 | "CONFIG"
3903 | "SKILLS"
3904 | "PLUGINS"
3905 | "MCP_SERVER_CONFIG"
3906 | "SUBAGENTS"
3907 | "HOOKS"
3908 | "COMMANDS"
3909 | "MEMORY"
3910 | "SESSIONS";
3911export const V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType =
3912 Schema.Literals([
3913 "AGENTS_MD",
3914 "CONFIG",
3915 "SKILLS",
3916 "PLUGINS",
3917 "MCP_SERVER_CONFIG",
3918 "SUBAGENTS",
3919 "HOOKS",
3920 "COMMANDS",
3921 "MEMORY",
3922 "SESSIONS",
3923 ]);
4448}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__CommandMigration" });
39244449
39254450export type V2ExternalAgentConfigDetectResponse__HookMigration = { readonly name: string };
39264451export const V2ExternalAgentConfigDetectResponse__HookMigration = Schema.Struct({
39274452 name: Schema.String,
3928});
4453}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__HookMigration" });
39294454
39304455export type V2ExternalAgentConfigDetectResponse__McpServerMigration = { readonly name: string };
39314456export const V2ExternalAgentConfigDetectResponse__McpServerMigration = Schema.Struct({
39324457 name: Schema.String,
3933});
4458}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__McpServerMigration" });
39344459
39354460export type V2ExternalAgentConfigDetectResponse__PluginsMigration = {
39364461 readonly marketplaceName: string;
......@@ -3939,7 +4464,7 @@ export type V2ExternalAgentConfigDetectResponse__PluginsMigration = {
39394464export const V2ExternalAgentConfigDetectResponse__PluginsMigration = Schema.Struct({
39404465 marketplaceName: Schema.String,
39414466 pluginNames: Schema.Array(Schema.String),
3942});
4467}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__PluginsMigration" });
39434468
39444469export type V2ExternalAgentConfigDetectResponse__SessionMigration = {
39454470 readonly cwd: string;
......@@ -3950,19 +4475,19 @@ export const V2ExternalAgentConfigDetectResponse__SessionMigration = Schema.Stru
39504475 cwd: Schema.String,
39514476 path: Schema.String,
39524477 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3953});
4478}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__SessionMigration" });
39544479
39554480export type V2ExternalAgentConfigDetectResponse__SkillMigration = { readonly name: string };
39564481export const V2ExternalAgentConfigDetectResponse__SkillMigration = Schema.Struct({
39574482 name: Schema.String,
3958});
4483}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__SkillMigration" });
39594484
39604485export type V2ExternalAgentConfigDetectResponse__SubagentMigration = { readonly name: string };
39614486export const V2ExternalAgentConfigDetectResponse__SubagentMigration = Schema.Struct({
39624487 name: Schema.String,
3963});
4488}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__SubagentMigration" });
39644489
3965export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType =
4490export type V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType =
39664491 | "AGENTS_MD"
39674492 | "CONFIG"
39684493 | "SKILLS"
......@@ -3973,7 +4498,7 @@ export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfi
39734498 | "COMMANDS"
39744499 | "MEMORY"
39754500 | "SESSIONS";
3976export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType =
4501export const V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType =
39774502 Schema.Literals([
39784503 "AGENTS_MD",
39794504 "CONFIG",
......@@ -3985,9 +4510,11 @@ export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConf
39854510 "COMMANDS",
39864511 "MEMORY",
39874512 "SESSIONS",
3988 ]);
4513 ]).annotate({
4514 identifier: "V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType",
4515 });
39894516
3990export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType =
4517export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType =
39914518 | "AGENTS_MD"
39924519 | "CONFIG"
39934520 | "SKILLS"
......@@ -3998,7 +4525,7 @@ export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfi
39984525 | "COMMANDS"
39994526 | "MEMORY"
40004527 | "SESSIONS";
4001export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType =
4528export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType =
40024529 Schema.Literals([
40034530 "AGENTS_MD",
40044531 "CONFIG",
......@@ -4010,19 +4537,20 @@ export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConf
40104537 "COMMANDS",
40114538 "MEMORY",
40124539 "SESSIONS",
4013 ]);
4540 ]).annotate({
4541 identifier:
4542 "V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType",
4543 });
40144544
40154545export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource =
40164546 "remoteMcpServersConfig";
40174547export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource =
4018 Schema.Literal("remoteMcpServersConfig");
4019
4020export type V2ExternalAgentConfigImportParams__CommandMigration = { readonly name: string };
4021export const V2ExternalAgentConfigImportParams__CommandMigration = Schema.Struct({
4022 name: Schema.String,
4023});
4548 Schema.Literal("remoteMcpServersConfig").annotate({
4549 identifier:
4550 "V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource",
4551 });
40244552
4025export type V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType =
4553export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType =
40264554 | "AGENTS_MD"
40274555 | "CONFIG"
40284556 | "SKILLS"
......@@ -4033,7 +4561,7 @@ export type V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemT
40334561 | "COMMANDS"
40344562 | "MEMORY"
40354563 | "SESSIONS";
4036export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType =
4564export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType =
40374565 Schema.Literals([
40384566 "AGENTS_MD",
40394567 "CONFIG",
......@@ -4045,17 +4573,25 @@ export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItem
40454573 "COMMANDS",
40464574 "MEMORY",
40474575 "SESSIONS",
4048 ]);
4576 ]).annotate({
4577 identifier:
4578 "V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType",
4579 });
4580
4581export type V2ExternalAgentConfigImportParams__CommandMigration = { readonly name: string };
4582export const V2ExternalAgentConfigImportParams__CommandMigration = Schema.Struct({
4583 name: Schema.String,
4584}).annotate({ identifier: "V2ExternalAgentConfigImportParams__CommandMigration" });
40494585
40504586export type V2ExternalAgentConfigImportParams__HookMigration = { readonly name: string };
40514587export const V2ExternalAgentConfigImportParams__HookMigration = Schema.Struct({
40524588 name: Schema.String,
4053});
4589}).annotate({ identifier: "V2ExternalAgentConfigImportParams__HookMigration" });
40544590
40554591export type V2ExternalAgentConfigImportParams__McpServerMigration = { readonly name: string };
40564592export const V2ExternalAgentConfigImportParams__McpServerMigration = Schema.Struct({
40574593 name: Schema.String,
4058});
4594}).annotate({ identifier: "V2ExternalAgentConfigImportParams__McpServerMigration" });
40594595
40604596export type V2ExternalAgentConfigImportParams__PluginsMigration = {
40614597 readonly marketplaceName: string;
......@@ -4064,7 +4600,7 @@ export type V2ExternalAgentConfigImportParams__PluginsMigration = {
40644600export const V2ExternalAgentConfigImportParams__PluginsMigration = Schema.Struct({
40654601 marketplaceName: Schema.String,
40664602 pluginNames: Schema.Array(Schema.String),
4067});
4603}).annotate({ identifier: "V2ExternalAgentConfigImportParams__PluginsMigration" });
40684604
40694605export type V2ExternalAgentConfigImportParams__SessionMigration = {
40704606 readonly cwd: string;
......@@ -4075,17 +4611,44 @@ export const V2ExternalAgentConfigImportParams__SessionMigration = Schema.Struct
40754611 cwd: Schema.String,
40764612 path: Schema.String,
40774613 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4078});
4614}).annotate({ identifier: "V2ExternalAgentConfigImportParams__SessionMigration" });
40794615
40804616export type V2ExternalAgentConfigImportParams__SkillMigration = { readonly name: string };
40814617export const V2ExternalAgentConfigImportParams__SkillMigration = Schema.Struct({
40824618 name: Schema.String,
4083});
4619}).annotate({ identifier: "V2ExternalAgentConfigImportParams__SkillMigration" });
40844620
40854621export type V2ExternalAgentConfigImportParams__SubagentMigration = { readonly name: string };
40864622export const V2ExternalAgentConfigImportParams__SubagentMigration = Schema.Struct({
40874623 name: Schema.String,
4088});
4624}).annotate({ identifier: "V2ExternalAgentConfigImportParams__SubagentMigration" });
4625
4626export type V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType =
4627 | "AGENTS_MD"
4628 | "CONFIG"
4629 | "SKILLS"
4630 | "PLUGINS"
4631 | "MCP_SERVER_CONFIG"
4632 | "SUBAGENTS"
4633 | "HOOKS"
4634 | "COMMANDS"
4635 | "MEMORY"
4636 | "SESSIONS";
4637export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType =
4638 Schema.Literals([
4639 "AGENTS_MD",
4640 "CONFIG",
4641 "SKILLS",
4642 "PLUGINS",
4643 "MCP_SERVER_CONFIG",
4644 "SUBAGENTS",
4645 "HOOKS",
4646 "COMMANDS",
4647 "MEMORY",
4648 "SESSIONS",
4649 ]).annotate({
4650 identifier: "V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType",
4651 });
40894652
40904653export type V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType =
40914654 | "AGENTS_MD"
......@@ -4110,7 +4673,10 @@ export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfi
41104673 "COMMANDS",
41114674 "MEMORY",
41124675 "SESSIONS",
4113 ]);
4676 ]).annotate({
4677 identifier:
4678 "V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType",
4679 });
41144680
41154681export type V2FileChangePatchUpdatedNotification__PatchChangeKind =
41164682 | { readonly type: "add" }
......@@ -4130,12 +4696,41 @@ export const V2FileChangePatchUpdatedNotification__PatchChangeKind = Schema.Unio
41304696 }).annotate({ title: "UpdatePatchChangeKind" }),
41314697 ],
41324698 { mode: "oneOf" },
4133);
4699).annotate({ identifier: "V2FileChangePatchUpdatedNotification__PatchChangeKind" });
41344700
41354701export type V2FsChangedNotification__AbsolutePathBuf = string;
41364702export const V2FsChangedNotification__AbsolutePathBuf = Schema.String.annotate({
41374703 description:
41384704 "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.",
4705 identifier: "V2FsChangedNotification__AbsolutePathBuf",
4706});
4707
4708export type V2FsCopyParams__AbsolutePathBuf = string;
4709export const V2FsCopyParams__AbsolutePathBuf = Schema.String.annotate({
4710 description:
4711 "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.",
4712 identifier: "V2FsCopyParams__AbsolutePathBuf",
4713});
4714
4715export type V2FsCreateDirectoryParams__AbsolutePathBuf = string;
4716export const V2FsCreateDirectoryParams__AbsolutePathBuf = Schema.String.annotate({
4717 description:
4718 "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.",
4719 identifier: "V2FsCreateDirectoryParams__AbsolutePathBuf",
4720});
4721
4722export type V2FsGetMetadataParams__AbsolutePathBuf = string;
4723export const V2FsGetMetadataParams__AbsolutePathBuf = Schema.String.annotate({
4724 description:
4725 "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.",
4726 identifier: "V2FsGetMetadataParams__AbsolutePathBuf",
4727});
4728
4729export type V2FsReadDirectoryParams__AbsolutePathBuf = string;
4730export const V2FsReadDirectoryParams__AbsolutePathBuf = Schema.String.annotate({
4731 description:
4732 "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.",
4733 identifier: "V2FsReadDirectoryParams__AbsolutePathBuf",
41394734});
41404735
41414736export type V2FsReadDirectoryResponse__FsReadDirectoryEntry = {
......@@ -4153,7 +4748,63 @@ export const V2FsReadDirectoryResponse__FsReadDirectoryEntry = Schema.Struct({
41534748 isFile: Schema.Boolean.annotate({
41544749 description: "Whether this entry resolves to a regular file.",
41554750 }),
4156}).annotate({ description: "A directory entry returned by `fs/readDirectory`." });
4751}).annotate({
4752 description: "A directory entry returned by `fs/readDirectory`.",
4753 identifier: "V2FsReadDirectoryResponse__FsReadDirectoryEntry",
4754});
4755
4756export type V2FsReadFileParams__AbsolutePathBuf = string;
4757export const V2FsReadFileParams__AbsolutePathBuf = Schema.String.annotate({
4758 description:
4759 "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.",
4760 identifier: "V2FsReadFileParams__AbsolutePathBuf",
4761});
4762
4763export type V2FsRemoveParams__AbsolutePathBuf = string;
4764export const V2FsRemoveParams__AbsolutePathBuf = Schema.String.annotate({
4765 description:
4766 "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.",
4767 identifier: "V2FsRemoveParams__AbsolutePathBuf",
4768});
4769
4770export type V2FsWatchParams__AbsolutePathBuf = string;
4771export const V2FsWatchParams__AbsolutePathBuf = Schema.String.annotate({
4772 description:
4773 "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.",
4774 identifier: "V2FsWatchParams__AbsolutePathBuf",
4775});
4776
4777export type V2FsWatchResponse__AbsolutePathBuf = string;
4778export const V2FsWatchResponse__AbsolutePathBuf = Schema.String.annotate({
4779 description:
4780 "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.",
4781 identifier: "V2FsWatchResponse__AbsolutePathBuf",
4782});
4783
4784export type V2FsWriteFileParams__AbsolutePathBuf = string;
4785export const V2FsWriteFileParams__AbsolutePathBuf = Schema.String.annotate({
4786 description:
4787 "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.",
4788 identifier: "V2FsWriteFileParams__AbsolutePathBuf",
4789});
4790
4791export type V2GetAccountRateLimitsResponse__RateLimitResetType = "codexRateLimits" | "unknown";
4792export const V2GetAccountRateLimitsResponse__RateLimitResetType = Schema.Literals([
4793 "codexRateLimits",
4794 "unknown",
4795]).annotate({ identifier: "V2GetAccountRateLimitsResponse__RateLimitResetType" });
4796
4797export type V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus =
4798 | "available"
4799 | "redeeming"
4800 | "redeemed"
4801 | "unknown";
4802export const V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus = Schema.Literals([
4803 "available",
4804 "redeeming",
4805 "redeemed",
4806 "unknown",
4807]).annotate({ identifier: "V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus" });
41574808
41584809export type V2GetAccountRateLimitsResponse__CreditsSnapshot = {
41594810 readonly balance?: string | null;
......@@ -4164,7 +4815,24 @@ export const V2GetAccountRateLimitsResponse__CreditsSnapshot = Schema.Struct({
41644815 balance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
41654816 hasCredits: Schema.Boolean,
41664817 unlimited: Schema.Boolean,
4167});
4818}).annotate({ identifier: "V2GetAccountRateLimitsResponse__CreditsSnapshot" });
4819
4820export type V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot = {
4821 readonly limit: string;
4822 readonly remainingPercent: number;
4823 readonly resetsAt: number;
4824 readonly used: string;
4825};
4826export const V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot = Schema.Struct({
4827 limit: Schema.String,
4828 remainingPercent: Schema.Number.annotate({ format: "int32" }).check(
4829 Schema.isInt().annotate({ expected: "an integer" }),
4830 ),
4831 resetsAt: Schema.Number.annotate({ format: "int64" }).check(
4832 Schema.isInt().annotate({ expected: "an integer" }),
4833 ),
4834 used: Schema.String,
4835}).annotate({ identifier: "V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot" });
41684836
41694837export type V2GetAccountRateLimitsResponse__PlanType =
41704838 | "free"
......@@ -4202,7 +4870,34 @@ export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals([
42024870 "edu_plus",
42034871 "edu_pro",
42044872 "unknown",
4205]);
4873]).annotate({ identifier: "V2GetAccountRateLimitsResponse__PlanType" });
4874
4875export type V2GetAccountRateLimitsResponse__RateLimitWindow = {
4876 readonly resetsAt?: number | null;
4877 readonly usedPercent: number;
4878 readonly windowDurationMins?: number | null;
4879};
4880export const V2GetAccountRateLimitsResponse__RateLimitWindow = Schema.Struct({
4881 resetsAt: Schema.optionalKey(
4882 Schema.Union([
4883 Schema.Number.annotate({ format: "int64" }).check(
4884 Schema.isInt().annotate({ expected: "an integer" }),
4885 ),
4886 Schema.Null,
4887 ]),
4888 ),
4889 usedPercent: Schema.Number.annotate({ format: "int32" }).check(
4890 Schema.isInt().annotate({ expected: "an integer" }),
4891 ),
4892 windowDurationMins: Schema.optionalKey(
4893 Schema.Union([
4894 Schema.Number.annotate({ format: "int64" }).check(
4895 Schema.isInt().annotate({ expected: "an integer" }),
4896 ),
4897 Schema.Null,
4898 ]),
4899 ),
4900}).annotate({ identifier: "V2GetAccountRateLimitsResponse__RateLimitWindow" });
42064901
42074902export type V2GetAccountRateLimitsResponse__RateLimitReachedType =
42084903 | "rate_limit_reached"
......@@ -4216,53 +4911,7 @@ export const V2GetAccountRateLimitsResponse__RateLimitReachedType = Schema.Liter
42164911 "workspace_member_credits_depleted",
42174912 "workspace_owner_usage_limit_reached",
42184913 "workspace_member_usage_limit_reached",
4219]);
4220
4221export type V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus =
4222 | "available"
4223 | "redeeming"
4224 | "redeemed"
4225 | "unknown";
4226export const V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus = Schema.Literals([
4227 "available",
4228 "redeeming",
4229 "redeemed",
4230 "unknown",
4231]);
4232
4233export type V2GetAccountRateLimitsResponse__RateLimitResetType = "codexRateLimits" | "unknown";
4234export const V2GetAccountRateLimitsResponse__RateLimitResetType = Schema.Literals([
4235 "codexRateLimits",
4236 "unknown",
4237]);
4238
4239export type V2GetAccountRateLimitsResponse__RateLimitWindow = {
4240 readonly resetsAt?: number | null;
4241 readonly usedPercent: number;
4242 readonly windowDurationMins?: number | null;
4243};
4244export const V2GetAccountRateLimitsResponse__RateLimitWindow = Schema.Struct({
4245 resetsAt: Schema.optionalKey(
4246 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
4247 ),
4248 usedPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
4249 windowDurationMins: Schema.optionalKey(
4250 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
4251 ),
4252});
4253
4254export type V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot = {
4255 readonly limit: string;
4256 readonly remainingPercent: number;
4257 readonly resetsAt: number;
4258 readonly used: string;
4259};
4260export const V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot = Schema.Struct({
4261 limit: Schema.String,
4262 remainingPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
4263 resetsAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
4264 used: Schema.String,
4265});
4914]).annotate({ identifier: "V2GetAccountRateLimitsResponse__RateLimitReachedType" });
42664915
42674916export type V2GetAccountResponse__PlanType =
42684917 | "free"
......@@ -4300,7 +4949,7 @@ export const V2GetAccountResponse__PlanType = Schema.Literals([
43004949 "edu_plus",
43014950 "edu_pro",
43024951 "unknown",
4303]);
4952]).annotate({ identifier: "V2GetAccountResponse__PlanType" });
43044953
43054954export type V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket = {
43064955 readonly startDate: string;
......@@ -4308,8 +4957,10 @@ export type V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket = {
43084957};
43094958export const V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket = Schema.Struct({
43104959 startDate: Schema.String,
4311 tokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
4312});
4960 tokens: Schema.Number.annotate({ format: "int64" }).check(
4961 Schema.isInt().annotate({ expected: "an integer" }),
4962 ),
4963}).annotate({ identifier: "V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket" });
43134964
43144965export type V2GetAccountTokenUsageResponse__AccountTokenUsageSummary = {
43154966 readonly currentStreakDays?: number | null;
......@@ -4320,21 +4971,46 @@ export type V2GetAccountTokenUsageResponse__AccountTokenUsageSummary = {
43204971};
43214972export const V2GetAccountTokenUsageResponse__AccountTokenUsageSummary = Schema.Struct({
43224973 currentStreakDays: Schema.optionalKey(
4323 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
4974 Schema.Union([
4975 Schema.Number.annotate({ format: "int64" }).check(
4976 Schema.isInt().annotate({ expected: "an integer" }),
4977 ),
4978 Schema.Null,
4979 ]),
43244980 ),
43254981 lifetimeTokens: Schema.optionalKey(
4326 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
4982 Schema.Union([
4983 Schema.Number.annotate({ format: "int64" }).check(
4984 Schema.isInt().annotate({ expected: "an integer" }),
4985 ),
4986 Schema.Null,
4987 ]),
43274988 ),
43284989 longestRunningTurnSec: Schema.optionalKey(
4329 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
4990 Schema.Union([
4991 Schema.Number.annotate({ format: "int64" }).check(
4992 Schema.isInt().annotate({ expected: "an integer" }),
4993 ),
4994 Schema.Null,
4995 ]),
43304996 ),
43314997 longestStreakDays: Schema.optionalKey(
4332 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
4998 Schema.Union([
4999 Schema.Number.annotate({ format: "int64" }).check(
5000 Schema.isInt().annotate({ expected: "an integer" }),
5001 ),
5002 Schema.Null,
5003 ]),
43335004 ),
43345005 peakDailyTokens: Schema.optionalKey(
4335 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
5006 Schema.Union([
5007 Schema.Number.annotate({ format: "int64" }).check(
5008 Schema.isInt().annotate({ expected: "an integer" }),
5009 ),
5010 Schema.Null,
5011 ]),
43365012 ),
4337});
5013}).annotate({ identifier: "V2GetAccountTokenUsageResponse__AccountTokenUsageSummary" });
43385014
43395015export type V2GetWorkspaceMessagesResponse__WorkspaceMessageType =
43405016 | "headline"
......@@ -4344,13 +5020,21 @@ export const V2GetWorkspaceMessagesResponse__WorkspaceMessageType = Schema.Liter
43445020 "headline",
43455021 "announcement",
43465022 "unknown",
4347]);
5023]).annotate({ identifier: "V2GetWorkspaceMessagesResponse__WorkspaceMessageType" });
43485024
4349export type V2HookCompletedNotification__AbsolutePathBuf = string;
4350export const V2HookCompletedNotification__AbsolutePathBuf = Schema.String.annotate({
4351 description:
4352 "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.",
4353});
5025export type V2HookCompletedNotification__HookOutputEntryKind =
5026 | "warning"
5027 | "stop"
5028 | "feedback"
5029 | "context"
5030 | "error";
5031export const V2HookCompletedNotification__HookOutputEntryKind = Schema.Literals([
5032 "warning",
5033 "stop",
5034 "feedback",
5035 "context",
5036 "error",
5037]).annotate({ identifier: "V2HookCompletedNotification__HookOutputEntryKind" });
43545038
43555039export type V2HookCompletedNotification__HookEventName =
43565040 | "preToolUse"
......@@ -4376,31 +5060,58 @@ export const V2HookCompletedNotification__HookEventName = Schema.Literals([
43765060 "subagentStart",
43775061 "subagentStop",
43785062 "stop",
4379]);
5063]).annotate({ identifier: "V2HookCompletedNotification__HookEventName" });
43805064
43815065export type V2HookCompletedNotification__HookExecutionMode = "sync" | "async";
4382export const V2HookCompletedNotification__HookExecutionMode = Schema.Literals(["sync", "async"]);
5066export const V2HookCompletedNotification__HookExecutionMode = Schema.Literals([
5067 "sync",
5068 "async",
5069]).annotate({ identifier: "V2HookCompletedNotification__HookExecutionMode" });
43835070
43845071export type V2HookCompletedNotification__HookHandlerType = "command" | "prompt" | "agent";
43855072export const V2HookCompletedNotification__HookHandlerType = Schema.Literals([
43865073 "command",
43875074 "prompt",
43885075 "agent",
4389]);
5076]).annotate({ identifier: "V2HookCompletedNotification__HookHandlerType" });
43905077
4391export type V2HookCompletedNotification__HookOutputEntryKind =
4392 | "warning"
4393 | "stop"
4394 | "feedback"
4395 | "context"
4396 | "error";
4397export const V2HookCompletedNotification__HookOutputEntryKind = Schema.Literals([
4398 "warning",
4399 "stop",
4400 "feedback",
4401 "context",
4402 "error",
4403]);
5078export type V2HookCompletedNotification__HookScope = "thread" | "turn";
5079export const V2HookCompletedNotification__HookScope = Schema.Literals(["thread", "turn"]).annotate({
5080 identifier: "V2HookCompletedNotification__HookScope",
5081});
5082
5083export type V2HookCompletedNotification__HookSource =
5084 | "system"
5085 | "user"
5086 | "project"
5087 | "mdm"
5088 | "sessionFlags"
5089 | "plugin"
5090 | "cloudRequirements"
5091 | "cloudManagedConfig"
5092 | "legacyManagedConfigFile"
5093 | "legacyManagedConfigMdm"
5094 | "unknown";
5095export const V2HookCompletedNotification__HookSource = Schema.Literals([
5096 "system",
5097 "user",
5098 "project",
5099 "mdm",
5100 "sessionFlags",
5101 "plugin",
5102 "cloudRequirements",
5103 "cloudManagedConfig",
5104 "legacyManagedConfigFile",
5105 "legacyManagedConfigMdm",
5106 "unknown",
5107]).annotate({ identifier: "V2HookCompletedNotification__HookSource" });
5108
5109export type V2HookCompletedNotification__AbsolutePathBuf = string;
5110export const V2HookCompletedNotification__AbsolutePathBuf = Schema.String.annotate({
5111 description:
5112 "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.",
5113 identifier: "V2HookCompletedNotification__AbsolutePathBuf",
5114});
44045115
44055116export type V2HookCompletedNotification__HookRunStatus =
44065117 | "running"
......@@ -4414,16 +5125,7 @@ export const V2HookCompletedNotification__HookRunStatus = Schema.Literals([
44145125 "failed",
44155126 "blocked",
44165127 "stopped",
4417]);
4418
4419export type V2HookCompletedNotification__HookScope = "thread" | "turn";
4420export const V2HookCompletedNotification__HookScope = Schema.Literals(["thread", "turn"]);
4421
4422export type V2HooksListResponse__AbsolutePathBuf = string;
4423export const V2HooksListResponse__AbsolutePathBuf = Schema.String.annotate({
4424 description:
4425 "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.",
4426});
5128]).annotate({ identifier: "V2HookCompletedNotification__HookRunStatus" });
44275129
44285130export type V2HooksListResponse__HookErrorInfo = {
44295131 readonly message: string;
......@@ -4432,7 +5134,7 @@ export type V2HooksListResponse__HookErrorInfo = {
44325134export const V2HooksListResponse__HookErrorInfo = Schema.Struct({
44335135 message: Schema.String,
44345136 path: Schema.String,
4435});
5137}).annotate({ identifier: "V2HooksListResponse__HookErrorInfo" });
44365138
44375139export type V2HooksListResponse__HookEventName =
44385140 | "preToolUse"
......@@ -4458,10 +5160,14 @@ export const V2HooksListResponse__HookEventName = Schema.Literals([
44585160 "subagentStart",
44595161 "subagentStop",
44605162 "stop",
4461]);
5163]).annotate({ identifier: "V2HooksListResponse__HookEventName" });
44625164
44635165export type V2HooksListResponse__HookHandlerType = "command" | "prompt" | "agent";
4464export const V2HooksListResponse__HookHandlerType = Schema.Literals(["command", "prompt", "agent"]);
5166export const V2HooksListResponse__HookHandlerType = Schema.Literals([
5167 "command",
5168 "prompt",
5169 "agent",
5170]).annotate({ identifier: "V2HooksListResponse__HookHandlerType" });
44655171
44665172export type V2HooksListResponse__HookSource =
44675173 | "system"
......@@ -4487,7 +5193,14 @@ export const V2HooksListResponse__HookSource = Schema.Literals([
44875193 "legacyManagedConfigFile",
44885194 "legacyManagedConfigMdm",
44895195 "unknown",
4490]);
5196]).annotate({ identifier: "V2HooksListResponse__HookSource" });
5197
5198export type V2HooksListResponse__AbsolutePathBuf = string;
5199export const V2HooksListResponse__AbsolutePathBuf = Schema.String.annotate({
5200 description:
5201 "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.",
5202 identifier: "V2HooksListResponse__AbsolutePathBuf",
5203});
44915204
44925205export type V2HooksListResponse__HookTrustStatus = "managed" | "untrusted" | "trusted" | "modified";
44935206export const V2HooksListResponse__HookTrustStatus = Schema.Literals([
......@@ -4495,13 +5208,21 @@ export const V2HooksListResponse__HookTrustStatus = Schema.Literals([
44955208 "untrusted",
44965209 "trusted",
44975210 "modified",
4498]);
5211]).annotate({ identifier: "V2HooksListResponse__HookTrustStatus" });
44995212
4500export type V2HookStartedNotification__AbsolutePathBuf = string;
4501export const V2HookStartedNotification__AbsolutePathBuf = Schema.String.annotate({
4502 description:
4503 "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.",
4504});
5213export type V2HookStartedNotification__HookOutputEntryKind =
5214 | "warning"
5215 | "stop"
5216 | "feedback"
5217 | "context"
5218 | "error";
5219export const V2HookStartedNotification__HookOutputEntryKind = Schema.Literals([
5220 "warning",
5221 "stop",
5222 "feedback",
5223 "context",
5224 "error",
5225]).annotate({ identifier: "V2HookStartedNotification__HookOutputEntryKind" });
45055226
45065227export type V2HookStartedNotification__HookEventName =
45075228 | "preToolUse"
......@@ -4527,31 +5248,58 @@ export const V2HookStartedNotification__HookEventName = Schema.Literals([
45275248 "subagentStart",
45285249 "subagentStop",
45295250 "stop",
4530]);
5251]).annotate({ identifier: "V2HookStartedNotification__HookEventName" });
45315252
45325253export type V2HookStartedNotification__HookExecutionMode = "sync" | "async";
4533export const V2HookStartedNotification__HookExecutionMode = Schema.Literals(["sync", "async"]);
5254export const V2HookStartedNotification__HookExecutionMode = Schema.Literals([
5255 "sync",
5256 "async",
5257]).annotate({ identifier: "V2HookStartedNotification__HookExecutionMode" });
45345258
45355259export type V2HookStartedNotification__HookHandlerType = "command" | "prompt" | "agent";
45365260export const V2HookStartedNotification__HookHandlerType = Schema.Literals([
45375261 "command",
45385262 "prompt",
45395263 "agent",
4540]);
5264]).annotate({ identifier: "V2HookStartedNotification__HookHandlerType" });
45415265
4542export type V2HookStartedNotification__HookOutputEntryKind =
4543 | "warning"
4544 | "stop"
4545 | "feedback"
4546 | "context"
4547 | "error";
4548export const V2HookStartedNotification__HookOutputEntryKind = Schema.Literals([
4549 "warning",
4550 "stop",
4551 "feedback",
4552 "context",
4553 "error",
4554]);
5266export type V2HookStartedNotification__HookScope = "thread" | "turn";
5267export const V2HookStartedNotification__HookScope = Schema.Literals(["thread", "turn"]).annotate({
5268 identifier: "V2HookStartedNotification__HookScope",
5269});
5270
5271export type V2HookStartedNotification__HookSource =
5272 | "system"
5273 | "user"
5274 | "project"
5275 | "mdm"
5276 | "sessionFlags"
5277 | "plugin"
5278 | "cloudRequirements"
5279 | "cloudManagedConfig"
5280 | "legacyManagedConfigFile"
5281 | "legacyManagedConfigMdm"
5282 | "unknown";
5283export const V2HookStartedNotification__HookSource = Schema.Literals([
5284 "system",
5285 "user",
5286 "project",
5287 "mdm",
5288 "sessionFlags",
5289 "plugin",
5290 "cloudRequirements",
5291 "cloudManagedConfig",
5292 "legacyManagedConfigFile",
5293 "legacyManagedConfigMdm",
5294 "unknown",
5295]).annotate({ identifier: "V2HookStartedNotification__HookSource" });
5296
5297export type V2HookStartedNotification__AbsolutePathBuf = string;
5298export const V2HookStartedNotification__AbsolutePathBuf = Schema.String.annotate({
5299 description:
5300 "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.",
5301 identifier: "V2HookStartedNotification__AbsolutePathBuf",
5302});
45555303
45565304export type V2HookStartedNotification__HookRunStatus =
45575305 | "running"
......@@ -4565,34 +5313,104 @@ export const V2HookStartedNotification__HookRunStatus = Schema.Literals([
45655313 "failed",
45665314 "blocked",
45675315 "stopped",
4568]);
5316]).annotate({ identifier: "V2HookStartedNotification__HookRunStatus" });
45695317
4570export type V2HookStartedNotification__HookScope = "thread" | "turn";
4571export const V2HookStartedNotification__HookScope = Schema.Literals(["thread", "turn"]);
5318export type V2ItemCompletedNotification__ByteRange = {
5319 readonly end: number;
5320 readonly start: number;
5321};
5322export const V2ItemCompletedNotification__ByteRange = Schema.Struct({
5323 end: Schema.Number.annotate({ format: "uint" })
5324 .check(Schema.isInt().annotate({ expected: "an integer" }))
5325 .check(
5326 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
5327 ),
5328 start: Schema.Number.annotate({ format: "uint" })
5329 .check(Schema.isInt().annotate({ expected: "an integer" }))
5330 .check(
5331 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
5332 ),
5333}).annotate({ identifier: "V2ItemCompletedNotification__ByteRange" });
5334
5335export type V2ItemCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original";
5336export const V2ItemCompletedNotification__ImageDetail = Schema.Literals([
5337 "auto",
5338 "low",
5339 "high",
5340 "original",
5341]).annotate({ identifier: "V2ItemCompletedNotification__ImageDetail" });
5342
5343export type V2ItemCompletedNotification__HookPromptFragment = {
5344 readonly hookRunId: string;
5345 readonly text: string;
5346};
5347export const V2ItemCompletedNotification__HookPromptFragment = Schema.Struct({
5348 hookRunId: Schema.String,
5349 text: Schema.String,
5350}).annotate({ identifier: "V2ItemCompletedNotification__HookPromptFragment" });
5351
5352export type V2ItemCompletedNotification__MemoryCitationEntry = {
5353 readonly lineEnd: number;
5354 readonly lineStart: number;
5355 readonly note: string;
5356 readonly path: string;
5357};
5358export const V2ItemCompletedNotification__MemoryCitationEntry = Schema.Struct({
5359 lineEnd: Schema.Number.annotate({ format: "uint32" })
5360 .check(Schema.isInt().annotate({ expected: "an integer" }))
5361 .check(
5362 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
5363 ),
5364 lineStart: Schema.Number.annotate({ format: "uint32" })
5365 .check(Schema.isInt().annotate({ expected: "an integer" }))
5366 .check(
5367 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
5368 ),
5369 note: Schema.String,
5370 path: Schema.String,
5371}).annotate({ identifier: "V2ItemCompletedNotification__MemoryCitationEntry" });
5372
5373export type V2ItemCompletedNotification__MessagePhase = "commentary" | "final_answer";
5374export const V2ItemCompletedNotification__MessagePhase = Schema.Union(
5375 [
5376 Schema.Literal("commentary").annotate({
5377 description:
5378 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
5379 }),
5380 Schema.Literal("final_answer").annotate({
5381 description: "The assistant's terminal answer text for the current turn.",
5382 }),
5383 ],
5384 { mode: "oneOf" },
5385).annotate({
5386 description:
5387 '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.',
5388 identifier: "V2ItemCompletedNotification__MessagePhase",
5389});
45725390
45735391export type V2ItemCompletedNotification__AbsolutePathBuf = string;
45745392export const V2ItemCompletedNotification__AbsolutePathBuf = Schema.String.annotate({
45755393 description:
45765394 "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.",
5395 identifier: "V2ItemCompletedNotification__AbsolutePathBuf",
45775396});
45785397
4579export type V2ItemCompletedNotification__CollabAgentStatus =
4580 | "pendingInit"
4581 | "running"
4582 | "interrupted"
4583 | "completed"
4584 | "errored"
4585 | "shutdown"
4586 | "notFound";
4587export const V2ItemCompletedNotification__CollabAgentStatus = Schema.Literals([
4588 "pendingInit",
4589 "running",
4590 "interrupted",
4591 "completed",
4592 "errored",
4593 "shutdown",
4594 "notFound",
4595]);
5398export type V2ItemCompletedNotification__LegacyAppPathString = string;
5399export const V2ItemCompletedNotification__LegacyAppPathString = Schema.String.annotate({
5400 identifier: "V2ItemCompletedNotification__LegacyAppPathString",
5401});
5402
5403export type V2ItemCompletedNotification__CommandExecutionSource =
5404 | "agent"
5405 | "userShell"
5406 | "unifiedExecStartup"
5407 | "unifiedExecInteraction";
5408export const V2ItemCompletedNotification__CommandExecutionSource = Schema.Literals([
5409 "agent",
5410 "userShell",
5411 "unifiedExecStartup",
5412 "unifiedExecInteraction",
5413]).annotate({ identifier: "V2ItemCompletedNotification__CommandExecutionSource" });
45965414
45975415export type V2ItemCompletedNotification__CommandExecutionStatus =
45985416 | "inProgress"
......@@ -4604,65 +5422,39 @@ export const V2ItemCompletedNotification__CommandExecutionStatus = Schema.Litera
46045422 "completed",
46055423 "failed",
46065424 "declined",
4607]);
5425]).annotate({ identifier: "V2ItemCompletedNotification__CommandExecutionStatus" });
46085426
4609export type V2ItemCompletedNotification__DynamicToolCallOutputContentItem =
4610 | { readonly text: string; readonly type: "inputText" }
4611 | { readonly imageUrl: string; readonly type: "inputImage" }
4612 | { readonly audioUrl: string; readonly type: "inputAudio" };
4613export const V2ItemCompletedNotification__DynamicToolCallOutputContentItem = Schema.Union(
5427export type V2ItemCompletedNotification__PatchChangeKind =
5428 | { readonly type: "add" }
5429 | { readonly type: "delete" }
5430 | { readonly move_path?: string | null; readonly type: "update" };
5431export const V2ItemCompletedNotification__PatchChangeKind = Schema.Union(
46145432 [
46155433 Schema.Struct({
4616 text: Schema.String,
4617 type: Schema.Literal("inputText").annotate({
4618 title: "InputTextDynamicToolCallOutputContentItemType",
4619 }),
4620 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
5434 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
5435 }).annotate({ title: "AddPatchChangeKind" }),
46215436 Schema.Struct({
4622 imageUrl: Schema.String,
4623 type: Schema.Literal("inputImage").annotate({
4624 title: "InputImageDynamicToolCallOutputContentItemType",
4625 }),
4626 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
5437 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
5438 }).annotate({ title: "DeletePatchChangeKind" }),
46275439 Schema.Struct({
4628 audioUrl: Schema.String,
4629 type: Schema.Literal("inputAudio").annotate({
4630 title: "InputAudioDynamicToolCallOutputContentItemType",
4631 }),
4632 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
5440 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5441 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
5442 }).annotate({ title: "UpdatePatchChangeKind" }),
46335443 ],
46345444 { mode: "oneOf" },
4635);
5445).annotate({ identifier: "V2ItemCompletedNotification__PatchChangeKind" });
46365446
4637export type V2ItemCompletedNotification__DynamicToolCallStatus =
5447export type V2ItemCompletedNotification__PatchApplyStatus =
46385448 | "inProgress"
46395449 | "completed"
4640 | "failed";
4641export const V2ItemCompletedNotification__DynamicToolCallStatus = Schema.Literals([
5450 | "failed"
5451 | "declined";
5452export const V2ItemCompletedNotification__PatchApplyStatus = Schema.Literals([
46425453 "inProgress",
46435454 "completed",
46445455 "failed",
4645]);
4646
4647export type V2ItemCompletedNotification__HookPromptFragment = {
4648 readonly hookRunId: string;
4649 readonly text: string;
4650};
4651export const V2ItemCompletedNotification__HookPromptFragment = Schema.Struct({
4652 hookRunId: Schema.String,
4653 text: Schema.String,
4654});
4655
4656export type V2ItemCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original";
4657export const V2ItemCompletedNotification__ImageDetail = Schema.Literals([
4658 "auto",
4659 "low",
4660 "high",
4661 "original",
4662]);
4663
4664export type V2ItemCompletedNotification__LegacyAppPathString = string;
4665export const V2ItemCompletedNotification__LegacyAppPathString = Schema.String;
5456 "declined",
5457]).annotate({ identifier: "V2ItemCompletedNotification__PatchApplyStatus" });
46665458
46675459export type V2ItemCompletedNotification__McpToolCallAppContext = {
46685460 readonly actionName?: string | null;
......@@ -4677,93 +5469,130 @@ export const V2ItemCompletedNotification__McpToolCallAppContext = Schema.Struct(
46775469 connectorId: Schema.String,
46785470 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
46795471 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4680});
5472}).annotate({ identifier: "V2ItemCompletedNotification__McpToolCallAppContext" });
46815473
46825474export type V2ItemCompletedNotification__McpToolCallError = { readonly message: string };
46835475export const V2ItemCompletedNotification__McpToolCallError = Schema.Struct({
46845476 message: Schema.String,
4685});
5477}).annotate({ identifier: "V2ItemCompletedNotification__McpToolCallError" });
46865478
46875479export type V2ItemCompletedNotification__McpToolCallResult = {
4688 readonly _meta?: unknown;
4689 readonly content: ReadonlyArray<unknown>;
4690 readonly structuredContent?: unknown;
5480 readonly _meta?: Schema.Json;
5481 readonly content: ReadonlyArray<Schema.Json>;
5482 readonly structuredContent?: Schema.Json;
46915483};
46925484export const V2ItemCompletedNotification__McpToolCallResult = Schema.Struct({
4693 _meta: Schema.optionalKey(Schema.Unknown),
4694 content: Schema.Array(Schema.Unknown),
4695 structuredContent: Schema.optionalKey(Schema.Unknown),
4696});
5485 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
5486 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
5487 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
5488}).annotate({ identifier: "V2ItemCompletedNotification__McpToolCallResult" });
46975489
46985490export type V2ItemCompletedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
46995491export const V2ItemCompletedNotification__McpToolCallStatus = Schema.Literals([
47005492 "inProgress",
47015493 "completed",
47025494 "failed",
4703]);
4704
4705export type V2ItemCompletedNotification__MemoryCitationEntry = {
4706 readonly lineEnd: number;
4707 readonly lineStart: number;
4708 readonly note: string;
4709 readonly path: string;
4710};
4711export const V2ItemCompletedNotification__MemoryCitationEntry = Schema.Struct({
4712 lineEnd: Schema.Number.annotate({ format: "uint32" })
4713 .check(Schema.isInt())
4714 .check(Schema.isGreaterThanOrEqualTo(0)),
4715 lineStart: Schema.Number.annotate({ format: "uint32" })
4716 .check(Schema.isInt())
4717 .check(Schema.isGreaterThanOrEqualTo(0)),
4718 note: Schema.String,
4719 path: Schema.String,
4720});
5495]).annotate({ identifier: "V2ItemCompletedNotification__McpToolCallStatus" });
47215496
4722export type V2ItemCompletedNotification__MessagePhase = "commentary" | "final_answer";
4723export const V2ItemCompletedNotification__MessagePhase = Schema.Literals([
4724 "commentary",
4725 "final_answer",
4726]).annotate({
4727 description:
4728 '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.',
4729});
5497export type V2ItemCompletedNotification__DynamicToolCallOutputContentItem =
5498 | { readonly text: string; readonly type: "inputText" }
5499 | { readonly imageUrl: string; readonly type: "inputImage" }
5500 | { readonly audioUrl: string; readonly type: "inputAudio" };
5501export const V2ItemCompletedNotification__DynamicToolCallOutputContentItem = Schema.Union(
5502 [
5503 Schema.Struct({
5504 text: Schema.String,
5505 type: Schema.Literal("inputText").annotate({
5506 title: "InputTextDynamicToolCallOutputContentItemType",
5507 }),
5508 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
5509 Schema.Struct({
5510 imageUrl: Schema.String,
5511 type: Schema.Literal("inputImage").annotate({
5512 title: "InputImageDynamicToolCallOutputContentItemType",
5513 }),
5514 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
5515 Schema.Struct({
5516 audioUrl: Schema.String,
5517 type: Schema.Literal("inputAudio").annotate({
5518 title: "InputAudioDynamicToolCallOutputContentItemType",
5519 }),
5520 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
5521 ],
5522 { mode: "oneOf" },
5523).annotate({ identifier: "V2ItemCompletedNotification__DynamicToolCallOutputContentItem" });
47305524
4731export type V2ItemCompletedNotification__PatchApplyStatus =
5525export type V2ItemCompletedNotification__DynamicToolCallStatus =
47325526 | "inProgress"
47335527 | "completed"
4734 | "failed"
4735 | "declined";
4736export const V2ItemCompletedNotification__PatchApplyStatus = Schema.Literals([
5528 | "failed";
5529export const V2ItemCompletedNotification__DynamicToolCallStatus = Schema.Literals([
47375530 "inProgress",
47385531 "completed",
47395532 "failed",
4740 "declined",
4741]);
5533]).annotate({ identifier: "V2ItemCompletedNotification__DynamicToolCallStatus" });
47425534
4743export type V2ItemCompletedNotification__PatchChangeKind =
4744 | { readonly type: "add" }
4745 | { readonly type: "delete" }
4746 | { readonly move_path?: string | null; readonly type: "update" };
4747export const V2ItemCompletedNotification__PatchChangeKind = Schema.Union(
4748 [
4749 Schema.Struct({
4750 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
4751 }).annotate({ title: "AddPatchChangeKind" }),
4752 Schema.Struct({
4753 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
4754 }).annotate({ title: "DeletePatchChangeKind" }),
4755 Schema.Struct({
4756 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4757 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
4758 }).annotate({ title: "UpdatePatchChangeKind" }),
4759 ],
4760 { mode: "oneOf" },
4761);
5535export type V2ItemCompletedNotification__CollabAgentStatus =
5536 | "pendingInit"
5537 | "running"
5538 | "interrupted"
5539 | "completed"
5540 | "errored"
5541 | "shutdown"
5542 | "notFound";
5543export const V2ItemCompletedNotification__CollabAgentStatus = Schema.Literals([
5544 "pendingInit",
5545 "running",
5546 "interrupted",
5547 "completed",
5548 "errored",
5549 "shutdown",
5550 "notFound",
5551]).annotate({ identifier: "V2ItemCompletedNotification__CollabAgentStatus" });
47625552
47635553export type V2ItemCompletedNotification__ReasoningEffort = string;
47645554export const V2ItemCompletedNotification__ReasoningEffort = Schema.String.annotate({
47655555 description: "A non-empty reasoning effort value advertised by the model.",
4766}).check(Schema.isMinLength(1));
5556}).check(
5557 Schema.isMinLength(1).annotate({
5558 expected: "a value with a length of at least 1",
5559 identifier: "V2ItemCompletedNotification__ReasoningEffort",
5560 }),
5561);
5562
5563export type V2ItemCompletedNotification__CollabAgentToolCallStatus =
5564 | "inProgress"
5565 | "completed"
5566 | "failed"
5567 | "interrupted";
5568export const V2ItemCompletedNotification__CollabAgentToolCallStatus = Schema.Literals([
5569 "inProgress",
5570 "completed",
5571 "failed",
5572 "interrupted",
5573]).annotate({ identifier: "V2ItemCompletedNotification__CollabAgentToolCallStatus" });
5574
5575export type V2ItemCompletedNotification__CollabAgentTool =
5576 | "spawnAgent"
5577 | "sendInput"
5578 | "resumeAgent"
5579 | "wait"
5580 | "closeAgent"
5581 | "sendMessage"
5582 | "followupTask"
5583 | "interruptAgent"
5584 | "listAgents";
5585export const V2ItemCompletedNotification__CollabAgentTool = Schema.Literals([
5586 "spawnAgent",
5587 "sendInput",
5588 "resumeAgent",
5589 "wait",
5590 "closeAgent",
5591 "sendMessage",
5592 "followupTask",
5593 "interruptAgent",
5594 "listAgents",
5595]).annotate({ identifier: "V2ItemCompletedNotification__CollabAgentTool" });
47675596
47685597export type V2ItemCompletedNotification__SubAgentActivityKind =
47695598 | "started"
......@@ -4775,32 +5604,7 @@ export const V2ItemCompletedNotification__SubAgentActivityKind = Schema.Literals
47755604 "interacted",
47765605 "interrupted",
47775606 "completed",
4778]);
4779
4780export type V2ItemCompletedNotification__TextElement = {
4781 readonly byteRange: { readonly end: number; readonly start: number };
4782 readonly placeholder?: string | null;
4783};
4784export const V2ItemCompletedNotification__TextElement = Schema.Struct({
4785 byteRange: Schema.Struct({
4786 end: Schema.Number.annotate({ format: "uint" })
4787 .check(Schema.isInt())
4788 .check(Schema.isGreaterThanOrEqualTo(0)),
4789 start: Schema.Number.annotate({ format: "uint" })
4790 .check(Schema.isInt())
4791 .check(Schema.isGreaterThanOrEqualTo(0)),
4792 }).annotate({
4793 description: "Byte range in the parent `text` buffer that this element occupies.",
4794 }),
4795 placeholder: Schema.optionalKey(
4796 Schema.Union([
4797 Schema.String.annotate({
4798 description: "Optional human-readable placeholder for the element, displayed in the UI.",
4799 }),
4800 Schema.Null,
4801 ]),
4802 ),
4803});
5607]).annotate({ identifier: "V2ItemCompletedNotification__SubAgentActivityKind" });
48045608
48055609export type V2ItemCompletedNotification__WebSearchAction =
48065610 | {
......@@ -4832,33 +5636,77 @@ export const V2ItemCompletedNotification__WebSearchAction = Schema.Union(
48325636 }).annotate({ title: "OtherWebSearchAction" }),
48335637 ],
48345638 { mode: "oneOf" },
4835);
5639).annotate({ identifier: "V2ItemCompletedNotification__WebSearchAction" });
48365640
48375641export type V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf = string;
48385642export const V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf =
48395643 Schema.String.annotate({
48405644 description:
48415645 "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.",
5646 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf",
5647 });
5648
5649export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource =
5650 | "shell"
5651 | "unifiedExec";
5652export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource =
5653 Schema.Literals(["shell", "unifiedExec"]).annotate({
5654 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource",
5655 });
5656
5657export type V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol =
5658 | "http"
5659 | "https"
5660 | "socks5Tcp"
5661 | "socks5Udp";
5662export const V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol =
5663 Schema.Literals(["http", "https", "socks5Tcp", "socks5Udp"]).annotate({
5664 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol",
5665 });
5666
5667export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode =
5668 | "read"
5669 | "write"
5670 | "deny";
5671export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode =
5672 Schema.Literals(["read", "write", "deny"]).annotate({
5673 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode",
5674 });
5675
5676export type V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString = string;
5677export const V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString =
5678 Schema.String.annotate({
5679 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString",
48425680 });
48435681
48445682export type V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions = {
48455683 readonly enabled?: boolean | null;
48465684};
48475685export const V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions =
4848 Schema.Struct({ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) });
5686 Schema.Struct({
5687 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
5688 }).annotate({
5689 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions",
5690 });
48495691
48505692export type V2ItemGuardianApprovalReviewCompletedNotification__AutoReviewDecisionSource = "agent";
48515693export const V2ItemGuardianApprovalReviewCompletedNotification__AutoReviewDecisionSource =
48525694 Schema.Literal("agent").annotate({
48535695 description: "[UNSTABLE] Source that produced a terminal approval auto-review decision.",
5696 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__AutoReviewDecisionSource",
48545697 });
48555698
4856export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode =
4857 | "read"
4858 | "write"
4859 | "deny";
4860export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode =
4861 Schema.Literals(["read", "write", "deny"]);
5699export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel =
5700 | "low"
5701 | "medium"
5702 | "high"
5703 | "critical";
5704export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel = Schema.Literals(
5705 ["low", "medium", "high", "critical"],
5706).annotate({
5707 description: "[UNSTABLE] Risk level assigned by approval auto-review.",
5708 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel",
5709});
48625710
48635711export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus =
48645712 | "inProgress"
......@@ -4869,23 +5717,9 @@ export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalR
48695717export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus =
48705718 Schema.Literals(["inProgress", "approved", "denied", "timedOut", "aborted"]).annotate({
48715719 description: "[UNSTABLE] Lifecycle state for an approval auto-review.",
5720 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus",
48725721 });
48735722
4874export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource =
4875 | "shell"
4876 | "unifiedExec";
4877export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource =
4878 Schema.Literals(["shell", "unifiedExec"]);
4879
4880export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel =
4881 | "low"
4882 | "medium"
4883 | "high"
4884 | "critical";
4885export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel = Schema.Literals(
4886 ["low", "medium", "high", "critical"],
4887).annotate({ description: "[UNSTABLE] Risk level assigned by approval auto-review." });
4888
48895723export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization =
48905724 | "unknown"
48915725 | "low"
......@@ -4894,55 +5728,59 @@ export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAutho
48945728export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization =
48955729 Schema.Literals(["unknown", "low", "medium", "high"]).annotate({
48965730 description: "[UNSTABLE] Authorization level assigned by approval auto-review.",
5731 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization",
48975732 });
48985733
4899export type V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString = string;
4900export const V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString = Schema.String;
4901
4902export type V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol =
4903 | "http"
4904 | "https"
4905 | "socks5Tcp"
4906 | "socks5Udp";
4907export const V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol =
4908 Schema.Literals(["http", "https", "socks5Tcp", "socks5Udp"]);
4909
49105734export type V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf = string;
49115735export const V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf =
49125736 Schema.String.annotate({
49135737 description:
49145738 "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.",
5739 identifier: "V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf",
49155740 });
49165741
4917export type V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions = {
4918 readonly enabled?: boolean | null;
4919};
4920export const V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions =
4921 Schema.Struct({ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) });
5742export type V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource =
5743 | "shell"
5744 | "unifiedExec";
5745export const V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource =
5746 Schema.Literals(["shell", "unifiedExec"]).annotate({
5747 identifier: "V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource",
5748 });
5749
5750export type V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol =
5751 | "http"
5752 | "https"
5753 | "socks5Tcp"
5754 | "socks5Udp";
5755export const V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol =
5756 Schema.Literals(["http", "https", "socks5Tcp", "socks5Udp"]).annotate({
5757 identifier: "V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol",
5758 });
49225759
49235760export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode =
49245761 | "read"
49255762 | "write"
49265763 | "deny";
49275764export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode =
4928 Schema.Literals(["read", "write", "deny"]);
5765 Schema.Literals(["read", "write", "deny"]).annotate({
5766 identifier: "V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode",
5767 });
49295768
4930export type V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus =
4931 | "inProgress"
4932 | "approved"
4933 | "denied"
4934 | "timedOut"
4935 | "aborted";
4936export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus =
4937 Schema.Literals(["inProgress", "approved", "denied", "timedOut", "aborted"]).annotate({
4938 description: "[UNSTABLE] Lifecycle state for an approval auto-review.",
5769export type V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString = string;
5770export const V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString =
5771 Schema.String.annotate({
5772 identifier: "V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString",
49395773 });
49405774
4941export type V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource =
4942 | "shell"
4943 | "unifiedExec";
4944export const V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource =
4945 Schema.Literals(["shell", "unifiedExec"]);
5775export type V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions = {
5776 readonly enabled?: boolean | null;
5777};
5778export const V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions =
5779 Schema.Struct({
5780 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
5781 }).annotate({
5782 identifier: "V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions",
5783 });
49465784
49475785export type V2ItemGuardianApprovalReviewStartedNotification__GuardianRiskLevel =
49485786 | "low"
......@@ -4954,7 +5792,22 @@ export const V2ItemGuardianApprovalReviewStartedNotification__GuardianRiskLevel
49545792 "medium",
49555793 "high",
49565794 "critical",
4957]).annotate({ description: "[UNSTABLE] Risk level assigned by approval auto-review." });
5795]).annotate({
5796 description: "[UNSTABLE] Risk level assigned by approval auto-review.",
5797 identifier: "V2ItemGuardianApprovalReviewStartedNotification__GuardianRiskLevel",
5798});
5799
5800export type V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus =
5801 | "inProgress"
5802 | "approved"
5803 | "denied"
5804 | "timedOut"
5805 | "aborted";
5806export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus =
5807 Schema.Literals(["inProgress", "approved", "denied", "timedOut", "aborted"]).annotate({
5808 description: "[UNSTABLE] Lifecycle state for an approval auto-review.",
5809 identifier: "V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus",
5810 });
49585811
49595812export type V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthorization =
49605813 | "unknown"
......@@ -4964,42 +5817,102 @@ export type V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthori
49645817export const V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthorization =
49655818 Schema.Literals(["unknown", "low", "medium", "high"]).annotate({
49665819 description: "[UNSTABLE] Authorization level assigned by approval auto-review.",
5820 identifier: "V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthorization",
49675821 });
49685822
4969export type V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString = string;
4970export const V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString = Schema.String;
5823export type V2ItemStartedNotification__ByteRange = { readonly end: number; readonly start: number };
5824export const V2ItemStartedNotification__ByteRange = Schema.Struct({
5825 end: Schema.Number.annotate({ format: "uint" })
5826 .check(Schema.isInt().annotate({ expected: "an integer" }))
5827 .check(
5828 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
5829 ),
5830 start: Schema.Number.annotate({ format: "uint" })
5831 .check(Schema.isInt().annotate({ expected: "an integer" }))
5832 .check(
5833 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
5834 ),
5835}).annotate({ identifier: "V2ItemStartedNotification__ByteRange" });
49715836
4972export type V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol =
4973 | "http"
4974 | "https"
4975 | "socks5Tcp"
4976 | "socks5Udp";
4977export const V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol =
4978 Schema.Literals(["http", "https", "socks5Tcp", "socks5Udp"]);
5837export type V2ItemStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
5838export const V2ItemStartedNotification__ImageDetail = Schema.Literals([
5839 "auto",
5840 "low",
5841 "high",
5842 "original",
5843]).annotate({ identifier: "V2ItemStartedNotification__ImageDetail" });
49795844
4980export type V2ItemStartedNotification__AbsolutePathBuf = string;
4981export const V2ItemStartedNotification__AbsolutePathBuf = Schema.String.annotate({
4982 description:
4983 "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.",
5845export type V2ItemStartedNotification__HookPromptFragment = {
5846 readonly hookRunId: string;
5847 readonly text: string;
5848};
5849export const V2ItemStartedNotification__HookPromptFragment = Schema.Struct({
5850 hookRunId: Schema.String,
5851 text: Schema.String,
5852}).annotate({ identifier: "V2ItemStartedNotification__HookPromptFragment" });
5853
5854export type V2ItemStartedNotification__MemoryCitationEntry = {
5855 readonly lineEnd: number;
5856 readonly lineStart: number;
5857 readonly note: string;
5858 readonly path: string;
5859};
5860export const V2ItemStartedNotification__MemoryCitationEntry = Schema.Struct({
5861 lineEnd: Schema.Number.annotate({ format: "uint32" })
5862 .check(Schema.isInt().annotate({ expected: "an integer" }))
5863 .check(
5864 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
5865 ),
5866 lineStart: Schema.Number.annotate({ format: "uint32" })
5867 .check(Schema.isInt().annotate({ expected: "an integer" }))
5868 .check(
5869 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
5870 ),
5871 note: Schema.String,
5872 path: Schema.String,
5873}).annotate({ identifier: "V2ItemStartedNotification__MemoryCitationEntry" });
5874
5875export type V2ItemStartedNotification__MessagePhase = "commentary" | "final_answer";
5876export const V2ItemStartedNotification__MessagePhase = Schema.Union(
5877 [
5878 Schema.Literal("commentary").annotate({
5879 description:
5880 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
5881 }),
5882 Schema.Literal("final_answer").annotate({
5883 description: "The assistant's terminal answer text for the current turn.",
5884 }),
5885 ],
5886 { mode: "oneOf" },
5887).annotate({
5888 description:
5889 '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.',
5890 identifier: "V2ItemStartedNotification__MessagePhase",
49845891});
49855892
4986export type V2ItemStartedNotification__CollabAgentStatus =
4987 | "pendingInit"
4988 | "running"
4989 | "interrupted"
4990 | "completed"
4991 | "errored"
4992 | "shutdown"
4993 | "notFound";
4994export const V2ItemStartedNotification__CollabAgentStatus = Schema.Literals([
4995 "pendingInit",
4996 "running",
4997 "interrupted",
4998 "completed",
4999 "errored",
5000 "shutdown",
5001 "notFound",
5002]);
5893export type V2ItemStartedNotification__AbsolutePathBuf = string;
5894export const V2ItemStartedNotification__AbsolutePathBuf = Schema.String.annotate({
5895 description:
5896 "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.",
5897 identifier: "V2ItemStartedNotification__AbsolutePathBuf",
5898});
5899
5900export type V2ItemStartedNotification__LegacyAppPathString = string;
5901export const V2ItemStartedNotification__LegacyAppPathString = Schema.String.annotate({
5902 identifier: "V2ItemStartedNotification__LegacyAppPathString",
5903});
5904
5905export type V2ItemStartedNotification__CommandExecutionSource =
5906 | "agent"
5907 | "userShell"
5908 | "unifiedExecStartup"
5909 | "unifiedExecInteraction";
5910export const V2ItemStartedNotification__CommandExecutionSource = Schema.Literals([
5911 "agent",
5912 "userShell",
5913 "unifiedExecStartup",
5914 "unifiedExecInteraction",
5915]).annotate({ identifier: "V2ItemStartedNotification__CommandExecutionSource" });
50035916
50045917export type V2ItemStartedNotification__CommandExecutionStatus =
50055918 | "inProgress"
......@@ -5011,65 +5924,39 @@ export const V2ItemStartedNotification__CommandExecutionStatus = Schema.Literals
50115924 "completed",
50125925 "failed",
50135926 "declined",
5014]);
5927]).annotate({ identifier: "V2ItemStartedNotification__CommandExecutionStatus" });
50155928
5016export type V2ItemStartedNotification__DynamicToolCallOutputContentItem =
5017 | { readonly text: string; readonly type: "inputText" }
5018 | { readonly imageUrl: string; readonly type: "inputImage" }
5019 | { readonly audioUrl: string; readonly type: "inputAudio" };
5020export const V2ItemStartedNotification__DynamicToolCallOutputContentItem = Schema.Union(
5929export type V2ItemStartedNotification__PatchChangeKind =
5930 | { readonly type: "add" }
5931 | { readonly type: "delete" }
5932 | { readonly move_path?: string | null; readonly type: "update" };
5933export const V2ItemStartedNotification__PatchChangeKind = Schema.Union(
50215934 [
50225935 Schema.Struct({
5023 text: Schema.String,
5024 type: Schema.Literal("inputText").annotate({
5025 title: "InputTextDynamicToolCallOutputContentItemType",
5026 }),
5027 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
5936 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
5937 }).annotate({ title: "AddPatchChangeKind" }),
50285938 Schema.Struct({
5029 imageUrl: Schema.String,
5030 type: Schema.Literal("inputImage").annotate({
5031 title: "InputImageDynamicToolCallOutputContentItemType",
5032 }),
5033 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
5939 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
5940 }).annotate({ title: "DeletePatchChangeKind" }),
50345941 Schema.Struct({
5035 audioUrl: Schema.String,
5036 type: Schema.Literal("inputAudio").annotate({
5037 title: "InputAudioDynamicToolCallOutputContentItemType",
5038 }),
5039 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
5942 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5943 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
5944 }).annotate({ title: "UpdatePatchChangeKind" }),
50405945 ],
50415946 { mode: "oneOf" },
5042);
5947).annotate({ identifier: "V2ItemStartedNotification__PatchChangeKind" });
50435948
5044export type V2ItemStartedNotification__DynamicToolCallStatus =
5949export type V2ItemStartedNotification__PatchApplyStatus =
50455950 | "inProgress"
50465951 | "completed"
5047 | "failed";
5048export const V2ItemStartedNotification__DynamicToolCallStatus = Schema.Literals([
5952 | "failed"
5953 | "declined";
5954export const V2ItemStartedNotification__PatchApplyStatus = Schema.Literals([
50495955 "inProgress",
50505956 "completed",
50515957 "failed",
5052]);
5053
5054export type V2ItemStartedNotification__HookPromptFragment = {
5055 readonly hookRunId: string;
5056 readonly text: string;
5057};
5058export const V2ItemStartedNotification__HookPromptFragment = Schema.Struct({
5059 hookRunId: Schema.String,
5060 text: Schema.String,
5061});
5062
5063export type V2ItemStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
5064export const V2ItemStartedNotification__ImageDetail = Schema.Literals([
5065 "auto",
5066 "low",
5067 "high",
5068 "original",
5069]);
5070
5071export type V2ItemStartedNotification__LegacyAppPathString = string;
5072export const V2ItemStartedNotification__LegacyAppPathString = Schema.String;
5958 "declined",
5959]).annotate({ identifier: "V2ItemStartedNotification__PatchApplyStatus" });
50735960
50745961export type V2ItemStartedNotification__McpToolCallAppContext = {
50755962 readonly actionName?: string | null;
......@@ -5084,93 +5971,130 @@ export const V2ItemStartedNotification__McpToolCallAppContext = Schema.Struct({
50845971 connectorId: Schema.String,
50855972 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
50865973 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5087});
5974}).annotate({ identifier: "V2ItemStartedNotification__McpToolCallAppContext" });
50885975
50895976export type V2ItemStartedNotification__McpToolCallError = { readonly message: string };
50905977export const V2ItemStartedNotification__McpToolCallError = Schema.Struct({
50915978 message: Schema.String,
5092});
5979}).annotate({ identifier: "V2ItemStartedNotification__McpToolCallError" });
50935980
50945981export type V2ItemStartedNotification__McpToolCallResult = {
5095 readonly _meta?: unknown;
5096 readonly content: ReadonlyArray<unknown>;
5097 readonly structuredContent?: unknown;
5982 readonly _meta?: Schema.Json;
5983 readonly content: ReadonlyArray<Schema.Json>;
5984 readonly structuredContent?: Schema.Json;
50985985};
50995986export const V2ItemStartedNotification__McpToolCallResult = Schema.Struct({
5100 _meta: Schema.optionalKey(Schema.Unknown),
5101 content: Schema.Array(Schema.Unknown),
5102 structuredContent: Schema.optionalKey(Schema.Unknown),
5103});
5987 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
5988 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
5989 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
5990}).annotate({ identifier: "V2ItemStartedNotification__McpToolCallResult" });
51045991
51055992export type V2ItemStartedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
51065993export const V2ItemStartedNotification__McpToolCallStatus = Schema.Literals([
51075994 "inProgress",
51085995 "completed",
51095996 "failed",
5110]);
5111
5112export type V2ItemStartedNotification__MemoryCitationEntry = {
5113 readonly lineEnd: number;
5114 readonly lineStart: number;
5115 readonly note: string;
5116 readonly path: string;
5117};
5118export const V2ItemStartedNotification__MemoryCitationEntry = Schema.Struct({
5119 lineEnd: Schema.Number.annotate({ format: "uint32" })
5120 .check(Schema.isInt())
5121 .check(Schema.isGreaterThanOrEqualTo(0)),
5122 lineStart: Schema.Number.annotate({ format: "uint32" })
5123 .check(Schema.isInt())
5124 .check(Schema.isGreaterThanOrEqualTo(0)),
5125 note: Schema.String,
5126 path: Schema.String,
5127});
5997]).annotate({ identifier: "V2ItemStartedNotification__McpToolCallStatus" });
51285998
5129export type V2ItemStartedNotification__MessagePhase = "commentary" | "final_answer";
5130export const V2ItemStartedNotification__MessagePhase = Schema.Literals([
5131 "commentary",
5132 "final_answer",
5133]).annotate({
5134 description:
5135 '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.',
5136});
5999export type V2ItemStartedNotification__DynamicToolCallOutputContentItem =
6000 | { readonly text: string; readonly type: "inputText" }
6001 | { readonly imageUrl: string; readonly type: "inputImage" }
6002 | { readonly audioUrl: string; readonly type: "inputAudio" };
6003export const V2ItemStartedNotification__DynamicToolCallOutputContentItem = Schema.Union(
6004 [
6005 Schema.Struct({
6006 text: Schema.String,
6007 type: Schema.Literal("inputText").annotate({
6008 title: "InputTextDynamicToolCallOutputContentItemType",
6009 }),
6010 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
6011 Schema.Struct({
6012 imageUrl: Schema.String,
6013 type: Schema.Literal("inputImage").annotate({
6014 title: "InputImageDynamicToolCallOutputContentItemType",
6015 }),
6016 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
6017 Schema.Struct({
6018 audioUrl: Schema.String,
6019 type: Schema.Literal("inputAudio").annotate({
6020 title: "InputAudioDynamicToolCallOutputContentItemType",
6021 }),
6022 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
6023 ],
6024 { mode: "oneOf" },
6025).annotate({ identifier: "V2ItemStartedNotification__DynamicToolCallOutputContentItem" });
51376026
5138export type V2ItemStartedNotification__PatchApplyStatus =
6027export type V2ItemStartedNotification__DynamicToolCallStatus =
51396028 | "inProgress"
51406029 | "completed"
5141 | "failed"
5142 | "declined";
5143export const V2ItemStartedNotification__PatchApplyStatus = Schema.Literals([
6030 | "failed";
6031export const V2ItemStartedNotification__DynamicToolCallStatus = Schema.Literals([
51446032 "inProgress",
51456033 "completed",
51466034 "failed",
5147 "declined",
5148]);
6035]).annotate({ identifier: "V2ItemStartedNotification__DynamicToolCallStatus" });
51496036
5150export type V2ItemStartedNotification__PatchChangeKind =
5151 | { readonly type: "add" }
5152 | { readonly type: "delete" }
5153 | { readonly move_path?: string | null; readonly type: "update" };
5154export const V2ItemStartedNotification__PatchChangeKind = Schema.Union(
5155 [
5156 Schema.Struct({
5157 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
5158 }).annotate({ title: "AddPatchChangeKind" }),
5159 Schema.Struct({
5160 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
5161 }).annotate({ title: "DeletePatchChangeKind" }),
5162 Schema.Struct({
5163 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5164 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
5165 }).annotate({ title: "UpdatePatchChangeKind" }),
5166 ],
5167 { mode: "oneOf" },
5168);
6037export type V2ItemStartedNotification__CollabAgentStatus =
6038 | "pendingInit"
6039 | "running"
6040 | "interrupted"
6041 | "completed"
6042 | "errored"
6043 | "shutdown"
6044 | "notFound";
6045export const V2ItemStartedNotification__CollabAgentStatus = Schema.Literals([
6046 "pendingInit",
6047 "running",
6048 "interrupted",
6049 "completed",
6050 "errored",
6051 "shutdown",
6052 "notFound",
6053]).annotate({ identifier: "V2ItemStartedNotification__CollabAgentStatus" });
51696054
51706055export type V2ItemStartedNotification__ReasoningEffort = string;
51716056export const V2ItemStartedNotification__ReasoningEffort = Schema.String.annotate({
51726057 description: "A non-empty reasoning effort value advertised by the model.",
5173}).check(Schema.isMinLength(1));
6058}).check(
6059 Schema.isMinLength(1).annotate({
6060 expected: "a value with a length of at least 1",
6061 identifier: "V2ItemStartedNotification__ReasoningEffort",
6062 }),
6063);
6064
6065export type V2ItemStartedNotification__CollabAgentToolCallStatus =
6066 | "inProgress"
6067 | "completed"
6068 | "failed"
6069 | "interrupted";
6070export const V2ItemStartedNotification__CollabAgentToolCallStatus = Schema.Literals([
6071 "inProgress",
6072 "completed",
6073 "failed",
6074 "interrupted",
6075]).annotate({ identifier: "V2ItemStartedNotification__CollabAgentToolCallStatus" });
6076
6077export type V2ItemStartedNotification__CollabAgentTool =
6078 | "spawnAgent"
6079 | "sendInput"
6080 | "resumeAgent"
6081 | "wait"
6082 | "closeAgent"
6083 | "sendMessage"
6084 | "followupTask"
6085 | "interruptAgent"
6086 | "listAgents";
6087export const V2ItemStartedNotification__CollabAgentTool = Schema.Literals([
6088 "spawnAgent",
6089 "sendInput",
6090 "resumeAgent",
6091 "wait",
6092 "closeAgent",
6093 "sendMessage",
6094 "followupTask",
6095 "interruptAgent",
6096 "listAgents",
6097]).annotate({ identifier: "V2ItemStartedNotification__CollabAgentTool" });
51746098
51756099export type V2ItemStartedNotification__SubAgentActivityKind =
51766100 | "started"
......@@ -5182,32 +6106,7 @@ export const V2ItemStartedNotification__SubAgentActivityKind = Schema.Literals([
51826106 "interacted",
51836107 "interrupted",
51846108 "completed",
5185]);
5186
5187export type V2ItemStartedNotification__TextElement = {
5188 readonly byteRange: { readonly end: number; readonly start: number };
5189 readonly placeholder?: string | null;
5190};
5191export const V2ItemStartedNotification__TextElement = Schema.Struct({
5192 byteRange: Schema.Struct({
5193 end: Schema.Number.annotate({ format: "uint" })
5194 .check(Schema.isInt())
5195 .check(Schema.isGreaterThanOrEqualTo(0)),
5196 start: Schema.Number.annotate({ format: "uint" })
5197 .check(Schema.isInt())
5198 .check(Schema.isGreaterThanOrEqualTo(0)),
5199 }).annotate({
5200 description: "Byte range in the parent `text` buffer that this element occupies.",
5201 }),
5202 placeholder: Schema.optionalKey(
5203 Schema.Union([
5204 Schema.String.annotate({
5205 description: "Optional human-readable placeholder for the element, displayed in the UI.",
5206 }),
5207 Schema.Null,
5208 ]),
5209 ),
5210});
6109]).annotate({ identifier: "V2ItemStartedNotification__SubAgentActivityKind" });
52116110
52126111export type V2ItemStartedNotification__WebSearchAction =
52136112 | {
......@@ -5239,13 +6138,13 @@ export const V2ItemStartedNotification__WebSearchAction = Schema.Union(
52396138 }).annotate({ title: "OtherWebSearchAction" }),
52406139 ],
52416140 { mode: "oneOf" },
5242);
6141).annotate({ identifier: "V2ItemStartedNotification__WebSearchAction" });
52436142
52446143export type V2ListMcpServerStatusParams__McpServerStatusDetail = "full" | "toolsAndAuthOnly";
52456144export const V2ListMcpServerStatusParams__McpServerStatusDetail = Schema.Literals([
52466145 "full",
52476146 "toolsAndAuthOnly",
5248]);
6147]).annotate({ identifier: "V2ListMcpServerStatusParams__McpServerStatusDetail" });
52496148
52506149export type V2ListMcpServerStatusResponse__McpAuthStatus =
52516150 | "unsupported"
......@@ -5257,30 +6156,33 @@ export const V2ListMcpServerStatusResponse__McpAuthStatus = Schema.Literals([
52576156 "notLoggedIn",
52586157 "bearerToken",
52596158 "oAuth",
5260]);
6159]).annotate({ identifier: "V2ListMcpServerStatusResponse__McpAuthStatus" });
52616160
5262export type V2ListMcpServerStatusResponse__McpServerInfo = {
6161export type V2ListMcpServerStatusResponse__ResourceTemplate = {
6162 readonly annotations?: Schema.Json;
52636163 readonly description?: string | null;
5264 readonly icons?: ReadonlyArray<unknown> | null;
6164 readonly mimeType?: string | null;
52656165 readonly name: string;
52666166 readonly title?: string | null;
5267 readonly version: string;
5268 readonly websiteUrl?: string | null;
6167 readonly uriTemplate: string;
52696168};
5270export const V2ListMcpServerStatusResponse__McpServerInfo = Schema.Struct({
6169export const V2ListMcpServerStatusResponse__ResourceTemplate = Schema.Struct({
6170 annotations: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
52716171 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5272 icons: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
6172 mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
52736173 name: Schema.String,
52746174 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5275 version: Schema.String,
5276 websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5277}).annotate({ description: "Presentation metadata advertised by an initialized MCP server." });
6175 uriTemplate: Schema.String,
6176}).annotate({
6177 description: "A template description for resources available on the server.",
6178 identifier: "V2ListMcpServerStatusResponse__ResourceTemplate",
6179});
52786180
52796181export type V2ListMcpServerStatusResponse__Resource = {
5280 readonly _meta?: unknown;
5281 readonly annotations?: unknown;
6182 readonly _meta?: Schema.Json;
6183 readonly annotations?: Schema.Json;
52826184 readonly description?: string | null;
5283 readonly icons?: ReadonlyArray<unknown> | null;
6185 readonly icons?: ReadonlyArray<Schema.Json> | null;
52846186 readonly mimeType?: string | null;
52856187 readonly name: string;
52866188 readonly size?: number | null;
......@@ -5288,76 +6190,94 @@ export type V2ListMcpServerStatusResponse__Resource = {
52886190 readonly uri: string;
52896191};
52906192export const V2ListMcpServerStatusResponse__Resource = Schema.Struct({
5291 _meta: Schema.optionalKey(Schema.Unknown),
5292 annotations: Schema.optionalKey(Schema.Unknown),
6193 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
6194 annotations: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
52936195 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5294 icons: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
6196 icons: Schema.optionalKey(
6197 Schema.Union([Schema.Array(Schema.Json.annotate({ expected: "JSON value" })), Schema.Null]),
6198 ),
52956199 mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
52966200 name: Schema.String,
52976201 size: Schema.optionalKey(
5298 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
6202 Schema.Union([
6203 Schema.Number.annotate({ format: "int64" }).check(
6204 Schema.isInt().annotate({ expected: "an integer" }),
6205 ),
6206 Schema.Null,
6207 ]),
52996208 ),
53006209 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
53016210 uri: Schema.String,
5302}).annotate({ description: "A known resource that the server is capable of reading." });
6211}).annotate({
6212 description: "A known resource that the server is capable of reading.",
6213 identifier: "V2ListMcpServerStatusResponse__Resource",
6214});
53036215
5304export type V2ListMcpServerStatusResponse__ResourceTemplate = {
5305 readonly annotations?: unknown;
6216export type V2ListMcpServerStatusResponse__McpServerInfo = {
53066217 readonly description?: string | null;
5307 readonly mimeType?: string | null;
6218 readonly icons?: ReadonlyArray<Schema.Json> | null;
53086219 readonly name: string;
53096220 readonly title?: string | null;
5310 readonly uriTemplate: string;
6221 readonly version: string;
6222 readonly websiteUrl?: string | null;
53116223};
5312export const V2ListMcpServerStatusResponse__ResourceTemplate = Schema.Struct({
5313 annotations: Schema.optionalKey(Schema.Unknown),
6224export const V2ListMcpServerStatusResponse__McpServerInfo = Schema.Struct({
53146225 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5315 mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
6226 icons: Schema.optionalKey(
6227 Schema.Union([Schema.Array(Schema.Json.annotate({ expected: "JSON value" })), Schema.Null]),
6228 ),
53166229 name: Schema.String,
53176230 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5318 uriTemplate: Schema.String,
5319}).annotate({ description: "A template description for resources available on the server." });
6231 version: Schema.String,
6232 websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
6233}).annotate({
6234 description: "Presentation metadata advertised by an initialized MCP server.",
6235 identifier: "V2ListMcpServerStatusResponse__McpServerInfo",
6236});
53206237
53216238export type V2ListMcpServerStatusResponse__Tool = {
5322 readonly _meta?: unknown;
5323 readonly annotations?: unknown;
6239 readonly _meta?: Schema.Json;
6240 readonly annotations?: Schema.Json;
53246241 readonly description?: string | null;
5325 readonly icons?: ReadonlyArray<unknown> | null;
5326 readonly inputSchema: unknown;
6242 readonly icons?: ReadonlyArray<Schema.Json> | null;
6243 readonly inputSchema: Schema.Json;
53276244 readonly name: string;
5328 readonly outputSchema?: unknown;
6245 readonly outputSchema?: Schema.Json;
53296246 readonly title?: string | null;
53306247};
53316248export const V2ListMcpServerStatusResponse__Tool = Schema.Struct({
5332 _meta: Schema.optionalKey(Schema.Unknown),
5333 annotations: Schema.optionalKey(Schema.Unknown),
6249 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
6250 annotations: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
53346251 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5335 icons: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
5336 inputSchema: Schema.Unknown,
6252 icons: Schema.optionalKey(
6253 Schema.Union([Schema.Array(Schema.Json.annotate({ expected: "JSON value" })), Schema.Null]),
6254 ),
6255 inputSchema: Schema.Json.annotate({ expected: "JSON value" }),
53376256 name: Schema.String,
5338 outputSchema: Schema.optionalKey(Schema.Unknown),
6257 outputSchema: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
53396258 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5340}).annotate({ description: "Definition for a tool the client can call." });
6259}).annotate({
6260 description: "Definition for a tool the client can call.",
6261 identifier: "V2ListMcpServerStatusResponse__Tool",
6262});
53416263
53426264export type V2LoginAccountParams__LoginAppBrand = "codex" | "chatgpt";
5343export const V2LoginAccountParams__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]);
6265export const V2LoginAccountParams__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]).annotate({
6266 identifier: "V2LoginAccountParams__LoginAppBrand",
6267});
53446268
53456269export type V2MarketplaceAddResponse__AbsolutePathBuf = string;
53466270export const V2MarketplaceAddResponse__AbsolutePathBuf = Schema.String.annotate({
53476271 description:
53486272 "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.",
6273 identifier: "V2MarketplaceAddResponse__AbsolutePathBuf",
53496274});
53506275
53516276export type V2MarketplaceRemoveResponse__AbsolutePathBuf = string;
53526277export const V2MarketplaceRemoveResponse__AbsolutePathBuf = Schema.String.annotate({
53536278 description:
53546279 "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.",
5355});
5356
5357export type V2MarketplaceUpgradeResponse__AbsolutePathBuf = string;
5358export const V2MarketplaceUpgradeResponse__AbsolutePathBuf = Schema.String.annotate({
5359 description:
5360 "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.",
6280 identifier: "V2MarketplaceRemoveResponse__AbsolutePathBuf",
53616281});
53626282
53636283export type V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo = {
......@@ -5367,41 +6287,51 @@ export type V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo = {
53676287export const V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo = Schema.Struct({
53686288 marketplaceName: Schema.String,
53696289 message: Schema.String,
6290}).annotate({ identifier: "V2MarketplaceUpgradeResponse__MarketplaceUpgradeErrorInfo" });
6291
6292export type V2MarketplaceUpgradeResponse__AbsolutePathBuf = string;
6293export const V2MarketplaceUpgradeResponse__AbsolutePathBuf = Schema.String.annotate({
6294 description:
6295 "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.",
6296 identifier: "V2MarketplaceUpgradeResponse__AbsolutePathBuf",
53706297});
53716298
53726299export type V2McpResourceReadResponse__ResourceContent =
53736300 | {
5374 readonly _meta?: unknown;
6301 readonly _meta?: Schema.Json;
53756302 readonly mimeType?: string | null;
53766303 readonly text: string;
53776304 readonly uri: string;
53786305 }
53796306 | {
5380 readonly _meta?: unknown;
6307 readonly _meta?: Schema.Json;
53816308 readonly blob: string;
53826309 readonly mimeType?: string | null;
53836310 readonly uri: string;
53846311 };
53856312export const V2McpResourceReadResponse__ResourceContent = Schema.Union([
53866313 Schema.Struct({
5387 _meta: Schema.optionalKey(Schema.Unknown),
6314 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
53886315 mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
53896316 text: Schema.String,
53906317 uri: Schema.String.annotate({ description: "The URI of this resource." }),
53916318 }),
53926319 Schema.Struct({
5393 _meta: Schema.optionalKey(Schema.Unknown),
6320 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
53946321 blob: Schema.String,
53956322 mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
53966323 uri: Schema.String.annotate({ description: "The URI of this resource." }),
53976324 }),
5398]).annotate({ description: "Contents returned when reading a resource from an MCP server." });
6325]).annotate({
6326 description: "Contents returned when reading a resource from an MCP server.",
6327 identifier: "V2McpResourceReadResponse__ResourceContent",
6328});
53996329
54006330export type V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason =
54016331 "reauthenticationRequired";
54026332export const V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason = Schema.Literal(
54036333 "reauthenticationRequired",
5404);
6334).annotate({ identifier: "V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason" });
54056335
54066336export type V2McpServerStatusUpdatedNotification__McpServerStartupState =
54076337 | "starting"
......@@ -5413,17 +6343,35 @@ export const V2McpServerStatusUpdatedNotification__McpServerStartupState = Schem
54136343 "ready",
54146344 "failed",
54156345 "cancelled",
5416]);
5417
5418export type V2ModelListResponse__InputModality = "text" | "image" | "audio";
5419export const V2ModelListResponse__InputModality = Schema.Literals([
5420 "text",
5421 "image",
5422 "audio",
5423]).annotate({ description: "Canonical user-input modality tags advertised by a model." });
6346]).annotate({ identifier: "V2McpServerStatusUpdatedNotification__McpServerStartupState" });
54246347
54256348export type V2ModelListResponse__ModelAvailabilityNux = { readonly message: string };
5426export const V2ModelListResponse__ModelAvailabilityNux = Schema.Struct({ message: Schema.String });
6349export const V2ModelListResponse__ModelAvailabilityNux = Schema.Struct({
6350 message: Schema.String,
6351}).annotate({ identifier: "V2ModelListResponse__ModelAvailabilityNux" });
6352
6353export type V2ModelListResponse__ReasoningEffort = string;
6354export const V2ModelListResponse__ReasoningEffort = Schema.String.annotate({
6355 description: "A non-empty reasoning effort value advertised by the model.",
6356}).check(
6357 Schema.isMinLength(1).annotate({
6358 expected: "a value with a length of at least 1",
6359 identifier: "V2ModelListResponse__ReasoningEffort",
6360 }),
6361);
6362
6363export type V2ModelListResponse__InputModality = "text" | "image" | "audio";
6364export const V2ModelListResponse__InputModality = Schema.Union(
6365 [
6366 Schema.Literal("text").annotate({ description: "Plain text turns and tool payloads." }),
6367 Schema.Literal("image").annotate({ description: "Image attachments included in user turns." }),
6368 Schema.Literal("audio").annotate({ description: "Audio attachments included in user turns." }),
6369 ],
6370 { mode: "oneOf" },
6371).annotate({
6372 description: "Canonical user-input modality tags advertised by a model.",
6373 identifier: "V2ModelListResponse__InputModality",
6374});
54276375
54286376export type V2ModelListResponse__ModelServiceTier = {
54296377 readonly description: string;
......@@ -5434,7 +6382,7 @@ export const V2ModelListResponse__ModelServiceTier = Schema.Struct({
54346382 description: Schema.String,
54356383 id: Schema.String,
54366384 name: Schema.String,
5437});
6385}).annotate({ identifier: "V2ModelListResponse__ModelServiceTier" });
54386386
54396387export type V2ModelListResponse__ModelUpgradeInfo = {
54406388 readonly migrationMarkdown?: string | null;
......@@ -5447,20 +6395,17 @@ export const V2ModelListResponse__ModelUpgradeInfo = Schema.Struct({
54476395 model: Schema.String,
54486396 modelLink: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
54496397 upgradeCopy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5450});
5451
5452export type V2ModelListResponse__ReasoningEffort = string;
5453export const V2ModelListResponse__ReasoningEffort = Schema.String.annotate({
5454 description: "A non-empty reasoning effort value advertised by the model.",
5455}).check(Schema.isMinLength(1));
6398}).annotate({ identifier: "V2ModelListResponse__ModelUpgradeInfo" });
54566399
54576400export type V2ModelReroutedNotification__ModelRerouteReason = "highRiskCyberActivity";
5458export const V2ModelReroutedNotification__ModelRerouteReason =
5459 Schema.Literal("highRiskCyberActivity");
6401export const V2ModelReroutedNotification__ModelRerouteReason = Schema.Literal(
6402 "highRiskCyberActivity",
6403).annotate({ identifier: "V2ModelReroutedNotification__ModelRerouteReason" });
54606404
54616405export type V2ModelVerificationNotification__ModelVerification = "trustedAccessForCyber";
5462export const V2ModelVerificationNotification__ModelVerification =
5463 Schema.Literal("trustedAccessForCyber");
6406export const V2ModelVerificationNotification__ModelVerification = Schema.Literal(
6407 "trustedAccessForCyber",
6408).annotate({ identifier: "V2ModelVerificationNotification__ModelVerification" });
54646409
54656410export type V2PermissionProfileListResponse__PermissionProfileSummary = {
54666411 readonly allowed: boolean;
......@@ -5480,18 +6425,20 @@ export const V2PermissionProfileListResponse__PermissionProfileSummary = Schema.
54806425 ]),
54816426 ),
54826427 id: Schema.String.annotate({ description: "Available permission profile identifier." }),
5483});
6428}).annotate({ identifier: "V2PermissionProfileListResponse__PermissionProfileSummary" });
54846429
54856430export type V2PluginInstalledParams__AbsolutePathBuf = string;
54866431export const V2PluginInstalledParams__AbsolutePathBuf = Schema.String.annotate({
54876432 description:
54886433 "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.",
6434 identifier: "V2PluginInstalledParams__AbsolutePathBuf",
54896435});
54906436
54916437export type V2PluginInstalledResponse__AbsolutePathBuf = string;
54926438export const V2PluginInstalledResponse__AbsolutePathBuf = Schema.String.annotate({
54936439 description:
54946440 "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.",
6441 identifier: "V2PluginInstalledResponse__AbsolutePathBuf",
54956442});
54966443
54976444export type V2PluginInstalledResponse__MarketplaceInterface = {
......@@ -5499,13 +6446,25 @@ export type V2PluginInstalledResponse__MarketplaceInterface = {
54996446};
55006447export const V2PluginInstalledResponse__MarketplaceInterface = Schema.Struct({
55016448 displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5502});
6449}).annotate({ identifier: "V2PluginInstalledResponse__MarketplaceInterface" });
55036450
55046451export type V2PluginInstalledResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE";
55056452export const V2PluginInstalledResponse__PluginAuthPolicy = Schema.Literals([
55066453 "ON_INSTALL",
55076454 "ON_USE",
5508]);
6455]).annotate({ identifier: "V2PluginInstalledResponse__PluginAuthPolicy" });
6456
6457export type V2PluginInstalledResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE";
6458export const V2PluginInstalledResponse__PluginAvailability = Schema.Union(
6459 [
6460 Schema.Literal("DISABLED_BY_ADMIN"),
6461 Schema.Literal("AVAILABLE").annotate({
6462 description:
6463 'Plugin-service currently sends `"ENABLED"` for available remote plugins. Codex app-server exposes `"AVAILABLE"` in its API; the alias keeps decoding compatible with that upstream response.',
6464 }),
6465 ],
6466 { mode: "oneOf" },
6467).annotate({ identifier: "V2PluginInstalledResponse__PluginAvailability" });
55096468
55106469export type V2PluginInstalledResponse__PluginInstallPolicy =
55116470 | "NOT_AVAILABLE"
......@@ -5515,7 +6474,7 @@ export const V2PluginInstalledResponse__PluginInstallPolicy = Schema.Literals([
55156474 "NOT_AVAILABLE",
55166475 "AVAILABLE",
55176476 "INSTALLED_BY_DEFAULT",
5518]);
6477]).annotate({ identifier: "V2PluginInstalledResponse__PluginInstallPolicy" });
55196478
55206479export type V2PluginInstalledResponse__PluginInstallPolicySource =
55216480 | "WORKSPACE_SETTING"
......@@ -5523,7 +6482,7 @@ export type V2PluginInstalledResponse__PluginInstallPolicySource =
55236482export const V2PluginInstalledResponse__PluginInstallPolicySource = Schema.Literals([
55246483 "WORKSPACE_SETTING",
55256484 "IMPLICIT_CANONICAL_APP",
5526]);
6485]).annotate({ identifier: "V2PluginInstalledResponse__PluginInstallPolicySource" });
55276486
55286487export type V2PluginInstalledResponse__PluginShareDiscoverability =
55296488 | "LISTED"
......@@ -5533,26 +6492,27 @@ export const V2PluginInstalledResponse__PluginShareDiscoverability = Schema.Lite
55336492 "LISTED",
55346493 "UNLISTED",
55356494 "PRIVATE",
5536]);
5537
5538export type V2PluginInstalledResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
5539export const V2PluginInstalledResponse__PluginSharePrincipalRole = Schema.Literals([
5540 "reader",
5541 "editor",
5542 "owner",
5543]);
6495]).annotate({ identifier: "V2PluginInstalledResponse__PluginShareDiscoverability" });
55446496
55456497export type V2PluginInstalledResponse__PluginSharePrincipalType = "user" | "group" | "workspace";
55466498export const V2PluginInstalledResponse__PluginSharePrincipalType = Schema.Literals([
55476499 "user",
55486500 "group",
55496501 "workspace",
5550]);
6502]).annotate({ identifier: "V2PluginInstalledResponse__PluginSharePrincipalType" });
6503
6504export type V2PluginInstalledResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
6505export const V2PluginInstalledResponse__PluginSharePrincipalRole = Schema.Literals([
6506 "reader",
6507 "editor",
6508 "owner",
6509]).annotate({ identifier: "V2PluginInstalledResponse__PluginSharePrincipalRole" });
55516510
55526511export type V2PluginInstallParams__AbsolutePathBuf = string;
55536512export const V2PluginInstallParams__AbsolutePathBuf = Schema.String.annotate({
55546513 description:
55556514 "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.",
6515 identifier: "V2PluginInstallParams__AbsolutePathBuf",
55566516});
55576517
55586518export type V2PluginInstallResponse__AppSummary = {
......@@ -5568,15 +6528,22 @@ export const V2PluginInstallResponse__AppSummary = Schema.Struct({
55686528 id: Schema.String,
55696529 installUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
55706530 name: Schema.String,
5571}).annotate({ description: "EXPERIMENTAL - app metadata summary for plugin responses." });
6531}).annotate({
6532 description: "EXPERIMENTAL - app metadata summary for plugin responses.",
6533 identifier: "V2PluginInstallResponse__AppSummary",
6534});
55726535
55736536export type V2PluginInstallResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE";
5574export const V2PluginInstallResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]);
6537export const V2PluginInstallResponse__PluginAuthPolicy = Schema.Literals([
6538 "ON_INSTALL",
6539 "ON_USE",
6540]).annotate({ identifier: "V2PluginInstallResponse__PluginAuthPolicy" });
55756541
55766542export type V2PluginListParams__AbsolutePathBuf = string;
55776543export const V2PluginListParams__AbsolutePathBuf = Schema.String.annotate({
55786544 description:
55796545 "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.",
6546 identifier: "V2PluginListParams__AbsolutePathBuf",
55806547});
55816548
55826549export type V2PluginListParams__PluginListMarketplaceKind =
......@@ -5591,21 +6558,37 @@ export const V2PluginListParams__PluginListMarketplaceKind = Schema.Literals([
55916558 "workspace-directory",
55926559 "shared-with-me",
55936560 "created-by-me-remote",
5594]);
6561]).annotate({ identifier: "V2PluginListParams__PluginListMarketplaceKind" });
55956562
55966563export type V2PluginListResponse__AbsolutePathBuf = string;
55976564export const V2PluginListResponse__AbsolutePathBuf = Schema.String.annotate({
55986565 description:
55996566 "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.",
6567 identifier: "V2PluginListResponse__AbsolutePathBuf",
56006568});
56016569
56026570export type V2PluginListResponse__MarketplaceInterface = { readonly displayName?: string | null };
56036571export const V2PluginListResponse__MarketplaceInterface = Schema.Struct({
56046572 displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5605});
6573}).annotate({ identifier: "V2PluginListResponse__MarketplaceInterface" });
56066574
56076575export type V2PluginListResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE";
5608export const V2PluginListResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]);
6576export const V2PluginListResponse__PluginAuthPolicy = Schema.Literals([
6577 "ON_INSTALL",
6578 "ON_USE",
6579]).annotate({ identifier: "V2PluginListResponse__PluginAuthPolicy" });
6580
6581export type V2PluginListResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE";
6582export const V2PluginListResponse__PluginAvailability = Schema.Union(
6583 [
6584 Schema.Literal("DISABLED_BY_ADMIN"),
6585 Schema.Literal("AVAILABLE").annotate({
6586 description:
6587 'Plugin-service currently sends `"ENABLED"` for available remote plugins. Codex app-server exposes `"AVAILABLE"` in its API; the alias keeps decoding compatible with that upstream response.',
6588 }),
6589 ],
6590 { mode: "oneOf" },
6591).annotate({ identifier: "V2PluginListResponse__PluginAvailability" });
56096592
56106593export type V2PluginListResponse__PluginInstallPolicy =
56116594 | "NOT_AVAILABLE"
......@@ -5615,7 +6598,7 @@ export const V2PluginListResponse__PluginInstallPolicy = Schema.Literals([
56156598 "NOT_AVAILABLE",
56166599 "AVAILABLE",
56176600 "INSTALLED_BY_DEFAULT",
5618]);
6601]).annotate({ identifier: "V2PluginListResponse__PluginInstallPolicy" });
56196602
56206603export type V2PluginListResponse__PluginInstallPolicySource =
56216604 | "WORKSPACE_SETTING"
......@@ -5623,40 +6606,43 @@ export type V2PluginListResponse__PluginInstallPolicySource =
56236606export const V2PluginListResponse__PluginInstallPolicySource = Schema.Literals([
56246607 "WORKSPACE_SETTING",
56256608 "IMPLICIT_CANONICAL_APP",
5626]);
6609]).annotate({ identifier: "V2PluginListResponse__PluginInstallPolicySource" });
56276610
56286611export type V2PluginListResponse__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
56296612export const V2PluginListResponse__PluginShareDiscoverability = Schema.Literals([
56306613 "LISTED",
56316614 "UNLISTED",
56326615 "PRIVATE",
5633]);
5634
5635export type V2PluginListResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
5636export const V2PluginListResponse__PluginSharePrincipalRole = Schema.Literals([
5637 "reader",
5638 "editor",
5639 "owner",
5640]);
6616]).annotate({ identifier: "V2PluginListResponse__PluginShareDiscoverability" });
56416617
56426618export type V2PluginListResponse__PluginSharePrincipalType = "user" | "group" | "workspace";
56436619export const V2PluginListResponse__PluginSharePrincipalType = Schema.Literals([
56446620 "user",
56456621 "group",
56466622 "workspace",
5647]);
6623]).annotate({ identifier: "V2PluginListResponse__PluginSharePrincipalType" });
6624
6625export type V2PluginListResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
6626export const V2PluginListResponse__PluginSharePrincipalRole = Schema.Literals([
6627 "reader",
6628 "editor",
6629 "owner",
6630]).annotate({ identifier: "V2PluginListResponse__PluginSharePrincipalRole" });
56486631
56496632export type V2PluginReadParams__AbsolutePathBuf = string;
56506633export const V2PluginReadParams__AbsolutePathBuf = Schema.String.annotate({
56516634 description:
56526635 "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.",
6636 identifier: "V2PluginReadParams__AbsolutePathBuf",
56536637});
56546638
5655export type V2PluginReadResponse__AbsolutePathBuf = string;
5656export const V2PluginReadResponse__AbsolutePathBuf = Schema.String.annotate({
5657 description:
5658 "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.",
5659});
6639export type V2PluginReadResponse__AppTemplateUnavailableReason =
6640 | "NOT_CONFIGURED_FOR_WORKSPACE"
6641 | "NO_ACTIVE_WORKSPACE";
6642export const V2PluginReadResponse__AppTemplateUnavailableReason = Schema.Literals([
6643 "NOT_CONFIGURED_FOR_WORKSPACE",
6644 "NO_ACTIVE_WORKSPACE",
6645]).annotate({ identifier: "V2PluginReadResponse__AppTemplateUnavailableReason" });
56606646
56616647export type V2PluginReadResponse__AppSummary = {
56626648 readonly category?: string | null;
......@@ -5671,15 +6657,10 @@ export const V2PluginReadResponse__AppSummary = Schema.Struct({
56716657 id: Schema.String,
56726658 installUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
56736659 name: Schema.String,
5674}).annotate({ description: "EXPERIMENTAL - app metadata summary for plugin responses." });
5675
5676export type V2PluginReadResponse__AppTemplateUnavailableReason =
5677 | "NOT_CONFIGURED_FOR_WORKSPACE"
5678 | "NO_ACTIVE_WORKSPACE";
5679export const V2PluginReadResponse__AppTemplateUnavailableReason = Schema.Literals([
5680 "NOT_CONFIGURED_FOR_WORKSPACE",
5681 "NO_ACTIVE_WORKSPACE",
5682]);
6660}).annotate({
6661 description: "EXPERIMENTAL - app metadata summary for plugin responses.",
6662 identifier: "V2PluginReadResponse__AppSummary",
6663});
56836664
56846665export type V2PluginReadResponse__HookEventName =
56856666 | "preToolUse"
......@@ -5705,10 +6686,50 @@ export const V2PluginReadResponse__HookEventName = Schema.Literals([
57056686 "subagentStart",
57066687 "subagentStop",
57076688 "stop",
5708]);
6689]).annotate({ identifier: "V2PluginReadResponse__HookEventName" });
6690
6691export type V2PluginReadResponse__AbsolutePathBuf = string;
6692export const V2PluginReadResponse__AbsolutePathBuf = Schema.String.annotate({
6693 description:
6694 "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.",
6695 identifier: "V2PluginReadResponse__AbsolutePathBuf",
6696});
6697
6698export type V2PluginReadResponse__ScheduledTaskWeekday =
6699 | "MO"
6700 | "TU"
6701 | "WE"
6702 | "TH"
6703 | "FR"
6704 | "SA"
6705 | "SU";
6706export const V2PluginReadResponse__ScheduledTaskWeekday = Schema.Literals([
6707 "MO",
6708 "TU",
6709 "WE",
6710 "TH",
6711 "FR",
6712 "SA",
6713 "SU",
6714]).annotate({ identifier: "V2PluginReadResponse__ScheduledTaskWeekday" });
57096715
57106716export type V2PluginReadResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE";
5711export const V2PluginReadResponse__PluginAuthPolicy = Schema.Literals(["ON_INSTALL", "ON_USE"]);
6717export const V2PluginReadResponse__PluginAuthPolicy = Schema.Literals([
6718 "ON_INSTALL",
6719 "ON_USE",
6720]).annotate({ identifier: "V2PluginReadResponse__PluginAuthPolicy" });
6721
6722export type V2PluginReadResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE";
6723export const V2PluginReadResponse__PluginAvailability = Schema.Union(
6724 [
6725 Schema.Literal("DISABLED_BY_ADMIN"),
6726 Schema.Literal("AVAILABLE").annotate({
6727 description:
6728 'Plugin-service currently sends `"ENABLED"` for available remote plugins. Codex app-server exposes `"AVAILABLE"` in its API; the alias keeps decoding compatible with that upstream response.',
6729 }),
6730 ],
6731 { mode: "oneOf" },
6732).annotate({ identifier: "V2PluginReadResponse__PluginAvailability" });
57126733
57136734export type V2PluginReadResponse__PluginInstallPolicy =
57146735 | "NOT_AVAILABLE"
......@@ -5718,7 +6739,7 @@ export const V2PluginReadResponse__PluginInstallPolicy = Schema.Literals([
57186739 "NOT_AVAILABLE",
57196740 "AVAILABLE",
57206741 "INSTALLED_BY_DEFAULT",
5721]);
6742]).annotate({ identifier: "V2PluginReadResponse__PluginInstallPolicy" });
57226743
57236744export type V2PluginReadResponse__PluginInstallPolicySource =
57246745 | "WORKSPACE_SETTING"
......@@ -5726,64 +6747,60 @@ export type V2PluginReadResponse__PluginInstallPolicySource =
57266747export const V2PluginReadResponse__PluginInstallPolicySource = Schema.Literals([
57276748 "WORKSPACE_SETTING",
57286749 "IMPLICIT_CANONICAL_APP",
5729]);
6750]).annotate({ identifier: "V2PluginReadResponse__PluginInstallPolicySource" });
57306751
57316752export type V2PluginReadResponse__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
57326753export const V2PluginReadResponse__PluginShareDiscoverability = Schema.Literals([
57336754 "LISTED",
57346755 "UNLISTED",
57356756 "PRIVATE",
5736]);
5737
5738export type V2PluginReadResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
5739export const V2PluginReadResponse__PluginSharePrincipalRole = Schema.Literals([
5740 "reader",
5741 "editor",
5742 "owner",
5743]);
6757]).annotate({ identifier: "V2PluginReadResponse__PluginShareDiscoverability" });
57446758
57456759export type V2PluginReadResponse__PluginSharePrincipalType = "user" | "group" | "workspace";
57466760export const V2PluginReadResponse__PluginSharePrincipalType = Schema.Literals([
57476761 "user",
57486762 "group",
57496763 "workspace",
5750]);
6764]).annotate({ identifier: "V2PluginReadResponse__PluginSharePrincipalType" });
57516765
5752export type V2PluginReadResponse__ScheduledTaskWeekday =
5753 | "MO"
5754 | "TU"
5755 | "WE"
5756 | "TH"
5757 | "FR"
5758 | "SA"
5759 | "SU";
5760export const V2PluginReadResponse__ScheduledTaskWeekday = Schema.Literals([
5761 "MO",
5762 "TU",
5763 "WE",
5764 "TH",
5765 "FR",
5766 "SA",
5767 "SU",
5768]);
6766export type V2PluginReadResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
6767export const V2PluginReadResponse__PluginSharePrincipalRole = Schema.Literals([
6768 "reader",
6769 "editor",
6770 "owner",
6771]).annotate({ identifier: "V2PluginReadResponse__PluginSharePrincipalRole" });
57696772
57706773export type V2PluginShareCheckoutResponse__AbsolutePathBuf = string;
57716774export const V2PluginShareCheckoutResponse__AbsolutePathBuf = Schema.String.annotate({
57726775 description:
57736776 "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.",
6777 identifier: "V2PluginShareCheckoutResponse__AbsolutePathBuf",
57746778});
57756779
57766780export type V2PluginShareListResponse__AbsolutePathBuf = string;
57776781export const V2PluginShareListResponse__AbsolutePathBuf = Schema.String.annotate({
57786782 description:
57796783 "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.",
6784 identifier: "V2PluginShareListResponse__AbsolutePathBuf",
57806785});
57816786
57826787export type V2PluginShareListResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE";
57836788export const V2PluginShareListResponse__PluginAuthPolicy = Schema.Literals([
57846789 "ON_INSTALL",
57856790 "ON_USE",
5786]);
6791]).annotate({ identifier: "V2PluginShareListResponse__PluginAuthPolicy" });
6792
6793export type V2PluginShareListResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE";
6794export const V2PluginShareListResponse__PluginAvailability = Schema.Union(
6795 [
6796 Schema.Literal("DISABLED_BY_ADMIN"),
6797 Schema.Literal("AVAILABLE").annotate({
6798 description:
6799 'Plugin-service currently sends `"ENABLED"` for available remote plugins. Codex app-server exposes `"AVAILABLE"` in its API; the alias keeps decoding compatible with that upstream response.',
6800 }),
6801 ],
6802 { mode: "oneOf" },
6803).annotate({ identifier: "V2PluginShareListResponse__PluginAvailability" });
57876804
57886805export type V2PluginShareListResponse__PluginInstallPolicy =
57896806 | "NOT_AVAILABLE"
......@@ -5793,7 +6810,7 @@ export const V2PluginShareListResponse__PluginInstallPolicy = Schema.Literals([
57936810 "NOT_AVAILABLE",
57946811 "AVAILABLE",
57956812 "INSTALLED_BY_DEFAULT",
5796]);
6813]).annotate({ identifier: "V2PluginShareListResponse__PluginInstallPolicy" });
57976814
57986815export type V2PluginShareListResponse__PluginInstallPolicySource =
57996816 | "WORKSPACE_SETTING"
......@@ -5801,7 +6818,7 @@ export type V2PluginShareListResponse__PluginInstallPolicySource =
58016818export const V2PluginShareListResponse__PluginInstallPolicySource = Schema.Literals([
58026819 "WORKSPACE_SETTING",
58036820 "IMPLICIT_CANONICAL_APP",
5804]);
6821]).annotate({ identifier: "V2PluginShareListResponse__PluginInstallPolicySource" });
58056822
58066823export type V2PluginShareListResponse__PluginShareDiscoverability =
58076824 | "LISTED"
......@@ -5811,44 +6828,58 @@ export const V2PluginShareListResponse__PluginShareDiscoverability = Schema.Lite
58116828 "LISTED",
58126829 "UNLISTED",
58136830 "PRIVATE",
5814]);
5815
5816export type V2PluginShareListResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
5817export const V2PluginShareListResponse__PluginSharePrincipalRole = Schema.Literals([
5818 "reader",
5819 "editor",
5820 "owner",
5821]);
6831]).annotate({ identifier: "V2PluginShareListResponse__PluginShareDiscoverability" });
58226832
58236833export type V2PluginShareListResponse__PluginSharePrincipalType = "user" | "group" | "workspace";
58246834export const V2PluginShareListResponse__PluginSharePrincipalType = Schema.Literals([
58256835 "user",
58266836 "group",
58276837 "workspace",
5828]);
6838]).annotate({ identifier: "V2PluginShareListResponse__PluginSharePrincipalType" });
58296839
5830export type V2PluginShareSaveParams__AbsolutePathBuf = string;
5831export const V2PluginShareSaveParams__AbsolutePathBuf = Schema.String.annotate({
5832 description:
5833 "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.",
5834});
6840export type V2PluginShareListResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
6841export const V2PluginShareListResponse__PluginSharePrincipalRole = Schema.Literals([
6842 "reader",
6843 "editor",
6844 "owner",
6845]).annotate({ identifier: "V2PluginShareListResponse__PluginSharePrincipalRole" });
58356846
58366847export type V2PluginShareSaveParams__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
58376848export const V2PluginShareSaveParams__PluginShareDiscoverability = Schema.Literals([
58386849 "LISTED",
58396850 "UNLISTED",
58406851 "PRIVATE",
5841]);
6852]).annotate({ identifier: "V2PluginShareSaveParams__PluginShareDiscoverability" });
6853
6854export type V2PluginShareSaveParams__AbsolutePathBuf = string;
6855export const V2PluginShareSaveParams__AbsolutePathBuf = Schema.String.annotate({
6856 description:
6857 "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.",
6858 identifier: "V2PluginShareSaveParams__AbsolutePathBuf",
6859});
58426860
58436861export type V2PluginShareSaveParams__PluginSharePrincipalType = "user" | "group" | "workspace";
58446862export const V2PluginShareSaveParams__PluginSharePrincipalType = Schema.Literals([
58456863 "user",
58466864 "group",
58476865 "workspace",
5848]);
6866]).annotate({ identifier: "V2PluginShareSaveParams__PluginSharePrincipalType" });
58496867
58506868export type V2PluginShareSaveParams__PluginShareTargetRole = "reader" | "editor";
5851export const V2PluginShareSaveParams__PluginShareTargetRole = Schema.Literals(["reader", "editor"]);
6869export const V2PluginShareSaveParams__PluginShareTargetRole = Schema.Literals([
6870 "reader",
6871 "editor",
6872]).annotate({ identifier: "V2PluginShareSaveParams__PluginShareTargetRole" });
6873
6874export type V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability =
6875 | "UNLISTED"
6876 | "PRIVATE"
6877 | "LISTED";
6878export const V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability = Schema.Literals([
6879 "UNLISTED",
6880 "PRIVATE",
6881 "LISTED",
6882]).annotate({ identifier: "V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability" });
58526883
58536884export type V2PluginShareUpdateTargetsParams__PluginSharePrincipalType =
58546885 | "user"
......@@ -5858,23 +6889,13 @@ export const V2PluginShareUpdateTargetsParams__PluginSharePrincipalType = Schema
58586889 "user",
58596890 "group",
58606891 "workspace",
5861]);
6892]).annotate({ identifier: "V2PluginShareUpdateTargetsParams__PluginSharePrincipalType" });
58626893
58636894export type V2PluginShareUpdateTargetsParams__PluginShareTargetRole = "reader" | "editor";
58646895export const V2PluginShareUpdateTargetsParams__PluginShareTargetRole = Schema.Literals([
58656896 "reader",
58666897 "editor",
5867]);
5868
5869export type V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability =
5870 | "UNLISTED"
5871 | "PRIVATE"
5872 | "LISTED";
5873export const V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability = Schema.Literals([
5874 "UNLISTED",
5875 "PRIVATE",
5876 "LISTED",
5877]);
6898]).annotate({ identifier: "V2PluginShareUpdateTargetsParams__PluginShareTargetRole" });
58786899
58796900export type V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability =
58806901 | "LISTED"
......@@ -5884,7 +6905,17 @@ export const V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability = Sc
58846905 "LISTED",
58856906 "UNLISTED",
58866907 "PRIVATE",
5887]);
6908]).annotate({ identifier: "V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability" });
6909
6910export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType =
6911 | "user"
6912 | "group"
6913 | "workspace";
6914export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType = Schema.Literals([
6915 "user",
6916 "group",
6917 "workspace",
6918]).annotate({ identifier: "V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType" });
58886919
58896920export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole =
58906921 | "reader"
......@@ -5894,17 +6925,21 @@ export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole = Sche
58946925 "reader",
58956926 "editor",
58966927 "owner",
5897]);
6928]).annotate({ identifier: "V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole" });
58986929
5899export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType =
5900 | "user"
5901 | "group"
5902 | "workspace";
5903export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType = Schema.Literals([
5904 "user",
5905 "group",
5906 "workspace",
5907]);
6930export type V2ProcessOutputDeltaNotification__ProcessOutputStream = "stdout" | "stderr";
6931export const V2ProcessOutputDeltaNotification__ProcessOutputStream = Schema.Union(
6932 [
6933 Schema.Literal("stdout").annotate({
6934 description: "stdout stream. PTY mode multiplexes terminal output here.",
6935 }),
6936 Schema.Literal("stderr").annotate({ description: "stderr stream." }),
6937 ],
6938 { mode: "oneOf" },
6939).annotate({
6940 description: "Stream label for `process/outputDelta` notifications.",
6941 identifier: "V2ProcessOutputDeltaNotification__ProcessOutputStream",
6942});
59086943
59096944export type V2RawResponseCompletedNotification__TokenUsageBreakdown = {
59106945 readonly cacheWriteInputTokens?: number;
......@@ -5916,35 +6951,26 @@ export type V2RawResponseCompletedNotification__TokenUsageBreakdown = {
59166951};
59176952export const V2RawResponseCompletedNotification__TokenUsageBreakdown = Schema.Struct({
59186953 cacheWriteInputTokens: Schema.optionalKey(
5919 Schema.Number.annotate({ default: 0, format: "int64" }).check(Schema.isInt()),
6954 Schema.Number.annotate({ default: 0, format: "int64" }).check(
6955 Schema.isInt().annotate({ expected: "an integer" }),
6956 ),
59206957 ),
5921 cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
5922 inputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
5923 outputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
5924 reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
5925 totalTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
5926});
5927
5928export type V2RawResponseItemCompletedNotification__AgentMessageInputContent =
5929 | { readonly text: string; readonly type: "input_text" }
5930 | { readonly encrypted_content: string; readonly type: "encrypted_content" };
5931export const V2RawResponseItemCompletedNotification__AgentMessageInputContent = Schema.Union(
5932 [
5933 Schema.Struct({
5934 text: Schema.String,
5935 type: Schema.Literal("input_text").annotate({
5936 title: "InputTextAgentMessageInputContentType",
5937 }),
5938 }).annotate({ title: "InputTextAgentMessageInputContent" }),
5939 Schema.Struct({
5940 encrypted_content: Schema.String,
5941 type: Schema.Literal("encrypted_content").annotate({
5942 title: "EncryptedContentAgentMessageInputContentType",
5943 }),
5944 }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
5945 ],
5946 { mode: "oneOf" },
5947);
6958 cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(
6959 Schema.isInt().annotate({ expected: "an integer" }),
6960 ),
6961 inputTokens: Schema.Number.annotate({ format: "int64" }).check(
6962 Schema.isInt().annotate({ expected: "an integer" }),
6963 ),
6964 outputTokens: Schema.Number.annotate({ format: "int64" }).check(
6965 Schema.isInt().annotate({ expected: "an integer" }),
6966 ),
6967 reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(
6968 Schema.isInt().annotate({ expected: "an integer" }),
6969 ),
6970 totalTokens: Schema.Number.annotate({ format: "int64" }).check(
6971 Schema.isInt().annotate({ expected: "an integer" }),
6972 ),
6973}).annotate({ identifier: "V2RawResponseCompletedNotification__TokenUsageBreakdown" });
59486974
59496975export type V2RawResponseItemCompletedNotification__ImageDetail =
59506976 | "auto"
......@@ -5956,7 +6982,7 @@ export const V2RawResponseItemCompletedNotification__ImageDetail = Schema.Litera
59566982 "low",
59576983 "high",
59586984 "original",
5959]);
6985]).annotate({ identifier: "V2RawResponseItemCompletedNotification__ImageDetail" });
59606986
59616987export type V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough = {
59626988 readonly turn_id?: string | null;
......@@ -5967,58 +6993,48 @@ export const V2RawResponseItemCompletedNotification__InternalChatMessageMetadata
59676993 }).annotate({
59686994 description:
59696995 "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.",
6996 identifier: "V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough",
59706997 });
59716998
5972export type V2RawResponseItemCompletedNotification__LocalShellAction = {
5973 readonly command: ReadonlyArray<string>;
5974 readonly env?: { readonly [x: string]: string } | null;
5975 readonly timeout_ms?: number | null;
5976 readonly type: "exec";
5977 readonly user?: string | null;
5978 readonly working_directory?: string | null;
5979};
5980export const V2RawResponseItemCompletedNotification__LocalShellAction = Schema.Union(
6999export type V2RawResponseItemCompletedNotification__MessagePhase = "commentary" | "final_answer";
7000export const V2RawResponseItemCompletedNotification__MessagePhase = Schema.Union(
59817001 [
5982 Schema.Struct({
5983 command: Schema.Array(Schema.String),
5984 env: Schema.optionalKey(
5985 Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
5986 ),
5987 timeout_ms: Schema.optionalKey(
5988 Schema.Union([
5989 Schema.Number.annotate({ format: "uint64" })
5990 .check(Schema.isInt())
5991 .check(Schema.isGreaterThanOrEqualTo(0)),
5992 Schema.Null,
5993 ]),
5994 ),
5995 type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
5996 user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5997 working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5998 }).annotate({ title: "ExecLocalShellAction" }),
7002 Schema.Literal("commentary").annotate({
7003 description:
7004 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
7005 }),
7006 Schema.Literal("final_answer").annotate({
7007 description: "The assistant's terminal answer text for the current turn.",
7008 }),
59997009 ],
60007010 { mode: "oneOf" },
6001);
6002
6003export type V2RawResponseItemCompletedNotification__LocalShellStatus =
6004 | "completed"
6005 | "in_progress"
6006 | "incomplete";
6007export const V2RawResponseItemCompletedNotification__LocalShellStatus = Schema.Literals([
6008 "completed",
6009 "in_progress",
6010 "incomplete",
6011]);
6012
6013export type V2RawResponseItemCompletedNotification__MessagePhase = "commentary" | "final_answer";
6014export const V2RawResponseItemCompletedNotification__MessagePhase = Schema.Literals([
6015 "commentary",
6016 "final_answer",
6017]).annotate({
7011).annotate({
60187012 description:
60197013 '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.',
7014 identifier: "V2RawResponseItemCompletedNotification__MessagePhase",
60207015});
60217016
7017export type V2RawResponseItemCompletedNotification__AgentMessageInputContent =
7018 | { readonly text: string; readonly type: "input_text" }
7019 | { readonly encrypted_content: string; readonly type: "encrypted_content" };
7020export const V2RawResponseItemCompletedNotification__AgentMessageInputContent = Schema.Union(
7021 [
7022 Schema.Struct({
7023 text: Schema.String,
7024 type: Schema.Literal("input_text").annotate({
7025 title: "InputTextAgentMessageInputContentType",
7026 }),
7027 }).annotate({ title: "InputTextAgentMessageInputContent" }),
7028 Schema.Struct({
7029 encrypted_content: Schema.String,
7030 type: Schema.Literal("encrypted_content").annotate({
7031 title: "EncryptedContentAgentMessageInputContentType",
7032 }),
7033 }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
7034 ],
7035 { mode: "oneOf" },
7036).annotate({ identifier: "V2RawResponseItemCompletedNotification__AgentMessageInputContent" });
7037
60227038export type V2RawResponseItemCompletedNotification__ReasoningItemContent =
60237039 | { readonly text: string; readonly type: "reasoning_text" }
60247040 | { readonly text: string; readonly type: "text" };
......@@ -6036,7 +7052,7 @@ export const V2RawResponseItemCompletedNotification__ReasoningItemContent = Sche
60367052 }).annotate({ title: "TextReasoningItemContent" }),
60377053 ],
60387054 { mode: "oneOf" },
6039);
7055).annotate({ identifier: "V2RawResponseItemCompletedNotification__ReasoningItemContent" });
60407056
60417057export type V2RawResponseItemCompletedNotification__ReasoningItemReasoningSummary = {
60427058 readonly text: string;
......@@ -6052,7 +7068,52 @@ export const V2RawResponseItemCompletedNotification__ReasoningItemReasoningSumma
60527068 }).annotate({ title: "SummaryTextReasoningItemReasoningSummary" }),
60537069 ],
60547070 { mode: "oneOf" },
6055);
7071).annotate({ identifier: "V2RawResponseItemCompletedNotification__ReasoningItemReasoningSummary" });
7072
7073export type V2RawResponseItemCompletedNotification__LocalShellAction = {
7074 readonly command: ReadonlyArray<string>;
7075 readonly env?: { readonly [x: string]: string } | null;
7076 readonly timeout_ms?: number | null;
7077 readonly type: "exec";
7078 readonly user?: string | null;
7079 readonly working_directory?: string | null;
7080};
7081export const V2RawResponseItemCompletedNotification__LocalShellAction = Schema.Union(
7082 [
7083 Schema.Struct({
7084 command: Schema.Array(Schema.String),
7085 env: Schema.optionalKey(
7086 Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
7087 ),
7088 timeout_ms: Schema.optionalKey(
7089 Schema.Union([
7090 Schema.Number.annotate({ format: "uint64" })
7091 .check(Schema.isInt().annotate({ expected: "an integer" }))
7092 .check(
7093 Schema.isGreaterThanOrEqualTo(0).annotate({
7094 expected: "a value greater than or equal to 0",
7095 }),
7096 ),
7097 Schema.Null,
7098 ]),
7099 ),
7100 type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
7101 user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7102 working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7103 }).annotate({ title: "ExecLocalShellAction" }),
7104 ],
7105 { mode: "oneOf" },
7106).annotate({ identifier: "V2RawResponseItemCompletedNotification__LocalShellAction" });
7107
7108export type V2RawResponseItemCompletedNotification__LocalShellStatus =
7109 | "completed"
7110 | "in_progress"
7111 | "incomplete";
7112export const V2RawResponseItemCompletedNotification__LocalShellStatus = Schema.Literals([
7113 "completed",
7114 "in_progress",
7115 "incomplete",
7116]).annotate({ identifier: "V2RawResponseItemCompletedNotification__LocalShellStatus" });
60567117
60577118export type V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction =
60587119 | {
......@@ -6092,7 +7153,7 @@ export const V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction
60927153 }).annotate({ title: "OtherResponsesApiWebSearchAction" }),
60937154 ],
60947155 { mode: "oneOf" },
6095);
7156).annotate({ identifier: "V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction" });
60967157
60977158export type V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus =
60987159 | "disabled"
......@@ -6100,10 +7161,14 @@ export type V2RemoteControlStatusChangedNotification__RemoteControlConnectionSta
61007161 | "connected"
61017162 | "errored";
61027163export const V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus =
6103 Schema.Literals(["disabled", "connecting", "connected", "errored"]);
7164 Schema.Literals(["disabled", "connecting", "connected", "errored"]).annotate({
7165 identifier: "V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus",
7166 });
61047167
61057168export type V2ReviewStartParams__ReviewDelivery = "inline" | "detached";
6106export const V2ReviewStartParams__ReviewDelivery = Schema.Literals(["inline", "detached"]);
7169export const V2ReviewStartParams__ReviewDelivery = Schema.Literals(["inline", "detached"]).annotate(
7170 { identifier: "V2ReviewStartParams__ReviewDelivery" },
7171);
61077172
61087173export type V2ReviewStartParams__ReviewTarget =
61097174 | { readonly type: "uncommittedChanges" }
......@@ -6151,31 +7216,107 @@ export const V2ReviewStartParams__ReviewTarget = Schema.Union(
61517216 }),
61527217 ],
61537218 { mode: "oneOf" },
6154);
7219).annotate({ identifier: "V2ReviewStartParams__ReviewTarget" });
7220
7221export type V2ReviewStartResponse__NonSteerableTurnKind = "review" | "compact";
7222export const V2ReviewStartResponse__NonSteerableTurnKind = Schema.Literals([
7223 "review",
7224 "compact",
7225]).annotate({ identifier: "V2ReviewStartResponse__NonSteerableTurnKind" });
7226
7227export type V2ReviewStartResponse__ByteRange = { readonly end: number; readonly start: number };
7228export const V2ReviewStartResponse__ByteRange = Schema.Struct({
7229 end: Schema.Number.annotate({ format: "uint" })
7230 .check(Schema.isInt().annotate({ expected: "an integer" }))
7231 .check(
7232 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
7233 ),
7234 start: Schema.Number.annotate({ format: "uint" })
7235 .check(Schema.isInt().annotate({ expected: "an integer" }))
7236 .check(
7237 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
7238 ),
7239}).annotate({ identifier: "V2ReviewStartResponse__ByteRange" });
7240
7241export type V2ReviewStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
7242export const V2ReviewStartResponse__ImageDetail = Schema.Literals([
7243 "auto",
7244 "low",
7245 "high",
7246 "original",
7247]).annotate({ identifier: "V2ReviewStartResponse__ImageDetail" });
7248
7249export type V2ReviewStartResponse__HookPromptFragment = {
7250 readonly hookRunId: string;
7251 readonly text: string;
7252};
7253export const V2ReviewStartResponse__HookPromptFragment = Schema.Struct({
7254 hookRunId: Schema.String,
7255 text: Schema.String,
7256}).annotate({ identifier: "V2ReviewStartResponse__HookPromptFragment" });
7257
7258export type V2ReviewStartResponse__MemoryCitationEntry = {
7259 readonly lineEnd: number;
7260 readonly lineStart: number;
7261 readonly note: string;
7262 readonly path: string;
7263};
7264export const V2ReviewStartResponse__MemoryCitationEntry = Schema.Struct({
7265 lineEnd: Schema.Number.annotate({ format: "uint32" })
7266 .check(Schema.isInt().annotate({ expected: "an integer" }))
7267 .check(
7268 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
7269 ),
7270 lineStart: Schema.Number.annotate({ format: "uint32" })
7271 .check(Schema.isInt().annotate({ expected: "an integer" }))
7272 .check(
7273 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
7274 ),
7275 note: Schema.String,
7276 path: Schema.String,
7277}).annotate({ identifier: "V2ReviewStartResponse__MemoryCitationEntry" });
7278
7279export type V2ReviewStartResponse__MessagePhase = "commentary" | "final_answer";
7280export const V2ReviewStartResponse__MessagePhase = Schema.Union(
7281 [
7282 Schema.Literal("commentary").annotate({
7283 description:
7284 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
7285 }),
7286 Schema.Literal("final_answer").annotate({
7287 description: "The assistant's terminal answer text for the current turn.",
7288 }),
7289 ],
7290 { mode: "oneOf" },
7291).annotate({
7292 description:
7293 '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.',
7294 identifier: "V2ReviewStartResponse__MessagePhase",
7295});
61557296
61567297export type V2ReviewStartResponse__AbsolutePathBuf = string;
61577298export const V2ReviewStartResponse__AbsolutePathBuf = Schema.String.annotate({
61587299 description:
61597300 "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.",
7301 identifier: "V2ReviewStartResponse__AbsolutePathBuf",
61607302});
61617303
6162export type V2ReviewStartResponse__CollabAgentStatus =
6163 | "pendingInit"
6164 | "running"
6165 | "interrupted"
6166 | "completed"
6167 | "errored"
6168 | "shutdown"
6169 | "notFound";
6170export const V2ReviewStartResponse__CollabAgentStatus = Schema.Literals([
6171 "pendingInit",
6172 "running",
6173 "interrupted",
6174 "completed",
6175 "errored",
6176 "shutdown",
6177 "notFound",
6178]);
7304export type V2ReviewStartResponse__LegacyAppPathString = string;
7305export const V2ReviewStartResponse__LegacyAppPathString = Schema.String.annotate({
7306 identifier: "V2ReviewStartResponse__LegacyAppPathString",
7307});
7308
7309export type V2ReviewStartResponse__CommandExecutionSource =
7310 | "agent"
7311 | "userShell"
7312 | "unifiedExecStartup"
7313 | "unifiedExecInteraction";
7314export const V2ReviewStartResponse__CommandExecutionSource = Schema.Literals([
7315 "agent",
7316 "userShell",
7317 "unifiedExecStartup",
7318 "unifiedExecInteraction",
7319]).annotate({ identifier: "V2ReviewStartResponse__CommandExecutionSource" });
61797320
61807321export type V2ReviewStartResponse__CommandExecutionStatus =
61817322 | "inProgress"
......@@ -6187,62 +7328,39 @@ export const V2ReviewStartResponse__CommandExecutionStatus = Schema.Literals([
61877328 "completed",
61887329 "failed",
61897330 "declined",
6190]);
7331]).annotate({ identifier: "V2ReviewStartResponse__CommandExecutionStatus" });
61917332
6192export type V2ReviewStartResponse__DynamicToolCallOutputContentItem =
6193 | { readonly text: string; readonly type: "inputText" }
6194 | { readonly imageUrl: string; readonly type: "inputImage" }
6195 | { readonly audioUrl: string; readonly type: "inputAudio" };
6196export const V2ReviewStartResponse__DynamicToolCallOutputContentItem = Schema.Union(
7333export type V2ReviewStartResponse__PatchChangeKind =
7334 | { readonly type: "add" }
7335 | { readonly type: "delete" }
7336 | { readonly move_path?: string | null; readonly type: "update" };
7337export const V2ReviewStartResponse__PatchChangeKind = Schema.Union(
61977338 [
61987339 Schema.Struct({
6199 text: Schema.String,
6200 type: Schema.Literal("inputText").annotate({
6201 title: "InputTextDynamicToolCallOutputContentItemType",
6202 }),
6203 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
7340 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
7341 }).annotate({ title: "AddPatchChangeKind" }),
62047342 Schema.Struct({
6205 imageUrl: Schema.String,
6206 type: Schema.Literal("inputImage").annotate({
6207 title: "InputImageDynamicToolCallOutputContentItemType",
6208 }),
6209 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
7343 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
7344 }).annotate({ title: "DeletePatchChangeKind" }),
62107345 Schema.Struct({
6211 audioUrl: Schema.String,
6212 type: Schema.Literal("inputAudio").annotate({
6213 title: "InputAudioDynamicToolCallOutputContentItemType",
6214 }),
6215 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
7346 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7347 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
7348 }).annotate({ title: "UpdatePatchChangeKind" }),
62167349 ],
62177350 { mode: "oneOf" },
6218);
7351).annotate({ identifier: "V2ReviewStartResponse__PatchChangeKind" });
62197352
6220export type V2ReviewStartResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
6221export const V2ReviewStartResponse__DynamicToolCallStatus = Schema.Literals([
7353export type V2ReviewStartResponse__PatchApplyStatus =
7354 | "inProgress"
7355 | "completed"
7356 | "failed"
7357 | "declined";
7358export const V2ReviewStartResponse__PatchApplyStatus = Schema.Literals([
62227359 "inProgress",
62237360 "completed",
62247361 "failed",
6225]);
6226
6227export type V2ReviewStartResponse__HookPromptFragment = {
6228 readonly hookRunId: string;
6229 readonly text: string;
6230};
6231export const V2ReviewStartResponse__HookPromptFragment = Schema.Struct({
6232 hookRunId: Schema.String,
6233 text: Schema.String,
6234});
6235
6236export type V2ReviewStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
6237export const V2ReviewStartResponse__ImageDetail = Schema.Literals([
6238 "auto",
6239 "low",
6240 "high",
6241 "original",
6242]);
6243
6244export type V2ReviewStartResponse__LegacyAppPathString = string;
6245export const V2ReviewStartResponse__LegacyAppPathString = Schema.String;
7362 "declined",
7363]).annotate({ identifier: "V2ReviewStartResponse__PatchApplyStatus" });
62467364
62477365export type V2ReviewStartResponse__McpToolCallAppContext = {
62487366 readonly actionName?: string | null;
......@@ -6257,94 +7375,127 @@ export const V2ReviewStartResponse__McpToolCallAppContext = Schema.Struct({
62577375 connectorId: Schema.String,
62587376 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
62597377 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
6260});
7378}).annotate({ identifier: "V2ReviewStartResponse__McpToolCallAppContext" });
62617379
62627380export type V2ReviewStartResponse__McpToolCallError = { readonly message: string };
6263export const V2ReviewStartResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
7381export const V2ReviewStartResponse__McpToolCallError = Schema.Struct({
7382 message: Schema.String,
7383}).annotate({ identifier: "V2ReviewStartResponse__McpToolCallError" });
62647384
62657385export type V2ReviewStartResponse__McpToolCallResult = {
6266 readonly _meta?: unknown;
6267 readonly content: ReadonlyArray<unknown>;
6268 readonly structuredContent?: unknown;
7386 readonly _meta?: Schema.Json;
7387 readonly content: ReadonlyArray<Schema.Json>;
7388 readonly structuredContent?: Schema.Json;
62697389};
62707390export const V2ReviewStartResponse__McpToolCallResult = Schema.Struct({
6271 _meta: Schema.optionalKey(Schema.Unknown),
6272 content: Schema.Array(Schema.Unknown),
6273 structuredContent: Schema.optionalKey(Schema.Unknown),
6274});
7391 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
7392 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
7393 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
7394}).annotate({ identifier: "V2ReviewStartResponse__McpToolCallResult" });
62757395
62767396export type V2ReviewStartResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
62777397export const V2ReviewStartResponse__McpToolCallStatus = Schema.Literals([
62787398 "inProgress",
62797399 "completed",
62807400 "failed",
6281]);
6282
6283export type V2ReviewStartResponse__MemoryCitationEntry = {
6284 readonly lineEnd: number;
6285 readonly lineStart: number;
6286 readonly note: string;
6287 readonly path: string;
6288};
6289export const V2ReviewStartResponse__MemoryCitationEntry = Schema.Struct({
6290 lineEnd: Schema.Number.annotate({ format: "uint32" })
6291 .check(Schema.isInt())
6292 .check(Schema.isGreaterThanOrEqualTo(0)),
6293 lineStart: Schema.Number.annotate({ format: "uint32" })
6294 .check(Schema.isInt())
6295 .check(Schema.isGreaterThanOrEqualTo(0)),
6296 note: Schema.String,
6297 path: Schema.String,
6298});
6299
6300export type V2ReviewStartResponse__MessagePhase = "commentary" | "final_answer";
6301export const V2ReviewStartResponse__MessagePhase = Schema.Literals([
6302 "commentary",
6303 "final_answer",
6304]).annotate({
6305 description:
6306 '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.',
6307});
6308
6309export type V2ReviewStartResponse__NonSteerableTurnKind = "review" | "compact";
6310export const V2ReviewStartResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
6311
6312export type V2ReviewStartResponse__PatchApplyStatus =
6313 | "inProgress"
6314 | "completed"
6315 | "failed"
6316 | "declined";
6317export const V2ReviewStartResponse__PatchApplyStatus = Schema.Literals([
6318 "inProgress",
6319 "completed",
6320 "failed",
6321 "declined",
6322]);
7401]).annotate({ identifier: "V2ReviewStartResponse__McpToolCallStatus" });
63237402
6324export type V2ReviewStartResponse__PatchChangeKind =
6325 | { readonly type: "add" }
6326 | { readonly type: "delete" }
6327 | { readonly move_path?: string | null; readonly type: "update" };
6328export const V2ReviewStartResponse__PatchChangeKind = Schema.Union(
7403export type V2ReviewStartResponse__DynamicToolCallOutputContentItem =
7404 | { readonly text: string; readonly type: "inputText" }
7405 | { readonly imageUrl: string; readonly type: "inputImage" }
7406 | { readonly audioUrl: string; readonly type: "inputAudio" };
7407export const V2ReviewStartResponse__DynamicToolCallOutputContentItem = Schema.Union(
63297408 [
63307409 Schema.Struct({
6331 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
6332 }).annotate({ title: "AddPatchChangeKind" }),
7410 text: Schema.String,
7411 type: Schema.Literal("inputText").annotate({
7412 title: "InputTextDynamicToolCallOutputContentItemType",
7413 }),
7414 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
63337415 Schema.Struct({
6334 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
6335 }).annotate({ title: "DeletePatchChangeKind" }),
7416 imageUrl: Schema.String,
7417 type: Schema.Literal("inputImage").annotate({
7418 title: "InputImageDynamicToolCallOutputContentItemType",
7419 }),
7420 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
63367421 Schema.Struct({
6337 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
6338 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
6339 }).annotate({ title: "UpdatePatchChangeKind" }),
7422 audioUrl: Schema.String,
7423 type: Schema.Literal("inputAudio").annotate({
7424 title: "InputAudioDynamicToolCallOutputContentItemType",
7425 }),
7426 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
63407427 ],
63417428 { mode: "oneOf" },
6342);
7429).annotate({ identifier: "V2ReviewStartResponse__DynamicToolCallOutputContentItem" });
7430
7431export type V2ReviewStartResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
7432export const V2ReviewStartResponse__DynamicToolCallStatus = Schema.Literals([
7433 "inProgress",
7434 "completed",
7435 "failed",
7436]).annotate({ identifier: "V2ReviewStartResponse__DynamicToolCallStatus" });
7437
7438export type V2ReviewStartResponse__CollabAgentStatus =
7439 | "pendingInit"
7440 | "running"
7441 | "interrupted"
7442 | "completed"
7443 | "errored"
7444 | "shutdown"
7445 | "notFound";
7446export const V2ReviewStartResponse__CollabAgentStatus = Schema.Literals([
7447 "pendingInit",
7448 "running",
7449 "interrupted",
7450 "completed",
7451 "errored",
7452 "shutdown",
7453 "notFound",
7454]).annotate({ identifier: "V2ReviewStartResponse__CollabAgentStatus" });
63437455
63447456export type V2ReviewStartResponse__ReasoningEffort = string;
63457457export const V2ReviewStartResponse__ReasoningEffort = Schema.String.annotate({
63467458 description: "A non-empty reasoning effort value advertised by the model.",
6347}).check(Schema.isMinLength(1));
7459}).check(
7460 Schema.isMinLength(1).annotate({
7461 expected: "a value with a length of at least 1",
7462 identifier: "V2ReviewStartResponse__ReasoningEffort",
7463 }),
7464);
7465
7466export type V2ReviewStartResponse__CollabAgentToolCallStatus =
7467 | "inProgress"
7468 | "completed"
7469 | "failed"
7470 | "interrupted";
7471export const V2ReviewStartResponse__CollabAgentToolCallStatus = Schema.Literals([
7472 "inProgress",
7473 "completed",
7474 "failed",
7475 "interrupted",
7476]).annotate({ identifier: "V2ReviewStartResponse__CollabAgentToolCallStatus" });
7477
7478export type V2ReviewStartResponse__CollabAgentTool =
7479 | "spawnAgent"
7480 | "sendInput"
7481 | "resumeAgent"
7482 | "wait"
7483 | "closeAgent"
7484 | "sendMessage"
7485 | "followupTask"
7486 | "interruptAgent"
7487 | "listAgents";
7488export const V2ReviewStartResponse__CollabAgentTool = Schema.Literals([
7489 "spawnAgent",
7490 "sendInput",
7491 "resumeAgent",
7492 "wait",
7493 "closeAgent",
7494 "sendMessage",
7495 "followupTask",
7496 "interruptAgent",
7497 "listAgents",
7498]).annotate({ identifier: "V2ReviewStartResponse__CollabAgentTool" });
63487499
63497500export type V2ReviewStartResponse__SubAgentActivityKind =
63507501 | "started"
......@@ -6356,44 +7507,7 @@ export const V2ReviewStartResponse__SubAgentActivityKind = Schema.Literals([
63567507 "interacted",
63577508 "interrupted",
63587509 "completed",
6359]);
6360
6361export type V2ReviewStartResponse__TextElement = {
6362 readonly byteRange: { readonly end: number; readonly start: number };
6363 readonly placeholder?: string | null;
6364};
6365export const V2ReviewStartResponse__TextElement = Schema.Struct({
6366 byteRange: Schema.Struct({
6367 end: Schema.Number.annotate({ format: "uint" })
6368 .check(Schema.isInt())
6369 .check(Schema.isGreaterThanOrEqualTo(0)),
6370 start: Schema.Number.annotate({ format: "uint" })
6371 .check(Schema.isInt())
6372 .check(Schema.isGreaterThanOrEqualTo(0)),
6373 }).annotate({
6374 description: "Byte range in the parent `text` buffer that this element occupies.",
6375 }),
6376 placeholder: Schema.optionalKey(
6377 Schema.Union([
6378 Schema.String.annotate({
6379 description: "Optional human-readable placeholder for the element, displayed in the UI.",
6380 }),
6381 Schema.Null,
6382 ]),
6383 ),
6384});
6385
6386export type V2ReviewStartResponse__TurnStatus =
6387 | "completed"
6388 | "interrupted"
6389 | "failed"
6390 | "inProgress";
6391export const V2ReviewStartResponse__TurnStatus = Schema.Literals([
6392 "completed",
6393 "interrupted",
6394 "failed",
6395 "inProgress",
6396]);
7510]).annotate({ identifier: "V2ReviewStartResponse__SubAgentActivityKind" });
63977511
63987512export type V2ReviewStartResponse__WebSearchAction =
63997513 | {
......@@ -6425,13 +7539,42 @@ export const V2ReviewStartResponse__WebSearchAction = Schema.Union(
64257539 }).annotate({ title: "OtherWebSearchAction" }),
64267540 ],
64277541 { mode: "oneOf" },
6428);
7542).annotate({ identifier: "V2ReviewStartResponse__WebSearchAction" });
7543
7544export type V2ReviewStartResponse__TurnItemsView = "notLoaded" | "summary" | "full";
7545export const V2ReviewStartResponse__TurnItemsView = Schema.Union(
7546 [
7547 Schema.Literal("notLoaded").annotate({
7548 description: "`items` was not loaded for this turn. The field is intentionally empty.",
7549 }),
7550 Schema.Literal("summary").annotate({
7551 description: "`items` contains only a display summary for this turn.",
7552 }),
7553 Schema.Literal("full").annotate({
7554 description:
7555 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
7556 }),
7557 ],
7558 { mode: "oneOf" },
7559).annotate({ identifier: "V2ReviewStartResponse__TurnItemsView" });
7560
7561export type V2ReviewStartResponse__TurnStatus =
7562 | "completed"
7563 | "interrupted"
7564 | "failed"
7565 | "inProgress";
7566export const V2ReviewStartResponse__TurnStatus = Schema.Literals([
7567 "completed",
7568 "interrupted",
7569 "failed",
7570 "inProgress",
7571]).annotate({ identifier: "V2ReviewStartResponse__TurnStatus" });
64297572
64307573export type V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType = "credits" | "usage_limit";
64317574export const V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType = Schema.Literals([
64327575 "credits",
64337576 "usage_limit",
6434]);
7577]).annotate({ identifier: "V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType" });
64357578
64367579export type V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus =
64377580 | "sent"
......@@ -6439,30 +7582,28 @@ export type V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus =
64397582export const V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus = Schema.Literals([
64407583 "sent",
64417584 "cooldown_active",
6442]);
7585]).annotate({ identifier: "V2SendAddCreditsNudgeEmailResponse__AddCreditsNudgeEmailStatus" });
64437586
64447587export type V2ServerRequestResolvedNotification__RequestId = string | number;
64457588export const V2ServerRequestResolvedNotification__RequestId = Schema.Union([
64467589 Schema.String,
6447 Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
6448]);
7590 Schema.Number.annotate({ format: "int64" }).check(
7591 Schema.isInt().annotate({ expected: "an integer" }),
7592 ),
7593]).annotate({ identifier: "V2ServerRequestResolvedNotification__RequestId" });
64497594
64507595export type V2SkillsConfigWriteParams__AbsolutePathBuf = string;
64517596export const V2SkillsConfigWriteParams__AbsolutePathBuf = Schema.String.annotate({
64527597 description:
64537598 "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.",
7599 identifier: "V2SkillsConfigWriteParams__AbsolutePathBuf",
64547600});
64557601
64567602export type V2SkillsExtraRootsSetParams__AbsolutePathBuf = string;
64577603export const V2SkillsExtraRootsSetParams__AbsolutePathBuf = Schema.String.annotate({
64587604 description:
64597605 "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.",
6460});
6461
6462export type V2SkillsListResponse__AbsolutePathBuf = string;
6463export const V2SkillsListResponse__AbsolutePathBuf = Schema.String.annotate({
6464 description:
6465 "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.",
7606 identifier: "V2SkillsExtraRootsSetParams__AbsolutePathBuf",
64667607});
64677608
64687609export type V2SkillsListResponse__SkillErrorInfo = {
......@@ -6472,15 +7613,7 @@ export type V2SkillsListResponse__SkillErrorInfo = {
64727613export const V2SkillsListResponse__SkillErrorInfo = Schema.Struct({
64737614 message: Schema.String,
64747615 path: Schema.String,
6475});
6476
6477export type V2SkillsListResponse__SkillScope = "user" | "repo" | "system" | "admin";
6478export const V2SkillsListResponse__SkillScope = Schema.Literals([
6479 "user",
6480 "repo",
6481 "system",
6482 "admin",
6483]);
7616}).annotate({ identifier: "V2SkillsListResponse__SkillErrorInfo" });
64847617
64857618export type V2SkillsListResponse__SkillToolDependency = {
64867619 readonly command?: string | null;
......@@ -6497,18 +7630,23 @@ export const V2SkillsListResponse__SkillToolDependency = Schema.Struct({
64977630 type: Schema.String,
64987631 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
64997632 value: Schema.String,
6500});
7633}).annotate({ identifier: "V2SkillsListResponse__SkillToolDependency" });
65017634
6502export type V2ThreadForkParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
6503export const V2ThreadForkParams__ApprovalsReviewer = Schema.Literals([
6504 "user",
6505 "auto_review",
6506 "guardian_subagent",
6507]).annotate({
7635export type V2SkillsListResponse__AbsolutePathBuf = string;
7636export const V2SkillsListResponse__AbsolutePathBuf = Schema.String.annotate({
65087637 description:
6509 "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.",
7638 "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.",
7639 identifier: "V2SkillsListResponse__AbsolutePathBuf",
65107640});
65117641
7642export type V2SkillsListResponse__SkillScope = "user" | "repo" | "system" | "admin";
7643export const V2SkillsListResponse__SkillScope = Schema.Literals([
7644 "user",
7645 "repo",
7646 "system",
7647 "admin",
7648]).annotate({ identifier: "V2SkillsListResponse__SkillScope" });
7649
65127650export type V2ThreadForkParams__AskForApproval =
65137651 | "untrusted"
65147652 | "on-request"
......@@ -6536,7 +7674,18 @@ export const V2ThreadForkParams__AskForApproval = Schema.Union(
65367674 }).annotate({ title: "GranularAskForApproval" }),
65377675 ],
65387676 { mode: "oneOf" },
6539);
7677).annotate({ identifier: "V2ThreadForkParams__AskForApproval" });
7678
7679export type V2ThreadForkParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
7680export const V2ThreadForkParams__ApprovalsReviewer = Schema.Literals([
7681 "user",
7682 "auto_review",
7683 "guardian_subagent",
7684]).annotate({
7685 description:
7686 "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.",
7687 identifier: "V2ThreadForkParams__ApprovalsReviewer",
7688});
65407689
65417690export type V2ThreadForkParams__SandboxMode =
65427691 | "read-only"
......@@ -6546,20 +7695,13 @@ export const V2ThreadForkParams__SandboxMode = Schema.Literals([
65467695 "read-only",
65477696 "workspace-write",
65487697 "danger-full-access",
6549]);
7698]).annotate({ identifier: "V2ThreadForkParams__SandboxMode" });
65507699
65517700export type V2ThreadForkParams__ThreadSource = string;
6552export const V2ThreadForkParams__ThreadSource = Schema.String;
6553
6554export type V2ThreadForkResponse__AbsolutePathBuf = string;
6555export const V2ThreadForkResponse__AbsolutePathBuf = Schema.String.annotate({
6556 description:
6557 "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.",
7701export const V2ThreadForkParams__ThreadSource = Schema.String.annotate({
7702 identifier: "V2ThreadForkParams__ThreadSource",
65587703});
65597704
6560export type V2ThreadForkResponse__AgentPath = string;
6561export const V2ThreadForkResponse__AgentPath = Schema.String;
6562
65637705export type V2ThreadForkResponse__AskForApproval =
65647706 | "untrusted"
65657707 | "on-request"
......@@ -6587,72 +7729,46 @@ export const V2ThreadForkResponse__AskForApproval = Schema.Union(
65877729 }).annotate({ title: "GranularAskForApproval" }),
65887730 ],
65897731 { mode: "oneOf" },
6590);
7732).annotate({ identifier: "V2ThreadForkResponse__AskForApproval" });
65917733
6592export type V2ThreadForkResponse__CollabAgentStatus =
6593 | "pendingInit"
6594 | "running"
6595 | "interrupted"
6596 | "completed"
6597 | "errored"
6598 | "shutdown"
6599 | "notFound";
6600export const V2ThreadForkResponse__CollabAgentStatus = Schema.Literals([
6601 "pendingInit",
6602 "running",
6603 "interrupted",
6604 "completed",
6605 "errored",
6606 "shutdown",
6607 "notFound",
6608]);
7734export type V2ThreadForkResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
7735export const V2ThreadForkResponse__ApprovalsReviewer = Schema.Literals([
7736 "user",
7737 "auto_review",
7738 "guardian_subagent",
7739]).annotate({
7740 description:
7741 "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.",
7742 identifier: "V2ThreadForkResponse__ApprovalsReviewer",
7743});
66097744
6610export type V2ThreadForkResponse__CommandExecutionStatus =
6611 | "inProgress"
6612 | "completed"
6613 | "failed"
6614 | "declined";
6615export const V2ThreadForkResponse__CommandExecutionStatus = Schema.Literals([
6616 "inProgress",
6617 "completed",
6618 "failed",
6619 "declined",
6620]);
7745export type V2ThreadForkResponse__AbsolutePathBuf = string;
7746export const V2ThreadForkResponse__AbsolutePathBuf = Schema.String.annotate({
7747 description:
7748 "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.",
7749 identifier: "V2ThreadForkResponse__AbsolutePathBuf",
7750});
66217751
6622export type V2ThreadForkResponse__DynamicToolCallOutputContentItem =
6623 | { readonly text: string; readonly type: "inputText" }
6624 | { readonly imageUrl: string; readonly type: "inputImage" }
6625 | { readonly audioUrl: string; readonly type: "inputAudio" };
6626export const V2ThreadForkResponse__DynamicToolCallOutputContentItem = Schema.Union(
6627 [
6628 Schema.Struct({
6629 text: Schema.String,
6630 type: Schema.Literal("inputText").annotate({
6631 title: "InputTextDynamicToolCallOutputContentItemType",
6632 }),
6633 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
6634 Schema.Struct({
6635 imageUrl: Schema.String,
6636 type: Schema.Literal("inputImage").annotate({
6637 title: "InputImageDynamicToolCallOutputContentItemType",
6638 }),
6639 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
6640 Schema.Struct({
6641 audioUrl: Schema.String,
6642 type: Schema.Literal("inputAudio").annotate({
6643 title: "InputAudioDynamicToolCallOutputContentItemType",
6644 }),
6645 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
6646 ],
6647 { mode: "oneOf" },
7752export type V2ThreadForkResponse__LegacyAppPathString = string;
7753export const V2ThreadForkResponse__LegacyAppPathString = Schema.String.annotate({
7754 identifier: "V2ThreadForkResponse__LegacyAppPathString",
7755});
7756
7757export type V2ThreadForkResponse__ReasoningEffort = string;
7758export const V2ThreadForkResponse__ReasoningEffort = Schema.String.annotate({
7759 description: "A non-empty reasoning effort value advertised by the model.",
7760}).check(
7761 Schema.isMinLength(1).annotate({
7762 expected: "a value with a length of at least 1",
7763 identifier: "V2ThreadForkResponse__ReasoningEffort",
7764 }),
66487765);
66497766
6650export type V2ThreadForkResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
6651export const V2ThreadForkResponse__DynamicToolCallStatus = Schema.Literals([
6652 "inProgress",
6653 "completed",
6654 "failed",
6655]);
7767export type V2ThreadForkResponse__NetworkAccess = "restricted" | "enabled";
7768export const V2ThreadForkResponse__NetworkAccess = Schema.Literals([
7769 "restricted",
7770 "enabled",
7771]).annotate({ identifier: "V2ThreadForkResponse__NetworkAccess" });
66567772
66577773export type V2ThreadForkResponse__GitInfo = {
66587774 readonly branch?: string | null;
......@@ -6663,63 +7779,65 @@ export const V2ThreadForkResponse__GitInfo = Schema.Struct({
66637779 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
66647780 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
66657781 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7782}).annotate({ identifier: "V2ThreadForkResponse__GitInfo" });
7783
7784export type V2ThreadForkResponse__AgentPath = string;
7785export const V2ThreadForkResponse__AgentPath = Schema.String.annotate({
7786 identifier: "V2ThreadForkResponse__AgentPath",
66667787});
66677788
6668export type V2ThreadForkResponse__HookPromptFragment = {
6669 readonly hookRunId: string;
6670 readonly text: string;
6671};
6672export const V2ThreadForkResponse__HookPromptFragment = Schema.Struct({
6673 hookRunId: Schema.String,
6674 text: Schema.String,
7789export type V2ThreadForkResponse__ThreadId = string;
7790export const V2ThreadForkResponse__ThreadId = Schema.String.annotate({
7791 identifier: "V2ThreadForkResponse__ThreadId",
7792});
7793
7794export type V2ThreadForkResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
7795export const V2ThreadForkResponse__ThreadActiveFlag = Schema.Literals([
7796 "waitingOnApproval",
7797 "waitingOnUserInput",
7798]).annotate({ identifier: "V2ThreadForkResponse__ThreadActiveFlag" });
7799
7800export type V2ThreadForkResponse__ThreadSource = string;
7801export const V2ThreadForkResponse__ThreadSource = Schema.String.annotate({
7802 identifier: "V2ThreadForkResponse__ThreadSource",
66757803});
66767804
7805export type V2ThreadForkResponse__NonSteerableTurnKind = "review" | "compact";
7806export const V2ThreadForkResponse__NonSteerableTurnKind = Schema.Literals([
7807 "review",
7808 "compact",
7809]).annotate({ identifier: "V2ThreadForkResponse__NonSteerableTurnKind" });
7810
7811export type V2ThreadForkResponse__ByteRange = { readonly end: number; readonly start: number };
7812export const V2ThreadForkResponse__ByteRange = Schema.Struct({
7813 end: Schema.Number.annotate({ format: "uint" })
7814 .check(Schema.isInt().annotate({ expected: "an integer" }))
7815 .check(
7816 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
7817 ),
7818 start: Schema.Number.annotate({ format: "uint" })
7819 .check(Schema.isInt().annotate({ expected: "an integer" }))
7820 .check(
7821 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
7822 ),
7823}).annotate({ identifier: "V2ThreadForkResponse__ByteRange" });
7824
66777825export type V2ThreadForkResponse__ImageDetail = "auto" | "low" | "high" | "original";
66787826export const V2ThreadForkResponse__ImageDetail = Schema.Literals([
66797827 "auto",
66807828 "low",
66817829 "high",
66827830 "original",
6683]);
6684
6685export type V2ThreadForkResponse__LegacyAppPathString = string;
6686export const V2ThreadForkResponse__LegacyAppPathString = Schema.String;
6687
6688export type V2ThreadForkResponse__McpToolCallAppContext = {
6689 readonly actionName?: string | null;
6690 readonly appName?: string | null;
6691 readonly connectorId: string;
6692 readonly linkId?: string | null;
6693 readonly resourceUri?: string | null;
6694};
6695export const V2ThreadForkResponse__McpToolCallAppContext = Schema.Struct({
6696 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
6697 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
6698 connectorId: Schema.String,
6699 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
6700 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
6701});
6702
6703export type V2ThreadForkResponse__McpToolCallError = { readonly message: string };
6704export const V2ThreadForkResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
7831]).annotate({ identifier: "V2ThreadForkResponse__ImageDetail" });
67057832
6706export type V2ThreadForkResponse__McpToolCallResult = {
6707 readonly _meta?: unknown;
6708 readonly content: ReadonlyArray<unknown>;
6709 readonly structuredContent?: unknown;
7833export type V2ThreadForkResponse__HookPromptFragment = {
7834 readonly hookRunId: string;
7835 readonly text: string;
67107836};
6711export const V2ThreadForkResponse__McpToolCallResult = Schema.Struct({
6712 _meta: Schema.optionalKey(Schema.Unknown),
6713 content: Schema.Array(Schema.Unknown),
6714 structuredContent: Schema.optionalKey(Schema.Unknown),
6715});
6716
6717export type V2ThreadForkResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
6718export const V2ThreadForkResponse__McpToolCallStatus = Schema.Literals([
6719 "inProgress",
6720 "completed",
6721 "failed",
6722]);
7837export const V2ThreadForkResponse__HookPromptFragment = Schema.Struct({
7838 hookRunId: Schema.String,
7839 text: Schema.String,
7840}).annotate({ identifier: "V2ThreadForkResponse__HookPromptFragment" });
67237841
67247842export type V2ThreadForkResponse__MemoryCitationEntry = {
67257843 readonly lineEnd: number;
......@@ -6729,38 +7847,60 @@ export type V2ThreadForkResponse__MemoryCitationEntry = {
67297847};
67307848export const V2ThreadForkResponse__MemoryCitationEntry = Schema.Struct({
67317849 lineEnd: Schema.Number.annotate({ format: "uint32" })
6732 .check(Schema.isInt())
6733 .check(Schema.isGreaterThanOrEqualTo(0)),
7850 .check(Schema.isInt().annotate({ expected: "an integer" }))
7851 .check(
7852 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
7853 ),
67347854 lineStart: Schema.Number.annotate({ format: "uint32" })
6735 .check(Schema.isInt())
6736 .check(Schema.isGreaterThanOrEqualTo(0)),
7855 .check(Schema.isInt().annotate({ expected: "an integer" }))
7856 .check(
7857 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
7858 ),
67377859 note: Schema.String,
67387860 path: Schema.String,
6739});
7861}).annotate({ identifier: "V2ThreadForkResponse__MemoryCitationEntry" });
67407862
67417863export type V2ThreadForkResponse__MessagePhase = "commentary" | "final_answer";
6742export const V2ThreadForkResponse__MessagePhase = Schema.Literals([
6743 "commentary",
6744 "final_answer",
6745]).annotate({
7864export const V2ThreadForkResponse__MessagePhase = Schema.Union(
7865 [
7866 Schema.Literal("commentary").annotate({
7867 description:
7868 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
7869 }),
7870 Schema.Literal("final_answer").annotate({
7871 description: "The assistant's terminal answer text for the current turn.",
7872 }),
7873 ],
7874 { mode: "oneOf" },
7875).annotate({
67467876 description:
67477877 '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.',
7878 identifier: "V2ThreadForkResponse__MessagePhase",
67487879});
67497880
6750export type V2ThreadForkResponse__NonSteerableTurnKind = "review" | "compact";
6751export const V2ThreadForkResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
7881export type V2ThreadForkResponse__CommandExecutionSource =
7882 | "agent"
7883 | "userShell"
7884 | "unifiedExecStartup"
7885 | "unifiedExecInteraction";
7886export const V2ThreadForkResponse__CommandExecutionSource = Schema.Literals([
7887 "agent",
7888 "userShell",
7889 "unifiedExecStartup",
7890 "unifiedExecInteraction",
7891]).annotate({ identifier: "V2ThreadForkResponse__CommandExecutionSource" });
67527892
6753export type V2ThreadForkResponse__PatchApplyStatus =
7893export type V2ThreadForkResponse__CommandExecutionStatus =
67547894 | "inProgress"
67557895 | "completed"
67567896 | "failed"
67577897 | "declined";
6758export const V2ThreadForkResponse__PatchApplyStatus = Schema.Literals([
7898export const V2ThreadForkResponse__CommandExecutionStatus = Schema.Literals([
67597899 "inProgress",
67607900 "completed",
67617901 "failed",
67627902 "declined",
6763]);
7903]).annotate({ identifier: "V2ThreadForkResponse__CommandExecutionStatus" });
67647904
67657905export type V2ThreadForkResponse__PatchChangeKind =
67667906 | { readonly type: "add" }
......@@ -6780,73 +7920,156 @@ export const V2ThreadForkResponse__PatchChangeKind = Schema.Union(
67807920 }).annotate({ title: "UpdatePatchChangeKind" }),
67817921 ],
67827922 { mode: "oneOf" },
6783);
6784
6785export type V2ThreadForkResponse__ReasoningEffort = string;
6786export const V2ThreadForkResponse__ReasoningEffort = Schema.String.annotate({
6787 description: "A non-empty reasoning effort value advertised by the model.",
6788}).check(Schema.isMinLength(1));
7923).annotate({ identifier: "V2ThreadForkResponse__PatchChangeKind" });
67897924
6790export type V2ThreadForkResponse__SubAgentActivityKind =
6791 | "started"
6792 | "interacted"
6793 | "interrupted"
6794 | "completed";
6795export const V2ThreadForkResponse__SubAgentActivityKind = Schema.Literals([
6796 "started",
6797 "interacted",
6798 "interrupted",
7925export type V2ThreadForkResponse__PatchApplyStatus =
7926 | "inProgress"
7927 | "completed"
7928 | "failed"
7929 | "declined";
7930export const V2ThreadForkResponse__PatchApplyStatus = Schema.Literals([
7931 "inProgress",
67997932 "completed",
6800]);
7933 "failed",
7934 "declined",
7935]).annotate({ identifier: "V2ThreadForkResponse__PatchApplyStatus" });
68017936
6802export type V2ThreadForkResponse__TextElement = {
6803 readonly byteRange: { readonly end: number; readonly start: number };
6804 readonly placeholder?: string | null;
7937export type V2ThreadForkResponse__McpToolCallAppContext = {
7938 readonly actionName?: string | null;
7939 readonly appName?: string | null;
7940 readonly connectorId: string;
7941 readonly linkId?: string | null;
7942 readonly resourceUri?: string | null;
68057943};
6806export const V2ThreadForkResponse__TextElement = Schema.Struct({
6807 byteRange: Schema.Struct({
6808 end: Schema.Number.annotate({ format: "uint" })
6809 .check(Schema.isInt())
6810 .check(Schema.isGreaterThanOrEqualTo(0)),
6811 start: Schema.Number.annotate({ format: "uint" })
6812 .check(Schema.isInt())
6813 .check(Schema.isGreaterThanOrEqualTo(0)),
6814 }).annotate({
6815 description: "Byte range in the parent `text` buffer that this element occupies.",
6816 }),
6817 placeholder: Schema.optionalKey(
6818 Schema.Union([
6819 Schema.String.annotate({
6820 description: "Optional human-readable placeholder for the element, displayed in the UI.",
6821 }),
6822 Schema.Null,
6823 ]),
6824 ),
6825});
7944export const V2ThreadForkResponse__McpToolCallAppContext = Schema.Struct({
7945 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7946 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7947 connectorId: Schema.String,
7948 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7949 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7950}).annotate({ identifier: "V2ThreadForkResponse__McpToolCallAppContext" });
68267951
6827export type V2ThreadForkResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
6828export const V2ThreadForkResponse__ThreadActiveFlag = Schema.Literals([
6829 "waitingOnApproval",
6830 "waitingOnUserInput",
6831]);
7952export type V2ThreadForkResponse__McpToolCallError = { readonly message: string };
7953export const V2ThreadForkResponse__McpToolCallError = Schema.Struct({
7954 message: Schema.String,
7955}).annotate({ identifier: "V2ThreadForkResponse__McpToolCallError" });
68327956
6833export type V2ThreadForkResponse__ThreadId = string;
6834export const V2ThreadForkResponse__ThreadId = Schema.String;
7957export type V2ThreadForkResponse__McpToolCallResult = {
7958 readonly _meta?: Schema.Json;
7959 readonly content: ReadonlyArray<Schema.Json>;
7960 readonly structuredContent?: Schema.Json;
7961};
7962export const V2ThreadForkResponse__McpToolCallResult = Schema.Struct({
7963 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
7964 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
7965 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
7966}).annotate({ identifier: "V2ThreadForkResponse__McpToolCallResult" });
68357967
6836export type V2ThreadForkResponse__ThreadSource = string;
6837export const V2ThreadForkResponse__ThreadSource = Schema.String;
7968export type V2ThreadForkResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
7969export const V2ThreadForkResponse__McpToolCallStatus = Schema.Literals([
7970 "inProgress",
7971 "completed",
7972 "failed",
7973]).annotate({ identifier: "V2ThreadForkResponse__McpToolCallStatus" });
68387974
6839export type V2ThreadForkResponse__TurnStatus =
6840 | "completed"
7975export type V2ThreadForkResponse__DynamicToolCallOutputContentItem =
7976 | { readonly text: string; readonly type: "inputText" }
7977 | { readonly imageUrl: string; readonly type: "inputImage" }
7978 | { readonly audioUrl: string; readonly type: "inputAudio" };
7979export const V2ThreadForkResponse__DynamicToolCallOutputContentItem = Schema.Union(
7980 [
7981 Schema.Struct({
7982 text: Schema.String,
7983 type: Schema.Literal("inputText").annotate({
7984 title: "InputTextDynamicToolCallOutputContentItemType",
7985 }),
7986 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
7987 Schema.Struct({
7988 imageUrl: Schema.String,
7989 type: Schema.Literal("inputImage").annotate({
7990 title: "InputImageDynamicToolCallOutputContentItemType",
7991 }),
7992 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
7993 Schema.Struct({
7994 audioUrl: Schema.String,
7995 type: Schema.Literal("inputAudio").annotate({
7996 title: "InputAudioDynamicToolCallOutputContentItemType",
7997 }),
7998 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
7999 ],
8000 { mode: "oneOf" },
8001).annotate({ identifier: "V2ThreadForkResponse__DynamicToolCallOutputContentItem" });
8002
8003export type V2ThreadForkResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
8004export const V2ThreadForkResponse__DynamicToolCallStatus = Schema.Literals([
8005 "inProgress",
8006 "completed",
8007 "failed",
8008]).annotate({ identifier: "V2ThreadForkResponse__DynamicToolCallStatus" });
8009
8010export type V2ThreadForkResponse__CollabAgentStatus =
8011 | "pendingInit"
8012 | "running"
68418013 | "interrupted"
8014 | "completed"
8015 | "errored"
8016 | "shutdown"
8017 | "notFound";
8018export const V2ThreadForkResponse__CollabAgentStatus = Schema.Literals([
8019 "pendingInit",
8020 "running",
8021 "interrupted",
8022 "completed",
8023 "errored",
8024 "shutdown",
8025 "notFound",
8026]).annotate({ identifier: "V2ThreadForkResponse__CollabAgentStatus" });
8027
8028export type V2ThreadForkResponse__CollabAgentToolCallStatus =
8029 | "inProgress"
8030 | "completed"
68428031 | "failed"
6843 | "inProgress";
6844export const V2ThreadForkResponse__TurnStatus = Schema.Literals([
8032 | "interrupted";
8033export const V2ThreadForkResponse__CollabAgentToolCallStatus = Schema.Literals([
8034 "inProgress",
68458035 "completed",
6846 "interrupted",
68478036 "failed",
6848 "inProgress",
6849]);
8037 "interrupted",
8038]).annotate({ identifier: "V2ThreadForkResponse__CollabAgentToolCallStatus" });
8039
8040export type V2ThreadForkResponse__CollabAgentTool =
8041 | "spawnAgent"
8042 | "sendInput"
8043 | "resumeAgent"
8044 | "wait"
8045 | "closeAgent"
8046 | "sendMessage"
8047 | "followupTask"
8048 | "interruptAgent"
8049 | "listAgents";
8050export const V2ThreadForkResponse__CollabAgentTool = Schema.Literals([
8051 "spawnAgent",
8052 "sendInput",
8053 "resumeAgent",
8054 "wait",
8055 "closeAgent",
8056 "sendMessage",
8057 "followupTask",
8058 "interruptAgent",
8059 "listAgents",
8060]).annotate({ identifier: "V2ThreadForkResponse__CollabAgentTool" });
8061
8062export type V2ThreadForkResponse__SubAgentActivityKind =
8063 | "started"
8064 | "interacted"
8065 | "interrupted"
8066 | "completed";
8067export const V2ThreadForkResponse__SubAgentActivityKind = Schema.Literals([
8068 "started",
8069 "interacted",
8070 "interrupted",
8071 "completed",
8072]).annotate({ identifier: "V2ThreadForkResponse__SubAgentActivityKind" });
68508073
68518074export type V2ThreadForkResponse__WebSearchAction =
68528075 | {
......@@ -6878,7 +8101,36 @@ export const V2ThreadForkResponse__WebSearchAction = Schema.Union(
68788101 }).annotate({ title: "OtherWebSearchAction" }),
68798102 ],
68808103 { mode: "oneOf" },
6881);
8104).annotate({ identifier: "V2ThreadForkResponse__WebSearchAction" });
8105
8106export type V2ThreadForkResponse__TurnItemsView = "notLoaded" | "summary" | "full";
8107export const V2ThreadForkResponse__TurnItemsView = Schema.Union(
8108 [
8109 Schema.Literal("notLoaded").annotate({
8110 description: "`items` was not loaded for this turn. The field is intentionally empty.",
8111 }),
8112 Schema.Literal("summary").annotate({
8113 description: "`items` contains only a display summary for this turn.",
8114 }),
8115 Schema.Literal("full").annotate({
8116 description:
8117 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
8118 }),
8119 ],
8120 { mode: "oneOf" },
8121).annotate({ identifier: "V2ThreadForkResponse__TurnItemsView" });
8122
8123export type V2ThreadForkResponse__TurnStatus =
8124 | "completed"
8125 | "interrupted"
8126 | "failed"
8127 | "inProgress";
8128export const V2ThreadForkResponse__TurnStatus = Schema.Literals([
8129 "completed",
8130 "interrupted",
8131 "failed",
8132 "inProgress",
8133]).annotate({ identifier: "V2ThreadForkResponse__TurnStatus" });
68828134
68838135export type V2ThreadGoalGetResponse__ThreadGoalStatus =
68848136 | "active"
......@@ -6894,7 +8146,7 @@ export const V2ThreadGoalGetResponse__ThreadGoalStatus = Schema.Literals([
68948146 "usageLimited",
68958147 "budgetLimited",
68968148 "complete",
6897]);
8149]).annotate({ identifier: "V2ThreadGoalGetResponse__ThreadGoalStatus" });
68988150
68998151export type V2ThreadGoalSetParams__ThreadGoalStatus =
69008152 | "active"
......@@ -6910,7 +8162,7 @@ export const V2ThreadGoalSetParams__ThreadGoalStatus = Schema.Literals([
69108162 "usageLimited",
69118163 "budgetLimited",
69128164 "complete",
6913]);
8165]).annotate({ identifier: "V2ThreadGoalSetParams__ThreadGoalStatus" });
69148166
69158167export type V2ThreadGoalSetResponse__ThreadGoalStatus =
69168168 | "active"
......@@ -6926,7 +8178,7 @@ export const V2ThreadGoalSetResponse__ThreadGoalStatus = Schema.Literals([
69268178 "usageLimited",
69278179 "budgetLimited",
69288180 "complete",
6929]);
8181]).annotate({ identifier: "V2ThreadGoalSetResponse__ThreadGoalStatus" });
69308182
69318183export type V2ThreadGoalUpdatedNotification__ThreadGoalStatus =
69328184 | "active"
......@@ -6942,23 +8194,25 @@ export const V2ThreadGoalUpdatedNotification__ThreadGoalStatus = Schema.Literals
69428194 "usageLimited",
69438195 "budgetLimited",
69448196 "complete",
6945]);
6946
6947export type V2ThreadListParams__SortDirection = "asc" | "desc";
6948export const V2ThreadListParams__SortDirection = Schema.Literals(["asc", "desc"]);
8197]).annotate({ identifier: "V2ThreadGoalUpdatedNotification__ThreadGoalStatus" });
69498198
69508199export type V2ThreadListParams__ThreadListCwdFilter = string | ReadonlyArray<string>;
69518200export const V2ThreadListParams__ThreadListCwdFilter = Schema.Union([
69528201 Schema.String,
69538202 Schema.Array(Schema.String),
6954]);
8203]).annotate({ identifier: "V2ThreadListParams__ThreadListCwdFilter" });
8204
8205export type V2ThreadListParams__SortDirection = "asc" | "desc";
8206export const V2ThreadListParams__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
8207 identifier: "V2ThreadListParams__SortDirection",
8208});
69558209
69568210export type V2ThreadListParams__ThreadSortKey = "created_at" | "updated_at" | "recency_at";
69578211export const V2ThreadListParams__ThreadSortKey = Schema.Literals([
69588212 "created_at",
69598213 "updated_at",
69608214 "recency_at",
6961]);
8215]).annotate({ identifier: "V2ThreadListParams__ThreadSortKey" });
69628216
69638217export type V2ThreadListParams__ThreadSourceKind =
69648218 | "cli"
......@@ -6982,101 +8236,66 @@ export const V2ThreadListParams__ThreadSourceKind = Schema.Literals([
69828236 "subAgentThreadSpawn",
69838237 "subAgentOther",
69848238 "unknown",
6985]);
8239]).annotate({ identifier: "V2ThreadListParams__ThreadSourceKind" });
69868240
69878241export type V2ThreadListResponse__AbsolutePathBuf = string;
69888242export const V2ThreadListResponse__AbsolutePathBuf = Schema.String.annotate({
69898243 description:
69908244 "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.",
8245 identifier: "V2ThreadListResponse__AbsolutePathBuf",
69918246});
69928247
8248export type V2ThreadListResponse__GitInfo = {
8249 readonly branch?: string | null;
8250 readonly originUrl?: string | null;
8251 readonly sha?: string | null;
8252};
8253export const V2ThreadListResponse__GitInfo = Schema.Struct({
8254 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8255 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8256 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8257}).annotate({ identifier: "V2ThreadListResponse__GitInfo" });
8258
69938259export type V2ThreadListResponse__AgentPath = string;
6994export const V2ThreadListResponse__AgentPath = Schema.String;
8260export const V2ThreadListResponse__AgentPath = Schema.String.annotate({
8261 identifier: "V2ThreadListResponse__AgentPath",
8262});
69958263
6996export type V2ThreadListResponse__CollabAgentStatus =
6997 | "pendingInit"
6998 | "running"
6999 | "interrupted"
7000 | "completed"
7001 | "errored"
7002 | "shutdown"
7003 | "notFound";
7004export const V2ThreadListResponse__CollabAgentStatus = Schema.Literals([
7005 "pendingInit",
7006 "running",
7007 "interrupted",
7008 "completed",
7009 "errored",
7010 "shutdown",
7011 "notFound",
7012]);
8264export type V2ThreadListResponse__ThreadId = string;
8265export const V2ThreadListResponse__ThreadId = Schema.String.annotate({
8266 identifier: "V2ThreadListResponse__ThreadId",
8267});
70138268
7014export type V2ThreadListResponse__CommandExecutionStatus =
7015 | "inProgress"
7016 | "completed"
7017 | "failed"
7018 | "declined";
7019export const V2ThreadListResponse__CommandExecutionStatus = Schema.Literals([
7020 "inProgress",
7021 "completed",
7022 "failed",
7023 "declined",
7024]);
8269export type V2ThreadListResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
8270export const V2ThreadListResponse__ThreadActiveFlag = Schema.Literals([
8271 "waitingOnApproval",
8272 "waitingOnUserInput",
8273]).annotate({ identifier: "V2ThreadListResponse__ThreadActiveFlag" });
70258274
7026export type V2ThreadListResponse__DynamicToolCallOutputContentItem =
7027 | { readonly text: string; readonly type: "inputText" }
7028 | { readonly imageUrl: string; readonly type: "inputImage" }
7029 | { readonly audioUrl: string; readonly type: "inputAudio" };
7030export const V2ThreadListResponse__DynamicToolCallOutputContentItem = Schema.Union(
7031 [
7032 Schema.Struct({
7033 text: Schema.String,
7034 type: Schema.Literal("inputText").annotate({
7035 title: "InputTextDynamicToolCallOutputContentItemType",
7036 }),
7037 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
7038 Schema.Struct({
7039 imageUrl: Schema.String,
7040 type: Schema.Literal("inputImage").annotate({
7041 title: "InputImageDynamicToolCallOutputContentItemType",
7042 }),
7043 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
7044 Schema.Struct({
7045 audioUrl: Schema.String,
7046 type: Schema.Literal("inputAudio").annotate({
7047 title: "InputAudioDynamicToolCallOutputContentItemType",
7048 }),
7049 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
7050 ],
7051 { mode: "oneOf" },
7052);
7053
7054export type V2ThreadListResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
7055export const V2ThreadListResponse__DynamicToolCallStatus = Schema.Literals([
7056 "inProgress",
7057 "completed",
7058 "failed",
7059]);
7060
7061export type V2ThreadListResponse__GitInfo = {
7062 readonly branch?: string | null;
7063 readonly originUrl?: string | null;
7064 readonly sha?: string | null;
7065};
7066export const V2ThreadListResponse__GitInfo = Schema.Struct({
7067 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7068 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7069 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8275export type V2ThreadListResponse__ThreadSource = string;
8276export const V2ThreadListResponse__ThreadSource = Schema.String.annotate({
8277 identifier: "V2ThreadListResponse__ThreadSource",
70708278});
70718279
7072export type V2ThreadListResponse__HookPromptFragment = {
7073 readonly hookRunId: string;
7074 readonly text: string;
7075};
7076export const V2ThreadListResponse__HookPromptFragment = Schema.Struct({
7077 hookRunId: Schema.String,
7078 text: Schema.String,
7079});
8280export type V2ThreadListResponse__NonSteerableTurnKind = "review" | "compact";
8281export const V2ThreadListResponse__NonSteerableTurnKind = Schema.Literals([
8282 "review",
8283 "compact",
8284]).annotate({ identifier: "V2ThreadListResponse__NonSteerableTurnKind" });
8285
8286export type V2ThreadListResponse__ByteRange = { readonly end: number; readonly start: number };
8287export const V2ThreadListResponse__ByteRange = Schema.Struct({
8288 end: Schema.Number.annotate({ format: "uint" })
8289 .check(Schema.isInt().annotate({ expected: "an integer" }))
8290 .check(
8291 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
8292 ),
8293 start: Schema.Number.annotate({ format: "uint" })
8294 .check(Schema.isInt().annotate({ expected: "an integer" }))
8295 .check(
8296 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
8297 ),
8298}).annotate({ identifier: "V2ThreadListResponse__ByteRange" });
70808299
70818300export type V2ThreadListResponse__ImageDetail = "auto" | "low" | "high" | "original";
70828301export const V2ThreadListResponse__ImageDetail = Schema.Literals([
......@@ -7084,46 +8303,16 @@ export const V2ThreadListResponse__ImageDetail = Schema.Literals([
70848303 "low",
70858304 "high",
70868305 "original",
7087]);
7088
7089export type V2ThreadListResponse__LegacyAppPathString = string;
7090export const V2ThreadListResponse__LegacyAppPathString = Schema.String;
7091
7092export type V2ThreadListResponse__McpToolCallAppContext = {
7093 readonly actionName?: string | null;
7094 readonly appName?: string | null;
7095 readonly connectorId: string;
7096 readonly linkId?: string | null;
7097 readonly resourceUri?: string | null;
7098};
7099export const V2ThreadListResponse__McpToolCallAppContext = Schema.Struct({
7100 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7101 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7102 connectorId: Schema.String,
7103 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7104 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7105});
7106
7107export type V2ThreadListResponse__McpToolCallError = { readonly message: string };
7108export const V2ThreadListResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
8306]).annotate({ identifier: "V2ThreadListResponse__ImageDetail" });
71098307
7110export type V2ThreadListResponse__McpToolCallResult = {
7111 readonly _meta?: unknown;
7112 readonly content: ReadonlyArray<unknown>;
7113 readonly structuredContent?: unknown;
8308export type V2ThreadListResponse__HookPromptFragment = {
8309 readonly hookRunId: string;
8310 readonly text: string;
71148311};
7115export const V2ThreadListResponse__McpToolCallResult = Schema.Struct({
7116 _meta: Schema.optionalKey(Schema.Unknown),
7117 content: Schema.Array(Schema.Unknown),
7118 structuredContent: Schema.optionalKey(Schema.Unknown),
7119});
7120
7121export type V2ThreadListResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
7122export const V2ThreadListResponse__McpToolCallStatus = Schema.Literals([
7123 "inProgress",
7124 "completed",
7125 "failed",
7126]);
8312export const V2ThreadListResponse__HookPromptFragment = Schema.Struct({
8313 hookRunId: Schema.String,
8314 text: Schema.String,
8315}).annotate({ identifier: "V2ThreadListResponse__HookPromptFragment" });
71278316
71288317export type V2ThreadListResponse__MemoryCitationEntry = {
71298318 readonly lineEnd: number;
......@@ -7133,38 +8322,65 @@ export type V2ThreadListResponse__MemoryCitationEntry = {
71338322};
71348323export const V2ThreadListResponse__MemoryCitationEntry = Schema.Struct({
71358324 lineEnd: Schema.Number.annotate({ format: "uint32" })
7136 .check(Schema.isInt())
7137 .check(Schema.isGreaterThanOrEqualTo(0)),
8325 .check(Schema.isInt().annotate({ expected: "an integer" }))
8326 .check(
8327 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
8328 ),
71388329 lineStart: Schema.Number.annotate({ format: "uint32" })
7139 .check(Schema.isInt())
7140 .check(Schema.isGreaterThanOrEqualTo(0)),
8330 .check(Schema.isInt().annotate({ expected: "an integer" }))
8331 .check(
8332 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
8333 ),
71418334 note: Schema.String,
71428335 path: Schema.String,
7143});
8336}).annotate({ identifier: "V2ThreadListResponse__MemoryCitationEntry" });
71448337
71458338export type V2ThreadListResponse__MessagePhase = "commentary" | "final_answer";
7146export const V2ThreadListResponse__MessagePhase = Schema.Literals([
7147 "commentary",
7148 "final_answer",
7149]).annotate({
8339export const V2ThreadListResponse__MessagePhase = Schema.Union(
8340 [
8341 Schema.Literal("commentary").annotate({
8342 description:
8343 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
8344 }),
8345 Schema.Literal("final_answer").annotate({
8346 description: "The assistant's terminal answer text for the current turn.",
8347 }),
8348 ],
8349 { mode: "oneOf" },
8350).annotate({
71508351 description:
71518352 '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.',
8353 identifier: "V2ThreadListResponse__MessagePhase",
71528354});
71538355
7154export type V2ThreadListResponse__NonSteerableTurnKind = "review" | "compact";
7155export const V2ThreadListResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
8356export type V2ThreadListResponse__LegacyAppPathString = string;
8357export const V2ThreadListResponse__LegacyAppPathString = Schema.String.annotate({
8358 identifier: "V2ThreadListResponse__LegacyAppPathString",
8359});
71568360
7157export type V2ThreadListResponse__PatchApplyStatus =
8361export type V2ThreadListResponse__CommandExecutionSource =
8362 | "agent"
8363 | "userShell"
8364 | "unifiedExecStartup"
8365 | "unifiedExecInteraction";
8366export const V2ThreadListResponse__CommandExecutionSource = Schema.Literals([
8367 "agent",
8368 "userShell",
8369 "unifiedExecStartup",
8370 "unifiedExecInteraction",
8371]).annotate({ identifier: "V2ThreadListResponse__CommandExecutionSource" });
8372
8373export type V2ThreadListResponse__CommandExecutionStatus =
71588374 | "inProgress"
71598375 | "completed"
71608376 | "failed"
71618377 | "declined";
7162export const V2ThreadListResponse__PatchApplyStatus = Schema.Literals([
8378export const V2ThreadListResponse__CommandExecutionStatus = Schema.Literals([
71638379 "inProgress",
71648380 "completed",
71658381 "failed",
71668382 "declined",
7167]);
8383]).annotate({ identifier: "V2ThreadListResponse__CommandExecutionStatus" });
71688384
71698385export type V2ThreadListResponse__PatchChangeKind =
71708386 | { readonly type: "add" }
......@@ -7184,12 +8400,154 @@ export const V2ThreadListResponse__PatchChangeKind = Schema.Union(
71848400 }).annotate({ title: "UpdatePatchChangeKind" }),
71858401 ],
71868402 { mode: "oneOf" },
7187);
8403).annotate({ identifier: "V2ThreadListResponse__PatchChangeKind" });
8404
8405export type V2ThreadListResponse__PatchApplyStatus =
8406 | "inProgress"
8407 | "completed"
8408 | "failed"
8409 | "declined";
8410export const V2ThreadListResponse__PatchApplyStatus = Schema.Literals([
8411 "inProgress",
8412 "completed",
8413 "failed",
8414 "declined",
8415]).annotate({ identifier: "V2ThreadListResponse__PatchApplyStatus" });
8416
8417export type V2ThreadListResponse__McpToolCallAppContext = {
8418 readonly actionName?: string | null;
8419 readonly appName?: string | null;
8420 readonly connectorId: string;
8421 readonly linkId?: string | null;
8422 readonly resourceUri?: string | null;
8423};
8424export const V2ThreadListResponse__McpToolCallAppContext = Schema.Struct({
8425 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8426 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8427 connectorId: Schema.String,
8428 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8429 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8430}).annotate({ identifier: "V2ThreadListResponse__McpToolCallAppContext" });
8431
8432export type V2ThreadListResponse__McpToolCallError = { readonly message: string };
8433export const V2ThreadListResponse__McpToolCallError = Schema.Struct({
8434 message: Schema.String,
8435}).annotate({ identifier: "V2ThreadListResponse__McpToolCallError" });
8436
8437export type V2ThreadListResponse__McpToolCallResult = {
8438 readonly _meta?: Schema.Json;
8439 readonly content: ReadonlyArray<Schema.Json>;
8440 readonly structuredContent?: Schema.Json;
8441};
8442export const V2ThreadListResponse__McpToolCallResult = Schema.Struct({
8443 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
8444 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
8445 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
8446}).annotate({ identifier: "V2ThreadListResponse__McpToolCallResult" });
8447
8448export type V2ThreadListResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
8449export const V2ThreadListResponse__McpToolCallStatus = Schema.Literals([
8450 "inProgress",
8451 "completed",
8452 "failed",
8453]).annotate({ identifier: "V2ThreadListResponse__McpToolCallStatus" });
8454
8455export type V2ThreadListResponse__DynamicToolCallOutputContentItem =
8456 | { readonly text: string; readonly type: "inputText" }
8457 | { readonly imageUrl: string; readonly type: "inputImage" }
8458 | { readonly audioUrl: string; readonly type: "inputAudio" };
8459export const V2ThreadListResponse__DynamicToolCallOutputContentItem = Schema.Union(
8460 [
8461 Schema.Struct({
8462 text: Schema.String,
8463 type: Schema.Literal("inputText").annotate({
8464 title: "InputTextDynamicToolCallOutputContentItemType",
8465 }),
8466 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
8467 Schema.Struct({
8468 imageUrl: Schema.String,
8469 type: Schema.Literal("inputImage").annotate({
8470 title: "InputImageDynamicToolCallOutputContentItemType",
8471 }),
8472 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
8473 Schema.Struct({
8474 audioUrl: Schema.String,
8475 type: Schema.Literal("inputAudio").annotate({
8476 title: "InputAudioDynamicToolCallOutputContentItemType",
8477 }),
8478 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
8479 ],
8480 { mode: "oneOf" },
8481).annotate({ identifier: "V2ThreadListResponse__DynamicToolCallOutputContentItem" });
8482
8483export type V2ThreadListResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
8484export const V2ThreadListResponse__DynamicToolCallStatus = Schema.Literals([
8485 "inProgress",
8486 "completed",
8487 "failed",
8488]).annotate({ identifier: "V2ThreadListResponse__DynamicToolCallStatus" });
8489
8490export type V2ThreadListResponse__CollabAgentStatus =
8491 | "pendingInit"
8492 | "running"
8493 | "interrupted"
8494 | "completed"
8495 | "errored"
8496 | "shutdown"
8497 | "notFound";
8498export const V2ThreadListResponse__CollabAgentStatus = Schema.Literals([
8499 "pendingInit",
8500 "running",
8501 "interrupted",
8502 "completed",
8503 "errored",
8504 "shutdown",
8505 "notFound",
8506]).annotate({ identifier: "V2ThreadListResponse__CollabAgentStatus" });
71888507
71898508export type V2ThreadListResponse__ReasoningEffort = string;
71908509export const V2ThreadListResponse__ReasoningEffort = Schema.String.annotate({
71918510 description: "A non-empty reasoning effort value advertised by the model.",
7192}).check(Schema.isMinLength(1));
8511}).check(
8512 Schema.isMinLength(1).annotate({
8513 expected: "a value with a length of at least 1",
8514 identifier: "V2ThreadListResponse__ReasoningEffort",
8515 }),
8516);
8517
8518export type V2ThreadListResponse__CollabAgentToolCallStatus =
8519 | "inProgress"
8520 | "completed"
8521 | "failed"
8522 | "interrupted";
8523export const V2ThreadListResponse__CollabAgentToolCallStatus = Schema.Literals([
8524 "inProgress",
8525 "completed",
8526 "failed",
8527 "interrupted",
8528]).annotate({ identifier: "V2ThreadListResponse__CollabAgentToolCallStatus" });
8529
8530export type V2ThreadListResponse__CollabAgentTool =
8531 | "spawnAgent"
8532 | "sendInput"
8533 | "resumeAgent"
8534 | "wait"
8535 | "closeAgent"
8536 | "sendMessage"
8537 | "followupTask"
8538 | "interruptAgent"
8539 | "listAgents";
8540export const V2ThreadListResponse__CollabAgentTool = Schema.Literals([
8541 "spawnAgent",
8542 "sendInput",
8543 "resumeAgent",
8544 "wait",
8545 "closeAgent",
8546 "sendMessage",
8547 "followupTask",
8548 "interruptAgent",
8549 "listAgents",
8550]).annotate({ identifier: "V2ThreadListResponse__CollabAgentTool" });
71938551
71948552export type V2ThreadListResponse__SubAgentActivityKind =
71958553 | "started"
......@@ -7201,56 +8559,7 @@ export const V2ThreadListResponse__SubAgentActivityKind = Schema.Literals([
72018559 "interacted",
72028560 "interrupted",
72038561 "completed",
7204]);
7205
7206export type V2ThreadListResponse__TextElement = {
7207 readonly byteRange: { readonly end: number; readonly start: number };
7208 readonly placeholder?: string | null;
7209};
7210export const V2ThreadListResponse__TextElement = Schema.Struct({
7211 byteRange: Schema.Struct({
7212 end: Schema.Number.annotate({ format: "uint" })
7213 .check(Schema.isInt())
7214 .check(Schema.isGreaterThanOrEqualTo(0)),
7215 start: Schema.Number.annotate({ format: "uint" })
7216 .check(Schema.isInt())
7217 .check(Schema.isGreaterThanOrEqualTo(0)),
7218 }).annotate({
7219 description: "Byte range in the parent `text` buffer that this element occupies.",
7220 }),
7221 placeholder: Schema.optionalKey(
7222 Schema.Union([
7223 Schema.String.annotate({
7224 description: "Optional human-readable placeholder for the element, displayed in the UI.",
7225 }),
7226 Schema.Null,
7227 ]),
7228 ),
7229});
7230
7231export type V2ThreadListResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
7232export const V2ThreadListResponse__ThreadActiveFlag = Schema.Literals([
7233 "waitingOnApproval",
7234 "waitingOnUserInput",
7235]);
7236
7237export type V2ThreadListResponse__ThreadId = string;
7238export const V2ThreadListResponse__ThreadId = Schema.String;
7239
7240export type V2ThreadListResponse__ThreadSource = string;
7241export const V2ThreadListResponse__ThreadSource = Schema.String;
7242
7243export type V2ThreadListResponse__TurnStatus =
7244 | "completed"
7245 | "interrupted"
7246 | "failed"
7247 | "inProgress";
7248export const V2ThreadListResponse__TurnStatus = Schema.Literals([
7249 "completed",
7250 "interrupted",
7251 "failed",
7252 "inProgress",
7253]);
8562]).annotate({ identifier: "V2ThreadListResponse__SubAgentActivityKind" });
72548563
72558564export type V2ThreadListResponse__WebSearchAction =
72568565 | {
......@@ -7282,7 +8591,36 @@ export const V2ThreadListResponse__WebSearchAction = Schema.Union(
72828591 }).annotate({ title: "OtherWebSearchAction" }),
72838592 ],
72848593 { mode: "oneOf" },
7285);
8594).annotate({ identifier: "V2ThreadListResponse__WebSearchAction" });
8595
8596export type V2ThreadListResponse__TurnItemsView = "notLoaded" | "summary" | "full";
8597export const V2ThreadListResponse__TurnItemsView = Schema.Union(
8598 [
8599 Schema.Literal("notLoaded").annotate({
8600 description: "`items` was not loaded for this turn. The field is intentionally empty.",
8601 }),
8602 Schema.Literal("summary").annotate({
8603 description: "`items` contains only a display summary for this turn.",
8604 }),
8605 Schema.Literal("full").annotate({
8606 description:
8607 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
8608 }),
8609 ],
8610 { mode: "oneOf" },
8611).annotate({ identifier: "V2ThreadListResponse__TurnItemsView" });
8612
8613export type V2ThreadListResponse__TurnStatus =
8614 | "completed"
8615 | "interrupted"
8616 | "failed"
8617 | "inProgress";
8618export const V2ThreadListResponse__TurnStatus = Schema.Literals([
8619 "completed",
8620 "interrupted",
8621 "failed",
8622 "inProgress",
8623]).annotate({ identifier: "V2ThreadListResponse__TurnStatus" });
72868624
72878625export type V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams = {
72888626 readonly branch?: string | null;
......@@ -7317,85 +8655,15 @@ export const V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams = S
73178655 Schema.Null,
73188656 ]),
73198657 ),
7320});
8658}).annotate({ identifier: "V2ThreadMetadataUpdateParams__ThreadMetadataGitInfoUpdateParams" });
73218659
73228660export type V2ThreadMetadataUpdateResponse__AbsolutePathBuf = string;
73238661export const V2ThreadMetadataUpdateResponse__AbsolutePathBuf = Schema.String.annotate({
73248662 description:
73258663 "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.",
8664 identifier: "V2ThreadMetadataUpdateResponse__AbsolutePathBuf",
73268665});
73278666
7328export type V2ThreadMetadataUpdateResponse__AgentPath = string;
7329export const V2ThreadMetadataUpdateResponse__AgentPath = Schema.String;
7330
7331export type V2ThreadMetadataUpdateResponse__CollabAgentStatus =
7332 | "pendingInit"
7333 | "running"
7334 | "interrupted"
7335 | "completed"
7336 | "errored"
7337 | "shutdown"
7338 | "notFound";
7339export const V2ThreadMetadataUpdateResponse__CollabAgentStatus = Schema.Literals([
7340 "pendingInit",
7341 "running",
7342 "interrupted",
7343 "completed",
7344 "errored",
7345 "shutdown",
7346 "notFound",
7347]);
7348
7349export type V2ThreadMetadataUpdateResponse__CommandExecutionStatus =
7350 | "inProgress"
7351 | "completed"
7352 | "failed"
7353 | "declined";
7354export const V2ThreadMetadataUpdateResponse__CommandExecutionStatus = Schema.Literals([
7355 "inProgress",
7356 "completed",
7357 "failed",
7358 "declined",
7359]);
7360
7361export type V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem =
7362 | { readonly text: string; readonly type: "inputText" }
7363 | { readonly imageUrl: string; readonly type: "inputImage" }
7364 | { readonly audioUrl: string; readonly type: "inputAudio" };
7365export const V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem = Schema.Union(
7366 [
7367 Schema.Struct({
7368 text: Schema.String,
7369 type: Schema.Literal("inputText").annotate({
7370 title: "InputTextDynamicToolCallOutputContentItemType",
7371 }),
7372 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
7373 Schema.Struct({
7374 imageUrl: Schema.String,
7375 type: Schema.Literal("inputImage").annotate({
7376 title: "InputImageDynamicToolCallOutputContentItemType",
7377 }),
7378 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
7379 Schema.Struct({
7380 audioUrl: Schema.String,
7381 type: Schema.Literal("inputAudio").annotate({
7382 title: "InputAudioDynamicToolCallOutputContentItemType",
7383 }),
7384 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
7385 ],
7386 { mode: "oneOf" },
7387);
7388
7389export type V2ThreadMetadataUpdateResponse__DynamicToolCallStatus =
7390 | "inProgress"
7391 | "completed"
7392 | "failed";
7393export const V2ThreadMetadataUpdateResponse__DynamicToolCallStatus = Schema.Literals([
7394 "inProgress",
7395 "completed",
7396 "failed",
7397]);
7398
73998667export type V2ThreadMetadataUpdateResponse__GitInfo = {
74008668 readonly branch?: string | null;
74018669 readonly originUrl?: string | null;
......@@ -7405,68 +8673,70 @@ export const V2ThreadMetadataUpdateResponse__GitInfo = Schema.Struct({
74058673 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
74068674 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
74078675 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8676}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__GitInfo" });
8677
8678export type V2ThreadMetadataUpdateResponse__AgentPath = string;
8679export const V2ThreadMetadataUpdateResponse__AgentPath = Schema.String.annotate({
8680 identifier: "V2ThreadMetadataUpdateResponse__AgentPath",
74088681});
74098682
7410export type V2ThreadMetadataUpdateResponse__HookPromptFragment = {
7411 readonly hookRunId: string;
7412 readonly text: string;
7413};
7414export const V2ThreadMetadataUpdateResponse__HookPromptFragment = Schema.Struct({
7415 hookRunId: Schema.String,
7416 text: Schema.String,
8683export type V2ThreadMetadataUpdateResponse__ThreadId = string;
8684export const V2ThreadMetadataUpdateResponse__ThreadId = Schema.String.annotate({
8685 identifier: "V2ThreadMetadataUpdateResponse__ThreadId",
8686});
8687
8688export type V2ThreadMetadataUpdateResponse__ThreadActiveFlag =
8689 | "waitingOnApproval"
8690 | "waitingOnUserInput";
8691export const V2ThreadMetadataUpdateResponse__ThreadActiveFlag = Schema.Literals([
8692 "waitingOnApproval",
8693 "waitingOnUserInput",
8694]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__ThreadActiveFlag" });
8695
8696export type V2ThreadMetadataUpdateResponse__ThreadSource = string;
8697export const V2ThreadMetadataUpdateResponse__ThreadSource = Schema.String.annotate({
8698 identifier: "V2ThreadMetadataUpdateResponse__ThreadSource",
74178699});
74188700
8701export type V2ThreadMetadataUpdateResponse__NonSteerableTurnKind = "review" | "compact";
8702export const V2ThreadMetadataUpdateResponse__NonSteerableTurnKind = Schema.Literals([
8703 "review",
8704 "compact",
8705]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__NonSteerableTurnKind" });
8706
8707export type V2ThreadMetadataUpdateResponse__ByteRange = {
8708 readonly end: number;
8709 readonly start: number;
8710};
8711export const V2ThreadMetadataUpdateResponse__ByteRange = Schema.Struct({
8712 end: Schema.Number.annotate({ format: "uint" })
8713 .check(Schema.isInt().annotate({ expected: "an integer" }))
8714 .check(
8715 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
8716 ),
8717 start: Schema.Number.annotate({ format: "uint" })
8718 .check(Schema.isInt().annotate({ expected: "an integer" }))
8719 .check(
8720 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
8721 ),
8722}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__ByteRange" });
8723
74198724export type V2ThreadMetadataUpdateResponse__ImageDetail = "auto" | "low" | "high" | "original";
74208725export const V2ThreadMetadataUpdateResponse__ImageDetail = Schema.Literals([
74218726 "auto",
74228727 "low",
74238728 "high",
74248729 "original",
7425]);
7426
7427export type V2ThreadMetadataUpdateResponse__LegacyAppPathString = string;
7428export const V2ThreadMetadataUpdateResponse__LegacyAppPathString = Schema.String;
7429
7430export type V2ThreadMetadataUpdateResponse__McpToolCallAppContext = {
7431 readonly actionName?: string | null;
7432 readonly appName?: string | null;
7433 readonly connectorId: string;
7434 readonly linkId?: string | null;
7435 readonly resourceUri?: string | null;
7436};
7437export const V2ThreadMetadataUpdateResponse__McpToolCallAppContext = Schema.Struct({
7438 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7439 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7440 connectorId: Schema.String,
7441 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7442 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7443});
7444
7445export type V2ThreadMetadataUpdateResponse__McpToolCallError = { readonly message: string };
7446export const V2ThreadMetadataUpdateResponse__McpToolCallError = Schema.Struct({
7447 message: Schema.String,
7448});
8730]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__ImageDetail" });
74498731
7450export type V2ThreadMetadataUpdateResponse__McpToolCallResult = {
7451 readonly _meta?: unknown;
7452 readonly content: ReadonlyArray<unknown>;
7453 readonly structuredContent?: unknown;
8732export type V2ThreadMetadataUpdateResponse__HookPromptFragment = {
8733 readonly hookRunId: string;
8734 readonly text: string;
74548735};
7455export const V2ThreadMetadataUpdateResponse__McpToolCallResult = Schema.Struct({
7456 _meta: Schema.optionalKey(Schema.Unknown),
7457 content: Schema.Array(Schema.Unknown),
7458 structuredContent: Schema.optionalKey(Schema.Unknown),
7459});
7460
7461export type V2ThreadMetadataUpdateResponse__McpToolCallStatus =
7462 | "inProgress"
7463 | "completed"
7464 | "failed";
7465export const V2ThreadMetadataUpdateResponse__McpToolCallStatus = Schema.Literals([
7466 "inProgress",
7467 "completed",
7468 "failed",
7469]);
8736export const V2ThreadMetadataUpdateResponse__HookPromptFragment = Schema.Struct({
8737 hookRunId: Schema.String,
8738 text: Schema.String,
8739}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__HookPromptFragment" });
74708740
74718741export type V2ThreadMetadataUpdateResponse__MemoryCitationEntry = {
74728742 readonly lineEnd: number;
......@@ -7476,41 +8746,65 @@ export type V2ThreadMetadataUpdateResponse__MemoryCitationEntry = {
74768746};
74778747export const V2ThreadMetadataUpdateResponse__MemoryCitationEntry = Schema.Struct({
74788748 lineEnd: Schema.Number.annotate({ format: "uint32" })
7479 .check(Schema.isInt())
7480 .check(Schema.isGreaterThanOrEqualTo(0)),
8749 .check(Schema.isInt().annotate({ expected: "an integer" }))
8750 .check(
8751 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
8752 ),
74818753 lineStart: Schema.Number.annotate({ format: "uint32" })
7482 .check(Schema.isInt())
7483 .check(Schema.isGreaterThanOrEqualTo(0)),
8754 .check(Schema.isInt().annotate({ expected: "an integer" }))
8755 .check(
8756 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
8757 ),
74848758 note: Schema.String,
74858759 path: Schema.String,
7486});
8760}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__MemoryCitationEntry" });
74878761
74888762export type V2ThreadMetadataUpdateResponse__MessagePhase = "commentary" | "final_answer";
7489export const V2ThreadMetadataUpdateResponse__MessagePhase = Schema.Literals([
7490 "commentary",
7491 "final_answer",
7492]).annotate({
8763export const V2ThreadMetadataUpdateResponse__MessagePhase = Schema.Union(
8764 [
8765 Schema.Literal("commentary").annotate({
8766 description:
8767 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
8768 }),
8769 Schema.Literal("final_answer").annotate({
8770 description: "The assistant's terminal answer text for the current turn.",
8771 }),
8772 ],
8773 { mode: "oneOf" },
8774).annotate({
74938775 description:
74948776 '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.',
8777 identifier: "V2ThreadMetadataUpdateResponse__MessagePhase",
74958778});
74968779
7497export type V2ThreadMetadataUpdateResponse__NonSteerableTurnKind = "review" | "compact";
7498export const V2ThreadMetadataUpdateResponse__NonSteerableTurnKind = Schema.Literals([
7499 "review",
7500 "compact",
7501]);
8780export type V2ThreadMetadataUpdateResponse__LegacyAppPathString = string;
8781export const V2ThreadMetadataUpdateResponse__LegacyAppPathString = Schema.String.annotate({
8782 identifier: "V2ThreadMetadataUpdateResponse__LegacyAppPathString",
8783});
75028784
7503export type V2ThreadMetadataUpdateResponse__PatchApplyStatus =
8785export type V2ThreadMetadataUpdateResponse__CommandExecutionSource =
8786 | "agent"
8787 | "userShell"
8788 | "unifiedExecStartup"
8789 | "unifiedExecInteraction";
8790export const V2ThreadMetadataUpdateResponse__CommandExecutionSource = Schema.Literals([
8791 "agent",
8792 "userShell",
8793 "unifiedExecStartup",
8794 "unifiedExecInteraction",
8795]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CommandExecutionSource" });
8796
8797export type V2ThreadMetadataUpdateResponse__CommandExecutionStatus =
75048798 | "inProgress"
75058799 | "completed"
75068800 | "failed"
75078801 | "declined";
7508export const V2ThreadMetadataUpdateResponse__PatchApplyStatus = Schema.Literals([
8802export const V2ThreadMetadataUpdateResponse__CommandExecutionStatus = Schema.Literals([
75098803 "inProgress",
75108804 "completed",
75118805 "failed",
75128806 "declined",
7513]);
8807]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CommandExecutionStatus" });
75148808
75158809export type V2ThreadMetadataUpdateResponse__PatchChangeKind =
75168810 | { readonly type: "add" }
......@@ -7530,75 +8824,172 @@ export const V2ThreadMetadataUpdateResponse__PatchChangeKind = Schema.Union(
75308824 }).annotate({ title: "UpdatePatchChangeKind" }),
75318825 ],
75328826 { mode: "oneOf" },
7533);
7534
7535export type V2ThreadMetadataUpdateResponse__ReasoningEffort = string;
7536export const V2ThreadMetadataUpdateResponse__ReasoningEffort = Schema.String.annotate({
7537 description: "A non-empty reasoning effort value advertised by the model.",
7538}).check(Schema.isMinLength(1));
8827).annotate({ identifier: "V2ThreadMetadataUpdateResponse__PatchChangeKind" });
75398828
7540export type V2ThreadMetadataUpdateResponse__SubAgentActivityKind =
7541 | "started"
7542 | "interacted"
7543 | "interrupted"
7544 | "completed";
7545export const V2ThreadMetadataUpdateResponse__SubAgentActivityKind = Schema.Literals([
7546 "started",
7547 "interacted",
7548 "interrupted",
8829export type V2ThreadMetadataUpdateResponse__PatchApplyStatus =
8830 | "inProgress"
8831 | "completed"
8832 | "failed"
8833 | "declined";
8834export const V2ThreadMetadataUpdateResponse__PatchApplyStatus = Schema.Literals([
8835 "inProgress",
75498836 "completed",
7550]);
8837 "failed",
8838 "declined",
8839]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__PatchApplyStatus" });
75518840
7552export type V2ThreadMetadataUpdateResponse__TextElement = {
7553 readonly byteRange: { readonly end: number; readonly start: number };
7554 readonly placeholder?: string | null;
8841export type V2ThreadMetadataUpdateResponse__McpToolCallAppContext = {
8842 readonly actionName?: string | null;
8843 readonly appName?: string | null;
8844 readonly connectorId: string;
8845 readonly linkId?: string | null;
8846 readonly resourceUri?: string | null;
75558847};
7556export const V2ThreadMetadataUpdateResponse__TextElement = Schema.Struct({
7557 byteRange: Schema.Struct({
7558 end: Schema.Number.annotate({ format: "uint" })
7559 .check(Schema.isInt())
7560 .check(Schema.isGreaterThanOrEqualTo(0)),
7561 start: Schema.Number.annotate({ format: "uint" })
7562 .check(Schema.isInt())
7563 .check(Schema.isGreaterThanOrEqualTo(0)),
7564 }).annotate({
7565 description: "Byte range in the parent `text` buffer that this element occupies.",
7566 }),
7567 placeholder: Schema.optionalKey(
7568 Schema.Union([
7569 Schema.String.annotate({
7570 description: "Optional human-readable placeholder for the element, displayed in the UI.",
7571 }),
7572 Schema.Null,
7573 ]),
7574 ),
7575});
8848export const V2ThreadMetadataUpdateResponse__McpToolCallAppContext = Schema.Struct({
8849 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8850 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8851 connectorId: Schema.String,
8852 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8853 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8854}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__McpToolCallAppContext" });
75768855
7577export type V2ThreadMetadataUpdateResponse__ThreadActiveFlag =
7578 | "waitingOnApproval"
7579 | "waitingOnUserInput";
7580export const V2ThreadMetadataUpdateResponse__ThreadActiveFlag = Schema.Literals([
7581 "waitingOnApproval",
7582 "waitingOnUserInput",
7583]);
8856export type V2ThreadMetadataUpdateResponse__McpToolCallError = { readonly message: string };
8857export const V2ThreadMetadataUpdateResponse__McpToolCallError = Schema.Struct({
8858 message: Schema.String,
8859}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__McpToolCallError" });
75848860
7585export type V2ThreadMetadataUpdateResponse__ThreadId = string;
7586export const V2ThreadMetadataUpdateResponse__ThreadId = Schema.String;
8861export type V2ThreadMetadataUpdateResponse__McpToolCallResult = {
8862 readonly _meta?: Schema.Json;
8863 readonly content: ReadonlyArray<Schema.Json>;
8864 readonly structuredContent?: Schema.Json;
8865};
8866export const V2ThreadMetadataUpdateResponse__McpToolCallResult = Schema.Struct({
8867 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
8868 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
8869 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
8870}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__McpToolCallResult" });
75878871
7588export type V2ThreadMetadataUpdateResponse__ThreadSource = string;
7589export const V2ThreadMetadataUpdateResponse__ThreadSource = Schema.String;
8872export type V2ThreadMetadataUpdateResponse__McpToolCallStatus =
8873 | "inProgress"
8874 | "completed"
8875 | "failed";
8876export const V2ThreadMetadataUpdateResponse__McpToolCallStatus = Schema.Literals([
8877 "inProgress",
8878 "completed",
8879 "failed",
8880]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__McpToolCallStatus" });
75908881
7591export type V2ThreadMetadataUpdateResponse__TurnStatus =
8882export type V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem =
8883 | { readonly text: string; readonly type: "inputText" }
8884 | { readonly imageUrl: string; readonly type: "inputImage" }
8885 | { readonly audioUrl: string; readonly type: "inputAudio" };
8886export const V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem = Schema.Union(
8887 [
8888 Schema.Struct({
8889 text: Schema.String,
8890 type: Schema.Literal("inputText").annotate({
8891 title: "InputTextDynamicToolCallOutputContentItemType",
8892 }),
8893 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
8894 Schema.Struct({
8895 imageUrl: Schema.String,
8896 type: Schema.Literal("inputImage").annotate({
8897 title: "InputImageDynamicToolCallOutputContentItemType",
8898 }),
8899 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
8900 Schema.Struct({
8901 audioUrl: Schema.String,
8902 type: Schema.Literal("inputAudio").annotate({
8903 title: "InputAudioDynamicToolCallOutputContentItemType",
8904 }),
8905 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
8906 ],
8907 { mode: "oneOf" },
8908).annotate({ identifier: "V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem" });
8909
8910export type V2ThreadMetadataUpdateResponse__DynamicToolCallStatus =
8911 | "inProgress"
75928912 | "completed"
8913 | "failed";
8914export const V2ThreadMetadataUpdateResponse__DynamicToolCallStatus = Schema.Literals([
8915 "inProgress",
8916 "completed",
8917 "failed",
8918]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__DynamicToolCallStatus" });
8919
8920export type V2ThreadMetadataUpdateResponse__CollabAgentStatus =
8921 | "pendingInit"
8922 | "running"
75938923 | "interrupted"
8924 | "completed"
8925 | "errored"
8926 | "shutdown"
8927 | "notFound";
8928export const V2ThreadMetadataUpdateResponse__CollabAgentStatus = Schema.Literals([
8929 "pendingInit",
8930 "running",
8931 "interrupted",
8932 "completed",
8933 "errored",
8934 "shutdown",
8935 "notFound",
8936]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CollabAgentStatus" });
8937
8938export type V2ThreadMetadataUpdateResponse__ReasoningEffort = string;
8939export const V2ThreadMetadataUpdateResponse__ReasoningEffort = Schema.String.annotate({
8940 description: "A non-empty reasoning effort value advertised by the model.",
8941}).check(
8942 Schema.isMinLength(1).annotate({
8943 expected: "a value with a length of at least 1",
8944 identifier: "V2ThreadMetadataUpdateResponse__ReasoningEffort",
8945 }),
8946);
8947
8948export type V2ThreadMetadataUpdateResponse__CollabAgentToolCallStatus =
8949 | "inProgress"
8950 | "completed"
75948951 | "failed"
7595 | "inProgress";
7596export const V2ThreadMetadataUpdateResponse__TurnStatus = Schema.Literals([
8952 | "interrupted";
8953export const V2ThreadMetadataUpdateResponse__CollabAgentToolCallStatus = Schema.Literals([
8954 "inProgress",
75978955 "completed",
7598 "interrupted",
75998956 "failed",
7600 "inProgress",
7601]);
8957 "interrupted",
8958]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CollabAgentToolCallStatus" });
8959
8960export type V2ThreadMetadataUpdateResponse__CollabAgentTool =
8961 | "spawnAgent"
8962 | "sendInput"
8963 | "resumeAgent"
8964 | "wait"
8965 | "closeAgent"
8966 | "sendMessage"
8967 | "followupTask"
8968 | "interruptAgent"
8969 | "listAgents";
8970export const V2ThreadMetadataUpdateResponse__CollabAgentTool = Schema.Literals([
8971 "spawnAgent",
8972 "sendInput",
8973 "resumeAgent",
8974 "wait",
8975 "closeAgent",
8976 "sendMessage",
8977 "followupTask",
8978 "interruptAgent",
8979 "listAgents",
8980]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CollabAgentTool" });
8981
8982export type V2ThreadMetadataUpdateResponse__SubAgentActivityKind =
8983 | "started"
8984 | "interacted"
8985 | "interrupted"
8986 | "completed";
8987export const V2ThreadMetadataUpdateResponse__SubAgentActivityKind = Schema.Literals([
8988 "started",
8989 "interacted",
8990 "interrupted",
8991 "completed",
8992]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__SubAgentActivityKind" });
76028993
76038994export type V2ThreadMetadataUpdateResponse__WebSearchAction =
76048995 | {
......@@ -7630,81 +9021,43 @@ export const V2ThreadMetadataUpdateResponse__WebSearchAction = Schema.Union(
76309021 }).annotate({ title: "OtherWebSearchAction" }),
76319022 ],
76329023 { mode: "oneOf" },
7633);
7634
7635export type V2ThreadReadResponse__AbsolutePathBuf = string;
7636export const V2ThreadReadResponse__AbsolutePathBuf = Schema.String.annotate({
7637 description:
7638 "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.",
7639});
7640
7641export type V2ThreadReadResponse__AgentPath = string;
7642export const V2ThreadReadResponse__AgentPath = Schema.String;
7643
7644export type V2ThreadReadResponse__CollabAgentStatus =
7645 | "pendingInit"
7646 | "running"
7647 | "interrupted"
7648 | "completed"
7649 | "errored"
7650 | "shutdown"
7651 | "notFound";
7652export const V2ThreadReadResponse__CollabAgentStatus = Schema.Literals([
7653 "pendingInit",
7654 "running",
7655 "interrupted",
7656 "completed",
7657 "errored",
7658 "shutdown",
7659 "notFound",
7660]);
7661
7662export type V2ThreadReadResponse__CommandExecutionStatus =
7663 | "inProgress"
7664 | "completed"
7665 | "failed"
7666 | "declined";
7667export const V2ThreadReadResponse__CommandExecutionStatus = Schema.Literals([
7668 "inProgress",
7669 "completed",
7670 "failed",
7671 "declined",
7672]);
9024).annotate({ identifier: "V2ThreadMetadataUpdateResponse__WebSearchAction" });
76739025
7674export type V2ThreadReadResponse__DynamicToolCallOutputContentItem =
7675 | { readonly text: string; readonly type: "inputText" }
7676 | { readonly imageUrl: string; readonly type: "inputImage" }
7677 | { readonly audioUrl: string; readonly type: "inputAudio" };
7678export const V2ThreadReadResponse__DynamicToolCallOutputContentItem = Schema.Union(
9026export type V2ThreadMetadataUpdateResponse__TurnItemsView = "notLoaded" | "summary" | "full";
9027export const V2ThreadMetadataUpdateResponse__TurnItemsView = Schema.Union(
76799028 [
7680 Schema.Struct({
7681 text: Schema.String,
7682 type: Schema.Literal("inputText").annotate({
7683 title: "InputTextDynamicToolCallOutputContentItemType",
7684 }),
7685 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
7686 Schema.Struct({
7687 imageUrl: Schema.String,
7688 type: Schema.Literal("inputImage").annotate({
7689 title: "InputImageDynamicToolCallOutputContentItemType",
7690 }),
7691 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
7692 Schema.Struct({
7693 audioUrl: Schema.String,
7694 type: Schema.Literal("inputAudio").annotate({
7695 title: "InputAudioDynamicToolCallOutputContentItemType",
7696 }),
7697 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
9029 Schema.Literal("notLoaded").annotate({
9030 description: "`items` was not loaded for this turn. The field is intentionally empty.",
9031 }),
9032 Schema.Literal("summary").annotate({
9033 description: "`items` contains only a display summary for this turn.",
9034 }),
9035 Schema.Literal("full").annotate({
9036 description:
9037 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
9038 }),
76989039 ],
76999040 { mode: "oneOf" },
7700);
9041).annotate({ identifier: "V2ThreadMetadataUpdateResponse__TurnItemsView" });
77019042
7702export type V2ThreadReadResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
7703export const V2ThreadReadResponse__DynamicToolCallStatus = Schema.Literals([
7704 "inProgress",
9043export type V2ThreadMetadataUpdateResponse__TurnStatus =
9044 | "completed"
9045 | "interrupted"
9046 | "failed"
9047 | "inProgress";
9048export const V2ThreadMetadataUpdateResponse__TurnStatus = Schema.Literals([
77059049 "completed",
9050 "interrupted",
77069051 "failed",
7707]);
9052 "inProgress",
9053]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__TurnStatus" });
9054
9055export type V2ThreadReadResponse__AbsolutePathBuf = string;
9056export const V2ThreadReadResponse__AbsolutePathBuf = Schema.String.annotate({
9057 description:
9058 "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.",
9059 identifier: "V2ThreadReadResponse__AbsolutePathBuf",
9060});
77089061
77099062export type V2ThreadReadResponse__GitInfo = {
77109063 readonly branch?: string | null;
......@@ -7715,63 +9068,65 @@ export const V2ThreadReadResponse__GitInfo = Schema.Struct({
77159068 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
77169069 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
77179070 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9071}).annotate({ identifier: "V2ThreadReadResponse__GitInfo" });
9072
9073export type V2ThreadReadResponse__AgentPath = string;
9074export const V2ThreadReadResponse__AgentPath = Schema.String.annotate({
9075 identifier: "V2ThreadReadResponse__AgentPath",
77189076});
77199077
7720export type V2ThreadReadResponse__HookPromptFragment = {
7721 readonly hookRunId: string;
7722 readonly text: string;
7723};
7724export const V2ThreadReadResponse__HookPromptFragment = Schema.Struct({
7725 hookRunId: Schema.String,
7726 text: Schema.String,
9078export type V2ThreadReadResponse__ThreadId = string;
9079export const V2ThreadReadResponse__ThreadId = Schema.String.annotate({
9080 identifier: "V2ThreadReadResponse__ThreadId",
9081});
9082
9083export type V2ThreadReadResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
9084export const V2ThreadReadResponse__ThreadActiveFlag = Schema.Literals([
9085 "waitingOnApproval",
9086 "waitingOnUserInput",
9087]).annotate({ identifier: "V2ThreadReadResponse__ThreadActiveFlag" });
9088
9089export type V2ThreadReadResponse__ThreadSource = string;
9090export const V2ThreadReadResponse__ThreadSource = Schema.String.annotate({
9091 identifier: "V2ThreadReadResponse__ThreadSource",
77279092});
77289093
9094export type V2ThreadReadResponse__NonSteerableTurnKind = "review" | "compact";
9095export const V2ThreadReadResponse__NonSteerableTurnKind = Schema.Literals([
9096 "review",
9097 "compact",
9098]).annotate({ identifier: "V2ThreadReadResponse__NonSteerableTurnKind" });
9099
9100export type V2ThreadReadResponse__ByteRange = { readonly end: number; readonly start: number };
9101export const V2ThreadReadResponse__ByteRange = Schema.Struct({
9102 end: Schema.Number.annotate({ format: "uint" })
9103 .check(Schema.isInt().annotate({ expected: "an integer" }))
9104 .check(
9105 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
9106 ),
9107 start: Schema.Number.annotate({ format: "uint" })
9108 .check(Schema.isInt().annotate({ expected: "an integer" }))
9109 .check(
9110 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
9111 ),
9112}).annotate({ identifier: "V2ThreadReadResponse__ByteRange" });
9113
77299114export type V2ThreadReadResponse__ImageDetail = "auto" | "low" | "high" | "original";
77309115export const V2ThreadReadResponse__ImageDetail = Schema.Literals([
77319116 "auto",
77329117 "low",
77339118 "high",
77349119 "original",
7735]);
7736
7737export type V2ThreadReadResponse__LegacyAppPathString = string;
7738export const V2ThreadReadResponse__LegacyAppPathString = Schema.String;
7739
7740export type V2ThreadReadResponse__McpToolCallAppContext = {
7741 readonly actionName?: string | null;
7742 readonly appName?: string | null;
7743 readonly connectorId: string;
7744 readonly linkId?: string | null;
7745 readonly resourceUri?: string | null;
7746};
7747export const V2ThreadReadResponse__McpToolCallAppContext = Schema.Struct({
7748 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7749 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7750 connectorId: Schema.String,
7751 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7752 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7753});
9120]).annotate({ identifier: "V2ThreadReadResponse__ImageDetail" });
77549121
7755export type V2ThreadReadResponse__McpToolCallError = { readonly message: string };
7756export const V2ThreadReadResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
7757
7758export type V2ThreadReadResponse__McpToolCallResult = {
7759 readonly _meta?: unknown;
7760 readonly content: ReadonlyArray<unknown>;
7761 readonly structuredContent?: unknown;
9122export type V2ThreadReadResponse__HookPromptFragment = {
9123 readonly hookRunId: string;
9124 readonly text: string;
77629125};
7763export const V2ThreadReadResponse__McpToolCallResult = Schema.Struct({
7764 _meta: Schema.optionalKey(Schema.Unknown),
7765 content: Schema.Array(Schema.Unknown),
7766 structuredContent: Schema.optionalKey(Schema.Unknown),
7767});
7768
7769export type V2ThreadReadResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
7770export const V2ThreadReadResponse__McpToolCallStatus = Schema.Literals([
7771 "inProgress",
7772 "completed",
7773 "failed",
7774]);
9126export const V2ThreadReadResponse__HookPromptFragment = Schema.Struct({
9127 hookRunId: Schema.String,
9128 text: Schema.String,
9129}).annotate({ identifier: "V2ThreadReadResponse__HookPromptFragment" });
77759130
77769131export type V2ThreadReadResponse__MemoryCitationEntry = {
77779132 readonly lineEnd: number;
......@@ -7781,38 +9136,65 @@ export type V2ThreadReadResponse__MemoryCitationEntry = {
77819136};
77829137export const V2ThreadReadResponse__MemoryCitationEntry = Schema.Struct({
77839138 lineEnd: Schema.Number.annotate({ format: "uint32" })
7784 .check(Schema.isInt())
7785 .check(Schema.isGreaterThanOrEqualTo(0)),
9139 .check(Schema.isInt().annotate({ expected: "an integer" }))
9140 .check(
9141 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
9142 ),
77869143 lineStart: Schema.Number.annotate({ format: "uint32" })
7787 .check(Schema.isInt())
7788 .check(Schema.isGreaterThanOrEqualTo(0)),
9144 .check(Schema.isInt().annotate({ expected: "an integer" }))
9145 .check(
9146 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
9147 ),
77899148 note: Schema.String,
77909149 path: Schema.String,
7791});
9150}).annotate({ identifier: "V2ThreadReadResponse__MemoryCitationEntry" });
77929151
77939152export type V2ThreadReadResponse__MessagePhase = "commentary" | "final_answer";
7794export const V2ThreadReadResponse__MessagePhase = Schema.Literals([
7795 "commentary",
7796 "final_answer",
7797]).annotate({
9153export const V2ThreadReadResponse__MessagePhase = Schema.Union(
9154 [
9155 Schema.Literal("commentary").annotate({
9156 description:
9157 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
9158 }),
9159 Schema.Literal("final_answer").annotate({
9160 description: "The assistant's terminal answer text for the current turn.",
9161 }),
9162 ],
9163 { mode: "oneOf" },
9164).annotate({
77989165 description:
77999166 '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.',
9167 identifier: "V2ThreadReadResponse__MessagePhase",
78009168});
78019169
7802export type V2ThreadReadResponse__NonSteerableTurnKind = "review" | "compact";
7803export const V2ThreadReadResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
9170export type V2ThreadReadResponse__LegacyAppPathString = string;
9171export const V2ThreadReadResponse__LegacyAppPathString = Schema.String.annotate({
9172 identifier: "V2ThreadReadResponse__LegacyAppPathString",
9173});
78049174
7805export type V2ThreadReadResponse__PatchApplyStatus =
9175export type V2ThreadReadResponse__CommandExecutionSource =
9176 | "agent"
9177 | "userShell"
9178 | "unifiedExecStartup"
9179 | "unifiedExecInteraction";
9180export const V2ThreadReadResponse__CommandExecutionSource = Schema.Literals([
9181 "agent",
9182 "userShell",
9183 "unifiedExecStartup",
9184 "unifiedExecInteraction",
9185]).annotate({ identifier: "V2ThreadReadResponse__CommandExecutionSource" });
9186
9187export type V2ThreadReadResponse__CommandExecutionStatus =
78069188 | "inProgress"
78079189 | "completed"
78089190 | "failed"
78099191 | "declined";
7810export const V2ThreadReadResponse__PatchApplyStatus = Schema.Literals([
9192export const V2ThreadReadResponse__CommandExecutionStatus = Schema.Literals([
78119193 "inProgress",
78129194 "completed",
78139195 "failed",
78149196 "declined",
7815]);
9197]).annotate({ identifier: "V2ThreadReadResponse__CommandExecutionStatus" });
78169198
78179199export type V2ThreadReadResponse__PatchChangeKind =
78189200 | { readonly type: "add" }
......@@ -7832,12 +9214,154 @@ export const V2ThreadReadResponse__PatchChangeKind = Schema.Union(
78329214 }).annotate({ title: "UpdatePatchChangeKind" }),
78339215 ],
78349216 { mode: "oneOf" },
7835);
9217).annotate({ identifier: "V2ThreadReadResponse__PatchChangeKind" });
9218
9219export type V2ThreadReadResponse__PatchApplyStatus =
9220 | "inProgress"
9221 | "completed"
9222 | "failed"
9223 | "declined";
9224export const V2ThreadReadResponse__PatchApplyStatus = Schema.Literals([
9225 "inProgress",
9226 "completed",
9227 "failed",
9228 "declined",
9229]).annotate({ identifier: "V2ThreadReadResponse__PatchApplyStatus" });
9230
9231export type V2ThreadReadResponse__McpToolCallAppContext = {
9232 readonly actionName?: string | null;
9233 readonly appName?: string | null;
9234 readonly connectorId: string;
9235 readonly linkId?: string | null;
9236 readonly resourceUri?: string | null;
9237};
9238export const V2ThreadReadResponse__McpToolCallAppContext = Schema.Struct({
9239 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9240 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9241 connectorId: Schema.String,
9242 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9243 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9244}).annotate({ identifier: "V2ThreadReadResponse__McpToolCallAppContext" });
9245
9246export type V2ThreadReadResponse__McpToolCallError = { readonly message: string };
9247export const V2ThreadReadResponse__McpToolCallError = Schema.Struct({
9248 message: Schema.String,
9249}).annotate({ identifier: "V2ThreadReadResponse__McpToolCallError" });
9250
9251export type V2ThreadReadResponse__McpToolCallResult = {
9252 readonly _meta?: Schema.Json;
9253 readonly content: ReadonlyArray<Schema.Json>;
9254 readonly structuredContent?: Schema.Json;
9255};
9256export const V2ThreadReadResponse__McpToolCallResult = Schema.Struct({
9257 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
9258 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
9259 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
9260}).annotate({ identifier: "V2ThreadReadResponse__McpToolCallResult" });
9261
9262export type V2ThreadReadResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
9263export const V2ThreadReadResponse__McpToolCallStatus = Schema.Literals([
9264 "inProgress",
9265 "completed",
9266 "failed",
9267]).annotate({ identifier: "V2ThreadReadResponse__McpToolCallStatus" });
9268
9269export type V2ThreadReadResponse__DynamicToolCallOutputContentItem =
9270 | { readonly text: string; readonly type: "inputText" }
9271 | { readonly imageUrl: string; readonly type: "inputImage" }
9272 | { readonly audioUrl: string; readonly type: "inputAudio" };
9273export const V2ThreadReadResponse__DynamicToolCallOutputContentItem = Schema.Union(
9274 [
9275 Schema.Struct({
9276 text: Schema.String,
9277 type: Schema.Literal("inputText").annotate({
9278 title: "InputTextDynamicToolCallOutputContentItemType",
9279 }),
9280 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
9281 Schema.Struct({
9282 imageUrl: Schema.String,
9283 type: Schema.Literal("inputImage").annotate({
9284 title: "InputImageDynamicToolCallOutputContentItemType",
9285 }),
9286 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
9287 Schema.Struct({
9288 audioUrl: Schema.String,
9289 type: Schema.Literal("inputAudio").annotate({
9290 title: "InputAudioDynamicToolCallOutputContentItemType",
9291 }),
9292 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
9293 ],
9294 { mode: "oneOf" },
9295).annotate({ identifier: "V2ThreadReadResponse__DynamicToolCallOutputContentItem" });
9296
9297export type V2ThreadReadResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
9298export const V2ThreadReadResponse__DynamicToolCallStatus = Schema.Literals([
9299 "inProgress",
9300 "completed",
9301 "failed",
9302]).annotate({ identifier: "V2ThreadReadResponse__DynamicToolCallStatus" });
9303
9304export type V2ThreadReadResponse__CollabAgentStatus =
9305 | "pendingInit"
9306 | "running"
9307 | "interrupted"
9308 | "completed"
9309 | "errored"
9310 | "shutdown"
9311 | "notFound";
9312export const V2ThreadReadResponse__CollabAgentStatus = Schema.Literals([
9313 "pendingInit",
9314 "running",
9315 "interrupted",
9316 "completed",
9317 "errored",
9318 "shutdown",
9319 "notFound",
9320]).annotate({ identifier: "V2ThreadReadResponse__CollabAgentStatus" });
78369321
78379322export type V2ThreadReadResponse__ReasoningEffort = string;
78389323export const V2ThreadReadResponse__ReasoningEffort = Schema.String.annotate({
78399324 description: "A non-empty reasoning effort value advertised by the model.",
7840}).check(Schema.isMinLength(1));
9325}).check(
9326 Schema.isMinLength(1).annotate({
9327 expected: "a value with a length of at least 1",
9328 identifier: "V2ThreadReadResponse__ReasoningEffort",
9329 }),
9330);
9331
9332export type V2ThreadReadResponse__CollabAgentToolCallStatus =
9333 | "inProgress"
9334 | "completed"
9335 | "failed"
9336 | "interrupted";
9337export const V2ThreadReadResponse__CollabAgentToolCallStatus = Schema.Literals([
9338 "inProgress",
9339 "completed",
9340 "failed",
9341 "interrupted",
9342]).annotate({ identifier: "V2ThreadReadResponse__CollabAgentToolCallStatus" });
9343
9344export type V2ThreadReadResponse__CollabAgentTool =
9345 | "spawnAgent"
9346 | "sendInput"
9347 | "resumeAgent"
9348 | "wait"
9349 | "closeAgent"
9350 | "sendMessage"
9351 | "followupTask"
9352 | "interruptAgent"
9353 | "listAgents";
9354export const V2ThreadReadResponse__CollabAgentTool = Schema.Literals([
9355 "spawnAgent",
9356 "sendInput",
9357 "resumeAgent",
9358 "wait",
9359 "closeAgent",
9360 "sendMessage",
9361 "followupTask",
9362 "interruptAgent",
9363 "listAgents",
9364]).annotate({ identifier: "V2ThreadReadResponse__CollabAgentTool" });
78419365
78429366export type V2ThreadReadResponse__SubAgentActivityKind =
78439367 | "started"
......@@ -7849,56 +9373,7 @@ export const V2ThreadReadResponse__SubAgentActivityKind = Schema.Literals([
78499373 "interacted",
78509374 "interrupted",
78519375 "completed",
7852]);
7853
7854export type V2ThreadReadResponse__TextElement = {
7855 readonly byteRange: { readonly end: number; readonly start: number };
7856 readonly placeholder?: string | null;
7857};
7858export const V2ThreadReadResponse__TextElement = Schema.Struct({
7859 byteRange: Schema.Struct({
7860 end: Schema.Number.annotate({ format: "uint" })
7861 .check(Schema.isInt())
7862 .check(Schema.isGreaterThanOrEqualTo(0)),
7863 start: Schema.Number.annotate({ format: "uint" })
7864 .check(Schema.isInt())
7865 .check(Schema.isGreaterThanOrEqualTo(0)),
7866 }).annotate({
7867 description: "Byte range in the parent `text` buffer that this element occupies.",
7868 }),
7869 placeholder: Schema.optionalKey(
7870 Schema.Union([
7871 Schema.String.annotate({
7872 description: "Optional human-readable placeholder for the element, displayed in the UI.",
7873 }),
7874 Schema.Null,
7875 ]),
7876 ),
7877});
7878
7879export type V2ThreadReadResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
7880export const V2ThreadReadResponse__ThreadActiveFlag = Schema.Literals([
7881 "waitingOnApproval",
7882 "waitingOnUserInput",
7883]);
7884
7885export type V2ThreadReadResponse__ThreadId = string;
7886export const V2ThreadReadResponse__ThreadId = Schema.String;
7887
7888export type V2ThreadReadResponse__ThreadSource = string;
7889export const V2ThreadReadResponse__ThreadSource = Schema.String;
7890
7891export type V2ThreadReadResponse__TurnStatus =
7892 | "completed"
7893 | "interrupted"
7894 | "failed"
7895 | "inProgress";
7896export const V2ThreadReadResponse__TurnStatus = Schema.Literals([
7897 "completed",
7898 "interrupted",
7899 "failed",
7900 "inProgress",
7901]);
9376]).annotate({ identifier: "V2ThreadReadResponse__SubAgentActivityKind" });
79029377
79039378export type V2ThreadReadResponse__WebSearchAction =
79049379 | {
......@@ -7930,7 +9405,36 @@ export const V2ThreadReadResponse__WebSearchAction = Schema.Union(
79309405 }).annotate({ title: "OtherWebSearchAction" }),
79319406 ],
79329407 { mode: "oneOf" },
7933);
9408).annotate({ identifier: "V2ThreadReadResponse__WebSearchAction" });
9409
9410export type V2ThreadReadResponse__TurnItemsView = "notLoaded" | "summary" | "full";
9411export const V2ThreadReadResponse__TurnItemsView = Schema.Union(
9412 [
9413 Schema.Literal("notLoaded").annotate({
9414 description: "`items` was not loaded for this turn. The field is intentionally empty.",
9415 }),
9416 Schema.Literal("summary").annotate({
9417 description: "`items` contains only a display summary for this turn.",
9418 }),
9419 Schema.Literal("full").annotate({
9420 description:
9421 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
9422 }),
9423 ],
9424 { mode: "oneOf" },
9425).annotate({ identifier: "V2ThreadReadResponse__TurnItemsView" });
9426
9427export type V2ThreadReadResponse__TurnStatus =
9428 | "completed"
9429 | "interrupted"
9430 | "failed"
9431 | "inProgress";
9432export const V2ThreadReadResponse__TurnStatus = Schema.Literals([
9433 "completed",
9434 "interrupted",
9435 "failed",
9436 "inProgress",
9437]).annotate({ identifier: "V2ThreadReadResponse__TurnStatus" });
79349438
79359439export type V2ThreadRealtimeOutputAudioDeltaNotification__ThreadRealtimeAudioChunk = {
79369440 readonly data: string;
......@@ -7944,59 +9448,43 @@ export const V2ThreadRealtimeOutputAudioDeltaNotification__ThreadRealtimeAudioCh
79449448 data: Schema.String,
79459449 itemId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
79469450 numChannels: Schema.Number.annotate({ format: "uint16" })
7947 .check(Schema.isInt())
7948 .check(Schema.isGreaterThanOrEqualTo(0)),
9451 .check(Schema.isInt().annotate({ expected: "an integer" }))
9452 .check(
9453 Schema.isGreaterThanOrEqualTo(0).annotate({
9454 expected: "a value greater than or equal to 0",
9455 }),
9456 ),
79499457 sampleRate: Schema.Number.annotate({ format: "uint32" })
7950 .check(Schema.isInt())
7951 .check(Schema.isGreaterThanOrEqualTo(0)),
9458 .check(Schema.isInt().annotate({ expected: "an integer" }))
9459 .check(
9460 Schema.isGreaterThanOrEqualTo(0).annotate({
9461 expected: "a value greater than or equal to 0",
9462 }),
9463 ),
79529464 samplesPerChannel: Schema.optionalKey(
79539465 Schema.Union([
79549466 Schema.Number.annotate({ format: "uint32" })
7955 .check(Schema.isInt())
7956 .check(Schema.isGreaterThanOrEqualTo(0)),
9467 .check(Schema.isInt().annotate({ expected: "an integer" }))
9468 .check(
9469 Schema.isGreaterThanOrEqualTo(0).annotate({
9470 expected: "a value greater than or equal to 0",
9471 }),
9472 ),
79579473 Schema.Null,
79589474 ]),
79599475 ),
79609476 },
7961).annotate({ description: "EXPERIMENTAL - thread realtime audio chunk." });
9477).annotate({
9478 description: "EXPERIMENTAL - thread realtime audio chunk.",
9479 identifier: "V2ThreadRealtimeOutputAudioDeltaNotification__ThreadRealtimeAudioChunk",
9480});
79629481
79639482export type V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = "v1" | "v2" | "v3";
79649483export const V2ThreadRealtimeStartedNotification__RealtimeConversationVersion = Schema.Literals([
79659484 "v1",
79669485 "v2",
79679486 "v3",
7968]);
7969
7970export type V2ThreadResumeParams__AgentMessageInputContent =
7971 | { readonly text: string; readonly type: "input_text" }
7972 | { readonly encrypted_content: string; readonly type: "encrypted_content" };
7973export const V2ThreadResumeParams__AgentMessageInputContent = Schema.Union(
7974 [
7975 Schema.Struct({
7976 text: Schema.String,
7977 type: Schema.Literal("input_text").annotate({
7978 title: "InputTextAgentMessageInputContentType",
7979 }),
7980 }).annotate({ title: "InputTextAgentMessageInputContent" }),
7981 Schema.Struct({
7982 encrypted_content: Schema.String,
7983 type: Schema.Literal("encrypted_content").annotate({
7984 title: "EncryptedContentAgentMessageInputContentType",
7985 }),
7986 }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
7987 ],
7988 { mode: "oneOf" },
7989);
7990
7991export type V2ThreadResumeParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
7992export const V2ThreadResumeParams__ApprovalsReviewer = Schema.Literals([
7993 "user",
7994 "auto_review",
7995 "guardian_subagent",
7996]).annotate({
7997 description:
7998 "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.",
7999});
9487]).annotate({ identifier: "V2ThreadRealtimeStartedNotification__RealtimeConversationVersion" });
80009488
80019489export type V2ThreadResumeParams__AskForApproval =
80029490 | "untrusted"
......@@ -8025,7 +9513,35 @@ export const V2ThreadResumeParams__AskForApproval = Schema.Union(
80259513 }).annotate({ title: "GranularAskForApproval" }),
80269514 ],
80279515 { mode: "oneOf" },
8028);
9516).annotate({ identifier: "V2ThreadResumeParams__AskForApproval" });
9517
9518export type V2ThreadResumeParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
9519export const V2ThreadResumeParams__ApprovalsReviewer = Schema.Literals([
9520 "user",
9521 "auto_review",
9522 "guardian_subagent",
9523]).annotate({
9524 description:
9525 "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.",
9526 identifier: "V2ThreadResumeParams__ApprovalsReviewer",
9527});
9528
9529export type V2ThreadResumeParams__Personality = "none" | "friendly" | "pragmatic";
9530export const V2ThreadResumeParams__Personality = Schema.Literals([
9531 "none",
9532 "friendly",
9533 "pragmatic",
9534]).annotate({ identifier: "V2ThreadResumeParams__Personality" });
9535
9536export type V2ThreadResumeParams__SandboxMode =
9537 | "read-only"
9538 | "workspace-write"
9539 | "danger-full-access";
9540export const V2ThreadResumeParams__SandboxMode = Schema.Literals([
9541 "read-only",
9542 "workspace-write",
9543 "danger-full-access",
9544]).annotate({ identifier: "V2ThreadResumeParams__SandboxMode" });
80299545
80309546export type V2ThreadResumeParams__ImageDetail = "auto" | "low" | "high" | "original";
80319547export const V2ThreadResumeParams__ImageDetail = Schema.Literals([
......@@ -8033,7 +9549,7 @@ export const V2ThreadResumeParams__ImageDetail = Schema.Literals([
80339549 "low",
80349550 "high",
80359551 "original",
8036]);
9552]).annotate({ identifier: "V2ThreadResumeParams__ImageDetail" });
80379553
80389554export type V2ThreadResumeParams__InternalChatMessageMetadataPassthrough = {
80399555 readonly turn_id?: string | null;
......@@ -8043,57 +9559,47 @@ export const V2ThreadResumeParams__InternalChatMessageMetadataPassthrough = Sche
80439559}).annotate({
80449560 description:
80459561 "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.",
9562 identifier: "V2ThreadResumeParams__InternalChatMessageMetadataPassthrough",
80469563});
80479564
8048export type V2ThreadResumeParams__LocalShellAction = {
8049 readonly command: ReadonlyArray<string>;
8050 readonly env?: { readonly [x: string]: string } | null;
8051 readonly timeout_ms?: number | null;
8052 readonly type: "exec";
8053 readonly user?: string | null;
8054 readonly working_directory?: string | null;
8055};
8056export const V2ThreadResumeParams__LocalShellAction = Schema.Union(
9565export type V2ThreadResumeParams__MessagePhase = "commentary" | "final_answer";
9566export const V2ThreadResumeParams__MessagePhase = Schema.Union(
80579567 [
8058 Schema.Struct({
8059 command: Schema.Array(Schema.String),
8060 env: Schema.optionalKey(
8061 Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
8062 ),
8063 timeout_ms: Schema.optionalKey(
8064 Schema.Union([
8065 Schema.Number.annotate({ format: "uint64" })
8066 .check(Schema.isInt())
8067 .check(Schema.isGreaterThanOrEqualTo(0)),
8068 Schema.Null,
8069 ]),
8070 ),
8071 type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
8072 user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8073 working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8074 }).annotate({ title: "ExecLocalShellAction" }),
9568 Schema.Literal("commentary").annotate({
9569 description:
9570 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
9571 }),
9572 Schema.Literal("final_answer").annotate({
9573 description: "The assistant's terminal answer text for the current turn.",
9574 }),
80759575 ],
80769576 { mode: "oneOf" },
8077);
8078
8079export type V2ThreadResumeParams__LocalShellStatus = "completed" | "in_progress" | "incomplete";
8080export const V2ThreadResumeParams__LocalShellStatus = Schema.Literals([
8081 "completed",
8082 "in_progress",
8083 "incomplete",
8084]);
8085
8086export type V2ThreadResumeParams__MessagePhase = "commentary" | "final_answer";
8087export const V2ThreadResumeParams__MessagePhase = Schema.Literals([
8088 "commentary",
8089 "final_answer",
8090]).annotate({
9577).annotate({
80919578 description:
80929579 '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.',
9580 identifier: "V2ThreadResumeParams__MessagePhase",
80939581});
80949582
8095export type V2ThreadResumeParams__Personality = "none" | "friendly" | "pragmatic";
8096export const V2ThreadResumeParams__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
9583export type V2ThreadResumeParams__AgentMessageInputContent =
9584 | { readonly text: string; readonly type: "input_text" }
9585 | { readonly encrypted_content: string; readonly type: "encrypted_content" };
9586export const V2ThreadResumeParams__AgentMessageInputContent = Schema.Union(
9587 [
9588 Schema.Struct({
9589 text: Schema.String,
9590 type: Schema.Literal("input_text").annotate({
9591 title: "InputTextAgentMessageInputContentType",
9592 }),
9593 }).annotate({ title: "InputTextAgentMessageInputContent" }),
9594 Schema.Struct({
9595 encrypted_content: Schema.String,
9596 type: Schema.Literal("encrypted_content").annotate({
9597 title: "EncryptedContentAgentMessageInputContentType",
9598 }),
9599 }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
9600 ],
9601 { mode: "oneOf" },
9602).annotate({ identifier: "V2ThreadResumeParams__AgentMessageInputContent" });
80979603
80989604export type V2ThreadResumeParams__ReasoningItemContent =
80999605 | { readonly text: string; readonly type: "reasoning_text" }
......@@ -8112,7 +9618,7 @@ export const V2ThreadResumeParams__ReasoningItemContent = Schema.Union(
81129618 }).annotate({ title: "TextReasoningItemContent" }),
81139619 ],
81149620 { mode: "oneOf" },
8115);
9621).annotate({ identifier: "V2ThreadResumeParams__ReasoningItemContent" });
81169622
81179623export type V2ThreadResumeParams__ReasoningItemReasoningSummary = {
81189624 readonly text: string;
......@@ -8128,7 +9634,49 @@ export const V2ThreadResumeParams__ReasoningItemReasoningSummary = Schema.Union(
81289634 }).annotate({ title: "SummaryTextReasoningItemReasoningSummary" }),
81299635 ],
81309636 { mode: "oneOf" },
8131);
9637).annotate({ identifier: "V2ThreadResumeParams__ReasoningItemReasoningSummary" });
9638
9639export type V2ThreadResumeParams__LocalShellAction = {
9640 readonly command: ReadonlyArray<string>;
9641 readonly env?: { readonly [x: string]: string } | null;
9642 readonly timeout_ms?: number | null;
9643 readonly type: "exec";
9644 readonly user?: string | null;
9645 readonly working_directory?: string | null;
9646};
9647export const V2ThreadResumeParams__LocalShellAction = Schema.Union(
9648 [
9649 Schema.Struct({
9650 command: Schema.Array(Schema.String),
9651 env: Schema.optionalKey(
9652 Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
9653 ),
9654 timeout_ms: Schema.optionalKey(
9655 Schema.Union([
9656 Schema.Number.annotate({ format: "uint64" })
9657 .check(Schema.isInt().annotate({ expected: "an integer" }))
9658 .check(
9659 Schema.isGreaterThanOrEqualTo(0).annotate({
9660 expected: "a value greater than or equal to 0",
9661 }),
9662 ),
9663 Schema.Null,
9664 ]),
9665 ),
9666 type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
9667 user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9668 working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9669 }).annotate({ title: "ExecLocalShellAction" }),
9670 ],
9671 { mode: "oneOf" },
9672).annotate({ identifier: "V2ThreadResumeParams__LocalShellAction" });
9673
9674export type V2ThreadResumeParams__LocalShellStatus = "completed" | "in_progress" | "incomplete";
9675export const V2ThreadResumeParams__LocalShellStatus = Schema.Literals([
9676 "completed",
9677 "in_progress",
9678 "incomplete",
9679]).annotate({ identifier: "V2ThreadResumeParams__LocalShellStatus" });
81329680
81339681export type V2ThreadResumeParams__ResponsesApiWebSearchAction =
81349682 | {
......@@ -8168,37 +9716,30 @@ export const V2ThreadResumeParams__ResponsesApiWebSearchAction = Schema.Union(
81689716 }).annotate({ title: "OtherResponsesApiWebSearchAction" }),
81699717 ],
81709718 { mode: "oneOf" },
8171);
8172
8173export type V2ThreadResumeParams__SandboxMode =
8174 | "read-only"
8175 | "workspace-write"
8176 | "danger-full-access";
8177export const V2ThreadResumeParams__SandboxMode = Schema.Literals([
8178 "read-only",
8179 "workspace-write",
8180 "danger-full-access",
8181]);
8182
8183export type V2ThreadResumeParams__SortDirection = "asc" | "desc";
8184export const V2ThreadResumeParams__SortDirection = Schema.Literals(["asc", "desc"]);
9719).annotate({ identifier: "V2ThreadResumeParams__ResponsesApiWebSearchAction" });
81859720
81869721export type V2ThreadResumeParams__TurnItemsView = "notLoaded" | "summary" | "full";
8187export const V2ThreadResumeParams__TurnItemsView = Schema.Literals([
8188 "notLoaded",
8189 "summary",
8190 "full",
8191]);
9722export const V2ThreadResumeParams__TurnItemsView = Schema.Union(
9723 [
9724 Schema.Literal("notLoaded").annotate({
9725 description: "`items` was not loaded for this turn. The field is intentionally empty.",
9726 }),
9727 Schema.Literal("summary").annotate({
9728 description: "`items` contains only a display summary for this turn.",
9729 }),
9730 Schema.Literal("full").annotate({
9731 description:
9732 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
9733 }),
9734 ],
9735 { mode: "oneOf" },
9736).annotate({ identifier: "V2ThreadResumeParams__TurnItemsView" });
81929737
8193export type V2ThreadResumeResponse__AbsolutePathBuf = string;
8194export const V2ThreadResumeResponse__AbsolutePathBuf = Schema.String.annotate({
8195 description:
8196 "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.",
9738export type V2ThreadResumeParams__SortDirection = "asc" | "desc";
9739export const V2ThreadResumeParams__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
9740 identifier: "V2ThreadResumeParams__SortDirection",
81979741});
81989742
8199export type V2ThreadResumeResponse__AgentPath = string;
8200export const V2ThreadResumeResponse__AgentPath = Schema.String;
8201
82029743export type V2ThreadResumeResponse__AskForApproval =
82039744 | "untrusted"
82049745 | "on-request"
......@@ -8226,72 +9767,49 @@ export const V2ThreadResumeResponse__AskForApproval = Schema.Union(
82269767 }).annotate({ title: "GranularAskForApproval" }),
82279768 ],
82289769 { mode: "oneOf" },
8229);
9770).annotate({ identifier: "V2ThreadResumeResponse__AskForApproval" });
82309771
8231export type V2ThreadResumeResponse__CollabAgentStatus =
8232 | "pendingInit"
8233 | "running"
8234 | "interrupted"
8235 | "completed"
8236 | "errored"
8237 | "shutdown"
8238 | "notFound";
8239export const V2ThreadResumeResponse__CollabAgentStatus = Schema.Literals([
8240 "pendingInit",
8241 "running",
8242 "interrupted",
8243 "completed",
8244 "errored",
8245 "shutdown",
8246 "notFound",
8247]);
9772export type V2ThreadResumeResponse__ApprovalsReviewer =
9773 | "user"
9774 | "auto_review"
9775 | "guardian_subagent";
9776export const V2ThreadResumeResponse__ApprovalsReviewer = Schema.Literals([
9777 "user",
9778 "auto_review",
9779 "guardian_subagent",
9780]).annotate({
9781 description:
9782 "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.",
9783 identifier: "V2ThreadResumeResponse__ApprovalsReviewer",
9784});
82489785
8249export type V2ThreadResumeResponse__CommandExecutionStatus =
8250 | "inProgress"
8251 | "completed"
8252 | "failed"
8253 | "declined";
8254export const V2ThreadResumeResponse__CommandExecutionStatus = Schema.Literals([
8255 "inProgress",
8256 "completed",
8257 "failed",
8258 "declined",
8259]);
9786export type V2ThreadResumeResponse__AbsolutePathBuf = string;
9787export const V2ThreadResumeResponse__AbsolutePathBuf = Schema.String.annotate({
9788 description:
9789 "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.",
9790 identifier: "V2ThreadResumeResponse__AbsolutePathBuf",
9791});
82609792
8261export type V2ThreadResumeResponse__DynamicToolCallOutputContentItem =
8262 | { readonly text: string; readonly type: "inputText" }
8263 | { readonly imageUrl: string; readonly type: "inputImage" }
8264 | { readonly audioUrl: string; readonly type: "inputAudio" };
8265export const V2ThreadResumeResponse__DynamicToolCallOutputContentItem = Schema.Union(
8266 [
8267 Schema.Struct({
8268 text: Schema.String,
8269 type: Schema.Literal("inputText").annotate({
8270 title: "InputTextDynamicToolCallOutputContentItemType",
8271 }),
8272 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
8273 Schema.Struct({
8274 imageUrl: Schema.String,
8275 type: Schema.Literal("inputImage").annotate({
8276 title: "InputImageDynamicToolCallOutputContentItemType",
8277 }),
8278 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
8279 Schema.Struct({
8280 audioUrl: Schema.String,
8281 type: Schema.Literal("inputAudio").annotate({
8282 title: "InputAudioDynamicToolCallOutputContentItemType",
8283 }),
8284 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
8285 ],
8286 { mode: "oneOf" },
9793export type V2ThreadResumeResponse__LegacyAppPathString = string;
9794export const V2ThreadResumeResponse__LegacyAppPathString = Schema.String.annotate({
9795 identifier: "V2ThreadResumeResponse__LegacyAppPathString",
9796});
9797
9798export type V2ThreadResumeResponse__ReasoningEffort = string;
9799export const V2ThreadResumeResponse__ReasoningEffort = Schema.String.annotate({
9800 description: "A non-empty reasoning effort value advertised by the model.",
9801}).check(
9802 Schema.isMinLength(1).annotate({
9803 expected: "a value with a length of at least 1",
9804 identifier: "V2ThreadResumeResponse__ReasoningEffort",
9805 }),
82879806);
82889807
8289export type V2ThreadResumeResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
8290export const V2ThreadResumeResponse__DynamicToolCallStatus = Schema.Literals([
8291 "inProgress",
8292 "completed",
8293 "failed",
8294]);
9808export type V2ThreadResumeResponse__NetworkAccess = "restricted" | "enabled";
9809export const V2ThreadResumeResponse__NetworkAccess = Schema.Literals([
9810 "restricted",
9811 "enabled",
9812]).annotate({ identifier: "V2ThreadResumeResponse__NetworkAccess" });
82959813
82969814export type V2ThreadResumeResponse__GitInfo = {
82979815 readonly branch?: string | null;
......@@ -8302,63 +9820,65 @@ export const V2ThreadResumeResponse__GitInfo = Schema.Struct({
83029820 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
83039821 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
83049822 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9823}).annotate({ identifier: "V2ThreadResumeResponse__GitInfo" });
9824
9825export type V2ThreadResumeResponse__AgentPath = string;
9826export const V2ThreadResumeResponse__AgentPath = Schema.String.annotate({
9827 identifier: "V2ThreadResumeResponse__AgentPath",
83059828});
83069829
8307export type V2ThreadResumeResponse__HookPromptFragment = {
8308 readonly hookRunId: string;
8309 readonly text: string;
8310};
8311export const V2ThreadResumeResponse__HookPromptFragment = Schema.Struct({
8312 hookRunId: Schema.String,
8313 text: Schema.String,
9830export type V2ThreadResumeResponse__ThreadId = string;
9831export const V2ThreadResumeResponse__ThreadId = Schema.String.annotate({
9832 identifier: "V2ThreadResumeResponse__ThreadId",
9833});
9834
9835export type V2ThreadResumeResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
9836export const V2ThreadResumeResponse__ThreadActiveFlag = Schema.Literals([
9837 "waitingOnApproval",
9838 "waitingOnUserInput",
9839]).annotate({ identifier: "V2ThreadResumeResponse__ThreadActiveFlag" });
9840
9841export type V2ThreadResumeResponse__ThreadSource = string;
9842export const V2ThreadResumeResponse__ThreadSource = Schema.String.annotate({
9843 identifier: "V2ThreadResumeResponse__ThreadSource",
83149844});
83159845
9846export type V2ThreadResumeResponse__NonSteerableTurnKind = "review" | "compact";
9847export const V2ThreadResumeResponse__NonSteerableTurnKind = Schema.Literals([
9848 "review",
9849 "compact",
9850]).annotate({ identifier: "V2ThreadResumeResponse__NonSteerableTurnKind" });
9851
9852export type V2ThreadResumeResponse__ByteRange = { readonly end: number; readonly start: number };
9853export const V2ThreadResumeResponse__ByteRange = Schema.Struct({
9854 end: Schema.Number.annotate({ format: "uint" })
9855 .check(Schema.isInt().annotate({ expected: "an integer" }))
9856 .check(
9857 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
9858 ),
9859 start: Schema.Number.annotate({ format: "uint" })
9860 .check(Schema.isInt().annotate({ expected: "an integer" }))
9861 .check(
9862 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
9863 ),
9864}).annotate({ identifier: "V2ThreadResumeResponse__ByteRange" });
9865
83169866export type V2ThreadResumeResponse__ImageDetail = "auto" | "low" | "high" | "original";
83179867export const V2ThreadResumeResponse__ImageDetail = Schema.Literals([
83189868 "auto",
83199869 "low",
83209870 "high",
83219871 "original",
8322]);
8323
8324export type V2ThreadResumeResponse__LegacyAppPathString = string;
8325export const V2ThreadResumeResponse__LegacyAppPathString = Schema.String;
8326
8327export type V2ThreadResumeResponse__McpToolCallAppContext = {
8328 readonly actionName?: string | null;
8329 readonly appName?: string | null;
8330 readonly connectorId: string;
8331 readonly linkId?: string | null;
8332 readonly resourceUri?: string | null;
8333};
8334export const V2ThreadResumeResponse__McpToolCallAppContext = Schema.Struct({
8335 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8336 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8337 connectorId: Schema.String,
8338 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8339 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8340});
9872]).annotate({ identifier: "V2ThreadResumeResponse__ImageDetail" });
83419873
8342export type V2ThreadResumeResponse__McpToolCallError = { readonly message: string };
8343export const V2ThreadResumeResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
8344
8345export type V2ThreadResumeResponse__McpToolCallResult = {
8346 readonly _meta?: unknown;
8347 readonly content: ReadonlyArray<unknown>;
8348 readonly structuredContent?: unknown;
9874export type V2ThreadResumeResponse__HookPromptFragment = {
9875 readonly hookRunId: string;
9876 readonly text: string;
83499877};
8350export const V2ThreadResumeResponse__McpToolCallResult = Schema.Struct({
8351 _meta: Schema.optionalKey(Schema.Unknown),
8352 content: Schema.Array(Schema.Unknown),
8353 structuredContent: Schema.optionalKey(Schema.Unknown),
8354});
8355
8356export type V2ThreadResumeResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
8357export const V2ThreadResumeResponse__McpToolCallStatus = Schema.Literals([
8358 "inProgress",
8359 "completed",
8360 "failed",
8361]);
9878export const V2ThreadResumeResponse__HookPromptFragment = Schema.Struct({
9879 hookRunId: Schema.String,
9880 text: Schema.String,
9881}).annotate({ identifier: "V2ThreadResumeResponse__HookPromptFragment" });
83629882
83639883export type V2ThreadResumeResponse__MemoryCitationEntry = {
83649884 readonly lineEnd: number;
......@@ -8368,38 +9888,60 @@ export type V2ThreadResumeResponse__MemoryCitationEntry = {
83689888};
83699889export const V2ThreadResumeResponse__MemoryCitationEntry = Schema.Struct({
83709890 lineEnd: Schema.Number.annotate({ format: "uint32" })
8371 .check(Schema.isInt())
8372 .check(Schema.isGreaterThanOrEqualTo(0)),
9891 .check(Schema.isInt().annotate({ expected: "an integer" }))
9892 .check(
9893 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
9894 ),
83739895 lineStart: Schema.Number.annotate({ format: "uint32" })
8374 .check(Schema.isInt())
8375 .check(Schema.isGreaterThanOrEqualTo(0)),
9896 .check(Schema.isInt().annotate({ expected: "an integer" }))
9897 .check(
9898 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
9899 ),
83769900 note: Schema.String,
83779901 path: Schema.String,
8378});
9902}).annotate({ identifier: "V2ThreadResumeResponse__MemoryCitationEntry" });
83799903
83809904export type V2ThreadResumeResponse__MessagePhase = "commentary" | "final_answer";
8381export const V2ThreadResumeResponse__MessagePhase = Schema.Literals([
8382 "commentary",
8383 "final_answer",
8384]).annotate({
9905export const V2ThreadResumeResponse__MessagePhase = Schema.Union(
9906 [
9907 Schema.Literal("commentary").annotate({
9908 description:
9909 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
9910 }),
9911 Schema.Literal("final_answer").annotate({
9912 description: "The assistant's terminal answer text for the current turn.",
9913 }),
9914 ],
9915 { mode: "oneOf" },
9916).annotate({
83859917 description:
83869918 '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.',
9919 identifier: "V2ThreadResumeResponse__MessagePhase",
83879920});
83889921
8389export type V2ThreadResumeResponse__NonSteerableTurnKind = "review" | "compact";
8390export const V2ThreadResumeResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
9922export type V2ThreadResumeResponse__CommandExecutionSource =
9923 | "agent"
9924 | "userShell"
9925 | "unifiedExecStartup"
9926 | "unifiedExecInteraction";
9927export const V2ThreadResumeResponse__CommandExecutionSource = Schema.Literals([
9928 "agent",
9929 "userShell",
9930 "unifiedExecStartup",
9931 "unifiedExecInteraction",
9932]).annotate({ identifier: "V2ThreadResumeResponse__CommandExecutionSource" });
83919933
8392export type V2ThreadResumeResponse__PatchApplyStatus =
9934export type V2ThreadResumeResponse__CommandExecutionStatus =
83939935 | "inProgress"
83949936 | "completed"
83959937 | "failed"
83969938 | "declined";
8397export const V2ThreadResumeResponse__PatchApplyStatus = Schema.Literals([
9939export const V2ThreadResumeResponse__CommandExecutionStatus = Schema.Literals([
83989940 "inProgress",
83999941 "completed",
84009942 "failed",
84019943 "declined",
8402]);
9944]).annotate({ identifier: "V2ThreadResumeResponse__CommandExecutionStatus" });
84039945
84049946export type V2ThreadResumeResponse__PatchChangeKind =
84059947 | { readonly type: "add" }
......@@ -8419,116 +9961,94 @@ export const V2ThreadResumeResponse__PatchChangeKind = Schema.Union(
84199961 }).annotate({ title: "UpdatePatchChangeKind" }),
84209962 ],
84219963 { mode: "oneOf" },
8422);
8423
8424export type V2ThreadResumeResponse__ReasoningEffort = string;
8425export const V2ThreadResumeResponse__ReasoningEffort = Schema.String.annotate({
8426 description: "A non-empty reasoning effort value advertised by the model.",
8427}).check(Schema.isMinLength(1));
9964).annotate({ identifier: "V2ThreadResumeResponse__PatchChangeKind" });
84289965
8429export type V2ThreadResumeResponse__SubAgentActivityKind =
8430 | "started"
8431 | "interacted"
8432 | "interrupted"
8433 | "completed";
8434export const V2ThreadResumeResponse__SubAgentActivityKind = Schema.Literals([
8435 "started",
8436 "interacted",
8437 "interrupted",
9966export type V2ThreadResumeResponse__PatchApplyStatus =
9967 | "inProgress"
9968 | "completed"
9969 | "failed"
9970 | "declined";
9971export const V2ThreadResumeResponse__PatchApplyStatus = Schema.Literals([
9972 "inProgress",
84389973 "completed",
8439]);
9974 "failed",
9975 "declined",
9976]).annotate({ identifier: "V2ThreadResumeResponse__PatchApplyStatus" });
84409977
8441export type V2ThreadResumeResponse__TextElement = {
8442 readonly byteRange: { readonly end: number; readonly start: number };
8443 readonly placeholder?: string | null;
9978export type V2ThreadResumeResponse__McpToolCallAppContext = {
9979 readonly actionName?: string | null;
9980 readonly appName?: string | null;
9981 readonly connectorId: string;
9982 readonly linkId?: string | null;
9983 readonly resourceUri?: string | null;
84449984};
8445export const V2ThreadResumeResponse__TextElement = Schema.Struct({
8446 byteRange: Schema.Struct({
8447 end: Schema.Number.annotate({ format: "uint" })
8448 .check(Schema.isInt())
8449 .check(Schema.isGreaterThanOrEqualTo(0)),
8450 start: Schema.Number.annotate({ format: "uint" })
8451 .check(Schema.isInt())
8452 .check(Schema.isGreaterThanOrEqualTo(0)),
8453 }).annotate({
8454 description: "Byte range in the parent `text` buffer that this element occupies.",
8455 }),
8456 placeholder: Schema.optionalKey(
8457 Schema.Union([
8458 Schema.String.annotate({
8459 description: "Optional human-readable placeholder for the element, displayed in the UI.",
8460 }),
8461 Schema.Null,
8462 ]),
8463 ),
8464});
8465
8466export type V2ThreadResumeResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
8467export const V2ThreadResumeResponse__ThreadActiveFlag = Schema.Literals([
8468 "waitingOnApproval",
8469 "waitingOnUserInput",
8470]);
9985export const V2ThreadResumeResponse__McpToolCallAppContext = Schema.Struct({
9986 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9987 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9988 connectorId: Schema.String,
9989 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9990 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9991}).annotate({ identifier: "V2ThreadResumeResponse__McpToolCallAppContext" });
84719992
8472export type V2ThreadResumeResponse__ThreadId = string;
8473export const V2ThreadResumeResponse__ThreadId = Schema.String;
9993export type V2ThreadResumeResponse__McpToolCallError = { readonly message: string };
9994export const V2ThreadResumeResponse__McpToolCallError = Schema.Struct({
9995 message: Schema.String,
9996}).annotate({ identifier: "V2ThreadResumeResponse__McpToolCallError" });
84749997
8475export type V2ThreadResumeResponse__ThreadSource = string;
8476export const V2ThreadResumeResponse__ThreadSource = Schema.String;
9998export type V2ThreadResumeResponse__McpToolCallResult = {
9999 readonly _meta?: Schema.Json;
10000 readonly content: ReadonlyArray<Schema.Json>;
10001 readonly structuredContent?: Schema.Json;
10002};
10003export const V2ThreadResumeResponse__McpToolCallResult = Schema.Struct({
10004 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
10005 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
10006 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
10007}).annotate({ identifier: "V2ThreadResumeResponse__McpToolCallResult" });
847710008
8478export type V2ThreadResumeResponse__TurnStatus =
8479 | "completed"
8480 | "interrupted"
8481 | "failed"
8482 | "inProgress";
8483export const V2ThreadResumeResponse__TurnStatus = Schema.Literals([
10009export type V2ThreadResumeResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
10010export const V2ThreadResumeResponse__McpToolCallStatus = Schema.Literals([
10011 "inProgress",
848410012 "completed",
8485 "interrupted",
848610013 "failed",
8487 "inProgress",
8488]);
10014]).annotate({ identifier: "V2ThreadResumeResponse__McpToolCallStatus" });
848910015
8490export type V2ThreadResumeResponse__WebSearchAction =
8491 | {
8492 readonly queries?: ReadonlyArray<string> | null;
8493 readonly query?: string | null;
8494 readonly type: "search";
8495 }
8496 | { readonly type: "openPage"; readonly url?: string | null }
8497 | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
8498 | { readonly type: "other" };
8499export const V2ThreadResumeResponse__WebSearchAction = Schema.Union(
10016export type V2ThreadResumeResponse__DynamicToolCallOutputContentItem =
10017 | { readonly text: string; readonly type: "inputText" }
10018 | { readonly imageUrl: string; readonly type: "inputImage" }
10019 | { readonly audioUrl: string; readonly type: "inputAudio" };
10020export const V2ThreadResumeResponse__DynamicToolCallOutputContentItem = Schema.Union(
850010021 [
850110022 Schema.Struct({
8502 queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
8503 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8504 type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
8505 }).annotate({ title: "SearchWebSearchAction" }),
8506 Schema.Struct({
8507 type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
8508 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8509 }).annotate({ title: "OpenPageWebSearchAction" }),
10023 text: Schema.String,
10024 type: Schema.Literal("inputText").annotate({
10025 title: "InputTextDynamicToolCallOutputContentItemType",
10026 }),
10027 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
851010028 Schema.Struct({
8511 pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8512 type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
8513 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8514 }).annotate({ title: "FindInPageWebSearchAction" }),
10029 imageUrl: Schema.String,
10030 type: Schema.Literal("inputImage").annotate({
10031 title: "InputImageDynamicToolCallOutputContentItemType",
10032 }),
10033 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
851510034 Schema.Struct({
8516 type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
8517 }).annotate({ title: "OtherWebSearchAction" }),
10035 audioUrl: Schema.String,
10036 type: Schema.Literal("inputAudio").annotate({
10037 title: "InputAudioDynamicToolCallOutputContentItemType",
10038 }),
10039 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
851810040 ],
851910041 { mode: "oneOf" },
8520);
8521
8522export type V2ThreadRollbackResponse__AbsolutePathBuf = string;
8523export const V2ThreadRollbackResponse__AbsolutePathBuf = Schema.String.annotate({
8524 description:
8525 "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.",
8526});
10042).annotate({ identifier: "V2ThreadResumeResponse__DynamicToolCallOutputContentItem" });
852710043
8528export type V2ThreadRollbackResponse__AgentPath = string;
8529export const V2ThreadRollbackResponse__AgentPath = Schema.String;
10044export type V2ThreadResumeResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
10045export const V2ThreadResumeResponse__DynamicToolCallStatus = Schema.Literals([
10046 "inProgress",
10047 "completed",
10048 "failed",
10049]).annotate({ identifier: "V2ThreadResumeResponse__DynamicToolCallStatus" });
853010050
8531export type V2ThreadRollbackResponse__CollabAgentStatus =
10051export type V2ThreadResumeResponse__CollabAgentStatus =
853210052 | "pendingInit"
853310053 | "running"
853410054 | "interrupted"
......@@ -8536,7 +10056,7 @@ export type V2ThreadRollbackResponse__CollabAgentStatus =
853610056 | "errored"
853710057 | "shutdown"
853810058 | "notFound";
8539export const V2ThreadRollbackResponse__CollabAgentStatus = Schema.Literals([
10059export const V2ThreadResumeResponse__CollabAgentStatus = Schema.Literals([
854010060 "pendingInit",
854110061 "running",
854210062 "interrupted",
......@@ -8544,54 +10064,121 @@ export const V2ThreadRollbackResponse__CollabAgentStatus = Schema.Literals([
854410064 "errored",
854510065 "shutdown",
854610066 "notFound",
8547]);
10067]).annotate({ identifier: "V2ThreadResumeResponse__CollabAgentStatus" });
854810068
8549export type V2ThreadRollbackResponse__CommandExecutionStatus =
10069export type V2ThreadResumeResponse__CollabAgentToolCallStatus =
855010070 | "inProgress"
855110071 | "completed"
855210072 | "failed"
8553 | "declined";
8554export const V2ThreadRollbackResponse__CommandExecutionStatus = Schema.Literals([
8555 "inProgress",
10073 | "interrupted";
10074export const V2ThreadResumeResponse__CollabAgentToolCallStatus = Schema.Literals([
10075 "inProgress",
855610076 "completed",
855710077 "failed",
8558 "declined",
8559]);
10078 "interrupted",
10079]).annotate({ identifier: "V2ThreadResumeResponse__CollabAgentToolCallStatus" });
856010080
8561export type V2ThreadRollbackResponse__DynamicToolCallOutputContentItem =
8562 | { readonly text: string; readonly type: "inputText" }
8563 | { readonly imageUrl: string; readonly type: "inputImage" }
8564 | { readonly audioUrl: string; readonly type: "inputAudio" };
8565export const V2ThreadRollbackResponse__DynamicToolCallOutputContentItem = Schema.Union(
10081export type V2ThreadResumeResponse__CollabAgentTool =
10082 | "spawnAgent"
10083 | "sendInput"
10084 | "resumeAgent"
10085 | "wait"
10086 | "closeAgent"
10087 | "sendMessage"
10088 | "followupTask"
10089 | "interruptAgent"
10090 | "listAgents";
10091export const V2ThreadResumeResponse__CollabAgentTool = Schema.Literals([
10092 "spawnAgent",
10093 "sendInput",
10094 "resumeAgent",
10095 "wait",
10096 "closeAgent",
10097 "sendMessage",
10098 "followupTask",
10099 "interruptAgent",
10100 "listAgents",
10101]).annotate({ identifier: "V2ThreadResumeResponse__CollabAgentTool" });
10102
10103export type V2ThreadResumeResponse__SubAgentActivityKind =
10104 | "started"
10105 | "interacted"
10106 | "interrupted"
10107 | "completed";
10108export const V2ThreadResumeResponse__SubAgentActivityKind = Schema.Literals([
10109 "started",
10110 "interacted",
10111 "interrupted",
10112 "completed",
10113]).annotate({ identifier: "V2ThreadResumeResponse__SubAgentActivityKind" });
10114
10115export type V2ThreadResumeResponse__WebSearchAction =
10116 | {
10117 readonly queries?: ReadonlyArray<string> | null;
10118 readonly query?: string | null;
10119 readonly type: "search";
10120 }
10121 | { readonly type: "openPage"; readonly url?: string | null }
10122 | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
10123 | { readonly type: "other" };
10124export const V2ThreadResumeResponse__WebSearchAction = Schema.Union(
856610125 [
856710126 Schema.Struct({
8568 text: Schema.String,
8569 type: Schema.Literal("inputText").annotate({
8570 title: "InputTextDynamicToolCallOutputContentItemType",
8571 }),
8572 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
10127 queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
10128 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10129 type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
10130 }).annotate({ title: "SearchWebSearchAction" }),
857310131 Schema.Struct({
8574 imageUrl: Schema.String,
8575 type: Schema.Literal("inputImage").annotate({
8576 title: "InputImageDynamicToolCallOutputContentItemType",
8577 }),
8578 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
10132 type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
10133 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10134 }).annotate({ title: "OpenPageWebSearchAction" }),
857910135 Schema.Struct({
8580 audioUrl: Schema.String,
8581 type: Schema.Literal("inputAudio").annotate({
8582 title: "InputAudioDynamicToolCallOutputContentItemType",
8583 }),
8584 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
10136 pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10137 type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
10138 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10139 }).annotate({ title: "FindInPageWebSearchAction" }),
10140 Schema.Struct({
10141 type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
10142 }).annotate({ title: "OtherWebSearchAction" }),
858510143 ],
858610144 { mode: "oneOf" },
8587);
10145).annotate({ identifier: "V2ThreadResumeResponse__WebSearchAction" });
858810146
8589export type V2ThreadRollbackResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
8590export const V2ThreadRollbackResponse__DynamicToolCallStatus = Schema.Literals([
8591 "inProgress",
10147export type V2ThreadResumeResponse__TurnItemsView = "notLoaded" | "summary" | "full";
10148export const V2ThreadResumeResponse__TurnItemsView = Schema.Union(
10149 [
10150 Schema.Literal("notLoaded").annotate({
10151 description: "`items` was not loaded for this turn. The field is intentionally empty.",
10152 }),
10153 Schema.Literal("summary").annotate({
10154 description: "`items` contains only a display summary for this turn.",
10155 }),
10156 Schema.Literal("full").annotate({
10157 description:
10158 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
10159 }),
10160 ],
10161 { mode: "oneOf" },
10162).annotate({ identifier: "V2ThreadResumeResponse__TurnItemsView" });
10163
10164export type V2ThreadResumeResponse__TurnStatus =
10165 | "completed"
10166 | "interrupted"
10167 | "failed"
10168 | "inProgress";
10169export const V2ThreadResumeResponse__TurnStatus = Schema.Literals([
859210170 "completed",
10171 "interrupted",
859310172 "failed",
8594]);
10173 "inProgress",
10174]).annotate({ identifier: "V2ThreadResumeResponse__TurnStatus" });
10175
10176export type V2ThreadRollbackResponse__AbsolutePathBuf = string;
10177export const V2ThreadRollbackResponse__AbsolutePathBuf = Schema.String.annotate({
10178 description:
10179 "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.",
10180 identifier: "V2ThreadRollbackResponse__AbsolutePathBuf",
10181});
859510182
859610183export type V2ThreadRollbackResponse__GitInfo = {
859710184 readonly branch?: string | null;
......@@ -8602,63 +10189,65 @@ export const V2ThreadRollbackResponse__GitInfo = Schema.Struct({
860210189 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
860310190 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
860410191 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10192}).annotate({ identifier: "V2ThreadRollbackResponse__GitInfo" });
10193
10194export type V2ThreadRollbackResponse__AgentPath = string;
10195export const V2ThreadRollbackResponse__AgentPath = Schema.String.annotate({
10196 identifier: "V2ThreadRollbackResponse__AgentPath",
860510197});
860610198
8607export type V2ThreadRollbackResponse__HookPromptFragment = {
8608 readonly hookRunId: string;
8609 readonly text: string;
8610};
8611export const V2ThreadRollbackResponse__HookPromptFragment = Schema.Struct({
8612 hookRunId: Schema.String,
8613 text: Schema.String,
10199export type V2ThreadRollbackResponse__ThreadId = string;
10200export const V2ThreadRollbackResponse__ThreadId = Schema.String.annotate({
10201 identifier: "V2ThreadRollbackResponse__ThreadId",
10202});
10203
10204export type V2ThreadRollbackResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
10205export const V2ThreadRollbackResponse__ThreadActiveFlag = Schema.Literals([
10206 "waitingOnApproval",
10207 "waitingOnUserInput",
10208]).annotate({ identifier: "V2ThreadRollbackResponse__ThreadActiveFlag" });
10209
10210export type V2ThreadRollbackResponse__ThreadSource = string;
10211export const V2ThreadRollbackResponse__ThreadSource = Schema.String.annotate({
10212 identifier: "V2ThreadRollbackResponse__ThreadSource",
861410213});
861510214
10215export type V2ThreadRollbackResponse__NonSteerableTurnKind = "review" | "compact";
10216export const V2ThreadRollbackResponse__NonSteerableTurnKind = Schema.Literals([
10217 "review",
10218 "compact",
10219]).annotate({ identifier: "V2ThreadRollbackResponse__NonSteerableTurnKind" });
10220
10221export type V2ThreadRollbackResponse__ByteRange = { readonly end: number; readonly start: number };
10222export const V2ThreadRollbackResponse__ByteRange = Schema.Struct({
10223 end: Schema.Number.annotate({ format: "uint" })
10224 .check(Schema.isInt().annotate({ expected: "an integer" }))
10225 .check(
10226 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
10227 ),
10228 start: Schema.Number.annotate({ format: "uint" })
10229 .check(Schema.isInt().annotate({ expected: "an integer" }))
10230 .check(
10231 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
10232 ),
10233}).annotate({ identifier: "V2ThreadRollbackResponse__ByteRange" });
10234
861610235export type V2ThreadRollbackResponse__ImageDetail = "auto" | "low" | "high" | "original";
861710236export const V2ThreadRollbackResponse__ImageDetail = Schema.Literals([
861810237 "auto",
861910238 "low",
862010239 "high",
862110240 "original",
8622]);
8623
8624export type V2ThreadRollbackResponse__LegacyAppPathString = string;
8625export const V2ThreadRollbackResponse__LegacyAppPathString = Schema.String;
8626
8627export type V2ThreadRollbackResponse__McpToolCallAppContext = {
8628 readonly actionName?: string | null;
8629 readonly appName?: string | null;
8630 readonly connectorId: string;
8631 readonly linkId?: string | null;
8632 readonly resourceUri?: string | null;
8633};
8634export const V2ThreadRollbackResponse__McpToolCallAppContext = Schema.Struct({
8635 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8636 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8637 connectorId: Schema.String,
8638 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8639 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8640});
8641
8642export type V2ThreadRollbackResponse__McpToolCallError = { readonly message: string };
8643export const V2ThreadRollbackResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
10241]).annotate({ identifier: "V2ThreadRollbackResponse__ImageDetail" });
864410242
8645export type V2ThreadRollbackResponse__McpToolCallResult = {
8646 readonly _meta?: unknown;
8647 readonly content: ReadonlyArray<unknown>;
8648 readonly structuredContent?: unknown;
10243export type V2ThreadRollbackResponse__HookPromptFragment = {
10244 readonly hookRunId: string;
10245 readonly text: string;
864910246};
8650export const V2ThreadRollbackResponse__McpToolCallResult = Schema.Struct({
8651 _meta: Schema.optionalKey(Schema.Unknown),
8652 content: Schema.Array(Schema.Unknown),
8653 structuredContent: Schema.optionalKey(Schema.Unknown),
8654});
8655
8656export type V2ThreadRollbackResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
8657export const V2ThreadRollbackResponse__McpToolCallStatus = Schema.Literals([
8658 "inProgress",
8659 "completed",
8660 "failed",
8661]);
10247export const V2ThreadRollbackResponse__HookPromptFragment = Schema.Struct({
10248 hookRunId: Schema.String,
10249 text: Schema.String,
10250}).annotate({ identifier: "V2ThreadRollbackResponse__HookPromptFragment" });
866210251
866310252export type V2ThreadRollbackResponse__MemoryCitationEntry = {
866410253 readonly lineEnd: number;
......@@ -8668,41 +10257,65 @@ export type V2ThreadRollbackResponse__MemoryCitationEntry = {
866810257};
866910258export const V2ThreadRollbackResponse__MemoryCitationEntry = Schema.Struct({
867010259 lineEnd: Schema.Number.annotate({ format: "uint32" })
8671 .check(Schema.isInt())
8672 .check(Schema.isGreaterThanOrEqualTo(0)),
10260 .check(Schema.isInt().annotate({ expected: "an integer" }))
10261 .check(
10262 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
10263 ),
867310264 lineStart: Schema.Number.annotate({ format: "uint32" })
8674 .check(Schema.isInt())
8675 .check(Schema.isGreaterThanOrEqualTo(0)),
10265 .check(Schema.isInt().annotate({ expected: "an integer" }))
10266 .check(
10267 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
10268 ),
867610269 note: Schema.String,
867710270 path: Schema.String,
8678});
10271}).annotate({ identifier: "V2ThreadRollbackResponse__MemoryCitationEntry" });
867910272
868010273export type V2ThreadRollbackResponse__MessagePhase = "commentary" | "final_answer";
8681export const V2ThreadRollbackResponse__MessagePhase = Schema.Literals([
8682 "commentary",
8683 "final_answer",
8684]).annotate({
10274export const V2ThreadRollbackResponse__MessagePhase = Schema.Union(
10275 [
10276 Schema.Literal("commentary").annotate({
10277 description:
10278 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
10279 }),
10280 Schema.Literal("final_answer").annotate({
10281 description: "The assistant's terminal answer text for the current turn.",
10282 }),
10283 ],
10284 { mode: "oneOf" },
10285).annotate({
868510286 description:
868610287 '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.',
10288 identifier: "V2ThreadRollbackResponse__MessagePhase",
868710289});
868810290
8689export type V2ThreadRollbackResponse__NonSteerableTurnKind = "review" | "compact";
8690export const V2ThreadRollbackResponse__NonSteerableTurnKind = Schema.Literals([
8691 "review",
8692 "compact",
8693]);
10291export type V2ThreadRollbackResponse__LegacyAppPathString = string;
10292export const V2ThreadRollbackResponse__LegacyAppPathString = Schema.String.annotate({
10293 identifier: "V2ThreadRollbackResponse__LegacyAppPathString",
10294});
869410295
8695export type V2ThreadRollbackResponse__PatchApplyStatus =
10296export type V2ThreadRollbackResponse__CommandExecutionSource =
10297 | "agent"
10298 | "userShell"
10299 | "unifiedExecStartup"
10300 | "unifiedExecInteraction";
10301export const V2ThreadRollbackResponse__CommandExecutionSource = Schema.Literals([
10302 "agent",
10303 "userShell",
10304 "unifiedExecStartup",
10305 "unifiedExecInteraction",
10306]).annotate({ identifier: "V2ThreadRollbackResponse__CommandExecutionSource" });
10307
10308export type V2ThreadRollbackResponse__CommandExecutionStatus =
869610309 | "inProgress"
869710310 | "completed"
869810311 | "failed"
869910312 | "declined";
8700export const V2ThreadRollbackResponse__PatchApplyStatus = Schema.Literals([
10313export const V2ThreadRollbackResponse__CommandExecutionStatus = Schema.Literals([
870110314 "inProgress",
870210315 "completed",
870310316 "failed",
870410317 "declined",
8705]);
10318]).annotate({ identifier: "V2ThreadRollbackResponse__CommandExecutionStatus" });
870610319
870710320export type V2ThreadRollbackResponse__PatchChangeKind =
870810321 | { readonly type: "add" }
......@@ -8722,12 +10335,154 @@ export const V2ThreadRollbackResponse__PatchChangeKind = Schema.Union(
872210335 }).annotate({ title: "UpdatePatchChangeKind" }),
872310336 ],
872410337 { mode: "oneOf" },
8725);
10338).annotate({ identifier: "V2ThreadRollbackResponse__PatchChangeKind" });
10339
10340export type V2ThreadRollbackResponse__PatchApplyStatus =
10341 | "inProgress"
10342 | "completed"
10343 | "failed"
10344 | "declined";
10345export const V2ThreadRollbackResponse__PatchApplyStatus = Schema.Literals([
10346 "inProgress",
10347 "completed",
10348 "failed",
10349 "declined",
10350]).annotate({ identifier: "V2ThreadRollbackResponse__PatchApplyStatus" });
10351
10352export type V2ThreadRollbackResponse__McpToolCallAppContext = {
10353 readonly actionName?: string | null;
10354 readonly appName?: string | null;
10355 readonly connectorId: string;
10356 readonly linkId?: string | null;
10357 readonly resourceUri?: string | null;
10358};
10359export const V2ThreadRollbackResponse__McpToolCallAppContext = Schema.Struct({
10360 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10361 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10362 connectorId: Schema.String,
10363 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10364 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10365}).annotate({ identifier: "V2ThreadRollbackResponse__McpToolCallAppContext" });
10366
10367export type V2ThreadRollbackResponse__McpToolCallError = { readonly message: string };
10368export const V2ThreadRollbackResponse__McpToolCallError = Schema.Struct({
10369 message: Schema.String,
10370}).annotate({ identifier: "V2ThreadRollbackResponse__McpToolCallError" });
10371
10372export type V2ThreadRollbackResponse__McpToolCallResult = {
10373 readonly _meta?: Schema.Json;
10374 readonly content: ReadonlyArray<Schema.Json>;
10375 readonly structuredContent?: Schema.Json;
10376};
10377export const V2ThreadRollbackResponse__McpToolCallResult = Schema.Struct({
10378 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
10379 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
10380 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
10381}).annotate({ identifier: "V2ThreadRollbackResponse__McpToolCallResult" });
10382
10383export type V2ThreadRollbackResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
10384export const V2ThreadRollbackResponse__McpToolCallStatus = Schema.Literals([
10385 "inProgress",
10386 "completed",
10387 "failed",
10388]).annotate({ identifier: "V2ThreadRollbackResponse__McpToolCallStatus" });
10389
10390export type V2ThreadRollbackResponse__DynamicToolCallOutputContentItem =
10391 | { readonly text: string; readonly type: "inputText" }
10392 | { readonly imageUrl: string; readonly type: "inputImage" }
10393 | { readonly audioUrl: string; readonly type: "inputAudio" };
10394export const V2ThreadRollbackResponse__DynamicToolCallOutputContentItem = Schema.Union(
10395 [
10396 Schema.Struct({
10397 text: Schema.String,
10398 type: Schema.Literal("inputText").annotate({
10399 title: "InputTextDynamicToolCallOutputContentItemType",
10400 }),
10401 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
10402 Schema.Struct({
10403 imageUrl: Schema.String,
10404 type: Schema.Literal("inputImage").annotate({
10405 title: "InputImageDynamicToolCallOutputContentItemType",
10406 }),
10407 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
10408 Schema.Struct({
10409 audioUrl: Schema.String,
10410 type: Schema.Literal("inputAudio").annotate({
10411 title: "InputAudioDynamicToolCallOutputContentItemType",
10412 }),
10413 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
10414 ],
10415 { mode: "oneOf" },
10416).annotate({ identifier: "V2ThreadRollbackResponse__DynamicToolCallOutputContentItem" });
10417
10418export type V2ThreadRollbackResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
10419export const V2ThreadRollbackResponse__DynamicToolCallStatus = Schema.Literals([
10420 "inProgress",
10421 "completed",
10422 "failed",
10423]).annotate({ identifier: "V2ThreadRollbackResponse__DynamicToolCallStatus" });
10424
10425export type V2ThreadRollbackResponse__CollabAgentStatus =
10426 | "pendingInit"
10427 | "running"
10428 | "interrupted"
10429 | "completed"
10430 | "errored"
10431 | "shutdown"
10432 | "notFound";
10433export const V2ThreadRollbackResponse__CollabAgentStatus = Schema.Literals([
10434 "pendingInit",
10435 "running",
10436 "interrupted",
10437 "completed",
10438 "errored",
10439 "shutdown",
10440 "notFound",
10441]).annotate({ identifier: "V2ThreadRollbackResponse__CollabAgentStatus" });
872610442
872710443export type V2ThreadRollbackResponse__ReasoningEffort = string;
872810444export const V2ThreadRollbackResponse__ReasoningEffort = Schema.String.annotate({
872910445 description: "A non-empty reasoning effort value advertised by the model.",
8730}).check(Schema.isMinLength(1));
10446}).check(
10447 Schema.isMinLength(1).annotate({
10448 expected: "a value with a length of at least 1",
10449 identifier: "V2ThreadRollbackResponse__ReasoningEffort",
10450 }),
10451);
10452
10453export type V2ThreadRollbackResponse__CollabAgentToolCallStatus =
10454 | "inProgress"
10455 | "completed"
10456 | "failed"
10457 | "interrupted";
10458export const V2ThreadRollbackResponse__CollabAgentToolCallStatus = Schema.Literals([
10459 "inProgress",
10460 "completed",
10461 "failed",
10462 "interrupted",
10463]).annotate({ identifier: "V2ThreadRollbackResponse__CollabAgentToolCallStatus" });
10464
10465export type V2ThreadRollbackResponse__CollabAgentTool =
10466 | "spawnAgent"
10467 | "sendInput"
10468 | "resumeAgent"
10469 | "wait"
10470 | "closeAgent"
10471 | "sendMessage"
10472 | "followupTask"
10473 | "interruptAgent"
10474 | "listAgents";
10475export const V2ThreadRollbackResponse__CollabAgentTool = Schema.Literals([
10476 "spawnAgent",
10477 "sendInput",
10478 "resumeAgent",
10479 "wait",
10480 "closeAgent",
10481 "sendMessage",
10482 "followupTask",
10483 "interruptAgent",
10484 "listAgents",
10485]).annotate({ identifier: "V2ThreadRollbackResponse__CollabAgentTool" });
873110486
873210487export type V2ThreadRollbackResponse__SubAgentActivityKind =
873310488 | "started"
......@@ -8739,56 +10494,7 @@ export const V2ThreadRollbackResponse__SubAgentActivityKind = Schema.Literals([
873910494 "interacted",
874010495 "interrupted",
874110496 "completed",
8742]);
8743
8744export type V2ThreadRollbackResponse__TextElement = {
8745 readonly byteRange: { readonly end: number; readonly start: number };
8746 readonly placeholder?: string | null;
8747};
8748export const V2ThreadRollbackResponse__TextElement = Schema.Struct({
8749 byteRange: Schema.Struct({
8750 end: Schema.Number.annotate({ format: "uint" })
8751 .check(Schema.isInt())
8752 .check(Schema.isGreaterThanOrEqualTo(0)),
8753 start: Schema.Number.annotate({ format: "uint" })
8754 .check(Schema.isInt())
8755 .check(Schema.isGreaterThanOrEqualTo(0)),
8756 }).annotate({
8757 description: "Byte range in the parent `text` buffer that this element occupies.",
8758 }),
8759 placeholder: Schema.optionalKey(
8760 Schema.Union([
8761 Schema.String.annotate({
8762 description: "Optional human-readable placeholder for the element, displayed in the UI.",
8763 }),
8764 Schema.Null,
8765 ]),
8766 ),
8767});
8768
8769export type V2ThreadRollbackResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
8770export const V2ThreadRollbackResponse__ThreadActiveFlag = Schema.Literals([
8771 "waitingOnApproval",
8772 "waitingOnUserInput",
8773]);
8774
8775export type V2ThreadRollbackResponse__ThreadId = string;
8776export const V2ThreadRollbackResponse__ThreadId = Schema.String;
8777
8778export type V2ThreadRollbackResponse__ThreadSource = string;
8779export const V2ThreadRollbackResponse__ThreadSource = Schema.String;
8780
8781export type V2ThreadRollbackResponse__TurnStatus =
8782 | "completed"
8783 | "interrupted"
8784 | "failed"
8785 | "inProgress";
8786export const V2ThreadRollbackResponse__TurnStatus = Schema.Literals([
8787 "completed",
8788 "interrupted",
8789 "failed",
8790 "inProgress",
8791]);
10497]).annotate({ identifier: "V2ThreadRollbackResponse__SubAgentActivityKind" });
879210498
879310499export type V2ThreadRollbackResponse__WebSearchAction =
879410500 | {
......@@ -8820,13 +10526,36 @@ export const V2ThreadRollbackResponse__WebSearchAction = Schema.Union(
882010526 }).annotate({ title: "OtherWebSearchAction" }),
882110527 ],
882210528 { mode: "oneOf" },
8823);
10529).annotate({ identifier: "V2ThreadRollbackResponse__WebSearchAction" });
882410530
8825export type V2ThreadSettingsUpdatedNotification__AbsolutePathBuf = string;
8826export const V2ThreadSettingsUpdatedNotification__AbsolutePathBuf = Schema.String.annotate({
8827 description:
8828 "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.",
8829});
10531export type V2ThreadRollbackResponse__TurnItemsView = "notLoaded" | "summary" | "full";
10532export const V2ThreadRollbackResponse__TurnItemsView = Schema.Union(
10533 [
10534 Schema.Literal("notLoaded").annotate({
10535 description: "`items` was not loaded for this turn. The field is intentionally empty.",
10536 }),
10537 Schema.Literal("summary").annotate({
10538 description: "`items` contains only a display summary for this turn.",
10539 }),
10540 Schema.Literal("full").annotate({
10541 description:
10542 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
10543 }),
10544 ],
10545 { mode: "oneOf" },
10546).annotate({ identifier: "V2ThreadRollbackResponse__TurnItemsView" });
10547
10548export type V2ThreadRollbackResponse__TurnStatus =
10549 | "completed"
10550 | "interrupted"
10551 | "failed"
10552 | "inProgress";
10553export const V2ThreadRollbackResponse__TurnStatus = Schema.Literals([
10554 "completed",
10555 "interrupted",
10556 "failed",
10557 "inProgress",
10558]).annotate({ identifier: "V2ThreadRollbackResponse__TurnStatus" });
883010559
883110560export type V2ThreadSettingsUpdatedNotification__ActivePermissionProfile = {
883210561 readonly extends?: string | null;
......@@ -8846,20 +10575,7 @@ export const V2ThreadSettingsUpdatedNotification__ActivePermissionProfile = Sche
884610575 description:
884710576 "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
884810577 }),
8849});
8850
8851export type V2ThreadSettingsUpdatedNotification__ApprovalsReviewer =
8852 | "user"
8853 | "auto_review"
8854 | "guardian_subagent";
8855export const V2ThreadSettingsUpdatedNotification__ApprovalsReviewer = Schema.Literals([
8856 "user",
8857 "auto_review",
8858 "guardian_subagent",
8859]).annotate({
8860 description:
8861 "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.",
8862});
10578}).annotate({ identifier: "V2ThreadSettingsUpdatedNotification__ActivePermissionProfile" });
886310579
886410580export type V2ThreadSettingsUpdatedNotification__AskForApproval =
886510581 | "untrusted"
......@@ -8888,25 +10604,60 @@ export const V2ThreadSettingsUpdatedNotification__AskForApproval = Schema.Union(
888810604 }).annotate({ title: "GranularAskForApproval" }),
888910605 ],
889010606 { mode: "oneOf" },
8891);
10607).annotate({ identifier: "V2ThreadSettingsUpdatedNotification__AskForApproval" });
10608
10609export type V2ThreadSettingsUpdatedNotification__ApprovalsReviewer =
10610 | "user"
10611 | "auto_review"
10612 | "guardian_subagent";
10613export const V2ThreadSettingsUpdatedNotification__ApprovalsReviewer = Schema.Literals([
10614 "user",
10615 "auto_review",
10616 "guardian_subagent",
10617]).annotate({
10618 description:
10619 "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.",
10620 identifier: "V2ThreadSettingsUpdatedNotification__ApprovalsReviewer",
10621});
889210622
889310623export type V2ThreadSettingsUpdatedNotification__ModeKind = "plan" | "default";
889410624export const V2ThreadSettingsUpdatedNotification__ModeKind = Schema.Literals([
889510625 "plan",
889610626 "default",
8897]).annotate({ description: "Initial collaboration mode to use when the TUI starts." });
10627]).annotate({
10628 description: "Initial collaboration mode to use when the TUI starts.",
10629 identifier: "V2ThreadSettingsUpdatedNotification__ModeKind",
10630});
10631
10632export type V2ThreadSettingsUpdatedNotification__ReasoningEffort = string;
10633export const V2ThreadSettingsUpdatedNotification__ReasoningEffort = Schema.String.annotate({
10634 description: "A non-empty reasoning effort value advertised by the model.",
10635}).check(
10636 Schema.isMinLength(1).annotate({
10637 expected: "a value with a length of at least 1",
10638 identifier: "V2ThreadSettingsUpdatedNotification__ReasoningEffort",
10639 }),
10640);
10641
10642export type V2ThreadSettingsUpdatedNotification__AbsolutePathBuf = string;
10643export const V2ThreadSettingsUpdatedNotification__AbsolutePathBuf = Schema.String.annotate({
10644 description:
10645 "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.",
10646 identifier: "V2ThreadSettingsUpdatedNotification__AbsolutePathBuf",
10647});
889810648
889910649export type V2ThreadSettingsUpdatedNotification__Personality = "none" | "friendly" | "pragmatic";
890010650export const V2ThreadSettingsUpdatedNotification__Personality = Schema.Literals([
890110651 "none",
890210652 "friendly",
890310653 "pragmatic",
8904]);
10654]).annotate({ identifier: "V2ThreadSettingsUpdatedNotification__Personality" });
890510655
8906export type V2ThreadSettingsUpdatedNotification__ReasoningEffort = string;
8907export const V2ThreadSettingsUpdatedNotification__ReasoningEffort = Schema.String.annotate({
8908 description: "A non-empty reasoning effort value advertised by the model.",
8909}).check(Schema.isMinLength(1));
10656export type V2ThreadSettingsUpdatedNotification__NetworkAccess = "restricted" | "enabled";
10657export const V2ThreadSettingsUpdatedNotification__NetworkAccess = Schema.Literals([
10658 "restricted",
10659 "enabled",
10660]).annotate({ identifier: "V2ThreadSettingsUpdatedNotification__NetworkAccess" });
891010661
891110662export type V2ThreadSettingsUpdatedNotification__ReasoningSummary =
891210663 | "auto"
......@@ -8922,104 +10673,72 @@ export const V2ThreadSettingsUpdatedNotification__ReasoningSummary = Schema.Unio
892210673).annotate({
892310674 description:
892410675 "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
10676 identifier: "V2ThreadSettingsUpdatedNotification__ReasoningSummary",
892510677});
892610678
892710679export type V2ThreadStartedNotification__AbsolutePathBuf = string;
892810680export const V2ThreadStartedNotification__AbsolutePathBuf = Schema.String.annotate({
892910681 description:
893010682 "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.",
10683 identifier: "V2ThreadStartedNotification__AbsolutePathBuf",
893110684});
893210685
10686export type V2ThreadStartedNotification__GitInfo = {
10687 readonly branch?: string | null;
10688 readonly originUrl?: string | null;
10689 readonly sha?: string | null;
10690};
10691export const V2ThreadStartedNotification__GitInfo = Schema.Struct({
10692 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10693 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10694 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10695}).annotate({ identifier: "V2ThreadStartedNotification__GitInfo" });
10696
893310697export type V2ThreadStartedNotification__AgentPath = string;
8934export const V2ThreadStartedNotification__AgentPath = Schema.String;
10698export const V2ThreadStartedNotification__AgentPath = Schema.String.annotate({
10699 identifier: "V2ThreadStartedNotification__AgentPath",
10700});
893510701
8936export type V2ThreadStartedNotification__CollabAgentStatus =
8937 | "pendingInit"
8938 | "running"
8939 | "interrupted"
8940 | "completed"
8941 | "errored"
8942 | "shutdown"
8943 | "notFound";
8944export const V2ThreadStartedNotification__CollabAgentStatus = Schema.Literals([
8945 "pendingInit",
8946 "running",
8947 "interrupted",
8948 "completed",
8949 "errored",
8950 "shutdown",
8951 "notFound",
8952]);
10702export type V2ThreadStartedNotification__ThreadId = string;
10703export const V2ThreadStartedNotification__ThreadId = Schema.String.annotate({
10704 identifier: "V2ThreadStartedNotification__ThreadId",
10705});
895310706
8954export type V2ThreadStartedNotification__CommandExecutionStatus =
8955 | "inProgress"
8956 | "completed"
8957 | "failed"
8958 | "declined";
8959export const V2ThreadStartedNotification__CommandExecutionStatus = Schema.Literals([
8960 "inProgress",
8961 "completed",
8962 "failed",
8963 "declined",
8964]);
10707export type V2ThreadStartedNotification__ThreadActiveFlag =
10708 | "waitingOnApproval"
10709 | "waitingOnUserInput";
10710export const V2ThreadStartedNotification__ThreadActiveFlag = Schema.Literals([
10711 "waitingOnApproval",
10712 "waitingOnUserInput",
10713]).annotate({ identifier: "V2ThreadStartedNotification__ThreadActiveFlag" });
896510714
8966export type V2ThreadStartedNotification__DynamicToolCallOutputContentItem =
8967 | { readonly text: string; readonly type: "inputText" }
8968 | { readonly imageUrl: string; readonly type: "inputImage" }
8969 | { readonly audioUrl: string; readonly type: "inputAudio" };
8970export const V2ThreadStartedNotification__DynamicToolCallOutputContentItem = Schema.Union(
8971 [
8972 Schema.Struct({
8973 text: Schema.String,
8974 type: Schema.Literal("inputText").annotate({
8975 title: "InputTextDynamicToolCallOutputContentItemType",
8976 }),
8977 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
8978 Schema.Struct({
8979 imageUrl: Schema.String,
8980 type: Schema.Literal("inputImage").annotate({
8981 title: "InputImageDynamicToolCallOutputContentItemType",
8982 }),
8983 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
8984 Schema.Struct({
8985 audioUrl: Schema.String,
8986 type: Schema.Literal("inputAudio").annotate({
8987 title: "InputAudioDynamicToolCallOutputContentItemType",
8988 }),
8989 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
8990 ],
8991 { mode: "oneOf" },
8992);
8993
8994export type V2ThreadStartedNotification__DynamicToolCallStatus =
8995 | "inProgress"
8996 | "completed"
8997 | "failed";
8998export const V2ThreadStartedNotification__DynamicToolCallStatus = Schema.Literals([
8999 "inProgress",
9000 "completed",
9001 "failed",
9002]);
9003
9004export type V2ThreadStartedNotification__GitInfo = {
9005 readonly branch?: string | null;
9006 readonly originUrl?: string | null;
9007 readonly sha?: string | null;
9008};
9009export const V2ThreadStartedNotification__GitInfo = Schema.Struct({
9010 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9011 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9012 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10715export type V2ThreadStartedNotification__ThreadSource = string;
10716export const V2ThreadStartedNotification__ThreadSource = Schema.String.annotate({
10717 identifier: "V2ThreadStartedNotification__ThreadSource",
901310718});
901410719
9015export type V2ThreadStartedNotification__HookPromptFragment = {
9016 readonly hookRunId: string;
9017 readonly text: string;
10720export type V2ThreadStartedNotification__NonSteerableTurnKind = "review" | "compact";
10721export const V2ThreadStartedNotification__NonSteerableTurnKind = Schema.Literals([
10722 "review",
10723 "compact",
10724]).annotate({ identifier: "V2ThreadStartedNotification__NonSteerableTurnKind" });
10725
10726export type V2ThreadStartedNotification__ByteRange = {
10727 readonly end: number;
10728 readonly start: number;
901810729};
9019export const V2ThreadStartedNotification__HookPromptFragment = Schema.Struct({
9020 hookRunId: Schema.String,
9021 text: Schema.String,
9022});
10730export const V2ThreadStartedNotification__ByteRange = Schema.Struct({
10731 end: Schema.Number.annotate({ format: "uint" })
10732 .check(Schema.isInt().annotate({ expected: "an integer" }))
10733 .check(
10734 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
10735 ),
10736 start: Schema.Number.annotate({ format: "uint" })
10737 .check(Schema.isInt().annotate({ expected: "an integer" }))
10738 .check(
10739 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
10740 ),
10741}).annotate({ identifier: "V2ThreadStartedNotification__ByteRange" });
902310742
902410743export type V2ThreadStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
902510744export const V2ThreadStartedNotification__ImageDetail = Schema.Literals([
......@@ -9027,48 +10746,16 @@ export const V2ThreadStartedNotification__ImageDetail = Schema.Literals([
902710746 "low",
902810747 "high",
902910748 "original",
9030]);
9031
9032export type V2ThreadStartedNotification__LegacyAppPathString = string;
9033export const V2ThreadStartedNotification__LegacyAppPathString = Schema.String;
9034
9035export type V2ThreadStartedNotification__McpToolCallAppContext = {
9036 readonly actionName?: string | null;
9037 readonly appName?: string | null;
9038 readonly connectorId: string;
9039 readonly linkId?: string | null;
9040 readonly resourceUri?: string | null;
9041};
9042export const V2ThreadStartedNotification__McpToolCallAppContext = Schema.Struct({
9043 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9044 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9045 connectorId: Schema.String,
9046 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9047 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9048});
9049
9050export type V2ThreadStartedNotification__McpToolCallError = { readonly message: string };
9051export const V2ThreadStartedNotification__McpToolCallError = Schema.Struct({
9052 message: Schema.String,
9053});
10749]).annotate({ identifier: "V2ThreadStartedNotification__ImageDetail" });
905410750
9055export type V2ThreadStartedNotification__McpToolCallResult = {
9056 readonly _meta?: unknown;
9057 readonly content: ReadonlyArray<unknown>;
9058 readonly structuredContent?: unknown;
10751export type V2ThreadStartedNotification__HookPromptFragment = {
10752 readonly hookRunId: string;
10753 readonly text: string;
905910754};
9060export const V2ThreadStartedNotification__McpToolCallResult = Schema.Struct({
9061 _meta: Schema.optionalKey(Schema.Unknown),
9062 content: Schema.Array(Schema.Unknown),
9063 structuredContent: Schema.optionalKey(Schema.Unknown),
9064});
9065
9066export type V2ThreadStartedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
9067export const V2ThreadStartedNotification__McpToolCallStatus = Schema.Literals([
9068 "inProgress",
9069 "completed",
9070 "failed",
9071]);
10755export const V2ThreadStartedNotification__HookPromptFragment = Schema.Struct({
10756 hookRunId: Schema.String,
10757 text: Schema.String,
10758}).annotate({ identifier: "V2ThreadStartedNotification__HookPromptFragment" });
907210759
907310760export type V2ThreadStartedNotification__MemoryCitationEntry = {
907410761 readonly lineEnd: number;
......@@ -9078,41 +10765,65 @@ export type V2ThreadStartedNotification__MemoryCitationEntry = {
907810765};
907910766export const V2ThreadStartedNotification__MemoryCitationEntry = Schema.Struct({
908010767 lineEnd: Schema.Number.annotate({ format: "uint32" })
9081 .check(Schema.isInt())
9082 .check(Schema.isGreaterThanOrEqualTo(0)),
10768 .check(Schema.isInt().annotate({ expected: "an integer" }))
10769 .check(
10770 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
10771 ),
908310772 lineStart: Schema.Number.annotate({ format: "uint32" })
9084 .check(Schema.isInt())
9085 .check(Schema.isGreaterThanOrEqualTo(0)),
10773 .check(Schema.isInt().annotate({ expected: "an integer" }))
10774 .check(
10775 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
10776 ),
908610777 note: Schema.String,
908710778 path: Schema.String,
9088});
10779}).annotate({ identifier: "V2ThreadStartedNotification__MemoryCitationEntry" });
908910780
909010781export type V2ThreadStartedNotification__MessagePhase = "commentary" | "final_answer";
9091export const V2ThreadStartedNotification__MessagePhase = Schema.Literals([
9092 "commentary",
9093 "final_answer",
9094]).annotate({
10782export const V2ThreadStartedNotification__MessagePhase = Schema.Union(
10783 [
10784 Schema.Literal("commentary").annotate({
10785 description:
10786 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
10787 }),
10788 Schema.Literal("final_answer").annotate({
10789 description: "The assistant's terminal answer text for the current turn.",
10790 }),
10791 ],
10792 { mode: "oneOf" },
10793).annotate({
909510794 description:
909610795 '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.',
10796 identifier: "V2ThreadStartedNotification__MessagePhase",
909710797});
909810798
9099export type V2ThreadStartedNotification__NonSteerableTurnKind = "review" | "compact";
9100export const V2ThreadStartedNotification__NonSteerableTurnKind = Schema.Literals([
9101 "review",
9102 "compact",
9103]);
10799export type V2ThreadStartedNotification__LegacyAppPathString = string;
10800export const V2ThreadStartedNotification__LegacyAppPathString = Schema.String.annotate({
10801 identifier: "V2ThreadStartedNotification__LegacyAppPathString",
10802});
910410803
9105export type V2ThreadStartedNotification__PatchApplyStatus =
10804export type V2ThreadStartedNotification__CommandExecutionSource =
10805 | "agent"
10806 | "userShell"
10807 | "unifiedExecStartup"
10808 | "unifiedExecInteraction";
10809export const V2ThreadStartedNotification__CommandExecutionSource = Schema.Literals([
10810 "agent",
10811 "userShell",
10812 "unifiedExecStartup",
10813 "unifiedExecInteraction",
10814]).annotate({ identifier: "V2ThreadStartedNotification__CommandExecutionSource" });
10815
10816export type V2ThreadStartedNotification__CommandExecutionStatus =
910610817 | "inProgress"
910710818 | "completed"
910810819 | "failed"
910910820 | "declined";
9110export const V2ThreadStartedNotification__PatchApplyStatus = Schema.Literals([
10821export const V2ThreadStartedNotification__CommandExecutionStatus = Schema.Literals([
911110822 "inProgress",
911210823 "completed",
911310824 "failed",
911410825 "declined",
9115]);
10826]).annotate({ identifier: "V2ThreadStartedNotification__CommandExecutionStatus" });
911610827
911710828export type V2ThreadStartedNotification__PatchChangeKind =
911810829 | { readonly type: "add" }
......@@ -9132,12 +10843,157 @@ export const V2ThreadStartedNotification__PatchChangeKind = Schema.Union(
913210843 }).annotate({ title: "UpdatePatchChangeKind" }),
913310844 ],
913410845 { mode: "oneOf" },
9135);
10846).annotate({ identifier: "V2ThreadStartedNotification__PatchChangeKind" });
10847
10848export type V2ThreadStartedNotification__PatchApplyStatus =
10849 | "inProgress"
10850 | "completed"
10851 | "failed"
10852 | "declined";
10853export const V2ThreadStartedNotification__PatchApplyStatus = Schema.Literals([
10854 "inProgress",
10855 "completed",
10856 "failed",
10857 "declined",
10858]).annotate({ identifier: "V2ThreadStartedNotification__PatchApplyStatus" });
10859
10860export type V2ThreadStartedNotification__McpToolCallAppContext = {
10861 readonly actionName?: string | null;
10862 readonly appName?: string | null;
10863 readonly connectorId: string;
10864 readonly linkId?: string | null;
10865 readonly resourceUri?: string | null;
10866};
10867export const V2ThreadStartedNotification__McpToolCallAppContext = Schema.Struct({
10868 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10869 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10870 connectorId: Schema.String,
10871 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10872 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10873}).annotate({ identifier: "V2ThreadStartedNotification__McpToolCallAppContext" });
10874
10875export type V2ThreadStartedNotification__McpToolCallError = { readonly message: string };
10876export const V2ThreadStartedNotification__McpToolCallError = Schema.Struct({
10877 message: Schema.String,
10878}).annotate({ identifier: "V2ThreadStartedNotification__McpToolCallError" });
10879
10880export type V2ThreadStartedNotification__McpToolCallResult = {
10881 readonly _meta?: Schema.Json;
10882 readonly content: ReadonlyArray<Schema.Json>;
10883 readonly structuredContent?: Schema.Json;
10884};
10885export const V2ThreadStartedNotification__McpToolCallResult = Schema.Struct({
10886 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
10887 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
10888 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
10889}).annotate({ identifier: "V2ThreadStartedNotification__McpToolCallResult" });
10890
10891export type V2ThreadStartedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
10892export const V2ThreadStartedNotification__McpToolCallStatus = Schema.Literals([
10893 "inProgress",
10894 "completed",
10895 "failed",
10896]).annotate({ identifier: "V2ThreadStartedNotification__McpToolCallStatus" });
10897
10898export type V2ThreadStartedNotification__DynamicToolCallOutputContentItem =
10899 | { readonly text: string; readonly type: "inputText" }
10900 | { readonly imageUrl: string; readonly type: "inputImage" }
10901 | { readonly audioUrl: string; readonly type: "inputAudio" };
10902export const V2ThreadStartedNotification__DynamicToolCallOutputContentItem = Schema.Union(
10903 [
10904 Schema.Struct({
10905 text: Schema.String,
10906 type: Schema.Literal("inputText").annotate({
10907 title: "InputTextDynamicToolCallOutputContentItemType",
10908 }),
10909 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
10910 Schema.Struct({
10911 imageUrl: Schema.String,
10912 type: Schema.Literal("inputImage").annotate({
10913 title: "InputImageDynamicToolCallOutputContentItemType",
10914 }),
10915 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
10916 Schema.Struct({
10917 audioUrl: Schema.String,
10918 type: Schema.Literal("inputAudio").annotate({
10919 title: "InputAudioDynamicToolCallOutputContentItemType",
10920 }),
10921 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
10922 ],
10923 { mode: "oneOf" },
10924).annotate({ identifier: "V2ThreadStartedNotification__DynamicToolCallOutputContentItem" });
10925
10926export type V2ThreadStartedNotification__DynamicToolCallStatus =
10927 | "inProgress"
10928 | "completed"
10929 | "failed";
10930export const V2ThreadStartedNotification__DynamicToolCallStatus = Schema.Literals([
10931 "inProgress",
10932 "completed",
10933 "failed",
10934]).annotate({ identifier: "V2ThreadStartedNotification__DynamicToolCallStatus" });
10935
10936export type V2ThreadStartedNotification__CollabAgentStatus =
10937 | "pendingInit"
10938 | "running"
10939 | "interrupted"
10940 | "completed"
10941 | "errored"
10942 | "shutdown"
10943 | "notFound";
10944export const V2ThreadStartedNotification__CollabAgentStatus = Schema.Literals([
10945 "pendingInit",
10946 "running",
10947 "interrupted",
10948 "completed",
10949 "errored",
10950 "shutdown",
10951 "notFound",
10952]).annotate({ identifier: "V2ThreadStartedNotification__CollabAgentStatus" });
913610953
913710954export type V2ThreadStartedNotification__ReasoningEffort = string;
913810955export const V2ThreadStartedNotification__ReasoningEffort = Schema.String.annotate({
913910956 description: "A non-empty reasoning effort value advertised by the model.",
9140}).check(Schema.isMinLength(1));
10957}).check(
10958 Schema.isMinLength(1).annotate({
10959 expected: "a value with a length of at least 1",
10960 identifier: "V2ThreadStartedNotification__ReasoningEffort",
10961 }),
10962);
10963
10964export type V2ThreadStartedNotification__CollabAgentToolCallStatus =
10965 | "inProgress"
10966 | "completed"
10967 | "failed"
10968 | "interrupted";
10969export const V2ThreadStartedNotification__CollabAgentToolCallStatus = Schema.Literals([
10970 "inProgress",
10971 "completed",
10972 "failed",
10973 "interrupted",
10974]).annotate({ identifier: "V2ThreadStartedNotification__CollabAgentToolCallStatus" });
10975
10976export type V2ThreadStartedNotification__CollabAgentTool =
10977 | "spawnAgent"
10978 | "sendInput"
10979 | "resumeAgent"
10980 | "wait"
10981 | "closeAgent"
10982 | "sendMessage"
10983 | "followupTask"
10984 | "interruptAgent"
10985 | "listAgents";
10986export const V2ThreadStartedNotification__CollabAgentTool = Schema.Literals([
10987 "spawnAgent",
10988 "sendInput",
10989 "resumeAgent",
10990 "wait",
10991 "closeAgent",
10992 "sendMessage",
10993 "followupTask",
10994 "interruptAgent",
10995 "listAgents",
10996]).annotate({ identifier: "V2ThreadStartedNotification__CollabAgentTool" });
914110997
914210998export type V2ThreadStartedNotification__SubAgentActivityKind =
914310999 | "started"
......@@ -9149,58 +11005,7 @@ export const V2ThreadStartedNotification__SubAgentActivityKind = Schema.Literals
914911005 "interacted",
915011006 "interrupted",
915111007 "completed",
9152]);
9153
9154export type V2ThreadStartedNotification__TextElement = {
9155 readonly byteRange: { readonly end: number; readonly start: number };
9156 readonly placeholder?: string | null;
9157};
9158export const V2ThreadStartedNotification__TextElement = Schema.Struct({
9159 byteRange: Schema.Struct({
9160 end: Schema.Number.annotate({ format: "uint" })
9161 .check(Schema.isInt())
9162 .check(Schema.isGreaterThanOrEqualTo(0)),
9163 start: Schema.Number.annotate({ format: "uint" })
9164 .check(Schema.isInt())
9165 .check(Schema.isGreaterThanOrEqualTo(0)),
9166 }).annotate({
9167 description: "Byte range in the parent `text` buffer that this element occupies.",
9168 }),
9169 placeholder: Schema.optionalKey(
9170 Schema.Union([
9171 Schema.String.annotate({
9172 description: "Optional human-readable placeholder for the element, displayed in the UI.",
9173 }),
9174 Schema.Null,
9175 ]),
9176 ),
9177});
9178
9179export type V2ThreadStartedNotification__ThreadActiveFlag =
9180 | "waitingOnApproval"
9181 | "waitingOnUserInput";
9182export const V2ThreadStartedNotification__ThreadActiveFlag = Schema.Literals([
9183 "waitingOnApproval",
9184 "waitingOnUserInput",
9185]);
9186
9187export type V2ThreadStartedNotification__ThreadId = string;
9188export const V2ThreadStartedNotification__ThreadId = Schema.String;
9189
9190export type V2ThreadStartedNotification__ThreadSource = string;
9191export const V2ThreadStartedNotification__ThreadSource = Schema.String;
9192
9193export type V2ThreadStartedNotification__TurnStatus =
9194 | "completed"
9195 | "interrupted"
9196 | "failed"
9197 | "inProgress";
9198export const V2ThreadStartedNotification__TurnStatus = Schema.Literals([
9199 "completed",
9200 "interrupted",
9201 "failed",
9202 "inProgress",
9203]);
11008]).annotate({ identifier: "V2ThreadStartedNotification__SubAgentActivityKind" });
920411009
920511010export type V2ThreadStartedNotification__WebSearchAction =
920611011 | {
......@@ -9232,17 +11037,36 @@ export const V2ThreadStartedNotification__WebSearchAction = Schema.Union(
923211037 }).annotate({ title: "OtherWebSearchAction" }),
923311038 ],
923411039 { mode: "oneOf" },
9235);
11040).annotate({ identifier: "V2ThreadStartedNotification__WebSearchAction" });
923611041
9237export type V2ThreadStartParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
9238export const V2ThreadStartParams__ApprovalsReviewer = Schema.Literals([
9239 "user",
9240 "auto_review",
9241 "guardian_subagent",
9242]).annotate({
9243 description:
9244 "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.",
9245});
11042export type V2ThreadStartedNotification__TurnItemsView = "notLoaded" | "summary" | "full";
11043export const V2ThreadStartedNotification__TurnItemsView = Schema.Union(
11044 [
11045 Schema.Literal("notLoaded").annotate({
11046 description: "`items` was not loaded for this turn. The field is intentionally empty.",
11047 }),
11048 Schema.Literal("summary").annotate({
11049 description: "`items` contains only a display summary for this turn.",
11050 }),
11051 Schema.Literal("full").annotate({
11052 description:
11053 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
11054 }),
11055 ],
11056 { mode: "oneOf" },
11057).annotate({ identifier: "V2ThreadStartedNotification__TurnItemsView" });
11058
11059export type V2ThreadStartedNotification__TurnStatus =
11060 | "completed"
11061 | "interrupted"
11062 | "failed"
11063 | "inProgress";
11064export const V2ThreadStartedNotification__TurnStatus = Schema.Literals([
11065 "completed",
11066 "interrupted",
11067 "failed",
11068 "inProgress",
11069]).annotate({ identifier: "V2ThreadStartedNotification__TurnStatus" });
924611070
924711071export type V2ThreadStartParams__AskForApproval =
924811072 | "untrusted"
......@@ -9271,12 +11095,51 @@ export const V2ThreadStartParams__AskForApproval = Schema.Union(
927111095 }).annotate({ title: "GranularAskForApproval" }),
927211096 ],
927311097 { mode: "oneOf" },
9274);
11098).annotate({ identifier: "V2ThreadStartParams__AskForApproval" });
11099
11100export type V2ThreadStartParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
11101export const V2ThreadStartParams__ApprovalsReviewer = Schema.Literals([
11102 "user",
11103 "auto_review",
11104 "guardian_subagent",
11105]).annotate({
11106 description:
11107 "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.",
11108 identifier: "V2ThreadStartParams__ApprovalsReviewer",
11109});
11110
11111export type V2ThreadStartParams__Personality = "none" | "friendly" | "pragmatic";
11112export const V2ThreadStartParams__Personality = Schema.Literals([
11113 "none",
11114 "friendly",
11115 "pragmatic",
11116]).annotate({ identifier: "V2ThreadStartParams__Personality" });
11117
11118export type V2ThreadStartParams__SandboxMode =
11119 | "read-only"
11120 | "workspace-write"
11121 | "danger-full-access";
11122export const V2ThreadStartParams__SandboxMode = Schema.Literals([
11123 "read-only",
11124 "workspace-write",
11125 "danger-full-access",
11126]).annotate({ identifier: "V2ThreadStartParams__SandboxMode" });
11127
11128export type V2ThreadStartParams__ThreadStartSource = "startup" | "clear";
11129export const V2ThreadStartParams__ThreadStartSource = Schema.Literals([
11130 "startup",
11131 "clear",
11132]).annotate({ identifier: "V2ThreadStartParams__ThreadStartSource" });
11133
11134export type V2ThreadStartParams__ThreadSource = string;
11135export const V2ThreadStartParams__ThreadSource = Schema.String.annotate({
11136 identifier: "V2ThreadStartParams__ThreadSource",
11137});
927511138
927611139export type V2ThreadStartParams__DynamicToolNamespaceTool = {
927711140 readonly deferLoading?: boolean;
927811141 readonly description: string;
9279 readonly inputSchema: unknown;
11142 readonly inputSchema: Schema.Json;
928011143 readonly name: string;
928111144 readonly type: "function";
928211145};
......@@ -9285,44 +11148,44 @@ export const V2ThreadStartParams__DynamicToolNamespaceTool = Schema.Union(
928511148 Schema.Struct({
928611149 deferLoading: Schema.optionalKey(Schema.Boolean),
928711150 description: Schema.String,
9288 inputSchema: Schema.Unknown,
11151 inputSchema: Schema.Json.annotate({ expected: "JSON value" }),
928911152 name: Schema.String,
929011153 type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolNamespaceToolType" }),
929111154 }).annotate({ title: "FunctionDynamicToolNamespaceTool" }),
929211155 ],
929311156 { mode: "oneOf" },
9294);
9295
9296export type V2ThreadStartParams__LegacyAppPathString = string;
9297export const V2ThreadStartParams__LegacyAppPathString = Schema.String;
9298
9299export type V2ThreadStartParams__Personality = "none" | "friendly" | "pragmatic";
9300export const V2ThreadStartParams__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
9301
9302export type V2ThreadStartParams__SandboxMode =
9303 | "read-only"
9304 | "workspace-write"
9305 | "danger-full-access";
9306export const V2ThreadStartParams__SandboxMode = Schema.Literals([
9307 "read-only",
9308 "workspace-write",
9309 "danger-full-access",
9310]);
11157).annotate({ identifier: "V2ThreadStartParams__DynamicToolNamespaceTool" });
931111158
9312export type V2ThreadStartParams__ThreadSource = string;
9313export const V2ThreadStartParams__ThreadSource = Schema.String;
9314
9315export type V2ThreadStartParams__ThreadStartSource = "startup" | "clear";
9316export const V2ThreadStartParams__ThreadStartSource = Schema.Literals(["startup", "clear"]);
9317
9318export type V2ThreadStartResponse__AbsolutePathBuf = string;
9319export const V2ThreadStartResponse__AbsolutePathBuf = Schema.String.annotate({
9320 description:
9321 "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.",
11159export type V2ThreadStartParams__CapabilityRootLocation = {
11160 readonly environmentId: string;
11161 readonly path: string;
11162 readonly type: "environment";
11163};
11164export const V2ThreadStartParams__CapabilityRootLocation = Schema.Union(
11165 [
11166 Schema.Struct({
11167 environmentId: Schema.String,
11168 path: Schema.String.annotate({
11169 description: "Absolute path for the root in the selected environment.",
11170 }),
11171 type: Schema.Literal("environment").annotate({
11172 title: "EnvironmentCapabilityRootLocationType",
11173 }),
11174 }).annotate({
11175 title: "EnvironmentCapabilityRootLocation",
11176 description: "A path owned by an execution environment.",
11177 }),
11178 ],
11179 { mode: "oneOf" },
11180).annotate({
11181 description: "Location used to resolve a selected capability root.",
11182 identifier: "V2ThreadStartParams__CapabilityRootLocation",
932211183});
932311184
9324export type V2ThreadStartResponse__AgentPath = string;
9325export const V2ThreadStartResponse__AgentPath = Schema.String;
11185export type V2ThreadStartParams__LegacyAppPathString = string;
11186export const V2ThreadStartParams__LegacyAppPathString = Schema.String.annotate({
11187 identifier: "V2ThreadStartParams__LegacyAppPathString",
11188});
932611189
932711190export type V2ThreadStartResponse__AskForApproval =
932811191 | "untrusted"
......@@ -9351,72 +11214,46 @@ export const V2ThreadStartResponse__AskForApproval = Schema.Union(
935111214 }).annotate({ title: "GranularAskForApproval" }),
935211215 ],
935311216 { mode: "oneOf" },
9354);
11217).annotate({ identifier: "V2ThreadStartResponse__AskForApproval" });
935511218
9356export type V2ThreadStartResponse__CollabAgentStatus =
9357 | "pendingInit"
9358 | "running"
9359 | "interrupted"
9360 | "completed"
9361 | "errored"
9362 | "shutdown"
9363 | "notFound";
9364export const V2ThreadStartResponse__CollabAgentStatus = Schema.Literals([
9365 "pendingInit",
9366 "running",
9367 "interrupted",
9368 "completed",
9369 "errored",
9370 "shutdown",
9371 "notFound",
9372]);
11219export type V2ThreadStartResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
11220export const V2ThreadStartResponse__ApprovalsReviewer = Schema.Literals([
11221 "user",
11222 "auto_review",
11223 "guardian_subagent",
11224]).annotate({
11225 description:
11226 "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.",
11227 identifier: "V2ThreadStartResponse__ApprovalsReviewer",
11228});
937311229
9374export type V2ThreadStartResponse__CommandExecutionStatus =
9375 | "inProgress"
9376 | "completed"
9377 | "failed"
9378 | "declined";
9379export const V2ThreadStartResponse__CommandExecutionStatus = Schema.Literals([
9380 "inProgress",
9381 "completed",
9382 "failed",
9383 "declined",
9384]);
11230export type V2ThreadStartResponse__AbsolutePathBuf = string;
11231export const V2ThreadStartResponse__AbsolutePathBuf = Schema.String.annotate({
11232 description:
11233 "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.",
11234 identifier: "V2ThreadStartResponse__AbsolutePathBuf",
11235});
938511236
9386export type V2ThreadStartResponse__DynamicToolCallOutputContentItem =
9387 | { readonly text: string; readonly type: "inputText" }
9388 | { readonly imageUrl: string; readonly type: "inputImage" }
9389 | { readonly audioUrl: string; readonly type: "inputAudio" };
9390export const V2ThreadStartResponse__DynamicToolCallOutputContentItem = Schema.Union(
9391 [
9392 Schema.Struct({
9393 text: Schema.String,
9394 type: Schema.Literal("inputText").annotate({
9395 title: "InputTextDynamicToolCallOutputContentItemType",
9396 }),
9397 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
9398 Schema.Struct({
9399 imageUrl: Schema.String,
9400 type: Schema.Literal("inputImage").annotate({
9401 title: "InputImageDynamicToolCallOutputContentItemType",
9402 }),
9403 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
9404 Schema.Struct({
9405 audioUrl: Schema.String,
9406 type: Schema.Literal("inputAudio").annotate({
9407 title: "InputAudioDynamicToolCallOutputContentItemType",
9408 }),
9409 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
9410 ],
9411 { mode: "oneOf" },
11237export type V2ThreadStartResponse__LegacyAppPathString = string;
11238export const V2ThreadStartResponse__LegacyAppPathString = Schema.String.annotate({
11239 identifier: "V2ThreadStartResponse__LegacyAppPathString",
11240});
11241
11242export type V2ThreadStartResponse__ReasoningEffort = string;
11243export const V2ThreadStartResponse__ReasoningEffort = Schema.String.annotate({
11244 description: "A non-empty reasoning effort value advertised by the model.",
11245}).check(
11246 Schema.isMinLength(1).annotate({
11247 expected: "a value with a length of at least 1",
11248 identifier: "V2ThreadStartResponse__ReasoningEffort",
11249 }),
941211250);
941311251
9414export type V2ThreadStartResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
9415export const V2ThreadStartResponse__DynamicToolCallStatus = Schema.Literals([
9416 "inProgress",
9417 "completed",
9418 "failed",
9419]);
11252export type V2ThreadStartResponse__NetworkAccess = "restricted" | "enabled";
11253export const V2ThreadStartResponse__NetworkAccess = Schema.Literals([
11254 "restricted",
11255 "enabled",
11256]).annotate({ identifier: "V2ThreadStartResponse__NetworkAccess" });
942011257
942111258export type V2ThreadStartResponse__GitInfo = {
942211259 readonly branch?: string | null;
......@@ -9427,63 +11264,65 @@ export const V2ThreadStartResponse__GitInfo = Schema.Struct({
942711264 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
942811265 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
942911266 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11267}).annotate({ identifier: "V2ThreadStartResponse__GitInfo" });
11268
11269export type V2ThreadStartResponse__AgentPath = string;
11270export const V2ThreadStartResponse__AgentPath = Schema.String.annotate({
11271 identifier: "V2ThreadStartResponse__AgentPath",
943011272});
943111273
9432export type V2ThreadStartResponse__HookPromptFragment = {
9433 readonly hookRunId: string;
9434 readonly text: string;
9435};
9436export const V2ThreadStartResponse__HookPromptFragment = Schema.Struct({
9437 hookRunId: Schema.String,
9438 text: Schema.String,
11274export type V2ThreadStartResponse__ThreadId = string;
11275export const V2ThreadStartResponse__ThreadId = Schema.String.annotate({
11276 identifier: "V2ThreadStartResponse__ThreadId",
943911277});
944011278
9441export type V2ThreadStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
9442export const V2ThreadStartResponse__ImageDetail = Schema.Literals([
9443 "auto",
9444 "low",
9445 "high",
9446 "original",
9447]);
11279export type V2ThreadStartResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
11280export const V2ThreadStartResponse__ThreadActiveFlag = Schema.Literals([
11281 "waitingOnApproval",
11282 "waitingOnUserInput",
11283]).annotate({ identifier: "V2ThreadStartResponse__ThreadActiveFlag" });
944811284
9449export type V2ThreadStartResponse__LegacyAppPathString = string;
9450export const V2ThreadStartResponse__LegacyAppPathString = Schema.String;
11285export type V2ThreadStartResponse__ThreadSource = string;
11286export const V2ThreadStartResponse__ThreadSource = Schema.String.annotate({
11287 identifier: "V2ThreadStartResponse__ThreadSource",
11288});
945111289
9452export type V2ThreadStartResponse__McpToolCallAppContext = {
9453 readonly actionName?: string | null;
9454 readonly appName?: string | null;
9455 readonly connectorId: string;
9456 readonly linkId?: string | null;
9457 readonly resourceUri?: string | null;
9458};
9459export const V2ThreadStartResponse__McpToolCallAppContext = Schema.Struct({
9460 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9461 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9462 connectorId: Schema.String,
9463 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9464 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9465});
11290export type V2ThreadStartResponse__NonSteerableTurnKind = "review" | "compact";
11291export const V2ThreadStartResponse__NonSteerableTurnKind = Schema.Literals([
11292 "review",
11293 "compact",
11294]).annotate({ identifier: "V2ThreadStartResponse__NonSteerableTurnKind" });
946611295
9467export type V2ThreadStartResponse__McpToolCallError = { readonly message: string };
9468export const V2ThreadStartResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
11296export type V2ThreadStartResponse__ByteRange = { readonly end: number; readonly start: number };
11297export const V2ThreadStartResponse__ByteRange = Schema.Struct({
11298 end: Schema.Number.annotate({ format: "uint" })
11299 .check(Schema.isInt().annotate({ expected: "an integer" }))
11300 .check(
11301 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
11302 ),
11303 start: Schema.Number.annotate({ format: "uint" })
11304 .check(Schema.isInt().annotate({ expected: "an integer" }))
11305 .check(
11306 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
11307 ),
11308}).annotate({ identifier: "V2ThreadStartResponse__ByteRange" });
946911309
9470export type V2ThreadStartResponse__McpToolCallResult = {
9471 readonly _meta?: unknown;
9472 readonly content: ReadonlyArray<unknown>;
9473 readonly structuredContent?: unknown;
9474};
9475export const V2ThreadStartResponse__McpToolCallResult = Schema.Struct({
9476 _meta: Schema.optionalKey(Schema.Unknown),
9477 content: Schema.Array(Schema.Unknown),
9478 structuredContent: Schema.optionalKey(Schema.Unknown),
9479});
11310export type V2ThreadStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
11311export const V2ThreadStartResponse__ImageDetail = Schema.Literals([
11312 "auto",
11313 "low",
11314 "high",
11315 "original",
11316]).annotate({ identifier: "V2ThreadStartResponse__ImageDetail" });
948011317
9481export type V2ThreadStartResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
9482export const V2ThreadStartResponse__McpToolCallStatus = Schema.Literals([
9483 "inProgress",
9484 "completed",
9485 "failed",
9486]);
11318export type V2ThreadStartResponse__HookPromptFragment = {
11319 readonly hookRunId: string;
11320 readonly text: string;
11321};
11322export const V2ThreadStartResponse__HookPromptFragment = Schema.Struct({
11323 hookRunId: Schema.String,
11324 text: Schema.String,
11325}).annotate({ identifier: "V2ThreadStartResponse__HookPromptFragment" });
948711326
948811327export type V2ThreadStartResponse__MemoryCitationEntry = {
948911328 readonly lineEnd: number;
......@@ -9493,38 +11332,60 @@ export type V2ThreadStartResponse__MemoryCitationEntry = {
949311332};
949411333export const V2ThreadStartResponse__MemoryCitationEntry = Schema.Struct({
949511334 lineEnd: Schema.Number.annotate({ format: "uint32" })
9496 .check(Schema.isInt())
9497 .check(Schema.isGreaterThanOrEqualTo(0)),
11335 .check(Schema.isInt().annotate({ expected: "an integer" }))
11336 .check(
11337 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
11338 ),
949811339 lineStart: Schema.Number.annotate({ format: "uint32" })
9499 .check(Schema.isInt())
9500 .check(Schema.isGreaterThanOrEqualTo(0)),
11340 .check(Schema.isInt().annotate({ expected: "an integer" }))
11341 .check(
11342 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
11343 ),
950111344 note: Schema.String,
950211345 path: Schema.String,
9503});
11346}).annotate({ identifier: "V2ThreadStartResponse__MemoryCitationEntry" });
950411347
950511348export type V2ThreadStartResponse__MessagePhase = "commentary" | "final_answer";
9506export const V2ThreadStartResponse__MessagePhase = Schema.Literals([
9507 "commentary",
9508 "final_answer",
9509]).annotate({
11349export const V2ThreadStartResponse__MessagePhase = Schema.Union(
11350 [
11351 Schema.Literal("commentary").annotate({
11352 description:
11353 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
11354 }),
11355 Schema.Literal("final_answer").annotate({
11356 description: "The assistant's terminal answer text for the current turn.",
11357 }),
11358 ],
11359 { mode: "oneOf" },
11360).annotate({
951011361 description:
951111362 '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.',
11363 identifier: "V2ThreadStartResponse__MessagePhase",
951211364});
951311365
9514export type V2ThreadStartResponse__NonSteerableTurnKind = "review" | "compact";
9515export const V2ThreadStartResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
11366export type V2ThreadStartResponse__CommandExecutionSource =
11367 | "agent"
11368 | "userShell"
11369 | "unifiedExecStartup"
11370 | "unifiedExecInteraction";
11371export const V2ThreadStartResponse__CommandExecutionSource = Schema.Literals([
11372 "agent",
11373 "userShell",
11374 "unifiedExecStartup",
11375 "unifiedExecInteraction",
11376]).annotate({ identifier: "V2ThreadStartResponse__CommandExecutionSource" });
951611377
9517export type V2ThreadStartResponse__PatchApplyStatus =
11378export type V2ThreadStartResponse__CommandExecutionStatus =
951811379 | "inProgress"
951911380 | "completed"
952011381 | "failed"
952111382 | "declined";
9522export const V2ThreadStartResponse__PatchApplyStatus = Schema.Literals([
11383export const V2ThreadStartResponse__CommandExecutionStatus = Schema.Literals([
952311384 "inProgress",
952411385 "completed",
952511386 "failed",
952611387 "declined",
9527]);
11388]).annotate({ identifier: "V2ThreadStartResponse__CommandExecutionStatus" });
952811389
952911390export type V2ThreadStartResponse__PatchChangeKind =
953011391 | { readonly type: "add" }
......@@ -9544,73 +11405,156 @@ export const V2ThreadStartResponse__PatchChangeKind = Schema.Union(
954411405 }).annotate({ title: "UpdatePatchChangeKind" }),
954511406 ],
954611407 { mode: "oneOf" },
9547);
9548
9549export type V2ThreadStartResponse__ReasoningEffort = string;
9550export const V2ThreadStartResponse__ReasoningEffort = Schema.String.annotate({
9551 description: "A non-empty reasoning effort value advertised by the model.",
9552}).check(Schema.isMinLength(1));
11408).annotate({ identifier: "V2ThreadStartResponse__PatchChangeKind" });
955311409
9554export type V2ThreadStartResponse__SubAgentActivityKind =
9555 | "started"
9556 | "interacted"
9557 | "interrupted"
9558 | "completed";
9559export const V2ThreadStartResponse__SubAgentActivityKind = Schema.Literals([
9560 "started",
9561 "interacted",
9562 "interrupted",
11410export type V2ThreadStartResponse__PatchApplyStatus =
11411 | "inProgress"
11412 | "completed"
11413 | "failed"
11414 | "declined";
11415export const V2ThreadStartResponse__PatchApplyStatus = Schema.Literals([
11416 "inProgress",
956311417 "completed",
9564]);
11418 "failed",
11419 "declined",
11420]).annotate({ identifier: "V2ThreadStartResponse__PatchApplyStatus" });
956511421
9566export type V2ThreadStartResponse__TextElement = {
9567 readonly byteRange: { readonly end: number; readonly start: number };
9568 readonly placeholder?: string | null;
11422export type V2ThreadStartResponse__McpToolCallAppContext = {
11423 readonly actionName?: string | null;
11424 readonly appName?: string | null;
11425 readonly connectorId: string;
11426 readonly linkId?: string | null;
11427 readonly resourceUri?: string | null;
956911428};
9570export const V2ThreadStartResponse__TextElement = Schema.Struct({
9571 byteRange: Schema.Struct({
9572 end: Schema.Number.annotate({ format: "uint" })
9573 .check(Schema.isInt())
9574 .check(Schema.isGreaterThanOrEqualTo(0)),
9575 start: Schema.Number.annotate({ format: "uint" })
9576 .check(Schema.isInt())
9577 .check(Schema.isGreaterThanOrEqualTo(0)),
9578 }).annotate({
9579 description: "Byte range in the parent `text` buffer that this element occupies.",
9580 }),
9581 placeholder: Schema.optionalKey(
9582 Schema.Union([
9583 Schema.String.annotate({
9584 description: "Optional human-readable placeholder for the element, displayed in the UI.",
9585 }),
9586 Schema.Null,
9587 ]),
9588 ),
9589});
11429export const V2ThreadStartResponse__McpToolCallAppContext = Schema.Struct({
11430 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11431 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11432 connectorId: Schema.String,
11433 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11434 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11435}).annotate({ identifier: "V2ThreadStartResponse__McpToolCallAppContext" });
959011436
9591export type V2ThreadStartResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
9592export const V2ThreadStartResponse__ThreadActiveFlag = Schema.Literals([
9593 "waitingOnApproval",
9594 "waitingOnUserInput",
9595]);
11437export type V2ThreadStartResponse__McpToolCallError = { readonly message: string };
11438export const V2ThreadStartResponse__McpToolCallError = Schema.Struct({
11439 message: Schema.String,
11440}).annotate({ identifier: "V2ThreadStartResponse__McpToolCallError" });
959611441
9597export type V2ThreadStartResponse__ThreadId = string;
9598export const V2ThreadStartResponse__ThreadId = Schema.String;
11442export type V2ThreadStartResponse__McpToolCallResult = {
11443 readonly _meta?: Schema.Json;
11444 readonly content: ReadonlyArray<Schema.Json>;
11445 readonly structuredContent?: Schema.Json;
11446};
11447export const V2ThreadStartResponse__McpToolCallResult = Schema.Struct({
11448 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
11449 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
11450 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
11451}).annotate({ identifier: "V2ThreadStartResponse__McpToolCallResult" });
959911452
9600export type V2ThreadStartResponse__ThreadSource = string;
9601export const V2ThreadStartResponse__ThreadSource = Schema.String;
11453export type V2ThreadStartResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
11454export const V2ThreadStartResponse__McpToolCallStatus = Schema.Literals([
11455 "inProgress",
11456 "completed",
11457 "failed",
11458]).annotate({ identifier: "V2ThreadStartResponse__McpToolCallStatus" });
960211459
9603export type V2ThreadStartResponse__TurnStatus =
9604 | "completed"
11460export type V2ThreadStartResponse__DynamicToolCallOutputContentItem =
11461 | { readonly text: string; readonly type: "inputText" }
11462 | { readonly imageUrl: string; readonly type: "inputImage" }
11463 | { readonly audioUrl: string; readonly type: "inputAudio" };
11464export const V2ThreadStartResponse__DynamicToolCallOutputContentItem = Schema.Union(
11465 [
11466 Schema.Struct({
11467 text: Schema.String,
11468 type: Schema.Literal("inputText").annotate({
11469 title: "InputTextDynamicToolCallOutputContentItemType",
11470 }),
11471 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
11472 Schema.Struct({
11473 imageUrl: Schema.String,
11474 type: Schema.Literal("inputImage").annotate({
11475 title: "InputImageDynamicToolCallOutputContentItemType",
11476 }),
11477 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
11478 Schema.Struct({
11479 audioUrl: Schema.String,
11480 type: Schema.Literal("inputAudio").annotate({
11481 title: "InputAudioDynamicToolCallOutputContentItemType",
11482 }),
11483 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
11484 ],
11485 { mode: "oneOf" },
11486).annotate({ identifier: "V2ThreadStartResponse__DynamicToolCallOutputContentItem" });
11487
11488export type V2ThreadStartResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
11489export const V2ThreadStartResponse__DynamicToolCallStatus = Schema.Literals([
11490 "inProgress",
11491 "completed",
11492 "failed",
11493]).annotate({ identifier: "V2ThreadStartResponse__DynamicToolCallStatus" });
11494
11495export type V2ThreadStartResponse__CollabAgentStatus =
11496 | "pendingInit"
11497 | "running"
960511498 | "interrupted"
11499 | "completed"
11500 | "errored"
11501 | "shutdown"
11502 | "notFound";
11503export const V2ThreadStartResponse__CollabAgentStatus = Schema.Literals([
11504 "pendingInit",
11505 "running",
11506 "interrupted",
11507 "completed",
11508 "errored",
11509 "shutdown",
11510 "notFound",
11511]).annotate({ identifier: "V2ThreadStartResponse__CollabAgentStatus" });
11512
11513export type V2ThreadStartResponse__CollabAgentToolCallStatus =
11514 | "inProgress"
11515 | "completed"
960611516 | "failed"
9607 | "inProgress";
9608export const V2ThreadStartResponse__TurnStatus = Schema.Literals([
11517 | "interrupted";
11518export const V2ThreadStartResponse__CollabAgentToolCallStatus = Schema.Literals([
11519 "inProgress",
960911520 "completed",
9610 "interrupted",
961111521 "failed",
9612 "inProgress",
9613]);
11522 "interrupted",
11523]).annotate({ identifier: "V2ThreadStartResponse__CollabAgentToolCallStatus" });
11524
11525export type V2ThreadStartResponse__CollabAgentTool =
11526 | "spawnAgent"
11527 | "sendInput"
11528 | "resumeAgent"
11529 | "wait"
11530 | "closeAgent"
11531 | "sendMessage"
11532 | "followupTask"
11533 | "interruptAgent"
11534 | "listAgents";
11535export const V2ThreadStartResponse__CollabAgentTool = Schema.Literals([
11536 "spawnAgent",
11537 "sendInput",
11538 "resumeAgent",
11539 "wait",
11540 "closeAgent",
11541 "sendMessage",
11542 "followupTask",
11543 "interruptAgent",
11544 "listAgents",
11545]).annotate({ identifier: "V2ThreadStartResponse__CollabAgentTool" });
11546
11547export type V2ThreadStartResponse__SubAgentActivityKind =
11548 | "started"
11549 | "interacted"
11550 | "interrupted"
11551 | "completed";
11552export const V2ThreadStartResponse__SubAgentActivityKind = Schema.Literals([
11553 "started",
11554 "interacted",
11555 "interrupted",
11556 "completed",
11557]).annotate({ identifier: "V2ThreadStartResponse__SubAgentActivityKind" });
961411558
961511559export type V2ThreadStartResponse__WebSearchAction =
961611560 | {
......@@ -9642,7 +11586,36 @@ export const V2ThreadStartResponse__WebSearchAction = Schema.Union(
964211586 }).annotate({ title: "OtherWebSearchAction" }),
964311587 ],
964411588 { mode: "oneOf" },
9645);
11589).annotate({ identifier: "V2ThreadStartResponse__WebSearchAction" });
11590
11591export type V2ThreadStartResponse__TurnItemsView = "notLoaded" | "summary" | "full";
11592export const V2ThreadStartResponse__TurnItemsView = Schema.Union(
11593 [
11594 Schema.Literal("notLoaded").annotate({
11595 description: "`items` was not loaded for this turn. The field is intentionally empty.",
11596 }),
11597 Schema.Literal("summary").annotate({
11598 description: "`items` contains only a display summary for this turn.",
11599 }),
11600 Schema.Literal("full").annotate({
11601 description:
11602 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
11603 }),
11604 ],
11605 { mode: "oneOf" },
11606).annotate({ identifier: "V2ThreadStartResponse__TurnItemsView" });
11607
11608export type V2ThreadStartResponse__TurnStatus =
11609 | "completed"
11610 | "interrupted"
11611 | "failed"
11612 | "inProgress";
11613export const V2ThreadStartResponse__TurnStatus = Schema.Literals([
11614 "completed",
11615 "interrupted",
11616 "failed",
11617 "inProgress",
11618]).annotate({ identifier: "V2ThreadStartResponse__TurnStatus" });
964611619
964711620export type V2ThreadStatusChangedNotification__ThreadActiveFlag =
964811621 | "waitingOnApproval"
......@@ -9650,7 +11623,7 @@ export type V2ThreadStatusChangedNotification__ThreadActiveFlag =
965011623export const V2ThreadStatusChangedNotification__ThreadActiveFlag = Schema.Literals([
965111624 "waitingOnApproval",
965211625 "waitingOnUserInput",
9653]);
11626]).annotate({ identifier: "V2ThreadStatusChangedNotification__ThreadActiveFlag" });
965411627
965511628export type V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = {
965611629 readonly cacheWriteInputTokens?: number;
......@@ -9662,92 +11635,34 @@ export type V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = {
966211635};
966311636export const V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = Schema.Struct({
966411637 cacheWriteInputTokens: Schema.optionalKey(
9665 Schema.Number.annotate({ default: 0, format: "int64" }).check(Schema.isInt()),
11638 Schema.Number.annotate({ default: 0, format: "int64" }).check(
11639 Schema.isInt().annotate({ expected: "an integer" }),
11640 ),
966611641 ),
9667 cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
9668 inputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
9669 outputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
9670 reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
9671 totalTokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
9672});
11642 cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(
11643 Schema.isInt().annotate({ expected: "an integer" }),
11644 ),
11645 inputTokens: Schema.Number.annotate({ format: "int64" }).check(
11646 Schema.isInt().annotate({ expected: "an integer" }),
11647 ),
11648 outputTokens: Schema.Number.annotate({ format: "int64" }).check(
11649 Schema.isInt().annotate({ expected: "an integer" }),
11650 ),
11651 reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(
11652 Schema.isInt().annotate({ expected: "an integer" }),
11653 ),
11654 totalTokens: Schema.Number.annotate({ format: "int64" }).check(
11655 Schema.isInt().annotate({ expected: "an integer" }),
11656 ),
11657}).annotate({ identifier: "V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown" });
967311658
967411659export type V2ThreadUnarchiveResponse__AbsolutePathBuf = string;
967511660export const V2ThreadUnarchiveResponse__AbsolutePathBuf = Schema.String.annotate({
967611661 description:
967711662 "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.",
11663 identifier: "V2ThreadUnarchiveResponse__AbsolutePathBuf",
967811664});
967911665
9680export type V2ThreadUnarchiveResponse__AgentPath = string;
9681export const V2ThreadUnarchiveResponse__AgentPath = Schema.String;
9682
9683export type V2ThreadUnarchiveResponse__CollabAgentStatus =
9684 | "pendingInit"
9685 | "running"
9686 | "interrupted"
9687 | "completed"
9688 | "errored"
9689 | "shutdown"
9690 | "notFound";
9691export const V2ThreadUnarchiveResponse__CollabAgentStatus = Schema.Literals([
9692 "pendingInit",
9693 "running",
9694 "interrupted",
9695 "completed",
9696 "errored",
9697 "shutdown",
9698 "notFound",
9699]);
9700
9701export type V2ThreadUnarchiveResponse__CommandExecutionStatus =
9702 | "inProgress"
9703 | "completed"
9704 | "failed"
9705 | "declined";
9706export const V2ThreadUnarchiveResponse__CommandExecutionStatus = Schema.Literals([
9707 "inProgress",
9708 "completed",
9709 "failed",
9710 "declined",
9711]);
9712
9713export type V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem =
9714 | { readonly text: string; readonly type: "inputText" }
9715 | { readonly imageUrl: string; readonly type: "inputImage" }
9716 | { readonly audioUrl: string; readonly type: "inputAudio" };
9717export const V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem = Schema.Union(
9718 [
9719 Schema.Struct({
9720 text: Schema.String,
9721 type: Schema.Literal("inputText").annotate({
9722 title: "InputTextDynamicToolCallOutputContentItemType",
9723 }),
9724 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
9725 Schema.Struct({
9726 imageUrl: Schema.String,
9727 type: Schema.Literal("inputImage").annotate({
9728 title: "InputImageDynamicToolCallOutputContentItemType",
9729 }),
9730 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
9731 Schema.Struct({
9732 audioUrl: Schema.String,
9733 type: Schema.Literal("inputAudio").annotate({
9734 title: "InputAudioDynamicToolCallOutputContentItemType",
9735 }),
9736 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
9737 ],
9738 { mode: "oneOf" },
9739);
9740
9741export type V2ThreadUnarchiveResponse__DynamicToolCallStatus =
9742 | "inProgress"
9743 | "completed"
9744 | "failed";
9745export const V2ThreadUnarchiveResponse__DynamicToolCallStatus = Schema.Literals([
9746 "inProgress",
9747 "completed",
9748 "failed",
9749]);
9750
975111666export type V2ThreadUnarchiveResponse__GitInfo = {
975211667 readonly branch?: string | null;
975311668 readonly originUrl?: string | null;
......@@ -9757,65 +11672,67 @@ export const V2ThreadUnarchiveResponse__GitInfo = Schema.Struct({
975711672 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
975811673 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
975911674 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11675}).annotate({ identifier: "V2ThreadUnarchiveResponse__GitInfo" });
11676
11677export type V2ThreadUnarchiveResponse__AgentPath = string;
11678export const V2ThreadUnarchiveResponse__AgentPath = Schema.String.annotate({
11679 identifier: "V2ThreadUnarchiveResponse__AgentPath",
976011680});
976111681
9762export type V2ThreadUnarchiveResponse__HookPromptFragment = {
9763 readonly hookRunId: string;
9764 readonly text: string;
9765};
9766export const V2ThreadUnarchiveResponse__HookPromptFragment = Schema.Struct({
9767 hookRunId: Schema.String,
9768 text: Schema.String,
11682export type V2ThreadUnarchiveResponse__ThreadId = string;
11683export const V2ThreadUnarchiveResponse__ThreadId = Schema.String.annotate({
11684 identifier: "V2ThreadUnarchiveResponse__ThreadId",
11685});
11686
11687export type V2ThreadUnarchiveResponse__ThreadActiveFlag =
11688 | "waitingOnApproval"
11689 | "waitingOnUserInput";
11690export const V2ThreadUnarchiveResponse__ThreadActiveFlag = Schema.Literals([
11691 "waitingOnApproval",
11692 "waitingOnUserInput",
11693]).annotate({ identifier: "V2ThreadUnarchiveResponse__ThreadActiveFlag" });
11694
11695export type V2ThreadUnarchiveResponse__ThreadSource = string;
11696export const V2ThreadUnarchiveResponse__ThreadSource = Schema.String.annotate({
11697 identifier: "V2ThreadUnarchiveResponse__ThreadSource",
976911698});
977011699
11700export type V2ThreadUnarchiveResponse__NonSteerableTurnKind = "review" | "compact";
11701export const V2ThreadUnarchiveResponse__NonSteerableTurnKind = Schema.Literals([
11702 "review",
11703 "compact",
11704]).annotate({ identifier: "V2ThreadUnarchiveResponse__NonSteerableTurnKind" });
11705
11706export type V2ThreadUnarchiveResponse__ByteRange = { readonly end: number; readonly start: number };
11707export const V2ThreadUnarchiveResponse__ByteRange = Schema.Struct({
11708 end: Schema.Number.annotate({ format: "uint" })
11709 .check(Schema.isInt().annotate({ expected: "an integer" }))
11710 .check(
11711 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
11712 ),
11713 start: Schema.Number.annotate({ format: "uint" })
11714 .check(Schema.isInt().annotate({ expected: "an integer" }))
11715 .check(
11716 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
11717 ),
11718}).annotate({ identifier: "V2ThreadUnarchiveResponse__ByteRange" });
11719
977111720export type V2ThreadUnarchiveResponse__ImageDetail = "auto" | "low" | "high" | "original";
977211721export const V2ThreadUnarchiveResponse__ImageDetail = Schema.Literals([
977311722 "auto",
977411723 "low",
977511724 "high",
977611725 "original",
9777]);
9778
9779export type V2ThreadUnarchiveResponse__LegacyAppPathString = string;
9780export const V2ThreadUnarchiveResponse__LegacyAppPathString = Schema.String;
9781
9782export type V2ThreadUnarchiveResponse__McpToolCallAppContext = {
9783 readonly actionName?: string | null;
9784 readonly appName?: string | null;
9785 readonly connectorId: string;
9786 readonly linkId?: string | null;
9787 readonly resourceUri?: string | null;
9788};
9789export const V2ThreadUnarchiveResponse__McpToolCallAppContext = Schema.Struct({
9790 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9791 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9792 connectorId: Schema.String,
9793 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9794 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9795});
11726]).annotate({ identifier: "V2ThreadUnarchiveResponse__ImageDetail" });
979611727
9797export type V2ThreadUnarchiveResponse__McpToolCallError = { readonly message: string };
9798export const V2ThreadUnarchiveResponse__McpToolCallError = Schema.Struct({
9799 message: Schema.String,
9800});
9801
9802export type V2ThreadUnarchiveResponse__McpToolCallResult = {
9803 readonly _meta?: unknown;
9804 readonly content: ReadonlyArray<unknown>;
9805 readonly structuredContent?: unknown;
11728export type V2ThreadUnarchiveResponse__HookPromptFragment = {
11729 readonly hookRunId: string;
11730 readonly text: string;
980611731};
9807export const V2ThreadUnarchiveResponse__McpToolCallResult = Schema.Struct({
9808 _meta: Schema.optionalKey(Schema.Unknown),
9809 content: Schema.Array(Schema.Unknown),
9810 structuredContent: Schema.optionalKey(Schema.Unknown),
9811});
9812
9813export type V2ThreadUnarchiveResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
9814export const V2ThreadUnarchiveResponse__McpToolCallStatus = Schema.Literals([
9815 "inProgress",
9816 "completed",
9817 "failed",
9818]);
11732export const V2ThreadUnarchiveResponse__HookPromptFragment = Schema.Struct({
11733 hookRunId: Schema.String,
11734 text: Schema.String,
11735}).annotate({ identifier: "V2ThreadUnarchiveResponse__HookPromptFragment" });
981911736
982011737export type V2ThreadUnarchiveResponse__MemoryCitationEntry = {
982111738 readonly lineEnd: number;
......@@ -9825,41 +11742,65 @@ export type V2ThreadUnarchiveResponse__MemoryCitationEntry = {
982511742};
982611743export const V2ThreadUnarchiveResponse__MemoryCitationEntry = Schema.Struct({
982711744 lineEnd: Schema.Number.annotate({ format: "uint32" })
9828 .check(Schema.isInt())
9829 .check(Schema.isGreaterThanOrEqualTo(0)),
11745 .check(Schema.isInt().annotate({ expected: "an integer" }))
11746 .check(
11747 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
11748 ),
983011749 lineStart: Schema.Number.annotate({ format: "uint32" })
9831 .check(Schema.isInt())
9832 .check(Schema.isGreaterThanOrEqualTo(0)),
11750 .check(Schema.isInt().annotate({ expected: "an integer" }))
11751 .check(
11752 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
11753 ),
983311754 note: Schema.String,
983411755 path: Schema.String,
9835});
11756}).annotate({ identifier: "V2ThreadUnarchiveResponse__MemoryCitationEntry" });
983611757
983711758export type V2ThreadUnarchiveResponse__MessagePhase = "commentary" | "final_answer";
9838export const V2ThreadUnarchiveResponse__MessagePhase = Schema.Literals([
9839 "commentary",
9840 "final_answer",
9841]).annotate({
11759export const V2ThreadUnarchiveResponse__MessagePhase = Schema.Union(
11760 [
11761 Schema.Literal("commentary").annotate({
11762 description:
11763 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
11764 }),
11765 Schema.Literal("final_answer").annotate({
11766 description: "The assistant's terminal answer text for the current turn.",
11767 }),
11768 ],
11769 { mode: "oneOf" },
11770).annotate({
984211771 description:
984311772 '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.',
11773 identifier: "V2ThreadUnarchiveResponse__MessagePhase",
984411774});
984511775
9846export type V2ThreadUnarchiveResponse__NonSteerableTurnKind = "review" | "compact";
9847export const V2ThreadUnarchiveResponse__NonSteerableTurnKind = Schema.Literals([
9848 "review",
9849 "compact",
9850]);
11776export type V2ThreadUnarchiveResponse__LegacyAppPathString = string;
11777export const V2ThreadUnarchiveResponse__LegacyAppPathString = Schema.String.annotate({
11778 identifier: "V2ThreadUnarchiveResponse__LegacyAppPathString",
11779});
985111780
9852export type V2ThreadUnarchiveResponse__PatchApplyStatus =
11781export type V2ThreadUnarchiveResponse__CommandExecutionSource =
11782 | "agent"
11783 | "userShell"
11784 | "unifiedExecStartup"
11785 | "unifiedExecInteraction";
11786export const V2ThreadUnarchiveResponse__CommandExecutionSource = Schema.Literals([
11787 "agent",
11788 "userShell",
11789 "unifiedExecStartup",
11790 "unifiedExecInteraction",
11791]).annotate({ identifier: "V2ThreadUnarchiveResponse__CommandExecutionSource" });
11792
11793export type V2ThreadUnarchiveResponse__CommandExecutionStatus =
985311794 | "inProgress"
985411795 | "completed"
985511796 | "failed"
985611797 | "declined";
9857export const V2ThreadUnarchiveResponse__PatchApplyStatus = Schema.Literals([
11798export const V2ThreadUnarchiveResponse__CommandExecutionStatus = Schema.Literals([
985811799 "inProgress",
985911800 "completed",
986011801 "failed",
986111802 "declined",
9862]);
11803]).annotate({ identifier: "V2ThreadUnarchiveResponse__CommandExecutionStatus" });
986311804
986411805export type V2ThreadUnarchiveResponse__PatchChangeKind =
986511806 | { readonly type: "add" }
......@@ -9879,75 +11820,169 @@ export const V2ThreadUnarchiveResponse__PatchChangeKind = Schema.Union(
987911820 }).annotate({ title: "UpdatePatchChangeKind" }),
988011821 ],
988111822 { mode: "oneOf" },
9882);
9883
9884export type V2ThreadUnarchiveResponse__ReasoningEffort = string;
9885export const V2ThreadUnarchiveResponse__ReasoningEffort = Schema.String.annotate({
9886 description: "A non-empty reasoning effort value advertised by the model.",
9887}).check(Schema.isMinLength(1));
11823).annotate({ identifier: "V2ThreadUnarchiveResponse__PatchChangeKind" });
988811824
9889export type V2ThreadUnarchiveResponse__SubAgentActivityKind =
9890 | "started"
9891 | "interacted"
9892 | "interrupted"
9893 | "completed";
9894export const V2ThreadUnarchiveResponse__SubAgentActivityKind = Schema.Literals([
9895 "started",
9896 "interacted",
9897 "interrupted",
11825export type V2ThreadUnarchiveResponse__PatchApplyStatus =
11826 | "inProgress"
11827 | "completed"
11828 | "failed"
11829 | "declined";
11830export const V2ThreadUnarchiveResponse__PatchApplyStatus = Schema.Literals([
11831 "inProgress",
989811832 "completed",
9899]);
11833 "failed",
11834 "declined",
11835]).annotate({ identifier: "V2ThreadUnarchiveResponse__PatchApplyStatus" });
990011836
9901export type V2ThreadUnarchiveResponse__TextElement = {
9902 readonly byteRange: { readonly end: number; readonly start: number };
9903 readonly placeholder?: string | null;
11837export type V2ThreadUnarchiveResponse__McpToolCallAppContext = {
11838 readonly actionName?: string | null;
11839 readonly appName?: string | null;
11840 readonly connectorId: string;
11841 readonly linkId?: string | null;
11842 readonly resourceUri?: string | null;
990411843};
9905export const V2ThreadUnarchiveResponse__TextElement = Schema.Struct({
9906 byteRange: Schema.Struct({
9907 end: Schema.Number.annotate({ format: "uint" })
9908 .check(Schema.isInt())
9909 .check(Schema.isGreaterThanOrEqualTo(0)),
9910 start: Schema.Number.annotate({ format: "uint" })
9911 .check(Schema.isInt())
9912 .check(Schema.isGreaterThanOrEqualTo(0)),
9913 }).annotate({
9914 description: "Byte range in the parent `text` buffer that this element occupies.",
9915 }),
9916 placeholder: Schema.optionalKey(
9917 Schema.Union([
9918 Schema.String.annotate({
9919 description: "Optional human-readable placeholder for the element, displayed in the UI.",
9920 }),
9921 Schema.Null,
9922 ]),
9923 ),
9924});
11844export const V2ThreadUnarchiveResponse__McpToolCallAppContext = Schema.Struct({
11845 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11846 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11847 connectorId: Schema.String,
11848 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11849 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11850}).annotate({ identifier: "V2ThreadUnarchiveResponse__McpToolCallAppContext" });
992511851
9926export type V2ThreadUnarchiveResponse__ThreadActiveFlag =
9927 | "waitingOnApproval"
9928 | "waitingOnUserInput";
9929export const V2ThreadUnarchiveResponse__ThreadActiveFlag = Schema.Literals([
9930 "waitingOnApproval",
9931 "waitingOnUserInput",
9932]);
11852export type V2ThreadUnarchiveResponse__McpToolCallError = { readonly message: string };
11853export const V2ThreadUnarchiveResponse__McpToolCallError = Schema.Struct({
11854 message: Schema.String,
11855}).annotate({ identifier: "V2ThreadUnarchiveResponse__McpToolCallError" });
993311856
9934export type V2ThreadUnarchiveResponse__ThreadId = string;
9935export const V2ThreadUnarchiveResponse__ThreadId = Schema.String;
11857export type V2ThreadUnarchiveResponse__McpToolCallResult = {
11858 readonly _meta?: Schema.Json;
11859 readonly content: ReadonlyArray<Schema.Json>;
11860 readonly structuredContent?: Schema.Json;
11861};
11862export const V2ThreadUnarchiveResponse__McpToolCallResult = Schema.Struct({
11863 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
11864 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
11865 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
11866}).annotate({ identifier: "V2ThreadUnarchiveResponse__McpToolCallResult" });
993611867
9937export type V2ThreadUnarchiveResponse__ThreadSource = string;
9938export const V2ThreadUnarchiveResponse__ThreadSource = Schema.String;
11868export type V2ThreadUnarchiveResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
11869export const V2ThreadUnarchiveResponse__McpToolCallStatus = Schema.Literals([
11870 "inProgress",
11871 "completed",
11872 "failed",
11873]).annotate({ identifier: "V2ThreadUnarchiveResponse__McpToolCallStatus" });
993911874
9940export type V2ThreadUnarchiveResponse__TurnStatus =
9941 | "completed"
11875export type V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem =
11876 | { readonly text: string; readonly type: "inputText" }
11877 | { readonly imageUrl: string; readonly type: "inputImage" }
11878 | { readonly audioUrl: string; readonly type: "inputAudio" };
11879export const V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem = Schema.Union(
11880 [
11881 Schema.Struct({
11882 text: Schema.String,
11883 type: Schema.Literal("inputText").annotate({
11884 title: "InputTextDynamicToolCallOutputContentItemType",
11885 }),
11886 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
11887 Schema.Struct({
11888 imageUrl: Schema.String,
11889 type: Schema.Literal("inputImage").annotate({
11890 title: "InputImageDynamicToolCallOutputContentItemType",
11891 }),
11892 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
11893 Schema.Struct({
11894 audioUrl: Schema.String,
11895 type: Schema.Literal("inputAudio").annotate({
11896 title: "InputAudioDynamicToolCallOutputContentItemType",
11897 }),
11898 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
11899 ],
11900 { mode: "oneOf" },
11901).annotate({ identifier: "V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem" });
11902
11903export type V2ThreadUnarchiveResponse__DynamicToolCallStatus =
11904 | "inProgress"
11905 | "completed"
11906 | "failed";
11907export const V2ThreadUnarchiveResponse__DynamicToolCallStatus = Schema.Literals([
11908 "inProgress",
11909 "completed",
11910 "failed",
11911]).annotate({ identifier: "V2ThreadUnarchiveResponse__DynamicToolCallStatus" });
11912
11913export type V2ThreadUnarchiveResponse__CollabAgentStatus =
11914 | "pendingInit"
11915 | "running"
994211916 | "interrupted"
11917 | "completed"
11918 | "errored"
11919 | "shutdown"
11920 | "notFound";
11921export const V2ThreadUnarchiveResponse__CollabAgentStatus = Schema.Literals([
11922 "pendingInit",
11923 "running",
11924 "interrupted",
11925 "completed",
11926 "errored",
11927 "shutdown",
11928 "notFound",
11929]).annotate({ identifier: "V2ThreadUnarchiveResponse__CollabAgentStatus" });
11930
11931export type V2ThreadUnarchiveResponse__ReasoningEffort = string;
11932export const V2ThreadUnarchiveResponse__ReasoningEffort = Schema.String.annotate({
11933 description: "A non-empty reasoning effort value advertised by the model.",
11934}).check(
11935 Schema.isMinLength(1).annotate({
11936 expected: "a value with a length of at least 1",
11937 identifier: "V2ThreadUnarchiveResponse__ReasoningEffort",
11938 }),
11939);
11940
11941export type V2ThreadUnarchiveResponse__CollabAgentToolCallStatus =
11942 | "inProgress"
11943 | "completed"
994311944 | "failed"
9944 | "inProgress";
9945export const V2ThreadUnarchiveResponse__TurnStatus = Schema.Literals([
11945 | "interrupted";
11946export const V2ThreadUnarchiveResponse__CollabAgentToolCallStatus = Schema.Literals([
11947 "inProgress",
994611948 "completed",
9947 "interrupted",
994811949 "failed",
9949 "inProgress",
9950]);
11950 "interrupted",
11951]).annotate({ identifier: "V2ThreadUnarchiveResponse__CollabAgentToolCallStatus" });
11952
11953export type V2ThreadUnarchiveResponse__CollabAgentTool =
11954 | "spawnAgent"
11955 | "sendInput"
11956 | "resumeAgent"
11957 | "wait"
11958 | "closeAgent"
11959 | "sendMessage"
11960 | "followupTask"
11961 | "interruptAgent"
11962 | "listAgents";
11963export const V2ThreadUnarchiveResponse__CollabAgentTool = Schema.Literals([
11964 "spawnAgent",
11965 "sendInput",
11966 "resumeAgent",
11967 "wait",
11968 "closeAgent",
11969 "sendMessage",
11970 "followupTask",
11971 "interruptAgent",
11972 "listAgents",
11973]).annotate({ identifier: "V2ThreadUnarchiveResponse__CollabAgentTool" });
11974
11975export type V2ThreadUnarchiveResponse__SubAgentActivityKind =
11976 | "started"
11977 | "interacted"
11978 | "interrupted"
11979 | "completed";
11980export const V2ThreadUnarchiveResponse__SubAgentActivityKind = Schema.Literals([
11981 "started",
11982 "interacted",
11983 "interrupted",
11984 "completed",
11985]).annotate({ identifier: "V2ThreadUnarchiveResponse__SubAgentActivityKind" });
995111986
995211987export type V2ThreadUnarchiveResponse__WebSearchAction =
995311988 | {
......@@ -9979,7 +12014,36 @@ export const V2ThreadUnarchiveResponse__WebSearchAction = Schema.Union(
997912014 }).annotate({ title: "OtherWebSearchAction" }),
998012015 ],
998112016 { mode: "oneOf" },
9982);
12017).annotate({ identifier: "V2ThreadUnarchiveResponse__WebSearchAction" });
12018
12019export type V2ThreadUnarchiveResponse__TurnItemsView = "notLoaded" | "summary" | "full";
12020export const V2ThreadUnarchiveResponse__TurnItemsView = Schema.Union(
12021 [
12022 Schema.Literal("notLoaded").annotate({
12023 description: "`items` was not loaded for this turn. The field is intentionally empty.",
12024 }),
12025 Schema.Literal("summary").annotate({
12026 description: "`items` contains only a display summary for this turn.",
12027 }),
12028 Schema.Literal("full").annotate({
12029 description:
12030 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
12031 }),
12032 ],
12033 { mode: "oneOf" },
12034).annotate({ identifier: "V2ThreadUnarchiveResponse__TurnItemsView" });
12035
12036export type V2ThreadUnarchiveResponse__TurnStatus =
12037 | "completed"
12038 | "interrupted"
12039 | "failed"
12040 | "inProgress";
12041export const V2ThreadUnarchiveResponse__TurnStatus = Schema.Literals([
12042 "completed",
12043 "interrupted",
12044 "failed",
12045 "inProgress",
12046]).annotate({ identifier: "V2ThreadUnarchiveResponse__TurnStatus" });
998312047
998412048export type V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus =
998512049 | "notLoaded"
......@@ -9989,31 +12053,110 @@ export const V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus = Schema.Liter
998912053 "notLoaded",
999012054 "notSubscribed",
999112055 "unsubscribed",
9992]);
12056]).annotate({ identifier: "V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus" });
12057
12058export type V2TurnCompletedNotification__NonSteerableTurnKind = "review" | "compact";
12059export const V2TurnCompletedNotification__NonSteerableTurnKind = Schema.Literals([
12060 "review",
12061 "compact",
12062]).annotate({ identifier: "V2TurnCompletedNotification__NonSteerableTurnKind" });
12063
12064export type V2TurnCompletedNotification__ByteRange = {
12065 readonly end: number;
12066 readonly start: number;
12067};
12068export const V2TurnCompletedNotification__ByteRange = Schema.Struct({
12069 end: Schema.Number.annotate({ format: "uint" })
12070 .check(Schema.isInt().annotate({ expected: "an integer" }))
12071 .check(
12072 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12073 ),
12074 start: Schema.Number.annotate({ format: "uint" })
12075 .check(Schema.isInt().annotate({ expected: "an integer" }))
12076 .check(
12077 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12078 ),
12079}).annotate({ identifier: "V2TurnCompletedNotification__ByteRange" });
12080
12081export type V2TurnCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original";
12082export const V2TurnCompletedNotification__ImageDetail = Schema.Literals([
12083 "auto",
12084 "low",
12085 "high",
12086 "original",
12087]).annotate({ identifier: "V2TurnCompletedNotification__ImageDetail" });
12088
12089export type V2TurnCompletedNotification__HookPromptFragment = {
12090 readonly hookRunId: string;
12091 readonly text: string;
12092};
12093export const V2TurnCompletedNotification__HookPromptFragment = Schema.Struct({
12094 hookRunId: Schema.String,
12095 text: Schema.String,
12096}).annotate({ identifier: "V2TurnCompletedNotification__HookPromptFragment" });
12097
12098export type V2TurnCompletedNotification__MemoryCitationEntry = {
12099 readonly lineEnd: number;
12100 readonly lineStart: number;
12101 readonly note: string;
12102 readonly path: string;
12103};
12104export const V2TurnCompletedNotification__MemoryCitationEntry = Schema.Struct({
12105 lineEnd: Schema.Number.annotate({ format: "uint32" })
12106 .check(Schema.isInt().annotate({ expected: "an integer" }))
12107 .check(
12108 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12109 ),
12110 lineStart: Schema.Number.annotate({ format: "uint32" })
12111 .check(Schema.isInt().annotate({ expected: "an integer" }))
12112 .check(
12113 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12114 ),
12115 note: Schema.String,
12116 path: Schema.String,
12117}).annotate({ identifier: "V2TurnCompletedNotification__MemoryCitationEntry" });
12118
12119export type V2TurnCompletedNotification__MessagePhase = "commentary" | "final_answer";
12120export const V2TurnCompletedNotification__MessagePhase = Schema.Union(
12121 [
12122 Schema.Literal("commentary").annotate({
12123 description:
12124 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
12125 }),
12126 Schema.Literal("final_answer").annotate({
12127 description: "The assistant's terminal answer text for the current turn.",
12128 }),
12129 ],
12130 { mode: "oneOf" },
12131).annotate({
12132 description:
12133 '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.',
12134 identifier: "V2TurnCompletedNotification__MessagePhase",
12135});
999312136
999412137export type V2TurnCompletedNotification__AbsolutePathBuf = string;
999512138export const V2TurnCompletedNotification__AbsolutePathBuf = Schema.String.annotate({
999612139 description:
999712140 "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.",
12141 identifier: "V2TurnCompletedNotification__AbsolutePathBuf",
999812142});
999912143
10000export type V2TurnCompletedNotification__CollabAgentStatus =
10001 | "pendingInit"
10002 | "running"
10003 | "interrupted"
10004 | "completed"
10005 | "errored"
10006 | "shutdown"
10007 | "notFound";
10008export const V2TurnCompletedNotification__CollabAgentStatus = Schema.Literals([
10009 "pendingInit",
10010 "running",
10011 "interrupted",
10012 "completed",
10013 "errored",
10014 "shutdown",
10015 "notFound",
10016]);
12144export type V2TurnCompletedNotification__LegacyAppPathString = string;
12145export const V2TurnCompletedNotification__LegacyAppPathString = Schema.String.annotate({
12146 identifier: "V2TurnCompletedNotification__LegacyAppPathString",
12147});
12148
12149export type V2TurnCompletedNotification__CommandExecutionSource =
12150 | "agent"
12151 | "userShell"
12152 | "unifiedExecStartup"
12153 | "unifiedExecInteraction";
12154export const V2TurnCompletedNotification__CommandExecutionSource = Schema.Literals([
12155 "agent",
12156 "userShell",
12157 "unifiedExecStartup",
12158 "unifiedExecInteraction",
12159]).annotate({ identifier: "V2TurnCompletedNotification__CommandExecutionSource" });
1001712160
1001812161export type V2TurnCompletedNotification__CommandExecutionStatus =
1001912162 | "inProgress"
......@@ -10025,65 +12168,39 @@ export const V2TurnCompletedNotification__CommandExecutionStatus = Schema.Litera
1002512168 "completed",
1002612169 "failed",
1002712170 "declined",
10028]);
12171]).annotate({ identifier: "V2TurnCompletedNotification__CommandExecutionStatus" });
1002912172
10030export type V2TurnCompletedNotification__DynamicToolCallOutputContentItem =
10031 | { readonly text: string; readonly type: "inputText" }
10032 | { readonly imageUrl: string; readonly type: "inputImage" }
10033 | { readonly audioUrl: string; readonly type: "inputAudio" };
10034export const V2TurnCompletedNotification__DynamicToolCallOutputContentItem = Schema.Union(
12173export type V2TurnCompletedNotification__PatchChangeKind =
12174 | { readonly type: "add" }
12175 | { readonly type: "delete" }
12176 | { readonly move_path?: string | null; readonly type: "update" };
12177export const V2TurnCompletedNotification__PatchChangeKind = Schema.Union(
1003512178 [
1003612179 Schema.Struct({
10037 text: Schema.String,
10038 type: Schema.Literal("inputText").annotate({
10039 title: "InputTextDynamicToolCallOutputContentItemType",
10040 }),
10041 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
12180 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
12181 }).annotate({ title: "AddPatchChangeKind" }),
1004212182 Schema.Struct({
10043 imageUrl: Schema.String,
10044 type: Schema.Literal("inputImage").annotate({
10045 title: "InputImageDynamicToolCallOutputContentItemType",
10046 }),
10047 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
12183 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
12184 }).annotate({ title: "DeletePatchChangeKind" }),
1004812185 Schema.Struct({
10049 audioUrl: Schema.String,
10050 type: Schema.Literal("inputAudio").annotate({
10051 title: "InputAudioDynamicToolCallOutputContentItemType",
10052 }),
10053 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
12186 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12187 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
12188 }).annotate({ title: "UpdatePatchChangeKind" }),
1005412189 ],
1005512190 { mode: "oneOf" },
10056);
12191).annotate({ identifier: "V2TurnCompletedNotification__PatchChangeKind" });
1005712192
10058export type V2TurnCompletedNotification__DynamicToolCallStatus =
12193export type V2TurnCompletedNotification__PatchApplyStatus =
1005912194 | "inProgress"
1006012195 | "completed"
10061 | "failed";
10062export const V2TurnCompletedNotification__DynamicToolCallStatus = Schema.Literals([
12196 | "failed"
12197 | "declined";
12198export const V2TurnCompletedNotification__PatchApplyStatus = Schema.Literals([
1006312199 "inProgress",
1006412200 "completed",
1006512201 "failed",
10066]);
10067
10068export type V2TurnCompletedNotification__HookPromptFragment = {
10069 readonly hookRunId: string;
10070 readonly text: string;
10071};
10072export const V2TurnCompletedNotification__HookPromptFragment = Schema.Struct({
10073 hookRunId: Schema.String,
10074 text: Schema.String,
10075});
10076
10077export type V2TurnCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original";
10078export const V2TurnCompletedNotification__ImageDetail = Schema.Literals([
10079 "auto",
10080 "low",
10081 "high",
10082 "original",
10083]);
10084
10085export type V2TurnCompletedNotification__LegacyAppPathString = string;
10086export const V2TurnCompletedNotification__LegacyAppPathString = Schema.String;
12202 "declined",
12203]).annotate({ identifier: "V2TurnCompletedNotification__PatchApplyStatus" });
1008712204
1008812205export type V2TurnCompletedNotification__McpToolCallAppContext = {
1008912206 readonly actionName?: string | null;
......@@ -10098,99 +12215,130 @@ export const V2TurnCompletedNotification__McpToolCallAppContext = Schema.Struct(
1009812215 connectorId: Schema.String,
1009912216 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1010012217 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10101});
12218}).annotate({ identifier: "V2TurnCompletedNotification__McpToolCallAppContext" });
1010212219
1010312220export type V2TurnCompletedNotification__McpToolCallError = { readonly message: string };
1010412221export const V2TurnCompletedNotification__McpToolCallError = Schema.Struct({
1010512222 message: Schema.String,
10106});
12223}).annotate({ identifier: "V2TurnCompletedNotification__McpToolCallError" });
1010712224
1010812225export type V2TurnCompletedNotification__McpToolCallResult = {
10109 readonly _meta?: unknown;
10110 readonly content: ReadonlyArray<unknown>;
10111 readonly structuredContent?: unknown;
12226 readonly _meta?: Schema.Json;
12227 readonly content: ReadonlyArray<Schema.Json>;
12228 readonly structuredContent?: Schema.Json;
1011212229};
1011312230export const V2TurnCompletedNotification__McpToolCallResult = Schema.Struct({
10114 _meta: Schema.optionalKey(Schema.Unknown),
10115 content: Schema.Array(Schema.Unknown),
10116 structuredContent: Schema.optionalKey(Schema.Unknown),
10117});
12231 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
12232 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
12233 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
12234}).annotate({ identifier: "V2TurnCompletedNotification__McpToolCallResult" });
1011812235
1011912236export type V2TurnCompletedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
1012012237export const V2TurnCompletedNotification__McpToolCallStatus = Schema.Literals([
1012112238 "inProgress",
1012212239 "completed",
1012312240 "failed",
10124]);
10125
10126export type V2TurnCompletedNotification__MemoryCitationEntry = {
10127 readonly lineEnd: number;
10128 readonly lineStart: number;
10129 readonly note: string;
10130 readonly path: string;
10131};
10132export const V2TurnCompletedNotification__MemoryCitationEntry = Schema.Struct({
10133 lineEnd: Schema.Number.annotate({ format: "uint32" })
10134 .check(Schema.isInt())
10135 .check(Schema.isGreaterThanOrEqualTo(0)),
10136 lineStart: Schema.Number.annotate({ format: "uint32" })
10137 .check(Schema.isInt())
10138 .check(Schema.isGreaterThanOrEqualTo(0)),
10139 note: Schema.String,
10140 path: Schema.String,
10141});
10142
10143export type V2TurnCompletedNotification__MessagePhase = "commentary" | "final_answer";
10144export const V2TurnCompletedNotification__MessagePhase = Schema.Literals([
10145 "commentary",
10146 "final_answer",
10147]).annotate({
10148 description:
10149 '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.',
10150});
12241]).annotate({ identifier: "V2TurnCompletedNotification__McpToolCallStatus" });
1015112242
10152export type V2TurnCompletedNotification__NonSteerableTurnKind = "review" | "compact";
10153export const V2TurnCompletedNotification__NonSteerableTurnKind = Schema.Literals([
10154 "review",
10155 "compact",
10156]);
12243export type V2TurnCompletedNotification__DynamicToolCallOutputContentItem =
12244 | { readonly text: string; readonly type: "inputText" }
12245 | { readonly imageUrl: string; readonly type: "inputImage" }
12246 | { readonly audioUrl: string; readonly type: "inputAudio" };
12247export const V2TurnCompletedNotification__DynamicToolCallOutputContentItem = Schema.Union(
12248 [
12249 Schema.Struct({
12250 text: Schema.String,
12251 type: Schema.Literal("inputText").annotate({
12252 title: "InputTextDynamicToolCallOutputContentItemType",
12253 }),
12254 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
12255 Schema.Struct({
12256 imageUrl: Schema.String,
12257 type: Schema.Literal("inputImage").annotate({
12258 title: "InputImageDynamicToolCallOutputContentItemType",
12259 }),
12260 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
12261 Schema.Struct({
12262 audioUrl: Schema.String,
12263 type: Schema.Literal("inputAudio").annotate({
12264 title: "InputAudioDynamicToolCallOutputContentItemType",
12265 }),
12266 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
12267 ],
12268 { mode: "oneOf" },
12269).annotate({ identifier: "V2TurnCompletedNotification__DynamicToolCallOutputContentItem" });
1015712270
10158export type V2TurnCompletedNotification__PatchApplyStatus =
12271export type V2TurnCompletedNotification__DynamicToolCallStatus =
1015912272 | "inProgress"
1016012273 | "completed"
10161 | "failed"
10162 | "declined";
10163export const V2TurnCompletedNotification__PatchApplyStatus = Schema.Literals([
12274 | "failed";
12275export const V2TurnCompletedNotification__DynamicToolCallStatus = Schema.Literals([
1016412276 "inProgress",
1016512277 "completed",
1016612278 "failed",
10167 "declined",
10168]);
12279]).annotate({ identifier: "V2TurnCompletedNotification__DynamicToolCallStatus" });
1016912280
10170export type V2TurnCompletedNotification__PatchChangeKind =
10171 | { readonly type: "add" }
10172 | { readonly type: "delete" }
10173 | { readonly move_path?: string | null; readonly type: "update" };
10174export const V2TurnCompletedNotification__PatchChangeKind = Schema.Union(
10175 [
10176 Schema.Struct({
10177 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
10178 }).annotate({ title: "AddPatchChangeKind" }),
10179 Schema.Struct({
10180 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
10181 }).annotate({ title: "DeletePatchChangeKind" }),
10182 Schema.Struct({
10183 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10184 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
10185 }).annotate({ title: "UpdatePatchChangeKind" }),
10186 ],
10187 { mode: "oneOf" },
10188);
12281export type V2TurnCompletedNotification__CollabAgentStatus =
12282 | "pendingInit"
12283 | "running"
12284 | "interrupted"
12285 | "completed"
12286 | "errored"
12287 | "shutdown"
12288 | "notFound";
12289export const V2TurnCompletedNotification__CollabAgentStatus = Schema.Literals([
12290 "pendingInit",
12291 "running",
12292 "interrupted",
12293 "completed",
12294 "errored",
12295 "shutdown",
12296 "notFound",
12297]).annotate({ identifier: "V2TurnCompletedNotification__CollabAgentStatus" });
1018912298
1019012299export type V2TurnCompletedNotification__ReasoningEffort = string;
1019112300export const V2TurnCompletedNotification__ReasoningEffort = Schema.String.annotate({
1019212301 description: "A non-empty reasoning effort value advertised by the model.",
10193}).check(Schema.isMinLength(1));
12302}).check(
12303 Schema.isMinLength(1).annotate({
12304 expected: "a value with a length of at least 1",
12305 identifier: "V2TurnCompletedNotification__ReasoningEffort",
12306 }),
12307);
12308
12309export type V2TurnCompletedNotification__CollabAgentToolCallStatus =
12310 | "inProgress"
12311 | "completed"
12312 | "failed"
12313 | "interrupted";
12314export const V2TurnCompletedNotification__CollabAgentToolCallStatus = Schema.Literals([
12315 "inProgress",
12316 "completed",
12317 "failed",
12318 "interrupted",
12319]).annotate({ identifier: "V2TurnCompletedNotification__CollabAgentToolCallStatus" });
12320
12321export type V2TurnCompletedNotification__CollabAgentTool =
12322 | "spawnAgent"
12323 | "sendInput"
12324 | "resumeAgent"
12325 | "wait"
12326 | "closeAgent"
12327 | "sendMessage"
12328 | "followupTask"
12329 | "interruptAgent"
12330 | "listAgents";
12331export const V2TurnCompletedNotification__CollabAgentTool = Schema.Literals([
12332 "spawnAgent",
12333 "sendInput",
12334 "resumeAgent",
12335 "wait",
12336 "closeAgent",
12337 "sendMessage",
12338 "followupTask",
12339 "interruptAgent",
12340 "listAgents",
12341]).annotate({ identifier: "V2TurnCompletedNotification__CollabAgentTool" });
1019412342
1019512343export type V2TurnCompletedNotification__SubAgentActivityKind =
1019612344 | "started"
......@@ -10202,44 +12350,7 @@ export const V2TurnCompletedNotification__SubAgentActivityKind = Schema.Literals
1020212350 "interacted",
1020312351 "interrupted",
1020412352 "completed",
10205]);
10206
10207export type V2TurnCompletedNotification__TextElement = {
10208 readonly byteRange: { readonly end: number; readonly start: number };
10209 readonly placeholder?: string | null;
10210};
10211export const V2TurnCompletedNotification__TextElement = Schema.Struct({
10212 byteRange: Schema.Struct({
10213 end: Schema.Number.annotate({ format: "uint" })
10214 .check(Schema.isInt())
10215 .check(Schema.isGreaterThanOrEqualTo(0)),
10216 start: Schema.Number.annotate({ format: "uint" })
10217 .check(Schema.isInt())
10218 .check(Schema.isGreaterThanOrEqualTo(0)),
10219 }).annotate({
10220 description: "Byte range in the parent `text` buffer that this element occupies.",
10221 }),
10222 placeholder: Schema.optionalKey(
10223 Schema.Union([
10224 Schema.String.annotate({
10225 description: "Optional human-readable placeholder for the element, displayed in the UI.",
10226 }),
10227 Schema.Null,
10228 ]),
10229 ),
10230});
10231
10232export type V2TurnCompletedNotification__TurnStatus =
10233 | "completed"
10234 | "interrupted"
10235 | "failed"
10236 | "inProgress";
10237export const V2TurnCompletedNotification__TurnStatus = Schema.Literals([
10238 "completed",
10239 "interrupted",
10240 "failed",
10241 "inProgress",
10242]);
12353]).annotate({ identifier: "V2TurnCompletedNotification__SubAgentActivityKind" });
1024312354
1024412355export type V2TurnCompletedNotification__WebSearchAction =
1024512356 | {
......@@ -10271,7 +12382,36 @@ export const V2TurnCompletedNotification__WebSearchAction = Schema.Union(
1027112382 }).annotate({ title: "OtherWebSearchAction" }),
1027212383 ],
1027312384 { mode: "oneOf" },
10274);
12385).annotate({ identifier: "V2TurnCompletedNotification__WebSearchAction" });
12386
12387export type V2TurnCompletedNotification__TurnItemsView = "notLoaded" | "summary" | "full";
12388export const V2TurnCompletedNotification__TurnItemsView = Schema.Union(
12389 [
12390 Schema.Literal("notLoaded").annotate({
12391 description: "`items` was not loaded for this turn. The field is intentionally empty.",
12392 }),
12393 Schema.Literal("summary").annotate({
12394 description: "`items` contains only a display summary for this turn.",
12395 }),
12396 Schema.Literal("full").annotate({
12397 description:
12398 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
12399 }),
12400 ],
12401 { mode: "oneOf" },
12402).annotate({ identifier: "V2TurnCompletedNotification__TurnItemsView" });
12403
12404export type V2TurnCompletedNotification__TurnStatus =
12405 | "completed"
12406 | "interrupted"
12407 | "failed"
12408 | "inProgress";
12409export const V2TurnCompletedNotification__TurnStatus = Schema.Literals([
12410 "completed",
12411 "interrupted",
12412 "failed",
12413 "inProgress",
12414]).annotate({ identifier: "V2TurnCompletedNotification__TurnStatus" });
1027512415
1027612416export type V2TurnPlanUpdatedNotification__TurnPlanStepStatus =
1027712417 | "pending"
......@@ -10281,31 +12421,107 @@ export const V2TurnPlanUpdatedNotification__TurnPlanStepStatus = Schema.Literals
1028112421 "pending",
1028212422 "inProgress",
1028312423 "completed",
10284]);
12424]).annotate({ identifier: "V2TurnPlanUpdatedNotification__TurnPlanStepStatus" });
12425
12426export type V2TurnStartedNotification__NonSteerableTurnKind = "review" | "compact";
12427export const V2TurnStartedNotification__NonSteerableTurnKind = Schema.Literals([
12428 "review",
12429 "compact",
12430]).annotate({ identifier: "V2TurnStartedNotification__NonSteerableTurnKind" });
12431
12432export type V2TurnStartedNotification__ByteRange = { readonly end: number; readonly start: number };
12433export const V2TurnStartedNotification__ByteRange = Schema.Struct({
12434 end: Schema.Number.annotate({ format: "uint" })
12435 .check(Schema.isInt().annotate({ expected: "an integer" }))
12436 .check(
12437 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12438 ),
12439 start: Schema.Number.annotate({ format: "uint" })
12440 .check(Schema.isInt().annotate({ expected: "an integer" }))
12441 .check(
12442 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12443 ),
12444}).annotate({ identifier: "V2TurnStartedNotification__ByteRange" });
12445
12446export type V2TurnStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
12447export const V2TurnStartedNotification__ImageDetail = Schema.Literals([
12448 "auto",
12449 "low",
12450 "high",
12451 "original",
12452]).annotate({ identifier: "V2TurnStartedNotification__ImageDetail" });
12453
12454export type V2TurnStartedNotification__HookPromptFragment = {
12455 readonly hookRunId: string;
12456 readonly text: string;
12457};
12458export const V2TurnStartedNotification__HookPromptFragment = Schema.Struct({
12459 hookRunId: Schema.String,
12460 text: Schema.String,
12461}).annotate({ identifier: "V2TurnStartedNotification__HookPromptFragment" });
12462
12463export type V2TurnStartedNotification__MemoryCitationEntry = {
12464 readonly lineEnd: number;
12465 readonly lineStart: number;
12466 readonly note: string;
12467 readonly path: string;
12468};
12469export const V2TurnStartedNotification__MemoryCitationEntry = Schema.Struct({
12470 lineEnd: Schema.Number.annotate({ format: "uint32" })
12471 .check(Schema.isInt().annotate({ expected: "an integer" }))
12472 .check(
12473 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12474 ),
12475 lineStart: Schema.Number.annotate({ format: "uint32" })
12476 .check(Schema.isInt().annotate({ expected: "an integer" }))
12477 .check(
12478 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12479 ),
12480 note: Schema.String,
12481 path: Schema.String,
12482}).annotate({ identifier: "V2TurnStartedNotification__MemoryCitationEntry" });
12483
12484export type V2TurnStartedNotification__MessagePhase = "commentary" | "final_answer";
12485export const V2TurnStartedNotification__MessagePhase = Schema.Union(
12486 [
12487 Schema.Literal("commentary").annotate({
12488 description:
12489 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
12490 }),
12491 Schema.Literal("final_answer").annotate({
12492 description: "The assistant's terminal answer text for the current turn.",
12493 }),
12494 ],
12495 { mode: "oneOf" },
12496).annotate({
12497 description:
12498 '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.',
12499 identifier: "V2TurnStartedNotification__MessagePhase",
12500});
1028512501
1028612502export type V2TurnStartedNotification__AbsolutePathBuf = string;
1028712503export const V2TurnStartedNotification__AbsolutePathBuf = Schema.String.annotate({
1028812504 description:
1028912505 "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.",
12506 identifier: "V2TurnStartedNotification__AbsolutePathBuf",
1029012507});
1029112508
10292export type V2TurnStartedNotification__CollabAgentStatus =
10293 | "pendingInit"
10294 | "running"
10295 | "interrupted"
10296 | "completed"
10297 | "errored"
10298 | "shutdown"
10299 | "notFound";
10300export const V2TurnStartedNotification__CollabAgentStatus = Schema.Literals([
10301 "pendingInit",
10302 "running",
10303 "interrupted",
10304 "completed",
10305 "errored",
10306 "shutdown",
10307 "notFound",
10308]);
12509export type V2TurnStartedNotification__LegacyAppPathString = string;
12510export const V2TurnStartedNotification__LegacyAppPathString = Schema.String.annotate({
12511 identifier: "V2TurnStartedNotification__LegacyAppPathString",
12512});
12513
12514export type V2TurnStartedNotification__CommandExecutionSource =
12515 | "agent"
12516 | "userShell"
12517 | "unifiedExecStartup"
12518 | "unifiedExecInteraction";
12519export const V2TurnStartedNotification__CommandExecutionSource = Schema.Literals([
12520 "agent",
12521 "userShell",
12522 "unifiedExecStartup",
12523 "unifiedExecInteraction",
12524]).annotate({ identifier: "V2TurnStartedNotification__CommandExecutionSource" });
1030912525
1031012526export type V2TurnStartedNotification__CommandExecutionStatus =
1031112527 | "inProgress"
......@@ -10317,65 +12533,39 @@ export const V2TurnStartedNotification__CommandExecutionStatus = Schema.Literals
1031712533 "completed",
1031812534 "failed",
1031912535 "declined",
10320]);
12536]).annotate({ identifier: "V2TurnStartedNotification__CommandExecutionStatus" });
1032112537
10322export type V2TurnStartedNotification__DynamicToolCallOutputContentItem =
10323 | { readonly text: string; readonly type: "inputText" }
10324 | { readonly imageUrl: string; readonly type: "inputImage" }
10325 | { readonly audioUrl: string; readonly type: "inputAudio" };
10326export const V2TurnStartedNotification__DynamicToolCallOutputContentItem = Schema.Union(
12538export type V2TurnStartedNotification__PatchChangeKind =
12539 | { readonly type: "add" }
12540 | { readonly type: "delete" }
12541 | { readonly move_path?: string | null; readonly type: "update" };
12542export const V2TurnStartedNotification__PatchChangeKind = Schema.Union(
1032712543 [
1032812544 Schema.Struct({
10329 text: Schema.String,
10330 type: Schema.Literal("inputText").annotate({
10331 title: "InputTextDynamicToolCallOutputContentItemType",
10332 }),
10333 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
12545 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
12546 }).annotate({ title: "AddPatchChangeKind" }),
1033412547 Schema.Struct({
10335 imageUrl: Schema.String,
10336 type: Schema.Literal("inputImage").annotate({
10337 title: "InputImageDynamicToolCallOutputContentItemType",
10338 }),
10339 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
12548 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
12549 }).annotate({ title: "DeletePatchChangeKind" }),
1034012550 Schema.Struct({
10341 audioUrl: Schema.String,
10342 type: Schema.Literal("inputAudio").annotate({
10343 title: "InputAudioDynamicToolCallOutputContentItemType",
10344 }),
10345 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
12551 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12552 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
12553 }).annotate({ title: "UpdatePatchChangeKind" }),
1034612554 ],
1034712555 { mode: "oneOf" },
10348);
12556).annotate({ identifier: "V2TurnStartedNotification__PatchChangeKind" });
1034912557
10350export type V2TurnStartedNotification__DynamicToolCallStatus =
12558export type V2TurnStartedNotification__PatchApplyStatus =
1035112559 | "inProgress"
1035212560 | "completed"
10353 | "failed";
10354export const V2TurnStartedNotification__DynamicToolCallStatus = Schema.Literals([
12561 | "failed"
12562 | "declined";
12563export const V2TurnStartedNotification__PatchApplyStatus = Schema.Literals([
1035512564 "inProgress",
1035612565 "completed",
1035712566 "failed",
10358]);
10359
10360export type V2TurnStartedNotification__HookPromptFragment = {
10361 readonly hookRunId: string;
10362 readonly text: string;
10363};
10364export const V2TurnStartedNotification__HookPromptFragment = Schema.Struct({
10365 hookRunId: Schema.String,
10366 text: Schema.String,
10367});
10368
10369export type V2TurnStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
10370export const V2TurnStartedNotification__ImageDetail = Schema.Literals([
10371 "auto",
10372 "low",
10373 "high",
10374 "original",
10375]);
10376
10377export type V2TurnStartedNotification__LegacyAppPathString = string;
10378export const V2TurnStartedNotification__LegacyAppPathString = Schema.String;
12567 "declined",
12568]).annotate({ identifier: "V2TurnStartedNotification__PatchApplyStatus" });
1037912569
1038012570export type V2TurnStartedNotification__McpToolCallAppContext = {
1038112571 readonly actionName?: string | null;
......@@ -10390,99 +12580,130 @@ export const V2TurnStartedNotification__McpToolCallAppContext = Schema.Struct({
1039012580 connectorId: Schema.String,
1039112581 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1039212582 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10393});
12583}).annotate({ identifier: "V2TurnStartedNotification__McpToolCallAppContext" });
1039412584
1039512585export type V2TurnStartedNotification__McpToolCallError = { readonly message: string };
1039612586export const V2TurnStartedNotification__McpToolCallError = Schema.Struct({
1039712587 message: Schema.String,
10398});
12588}).annotate({ identifier: "V2TurnStartedNotification__McpToolCallError" });
1039912589
1040012590export type V2TurnStartedNotification__McpToolCallResult = {
10401 readonly _meta?: unknown;
10402 readonly content: ReadonlyArray<unknown>;
10403 readonly structuredContent?: unknown;
12591 readonly _meta?: Schema.Json;
12592 readonly content: ReadonlyArray<Schema.Json>;
12593 readonly structuredContent?: Schema.Json;
1040412594};
1040512595export const V2TurnStartedNotification__McpToolCallResult = Schema.Struct({
10406 _meta: Schema.optionalKey(Schema.Unknown),
10407 content: Schema.Array(Schema.Unknown),
10408 structuredContent: Schema.optionalKey(Schema.Unknown),
10409});
12596 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
12597 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
12598 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
12599}).annotate({ identifier: "V2TurnStartedNotification__McpToolCallResult" });
1041012600
1041112601export type V2TurnStartedNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
1041212602export const V2TurnStartedNotification__McpToolCallStatus = Schema.Literals([
1041312603 "inProgress",
1041412604 "completed",
1041512605 "failed",
10416]);
10417
10418export type V2TurnStartedNotification__MemoryCitationEntry = {
10419 readonly lineEnd: number;
10420 readonly lineStart: number;
10421 readonly note: string;
10422 readonly path: string;
10423};
10424export const V2TurnStartedNotification__MemoryCitationEntry = Schema.Struct({
10425 lineEnd: Schema.Number.annotate({ format: "uint32" })
10426 .check(Schema.isInt())
10427 .check(Schema.isGreaterThanOrEqualTo(0)),
10428 lineStart: Schema.Number.annotate({ format: "uint32" })
10429 .check(Schema.isInt())
10430 .check(Schema.isGreaterThanOrEqualTo(0)),
10431 note: Schema.String,
10432 path: Schema.String,
10433});
10434
10435export type V2TurnStartedNotification__MessagePhase = "commentary" | "final_answer";
10436export const V2TurnStartedNotification__MessagePhase = Schema.Literals([
10437 "commentary",
10438 "final_answer",
10439]).annotate({
10440 description:
10441 '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.',
10442});
12606]).annotate({ identifier: "V2TurnStartedNotification__McpToolCallStatus" });
1044312607
10444export type V2TurnStartedNotification__NonSteerableTurnKind = "review" | "compact";
10445export const V2TurnStartedNotification__NonSteerableTurnKind = Schema.Literals([
10446 "review",
10447 "compact",
10448]);
12608export type V2TurnStartedNotification__DynamicToolCallOutputContentItem =
12609 | { readonly text: string; readonly type: "inputText" }
12610 | { readonly imageUrl: string; readonly type: "inputImage" }
12611 | { readonly audioUrl: string; readonly type: "inputAudio" };
12612export const V2TurnStartedNotification__DynamicToolCallOutputContentItem = Schema.Union(
12613 [
12614 Schema.Struct({
12615 text: Schema.String,
12616 type: Schema.Literal("inputText").annotate({
12617 title: "InputTextDynamicToolCallOutputContentItemType",
12618 }),
12619 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
12620 Schema.Struct({
12621 imageUrl: Schema.String,
12622 type: Schema.Literal("inputImage").annotate({
12623 title: "InputImageDynamicToolCallOutputContentItemType",
12624 }),
12625 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
12626 Schema.Struct({
12627 audioUrl: Schema.String,
12628 type: Schema.Literal("inputAudio").annotate({
12629 title: "InputAudioDynamicToolCallOutputContentItemType",
12630 }),
12631 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
12632 ],
12633 { mode: "oneOf" },
12634).annotate({ identifier: "V2TurnStartedNotification__DynamicToolCallOutputContentItem" });
1044912635
10450export type V2TurnStartedNotification__PatchApplyStatus =
12636export type V2TurnStartedNotification__DynamicToolCallStatus =
1045112637 | "inProgress"
1045212638 | "completed"
10453 | "failed"
10454 | "declined";
10455export const V2TurnStartedNotification__PatchApplyStatus = Schema.Literals([
12639 | "failed";
12640export const V2TurnStartedNotification__DynamicToolCallStatus = Schema.Literals([
1045612641 "inProgress",
1045712642 "completed",
1045812643 "failed",
10459 "declined",
10460]);
12644]).annotate({ identifier: "V2TurnStartedNotification__DynamicToolCallStatus" });
1046112645
10462export type V2TurnStartedNotification__PatchChangeKind =
10463 | { readonly type: "add" }
10464 | { readonly type: "delete" }
10465 | { readonly move_path?: string | null; readonly type: "update" };
10466export const V2TurnStartedNotification__PatchChangeKind = Schema.Union(
10467 [
10468 Schema.Struct({
10469 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
10470 }).annotate({ title: "AddPatchChangeKind" }),
10471 Schema.Struct({
10472 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
10473 }).annotate({ title: "DeletePatchChangeKind" }),
10474 Schema.Struct({
10475 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10476 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
10477 }).annotate({ title: "UpdatePatchChangeKind" }),
10478 ],
10479 { mode: "oneOf" },
10480);
12646export type V2TurnStartedNotification__CollabAgentStatus =
12647 | "pendingInit"
12648 | "running"
12649 | "interrupted"
12650 | "completed"
12651 | "errored"
12652 | "shutdown"
12653 | "notFound";
12654export const V2TurnStartedNotification__CollabAgentStatus = Schema.Literals([
12655 "pendingInit",
12656 "running",
12657 "interrupted",
12658 "completed",
12659 "errored",
12660 "shutdown",
12661 "notFound",
12662]).annotate({ identifier: "V2TurnStartedNotification__CollabAgentStatus" });
1048112663
1048212664export type V2TurnStartedNotification__ReasoningEffort = string;
1048312665export const V2TurnStartedNotification__ReasoningEffort = Schema.String.annotate({
1048412666 description: "A non-empty reasoning effort value advertised by the model.",
10485}).check(Schema.isMinLength(1));
12667}).check(
12668 Schema.isMinLength(1).annotate({
12669 expected: "a value with a length of at least 1",
12670 identifier: "V2TurnStartedNotification__ReasoningEffort",
12671 }),
12672);
12673
12674export type V2TurnStartedNotification__CollabAgentToolCallStatus =
12675 | "inProgress"
12676 | "completed"
12677 | "failed"
12678 | "interrupted";
12679export const V2TurnStartedNotification__CollabAgentToolCallStatus = Schema.Literals([
12680 "inProgress",
12681 "completed",
12682 "failed",
12683 "interrupted",
12684]).annotate({ identifier: "V2TurnStartedNotification__CollabAgentToolCallStatus" });
12685
12686export type V2TurnStartedNotification__CollabAgentTool =
12687 | "spawnAgent"
12688 | "sendInput"
12689 | "resumeAgent"
12690 | "wait"
12691 | "closeAgent"
12692 | "sendMessage"
12693 | "followupTask"
12694 | "interruptAgent"
12695 | "listAgents";
12696export const V2TurnStartedNotification__CollabAgentTool = Schema.Literals([
12697 "spawnAgent",
12698 "sendInput",
12699 "resumeAgent",
12700 "wait",
12701 "closeAgent",
12702 "sendMessage",
12703 "followupTask",
12704 "interruptAgent",
12705 "listAgents",
12706]).annotate({ identifier: "V2TurnStartedNotification__CollabAgentTool" });
1048612707
1048712708export type V2TurnStartedNotification__SubAgentActivityKind =
1048812709 | "started"
......@@ -10494,44 +12715,7 @@ export const V2TurnStartedNotification__SubAgentActivityKind = Schema.Literals([
1049412715 "interacted",
1049512716 "interrupted",
1049612717 "completed",
10497]);
10498
10499export type V2TurnStartedNotification__TextElement = {
10500 readonly byteRange: { readonly end: number; readonly start: number };
10501 readonly placeholder?: string | null;
10502};
10503export const V2TurnStartedNotification__TextElement = Schema.Struct({
10504 byteRange: Schema.Struct({
10505 end: Schema.Number.annotate({ format: "uint" })
10506 .check(Schema.isInt())
10507 .check(Schema.isGreaterThanOrEqualTo(0)),
10508 start: Schema.Number.annotate({ format: "uint" })
10509 .check(Schema.isInt())
10510 .check(Schema.isGreaterThanOrEqualTo(0)),
10511 }).annotate({
10512 description: "Byte range in the parent `text` buffer that this element occupies.",
10513 }),
10514 placeholder: Schema.optionalKey(
10515 Schema.Union([
10516 Schema.String.annotate({
10517 description: "Optional human-readable placeholder for the element, displayed in the UI.",
10518 }),
10519 Schema.Null,
10520 ]),
10521 ),
10522});
10523
10524export type V2TurnStartedNotification__TurnStatus =
10525 | "completed"
10526 | "interrupted"
10527 | "failed"
10528 | "inProgress";
10529export const V2TurnStartedNotification__TurnStatus = Schema.Literals([
10530 "completed",
10531 "interrupted",
10532 "failed",
10533 "inProgress",
10534]);
12718]).annotate({ identifier: "V2TurnStartedNotification__SubAgentActivityKind" });
1053512719
1053612720export type V2TurnStartedNotification__WebSearchAction =
1053712721 | {
......@@ -10563,29 +12747,36 @@ export const V2TurnStartedNotification__WebSearchAction = Schema.Union(
1056312747 }).annotate({ title: "OtherWebSearchAction" }),
1056412748 ],
1056512749 { mode: "oneOf" },
10566);
10567
10568export type V2TurnStartParams__AbsolutePathBuf = string;
10569export const V2TurnStartParams__AbsolutePathBuf = Schema.String.annotate({
10570 description:
10571 "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.",
10572});
12750).annotate({ identifier: "V2TurnStartedNotification__WebSearchAction" });
1057312751
10574export type V2TurnStartParams__AdditionalContextKind = "untrusted" | "application";
10575export const V2TurnStartParams__AdditionalContextKind = Schema.Literals([
10576 "untrusted",
10577 "application",
10578]);
12752export type V2TurnStartedNotification__TurnItemsView = "notLoaded" | "summary" | "full";
12753export const V2TurnStartedNotification__TurnItemsView = Schema.Union(
12754 [
12755 Schema.Literal("notLoaded").annotate({
12756 description: "`items` was not loaded for this turn. The field is intentionally empty.",
12757 }),
12758 Schema.Literal("summary").annotate({
12759 description: "`items` contains only a display summary for this turn.",
12760 }),
12761 Schema.Literal("full").annotate({
12762 description:
12763 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
12764 }),
12765 ],
12766 { mode: "oneOf" },
12767).annotate({ identifier: "V2TurnStartedNotification__TurnItemsView" });
1057912768
10580export type V2TurnStartParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
10581export const V2TurnStartParams__ApprovalsReviewer = Schema.Literals([
10582 "user",
10583 "auto_review",
10584 "guardian_subagent",
10585]).annotate({
10586 description:
10587 "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.",
10588});
12769export type V2TurnStartedNotification__TurnStatus =
12770 | "completed"
12771 | "interrupted"
12772 | "failed"
12773 | "inProgress";
12774export const V2TurnStartedNotification__TurnStatus = Schema.Literals([
12775 "completed",
12776 "interrupted",
12777 "failed",
12778 "inProgress",
12779]).annotate({ identifier: "V2TurnStartedNotification__TurnStatus" });
1058912780
1059012781export type V2TurnStartParams__AskForApproval =
1059112782 | "untrusted"
......@@ -10614,26 +12805,69 @@ export const V2TurnStartParams__AskForApproval = Schema.Union(
1061412805 }).annotate({ title: "GranularAskForApproval" }),
1061512806 ],
1061612807 { mode: "oneOf" },
10617);
10618
10619export type V2TurnStartParams__ImageDetail = "auto" | "low" | "high" | "original";
10620export const V2TurnStartParams__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
10621
10622export type V2TurnStartParams__LegacyAppPathString = string;
10623export const V2TurnStartParams__LegacyAppPathString = Schema.String;
12808).annotate({ identifier: "V2TurnStartParams__AskForApproval" });
1062412809
10625export type V2TurnStartParams__ModeKind = "plan" | "default";
10626export const V2TurnStartParams__ModeKind = Schema.Literals(["plan", "default"]).annotate({
10627 description: "Initial collaboration mode to use when the TUI starts.",
12810export type V2TurnStartParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
12811export const V2TurnStartParams__ApprovalsReviewer = Schema.Literals([
12812 "user",
12813 "auto_review",
12814 "guardian_subagent",
12815]).annotate({
12816 description:
12817 "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.",
12818 identifier: "V2TurnStartParams__ApprovalsReviewer",
1062812819});
1062912820
10630export type V2TurnStartParams__Personality = "none" | "friendly" | "pragmatic";
10631export const V2TurnStartParams__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
10632
1063312821export type V2TurnStartParams__ReasoningEffort = string;
1063412822export const V2TurnStartParams__ReasoningEffort = Schema.String.annotate({
1063512823 description: "A non-empty reasoning effort value advertised by the model.",
10636}).check(Schema.isMinLength(1));
12824}).check(
12825 Schema.isMinLength(1).annotate({
12826 expected: "a value with a length of at least 1",
12827 identifier: "V2TurnStartParams__ReasoningEffort",
12828 }),
12829);
12830
12831export type V2TurnStartParams__ByteRange = { readonly end: number; readonly start: number };
12832export const V2TurnStartParams__ByteRange = Schema.Struct({
12833 end: Schema.Number.annotate({ format: "uint" })
12834 .check(Schema.isInt().annotate({ expected: "an integer" }))
12835 .check(
12836 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12837 ),
12838 start: Schema.Number.annotate({ format: "uint" })
12839 .check(Schema.isInt().annotate({ expected: "an integer" }))
12840 .check(
12841 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12842 ),
12843}).annotate({ identifier: "V2TurnStartParams__ByteRange" });
12844
12845export type V2TurnStartParams__ImageDetail = "auto" | "low" | "high" | "original";
12846export const V2TurnStartParams__ImageDetail = Schema.Literals([
12847 "auto",
12848 "low",
12849 "high",
12850 "original",
12851]).annotate({ identifier: "V2TurnStartParams__ImageDetail" });
12852
12853export type V2TurnStartParams__Personality = "none" | "friendly" | "pragmatic";
12854export const V2TurnStartParams__Personality = Schema.Literals([
12855 "none",
12856 "friendly",
12857 "pragmatic",
12858]).annotate({ identifier: "V2TurnStartParams__Personality" });
12859
12860export type V2TurnStartParams__NetworkAccess = "restricted" | "enabled";
12861export const V2TurnStartParams__NetworkAccess = Schema.Literals(["restricted", "enabled"]).annotate(
12862 { identifier: "V2TurnStartParams__NetworkAccess" },
12863);
12864
12865export type V2TurnStartParams__AbsolutePathBuf = string;
12866export const V2TurnStartParams__AbsolutePathBuf = Schema.String.annotate({
12867 description:
12868 "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.",
12869 identifier: "V2TurnStartParams__AbsolutePathBuf",
12870});
1063712871
1063812872export type V2TurnStartParams__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
1063912873export const V2TurnStartParams__ReasoningSummary = Schema.Union(
......@@ -10645,56 +12879,125 @@ export const V2TurnStartParams__ReasoningSummary = Schema.Union(
1064512879).annotate({
1064612880 description:
1064712881 "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
12882 identifier: "V2TurnStartParams__ReasoningSummary",
1064812883});
1064912884
10650export type V2TurnStartParams__TextElement = {
10651 readonly byteRange: { readonly end: number; readonly start: number };
10652 readonly placeholder?: string | null;
12885export type V2TurnStartParams__AdditionalContextKind = "untrusted" | "application";
12886export const V2TurnStartParams__AdditionalContextKind = Schema.Literals([
12887 "untrusted",
12888 "application",
12889]).annotate({ identifier: "V2TurnStartParams__AdditionalContextKind" });
12890
12891export type V2TurnStartParams__ModeKind = "plan" | "default";
12892export const V2TurnStartParams__ModeKind = Schema.Literals(["plan", "default"]).annotate({
12893 description: "Initial collaboration mode to use when the TUI starts.",
12894 identifier: "V2TurnStartParams__ModeKind",
12895});
12896
12897export type V2TurnStartParams__LegacyAppPathString = string;
12898export const V2TurnStartParams__LegacyAppPathString = Schema.String.annotate({
12899 identifier: "V2TurnStartParams__LegacyAppPathString",
12900});
12901
12902export type V2TurnStartResponse__NonSteerableTurnKind = "review" | "compact";
12903export const V2TurnStartResponse__NonSteerableTurnKind = Schema.Literals([
12904 "review",
12905 "compact",
12906]).annotate({ identifier: "V2TurnStartResponse__NonSteerableTurnKind" });
12907
12908export type V2TurnStartResponse__ByteRange = { readonly end: number; readonly start: number };
12909export const V2TurnStartResponse__ByteRange = Schema.Struct({
12910 end: Schema.Number.annotate({ format: "uint" })
12911 .check(Schema.isInt().annotate({ expected: "an integer" }))
12912 .check(
12913 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12914 ),
12915 start: Schema.Number.annotate({ format: "uint" })
12916 .check(Schema.isInt().annotate({ expected: "an integer" }))
12917 .check(
12918 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12919 ),
12920}).annotate({ identifier: "V2TurnStartResponse__ByteRange" });
12921
12922export type V2TurnStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
12923export const V2TurnStartResponse__ImageDetail = Schema.Literals([
12924 "auto",
12925 "low",
12926 "high",
12927 "original",
12928]).annotate({ identifier: "V2TurnStartResponse__ImageDetail" });
12929
12930export type V2TurnStartResponse__HookPromptFragment = {
12931 readonly hookRunId: string;
12932 readonly text: string;
1065312933};
10654export const V2TurnStartParams__TextElement = Schema.Struct({
10655 byteRange: Schema.Struct({
10656 end: Schema.Number.annotate({ format: "uint" })
10657 .check(Schema.isInt())
10658 .check(Schema.isGreaterThanOrEqualTo(0)),
10659 start: Schema.Number.annotate({ format: "uint" })
10660 .check(Schema.isInt())
10661 .check(Schema.isGreaterThanOrEqualTo(0)),
10662 }).annotate({
10663 description: "Byte range in the parent `text` buffer that this element occupies.",
10664 }),
10665 placeholder: Schema.optionalKey(
10666 Schema.Union([
10667 Schema.String.annotate({
10668 description: "Optional human-readable placeholder for the element, displayed in the UI.",
10669 }),
10670 Schema.Null,
10671 ]),
10672 ),
12934export const V2TurnStartResponse__HookPromptFragment = Schema.Struct({
12935 hookRunId: Schema.String,
12936 text: Schema.String,
12937}).annotate({ identifier: "V2TurnStartResponse__HookPromptFragment" });
12938
12939export type V2TurnStartResponse__MemoryCitationEntry = {
12940 readonly lineEnd: number;
12941 readonly lineStart: number;
12942 readonly note: string;
12943 readonly path: string;
12944};
12945export const V2TurnStartResponse__MemoryCitationEntry = Schema.Struct({
12946 lineEnd: Schema.Number.annotate({ format: "uint32" })
12947 .check(Schema.isInt().annotate({ expected: "an integer" }))
12948 .check(
12949 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12950 ),
12951 lineStart: Schema.Number.annotate({ format: "uint32" })
12952 .check(Schema.isInt().annotate({ expected: "an integer" }))
12953 .check(
12954 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12955 ),
12956 note: Schema.String,
12957 path: Schema.String,
12958}).annotate({ identifier: "V2TurnStartResponse__MemoryCitationEntry" });
12959
12960export type V2TurnStartResponse__MessagePhase = "commentary" | "final_answer";
12961export const V2TurnStartResponse__MessagePhase = Schema.Union(
12962 [
12963 Schema.Literal("commentary").annotate({
12964 description:
12965 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
12966 }),
12967 Schema.Literal("final_answer").annotate({
12968 description: "The assistant's terminal answer text for the current turn.",
12969 }),
12970 ],
12971 { mode: "oneOf" },
12972).annotate({
12973 description:
12974 '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.',
12975 identifier: "V2TurnStartResponse__MessagePhase",
1067312976});
1067412977
1067512978export type V2TurnStartResponse__AbsolutePathBuf = string;
1067612979export const V2TurnStartResponse__AbsolutePathBuf = Schema.String.annotate({
1067712980 description:
1067812981 "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.",
12982 identifier: "V2TurnStartResponse__AbsolutePathBuf",
1067912983});
1068012984
10681export type V2TurnStartResponse__CollabAgentStatus =
10682 | "pendingInit"
10683 | "running"
10684 | "interrupted"
10685 | "completed"
10686 | "errored"
10687 | "shutdown"
10688 | "notFound";
10689export const V2TurnStartResponse__CollabAgentStatus = Schema.Literals([
10690 "pendingInit",
10691 "running",
10692 "interrupted",
10693 "completed",
10694 "errored",
10695 "shutdown",
10696 "notFound",
10697]);
12985export type V2TurnStartResponse__LegacyAppPathString = string;
12986export const V2TurnStartResponse__LegacyAppPathString = Schema.String.annotate({
12987 identifier: "V2TurnStartResponse__LegacyAppPathString",
12988});
12989
12990export type V2TurnStartResponse__CommandExecutionSource =
12991 | "agent"
12992 | "userShell"
12993 | "unifiedExecStartup"
12994 | "unifiedExecInteraction";
12995export const V2TurnStartResponse__CommandExecutionSource = Schema.Literals([
12996 "agent",
12997 "userShell",
12998 "unifiedExecStartup",
12999 "unifiedExecInteraction",
13000]).annotate({ identifier: "V2TurnStartResponse__CommandExecutionSource" });
1069813001
1069913002export type V2TurnStartResponse__CommandExecutionStatus =
1070013003 | "inProgress"
......@@ -10706,62 +13009,39 @@ export const V2TurnStartResponse__CommandExecutionStatus = Schema.Literals([
1070613009 "completed",
1070713010 "failed",
1070813011 "declined",
10709]);
13012]).annotate({ identifier: "V2TurnStartResponse__CommandExecutionStatus" });
1071013013
10711export type V2TurnStartResponse__DynamicToolCallOutputContentItem =
10712 | { readonly text: string; readonly type: "inputText" }
10713 | { readonly imageUrl: string; readonly type: "inputImage" }
10714 | { readonly audioUrl: string; readonly type: "inputAudio" };
10715export const V2TurnStartResponse__DynamicToolCallOutputContentItem = Schema.Union(
13014export type V2TurnStartResponse__PatchChangeKind =
13015 | { readonly type: "add" }
13016 | { readonly type: "delete" }
13017 | { readonly move_path?: string | null; readonly type: "update" };
13018export const V2TurnStartResponse__PatchChangeKind = Schema.Union(
1071613019 [
1071713020 Schema.Struct({
10718 text: Schema.String,
10719 type: Schema.Literal("inputText").annotate({
10720 title: "InputTextDynamicToolCallOutputContentItemType",
10721 }),
10722 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
13021 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
13022 }).annotate({ title: "AddPatchChangeKind" }),
1072313023 Schema.Struct({
10724 imageUrl: Schema.String,
10725 type: Schema.Literal("inputImage").annotate({
10726 title: "InputImageDynamicToolCallOutputContentItemType",
10727 }),
10728 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
13024 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
13025 }).annotate({ title: "DeletePatchChangeKind" }),
1072913026 Schema.Struct({
10730 audioUrl: Schema.String,
10731 type: Schema.Literal("inputAudio").annotate({
10732 title: "InputAudioDynamicToolCallOutputContentItemType",
10733 }),
10734 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
13027 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13028 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
13029 }).annotate({ title: "UpdatePatchChangeKind" }),
1073513030 ],
1073613031 { mode: "oneOf" },
10737);
13032).annotate({ identifier: "V2TurnStartResponse__PatchChangeKind" });
1073813033
10739export type V2TurnStartResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
10740export const V2TurnStartResponse__DynamicToolCallStatus = Schema.Literals([
13034export type V2TurnStartResponse__PatchApplyStatus =
13035 | "inProgress"
13036 | "completed"
13037 | "failed"
13038 | "declined";
13039export const V2TurnStartResponse__PatchApplyStatus = Schema.Literals([
1074113040 "inProgress",
1074213041 "completed",
1074313042 "failed",
10744]);
10745
10746export type V2TurnStartResponse__HookPromptFragment = {
10747 readonly hookRunId: string;
10748 readonly text: string;
10749};
10750export const V2TurnStartResponse__HookPromptFragment = Schema.Struct({
10751 hookRunId: Schema.String,
10752 text: Schema.String,
10753});
10754
10755export type V2TurnStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
10756export const V2TurnStartResponse__ImageDetail = Schema.Literals([
10757 "auto",
10758 "low",
10759 "high",
10760 "original",
10761]);
10762
10763export type V2TurnStartResponse__LegacyAppPathString = string;
10764export const V2TurnStartResponse__LegacyAppPathString = Schema.String;
13043 "declined",
13044]).annotate({ identifier: "V2TurnStartResponse__PatchApplyStatus" });
1076513045
1076613046export type V2TurnStartResponse__McpToolCallAppContext = {
1076713047 readonly actionName?: string | null;
......@@ -10776,94 +13056,127 @@ export const V2TurnStartResponse__McpToolCallAppContext = Schema.Struct({
1077613056 connectorId: Schema.String,
1077713057 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1077813058 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10779});
13059}).annotate({ identifier: "V2TurnStartResponse__McpToolCallAppContext" });
1078013060
1078113061export type V2TurnStartResponse__McpToolCallError = { readonly message: string };
10782export const V2TurnStartResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
13062export const V2TurnStartResponse__McpToolCallError = Schema.Struct({
13063 message: Schema.String,
13064}).annotate({ identifier: "V2TurnStartResponse__McpToolCallError" });
1078313065
1078413066export type V2TurnStartResponse__McpToolCallResult = {
10785 readonly _meta?: unknown;
10786 readonly content: ReadonlyArray<unknown>;
10787 readonly structuredContent?: unknown;
13067 readonly _meta?: Schema.Json;
13068 readonly content: ReadonlyArray<Schema.Json>;
13069 readonly structuredContent?: Schema.Json;
1078813070};
1078913071export const V2TurnStartResponse__McpToolCallResult = Schema.Struct({
10790 _meta: Schema.optionalKey(Schema.Unknown),
10791 content: Schema.Array(Schema.Unknown),
10792 structuredContent: Schema.optionalKey(Schema.Unknown),
10793});
13072 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
13073 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
13074 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
13075}).annotate({ identifier: "V2TurnStartResponse__McpToolCallResult" });
1079413076
1079513077export type V2TurnStartResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
1079613078export const V2TurnStartResponse__McpToolCallStatus = Schema.Literals([
1079713079 "inProgress",
1079813080 "completed",
1079913081 "failed",
10800]);
13082]).annotate({ identifier: "V2TurnStartResponse__McpToolCallStatus" });
1080113083
10802export type V2TurnStartResponse__MemoryCitationEntry = {
10803 readonly lineEnd: number;
10804 readonly lineStart: number;
10805 readonly note: string;
10806 readonly path: string;
10807};
10808export const V2TurnStartResponse__MemoryCitationEntry = Schema.Struct({
10809 lineEnd: Schema.Number.annotate({ format: "uint32" })
10810 .check(Schema.isInt())
10811 .check(Schema.isGreaterThanOrEqualTo(0)),
10812 lineStart: Schema.Number.annotate({ format: "uint32" })
10813 .check(Schema.isInt())
10814 .check(Schema.isGreaterThanOrEqualTo(0)),
10815 note: Schema.String,
10816 path: Schema.String,
10817});
10818
10819export type V2TurnStartResponse__MessagePhase = "commentary" | "final_answer";
10820export const V2TurnStartResponse__MessagePhase = Schema.Literals([
10821 "commentary",
10822 "final_answer",
10823]).annotate({
10824 description:
10825 '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.',
10826});
10827
10828export type V2TurnStartResponse__NonSteerableTurnKind = "review" | "compact";
10829export const V2TurnStartResponse__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
10830
10831export type V2TurnStartResponse__PatchApplyStatus =
10832 | "inProgress"
10833 | "completed"
10834 | "failed"
10835 | "declined";
10836export const V2TurnStartResponse__PatchApplyStatus = Schema.Literals([
10837 "inProgress",
10838 "completed",
10839 "failed",
10840 "declined",
10841]);
10842
10843export type V2TurnStartResponse__PatchChangeKind =
10844 | { readonly type: "add" }
10845 | { readonly type: "delete" }
10846 | { readonly move_path?: string | null; readonly type: "update" };
10847export const V2TurnStartResponse__PatchChangeKind = Schema.Union(
13084export type V2TurnStartResponse__DynamicToolCallOutputContentItem =
13085 | { readonly text: string; readonly type: "inputText" }
13086 | { readonly imageUrl: string; readonly type: "inputImage" }
13087 | { readonly audioUrl: string; readonly type: "inputAudio" };
13088export const V2TurnStartResponse__DynamicToolCallOutputContentItem = Schema.Union(
1084813089 [
1084913090 Schema.Struct({
10850 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
10851 }).annotate({ title: "AddPatchChangeKind" }),
13091 text: Schema.String,
13092 type: Schema.Literal("inputText").annotate({
13093 title: "InputTextDynamicToolCallOutputContentItemType",
13094 }),
13095 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
1085213096 Schema.Struct({
10853 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
10854 }).annotate({ title: "DeletePatchChangeKind" }),
13097 imageUrl: Schema.String,
13098 type: Schema.Literal("inputImage").annotate({
13099 title: "InputImageDynamicToolCallOutputContentItemType",
13100 }),
13101 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
1085513102 Schema.Struct({
10856 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10857 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
10858 }).annotate({ title: "UpdatePatchChangeKind" }),
13103 audioUrl: Schema.String,
13104 type: Schema.Literal("inputAudio").annotate({
13105 title: "InputAudioDynamicToolCallOutputContentItemType",
13106 }),
13107 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
1085913108 ],
1086013109 { mode: "oneOf" },
10861);
13110).annotate({ identifier: "V2TurnStartResponse__DynamicToolCallOutputContentItem" });
13111
13112export type V2TurnStartResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
13113export const V2TurnStartResponse__DynamicToolCallStatus = Schema.Literals([
13114 "inProgress",
13115 "completed",
13116 "failed",
13117]).annotate({ identifier: "V2TurnStartResponse__DynamicToolCallStatus" });
13118
13119export type V2TurnStartResponse__CollabAgentStatus =
13120 | "pendingInit"
13121 | "running"
13122 | "interrupted"
13123 | "completed"
13124 | "errored"
13125 | "shutdown"
13126 | "notFound";
13127export const V2TurnStartResponse__CollabAgentStatus = Schema.Literals([
13128 "pendingInit",
13129 "running",
13130 "interrupted",
13131 "completed",
13132 "errored",
13133 "shutdown",
13134 "notFound",
13135]).annotate({ identifier: "V2TurnStartResponse__CollabAgentStatus" });
1086213136
1086313137export type V2TurnStartResponse__ReasoningEffort = string;
1086413138export const V2TurnStartResponse__ReasoningEffort = Schema.String.annotate({
1086513139 description: "A non-empty reasoning effort value advertised by the model.",
10866}).check(Schema.isMinLength(1));
13140}).check(
13141 Schema.isMinLength(1).annotate({
13142 expected: "a value with a length of at least 1",
13143 identifier: "V2TurnStartResponse__ReasoningEffort",
13144 }),
13145);
13146
13147export type V2TurnStartResponse__CollabAgentToolCallStatus =
13148 | "inProgress"
13149 | "completed"
13150 | "failed"
13151 | "interrupted";
13152export const V2TurnStartResponse__CollabAgentToolCallStatus = Schema.Literals([
13153 "inProgress",
13154 "completed",
13155 "failed",
13156 "interrupted",
13157]).annotate({ identifier: "V2TurnStartResponse__CollabAgentToolCallStatus" });
13158
13159export type V2TurnStartResponse__CollabAgentTool =
13160 | "spawnAgent"
13161 | "sendInput"
13162 | "resumeAgent"
13163 | "wait"
13164 | "closeAgent"
13165 | "sendMessage"
13166 | "followupTask"
13167 | "interruptAgent"
13168 | "listAgents";
13169export const V2TurnStartResponse__CollabAgentTool = Schema.Literals([
13170 "spawnAgent",
13171 "sendInput",
13172 "resumeAgent",
13173 "wait",
13174 "closeAgent",
13175 "sendMessage",
13176 "followupTask",
13177 "interruptAgent",
13178 "listAgents",
13179]).annotate({ identifier: "V2TurnStartResponse__CollabAgentTool" });
1086713180
1086813181export type V2TurnStartResponse__SubAgentActivityKind =
1086913182 | "started"
......@@ -10875,40 +13188,7 @@ export const V2TurnStartResponse__SubAgentActivityKind = Schema.Literals([
1087513188 "interacted",
1087613189 "interrupted",
1087713190 "completed",
10878]);
10879
10880export type V2TurnStartResponse__TextElement = {
10881 readonly byteRange: { readonly end: number; readonly start: number };
10882 readonly placeholder?: string | null;
10883};
10884export const V2TurnStartResponse__TextElement = Schema.Struct({
10885 byteRange: Schema.Struct({
10886 end: Schema.Number.annotate({ format: "uint" })
10887 .check(Schema.isInt())
10888 .check(Schema.isGreaterThanOrEqualTo(0)),
10889 start: Schema.Number.annotate({ format: "uint" })
10890 .check(Schema.isInt())
10891 .check(Schema.isGreaterThanOrEqualTo(0)),
10892 }).annotate({
10893 description: "Byte range in the parent `text` buffer that this element occupies.",
10894 }),
10895 placeholder: Schema.optionalKey(
10896 Schema.Union([
10897 Schema.String.annotate({
10898 description: "Optional human-readable placeholder for the element, displayed in the UI.",
10899 }),
10900 Schema.Null,
10901 ]),
10902 ),
10903});
10904
10905export type V2TurnStartResponse__TurnStatus = "completed" | "interrupted" | "failed" | "inProgress";
10906export const V2TurnStartResponse__TurnStatus = Schema.Literals([
10907 "completed",
10908 "interrupted",
10909 "failed",
10910 "inProgress",
10911]);
13191]).annotate({ identifier: "V2TurnStartResponse__SubAgentActivityKind" });
1091213192
1091313193export type V2TurnStartResponse__WebSearchAction =
1091413194 | {
......@@ -10940,41 +13220,60 @@ export const V2TurnStartResponse__WebSearchAction = Schema.Union(
1094013220 }).annotate({ title: "OtherWebSearchAction" }),
1094113221 ],
1094213222 { mode: "oneOf" },
10943);
13223).annotate({ identifier: "V2TurnStartResponse__WebSearchAction" });
13224
13225export type V2TurnStartResponse__TurnItemsView = "notLoaded" | "summary" | "full";
13226export const V2TurnStartResponse__TurnItemsView = Schema.Union(
13227 [
13228 Schema.Literal("notLoaded").annotate({
13229 description: "`items` was not loaded for this turn. The field is intentionally empty.",
13230 }),
13231 Schema.Literal("summary").annotate({
13232 description: "`items` contains only a display summary for this turn.",
13233 }),
13234 Schema.Literal("full").annotate({
13235 description:
13236 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
13237 }),
13238 ],
13239 { mode: "oneOf" },
13240).annotate({ identifier: "V2TurnStartResponse__TurnItemsView" });
13241
13242export type V2TurnStartResponse__TurnStatus = "completed" | "interrupted" | "failed" | "inProgress";
13243export const V2TurnStartResponse__TurnStatus = Schema.Literals([
13244 "completed",
13245 "interrupted",
13246 "failed",
13247 "inProgress",
13248]).annotate({ identifier: "V2TurnStartResponse__TurnStatus" });
13249
13250export type V2TurnSteerParams__ByteRange = { readonly end: number; readonly start: number };
13251export const V2TurnSteerParams__ByteRange = Schema.Struct({
13252 end: Schema.Number.annotate({ format: "uint" })
13253 .check(Schema.isInt().annotate({ expected: "an integer" }))
13254 .check(
13255 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
13256 ),
13257 start: Schema.Number.annotate({ format: "uint" })
13258 .check(Schema.isInt().annotate({ expected: "an integer" }))
13259 .check(
13260 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
13261 ),
13262}).annotate({ identifier: "V2TurnSteerParams__ByteRange" });
13263
13264export type V2TurnSteerParams__ImageDetail = "auto" | "low" | "high" | "original";
13265export const V2TurnSteerParams__ImageDetail = Schema.Literals([
13266 "auto",
13267 "low",
13268 "high",
13269 "original",
13270]).annotate({ identifier: "V2TurnSteerParams__ImageDetail" });
1094413271
1094513272export type V2TurnSteerParams__AdditionalContextKind = "untrusted" | "application";
1094613273export const V2TurnSteerParams__AdditionalContextKind = Schema.Literals([
1094713274 "untrusted",
1094813275 "application",
10949]);
10950
10951export type V2TurnSteerParams__ImageDetail = "auto" | "low" | "high" | "original";
10952export const V2TurnSteerParams__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
10953
10954export type V2TurnSteerParams__TextElement = {
10955 readonly byteRange: { readonly end: number; readonly start: number };
10956 readonly placeholder?: string | null;
10957};
10958export const V2TurnSteerParams__TextElement = Schema.Struct({
10959 byteRange: Schema.Struct({
10960 end: Schema.Number.annotate({ format: "uint" })
10961 .check(Schema.isInt())
10962 .check(Schema.isGreaterThanOrEqualTo(0)),
10963 start: Schema.Number.annotate({ format: "uint" })
10964 .check(Schema.isInt())
10965 .check(Schema.isGreaterThanOrEqualTo(0)),
10966 }).annotate({
10967 description: "Byte range in the parent `text` buffer that this element occupies.",
10968 }),
10969 placeholder: Schema.optionalKey(
10970 Schema.Union([
10971 Schema.String.annotate({
10972 description: "Optional human-readable placeholder for the element, displayed in the UI.",
10973 }),
10974 Schema.Null,
10975 ]),
10976 ),
10977});
13276]).annotate({ identifier: "V2TurnSteerParams__AdditionalContextKind" });
1097813277
1097913278export type V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness =
1098013279 | "ready"
......@@ -10984,7 +13283,7 @@ export const V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness = Schema
1098413283 "ready",
1098513284 "notConfigured",
1098613285 "updateRequired",
10987]);
13286]).annotate({ identifier: "V2WindowsSandboxReadinessResponse__WindowsSandboxReadiness" });
1098813287
1098913288export type V2WindowsSandboxSetupCompletedNotification__WindowsSandboxSetupMode =
1099013289 | "elevated"
......@@ -10992,19 +13291,20 @@ export type V2WindowsSandboxSetupCompletedNotification__WindowsSandboxSetupMode
1099213291export const V2WindowsSandboxSetupCompletedNotification__WindowsSandboxSetupMode = Schema.Literals([
1099313292 "elevated",
1099413293 "unelevated",
10995]);
13294]).annotate({ identifier: "V2WindowsSandboxSetupCompletedNotification__WindowsSandboxSetupMode" });
1099613295
1099713296export type V2WindowsSandboxSetupStartParams__AbsolutePathBuf = string;
1099813297export const V2WindowsSandboxSetupStartParams__AbsolutePathBuf = Schema.String.annotate({
1099913298 description:
1100013299 "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.",
13300 identifier: "V2WindowsSandboxSetupStartParams__AbsolutePathBuf",
1100113301});
1100213302
1100313303export type V2WindowsSandboxSetupStartParams__WindowsSandboxSetupMode = "elevated" | "unelevated";
1100413304export const V2WindowsSandboxSetupStartParams__WindowsSandboxSetupMode = Schema.Literals([
1100513305 "elevated",
1100613306 "unelevated",
11007]);
13307]).annotate({ identifier: "V2WindowsSandboxSetupStartParams__WindowsSandboxSetupMode" });
1100813308
1100913309export type ApplyPatchApprovalResponse__NetworkPolicyAmendment = {
1101013310 readonly action: ApplyPatchApprovalResponse__NetworkPolicyRuleAction;
......@@ -11013,19 +13313,323 @@ export type ApplyPatchApprovalResponse__NetworkPolicyAmendment = {
1101313313export const ApplyPatchApprovalResponse__NetworkPolicyAmendment = Schema.Struct({
1101413314 action: ApplyPatchApprovalResponse__NetworkPolicyRuleAction,
1101513315 host: Schema.String,
13316}).annotate({ identifier: "ApplyPatchApprovalResponse__NetworkPolicyAmendment" });
13317
13318export type ClientRequest__InitializeParams = {
13319 readonly capabilities?: ClientRequest__InitializeCapabilities | null;
13320 readonly clientInfo: ClientRequest__ClientInfo;
13321};
13322export const ClientRequest__InitializeParams = Schema.Struct({
13323 capabilities: Schema.optionalKey(
13324 Schema.Union([ClientRequest__InitializeCapabilities, Schema.Null]),
13325 ),
13326 clientInfo: ClientRequest__ClientInfo,
13327}).annotate({ identifier: "ClientRequest__InitializeParams" });
13328
13329export type ClientRequest__ThreadResumeParams = {
13330 readonly approvalPolicy?: ClientRequest__AskForApproval | null;
13331 readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null;
13332 readonly baseInstructions?: string | null;
13333 readonly config?: { readonly [x: string]: Schema.Json } | null;
13334 readonly cwd?: string | null;
13335 readonly developerInstructions?: string | null;
13336 readonly model?: string | null;
13337 readonly modelProvider?: string | null;
13338 readonly personality?: ClientRequest__Personality | null;
13339 readonly sandbox?: ClientRequest__SandboxMode | null;
13340 readonly serviceTier?: string | null;
13341 readonly threadId: string;
13342};
13343export const ClientRequest__ThreadResumeParams = Schema.Struct({
13344 approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])),
13345 approvalsReviewer: Schema.optionalKey(
13346 Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({
13347 description:
13348 "Override where approval requests are routed for review on this thread and subsequent turns.",
13349 }),
13350 ),
13351 baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13352 config: Schema.optionalKey(
13353 Schema.Union([
13354 Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
13355 Schema.Null,
13356 ]),
13357 ),
13358 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13359 developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13360 model: Schema.optionalKey(
13361 Schema.Union([
13362 Schema.String.annotate({
13363 description: "Configuration overrides for the resumed thread, if any.",
13364 }),
13365 Schema.Null,
13366 ]),
13367 ),
13368 modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13369 personality: Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null])),
13370 sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])),
13371 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13372 threadId: Schema.String,
13373}).annotate({
13374 description:
13375 "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nFor non-running threads, the precedence is: history > non-empty path > thread_id. If using history or a non-empty path for a non-running thread, the thread_id param will be ignored.\n\nIf thread_id identifies a running thread, app-server rejoins that thread and treats a non-empty path as a consistency check against the active rollout path. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
13376 identifier: "ClientRequest__ThreadResumeParams",
1101613377});
1101713378
11018export type ClientRequest__PluginInstallParams = {
11019 readonly marketplacePath?: ClientRequest__AbsolutePathBuf | null;
11020 readonly pluginName: string;
11021 readonly remoteMarketplaceName?: string | null;
13379export type ClientRequest__ThreadStartParams = {
13380 readonly approvalPolicy?: ClientRequest__AskForApproval | null;
13381 readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null;
13382 readonly baseInstructions?: string | null;
13383 readonly config?: { readonly [x: string]: Schema.Json } | null;
13384 readonly cwd?: string | null;
13385 readonly developerInstructions?: string | null;
13386 readonly ephemeral?: boolean | null;
13387 readonly model?: string | null;
13388 readonly modelProvider?: string | null;
13389 readonly personality?: ClientRequest__Personality | null;
13390 readonly sandbox?: ClientRequest__SandboxMode | null;
13391 readonly serviceName?: string | null;
13392 readonly serviceTier?: string | null;
13393 readonly sessionStartSource?: ClientRequest__ThreadStartSource | null;
13394 readonly threadSource?: ClientRequest__ThreadSource | null;
1102213395};
11023export const ClientRequest__PluginInstallParams = Schema.Struct({
11024 marketplacePath: Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])),
11025 pluginName: Schema.String,
11026 remoteMarketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13396export const ClientRequest__ThreadStartParams = Schema.Struct({
13397 approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])),
13398 approvalsReviewer: Schema.optionalKey(
13399 Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({
13400 description:
13401 "Override where approval requests are routed for review on this thread and subsequent turns.",
13402 }),
13403 ),
13404 baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13405 config: Schema.optionalKey(
13406 Schema.Union([
13407 Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
13408 Schema.Null,
13409 ]),
13410 ),
13411 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13412 developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13413 ephemeral: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
13414 model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13415 modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13416 personality: Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null])),
13417 sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])),
13418 serviceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13419 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13420 sessionStartSource: Schema.optionalKey(
13421 Schema.Union([ClientRequest__ThreadStartSource, Schema.Null]),
13422 ),
13423 threadSource: Schema.optionalKey(
13424 Schema.Union([ClientRequest__ThreadSource, Schema.Null]).annotate({
13425 description: "Optional client-supplied analytics source classification for this thread.",
13426 }),
13427 ),
13428}).annotate({ identifier: "ClientRequest__ThreadStartParams" });
13429
13430export type ClientRequest__ThreadForkParams = {
13431 readonly approvalPolicy?: ClientRequest__AskForApproval | null;
13432 readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null;
13433 readonly baseInstructions?: string | null;
13434 readonly config?: { readonly [x: string]: Schema.Json } | null;
13435 readonly cwd?: string | null;
13436 readonly developerInstructions?: string | null;
13437 readonly ephemeral?: boolean;
13438 readonly lastTurnId?: string | null;
13439 readonly model?: string | null;
13440 readonly modelProvider?: string | null;
13441 readonly sandbox?: ClientRequest__SandboxMode | null;
13442 readonly serviceTier?: string | null;
13443 readonly threadId: string;
13444 readonly threadSource?: ClientRequest__ThreadSource | null;
13445};
13446export const ClientRequest__ThreadForkParams = Schema.Struct({
13447 approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])),
13448 approvalsReviewer: Schema.optionalKey(
13449 Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({
13450 description:
13451 "Override where approval requests are routed for review on this thread and subsequent turns.",
13452 }),
13453 ),
13454 baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13455 config: Schema.optionalKey(
13456 Schema.Union([
13457 Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
13458 Schema.Null,
13459 ]),
13460 ),
13461 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13462 developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13463 ephemeral: Schema.optionalKey(Schema.Boolean),
13464 lastTurnId: Schema.optionalKey(
13465 Schema.Union([
13466 Schema.String.annotate({
13467 description:
13468 "Optional last turn id to fork through, inclusive.\n\nWhen specified, turns after `last_turn_id` are omitted from the fork. The referenced turn cannot be in progress.",
13469 }),
13470 Schema.Null,
13471 ]),
13472 ),
13473 model: Schema.optionalKey(
13474 Schema.Union([
13475 Schema.String.annotate({
13476 description: "Configuration overrides for the forked thread, if any.",
13477 }),
13478 Schema.Null,
13479 ]),
13480 ),
13481 modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13482 sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])),
13483 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13484 threadId: Schema.String,
13485 threadSource: Schema.optionalKey(
13486 Schema.Union([ClientRequest__ThreadSource, Schema.Null]).annotate({
13487 description:
13488 "Optional client-supplied analytics source classification for this forked thread.",
13489 }),
13490 ),
13491}).annotate({
13492 description:
13493 "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using a non-empty path, the thread_id param will be ignored. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
13494 identifier: "ClientRequest__ThreadForkParams",
1102713495});
1102813496
13497export type ClientRequest__ThreadGoalSetParams = {
13498 readonly objective?: string | null;
13499 readonly status?: ClientRequest__ThreadGoalStatus | null;
13500 readonly threadId: string;
13501 readonly tokenBudget?: number | null;
13502};
13503export const ClientRequest__ThreadGoalSetParams = Schema.Struct({
13504 objective: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13505 status: Schema.optionalKey(Schema.Union([ClientRequest__ThreadGoalStatus, Schema.Null])),
13506 threadId: Schema.String,
13507 tokenBudget: Schema.optionalKey(
13508 Schema.Union([
13509 Schema.Number.annotate({ format: "int64" }).check(
13510 Schema.isInt().annotate({ expected: "an integer" }),
13511 ),
13512 Schema.Null,
13513 ]),
13514 ),
13515}).annotate({ identifier: "ClientRequest__ThreadGoalSetParams" });
13516
13517export type ClientRequest__ThreadMetadataUpdateParams = {
13518 readonly gitInfo?: ClientRequest__ThreadMetadataGitInfoUpdateParams | null;
13519 readonly threadId: string;
13520};
13521export const ClientRequest__ThreadMetadataUpdateParams = Schema.Struct({
13522 gitInfo: Schema.optionalKey(
13523 Schema.Union([ClientRequest__ThreadMetadataGitInfoUpdateParams, Schema.Null]).annotate({
13524 description:
13525 "Patch the stored Git metadata for this thread. Omit a field to leave it unchanged, set it to `null` to clear it, or provide a string to replace the stored value.",
13526 }),
13527 ),
13528 threadId: Schema.String,
13529}).annotate({ identifier: "ClientRequest__ThreadMetadataUpdateParams" });
13530
13531export type ClientRequest__ThreadListParams = {
13532 readonly archived?: boolean | null;
13533 readonly cursor?: string | null;
13534 readonly cwd?: ClientRequest__ThreadListCwdFilter | null;
13535 readonly limit?: number | null;
13536 readonly modelProviders?: ReadonlyArray<string> | null;
13537 readonly searchTerm?: string | null;
13538 readonly sortDirection?: ClientRequest__SortDirection | null;
13539 readonly sortKey?: ClientRequest__ThreadSortKey | null;
13540 readonly sourceKinds?: ReadonlyArray<ClientRequest__ThreadSourceKind> | null;
13541 readonly useStateDbOnly?: boolean;
13542};
13543export const ClientRequest__ThreadListParams = Schema.Struct({
13544 archived: Schema.optionalKey(
13545 Schema.Union([
13546 Schema.Boolean.annotate({
13547 description:
13548 "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned.",
13549 }),
13550 Schema.Null,
13551 ]),
13552 ),
13553 cursor: Schema.optionalKey(
13554 Schema.Union([
13555 Schema.String.annotate({
13556 description: "Opaque pagination cursor returned by a previous call.",
13557 }),
13558 Schema.Null,
13559 ]),
13560 ),
13561 cwd: Schema.optionalKey(
13562 Schema.Union([ClientRequest__ThreadListCwdFilter, Schema.Null]).annotate({
13563 description:
13564 "Optional cwd filter or filters; when set, only threads whose session cwd exactly matches one of these paths are returned.",
13565 }),
13566 ),
13567 limit: Schema.optionalKey(
13568 Schema.Union([
13569 Schema.Number.annotate({
13570 description: "Optional page size; defaults to a reasonable server-side value.",
13571 format: "uint32",
13572 })
13573 .check(Schema.isInt().annotate({ expected: "an integer" }))
13574 .check(
13575 Schema.isGreaterThanOrEqualTo(0).annotate({
13576 expected: "a value greater than or equal to 0",
13577 }),
13578 ),
13579 Schema.Null,
13580 ]),
13581 ),
13582 modelProviders: Schema.optionalKey(
13583 Schema.Union([
13584 Schema.Array(Schema.String).annotate({
13585 description:
13586 "Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers.",
13587 }),
13588 Schema.Null,
13589 ]),
13590 ),
13591 searchTerm: Schema.optionalKey(
13592 Schema.Union([
13593 Schema.String.annotate({
13594 description: "Optional substring filter for the extracted thread title.",
13595 }),
13596 Schema.Null,
13597 ]),
13598 ),
13599 sortDirection: Schema.optionalKey(
13600 Schema.Union([ClientRequest__SortDirection, Schema.Null]).annotate({
13601 description: "Optional sort direction; defaults to descending (newest first).",
13602 }),
13603 ),
13604 sortKey: Schema.optionalKey(
13605 Schema.Union([ClientRequest__ThreadSortKey, Schema.Null]).annotate({
13606 description: "Optional sort key; defaults to created_at.",
13607 }),
13608 ),
13609 sourceKinds: Schema.optionalKey(
13610 Schema.Union([
13611 Schema.Array(ClientRequest__ThreadSourceKind).annotate({
13612 description:
13613 "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources.",
13614 }),
13615 Schema.Null,
13616 ]),
13617 ),
13618 useStateDbOnly: Schema.optionalKey(
13619 Schema.Boolean.annotate({
13620 description:
13621 "If true, return from the state DB without scanning JSONL rollouts to repair thread metadata. Omitted or false preserves scan-and-repair behavior.",
13622 }),
13623 ),
13624}).annotate({ identifier: "ClientRequest__ThreadListParams" });
13625
13626export type ClientRequest__SkillsExtraRootsSetParams = {
13627 readonly extraRoots: ReadonlyArray<ClientRequest__AbsolutePathBuf>;
13628};
13629export const ClientRequest__SkillsExtraRootsSetParams = Schema.Struct({
13630 extraRoots: Schema.Array(ClientRequest__AbsolutePathBuf),
13631}).annotate({ identifier: "ClientRequest__SkillsExtraRootsSetParams" });
13632
1102913633export type ClientRequest__PluginInstalledParams = {
1103013634 readonly cwds?: ReadonlyArray<ClientRequest__AbsolutePathBuf> | null;
1103113635 readonly installSuggestionPluginNames?: ReadonlyArray<string> | null;
......@@ -11048,7 +13652,7 @@ export const ClientRequest__PluginInstalledParams = Schema.Struct({
1104813652 Schema.Null,
1104913653 ]),
1105013654 ),
11051});
13655}).annotate({ identifier: "ClientRequest__PluginInstalledParams" });
1105213656
1105313657export type ClientRequest__PluginReadParams = {
1105413658 readonly marketplacePath?: ClientRequest__AbsolutePathBuf | null;
......@@ -11059,50 +13663,142 @@ export const ClientRequest__PluginReadParams = Schema.Struct({
1105913663 marketplacePath: Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])),
1106013664 pluginName: Schema.String,
1106113665 remoteMarketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13666}).annotate({ identifier: "ClientRequest__PluginReadParams" });
13667
13668export type ClientRequest__FsReadFileParams = { readonly path: ClientRequest__AbsolutePathBuf };
13669export const ClientRequest__FsReadFileParams = Schema.Struct({
13670 path: Schema.suspend(
13671 (): Schema.Codec<ClientRequest__AbsolutePathBuf> => ClientRequest__AbsolutePathBuf,
13672 ).annotate({ description: "Absolute path to read." }),
13673}).annotate({
13674 description: "Read a file from the host filesystem.",
13675 identifier: "ClientRequest__FsReadFileParams",
1106213676});
1106313677
11064export type ClientRequest__SandboxPolicy =
11065 | { readonly type: "dangerFullAccess" }
11066 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
11067 | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
11068 | {
11069 readonly excludeSlashTmp?: boolean;
11070 readonly excludeTmpdirEnvVar?: boolean;
11071 readonly networkAccess?: boolean;
11072 readonly type: "workspaceWrite";
11073 readonly writableRoots?: ReadonlyArray<ClientRequest__AbsolutePathBuf>;
11074 };
11075export const ClientRequest__SandboxPolicy = Schema.Union(
11076 [
11077 Schema.Struct({
11078 type: Schema.Literal("dangerFullAccess").annotate({
11079 title: "DangerFullAccessSandboxPolicyType",
13678export type ClientRequest__FsWriteFileParams = {
13679 readonly dataBase64: string;
13680 readonly path: ClientRequest__AbsolutePathBuf;
13681};
13682export const ClientRequest__FsWriteFileParams = Schema.Struct({
13683 dataBase64: Schema.String.annotate({ description: "File contents encoded as base64." }),
13684 path: Schema.suspend(
13685 (): Schema.Codec<ClientRequest__AbsolutePathBuf> => ClientRequest__AbsolutePathBuf,
13686 ).annotate({ description: "Absolute path to write." }),
13687}).annotate({
13688 description: "Write a file on the host filesystem.",
13689 identifier: "ClientRequest__FsWriteFileParams",
13690});
13691
13692export type ClientRequest__FsCreateDirectoryParams = {
13693 readonly path: ClientRequest__AbsolutePathBuf;
13694 readonly recursive?: boolean | null;
13695};
13696export const ClientRequest__FsCreateDirectoryParams = Schema.Struct({
13697 path: Schema.suspend(
13698 (): Schema.Codec<ClientRequest__AbsolutePathBuf> => ClientRequest__AbsolutePathBuf,
13699 ).annotate({ description: "Absolute directory path to create." }),
13700 recursive: Schema.optionalKey(
13701 Schema.Union([
13702 Schema.Boolean.annotate({
13703 description: "Whether parent directories should also be created. Defaults to `true`.",
1108013704 }),
11081 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
11082 Schema.Struct({
11083 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
11084 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
11085 }).annotate({ title: "ReadOnlySandboxPolicy" }),
11086 Schema.Struct({
11087 networkAccess: Schema.optionalKey(
11088 Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
11089 ),
11090 type: Schema.Literal("externalSandbox").annotate({
11091 title: "ExternalSandboxSandboxPolicyType",
13705 Schema.Null,
13706 ]),
13707 ),
13708}).annotate({
13709 description: "Create a directory on the host filesystem.",
13710 identifier: "ClientRequest__FsCreateDirectoryParams",
13711});
13712
13713export type ClientRequest__FsGetMetadataParams = { readonly path: ClientRequest__AbsolutePathBuf };
13714export const ClientRequest__FsGetMetadataParams = Schema.Struct({
13715 path: Schema.suspend(
13716 (): Schema.Codec<ClientRequest__AbsolutePathBuf> => ClientRequest__AbsolutePathBuf,
13717 ).annotate({ description: "Absolute path to inspect." }),
13718}).annotate({
13719 description: "Request metadata for an absolute path.",
13720 identifier: "ClientRequest__FsGetMetadataParams",
13721});
13722
13723export type ClientRequest__FsReadDirectoryParams = {
13724 readonly path: ClientRequest__AbsolutePathBuf;
13725};
13726export const ClientRequest__FsReadDirectoryParams = Schema.Struct({
13727 path: Schema.suspend(
13728 (): Schema.Codec<ClientRequest__AbsolutePathBuf> => ClientRequest__AbsolutePathBuf,
13729 ).annotate({ description: "Absolute directory path to read." }),
13730}).annotate({
13731 description: "List direct child names for a directory.",
13732 identifier: "ClientRequest__FsReadDirectoryParams",
13733});
13734
13735export type ClientRequest__FsRemoveParams = {
13736 readonly force?: boolean | null;
13737 readonly path: ClientRequest__AbsolutePathBuf;
13738 readonly recursive?: boolean | null;
13739};
13740export const ClientRequest__FsRemoveParams = Schema.Struct({
13741 force: Schema.optionalKey(
13742 Schema.Union([
13743 Schema.Boolean.annotate({
13744 description: "Whether missing paths should be ignored. Defaults to `true`.",
1109213745 }),
11093 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
11094 Schema.Struct({
11095 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
11096 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
11097 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
11098 type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
11099 writableRoots: Schema.optionalKey(
11100 Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ default: [] }),
11101 ),
11102 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
11103 ],
11104 { mode: "oneOf" },
11105);
13746 Schema.Null,
13747 ]),
13748 ),
13749 path: Schema.suspend(
13750 (): Schema.Codec<ClientRequest__AbsolutePathBuf> => ClientRequest__AbsolutePathBuf,
13751 ).annotate({ description: "Absolute path to remove." }),
13752 recursive: Schema.optionalKey(
13753 Schema.Union([
13754 Schema.Boolean.annotate({
13755 description: "Whether directory removal should recurse. Defaults to `true`.",
13756 }),
13757 Schema.Null,
13758 ]),
13759 ),
13760}).annotate({
13761 description: "Remove a file or directory tree from the host filesystem.",
13762 identifier: "ClientRequest__FsRemoveParams",
13763});
13764
13765export type ClientRequest__FsCopyParams = {
13766 readonly destinationPath: ClientRequest__AbsolutePathBuf;
13767 readonly recursive?: boolean;
13768 readonly sourcePath: ClientRequest__AbsolutePathBuf;
13769};
13770export const ClientRequest__FsCopyParams = Schema.Struct({
13771 destinationPath: Schema.suspend(
13772 (): Schema.Codec<ClientRequest__AbsolutePathBuf> => ClientRequest__AbsolutePathBuf,
13773 ).annotate({ description: "Absolute destination path." }),
13774 recursive: Schema.optionalKey(
13775 Schema.Boolean.annotate({
13776 description: "Required for directory copies; ignored for file copies.",
13777 }),
13778 ),
13779 sourcePath: Schema.suspend(
13780 (): Schema.Codec<ClientRequest__AbsolutePathBuf> => ClientRequest__AbsolutePathBuf,
13781 ).annotate({ description: "Absolute source path." }),
13782}).annotate({
13783 description: "Copy a file or directory tree on the host filesystem.",
13784 identifier: "ClientRequest__FsCopyParams",
13785});
13786
13787export type ClientRequest__FsWatchParams = {
13788 readonly path: ClientRequest__AbsolutePathBuf;
13789 readonly watchId: string;
13790};
13791export const ClientRequest__FsWatchParams = Schema.Struct({
13792 path: Schema.suspend(
13793 (): Schema.Codec<ClientRequest__AbsolutePathBuf> => ClientRequest__AbsolutePathBuf,
13794 ).annotate({ description: "Absolute file or directory path to watch." }),
13795 watchId: Schema.String.annotate({
13796 description: "Connection-scoped watch identifier used for `fs/unwatch` and `fs/changed`.",
13797 }),
13798}).annotate({
13799 description: "Start filesystem watch notifications for an absolute path.",
13800 identifier: "ClientRequest__FsWatchParams",
13801});
1110613802
1110713803export type ClientRequest__SkillsConfigWriteParams = {
1110813804 readonly enabled: boolean;
......@@ -11119,53 +13815,86 @@ export const ClientRequest__SkillsConfigWriteParams = Schema.Struct({
1111913815 description: "Path-based selector.",
1112013816 }),
1112113817 ),
11122});
13818}).annotate({ identifier: "ClientRequest__SkillsConfigWriteParams" });
1112313819
11124export type ClientRequest__SkillsExtraRootsSetParams = {
11125 readonly extraRoots: ReadonlyArray<ClientRequest__AbsolutePathBuf>;
13820export type ClientRequest__PluginInstallParams = {
13821 readonly marketplacePath?: ClientRequest__AbsolutePathBuf | null;
13822 readonly pluginName: string;
13823 readonly remoteMarketplaceName?: string | null;
1112613824};
11127export const ClientRequest__SkillsExtraRootsSetParams = Schema.Struct({
11128 extraRoots: Schema.Array(ClientRequest__AbsolutePathBuf),
11129});
13825export const ClientRequest__PluginInstallParams = Schema.Struct({
13826 marketplacePath: Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])),
13827 pluginName: Schema.String,
13828 remoteMarketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13829}).annotate({ identifier: "ClientRequest__PluginInstallParams" });
1113013830
11131export type ClientRequest__SendAddCreditsNudgeEmailParams = {
11132 readonly creditType: ClientRequest__AddCreditsNudgeCreditType;
13831export type ClientRequest__PluginListParams = {
13832 readonly cwds?: ReadonlyArray<ClientRequest__AbsolutePathBuf> | null;
13833 readonly marketplaceKinds?: ReadonlyArray<ClientRequest__PluginListMarketplaceKind> | null;
1113313834};
11134export const ClientRequest__SendAddCreditsNudgeEmailParams = Schema.Struct({
11135 creditType: ClientRequest__AddCreditsNudgeCreditType,
13835export const ClientRequest__PluginListParams = Schema.Struct({
13836 cwds: Schema.optionalKey(
13837 Schema.Union([
13838 Schema.Array(ClientRequest__AbsolutePathBuf).annotate({
13839 description:
13840 "Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered.",
13841 }),
13842 Schema.Null,
13843 ]),
13844 ),
13845 marketplaceKinds: Schema.optionalKey(
13846 Schema.Union([
13847 Schema.Array(ClientRequest__PluginListMarketplaceKind).annotate({
13848 description:
13849 "Optional marketplace kind filter. When omitted, only local marketplaces are queried, plus the default remote catalog when enabled by feature flag.",
13850 }),
13851 Schema.Null,
13852 ]),
13853 ),
13854}).annotate({ identifier: "ClientRequest__PluginListParams" });
13855
13856export type ClientRequest__PluginShareTarget = {
13857 readonly principalId: string;
13858 readonly principalType: ClientRequest__PluginSharePrincipalType;
13859 readonly role: ClientRequest__PluginShareTargetRole;
13860};
13861export const ClientRequest__PluginShareTarget = Schema.Struct({
13862 principalId: Schema.String,
13863 principalType: ClientRequest__PluginSharePrincipalType,
13864 role: ClientRequest__PluginShareTargetRole,
13865}).annotate({ identifier: "ClientRequest__PluginShareTarget" });
13866
13867export type ClientRequest__Settings = {
13868 readonly developer_instructions?: string | null;
13869 readonly model: string;
13870 readonly reasoning_effort?: ClientRequest__ReasoningEffort | null;
13871};
13872export const ClientRequest__Settings = Schema.Struct({
13873 developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13874 model: Schema.String,
13875 reasoning_effort: Schema.optionalKey(Schema.Union([ClientRequest__ReasoningEffort, Schema.Null])),
13876}).annotate({
13877 description: "Settings for a collaboration mode.",
13878 identifier: "ClientRequest__Settings",
1113613879});
1113713880
11138export type ClientRequest__ContentItem =
11139 | { readonly text: string; readonly type: "input_text" }
11140 | {
11141 readonly detail?: ClientRequest__ImageDetail | null;
11142 readonly image_url: string;
11143 readonly type: "input_image";
11144 }
11145 | { readonly audio_url: string; readonly type: "input_audio" }
11146 | { readonly text: string; readonly type: "output_text" };
11147export const ClientRequest__ContentItem = Schema.Union(
11148 [
11149 Schema.Struct({
11150 text: Schema.String,
11151 type: Schema.Literal("input_text").annotate({ title: "InputTextContentItemType" }),
11152 }).annotate({ title: "InputTextContentItem" }),
11153 Schema.Struct({
11154 detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])),
11155 image_url: Schema.String,
11156 type: Schema.Literal("input_image").annotate({ title: "InputImageContentItemType" }),
11157 }).annotate({ title: "InputImageContentItem" }),
11158 Schema.Struct({
11159 audio_url: Schema.String,
11160 type: Schema.Literal("input_audio").annotate({ title: "InputAudioContentItemType" }),
11161 }).annotate({ title: "InputAudioContentItem" }),
11162 Schema.Struct({
11163 text: Schema.String,
11164 type: Schema.Literal("output_text").annotate({ title: "OutputTextContentItemType" }),
11165 }).annotate({ title: "OutputTextContentItem" }),
11166 ],
11167 { mode: "oneOf" },
11168);
13881export type ClientRequest__TextElement = {
13882 readonly byteRange: ClientRequest__ByteRange;
13883 readonly placeholder?: string | null;
13884};
13885export const ClientRequest__TextElement = Schema.Struct({
13886 byteRange: Schema.suspend(
13887 (): Schema.Codec<ClientRequest__ByteRange> => ClientRequest__ByteRange,
13888 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
13889 placeholder: Schema.optionalKey(
13890 Schema.Union([
13891 Schema.String.annotate({
13892 description: "Optional human-readable placeholder for the element, displayed in the UI.",
13893 }),
13894 Schema.Null,
13895 ]),
13896 ),
13897}).annotate({ identifier: "ClientRequest__TextElement" });
1116913898
1117013899export type ClientRequest__FunctionCallOutputContentItem =
1117113900 | { readonly text: string; readonly type: "input_text" }
......@@ -11208,18 +13937,149 @@ export const ClientRequest__FunctionCallOutputContentItem = Schema.Union(
1120813937).annotate({
1120913938 description:
1121013939 "Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs.",
13940 identifier: "ClientRequest__FunctionCallOutputContentItem",
1121113941});
1121213942
11213export type ClientRequest__InitializeParams = {
11214 readonly capabilities?: ClientRequest__InitializeCapabilities | null;
11215 readonly clientInfo: ClientRequest__ClientInfo;
13943export type ClientRequest__ContentItem =
13944 | { readonly text: string; readonly type: "input_text" }
13945 | {
13946 readonly detail?: ClientRequest__ImageDetail | null;
13947 readonly image_url: string;
13948 readonly type: "input_image";
13949 }
13950 | { readonly audio_url: string; readonly type: "input_audio" }
13951 | { readonly text: string; readonly type: "output_text" };
13952export const ClientRequest__ContentItem = Schema.Union(
13953 [
13954 Schema.Struct({
13955 text: Schema.String,
13956 type: Schema.Literal("input_text").annotate({ title: "InputTextContentItemType" }),
13957 }).annotate({ title: "InputTextContentItem" }),
13958 Schema.Struct({
13959 detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])),
13960 image_url: Schema.String,
13961 type: Schema.Literal("input_image").annotate({ title: "InputImageContentItemType" }),
13962 }).annotate({ title: "InputImageContentItem" }),
13963 Schema.Struct({
13964 audio_url: Schema.String,
13965 type: Schema.Literal("input_audio").annotate({ title: "InputAudioContentItemType" }),
13966 }).annotate({ title: "InputAudioContentItem" }),
13967 Schema.Struct({
13968 text: Schema.String,
13969 type: Schema.Literal("output_text").annotate({ title: "OutputTextContentItemType" }),
13970 }).annotate({ title: "OutputTextContentItem" }),
13971 ],
13972 { mode: "oneOf" },
13973).annotate({ identifier: "ClientRequest__ContentItem" });
13974
13975export type ClientRequest__SandboxPolicy =
13976 | { readonly type: "dangerFullAccess" }
13977 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
13978 | { readonly networkAccess?: ClientRequest__NetworkAccess; readonly type: "externalSandbox" }
13979 | {
13980 readonly excludeSlashTmp?: boolean;
13981 readonly excludeTmpdirEnvVar?: boolean;
13982 readonly networkAccess?: boolean;
13983 readonly type: "workspaceWrite";
13984 readonly writableRoots?: ReadonlyArray<ClientRequest__AbsolutePathBuf>;
13985 };
13986export const ClientRequest__SandboxPolicy = Schema.Union(
13987 [
13988 Schema.Struct({
13989 type: Schema.Literal("dangerFullAccess").annotate({
13990 title: "DangerFullAccessSandboxPolicyType",
13991 }),
13992 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
13993 Schema.Struct({
13994 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
13995 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
13996 }).annotate({ title: "ReadOnlySandboxPolicy" }),
13997 Schema.Struct({
13998 networkAccess: Schema.optionalKey(
13999 Schema.suspend(
14000 (): Schema.Codec<ClientRequest__NetworkAccess> => ClientRequest__NetworkAccess,
14001 ).annotate({ default: "restricted" }),
14002 ),
14003 type: Schema.Literal("externalSandbox").annotate({
14004 title: "ExternalSandboxSandboxPolicyType",
14005 }),
14006 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
14007 Schema.Struct({
14008 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
14009 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
14010 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
14011 type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
14012 writableRoots: Schema.optionalKey(
14013 Schema.Array(ClientRequest__AbsolutePathBuf).annotate({ default: [] }),
14014 ),
14015 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
14016 ],
14017 { mode: "oneOf" },
14018).annotate({ identifier: "ClientRequest__SandboxPolicy" });
14019
14020export type ClientRequest__ReviewStartParams = {
14021 readonly delivery?: ClientRequest__ReviewDelivery | null;
14022 readonly target: ClientRequest__ReviewTarget;
14023 readonly threadId: string;
1121614024};
11217export const ClientRequest__InitializeParams = Schema.Struct({
11218 capabilities: Schema.optionalKey(
11219 Schema.Union([ClientRequest__InitializeCapabilities, Schema.Null]),
14025export const ClientRequest__ReviewStartParams = Schema.Struct({
14026 delivery: Schema.optionalKey(
14027 Schema.Union([ClientRequest__ReviewDelivery, Schema.Null]).annotate({
14028 description:
14029 "Where to run the review: inline (default) on the current thread or detached on a new thread (returned in `reviewThreadId`).",
14030 }),
1122014031 ),
11221 clientInfo: ClientRequest__ClientInfo,
11222});
14032 target: ClientRequest__ReviewTarget,
14033 threadId: Schema.String,
14034}).annotate({ identifier: "ClientRequest__ReviewStartParams" });
14035
14036export type ClientRequest__ListMcpServerStatusParams = {
14037 readonly cursor?: string | null;
14038 readonly detail?: ClientRequest__McpServerStatusDetail | null;
14039 readonly limit?: number | null;
14040 readonly threadId?: string | null;
14041};
14042export const ClientRequest__ListMcpServerStatusParams = Schema.Struct({
14043 cursor: Schema.optionalKey(
14044 Schema.Union([
14045 Schema.String.annotate({
14046 description: "Opaque pagination cursor returned by a previous call.",
14047 }),
14048 Schema.Null,
14049 ]),
14050 ),
14051 detail: Schema.optionalKey(
14052 Schema.Union([ClientRequest__McpServerStatusDetail, Schema.Null]).annotate({
14053 description:
14054 "Controls how much MCP inventory data to fetch for each server. Defaults to `Full` when omitted.",
14055 }),
14056 ),
14057 limit: Schema.optionalKey(
14058 Schema.Union([
14059 Schema.Number.annotate({
14060 description: "Optional page size; defaults to a server-defined value.",
14061 format: "uint32",
14062 })
14063 .check(Schema.isInt().annotate({ expected: "an integer" }))
14064 .check(
14065 Schema.isGreaterThanOrEqualTo(0).annotate({
14066 expected: "a value greater than or equal to 0",
14067 }),
14068 ),
14069 Schema.Null,
14070 ]),
14071 ),
14072 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14073}).annotate({ identifier: "ClientRequest__ListMcpServerStatusParams" });
14074
14075export type ClientRequest__WindowsSandboxSetupStartParams = {
14076 readonly cwd?: ClientRequest__AbsolutePathBuf | null;
14077 readonly mode: ClientRequest__WindowsSandboxSetupMode;
14078};
14079export const ClientRequest__WindowsSandboxSetupStartParams = Schema.Struct({
14080 cwd: Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])),
14081 mode: ClientRequest__WindowsSandboxSetupMode,
14082}).annotate({ identifier: "ClientRequest__WindowsSandboxSetupStartParams" });
1122314083
1122414084export type ClientRequest__LoginAccountParams =
1122514085 | { readonly apiKey: string; readonly type: "apiKey" }
......@@ -11291,60 +14151,70 @@ export const ClientRequest__LoginAccountParams = Schema.Union(
1129114151 }),
1129214152 ],
1129314153 { mode: "oneOf" },
11294);
14154).annotate({ identifier: "ClientRequest__LoginAccountParams" });
1129514155
11296export type ClientRequest__ListMcpServerStatusParams = {
11297 readonly cursor?: string | null;
11298 readonly detail?: ClientRequest__McpServerStatusDetail | null;
11299 readonly limit?: number | null;
11300 readonly threadId?: string | null;
14156export type ClientRequest__SendAddCreditsNudgeEmailParams = {
14157 readonly creditType: ClientRequest__AddCreditsNudgeCreditType;
1130114158};
11302export const ClientRequest__ListMcpServerStatusParams = Schema.Struct({
11303 cursor: Schema.optionalKey(
11304 Schema.Union([
11305 Schema.String.annotate({
11306 description: "Opaque pagination cursor returned by a previous call.",
11307 }),
11308 Schema.Null,
11309 ]),
11310 ),
11311 detail: Schema.optionalKey(
11312 Schema.Union([ClientRequest__McpServerStatusDetail, Schema.Null]).annotate({
11313 description:
11314 "Controls how much MCP inventory data to fetch for each server. Defaults to `Full` when omitted.",
11315 }),
11316 ),
11317 limit: Schema.optionalKey(
11318 Schema.Union([
11319 Schema.Number.annotate({
11320 description: "Optional page size; defaults to a server-defined value.",
11321 format: "uint32",
11322 })
11323 .check(Schema.isInt())
11324 .check(Schema.isGreaterThanOrEqualTo(0)),
11325 Schema.Null,
11326 ]),
11327 ),
11328 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11329});
14159export const ClientRequest__SendAddCreditsNudgeEmailParams = Schema.Struct({
14160 creditType: ClientRequest__AddCreditsNudgeCreditType,
14161}).annotate({ identifier: "ClientRequest__SendAddCreditsNudgeEmailParams" });
1133014162
11331export type ClientRequest__ConfigEdit = {
11332 readonly keyPath: string;
11333 readonly mergeStrategy: ClientRequest__MergeStrategy;
11334 readonly value: unknown;
14163export type ClientRequest__CommandExecResizeParams = {
14164 readonly processId: string;
14165 readonly size: ClientRequest__CommandExecTerminalSize;
1133514166};
11336export const ClientRequest__ConfigEdit = Schema.Struct({
11337 keyPath: Schema.String,
11338 mergeStrategy: ClientRequest__MergeStrategy,
11339 value: Schema.Unknown,
14167export const ClientRequest__CommandExecResizeParams = Schema.Struct({
14168 processId: Schema.String.annotate({
14169 description:
14170 "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
14171 }),
14172 size: Schema.suspend(
14173 (): Schema.Codec<ClientRequest__CommandExecTerminalSize> =>
14174 ClientRequest__CommandExecTerminalSize,
14175 ).annotate({ description: "New PTY size in character cells." }),
14176}).annotate({
14177 description: "Resize a running PTY-backed `command/exec` session.",
14178 identifier: "ClientRequest__CommandExecResizeParams",
1134014179});
1134114180
14181export type ClientRequest__MigrationDetails = {
14182 readonly commands?: ReadonlyArray<ClientRequest__CommandMigration>;
14183 readonly hooks?: ReadonlyArray<ClientRequest__HookMigration>;
14184 readonly mcpServers?: ReadonlyArray<ClientRequest__McpServerMigration>;
14185 readonly memory?: ReadonlyArray<string>;
14186 readonly plugins?: ReadonlyArray<ClientRequest__PluginsMigration>;
14187 readonly sessions?: ReadonlyArray<ClientRequest__SessionMigration>;
14188 readonly skills?: ReadonlyArray<ClientRequest__SkillMigration>;
14189 readonly subagents?: ReadonlyArray<ClientRequest__SubagentMigration>;
14190};
14191export const ClientRequest__MigrationDetails = Schema.Struct({
14192 commands: Schema.optionalKey(
14193 Schema.Array(ClientRequest__CommandMigration).annotate({ default: [] }),
14194 ),
14195 hooks: Schema.optionalKey(Schema.Array(ClientRequest__HookMigration).annotate({ default: [] })),
14196 mcpServers: Schema.optionalKey(
14197 Schema.Array(ClientRequest__McpServerMigration).annotate({ default: [] }),
14198 ),
14199 memory: Schema.optionalKey(Schema.Array(Schema.String)),
14200 plugins: Schema.optionalKey(
14201 Schema.Array(ClientRequest__PluginsMigration).annotate({ default: [] }),
14202 ),
14203 sessions: Schema.optionalKey(
14204 Schema.Array(ClientRequest__SessionMigration).annotate({ default: [] }),
14205 ),
14206 skills: Schema.optionalKey(Schema.Array(ClientRequest__SkillMigration).annotate({ default: [] })),
14207 subagents: Schema.optionalKey(
14208 Schema.Array(ClientRequest__SubagentMigration).annotate({ default: [] }),
14209 ),
14210}).annotate({ identifier: "ClientRequest__MigrationDetails" });
14211
1134214212export type ClientRequest__ConfigValueWriteParams = {
1134314213 readonly expectedVersion?: string | null;
1134414214 readonly filePath?: string | null;
1134514215 readonly keyPath: string;
1134614216 readonly mergeStrategy: ClientRequest__MergeStrategy;
11347 readonly value: unknown;
14217 readonly value: Schema.Json;
1134814218};
1134914219export const ClientRequest__ConfigValueWriteParams = Schema.Struct({
1135014220 expectedVersion: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
......@@ -11359,494 +14229,61 @@ export const ClientRequest__ConfigValueWriteParams = Schema.Struct({
1135914229 ),
1136014230 keyPath: Schema.String,
1136114231 mergeStrategy: ClientRequest__MergeStrategy,
11362 value: Schema.Unknown,
11363});
14232 value: Schema.Json.annotate({ expected: "JSON value" }),
14233}).annotate({ identifier: "ClientRequest__ConfigValueWriteParams" });
1136414234
11365export type ClientRequest__PluginListParams = {
11366 readonly cwds?: ReadonlyArray<ClientRequest__AbsolutePathBuf> | null;
11367 readonly marketplaceKinds?: ReadonlyArray<ClientRequest__PluginListMarketplaceKind> | null;
14235export type ClientRequest__ConfigEdit = {
14236 readonly keyPath: string;
14237 readonly mergeStrategy: ClientRequest__MergeStrategy;
14238 readonly value: Schema.Json;
1136814239};
11369export const ClientRequest__PluginListParams = Schema.Struct({
11370 cwds: Schema.optionalKey(
11371 Schema.Union([
11372 Schema.Array(ClientRequest__AbsolutePathBuf).annotate({
11373 description:
11374 "Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered.",
11375 }),
11376 Schema.Null,
11377 ]),
11378 ),
11379 marketplaceKinds: Schema.optionalKey(
11380 Schema.Union([
11381 Schema.Array(ClientRequest__PluginListMarketplaceKind).annotate({
11382 description:
11383 "Optional marketplace kind filter. When omitted, only local marketplaces are queried, plus the default remote catalog when enabled by feature flag.",
11384 }),
11385 Schema.Null,
11386 ]),
11387 ),
11388});
14240export const ClientRequest__ConfigEdit = Schema.Struct({
14241 keyPath: Schema.String,
14242 mergeStrategy: ClientRequest__MergeStrategy,
14243 value: Schema.Json.annotate({ expected: "JSON value" }),
14244}).annotate({ identifier: "ClientRequest__ConfigEdit" });
1138914245
11390export type ClientRequest__PluginShareTarget = {
11391 readonly principalId: string;
11392 readonly principalType: ClientRequest__PluginSharePrincipalType;
11393 readonly role: ClientRequest__PluginShareTargetRole;
11394};
11395export const ClientRequest__PluginShareTarget = Schema.Struct({
11396 principalId: Schema.String,
11397 principalType: ClientRequest__PluginSharePrincipalType,
11398 role: ClientRequest__PluginShareTargetRole,
11399});
11400
11401export type ClientRequest__Settings = {
11402 readonly developer_instructions?: string | null;
11403 readonly model: string;
11404 readonly reasoning_effort?: ClientRequest__ReasoningEffort | null;
11405};
11406export const ClientRequest__Settings = Schema.Struct({
11407 developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11408 model: Schema.String,
11409 reasoning_effort: Schema.optionalKey(Schema.Union([ClientRequest__ReasoningEffort, Schema.Null])),
11410}).annotate({ description: "Settings for a collaboration mode." });
11411
11412export type ClientRequest__ReviewStartParams = {
11413 readonly delivery?: ClientRequest__ReviewDelivery | null;
11414 readonly target: ClientRequest__ReviewTarget;
11415 readonly threadId: string;
11416};
11417export const ClientRequest__ReviewStartParams = Schema.Struct({
11418 delivery: Schema.optionalKey(
11419 Schema.Union([ClientRequest__ReviewDelivery, Schema.Null]).annotate({
11420 description:
11421 "Where to run the review: inline (default) on the current thread or detached on a new thread (returned in `reviewThreadId`).",
11422 }),
11423 ),
11424 target: ClientRequest__ReviewTarget,
11425 threadId: Schema.String,
11426});
11427
11428export type ClientRequest__ThreadResumeParams = {
11429 readonly approvalPolicy?: ClientRequest__AskForApproval | null;
11430 readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null;
11431 readonly baseInstructions?: string | null;
11432 readonly config?: { readonly [x: string]: unknown } | null;
11433 readonly cwd?: string | null;
11434 readonly developerInstructions?: string | null;
11435 readonly model?: string | null;
11436 readonly modelProvider?: string | null;
11437 readonly personality?: ClientRequest__Personality | null;
11438 readonly sandbox?: ClientRequest__SandboxMode | null;
11439 readonly serviceTier?: string | null;
11440 readonly threadId: string;
11441};
11442export const ClientRequest__ThreadResumeParams = Schema.Struct({
11443 approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])),
11444 approvalsReviewer: Schema.optionalKey(
11445 Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({
11446 description:
11447 "Override where approval requests are routed for review on this thread and subsequent turns.",
11448 }),
11449 ),
11450 baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11451 config: Schema.optionalKey(
11452 Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]),
11453 ),
11454 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11455 developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11456 model: Schema.optionalKey(
11457 Schema.Union([
11458 Schema.String.annotate({
11459 description: "Configuration overrides for the resumed thread, if any.",
11460 }),
11461 Schema.Null,
11462 ]),
11463 ),
11464 modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11465 personality: Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null])),
11466 sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])),
11467 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11468 threadId: Schema.String,
11469}).annotate({
11470 description:
11471 "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nFor non-running threads, the precedence is: history > non-empty path > thread_id. If using history or a non-empty path for a non-running thread, the thread_id param will be ignored.\n\nIf thread_id identifies a running thread, app-server rejoins that thread and treats a non-empty path as a consistency check against the active rollout path. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
11472});
11473
11474export type ClientRequest__MigrationDetails = {
11475 readonly commands?: ReadonlyArray<ClientRequest__CommandMigration>;
11476 readonly hooks?: ReadonlyArray<ClientRequest__HookMigration>;
11477 readonly mcpServers?: ReadonlyArray<ClientRequest__McpServerMigration>;
11478 readonly memory?: ReadonlyArray<string>;
11479 readonly plugins?: ReadonlyArray<ClientRequest__PluginsMigration>;
11480 readonly sessions?: ReadonlyArray<ClientRequest__SessionMigration>;
11481 readonly skills?: ReadonlyArray<ClientRequest__SkillMigration>;
11482 readonly subagents?: ReadonlyArray<ClientRequest__SubagentMigration>;
11483};
11484export const ClientRequest__MigrationDetails = Schema.Struct({
11485 commands: Schema.optionalKey(
11486 Schema.Array(ClientRequest__CommandMigration).annotate({ default: [] }),
11487 ),
11488 hooks: Schema.optionalKey(Schema.Array(ClientRequest__HookMigration).annotate({ default: [] })),
11489 mcpServers: Schema.optionalKey(
11490 Schema.Array(ClientRequest__McpServerMigration).annotate({ default: [] }),
11491 ),
11492 memory: Schema.optionalKey(Schema.Array(Schema.String)),
11493 plugins: Schema.optionalKey(
11494 Schema.Array(ClientRequest__PluginsMigration).annotate({ default: [] }),
11495 ),
11496 sessions: Schema.optionalKey(
11497 Schema.Array(ClientRequest__SessionMigration).annotate({ default: [] }),
11498 ),
11499 skills: Schema.optionalKey(Schema.Array(ClientRequest__SkillMigration).annotate({ default: [] })),
11500 subagents: Schema.optionalKey(
11501 Schema.Array(ClientRequest__SubagentMigration).annotate({ default: [] }),
11502 ),
11503});
11504
11505export type ClientRequest__UserInput =
11506 | {
11507 readonly text: string;
11508 readonly text_elements?: ReadonlyArray<ClientRequest__TextElement>;
11509 readonly type: "text";
11510 }
11511 | {
11512 readonly detail?: ClientRequest__ImageDetail | null;
11513 readonly type: "image";
11514 readonly url: string;
11515 }
11516 | {
11517 readonly detail?: ClientRequest__ImageDetail | null;
11518 readonly path: string;
11519 readonly type: "localImage";
11520 }
11521 | { readonly type: "audio"; readonly url: string }
11522 | { readonly path: string; readonly type: "localAudio" }
11523 | { readonly name: string; readonly path: string; readonly type: "skill" }
11524 | { readonly name: string; readonly path: string; readonly type: "mention" };
11525export const ClientRequest__UserInput = Schema.Union(
11526 [
11527 Schema.Struct({
11528 text: Schema.String,
11529 text_elements: Schema.optionalKey(
11530 Schema.Array(ClientRequest__TextElement).annotate({
11531 description: "UI-defined spans within `text` used to render or persist special elements.",
11532 default: [],
11533 }),
11534 ),
11535 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
11536 }).annotate({ title: "TextUserInput" }),
11537 Schema.Struct({
11538 detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])),
11539 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
11540 url: Schema.String,
11541 }).annotate({ title: "ImageUserInput" }),
11542 Schema.Struct({
11543 detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])),
11544 path: Schema.String,
11545 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
11546 }).annotate({ title: "LocalImageUserInput" }),
11547 Schema.Struct({
11548 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
11549 url: Schema.String,
11550 }).annotate({ title: "AudioUserInput" }),
11551 Schema.Struct({
11552 path: Schema.String,
11553 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
11554 }).annotate({ title: "LocalAudioUserInput" }),
11555 Schema.Struct({
11556 name: Schema.String,
11557 path: Schema.String,
11558 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
11559 }).annotate({ title: "SkillUserInput" }),
11560 Schema.Struct({
11561 name: Schema.String,
11562 path: Schema.String,
11563 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
11564 }).annotate({ title: "MentionUserInput" }),
11565 ],
11566 { mode: "oneOf" },
11567);
11568
11569export type ClientRequest__ThreadGoalSetParams = {
11570 readonly objective?: string | null;
11571 readonly status?: ClientRequest__ThreadGoalStatus | null;
11572 readonly threadId: string;
11573 readonly tokenBudget?: number | null;
11574};
11575export const ClientRequest__ThreadGoalSetParams = Schema.Struct({
11576 objective: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11577 status: Schema.optionalKey(Schema.Union([ClientRequest__ThreadGoalStatus, Schema.Null])),
11578 threadId: Schema.String,
11579 tokenBudget: Schema.optionalKey(
11580 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
11581 ),
11582});
11583
11584export type ClientRequest__ThreadMetadataUpdateParams = {
11585 readonly gitInfo?: ClientRequest__ThreadMetadataGitInfoUpdateParams | null;
11586 readonly threadId: string;
11587};
11588export const ClientRequest__ThreadMetadataUpdateParams = Schema.Struct({
11589 gitInfo: Schema.optionalKey(
11590 Schema.Union([ClientRequest__ThreadMetadataGitInfoUpdateParams, Schema.Null]).annotate({
11591 description:
11592 "Patch the stored Git metadata for this thread. Omit a field to leave it unchanged, set it to `null` to clear it, or provide a string to replace the stored value.",
11593 }),
11594 ),
11595 threadId: Schema.String,
11596});
11597
11598export type ClientRequest__ThreadForkParams = {
11599 readonly approvalPolicy?: ClientRequest__AskForApproval | null;
11600 readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null;
11601 readonly baseInstructions?: string | null;
11602 readonly config?: { readonly [x: string]: unknown } | null;
11603 readonly cwd?: string | null;
11604 readonly developerInstructions?: string | null;
11605 readonly ephemeral?: boolean;
11606 readonly lastTurnId?: string | null;
11607 readonly model?: string | null;
11608 readonly modelProvider?: string | null;
11609 readonly sandbox?: ClientRequest__SandboxMode | null;
11610 readonly serviceTier?: string | null;
11611 readonly threadId: string;
11612 readonly threadSource?: ClientRequest__ThreadSource | null;
11613};
11614export const ClientRequest__ThreadForkParams = Schema.Struct({
11615 approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])),
11616 approvalsReviewer: Schema.optionalKey(
11617 Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({
11618 description:
11619 "Override where approval requests are routed for review on this thread and subsequent turns.",
11620 }),
11621 ),
11622 baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11623 config: Schema.optionalKey(
11624 Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]),
11625 ),
11626 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11627 developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11628 ephemeral: Schema.optionalKey(Schema.Boolean),
11629 lastTurnId: Schema.optionalKey(
11630 Schema.Union([
11631 Schema.String.annotate({
11632 description:
11633 "Optional last turn id to fork through, inclusive.\n\nWhen specified, turns after `last_turn_id` are omitted from the fork. The referenced turn cannot be in progress.",
11634 }),
11635 Schema.Null,
11636 ]),
11637 ),
11638 model: Schema.optionalKey(
11639 Schema.Union([
11640 Schema.String.annotate({
11641 description: "Configuration overrides for the forked thread, if any.",
11642 }),
11643 Schema.Null,
11644 ]),
11645 ),
11646 modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11647 sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])),
11648 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11649 threadId: Schema.String,
11650 threadSource: Schema.optionalKey(
11651 Schema.Union([ClientRequest__ThreadSource, Schema.Null]).annotate({
11652 description:
11653 "Optional client-supplied analytics source classification for this forked thread.",
11654 }),
11655 ),
11656}).annotate({
11657 description:
11658 "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using a non-empty path, the thread_id param will be ignored. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
11659});
11660
11661export type ClientRequest__ThreadListParams = {
11662 readonly archived?: boolean | null;
11663 readonly cursor?: string | null;
11664 readonly cwd?: ClientRequest__ThreadListCwdFilter | null;
11665 readonly limit?: number | null;
11666 readonly modelProviders?: ReadonlyArray<string> | null;
11667 readonly searchTerm?: string | null;
11668 readonly sortDirection?: ClientRequest__SortDirection | null;
11669 readonly sortKey?: ClientRequest__ThreadSortKey | null;
11670 readonly sourceKinds?: ReadonlyArray<ClientRequest__ThreadSourceKind> | null;
11671 readonly useStateDbOnly?: boolean;
11672};
11673export const ClientRequest__ThreadListParams = Schema.Struct({
11674 archived: Schema.optionalKey(
11675 Schema.Union([
11676 Schema.Boolean.annotate({
11677 description:
11678 "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned.",
11679 }),
11680 Schema.Null,
11681 ]),
11682 ),
11683 cursor: Schema.optionalKey(
11684 Schema.Union([
11685 Schema.String.annotate({
11686 description: "Opaque pagination cursor returned by a previous call.",
11687 }),
11688 Schema.Null,
11689 ]),
11690 ),
11691 cwd: Schema.optionalKey(
11692 Schema.Union([ClientRequest__ThreadListCwdFilter, Schema.Null]).annotate({
11693 description:
11694 "Optional cwd filter or filters; when set, only threads whose session cwd exactly matches one of these paths are returned.",
11695 }),
11696 ),
11697 limit: Schema.optionalKey(
11698 Schema.Union([
11699 Schema.Number.annotate({
11700 description: "Optional page size; defaults to a reasonable server-side value.",
11701 format: "uint32",
11702 })
11703 .check(Schema.isInt())
11704 .check(Schema.isGreaterThanOrEqualTo(0)),
11705 Schema.Null,
11706 ]),
11707 ),
11708 modelProviders: Schema.optionalKey(
11709 Schema.Union([
11710 Schema.Array(Schema.String).annotate({
11711 description:
11712 "Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers.",
11713 }),
11714 Schema.Null,
11715 ]),
11716 ),
11717 searchTerm: Schema.optionalKey(
11718 Schema.Union([
11719 Schema.String.annotate({
11720 description: "Optional substring filter for the extracted thread title.",
11721 }),
11722 Schema.Null,
11723 ]),
11724 ),
11725 sortDirection: Schema.optionalKey(
11726 Schema.Union([ClientRequest__SortDirection, Schema.Null]).annotate({
11727 description: "Optional sort direction; defaults to descending (newest first).",
11728 }),
11729 ),
11730 sortKey: Schema.optionalKey(
11731 Schema.Union([ClientRequest__ThreadSortKey, Schema.Null]).annotate({
11732 description: "Optional sort key; defaults to created_at.",
11733 }),
11734 ),
11735 sourceKinds: Schema.optionalKey(
11736 Schema.Union([
11737 Schema.Array(ClientRequest__ThreadSourceKind).annotate({
11738 description:
11739 "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources.",
11740 }),
11741 Schema.Null,
11742 ]),
11743 ),
11744 useStateDbOnly: Schema.optionalKey(
11745 Schema.Boolean.annotate({
11746 description:
11747 "If true, return from the state DB without scanning JSONL rollouts to repair thread metadata. Omitted or false preserves scan-and-repair behavior.",
11748 }),
11749 ),
11750});
11751
11752export type ClientRequest__ThreadStartParams = {
11753 readonly approvalPolicy?: ClientRequest__AskForApproval | null;
11754 readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null;
11755 readonly baseInstructions?: string | null;
11756 readonly config?: { readonly [x: string]: unknown } | null;
11757 readonly cwd?: string | null;
11758 readonly developerInstructions?: string | null;
11759 readonly ephemeral?: boolean | null;
11760 readonly model?: string | null;
11761 readonly modelProvider?: string | null;
11762 readonly personality?: ClientRequest__Personality | null;
11763 readonly sandbox?: ClientRequest__SandboxMode | null;
11764 readonly serviceName?: string | null;
11765 readonly serviceTier?: string | null;
11766 readonly sessionStartSource?: ClientRequest__ThreadStartSource | null;
11767 readonly threadSource?: ClientRequest__ThreadSource | null;
11768};
11769export const ClientRequest__ThreadStartParams = Schema.Struct({
11770 approvalPolicy: Schema.optionalKey(Schema.Union([ClientRequest__AskForApproval, Schema.Null])),
11771 approvalsReviewer: Schema.optionalKey(
11772 Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({
11773 description:
11774 "Override where approval requests are routed for review on this thread and subsequent turns.",
11775 }),
11776 ),
11777 baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11778 config: Schema.optionalKey(
11779 Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]),
11780 ),
11781 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11782 developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11783 ephemeral: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
11784 model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11785 modelProvider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11786 personality: Schema.optionalKey(Schema.Union([ClientRequest__Personality, Schema.Null])),
11787 sandbox: Schema.optionalKey(Schema.Union([ClientRequest__SandboxMode, Schema.Null])),
11788 serviceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11789 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11790 sessionStartSource: Schema.optionalKey(
11791 Schema.Union([ClientRequest__ThreadStartSource, Schema.Null]),
11792 ),
11793 threadSource: Schema.optionalKey(
11794 Schema.Union([ClientRequest__ThreadSource, Schema.Null]).annotate({
11795 description: "Optional client-supplied analytics source classification for this thread.",
11796 }),
11797 ),
11798});
11799
11800export type ClientRequest__WindowsSandboxSetupStartParams = {
11801 readonly cwd?: ClientRequest__AbsolutePathBuf | null;
11802 readonly mode: ClientRequest__WindowsSandboxSetupMode;
11803};
11804export const ClientRequest__WindowsSandboxSetupStartParams = Schema.Struct({
11805 cwd: Schema.optionalKey(Schema.Union([ClientRequest__AbsolutePathBuf, Schema.Null])),
11806 mode: ClientRequest__WindowsSandboxSetupMode,
11807});
11808
11809export type CommandExecutionRequestApprovalParams__CommandAction =
11810 | {
11811 readonly command: string;
11812 readonly name: string;
11813 readonly path: CommandExecutionRequestApprovalParams__AbsolutePathBuf;
11814 readonly type: "read";
11815 }
11816 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
11817 | {
11818 readonly command: string;
11819 readonly path?: string | null;
11820 readonly query?: string | null;
11821 readonly type: "search";
11822 }
11823 | { readonly command: string; readonly type: "unknown" };
11824export const CommandExecutionRequestApprovalParams__CommandAction = Schema.Union(
11825 [
11826 Schema.Struct({
11827 command: Schema.String,
11828 name: Schema.String,
11829 path: CommandExecutionRequestApprovalParams__AbsolutePathBuf,
11830 type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
11831 }).annotate({ title: "ReadCommandAction" }),
11832 Schema.Struct({
11833 command: Schema.String,
11834 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11835 type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
11836 }).annotate({ title: "ListFilesCommandAction" }),
11837 Schema.Struct({
11838 command: Schema.String,
11839 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11840 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11841 type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
11842 }).annotate({ title: "SearchCommandAction" }),
11843 Schema.Struct({
11844 command: Schema.String,
11845 type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
11846 }).annotate({ title: "UnknownCommandAction" }),
11847 ],
11848 { mode: "oneOf" },
11849);
14246export type CommandExecutionRequestApprovalParams__CommandAction =
14247 | {
14248 readonly command: string;
14249 readonly name: string;
14250 readonly path: CommandExecutionRequestApprovalParams__AbsolutePathBuf;
14251 readonly type: "read";
14252 }
14253 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
14254 | {
14255 readonly command: string;
14256 readonly path?: string | null;
14257 readonly query?: string | null;
14258 readonly type: "search";
14259 }
14260 | { readonly command: string; readonly type: "unknown" };
14261export const CommandExecutionRequestApprovalParams__CommandAction = Schema.Union(
14262 [
14263 Schema.Struct({
14264 command: Schema.String,
14265 name: Schema.String,
14266 path: CommandExecutionRequestApprovalParams__AbsolutePathBuf,
14267 type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
14268 }).annotate({ title: "ReadCommandAction" }),
14269 Schema.Struct({
14270 command: Schema.String,
14271 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14272 type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
14273 }).annotate({ title: "ListFilesCommandAction" }),
14274 Schema.Struct({
14275 command: Schema.String,
14276 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14277 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14278 type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
14279 }).annotate({ title: "SearchCommandAction" }),
14280 Schema.Struct({
14281 command: Schema.String,
14282 type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
14283 }).annotate({ title: "UnknownCommandAction" }),
14284 ],
14285 { mode: "oneOf" },
14286).annotate({ identifier: "CommandExecutionRequestApprovalParams__CommandAction" });
1185014287
1185114288export type CommandExecutionRequestApprovalParams__FileSystemSpecialPath =
1185214289 | { readonly kind: "root" }
......@@ -11891,7 +14328,7 @@ export const CommandExecutionRequestApprovalParams__FileSystemSpecialPath = Sche
1189114328 }),
1189214329 ],
1189314330 { mode: "oneOf" },
11894);
14331).annotate({ identifier: "CommandExecutionRequestApprovalParams__FileSystemSpecialPath" });
1189514332
1189614333export type CommandExecutionRequestApprovalParams__NetworkApprovalContext = {
1189714334 readonly host: string;
......@@ -11900,7 +14337,7 @@ export type CommandExecutionRequestApprovalParams__NetworkApprovalContext = {
1190014337export const CommandExecutionRequestApprovalParams__NetworkApprovalContext = Schema.Struct({
1190114338 host: Schema.String,
1190214339 protocol: CommandExecutionRequestApprovalParams__NetworkApprovalProtocol,
11903});
14340}).annotate({ identifier: "CommandExecutionRequestApprovalParams__NetworkApprovalContext" });
1190414341
1190514342export type CommandExecutionRequestApprovalParams__NetworkPolicyAmendment = {
1190614343 readonly action: CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction;
......@@ -11909,7 +14346,7 @@ export type CommandExecutionRequestApprovalParams__NetworkPolicyAmendment = {
1190914346export const CommandExecutionRequestApprovalParams__NetworkPolicyAmendment = Schema.Struct({
1191014347 action: CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction,
1191114348 host: Schema.String,
11912});
14349}).annotate({ identifier: "CommandExecutionRequestApprovalParams__NetworkPolicyAmendment" });
1191314350
1191414351export type CommandExecutionRequestApprovalResponse__NetworkPolicyAmendment = {
1191514352 readonly action: CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction;
......@@ -11918,7 +14355,7 @@ export type CommandExecutionRequestApprovalResponse__NetworkPolicyAmendment = {
1191814355export const CommandExecutionRequestApprovalResponse__NetworkPolicyAmendment = Schema.Struct({
1191914356 action: CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction,
1192014357 host: Schema.String,
11921});
14358}).annotate({ identifier: "CommandExecutionRequestApprovalResponse__NetworkPolicyAmendment" });
1192214359
1192314360export type ExecCommandApprovalResponse__NetworkPolicyAmendment = {
1192414361 readonly action: ExecCommandApprovalResponse__NetworkPolicyRuleAction;
......@@ -11927,7 +14364,7 @@ export type ExecCommandApprovalResponse__NetworkPolicyAmendment = {
1192714364export const ExecCommandApprovalResponse__NetworkPolicyAmendment = Schema.Struct({
1192814365 action: ExecCommandApprovalResponse__NetworkPolicyRuleAction,
1192914366 host: Schema.String,
11930});
14367}).annotate({ identifier: "ExecCommandApprovalResponse__NetworkPolicyAmendment" });
1193114368
1193214369export type FuzzyFileSearchResponse__FuzzyFileSearchResult = {
1193314370 readonly file_name: string;
......@@ -11943,8 +14380,12 @@ export const FuzzyFileSearchResponse__FuzzyFileSearchResult = Schema.Struct({
1194314380 Schema.Union([
1194414381 Schema.Array(
1194514382 Schema.Number.annotate({ format: "uint32" })
11946 .check(Schema.isInt())
11947 .check(Schema.isGreaterThanOrEqualTo(0)),
14383 .check(Schema.isInt().annotate({ expected: "an integer" }))
14384 .check(
14385 Schema.isGreaterThanOrEqualTo(0).annotate({
14386 expected: "a value greater than or equal to 0",
14387 }),
14388 ),
1194814389 ),
1194914390 Schema.Null,
1195014391 ]),
......@@ -11953,9 +14394,14 @@ export const FuzzyFileSearchResponse__FuzzyFileSearchResult = Schema.Struct({
1195314394 path: Schema.String,
1195414395 root: Schema.String,
1195514396 score: Schema.Number.annotate({ format: "uint32" })
11956 .check(Schema.isInt())
11957 .check(Schema.isGreaterThanOrEqualTo(0)),
11958}).annotate({ description: "Superset of [`codex_file_search::FileMatch`]" });
14397 .check(Schema.isInt().annotate({ expected: "an integer" }))
14398 .check(
14399 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
14400 ),
14401}).annotate({
14402 description: "Superset of [`codex_file_search::FileMatch`]",
14403 identifier: "FuzzyFileSearchResponse__FuzzyFileSearchResult",
14404});
1195914405
1196014406export type FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchResult = {
1196114407 readonly file_name: string;
......@@ -11971,8 +14417,12 @@ export const FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchResult =
1197114417 Schema.Union([
1197214418 Schema.Array(
1197314419 Schema.Number.annotate({ format: "uint32" })
11974 .check(Schema.isInt())
11975 .check(Schema.isGreaterThanOrEqualTo(0)),
14420 .check(Schema.isInt().annotate({ expected: "an integer" }))
14421 .check(
14422 Schema.isGreaterThanOrEqualTo(0).annotate({
14423 expected: "a value greater than or equal to 0",
14424 }),
14425 ),
1197614426 ),
1197714427 Schema.Null,
1197814428 ]),
......@@ -11981,96 +14431,85 @@ export const FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchResult =
1198114431 path: Schema.String,
1198214432 root: Schema.String,
1198314433 score: Schema.Number.annotate({ format: "uint32" })
11984 .check(Schema.isInt())
11985 .check(Schema.isGreaterThanOrEqualTo(0)),
11986}).annotate({ description: "Superset of [`codex_file_search::FileMatch`]" });
11987
11988export type JSONRPCMessage__JSONRPCError = {
11989 readonly error: JSONRPCMessage__JSONRPCErrorError;
11990 readonly id: JSONRPCMessage__RequestId;
11991};
11992export const JSONRPCMessage__JSONRPCError = Schema.Struct({
11993 error: JSONRPCMessage__JSONRPCErrorError,
11994 id: JSONRPCMessage__RequestId,
11995}).annotate({ description: "A response to a request that indicates an error occurred." });
14434 .check(Schema.isInt().annotate({ expected: "an integer" }))
14435 .check(
14436 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
14437 ),
14438}).annotate({
14439 description: "Superset of [`codex_file_search::FileMatch`]",
14440 identifier: "FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchResult",
14441});
1199614442
1199714443export type JSONRPCMessage__JSONRPCResponse = {
1199814444 readonly id: JSONRPCMessage__RequestId;
11999 readonly result: unknown;
14445 readonly result: Schema.Json;
1200014446};
1200114447export const JSONRPCMessage__JSONRPCResponse = Schema.Struct({
1200214448 id: JSONRPCMessage__RequestId,
12003 result: Schema.Unknown,
12004}).annotate({ description: "A successful (non-error) response to a request." });
14449 result: Schema.Json.annotate({ expected: "JSON value" }),
14450}).annotate({
14451 description: "A successful (non-error) response to a request.",
14452 identifier: "JSONRPCMessage__JSONRPCResponse",
14453});
1200514454
1200614455export type JSONRPCMessage__JSONRPCRequest = {
1200714456 readonly id: JSONRPCMessage__RequestId;
1200814457 readonly method: string;
12009 readonly params?: unknown;
14458 readonly params?: Schema.Json;
1201014459 readonly trace?: JSONRPCMessage__W3cTraceContext | null;
1201114460};
1201214461export const JSONRPCMessage__JSONRPCRequest = Schema.Struct({
1201314462 id: JSONRPCMessage__RequestId,
1201414463 method: Schema.String,
12015 params: Schema.optionalKey(Schema.Unknown),
14464 params: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
1201614465 trace: Schema.optionalKey(
1201714466 Schema.Union([JSONRPCMessage__W3cTraceContext, Schema.Null]).annotate({
1201814467 description: "Optional W3C Trace Context for distributed tracing.",
1201914468 }),
1202014469 ),
12021}).annotate({ description: "A request that expects a response." });
12022
12023export type McpServerElicitationRequestParams__McpElicitationBooleanSchema = {
12024 readonly default?: boolean | null;
12025 readonly description?: string | null;
12026 readonly title?: string | null;
12027 readonly type: McpServerElicitationRequestParams__McpElicitationBooleanType;
12028};
12029export const McpServerElicitationRequestParams__McpElicitationBooleanSchema = Schema.Struct({
12030 default: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
12031 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12032 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12033 type: McpServerElicitationRequestParams__McpElicitationBooleanType,
14470}).annotate({
14471 description: "A request that expects a response.",
14472 identifier: "JSONRPCMessage__JSONRPCRequest",
1203414473});
1203514474
12036export type McpServerElicitationRequestParams__McpElicitationTitledEnumItems = {
12037 readonly anyOf: ReadonlyArray<McpServerElicitationRequestParams__McpElicitationConstOption>;
14475export type JSONRPCMessage__JSONRPCError = {
14476 readonly error: JSONRPCMessage__JSONRPCErrorError;
14477 readonly id: JSONRPCMessage__RequestId;
1203814478};
12039export const McpServerElicitationRequestParams__McpElicitationTitledEnumItems = Schema.Struct({
12040 anyOf: Schema.Array(McpServerElicitationRequestParams__McpElicitationConstOption),
14479export const JSONRPCMessage__JSONRPCError = Schema.Struct({
14480 error: JSONRPCMessage__JSONRPCErrorError,
14481 id: JSONRPCMessage__RequestId,
14482}).annotate({
14483 description: "A response to a request that indicates an error occurred.",
14484 identifier: "JSONRPCMessage__JSONRPCError",
1204114485});
1204214486
12043export type McpServerElicitationRequestParams__McpElicitationNumberSchema = {
12044 readonly default?: number | null;
14487export type McpServerElicitationRequestParams__McpElicitationUntitledSingleSelectEnumSchema = {
14488 readonly default?: string | null;
1204514489 readonly description?: string | null;
12046 readonly maximum?: number | null;
12047 readonly minimum?: number | null;
14490 readonly enum: ReadonlyArray<string>;
1204814491 readonly title?: string | null;
12049 readonly type: McpServerElicitationRequestParams__McpElicitationNumberType;
14492 readonly type: McpServerElicitationRequestParams__McpElicitationStringType;
1205014493};
12051export const McpServerElicitationRequestParams__McpElicitationNumberSchema = Schema.Struct({
12052 default: Schema.optionalKey(
12053 Schema.Union([
12054 Schema.Number.annotate({ format: "double" }).check(Schema.isFinite()),
12055 Schema.Null,
12056 ]),
12057 ),
12058 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12059 maximum: Schema.optionalKey(
12060 Schema.Union([
12061 Schema.Number.annotate({ format: "double" }).check(Schema.isFinite()),
12062 Schema.Null,
12063 ]),
12064 ),
12065 minimum: Schema.optionalKey(
12066 Schema.Union([
12067 Schema.Number.annotate({ format: "double" }).check(Schema.isFinite()),
12068 Schema.Null,
12069 ]),
12070 ),
12071 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12072 type: McpServerElicitationRequestParams__McpElicitationNumberType,
12073});
14494export const McpServerElicitationRequestParams__McpElicitationUntitledSingleSelectEnumSchema =
14495 Schema.Struct({
14496 default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14497 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14498 enum: Schema.Array(Schema.String),
14499 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14500 type: McpServerElicitationRequestParams__McpElicitationStringType,
14501 }).annotate({
14502 identifier: "McpServerElicitationRequestParams__McpElicitationUntitledSingleSelectEnumSchema",
14503 });
14504
14505export type McpServerElicitationRequestParams__McpElicitationUntitledEnumItems = {
14506 readonly enum: ReadonlyArray<string>;
14507 readonly type: McpServerElicitationRequestParams__McpElicitationStringType;
14508};
14509export const McpServerElicitationRequestParams__McpElicitationUntitledEnumItems = Schema.Struct({
14510 enum: Schema.Array(Schema.String),
14511 type: McpServerElicitationRequestParams__McpElicitationStringType,
14512}).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationUntitledEnumItems" });
1207414513
1207514514export type McpServerElicitationRequestParams__McpElicitationLegacyTitledEnumSchema = {
1207614515 readonly default?: string | null;
......@@ -12088,8 +14527,35 @@ export const McpServerElicitationRequestParams__McpElicitationLegacyTitledEnumSc
1208814527 enumNames: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1208914528 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1209014529 type: McpServerElicitationRequestParams__McpElicitationStringType,
14530 }).annotate({
14531 identifier: "McpServerElicitationRequestParams__McpElicitationLegacyTitledEnumSchema",
14532 });
14533
14534export type McpServerElicitationRequestParams__McpElicitationTitledSingleSelectEnumSchema = {
14535 readonly default?: string | null;
14536 readonly description?: string | null;
14537 readonly oneOf: ReadonlyArray<McpServerElicitationRequestParams__McpElicitationConstOption>;
14538 readonly title?: string | null;
14539 readonly type: McpServerElicitationRequestParams__McpElicitationStringType;
14540};
14541export const McpServerElicitationRequestParams__McpElicitationTitledSingleSelectEnumSchema =
14542 Schema.Struct({
14543 default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14544 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14545 oneOf: Schema.Array(McpServerElicitationRequestParams__McpElicitationConstOption),
14546 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14547 type: McpServerElicitationRequestParams__McpElicitationStringType,
14548 }).annotate({
14549 identifier: "McpServerElicitationRequestParams__McpElicitationTitledSingleSelectEnumSchema",
1209114550 });
1209214551
14552export type McpServerElicitationRequestParams__McpElicitationTitledEnumItems = {
14553 readonly anyOf: ReadonlyArray<McpServerElicitationRequestParams__McpElicitationConstOption>;
14554};
14555export const McpServerElicitationRequestParams__McpElicitationTitledEnumItems = Schema.Struct({
14556 anyOf: Schema.Array(McpServerElicitationRequestParams__McpElicitationConstOption),
14557}).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationTitledEnumItems" });
14558
1209314559export type McpServerElicitationRequestParams__McpElicitationStringSchema = {
1209414560 readonly default?: string | null;
1209514561 readonly description?: string | null;
......@@ -12108,63 +14574,81 @@ export const McpServerElicitationRequestParams__McpElicitationStringSchema = Sch
1210814574 maxLength: Schema.optionalKey(
1210914575 Schema.Union([
1211014576 Schema.Number.annotate({ format: "uint32" })
12111 .check(Schema.isInt())
12112 .check(Schema.isGreaterThanOrEqualTo(0)),
14577 .check(Schema.isInt().annotate({ expected: "an integer" }))
14578 .check(
14579 Schema.isGreaterThanOrEqualTo(0).annotate({
14580 expected: "a value greater than or equal to 0",
14581 }),
14582 ),
1211314583 Schema.Null,
1211414584 ]),
1211514585 ),
1211614586 minLength: Schema.optionalKey(
1211714587 Schema.Union([
1211814588 Schema.Number.annotate({ format: "uint32" })
12119 .check(Schema.isInt())
12120 .check(Schema.isGreaterThanOrEqualTo(0)),
14589 .check(Schema.isInt().annotate({ expected: "an integer" }))
14590 .check(
14591 Schema.isGreaterThanOrEqualTo(0).annotate({
14592 expected: "a value greater than or equal to 0",
14593 }),
14594 ),
1212114595 Schema.Null,
1212214596 ]),
1212314597 ),
1212414598 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1212514599 type: McpServerElicitationRequestParams__McpElicitationStringType,
12126});
14600}).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationStringSchema" });
1212714601
12128export type McpServerElicitationRequestParams__McpElicitationTitledSingleSelectEnumSchema = {
12129 readonly default?: string | null;
14602export type McpServerElicitationRequestParams__McpElicitationNumberSchema = {
14603 readonly default?: number | null;
1213014604 readonly description?: string | null;
12131 readonly oneOf: ReadonlyArray<McpServerElicitationRequestParams__McpElicitationConstOption>;
14605 readonly maximum?: number | null;
14606 readonly minimum?: number | null;
1213214607 readonly title?: string | null;
12133 readonly type: McpServerElicitationRequestParams__McpElicitationStringType;
12134};
12135export const McpServerElicitationRequestParams__McpElicitationTitledSingleSelectEnumSchema =
12136 Schema.Struct({
12137 default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12138 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12139 oneOf: Schema.Array(McpServerElicitationRequestParams__McpElicitationConstOption),
12140 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12141 type: McpServerElicitationRequestParams__McpElicitationStringType,
12142 });
12143
12144export type McpServerElicitationRequestParams__McpElicitationUntitledEnumItems = {
12145 readonly enum: ReadonlyArray<string>;
12146 readonly type: McpServerElicitationRequestParams__McpElicitationStringType;
14608 readonly type: McpServerElicitationRequestParams__McpElicitationNumberType;
1214714609};
12148export const McpServerElicitationRequestParams__McpElicitationUntitledEnumItems = Schema.Struct({
12149 enum: Schema.Array(Schema.String),
12150 type: McpServerElicitationRequestParams__McpElicitationStringType,
12151});
14610export const McpServerElicitationRequestParams__McpElicitationNumberSchema = Schema.Struct({
14611 default: Schema.optionalKey(
14612 Schema.Union([
14613 Schema.Number.annotate({ format: "double" }).check(
14614 Schema.isFinite().annotate({ expected: "a finite number" }),
14615 ),
14616 Schema.Null,
14617 ]),
14618 ),
14619 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14620 maximum: Schema.optionalKey(
14621 Schema.Union([
14622 Schema.Number.annotate({ format: "double" }).check(
14623 Schema.isFinite().annotate({ expected: "a finite number" }),
14624 ),
14625 Schema.Null,
14626 ]),
14627 ),
14628 minimum: Schema.optionalKey(
14629 Schema.Union([
14630 Schema.Number.annotate({ format: "double" }).check(
14631 Schema.isFinite().annotate({ expected: "a finite number" }),
14632 ),
14633 Schema.Null,
14634 ]),
14635 ),
14636 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14637 type: McpServerElicitationRequestParams__McpElicitationNumberType,
14638}).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationNumberSchema" });
1215214639
12153export type McpServerElicitationRequestParams__McpElicitationUntitledSingleSelectEnumSchema = {
12154 readonly default?: string | null;
14640export type McpServerElicitationRequestParams__McpElicitationBooleanSchema = {
14641 readonly default?: boolean | null;
1215514642 readonly description?: string | null;
12156 readonly enum: ReadonlyArray<string>;
1215714643 readonly title?: string | null;
12158 readonly type: McpServerElicitationRequestParams__McpElicitationStringType;
14644 readonly type: McpServerElicitationRequestParams__McpElicitationBooleanType;
1215914645};
12160export const McpServerElicitationRequestParams__McpElicitationUntitledSingleSelectEnumSchema =
12161 Schema.Struct({
12162 default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12163 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12164 enum: Schema.Array(Schema.String),
12165 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12166 type: McpServerElicitationRequestParams__McpElicitationStringType,
12167 });
14646export const McpServerElicitationRequestParams__McpElicitationBooleanSchema = Schema.Struct({
14647 default: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
14648 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14649 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14650 type: McpServerElicitationRequestParams__McpElicitationBooleanType,
14651}).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationBooleanSchema" });
1216814652
1216914653export type PermissionsRequestApprovalParams__FileSystemSpecialPath =
1217014654 | { readonly kind: "root" }
......@@ -12209,7 +14693,7 @@ export const PermissionsRequestApprovalParams__FileSystemSpecialPath = Schema.Un
1220914693 }),
1221014694 ],
1221114695 { mode: "oneOf" },
12212);
14696).annotate({ identifier: "PermissionsRequestApprovalParams__FileSystemSpecialPath" });
1221314697
1221414698export type PermissionsRequestApprovalResponse__FileSystemSpecialPath =
1221514699 | { readonly kind: "root" }
......@@ -12254,7 +14738,132 @@ export const PermissionsRequestApprovalResponse__FileSystemSpecialPath = Schema.
1225414738 }),
1225514739 ],
1225614740 { mode: "oneOf" },
12257);
14741).annotate({ identifier: "PermissionsRequestApprovalResponse__FileSystemSpecialPath" });
14742
14743export type ServerNotification__CodexErrorInfo =
14744 | "contextWindowExceeded"
14745 | "sessionBudgetExceeded"
14746 | "usageLimitExceeded"
14747 | "serverOverloaded"
14748 | "cyberPolicy"
14749 | "internalServerError"
14750 | "unauthorized"
14751 | "badRequest"
14752 | "threadRollbackFailed"
14753 | "sandboxError"
14754 | "other"
14755 | { readonly httpConnectionFailed: { readonly httpStatusCode?: number | null } }
14756 | { readonly responseStreamConnectionFailed: { readonly httpStatusCode?: number | null } }
14757 | { readonly responseStreamDisconnected: { readonly httpStatusCode?: number | null } }
14758 | { readonly responseTooManyFailedAttempts: { readonly httpStatusCode?: number | null } }
14759 | {
14760 readonly activeTurnNotSteerable: {
14761 readonly turnKind: ServerNotification__NonSteerableTurnKind;
14762 };
14763 };
14764export const ServerNotification__CodexErrorInfo = Schema.Union(
14765 [
14766 Schema.Literals([
14767 "contextWindowExceeded",
14768 "sessionBudgetExceeded",
14769 "usageLimitExceeded",
14770 "serverOverloaded",
14771 "cyberPolicy",
14772 "internalServerError",
14773 "unauthorized",
14774 "badRequest",
14775 "threadRollbackFailed",
14776 "sandboxError",
14777 "other",
14778 ]),
14779 Schema.Struct({
14780 httpConnectionFailed: Schema.Struct({
14781 httpStatusCode: Schema.optionalKey(
14782 Schema.Union([
14783 Schema.Number.annotate({ format: "uint16" })
14784 .check(Schema.isInt().annotate({ expected: "an integer" }))
14785 .check(
14786 Schema.isGreaterThanOrEqualTo(0).annotate({
14787 expected: "a value greater than or equal to 0",
14788 }),
14789 ),
14790 Schema.Null,
14791 ]),
14792 ),
14793 }),
14794 }).annotate({ title: "HttpConnectionFailedCodexErrorInfo" }),
14795 Schema.Struct({
14796 responseStreamConnectionFailed: Schema.Struct({
14797 httpStatusCode: Schema.optionalKey(
14798 Schema.Union([
14799 Schema.Number.annotate({ format: "uint16" })
14800 .check(Schema.isInt().annotate({ expected: "an integer" }))
14801 .check(
14802 Schema.isGreaterThanOrEqualTo(0).annotate({
14803 expected: "a value greater than or equal to 0",
14804 }),
14805 ),
14806 Schema.Null,
14807 ]),
14808 ),
14809 }),
14810 }).annotate({
14811 title: "ResponseStreamConnectionFailedCodexErrorInfo",
14812 description: "Failed to connect to the response SSE stream.",
14813 }),
14814 Schema.Struct({
14815 responseStreamDisconnected: Schema.Struct({
14816 httpStatusCode: Schema.optionalKey(
14817 Schema.Union([
14818 Schema.Number.annotate({ format: "uint16" })
14819 .check(Schema.isInt().annotate({ expected: "an integer" }))
14820 .check(
14821 Schema.isGreaterThanOrEqualTo(0).annotate({
14822 expected: "a value greater than or equal to 0",
14823 }),
14824 ),
14825 Schema.Null,
14826 ]),
14827 ),
14828 }),
14829 }).annotate({
14830 title: "ResponseStreamDisconnectedCodexErrorInfo",
14831 description:
14832 "The response SSE stream disconnected in the middle of a turn before completion.",
14833 }),
14834 Schema.Struct({
14835 responseTooManyFailedAttempts: Schema.Struct({
14836 httpStatusCode: Schema.optionalKey(
14837 Schema.Union([
14838 Schema.Number.annotate({ format: "uint16" })
14839 .check(Schema.isInt().annotate({ expected: "an integer" }))
14840 .check(
14841 Schema.isGreaterThanOrEqualTo(0).annotate({
14842 expected: "a value greater than or equal to 0",
14843 }),
14844 ),
14845 Schema.Null,
14846 ]),
14847 ),
14848 }),
14849 }).annotate({
14850 title: "ResponseTooManyFailedAttemptsCodexErrorInfo",
14851 description: "Reached the retry limit for responses.",
14852 }),
14853 Schema.Struct({
14854 activeTurnNotSteerable: Schema.Struct({ turnKind: ServerNotification__NonSteerableTurnKind }),
14855 }).annotate({
14856 title: "ActiveTurnNotSteerableCodexErrorInfo",
14857 description:
14858 "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`.",
14859 }),
14860 ],
14861 { mode: "oneOf" },
14862).annotate({
14863 description:
14864 "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.",
14865 identifier: "ServerNotification__CodexErrorInfo",
14866});
1225814867
1225914868export type ServerNotification__CommandAction =
1226014869 | {
......@@ -12296,7 +14905,7 @@ export const ServerNotification__CommandAction = Schema.Union(
1229614905 }).annotate({ title: "UnknownCommandAction" }),
1229714906 ],
1229814907 { mode: "oneOf" },
12299);
14908).annotate({ identifier: "ServerNotification__CommandAction" });
1230014909
1230114910export type ServerNotification__FsChangedNotification = {
1230214911 readonly changedPaths: ReadonlyArray<ServerNotification__AbsolutePathBuf>;
......@@ -12309,177 +14918,97 @@ export const ServerNotification__FsChangedNotification = Schema.Struct({
1230914918 watchId: Schema.String.annotate({
1231014919 description: "Watch identifier previously provided to `fs/watch`.",
1231114920 }),
12312}).annotate({ description: "Filesystem watch notification emitted for `fs/watch` subscribers." });
14921}).annotate({
14922 description: "Filesystem watch notification emitted for `fs/watch` subscribers.",
14923 identifier: "ServerNotification__FsChangedNotification",
14924});
1231314925
12314export type ServerNotification__SandboxPolicy =
12315 | { readonly type: "dangerFullAccess" }
12316 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
12317 | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
14926export type ServerNotification__SubAgentSource =
14927 | "review"
14928 | "compact"
14929 | "memory_consolidation"
1231814930 | {
12319 readonly excludeSlashTmp?: boolean;
12320 readonly excludeTmpdirEnvVar?: boolean;
12321 readonly networkAccess?: boolean;
12322 readonly type: "workspaceWrite";
12323 readonly writableRoots?: ReadonlyArray<ServerNotification__AbsolutePathBuf>;
12324 };
12325export const ServerNotification__SandboxPolicy = Schema.Union(
14931 readonly thread_spawn: {
14932 readonly agent_nickname?: string | null;
14933 readonly agent_path?: ServerNotification__AgentPath | null;
14934 readonly agent_role?: string | null;
14935 readonly depth: number;
14936 readonly parent_thread_id: ServerNotification__ThreadId;
14937 };
14938 }
14939 | { readonly other: string };
14940export const ServerNotification__SubAgentSource = Schema.Union(
1232614941 [
14942 Schema.Literals(["review", "compact", "memory_consolidation"]),
1232714943 Schema.Struct({
12328 type: Schema.Literal("dangerFullAccess").annotate({
12329 title: "DangerFullAccessSandboxPolicyType",
14944 thread_spawn: Schema.Struct({
14945 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14946 agent_path: Schema.optionalKey(Schema.Union([ServerNotification__AgentPath, Schema.Null])),
14947 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14948 depth: Schema.Number.annotate({ format: "int32" }).check(
14949 Schema.isInt().annotate({ expected: "an integer" }),
14950 ),
14951 parent_thread_id: ServerNotification__ThreadId,
1233014952 }),
12331 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
14953 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
14954 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
14955 ],
14956 { mode: "oneOf" },
14957).annotate({ identifier: "ServerNotification__SubAgentSource" });
14958
14959export type ServerNotification__ThreadStatus =
14960 | { readonly type: "notLoaded" }
14961 | { readonly type: "idle" }
14962 | { readonly type: "systemError" }
14963 | {
14964 readonly activeFlags: ReadonlyArray<ServerNotification__ThreadActiveFlag>;
14965 readonly type: "active";
14966 };
14967export const ServerNotification__ThreadStatus = Schema.Union(
14968 [
1233214969 Schema.Struct({
12333 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
12334 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
12335 }).annotate({ title: "ReadOnlySandboxPolicy" }),
14970 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
14971 }).annotate({ title: "NotLoadedThreadStatus" }),
1233614972 Schema.Struct({
12337 networkAccess: Schema.optionalKey(
12338 Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
12339 ),
12340 type: Schema.Literal("externalSandbox").annotate({
12341 title: "ExternalSandboxSandboxPolicyType",
12342 }),
12343 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
14973 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
14974 }).annotate({ title: "IdleThreadStatus" }),
1234414975 Schema.Struct({
12345 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
12346 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
12347 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
12348 type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
12349 writableRoots: Schema.optionalKey(
12350 Schema.Array(ServerNotification__AbsolutePathBuf).annotate({ default: [] }),
12351 ),
12352 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
14976 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
14977 }).annotate({ title: "SystemErrorThreadStatus" }),
14978 Schema.Struct({
14979 activeFlags: Schema.Array(ServerNotification__ThreadActiveFlag),
14980 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
14981 }).annotate({ title: "ActiveThreadStatus" }),
1235314982 ],
1235414983 { mode: "oneOf" },
12355);
12356
12357export type ServerNotification__AppMetadata = {
12358 readonly categories?: ReadonlyArray<string> | null;
12359 readonly developer?: string | null;
12360 readonly firstPartyRequiresInstall?: boolean | null;
12361 readonly firstPartyType?: string | null;
12362 readonly review?: ServerNotification__AppReview | null;
12363 readonly screenshots?: ReadonlyArray<ServerNotification__AppScreenshot> | null;
12364 readonly seoDescription?: string | null;
12365 readonly showInComposerWhenUnlinked?: boolean | null;
12366 readonly subCategories?: ReadonlyArray<string> | null;
12367 readonly version?: string | null;
12368 readonly versionId?: string | null;
12369 readonly versionNotes?: string | null;
12370};
12371export const ServerNotification__AppMetadata = Schema.Struct({
12372 categories: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
12373 developer: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12374 firstPartyRequiresInstall: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
12375 firstPartyType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12376 review: Schema.optionalKey(Schema.Union([ServerNotification__AppReview, Schema.Null])),
12377 screenshots: Schema.optionalKey(
12378 Schema.Union([Schema.Array(ServerNotification__AppScreenshot), Schema.Null]),
12379 ),
12380 seoDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12381 showInComposerWhenUnlinked: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
12382 subCategories: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
12383 version: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12384 versionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12385 versionNotes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12386});
12387
12388export type ServerNotification__CollabAgentState = {
12389 readonly message?: string | null;
12390 readonly status: ServerNotification__CollabAgentStatus;
12391};
12392export const ServerNotification__CollabAgentState = Schema.Struct({
12393 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12394 status: ServerNotification__CollabAgentStatus,
12395});
12396
12397export type ServerNotification__ExternalAgentConfigImportItemTypeFailure = {
12398 readonly cwd?: string | null;
12399 readonly errorType?: string | null;
12400 readonly failureStage: string;
12401 readonly itemType: ServerNotification__ExternalAgentConfigMigrationItemType;
12402 readonly message: string;
12403 readonly source?: string | null;
12404 readonly subErrorType?: string | null;
12405};
12406export const ServerNotification__ExternalAgentConfigImportItemTypeFailure = Schema.Struct({
12407 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12408 errorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12409 failureStage: Schema.String,
12410 itemType: ServerNotification__ExternalAgentConfigMigrationItemType,
12411 message: Schema.String,
12412 source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12413 subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12414});
12415
12416export type ServerNotification__ExternalAgentConfigImportItemTypeSuccess = {
12417 readonly cwd?: string | null;
12418 readonly itemType: ServerNotification__ExternalAgentConfigMigrationItemType;
12419 readonly source?: string | null;
12420 readonly target?: string | null;
12421};
12422export const ServerNotification__ExternalAgentConfigImportItemTypeSuccess = Schema.Struct({
12423 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12424 itemType: ServerNotification__ExternalAgentConfigMigrationItemType,
12425 source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12426 target: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12427});
14984).annotate({ identifier: "ServerNotification__ThreadStatus" });
1242814985
12429export type ServerNotification__FuzzyFileSearchResult = {
12430 readonly file_name: string;
12431 readonly indices?: ReadonlyArray<number> | null;
12432 readonly match_type: ServerNotification__FuzzyFileSearchMatchType;
12433 readonly path: string;
12434 readonly root: string;
12435 readonly score: number;
14986export type ServerNotification__TextElement = {
14987 readonly byteRange: ServerNotification__ByteRange;
14988 readonly placeholder?: string | null;
1243614989};
12437export const ServerNotification__FuzzyFileSearchResult = Schema.Struct({
12438 file_name: Schema.String,
12439 indices: Schema.optionalKey(
14990export const ServerNotification__TextElement = Schema.Struct({
14991 byteRange: Schema.suspend(
14992 (): Schema.Codec<ServerNotification__ByteRange> => ServerNotification__ByteRange,
14993 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
14994 placeholder: Schema.optionalKey(
1244014995 Schema.Union([
12441 Schema.Array(
12442 Schema.Number.annotate({ format: "uint32" })
12443 .check(Schema.isInt())
12444 .check(Schema.isGreaterThanOrEqualTo(0)),
12445 ),
14996 Schema.String.annotate({
14997 description: "Optional human-readable placeholder for the element, displayed in the UI.",
14998 }),
1244614999 Schema.Null,
1244715000 ]),
1244815001 ),
12449 match_type: ServerNotification__FuzzyFileSearchMatchType,
12450 path: Schema.String,
12451 root: Schema.String,
12452 score: Schema.Number.annotate({ format: "uint32" })
12453 .check(Schema.isInt())
12454 .check(Schema.isGreaterThanOrEqualTo(0)),
12455}).annotate({ description: "Superset of [`codex_file_search::FileMatch`]" });
12456
12457export type ServerNotification__GuardianApprovalReview = {
12458 readonly rationale?: string | null;
12459 readonly riskLevel?: ServerNotification__GuardianRiskLevel | null;
12460 readonly status: ServerNotification__GuardianApprovalReviewStatus;
12461 readonly userAuthorization?: ServerNotification__GuardianUserAuthorization | null;
12462};
12463export const ServerNotification__GuardianApprovalReview = Schema.Struct({
12464 rationale: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12465 riskLevel: Schema.optionalKey(Schema.Union([ServerNotification__GuardianRiskLevel, Schema.Null])),
12466 status: ServerNotification__GuardianApprovalReviewStatus,
12467 userAuthorization: Schema.optionalKey(
12468 Schema.Union([ServerNotification__GuardianUserAuthorization, Schema.Null]),
12469 ),
12470}).annotate({
12471 description:
12472 "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.",
12473});
15002}).annotate({ identifier: "ServerNotification__TextElement" });
1247415003
12475export type ServerNotification__HookOutputEntry = {
12476 readonly kind: ServerNotification__HookOutputEntryKind;
12477 readonly text: string;
15004export type ServerNotification__MemoryCitation = {
15005 readonly entries: ReadonlyArray<ServerNotification__MemoryCitationEntry>;
15006 readonly threadIds: ReadonlyArray<string>;
1247815007};
12479export const ServerNotification__HookOutputEntry = Schema.Struct({
12480 kind: ServerNotification__HookOutputEntryKind,
12481 text: Schema.String,
12482});
15008export const ServerNotification__MemoryCitation = Schema.Struct({
15009 entries: Schema.Array(ServerNotification__MemoryCitationEntry),
15010 threadIds: Schema.Array(Schema.String),
15011}).annotate({ identifier: "ServerNotification__MemoryCitation" });
1248315012
1248415013export type ServerNotification__FileSystemSpecialPath =
1248515014 | { readonly kind: "root" }
......@@ -12524,225 +15053,228 @@ export const ServerNotification__FileSystemSpecialPath = Schema.Union(
1252415053 }),
1252515054 ],
1252615055 { mode: "oneOf" },
12527);
15056).annotate({ identifier: "ServerNotification__FileSystemSpecialPath" });
1252815057
12529export type ServerNotification__McpServerStatusUpdatedNotification = {
12530 readonly error?: string | null;
12531 readonly failureReason?: ServerNotification__McpServerStartupFailureReason | null;
12532 readonly name: string;
12533 readonly status: ServerNotification__McpServerStartupState;
12534 readonly threadId?: string | null;
15058export type ServerNotification__FileUpdateChange = {
15059 readonly diff: string;
15060 readonly kind: ServerNotification__PatchChangeKind;
15061 readonly path: string;
1253515062};
12536export const ServerNotification__McpServerStatusUpdatedNotification = Schema.Struct({
12537 error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12538 failureReason: Schema.optionalKey(
12539 Schema.Union([ServerNotification__McpServerStartupFailureReason, Schema.Null]),
12540 ),
12541 name: Schema.String,
12542 status: ServerNotification__McpServerStartupState,
12543 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12544});
15063export const ServerNotification__FileUpdateChange = Schema.Struct({
15064 diff: Schema.String,
15065 kind: ServerNotification__PatchChangeKind,
15066 path: Schema.String,
15067}).annotate({ identifier: "ServerNotification__FileUpdateChange" });
1254515068
12546export type ServerNotification__MemoryCitation = {
12547 readonly entries: ReadonlyArray<ServerNotification__MemoryCitationEntry>;
12548 readonly threadIds: ReadonlyArray<string>;
15069export type ServerNotification__CollabAgentState = {
15070 readonly message?: string | null;
15071 readonly status: ServerNotification__CollabAgentStatus;
1254915072};
12550export const ServerNotification__MemoryCitation = Schema.Struct({
12551 entries: Schema.Array(ServerNotification__MemoryCitationEntry),
12552 threadIds: Schema.Array(Schema.String),
12553});
15073export const ServerNotification__CollabAgentState = Schema.Struct({
15074 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15075 status: ServerNotification__CollabAgentStatus,
15076}).annotate({ identifier: "ServerNotification__CollabAgentState" });
1255415077
12555export type ServerNotification__ModelReroutedNotification = {
12556 readonly fromModel: string;
12557 readonly reason: ServerNotification__ModelRerouteReason;
12558 readonly threadId: string;
12559 readonly toModel: string;
12560 readonly turnId: string;
15078export type ServerNotification__Settings = {
15079 readonly developer_instructions?: string | null;
15080 readonly model: string;
15081 readonly reasoning_effort?: ServerNotification__ReasoningEffort | null;
1256115082};
12562export const ServerNotification__ModelReroutedNotification = Schema.Struct({
12563 fromModel: Schema.String,
12564 reason: ServerNotification__ModelRerouteReason,
12565 threadId: Schema.String,
12566 toModel: Schema.String,
12567 turnId: Schema.String,
15083export const ServerNotification__Settings = Schema.Struct({
15084 developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15085 model: Schema.String,
15086 reasoning_effort: Schema.optionalKey(
15087 Schema.Union([ServerNotification__ReasoningEffort, Schema.Null]),
15088 ),
15089}).annotate({
15090 description: "Settings for a collaboration mode.",
15091 identifier: "ServerNotification__Settings",
1256815092});
1256915093
12570export type ServerNotification__ModelVerificationNotification = {
15094export type ServerNotification__ThreadGoal = {
15095 readonly createdAt: number;
15096 readonly objective: string;
15097 readonly status: ServerNotification__ThreadGoalStatus;
1257115098 readonly threadId: string;
12572 readonly turnId: string;
12573 readonly verifications: ReadonlyArray<ServerNotification__ModelVerification>;
15099 readonly timeUsedSeconds: number;
15100 readonly tokenBudget?: number | null;
15101 readonly tokensUsed: number;
15102 readonly updatedAt: number;
1257415103};
12575export const ServerNotification__ModelVerificationNotification = Schema.Struct({
15104export const ServerNotification__ThreadGoal = Schema.Struct({
15105 createdAt: Schema.Number.annotate({ format: "int64" }).check(
15106 Schema.isInt().annotate({ expected: "an integer" }),
15107 ),
15108 objective: Schema.String,
15109 status: ServerNotification__ThreadGoalStatus,
1257615110 threadId: Schema.String,
12577 turnId: Schema.String,
12578 verifications: Schema.Array(ServerNotification__ModelVerification),
12579});
12580
12581export type ServerNotification__CodexErrorInfo =
12582 | "contextWindowExceeded"
12583 | "sessionBudgetExceeded"
12584 | "usageLimitExceeded"
12585 | "serverOverloaded"
12586 | "cyberPolicy"
12587 | "internalServerError"
12588 | "unauthorized"
12589 | "badRequest"
12590 | "threadRollbackFailed"
12591 | "sandboxError"
12592 | "other"
12593 | { readonly httpConnectionFailed: { readonly httpStatusCode?: number | null } }
12594 | { readonly responseStreamConnectionFailed: { readonly httpStatusCode?: number | null } }
12595 | { readonly responseStreamDisconnected: { readonly httpStatusCode?: number | null } }
12596 | { readonly responseTooManyFailedAttempts: { readonly httpStatusCode?: number | null } }
15111 timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(
15112 Schema.isInt().annotate({ expected: "an integer" }),
15113 ),
15114 tokenBudget: Schema.optionalKey(
15115 Schema.Union([
15116 Schema.Number.annotate({ format: "int64" }).check(
15117 Schema.isInt().annotate({ expected: "an integer" }),
15118 ),
15119 Schema.Null,
15120 ]),
15121 ),
15122 tokensUsed: Schema.Number.annotate({ format: "int64" }).check(
15123 Schema.isInt().annotate({ expected: "an integer" }),
15124 ),
15125 updatedAt: Schema.Number.annotate({ format: "int64" }).check(
15126 Schema.isInt().annotate({ expected: "an integer" }),
15127 ),
15128}).annotate({ identifier: "ServerNotification__ThreadGoal" });
15129
15130export type ServerNotification__SandboxPolicy =
15131 | { readonly type: "dangerFullAccess" }
15132 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
15133 | { readonly networkAccess?: ServerNotification__NetworkAccess; readonly type: "externalSandbox" }
1259715134 | {
12598 readonly activeTurnNotSteerable: {
12599 readonly turnKind: ServerNotification__NonSteerableTurnKind;
12600 };
15135 readonly excludeSlashTmp?: boolean;
15136 readonly excludeTmpdirEnvVar?: boolean;
15137 readonly networkAccess?: boolean;
15138 readonly type: "workspaceWrite";
15139 readonly writableRoots?: ReadonlyArray<ServerNotification__AbsolutePathBuf>;
1260115140 };
12602export const ServerNotification__CodexErrorInfo = Schema.Union(
15141export const ServerNotification__SandboxPolicy = Schema.Union(
1260315142 [
12604 Schema.Literals([
12605 "contextWindowExceeded",
12606 "sessionBudgetExceeded",
12607 "usageLimitExceeded",
12608 "serverOverloaded",
12609 "cyberPolicy",
12610 "internalServerError",
12611 "unauthorized",
12612 "badRequest",
12613 "threadRollbackFailed",
12614 "sandboxError",
12615 "other",
12616 ]),
12617 Schema.Struct({
12618 httpConnectionFailed: Schema.Struct({
12619 httpStatusCode: Schema.optionalKey(
12620 Schema.Union([
12621 Schema.Number.annotate({ format: "uint16" })
12622 .check(Schema.isInt())
12623 .check(Schema.isGreaterThanOrEqualTo(0)),
12624 Schema.Null,
12625 ]),
12626 ),
12627 }),
12628 }).annotate({ title: "HttpConnectionFailedCodexErrorInfo" }),
1262915143 Schema.Struct({
12630 responseStreamConnectionFailed: Schema.Struct({
12631 httpStatusCode: Schema.optionalKey(
12632 Schema.Union([
12633 Schema.Number.annotate({ format: "uint16" })
12634 .check(Schema.isInt())
12635 .check(Schema.isGreaterThanOrEqualTo(0)),
12636 Schema.Null,
12637 ]),
12638 ),
15144 type: Schema.Literal("dangerFullAccess").annotate({
15145 title: "DangerFullAccessSandboxPolicyType",
1263915146 }),
12640 }).annotate({
12641 title: "ResponseStreamConnectionFailedCodexErrorInfo",
12642 description: "Failed to connect to the response SSE stream.",
12643 }),
15147 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
1264415148 Schema.Struct({
12645 responseStreamDisconnected: Schema.Struct({
12646 httpStatusCode: Schema.optionalKey(
12647 Schema.Union([
12648 Schema.Number.annotate({ format: "uint16" })
12649 .check(Schema.isInt())
12650 .check(Schema.isGreaterThanOrEqualTo(0)),
12651 Schema.Null,
12652 ]),
12653 ),
12654 }),
12655 }).annotate({
12656 title: "ResponseStreamDisconnectedCodexErrorInfo",
12657 description:
12658 "The response SSE stream disconnected in the middle of a turn before completion.",
12659 }),
15149 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
15150 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
15151 }).annotate({ title: "ReadOnlySandboxPolicy" }),
1266015152 Schema.Struct({
12661 responseTooManyFailedAttempts: Schema.Struct({
12662 httpStatusCode: Schema.optionalKey(
12663 Schema.Union([
12664 Schema.Number.annotate({ format: "uint16" })
12665 .check(Schema.isInt())
12666 .check(Schema.isGreaterThanOrEqualTo(0)),
12667 Schema.Null,
12668 ]),
12669 ),
15153 networkAccess: Schema.optionalKey(
15154 Schema.suspend(
15155 (): Schema.Codec<ServerNotification__NetworkAccess> => ServerNotification__NetworkAccess,
15156 ).annotate({ default: "restricted" }),
15157 ),
15158 type: Schema.Literal("externalSandbox").annotate({
15159 title: "ExternalSandboxSandboxPolicyType",
1267015160 }),
12671 }).annotate({
12672 title: "ResponseTooManyFailedAttemptsCodexErrorInfo",
12673 description: "Reached the retry limit for responses.",
12674 }),
15161 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
1267515162 Schema.Struct({
12676 activeTurnNotSteerable: Schema.Struct({ turnKind: ServerNotification__NonSteerableTurnKind }),
12677 }).annotate({
12678 title: "ActiveTurnNotSteerableCodexErrorInfo",
12679 description:
12680 "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`.",
12681 }),
15163 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
15164 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
15165 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
15166 type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
15167 writableRoots: Schema.optionalKey(
15168 Schema.Array(ServerNotification__AbsolutePathBuf).annotate({ default: [] }),
15169 ),
15170 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
1268215171 ],
1268315172 { mode: "oneOf" },
12684).annotate({
12685 description:
12686 "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.",
12687});
15173).annotate({ identifier: "ServerNotification__SandboxPolicy" });
1268815174
12689export type ServerNotification__FileUpdateChange = {
12690 readonly diff: string;
12691 readonly kind: ServerNotification__PatchChangeKind;
12692 readonly path: string;
15175export type ServerNotification__ThreadTokenUsage = {
15176 readonly last: ServerNotification__TokenUsageBreakdown;
15177 readonly modelContextWindow?: number | null;
15178 readonly total: ServerNotification__TokenUsageBreakdown;
1269315179};
12694export const ServerNotification__FileUpdateChange = Schema.Struct({
12695 diff: Schema.String,
12696 kind: ServerNotification__PatchChangeKind,
12697 path: Schema.String,
12698});
15180export const ServerNotification__ThreadTokenUsage = Schema.Struct({
15181 last: ServerNotification__TokenUsageBreakdown,
15182 modelContextWindow: Schema.optionalKey(
15183 Schema.Union([
15184 Schema.Number.annotate({ format: "int64" }).check(
15185 Schema.isInt().annotate({ expected: "an integer" }),
15186 ),
15187 Schema.Null,
15188 ]),
15189 ),
15190 total: ServerNotification__TokenUsageBreakdown,
15191}).annotate({ identifier: "ServerNotification__ThreadTokenUsage" });
1269915192
12700export type ServerNotification__AccountUpdatedNotification = {
12701 readonly authMode?: ServerNotification__AuthMode | null;
12702 readonly planType?: ServerNotification__PlanType | null;
15193export type ServerNotification__HookOutputEntry = {
15194 readonly kind: ServerNotification__HookOutputEntryKind;
15195 readonly text: string;
1270315196};
12704export const ServerNotification__AccountUpdatedNotification = Schema.Struct({
12705 authMode: Schema.optionalKey(Schema.Union([ServerNotification__AuthMode, Schema.Null])),
12706 planType: Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])),
12707});
15197export const ServerNotification__HookOutputEntry = Schema.Struct({
15198 kind: ServerNotification__HookOutputEntryKind,
15199 text: Schema.String,
15200}).annotate({ identifier: "ServerNotification__HookOutputEntry" });
1270815201
12709export type ServerNotification__ThreadRealtimeStartedNotification = {
12710 readonly realtimeSessionId?: string | null;
12711 readonly threadId: string;
12712 readonly version: ServerNotification__RealtimeConversationVersion;
15202export type ServerNotification__TurnPlanStep = {
15203 readonly status: ServerNotification__TurnPlanStepStatus;
15204 readonly step: string;
1271315205};
12714export const ServerNotification__ThreadRealtimeStartedNotification = Schema.Struct({
12715 realtimeSessionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12716 threadId: Schema.String,
12717 version: ServerNotification__RealtimeConversationVersion,
12718}).annotate({ description: "EXPERIMENTAL - emitted when thread realtime startup is accepted." });
15206export const ServerNotification__TurnPlanStep = Schema.Struct({
15207 status: ServerNotification__TurnPlanStepStatus,
15208 step: Schema.String,
15209}).annotate({ identifier: "ServerNotification__TurnPlanStep" });
1271915210
12720export type ServerNotification__Settings = {
12721 readonly developer_instructions?: string | null;
12722 readonly model: string;
12723 readonly reasoning_effort?: ServerNotification__ReasoningEffort | null;
15211export type ServerNotification__GuardianApprovalReview = {
15212 readonly rationale?: string | null;
15213 readonly riskLevel?: ServerNotification__GuardianRiskLevel | null;
15214 readonly status: ServerNotification__GuardianApprovalReviewStatus;
15215 readonly userAuthorization?: ServerNotification__GuardianUserAuthorization | null;
1272415216};
12725export const ServerNotification__Settings = Schema.Struct({
12726 developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12727 model: Schema.String,
12728 reasoning_effort: Schema.optionalKey(
12729 Schema.Union([ServerNotification__ReasoningEffort, Schema.Null]),
15217export const ServerNotification__GuardianApprovalReview = Schema.Struct({
15218 rationale: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15219 riskLevel: Schema.optionalKey(Schema.Union([ServerNotification__GuardianRiskLevel, Schema.Null])),
15220 status: ServerNotification__GuardianApprovalReviewStatus,
15221 userAuthorization: Schema.optionalKey(
15222 Schema.Union([ServerNotification__GuardianUserAuthorization, Schema.Null]),
1273015223 ),
12731}).annotate({ description: "Settings for a collaboration mode." });
15224}).annotate({
15225 description:
15226 "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.",
15227 identifier: "ServerNotification__GuardianApprovalReview",
15228});
1273215229
12733export type ServerNotification__RemoteControlStatusChangedNotification = {
12734 readonly environmentId?: string | null;
12735 readonly installationId: string;
12736 readonly serverName: string;
12737 readonly status: ServerNotification__RemoteControlConnectionStatus;
15230export type ServerNotification__CommandExecOutputDeltaNotification = {
15231 readonly capReached: boolean;
15232 readonly deltaBase64: string;
15233 readonly processId: string;
15234 readonly stream: ServerNotification__CommandExecOutputStream;
1273815235};
12739export const ServerNotification__RemoteControlStatusChangedNotification = Schema.Struct({
12740 environmentId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12741 installationId: Schema.String,
12742 serverName: Schema.String,
12743 status: ServerNotification__RemoteControlConnectionStatus,
15236export const ServerNotification__CommandExecOutputDeltaNotification = Schema.Struct({
15237 capReached: Schema.Boolean.annotate({
15238 description:
15239 "`true` on the final streamed chunk for a stream when `outputBytesCap` truncated later output on that stream.",
15240 }),
15241 deltaBase64: Schema.String.annotate({ description: "Base64-encoded output bytes." }),
15242 processId: Schema.String.annotate({
15243 description:
15244 "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
15245 }),
15246 stream: Schema.suspend(
15247 (): Schema.Codec<ServerNotification__CommandExecOutputStream> =>
15248 ServerNotification__CommandExecOutputStream,
15249 ).annotate({ description: "Output stream for this chunk." }),
1274415250}).annotate({
12745 description: "Current remote-control connection status and remote identity exposed to clients.",
15251 description:
15252 "Base64-encoded output chunk emitted for a streaming `command/exec` request.\n\nThese notifications are connection-scoped. If the originating connection closes, the server terminates the process.",
15253 identifier: "ServerNotification__CommandExecOutputDeltaNotification",
15254});
15255
15256export type ServerNotification__ProcessOutputDeltaNotification = {
15257 readonly capReached: boolean;
15258 readonly deltaBase64: string;
15259 readonly processHandle: string;
15260 readonly stream: ServerNotification__ProcessOutputStream;
15261};
15262export const ServerNotification__ProcessOutputDeltaNotification = Schema.Struct({
15263 capReached: Schema.Boolean.annotate({
15264 description:
15265 "True on the final streamed chunk for this stream when output was truncated by `outputBytesCap`.",
15266 }),
15267 deltaBase64: Schema.String.annotate({ description: "Base64-encoded output bytes." }),
15268 processHandle: Schema.String.annotate({
15269 description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.",
15270 }),
15271 stream: Schema.suspend(
15272 (): Schema.Codec<ServerNotification__ProcessOutputStream> =>
15273 ServerNotification__ProcessOutputStream,
15274 ).annotate({ description: "Output stream this chunk belongs to." }),
15275}).annotate({
15276 description: "Base64-encoded output chunk emitted for a streaming `process/spawn` request.",
15277 identifier: "ServerNotification__ProcessOutputDeltaNotification",
1274615278});
1274715279
1274815280export type ServerNotification__ServerRequestResolvedNotification = {
......@@ -12752,7 +15284,33 @@ export type ServerNotification__ServerRequestResolvedNotification = {
1275215284export const ServerNotification__ServerRequestResolvedNotification = Schema.Struct({
1275315285 requestId: ServerNotification__RequestId,
1275415286 threadId: Schema.String,
12755});
15287}).annotate({ identifier: "ServerNotification__ServerRequestResolvedNotification" });
15288
15289export type ServerNotification__McpServerStatusUpdatedNotification = {
15290 readonly error?: string | null;
15291 readonly failureReason?: ServerNotification__McpServerStartupFailureReason | null;
15292 readonly name: string;
15293 readonly status: ServerNotification__McpServerStartupState;
15294 readonly threadId?: string | null;
15295};
15296export const ServerNotification__McpServerStatusUpdatedNotification = Schema.Struct({
15297 error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15298 failureReason: Schema.optionalKey(
15299 Schema.Union([ServerNotification__McpServerStartupFailureReason, Schema.Null]),
15300 ),
15301 name: Schema.String,
15302 status: ServerNotification__McpServerStartupState,
15303 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15304}).annotate({ identifier: "ServerNotification__McpServerStatusUpdatedNotification" });
15305
15306export type ServerNotification__AccountUpdatedNotification = {
15307 readonly authMode?: ServerNotification__AuthMode | null;
15308 readonly planType?: ServerNotification__PlanType | null;
15309};
15310export const ServerNotification__AccountUpdatedNotification = Schema.Struct({
15311 authMode: Schema.optionalKey(Schema.Union([ServerNotification__AuthMode, Schema.Null])),
15312 planType: Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])),
15313}).annotate({ identifier: "ServerNotification__AccountUpdatedNotification" });
1275615314
1275715315export type ServerNotification__RateLimitSnapshot = {
1275815316 readonly credits?: ServerNotification__CreditsSnapshot | null;
......@@ -12787,71 +15345,112 @@ export const ServerNotification__RateLimitSnapshot = Schema.Struct({
1278715345 Schema.Null,
1278815346 ]),
1278915347 ),
15348}).annotate({ identifier: "ServerNotification__RateLimitSnapshot" });
15349
15350export type ServerNotification__AppMetadata = {
15351 readonly categories?: ReadonlyArray<string> | null;
15352 readonly developer?: string | null;
15353 readonly firstPartyRequiresInstall?: boolean | null;
15354 readonly firstPartyType?: string | null;
15355 readonly review?: ServerNotification__AppReview | null;
15356 readonly screenshots?: ReadonlyArray<ServerNotification__AppScreenshot> | null;
15357 readonly seoDescription?: string | null;
15358 readonly showInComposerWhenUnlinked?: boolean | null;
15359 readonly subCategories?: ReadonlyArray<string> | null;
15360 readonly version?: string | null;
15361 readonly versionId?: string | null;
15362 readonly versionNotes?: string | null;
15363};
15364export const ServerNotification__AppMetadata = Schema.Struct({
15365 categories: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
15366 developer: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15367 firstPartyRequiresInstall: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
15368 firstPartyType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15369 review: Schema.optionalKey(Schema.Union([ServerNotification__AppReview, Schema.Null])),
15370 screenshots: Schema.optionalKey(
15371 Schema.Union([Schema.Array(ServerNotification__AppScreenshot), Schema.Null]),
15372 ),
15373 seoDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15374 showInComposerWhenUnlinked: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
15375 subCategories: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
15376 version: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15377 versionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15378 versionNotes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15379}).annotate({ identifier: "ServerNotification__AppMetadata" });
15380
15381export type ServerNotification__RemoteControlStatusChangedNotification = {
15382 readonly environmentId?: string | null;
15383 readonly installationId: string;
15384 readonly serverName: string;
15385 readonly status: ServerNotification__RemoteControlConnectionStatus;
15386};
15387export const ServerNotification__RemoteControlStatusChangedNotification = Schema.Struct({
15388 environmentId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15389 installationId: Schema.String,
15390 serverName: Schema.String,
15391 status: ServerNotification__RemoteControlConnectionStatus,
15392}).annotate({
15393 description: "Current remote-control connection status and remote identity exposed to clients.",
15394 identifier: "ServerNotification__RemoteControlStatusChangedNotification",
1279015395});
1279115396
12792export type ServerNotification__UserInput =
12793 | {
12794 readonly text: string;
12795 readonly text_elements?: ReadonlyArray<ServerNotification__TextElement>;
12796 readonly type: "text";
12797 }
12798 | {
12799 readonly detail?: ServerNotification__ImageDetail | null;
12800 readonly type: "image";
12801 readonly url: string;
12802 }
12803 | {
12804 readonly detail?: ServerNotification__ImageDetail | null;
12805 readonly path: string;
12806 readonly type: "localImage";
12807 }
12808 | { readonly type: "audio"; readonly url: string }
12809 | { readonly path: string; readonly type: "localAudio" }
12810 | { readonly name: string; readonly path: string; readonly type: "skill" }
12811 | { readonly name: string; readonly path: string; readonly type: "mention" };
12812export const ServerNotification__UserInput = Schema.Union(
12813 [
12814 Schema.Struct({
12815 text: Schema.String,
12816 text_elements: Schema.optionalKey(
12817 Schema.Array(ServerNotification__TextElement).annotate({
12818 description: "UI-defined spans within `text` used to render or persist special elements.",
12819 default: [],
12820 }),
12821 ),
12822 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
12823 }).annotate({ title: "TextUserInput" }),
12824 Schema.Struct({
12825 detail: Schema.optionalKey(Schema.Union([ServerNotification__ImageDetail, Schema.Null])),
12826 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
12827 url: Schema.String,
12828 }).annotate({ title: "ImageUserInput" }),
12829 Schema.Struct({
12830 detail: Schema.optionalKey(Schema.Union([ServerNotification__ImageDetail, Schema.Null])),
12831 path: Schema.String,
12832 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
12833 }).annotate({ title: "LocalImageUserInput" }),
12834 Schema.Struct({
12835 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
12836 url: Schema.String,
12837 }).annotate({ title: "AudioUserInput" }),
12838 Schema.Struct({
12839 path: Schema.String,
12840 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
12841 }).annotate({ title: "LocalAudioUserInput" }),
12842 Schema.Struct({
12843 name: Schema.String,
12844 path: Schema.String,
12845 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
12846 }).annotate({ title: "SkillUserInput" }),
12847 Schema.Struct({
12848 name: Schema.String,
12849 path: Schema.String,
12850 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
12851 }).annotate({ title: "MentionUserInput" }),
12852 ],
12853 { mode: "oneOf" },
12854);
15397export type ServerNotification__ExternalAgentConfigImportItemTypeFailure = {
15398 readonly cwd?: string | null;
15399 readonly errorType?: string | null;
15400 readonly failureStage: string;
15401 readonly itemType: ServerNotification__ExternalAgentConfigMigrationItemType;
15402 readonly message: string;
15403 readonly source?: string | null;
15404 readonly subErrorType?: string | null;
15405};
15406export const ServerNotification__ExternalAgentConfigImportItemTypeFailure = Schema.Struct({
15407 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15408 errorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15409 failureStage: Schema.String,
15410 itemType: ServerNotification__ExternalAgentConfigMigrationItemType,
15411 message: Schema.String,
15412 source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15413 subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15414}).annotate({ identifier: "ServerNotification__ExternalAgentConfigImportItemTypeFailure" });
15415
15416export type ServerNotification__ExternalAgentConfigImportItemTypeSuccess = {
15417 readonly cwd?: string | null;
15418 readonly itemType: ServerNotification__ExternalAgentConfigMigrationItemType;
15419 readonly source?: string | null;
15420 readonly target?: string | null;
15421};
15422export const ServerNotification__ExternalAgentConfigImportItemTypeSuccess = Schema.Struct({
15423 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15424 itemType: ServerNotification__ExternalAgentConfigMigrationItemType,
15425 source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15426 target: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15427}).annotate({ identifier: "ServerNotification__ExternalAgentConfigImportItemTypeSuccess" });
15428
15429export type ServerNotification__ModelReroutedNotification = {
15430 readonly fromModel: string;
15431 readonly reason: ServerNotification__ModelRerouteReason;
15432 readonly threadId: string;
15433 readonly toModel: string;
15434 readonly turnId: string;
15435};
15436export const ServerNotification__ModelReroutedNotification = Schema.Struct({
15437 fromModel: Schema.String,
15438 reason: ServerNotification__ModelRerouteReason,
15439 threadId: Schema.String,
15440 toModel: Schema.String,
15441 turnId: Schema.String,
15442}).annotate({ identifier: "ServerNotification__ModelReroutedNotification" });
15443
15444export type ServerNotification__ModelVerificationNotification = {
15445 readonly threadId: string;
15446 readonly turnId: string;
15447 readonly verifications: ReadonlyArray<ServerNotification__ModelVerification>;
15448};
15449export const ServerNotification__ModelVerificationNotification = Schema.Struct({
15450 threadId: Schema.String,
15451 turnId: Schema.String,
15452 verifications: Schema.Array(ServerNotification__ModelVerification),
15453}).annotate({ identifier: "ServerNotification__ModelVerificationNotification" });
1285515454
1285615455export type ServerNotification__TextRange = {
1285715456 readonly end: ServerNotification__TextPosition;
......@@ -12860,118 +15459,69 @@ export type ServerNotification__TextRange = {
1286015459export const ServerNotification__TextRange = Schema.Struct({
1286115460 end: ServerNotification__TextPosition,
1286215461 start: ServerNotification__TextPosition,
15462}).annotate({ identifier: "ServerNotification__TextRange" });
15463
15464export type ServerNotification__FuzzyFileSearchResult = {
15465 readonly file_name: string;
15466 readonly indices?: ReadonlyArray<number> | null;
15467 readonly match_type: ServerNotification__FuzzyFileSearchMatchType;
15468 readonly path: string;
15469 readonly root: string;
15470 readonly score: number;
15471};
15472export const ServerNotification__FuzzyFileSearchResult = Schema.Struct({
15473 file_name: Schema.String,
15474 indices: Schema.optionalKey(
15475 Schema.Union([
15476 Schema.Array(
15477 Schema.Number.annotate({ format: "uint32" })
15478 .check(Schema.isInt().annotate({ expected: "an integer" }))
15479 .check(
15480 Schema.isGreaterThanOrEqualTo(0).annotate({
15481 expected: "a value greater than or equal to 0",
15482 }),
15483 ),
15484 ),
15485 Schema.Null,
15486 ]),
15487 ),
15488 match_type: ServerNotification__FuzzyFileSearchMatchType,
15489 path: Schema.String,
15490 root: Schema.String,
15491 score: Schema.Number.annotate({ format: "uint32" })
15492 .check(Schema.isInt().annotate({ expected: "an integer" }))
15493 .check(
15494 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
15495 ),
15496}).annotate({
15497 description: "Superset of [`codex_file_search::FileMatch`]",
15498 identifier: "ServerNotification__FuzzyFileSearchResult",
1286315499});
1286415500
12865export type ServerNotification__ThreadStatus =
12866 | { readonly type: "notLoaded" }
12867 | { readonly type: "idle" }
12868 | { readonly type: "systemError" }
12869 | {
12870 readonly activeFlags: ReadonlyArray<ServerNotification__ThreadActiveFlag>;
12871 readonly type: "active";
12872 };
12873export const ServerNotification__ThreadStatus = Schema.Union(
12874 [
12875 Schema.Struct({
12876 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
12877 }).annotate({ title: "NotLoadedThreadStatus" }),
12878 Schema.Struct({
12879 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
12880 }).annotate({ title: "IdleThreadStatus" }),
12881 Schema.Struct({
12882 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
12883 }).annotate({ title: "SystemErrorThreadStatus" }),
12884 Schema.Struct({
12885 activeFlags: Schema.Array(ServerNotification__ThreadActiveFlag),
12886 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
12887 }).annotate({ title: "ActiveThreadStatus" }),
12888 ],
12889 { mode: "oneOf" },
12890);
15501export type ServerNotification__ThreadRealtimeStartedNotification = {
15502 readonly realtimeSessionId?: string | null;
15503 readonly threadId: string;
15504 readonly version: ServerNotification__RealtimeConversationVersion;
15505};
15506export const ServerNotification__ThreadRealtimeStartedNotification = Schema.Struct({
15507 realtimeSessionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15508 threadId: Schema.String,
15509 version: ServerNotification__RealtimeConversationVersion,
15510}).annotate({
15511 description: "EXPERIMENTAL - emitted when thread realtime startup is accepted.",
15512 identifier: "ServerNotification__ThreadRealtimeStartedNotification",
15513});
1289115514
12892export type ServerNotification__ThreadGoal = {
12893 readonly createdAt: number;
12894 readonly objective: string;
12895 readonly status: ServerNotification__ThreadGoalStatus;
15515export type ServerNotification__ThreadRealtimeOutputAudioDeltaNotification = {
15516 readonly audio: ServerNotification__ThreadRealtimeAudioChunk;
1289615517 readonly threadId: string;
12897 readonly timeUsedSeconds: number;
12898 readonly tokenBudget?: number | null;
12899 readonly tokensUsed: number;
12900 readonly updatedAt: number;
1290115518};
12902export const ServerNotification__ThreadGoal = Schema.Struct({
12903 createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
12904 objective: Schema.String,
12905 status: ServerNotification__ThreadGoalStatus,
15519export const ServerNotification__ThreadRealtimeOutputAudioDeltaNotification = Schema.Struct({
15520 audio: ServerNotification__ThreadRealtimeAudioChunk,
1290615521 threadId: Schema.String,
12907 timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
12908 tokenBudget: Schema.optionalKey(
12909 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
12910 ),
12911 tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
12912 updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
12913});
12914
12915export type ServerNotification__SubAgentSource =
12916 | "review"
12917 | "compact"
12918 | "memory_consolidation"
12919 | {
12920 readonly thread_spawn: {
12921 readonly agent_nickname?: string | null;
12922 readonly agent_path?: ServerNotification__AgentPath | null;
12923 readonly agent_role?: string | null;
12924 readonly depth: number;
12925 readonly parent_thread_id: ServerNotification__ThreadId;
12926 };
12927 }
12928 | { readonly other: string };
12929export const ServerNotification__SubAgentSource = Schema.Union(
12930 [
12931 Schema.Literals(["review", "compact", "memory_consolidation"]),
12932 Schema.Struct({
12933 thread_spawn: Schema.Struct({
12934 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12935 agent_path: Schema.optionalKey(Schema.Union([ServerNotification__AgentPath, Schema.Null])),
12936 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12937 depth: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
12938 parent_thread_id: ServerNotification__ThreadId,
12939 }),
12940 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
12941 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
12942 ],
12943 { mode: "oneOf" },
12944);
12945
12946export type ServerNotification__ThreadRealtimeOutputAudioDeltaNotification = {
12947 readonly audio: ServerNotification__ThreadRealtimeAudioChunk;
12948 readonly threadId: string;
12949};
12950export const ServerNotification__ThreadRealtimeOutputAudioDeltaNotification = Schema.Struct({
12951 audio: ServerNotification__ThreadRealtimeAudioChunk,
12952 threadId: Schema.String,
12953}).annotate({ description: "EXPERIMENTAL - streamed output audio emitted by thread realtime." });
12954
12955export type ServerNotification__ThreadTokenUsage = {
12956 readonly last: ServerNotification__TokenUsageBreakdown;
12957 readonly modelContextWindow?: number | null;
12958 readonly total: ServerNotification__TokenUsageBreakdown;
12959};
12960export const ServerNotification__ThreadTokenUsage = Schema.Struct({
12961 last: ServerNotification__TokenUsageBreakdown,
12962 modelContextWindow: Schema.optionalKey(
12963 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
12964 ),
12965 total: ServerNotification__TokenUsageBreakdown,
12966});
12967
12968export type ServerNotification__TurnPlanStep = {
12969 readonly status: ServerNotification__TurnPlanStepStatus;
12970 readonly step: string;
12971};
12972export const ServerNotification__TurnPlanStep = Schema.Struct({
12973 status: ServerNotification__TurnPlanStepStatus,
12974 step: Schema.String,
15522}).annotate({
15523 description: "EXPERIMENTAL - streamed output audio emitted by thread realtime.",
15524 identifier: "ServerNotification__ThreadRealtimeOutputAudioDeltaNotification",
1297515525});
1297615526
1297715527export type ServerNotification__WindowsSandboxSetupCompletedNotification = {
......@@ -12983,7 +15533,7 @@ export const ServerNotification__WindowsSandboxSetupCompletedNotification = Sche
1298315533 error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1298415534 mode: ServerNotification__WindowsSandboxSetupMode,
1298515535 success: Schema.Boolean,
12986});
15536}).annotate({ identifier: "ServerNotification__WindowsSandboxSetupCompletedNotification" });
1298715537
1298815538export type ServerRequest__CommandAction =
1298915539 | {
......@@ -13025,24 +15575,7 @@ export const ServerRequest__CommandAction = Schema.Union(
1302515575 }).annotate({ title: "UnknownCommandAction" }),
1302615576 ],
1302715577 { mode: "oneOf" },
13028);
13029
13030export type ServerRequest__ChatgptAuthTokensRefreshParams = {
13031 readonly previousAccountId?: string | null;
13032 readonly reason: ServerRequest__ChatgptAuthTokensRefreshReason;
13033};
13034export const ServerRequest__ChatgptAuthTokensRefreshParams = Schema.Struct({
13035 previousAccountId: Schema.optionalKey(
13036 Schema.Union([
13037 Schema.String.annotate({
13038 description:
13039 "Workspace/account identifier that Codex was previously using.\n\nClients that manage multiple accounts/workspaces can use this as a hint to refresh the token for the correct workspace.\n\nThis may be `null` when the prior auth state did not include a workspace identifier (`chatgpt_account_id`).",
13040 }),
13041 Schema.Null,
13042 ]),
13043 ),
13044 reason: ServerRequest__ChatgptAuthTokensRefreshReason,
13045});
15578).annotate({ identifier: "ServerRequest__CommandAction" });
1304615579
1304715580export type ServerRequest__FileSystemSpecialPath =
1304815581 | { readonly kind: "root" }
......@@ -13080,59 +15613,71 @@ export const ServerRequest__FileSystemSpecialPath = Schema.Union(
1308015613 }),
1308115614 ],
1308215615 { mode: "oneOf" },
13083);
15616).annotate({ identifier: "ServerRequest__FileSystemSpecialPath" });
1308415617
13085export type ServerRequest__McpElicitationBooleanSchema = {
13086 readonly default?: boolean | null;
13087 readonly description?: string | null;
13088 readonly title?: string | null;
13089 readonly type: ServerRequest__McpElicitationBooleanType;
15618export type ServerRequest__NetworkApprovalContext = {
15619 readonly host: string;
15620 readonly protocol: ServerRequest__NetworkApprovalProtocol;
1309015621};
13091export const ServerRequest__McpElicitationBooleanSchema = Schema.Struct({
13092 default: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
13093 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13094 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13095 type: ServerRequest__McpElicitationBooleanType,
13096});
15622export const ServerRequest__NetworkApprovalContext = Schema.Struct({
15623 host: Schema.String,
15624 protocol: ServerRequest__NetworkApprovalProtocol,
15625}).annotate({ identifier: "ServerRequest__NetworkApprovalContext" });
1309715626
13098export type ServerRequest__McpElicitationTitledEnumItems = {
13099 readonly anyOf: ReadonlyArray<ServerRequest__McpElicitationConstOption>;
15627export type ServerRequest__NetworkPolicyAmendment = {
15628 readonly action: ServerRequest__NetworkPolicyRuleAction;
15629 readonly host: string;
1310015630};
13101export const ServerRequest__McpElicitationTitledEnumItems = Schema.Struct({
13102 anyOf: Schema.Array(ServerRequest__McpElicitationConstOption),
15631export const ServerRequest__NetworkPolicyAmendment = Schema.Struct({
15632 action: ServerRequest__NetworkPolicyRuleAction,
15633 host: Schema.String,
15634}).annotate({ identifier: "ServerRequest__NetworkPolicyAmendment" });
15635
15636export type ServerRequest__ToolRequestUserInputQuestion = {
15637 readonly header: string;
15638 readonly id: string;
15639 readonly isOther?: boolean;
15640 readonly isSecret?: boolean;
15641 readonly options?: ReadonlyArray<ServerRequest__ToolRequestUserInputOption> | null;
15642 readonly question: string;
15643};
15644export const ServerRequest__ToolRequestUserInputQuestion = Schema.Struct({
15645 header: Schema.String,
15646 id: Schema.String,
15647 isOther: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
15648 isSecret: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
15649 options: Schema.optionalKey(
15650 Schema.Union([Schema.Array(ServerRequest__ToolRequestUserInputOption), Schema.Null]),
15651 ),
15652 question: Schema.String,
15653}).annotate({
15654 description: "EXPERIMENTAL. Represents one request_user_input question and its required options.",
15655 identifier: "ServerRequest__ToolRequestUserInputQuestion",
1310315656});
1310415657
13105export type ServerRequest__McpElicitationNumberSchema = {
13106 readonly default?: number | null;
15658export type ServerRequest__McpElicitationUntitledSingleSelectEnumSchema = {
15659 readonly default?: string | null;
1310715660 readonly description?: string | null;
13108 readonly maximum?: number | null;
13109 readonly minimum?: number | null;
15661 readonly enum: ReadonlyArray<string>;
1311015662 readonly title?: string | null;
13111 readonly type: ServerRequest__McpElicitationNumberType;
15663 readonly type: ServerRequest__McpElicitationStringType;
1311215664};
13113export const ServerRequest__McpElicitationNumberSchema = Schema.Struct({
13114 default: Schema.optionalKey(
13115 Schema.Union([
13116 Schema.Number.annotate({ format: "double" }).check(Schema.isFinite()),
13117 Schema.Null,
13118 ]),
13119 ),
15665export const ServerRequest__McpElicitationUntitledSingleSelectEnumSchema = Schema.Struct({
15666 default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1312015667 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13121 maximum: Schema.optionalKey(
13122 Schema.Union([
13123 Schema.Number.annotate({ format: "double" }).check(Schema.isFinite()),
13124 Schema.Null,
13125 ]),
13126 ),
13127 minimum: Schema.optionalKey(
13128 Schema.Union([
13129 Schema.Number.annotate({ format: "double" }).check(Schema.isFinite()),
13130 Schema.Null,
13131 ]),
13132 ),
15668 enum: Schema.Array(Schema.String),
1313315669 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13134 type: ServerRequest__McpElicitationNumberType,
13135});
15670 type: ServerRequest__McpElicitationStringType,
15671}).annotate({ identifier: "ServerRequest__McpElicitationUntitledSingleSelectEnumSchema" });
15672
15673export type ServerRequest__McpElicitationUntitledEnumItems = {
15674 readonly enum: ReadonlyArray<string>;
15675 readonly type: ServerRequest__McpElicitationStringType;
15676};
15677export const ServerRequest__McpElicitationUntitledEnumItems = Schema.Struct({
15678 enum: Schema.Array(Schema.String),
15679 type: ServerRequest__McpElicitationStringType,
15680}).annotate({ identifier: "ServerRequest__McpElicitationUntitledEnumItems" });
1313615681
1313715682export type ServerRequest__McpElicitationLegacyTitledEnumSchema = {
1313815683 readonly default?: string | null;
......@@ -13149,7 +15694,29 @@ export const ServerRequest__McpElicitationLegacyTitledEnumSchema = Schema.Struct
1314915694 enumNames: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1315015695 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1315115696 type: ServerRequest__McpElicitationStringType,
13152});
15697}).annotate({ identifier: "ServerRequest__McpElicitationLegacyTitledEnumSchema" });
15698
15699export type ServerRequest__McpElicitationTitledSingleSelectEnumSchema = {
15700 readonly default?: string | null;
15701 readonly description?: string | null;
15702 readonly oneOf: ReadonlyArray<ServerRequest__McpElicitationConstOption>;
15703 readonly title?: string | null;
15704 readonly type: ServerRequest__McpElicitationStringType;
15705};
15706export const ServerRequest__McpElicitationTitledSingleSelectEnumSchema = Schema.Struct({
15707 default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15708 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15709 oneOf: Schema.Array(ServerRequest__McpElicitationConstOption),
15710 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15711 type: ServerRequest__McpElicitationStringType,
15712}).annotate({ identifier: "ServerRequest__McpElicitationTitledSingleSelectEnumSchema" });
15713
15714export type ServerRequest__McpElicitationTitledEnumItems = {
15715 readonly anyOf: ReadonlyArray<ServerRequest__McpElicitationConstOption>;
15716};
15717export const ServerRequest__McpElicitationTitledEnumItems = Schema.Struct({
15718 anyOf: Schema.Array(ServerRequest__McpElicitationConstOption),
15719}).annotate({ identifier: "ServerRequest__McpElicitationTitledEnumItems" });
1315315720
1315415721export type ServerRequest__McpElicitationStringSchema = {
1315515722 readonly default?: string | null;
......@@ -13169,79 +15736,98 @@ export const ServerRequest__McpElicitationStringSchema = Schema.Struct({
1316915736 maxLength: Schema.optionalKey(
1317015737 Schema.Union([
1317115738 Schema.Number.annotate({ format: "uint32" })
13172 .check(Schema.isInt())
13173 .check(Schema.isGreaterThanOrEqualTo(0)),
15739 .check(Schema.isInt().annotate({ expected: "an integer" }))
15740 .check(
15741 Schema.isGreaterThanOrEqualTo(0).annotate({
15742 expected: "a value greater than or equal to 0",
15743 }),
15744 ),
1317415745 Schema.Null,
1317515746 ]),
1317615747 ),
1317715748 minLength: Schema.optionalKey(
1317815749 Schema.Union([
1317915750 Schema.Number.annotate({ format: "uint32" })
13180 .check(Schema.isInt())
13181 .check(Schema.isGreaterThanOrEqualTo(0)),
15751 .check(Schema.isInt().annotate({ expected: "an integer" }))
15752 .check(
15753 Schema.isGreaterThanOrEqualTo(0).annotate({
15754 expected: "a value greater than or equal to 0",
15755 }),
15756 ),
1318215757 Schema.Null,
1318315758 ]),
1318415759 ),
1318515760 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1318615761 type: ServerRequest__McpElicitationStringType,
13187});
15762}).annotate({ identifier: "ServerRequest__McpElicitationStringSchema" });
1318815763
13189export type ServerRequest__McpElicitationTitledSingleSelectEnumSchema = {
13190 readonly default?: string | null;
15764export type ServerRequest__McpElicitationNumberSchema = {
15765 readonly default?: number | null;
1319115766 readonly description?: string | null;
13192 readonly oneOf: ReadonlyArray<ServerRequest__McpElicitationConstOption>;
15767 readonly maximum?: number | null;
15768 readonly minimum?: number | null;
1319315769 readonly title?: string | null;
13194 readonly type: ServerRequest__McpElicitationStringType;
15770 readonly type: ServerRequest__McpElicitationNumberType;
1319515771};
13196export const ServerRequest__McpElicitationTitledSingleSelectEnumSchema = Schema.Struct({
13197 default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15772export const ServerRequest__McpElicitationNumberSchema = Schema.Struct({
15773 default: Schema.optionalKey(
15774 Schema.Union([
15775 Schema.Number.annotate({ format: "double" }).check(
15776 Schema.isFinite().annotate({ expected: "a finite number" }),
15777 ),
15778 Schema.Null,
15779 ]),
15780 ),
1319815781 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13199 oneOf: Schema.Array(ServerRequest__McpElicitationConstOption),
15782 maximum: Schema.optionalKey(
15783 Schema.Union([
15784 Schema.Number.annotate({ format: "double" }).check(
15785 Schema.isFinite().annotate({ expected: "a finite number" }),
15786 ),
15787 Schema.Null,
15788 ]),
15789 ),
15790 minimum: Schema.optionalKey(
15791 Schema.Union([
15792 Schema.Number.annotate({ format: "double" }).check(
15793 Schema.isFinite().annotate({ expected: "a finite number" }),
15794 ),
15795 Schema.Null,
15796 ]),
15797 ),
1320015798 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13201 type: ServerRequest__McpElicitationStringType,
13202});
13203
13204export type ServerRequest__McpElicitationUntitledEnumItems = {
13205 readonly enum: ReadonlyArray<string>;
13206 readonly type: ServerRequest__McpElicitationStringType;
13207};
13208export const ServerRequest__McpElicitationUntitledEnumItems = Schema.Struct({
13209 enum: Schema.Array(Schema.String),
13210 type: ServerRequest__McpElicitationStringType,
13211});
15799 type: ServerRequest__McpElicitationNumberType,
15800}).annotate({ identifier: "ServerRequest__McpElicitationNumberSchema" });
1321215801
13213export type ServerRequest__McpElicitationUntitledSingleSelectEnumSchema = {
13214 readonly default?: string | null;
15802export type ServerRequest__McpElicitationBooleanSchema = {
15803 readonly default?: boolean | null;
1321515804 readonly description?: string | null;
13216 readonly enum: ReadonlyArray<string>;
1321715805 readonly title?: string | null;
13218 readonly type: ServerRequest__McpElicitationStringType;
15806 readonly type: ServerRequest__McpElicitationBooleanType;
1321915807};
13220export const ServerRequest__McpElicitationUntitledSingleSelectEnumSchema = Schema.Struct({
13221 default: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15808export const ServerRequest__McpElicitationBooleanSchema = Schema.Struct({
15809 default: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1322215810 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13223 enum: Schema.Array(Schema.String),
1322415811 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13225 type: ServerRequest__McpElicitationStringType,
13226});
13227
13228export type ServerRequest__NetworkApprovalContext = {
13229 readonly host: string;
13230 readonly protocol: ServerRequest__NetworkApprovalProtocol;
13231};
13232export const ServerRequest__NetworkApprovalContext = Schema.Struct({
13233 host: Schema.String,
13234 protocol: ServerRequest__NetworkApprovalProtocol,
13235});
15812 type: ServerRequest__McpElicitationBooleanType,
15813}).annotate({ identifier: "ServerRequest__McpElicitationBooleanSchema" });
1323615814
13237export type ServerRequest__NetworkPolicyAmendment = {
13238 readonly action: ServerRequest__NetworkPolicyRuleAction;
13239 readonly host: string;
15815export type ServerRequest__ChatgptAuthTokensRefreshParams = {
15816 readonly previousAccountId?: string | null;
15817 readonly reason: ServerRequest__ChatgptAuthTokensRefreshReason;
1324015818};
13241export const ServerRequest__NetworkPolicyAmendment = Schema.Struct({
13242 action: ServerRequest__NetworkPolicyRuleAction,
13243 host: Schema.String,
13244});
15819export const ServerRequest__ChatgptAuthTokensRefreshParams = Schema.Struct({
15820 previousAccountId: Schema.optionalKey(
15821 Schema.Union([
15822 Schema.String.annotate({
15823 description:
15824 "Workspace/account identifier that Codex was previously using.\n\nClients that manage multiple accounts/workspaces can use this as a hint to refresh the token for the correct workspace.\n\nThis may be `null` when the prior auth state did not include a workspace identifier (`chatgpt_account_id`).",
15825 }),
15826 Schema.Null,
15827 ]),
15828 ),
15829 reason: ServerRequest__ChatgptAuthTokensRefreshReason,
15830}).annotate({ identifier: "ServerRequest__ChatgptAuthTokensRefreshParams" });
1324515831
1324615832export type ServerRequest__ApplyPatchApprovalParams = {
1324715833 readonly callId: string;
......@@ -13274,7 +15860,7 @@ export const ServerRequest__ApplyPatchApprovalParams = Schema.Struct({
1327415860 Schema.Null,
1327515861 ]),
1327615862 ),
13277});
15863}).annotate({ identifier: "ServerRequest__ApplyPatchApprovalParams" });
1327815864
1327915865export type ServerRequest__ExecCommandApprovalParams = {
1328015866 readonly approvalId?: string | null;
......@@ -13301,28 +15887,7 @@ export const ServerRequest__ExecCommandApprovalParams = Schema.Struct({
1330115887 cwd: Schema.String,
1330215888 parsedCmd: Schema.Array(ServerRequest__ParsedCommand),
1330315889 reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13304});
13305
13306export type ServerRequest__ToolRequestUserInputQuestion = {
13307 readonly header: string;
13308 readonly id: string;
13309 readonly isOther?: boolean;
13310 readonly isSecret?: boolean;
13311 readonly options?: ReadonlyArray<ServerRequest__ToolRequestUserInputOption> | null;
13312 readonly question: string;
13313};
13314export const ServerRequest__ToolRequestUserInputQuestion = Schema.Struct({
13315 header: Schema.String,
13316 id: Schema.String,
13317 isOther: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
13318 isSecret: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
13319 options: Schema.optionalKey(
13320 Schema.Union([Schema.Array(ServerRequest__ToolRequestUserInputOption), Schema.Null]),
13321 ),
13322 question: Schema.String,
13323}).annotate({
13324 description: "EXPERIMENTAL. Represents one request_user_input question and its required options.",
13325});
15890}).annotate({ identifier: "ServerRequest__ExecCommandApprovalParams" });
1332615891
1332715892export type ToolRequestUserInputParams__ToolRequestUserInputQuestion = {
1332815893 readonly header: string;
......@@ -13346,6 +15911,7 @@ export const ToolRequestUserInputParams__ToolRequestUserInputQuestion = Schema.S
1334615911 question: Schema.String,
1334715912}).annotate({
1334815913 description: "EXPERIMENTAL. Represents one request_user_input question and its required options.",
15914 identifier: "ToolRequestUserInputParams__ToolRequestUserInputQuestion",
1334915915});
1335015916
1335115917export type V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot = {
......@@ -13389,7 +15955,7 @@ export const V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot = Schema.
1338915955 Schema.Null,
1339015956 ]),
1339115957 ),
13392});
15958}).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot" });
1339315959
1339415960export type V2AppListUpdatedNotification__AppMetadata = {
1339515961 readonly categories?: ReadonlyArray<string> | null;
......@@ -13420,7 +15986,7 @@ export const V2AppListUpdatedNotification__AppMetadata = Schema.Struct({
1342015986 version: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1342115987 versionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1342215988 versionNotes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13423});
15989}).annotate({ identifier: "V2AppListUpdatedNotification__AppMetadata" });
1342415990
1342515991export type V2AppsListResponse__AppMetadata = {
1342615992 readonly categories?: ReadonlyArray<string> | null;
......@@ -13451,7 +16017,7 @@ export const V2AppsListResponse__AppMetadata = Schema.Struct({
1345116017 version: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1345216018 versionId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1345316019 versionNotes: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13454});
16020}).annotate({ identifier: "V2AppsListResponse__AppMetadata" });
1345516021
1345616022export type V2AppsReadResponse__ConnectorMetadata = {
1345716023 readonly description?: string | null;
......@@ -13468,12 +16034,18 @@ export const V2AppsReadResponse__ConnectorMetadata = Schema.Struct({
1346816034 toolSummaries: Schema.optionalKey(
1346916035 Schema.Union([Schema.Array(V2AppsReadResponse__AppToolSummary), Schema.Null]),
1347016036 ),
13471}).annotate({ description: "EXPERIMENTAL - metadata returned by app/read." });
16037}).annotate({
16038 description: "EXPERIMENTAL - metadata returned by app/read.",
16039 identifier: "V2AppsReadResponse__ConnectorMetadata",
16040});
1347216041
1347316042export type V2CommandExecParams__SandboxPolicy =
1347416043 | { readonly type: "dangerFullAccess" }
1347516044 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
13476 | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
16045 | {
16046 readonly networkAccess?: V2CommandExecParams__NetworkAccess;
16047 readonly type: "externalSandbox";
16048 }
1347716049 | {
1347816050 readonly excludeSlashTmp?: boolean;
1347916051 readonly excludeTmpdirEnvVar?: boolean;
......@@ -13494,7 +16066,10 @@ export const V2CommandExecParams__SandboxPolicy = Schema.Union(
1349416066 }).annotate({ title: "ReadOnlySandboxPolicy" }),
1349516067 Schema.Struct({
1349616068 networkAccess: Schema.optionalKey(
13497 Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
16069 Schema.suspend(
16070 (): Schema.Codec<V2CommandExecParams__NetworkAccess> =>
16071 V2CommandExecParams__NetworkAccess,
16072 ).annotate({ default: "restricted" }),
1349816073 ),
1349916074 type: Schema.Literal("externalSandbox").annotate({
1350016075 title: "ExternalSandboxSandboxPolicyType",
......@@ -13511,24 +16086,43 @@ export const V2CommandExecParams__SandboxPolicy = Schema.Union(
1351116086 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
1351216087 ],
1351316088 { mode: "oneOf" },
13514);
16089).annotate({ identifier: "V2CommandExecParams__SandboxPolicy" });
1351516090
1351616091export type V2ConfigBatchWriteParams__ConfigEdit = {
1351716092 readonly keyPath: string;
1351816093 readonly mergeStrategy: V2ConfigBatchWriteParams__MergeStrategy;
13519 readonly value: unknown;
16094 readonly value: Schema.Json;
1352016095};
1352116096export const V2ConfigBatchWriteParams__ConfigEdit = Schema.Struct({
1352216097 keyPath: Schema.String,
1352316098 mergeStrategy: V2ConfigBatchWriteParams__MergeStrategy,
13524 value: Schema.Unknown,
13525});
16099 value: Schema.Json.annotate({ expected: "JSON value" }),
16100}).annotate({ identifier: "V2ConfigBatchWriteParams__ConfigEdit" });
16101
16102export type V2ConfigReadResponse__WebSearchToolConfig = {
16103 readonly allowed_domains?: ReadonlyArray<string> | null;
16104 readonly context_size?: V2ConfigReadResponse__WebSearchContextSize | null;
16105 readonly location?: V2ConfigReadResponse__WebSearchLocation | null;
16106};
16107export const V2ConfigReadResponse__WebSearchToolConfig = Schema.Struct({
16108 allowed_domains: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
16109 context_size: Schema.optionalKey(
16110 Schema.Union([V2ConfigReadResponse__WebSearchContextSize, Schema.Null]),
16111 ),
16112 location: Schema.optionalKey(
16113 Schema.Union([V2ConfigReadResponse__WebSearchLocation, Schema.Null]),
16114 ),
16115}).annotate({ identifier: "V2ConfigReadResponse__WebSearchToolConfig" });
1352616116
1352716117export type V2ConfigReadResponse__ConfigLayerSource =
1352816118 | { readonly domain: string; readonly key: string; readonly type: "mdm" }
13529 | { readonly file: string; readonly type: "system" }
16119 | { readonly file: V2ConfigReadResponse__AbsolutePathBuf; readonly type: "system" }
1353016120 | { readonly id: string; readonly name: string; readonly type: "enterpriseManaged" }
13531 | { readonly file: string; readonly profile?: string | null; readonly type: "user" }
16121 | {
16122 readonly file: V2ConfigReadResponse__AbsolutePathBuf;
16123 readonly profile?: string | null;
16124 readonly type: "user";
16125 }
1353216126 | { readonly dotCodexFolder: V2ConfigReadResponse__AbsolutePathBuf; readonly type: "project" }
1353316127 | { readonly type: "sessionFlags" }
1353416128 | {
......@@ -13547,9 +16141,12 @@ export const V2ConfigReadResponse__ConfigLayerSource = Schema.Union(
1354716141 description: "Managed preferences layer delivered by MDM (macOS only).",
1354816142 }),
1354916143 Schema.Struct({
13550 file: Schema.String.annotate({
16144 file: Schema.suspend(
16145 (): Schema.Codec<V2ConfigReadResponse__AbsolutePathBuf> =>
16146 V2ConfigReadResponse__AbsolutePathBuf,
16147 ).annotate({
1355116148 description:
13552 "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.",
16149 "This is the path to the system config.toml file, though it is not guaranteed to exist.",
1355316150 }),
1355416151 type: Schema.Literal("system").annotate({ title: "SystemConfigLayerSourceType" }),
1355516152 }).annotate({
......@@ -13570,9 +16167,12 @@ export const V2ConfigReadResponse__ConfigLayerSource = Schema.Union(
1357016167 description: "Enterprise-managed config layer delivered by the cloud config bundle.",
1357116168 }),
1357216169 Schema.Struct({
13573 file: Schema.String.annotate({
16170 file: Schema.suspend(
16171 (): Schema.Codec<V2ConfigReadResponse__AbsolutePathBuf> =>
16172 V2ConfigReadResponse__AbsolutePathBuf,
16173 ).annotate({
1357416174 description:
13575 "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.",
16175 "This is the path to the user's config.toml file, though it is not guaranteed to exist.",
1357616176 }),
1357716177 profile: Schema.optionalKey(
1357816178 Schema.Union([
......@@ -13620,7 +16220,7 @@ export const V2ConfigReadResponse__ConfigLayerSource = Schema.Union(
1362016220 }).annotate({ title: "LegacyManagedConfigTomlFromMdmConfigLayerSource" }),
1362116221 ],
1362216222 { mode: "oneOf" },
13623);
16223).annotate({ identifier: "V2ConfigReadResponse__ConfigLayerSource" });
1362416224
1362516225export type V2ConfigReadResponse__AppsDefaultConfig = {
1362616226 readonly approvals_reviewer?: V2ConfigReadResponse__ApprovalsReviewer | null;
......@@ -13639,31 +16239,7 @@ export const V2ConfigReadResponse__AppsDefaultConfig = Schema.Struct({
1363916239 destructive_enabled: Schema.optionalKey(Schema.Boolean.annotate({ default: true })),
1364016240 enabled: Schema.optionalKey(Schema.Boolean.annotate({ default: true })),
1364116241 open_world_enabled: Schema.optionalKey(Schema.Boolean.annotate({ default: true })),
13642});
13643
13644export type V2ConfigReadResponse__WebSearchToolConfig = {
13645 readonly allowed_domains?: ReadonlyArray<string> | null;
13646 readonly context_size?: V2ConfigReadResponse__WebSearchContextSize | null;
13647 readonly location?: V2ConfigReadResponse__WebSearchLocation | null;
13648};
13649export const V2ConfigReadResponse__WebSearchToolConfig = Schema.Struct({
13650 allowed_domains: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
13651 context_size: Schema.optionalKey(
13652 Schema.Union([V2ConfigReadResponse__WebSearchContextSize, Schema.Null]),
13653 ),
13654 location: Schema.optionalKey(
13655 Schema.Union([V2ConfigReadResponse__WebSearchLocation, Schema.Null]),
13656 ),
13657});
13658
13659export type V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup = {
13660 readonly hooks: ReadonlyArray<V2ConfigRequirementsReadResponse__ConfiguredHookHandler>;
13661 readonly matcher?: string | null;
13662};
13663export const V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup = Schema.Struct({
13664 hooks: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookHandler),
13665 matcher: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13666});
16242}).annotate({ identifier: "V2ConfigReadResponse__AppsDefaultConfig" });
1366716243
1366816244export type V2ConfigRequirementsReadResponse__NewThreadModelDefaults = {
1366916245 readonly model?: string | null;
......@@ -13676,7 +16252,16 @@ export const V2ConfigRequirementsReadResponse__NewThreadModelDefaults = Schema.S
1367616252 Schema.Union([V2ConfigRequirementsReadResponse__ReasoningEffort, Schema.Null]),
1367716253 ),
1367816254 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13679});
16255}).annotate({ identifier: "V2ConfigRequirementsReadResponse__NewThreadModelDefaults" });
16256
16257export type V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup = {
16258 readonly hooks: ReadonlyArray<V2ConfigRequirementsReadResponse__ConfiguredHookHandler>;
16259 readonly matcher?: string | null;
16260};
16261export const V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup = Schema.Struct({
16262 hooks: Schema.Array(V2ConfigRequirementsReadResponse__ConfiguredHookHandler),
16263 matcher: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16264}).annotate({ identifier: "V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup" });
1368016265
1368116266export type V2ConfigWarningNotification__TextRange = {
1368216267 readonly end: V2ConfigWarningNotification__TextPosition;
......@@ -13685,13 +16270,17 @@ export type V2ConfigWarningNotification__TextRange = {
1368516270export const V2ConfigWarningNotification__TextRange = Schema.Struct({
1368616271 end: V2ConfigWarningNotification__TextPosition,
1368716272 start: V2ConfigWarningNotification__TextPosition,
13688});
16273}).annotate({ identifier: "V2ConfigWarningNotification__TextRange" });
1368916274
1369016275export type V2ConfigWriteResponse__ConfigLayerSource =
1369116276 | { readonly domain: string; readonly key: string; readonly type: "mdm" }
13692 | { readonly file: string; readonly type: "system" }
16277 | { readonly file: V2ConfigWriteResponse__AbsolutePathBuf; readonly type: "system" }
1369316278 | { readonly id: string; readonly name: string; readonly type: "enterpriseManaged" }
13694 | { readonly file: string; readonly profile?: string | null; readonly type: "user" }
16279 | {
16280 readonly file: V2ConfigWriteResponse__AbsolutePathBuf;
16281 readonly profile?: string | null;
16282 readonly type: "user";
16283 }
1369516284 | { readonly dotCodexFolder: V2ConfigWriteResponse__AbsolutePathBuf; readonly type: "project" }
1369616285 | { readonly type: "sessionFlags" }
1369716286 | {
......@@ -13710,9 +16299,12 @@ export const V2ConfigWriteResponse__ConfigLayerSource = Schema.Union(
1371016299 description: "Managed preferences layer delivered by MDM (macOS only).",
1371116300 }),
1371216301 Schema.Struct({
13713 file: Schema.String.annotate({
16302 file: Schema.suspend(
16303 (): Schema.Codec<V2ConfigWriteResponse__AbsolutePathBuf> =>
16304 V2ConfigWriteResponse__AbsolutePathBuf,
16305 ).annotate({
1371416306 description:
13715 "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.",
16307 "This is the path to the system config.toml file, though it is not guaranteed to exist.",
1371616308 }),
1371716309 type: Schema.Literal("system").annotate({ title: "SystemConfigLayerSourceType" }),
1371816310 }).annotate({
......@@ -13733,9 +16325,12 @@ export const V2ConfigWriteResponse__ConfigLayerSource = Schema.Union(
1373316325 description: "Enterprise-managed config layer delivered by the cloud config bundle.",
1373416326 }),
1373516327 Schema.Struct({
13736 file: Schema.String.annotate({
16328 file: Schema.suspend(
16329 (): Schema.Codec<V2ConfigWriteResponse__AbsolutePathBuf> =>
16330 V2ConfigWriteResponse__AbsolutePathBuf,
16331 ).annotate({
1373716332 description:
13738 "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.",
16333 "This is the path to the user's config.toml file, though it is not guaranteed to exist.",
1373916334 }),
1374016335 profile: Schema.optionalKey(
1374116336 Schema.Union([
......@@ -13783,7 +16378,7 @@ export const V2ConfigWriteResponse__ConfigLayerSource = Schema.Union(
1378316378 }).annotate({ title: "LegacyManagedConfigTomlFromMdmConfigLayerSource" }),
1378416379 ],
1378516380 { mode: "oneOf" },
13786);
16381).annotate({ identifier: "V2ConfigWriteResponse__ConfigLayerSource" });
1378716382
1378816383export type V2ErrorNotification__CodexErrorInfo =
1378916384 | "contextWindowExceeded"
......@@ -13826,8 +16421,12 @@ export const V2ErrorNotification__CodexErrorInfo = Schema.Union(
1382616421 httpStatusCode: Schema.optionalKey(
1382716422 Schema.Union([
1382816423 Schema.Number.annotate({ format: "uint16" })
13829 .check(Schema.isInt())
13830 .check(Schema.isGreaterThanOrEqualTo(0)),
16424 .check(Schema.isInt().annotate({ expected: "an integer" }))
16425 .check(
16426 Schema.isGreaterThanOrEqualTo(0).annotate({
16427 expected: "a value greater than or equal to 0",
16428 }),
16429 ),
1383116430 Schema.Null,
1383216431 ]),
1383316432 ),
......@@ -13838,8 +16437,12 @@ export const V2ErrorNotification__CodexErrorInfo = Schema.Union(
1383816437 httpStatusCode: Schema.optionalKey(
1383916438 Schema.Union([
1384016439 Schema.Number.annotate({ format: "uint16" })
13841 .check(Schema.isInt())
13842 .check(Schema.isGreaterThanOrEqualTo(0)),
16440 .check(Schema.isInt().annotate({ expected: "an integer" }))
16441 .check(
16442 Schema.isGreaterThanOrEqualTo(0).annotate({
16443 expected: "a value greater than or equal to 0",
16444 }),
16445 ),
1384316446 Schema.Null,
1384416447 ]),
1384516448 ),
......@@ -13853,8 +16456,12 @@ export const V2ErrorNotification__CodexErrorInfo = Schema.Union(
1385316456 httpStatusCode: Schema.optionalKey(
1385416457 Schema.Union([
1385516458 Schema.Number.annotate({ format: "uint16" })
13856 .check(Schema.isInt())
13857 .check(Schema.isGreaterThanOrEqualTo(0)),
16459 .check(Schema.isInt().annotate({ expected: "an integer" }))
16460 .check(
16461 Schema.isGreaterThanOrEqualTo(0).annotate({
16462 expected: "a value greater than or equal to 0",
16463 }),
16464 ),
1385816465 Schema.Null,
1385916466 ]),
1386016467 ),
......@@ -13869,8 +16476,12 @@ export const V2ErrorNotification__CodexErrorInfo = Schema.Union(
1386916476 httpStatusCode: Schema.optionalKey(
1387016477 Schema.Union([
1387116478 Schema.Number.annotate({ format: "uint16" })
13872 .check(Schema.isInt())
13873 .check(Schema.isGreaterThanOrEqualTo(0)),
16479 .check(Schema.isInt().annotate({ expected: "an integer" }))
16480 .check(
16481 Schema.isGreaterThanOrEqualTo(0).annotate({
16482 expected: "a value greater than or equal to 0",
16483 }),
16484 ),
1387416485 Schema.Null,
1387516486 ]),
1387616487 ),
......@@ -13893,8 +16504,61 @@ export const V2ErrorNotification__CodexErrorInfo = Schema.Union(
1389316504).annotate({
1389416505 description:
1389516506 "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.",
16507 identifier: "V2ErrorNotification__CodexErrorInfo",
1389616508});
1389716509
16510export type V2ExperimentalFeatureListResponse__ExperimentalFeature = {
16511 readonly announcement?: string | null;
16512 readonly defaultEnabled: boolean;
16513 readonly description?: string | null;
16514 readonly displayName?: string | null;
16515 readonly enabled: boolean;
16516 readonly name: string;
16517 readonly stage: V2ExperimentalFeatureListResponse__ExperimentalFeatureStage;
16518};
16519export const V2ExperimentalFeatureListResponse__ExperimentalFeature = Schema.Struct({
16520 announcement: Schema.optionalKey(
16521 Schema.Union([
16522 Schema.String.annotate({
16523 description:
16524 "Announcement copy shown to users when the feature is introduced. Null when this feature is not in beta.",
16525 }),
16526 Schema.Null,
16527 ]),
16528 ),
16529 defaultEnabled: Schema.Boolean.annotate({
16530 description: "Whether this feature is enabled by default.",
16531 }),
16532 description: Schema.optionalKey(
16533 Schema.Union([
16534 Schema.String.annotate({
16535 description:
16536 "Short summary describing what the feature does. Null when this feature is not in beta.",
16537 }),
16538 Schema.Null,
16539 ]),
16540 ),
16541 displayName: Schema.optionalKey(
16542 Schema.Union([
16543 Schema.String.annotate({
16544 description:
16545 "User-facing display name shown in the experimental features UI. Null when this feature is not in beta.",
16546 }),
16547 Schema.Null,
16548 ]),
16549 ),
16550 enabled: Schema.Boolean.annotate({
16551 description: "Whether this feature is currently enabled in the loaded config.",
16552 }),
16553 name: Schema.String.annotate({
16554 description: "Stable key used in config.toml and CLI flag toggles.",
16555 }),
16556 stage: Schema.suspend(
16557 (): Schema.Codec<V2ExperimentalFeatureListResponse__ExperimentalFeatureStage> =>
16558 V2ExperimentalFeatureListResponse__ExperimentalFeatureStage,
16559 ).annotate({ description: "Lifecycle stage of this feature flag." }),
16560}).annotate({ identifier: "V2ExperimentalFeatureListResponse__ExperimentalFeature" });
16561
1389816562export type V2ExternalAgentConfigDetectResponse__MigrationDetails = {
1389916563 readonly commands?: ReadonlyArray<V2ExternalAgentConfigDetectResponse__CommandMigration>;
1390016564 readonly hooks?: ReadonlyArray<V2ExternalAgentConfigDetectResponse__HookMigration>;
......@@ -13928,7 +16592,7 @@ export const V2ExternalAgentConfigDetectResponse__MigrationDetails = Schema.Stru
1392816592 subagents: Schema.optionalKey(
1392916593 Schema.Array(V2ExternalAgentConfigDetectResponse__SubagentMigration).annotate({ default: [] }),
1393016594 ),
13931});
16595}).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__MigrationDetails" });
1393216596
1393316597export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeFailure =
1393416598 {
......@@ -13950,6 +16614,9 @@ export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConf
1395016614 message: Schema.String,
1395116615 source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1395216616 subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16617 }).annotate({
16618 identifier:
16619 "V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeFailure",
1395316620 });
1395416621
1395516622export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeSuccess =
......@@ -13966,6 +16633,31 @@ export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConf
1396616633 V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigMigrationItemType,
1396716634 source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1396816635 target: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16636 }).annotate({
16637 identifier:
16638 "V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeSuccess",
16639 });
16640
16641export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorCandidate =
16642 {
16643 readonly name: string;
16644 readonly sessionCount: number;
16645 readonly source: V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource;
16646 };
16647export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorCandidate =
16648 Schema.Struct({
16649 name: Schema.String,
16650 sessionCount: Schema.Number.annotate({ format: "uint32" })
16651 .check(Schema.isInt().annotate({ expected: "an integer" }))
16652 .check(
16653 Schema.isGreaterThanOrEqualTo(0).annotate({
16654 expected: "a value greater than or equal to 0",
16655 }),
16656 ),
16657 source: V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource,
16658 }).annotate({
16659 identifier:
16660 "V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorCandidate",
1396916661 });
1397016662
1397116663export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeFailure =
......@@ -13988,6 +16680,9 @@ export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConf
1398816680 message: Schema.String,
1398916681 source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1399016682 subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16683 }).annotate({
16684 identifier:
16685 "V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeFailure",
1399116686 });
1399216687
1399316688export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeSuccess =
......@@ -14004,21 +16699,9 @@ export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConf
1400416699 V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType,
1400516700 source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1400616701 target: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14007 });
14008
14009export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorCandidate =
14010 {
14011 readonly name: string;
14012 readonly sessionCount: number;
14013 readonly source: V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource;
14014 };
14015export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorCandidate =
14016 Schema.Struct({
14017 name: Schema.String,
14018 sessionCount: Schema.Number.annotate({ format: "uint32" })
14019 .check(Schema.isInt())
14020 .check(Schema.isGreaterThanOrEqualTo(0)),
14021 source: V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentImportedConnectorSource,
16702 }).annotate({
16703 identifier:
16704 "V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeSuccess",
1402216705 });
1402316706
1402416707export type V2ExternalAgentConfigImportParams__MigrationDetails = {
......@@ -14054,7 +16737,7 @@ export const V2ExternalAgentConfigImportParams__MigrationDetails = Schema.Struct
1405416737 subagents: Schema.optionalKey(
1405516738 Schema.Array(V2ExternalAgentConfigImportParams__SubagentMigration).annotate({ default: [] }),
1405616739 ),
14057});
16740}).annotate({ identifier: "V2ExternalAgentConfigImportParams__MigrationDetails" });
1405816741
1405916742export type V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeFailure =
1406016743 {
......@@ -14075,6 +16758,9 @@ export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfi
1407516758 message: Schema.String,
1407616759 source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1407716760 subErrorType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16761 }).annotate({
16762 identifier:
16763 "V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeFailure",
1407816764 });
1407916765
1408016766export type V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeSuccess =
......@@ -14090,6 +16776,9 @@ export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfi
1409016776 itemType: V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigMigrationItemType,
1409116777 source: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1409216778 target: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16779 }).annotate({
16780 identifier:
16781 "V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeSuccess",
1409316782 });
1409416783
1409516784export type V2FileChangePatchUpdatedNotification__FileUpdateChange = {
......@@ -14101,7 +16790,7 @@ export const V2FileChangePatchUpdatedNotification__FileUpdateChange = Schema.Str
1410116790 diff: Schema.String,
1410216791 kind: V2FileChangePatchUpdatedNotification__PatchChangeKind,
1410316792 path: Schema.String,
14104});
16793}).annotate({ identifier: "V2FileChangePatchUpdatedNotification__FileUpdateChange" });
1410516794
1410616795export type V2GetAccountRateLimitsResponse__RateLimitResetCredit = {
1410716796 readonly description?: string | null;
......@@ -14128,14 +16817,14 @@ export const V2GetAccountRateLimitsResponse__RateLimitResetCredit = Schema.Struc
1412816817 description:
1412916818 "Unix timestamp in seconds when the credit expires, or `null` if it does not expire.",
1413016819 format: "int64",
14131 }).check(Schema.isInt()),
16820 }).check(Schema.isInt().annotate({ expected: "an integer" })),
1413216821 Schema.Null,
1413316822 ]),
1413416823 ),
1413516824 grantedAt: Schema.Number.annotate({
1413616825 description: "Unix timestamp in seconds when the credit was granted.",
1413716826 format: "int64",
14138 }).check(Schema.isInt()),
16827 }).check(Schema.isInt().annotate({ expected: "an integer" })),
1413916828 id: Schema.String.annotate({ description: "Opaque backend identifier for this reset credit." }),
1414016829 resetType: V2GetAccountRateLimitsResponse__RateLimitResetType,
1414116830 status: V2GetAccountRateLimitsResponse__RateLimitResetCreditStatus,
......@@ -14147,7 +16836,7 @@ export const V2GetAccountRateLimitsResponse__RateLimitResetCredit = Schema.Struc
1414716836 Schema.Null,
1414816837 ]),
1414916838 ),
14150});
16839}).annotate({ identifier: "V2GetAccountRateLimitsResponse__RateLimitResetCredit" });
1415116840
1415216841export type V2GetAccountRateLimitsResponse__RateLimitSnapshot = {
1415316842 readonly credits?: V2GetAccountRateLimitsResponse__CreditsSnapshot | null;
......@@ -14190,7 +16879,7 @@ export const V2GetAccountRateLimitsResponse__RateLimitSnapshot = Schema.Struct({
1419016879 Schema.Null,
1419116880 ]),
1419216881 ),
14193});
16882}).annotate({ identifier: "V2GetAccountRateLimitsResponse__RateLimitSnapshot" });
1419416883
1419516884export type V2GetAccountResponse__Account =
1419616885 | { readonly type: "apiKey" }
......@@ -14216,7 +16905,7 @@ export const V2GetAccountResponse__Account = Schema.Union(
1421616905 }).annotate({ title: "AmazonBedrockAccount" }),
1421716906 ],
1421816907 { mode: "oneOf" },
14219);
16908).annotate({ identifier: "V2GetAccountResponse__Account" });
1422016909
1422116910export type V2GetWorkspaceMessagesResponse__WorkspaceMessage = {
1422216911 readonly archivedAt?: number | null;
......@@ -14231,7 +16920,7 @@ export const V2GetWorkspaceMessagesResponse__WorkspaceMessage = Schema.Struct({
1423116920 Schema.Number.annotate({
1423216921 description: "Unix timestamp (in seconds) when the message was archived.",
1423316922 format: "int64",
14234 }).check(Schema.isInt()),
16923 }).check(Schema.isInt().annotate({ expected: "an integer" })),
1423516924 Schema.Null,
1423616925 ]),
1423716926 ),
......@@ -14240,14 +16929,14 @@ export const V2GetWorkspaceMessagesResponse__WorkspaceMessage = Schema.Struct({
1424016929 Schema.Number.annotate({
1424116930 description: "Unix timestamp (in seconds) when the message was created.",
1424216931 format: "int64",
14243 }).check(Schema.isInt()),
16932 }).check(Schema.isInt().annotate({ expected: "an integer" })),
1424416933 Schema.Null,
1424516934 ]),
1424616935 ),
1424716936 messageBody: Schema.String,
1424816937 messageId: Schema.String,
1424916938 messageType: V2GetWorkspaceMessagesResponse__WorkspaceMessageType,
14250});
16939}).annotate({ identifier: "V2GetWorkspaceMessagesResponse__WorkspaceMessage" });
1425116940
1425216941export type V2HookCompletedNotification__HookOutputEntry = {
1425316942 readonly kind: V2HookCompletedNotification__HookOutputEntryKind;
......@@ -14256,7 +16945,7 @@ export type V2HookCompletedNotification__HookOutputEntry = {
1425616945export const V2HookCompletedNotification__HookOutputEntry = Schema.Struct({
1425716946 kind: V2HookCompletedNotification__HookOutputEntryKind,
1425816947 text: Schema.String,
14259});
16948}).annotate({ identifier: "V2HookCompletedNotification__HookOutputEntry" });
1426016949
1426116950export type V2HooksListResponse__HookMetadata = {
1426216951 readonly command?: string | null;
......@@ -14278,7 +16967,9 @@ export type V2HooksListResponse__HookMetadata = {
1427816967export const V2HooksListResponse__HookMetadata = Schema.Struct({
1427916968 command: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1428016969 currentHash: Schema.String,
14281 displayOrder: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
16970 displayOrder: Schema.Number.annotate({ format: "int64" }).check(
16971 Schema.isInt().annotate({ expected: "an integer" }),
16972 ),
1428216973 enabled: Schema.Boolean,
1428316974 eventName: V2HooksListResponse__HookEventName,
1428416975 handlerType: V2HooksListResponse__HookHandlerType,
......@@ -14290,10 +16981,12 @@ export const V2HooksListResponse__HookMetadata = Schema.Struct({
1429016981 sourcePath: V2HooksListResponse__AbsolutePathBuf,
1429116982 statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1429216983 timeoutSec: Schema.Number.annotate({ format: "uint64" })
14293 .check(Schema.isInt())
14294 .check(Schema.isGreaterThanOrEqualTo(0)),
16984 .check(Schema.isInt().annotate({ expected: "an integer" }))
16985 .check(
16986 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
16987 ),
1429516988 trustStatus: V2HooksListResponse__HookTrustStatus,
14296});
16989}).annotate({ identifier: "V2HooksListResponse__HookMetadata" });
1429716990
1429816991export type V2HookStartedNotification__HookOutputEntry = {
1429916992 readonly kind: V2HookStartedNotification__HookOutputEntryKind;
......@@ -14302,7 +16995,35 @@ export type V2HookStartedNotification__HookOutputEntry = {
1430216995export const V2HookStartedNotification__HookOutputEntry = Schema.Struct({
1430316996 kind: V2HookStartedNotification__HookOutputEntryKind,
1430416997 text: Schema.String,
14305});
16998}).annotate({ identifier: "V2HookStartedNotification__HookOutputEntry" });
16999
17000export type V2ItemCompletedNotification__TextElement = {
17001 readonly byteRange: V2ItemCompletedNotification__ByteRange;
17002 readonly placeholder?: string | null;
17003};
17004export const V2ItemCompletedNotification__TextElement = Schema.Struct({
17005 byteRange: Schema.suspend(
17006 (): Schema.Codec<V2ItemCompletedNotification__ByteRange> =>
17007 V2ItemCompletedNotification__ByteRange,
17008 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
17009 placeholder: Schema.optionalKey(
17010 Schema.Union([
17011 Schema.String.annotate({
17012 description: "Optional human-readable placeholder for the element, displayed in the UI.",
17013 }),
17014 Schema.Null,
17015 ]),
17016 ),
17017}).annotate({ identifier: "V2ItemCompletedNotification__TextElement" });
17018
17019export type V2ItemCompletedNotification__MemoryCitation = {
17020 readonly entries: ReadonlyArray<V2ItemCompletedNotification__MemoryCitationEntry>;
17021 readonly threadIds: ReadonlyArray<string>;
17022};
17023export const V2ItemCompletedNotification__MemoryCitation = Schema.Struct({
17024 entries: Schema.Array(V2ItemCompletedNotification__MemoryCitationEntry),
17025 threadIds: Schema.Array(Schema.String),
17026}).annotate({ identifier: "V2ItemCompletedNotification__MemoryCitation" });
1430617027
1430717028export type V2ItemCompletedNotification__CommandAction =
1430817029 | {
......@@ -14344,25 +17065,7 @@ export const V2ItemCompletedNotification__CommandAction = Schema.Union(
1434417065 }).annotate({ title: "UnknownCommandAction" }),
1434517066 ],
1434617067 { mode: "oneOf" },
14347);
14348
14349export type V2ItemCompletedNotification__CollabAgentState = {
14350 readonly message?: string | null;
14351 readonly status: V2ItemCompletedNotification__CollabAgentStatus;
14352};
14353export const V2ItemCompletedNotification__CollabAgentState = Schema.Struct({
14354 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14355 status: V2ItemCompletedNotification__CollabAgentStatus,
14356});
14357
14358export type V2ItemCompletedNotification__MemoryCitation = {
14359 readonly entries: ReadonlyArray<V2ItemCompletedNotification__MemoryCitationEntry>;
14360 readonly threadIds: ReadonlyArray<string>;
14361};
14362export const V2ItemCompletedNotification__MemoryCitation = Schema.Struct({
14363 entries: Schema.Array(V2ItemCompletedNotification__MemoryCitationEntry),
14364 threadIds: Schema.Array(Schema.String),
14365});
17068).annotate({ identifier: "V2ItemCompletedNotification__CommandAction" });
1436617069
1436717070export type V2ItemCompletedNotification__FileUpdateChange = {
1436817071 readonly diff: string;
......@@ -14373,102 +17076,16 @@ export const V2ItemCompletedNotification__FileUpdateChange = Schema.Struct({
1437317076 diff: Schema.String,
1437417077 kind: V2ItemCompletedNotification__PatchChangeKind,
1437517078 path: Schema.String,
14376});
14377
14378export type V2ItemCompletedNotification__UserInput =
14379 | {
14380 readonly text: string;
14381 readonly text_elements?: ReadonlyArray<V2ItemCompletedNotification__TextElement>;
14382 readonly type: "text";
14383 }
14384 | {
14385 readonly detail?: V2ItemCompletedNotification__ImageDetail | null;
14386 readonly type: "image";
14387 readonly url: string;
14388 }
14389 | {
14390 readonly detail?: V2ItemCompletedNotification__ImageDetail | null;
14391 readonly path: string;
14392 readonly type: "localImage";
14393 }
14394 | { readonly type: "audio"; readonly url: string }
14395 | { readonly path: string; readonly type: "localAudio" }
14396 | { readonly name: string; readonly path: string; readonly type: "skill" }
14397 | { readonly name: string; readonly path: string; readonly type: "mention" };
14398export const V2ItemCompletedNotification__UserInput = Schema.Union(
14399 [
14400 Schema.Struct({
14401 text: Schema.String,
14402 text_elements: Schema.optionalKey(
14403 Schema.Array(V2ItemCompletedNotification__TextElement).annotate({
14404 description: "UI-defined spans within `text` used to render or persist special elements.",
14405 default: [],
14406 }),
14407 ),
14408 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
14409 }).annotate({ title: "TextUserInput" }),
14410 Schema.Struct({
14411 detail: Schema.optionalKey(
14412 Schema.Union([V2ItemCompletedNotification__ImageDetail, Schema.Null]),
14413 ),
14414 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
14415 url: Schema.String,
14416 }).annotate({ title: "ImageUserInput" }),
14417 Schema.Struct({
14418 detail: Schema.optionalKey(
14419 Schema.Union([V2ItemCompletedNotification__ImageDetail, Schema.Null]),
14420 ),
14421 path: Schema.String,
14422 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
14423 }).annotate({ title: "LocalImageUserInput" }),
14424 Schema.Struct({
14425 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
14426 url: Schema.String,
14427 }).annotate({ title: "AudioUserInput" }),
14428 Schema.Struct({
14429 path: Schema.String,
14430 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
14431 }).annotate({ title: "LocalAudioUserInput" }),
14432 Schema.Struct({
14433 name: Schema.String,
14434 path: Schema.String,
14435 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
14436 }).annotate({ title: "SkillUserInput" }),
14437 Schema.Struct({
14438 name: Schema.String,
14439 path: Schema.String,
14440 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
14441 }).annotate({ title: "MentionUserInput" }),
14442 ],
14443 { mode: "oneOf" },
14444);
17079}).annotate({ identifier: "V2ItemCompletedNotification__FileUpdateChange" });
1444517080
14446export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReview = {
14447 readonly rationale?: string | null;
14448 readonly riskLevel?: V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel | null;
14449 readonly status: V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus;
14450 readonly userAuthorization?: V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization | null;
17081export type V2ItemCompletedNotification__CollabAgentState = {
17082 readonly message?: string | null;
17083 readonly status: V2ItemCompletedNotification__CollabAgentStatus;
1445117084};
14452export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReview =
14453 Schema.Struct({
14454 rationale: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14455 riskLevel: Schema.optionalKey(
14456 Schema.Union([
14457 V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel,
14458 Schema.Null,
14459 ]),
14460 ),
14461 status: V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus,
14462 userAuthorization: Schema.optionalKey(
14463 Schema.Union([
14464 V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization,
14465 Schema.Null,
14466 ]),
14467 ),
14468 }).annotate({
14469 description:
14470 "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.",
14471 });
17085export const V2ItemCompletedNotification__CollabAgentState = Schema.Struct({
17086 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17087 status: V2ItemCompletedNotification__CollabAgentStatus,
17088}).annotate({ identifier: "V2ItemCompletedNotification__CollabAgentState" });
1447217089
1447317090export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath =
1447417091 | { readonly kind: "root" }
......@@ -14520,33 +17137,36 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecia
1452017137 }),
1452117138 ],
1452217139 { mode: "oneOf" },
14523 );
17140 ).annotate({
17141 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath",
17142 });
1452417143
14525export type V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReview = {
17144export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReview = {
1452617145 readonly rationale?: string | null;
14527 readonly riskLevel?: V2ItemGuardianApprovalReviewStartedNotification__GuardianRiskLevel | null;
14528 readonly status: V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus;
14529 readonly userAuthorization?: V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthorization | null;
17146 readonly riskLevel?: V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel | null;
17147 readonly status: V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus;
17148 readonly userAuthorization?: V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization | null;
1453017149};
14531export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReview =
17150export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReview =
1453217151 Schema.Struct({
1453317152 rationale: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1453417153 riskLevel: Schema.optionalKey(
1453517154 Schema.Union([
14536 V2ItemGuardianApprovalReviewStartedNotification__GuardianRiskLevel,
17155 V2ItemGuardianApprovalReviewCompletedNotification__GuardianRiskLevel,
1453717156 Schema.Null,
1453817157 ]),
1453917158 ),
14540 status: V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus,
17159 status: V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewStatus,
1454117160 userAuthorization: Schema.optionalKey(
1454217161 Schema.Union([
14543 V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthorization,
17162 V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization,
1454417163 Schema.Null,
1454517164 ]),
1454617165 ),
1454717166 }).annotate({
1454817167 description:
1454917168 "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.",
17169 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReview",
1455017170 });
1455117171
1455217172export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath =
......@@ -14598,7 +17218,64 @@ export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialP
1459817218 }),
1459917219 ],
1460017220 { mode: "oneOf" },
14601);
17221).annotate({
17222 identifier: "V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath",
17223});
17224
17225export type V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReview = {
17226 readonly rationale?: string | null;
17227 readonly riskLevel?: V2ItemGuardianApprovalReviewStartedNotification__GuardianRiskLevel | null;
17228 readonly status: V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus;
17229 readonly userAuthorization?: V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthorization | null;
17230};
17231export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReview =
17232 Schema.Struct({
17233 rationale: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17234 riskLevel: Schema.optionalKey(
17235 Schema.Union([
17236 V2ItemGuardianApprovalReviewStartedNotification__GuardianRiskLevel,
17237 Schema.Null,
17238 ]),
17239 ),
17240 status: V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewStatus,
17241 userAuthorization: Schema.optionalKey(
17242 Schema.Union([
17243 V2ItemGuardianApprovalReviewStartedNotification__GuardianUserAuthorization,
17244 Schema.Null,
17245 ]),
17246 ),
17247 }).annotate({
17248 description:
17249 "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.",
17250 identifier: "V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReview",
17251 });
17252
17253export type V2ItemStartedNotification__TextElement = {
17254 readonly byteRange: V2ItemStartedNotification__ByteRange;
17255 readonly placeholder?: string | null;
17256};
17257export const V2ItemStartedNotification__TextElement = Schema.Struct({
17258 byteRange: Schema.suspend(
17259 (): Schema.Codec<V2ItemStartedNotification__ByteRange> => V2ItemStartedNotification__ByteRange,
17260 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
17261 placeholder: Schema.optionalKey(
17262 Schema.Union([
17263 Schema.String.annotate({
17264 description: "Optional human-readable placeholder for the element, displayed in the UI.",
17265 }),
17266 Schema.Null,
17267 ]),
17268 ),
17269}).annotate({ identifier: "V2ItemStartedNotification__TextElement" });
17270
17271export type V2ItemStartedNotification__MemoryCitation = {
17272 readonly entries: ReadonlyArray<V2ItemStartedNotification__MemoryCitationEntry>;
17273 readonly threadIds: ReadonlyArray<string>;
17274};
17275export const V2ItemStartedNotification__MemoryCitation = Schema.Struct({
17276 entries: Schema.Array(V2ItemStartedNotification__MemoryCitationEntry),
17277 threadIds: Schema.Array(Schema.String),
17278}).annotate({ identifier: "V2ItemStartedNotification__MemoryCitation" });
1460217279
1460317280export type V2ItemStartedNotification__CommandAction =
1460417281 | {
......@@ -14640,25 +17317,7 @@ export const V2ItemStartedNotification__CommandAction = Schema.Union(
1464017317 }).annotate({ title: "UnknownCommandAction" }),
1464117318 ],
1464217319 { mode: "oneOf" },
14643);
14644
14645export type V2ItemStartedNotification__CollabAgentState = {
14646 readonly message?: string | null;
14647 readonly status: V2ItemStartedNotification__CollabAgentStatus;
14648};
14649export const V2ItemStartedNotification__CollabAgentState = Schema.Struct({
14650 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14651 status: V2ItemStartedNotification__CollabAgentStatus,
14652});
14653
14654export type V2ItemStartedNotification__MemoryCitation = {
14655 readonly entries: ReadonlyArray<V2ItemStartedNotification__MemoryCitationEntry>;
14656 readonly threadIds: ReadonlyArray<string>;
14657};
14658export const V2ItemStartedNotification__MemoryCitation = Schema.Struct({
14659 entries: Schema.Array(V2ItemStartedNotification__MemoryCitationEntry),
14660 threadIds: Schema.Array(Schema.String),
14661});
17320).annotate({ identifier: "V2ItemStartedNotification__CommandAction" });
1466217321
1466317322export type V2ItemStartedNotification__FileUpdateChange = {
1466417323 readonly diff: string;
......@@ -14669,75 +17328,16 @@ export const V2ItemStartedNotification__FileUpdateChange = Schema.Struct({
1466917328 diff: Schema.String,
1467017329 kind: V2ItemStartedNotification__PatchChangeKind,
1467117330 path: Schema.String,
14672});
17331}).annotate({ identifier: "V2ItemStartedNotification__FileUpdateChange" });
1467317332
14674export type V2ItemStartedNotification__UserInput =
14675 | {
14676 readonly text: string;
14677 readonly text_elements?: ReadonlyArray<V2ItemStartedNotification__TextElement>;
14678 readonly type: "text";
14679 }
14680 | {
14681 readonly detail?: V2ItemStartedNotification__ImageDetail | null;
14682 readonly type: "image";
14683 readonly url: string;
14684 }
14685 | {
14686 readonly detail?: V2ItemStartedNotification__ImageDetail | null;
14687 readonly path: string;
14688 readonly type: "localImage";
14689 }
14690 | { readonly type: "audio"; readonly url: string }
14691 | { readonly path: string; readonly type: "localAudio" }
14692 | { readonly name: string; readonly path: string; readonly type: "skill" }
14693 | { readonly name: string; readonly path: string; readonly type: "mention" };
14694export const V2ItemStartedNotification__UserInput = Schema.Union(
14695 [
14696 Schema.Struct({
14697 text: Schema.String,
14698 text_elements: Schema.optionalKey(
14699 Schema.Array(V2ItemStartedNotification__TextElement).annotate({
14700 description: "UI-defined spans within `text` used to render or persist special elements.",
14701 default: [],
14702 }),
14703 ),
14704 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
14705 }).annotate({ title: "TextUserInput" }),
14706 Schema.Struct({
14707 detail: Schema.optionalKey(
14708 Schema.Union([V2ItemStartedNotification__ImageDetail, Schema.Null]),
14709 ),
14710 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
14711 url: Schema.String,
14712 }).annotate({ title: "ImageUserInput" }),
14713 Schema.Struct({
14714 detail: Schema.optionalKey(
14715 Schema.Union([V2ItemStartedNotification__ImageDetail, Schema.Null]),
14716 ),
14717 path: Schema.String,
14718 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
14719 }).annotate({ title: "LocalImageUserInput" }),
14720 Schema.Struct({
14721 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
14722 url: Schema.String,
14723 }).annotate({ title: "AudioUserInput" }),
14724 Schema.Struct({
14725 path: Schema.String,
14726 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
14727 }).annotate({ title: "LocalAudioUserInput" }),
14728 Schema.Struct({
14729 name: Schema.String,
14730 path: Schema.String,
14731 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
14732 }).annotate({ title: "SkillUserInput" }),
14733 Schema.Struct({
14734 name: Schema.String,
14735 path: Schema.String,
14736 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
14737 }).annotate({ title: "MentionUserInput" }),
14738 ],
14739 { mode: "oneOf" },
14740);
17333export type V2ItemStartedNotification__CollabAgentState = {
17334 readonly message?: string | null;
17335 readonly status: V2ItemStartedNotification__CollabAgentStatus;
17336};
17337export const V2ItemStartedNotification__CollabAgentState = Schema.Struct({
17338 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17339 status: V2ItemStartedNotification__CollabAgentStatus,
17340}).annotate({ identifier: "V2ItemStartedNotification__CollabAgentState" });
1474117341
1474217342export type V2ListMcpServerStatusResponse__McpServerStatus = {
1474317343 readonly authStatus: V2ListMcpServerStatusResponse__McpAuthStatus;
......@@ -14756,7 +17356,7 @@ export const V2ListMcpServerStatusResponse__McpServerStatus = Schema.Struct({
1475617356 Schema.Union([V2ListMcpServerStatusResponse__McpServerInfo, Schema.Null]),
1475717357 ),
1475817358 tools: Schema.Record(Schema.String, V2ListMcpServerStatusResponse__Tool),
14759});
17359}).annotate({ identifier: "V2ListMcpServerStatusResponse__McpServerStatus" });
1476017360
1476117361export type V2ModelListResponse__ReasoningEffortOption = {
1476217362 readonly description: string;
......@@ -14765,7 +17365,7 @@ export type V2ModelListResponse__ReasoningEffortOption = {
1476517365export const V2ModelListResponse__ReasoningEffortOption = Schema.Struct({
1476617366 description: Schema.String,
1476717367 reasoningEffort: V2ModelListResponse__ReasoningEffort,
14768});
17368}).annotate({ identifier: "V2ModelListResponse__ReasoningEffortOption" });
1476917369
1477017370export type V2PluginInstalledResponse__MarketplaceLoadErrorInfo = {
1477117371 readonly marketplacePath: V2PluginInstalledResponse__AbsolutePathBuf;
......@@ -14774,7 +17374,7 @@ export type V2PluginInstalledResponse__MarketplaceLoadErrorInfo = {
1477417374export const V2PluginInstalledResponse__MarketplaceLoadErrorInfo = Schema.Struct({
1477517375 marketplacePath: V2PluginInstalledResponse__AbsolutePathBuf,
1477617376 message: Schema.String,
14777});
17377}).annotate({ identifier: "V2PluginInstalledResponse__MarketplaceLoadErrorInfo" });
1477817378
1477917379export type V2PluginInstalledResponse__PluginInterface = {
1478017380 readonly brandColor?: string | null;
......@@ -14856,7 +17456,7 @@ export const V2PluginInstalledResponse__PluginInterface = Schema.Struct({
1485617456 shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1485717457 termsOfServiceUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1485817458 websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14859});
17459}).annotate({ identifier: "V2PluginInstalledResponse__PluginInterface" });
1486017460
1486117461export type V2PluginInstalledResponse__PluginSource =
1486217462 | { readonly path: V2PluginInstalledResponse__AbsolutePathBuf; readonly type: "local" }
......@@ -14915,7 +17515,7 @@ export const V2PluginInstalledResponse__PluginSource = Schema.Union(
1491517515 }),
1491617516 ],
1491717517 { mode: "oneOf" },
14918);
17518).annotate({ identifier: "V2PluginInstalledResponse__PluginSource" });
1491917519
1492017520export type V2PluginInstalledResponse__PluginSharePrincipal = {
1492117521 readonly name: string;
......@@ -14928,7 +17528,7 @@ export const V2PluginInstalledResponse__PluginSharePrincipal = Schema.Struct({
1492817528 principalId: Schema.String,
1492917529 principalType: V2PluginInstalledResponse__PluginSharePrincipalType,
1493017530 role: V2PluginInstalledResponse__PluginSharePrincipalRole,
14931});
17531}).annotate({ identifier: "V2PluginInstalledResponse__PluginSharePrincipal" });
1493217532
1493317533export type V2PluginListResponse__MarketplaceLoadErrorInfo = {
1493417534 readonly marketplacePath: V2PluginListResponse__AbsolutePathBuf;
......@@ -14937,7 +17537,7 @@ export type V2PluginListResponse__MarketplaceLoadErrorInfo = {
1493717537export const V2PluginListResponse__MarketplaceLoadErrorInfo = Schema.Struct({
1493817538 marketplacePath: V2PluginListResponse__AbsolutePathBuf,
1493917539 message: Schema.String,
14940});
17540}).annotate({ identifier: "V2PluginListResponse__MarketplaceLoadErrorInfo" });
1494117541
1494217542export type V2PluginListResponse__PluginInterface = {
1494317543 readonly brandColor?: string | null;
......@@ -15019,7 +17619,7 @@ export const V2PluginListResponse__PluginInterface = Schema.Struct({
1501917619 shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1502017620 termsOfServiceUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1502117621 websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15022});
17622}).annotate({ identifier: "V2PluginListResponse__PluginInterface" });
1502317623
1502417624export type V2PluginListResponse__PluginSource =
1502517625 | { readonly path: V2PluginListResponse__AbsolutePathBuf; readonly type: "local" }
......@@ -15078,7 +17678,7 @@ export const V2PluginListResponse__PluginSource = Schema.Union(
1507817678 }),
1507917679 ],
1508017680 { mode: "oneOf" },
15081);
17681).annotate({ identifier: "V2PluginListResponse__PluginSource" });
1508217682
1508317683export type V2PluginListResponse__PluginSharePrincipal = {
1508417684 readonly name: string;
......@@ -15091,7 +17691,58 @@ export const V2PluginListResponse__PluginSharePrincipal = Schema.Struct({
1509117691 principalId: Schema.String,
1509217692 principalType: V2PluginListResponse__PluginSharePrincipalType,
1509317693 role: V2PluginListResponse__PluginSharePrincipalRole,
15094});
17694}).annotate({ identifier: "V2PluginListResponse__PluginSharePrincipal" });
17695
17696export type V2PluginReadResponse__AppTemplateSummary = {
17697 readonly canonicalConnectorId?: string | null;
17698 readonly category?: string | null;
17699 readonly description?: string | null;
17700 readonly logoUrl?: string | null;
17701 readonly logoUrlDark?: string | null;
17702 readonly materializedAppIds: ReadonlyArray<string>;
17703 readonly name: string;
17704 readonly reason?: V2PluginReadResponse__AppTemplateUnavailableReason | null;
17705 readonly templateId: string;
17706};
17707export const V2PluginReadResponse__AppTemplateSummary = Schema.Struct({
17708 canonicalConnectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17709 category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17710 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17711 logoUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17712 logoUrlDark: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17713 materializedAppIds: Schema.Array(Schema.String),
17714 name: Schema.String,
17715 reason: Schema.optionalKey(
17716 Schema.Union([V2PluginReadResponse__AppTemplateUnavailableReason, Schema.Null]),
17717 ),
17718 templateId: Schema.String,
17719}).annotate({ identifier: "V2PluginReadResponse__AppTemplateSummary" });
17720
17721export type V2PluginReadResponse__PluginHookSummary = {
17722 readonly eventName: V2PluginReadResponse__HookEventName;
17723 readonly key: string;
17724};
17725export const V2PluginReadResponse__PluginHookSummary = Schema.Struct({
17726 eventName: V2PluginReadResponse__HookEventName,
17727 key: Schema.String,
17728}).annotate({ identifier: "V2PluginReadResponse__PluginHookSummary" });
17729
17730export type V2PluginReadResponse__SkillInterface = {
17731 readonly brandColor?: string | null;
17732 readonly defaultPrompt?: string | null;
17733 readonly displayName?: string | null;
17734 readonly iconLarge?: V2PluginReadResponse__AbsolutePathBuf | null;
17735 readonly iconSmall?: V2PluginReadResponse__AbsolutePathBuf | null;
17736 readonly shortDescription?: string | null;
17737};
17738export const V2PluginReadResponse__SkillInterface = Schema.Struct({
17739 brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17740 defaultPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17741 displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17742 iconLarge: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])),
17743 iconSmall: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])),
17744 shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17745}).annotate({ identifier: "V2PluginReadResponse__SkillInterface" });
1509517746
1509617747export type V2PluginReadResponse__PluginInterface = {
1509717748 readonly brandColor?: string | null;
......@@ -15173,7 +17824,7 @@ export const V2PluginReadResponse__PluginInterface = Schema.Struct({
1517317824 shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1517417825 termsOfServiceUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1517517826 websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15176});
17827}).annotate({ identifier: "V2PluginReadResponse__PluginInterface" });
1517717828
1517817829export type V2PluginReadResponse__PluginSource =
1517917830 | { readonly path: V2PluginReadResponse__AbsolutePathBuf; readonly type: "local" }
......@@ -15232,71 +17883,7 @@ export const V2PluginReadResponse__PluginSource = Schema.Union(
1523217883 }),
1523317884 ],
1523417885 { mode: "oneOf" },
15235);
15236
15237export type V2PluginReadResponse__SkillInterface = {
15238 readonly brandColor?: string | null;
15239 readonly defaultPrompt?: string | null;
15240 readonly displayName?: string | null;
15241 readonly iconLarge?: V2PluginReadResponse__AbsolutePathBuf | null;
15242 readonly iconSmall?: V2PluginReadResponse__AbsolutePathBuf | null;
15243 readonly shortDescription?: string | null;
15244};
15245export const V2PluginReadResponse__SkillInterface = Schema.Struct({
15246 brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15247 defaultPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15248 displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15249 iconLarge: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])),
15250 iconSmall: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])),
15251 shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15252});
15253
15254export type V2PluginReadResponse__AppTemplateSummary = {
15255 readonly canonicalConnectorId?: string | null;
15256 readonly category?: string | null;
15257 readonly description?: string | null;
15258 readonly logoUrl?: string | null;
15259 readonly logoUrlDark?: string | null;
15260 readonly materializedAppIds: ReadonlyArray<string>;
15261 readonly name: string;
15262 readonly reason?: V2PluginReadResponse__AppTemplateUnavailableReason | null;
15263 readonly templateId: string;
15264};
15265export const V2PluginReadResponse__AppTemplateSummary = Schema.Struct({
15266 canonicalConnectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15267 category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15268 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15269 logoUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15270 logoUrlDark: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15271 materializedAppIds: Schema.Array(Schema.String),
15272 name: Schema.String,
15273 reason: Schema.optionalKey(
15274 Schema.Union([V2PluginReadResponse__AppTemplateUnavailableReason, Schema.Null]),
15275 ),
15276 templateId: Schema.String,
15277});
15278
15279export type V2PluginReadResponse__PluginHookSummary = {
15280 readonly eventName: V2PluginReadResponse__HookEventName;
15281 readonly key: string;
15282};
15283export const V2PluginReadResponse__PluginHookSummary = Schema.Struct({
15284 eventName: V2PluginReadResponse__HookEventName,
15285 key: Schema.String,
15286});
15287
15288export type V2PluginReadResponse__PluginSharePrincipal = {
15289 readonly name: string;
15290 readonly principalId: string;
15291 readonly principalType: V2PluginReadResponse__PluginSharePrincipalType;
15292 readonly role: V2PluginReadResponse__PluginSharePrincipalRole;
15293};
15294export const V2PluginReadResponse__PluginSharePrincipal = Schema.Struct({
15295 name: Schema.String,
15296 principalId: Schema.String,
15297 principalType: V2PluginReadResponse__PluginSharePrincipalType,
15298 role: V2PluginReadResponse__PluginSharePrincipalRole,
15299});
17886).annotate({ identifier: "V2PluginReadResponse__PluginSource" });
1530017887
1530117888export type V2PluginReadResponse__ScheduledTaskSchedule =
1530217889 | {
......@@ -15318,8 +17905,12 @@ export const V2PluginReadResponse__ScheduledTaskSchedule = Schema.Union(
1531817905 Schema.Union([Schema.Array(V2PluginReadResponse__ScheduledTaskWeekday), Schema.Null]),
1531917906 ),
1532017907 intervalHours: Schema.Number.annotate({ format: "uint32" })
15321 .check(Schema.isInt())
15322 .check(Schema.isGreaterThanOrEqualTo(0)),
17908 .check(Schema.isInt().annotate({ expected: "an integer" }))
17909 .check(
17910 Schema.isGreaterThanOrEqualTo(0).annotate({
17911 expected: "a value greater than or equal to 0",
17912 }),
17913 ),
1532317914 type: Schema.Literal("hourly").annotate({ title: "HourlyScheduledTaskScheduleType" }),
1532417915 }).annotate({ title: "HourlyScheduledTaskSchedule" }),
1532517916 Schema.Struct({
......@@ -15337,7 +17928,20 @@ export const V2PluginReadResponse__ScheduledTaskSchedule = Schema.Union(
1533717928 }).annotate({ title: "WeeklyScheduledTaskSchedule" }),
1533817929 ],
1533917930 { mode: "oneOf" },
15340);
17931).annotate({ identifier: "V2PluginReadResponse__ScheduledTaskSchedule" });
17932
17933export type V2PluginReadResponse__PluginSharePrincipal = {
17934 readonly name: string;
17935 readonly principalId: string;
17936 readonly principalType: V2PluginReadResponse__PluginSharePrincipalType;
17937 readonly role: V2PluginReadResponse__PluginSharePrincipalRole;
17938};
17939export const V2PluginReadResponse__PluginSharePrincipal = Schema.Struct({
17940 name: Schema.String,
17941 principalId: Schema.String,
17942 principalType: V2PluginReadResponse__PluginSharePrincipalType,
17943 role: V2PluginReadResponse__PluginSharePrincipalRole,
17944}).annotate({ identifier: "V2PluginReadResponse__PluginSharePrincipal" });
1534117945
1534217946export type V2PluginShareListResponse__PluginInterface = {
1534317947 readonly brandColor?: string | null;
......@@ -15419,7 +18023,7 @@ export const V2PluginShareListResponse__PluginInterface = Schema.Struct({
1541918023 shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1542018024 termsOfServiceUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1542118025 websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15422});
18026}).annotate({ identifier: "V2PluginShareListResponse__PluginInterface" });
1542318027
1542418028export type V2PluginShareListResponse__PluginSource =
1542518029 | { readonly path: V2PluginShareListResponse__AbsolutePathBuf; readonly type: "local" }
......@@ -15478,7 +18082,7 @@ export const V2PluginShareListResponse__PluginSource = Schema.Union(
1547818082 }),
1547918083 ],
1548018084 { mode: "oneOf" },
15481);
18085).annotate({ identifier: "V2PluginShareListResponse__PluginSource" });
1548218086
1548318087export type V2PluginShareListResponse__PluginSharePrincipal = {
1548418088 readonly name: string;
......@@ -15491,7 +18095,7 @@ export const V2PluginShareListResponse__PluginSharePrincipal = Schema.Struct({
1549118095 principalId: Schema.String,
1549218096 principalType: V2PluginShareListResponse__PluginSharePrincipalType,
1549318097 role: V2PluginShareListResponse__PluginSharePrincipalRole,
15494});
18098}).annotate({ identifier: "V2PluginShareListResponse__PluginSharePrincipal" });
1549518099
1549618100export type V2PluginShareSaveParams__PluginShareTarget = {
1549718101 readonly principalId: string;
......@@ -15502,7 +18106,7 @@ export const V2PluginShareSaveParams__PluginShareTarget = Schema.Struct({
1550218106 principalId: Schema.String,
1550318107 principalType: V2PluginShareSaveParams__PluginSharePrincipalType,
1550418108 role: V2PluginShareSaveParams__PluginShareTargetRole,
15505});
18109}).annotate({ identifier: "V2PluginShareSaveParams__PluginShareTarget" });
1550618110
1550718111export type V2PluginShareUpdateTargetsParams__PluginShareTarget = {
1550818112 readonly principalId: string;
......@@ -15513,7 +18117,7 @@ export const V2PluginShareUpdateTargetsParams__PluginShareTarget = Schema.Struct
1551318117 principalId: Schema.String,
1551418118 principalType: V2PluginShareUpdateTargetsParams__PluginSharePrincipalType,
1551518119 role: V2PluginShareUpdateTargetsParams__PluginShareTargetRole,
15516});
18120}).annotate({ identifier: "V2PluginShareUpdateTargetsParams__PluginShareTarget" });
1551718121
1551818122export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipal = {
1551918123 readonly name: string;
......@@ -15526,7 +18130,7 @@ export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipal = Schema.S
1552618130 principalId: Schema.String,
1552718131 principalType: V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType,
1552818132 role: V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole,
15529});
18133}).annotate({ identifier: "V2PluginShareUpdateTargetsResponse__PluginSharePrincipal" });
1553018134
1553118135export type V2RawResponseItemCompletedNotification__ContentItem =
1553218136 | { readonly text: string; readonly type: "input_text" }
......@@ -15560,7 +18164,7 @@ export const V2RawResponseItemCompletedNotification__ContentItem = Schema.Union(
1556018164 }).annotate({ title: "OutputTextContentItem" }),
1556118165 ],
1556218166 { mode: "oneOf" },
15563);
18167).annotate({ identifier: "V2RawResponseItemCompletedNotification__ContentItem" });
1556418168
1556518169export type V2RawResponseItemCompletedNotification__FunctionCallOutputContentItem =
1556618170 | { readonly text: string; readonly type: "input_text" }
......@@ -15605,66 +18209,7 @@ export const V2RawResponseItemCompletedNotification__FunctionCallOutputContentIt
1560518209).annotate({
1560618210 description:
1560718211 "Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs.",
15608});
15609
15610export type V2ReviewStartResponse__CommandAction =
15611 | {
15612 readonly command: string;
15613 readonly name: string;
15614 readonly path: V2ReviewStartResponse__AbsolutePathBuf;
15615 readonly type: "read";
15616 }
15617 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
15618 | {
15619 readonly command: string;
15620 readonly path?: string | null;
15621 readonly query?: string | null;
15622 readonly type: "search";
15623 }
15624 | { readonly command: string; readonly type: "unknown" };
15625export const V2ReviewStartResponse__CommandAction = Schema.Union(
15626 [
15627 Schema.Struct({
15628 command: Schema.String,
15629 name: Schema.String,
15630 path: V2ReviewStartResponse__AbsolutePathBuf,
15631 type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
15632 }).annotate({ title: "ReadCommandAction" }),
15633 Schema.Struct({
15634 command: Schema.String,
15635 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15636 type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
15637 }).annotate({ title: "ListFilesCommandAction" }),
15638 Schema.Struct({
15639 command: Schema.String,
15640 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15641 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15642 type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
15643 }).annotate({ title: "SearchCommandAction" }),
15644 Schema.Struct({
15645 command: Schema.String,
15646 type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
15647 }).annotate({ title: "UnknownCommandAction" }),
15648 ],
15649 { mode: "oneOf" },
15650);
15651
15652export type V2ReviewStartResponse__CollabAgentState = {
15653 readonly message?: string | null;
15654 readonly status: V2ReviewStartResponse__CollabAgentStatus;
15655};
15656export const V2ReviewStartResponse__CollabAgentState = Schema.Struct({
15657 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15658 status: V2ReviewStartResponse__CollabAgentStatus,
15659});
15660
15661export type V2ReviewStartResponse__MemoryCitation = {
15662 readonly entries: ReadonlyArray<V2ReviewStartResponse__MemoryCitationEntry>;
15663 readonly threadIds: ReadonlyArray<string>;
15664};
15665export const V2ReviewStartResponse__MemoryCitation = Schema.Struct({
15666 entries: Schema.Array(V2ReviewStartResponse__MemoryCitationEntry),
15667 threadIds: Schema.Array(Schema.String),
18212 identifier: "V2RawResponseItemCompletedNotification__FunctionCallOutputContentItem",
1566818213});
1566918214
1567018215export type V2ReviewStartResponse__CodexErrorInfo =
......@@ -15708,8 +18253,12 @@ export const V2ReviewStartResponse__CodexErrorInfo = Schema.Union(
1570818253 httpStatusCode: Schema.optionalKey(
1570918254 Schema.Union([
1571018255 Schema.Number.annotate({ format: "uint16" })
15711 .check(Schema.isInt())
15712 .check(Schema.isGreaterThanOrEqualTo(0)),
18256 .check(Schema.isInt().annotate({ expected: "an integer" }))
18257 .check(
18258 Schema.isGreaterThanOrEqualTo(0).annotate({
18259 expected: "a value greater than or equal to 0",
18260 }),
18261 ),
1571318262 Schema.Null,
1571418263 ]),
1571518264 ),
......@@ -15720,8 +18269,12 @@ export const V2ReviewStartResponse__CodexErrorInfo = Schema.Union(
1572018269 httpStatusCode: Schema.optionalKey(
1572118270 Schema.Union([
1572218271 Schema.Number.annotate({ format: "uint16" })
15723 .check(Schema.isInt())
15724 .check(Schema.isGreaterThanOrEqualTo(0)),
18272 .check(Schema.isInt().annotate({ expected: "an integer" }))
18273 .check(
18274 Schema.isGreaterThanOrEqualTo(0).annotate({
18275 expected: "a value greater than or equal to 0",
18276 }),
18277 ),
1572518278 Schema.Null,
1572618279 ]),
1572718280 ),
......@@ -15735,8 +18288,12 @@ export const V2ReviewStartResponse__CodexErrorInfo = Schema.Union(
1573518288 httpStatusCode: Schema.optionalKey(
1573618289 Schema.Union([
1573718290 Schema.Number.annotate({ format: "uint16" })
15738 .check(Schema.isInt())
15739 .check(Schema.isGreaterThanOrEqualTo(0)),
18291 .check(Schema.isInt().annotate({ expected: "an integer" }))
18292 .check(
18293 Schema.isGreaterThanOrEqualTo(0).annotate({
18294 expected: "a value greater than or equal to 0",
18295 }),
18296 ),
1574018297 Schema.Null,
1574118298 ]),
1574218299 ),
......@@ -15751,8 +18308,12 @@ export const V2ReviewStartResponse__CodexErrorInfo = Schema.Union(
1575118308 httpStatusCode: Schema.optionalKey(
1575218309 Schema.Union([
1575318310 Schema.Number.annotate({ format: "uint16" })
15754 .check(Schema.isInt())
15755 .check(Schema.isGreaterThanOrEqualTo(0)),
18311 .check(Schema.isInt().annotate({ expected: "an integer" }))
18312 .check(
18313 Schema.isGreaterThanOrEqualTo(0).annotate({
18314 expected: "a value greater than or equal to 0",
18315 }),
18316 ),
1575618317 Schema.Null,
1575718318 ]),
1575818319 ),
......@@ -15775,82 +18336,104 @@ export const V2ReviewStartResponse__CodexErrorInfo = Schema.Union(
1577518336).annotate({
1577618337 description:
1577718338 "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.",
18339 identifier: "V2ReviewStartResponse__CodexErrorInfo",
1577818340});
1577918341
15780export type V2ReviewStartResponse__FileUpdateChange = {
15781 readonly diff: string;
15782 readonly kind: V2ReviewStartResponse__PatchChangeKind;
15783 readonly path: string;
18342export type V2ReviewStartResponse__TextElement = {
18343 readonly byteRange: V2ReviewStartResponse__ByteRange;
18344 readonly placeholder?: string | null;
1578418345};
15785export const V2ReviewStartResponse__FileUpdateChange = Schema.Struct({
15786 diff: Schema.String,
15787 kind: V2ReviewStartResponse__PatchChangeKind,
15788 path: Schema.String,
15789});
18346export const V2ReviewStartResponse__TextElement = Schema.Struct({
18347 byteRange: Schema.suspend(
18348 (): Schema.Codec<V2ReviewStartResponse__ByteRange> => V2ReviewStartResponse__ByteRange,
18349 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
18350 placeholder: Schema.optionalKey(
18351 Schema.Union([
18352 Schema.String.annotate({
18353 description: "Optional human-readable placeholder for the element, displayed in the UI.",
18354 }),
18355 Schema.Null,
18356 ]),
18357 ),
18358}).annotate({ identifier: "V2ReviewStartResponse__TextElement" });
1579018359
15791export type V2ReviewStartResponse__UserInput =
15792 | {
15793 readonly text: string;
15794 readonly text_elements?: ReadonlyArray<V2ReviewStartResponse__TextElement>;
15795 readonly type: "text";
15796 }
18360export type V2ReviewStartResponse__MemoryCitation = {
18361 readonly entries: ReadonlyArray<V2ReviewStartResponse__MemoryCitationEntry>;
18362 readonly threadIds: ReadonlyArray<string>;
18363};
18364export const V2ReviewStartResponse__MemoryCitation = Schema.Struct({
18365 entries: Schema.Array(V2ReviewStartResponse__MemoryCitationEntry),
18366 threadIds: Schema.Array(Schema.String),
18367}).annotate({ identifier: "V2ReviewStartResponse__MemoryCitation" });
18368
18369export type V2ReviewStartResponse__CommandAction =
1579718370 | {
15798 readonly detail?: V2ReviewStartResponse__ImageDetail | null;
15799 readonly type: "image";
15800 readonly url: string;
18371 readonly command: string;
18372 readonly name: string;
18373 readonly path: V2ReviewStartResponse__AbsolutePathBuf;
18374 readonly type: "read";
1580118375 }
18376 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
1580218377 | {
15803 readonly detail?: V2ReviewStartResponse__ImageDetail | null;
15804 readonly path: string;
15805 readonly type: "localImage";
18378 readonly command: string;
18379 readonly path?: string | null;
18380 readonly query?: string | null;
18381 readonly type: "search";
1580618382 }
15807 | { readonly type: "audio"; readonly url: string }
15808 | { readonly path: string; readonly type: "localAudio" }
15809 | { readonly name: string; readonly path: string; readonly type: "skill" }
15810 | { readonly name: string; readonly path: string; readonly type: "mention" };
15811export const V2ReviewStartResponse__UserInput = Schema.Union(
18383 | { readonly command: string; readonly type: "unknown" };
18384export const V2ReviewStartResponse__CommandAction = Schema.Union(
1581218385 [
1581318386 Schema.Struct({
15814 text: Schema.String,
15815 text_elements: Schema.optionalKey(
15816 Schema.Array(V2ReviewStartResponse__TextElement).annotate({
15817 description: "UI-defined spans within `text` used to render or persist special elements.",
15818 default: [],
15819 }),
15820 ),
15821 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
15822 }).annotate({ title: "TextUserInput" }),
15823 Schema.Struct({
15824 detail: Schema.optionalKey(Schema.Union([V2ReviewStartResponse__ImageDetail, Schema.Null])),
15825 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
15826 url: Schema.String,
15827 }).annotate({ title: "ImageUserInput" }),
15828 Schema.Struct({
15829 detail: Schema.optionalKey(Schema.Union([V2ReviewStartResponse__ImageDetail, Schema.Null])),
15830 path: Schema.String,
15831 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
15832 }).annotate({ title: "LocalImageUserInput" }),
15833 Schema.Struct({
15834 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
15835 url: Schema.String,
15836 }).annotate({ title: "AudioUserInput" }),
18387 command: Schema.String,
18388 name: Schema.String,
18389 path: V2ReviewStartResponse__AbsolutePathBuf,
18390 type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
18391 }).annotate({ title: "ReadCommandAction" }),
1583718392 Schema.Struct({
15838 path: Schema.String,
15839 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
15840 }).annotate({ title: "LocalAudioUserInput" }),
18393 command: Schema.String,
18394 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18395 type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
18396 }).annotate({ title: "ListFilesCommandAction" }),
1584118397 Schema.Struct({
15842 name: Schema.String,
15843 path: Schema.String,
15844 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
15845 }).annotate({ title: "SkillUserInput" }),
18398 command: Schema.String,
18399 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18400 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18401 type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
18402 }).annotate({ title: "SearchCommandAction" }),
1584618403 Schema.Struct({
15847 name: Schema.String,
15848 path: Schema.String,
15849 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
15850 }).annotate({ title: "MentionUserInput" }),
18404 command: Schema.String,
18405 type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
18406 }).annotate({ title: "UnknownCommandAction" }),
1585118407 ],
1585218408 { mode: "oneOf" },
15853);
18409).annotate({ identifier: "V2ReviewStartResponse__CommandAction" });
18410
18411export type V2ReviewStartResponse__FileUpdateChange = {
18412 readonly diff: string;
18413 readonly kind: V2ReviewStartResponse__PatchChangeKind;
18414 readonly path: string;
18415};
18416export const V2ReviewStartResponse__FileUpdateChange = Schema.Struct({
18417 diff: Schema.String,
18418 kind: V2ReviewStartResponse__PatchChangeKind,
18419 path: Schema.String,
18420}).annotate({ identifier: "V2ReviewStartResponse__FileUpdateChange" });
18421
18422export type V2ReviewStartResponse__CollabAgentState = {
18423 readonly message?: string | null;
18424 readonly status: V2ReviewStartResponse__CollabAgentStatus;
18425};
18426export const V2ReviewStartResponse__CollabAgentState = Schema.Struct({
18427 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18428 status: V2ReviewStartResponse__CollabAgentStatus,
18429}).annotate({ identifier: "V2ReviewStartResponse__CollabAgentState" });
18430
18431export type V2SkillsListResponse__SkillDependencies = {
18432 readonly tools: ReadonlyArray<V2SkillsListResponse__SkillToolDependency>;
18433};
18434export const V2SkillsListResponse__SkillDependencies = Schema.Struct({
18435 tools: Schema.Array(V2SkillsListResponse__SkillToolDependency),
18436}).annotate({ identifier: "V2SkillsListResponse__SkillDependencies" });
1585418437
1585518438export type V2SkillsListResponse__SkillInterface = {
1585618439 readonly brandColor?: string | null;
......@@ -15867,14 +18450,7 @@ export const V2SkillsListResponse__SkillInterface = Schema.Struct({
1586718450 iconLarge: Schema.optionalKey(Schema.Union([V2SkillsListResponse__AbsolutePathBuf, Schema.Null])),
1586818451 iconSmall: Schema.optionalKey(Schema.Union([V2SkillsListResponse__AbsolutePathBuf, Schema.Null])),
1586918452 shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15870});
15871
15872export type V2SkillsListResponse__SkillDependencies = {
15873 readonly tools: ReadonlyArray<V2SkillsListResponse__SkillToolDependency>;
15874};
15875export const V2SkillsListResponse__SkillDependencies = Schema.Struct({
15876 tools: Schema.Array(V2SkillsListResponse__SkillToolDependency),
15877});
18453}).annotate({ identifier: "V2SkillsListResponse__SkillInterface" });
1587818454
1587918455export type V2ThreadForkResponse__CommandAction =
1588018456 | {
......@@ -15916,25 +18492,118 @@ export const V2ThreadForkResponse__CommandAction = Schema.Union(
1591618492 }).annotate({ title: "UnknownCommandAction" }),
1591718493 ],
1591818494 { mode: "oneOf" },
15919);
18495).annotate({ identifier: "V2ThreadForkResponse__CommandAction" });
1592018496
15921export type V2ThreadForkResponse__CollabAgentState = {
15922 readonly message?: string | null;
15923 readonly status: V2ThreadForkResponse__CollabAgentStatus;
15924};
15925export const V2ThreadForkResponse__CollabAgentState = Schema.Struct({
15926 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
15927 status: V2ThreadForkResponse__CollabAgentStatus,
15928});
18497export type V2ThreadForkResponse__SandboxPolicy =
18498 | { readonly type: "dangerFullAccess" }
18499 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
18500 | {
18501 readonly networkAccess?: V2ThreadForkResponse__NetworkAccess;
18502 readonly type: "externalSandbox";
18503 }
18504 | {
18505 readonly excludeSlashTmp?: boolean;
18506 readonly excludeTmpdirEnvVar?: boolean;
18507 readonly networkAccess?: boolean;
18508 readonly type: "workspaceWrite";
18509 readonly writableRoots?: ReadonlyArray<V2ThreadForkResponse__AbsolutePathBuf>;
18510 };
18511export const V2ThreadForkResponse__SandboxPolicy = Schema.Union(
18512 [
18513 Schema.Struct({
18514 type: Schema.Literal("dangerFullAccess").annotate({
18515 title: "DangerFullAccessSandboxPolicyType",
18516 }),
18517 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
18518 Schema.Struct({
18519 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
18520 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
18521 }).annotate({ title: "ReadOnlySandboxPolicy" }),
18522 Schema.Struct({
18523 networkAccess: Schema.optionalKey(
18524 Schema.suspend(
18525 (): Schema.Codec<V2ThreadForkResponse__NetworkAccess> =>
18526 V2ThreadForkResponse__NetworkAccess,
18527 ).annotate({ default: "restricted" }),
18528 ),
18529 type: Schema.Literal("externalSandbox").annotate({
18530 title: "ExternalSandboxSandboxPolicyType",
18531 }),
18532 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
18533 Schema.Struct({
18534 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
18535 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
18536 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
18537 type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
18538 writableRoots: Schema.optionalKey(
18539 Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }),
18540 ),
18541 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
18542 ],
18543 { mode: "oneOf" },
18544).annotate({ identifier: "V2ThreadForkResponse__SandboxPolicy" });
1592918545
15930export type V2ThreadForkResponse__MemoryCitation = {
15931 readonly entries: ReadonlyArray<V2ThreadForkResponse__MemoryCitationEntry>;
15932 readonly threadIds: ReadonlyArray<string>;
15933};
15934export const V2ThreadForkResponse__MemoryCitation = Schema.Struct({
15935 entries: Schema.Array(V2ThreadForkResponse__MemoryCitationEntry),
15936 threadIds: Schema.Array(Schema.String),
15937});
18546export type V2ThreadForkResponse__SubAgentSource =
18547 | "review"
18548 | "compact"
18549 | "memory_consolidation"
18550 | {
18551 readonly thread_spawn: {
18552 readonly agent_nickname?: string | null;
18553 readonly agent_path?: V2ThreadForkResponse__AgentPath | null;
18554 readonly agent_role?: string | null;
18555 readonly depth: number;
18556 readonly parent_thread_id: V2ThreadForkResponse__ThreadId;
18557 };
18558 }
18559 | { readonly other: string };
18560export const V2ThreadForkResponse__SubAgentSource = Schema.Union(
18561 [
18562 Schema.Literals(["review", "compact", "memory_consolidation"]),
18563 Schema.Struct({
18564 thread_spawn: Schema.Struct({
18565 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18566 agent_path: Schema.optionalKey(
18567 Schema.Union([V2ThreadForkResponse__AgentPath, Schema.Null]),
18568 ),
18569 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18570 depth: Schema.Number.annotate({ format: "int32" }).check(
18571 Schema.isInt().annotate({ expected: "an integer" }),
18572 ),
18573 parent_thread_id: V2ThreadForkResponse__ThreadId,
18574 }),
18575 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
18576 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
18577 ],
18578 { mode: "oneOf" },
18579).annotate({ identifier: "V2ThreadForkResponse__SubAgentSource" });
18580
18581export type V2ThreadForkResponse__ThreadStatus =
18582 | { readonly type: "notLoaded" }
18583 | { readonly type: "idle" }
18584 | { readonly type: "systemError" }
18585 | {
18586 readonly activeFlags: ReadonlyArray<V2ThreadForkResponse__ThreadActiveFlag>;
18587 readonly type: "active";
18588 };
18589export const V2ThreadForkResponse__ThreadStatus = Schema.Union(
18590 [
18591 Schema.Struct({
18592 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
18593 }).annotate({ title: "NotLoadedThreadStatus" }),
18594 Schema.Struct({
18595 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
18596 }).annotate({ title: "IdleThreadStatus" }),
18597 Schema.Struct({
18598 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
18599 }).annotate({ title: "SystemErrorThreadStatus" }),
18600 Schema.Struct({
18601 activeFlags: Schema.Array(V2ThreadForkResponse__ThreadActiveFlag),
18602 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
18603 }).annotate({ title: "ActiveThreadStatus" }),
18604 ],
18605 { mode: "oneOf" },
18606).annotate({ identifier: "V2ThreadForkResponse__ThreadStatus" });
1593818607
1593918608export type V2ThreadForkResponse__CodexErrorInfo =
1594018609 | "contextWindowExceeded"
......@@ -15981,8 +18650,12 @@ export const V2ThreadForkResponse__CodexErrorInfo = Schema.Union(
1598118650 httpStatusCode: Schema.optionalKey(
1598218651 Schema.Union([
1598318652 Schema.Number.annotate({ format: "uint16" })
15984 .check(Schema.isInt())
15985 .check(Schema.isGreaterThanOrEqualTo(0)),
18653 .check(Schema.isInt().annotate({ expected: "an integer" }))
18654 .check(
18655 Schema.isGreaterThanOrEqualTo(0).annotate({
18656 expected: "a value greater than or equal to 0",
18657 }),
18658 ),
1598618659 Schema.Null,
1598718660 ]),
1598818661 ),
......@@ -15993,8 +18666,12 @@ export const V2ThreadForkResponse__CodexErrorInfo = Schema.Union(
1599318666 httpStatusCode: Schema.optionalKey(
1599418667 Schema.Union([
1599518668 Schema.Number.annotate({ format: "uint16" })
15996 .check(Schema.isInt())
15997 .check(Schema.isGreaterThanOrEqualTo(0)),
18669 .check(Schema.isInt().annotate({ expected: "an integer" }))
18670 .check(
18671 Schema.isGreaterThanOrEqualTo(0).annotate({
18672 expected: "a value greater than or equal to 0",
18673 }),
18674 ),
1599818675 Schema.Null,
1599918676 ]),
1600018677 ),
......@@ -16008,8 +18685,12 @@ export const V2ThreadForkResponse__CodexErrorInfo = Schema.Union(
1600818685 httpStatusCode: Schema.optionalKey(
1600918686 Schema.Union([
1601018687 Schema.Number.annotate({ format: "uint16" })
16011 .check(Schema.isInt())
16012 .check(Schema.isGreaterThanOrEqualTo(0)),
18688 .check(Schema.isInt().annotate({ expected: "an integer" }))
18689 .check(
18690 Schema.isGreaterThanOrEqualTo(0).annotate({
18691 expected: "a value greater than or equal to 0",
18692 }),
18693 ),
1601318694 Schema.Null,
1601418695 ]),
1601518696 ),
......@@ -16024,8 +18705,12 @@ export const V2ThreadForkResponse__CodexErrorInfo = Schema.Union(
1602418705 httpStatusCode: Schema.optionalKey(
1602518706 Schema.Union([
1602618707 Schema.Number.annotate({ format: "uint16" })
16027 .check(Schema.isInt())
16028 .check(Schema.isGreaterThanOrEqualTo(0)),
18708 .check(Schema.isInt().annotate({ expected: "an integer" }))
18709 .check(
18710 Schema.isGreaterThanOrEqualTo(0).annotate({
18711 expected: "a value greater than or equal to 0",
18712 }),
18713 ),
1602918714 Schema.Null,
1603018715 ]),
1603118716 ),
......@@ -16048,8 +18733,36 @@ export const V2ThreadForkResponse__CodexErrorInfo = Schema.Union(
1604818733).annotate({
1604918734 description:
1605018735 "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.",
18736 identifier: "V2ThreadForkResponse__CodexErrorInfo",
1605118737});
1605218738
18739export type V2ThreadForkResponse__TextElement = {
18740 readonly byteRange: V2ThreadForkResponse__ByteRange;
18741 readonly placeholder?: string | null;
18742};
18743export const V2ThreadForkResponse__TextElement = Schema.Struct({
18744 byteRange: Schema.suspend(
18745 (): Schema.Codec<V2ThreadForkResponse__ByteRange> => V2ThreadForkResponse__ByteRange,
18746 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
18747 placeholder: Schema.optionalKey(
18748 Schema.Union([
18749 Schema.String.annotate({
18750 description: "Optional human-readable placeholder for the element, displayed in the UI.",
18751 }),
18752 Schema.Null,
18753 ]),
18754 ),
18755}).annotate({ identifier: "V2ThreadForkResponse__TextElement" });
18756
18757export type V2ThreadForkResponse__MemoryCitation = {
18758 readonly entries: ReadonlyArray<V2ThreadForkResponse__MemoryCitationEntry>;
18759 readonly threadIds: ReadonlyArray<string>;
18760};
18761export const V2ThreadForkResponse__MemoryCitation = Schema.Struct({
18762 entries: Schema.Array(V2ThreadForkResponse__MemoryCitationEntry),
18763 threadIds: Schema.Array(Schema.String),
18764}).annotate({ identifier: "V2ThreadForkResponse__MemoryCitation" });
18765
1605318766export type V2ThreadForkResponse__FileUpdateChange = {
1605418767 readonly diff: string;
1605518768 readonly kind: V2ThreadForkResponse__PatchChangeKind;
......@@ -16059,104 +18772,16 @@ export const V2ThreadForkResponse__FileUpdateChange = Schema.Struct({
1605918772 diff: Schema.String,
1606018773 kind: V2ThreadForkResponse__PatchChangeKind,
1606118774 path: Schema.String,
16062});
16063
16064export type V2ThreadForkResponse__UserInput =
16065 | {
16066 readonly text: string;
16067 readonly text_elements?: ReadonlyArray<V2ThreadForkResponse__TextElement>;
16068 readonly type: "text";
16069 }
16070 | {
16071 readonly detail?: V2ThreadForkResponse__ImageDetail | null;
16072 readonly type: "image";
16073 readonly url: string;
16074 }
16075 | {
16076 readonly detail?: V2ThreadForkResponse__ImageDetail | null;
16077 readonly path: string;
16078 readonly type: "localImage";
16079 }
16080 | { readonly type: "audio"; readonly url: string }
16081 | { readonly path: string; readonly type: "localAudio" }
16082 | { readonly name: string; readonly path: string; readonly type: "skill" }
16083 | { readonly name: string; readonly path: string; readonly type: "mention" };
16084export const V2ThreadForkResponse__UserInput = Schema.Union(
16085 [
16086 Schema.Struct({
16087 text: Schema.String,
16088 text_elements: Schema.optionalKey(
16089 Schema.Array(V2ThreadForkResponse__TextElement).annotate({
16090 description: "UI-defined spans within `text` used to render or persist special elements.",
16091 default: [],
16092 }),
16093 ),
16094 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
16095 }).annotate({ title: "TextUserInput" }),
16096 Schema.Struct({
16097 detail: Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ImageDetail, Schema.Null])),
16098 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
16099 url: Schema.String,
16100 }).annotate({ title: "ImageUserInput" }),
16101 Schema.Struct({
16102 detail: Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ImageDetail, Schema.Null])),
16103 path: Schema.String,
16104 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
16105 }).annotate({ title: "LocalImageUserInput" }),
16106 Schema.Struct({
16107 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
16108 url: Schema.String,
16109 }).annotate({ title: "AudioUserInput" }),
16110 Schema.Struct({
16111 path: Schema.String,
16112 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
16113 }).annotate({ title: "LocalAudioUserInput" }),
16114 Schema.Struct({
16115 name: Schema.String,
16116 path: Schema.String,
16117 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
16118 }).annotate({ title: "SkillUserInput" }),
16119 Schema.Struct({
16120 name: Schema.String,
16121 path: Schema.String,
16122 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
16123 }).annotate({ title: "MentionUserInput" }),
16124 ],
16125 { mode: "oneOf" },
16126);
18775}).annotate({ identifier: "V2ThreadForkResponse__FileUpdateChange" });
1612718776
16128export type V2ThreadForkResponse__SubAgentSource =
16129 | "review"
16130 | "compact"
16131 | "memory_consolidation"
16132 | {
16133 readonly thread_spawn: {
16134 readonly agent_nickname?: string | null;
16135 readonly agent_path?: V2ThreadForkResponse__AgentPath | null;
16136 readonly agent_role?: string | null;
16137 readonly depth: number;
16138 readonly parent_thread_id: V2ThreadForkResponse__ThreadId;
16139 };
16140 }
16141 | { readonly other: string };
16142export const V2ThreadForkResponse__SubAgentSource = Schema.Union(
16143 [
16144 Schema.Literals(["review", "compact", "memory_consolidation"]),
16145 Schema.Struct({
16146 thread_spawn: Schema.Struct({
16147 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16148 agent_path: Schema.optionalKey(
16149 Schema.Union([V2ThreadForkResponse__AgentPath, Schema.Null]),
16150 ),
16151 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16152 depth: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
16153 parent_thread_id: V2ThreadForkResponse__ThreadId,
16154 }),
16155 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
16156 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
16157 ],
16158 { mode: "oneOf" },
16159);
18777export type V2ThreadForkResponse__CollabAgentState = {
18778 readonly message?: string | null;
18779 readonly status: V2ThreadForkResponse__CollabAgentStatus;
18780};
18781export const V2ThreadForkResponse__CollabAgentState = Schema.Struct({
18782 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18783 status: V2ThreadForkResponse__CollabAgentStatus,
18784}).annotate({ identifier: "V2ThreadForkResponse__CollabAgentState" });
1616018785
1616118786export type V2ThreadGoalGetResponse__ThreadGoal = {
1616218787 readonly createdAt: number;
......@@ -16169,17 +18794,30 @@ export type V2ThreadGoalGetResponse__ThreadGoal = {
1616918794 readonly updatedAt: number;
1617018795};
1617118796export const V2ThreadGoalGetResponse__ThreadGoal = Schema.Struct({
16172 createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
18797 createdAt: Schema.Number.annotate({ format: "int64" }).check(
18798 Schema.isInt().annotate({ expected: "an integer" }),
18799 ),
1617318800 objective: Schema.String,
1617418801 status: V2ThreadGoalGetResponse__ThreadGoalStatus,
1617518802 threadId: Schema.String,
16176 timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
18803 timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(
18804 Schema.isInt().annotate({ expected: "an integer" }),
18805 ),
1617718806 tokenBudget: Schema.optionalKey(
16178 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
18807 Schema.Union([
18808 Schema.Number.annotate({ format: "int64" }).check(
18809 Schema.isInt().annotate({ expected: "an integer" }),
18810 ),
18811 Schema.Null,
18812 ]),
1617918813 ),
16180 tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
16181 updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
16182});
18814 tokensUsed: Schema.Number.annotate({ format: "int64" }).check(
18815 Schema.isInt().annotate({ expected: "an integer" }),
18816 ),
18817 updatedAt: Schema.Number.annotate({ format: "int64" }).check(
18818 Schema.isInt().annotate({ expected: "an integer" }),
18819 ),
18820}).annotate({ identifier: "V2ThreadGoalGetResponse__ThreadGoal" });
1618318821
1618418822export type V2ThreadGoalSetResponse__ThreadGoal = {
1618518823 readonly createdAt: number;
......@@ -16192,17 +18830,30 @@ export type V2ThreadGoalSetResponse__ThreadGoal = {
1619218830 readonly updatedAt: number;
1619318831};
1619418832export const V2ThreadGoalSetResponse__ThreadGoal = Schema.Struct({
16195 createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
18833 createdAt: Schema.Number.annotate({ format: "int64" }).check(
18834 Schema.isInt().annotate({ expected: "an integer" }),
18835 ),
1619618836 objective: Schema.String,
1619718837 status: V2ThreadGoalSetResponse__ThreadGoalStatus,
1619818838 threadId: Schema.String,
16199 timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
18839 timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(
18840 Schema.isInt().annotate({ expected: "an integer" }),
18841 ),
1620018842 tokenBudget: Schema.optionalKey(
16201 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
18843 Schema.Union([
18844 Schema.Number.annotate({ format: "int64" }).check(
18845 Schema.isInt().annotate({ expected: "an integer" }),
18846 ),
18847 Schema.Null,
18848 ]),
1620218849 ),
16203 tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
16204 updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
16205});
18850 tokensUsed: Schema.Number.annotate({ format: "int64" }).check(
18851 Schema.isInt().annotate({ expected: "an integer" }),
18852 ),
18853 updatedAt: Schema.Number.annotate({ format: "int64" }).check(
18854 Schema.isInt().annotate({ expected: "an integer" }),
18855 ),
18856}).annotate({ identifier: "V2ThreadGoalSetResponse__ThreadGoal" });
1620618857
1620718858export type V2ThreadGoalUpdatedNotification__ThreadGoal = {
1620818859 readonly createdAt: number;
......@@ -16215,17 +18866,30 @@ export type V2ThreadGoalUpdatedNotification__ThreadGoal = {
1621518866 readonly updatedAt: number;
1621618867};
1621718868export const V2ThreadGoalUpdatedNotification__ThreadGoal = Schema.Struct({
16218 createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
18869 createdAt: Schema.Number.annotate({ format: "int64" }).check(
18870 Schema.isInt().annotate({ expected: "an integer" }),
18871 ),
1621918872 objective: Schema.String,
1622018873 status: V2ThreadGoalUpdatedNotification__ThreadGoalStatus,
1622118874 threadId: Schema.String,
16222 timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
18875 timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(
18876 Schema.isInt().annotate({ expected: "an integer" }),
18877 ),
1622318878 tokenBudget: Schema.optionalKey(
16224 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
18879 Schema.Union([
18880 Schema.Number.annotate({ format: "int64" }).check(
18881 Schema.isInt().annotate({ expected: "an integer" }),
18882 ),
18883 Schema.Null,
18884 ]),
1622518885 ),
16226 tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
16227 updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
16228});
18886 tokensUsed: Schema.Number.annotate({ format: "int64" }).check(
18887 Schema.isInt().annotate({ expected: "an integer" }),
18888 ),
18889 updatedAt: Schema.Number.annotate({ format: "int64" }).check(
18890 Schema.isInt().annotate({ expected: "an integer" }),
18891 ),
18892}).annotate({ identifier: "V2ThreadGoalUpdatedNotification__ThreadGoal" });
1622918893
1623018894export type V2ThreadListResponse__CommandAction =
1623118895 | {
......@@ -16267,25 +18931,69 @@ export const V2ThreadListResponse__CommandAction = Schema.Union(
1626718931 }).annotate({ title: "UnknownCommandAction" }),
1626818932 ],
1626918933 { mode: "oneOf" },
16270);
18934).annotate({ identifier: "V2ThreadListResponse__CommandAction" });
1627118935
16272export type V2ThreadListResponse__CollabAgentState = {
16273 readonly message?: string | null;
16274 readonly status: V2ThreadListResponse__CollabAgentStatus;
16275};
16276export const V2ThreadListResponse__CollabAgentState = Schema.Struct({
16277 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16278 status: V2ThreadListResponse__CollabAgentStatus,
16279});
18936export type V2ThreadListResponse__SubAgentSource =
18937 | "review"
18938 | "compact"
18939 | "memory_consolidation"
18940 | {
18941 readonly thread_spawn: {
18942 readonly agent_nickname?: string | null;
18943 readonly agent_path?: V2ThreadListResponse__AgentPath | null;
18944 readonly agent_role?: string | null;
18945 readonly depth: number;
18946 readonly parent_thread_id: V2ThreadListResponse__ThreadId;
18947 };
18948 }
18949 | { readonly other: string };
18950export const V2ThreadListResponse__SubAgentSource = Schema.Union(
18951 [
18952 Schema.Literals(["review", "compact", "memory_consolidation"]),
18953 Schema.Struct({
18954 thread_spawn: Schema.Struct({
18955 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18956 agent_path: Schema.optionalKey(
18957 Schema.Union([V2ThreadListResponse__AgentPath, Schema.Null]),
18958 ),
18959 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18960 depth: Schema.Number.annotate({ format: "int32" }).check(
18961 Schema.isInt().annotate({ expected: "an integer" }),
18962 ),
18963 parent_thread_id: V2ThreadListResponse__ThreadId,
18964 }),
18965 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
18966 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
18967 ],
18968 { mode: "oneOf" },
18969).annotate({ identifier: "V2ThreadListResponse__SubAgentSource" });
1628018970
16281export type V2ThreadListResponse__MemoryCitation = {
16282 readonly entries: ReadonlyArray<V2ThreadListResponse__MemoryCitationEntry>;
16283 readonly threadIds: ReadonlyArray<string>;
16284};
16285export const V2ThreadListResponse__MemoryCitation = Schema.Struct({
16286 entries: Schema.Array(V2ThreadListResponse__MemoryCitationEntry),
16287 threadIds: Schema.Array(Schema.String),
16288});
18971export type V2ThreadListResponse__ThreadStatus =
18972 | { readonly type: "notLoaded" }
18973 | { readonly type: "idle" }
18974 | { readonly type: "systemError" }
18975 | {
18976 readonly activeFlags: ReadonlyArray<V2ThreadListResponse__ThreadActiveFlag>;
18977 readonly type: "active";
18978 };
18979export const V2ThreadListResponse__ThreadStatus = Schema.Union(
18980 [
18981 Schema.Struct({
18982 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
18983 }).annotate({ title: "NotLoadedThreadStatus" }),
18984 Schema.Struct({
18985 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
18986 }).annotate({ title: "IdleThreadStatus" }),
18987 Schema.Struct({
18988 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
18989 }).annotate({ title: "SystemErrorThreadStatus" }),
18990 Schema.Struct({
18991 activeFlags: Schema.Array(V2ThreadListResponse__ThreadActiveFlag),
18992 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
18993 }).annotate({ title: "ActiveThreadStatus" }),
18994 ],
18995 { mode: "oneOf" },
18996).annotate({ identifier: "V2ThreadListResponse__ThreadStatus" });
1628918997
1629018998export type V2ThreadListResponse__CodexErrorInfo =
1629118999 | "contextWindowExceeded"
......@@ -16328,8 +19036,12 @@ export const V2ThreadListResponse__CodexErrorInfo = Schema.Union(
1632819036 httpStatusCode: Schema.optionalKey(
1632919037 Schema.Union([
1633019038 Schema.Number.annotate({ format: "uint16" })
16331 .check(Schema.isInt())
16332 .check(Schema.isGreaterThanOrEqualTo(0)),
19039 .check(Schema.isInt().annotate({ expected: "an integer" }))
19040 .check(
19041 Schema.isGreaterThanOrEqualTo(0).annotate({
19042 expected: "a value greater than or equal to 0",
19043 }),
19044 ),
1633319045 Schema.Null,
1633419046 ]),
1633519047 ),
......@@ -16340,8 +19052,12 @@ export const V2ThreadListResponse__CodexErrorInfo = Schema.Union(
1634019052 httpStatusCode: Schema.optionalKey(
1634119053 Schema.Union([
1634219054 Schema.Number.annotate({ format: "uint16" })
16343 .check(Schema.isInt())
16344 .check(Schema.isGreaterThanOrEqualTo(0)),
19055 .check(Schema.isInt().annotate({ expected: "an integer" }))
19056 .check(
19057 Schema.isGreaterThanOrEqualTo(0).annotate({
19058 expected: "a value greater than or equal to 0",
19059 }),
19060 ),
1634519061 Schema.Null,
1634619062 ]),
1634719063 ),
......@@ -16355,8 +19071,12 @@ export const V2ThreadListResponse__CodexErrorInfo = Schema.Union(
1635519071 httpStatusCode: Schema.optionalKey(
1635619072 Schema.Union([
1635719073 Schema.Number.annotate({ format: "uint16" })
16358 .check(Schema.isInt())
16359 .check(Schema.isGreaterThanOrEqualTo(0)),
19074 .check(Schema.isInt().annotate({ expected: "an integer" }))
19075 .check(
19076 Schema.isGreaterThanOrEqualTo(0).annotate({
19077 expected: "a value greater than or equal to 0",
19078 }),
19079 ),
1636019080 Schema.Null,
1636119081 ]),
1636219082 ),
......@@ -16371,8 +19091,12 @@ export const V2ThreadListResponse__CodexErrorInfo = Schema.Union(
1637119091 httpStatusCode: Schema.optionalKey(
1637219092 Schema.Union([
1637319093 Schema.Number.annotate({ format: "uint16" })
16374 .check(Schema.isInt())
16375 .check(Schema.isGreaterThanOrEqualTo(0)),
19094 .check(Schema.isInt().annotate({ expected: "an integer" }))
19095 .check(
19096 Schema.isGreaterThanOrEqualTo(0).annotate({
19097 expected: "a value greater than or equal to 0",
19098 }),
19099 ),
1637619100 Schema.Null,
1637719101 ]),
1637819102 ),
......@@ -16395,8 +19119,36 @@ export const V2ThreadListResponse__CodexErrorInfo = Schema.Union(
1639519119).annotate({
1639619120 description:
1639719121 "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.",
19122 identifier: "V2ThreadListResponse__CodexErrorInfo",
1639819123});
1639919124
19125export type V2ThreadListResponse__TextElement = {
19126 readonly byteRange: V2ThreadListResponse__ByteRange;
19127 readonly placeholder?: string | null;
19128};
19129export const V2ThreadListResponse__TextElement = Schema.Struct({
19130 byteRange: Schema.suspend(
19131 (): Schema.Codec<V2ThreadListResponse__ByteRange> => V2ThreadListResponse__ByteRange,
19132 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
19133 placeholder: Schema.optionalKey(
19134 Schema.Union([
19135 Schema.String.annotate({
19136 description: "Optional human-readable placeholder for the element, displayed in the UI.",
19137 }),
19138 Schema.Null,
19139 ]),
19140 ),
19141}).annotate({ identifier: "V2ThreadListResponse__TextElement" });
19142
19143export type V2ThreadListResponse__MemoryCitation = {
19144 readonly entries: ReadonlyArray<V2ThreadListResponse__MemoryCitationEntry>;
19145 readonly threadIds: ReadonlyArray<string>;
19146};
19147export const V2ThreadListResponse__MemoryCitation = Schema.Struct({
19148 entries: Schema.Array(V2ThreadListResponse__MemoryCitationEntry),
19149 threadIds: Schema.Array(Schema.String),
19150}).annotate({ identifier: "V2ThreadListResponse__MemoryCitation" });
19151
1640019152export type V2ThreadListResponse__FileUpdateChange = {
1640119153 readonly diff: string;
1640219154 readonly kind: V2ThreadListResponse__PatchChangeKind;
......@@ -16406,164 +19158,120 @@ export const V2ThreadListResponse__FileUpdateChange = Schema.Struct({
1640619158 diff: Schema.String,
1640719159 kind: V2ThreadListResponse__PatchChangeKind,
1640819160 path: Schema.String,
16409});
19161}).annotate({ identifier: "V2ThreadListResponse__FileUpdateChange" });
1641019162
16411export type V2ThreadListResponse__UserInput =
19163export type V2ThreadListResponse__CollabAgentState = {
19164 readonly message?: string | null;
19165 readonly status: V2ThreadListResponse__CollabAgentStatus;
19166};
19167export const V2ThreadListResponse__CollabAgentState = Schema.Struct({
19168 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19169 status: V2ThreadListResponse__CollabAgentStatus,
19170}).annotate({ identifier: "V2ThreadListResponse__CollabAgentState" });
19171
19172export type V2ThreadMetadataUpdateResponse__CommandAction =
1641219173 | {
16413 readonly text: string;
16414 readonly text_elements?: ReadonlyArray<V2ThreadListResponse__TextElement>;
16415 readonly type: "text";
16416 }
16417 | {
16418 readonly detail?: V2ThreadListResponse__ImageDetail | null;
16419 readonly type: "image";
16420 readonly url: string;
19174 readonly command: string;
19175 readonly name: string;
19176 readonly path: V2ThreadMetadataUpdateResponse__AbsolutePathBuf;
19177 readonly type: "read";
1642119178 }
19179 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
1642219180 | {
16423 readonly detail?: V2ThreadListResponse__ImageDetail | null;
16424 readonly path: string;
16425 readonly type: "localImage";
19181 readonly command: string;
19182 readonly path?: string | null;
19183 readonly query?: string | null;
19184 readonly type: "search";
1642619185 }
16427 | { readonly type: "audio"; readonly url: string }
16428 | { readonly path: string; readonly type: "localAudio" }
16429 | { readonly name: string; readonly path: string; readonly type: "skill" }
16430 | { readonly name: string; readonly path: string; readonly type: "mention" };
16431export const V2ThreadListResponse__UserInput = Schema.Union(
19186 | { readonly command: string; readonly type: "unknown" };
19187export const V2ThreadMetadataUpdateResponse__CommandAction = Schema.Union(
1643219188 [
1643319189 Schema.Struct({
16434 text: Schema.String,
16435 text_elements: Schema.optionalKey(
16436 Schema.Array(V2ThreadListResponse__TextElement).annotate({
16437 description: "UI-defined spans within `text` used to render or persist special elements.",
16438 default: [],
16439 }),
16440 ),
16441 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
16442 }).annotate({ title: "TextUserInput" }),
16443 Schema.Struct({
16444 detail: Schema.optionalKey(Schema.Union([V2ThreadListResponse__ImageDetail, Schema.Null])),
16445 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
16446 url: Schema.String,
16447 }).annotate({ title: "ImageUserInput" }),
16448 Schema.Struct({
16449 detail: Schema.optionalKey(Schema.Union([V2ThreadListResponse__ImageDetail, Schema.Null])),
16450 path: Schema.String,
16451 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
16452 }).annotate({ title: "LocalImageUserInput" }),
16453 Schema.Struct({
16454 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
16455 url: Schema.String,
16456 }).annotate({ title: "AudioUserInput" }),
19190 command: Schema.String,
19191 name: Schema.String,
19192 path: V2ThreadMetadataUpdateResponse__AbsolutePathBuf,
19193 type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
19194 }).annotate({ title: "ReadCommandAction" }),
1645719195 Schema.Struct({
16458 path: Schema.String,
16459 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
16460 }).annotate({ title: "LocalAudioUserInput" }),
19196 command: Schema.String,
19197 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19198 type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
19199 }).annotate({ title: "ListFilesCommandAction" }),
1646119200 Schema.Struct({
16462 name: Schema.String,
16463 path: Schema.String,
16464 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
16465 }).annotate({ title: "SkillUserInput" }),
19201 command: Schema.String,
19202 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19203 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19204 type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
19205 }).annotate({ title: "SearchCommandAction" }),
1646619206 Schema.Struct({
16467 name: Schema.String,
16468 path: Schema.String,
16469 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
16470 }).annotate({ title: "MentionUserInput" }),
19207 command: Schema.String,
19208 type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
19209 }).annotate({ title: "UnknownCommandAction" }),
1647119210 ],
1647219211 { mode: "oneOf" },
16473);
19212).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CommandAction" });
1647419213
16475export type V2ThreadListResponse__SubAgentSource =
19214export type V2ThreadMetadataUpdateResponse__SubAgentSource =
1647619215 | "review"
1647719216 | "compact"
1647819217 | "memory_consolidation"
1647919218 | {
1648019219 readonly thread_spawn: {
1648119220 readonly agent_nickname?: string | null;
16482 readonly agent_path?: V2ThreadListResponse__AgentPath | null;
19221 readonly agent_path?: V2ThreadMetadataUpdateResponse__AgentPath | null;
1648319222 readonly agent_role?: string | null;
1648419223 readonly depth: number;
16485 readonly parent_thread_id: V2ThreadListResponse__ThreadId;
19224 readonly parent_thread_id: V2ThreadMetadataUpdateResponse__ThreadId;
1648619225 };
1648719226 }
1648819227 | { readonly other: string };
16489export const V2ThreadListResponse__SubAgentSource = Schema.Union(
19228export const V2ThreadMetadataUpdateResponse__SubAgentSource = Schema.Union(
1649019229 [
1649119230 Schema.Literals(["review", "compact", "memory_consolidation"]),
1649219231 Schema.Struct({
1649319232 thread_spawn: Schema.Struct({
1649419233 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1649519234 agent_path: Schema.optionalKey(
16496 Schema.Union([V2ThreadListResponse__AgentPath, Schema.Null]),
19235 Schema.Union([V2ThreadMetadataUpdateResponse__AgentPath, Schema.Null]),
1649719236 ),
1649819237 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16499 depth: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
16500 parent_thread_id: V2ThreadListResponse__ThreadId,
19238 depth: Schema.Number.annotate({ format: "int32" }).check(
19239 Schema.isInt().annotate({ expected: "an integer" }),
19240 ),
19241 parent_thread_id: V2ThreadMetadataUpdateResponse__ThreadId,
1650119242 }),
1650219243 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
1650319244 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
1650419245 ],
1650519246 { mode: "oneOf" },
16506);
19247).annotate({ identifier: "V2ThreadMetadataUpdateResponse__SubAgentSource" });
1650719248
16508export type V2ThreadMetadataUpdateResponse__CommandAction =
16509 | {
16510 readonly command: string;
16511 readonly name: string;
16512 readonly path: V2ThreadMetadataUpdateResponse__AbsolutePathBuf;
16513 readonly type: "read";
16514 }
16515 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
19249export type V2ThreadMetadataUpdateResponse__ThreadStatus =
19250 | { readonly type: "notLoaded" }
19251 | { readonly type: "idle" }
19252 | { readonly type: "systemError" }
1651619253 | {
16517 readonly command: string;
16518 readonly path?: string | null;
16519 readonly query?: string | null;
16520 readonly type: "search";
16521 }
16522 | { readonly command: string; readonly type: "unknown" };
16523export const V2ThreadMetadataUpdateResponse__CommandAction = Schema.Union(
19254 readonly activeFlags: ReadonlyArray<V2ThreadMetadataUpdateResponse__ThreadActiveFlag>;
19255 readonly type: "active";
19256 };
19257export const V2ThreadMetadataUpdateResponse__ThreadStatus = Schema.Union(
1652419258 [
1652519259 Schema.Struct({
16526 command: Schema.String,
16527 name: Schema.String,
16528 path: V2ThreadMetadataUpdateResponse__AbsolutePathBuf,
16529 type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
16530 }).annotate({ title: "ReadCommandAction" }),
19260 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
19261 }).annotate({ title: "NotLoadedThreadStatus" }),
1653119262 Schema.Struct({
16532 command: Schema.String,
16533 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16534 type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
16535 }).annotate({ title: "ListFilesCommandAction" }),
19263 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
19264 }).annotate({ title: "IdleThreadStatus" }),
1653619265 Schema.Struct({
16537 command: Schema.String,
16538 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16539 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16540 type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
16541 }).annotate({ title: "SearchCommandAction" }),
19266 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
19267 }).annotate({ title: "SystemErrorThreadStatus" }),
1654219268 Schema.Struct({
16543 command: Schema.String,
16544 type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
16545 }).annotate({ title: "UnknownCommandAction" }),
19269 activeFlags: Schema.Array(V2ThreadMetadataUpdateResponse__ThreadActiveFlag),
19270 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
19271 }).annotate({ title: "ActiveThreadStatus" }),
1654619272 ],
1654719273 { mode: "oneOf" },
16548);
16549
16550export type V2ThreadMetadataUpdateResponse__CollabAgentState = {
16551 readonly message?: string | null;
16552 readonly status: V2ThreadMetadataUpdateResponse__CollabAgentStatus;
16553};
16554export const V2ThreadMetadataUpdateResponse__CollabAgentState = Schema.Struct({
16555 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16556 status: V2ThreadMetadataUpdateResponse__CollabAgentStatus,
16557});
16558
16559export type V2ThreadMetadataUpdateResponse__MemoryCitation = {
16560 readonly entries: ReadonlyArray<V2ThreadMetadataUpdateResponse__MemoryCitationEntry>;
16561 readonly threadIds: ReadonlyArray<string>;
16562};
16563export const V2ThreadMetadataUpdateResponse__MemoryCitation = Schema.Struct({
16564 entries: Schema.Array(V2ThreadMetadataUpdateResponse__MemoryCitationEntry),
16565 threadIds: Schema.Array(Schema.String),
16566});
19274).annotate({ identifier: "V2ThreadMetadataUpdateResponse__ThreadStatus" });
1656719275
1656819276export type V2ThreadMetadataUpdateResponse__CodexErrorInfo =
1656919277 | "contextWindowExceeded"
......@@ -16606,8 +19314,12 @@ export const V2ThreadMetadataUpdateResponse__CodexErrorInfo = Schema.Union(
1660619314 httpStatusCode: Schema.optionalKey(
1660719315 Schema.Union([
1660819316 Schema.Number.annotate({ format: "uint16" })
16609 .check(Schema.isInt())
16610 .check(Schema.isGreaterThanOrEqualTo(0)),
19317 .check(Schema.isInt().annotate({ expected: "an integer" }))
19318 .check(
19319 Schema.isGreaterThanOrEqualTo(0).annotate({
19320 expected: "a value greater than or equal to 0",
19321 }),
19322 ),
1661119323 Schema.Null,
1661219324 ]),
1661319325 ),
......@@ -16618,8 +19330,12 @@ export const V2ThreadMetadataUpdateResponse__CodexErrorInfo = Schema.Union(
1661819330 httpStatusCode: Schema.optionalKey(
1661919331 Schema.Union([
1662019332 Schema.Number.annotate({ format: "uint16" })
16621 .check(Schema.isInt())
16622 .check(Schema.isGreaterThanOrEqualTo(0)),
19333 .check(Schema.isInt().annotate({ expected: "an integer" }))
19334 .check(
19335 Schema.isGreaterThanOrEqualTo(0).annotate({
19336 expected: "a value greater than or equal to 0",
19337 }),
19338 ),
1662319339 Schema.Null,
1662419340 ]),
1662519341 ),
......@@ -16633,8 +19349,12 @@ export const V2ThreadMetadataUpdateResponse__CodexErrorInfo = Schema.Union(
1663319349 httpStatusCode: Schema.optionalKey(
1663419350 Schema.Union([
1663519351 Schema.Number.annotate({ format: "uint16" })
16636 .check(Schema.isInt())
16637 .check(Schema.isGreaterThanOrEqualTo(0)),
19352 .check(Schema.isInt().annotate({ expected: "an integer" }))
19353 .check(
19354 Schema.isGreaterThanOrEqualTo(0).annotate({
19355 expected: "a value greater than or equal to 0",
19356 }),
19357 ),
1663819358 Schema.Null,
1663919359 ]),
1664019360 ),
......@@ -16649,8 +19369,12 @@ export const V2ThreadMetadataUpdateResponse__CodexErrorInfo = Schema.Union(
1664919369 httpStatusCode: Schema.optionalKey(
1665019370 Schema.Union([
1665119371 Schema.Number.annotate({ format: "uint16" })
16652 .check(Schema.isInt())
16653 .check(Schema.isGreaterThanOrEqualTo(0)),
19372 .check(Schema.isInt().annotate({ expected: "an integer" }))
19373 .check(
19374 Schema.isGreaterThanOrEqualTo(0).annotate({
19375 expected: "a value greater than or equal to 0",
19376 }),
19377 ),
1665419378 Schema.Null,
1665519379 ]),
1665619380 ),
......@@ -16673,8 +19397,37 @@ export const V2ThreadMetadataUpdateResponse__CodexErrorInfo = Schema.Union(
1667319397).annotate({
1667419398 description:
1667519399 "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.",
19400 identifier: "V2ThreadMetadataUpdateResponse__CodexErrorInfo",
1667619401});
1667719402
19403export type V2ThreadMetadataUpdateResponse__TextElement = {
19404 readonly byteRange: V2ThreadMetadataUpdateResponse__ByteRange;
19405 readonly placeholder?: string | null;
19406};
19407export const V2ThreadMetadataUpdateResponse__TextElement = Schema.Struct({
19408 byteRange: Schema.suspend(
19409 (): Schema.Codec<V2ThreadMetadataUpdateResponse__ByteRange> =>
19410 V2ThreadMetadataUpdateResponse__ByteRange,
19411 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
19412 placeholder: Schema.optionalKey(
19413 Schema.Union([
19414 Schema.String.annotate({
19415 description: "Optional human-readable placeholder for the element, displayed in the UI.",
19416 }),
19417 Schema.Null,
19418 ]),
19419 ),
19420}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__TextElement" });
19421
19422export type V2ThreadMetadataUpdateResponse__MemoryCitation = {
19423 readonly entries: ReadonlyArray<V2ThreadMetadataUpdateResponse__MemoryCitationEntry>;
19424 readonly threadIds: ReadonlyArray<string>;
19425};
19426export const V2ThreadMetadataUpdateResponse__MemoryCitation = Schema.Struct({
19427 entries: Schema.Array(V2ThreadMetadataUpdateResponse__MemoryCitationEntry),
19428 threadIds: Schema.Array(Schema.String),
19429}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__MemoryCitation" });
19430
1667819431export type V2ThreadMetadataUpdateResponse__FileUpdateChange = {
1667919432 readonly diff: string;
1668019433 readonly kind: V2ThreadMetadataUpdateResponse__PatchChangeKind;
......@@ -16684,168 +19437,120 @@ export const V2ThreadMetadataUpdateResponse__FileUpdateChange = Schema.Struct({
1668419437 diff: Schema.String,
1668519438 kind: V2ThreadMetadataUpdateResponse__PatchChangeKind,
1668619439 path: Schema.String,
16687});
19440}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__FileUpdateChange" });
1668819441
16689export type V2ThreadMetadataUpdateResponse__UserInput =
16690 | {
16691 readonly text: string;
16692 readonly text_elements?: ReadonlyArray<V2ThreadMetadataUpdateResponse__TextElement>;
16693 readonly type: "text";
16694 }
19442export type V2ThreadMetadataUpdateResponse__CollabAgentState = {
19443 readonly message?: string | null;
19444 readonly status: V2ThreadMetadataUpdateResponse__CollabAgentStatus;
19445};
19446export const V2ThreadMetadataUpdateResponse__CollabAgentState = Schema.Struct({
19447 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19448 status: V2ThreadMetadataUpdateResponse__CollabAgentStatus,
19449}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CollabAgentState" });
19450
19451export type V2ThreadReadResponse__CommandAction =
1669519452 | {
16696 readonly detail?: V2ThreadMetadataUpdateResponse__ImageDetail | null;
16697 readonly type: "image";
16698 readonly url: string;
19453 readonly command: string;
19454 readonly name: string;
19455 readonly path: V2ThreadReadResponse__AbsolutePathBuf;
19456 readonly type: "read";
1669919457 }
19458 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
1670019459 | {
16701 readonly detail?: V2ThreadMetadataUpdateResponse__ImageDetail | null;
16702 readonly path: string;
16703 readonly type: "localImage";
19460 readonly command: string;
19461 readonly path?: string | null;
19462 readonly query?: string | null;
19463 readonly type: "search";
1670419464 }
16705 | { readonly type: "audio"; readonly url: string }
16706 | { readonly path: string; readonly type: "localAudio" }
16707 | { readonly name: string; readonly path: string; readonly type: "skill" }
16708 | { readonly name: string; readonly path: string; readonly type: "mention" };
16709export const V2ThreadMetadataUpdateResponse__UserInput = Schema.Union(
19465 | { readonly command: string; readonly type: "unknown" };
19466export const V2ThreadReadResponse__CommandAction = Schema.Union(
1671019467 [
1671119468 Schema.Struct({
16712 text: Schema.String,
16713 text_elements: Schema.optionalKey(
16714 Schema.Array(V2ThreadMetadataUpdateResponse__TextElement).annotate({
16715 description: "UI-defined spans within `text` used to render or persist special elements.",
16716 default: [],
16717 }),
16718 ),
16719 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
16720 }).annotate({ title: "TextUserInput" }),
16721 Schema.Struct({
16722 detail: Schema.optionalKey(
16723 Schema.Union([V2ThreadMetadataUpdateResponse__ImageDetail, Schema.Null]),
16724 ),
16725 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
16726 url: Schema.String,
16727 }).annotate({ title: "ImageUserInput" }),
16728 Schema.Struct({
16729 detail: Schema.optionalKey(
16730 Schema.Union([V2ThreadMetadataUpdateResponse__ImageDetail, Schema.Null]),
16731 ),
16732 path: Schema.String,
16733 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
16734 }).annotate({ title: "LocalImageUserInput" }),
16735 Schema.Struct({
16736 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
16737 url: Schema.String,
16738 }).annotate({ title: "AudioUserInput" }),
19469 command: Schema.String,
19470 name: Schema.String,
19471 path: V2ThreadReadResponse__AbsolutePathBuf,
19472 type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
19473 }).annotate({ title: "ReadCommandAction" }),
1673919474 Schema.Struct({
16740 path: Schema.String,
16741 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
16742 }).annotate({ title: "LocalAudioUserInput" }),
19475 command: Schema.String,
19476 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19477 type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
19478 }).annotate({ title: "ListFilesCommandAction" }),
1674319479 Schema.Struct({
16744 name: Schema.String,
16745 path: Schema.String,
16746 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
16747 }).annotate({ title: "SkillUserInput" }),
19480 command: Schema.String,
19481 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19482 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19483 type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
19484 }).annotate({ title: "SearchCommandAction" }),
1674819485 Schema.Struct({
16749 name: Schema.String,
16750 path: Schema.String,
16751 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
16752 }).annotate({ title: "MentionUserInput" }),
19486 command: Schema.String,
19487 type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
19488 }).annotate({ title: "UnknownCommandAction" }),
1675319489 ],
1675419490 { mode: "oneOf" },
16755);
19491).annotate({ identifier: "V2ThreadReadResponse__CommandAction" });
1675619492
16757export type V2ThreadMetadataUpdateResponse__SubAgentSource =
19493export type V2ThreadReadResponse__SubAgentSource =
1675819494 | "review"
1675919495 | "compact"
1676019496 | "memory_consolidation"
1676119497 | {
1676219498 readonly thread_spawn: {
1676319499 readonly agent_nickname?: string | null;
16764 readonly agent_path?: V2ThreadMetadataUpdateResponse__AgentPath | null;
19500 readonly agent_path?: V2ThreadReadResponse__AgentPath | null;
1676519501 readonly agent_role?: string | null;
1676619502 readonly depth: number;
16767 readonly parent_thread_id: V2ThreadMetadataUpdateResponse__ThreadId;
19503 readonly parent_thread_id: V2ThreadReadResponse__ThreadId;
1676819504 };
1676919505 }
1677019506 | { readonly other: string };
16771export const V2ThreadMetadataUpdateResponse__SubAgentSource = Schema.Union(
19507export const V2ThreadReadResponse__SubAgentSource = Schema.Union(
1677219508 [
1677319509 Schema.Literals(["review", "compact", "memory_consolidation"]),
1677419510 Schema.Struct({
1677519511 thread_spawn: Schema.Struct({
1677619512 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1677719513 agent_path: Schema.optionalKey(
16778 Schema.Union([V2ThreadMetadataUpdateResponse__AgentPath, Schema.Null]),
19514 Schema.Union([V2ThreadReadResponse__AgentPath, Schema.Null]),
1677919515 ),
1678019516 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16781 depth: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
16782 parent_thread_id: V2ThreadMetadataUpdateResponse__ThreadId,
19517 depth: Schema.Number.annotate({ format: "int32" }).check(
19518 Schema.isInt().annotate({ expected: "an integer" }),
19519 ),
19520 parent_thread_id: V2ThreadReadResponse__ThreadId,
1678319521 }),
1678419522 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
1678519523 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
1678619524 ],
1678719525 { mode: "oneOf" },
16788);
19526).annotate({ identifier: "V2ThreadReadResponse__SubAgentSource" });
1678919527
16790export type V2ThreadReadResponse__CommandAction =
16791 | {
16792 readonly command: string;
16793 readonly name: string;
16794 readonly path: V2ThreadReadResponse__AbsolutePathBuf;
16795 readonly type: "read";
16796 }
16797 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
19528export type V2ThreadReadResponse__ThreadStatus =
19529 | { readonly type: "notLoaded" }
19530 | { readonly type: "idle" }
19531 | { readonly type: "systemError" }
1679819532 | {
16799 readonly command: string;
16800 readonly path?: string | null;
16801 readonly query?: string | null;
16802 readonly type: "search";
16803 }
16804 | { readonly command: string; readonly type: "unknown" };
16805export const V2ThreadReadResponse__CommandAction = Schema.Union(
19533 readonly activeFlags: ReadonlyArray<V2ThreadReadResponse__ThreadActiveFlag>;
19534 readonly type: "active";
19535 };
19536export const V2ThreadReadResponse__ThreadStatus = Schema.Union(
1680619537 [
1680719538 Schema.Struct({
16808 command: Schema.String,
16809 name: Schema.String,
16810 path: V2ThreadReadResponse__AbsolutePathBuf,
16811 type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
16812 }).annotate({ title: "ReadCommandAction" }),
19539 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
19540 }).annotate({ title: "NotLoadedThreadStatus" }),
1681319541 Schema.Struct({
16814 command: Schema.String,
16815 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16816 type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
16817 }).annotate({ title: "ListFilesCommandAction" }),
19542 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
19543 }).annotate({ title: "IdleThreadStatus" }),
1681819544 Schema.Struct({
16819 command: Schema.String,
16820 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16821 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16822 type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
16823 }).annotate({ title: "SearchCommandAction" }),
19545 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
19546 }).annotate({ title: "SystemErrorThreadStatus" }),
1682419547 Schema.Struct({
16825 command: Schema.String,
16826 type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
16827 }).annotate({ title: "UnknownCommandAction" }),
19548 activeFlags: Schema.Array(V2ThreadReadResponse__ThreadActiveFlag),
19549 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
19550 }).annotate({ title: "ActiveThreadStatus" }),
1682819551 ],
1682919552 { mode: "oneOf" },
16830);
16831
16832export type V2ThreadReadResponse__CollabAgentState = {
16833 readonly message?: string | null;
16834 readonly status: V2ThreadReadResponse__CollabAgentStatus;
16835};
16836export const V2ThreadReadResponse__CollabAgentState = Schema.Struct({
16837 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16838 status: V2ThreadReadResponse__CollabAgentStatus,
16839});
16840
16841export type V2ThreadReadResponse__MemoryCitation = {
16842 readonly entries: ReadonlyArray<V2ThreadReadResponse__MemoryCitationEntry>;
16843 readonly threadIds: ReadonlyArray<string>;
16844};
16845export const V2ThreadReadResponse__MemoryCitation = Schema.Struct({
16846 entries: Schema.Array(V2ThreadReadResponse__MemoryCitationEntry),
16847 threadIds: Schema.Array(Schema.String),
16848});
19553).annotate({ identifier: "V2ThreadReadResponse__ThreadStatus" });
1684919554
1685019555export type V2ThreadReadResponse__CodexErrorInfo =
1685119556 | "contextWindowExceeded"
......@@ -16892,8 +19597,12 @@ export const V2ThreadReadResponse__CodexErrorInfo = Schema.Union(
1689219597 httpStatusCode: Schema.optionalKey(
1689319598 Schema.Union([
1689419599 Schema.Number.annotate({ format: "uint16" })
16895 .check(Schema.isInt())
16896 .check(Schema.isGreaterThanOrEqualTo(0)),
19600 .check(Schema.isInt().annotate({ expected: "an integer" }))
19601 .check(
19602 Schema.isGreaterThanOrEqualTo(0).annotate({
19603 expected: "a value greater than or equal to 0",
19604 }),
19605 ),
1689719606 Schema.Null,
1689819607 ]),
1689919608 ),
......@@ -16904,8 +19613,12 @@ export const V2ThreadReadResponse__CodexErrorInfo = Schema.Union(
1690419613 httpStatusCode: Schema.optionalKey(
1690519614 Schema.Union([
1690619615 Schema.Number.annotate({ format: "uint16" })
16907 .check(Schema.isInt())
16908 .check(Schema.isGreaterThanOrEqualTo(0)),
19616 .check(Schema.isInt().annotate({ expected: "an integer" }))
19617 .check(
19618 Schema.isGreaterThanOrEqualTo(0).annotate({
19619 expected: "a value greater than or equal to 0",
19620 }),
19621 ),
1690919622 Schema.Null,
1691019623 ]),
1691119624 ),
......@@ -16919,8 +19632,12 @@ export const V2ThreadReadResponse__CodexErrorInfo = Schema.Union(
1691919632 httpStatusCode: Schema.optionalKey(
1692019633 Schema.Union([
1692119634 Schema.Number.annotate({ format: "uint16" })
16922 .check(Schema.isInt())
16923 .check(Schema.isGreaterThanOrEqualTo(0)),
19635 .check(Schema.isInt().annotate({ expected: "an integer" }))
19636 .check(
19637 Schema.isGreaterThanOrEqualTo(0).annotate({
19638 expected: "a value greater than or equal to 0",
19639 }),
19640 ),
1692419641 Schema.Null,
1692519642 ]),
1692619643 ),
......@@ -16935,8 +19652,12 @@ export const V2ThreadReadResponse__CodexErrorInfo = Schema.Union(
1693519652 httpStatusCode: Schema.optionalKey(
1693619653 Schema.Union([
1693719654 Schema.Number.annotate({ format: "uint16" })
16938 .check(Schema.isInt())
16939 .check(Schema.isGreaterThanOrEqualTo(0)),
19655 .check(Schema.isInt().annotate({ expected: "an integer" }))
19656 .check(
19657 Schema.isGreaterThanOrEqualTo(0).annotate({
19658 expected: "a value greater than or equal to 0",
19659 }),
19660 ),
1694019661 Schema.Null,
1694119662 ]),
1694219663 ),
......@@ -16959,8 +19680,36 @@ export const V2ThreadReadResponse__CodexErrorInfo = Schema.Union(
1695919680).annotate({
1696019681 description:
1696119682 "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.",
19683 identifier: "V2ThreadReadResponse__CodexErrorInfo",
1696219684});
1696319685
19686export type V2ThreadReadResponse__TextElement = {
19687 readonly byteRange: V2ThreadReadResponse__ByteRange;
19688 readonly placeholder?: string | null;
19689};
19690export const V2ThreadReadResponse__TextElement = Schema.Struct({
19691 byteRange: Schema.suspend(
19692 (): Schema.Codec<V2ThreadReadResponse__ByteRange> => V2ThreadReadResponse__ByteRange,
19693 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
19694 placeholder: Schema.optionalKey(
19695 Schema.Union([
19696 Schema.String.annotate({
19697 description: "Optional human-readable placeholder for the element, displayed in the UI.",
19698 }),
19699 Schema.Null,
19700 ]),
19701 ),
19702}).annotate({ identifier: "V2ThreadReadResponse__TextElement" });
19703
19704export type V2ThreadReadResponse__MemoryCitation = {
19705 readonly entries: ReadonlyArray<V2ThreadReadResponse__MemoryCitationEntry>;
19706 readonly threadIds: ReadonlyArray<string>;
19707};
19708export const V2ThreadReadResponse__MemoryCitation = Schema.Struct({
19709 entries: Schema.Array(V2ThreadReadResponse__MemoryCitationEntry),
19710 threadIds: Schema.Array(Schema.String),
19711}).annotate({ identifier: "V2ThreadReadResponse__MemoryCitation" });
19712
1696419713export type V2ThreadReadResponse__FileUpdateChange = {
1696519714 readonly diff: string;
1696619715 readonly kind: V2ThreadReadResponse__PatchChangeKind;
......@@ -16970,104 +19719,60 @@ export const V2ThreadReadResponse__FileUpdateChange = Schema.Struct({
1697019719 diff: Schema.String,
1697119720 kind: V2ThreadReadResponse__PatchChangeKind,
1697219721 path: Schema.String,
16973});
19722}).annotate({ identifier: "V2ThreadReadResponse__FileUpdateChange" });
1697419723
16975export type V2ThreadReadResponse__UserInput =
16976 | {
16977 readonly text: string;
16978 readonly text_elements?: ReadonlyArray<V2ThreadReadResponse__TextElement>;
16979 readonly type: "text";
16980 }
16981 | {
16982 readonly detail?: V2ThreadReadResponse__ImageDetail | null;
16983 readonly type: "image";
16984 readonly url: string;
16985 }
19724export type V2ThreadReadResponse__CollabAgentState = {
19725 readonly message?: string | null;
19726 readonly status: V2ThreadReadResponse__CollabAgentStatus;
19727};
19728export const V2ThreadReadResponse__CollabAgentState = Schema.Struct({
19729 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19730 status: V2ThreadReadResponse__CollabAgentStatus,
19731}).annotate({ identifier: "V2ThreadReadResponse__CollabAgentState" });
19732
19733export type V2ThreadResumeParams__FunctionCallOutputContentItem =
19734 | { readonly text: string; readonly type: "input_text" }
1698619735 | {
16987 readonly detail?: V2ThreadReadResponse__ImageDetail | null;
16988 readonly path: string;
16989 readonly type: "localImage";
19736 readonly detail?: V2ThreadResumeParams__ImageDetail | null;
19737 readonly image_url: string;
19738 readonly type: "input_image";
1699019739 }
16991 | { readonly type: "audio"; readonly url: string }
16992 | { readonly path: string; readonly type: "localAudio" }
16993 | { readonly name: string; readonly path: string; readonly type: "skill" }
16994 | { readonly name: string; readonly path: string; readonly type: "mention" };
16995export const V2ThreadReadResponse__UserInput = Schema.Union(
19740 | { readonly audio_url: string; readonly type: "input_audio" }
19741 | { readonly encrypted_content: string; readonly type: "encrypted_content" };
19742export const V2ThreadResumeParams__FunctionCallOutputContentItem = Schema.Union(
1699619743 [
1699719744 Schema.Struct({
1699819745 text: Schema.String,
16999 text_elements: Schema.optionalKey(
17000 Schema.Array(V2ThreadReadResponse__TextElement).annotate({
17001 description: "UI-defined spans within `text` used to render or persist special elements.",
17002 default: [],
17003 }),
17004 ),
17005 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
17006 }).annotate({ title: "TextUserInput" }),
17007 Schema.Struct({
17008 detail: Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ImageDetail, Schema.Null])),
17009 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
17010 url: Schema.String,
17011 }).annotate({ title: "ImageUserInput" }),
17012 Schema.Struct({
17013 detail: Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ImageDetail, Schema.Null])),
17014 path: Schema.String,
17015 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
17016 }).annotate({ title: "LocalImageUserInput" }),
17017 Schema.Struct({
17018 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
17019 url: Schema.String,
17020 }).annotate({ title: "AudioUserInput" }),
17021 Schema.Struct({
17022 path: Schema.String,
17023 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
17024 }).annotate({ title: "LocalAudioUserInput" }),
19746 type: Schema.Literal("input_text").annotate({
19747 title: "InputTextFunctionCallOutputContentItemType",
19748 }),
19749 }).annotate({ title: "InputTextFunctionCallOutputContentItem" }),
1702519750 Schema.Struct({
17026 name: Schema.String,
17027 path: Schema.String,
17028 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
17029 }).annotate({ title: "SkillUserInput" }),
19751 detail: Schema.optionalKey(Schema.Union([V2ThreadResumeParams__ImageDetail, Schema.Null])),
19752 image_url: Schema.String,
19753 type: Schema.Literal("input_image").annotate({
19754 title: "InputImageFunctionCallOutputContentItemType",
19755 }),
19756 }).annotate({ title: "InputImageFunctionCallOutputContentItem" }),
1703019757 Schema.Struct({
17031 name: Schema.String,
17032 path: Schema.String,
17033 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
17034 }).annotate({ title: "MentionUserInput" }),
17035 ],
17036 { mode: "oneOf" },
17037);
17038
17039export type V2ThreadReadResponse__SubAgentSource =
17040 | "review"
17041 | "compact"
17042 | "memory_consolidation"
17043 | {
17044 readonly thread_spawn: {
17045 readonly agent_nickname?: string | null;
17046 readonly agent_path?: V2ThreadReadResponse__AgentPath | null;
17047 readonly agent_role?: string | null;
17048 readonly depth: number;
17049 readonly parent_thread_id: V2ThreadReadResponse__ThreadId;
17050 };
17051 }
17052 | { readonly other: string };
17053export const V2ThreadReadResponse__SubAgentSource = Schema.Union(
17054 [
17055 Schema.Literals(["review", "compact", "memory_consolidation"]),
19758 audio_url: Schema.String,
19759 type: Schema.Literal("input_audio").annotate({
19760 title: "InputAudioFunctionCallOutputContentItemType",
19761 }),
19762 }).annotate({ title: "InputAudioFunctionCallOutputContentItem" }),
1705619763 Schema.Struct({
17057 thread_spawn: Schema.Struct({
17058 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17059 agent_path: Schema.optionalKey(
17060 Schema.Union([V2ThreadReadResponse__AgentPath, Schema.Null]),
17061 ),
17062 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17063 depth: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
17064 parent_thread_id: V2ThreadReadResponse__ThreadId,
19764 encrypted_content: Schema.String,
19765 type: Schema.Literal("encrypted_content").annotate({
19766 title: "EncryptedContentFunctionCallOutputContentItemType",
1706519767 }),
17066 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
17067 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
19768 }).annotate({ title: "EncryptedContentFunctionCallOutputContentItem" }),
1706819769 ],
1706919770 { mode: "oneOf" },
17070);
19771).annotate({
19772 description:
19773 "Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs.",
19774 identifier: "V2ThreadResumeParams__FunctionCallOutputContentItem",
19775});
1707119776
1707219777export type V2ThreadResumeParams__ContentItem =
1707319778 | { readonly text: string; readonly type: "input_text" }
......@@ -17099,52 +19804,9 @@ export const V2ThreadResumeParams__ContentItem = Schema.Union(
1709919804 }).annotate({ title: "OutputTextContentItem" }),
1710019805 ],
1710119806 { mode: "oneOf" },
17102);
19807).annotate({ identifier: "V2ThreadResumeParams__ContentItem" });
1710319808
17104export type V2ThreadResumeParams__FunctionCallOutputContentItem =
17105 | { readonly text: string; readonly type: "input_text" }
17106 | {
17107 readonly detail?: V2ThreadResumeParams__ImageDetail | null;
17108 readonly image_url: string;
17109 readonly type: "input_image";
17110 }
17111 | { readonly audio_url: string; readonly type: "input_audio" }
17112 | { readonly encrypted_content: string; readonly type: "encrypted_content" };
17113export const V2ThreadResumeParams__FunctionCallOutputContentItem = Schema.Union(
17114 [
17115 Schema.Struct({
17116 text: Schema.String,
17117 type: Schema.Literal("input_text").annotate({
17118 title: "InputTextFunctionCallOutputContentItemType",
17119 }),
17120 }).annotate({ title: "InputTextFunctionCallOutputContentItem" }),
17121 Schema.Struct({
17122 detail: Schema.optionalKey(Schema.Union([V2ThreadResumeParams__ImageDetail, Schema.Null])),
17123 image_url: Schema.String,
17124 type: Schema.Literal("input_image").annotate({
17125 title: "InputImageFunctionCallOutputContentItemType",
17126 }),
17127 }).annotate({ title: "InputImageFunctionCallOutputContentItem" }),
17128 Schema.Struct({
17129 audio_url: Schema.String,
17130 type: Schema.Literal("input_audio").annotate({
17131 title: "InputAudioFunctionCallOutputContentItemType",
17132 }),
17133 }).annotate({ title: "InputAudioFunctionCallOutputContentItem" }),
17134 Schema.Struct({
17135 encrypted_content: Schema.String,
17136 type: Schema.Literal("encrypted_content").annotate({
17137 title: "EncryptedContentFunctionCallOutputContentItemType",
17138 }),
17139 }).annotate({ title: "EncryptedContentFunctionCallOutputContentItem" }),
17140 ],
17141 { mode: "oneOf" },
17142).annotate({
17143 description:
17144 "Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs.",
17145});
17146
17147export type V2ThreadResumeResponse__CommandAction =
19809export type V2ThreadResumeResponse__CommandAction =
1714819810 | {
1714919811 readonly command: string;
1715019812 readonly name: string;
......@@ -17184,25 +19846,118 @@ export const V2ThreadResumeResponse__CommandAction = Schema.Union(
1718419846 }).annotate({ title: "UnknownCommandAction" }),
1718519847 ],
1718619848 { mode: "oneOf" },
17187);
19849).annotate({ identifier: "V2ThreadResumeResponse__CommandAction" });
1718819850
17189export type V2ThreadResumeResponse__CollabAgentState = {
17190 readonly message?: string | null;
17191 readonly status: V2ThreadResumeResponse__CollabAgentStatus;
17192};
17193export const V2ThreadResumeResponse__CollabAgentState = Schema.Struct({
17194 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17195 status: V2ThreadResumeResponse__CollabAgentStatus,
17196});
19851export type V2ThreadResumeResponse__SandboxPolicy =
19852 | { readonly type: "dangerFullAccess" }
19853 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
19854 | {
19855 readonly networkAccess?: V2ThreadResumeResponse__NetworkAccess;
19856 readonly type: "externalSandbox";
19857 }
19858 | {
19859 readonly excludeSlashTmp?: boolean;
19860 readonly excludeTmpdirEnvVar?: boolean;
19861 readonly networkAccess?: boolean;
19862 readonly type: "workspaceWrite";
19863 readonly writableRoots?: ReadonlyArray<V2ThreadResumeResponse__AbsolutePathBuf>;
19864 };
19865export const V2ThreadResumeResponse__SandboxPolicy = Schema.Union(
19866 [
19867 Schema.Struct({
19868 type: Schema.Literal("dangerFullAccess").annotate({
19869 title: "DangerFullAccessSandboxPolicyType",
19870 }),
19871 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
19872 Schema.Struct({
19873 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
19874 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
19875 }).annotate({ title: "ReadOnlySandboxPolicy" }),
19876 Schema.Struct({
19877 networkAccess: Schema.optionalKey(
19878 Schema.suspend(
19879 (): Schema.Codec<V2ThreadResumeResponse__NetworkAccess> =>
19880 V2ThreadResumeResponse__NetworkAccess,
19881 ).annotate({ default: "restricted" }),
19882 ),
19883 type: Schema.Literal("externalSandbox").annotate({
19884 title: "ExternalSandboxSandboxPolicyType",
19885 }),
19886 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
19887 Schema.Struct({
19888 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
19889 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
19890 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
19891 type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
19892 writableRoots: Schema.optionalKey(
19893 Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }),
19894 ),
19895 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
19896 ],
19897 { mode: "oneOf" },
19898).annotate({ identifier: "V2ThreadResumeResponse__SandboxPolicy" });
1719719899
17198export type V2ThreadResumeResponse__MemoryCitation = {
17199 readonly entries: ReadonlyArray<V2ThreadResumeResponse__MemoryCitationEntry>;
17200 readonly threadIds: ReadonlyArray<string>;
17201};
17202export const V2ThreadResumeResponse__MemoryCitation = Schema.Struct({
17203 entries: Schema.Array(V2ThreadResumeResponse__MemoryCitationEntry),
17204 threadIds: Schema.Array(Schema.String),
17205});
19900export type V2ThreadResumeResponse__SubAgentSource =
19901 | "review"
19902 | "compact"
19903 | "memory_consolidation"
19904 | {
19905 readonly thread_spawn: {
19906 readonly agent_nickname?: string | null;
19907 readonly agent_path?: V2ThreadResumeResponse__AgentPath | null;
19908 readonly agent_role?: string | null;
19909 readonly depth: number;
19910 readonly parent_thread_id: V2ThreadResumeResponse__ThreadId;
19911 };
19912 }
19913 | { readonly other: string };
19914export const V2ThreadResumeResponse__SubAgentSource = Schema.Union(
19915 [
19916 Schema.Literals(["review", "compact", "memory_consolidation"]),
19917 Schema.Struct({
19918 thread_spawn: Schema.Struct({
19919 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19920 agent_path: Schema.optionalKey(
19921 Schema.Union([V2ThreadResumeResponse__AgentPath, Schema.Null]),
19922 ),
19923 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19924 depth: Schema.Number.annotate({ format: "int32" }).check(
19925 Schema.isInt().annotate({ expected: "an integer" }),
19926 ),
19927 parent_thread_id: V2ThreadResumeResponse__ThreadId,
19928 }),
19929 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
19930 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
19931 ],
19932 { mode: "oneOf" },
19933).annotate({ identifier: "V2ThreadResumeResponse__SubAgentSource" });
19934
19935export type V2ThreadResumeResponse__ThreadStatus =
19936 | { readonly type: "notLoaded" }
19937 | { readonly type: "idle" }
19938 | { readonly type: "systemError" }
19939 | {
19940 readonly activeFlags: ReadonlyArray<V2ThreadResumeResponse__ThreadActiveFlag>;
19941 readonly type: "active";
19942 };
19943export const V2ThreadResumeResponse__ThreadStatus = Schema.Union(
19944 [
19945 Schema.Struct({
19946 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
19947 }).annotate({ title: "NotLoadedThreadStatus" }),
19948 Schema.Struct({
19949 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
19950 }).annotate({ title: "IdleThreadStatus" }),
19951 Schema.Struct({
19952 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
19953 }).annotate({ title: "SystemErrorThreadStatus" }),
19954 Schema.Struct({
19955 activeFlags: Schema.Array(V2ThreadResumeResponse__ThreadActiveFlag),
19956 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
19957 }).annotate({ title: "ActiveThreadStatus" }),
19958 ],
19959 { mode: "oneOf" },
19960).annotate({ identifier: "V2ThreadResumeResponse__ThreadStatus" });
1720619961
1720719962export type V2ThreadResumeResponse__CodexErrorInfo =
1720819963 | "contextWindowExceeded"
......@@ -17249,8 +20004,12 @@ export const V2ThreadResumeResponse__CodexErrorInfo = Schema.Union(
1724920004 httpStatusCode: Schema.optionalKey(
1725020005 Schema.Union([
1725120006 Schema.Number.annotate({ format: "uint16" })
17252 .check(Schema.isInt())
17253 .check(Schema.isGreaterThanOrEqualTo(0)),
20007 .check(Schema.isInt().annotate({ expected: "an integer" }))
20008 .check(
20009 Schema.isGreaterThanOrEqualTo(0).annotate({
20010 expected: "a value greater than or equal to 0",
20011 }),
20012 ),
1725420013 Schema.Null,
1725520014 ]),
1725620015 ),
......@@ -17261,8 +20020,12 @@ export const V2ThreadResumeResponse__CodexErrorInfo = Schema.Union(
1726120020 httpStatusCode: Schema.optionalKey(
1726220021 Schema.Union([
1726320022 Schema.Number.annotate({ format: "uint16" })
17264 .check(Schema.isInt())
17265 .check(Schema.isGreaterThanOrEqualTo(0)),
20023 .check(Schema.isInt().annotate({ expected: "an integer" }))
20024 .check(
20025 Schema.isGreaterThanOrEqualTo(0).annotate({
20026 expected: "a value greater than or equal to 0",
20027 }),
20028 ),
1726620029 Schema.Null,
1726720030 ]),
1726820031 ),
......@@ -17276,8 +20039,12 @@ export const V2ThreadResumeResponse__CodexErrorInfo = Schema.Union(
1727620039 httpStatusCode: Schema.optionalKey(
1727720040 Schema.Union([
1727820041 Schema.Number.annotate({ format: "uint16" })
17279 .check(Schema.isInt())
17280 .check(Schema.isGreaterThanOrEqualTo(0)),
20042 .check(Schema.isInt().annotate({ expected: "an integer" }))
20043 .check(
20044 Schema.isGreaterThanOrEqualTo(0).annotate({
20045 expected: "a value greater than or equal to 0",
20046 }),
20047 ),
1728120048 Schema.Null,
1728220049 ]),
1728320050 ),
......@@ -17292,8 +20059,12 @@ export const V2ThreadResumeResponse__CodexErrorInfo = Schema.Union(
1729220059 httpStatusCode: Schema.optionalKey(
1729320060 Schema.Union([
1729420061 Schema.Number.annotate({ format: "uint16" })
17295 .check(Schema.isInt())
17296 .check(Schema.isGreaterThanOrEqualTo(0)),
20062 .check(Schema.isInt().annotate({ expected: "an integer" }))
20063 .check(
20064 Schema.isGreaterThanOrEqualTo(0).annotate({
20065 expected: "a value greater than or equal to 0",
20066 }),
20067 ),
1729720068 Schema.Null,
1729820069 ]),
1729920070 ),
......@@ -17316,8 +20087,36 @@ export const V2ThreadResumeResponse__CodexErrorInfo = Schema.Union(
1731620087).annotate({
1731720088 description:
1731820089 "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.",
20090 identifier: "V2ThreadResumeResponse__CodexErrorInfo",
1731920091});
1732020092
20093export type V2ThreadResumeResponse__TextElement = {
20094 readonly byteRange: V2ThreadResumeResponse__ByteRange;
20095 readonly placeholder?: string | null;
20096};
20097export const V2ThreadResumeResponse__TextElement = Schema.Struct({
20098 byteRange: Schema.suspend(
20099 (): Schema.Codec<V2ThreadResumeResponse__ByteRange> => V2ThreadResumeResponse__ByteRange,
20100 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
20101 placeholder: Schema.optionalKey(
20102 Schema.Union([
20103 Schema.String.annotate({
20104 description: "Optional human-readable placeholder for the element, displayed in the UI.",
20105 }),
20106 Schema.Null,
20107 ]),
20108 ),
20109}).annotate({ identifier: "V2ThreadResumeResponse__TextElement" });
20110
20111export type V2ThreadResumeResponse__MemoryCitation = {
20112 readonly entries: ReadonlyArray<V2ThreadResumeResponse__MemoryCitationEntry>;
20113 readonly threadIds: ReadonlyArray<string>;
20114};
20115export const V2ThreadResumeResponse__MemoryCitation = Schema.Struct({
20116 entries: Schema.Array(V2ThreadResumeResponse__MemoryCitationEntry),
20117 threadIds: Schema.Array(Schema.String),
20118}).annotate({ identifier: "V2ThreadResumeResponse__MemoryCitation" });
20119
1732120120export type V2ThreadResumeResponse__FileUpdateChange = {
1732220121 readonly diff: string;
1732320122 readonly kind: V2ThreadResumeResponse__PatchChangeKind;
......@@ -17327,164 +20126,120 @@ export const V2ThreadResumeResponse__FileUpdateChange = Schema.Struct({
1732720126 diff: Schema.String,
1732820127 kind: V2ThreadResumeResponse__PatchChangeKind,
1732920128 path: Schema.String,
17330});
20129}).annotate({ identifier: "V2ThreadResumeResponse__FileUpdateChange" });
1733120130
17332export type V2ThreadResumeResponse__UserInput =
17333 | {
17334 readonly text: string;
17335 readonly text_elements?: ReadonlyArray<V2ThreadResumeResponse__TextElement>;
17336 readonly type: "text";
17337 }
20131export type V2ThreadResumeResponse__CollabAgentState = {
20132 readonly message?: string | null;
20133 readonly status: V2ThreadResumeResponse__CollabAgentStatus;
20134};
20135export const V2ThreadResumeResponse__CollabAgentState = Schema.Struct({
20136 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20137 status: V2ThreadResumeResponse__CollabAgentStatus,
20138}).annotate({ identifier: "V2ThreadResumeResponse__CollabAgentState" });
20139
20140export type V2ThreadRollbackResponse__CommandAction =
1733820141 | {
17339 readonly detail?: V2ThreadResumeResponse__ImageDetail | null;
17340 readonly type: "image";
17341 readonly url: string;
20142 readonly command: string;
20143 readonly name: string;
20144 readonly path: V2ThreadRollbackResponse__AbsolutePathBuf;
20145 readonly type: "read";
1734220146 }
20147 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
1734320148 | {
17344 readonly detail?: V2ThreadResumeResponse__ImageDetail | null;
17345 readonly path: string;
17346 readonly type: "localImage";
20149 readonly command: string;
20150 readonly path?: string | null;
20151 readonly query?: string | null;
20152 readonly type: "search";
1734720153 }
17348 | { readonly type: "audio"; readonly url: string }
17349 | { readonly path: string; readonly type: "localAudio" }
17350 | { readonly name: string; readonly path: string; readonly type: "skill" }
17351 | { readonly name: string; readonly path: string; readonly type: "mention" };
17352export const V2ThreadResumeResponse__UserInput = Schema.Union(
20154 | { readonly command: string; readonly type: "unknown" };
20155export const V2ThreadRollbackResponse__CommandAction = Schema.Union(
1735320156 [
1735420157 Schema.Struct({
17355 text: Schema.String,
17356 text_elements: Schema.optionalKey(
17357 Schema.Array(V2ThreadResumeResponse__TextElement).annotate({
17358 description: "UI-defined spans within `text` used to render or persist special elements.",
17359 default: [],
17360 }),
17361 ),
17362 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
17363 }).annotate({ title: "TextUserInput" }),
17364 Schema.Struct({
17365 detail: Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ImageDetail, Schema.Null])),
17366 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
17367 url: Schema.String,
17368 }).annotate({ title: "ImageUserInput" }),
17369 Schema.Struct({
17370 detail: Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ImageDetail, Schema.Null])),
17371 path: Schema.String,
17372 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
17373 }).annotate({ title: "LocalImageUserInput" }),
17374 Schema.Struct({
17375 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
17376 url: Schema.String,
17377 }).annotate({ title: "AudioUserInput" }),
20158 command: Schema.String,
20159 name: Schema.String,
20160 path: V2ThreadRollbackResponse__AbsolutePathBuf,
20161 type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
20162 }).annotate({ title: "ReadCommandAction" }),
1737820163 Schema.Struct({
17379 path: Schema.String,
17380 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
17381 }).annotate({ title: "LocalAudioUserInput" }),
20164 command: Schema.String,
20165 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20166 type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
20167 }).annotate({ title: "ListFilesCommandAction" }),
1738220168 Schema.Struct({
17383 name: Schema.String,
17384 path: Schema.String,
17385 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
17386 }).annotate({ title: "SkillUserInput" }),
20169 command: Schema.String,
20170 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20171 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20172 type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
20173 }).annotate({ title: "SearchCommandAction" }),
1738720174 Schema.Struct({
17388 name: Schema.String,
17389 path: Schema.String,
17390 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
17391 }).annotate({ title: "MentionUserInput" }),
20175 command: Schema.String,
20176 type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
20177 }).annotate({ title: "UnknownCommandAction" }),
1739220178 ],
1739320179 { mode: "oneOf" },
17394);
20180).annotate({ identifier: "V2ThreadRollbackResponse__CommandAction" });
1739520181
17396export type V2ThreadResumeResponse__SubAgentSource =
20182export type V2ThreadRollbackResponse__SubAgentSource =
1739720183 | "review"
1739820184 | "compact"
1739920185 | "memory_consolidation"
1740020186 | {
1740120187 readonly thread_spawn: {
1740220188 readonly agent_nickname?: string | null;
17403 readonly agent_path?: V2ThreadResumeResponse__AgentPath | null;
20189 readonly agent_path?: V2ThreadRollbackResponse__AgentPath | null;
1740420190 readonly agent_role?: string | null;
1740520191 readonly depth: number;
17406 readonly parent_thread_id: V2ThreadResumeResponse__ThreadId;
20192 readonly parent_thread_id: V2ThreadRollbackResponse__ThreadId;
1740720193 };
1740820194 }
1740920195 | { readonly other: string };
17410export const V2ThreadResumeResponse__SubAgentSource = Schema.Union(
20196export const V2ThreadRollbackResponse__SubAgentSource = Schema.Union(
1741120197 [
1741220198 Schema.Literals(["review", "compact", "memory_consolidation"]),
1741320199 Schema.Struct({
1741420200 thread_spawn: Schema.Struct({
1741520201 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1741620202 agent_path: Schema.optionalKey(
17417 Schema.Union([V2ThreadResumeResponse__AgentPath, Schema.Null]),
20203 Schema.Union([V2ThreadRollbackResponse__AgentPath, Schema.Null]),
1741820204 ),
1741920205 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17420 depth: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
17421 parent_thread_id: V2ThreadResumeResponse__ThreadId,
20206 depth: Schema.Number.annotate({ format: "int32" }).check(
20207 Schema.isInt().annotate({ expected: "an integer" }),
20208 ),
20209 parent_thread_id: V2ThreadRollbackResponse__ThreadId,
1742220210 }),
1742320211 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
1742420212 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
1742520213 ],
1742620214 { mode: "oneOf" },
17427);
20215).annotate({ identifier: "V2ThreadRollbackResponse__SubAgentSource" });
1742820216
17429export type V2ThreadRollbackResponse__CommandAction =
17430 | {
17431 readonly command: string;
17432 readonly name: string;
17433 readonly path: V2ThreadRollbackResponse__AbsolutePathBuf;
17434 readonly type: "read";
17435 }
17436 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
20217export type V2ThreadRollbackResponse__ThreadStatus =
20218 | { readonly type: "notLoaded" }
20219 | { readonly type: "idle" }
20220 | { readonly type: "systemError" }
1743720221 | {
17438 readonly command: string;
17439 readonly path?: string | null;
17440 readonly query?: string | null;
17441 readonly type: "search";
17442 }
17443 | { readonly command: string; readonly type: "unknown" };
17444export const V2ThreadRollbackResponse__CommandAction = Schema.Union(
20222 readonly activeFlags: ReadonlyArray<V2ThreadRollbackResponse__ThreadActiveFlag>;
20223 readonly type: "active";
20224 };
20225export const V2ThreadRollbackResponse__ThreadStatus = Schema.Union(
1744520226 [
1744620227 Schema.Struct({
17447 command: Schema.String,
17448 name: Schema.String,
17449 path: V2ThreadRollbackResponse__AbsolutePathBuf,
17450 type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
17451 }).annotate({ title: "ReadCommandAction" }),
20228 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
20229 }).annotate({ title: "NotLoadedThreadStatus" }),
1745220230 Schema.Struct({
17453 command: Schema.String,
17454 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17455 type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
17456 }).annotate({ title: "ListFilesCommandAction" }),
20231 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
20232 }).annotate({ title: "IdleThreadStatus" }),
1745720233 Schema.Struct({
17458 command: Schema.String,
17459 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17460 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17461 type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
17462 }).annotate({ title: "SearchCommandAction" }),
20234 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
20235 }).annotate({ title: "SystemErrorThreadStatus" }),
1746320236 Schema.Struct({
17464 command: Schema.String,
17465 type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
17466 }).annotate({ title: "UnknownCommandAction" }),
20237 activeFlags: Schema.Array(V2ThreadRollbackResponse__ThreadActiveFlag),
20238 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
20239 }).annotate({ title: "ActiveThreadStatus" }),
1746720240 ],
1746820241 { mode: "oneOf" },
17469);
17470
17471export type V2ThreadRollbackResponse__CollabAgentState = {
17472 readonly message?: string | null;
17473 readonly status: V2ThreadRollbackResponse__CollabAgentStatus;
17474};
17475export const V2ThreadRollbackResponse__CollabAgentState = Schema.Struct({
17476 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17477 status: V2ThreadRollbackResponse__CollabAgentStatus,
17478});
17479
17480export type V2ThreadRollbackResponse__MemoryCitation = {
17481 readonly entries: ReadonlyArray<V2ThreadRollbackResponse__MemoryCitationEntry>;
17482 readonly threadIds: ReadonlyArray<string>;
17483};
17484export const V2ThreadRollbackResponse__MemoryCitation = Schema.Struct({
17485 entries: Schema.Array(V2ThreadRollbackResponse__MemoryCitationEntry),
17486 threadIds: Schema.Array(Schema.String),
17487});
20242).annotate({ identifier: "V2ThreadRollbackResponse__ThreadStatus" });
1748820243
1748920244export type V2ThreadRollbackResponse__CodexErrorInfo =
1749020245 | "contextWindowExceeded"
......@@ -17531,8 +20286,12 @@ export const V2ThreadRollbackResponse__CodexErrorInfo = Schema.Union(
1753120286 httpStatusCode: Schema.optionalKey(
1753220287 Schema.Union([
1753320288 Schema.Number.annotate({ format: "uint16" })
17534 .check(Schema.isInt())
17535 .check(Schema.isGreaterThanOrEqualTo(0)),
20289 .check(Schema.isInt().annotate({ expected: "an integer" }))
20290 .check(
20291 Schema.isGreaterThanOrEqualTo(0).annotate({
20292 expected: "a value greater than or equal to 0",
20293 }),
20294 ),
1753620295 Schema.Null,
1753720296 ]),
1753820297 ),
......@@ -17543,8 +20302,12 @@ export const V2ThreadRollbackResponse__CodexErrorInfo = Schema.Union(
1754320302 httpStatusCode: Schema.optionalKey(
1754420303 Schema.Union([
1754520304 Schema.Number.annotate({ format: "uint16" })
17546 .check(Schema.isInt())
17547 .check(Schema.isGreaterThanOrEqualTo(0)),
20305 .check(Schema.isInt().annotate({ expected: "an integer" }))
20306 .check(
20307 Schema.isGreaterThanOrEqualTo(0).annotate({
20308 expected: "a value greater than or equal to 0",
20309 }),
20310 ),
1754820311 Schema.Null,
1754920312 ]),
1755020313 ),
......@@ -17558,8 +20321,12 @@ export const V2ThreadRollbackResponse__CodexErrorInfo = Schema.Union(
1755820321 httpStatusCode: Schema.optionalKey(
1755920322 Schema.Union([
1756020323 Schema.Number.annotate({ format: "uint16" })
17561 .check(Schema.isInt())
17562 .check(Schema.isGreaterThanOrEqualTo(0)),
20324 .check(Schema.isInt().annotate({ expected: "an integer" }))
20325 .check(
20326 Schema.isGreaterThanOrEqualTo(0).annotate({
20327 expected: "a value greater than or equal to 0",
20328 }),
20329 ),
1756320330 Schema.Null,
1756420331 ]),
1756520332 ),
......@@ -17574,8 +20341,12 @@ export const V2ThreadRollbackResponse__CodexErrorInfo = Schema.Union(
1757420341 httpStatusCode: Schema.optionalKey(
1757520342 Schema.Union([
1757620343 Schema.Number.annotate({ format: "uint16" })
17577 .check(Schema.isInt())
17578 .check(Schema.isGreaterThanOrEqualTo(0)),
20344 .check(Schema.isInt().annotate({ expected: "an integer" }))
20345 .check(
20346 Schema.isGreaterThanOrEqualTo(0).annotate({
20347 expected: "a value greater than or equal to 0",
20348 }),
20349 ),
1757920350 Schema.Null,
1758020351 ]),
1758120352 ),
......@@ -17598,8 +20369,36 @@ export const V2ThreadRollbackResponse__CodexErrorInfo = Schema.Union(
1759820369).annotate({
1759920370 description:
1760020371 "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.",
20372 identifier: "V2ThreadRollbackResponse__CodexErrorInfo",
1760120373});
1760220374
20375export type V2ThreadRollbackResponse__TextElement = {
20376 readonly byteRange: V2ThreadRollbackResponse__ByteRange;
20377 readonly placeholder?: string | null;
20378};
20379export const V2ThreadRollbackResponse__TextElement = Schema.Struct({
20380 byteRange: Schema.suspend(
20381 (): Schema.Codec<V2ThreadRollbackResponse__ByteRange> => V2ThreadRollbackResponse__ByteRange,
20382 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
20383 placeholder: Schema.optionalKey(
20384 Schema.Union([
20385 Schema.String.annotate({
20386 description: "Optional human-readable placeholder for the element, displayed in the UI.",
20387 }),
20388 Schema.Null,
20389 ]),
20390 ),
20391}).annotate({ identifier: "V2ThreadRollbackResponse__TextElement" });
20392
20393export type V2ThreadRollbackResponse__MemoryCitation = {
20394 readonly entries: ReadonlyArray<V2ThreadRollbackResponse__MemoryCitationEntry>;
20395 readonly threadIds: ReadonlyArray<string>;
20396};
20397export const V2ThreadRollbackResponse__MemoryCitation = Schema.Struct({
20398 entries: Schema.Array(V2ThreadRollbackResponse__MemoryCitationEntry),
20399 threadIds: Schema.Array(Schema.String),
20400}).annotate({ identifier: "V2ThreadRollbackResponse__MemoryCitation" });
20401
1760320402export type V2ThreadRollbackResponse__FileUpdateChange = {
1760420403 readonly diff: string;
1760520404 readonly kind: V2ThreadRollbackResponse__PatchChangeKind;
......@@ -17609,113 +20408,40 @@ export const V2ThreadRollbackResponse__FileUpdateChange = Schema.Struct({
1760920408 diff: Schema.String,
1761020409 kind: V2ThreadRollbackResponse__PatchChangeKind,
1761120410 path: Schema.String,
17612});
20411}).annotate({ identifier: "V2ThreadRollbackResponse__FileUpdateChange" });
1761320412
17614export type V2ThreadRollbackResponse__UserInput =
17615 | {
17616 readonly text: string;
17617 readonly text_elements?: ReadonlyArray<V2ThreadRollbackResponse__TextElement>;
17618 readonly type: "text";
17619 }
17620 | {
17621 readonly detail?: V2ThreadRollbackResponse__ImageDetail | null;
17622 readonly type: "image";
17623 readonly url: string;
17624 }
17625 | {
17626 readonly detail?: V2ThreadRollbackResponse__ImageDetail | null;
17627 readonly path: string;
17628 readonly type: "localImage";
17629 }
17630 | { readonly type: "audio"; readonly url: string }
17631 | { readonly path: string; readonly type: "localAudio" }
17632 | { readonly name: string; readonly path: string; readonly type: "skill" }
17633 | { readonly name: string; readonly path: string; readonly type: "mention" };
17634export const V2ThreadRollbackResponse__UserInput = Schema.Union(
17635 [
17636 Schema.Struct({
17637 text: Schema.String,
17638 text_elements: Schema.optionalKey(
17639 Schema.Array(V2ThreadRollbackResponse__TextElement).annotate({
17640 description: "UI-defined spans within `text` used to render or persist special elements.",
17641 default: [],
17642 }),
17643 ),
17644 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
17645 }).annotate({ title: "TextUserInput" }),
17646 Schema.Struct({
17647 detail: Schema.optionalKey(
17648 Schema.Union([V2ThreadRollbackResponse__ImageDetail, Schema.Null]),
17649 ),
17650 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
17651 url: Schema.String,
17652 }).annotate({ title: "ImageUserInput" }),
17653 Schema.Struct({
17654 detail: Schema.optionalKey(
17655 Schema.Union([V2ThreadRollbackResponse__ImageDetail, Schema.Null]),
17656 ),
17657 path: Schema.String,
17658 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
17659 }).annotate({ title: "LocalImageUserInput" }),
17660 Schema.Struct({
17661 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
17662 url: Schema.String,
17663 }).annotate({ title: "AudioUserInput" }),
17664 Schema.Struct({
17665 path: Schema.String,
17666 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
17667 }).annotate({ title: "LocalAudioUserInput" }),
17668 Schema.Struct({
17669 name: Schema.String,
17670 path: Schema.String,
17671 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
17672 }).annotate({ title: "SkillUserInput" }),
17673 Schema.Struct({
17674 name: Schema.String,
17675 path: Schema.String,
17676 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
17677 }).annotate({ title: "MentionUserInput" }),
17678 ],
17679 { mode: "oneOf" },
17680);
20413export type V2ThreadRollbackResponse__CollabAgentState = {
20414 readonly message?: string | null;
20415 readonly status: V2ThreadRollbackResponse__CollabAgentStatus;
20416};
20417export const V2ThreadRollbackResponse__CollabAgentState = Schema.Struct({
20418 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20419 status: V2ThreadRollbackResponse__CollabAgentStatus,
20420}).annotate({ identifier: "V2ThreadRollbackResponse__CollabAgentState" });
1768120421
17682export type V2ThreadRollbackResponse__SubAgentSource =
17683 | "review"
17684 | "compact"
17685 | "memory_consolidation"
17686 | {
17687 readonly thread_spawn: {
17688 readonly agent_nickname?: string | null;
17689 readonly agent_path?: V2ThreadRollbackResponse__AgentPath | null;
17690 readonly agent_role?: string | null;
17691 readonly depth: number;
17692 readonly parent_thread_id: V2ThreadRollbackResponse__ThreadId;
17693 };
17694 }
17695 | { readonly other: string };
17696export const V2ThreadRollbackResponse__SubAgentSource = Schema.Union(
17697 [
17698 Schema.Literals(["review", "compact", "memory_consolidation"]),
17699 Schema.Struct({
17700 thread_spawn: Schema.Struct({
17701 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17702 agent_path: Schema.optionalKey(
17703 Schema.Union([V2ThreadRollbackResponse__AgentPath, Schema.Null]),
17704 ),
17705 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17706 depth: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
17707 parent_thread_id: V2ThreadRollbackResponse__ThreadId,
17708 }),
17709 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
17710 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
17711 ],
17712 { mode: "oneOf" },
17713);
20422export type V2ThreadSettingsUpdatedNotification__Settings = {
20423 readonly developer_instructions?: string | null;
20424 readonly model: string;
20425 readonly reasoning_effort?: V2ThreadSettingsUpdatedNotification__ReasoningEffort | null;
20426};
20427export const V2ThreadSettingsUpdatedNotification__Settings = Schema.Struct({
20428 developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20429 model: Schema.String,
20430 reasoning_effort: Schema.optionalKey(
20431 Schema.Union([V2ThreadSettingsUpdatedNotification__ReasoningEffort, Schema.Null]),
20432 ),
20433}).annotate({
20434 description: "Settings for a collaboration mode.",
20435 identifier: "V2ThreadSettingsUpdatedNotification__Settings",
20436});
1771420437
1771520438export type V2ThreadSettingsUpdatedNotification__SandboxPolicy =
1771620439 | { readonly type: "dangerFullAccess" }
1771720440 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
17718 | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
20441 | {
20442 readonly networkAccess?: V2ThreadSettingsUpdatedNotification__NetworkAccess;
20443 readonly type: "externalSandbox";
20444 }
1771920445 | {
1772020446 readonly excludeSlashTmp?: boolean;
1772120447 readonly excludeTmpdirEnvVar?: boolean;
......@@ -17736,7 +20462,10 @@ export const V2ThreadSettingsUpdatedNotification__SandboxPolicy = Schema.Union(
1773620462 }).annotate({ title: "ReadOnlySandboxPolicy" }),
1773720463 Schema.Struct({
1773820464 networkAccess: Schema.optionalKey(
17739 Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
20465 Schema.suspend(
20466 (): Schema.Codec<V2ThreadSettingsUpdatedNotification__NetworkAccess> =>
20467 V2ThreadSettingsUpdatedNotification__NetworkAccess,
20468 ).annotate({ default: "restricted" }),
1774020469 ),
1774120470 type: Schema.Literal("externalSandbox").annotate({
1774220471 title: "ExternalSandboxSandboxPolicyType",
......@@ -17755,20 +20484,7 @@ export const V2ThreadSettingsUpdatedNotification__SandboxPolicy = Schema.Union(
1775520484 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
1775620485 ],
1775720486 { mode: "oneOf" },
17758);
17759
17760export type V2ThreadSettingsUpdatedNotification__Settings = {
17761 readonly developer_instructions?: string | null;
17762 readonly model: string;
17763 readonly reasoning_effort?: V2ThreadSettingsUpdatedNotification__ReasoningEffort | null;
17764};
17765export const V2ThreadSettingsUpdatedNotification__Settings = Schema.Struct({
17766 developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17767 model: Schema.String,
17768 reasoning_effort: Schema.optionalKey(
17769 Schema.Union([V2ThreadSettingsUpdatedNotification__ReasoningEffort, Schema.Null]),
17770 ),
17771}).annotate({ description: "Settings for a collaboration mode." });
20487).annotate({ identifier: "V2ThreadSettingsUpdatedNotification__SandboxPolicy" });
1777220488
1777320489export type V2ThreadStartedNotification__CommandAction =
1777420490 | {
......@@ -17810,25 +20526,69 @@ export const V2ThreadStartedNotification__CommandAction = Schema.Union(
1781020526 }).annotate({ title: "UnknownCommandAction" }),
1781120527 ],
1781220528 { mode: "oneOf" },
17813);
17814
17815export type V2ThreadStartedNotification__CollabAgentState = {
17816 readonly message?: string | null;
17817 readonly status: V2ThreadStartedNotification__CollabAgentStatus;
17818};
17819export const V2ThreadStartedNotification__CollabAgentState = Schema.Struct({
17820 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
17821 status: V2ThreadStartedNotification__CollabAgentStatus,
17822});
20529).annotate({ identifier: "V2ThreadStartedNotification__CommandAction" });
1782320530
17824export type V2ThreadStartedNotification__MemoryCitation = {
17825 readonly entries: ReadonlyArray<V2ThreadStartedNotification__MemoryCitationEntry>;
17826 readonly threadIds: ReadonlyArray<string>;
17827};
17828export const V2ThreadStartedNotification__MemoryCitation = Schema.Struct({
17829 entries: Schema.Array(V2ThreadStartedNotification__MemoryCitationEntry),
17830 threadIds: Schema.Array(Schema.String),
17831});
20531export type V2ThreadStartedNotification__SubAgentSource =
20532 | "review"
20533 | "compact"
20534 | "memory_consolidation"
20535 | {
20536 readonly thread_spawn: {
20537 readonly agent_nickname?: string | null;
20538 readonly agent_path?: V2ThreadStartedNotification__AgentPath | null;
20539 readonly agent_role?: string | null;
20540 readonly depth: number;
20541 readonly parent_thread_id: V2ThreadStartedNotification__ThreadId;
20542 };
20543 }
20544 | { readonly other: string };
20545export const V2ThreadStartedNotification__SubAgentSource = Schema.Union(
20546 [
20547 Schema.Literals(["review", "compact", "memory_consolidation"]),
20548 Schema.Struct({
20549 thread_spawn: Schema.Struct({
20550 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20551 agent_path: Schema.optionalKey(
20552 Schema.Union([V2ThreadStartedNotification__AgentPath, Schema.Null]),
20553 ),
20554 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20555 depth: Schema.Number.annotate({ format: "int32" }).check(
20556 Schema.isInt().annotate({ expected: "an integer" }),
20557 ),
20558 parent_thread_id: V2ThreadStartedNotification__ThreadId,
20559 }),
20560 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
20561 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
20562 ],
20563 { mode: "oneOf" },
20564).annotate({ identifier: "V2ThreadStartedNotification__SubAgentSource" });
20565
20566export type V2ThreadStartedNotification__ThreadStatus =
20567 | { readonly type: "notLoaded" }
20568 | { readonly type: "idle" }
20569 | { readonly type: "systemError" }
20570 | {
20571 readonly activeFlags: ReadonlyArray<V2ThreadStartedNotification__ThreadActiveFlag>;
20572 readonly type: "active";
20573 };
20574export const V2ThreadStartedNotification__ThreadStatus = Schema.Union(
20575 [
20576 Schema.Struct({
20577 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
20578 }).annotate({ title: "NotLoadedThreadStatus" }),
20579 Schema.Struct({
20580 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
20581 }).annotate({ title: "IdleThreadStatus" }),
20582 Schema.Struct({
20583 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
20584 }).annotate({ title: "SystemErrorThreadStatus" }),
20585 Schema.Struct({
20586 activeFlags: Schema.Array(V2ThreadStartedNotification__ThreadActiveFlag),
20587 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
20588 }).annotate({ title: "ActiveThreadStatus" }),
20589 ],
20590 { mode: "oneOf" },
20591).annotate({ identifier: "V2ThreadStartedNotification__ThreadStatus" });
1783220592
1783320593export type V2ThreadStartedNotification__CodexErrorInfo =
1783420594 | "contextWindowExceeded"
......@@ -17871,8 +20631,12 @@ export const V2ThreadStartedNotification__CodexErrorInfo = Schema.Union(
1787120631 httpStatusCode: Schema.optionalKey(
1787220632 Schema.Union([
1787320633 Schema.Number.annotate({ format: "uint16" })
17874 .check(Schema.isInt())
17875 .check(Schema.isGreaterThanOrEqualTo(0)),
20634 .check(Schema.isInt().annotate({ expected: "an integer" }))
20635 .check(
20636 Schema.isGreaterThanOrEqualTo(0).annotate({
20637 expected: "a value greater than or equal to 0",
20638 }),
20639 ),
1787620640 Schema.Null,
1787720641 ]),
1787820642 ),
......@@ -17883,8 +20647,12 @@ export const V2ThreadStartedNotification__CodexErrorInfo = Schema.Union(
1788320647 httpStatusCode: Schema.optionalKey(
1788420648 Schema.Union([
1788520649 Schema.Number.annotate({ format: "uint16" })
17886 .check(Schema.isInt())
17887 .check(Schema.isGreaterThanOrEqualTo(0)),
20650 .check(Schema.isInt().annotate({ expected: "an integer" }))
20651 .check(
20652 Schema.isGreaterThanOrEqualTo(0).annotate({
20653 expected: "a value greater than or equal to 0",
20654 }),
20655 ),
1788820656 Schema.Null,
1788920657 ]),
1789020658 ),
......@@ -17898,8 +20666,12 @@ export const V2ThreadStartedNotification__CodexErrorInfo = Schema.Union(
1789820666 httpStatusCode: Schema.optionalKey(
1789920667 Schema.Union([
1790020668 Schema.Number.annotate({ format: "uint16" })
17901 .check(Schema.isInt())
17902 .check(Schema.isGreaterThanOrEqualTo(0)),
20669 .check(Schema.isInt().annotate({ expected: "an integer" }))
20670 .check(
20671 Schema.isGreaterThanOrEqualTo(0).annotate({
20672 expected: "a value greater than or equal to 0",
20673 }),
20674 ),
1790320675 Schema.Null,
1790420676 ]),
1790520677 ),
......@@ -17914,8 +20686,12 @@ export const V2ThreadStartedNotification__CodexErrorInfo = Schema.Union(
1791420686 httpStatusCode: Schema.optionalKey(
1791520687 Schema.Union([
1791620688 Schema.Number.annotate({ format: "uint16" })
17917 .check(Schema.isInt())
17918 .check(Schema.isGreaterThanOrEqualTo(0)),
20689 .check(Schema.isInt().annotate({ expected: "an integer" }))
20690 .check(
20691 Schema.isGreaterThanOrEqualTo(0).annotate({
20692 expected: "a value greater than or equal to 0",
20693 }),
20694 ),
1791920695 Schema.Null,
1792020696 ]),
1792120697 ),
......@@ -17938,8 +20714,37 @@ export const V2ThreadStartedNotification__CodexErrorInfo = Schema.Union(
1793820714).annotate({
1793920715 description:
1794020716 "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.",
20717 identifier: "V2ThreadStartedNotification__CodexErrorInfo",
1794120718});
1794220719
20720export type V2ThreadStartedNotification__TextElement = {
20721 readonly byteRange: V2ThreadStartedNotification__ByteRange;
20722 readonly placeholder?: string | null;
20723};
20724export const V2ThreadStartedNotification__TextElement = Schema.Struct({
20725 byteRange: Schema.suspend(
20726 (): Schema.Codec<V2ThreadStartedNotification__ByteRange> =>
20727 V2ThreadStartedNotification__ByteRange,
20728 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
20729 placeholder: Schema.optionalKey(
20730 Schema.Union([
20731 Schema.String.annotate({
20732 description: "Optional human-readable placeholder for the element, displayed in the UI.",
20733 }),
20734 Schema.Null,
20735 ]),
20736 ),
20737}).annotate({ identifier: "V2ThreadStartedNotification__TextElement" });
20738
20739export type V2ThreadStartedNotification__MemoryCitation = {
20740 readonly entries: ReadonlyArray<V2ThreadStartedNotification__MemoryCitationEntry>;
20741 readonly threadIds: ReadonlyArray<string>;
20742};
20743export const V2ThreadStartedNotification__MemoryCitation = Schema.Struct({
20744 entries: Schema.Array(V2ThreadStartedNotification__MemoryCitationEntry),
20745 threadIds: Schema.Array(Schema.String),
20746}).annotate({ identifier: "V2ThreadStartedNotification__MemoryCitation" });
20747
1794320748export type V2ThreadStartedNotification__FileUpdateChange = {
1794420749 readonly diff: string;
1794520750 readonly kind: V2ThreadStartedNotification__PatchChangeKind;
......@@ -17949,168 +20754,169 @@ export const V2ThreadStartedNotification__FileUpdateChange = Schema.Struct({
1794920754 diff: Schema.String,
1795020755 kind: V2ThreadStartedNotification__PatchChangeKind,
1795120756 path: Schema.String,
17952});
20757}).annotate({ identifier: "V2ThreadStartedNotification__FileUpdateChange" });
1795320758
17954export type V2ThreadStartedNotification__UserInput =
17955 | {
17956 readonly text: string;
17957 readonly text_elements?: ReadonlyArray<V2ThreadStartedNotification__TextElement>;
17958 readonly type: "text";
17959 }
20759export type V2ThreadStartedNotification__CollabAgentState = {
20760 readonly message?: string | null;
20761 readonly status: V2ThreadStartedNotification__CollabAgentStatus;
20762};
20763export const V2ThreadStartedNotification__CollabAgentState = Schema.Struct({
20764 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20765 status: V2ThreadStartedNotification__CollabAgentStatus,
20766}).annotate({ identifier: "V2ThreadStartedNotification__CollabAgentState" });
20767
20768export type V2ThreadStartResponse__CommandAction =
1796020769 | {
17961 readonly detail?: V2ThreadStartedNotification__ImageDetail | null;
17962 readonly type: "image";
17963 readonly url: string;
20770 readonly command: string;
20771 readonly name: string;
20772 readonly path: V2ThreadStartResponse__AbsolutePathBuf;
20773 readonly type: "read";
1796420774 }
20775 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
1796520776 | {
17966 readonly detail?: V2ThreadStartedNotification__ImageDetail | null;
17967 readonly path: string;
17968 readonly type: "localImage";
20777 readonly command: string;
20778 readonly path?: string | null;
20779 readonly query?: string | null;
20780 readonly type: "search";
1796920781 }
17970 | { readonly type: "audio"; readonly url: string }
17971 | { readonly path: string; readonly type: "localAudio" }
17972 | { readonly name: string; readonly path: string; readonly type: "skill" }
17973 | { readonly name: string; readonly path: string; readonly type: "mention" };
17974export const V2ThreadStartedNotification__UserInput = Schema.Union(
20782 | { readonly command: string; readonly type: "unknown" };
20783export const V2ThreadStartResponse__CommandAction = Schema.Union(
1797520784 [
1797620785 Schema.Struct({
17977 text: Schema.String,
17978 text_elements: Schema.optionalKey(
17979 Schema.Array(V2ThreadStartedNotification__TextElement).annotate({
17980 description: "UI-defined spans within `text` used to render or persist special elements.",
17981 default: [],
17982 }),
17983 ),
17984 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
17985 }).annotate({ title: "TextUserInput" }),
20786 command: Schema.String,
20787 name: Schema.String,
20788 path: V2ThreadStartResponse__AbsolutePathBuf,
20789 type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
20790 }).annotate({ title: "ReadCommandAction" }),
1798620791 Schema.Struct({
17987 detail: Schema.optionalKey(
17988 Schema.Union([V2ThreadStartedNotification__ImageDetail, Schema.Null]),
17989 ),
17990 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
17991 url: Schema.String,
17992 }).annotate({ title: "ImageUserInput" }),
20792 command: Schema.String,
20793 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20794 type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
20795 }).annotate({ title: "ListFilesCommandAction" }),
1799320796 Schema.Struct({
17994 detail: Schema.optionalKey(
17995 Schema.Union([V2ThreadStartedNotification__ImageDetail, Schema.Null]),
17996 ),
17997 path: Schema.String,
17998 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
17999 }).annotate({ title: "LocalImageUserInput" }),
20797 command: Schema.String,
20798 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20799 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20800 type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
20801 }).annotate({ title: "SearchCommandAction" }),
1800020802 Schema.Struct({
18001 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
18002 url: Schema.String,
18003 }).annotate({ title: "AudioUserInput" }),
20803 command: Schema.String,
20804 type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
20805 }).annotate({ title: "UnknownCommandAction" }),
20806 ],
20807 { mode: "oneOf" },
20808).annotate({ identifier: "V2ThreadStartResponse__CommandAction" });
20809
20810export type V2ThreadStartResponse__SandboxPolicy =
20811 | { readonly type: "dangerFullAccess" }
20812 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
20813 | {
20814 readonly networkAccess?: V2ThreadStartResponse__NetworkAccess;
20815 readonly type: "externalSandbox";
20816 }
20817 | {
20818 readonly excludeSlashTmp?: boolean;
20819 readonly excludeTmpdirEnvVar?: boolean;
20820 readonly networkAccess?: boolean;
20821 readonly type: "workspaceWrite";
20822 readonly writableRoots?: ReadonlyArray<V2ThreadStartResponse__AbsolutePathBuf>;
20823 };
20824export const V2ThreadStartResponse__SandboxPolicy = Schema.Union(
20825 [
1800420826 Schema.Struct({
18005 path: Schema.String,
18006 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
18007 }).annotate({ title: "LocalAudioUserInput" }),
20827 type: Schema.Literal("dangerFullAccess").annotate({
20828 title: "DangerFullAccessSandboxPolicyType",
20829 }),
20830 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
1800820831 Schema.Struct({
18009 name: Schema.String,
18010 path: Schema.String,
18011 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
18012 }).annotate({ title: "SkillUserInput" }),
20832 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
20833 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
20834 }).annotate({ title: "ReadOnlySandboxPolicy" }),
1801320835 Schema.Struct({
18014 name: Schema.String,
18015 path: Schema.String,
18016 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
18017 }).annotate({ title: "MentionUserInput" }),
20836 networkAccess: Schema.optionalKey(
20837 Schema.suspend(
20838 (): Schema.Codec<V2ThreadStartResponse__NetworkAccess> =>
20839 V2ThreadStartResponse__NetworkAccess,
20840 ).annotate({ default: "restricted" }),
20841 ),
20842 type: Schema.Literal("externalSandbox").annotate({
20843 title: "ExternalSandboxSandboxPolicyType",
20844 }),
20845 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
20846 Schema.Struct({
20847 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
20848 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
20849 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
20850 type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
20851 writableRoots: Schema.optionalKey(
20852 Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }),
20853 ),
20854 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
1801820855 ],
1801920856 { mode: "oneOf" },
18020);
20857).annotate({ identifier: "V2ThreadStartResponse__SandboxPolicy" });
1802120858
18022export type V2ThreadStartedNotification__SubAgentSource =
20859export type V2ThreadStartResponse__SubAgentSource =
1802320860 | "review"
1802420861 | "compact"
1802520862 | "memory_consolidation"
1802620863 | {
1802720864 readonly thread_spawn: {
1802820865 readonly agent_nickname?: string | null;
18029 readonly agent_path?: V2ThreadStartedNotification__AgentPath | null;
20866 readonly agent_path?: V2ThreadStartResponse__AgentPath | null;
1803020867 readonly agent_role?: string | null;
1803120868 readonly depth: number;
18032 readonly parent_thread_id: V2ThreadStartedNotification__ThreadId;
20869 readonly parent_thread_id: V2ThreadStartResponse__ThreadId;
1803320870 };
1803420871 }
1803520872 | { readonly other: string };
18036export const V2ThreadStartedNotification__SubAgentSource = Schema.Union(
20873export const V2ThreadStartResponse__SubAgentSource = Schema.Union(
1803720874 [
1803820875 Schema.Literals(["review", "compact", "memory_consolidation"]),
1803920876 Schema.Struct({
1804020877 thread_spawn: Schema.Struct({
1804120878 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1804220879 agent_path: Schema.optionalKey(
18043 Schema.Union([V2ThreadStartedNotification__AgentPath, Schema.Null]),
20880 Schema.Union([V2ThreadStartResponse__AgentPath, Schema.Null]),
1804420881 ),
1804520882 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18046 depth: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
18047 parent_thread_id: V2ThreadStartedNotification__ThreadId,
20883 depth: Schema.Number.annotate({ format: "int32" }).check(
20884 Schema.isInt().annotate({ expected: "an integer" }),
20885 ),
20886 parent_thread_id: V2ThreadStartResponse__ThreadId,
1804820887 }),
1804920888 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
1805020889 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
1805120890 ],
1805220891 { mode: "oneOf" },
18053);
20892).annotate({ identifier: "V2ThreadStartResponse__SubAgentSource" });
1805420893
18055export type V2ThreadStartResponse__CommandAction =
18056 | {
18057 readonly command: string;
18058 readonly name: string;
18059 readonly path: V2ThreadStartResponse__AbsolutePathBuf;
18060 readonly type: "read";
18061 }
18062 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
20894export type V2ThreadStartResponse__ThreadStatus =
20895 | { readonly type: "notLoaded" }
20896 | { readonly type: "idle" }
20897 | { readonly type: "systemError" }
1806320898 | {
18064 readonly command: string;
18065 readonly path?: string | null;
18066 readonly query?: string | null;
18067 readonly type: "search";
18068 }
18069 | { readonly command: string; readonly type: "unknown" };
18070export const V2ThreadStartResponse__CommandAction = Schema.Union(
20899 readonly activeFlags: ReadonlyArray<V2ThreadStartResponse__ThreadActiveFlag>;
20900 readonly type: "active";
20901 };
20902export const V2ThreadStartResponse__ThreadStatus = Schema.Union(
1807120903 [
1807220904 Schema.Struct({
18073 command: Schema.String,
18074 name: Schema.String,
18075 path: V2ThreadStartResponse__AbsolutePathBuf,
18076 type: Schema.Literal("read").annotate({ title: "ReadCommandActionType" }),
18077 }).annotate({ title: "ReadCommandAction" }),
20905 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
20906 }).annotate({ title: "NotLoadedThreadStatus" }),
1807820907 Schema.Struct({
18079 command: Schema.String,
18080 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18081 type: Schema.Literal("listFiles").annotate({ title: "ListFilesCommandActionType" }),
18082 }).annotate({ title: "ListFilesCommandAction" }),
20908 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
20909 }).annotate({ title: "IdleThreadStatus" }),
1808320910 Schema.Struct({
18084 command: Schema.String,
18085 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18086 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18087 type: Schema.Literal("search").annotate({ title: "SearchCommandActionType" }),
18088 }).annotate({ title: "SearchCommandAction" }),
20911 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
20912 }).annotate({ title: "SystemErrorThreadStatus" }),
1808920913 Schema.Struct({
18090 command: Schema.String,
18091 type: Schema.Literal("unknown").annotate({ title: "UnknownCommandActionType" }),
18092 }).annotate({ title: "UnknownCommandAction" }),
20914 activeFlags: Schema.Array(V2ThreadStartResponse__ThreadActiveFlag),
20915 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
20916 }).annotate({ title: "ActiveThreadStatus" }),
1809320917 ],
1809420918 { mode: "oneOf" },
18095);
18096
18097export type V2ThreadStartResponse__CollabAgentState = {
18098 readonly message?: string | null;
18099 readonly status: V2ThreadStartResponse__CollabAgentStatus;
18100};
18101export const V2ThreadStartResponse__CollabAgentState = Schema.Struct({
18102 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18103 status: V2ThreadStartResponse__CollabAgentStatus,
18104});
18105
18106export type V2ThreadStartResponse__MemoryCitation = {
18107 readonly entries: ReadonlyArray<V2ThreadStartResponse__MemoryCitationEntry>;
18108 readonly threadIds: ReadonlyArray<string>;
18109};
18110export const V2ThreadStartResponse__MemoryCitation = Schema.Struct({
18111 entries: Schema.Array(V2ThreadStartResponse__MemoryCitationEntry),
18112 threadIds: Schema.Array(Schema.String),
18113});
20919).annotate({ identifier: "V2ThreadStartResponse__ThreadStatus" });
1811420920
1811520921export type V2ThreadStartResponse__CodexErrorInfo =
1811620922 | "contextWindowExceeded"
......@@ -18153,8 +20959,12 @@ export const V2ThreadStartResponse__CodexErrorInfo = Schema.Union(
1815320959 httpStatusCode: Schema.optionalKey(
1815420960 Schema.Union([
1815520961 Schema.Number.annotate({ format: "uint16" })
18156 .check(Schema.isInt())
18157 .check(Schema.isGreaterThanOrEqualTo(0)),
20962 .check(Schema.isInt().annotate({ expected: "an integer" }))
20963 .check(
20964 Schema.isGreaterThanOrEqualTo(0).annotate({
20965 expected: "a value greater than or equal to 0",
20966 }),
20967 ),
1815820968 Schema.Null,
1815920969 ]),
1816020970 ),
......@@ -18165,8 +20975,12 @@ export const V2ThreadStartResponse__CodexErrorInfo = Schema.Union(
1816520975 httpStatusCode: Schema.optionalKey(
1816620976 Schema.Union([
1816720977 Schema.Number.annotate({ format: "uint16" })
18168 .check(Schema.isInt())
18169 .check(Schema.isGreaterThanOrEqualTo(0)),
20978 .check(Schema.isInt().annotate({ expected: "an integer" }))
20979 .check(
20980 Schema.isGreaterThanOrEqualTo(0).annotate({
20981 expected: "a value greater than or equal to 0",
20982 }),
20983 ),
1817020984 Schema.Null,
1817120985 ]),
1817220986 ),
......@@ -18180,8 +20994,12 @@ export const V2ThreadStartResponse__CodexErrorInfo = Schema.Union(
1818020994 httpStatusCode: Schema.optionalKey(
1818120995 Schema.Union([
1818220996 Schema.Number.annotate({ format: "uint16" })
18183 .check(Schema.isInt())
18184 .check(Schema.isGreaterThanOrEqualTo(0)),
20997 .check(Schema.isInt().annotate({ expected: "an integer" }))
20998 .check(
20999 Schema.isGreaterThanOrEqualTo(0).annotate({
21000 expected: "a value greater than or equal to 0",
21001 }),
21002 ),
1818521003 Schema.Null,
1818621004 ]),
1818721005 ),
......@@ -18196,8 +21014,12 @@ export const V2ThreadStartResponse__CodexErrorInfo = Schema.Union(
1819621014 httpStatusCode: Schema.optionalKey(
1819721015 Schema.Union([
1819821016 Schema.Number.annotate({ format: "uint16" })
18199 .check(Schema.isInt())
18200 .check(Schema.isGreaterThanOrEqualTo(0)),
21017 .check(Schema.isInt().annotate({ expected: "an integer" }))
21018 .check(
21019 Schema.isGreaterThanOrEqualTo(0).annotate({
21020 expected: "a value greater than or equal to 0",
21021 }),
21022 ),
1820121023 Schema.Null,
1820221024 ]),
1820321025 ),
......@@ -18220,8 +21042,36 @@ export const V2ThreadStartResponse__CodexErrorInfo = Schema.Union(
1822021042).annotate({
1822121043 description:
1822221044 "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.",
21045 identifier: "V2ThreadStartResponse__CodexErrorInfo",
1822321046});
1822421047
21048export type V2ThreadStartResponse__TextElement = {
21049 readonly byteRange: V2ThreadStartResponse__ByteRange;
21050 readonly placeholder?: string | null;
21051};
21052export const V2ThreadStartResponse__TextElement = Schema.Struct({
21053 byteRange: Schema.suspend(
21054 (): Schema.Codec<V2ThreadStartResponse__ByteRange> => V2ThreadStartResponse__ByteRange,
21055 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
21056 placeholder: Schema.optionalKey(
21057 Schema.Union([
21058 Schema.String.annotate({
21059 description: "Optional human-readable placeholder for the element, displayed in the UI.",
21060 }),
21061 Schema.Null,
21062 ]),
21063 ),
21064}).annotate({ identifier: "V2ThreadStartResponse__TextElement" });
21065
21066export type V2ThreadStartResponse__MemoryCitation = {
21067 readonly entries: ReadonlyArray<V2ThreadStartResponse__MemoryCitationEntry>;
21068 readonly threadIds: ReadonlyArray<string>;
21069};
21070export const V2ThreadStartResponse__MemoryCitation = Schema.Struct({
21071 entries: Schema.Array(V2ThreadStartResponse__MemoryCitationEntry),
21072 threadIds: Schema.Array(Schema.String),
21073}).annotate({ identifier: "V2ThreadStartResponse__MemoryCitation" });
21074
1822521075export type V2ThreadStartResponse__FileUpdateChange = {
1822621076 readonly diff: string;
1822721077 readonly kind: V2ThreadStartResponse__PatchChangeKind;
......@@ -18231,104 +21081,16 @@ export const V2ThreadStartResponse__FileUpdateChange = Schema.Struct({
1823121081 diff: Schema.String,
1823221082 kind: V2ThreadStartResponse__PatchChangeKind,
1823321083 path: Schema.String,
18234});
18235
18236export type V2ThreadStartResponse__UserInput =
18237 | {
18238 readonly text: string;
18239 readonly text_elements?: ReadonlyArray<V2ThreadStartResponse__TextElement>;
18240 readonly type: "text";
18241 }
18242 | {
18243 readonly detail?: V2ThreadStartResponse__ImageDetail | null;
18244 readonly type: "image";
18245 readonly url: string;
18246 }
18247 | {
18248 readonly detail?: V2ThreadStartResponse__ImageDetail | null;
18249 readonly path: string;
18250 readonly type: "localImage";
18251 }
18252 | { readonly type: "audio"; readonly url: string }
18253 | { readonly path: string; readonly type: "localAudio" }
18254 | { readonly name: string; readonly path: string; readonly type: "skill" }
18255 | { readonly name: string; readonly path: string; readonly type: "mention" };
18256export const V2ThreadStartResponse__UserInput = Schema.Union(
18257 [
18258 Schema.Struct({
18259 text: Schema.String,
18260 text_elements: Schema.optionalKey(
18261 Schema.Array(V2ThreadStartResponse__TextElement).annotate({
18262 description: "UI-defined spans within `text` used to render or persist special elements.",
18263 default: [],
18264 }),
18265 ),
18266 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
18267 }).annotate({ title: "TextUserInput" }),
18268 Schema.Struct({
18269 detail: Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ImageDetail, Schema.Null])),
18270 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
18271 url: Schema.String,
18272 }).annotate({ title: "ImageUserInput" }),
18273 Schema.Struct({
18274 detail: Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ImageDetail, Schema.Null])),
18275 path: Schema.String,
18276 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
18277 }).annotate({ title: "LocalImageUserInput" }),
18278 Schema.Struct({
18279 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
18280 url: Schema.String,
18281 }).annotate({ title: "AudioUserInput" }),
18282 Schema.Struct({
18283 path: Schema.String,
18284 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
18285 }).annotate({ title: "LocalAudioUserInput" }),
18286 Schema.Struct({
18287 name: Schema.String,
18288 path: Schema.String,
18289 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
18290 }).annotate({ title: "SkillUserInput" }),
18291 Schema.Struct({
18292 name: Schema.String,
18293 path: Schema.String,
18294 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
18295 }).annotate({ title: "MentionUserInput" }),
18296 ],
18297 { mode: "oneOf" },
18298);
21084}).annotate({ identifier: "V2ThreadStartResponse__FileUpdateChange" });
1829921085
18300export type V2ThreadStartResponse__SubAgentSource =
18301 | "review"
18302 | "compact"
18303 | "memory_consolidation"
18304 | {
18305 readonly thread_spawn: {
18306 readonly agent_nickname?: string | null;
18307 readonly agent_path?: V2ThreadStartResponse__AgentPath | null;
18308 readonly agent_role?: string | null;
18309 readonly depth: number;
18310 readonly parent_thread_id: V2ThreadStartResponse__ThreadId;
18311 };
18312 }
18313 | { readonly other: string };
18314export const V2ThreadStartResponse__SubAgentSource = Schema.Union(
18315 [
18316 Schema.Literals(["review", "compact", "memory_consolidation"]),
18317 Schema.Struct({
18318 thread_spawn: Schema.Struct({
18319 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18320 agent_path: Schema.optionalKey(
18321 Schema.Union([V2ThreadStartResponse__AgentPath, Schema.Null]),
18322 ),
18323 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18324 depth: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
18325 parent_thread_id: V2ThreadStartResponse__ThreadId,
18326 }),
18327 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
18328 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
18329 ],
18330 { mode: "oneOf" },
18331);
21086export type V2ThreadStartResponse__CollabAgentState = {
21087 readonly message?: string | null;
21088 readonly status: V2ThreadStartResponse__CollabAgentStatus;
21089};
21090export const V2ThreadStartResponse__CollabAgentState = Schema.Struct({
21091 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
21092 status: V2ThreadStartResponse__CollabAgentStatus,
21093}).annotate({ identifier: "V2ThreadStartResponse__CollabAgentState" });
1833221094
1833321095export type V2ThreadStatusChangedNotification__ThreadStatus =
1833421096 | { readonly type: "notLoaded" }
......@@ -18355,7 +21117,7 @@ export const V2ThreadStatusChangedNotification__ThreadStatus = Schema.Union(
1835521117 }).annotate({ title: "ActiveThreadStatus" }),
1835621118 ],
1835721119 { mode: "oneOf" },
18358);
21120).annotate({ identifier: "V2ThreadStatusChangedNotification__ThreadStatus" });
1835921121
1836021122export type V2ThreadTokenUsageUpdatedNotification__ThreadTokenUsage = {
1836121123 readonly last: V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown;
......@@ -18365,10 +21127,15 @@ export type V2ThreadTokenUsageUpdatedNotification__ThreadTokenUsage = {
1836521127export const V2ThreadTokenUsageUpdatedNotification__ThreadTokenUsage = Schema.Struct({
1836621128 last: V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown,
1836721129 modelContextWindow: Schema.optionalKey(
18368 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
21130 Schema.Union([
21131 Schema.Number.annotate({ format: "int64" }).check(
21132 Schema.isInt().annotate({ expected: "an integer" }),
21133 ),
21134 Schema.Null,
21135 ]),
1836921136 ),
1837021137 total: V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown,
18371});
21138}).annotate({ identifier: "V2ThreadTokenUsageUpdatedNotification__ThreadTokenUsage" });
1837221139
1837321140export type V2ThreadUnarchiveResponse__CommandAction =
1837421141 | {
......@@ -18410,25 +21177,69 @@ export const V2ThreadUnarchiveResponse__CommandAction = Schema.Union(
1841021177 }).annotate({ title: "UnknownCommandAction" }),
1841121178 ],
1841221179 { mode: "oneOf" },
18413);
21180).annotate({ identifier: "V2ThreadUnarchiveResponse__CommandAction" });
1841421181
18415export type V2ThreadUnarchiveResponse__CollabAgentState = {
18416 readonly message?: string | null;
18417 readonly status: V2ThreadUnarchiveResponse__CollabAgentStatus;
18418};
18419export const V2ThreadUnarchiveResponse__CollabAgentState = Schema.Struct({
18420 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18421 status: V2ThreadUnarchiveResponse__CollabAgentStatus,
18422});
21182export type V2ThreadUnarchiveResponse__SubAgentSource =
21183 | "review"
21184 | "compact"
21185 | "memory_consolidation"
21186 | {
21187 readonly thread_spawn: {
21188 readonly agent_nickname?: string | null;
21189 readonly agent_path?: V2ThreadUnarchiveResponse__AgentPath | null;
21190 readonly agent_role?: string | null;
21191 readonly depth: number;
21192 readonly parent_thread_id: V2ThreadUnarchiveResponse__ThreadId;
21193 };
21194 }
21195 | { readonly other: string };
21196export const V2ThreadUnarchiveResponse__SubAgentSource = Schema.Union(
21197 [
21198 Schema.Literals(["review", "compact", "memory_consolidation"]),
21199 Schema.Struct({
21200 thread_spawn: Schema.Struct({
21201 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
21202 agent_path: Schema.optionalKey(
21203 Schema.Union([V2ThreadUnarchiveResponse__AgentPath, Schema.Null]),
21204 ),
21205 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
21206 depth: Schema.Number.annotate({ format: "int32" }).check(
21207 Schema.isInt().annotate({ expected: "an integer" }),
21208 ),
21209 parent_thread_id: V2ThreadUnarchiveResponse__ThreadId,
21210 }),
21211 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
21212 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
21213 ],
21214 { mode: "oneOf" },
21215).annotate({ identifier: "V2ThreadUnarchiveResponse__SubAgentSource" });
1842321216
18424export type V2ThreadUnarchiveResponse__MemoryCitation = {
18425 readonly entries: ReadonlyArray<V2ThreadUnarchiveResponse__MemoryCitationEntry>;
18426 readonly threadIds: ReadonlyArray<string>;
18427};
18428export const V2ThreadUnarchiveResponse__MemoryCitation = Schema.Struct({
18429 entries: Schema.Array(V2ThreadUnarchiveResponse__MemoryCitationEntry),
18430 threadIds: Schema.Array(Schema.String),
18431});
21217export type V2ThreadUnarchiveResponse__ThreadStatus =
21218 | { readonly type: "notLoaded" }
21219 | { readonly type: "idle" }
21220 | { readonly type: "systemError" }
21221 | {
21222 readonly activeFlags: ReadonlyArray<V2ThreadUnarchiveResponse__ThreadActiveFlag>;
21223 readonly type: "active";
21224 };
21225export const V2ThreadUnarchiveResponse__ThreadStatus = Schema.Union(
21226 [
21227 Schema.Struct({
21228 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
21229 }).annotate({ title: "NotLoadedThreadStatus" }),
21230 Schema.Struct({
21231 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
21232 }).annotate({ title: "IdleThreadStatus" }),
21233 Schema.Struct({
21234 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
21235 }).annotate({ title: "SystemErrorThreadStatus" }),
21236 Schema.Struct({
21237 activeFlags: Schema.Array(V2ThreadUnarchiveResponse__ThreadActiveFlag),
21238 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
21239 }).annotate({ title: "ActiveThreadStatus" }),
21240 ],
21241 { mode: "oneOf" },
21242).annotate({ identifier: "V2ThreadUnarchiveResponse__ThreadStatus" });
1843221243
1843321244export type V2ThreadUnarchiveResponse__CodexErrorInfo =
1843421245 | "contextWindowExceeded"
......@@ -18471,8 +21282,12 @@ export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union(
1847121282 httpStatusCode: Schema.optionalKey(
1847221283 Schema.Union([
1847321284 Schema.Number.annotate({ format: "uint16" })
18474 .check(Schema.isInt())
18475 .check(Schema.isGreaterThanOrEqualTo(0)),
21285 .check(Schema.isInt().annotate({ expected: "an integer" }))
21286 .check(
21287 Schema.isGreaterThanOrEqualTo(0).annotate({
21288 expected: "a value greater than or equal to 0",
21289 }),
21290 ),
1847621291 Schema.Null,
1847721292 ]),
1847821293 ),
......@@ -18483,8 +21298,12 @@ export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union(
1848321298 httpStatusCode: Schema.optionalKey(
1848421299 Schema.Union([
1848521300 Schema.Number.annotate({ format: "uint16" })
18486 .check(Schema.isInt())
18487 .check(Schema.isGreaterThanOrEqualTo(0)),
21301 .check(Schema.isInt().annotate({ expected: "an integer" }))
21302 .check(
21303 Schema.isGreaterThanOrEqualTo(0).annotate({
21304 expected: "a value greater than or equal to 0",
21305 }),
21306 ),
1848821307 Schema.Null,
1848921308 ]),
1849021309 ),
......@@ -18498,8 +21317,12 @@ export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union(
1849821317 httpStatusCode: Schema.optionalKey(
1849921318 Schema.Union([
1850021319 Schema.Number.annotate({ format: "uint16" })
18501 .check(Schema.isInt())
18502 .check(Schema.isGreaterThanOrEqualTo(0)),
21320 .check(Schema.isInt().annotate({ expected: "an integer" }))
21321 .check(
21322 Schema.isGreaterThanOrEqualTo(0).annotate({
21323 expected: "a value greater than or equal to 0",
21324 }),
21325 ),
1850321326 Schema.Null,
1850421327 ]),
1850521328 ),
......@@ -18514,8 +21337,12 @@ export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union(
1851421337 httpStatusCode: Schema.optionalKey(
1851521338 Schema.Union([
1851621339 Schema.Number.annotate({ format: "uint16" })
18517 .check(Schema.isInt())
18518 .check(Schema.isGreaterThanOrEqualTo(0)),
21340 .check(Schema.isInt().annotate({ expected: "an integer" }))
21341 .check(
21342 Schema.isGreaterThanOrEqualTo(0).annotate({
21343 expected: "a value greater than or equal to 0",
21344 }),
21345 ),
1851921346 Schema.Null,
1852021347 ]),
1852121348 ),
......@@ -18538,119 +21365,214 @@ export const V2ThreadUnarchiveResponse__CodexErrorInfo = Schema.Union(
1853821365).annotate({
1853921366 description:
1854021367 "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.",
21368 identifier: "V2ThreadUnarchiveResponse__CodexErrorInfo",
1854121369});
1854221370
18543export type V2ThreadUnarchiveResponse__FileUpdateChange = {
18544 readonly diff: string;
18545 readonly kind: V2ThreadUnarchiveResponse__PatchChangeKind;
18546 readonly path: string;
21371export type V2ThreadUnarchiveResponse__TextElement = {
21372 readonly byteRange: V2ThreadUnarchiveResponse__ByteRange;
21373 readonly placeholder?: string | null;
1854721374};
18548export const V2ThreadUnarchiveResponse__FileUpdateChange = Schema.Struct({
18549 diff: Schema.String,
18550 kind: V2ThreadUnarchiveResponse__PatchChangeKind,
18551 path: Schema.String,
18552});
18553
18554export type V2ThreadUnarchiveResponse__UserInput =
18555 | {
18556 readonly text: string;
18557 readonly text_elements?: ReadonlyArray<V2ThreadUnarchiveResponse__TextElement>;
18558 readonly type: "text";
18559 }
18560 | {
18561 readonly detail?: V2ThreadUnarchiveResponse__ImageDetail | null;
18562 readonly type: "image";
18563 readonly url: string;
18564 }
21375export const V2ThreadUnarchiveResponse__TextElement = Schema.Struct({
21376 byteRange: Schema.suspend(
21377 (): Schema.Codec<V2ThreadUnarchiveResponse__ByteRange> => V2ThreadUnarchiveResponse__ByteRange,
21378 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
21379 placeholder: Schema.optionalKey(
21380 Schema.Union([
21381 Schema.String.annotate({
21382 description: "Optional human-readable placeholder for the element, displayed in the UI.",
21383 }),
21384 Schema.Null,
21385 ]),
21386 ),
21387}).annotate({ identifier: "V2ThreadUnarchiveResponse__TextElement" });
21388
21389export type V2ThreadUnarchiveResponse__MemoryCitation = {
21390 readonly entries: ReadonlyArray<V2ThreadUnarchiveResponse__MemoryCitationEntry>;
21391 readonly threadIds: ReadonlyArray<string>;
21392};
21393export const V2ThreadUnarchiveResponse__MemoryCitation = Schema.Struct({
21394 entries: Schema.Array(V2ThreadUnarchiveResponse__MemoryCitationEntry),
21395 threadIds: Schema.Array(Schema.String),
21396}).annotate({ identifier: "V2ThreadUnarchiveResponse__MemoryCitation" });
21397
21398export type V2ThreadUnarchiveResponse__FileUpdateChange = {
21399 readonly diff: string;
21400 readonly kind: V2ThreadUnarchiveResponse__PatchChangeKind;
21401 readonly path: string;
21402};
21403export const V2ThreadUnarchiveResponse__FileUpdateChange = Schema.Struct({
21404 diff: Schema.String,
21405 kind: V2ThreadUnarchiveResponse__PatchChangeKind,
21406 path: Schema.String,
21407}).annotate({ identifier: "V2ThreadUnarchiveResponse__FileUpdateChange" });
21408
21409export type V2ThreadUnarchiveResponse__CollabAgentState = {
21410 readonly message?: string | null;
21411 readonly status: V2ThreadUnarchiveResponse__CollabAgentStatus;
21412};
21413export const V2ThreadUnarchiveResponse__CollabAgentState = Schema.Struct({
21414 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
21415 status: V2ThreadUnarchiveResponse__CollabAgentStatus,
21416}).annotate({ identifier: "V2ThreadUnarchiveResponse__CollabAgentState" });
21417
21418export type V2TurnCompletedNotification__CodexErrorInfo =
21419 | "contextWindowExceeded"
21420 | "sessionBudgetExceeded"
21421 | "usageLimitExceeded"
21422 | "serverOverloaded"
21423 | "cyberPolicy"
21424 | "internalServerError"
21425 | "unauthorized"
21426 | "badRequest"
21427 | "threadRollbackFailed"
21428 | "sandboxError"
21429 | "rateLimitExceeded"
21430 | "misalignmentPolicyViolation"
21431 | "other"
21432 | { readonly httpConnectionFailed: { readonly httpStatusCode?: number | null } }
21433 | { readonly responseStreamConnectionFailed: { readonly httpStatusCode?: number | null } }
21434 | { readonly responseStreamDisconnected: { readonly httpStatusCode?: number | null } }
21435 | { readonly responseTooManyFailedAttempts: { readonly httpStatusCode?: number | null } }
1856521436 | {
18566 readonly detail?: V2ThreadUnarchiveResponse__ImageDetail | null;
18567 readonly path: string;
18568 readonly type: "localImage";
18569 }
18570 | { readonly type: "audio"; readonly url: string }
18571 | { readonly path: string; readonly type: "localAudio" }
18572 | { readonly name: string; readonly path: string; readonly type: "skill" }
18573 | { readonly name: string; readonly path: string; readonly type: "mention" };
18574export const V2ThreadUnarchiveResponse__UserInput = Schema.Union(
21437 readonly activeTurnNotSteerable: {
21438 readonly turnKind: V2TurnCompletedNotification__NonSteerableTurnKind;
21439 };
21440 };
21441export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union(
1857521442 [
21443 Schema.Literals([
21444 "contextWindowExceeded",
21445 "sessionBudgetExceeded",
21446 "usageLimitExceeded",
21447 "serverOverloaded",
21448 "cyberPolicy",
21449 "internalServerError",
21450 "unauthorized",
21451 "badRequest",
21452 "threadRollbackFailed",
21453 "sandboxError",
21454 "rateLimitExceeded",
21455 "misalignmentPolicyViolation",
21456 "other",
21457 ]),
1857621458 Schema.Struct({
18577 text: Schema.String,
18578 text_elements: Schema.optionalKey(
18579 Schema.Array(V2ThreadUnarchiveResponse__TextElement).annotate({
18580 description: "UI-defined spans within `text` used to render or persist special elements.",
18581 default: [],
18582 }),
18583 ),
18584 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
18585 }).annotate({ title: "TextUserInput" }),
18586 Schema.Struct({
18587 detail: Schema.optionalKey(
18588 Schema.Union([V2ThreadUnarchiveResponse__ImageDetail, Schema.Null]),
18589 ),
18590 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
18591 url: Schema.String,
18592 }).annotate({ title: "ImageUserInput" }),
18593 Schema.Struct({
18594 detail: Schema.optionalKey(
18595 Schema.Union([V2ThreadUnarchiveResponse__ImageDetail, Schema.Null]),
18596 ),
18597 path: Schema.String,
18598 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
18599 }).annotate({ title: "LocalImageUserInput" }),
21459 httpConnectionFailed: Schema.Struct({
21460 httpStatusCode: Schema.optionalKey(
21461 Schema.Union([
21462 Schema.Number.annotate({ format: "uint16" })
21463 .check(Schema.isInt().annotate({ expected: "an integer" }))
21464 .check(
21465 Schema.isGreaterThanOrEqualTo(0).annotate({
21466 expected: "a value greater than or equal to 0",
21467 }),
21468 ),
21469 Schema.Null,
21470 ]),
21471 ),
21472 }),
21473 }).annotate({ title: "HttpConnectionFailedCodexErrorInfo" }),
1860021474 Schema.Struct({
18601 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
18602 url: Schema.String,
18603 }).annotate({ title: "AudioUserInput" }),
21475 responseStreamConnectionFailed: Schema.Struct({
21476 httpStatusCode: Schema.optionalKey(
21477 Schema.Union([
21478 Schema.Number.annotate({ format: "uint16" })
21479 .check(Schema.isInt().annotate({ expected: "an integer" }))
21480 .check(
21481 Schema.isGreaterThanOrEqualTo(0).annotate({
21482 expected: "a value greater than or equal to 0",
21483 }),
21484 ),
21485 Schema.Null,
21486 ]),
21487 ),
21488 }),
21489 }).annotate({
21490 title: "ResponseStreamConnectionFailedCodexErrorInfo",
21491 description: "Failed to connect to the response SSE stream.",
21492 }),
1860421493 Schema.Struct({
18605 path: Schema.String,
18606 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
18607 }).annotate({ title: "LocalAudioUserInput" }),
21494 responseStreamDisconnected: Schema.Struct({
21495 httpStatusCode: Schema.optionalKey(
21496 Schema.Union([
21497 Schema.Number.annotate({ format: "uint16" })
21498 .check(Schema.isInt().annotate({ expected: "an integer" }))
21499 .check(
21500 Schema.isGreaterThanOrEqualTo(0).annotate({
21501 expected: "a value greater than or equal to 0",
21502 }),
21503 ),
21504 Schema.Null,
21505 ]),
21506 ),
21507 }),
21508 }).annotate({
21509 title: "ResponseStreamDisconnectedCodexErrorInfo",
21510 description:
21511 "The response SSE stream disconnected in the middle of a turn before completion.",
21512 }),
1860821513 Schema.Struct({
18609 name: Schema.String,
18610 path: Schema.String,
18611 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
18612 }).annotate({ title: "SkillUserInput" }),
21514 responseTooManyFailedAttempts: Schema.Struct({
21515 httpStatusCode: Schema.optionalKey(
21516 Schema.Union([
21517 Schema.Number.annotate({ format: "uint16" })
21518 .check(Schema.isInt().annotate({ expected: "an integer" }))
21519 .check(
21520 Schema.isGreaterThanOrEqualTo(0).annotate({
21521 expected: "a value greater than or equal to 0",
21522 }),
21523 ),
21524 Schema.Null,
21525 ]),
21526 ),
21527 }),
21528 }).annotate({
21529 title: "ResponseTooManyFailedAttemptsCodexErrorInfo",
21530 description: "Reached the retry limit for responses.",
21531 }),
1861321532 Schema.Struct({
18614 name: Schema.String,
18615 path: Schema.String,
18616 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
18617 }).annotate({ title: "MentionUserInput" }),
21533 activeTurnNotSteerable: Schema.Struct({
21534 turnKind: V2TurnCompletedNotification__NonSteerableTurnKind,
21535 }),
21536 }).annotate({
21537 title: "ActiveTurnNotSteerableCodexErrorInfo",
21538 description:
21539 "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`.",
21540 }),
1861821541 ],
1861921542 { mode: "oneOf" },
18620);
21543).annotate({
21544 description:
21545 "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.",
21546 identifier: "V2TurnCompletedNotification__CodexErrorInfo",
21547});
1862121548
18622export type V2ThreadUnarchiveResponse__SubAgentSource =
18623 | "review"
18624 | "compact"
18625 | "memory_consolidation"
18626 | {
18627 readonly thread_spawn: {
18628 readonly agent_nickname?: string | null;
18629 readonly agent_path?: V2ThreadUnarchiveResponse__AgentPath | null;
18630 readonly agent_role?: string | null;
18631 readonly depth: number;
18632 readonly parent_thread_id: V2ThreadUnarchiveResponse__ThreadId;
18633 };
18634 }
18635 | { readonly other: string };
18636export const V2ThreadUnarchiveResponse__SubAgentSource = Schema.Union(
18637 [
18638 Schema.Literals(["review", "compact", "memory_consolidation"]),
18639 Schema.Struct({
18640 thread_spawn: Schema.Struct({
18641 agent_nickname: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18642 agent_path: Schema.optionalKey(
18643 Schema.Union([V2ThreadUnarchiveResponse__AgentPath, Schema.Null]),
18644 ),
18645 agent_role: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
18646 depth: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
18647 parent_thread_id: V2ThreadUnarchiveResponse__ThreadId,
21549export type V2TurnCompletedNotification__TextElement = {
21550 readonly byteRange: V2TurnCompletedNotification__ByteRange;
21551 readonly placeholder?: string | null;
21552};
21553export const V2TurnCompletedNotification__TextElement = Schema.Struct({
21554 byteRange: Schema.suspend(
21555 (): Schema.Codec<V2TurnCompletedNotification__ByteRange> =>
21556 V2TurnCompletedNotification__ByteRange,
21557 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
21558 placeholder: Schema.optionalKey(
21559 Schema.Union([
21560 Schema.String.annotate({
21561 description: "Optional human-readable placeholder for the element, displayed in the UI.",
1864821562 }),
18649 }).annotate({ title: "ThreadSpawnSubAgentSource" }),
18650 Schema.Struct({ other: Schema.String }).annotate({ title: "OtherSubAgentSource" }),
18651 ],
18652 { mode: "oneOf" },
18653);
21563 Schema.Null,
21564 ]),
21565 ),
21566}).annotate({ identifier: "V2TurnCompletedNotification__TextElement" });
21567
21568export type V2TurnCompletedNotification__MemoryCitation = {
21569 readonly entries: ReadonlyArray<V2TurnCompletedNotification__MemoryCitationEntry>;
21570 readonly threadIds: ReadonlyArray<string>;
21571};
21572export const V2TurnCompletedNotification__MemoryCitation = Schema.Struct({
21573 entries: Schema.Array(V2TurnCompletedNotification__MemoryCitationEntry),
21574 threadIds: Schema.Array(Schema.String),
21575}).annotate({ identifier: "V2TurnCompletedNotification__MemoryCitation" });
1865421576
1865521577export type V2TurnCompletedNotification__CommandAction =
1865621578 | {
......@@ -18692,7 +21614,18 @@ export const V2TurnCompletedNotification__CommandAction = Schema.Union(
1869221614 }).annotate({ title: "UnknownCommandAction" }),
1869321615 ],
1869421616 { mode: "oneOf" },
18695);
21617).annotate({ identifier: "V2TurnCompletedNotification__CommandAction" });
21618
21619export type V2TurnCompletedNotification__FileUpdateChange = {
21620 readonly diff: string;
21621 readonly kind: V2TurnCompletedNotification__PatchChangeKind;
21622 readonly path: string;
21623};
21624export const V2TurnCompletedNotification__FileUpdateChange = Schema.Struct({
21625 diff: Schema.String,
21626 kind: V2TurnCompletedNotification__PatchChangeKind,
21627 path: Schema.String,
21628}).annotate({ identifier: "V2TurnCompletedNotification__FileUpdateChange" });
1869621629
1869721630export type V2TurnCompletedNotification__CollabAgentState = {
1869821631 readonly message?: string | null;
......@@ -18701,18 +21634,18 @@ export type V2TurnCompletedNotification__CollabAgentState = {
1870121634export const V2TurnCompletedNotification__CollabAgentState = Schema.Struct({
1870221635 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1870321636 status: V2TurnCompletedNotification__CollabAgentStatus,
18704});
21637}).annotate({ identifier: "V2TurnCompletedNotification__CollabAgentState" });
1870521638
18706export type V2TurnCompletedNotification__MemoryCitation = {
18707 readonly entries: ReadonlyArray<V2TurnCompletedNotification__MemoryCitationEntry>;
18708 readonly threadIds: ReadonlyArray<string>;
21639export type V2TurnPlanUpdatedNotification__TurnPlanStep = {
21640 readonly status: V2TurnPlanUpdatedNotification__TurnPlanStepStatus;
21641 readonly step: string;
1870921642};
18710export const V2TurnCompletedNotification__MemoryCitation = Schema.Struct({
18711 entries: Schema.Array(V2TurnCompletedNotification__MemoryCitationEntry),
18712 threadIds: Schema.Array(Schema.String),
18713});
21643export const V2TurnPlanUpdatedNotification__TurnPlanStep = Schema.Struct({
21644 status: V2TurnPlanUpdatedNotification__TurnPlanStepStatus,
21645 step: Schema.String,
21646}).annotate({ identifier: "V2TurnPlanUpdatedNotification__TurnPlanStep" });
1871421647
18715export type V2TurnCompletedNotification__CodexErrorInfo =
21648export type V2TurnStartedNotification__CodexErrorInfo =
1871621649 | "contextWindowExceeded"
1871721650 | "sessionBudgetExceeded"
1871821651 | "usageLimitExceeded"
......@@ -18723,8 +21656,6 @@ export type V2TurnCompletedNotification__CodexErrorInfo =
1872321656 | "badRequest"
1872421657 | "threadRollbackFailed"
1872521658 | "sandboxError"
18726 | "rateLimitExceeded"
18727 | "misalignmentPolicyViolation"
1872821659 | "other"
1872921660 | { readonly httpConnectionFailed: { readonly httpStatusCode?: number | null } }
1873021661 | { readonly responseStreamConnectionFailed: { readonly httpStatusCode?: number | null } }
......@@ -18732,10 +21663,10 @@ export type V2TurnCompletedNotification__CodexErrorInfo =
1873221663 | { readonly responseTooManyFailedAttempts: { readonly httpStatusCode?: number | null } }
1873321664 | {
1873421665 readonly activeTurnNotSteerable: {
18735 readonly turnKind: V2TurnCompletedNotification__NonSteerableTurnKind;
21666 readonly turnKind: V2TurnStartedNotification__NonSteerableTurnKind;
1873621667 };
1873721668 };
18738export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union(
21669export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union(
1873921670 [
1874021671 Schema.Literals([
1874121672 "contextWindowExceeded",
......@@ -18748,8 +21679,6 @@ export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union(
1874821679 "badRequest",
1874921680 "threadRollbackFailed",
1875021681 "sandboxError",
18751 "rateLimitExceeded",
18752 "misalignmentPolicyViolation",
1875321682 "other",
1875421683 ]),
1875521684 Schema.Struct({
......@@ -18757,8 +21686,12 @@ export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union(
1875721686 httpStatusCode: Schema.optionalKey(
1875821687 Schema.Union([
1875921688 Schema.Number.annotate({ format: "uint16" })
18760 .check(Schema.isInt())
18761 .check(Schema.isGreaterThanOrEqualTo(0)),
21689 .check(Schema.isInt().annotate({ expected: "an integer" }))
21690 .check(
21691 Schema.isGreaterThanOrEqualTo(0).annotate({
21692 expected: "a value greater than or equal to 0",
21693 }),
21694 ),
1876221695 Schema.Null,
1876321696 ]),
1876421697 ),
......@@ -18769,8 +21702,12 @@ export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union(
1876921702 httpStatusCode: Schema.optionalKey(
1877021703 Schema.Union([
1877121704 Schema.Number.annotate({ format: "uint16" })
18772 .check(Schema.isInt())
18773 .check(Schema.isGreaterThanOrEqualTo(0)),
21705 .check(Schema.isInt().annotate({ expected: "an integer" }))
21706 .check(
21707 Schema.isGreaterThanOrEqualTo(0).annotate({
21708 expected: "a value greater than or equal to 0",
21709 }),
21710 ),
1877421711 Schema.Null,
1877521712 ]),
1877621713 ),
......@@ -18784,8 +21721,12 @@ export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union(
1878421721 httpStatusCode: Schema.optionalKey(
1878521722 Schema.Union([
1878621723 Schema.Number.annotate({ format: "uint16" })
18787 .check(Schema.isInt())
18788 .check(Schema.isGreaterThanOrEqualTo(0)),
21724 .check(Schema.isInt().annotate({ expected: "an integer" }))
21725 .check(
21726 Schema.isGreaterThanOrEqualTo(0).annotate({
21727 expected: "a value greater than or equal to 0",
21728 }),
21729 ),
1878921730 Schema.Null,
1879021731 ]),
1879121732 ),
......@@ -18800,8 +21741,12 @@ export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union(
1880021741 httpStatusCode: Schema.optionalKey(
1880121742 Schema.Union([
1880221743 Schema.Number.annotate({ format: "uint16" })
18803 .check(Schema.isInt())
18804 .check(Schema.isGreaterThanOrEqualTo(0)),
21744 .check(Schema.isInt().annotate({ expected: "an integer" }))
21745 .check(
21746 Schema.isGreaterThanOrEqualTo(0).annotate({
21747 expected: "a value greater than or equal to 0",
21748 }),
21749 ),
1880521750 Schema.Null,
1880621751 ]),
1880721752 ),
......@@ -18812,7 +21757,7 @@ export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union(
1881221757 }),
1881321758 Schema.Struct({
1881421759 activeTurnNotSteerable: Schema.Struct({
18815 turnKind: V2TurnCompletedNotification__NonSteerableTurnKind,
21760 turnKind: V2TurnStartedNotification__NonSteerableTurnKind,
1881621761 }),
1881721762 }).annotate({
1881821763 title: "ActiveTurnNotSteerableCodexErrorInfo",
......@@ -18824,95 +21769,35 @@ export const V2TurnCompletedNotification__CodexErrorInfo = Schema.Union(
1882421769).annotate({
1882521770 description:
1882621771 "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.",
21772 identifier: "V2TurnStartedNotification__CodexErrorInfo",
1882721773});
1882821774
18829export type V2TurnCompletedNotification__FileUpdateChange = {
18830 readonly diff: string;
18831 readonly kind: V2TurnCompletedNotification__PatchChangeKind;
18832 readonly path: string;
21775export type V2TurnStartedNotification__TextElement = {
21776 readonly byteRange: V2TurnStartedNotification__ByteRange;
21777 readonly placeholder?: string | null;
1883321778};
18834export const V2TurnCompletedNotification__FileUpdateChange = Schema.Struct({
18835 diff: Schema.String,
18836 kind: V2TurnCompletedNotification__PatchChangeKind,
18837 path: Schema.String,
18838});
18839
18840export type V2TurnCompletedNotification__UserInput =
18841 | {
18842 readonly text: string;
18843 readonly text_elements?: ReadonlyArray<V2TurnCompletedNotification__TextElement>;
18844 readonly type: "text";
18845 }
18846 | {
18847 readonly detail?: V2TurnCompletedNotification__ImageDetail | null;
18848 readonly type: "image";
18849 readonly url: string;
18850 }
18851 | {
18852 readonly detail?: V2TurnCompletedNotification__ImageDetail | null;
18853 readonly path: string;
18854 readonly type: "localImage";
18855 }
18856 | { readonly type: "audio"; readonly url: string }
18857 | { readonly path: string; readonly type: "localAudio" }
18858 | { readonly name: string; readonly path: string; readonly type: "skill" }
18859 | { readonly name: string; readonly path: string; readonly type: "mention" };
18860export const V2TurnCompletedNotification__UserInput = Schema.Union(
18861 [
18862 Schema.Struct({
18863 text: Schema.String,
18864 text_elements: Schema.optionalKey(
18865 Schema.Array(V2TurnCompletedNotification__TextElement).annotate({
18866 description: "UI-defined spans within `text` used to render or persist special elements.",
18867 default: [],
18868 }),
18869 ),
18870 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
18871 }).annotate({ title: "TextUserInput" }),
18872 Schema.Struct({
18873 detail: Schema.optionalKey(
18874 Schema.Union([V2TurnCompletedNotification__ImageDetail, Schema.Null]),
18875 ),
18876 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
18877 url: Schema.String,
18878 }).annotate({ title: "ImageUserInput" }),
18879 Schema.Struct({
18880 detail: Schema.optionalKey(
18881 Schema.Union([V2TurnCompletedNotification__ImageDetail, Schema.Null]),
18882 ),
18883 path: Schema.String,
18884 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
18885 }).annotate({ title: "LocalImageUserInput" }),
18886 Schema.Struct({
18887 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
18888 url: Schema.String,
18889 }).annotate({ title: "AudioUserInput" }),
18890 Schema.Struct({
18891 path: Schema.String,
18892 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
18893 }).annotate({ title: "LocalAudioUserInput" }),
18894 Schema.Struct({
18895 name: Schema.String,
18896 path: Schema.String,
18897 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
18898 }).annotate({ title: "SkillUserInput" }),
18899 Schema.Struct({
18900 name: Schema.String,
18901 path: Schema.String,
18902 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
18903 }).annotate({ title: "MentionUserInput" }),
18904 ],
18905 { mode: "oneOf" },
18906);
21779export const V2TurnStartedNotification__TextElement = Schema.Struct({
21780 byteRange: Schema.suspend(
21781 (): Schema.Codec<V2TurnStartedNotification__ByteRange> => V2TurnStartedNotification__ByteRange,
21782 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
21783 placeholder: Schema.optionalKey(
21784 Schema.Union([
21785 Schema.String.annotate({
21786 description: "Optional human-readable placeholder for the element, displayed in the UI.",
21787 }),
21788 Schema.Null,
21789 ]),
21790 ),
21791}).annotate({ identifier: "V2TurnStartedNotification__TextElement" });
1890721792
18908export type V2TurnPlanUpdatedNotification__TurnPlanStep = {
18909 readonly status: V2TurnPlanUpdatedNotification__TurnPlanStepStatus;
18910 readonly step: string;
21793export type V2TurnStartedNotification__MemoryCitation = {
21794 readonly entries: ReadonlyArray<V2TurnStartedNotification__MemoryCitationEntry>;
21795 readonly threadIds: ReadonlyArray<string>;
1891121796};
18912export const V2TurnPlanUpdatedNotification__TurnPlanStep = Schema.Struct({
18913 status: V2TurnPlanUpdatedNotification__TurnPlanStepStatus,
18914 step: Schema.String,
18915});
21797export const V2TurnStartedNotification__MemoryCitation = Schema.Struct({
21798 entries: Schema.Array(V2TurnStartedNotification__MemoryCitationEntry),
21799 threadIds: Schema.Array(Schema.String),
21800}).annotate({ identifier: "V2TurnStartedNotification__MemoryCitation" });
1891621801
1891721802export type V2TurnStartedNotification__CommandAction =
1891821803 | {
......@@ -18954,7 +21839,18 @@ export const V2TurnStartedNotification__CommandAction = Schema.Union(
1895421839 }).annotate({ title: "UnknownCommandAction" }),
1895521840 ],
1895621841 { mode: "oneOf" },
18957);
21842).annotate({ identifier: "V2TurnStartedNotification__CommandAction" });
21843
21844export type V2TurnStartedNotification__FileUpdateChange = {
21845 readonly diff: string;
21846 readonly kind: V2TurnStartedNotification__PatchChangeKind;
21847 readonly path: string;
21848};
21849export const V2TurnStartedNotification__FileUpdateChange = Schema.Struct({
21850 diff: Schema.String,
21851 kind: V2TurnStartedNotification__PatchChangeKind,
21852 path: Schema.String,
21853}).annotate({ identifier: "V2TurnStartedNotification__FileUpdateChange" });
1895821854
1895921855export type V2TurnStartedNotification__CollabAgentState = {
1896021856 readonly message?: string | null;
......@@ -18963,18 +21859,88 @@ export type V2TurnStartedNotification__CollabAgentState = {
1896321859export const V2TurnStartedNotification__CollabAgentState = Schema.Struct({
1896421860 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1896521861 status: V2TurnStartedNotification__CollabAgentStatus,
18966});
21862}).annotate({ identifier: "V2TurnStartedNotification__CollabAgentState" });
1896721863
18968export type V2TurnStartedNotification__MemoryCitation = {
18969 readonly entries: ReadonlyArray<V2TurnStartedNotification__MemoryCitationEntry>;
18970 readonly threadIds: ReadonlyArray<string>;
21864export type V2TurnStartParams__Settings = {
21865 readonly developer_instructions?: string | null;
21866 readonly model: string;
21867 readonly reasoning_effort?: V2TurnStartParams__ReasoningEffort | null;
1897121868};
18972export const V2TurnStartedNotification__MemoryCitation = Schema.Struct({
18973 entries: Schema.Array(V2TurnStartedNotification__MemoryCitationEntry),
18974 threadIds: Schema.Array(Schema.String),
21869export const V2TurnStartParams__Settings = Schema.Struct({
21870 developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
21871 model: Schema.String,
21872 reasoning_effort: Schema.optionalKey(
21873 Schema.Union([V2TurnStartParams__ReasoningEffort, Schema.Null]),
21874 ),
21875}).annotate({
21876 description: "Settings for a collaboration mode.",
21877 identifier: "V2TurnStartParams__Settings",
1897521878});
1897621879
18977export type V2TurnStartedNotification__CodexErrorInfo =
21880export type V2TurnStartParams__TextElement = {
21881 readonly byteRange: V2TurnStartParams__ByteRange;
21882 readonly placeholder?: string | null;
21883};
21884export const V2TurnStartParams__TextElement = Schema.Struct({
21885 byteRange: Schema.suspend(
21886 (): Schema.Codec<V2TurnStartParams__ByteRange> => V2TurnStartParams__ByteRange,
21887 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
21888 placeholder: Schema.optionalKey(
21889 Schema.Union([
21890 Schema.String.annotate({
21891 description: "Optional human-readable placeholder for the element, displayed in the UI.",
21892 }),
21893 Schema.Null,
21894 ]),
21895 ),
21896}).annotate({ identifier: "V2TurnStartParams__TextElement" });
21897
21898export type V2TurnStartParams__SandboxPolicy =
21899 | { readonly type: "dangerFullAccess" }
21900 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
21901 | { readonly networkAccess?: V2TurnStartParams__NetworkAccess; readonly type: "externalSandbox" }
21902 | {
21903 readonly excludeSlashTmp?: boolean;
21904 readonly excludeTmpdirEnvVar?: boolean;
21905 readonly networkAccess?: boolean;
21906 readonly type: "workspaceWrite";
21907 readonly writableRoots?: ReadonlyArray<V2TurnStartParams__AbsolutePathBuf>;
21908 };
21909export const V2TurnStartParams__SandboxPolicy = Schema.Union(
21910 [
21911 Schema.Struct({
21912 type: Schema.Literal("dangerFullAccess").annotate({
21913 title: "DangerFullAccessSandboxPolicyType",
21914 }),
21915 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
21916 Schema.Struct({
21917 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
21918 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
21919 }).annotate({ title: "ReadOnlySandboxPolicy" }),
21920 Schema.Struct({
21921 networkAccess: Schema.optionalKey(
21922 Schema.suspend(
21923 (): Schema.Codec<V2TurnStartParams__NetworkAccess> => V2TurnStartParams__NetworkAccess,
21924 ).annotate({ default: "restricted" }),
21925 ),
21926 type: Schema.Literal("externalSandbox").annotate({
21927 title: "ExternalSandboxSandboxPolicyType",
21928 }),
21929 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
21930 Schema.Struct({
21931 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
21932 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
21933 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
21934 type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
21935 writableRoots: Schema.optionalKey(
21936 Schema.Array(V2TurnStartParams__AbsolutePathBuf).annotate({ default: [] }),
21937 ),
21938 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
21939 ],
21940 { mode: "oneOf" },
21941).annotate({ identifier: "V2TurnStartParams__SandboxPolicy" });
21942
21943export type V2TurnStartResponse__CodexErrorInfo =
1897821944 | "contextWindowExceeded"
1897921945 | "sessionBudgetExceeded"
1898021946 | "usageLimitExceeded"
......@@ -18992,10 +21958,10 @@ export type V2TurnStartedNotification__CodexErrorInfo =
1899221958 | { readonly responseTooManyFailedAttempts: { readonly httpStatusCode?: number | null } }
1899321959 | {
1899421960 readonly activeTurnNotSteerable: {
18995 readonly turnKind: V2TurnStartedNotification__NonSteerableTurnKind;
21961 readonly turnKind: V2TurnStartResponse__NonSteerableTurnKind;
1899621962 };
1899721963 };
18998export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union(
21964export const V2TurnStartResponse__CodexErrorInfo = Schema.Union(
1899921965 [
1900021966 Schema.Literals([
1900121967 "contextWindowExceeded",
......@@ -19015,8 +21981,12 @@ export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union(
1901521981 httpStatusCode: Schema.optionalKey(
1901621982 Schema.Union([
1901721983 Schema.Number.annotate({ format: "uint16" })
19018 .check(Schema.isInt())
19019 .check(Schema.isGreaterThanOrEqualTo(0)),
21984 .check(Schema.isInt().annotate({ expected: "an integer" }))
21985 .check(
21986 Schema.isGreaterThanOrEqualTo(0).annotate({
21987 expected: "a value greater than or equal to 0",
21988 }),
21989 ),
1902021990 Schema.Null,
1902121991 ]),
1902221992 ),
......@@ -19027,8 +21997,12 @@ export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union(
1902721997 httpStatusCode: Schema.optionalKey(
1902821998 Schema.Union([
1902921999 Schema.Number.annotate({ format: "uint16" })
19030 .check(Schema.isInt())
19031 .check(Schema.isGreaterThanOrEqualTo(0)),
22000 .check(Schema.isInt().annotate({ expected: "an integer" }))
22001 .check(
22002 Schema.isGreaterThanOrEqualTo(0).annotate({
22003 expected: "a value greater than or equal to 0",
22004 }),
22005 ),
1903222006 Schema.Null,
1903322007 ]),
1903422008 ),
......@@ -19042,8 +22016,12 @@ export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union(
1904222016 httpStatusCode: Schema.optionalKey(
1904322017 Schema.Union([
1904422018 Schema.Number.annotate({ format: "uint16" })
19045 .check(Schema.isInt())
19046 .check(Schema.isGreaterThanOrEqualTo(0)),
22019 .check(Schema.isInt().annotate({ expected: "an integer" }))
22020 .check(
22021 Schema.isGreaterThanOrEqualTo(0).annotate({
22022 expected: "a value greater than or equal to 0",
22023 }),
22024 ),
1904722025 Schema.Null,
1904822026 ]),
1904922027 ),
......@@ -19058,8 +22036,12 @@ export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union(
1905822036 httpStatusCode: Schema.optionalKey(
1905922037 Schema.Union([
1906022038 Schema.Number.annotate({ format: "uint16" })
19061 .check(Schema.isInt())
19062 .check(Schema.isGreaterThanOrEqualTo(0)),
22039 .check(Schema.isInt().annotate({ expected: "an integer" }))
22040 .check(
22041 Schema.isGreaterThanOrEqualTo(0).annotate({
22042 expected: "a value greater than or equal to 0",
22043 }),
22044 ),
1906322045 Schema.Null,
1906422046 ]),
1906522047 ),
......@@ -19070,7 +22052,7 @@ export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union(
1907022052 }),
1907122053 Schema.Struct({
1907222054 activeTurnNotSteerable: Schema.Struct({
19073 turnKind: V2TurnStartedNotification__NonSteerableTurnKind,
22055 turnKind: V2TurnStartResponse__NonSteerableTurnKind,
1907422056 }),
1907522057 }).annotate({
1907622058 title: "ActiveTurnNotSteerableCodexErrorInfo",
......@@ -19082,220 +22064,49 @@ export const V2TurnStartedNotification__CodexErrorInfo = Schema.Union(
1908222064).annotate({
1908322065 description:
1908422066 "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.",
22067 identifier: "V2TurnStartResponse__CodexErrorInfo",
1908522068});
1908622069
19087export type V2TurnStartedNotification__FileUpdateChange = {
19088 readonly diff: string;
19089 readonly kind: V2TurnStartedNotification__PatchChangeKind;
19090 readonly path: string;
22070export type V2TurnStartResponse__TextElement = {
22071 readonly byteRange: V2TurnStartResponse__ByteRange;
22072 readonly placeholder?: string | null;
1909122073};
19092export const V2TurnStartedNotification__FileUpdateChange = Schema.Struct({
19093 diff: Schema.String,
19094 kind: V2TurnStartedNotification__PatchChangeKind,
19095 path: Schema.String,
19096});
22074export const V2TurnStartResponse__TextElement = Schema.Struct({
22075 byteRange: Schema.suspend(
22076 (): Schema.Codec<V2TurnStartResponse__ByteRange> => V2TurnStartResponse__ByteRange,
22077 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
22078 placeholder: Schema.optionalKey(
22079 Schema.Union([
22080 Schema.String.annotate({
22081 description: "Optional human-readable placeholder for the element, displayed in the UI.",
22082 }),
22083 Schema.Null,
22084 ]),
22085 ),
22086}).annotate({ identifier: "V2TurnStartResponse__TextElement" });
1909722087
19098export type V2TurnStartedNotification__UserInput =
22088export type V2TurnStartResponse__MemoryCitation = {
22089 readonly entries: ReadonlyArray<V2TurnStartResponse__MemoryCitationEntry>;
22090 readonly threadIds: ReadonlyArray<string>;
22091};
22092export const V2TurnStartResponse__MemoryCitation = Schema.Struct({
22093 entries: Schema.Array(V2TurnStartResponse__MemoryCitationEntry),
22094 threadIds: Schema.Array(Schema.String),
22095}).annotate({ identifier: "V2TurnStartResponse__MemoryCitation" });
22096
22097export type V2TurnStartResponse__CommandAction =
1909922098 | {
19100 readonly text: string;
19101 readonly text_elements?: ReadonlyArray<V2TurnStartedNotification__TextElement>;
19102 readonly type: "text";
22099 readonly command: string;
22100 readonly name: string;
22101 readonly path: V2TurnStartResponse__AbsolutePathBuf;
22102 readonly type: "read";
1910322103 }
22104 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
1910422105 | {
19105 readonly detail?: V2TurnStartedNotification__ImageDetail | null;
19106 readonly type: "image";
19107 readonly url: string;
19108 }
19109 | {
19110 readonly detail?: V2TurnStartedNotification__ImageDetail | null;
19111 readonly path: string;
19112 readonly type: "localImage";
19113 }
19114 | { readonly type: "audio"; readonly url: string }
19115 | { readonly path: string; readonly type: "localAudio" }
19116 | { readonly name: string; readonly path: string; readonly type: "skill" }
19117 | { readonly name: string; readonly path: string; readonly type: "mention" };
19118export const V2TurnStartedNotification__UserInput = Schema.Union(
19119 [
19120 Schema.Struct({
19121 text: Schema.String,
19122 text_elements: Schema.optionalKey(
19123 Schema.Array(V2TurnStartedNotification__TextElement).annotate({
19124 description: "UI-defined spans within `text` used to render or persist special elements.",
19125 default: [],
19126 }),
19127 ),
19128 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
19129 }).annotate({ title: "TextUserInput" }),
19130 Schema.Struct({
19131 detail: Schema.optionalKey(
19132 Schema.Union([V2TurnStartedNotification__ImageDetail, Schema.Null]),
19133 ),
19134 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
19135 url: Schema.String,
19136 }).annotate({ title: "ImageUserInput" }),
19137 Schema.Struct({
19138 detail: Schema.optionalKey(
19139 Schema.Union([V2TurnStartedNotification__ImageDetail, Schema.Null]),
19140 ),
19141 path: Schema.String,
19142 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
19143 }).annotate({ title: "LocalImageUserInput" }),
19144 Schema.Struct({
19145 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
19146 url: Schema.String,
19147 }).annotate({ title: "AudioUserInput" }),
19148 Schema.Struct({
19149 path: Schema.String,
19150 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
19151 }).annotate({ title: "LocalAudioUserInput" }),
19152 Schema.Struct({
19153 name: Schema.String,
19154 path: Schema.String,
19155 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
19156 }).annotate({ title: "SkillUserInput" }),
19157 Schema.Struct({
19158 name: Schema.String,
19159 path: Schema.String,
19160 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
19161 }).annotate({ title: "MentionUserInput" }),
19162 ],
19163 { mode: "oneOf" },
19164);
19165
19166export type V2TurnStartParams__SandboxPolicy =
19167 | { readonly type: "dangerFullAccess" }
19168 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
19169 | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
19170 | {
19171 readonly excludeSlashTmp?: boolean;
19172 readonly excludeTmpdirEnvVar?: boolean;
19173 readonly networkAccess?: boolean;
19174 readonly type: "workspaceWrite";
19175 readonly writableRoots?: ReadonlyArray<V2TurnStartParams__AbsolutePathBuf>;
19176 };
19177export const V2TurnStartParams__SandboxPolicy = Schema.Union(
19178 [
19179 Schema.Struct({
19180 type: Schema.Literal("dangerFullAccess").annotate({
19181 title: "DangerFullAccessSandboxPolicyType",
19182 }),
19183 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
19184 Schema.Struct({
19185 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
19186 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
19187 }).annotate({ title: "ReadOnlySandboxPolicy" }),
19188 Schema.Struct({
19189 networkAccess: Schema.optionalKey(
19190 Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
19191 ),
19192 type: Schema.Literal("externalSandbox").annotate({
19193 title: "ExternalSandboxSandboxPolicyType",
19194 }),
19195 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
19196 Schema.Struct({
19197 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
19198 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
19199 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
19200 type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
19201 writableRoots: Schema.optionalKey(
19202 Schema.Array(V2TurnStartParams__AbsolutePathBuf).annotate({ default: [] }),
19203 ),
19204 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
19205 ],
19206 { mode: "oneOf" },
19207);
19208
19209export type V2TurnStartParams__Settings = {
19210 readonly developer_instructions?: string | null;
19211 readonly model: string;
19212 readonly reasoning_effort?: V2TurnStartParams__ReasoningEffort | null;
19213};
19214export const V2TurnStartParams__Settings = Schema.Struct({
19215 developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19216 model: Schema.String,
19217 reasoning_effort: Schema.optionalKey(
19218 Schema.Union([V2TurnStartParams__ReasoningEffort, Schema.Null]),
19219 ),
19220}).annotate({ description: "Settings for a collaboration mode." });
19221
19222export type V2TurnStartParams__UserInput =
19223 | {
19224 readonly text: string;
19225 readonly text_elements?: ReadonlyArray<V2TurnStartParams__TextElement>;
19226 readonly type: "text";
19227 }
19228 | {
19229 readonly detail?: V2TurnStartParams__ImageDetail | null;
19230 readonly type: "image";
19231 readonly url: string;
19232 }
19233 | {
19234 readonly detail?: V2TurnStartParams__ImageDetail | null;
19235 readonly path: string;
19236 readonly type: "localImage";
19237 }
19238 | { readonly type: "audio"; readonly url: string }
19239 | { readonly path: string; readonly type: "localAudio" }
19240 | { readonly name: string; readonly path: string; readonly type: "skill" }
19241 | { readonly name: string; readonly path: string; readonly type: "mention" };
19242export const V2TurnStartParams__UserInput = Schema.Union(
19243 [
19244 Schema.Struct({
19245 text: Schema.String,
19246 text_elements: Schema.optionalKey(
19247 Schema.Array(V2TurnStartParams__TextElement).annotate({
19248 description: "UI-defined spans within `text` used to render or persist special elements.",
19249 default: [],
19250 }),
19251 ),
19252 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
19253 }).annotate({ title: "TextUserInput" }),
19254 Schema.Struct({
19255 detail: Schema.optionalKey(Schema.Union([V2TurnStartParams__ImageDetail, Schema.Null])),
19256 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
19257 url: Schema.String,
19258 }).annotate({ title: "ImageUserInput" }),
19259 Schema.Struct({
19260 detail: Schema.optionalKey(Schema.Union([V2TurnStartParams__ImageDetail, Schema.Null])),
19261 path: Schema.String,
19262 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
19263 }).annotate({ title: "LocalImageUserInput" }),
19264 Schema.Struct({
19265 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
19266 url: Schema.String,
19267 }).annotate({ title: "AudioUserInput" }),
19268 Schema.Struct({
19269 path: Schema.String,
19270 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
19271 }).annotate({ title: "LocalAudioUserInput" }),
19272 Schema.Struct({
19273 name: Schema.String,
19274 path: Schema.String,
19275 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
19276 }).annotate({ title: "SkillUserInput" }),
19277 Schema.Struct({
19278 name: Schema.String,
19279 path: Schema.String,
19280 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
19281 }).annotate({ title: "MentionUserInput" }),
19282 ],
19283 { mode: "oneOf" },
19284);
19285
19286export type V2TurnStartResponse__CommandAction =
19287 | {
19288 readonly command: string;
19289 readonly name: string;
19290 readonly path: V2TurnStartResponse__AbsolutePathBuf;
19291 readonly type: "read";
19292 }
19293 | { readonly command: string; readonly path?: string | null; readonly type: "listFiles" }
19294 | {
19295 readonly command: string;
19296 readonly path?: string | null;
19297 readonly query?: string | null;
19298 readonly type: "search";
22106 readonly command: string;
22107 readonly path?: string | null;
22108 readonly query?: string | null;
22109 readonly type: "search";
1929922110 }
1930022111 | { readonly command: string; readonly type: "unknown" };
1930122112export const V2TurnStartResponse__CommandAction = Schema.Union(
......@@ -19323,7 +22134,18 @@ export const V2TurnStartResponse__CommandAction = Schema.Union(
1932322134 }).annotate({ title: "UnknownCommandAction" }),
1932422135 ],
1932522136 { mode: "oneOf" },
19326);
22137).annotate({ identifier: "V2TurnStartResponse__CommandAction" });
22138
22139export type V2TurnStartResponse__FileUpdateChange = {
22140 readonly diff: string;
22141 readonly kind: V2TurnStartResponse__PatchChangeKind;
22142 readonly path: string;
22143};
22144export const V2TurnStartResponse__FileUpdateChange = Schema.Struct({
22145 diff: Schema.String,
22146 kind: V2TurnStartResponse__PatchChangeKind,
22147 path: Schema.String,
22148}).annotate({ identifier: "V2TurnStartResponse__FileUpdateChange" });
1932722149
1932822150export type V2TurnStartResponse__CollabAgentState = {
1932922151 readonly message?: string | null;
......@@ -19332,215 +22154,128 @@ export type V2TurnStartResponse__CollabAgentState = {
1933222154export const V2TurnStartResponse__CollabAgentState = Schema.Struct({
1933322155 message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1933422156 status: V2TurnStartResponse__CollabAgentStatus,
19335});
22157}).annotate({ identifier: "V2TurnStartResponse__CollabAgentState" });
1933622158
19337export type V2TurnStartResponse__MemoryCitation = {
19338 readonly entries: ReadonlyArray<V2TurnStartResponse__MemoryCitationEntry>;
19339 readonly threadIds: ReadonlyArray<string>;
22159export type V2TurnSteerParams__TextElement = {
22160 readonly byteRange: V2TurnSteerParams__ByteRange;
22161 readonly placeholder?: string | null;
1934022162};
19341export const V2TurnStartResponse__MemoryCitation = Schema.Struct({
19342 entries: Schema.Array(V2TurnStartResponse__MemoryCitationEntry),
19343 threadIds: Schema.Array(Schema.String),
19344});
22163export const V2TurnSteerParams__TextElement = Schema.Struct({
22164 byteRange: Schema.suspend(
22165 (): Schema.Codec<V2TurnSteerParams__ByteRange> => V2TurnSteerParams__ByteRange,
22166 ).annotate({ description: "Byte range in the parent `text` buffer that this element occupies." }),
22167 placeholder: Schema.optionalKey(
22168 Schema.Union([
22169 Schema.String.annotate({
22170 description: "Optional human-readable placeholder for the element, displayed in the UI.",
22171 }),
22172 Schema.Null,
22173 ]),
22174 ),
22175}).annotate({ identifier: "V2TurnSteerParams__TextElement" });
1934522176
19346export type V2TurnStartResponse__CodexErrorInfo =
19347 | "contextWindowExceeded"
19348 | "sessionBudgetExceeded"
19349 | "usageLimitExceeded"
19350 | "serverOverloaded"
19351 | "cyberPolicy"
19352 | "internalServerError"
19353 | "unauthorized"
19354 | "badRequest"
19355 | "threadRollbackFailed"
19356 | "sandboxError"
19357 | "other"
19358 | { readonly httpConnectionFailed: { readonly httpStatusCode?: number | null } }
19359 | { readonly responseStreamConnectionFailed: { readonly httpStatusCode?: number | null } }
19360 | { readonly responseStreamDisconnected: { readonly httpStatusCode?: number | null } }
19361 | { readonly responseTooManyFailedAttempts: { readonly httpStatusCode?: number | null } }
22177export type ApplyPatchApprovalResponse__ReviewDecision =
22178 | "approved"
1936222179 | {
19363 readonly activeTurnNotSteerable: {
19364 readonly turnKind: V2TurnStartResponse__NonSteerableTurnKind;
22180 readonly approved_execpolicy_amendment: {
22181 readonly proposed_execpolicy_amendment: ReadonlyArray<string>;
1936522182 };
19366 };
19367export const V2TurnStartResponse__CodexErrorInfo = Schema.Union(
22183 }
22184 | "approved_for_session"
22185 | {
22186 readonly network_policy_amendment: {
22187 readonly network_policy_amendment: ApplyPatchApprovalResponse__NetworkPolicyAmendment;
22188 };
22189 }
22190 | "denied"
22191 | "timed_out"
22192 | "abort";
22193export const ApplyPatchApprovalResponse__ReviewDecision = Schema.Union(
1936822194 [
19369 Schema.Literals([
19370 "contextWindowExceeded",
19371 "sessionBudgetExceeded",
19372 "usageLimitExceeded",
19373 "serverOverloaded",
19374 "cyberPolicy",
19375 "internalServerError",
19376 "unauthorized",
19377 "badRequest",
19378 "threadRollbackFailed",
19379 "sandboxError",
19380 "other",
19381 ]),
19382 Schema.Struct({
19383 httpConnectionFailed: Schema.Struct({
19384 httpStatusCode: Schema.optionalKey(
19385 Schema.Union([
19386 Schema.Number.annotate({ format: "uint16" })
19387 .check(Schema.isInt())
19388 .check(Schema.isGreaterThanOrEqualTo(0)),
19389 Schema.Null,
19390 ]),
19391 ),
19392 }),
19393 }).annotate({ title: "HttpConnectionFailedCodexErrorInfo" }),
19394 Schema.Struct({
19395 responseStreamConnectionFailed: Schema.Struct({
19396 httpStatusCode: Schema.optionalKey(
19397 Schema.Union([
19398 Schema.Number.annotate({ format: "uint16" })
19399 .check(Schema.isInt())
19400 .check(Schema.isGreaterThanOrEqualTo(0)),
19401 Schema.Null,
19402 ]),
19403 ),
19404 }),
19405 }).annotate({
19406 title: "ResponseStreamConnectionFailedCodexErrorInfo",
19407 description: "Failed to connect to the response SSE stream.",
22195 Schema.Literal("approved").annotate({
22196 description: "User has approved this command and the agent should execute it.",
1940822197 }),
1940922198 Schema.Struct({
19410 responseStreamDisconnected: Schema.Struct({
19411 httpStatusCode: Schema.optionalKey(
19412 Schema.Union([
19413 Schema.Number.annotate({ format: "uint16" })
19414 .check(Schema.isInt())
19415 .check(Schema.isGreaterThanOrEqualTo(0)),
19416 Schema.Null,
19417 ]),
19418 ),
22199 approved_execpolicy_amendment: Schema.Struct({
22200 proposed_execpolicy_amendment: Schema.Array(Schema.String),
1941922201 }),
1942022202 }).annotate({
19421 title: "ResponseStreamDisconnectedCodexErrorInfo",
22203 title: "ApprovedExecpolicyAmendmentReviewDecision",
1942222204 description:
19423 "The response SSE stream disconnected in the middle of a turn before completion.",
22205 "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.",
1942422206 }),
19425 Schema.Struct({
19426 responseTooManyFailedAttempts: Schema.Struct({
19427 httpStatusCode: Schema.optionalKey(
19428 Schema.Union([
19429 Schema.Number.annotate({ format: "uint16" })
19430 .check(Schema.isInt())
19431 .check(Schema.isGreaterThanOrEqualTo(0)),
19432 Schema.Null,
19433 ]),
19434 ),
19435 }),
19436 }).annotate({
19437 title: "ResponseTooManyFailedAttemptsCodexErrorInfo",
19438 description: "Reached the retry limit for responses.",
22207 Schema.Literal("approved_for_session").annotate({
22208 description:
22209 "User has approved this request and wants future prompts in the same session-scoped approval cache to be automatically approved for the remainder of the session.",
1943922210 }),
1944022211 Schema.Struct({
19441 activeTurnNotSteerable: Schema.Struct({
19442 turnKind: V2TurnStartResponse__NonSteerableTurnKind,
22212 network_policy_amendment: Schema.Struct({
22213 network_policy_amendment: ApplyPatchApprovalResponse__NetworkPolicyAmendment,
1944322214 }),
1944422215 }).annotate({
19445 title: "ActiveTurnNotSteerableCodexErrorInfo",
22216 title: "NetworkPolicyAmendmentReviewDecision",
1944622217 description:
19447 "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`.",
22218 "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
22219 }),
22220 Schema.Literal("denied").annotate({
22221 description:
22222 "User has denied this command and the agent should not execute it, but it should continue the session and try something else.",
22223 }),
22224 Schema.Literal("timed_out").annotate({
22225 description: "Automatic approval review timed out before reaching a decision.",
22226 }),
22227 Schema.Literal("abort").annotate({
22228 description:
22229 "User has denied this command and the agent should not do anything until the user's next command.",
1944822230 }),
1944922231 ],
1945022232 { mode: "oneOf" },
1945122233).annotate({
19452 description:
19453 "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.",
22234 description: "User's decision in response to an ExecApprovalRequest.",
22235 identifier: "ApplyPatchApprovalResponse__ReviewDecision",
1945422236});
1945522237
19456export type V2TurnStartResponse__FileUpdateChange = {
19457 readonly diff: string;
19458 readonly kind: V2TurnStartResponse__PatchChangeKind;
19459 readonly path: string;
22238export type ClientRequest__PluginShareSaveParams = {
22239 readonly discoverability?: ClientRequest__PluginShareDiscoverability | null;
22240 readonly pluginPath: ClientRequest__AbsolutePathBuf;
22241 readonly remotePluginId?: string | null;
22242 readonly shareTargets?: ReadonlyArray<ClientRequest__PluginShareTarget> | null;
1946022243};
19461export const V2TurnStartResponse__FileUpdateChange = Schema.Struct({
19462 diff: Schema.String,
19463 kind: V2TurnStartResponse__PatchChangeKind,
19464 path: Schema.String,
19465});
22244export const ClientRequest__PluginShareSaveParams = Schema.Struct({
22245 discoverability: Schema.optionalKey(
22246 Schema.Union([ClientRequest__PluginShareDiscoverability, Schema.Null]),
22247 ),
22248 pluginPath: ClientRequest__AbsolutePathBuf,
22249 remotePluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22250 shareTargets: Schema.optionalKey(
22251 Schema.Union([Schema.Array(ClientRequest__PluginShareTarget), Schema.Null]),
22252 ),
22253}).annotate({ identifier: "ClientRequest__PluginShareSaveParams" });
1946622254
19467export type V2TurnStartResponse__UserInput =
19468 | {
19469 readonly text: string;
19470 readonly text_elements?: ReadonlyArray<V2TurnStartResponse__TextElement>;
19471 readonly type: "text";
19472 }
19473 | {
19474 readonly detail?: V2TurnStartResponse__ImageDetail | null;
19475 readonly type: "image";
19476 readonly url: string;
19477 }
19478 | {
19479 readonly detail?: V2TurnStartResponse__ImageDetail | null;
19480 readonly path: string;
19481 readonly type: "localImage";
19482 }
19483 | { readonly type: "audio"; readonly url: string }
19484 | { readonly path: string; readonly type: "localAudio" }
19485 | { readonly name: string; readonly path: string; readonly type: "skill" }
19486 | { readonly name: string; readonly path: string; readonly type: "mention" };
19487export const V2TurnStartResponse__UserInput = Schema.Union(
19488 [
19489 Schema.Struct({
19490 text: Schema.String,
19491 text_elements: Schema.optionalKey(
19492 Schema.Array(V2TurnStartResponse__TextElement).annotate({
19493 description: "UI-defined spans within `text` used to render or persist special elements.",
19494 default: [],
19495 }),
19496 ),
19497 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
19498 }).annotate({ title: "TextUserInput" }),
19499 Schema.Struct({
19500 detail: Schema.optionalKey(Schema.Union([V2TurnStartResponse__ImageDetail, Schema.Null])),
19501 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
19502 url: Schema.String,
19503 }).annotate({ title: "ImageUserInput" }),
19504 Schema.Struct({
19505 detail: Schema.optionalKey(Schema.Union([V2TurnStartResponse__ImageDetail, Schema.Null])),
19506 path: Schema.String,
19507 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
19508 }).annotate({ title: "LocalImageUserInput" }),
19509 Schema.Struct({
19510 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
19511 url: Schema.String,
19512 }).annotate({ title: "AudioUserInput" }),
19513 Schema.Struct({
19514 path: Schema.String,
19515 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
19516 }).annotate({ title: "LocalAudioUserInput" }),
19517 Schema.Struct({
19518 name: Schema.String,
19519 path: Schema.String,
19520 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
19521 }).annotate({ title: "SkillUserInput" }),
19522 Schema.Struct({
19523 name: Schema.String,
19524 path: Schema.String,
19525 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
19526 }).annotate({ title: "MentionUserInput" }),
19527 ],
19528 { mode: "oneOf" },
19529);
22255export type ClientRequest__PluginShareUpdateTargetsParams = {
22256 readonly discoverability: ClientRequest__PluginShareUpdateDiscoverability;
22257 readonly remotePluginId: string;
22258 readonly shareTargets: ReadonlyArray<ClientRequest__PluginShareTarget>;
22259};
22260export const ClientRequest__PluginShareUpdateTargetsParams = Schema.Struct({
22261 discoverability: ClientRequest__PluginShareUpdateDiscoverability,
22262 remotePluginId: Schema.String,
22263 shareTargets: Schema.Array(ClientRequest__PluginShareTarget),
22264}).annotate({ identifier: "ClientRequest__PluginShareUpdateTargetsParams" });
1953022265
19531export type V2TurnSteerParams__UserInput =
22266export type ClientRequest__UserInput =
1953222267 | {
1953322268 readonly text: string;
19534 readonly text_elements?: ReadonlyArray<V2TurnSteerParams__TextElement>;
22269 readonly text_elements?: ReadonlyArray<ClientRequest__TextElement>;
1953522270 readonly type: "text";
1953622271 }
1953722272 | {
19538 readonly detail?: V2TurnSteerParams__ImageDetail | null;
22273 readonly detail?: ClientRequest__ImageDetail | null;
1953922274 readonly type: "image";
1954022275 readonly url: string;
1954122276 }
1954222277 | {
19543 readonly detail?: V2TurnSteerParams__ImageDetail | null;
22278 readonly detail?: ClientRequest__ImageDetail | null;
1954422279 readonly path: string;
1954522280 readonly type: "localImage";
1954622281 }
......@@ -19548,12 +22283,12 @@ export type V2TurnSteerParams__UserInput =
1954822283 | { readonly path: string; readonly type: "localAudio" }
1954922284 | { readonly name: string; readonly path: string; readonly type: "skill" }
1955022285 | { readonly name: string; readonly path: string; readonly type: "mention" };
19551export const V2TurnSteerParams__UserInput = Schema.Union(
22286export const ClientRequest__UserInput = Schema.Union(
1955222287 [
1955322288 Schema.Struct({
1955422289 text: Schema.String,
1955522290 text_elements: Schema.optionalKey(
19556 Schema.Array(V2TurnSteerParams__TextElement).annotate({
22291 Schema.Array(ClientRequest__TextElement).annotate({
1955722292 description: "UI-defined spans within `text` used to render or persist special elements.",
1955822293 default: [],
1955922294 }),
......@@ -19561,12 +22296,12 @@ export const V2TurnSteerParams__UserInput = Schema.Union(
1956122296 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
1956222297 }).annotate({ title: "TextUserInput" }),
1956322298 Schema.Struct({
19564 detail: Schema.optionalKey(Schema.Union([V2TurnSteerParams__ImageDetail, Schema.Null])),
22299 detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])),
1956522300 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
1956622301 url: Schema.String,
1956722302 }).annotate({ title: "ImageUserInput" }),
1956822303 Schema.Struct({
19569 detail: Schema.optionalKey(Schema.Union([V2TurnSteerParams__ImageDetail, Schema.Null])),
22304 detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])),
1957022305 path: Schema.String,
1957122306 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
1957222307 }).annotate({ title: "LocalImageUserInput" }),
......@@ -19590,65 +22325,15 @@ export const V2TurnSteerParams__UserInput = Schema.Union(
1959022325 }).annotate({ title: "MentionUserInput" }),
1959122326 ],
1959222327 { mode: "oneOf" },
19593);
22328).annotate({ identifier: "ClientRequest__UserInput" });
1959422329
19595export type ApplyPatchApprovalResponse__ReviewDecision =
19596 | "approved"
19597 | {
19598 readonly approved_execpolicy_amendment: {
19599 readonly proposed_execpolicy_amendment: ReadonlyArray<string>;
19600 };
19601 }
19602 | "approved_for_session"
19603 | {
19604 readonly network_policy_amendment: {
19605 readonly network_policy_amendment: ApplyPatchApprovalResponse__NetworkPolicyAmendment;
19606 };
19607 }
19608 | "denied"
19609 | "timed_out"
19610 | "abort";
19611export const ApplyPatchApprovalResponse__ReviewDecision = Schema.Union(
19612 [
19613 Schema.Literal("approved").annotate({
19614 description: "User has approved this command and the agent should execute it.",
19615 }),
19616 Schema.Struct({
19617 approved_execpolicy_amendment: Schema.Struct({
19618 proposed_execpolicy_amendment: Schema.Array(Schema.String),
19619 }),
19620 }).annotate({
19621 title: "ApprovedExecpolicyAmendmentReviewDecision",
19622 description:
19623 "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.",
19624 }),
19625 Schema.Literal("approved_for_session").annotate({
19626 description:
19627 "User has approved this request and wants future prompts in the same session-scoped approval cache to be automatically approved for the remainder of the session.",
19628 }),
19629 Schema.Struct({
19630 network_policy_amendment: Schema.Struct({
19631 network_policy_amendment: ApplyPatchApprovalResponse__NetworkPolicyAmendment,
19632 }),
19633 }).annotate({
19634 title: "NetworkPolicyAmendmentReviewDecision",
19635 description:
19636 "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
19637 }),
19638 Schema.Literal("denied").annotate({
19639 description:
19640 "User has denied this command and the agent should not execute it, but it should continue the session and try something else.",
19641 }),
19642 Schema.Literal("timed_out").annotate({
19643 description: "Automatic approval review timed out before reaching a decision.",
19644 }),
19645 Schema.Literal("abort").annotate({
19646 description:
19647 "User has denied this command and the agent should not do anything until the user's next command.",
19648 }),
19649 ],
19650 { mode: "oneOf" },
19651).annotate({ description: "User's decision in response to an ExecApprovalRequest." });
22330export type ClientRequest__FunctionCallOutputBody =
22331 | string
22332 | ReadonlyArray<ClientRequest__FunctionCallOutputContentItem>;
22333export const ClientRequest__FunctionCallOutputBody = Schema.Union([
22334 Schema.String,
22335 Schema.Array(ClientRequest__FunctionCallOutputContentItem),
22336]).annotate({ identifier: "ClientRequest__FunctionCallOutputBody" });
1965222337
1965322338export type ClientRequest__CommandExecParams = {
1965422339 readonly command: ReadonlyArray<string>;
......@@ -19705,8 +22390,12 @@ export const ClientRequest__CommandExecParams = Schema.Struct({
1970522390 "Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Cannot be combined with `disableOutputCap`.",
1970622391 format: "uint",
1970722392 })
19708 .check(Schema.isInt())
19709 .check(Schema.isGreaterThanOrEqualTo(0)),
22393 .check(Schema.isInt().annotate({ expected: "an integer" }))
22394 .check(
22395 Schema.isGreaterThanOrEqualTo(0).annotate({
22396 expected: "a value greater than or equal to 0",
22397 }),
22398 ),
1971022399 Schema.Null,
1971122400 ]),
1971222401 ),
......@@ -19748,7 +22437,7 @@ export const ClientRequest__CommandExecParams = Schema.Struct({
1974822437 description:
1974922438 "Optional timeout in milliseconds.\n\nWhen omitted, the server default applies. Cannot be combined with `disableTimeout`.",
1975022439 format: "int64",
19751 }).check(Schema.isInt()),
22440 }).check(Schema.isInt().annotate({ expected: "an integer" })),
1975222441 Schema.Null,
1975322442 ]),
1975422443 ),
......@@ -19760,68 +22449,7 @@ export const ClientRequest__CommandExecParams = Schema.Struct({
1976022449}).annotate({
1976122450 description:
1976222451 "Run a standalone command (argv vector) in the server sandbox without creating a thread or turn.\n\nThe final `command/exec` response is deferred until the process exits and is sent only after all `command/exec/outputDelta` notifications for that connection have been emitted.",
19763});
19764
19765export type ClientRequest__FunctionCallOutputBody =
19766 | string
19767 | ReadonlyArray<ClientRequest__FunctionCallOutputContentItem>;
19768export const ClientRequest__FunctionCallOutputBody = Schema.Union([
19769 Schema.String,
19770 Schema.Array(ClientRequest__FunctionCallOutputContentItem),
19771]);
19772
19773export type ClientRequest__ConfigBatchWriteParams = {
19774 readonly edits: ReadonlyArray<ClientRequest__ConfigEdit>;
19775 readonly expectedVersion?: string | null;
19776 readonly filePath?: string | null;
19777 readonly reloadUserConfig?: boolean;
19778};
19779export const ClientRequest__ConfigBatchWriteParams = Schema.Struct({
19780 edits: Schema.Array(ClientRequest__ConfigEdit),
19781 expectedVersion: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19782 filePath: Schema.optionalKey(
19783 Schema.Union([
19784 Schema.String.annotate({
19785 description:
19786 "Path to the config file to write; defaults to the user's `config.toml` when omitted.",
19787 }),
19788 Schema.Null,
19789 ]),
19790 ),
19791 reloadUserConfig: Schema.optionalKey(
19792 Schema.Boolean.annotate({
19793 description:
19794 "When true, hot-reload the updated user config into all loaded threads after writing.",
19795 }),
19796 ),
19797});
19798
19799export type ClientRequest__PluginShareSaveParams = {
19800 readonly discoverability?: ClientRequest__PluginShareDiscoverability | null;
19801 readonly pluginPath: ClientRequest__AbsolutePathBuf;
19802 readonly remotePluginId?: string | null;
19803 readonly shareTargets?: ReadonlyArray<ClientRequest__PluginShareTarget> | null;
19804};
19805export const ClientRequest__PluginShareSaveParams = Schema.Struct({
19806 discoverability: Schema.optionalKey(
19807 Schema.Union([ClientRequest__PluginShareDiscoverability, Schema.Null]),
19808 ),
19809 pluginPath: ClientRequest__AbsolutePathBuf,
19810 remotePluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19811 shareTargets: Schema.optionalKey(
19812 Schema.Union([Schema.Array(ClientRequest__PluginShareTarget), Schema.Null]),
19813 ),
19814});
19815
19816export type ClientRequest__PluginShareUpdateTargetsParams = {
19817 readonly discoverability: ClientRequest__PluginShareUpdateDiscoverability;
19818 readonly remotePluginId: string;
19819 readonly shareTargets: ReadonlyArray<ClientRequest__PluginShareTarget>;
19820};
19821export const ClientRequest__PluginShareUpdateTargetsParams = Schema.Struct({
19822 discoverability: ClientRequest__PluginShareUpdateDiscoverability,
19823 remotePluginId: Schema.String,
19824 shareTargets: Schema.Array(ClientRequest__PluginShareTarget),
22452 identifier: "ClientRequest__CommandExecParams",
1982522453});
1982622454
1982722455export type ClientRequest__ExternalAgentConfigMigrationItem = {
......@@ -19843,105 +22471,33 @@ export const ClientRequest__ExternalAgentConfigMigrationItem = Schema.Struct({
1984322471 description: Schema.String,
1984422472 details: Schema.optionalKey(Schema.Union([ClientRequest__MigrationDetails, Schema.Null])),
1984522473 itemType: ClientRequest__ExternalAgentConfigMigrationItemType,
19846});
22474}).annotate({ identifier: "ClientRequest__ExternalAgentConfigMigrationItem" });
1984722475
19848export type ClientRequest__TurnStartParams = {
19849 readonly approvalPolicy?: ClientRequest__AskForApproval | null;
19850 readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null;
19851 readonly clientUserMessageId?: string | null;
19852 readonly cwd?: string | null;
19853 readonly effort?: ClientRequest__ReasoningEffort | null;
19854 readonly input: ReadonlyArray<ClientRequest__UserInput>;
19855 readonly model?: string | null;
19856 readonly outputSchema?: unknown;
19857 readonly personality?: ClientRequest__Personality | null;
19858 readonly sandboxPolicy?: ClientRequest__SandboxPolicy | null;
19859 readonly serviceTier?: string | null;
19860 readonly summary?: ClientRequest__ReasoningSummary | null;
19861 readonly threadId: string;
22476export type ClientRequest__ConfigBatchWriteParams = {
22477 readonly edits: ReadonlyArray<ClientRequest__ConfigEdit>;
22478 readonly expectedVersion?: string | null;
22479 readonly filePath?: string | null;
22480 readonly reloadUserConfig?: boolean;
1986222481};
19863export const ClientRequest__TurnStartParams = Schema.Struct({
19864 approvalPolicy: Schema.optionalKey(
19865 Schema.Union([ClientRequest__AskForApproval, Schema.Null]).annotate({
19866 description: "Override the approval policy for this turn and subsequent turns.",
19867 }),
19868 ),
19869 approvalsReviewer: Schema.optionalKey(
19870 Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({
19871 description:
19872 "Override where approval requests are routed for review on this turn and subsequent turns.",
19873 }),
19874 ),
19875 clientUserMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19876 cwd: Schema.optionalKey(
19877 Schema.Union([
19878 Schema.String.annotate({
19879 description: "Override the working directory for this turn and subsequent turns.",
19880 }),
19881 Schema.Null,
19882 ]),
19883 ),
19884 effort: Schema.optionalKey(
19885 Schema.Union([ClientRequest__ReasoningEffort, Schema.Null]).annotate({
19886 description: "Override the reasoning effort for this turn and subsequent turns.",
19887 }),
19888 ),
19889 input: Schema.Array(ClientRequest__UserInput),
19890 model: Schema.optionalKey(
22482export const ClientRequest__ConfigBatchWriteParams = Schema.Struct({
22483 edits: Schema.Array(ClientRequest__ConfigEdit),
22484 expectedVersion: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22485 filePath: Schema.optionalKey(
1989122486 Schema.Union([
1989222487 Schema.String.annotate({
19893 description: "Override the model for this turn and subsequent turns.",
22488 description:
22489 "Path to the config file to write; defaults to the user's `config.toml` when omitted.",
1989422490 }),
1989522491 Schema.Null,
1989622492 ]),
1989722493 ),
19898 outputSchema: Schema.optionalKey(
19899 Schema.Unknown.annotate({
22494 reloadUserConfig: Schema.optionalKey(
22495 Schema.Boolean.annotate({
1990022496 description:
19901 "Optional JSON Schema used to constrain the final assistant message for this turn.",
19902 }),
19903 ),
19904 personality: Schema.optionalKey(
19905 Schema.Union([ClientRequest__Personality, Schema.Null]).annotate({
19906 description: "Override the personality for this turn and subsequent turns.",
19907 }),
19908 ),
19909 sandboxPolicy: Schema.optionalKey(
19910 Schema.Union([ClientRequest__SandboxPolicy, Schema.Null]).annotate({
19911 description: "Override the sandbox policy for this turn and subsequent turns.",
19912 }),
19913 ),
19914 serviceTier: Schema.optionalKey(
19915 Schema.Union([
19916 Schema.String.annotate({
19917 description: "Override the service tier for this turn and subsequent turns.",
19918 }),
19919 Schema.Null,
19920 ]),
19921 ),
19922 summary: Schema.optionalKey(
19923 Schema.Union([ClientRequest__ReasoningSummary, Schema.Null]).annotate({
19924 description: "Override the reasoning summary for this turn and subsequent turns.",
22497 "When true, hot-reload the updated user config into all loaded threads after writing.",
1992522498 }),
1992622499 ),
19927 threadId: Schema.String,
19928});
19929
19930export type ClientRequest__TurnSteerParams = {
19931 readonly clientUserMessageId?: string | null;
19932 readonly expectedTurnId: string;
19933 readonly input: ReadonlyArray<ClientRequest__UserInput>;
19934 readonly threadId: string;
19935};
19936export const ClientRequest__TurnSteerParams = Schema.Struct({
19937 clientUserMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
19938 expectedTurnId: Schema.String.annotate({
19939 description:
19940 "Required active turn id precondition. The request fails when it does not match the currently active turn.",
19941 }),
19942 input: Schema.Array(ClientRequest__UserInput),
19943 threadId: Schema.String,
19944});
22500}).annotate({ identifier: "ClientRequest__ConfigBatchWriteParams" });
1994522501
1994622502export type CommandExecutionRequestApprovalParams__FileSystemPath =
1994722503 | {
......@@ -19969,7 +22525,7 @@ export const CommandExecutionRequestApprovalParams__FileSystemPath = Schema.Unio
1996922525 }).annotate({ title: "SpecialFileSystemPath" }),
1997022526 ],
1997122527 { mode: "oneOf" },
19972);
22528).annotate({ identifier: "CommandExecutionRequestApprovalParams__FileSystemPath" });
1997322529
1997422530export type CommandExecutionRequestApprovalResponse__CommandExecutionApprovalDecision =
1997522531 | "accept"
......@@ -20019,7 +22575,9 @@ export const CommandExecutionRequestApprovalResponse__CommandExecutionApprovalDe
2001922575 }),
2002022576 ],
2002122577 { mode: "oneOf" },
20022 );
22578 ).annotate({
22579 identifier: "CommandExecutionRequestApprovalResponse__CommandExecutionApprovalDecision",
22580 });
2002322581
2002422582export type ExecCommandApprovalResponse__ReviewDecision =
2002522583 | "approved"
......@@ -20077,86 +22635,111 @@ export const ExecCommandApprovalResponse__ReviewDecision = Schema.Union(
2007722635 }),
2007822636 ],
2007922637 { mode: "oneOf" },
20080).annotate({ description: "User's decision in response to an ExecApprovalRequest." });
22638).annotate({
22639 description: "User's decision in response to an ExecApprovalRequest.",
22640 identifier: "ExecCommandApprovalResponse__ReviewDecision",
22641});
2008122642
20082export type McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema = {
22643export type McpServerElicitationRequestParams__McpElicitationUntitledMultiSelectEnumSchema = {
2008322644 readonly default?: ReadonlyArray<string> | null;
2008422645 readonly description?: string | null;
20085 readonly items: McpServerElicitationRequestParams__McpElicitationTitledEnumItems;
22646 readonly items: McpServerElicitationRequestParams__McpElicitationUntitledEnumItems;
2008622647 readonly maxItems?: number | null;
2008722648 readonly minItems?: number | null;
2008822649 readonly title?: string | null;
2008922650 readonly type: McpServerElicitationRequestParams__McpElicitationArrayType;
2009022651};
20091export const McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema =
22652export const McpServerElicitationRequestParams__McpElicitationUntitledMultiSelectEnumSchema =
2009222653 Schema.Struct({
2009322654 default: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
2009422655 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20095 items: McpServerElicitationRequestParams__McpElicitationTitledEnumItems,
22656 items: McpServerElicitationRequestParams__McpElicitationUntitledEnumItems,
2009622657 maxItems: Schema.optionalKey(
2009722658 Schema.Union([
2009822659 Schema.Number.annotate({ format: "uint64" })
20099 .check(Schema.isInt())
20100 .check(Schema.isGreaterThanOrEqualTo(0)),
22660 .check(Schema.isInt().annotate({ expected: "an integer" }))
22661 .check(
22662 Schema.isGreaterThanOrEqualTo(0).annotate({
22663 expected: "a value greater than or equal to 0",
22664 }),
22665 ),
2010122666 Schema.Null,
2010222667 ]),
2010322668 ),
2010422669 minItems: Schema.optionalKey(
2010522670 Schema.Union([
2010622671 Schema.Number.annotate({ format: "uint64" })
20107 .check(Schema.isInt())
20108 .check(Schema.isGreaterThanOrEqualTo(0)),
22672 .check(Schema.isInt().annotate({ expected: "an integer" }))
22673 .check(
22674 Schema.isGreaterThanOrEqualTo(0).annotate({
22675 expected: "a value greater than or equal to 0",
22676 }),
22677 ),
2010922678 Schema.Null,
2011022679 ]),
2011122680 ),
2011222681 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2011322682 type: McpServerElicitationRequestParams__McpElicitationArrayType,
22683 }).annotate({
22684 identifier: "McpServerElicitationRequestParams__McpElicitationUntitledMultiSelectEnumSchema",
2011422685 });
2011522686
20116export type McpServerElicitationRequestParams__McpElicitationUntitledMultiSelectEnumSchema = {
22687export type McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSchema =
22688 | McpServerElicitationRequestParams__McpElicitationUntitledSingleSelectEnumSchema
22689 | McpServerElicitationRequestParams__McpElicitationTitledSingleSelectEnumSchema;
22690export const McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSchema = Schema.Union(
22691 [
22692 McpServerElicitationRequestParams__McpElicitationUntitledSingleSelectEnumSchema,
22693 McpServerElicitationRequestParams__McpElicitationTitledSingleSelectEnumSchema,
22694 ],
22695).annotate({
22696 identifier: "McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSchema",
22697});
22698
22699export type McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema = {
2011722700 readonly default?: ReadonlyArray<string> | null;
2011822701 readonly description?: string | null;
20119 readonly items: McpServerElicitationRequestParams__McpElicitationUntitledEnumItems;
22702 readonly items: McpServerElicitationRequestParams__McpElicitationTitledEnumItems;
2012022703 readonly maxItems?: number | null;
2012122704 readonly minItems?: number | null;
2012222705 readonly title?: string | null;
2012322706 readonly type: McpServerElicitationRequestParams__McpElicitationArrayType;
2012422707};
20125export const McpServerElicitationRequestParams__McpElicitationUntitledMultiSelectEnumSchema =
22708export const McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema =
2012622709 Schema.Struct({
2012722710 default: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
2012822711 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20129 items: McpServerElicitationRequestParams__McpElicitationUntitledEnumItems,
22712 items: McpServerElicitationRequestParams__McpElicitationTitledEnumItems,
2013022713 maxItems: Schema.optionalKey(
2013122714 Schema.Union([
2013222715 Schema.Number.annotate({ format: "uint64" })
20133 .check(Schema.isInt())
20134 .check(Schema.isGreaterThanOrEqualTo(0)),
22716 .check(Schema.isInt().annotate({ expected: "an integer" }))
22717 .check(
22718 Schema.isGreaterThanOrEqualTo(0).annotate({
22719 expected: "a value greater than or equal to 0",
22720 }),
22721 ),
2013522722 Schema.Null,
2013622723 ]),
2013722724 ),
2013822725 minItems: Schema.optionalKey(
2013922726 Schema.Union([
2014022727 Schema.Number.annotate({ format: "uint64" })
20141 .check(Schema.isInt())
20142 .check(Schema.isGreaterThanOrEqualTo(0)),
22728 .check(Schema.isInt().annotate({ expected: "an integer" }))
22729 .check(
22730 Schema.isGreaterThanOrEqualTo(0).annotate({
22731 expected: "a value greater than or equal to 0",
22732 }),
22733 ),
2014322734 Schema.Null,
2014422735 ]),
2014522736 ),
2014622737 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2014722738 type: McpServerElicitationRequestParams__McpElicitationArrayType,
22739 }).annotate({
22740 identifier: "McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema",
2014822741 });
2014922742
20150export type McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSchema =
20151 | McpServerElicitationRequestParams__McpElicitationUntitledSingleSelectEnumSchema
20152 | McpServerElicitationRequestParams__McpElicitationTitledSingleSelectEnumSchema;
20153export const McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSchema = Schema.Union(
20154 [
20155 McpServerElicitationRequestParams__McpElicitationUntitledSingleSelectEnumSchema,
20156 McpServerElicitationRequestParams__McpElicitationTitledSingleSelectEnumSchema,
20157 ],
20158);
20159
2016022743export type PermissionsRequestApprovalParams__FileSystemPath =
2016122744 | { readonly path: PermissionsRequestApprovalParams__LegacyAppPathString; readonly type: "path" }
2016222745 | { readonly pattern: string; readonly type: "glob_pattern" }
......@@ -20180,7 +22763,7 @@ export const PermissionsRequestApprovalParams__FileSystemPath = Schema.Union(
2018022763 }).annotate({ title: "SpecialFileSystemPath" }),
2018122764 ],
2018222765 { mode: "oneOf" },
20183);
22766).annotate({ identifier: "PermissionsRequestApprovalParams__FileSystemPath" });
2018422767
2018522768export type PermissionsRequestApprovalResponse__FileSystemPath =
2018622769 | {
......@@ -20208,7 +22791,260 @@ export const PermissionsRequestApprovalResponse__FileSystemPath = Schema.Union(
2020822791 }).annotate({ title: "SpecialFileSystemPath" }),
2020922792 ],
2021022793 { mode: "oneOf" },
20211);
22794).annotate({ identifier: "PermissionsRequestApprovalResponse__FileSystemPath" });
22795
22796export type ServerNotification__TurnError = {
22797 readonly additionalDetails?: string | null;
22798 readonly codexErrorInfo?: ServerNotification__CodexErrorInfo | null;
22799 readonly message: string;
22800};
22801export const ServerNotification__TurnError = Schema.Struct({
22802 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22803 codexErrorInfo: Schema.optionalKey(
22804 Schema.Union([ServerNotification__CodexErrorInfo, Schema.Null]),
22805 ),
22806 message: Schema.String,
22807}).annotate({ identifier: "ServerNotification__TurnError" });
22808
22809export type ServerNotification__SessionSource =
22810 | "cli"
22811 | "vscode"
22812 | "exec"
22813 | "appServer"
22814 | "unknown"
22815 | { readonly custom: string }
22816 | { readonly subAgent: ServerNotification__SubAgentSource };
22817export const ServerNotification__SessionSource = Schema.Union(
22818 [
22819 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
22820 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
22821 Schema.Struct({ subAgent: ServerNotification__SubAgentSource }).annotate({
22822 title: "SubAgentSessionSource",
22823 }),
22824 ],
22825 { mode: "oneOf" },
22826).annotate({ identifier: "ServerNotification__SessionSource" });
22827
22828export type ServerNotification__ThreadStatusChangedNotification = {
22829 readonly status: ServerNotification__ThreadStatus;
22830 readonly threadId: string;
22831};
22832export const ServerNotification__ThreadStatusChangedNotification = Schema.Struct({
22833 status: ServerNotification__ThreadStatus,
22834 threadId: Schema.String,
22835}).annotate({ identifier: "ServerNotification__ThreadStatusChangedNotification" });
22836
22837export type ServerNotification__UserInput =
22838 | {
22839 readonly text: string;
22840 readonly text_elements?: ReadonlyArray<ServerNotification__TextElement>;
22841 readonly type: "text";
22842 }
22843 | {
22844 readonly detail?: ServerNotification__ImageDetail | null;
22845 readonly type: "image";
22846 readonly url: string;
22847 }
22848 | {
22849 readonly detail?: ServerNotification__ImageDetail | null;
22850 readonly path: string;
22851 readonly type: "localImage";
22852 }
22853 | { readonly type: "audio"; readonly url: string }
22854 | { readonly path: string; readonly type: "localAudio" }
22855 | { readonly name: string; readonly path: string; readonly type: "skill" }
22856 | { readonly name: string; readonly path: string; readonly type: "mention" };
22857export const ServerNotification__UserInput = Schema.Union(
22858 [
22859 Schema.Struct({
22860 text: Schema.String,
22861 text_elements: Schema.optionalKey(
22862 Schema.Array(ServerNotification__TextElement).annotate({
22863 description: "UI-defined spans within `text` used to render or persist special elements.",
22864 default: [],
22865 }),
22866 ),
22867 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
22868 }).annotate({ title: "TextUserInput" }),
22869 Schema.Struct({
22870 detail: Schema.optionalKey(Schema.Union([ServerNotification__ImageDetail, Schema.Null])),
22871 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
22872 url: Schema.String,
22873 }).annotate({ title: "ImageUserInput" }),
22874 Schema.Struct({
22875 detail: Schema.optionalKey(Schema.Union([ServerNotification__ImageDetail, Schema.Null])),
22876 path: Schema.String,
22877 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
22878 }).annotate({ title: "LocalImageUserInput" }),
22879 Schema.Struct({
22880 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
22881 url: Schema.String,
22882 }).annotate({ title: "AudioUserInput" }),
22883 Schema.Struct({
22884 path: Schema.String,
22885 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
22886 }).annotate({ title: "LocalAudioUserInput" }),
22887 Schema.Struct({
22888 name: Schema.String,
22889 path: Schema.String,
22890 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
22891 }).annotate({ title: "SkillUserInput" }),
22892 Schema.Struct({
22893 name: Schema.String,
22894 path: Schema.String,
22895 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
22896 }).annotate({ title: "MentionUserInput" }),
22897 ],
22898 { mode: "oneOf" },
22899).annotate({ identifier: "ServerNotification__UserInput" });
22900
22901export type ServerNotification__FileSystemPath =
22902 | { readonly path: ServerNotification__LegacyAppPathString; readonly type: "path" }
22903 | { readonly pattern: string; readonly type: "glob_pattern" }
22904 | { readonly type: "special"; readonly value: ServerNotification__FileSystemSpecialPath };
22905export const ServerNotification__FileSystemPath = Schema.Union(
22906 [
22907 Schema.Struct({
22908 path: ServerNotification__LegacyAppPathString,
22909 type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }),
22910 }).annotate({ title: "PathFileSystemPath" }),
22911 Schema.Struct({
22912 pattern: Schema.String,
22913 type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }),
22914 }).annotate({ title: "GlobPatternFileSystemPath" }),
22915 Schema.Struct({
22916 type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }),
22917 value: ServerNotification__FileSystemSpecialPath,
22918 }).annotate({ title: "SpecialFileSystemPath" }),
22919 ],
22920 { mode: "oneOf" },
22921).annotate({ identifier: "ServerNotification__FileSystemPath" });
22922
22923export type ServerNotification__FileChangePatchUpdatedNotification = {
22924 readonly changes: ReadonlyArray<ServerNotification__FileUpdateChange>;
22925 readonly itemId: string;
22926 readonly threadId: string;
22927 readonly turnId: string;
22928};
22929export const ServerNotification__FileChangePatchUpdatedNotification = Schema.Struct({
22930 changes: Schema.Array(ServerNotification__FileUpdateChange),
22931 itemId: Schema.String,
22932 threadId: Schema.String,
22933 turnId: Schema.String,
22934}).annotate({ identifier: "ServerNotification__FileChangePatchUpdatedNotification" });
22935
22936export type ServerNotification__CollaborationMode = {
22937 readonly mode: ServerNotification__ModeKind;
22938 readonly settings: ServerNotification__Settings;
22939};
22940export const ServerNotification__CollaborationMode = Schema.Struct({
22941 mode: ServerNotification__ModeKind,
22942 settings: ServerNotification__Settings,
22943}).annotate({
22944 description: "Collaboration mode for a Codex session.",
22945 identifier: "ServerNotification__CollaborationMode",
22946});
22947
22948export type ServerNotification__ThreadGoalUpdatedNotification = {
22949 readonly goal: ServerNotification__ThreadGoal;
22950 readonly threadId: string;
22951 readonly turnId?: string | null;
22952};
22953export const ServerNotification__ThreadGoalUpdatedNotification = Schema.Struct({
22954 goal: ServerNotification__ThreadGoal,
22955 threadId: Schema.String,
22956 turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22957}).annotate({ identifier: "ServerNotification__ThreadGoalUpdatedNotification" });
22958
22959export type ServerNotification__ThreadTokenUsageUpdatedNotification = {
22960 readonly threadId: string;
22961 readonly tokenUsage: ServerNotification__ThreadTokenUsage;
22962 readonly turnId: string;
22963};
22964export const ServerNotification__ThreadTokenUsageUpdatedNotification = Schema.Struct({
22965 threadId: Schema.String,
22966 tokenUsage: ServerNotification__ThreadTokenUsage,
22967 turnId: Schema.String,
22968}).annotate({ identifier: "ServerNotification__ThreadTokenUsageUpdatedNotification" });
22969
22970export type ServerNotification__HookRunSummary = {
22971 readonly completedAt?: number | null;
22972 readonly displayOrder: number;
22973 readonly durationMs?: number | null;
22974 readonly entries: ReadonlyArray<ServerNotification__HookOutputEntry>;
22975 readonly eventName: ServerNotification__HookEventName;
22976 readonly executionMode: ServerNotification__HookExecutionMode;
22977 readonly handlerType: ServerNotification__HookHandlerType;
22978 readonly id: string;
22979 readonly scope: ServerNotification__HookScope;
22980 readonly source?: ServerNotification__HookSource;
22981 readonly sourcePath: ServerNotification__AbsolutePathBuf;
22982 readonly startedAt: number;
22983 readonly status: ServerNotification__HookRunStatus;
22984 readonly statusMessage?: string | null;
22985};
22986export const ServerNotification__HookRunSummary = Schema.Struct({
22987 completedAt: Schema.optionalKey(
22988 Schema.Union([
22989 Schema.Number.annotate({ format: "int64" }).check(
22990 Schema.isInt().annotate({ expected: "an integer" }),
22991 ),
22992 Schema.Null,
22993 ]),
22994 ),
22995 displayOrder: Schema.Number.annotate({ format: "int64" }).check(
22996 Schema.isInt().annotate({ expected: "an integer" }),
22997 ),
22998 durationMs: Schema.optionalKey(
22999 Schema.Union([
23000 Schema.Number.annotate({ format: "int64" }).check(
23001 Schema.isInt().annotate({ expected: "an integer" }),
23002 ),
23003 Schema.Null,
23004 ]),
23005 ),
23006 entries: Schema.Array(ServerNotification__HookOutputEntry),
23007 eventName: ServerNotification__HookEventName,
23008 executionMode: ServerNotification__HookExecutionMode,
23009 handlerType: ServerNotification__HookHandlerType,
23010 id: Schema.String,
23011 scope: ServerNotification__HookScope,
23012 source: Schema.optionalKey(
23013 Schema.suspend(
23014 (): Schema.Codec<ServerNotification__HookSource> => ServerNotification__HookSource,
23015 ).annotate({ default: "unknown" }),
23016 ),
23017 sourcePath: ServerNotification__AbsolutePathBuf,
23018 startedAt: Schema.Number.annotate({ format: "int64" }).check(
23019 Schema.isInt().annotate({ expected: "an integer" }),
23020 ),
23021 status: ServerNotification__HookRunStatus,
23022 statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
23023}).annotate({ identifier: "ServerNotification__HookRunSummary" });
23024
23025export type ServerNotification__TurnPlanUpdatedNotification = {
23026 readonly explanation?: string | null;
23027 readonly plan: ReadonlyArray<ServerNotification__TurnPlanStep>;
23028 readonly threadId: string;
23029 readonly turnId: string;
23030};
23031export const ServerNotification__TurnPlanUpdatedNotification = Schema.Struct({
23032 explanation: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
23033 plan: Schema.Array(ServerNotification__TurnPlanStep),
23034 threadId: Schema.String,
23035 turnId: Schema.String,
23036}).annotate({ identifier: "ServerNotification__TurnPlanUpdatedNotification" });
23037
23038export type ServerNotification__AccountRateLimitsUpdatedNotification = {
23039 readonly rateLimits: ServerNotification__RateLimitSnapshot;
23040};
23041export const ServerNotification__AccountRateLimitsUpdatedNotification = Schema.Struct({
23042 rateLimits: ServerNotification__RateLimitSnapshot,
23043}).annotate({
23044 description:
23045 "Sparse rolling rate-limit update.\n\nClients should merge available values into the most recent `account/rateLimits/read` response or refetch that snapshot. Nullable account metadata may be unavailable in a rolling update and does not clear a previously observed value.",
23046 identifier: "ServerNotification__AccountRateLimitsUpdatedNotification",
23047});
2021223048
2021323049export type ServerNotification__AppInfo = {
2021423050 readonly appMetadata?: ServerNotification__AppMetadata | null;
......@@ -20255,7 +23091,10 @@ export const ServerNotification__AppInfo = Schema.Struct({
2025523091 logoUrlDark: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2025623092 name: Schema.String,
2025723093 pluginDisplayNames: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
20258}).annotate({ description: "EXPERIMENTAL - app metadata returned by app-list APIs." });
23094}).annotate({
23095 description: "EXPERIMENTAL - app metadata returned by app-list APIs.",
23096 identifier: "ServerNotification__AppInfo",
23097});
2025923098
2026023099export type ServerNotification__ExternalAgentConfigImportTypeResult = {
2026123100 readonly failures: ReadonlyArray<ServerNotification__ExternalAgentConfigImportItemTypeFailure>;
......@@ -20266,7 +23105,36 @@ export const ServerNotification__ExternalAgentConfigImportTypeResult = Schema.St
2026623105 failures: Schema.Array(ServerNotification__ExternalAgentConfigImportItemTypeFailure),
2026723106 itemType: ServerNotification__ExternalAgentConfigMigrationItemType,
2026823107 successes: Schema.Array(ServerNotification__ExternalAgentConfigImportItemTypeSuccess),
20269});
23108}).annotate({ identifier: "ServerNotification__ExternalAgentConfigImportTypeResult" });
23109
23110export type ServerNotification__ConfigWarningNotification = {
23111 readonly details?: string | null;
23112 readonly path?: string | null;
23113 readonly range?: ServerNotification__TextRange | null;
23114 readonly summary: string;
23115};
23116export const ServerNotification__ConfigWarningNotification = Schema.Struct({
23117 details: Schema.optionalKey(
23118 Schema.Union([
23119 Schema.String.annotate({ description: "Optional extra guidance or error details." }),
23120 Schema.Null,
23121 ]),
23122 ),
23123 path: Schema.optionalKey(
23124 Schema.Union([
23125 Schema.String.annotate({
23126 description: "Optional path to the config file that triggered the warning.",
23127 }),
23128 Schema.Null,
23129 ]),
23130 ),
23131 range: Schema.optionalKey(
23132 Schema.Union([ServerNotification__TextRange, Schema.Null]).annotate({
23133 description: "Optional range for the error location inside the config file.",
23134 }),
23135 ),
23136 summary: Schema.String.annotate({ description: "Concise summary of the warning." }),
23137}).annotate({ identifier: "ServerNotification__ConfigWarningNotification" });
2027023138
2027123139export type ServerNotification__FuzzyFileSearchSessionUpdatedNotification = {
2027223140 readonly files: ReadonlyArray<ServerNotification__FuzzyFileSearchResult>;
......@@ -20277,78 +23145,16 @@ export const ServerNotification__FuzzyFileSearchSessionUpdatedNotification = Sch
2027723145 files: Schema.Array(ServerNotification__FuzzyFileSearchResult),
2027823146 query: Schema.String,
2027923147 sessionId: Schema.String,
20280});
20281
20282export type ServerNotification__HookRunSummary = {
20283 readonly completedAt?: number | null;
20284 readonly displayOrder: number;
20285 readonly durationMs?: number | null;
20286 readonly entries: ReadonlyArray<ServerNotification__HookOutputEntry>;
20287 readonly eventName: ServerNotification__HookEventName;
20288 readonly executionMode: ServerNotification__HookExecutionMode;
20289 readonly handlerType: ServerNotification__HookHandlerType;
20290 readonly id: string;
20291 readonly scope: ServerNotification__HookScope;
20292 readonly source?:
20293 | "system"
20294 | "user"
20295 | "project"
20296 | "mdm"
20297 | "sessionFlags"
20298 | "plugin"
20299 | "cloudRequirements"
20300 | "cloudManagedConfig"
20301 | "legacyManagedConfigFile"
20302 | "legacyManagedConfigMdm"
20303 | "unknown";
20304 readonly sourcePath: ServerNotification__AbsolutePathBuf;
20305 readonly startedAt: number;
20306 readonly status: ServerNotification__HookRunStatus;
20307 readonly statusMessage?: string | null;
20308};
20309export const ServerNotification__HookRunSummary = Schema.Struct({
20310 completedAt: Schema.optionalKey(
20311 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
20312 ),
20313 displayOrder: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
20314 durationMs: Schema.optionalKey(
20315 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
20316 ),
20317 entries: Schema.Array(ServerNotification__HookOutputEntry),
20318 eventName: ServerNotification__HookEventName,
20319 executionMode: ServerNotification__HookExecutionMode,
20320 handlerType: ServerNotification__HookHandlerType,
20321 id: Schema.String,
20322 scope: ServerNotification__HookScope,
20323 source: Schema.optionalKey(
20324 Schema.Literals([
20325 "system",
20326 "user",
20327 "project",
20328 "mdm",
20329 "sessionFlags",
20330 "plugin",
20331 "cloudRequirements",
20332 "cloudManagedConfig",
20333 "legacyManagedConfigFile",
20334 "legacyManagedConfigMdm",
20335 "unknown",
20336 ]).annotate({ default: "unknown" }),
20337 ),
20338 sourcePath: ServerNotification__AbsolutePathBuf,
20339 startedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
20340 status: ServerNotification__HookRunStatus,
20341 statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20342});
23148}).annotate({ identifier: "ServerNotification__FuzzyFileSearchSessionUpdatedNotification" });
2034323149
20344export type ServerNotification__FileSystemPath =
20345 | { readonly path: ServerNotification__LegacyAppPathString; readonly type: "path" }
23150export type ServerRequest__FileSystemPath =
23151 | { readonly path: ServerRequest__LegacyAppPathString; readonly type: "path" }
2034623152 | { readonly pattern: string; readonly type: "glob_pattern" }
20347 | { readonly type: "special"; readonly value: ServerNotification__FileSystemSpecialPath };
20348export const ServerNotification__FileSystemPath = Schema.Union(
23153 | { readonly type: "special"; readonly value: ServerRequest__FileSystemSpecialPath };
23154export const ServerRequest__FileSystemPath = Schema.Union(
2034923155 [
2035023156 Schema.Struct({
20351 path: ServerNotification__LegacyAppPathString,
23157 path: ServerRequest__LegacyAppPathString,
2035223158 type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }),
2035323159 }).annotate({ title: "PathFileSystemPath" }),
2035423160 Schema.Struct({
......@@ -20357,601 +23163,129 @@ export const ServerNotification__FileSystemPath = Schema.Union(
2035723163 }).annotate({ title: "GlobPatternFileSystemPath" }),
2035823164 Schema.Struct({
2035923165 type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }),
20360 value: ServerNotification__FileSystemSpecialPath,
23166 value: ServerRequest__FileSystemSpecialPath,
2036123167 }).annotate({ title: "SpecialFileSystemPath" }),
2036223168 ],
2036323169 { mode: "oneOf" },
20364);
20365
20366export type ServerNotification__TurnError = {
20367 readonly additionalDetails?: string | null;
20368 readonly codexErrorInfo?: ServerNotification__CodexErrorInfo | null;
20369 readonly message: string;
20370};
20371export const ServerNotification__TurnError = Schema.Struct({
20372 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20373 codexErrorInfo: Schema.optionalKey(
20374 Schema.Union([ServerNotification__CodexErrorInfo, Schema.Null]),
20375 ),
20376 message: Schema.String,
20377});
23170).annotate({ identifier: "ServerRequest__FileSystemPath" });
2037823171
20379export type ServerNotification__FileChangePatchUpdatedNotification = {
20380 readonly changes: ReadonlyArray<ServerNotification__FileUpdateChange>;
23172export type ServerRequest__CommandExecutionRequestApprovalParams = {
23173 readonly approvalId?: string | null;
23174 readonly command?: string | null;
23175 readonly commandActions?: ReadonlyArray<ServerRequest__CommandAction> | null;
23176 readonly cwd?: ServerRequest__LegacyAppPathString | null;
23177 readonly environmentId?: string | null;
2038123178 readonly itemId: string;
23179 readonly networkApprovalContext?: ServerRequest__NetworkApprovalContext | null;
23180 readonly proposedExecpolicyAmendment?: ReadonlyArray<string> | null;
23181 readonly proposedNetworkPolicyAmendments?: ReadonlyArray<ServerRequest__NetworkPolicyAmendment> | null;
23182 readonly reason?: string | null;
23183 readonly startedAtMs: number;
2038223184 readonly threadId: string;
2038323185 readonly turnId: string;
2038423186};
20385export const ServerNotification__FileChangePatchUpdatedNotification = Schema.Struct({
20386 changes: Schema.Array(ServerNotification__FileUpdateChange),
20387 itemId: Schema.String,
20388 threadId: Schema.String,
20389 turnId: Schema.String,
20390});
20391
20392export type ServerNotification__CollaborationMode = {
20393 readonly mode: ServerNotification__ModeKind;
20394 readonly settings: ServerNotification__Settings;
20395};
20396export const ServerNotification__CollaborationMode = Schema.Struct({
20397 mode: ServerNotification__ModeKind,
20398 settings: ServerNotification__Settings,
20399}).annotate({ description: "Collaboration mode for a Codex session." });
20400
20401export type ServerNotification__AccountRateLimitsUpdatedNotification = {
20402 readonly rateLimits: ServerNotification__RateLimitSnapshot;
20403};
20404export const ServerNotification__AccountRateLimitsUpdatedNotification = Schema.Struct({
20405 rateLimits: ServerNotification__RateLimitSnapshot,
20406}).annotate({
20407 description:
20408 "Sparse rolling rate-limit update.\n\nClients should merge available values into the most recent `account/rateLimits/read` response or refetch that snapshot. Nullable account metadata may be unavailable in a rolling update and does not clear a previously observed value.",
20409});
20410
20411export type ServerNotification__ThreadItem =
20412 | {
20413 readonly clientId?: string | null;
20414 readonly content: ReadonlyArray<ServerNotification__UserInput>;
20415 readonly id: string;
20416 readonly type: "userMessage";
20417 }
20418 | {
20419 readonly fragments: ReadonlyArray<ServerNotification__HookPromptFragment>;
20420 readonly id: string;
20421 readonly type: "hookPrompt";
20422 }
20423 | {
20424 readonly id: string;
20425 readonly memoryCitation?: ServerNotification__MemoryCitation | null;
20426 readonly phase?: ServerNotification__MessagePhase | null;
20427 readonly text: string;
20428 readonly delivery?: "async" | null;
20429 readonly questions?: ReadonlyArray<{
20430 readonly title: string;
20431 readonly options?: ReadonlyArray<string> | null;
20432 }> | null;
20433 readonly type: "agentMessage";
20434 }
20435 | { readonly id: string; readonly text: string; readonly type: "plan" }
20436 | {
20437 readonly content?: ReadonlyArray<string>;
20438 readonly id: string;
20439 readonly summary?: ReadonlyArray<string>;
20440 readonly type: "reasoning";
20441 }
20442 | {
20443 readonly aggregatedOutput?: string | null;
20444 readonly command: string;
20445 readonly commandActions: ReadonlyArray<ServerNotification__CommandAction>;
20446 readonly cwd: string;
20447 readonly durationMs?: number | null;
20448 readonly exitCode?: number | null;
20449 readonly id: string;
20450 readonly processId?: string | null;
20451 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
20452 readonly status: ServerNotification__CommandExecutionStatus;
20453 readonly type: "commandExecution";
20454 }
20455 | {
20456 readonly changes: ReadonlyArray<ServerNotification__FileUpdateChange>;
20457 readonly id: string;
20458 readonly status: ServerNotification__PatchApplyStatus;
20459 readonly type: "fileChange";
20460 }
20461 | {
20462 readonly appContext?: ServerNotification__McpToolCallAppContext | null;
20463 readonly arguments: unknown;
20464 readonly durationMs?: number | null;
20465 readonly error?: ServerNotification__McpToolCallError | null;
20466 readonly id: string;
20467 readonly mcpAppResourceUri?: string | null;
20468 readonly pluginId?: string | null;
20469 readonly result?: ServerNotification__McpToolCallResult | null;
20470 readonly server: string;
20471 readonly status: ServerNotification__McpToolCallStatus;
20472 readonly tool: string;
20473 readonly type: "mcpToolCall";
20474 }
20475 | {
20476 readonly arguments: unknown;
20477 readonly contentItems?: ReadonlyArray<ServerNotification__DynamicToolCallOutputContentItem> | null;
20478 readonly durationMs?: number | null;
20479 readonly id: string;
20480 readonly namespace?: string | null;
20481 readonly status: ServerNotification__DynamicToolCallStatus;
20482 readonly success?: boolean | null;
20483 readonly tool: string;
20484 readonly type: "dynamicToolCall";
20485 }
20486 | {
20487 readonly agentsStates: { readonly [x: string]: ServerNotification__CollabAgentState };
20488 readonly id: string;
20489 readonly model?: string | null;
20490 readonly prompt?: string | null;
20491 readonly reasoningEffort?: ServerNotification__ReasoningEffort | null;
20492 readonly receiverThreadIds: ReadonlyArray<string>;
20493 readonly senderThreadId: string;
20494 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
20495 readonly tool:
20496 | "spawnAgent"
20497 | "sendInput"
20498 | "resumeAgent"
20499 | "wait"
20500 | "closeAgent"
20501 | "sendMessage"
20502 | "followupTask"
20503 | "interruptAgent"
20504 | "listAgents";
20505 readonly type: "collabAgentToolCall";
20506 }
20507 | {
20508 readonly agentPath: string;
20509 readonly agentThreadId: string;
20510 readonly id: string;
20511 readonly kind: ServerNotification__SubAgentActivityKind;
20512 readonly type: "subAgentActivity";
20513 }
20514 | {
20515 readonly action?: ServerNotification__WebSearchAction | null;
20516 readonly id: string;
20517 readonly query: string;
20518 readonly results?: ReadonlyArray<unknown> | null;
20519 readonly type: "webSearch";
20520 }
20521 | {
20522 readonly id: string;
20523 readonly path: ServerNotification__LegacyAppPathString;
20524 readonly type: "imageView";
20525 }
20526 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
20527 | {
20528 readonly id: string;
20529 readonly result: string;
20530 readonly revisedPrompt?: string | null;
20531 readonly savedPath?: ServerNotification__AbsolutePathBuf | null;
20532 readonly status: string;
20533 readonly type: "imageGeneration";
20534 }
20535 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
20536 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
20537 | { readonly id: string; readonly type: "contextCompaction" };
20538export const ServerNotification__ThreadItem = Schema.Union(
20539 [
20540 Schema.Struct({
20541 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20542 content: Schema.Array(ServerNotification__UserInput),
20543 id: Schema.String,
20544 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
20545 }).annotate({ title: "UserMessageThreadItem" }),
20546 Schema.Struct({
20547 fragments: Schema.Array(ServerNotification__HookPromptFragment),
20548 id: Schema.String,
20549 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
20550 }).annotate({ title: "HookPromptThreadItem" }),
20551 Schema.Struct({
20552 id: Schema.String,
20553 memoryCitation: Schema.optionalKey(
20554 Schema.Union([ServerNotification__MemoryCitation, Schema.Null]),
20555 ),
20556 phase: Schema.optionalKey(Schema.Union([ServerNotification__MessagePhase, Schema.Null])),
20557 text: Schema.String,
20558 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
20559 questions: Schema.optionalKey(
20560 Schema.Union([
20561 Schema.Array(
20562 Schema.Struct({
20563 title: Schema.String,
20564 options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
20565 }),
20566 ),
20567 Schema.Null,
20568 ]),
20569 ),
20570 type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }),
20571 }).annotate({ title: "AgentMessageThreadItem" }),
20572 Schema.Struct({
20573 id: Schema.String,
20574 text: Schema.String,
20575 type: Schema.Literal("plan").annotate({ title: "PlanThreadItemType" }),
20576 }).annotate({
20577 title: "PlanThreadItem",
20578 description:
20579 "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
20580 }),
20581 Schema.Struct({
20582 content: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
20583 id: Schema.String,
20584 summary: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
20585 type: Schema.Literal("reasoning").annotate({ title: "ReasoningThreadItemType" }),
20586 }).annotate({ title: "ReasoningThreadItem" }),
20587 Schema.Struct({
20588 aggregatedOutput: Schema.optionalKey(
20589 Schema.Union([
20590 Schema.String.annotate({
20591 description: "The command's output, aggregated from stdout and stderr.",
20592 }),
20593 Schema.Null,
20594 ]),
20595 ),
20596 command: Schema.String.annotate({ description: "The command to be executed." }),
20597 commandActions: Schema.Array(ServerNotification__CommandAction).annotate({
20598 description:
20599 "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.",
20600 }),
20601 cwd: Schema.String.annotate({ description: "The command's working directory." }),
20602 durationMs: Schema.optionalKey(
20603 Schema.Union([
20604 Schema.Number.annotate({
20605 description: "The duration of the command execution in milliseconds.",
20606 format: "int64",
20607 }).check(Schema.isInt()),
20608 Schema.Null,
20609 ]),
20610 ),
20611 exitCode: Schema.optionalKey(
20612 Schema.Union([
20613 Schema.Number.annotate({
20614 description: "The command's exit code.",
20615 format: "int32",
20616 }).check(Schema.isInt()),
20617 Schema.Null,
20618 ]),
20619 ),
20620 id: Schema.String,
20621 processId: Schema.optionalKey(
20622 Schema.Union([
20623 Schema.String.annotate({
20624 description: "Identifier for the underlying PTY process (when available).",
20625 }),
20626 Schema.Null,
20627 ]),
20628 ),
20629 source: Schema.optionalKey(
20630 Schema.Literals([
20631 "agent",
20632 "userShell",
20633 "unifiedExecStartup",
20634 "unifiedExecInteraction",
20635 ]).annotate({ default: "agent" }),
20636 ),
20637 status: ServerNotification__CommandExecutionStatus,
20638 type: Schema.Literal("commandExecution").annotate({
20639 title: "CommandExecutionThreadItemType",
20640 }),
20641 }).annotate({ title: "CommandExecutionThreadItem" }),
20642 Schema.Struct({
20643 changes: Schema.Array(ServerNotification__FileUpdateChange),
20644 id: Schema.String,
20645 status: ServerNotification__PatchApplyStatus,
20646 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
20647 }).annotate({ title: "FileChangeThreadItem" }),
20648 Schema.Struct({
20649 appContext: Schema.optionalKey(
20650 Schema.Union([ServerNotification__McpToolCallAppContext, Schema.Null]),
20651 ),
20652 arguments: Schema.Unknown,
20653 durationMs: Schema.optionalKey(
20654 Schema.Union([
20655 Schema.Number.annotate({
20656 description: "The duration of the MCP tool call in milliseconds.",
20657 format: "int64",
20658 }).check(Schema.isInt()),
20659 Schema.Null,
20660 ]),
20661 ),
20662 error: Schema.optionalKey(Schema.Union([ServerNotification__McpToolCallError, Schema.Null])),
20663 id: Schema.String,
20664 mcpAppResourceUri: Schema.optionalKey(
20665 Schema.Union([
20666 Schema.String.annotate({
20667 description: "Deprecated: use `appContext.resourceUri` instead.",
20668 }),
20669 Schema.Null,
20670 ]),
20671 ),
20672 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20673 result: Schema.optionalKey(
20674 Schema.Union([ServerNotification__McpToolCallResult, Schema.Null]),
20675 ),
20676 server: Schema.String,
20677 status: ServerNotification__McpToolCallStatus,
20678 tool: Schema.String,
20679 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
20680 }).annotate({ title: "McpToolCallThreadItem" }),
20681 Schema.Struct({
20682 arguments: Schema.Unknown,
20683 contentItems: Schema.optionalKey(
20684 Schema.Union([
20685 Schema.Array(ServerNotification__DynamicToolCallOutputContentItem),
20686 Schema.Null,
20687 ]),
20688 ),
20689 durationMs: Schema.optionalKey(
20690 Schema.Union([
20691 Schema.Number.annotate({
20692 description: "The duration of the dynamic tool call in milliseconds.",
20693 format: "int64",
20694 }).check(Schema.isInt()),
20695 Schema.Null,
20696 ]),
20697 ),
20698 id: Schema.String,
20699 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20700 status: ServerNotification__DynamicToolCallStatus,
20701 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
20702 tool: Schema.String,
20703 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
20704 }).annotate({ title: "DynamicToolCallThreadItem" }),
20705 Schema.Struct({
20706 agentsStates: Schema.Record(Schema.String, ServerNotification__CollabAgentState).annotate({
20707 description: "Last known status of the target agents, when available.",
20708 }),
20709 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
20710 model: Schema.optionalKey(
20711 Schema.Union([
20712 Schema.String.annotate({
20713 description: "Model requested for the spawned agent, when applicable.",
20714 }),
20715 Schema.Null,
20716 ]),
20717 ),
20718 prompt: Schema.optionalKey(
20719 Schema.Union([
20720 Schema.String.annotate({
20721 description: "Prompt text sent as part of the collab tool call, when available.",
20722 }),
20723 Schema.Null,
20724 ]),
20725 ),
20726 reasoningEffort: Schema.optionalKey(
20727 Schema.Union([ServerNotification__ReasoningEffort, Schema.Null]).annotate({
20728 description: "Reasoning effort requested for the spawned agent, when applicable.",
20729 }),
20730 ),
20731 receiverThreadIds: Schema.Array(Schema.String).annotate({
23187export const ServerRequest__CommandExecutionRequestApprovalParams = Schema.Struct({
23188 approvalId: Schema.optionalKey(
23189 Schema.Union([
23190 Schema.String.annotate({
2073223191 description:
20733 "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
20734 }),
20735 senderThreadId: Schema.String.annotate({
20736 description: "Thread ID of the agent issuing the collab request.",
20737 }),
20738 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
20739 description: "Current status of the collab tool call.",
20740 }),
20741 tool: Schema.Literals([
20742 "spawnAgent",
20743 "sendInput",
20744 "resumeAgent",
20745 "wait",
20746 "closeAgent",
20747 "sendMessage",
20748 "followupTask",
20749 "interruptAgent",
20750 "listAgents",
20751 ]).annotate({ description: "Name of the collab tool that was invoked." }),
20752 type: Schema.Literal("collabAgentToolCall").annotate({
20753 title: "CollabAgentToolCallThreadItemType",
23192 "Unique identifier for this specific approval callback.\n\nFor regular shell/unified_exec approvals, this is null.\n\nFor zsh-exec-bridge subcommand approvals, multiple callbacks can belong to one parent `itemId`, so `approvalId` is a distinct opaque callback id (a UUID) used to disambiguate routing.",
2075423193 }),
20755 }).annotate({ title: "CollabAgentToolCallThreadItem" }),
20756 Schema.Struct({
20757 agentPath: Schema.String,
20758 agentThreadId: Schema.String,
20759 id: Schema.String,
20760 kind: ServerNotification__SubAgentActivityKind,
20761 type: Schema.Literal("subAgentActivity").annotate({
20762 title: "SubAgentActivityThreadItemType",
23194 Schema.Null,
23195 ]),
23196 ),
23197 command: Schema.optionalKey(
23198 Schema.Union([
23199 Schema.String.annotate({ description: "The command to be executed." }),
23200 Schema.Null,
23201 ]),
23202 ),
23203 commandActions: Schema.optionalKey(
23204 Schema.Union([
23205 Schema.Array(ServerRequest__CommandAction).annotate({
23206 description: "Best-effort parsed command actions for friendly display.",
2076323207 }),
20764 }).annotate({ title: "SubAgentActivityThreadItem" }),
20765 Schema.Struct({
20766 action: Schema.optionalKey(Schema.Union([ServerNotification__WebSearchAction, Schema.Null])),
20767 id: Schema.String,
20768 query: Schema.String,
20769 results: Schema.optionalKey(
20770 Schema.Union([
20771 Schema.Array(Schema.Unknown).annotate({
20772 description:
20773 "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.",
20774 }),
20775 Schema.Null,
20776 ]),
20777 ),
20778 type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }),
20779 }).annotate({ title: "WebSearchThreadItem" }),
20780 Schema.Struct({
20781 id: Schema.String,
20782 path: ServerNotification__LegacyAppPathString,
20783 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
20784 }).annotate({ title: "ImageViewThreadItem" }),
20785 Schema.Struct({
20786 durationMs: Schema.Number.annotate({ format: "uint64" })
20787 .check(Schema.isInt())
20788 .check(Schema.isGreaterThanOrEqualTo(0)),
20789 id: Schema.String,
20790 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
20791 }).annotate({
20792 title: "SleepThreadItem",
20793 description: "Display item emitted by the interruptible `clock.sleep` tool.",
23208 Schema.Null,
23209 ]),
23210 ),
23211 cwd: Schema.optionalKey(
23212 Schema.Union([ServerRequest__LegacyAppPathString, Schema.Null]).annotate({
23213 description: "The command's working directory.",
2079423214 }),
20795 Schema.Struct({
20796 id: Schema.String,
20797 result: Schema.String,
20798 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20799 savedPath: Schema.optionalKey(
20800 Schema.Union([ServerNotification__AbsolutePathBuf, Schema.Null]),
20801 ),
20802 status: Schema.String,
20803 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
20804 }).annotate({ title: "ImageGenerationThreadItem" }),
20805 Schema.Struct({
20806 id: Schema.String,
20807 review: Schema.String,
20808 type: Schema.Literal("enteredReviewMode").annotate({
20809 title: "EnteredReviewModeThreadItemType",
20810 }),
20811 }).annotate({ title: "EnteredReviewModeThreadItem" }),
20812 Schema.Struct({
20813 id: Schema.String,
20814 review: Schema.String,
20815 type: Schema.Literal("exitedReviewMode").annotate({
20816 title: "ExitedReviewModeThreadItemType",
20817 }),
20818 }).annotate({ title: "ExitedReviewModeThreadItem" }),
20819 Schema.Struct({
20820 id: Schema.String,
20821 type: Schema.Literal("contextCompaction").annotate({
20822 title: "ContextCompactionThreadItemType",
23215 ),
23216 environmentId: Schema.optionalKey(
23217 Schema.Union([
23218 Schema.String.annotate({ description: "Environment in which the command will run." }),
23219 Schema.Null,
23220 ]),
23221 ),
23222 itemId: Schema.String,
23223 networkApprovalContext: Schema.optionalKey(
23224 Schema.Union([ServerRequest__NetworkApprovalContext, Schema.Null]).annotate({
23225 description: "Optional context for a managed-network approval prompt.",
23226 }),
23227 ),
23228 proposedExecpolicyAmendment: Schema.optionalKey(
23229 Schema.Union([
23230 Schema.Array(Schema.String).annotate({
23231 description:
23232 "Optional proposed execpolicy amendment to allow similar commands without prompting.",
2082323233 }),
20824 }).annotate({ title: "ContextCompactionThreadItem" }),
20825 ],
20826 { mode: "oneOf" },
20827);
20828
20829export type ServerNotification__ConfigWarningNotification = {
20830 readonly details?: string | null;
20831 readonly path?: string | null;
20832 readonly range?: ServerNotification__TextRange | null;
20833 readonly summary: string;
20834};
20835export const ServerNotification__ConfigWarningNotification = Schema.Struct({
20836 details: Schema.optionalKey(
23234 Schema.Null,
23235 ]),
23236 ),
23237 proposedNetworkPolicyAmendments: Schema.optionalKey(
2083723238 Schema.Union([
20838 Schema.String.annotate({ description: "Optional extra guidance or error details." }),
23239 Schema.Array(ServerRequest__NetworkPolicyAmendment).annotate({
23240 description:
23241 "Optional proposed network policy amendments (allow/deny host) for future requests.",
23242 }),
2083923243 Schema.Null,
2084023244 ]),
2084123245 ),
20842 path: Schema.optionalKey(
23246 reason: Schema.optionalKey(
2084323247 Schema.Union([
2084423248 Schema.String.annotate({
20845 description: "Optional path to the config file that triggered the warning.",
23249 description: "Optional explanatory reason (e.g. request for network access).",
2084623250 }),
2084723251 Schema.Null,
2084823252 ]),
2084923253 ),
20850 range: Schema.optionalKey(
20851 Schema.Union([ServerNotification__TextRange, Schema.Null]).annotate({
20852 description: "Optional range for the error location inside the config file.",
20853 }),
20854 ),
20855 summary: Schema.String.annotate({ description: "Concise summary of the warning." }),
20856});
20857
20858export type ServerNotification__ThreadStatusChangedNotification = {
20859 readonly status: ServerNotification__ThreadStatus;
20860 readonly threadId: string;
20861};
20862export const ServerNotification__ThreadStatusChangedNotification = Schema.Struct({
20863 status: ServerNotification__ThreadStatus,
23254 startedAtMs: Schema.Number.annotate({
23255 description: "Unix timestamp (in milliseconds) when this approval request started.",
23256 format: "int64",
23257 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2086423258 threadId: Schema.String,
20865});
20866
20867export type ServerNotification__ThreadGoalUpdatedNotification = {
20868 readonly goal: ServerNotification__ThreadGoal;
20869 readonly threadId: string;
20870 readonly turnId?: string | null;
20871};
20872export const ServerNotification__ThreadGoalUpdatedNotification = Schema.Struct({
20873 goal: ServerNotification__ThreadGoal,
20874 threadId: Schema.String,
20875 turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20876});
20877
20878export type ServerNotification__ThreadTokenUsageUpdatedNotification = {
20879 readonly threadId: string;
20880 readonly tokenUsage: ServerNotification__ThreadTokenUsage;
20881 readonly turnId: string;
20882};
20883export const ServerNotification__ThreadTokenUsageUpdatedNotification = Schema.Struct({
20884 threadId: Schema.String,
20885 tokenUsage: ServerNotification__ThreadTokenUsage,
2088623259 turnId: Schema.String,
20887});
23260}).annotate({ identifier: "ServerRequest__CommandExecutionRequestApprovalParams" });
2088823261
20889export type ServerNotification__TurnPlanUpdatedNotification = {
20890 readonly explanation?: string | null;
20891 readonly plan: ReadonlyArray<ServerNotification__TurnPlanStep>;
23262export type ServerRequest__ToolRequestUserInputParams = {
23263 readonly autoResolutionMs?: number | null;
23264 readonly itemId: string;
23265 readonly questions: ReadonlyArray<ServerRequest__ToolRequestUserInputQuestion>;
2089223266 readonly threadId: string;
2089323267 readonly turnId: string;
2089423268};
20895export const ServerNotification__TurnPlanUpdatedNotification = Schema.Struct({
20896 explanation: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20897 plan: Schema.Array(ServerNotification__TurnPlanStep),
20898 threadId: Schema.String,
20899 turnId: Schema.String,
20900});
20901
20902export type ServerRequest__FileSystemPath =
20903 | { readonly path: ServerRequest__LegacyAppPathString; readonly type: "path" }
20904 | { readonly pattern: string; readonly type: "glob_pattern" }
20905 | { readonly type: "special"; readonly value: ServerRequest__FileSystemSpecialPath };
20906export const ServerRequest__FileSystemPath = Schema.Union(
20907 [
20908 Schema.Struct({
20909 path: ServerRequest__LegacyAppPathString,
20910 type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }),
20911 }).annotate({ title: "PathFileSystemPath" }),
20912 Schema.Struct({
20913 pattern: Schema.String,
20914 type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }),
20915 }).annotate({ title: "GlobPatternFileSystemPath" }),
20916 Schema.Struct({
20917 type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }),
20918 value: ServerRequest__FileSystemSpecialPath,
20919 }).annotate({ title: "SpecialFileSystemPath" }),
20920 ],
20921 { mode: "oneOf" },
20922);
20923
20924export type ServerRequest__McpElicitationTitledMultiSelectEnumSchema = {
20925 readonly default?: ReadonlyArray<string> | null;
20926 readonly description?: string | null;
20927 readonly items: ServerRequest__McpElicitationTitledEnumItems;
20928 readonly maxItems?: number | null;
20929 readonly minItems?: number | null;
20930 readonly title?: string | null;
20931 readonly type: ServerRequest__McpElicitationArrayType;
20932};
20933export const ServerRequest__McpElicitationTitledMultiSelectEnumSchema = Schema.Struct({
20934 default: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
20935 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20936 items: ServerRequest__McpElicitationTitledEnumItems,
20937 maxItems: Schema.optionalKey(
20938 Schema.Union([
20939 Schema.Number.annotate({ format: "uint64" })
20940 .check(Schema.isInt())
20941 .check(Schema.isGreaterThanOrEqualTo(0)),
20942 Schema.Null,
20943 ]),
20944 ),
20945 minItems: Schema.optionalKey(
23269export const ServerRequest__ToolRequestUserInputParams = Schema.Struct({
23270 autoResolutionMs: Schema.optionalKey(
2094623271 Schema.Union([
2094723272 Schema.Number.annotate({ format: "uint64" })
20948 .check(Schema.isInt())
20949 .check(Schema.isGreaterThanOrEqualTo(0)),
23273 .check(Schema.isInt().annotate({ expected: "an integer" }))
23274 .check(
23275 Schema.isGreaterThanOrEqualTo(0).annotate({
23276 expected: "a value greater than or equal to 0",
23277 }),
23278 ),
2095023279 Schema.Null,
2095123280 ]),
2095223281 ),
20953 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
20954 type: ServerRequest__McpElicitationArrayType,
23282 itemId: Schema.String,
23283 questions: Schema.Array(ServerRequest__ToolRequestUserInputQuestion),
23284 threadId: Schema.String,
23285 turnId: Schema.String,
23286}).annotate({
23287 description: "EXPERIMENTAL. Params sent with a request_user_input event.",
23288 identifier: "ServerRequest__ToolRequestUserInputParams",
2095523289});
2095623290
2095723291export type ServerRequest__McpElicitationUntitledMultiSelectEnumSchema = {
......@@ -20970,22 +23304,30 @@ export const ServerRequest__McpElicitationUntitledMultiSelectEnumSchema = Schema
2097023304 maxItems: Schema.optionalKey(
2097123305 Schema.Union([
2097223306 Schema.Number.annotate({ format: "uint64" })
20973 .check(Schema.isInt())
20974 .check(Schema.isGreaterThanOrEqualTo(0)),
23307 .check(Schema.isInt().annotate({ expected: "an integer" }))
23308 .check(
23309 Schema.isGreaterThanOrEqualTo(0).annotate({
23310 expected: "a value greater than or equal to 0",
23311 }),
23312 ),
2097523313 Schema.Null,
2097623314 ]),
2097723315 ),
2097823316 minItems: Schema.optionalKey(
2097923317 Schema.Union([
2098023318 Schema.Number.annotate({ format: "uint64" })
20981 .check(Schema.isInt())
20982 .check(Schema.isGreaterThanOrEqualTo(0)),
23319 .check(Schema.isInt().annotate({ expected: "an integer" }))
23320 .check(
23321 Schema.isGreaterThanOrEqualTo(0).annotate({
23322 expected: "a value greater than or equal to 0",
23323 }),
23324 ),
2098323325 Schema.Null,
2098423326 ]),
2098523327 ),
2098623328 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2098723329 type: ServerRequest__McpElicitationArrayType,
20988});
23330}).annotate({ identifier: "ServerRequest__McpElicitationUntitledMultiSelectEnumSchema" });
2098923331
2099023332export type ServerRequest__McpElicitationSingleSelectEnumSchema =
2099123333 | ServerRequest__McpElicitationUntitledSingleSelectEnumSchema
......@@ -20993,119 +23335,48 @@ export type ServerRequest__McpElicitationSingleSelectEnumSchema =
2099323335export const ServerRequest__McpElicitationSingleSelectEnumSchema = Schema.Union([
2099423336 ServerRequest__McpElicitationUntitledSingleSelectEnumSchema,
2099523337 ServerRequest__McpElicitationTitledSingleSelectEnumSchema,
20996]);
23338]).annotate({ identifier: "ServerRequest__McpElicitationSingleSelectEnumSchema" });
2099723339
20998export type ServerRequest__CommandExecutionRequestApprovalParams = {
20999 readonly approvalId?: string | null;
21000 readonly command?: string | null;
21001 readonly commandActions?: ReadonlyArray<ServerRequest__CommandAction> | null;
21002 readonly cwd?: ServerRequest__LegacyAppPathString | null;
21003 readonly environmentId?: string | null;
21004 readonly itemId: string;
21005 readonly networkApprovalContext?: ServerRequest__NetworkApprovalContext | null;
21006 readonly proposedExecpolicyAmendment?: ReadonlyArray<string> | null;
21007 readonly proposedNetworkPolicyAmendments?: ReadonlyArray<ServerRequest__NetworkPolicyAmendment> | null;
21008 readonly reason?: string | null;
21009 readonly startedAtMs: number;
21010 readonly threadId: string;
21011 readonly turnId: string;
23340export type ServerRequest__McpElicitationTitledMultiSelectEnumSchema = {
23341 readonly default?: ReadonlyArray<string> | null;
23342 readonly description?: string | null;
23343 readonly items: ServerRequest__McpElicitationTitledEnumItems;
23344 readonly maxItems?: number | null;
23345 readonly minItems?: number | null;
23346 readonly title?: string | null;
23347 readonly type: ServerRequest__McpElicitationArrayType;
2101223348};
21013export const ServerRequest__CommandExecutionRequestApprovalParams = Schema.Struct({
21014 approvalId: Schema.optionalKey(
21015 Schema.Union([
21016 Schema.String.annotate({
21017 description:
21018 "Unique identifier for this specific approval callback.\n\nFor regular shell/unified_exec approvals, this is null.\n\nFor zsh-exec-bridge subcommand approvals, multiple callbacks can belong to one parent `itemId`, so `approvalId` is a distinct opaque callback id (a UUID) used to disambiguate routing.",
21019 }),
21020 Schema.Null,
21021 ]),
21022 ),
21023 command: Schema.optionalKey(
21024 Schema.Union([
21025 Schema.String.annotate({ description: "The command to be executed." }),
21026 Schema.Null,
21027 ]),
21028 ),
21029 commandActions: Schema.optionalKey(
21030 Schema.Union([
21031 Schema.Array(ServerRequest__CommandAction).annotate({
21032 description: "Best-effort parsed command actions for friendly display.",
21033 }),
21034 Schema.Null,
21035 ]),
21036 ),
21037 cwd: Schema.optionalKey(
21038 Schema.Union([ServerRequest__LegacyAppPathString, Schema.Null]).annotate({
21039 description: "The command's working directory.",
21040 }),
21041 ),
21042 environmentId: Schema.optionalKey(
21043 Schema.Union([
21044 Schema.String.annotate({ description: "Environment in which the command will run." }),
21045 Schema.Null,
21046 ]),
21047 ),
21048 itemId: Schema.String,
21049 networkApprovalContext: Schema.optionalKey(
21050 Schema.Union([ServerRequest__NetworkApprovalContext, Schema.Null]).annotate({
21051 description: "Optional context for a managed-network approval prompt.",
21052 }),
21053 ),
21054 proposedExecpolicyAmendment: Schema.optionalKey(
21055 Schema.Union([
21056 Schema.Array(Schema.String).annotate({
21057 description:
21058 "Optional proposed execpolicy amendment to allow similar commands without prompting.",
21059 }),
21060 Schema.Null,
21061 ]),
21062 ),
21063 proposedNetworkPolicyAmendments: Schema.optionalKey(
21064 Schema.Union([
21065 Schema.Array(ServerRequest__NetworkPolicyAmendment).annotate({
21066 description:
21067 "Optional proposed network policy amendments (allow/deny host) for future requests.",
21068 }),
21069 Schema.Null,
21070 ]),
21071 ),
21072 reason: Schema.optionalKey(
23349export const ServerRequest__McpElicitationTitledMultiSelectEnumSchema = Schema.Struct({
23350 default: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
23351 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
23352 items: ServerRequest__McpElicitationTitledEnumItems,
23353 maxItems: Schema.optionalKey(
2107323354 Schema.Union([
21074 Schema.String.annotate({
21075 description: "Optional explanatory reason (e.g. request for network access).",
21076 }),
23355 Schema.Number.annotate({ format: "uint64" })
23356 .check(Schema.isInt().annotate({ expected: "an integer" }))
23357 .check(
23358 Schema.isGreaterThanOrEqualTo(0).annotate({
23359 expected: "a value greater than or equal to 0",
23360 }),
23361 ),
2107723362 Schema.Null,
2107823363 ]),
2107923364 ),
21080 startedAtMs: Schema.Number.annotate({
21081 description: "Unix timestamp (in milliseconds) when this approval request started.",
21082 format: "int64",
21083 }).check(Schema.isInt()),
21084 threadId: Schema.String,
21085 turnId: Schema.String,
21086});
21087
21088export type ServerRequest__ToolRequestUserInputParams = {
21089 readonly autoResolutionMs?: number | null;
21090 readonly itemId: string;
21091 readonly questions: ReadonlyArray<ServerRequest__ToolRequestUserInputQuestion>;
21092 readonly threadId: string;
21093 readonly turnId: string;
21094};
21095export const ServerRequest__ToolRequestUserInputParams = Schema.Struct({
21096 autoResolutionMs: Schema.optionalKey(
23365 minItems: Schema.optionalKey(
2109723366 Schema.Union([
2109823367 Schema.Number.annotate({ format: "uint64" })
21099 .check(Schema.isInt())
21100 .check(Schema.isGreaterThanOrEqualTo(0)),
23368 .check(Schema.isInt().annotate({ expected: "an integer" }))
23369 .check(
23370 Schema.isGreaterThanOrEqualTo(0).annotate({
23371 expected: "a value greater than or equal to 0",
23372 }),
23373 ),
2110123374 Schema.Null,
2110223375 ]),
2110323376 ),
21104 itemId: Schema.String,
21105 questions: Schema.Array(ServerRequest__ToolRequestUserInputQuestion),
21106 threadId: Schema.String,
21107 turnId: Schema.String,
21108}).annotate({ description: "EXPERIMENTAL. Params sent with a request_user_input event." });
23377 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
23378 type: ServerRequest__McpElicitationArrayType,
23379}).annotate({ identifier: "ServerRequest__McpElicitationTitledMultiSelectEnumSchema" });
2110923380
2111023381export type V2AppListUpdatedNotification__AppInfo = {
2111123382 readonly appMetadata?: V2AppListUpdatedNotification__AppMetadata | null;
......@@ -21156,7 +23427,10 @@ export const V2AppListUpdatedNotification__AppInfo = Schema.Struct({
2115623427 logoUrlDark: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2115723428 name: Schema.String,
2115823429 pluginDisplayNames: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
21159}).annotate({ description: "EXPERIMENTAL - app metadata returned by app-list APIs." });
23430}).annotate({
23431 description: "EXPERIMENTAL - app metadata returned by app-list APIs.",
23432 identifier: "V2AppListUpdatedNotification__AppInfo",
23433});
2116023434
2116123435export type V2AppsListResponse__AppInfo = {
2116223436 readonly appMetadata?: V2AppsListResponse__AppMetadata | null;
......@@ -21203,20 +23477,32 @@ export const V2AppsListResponse__AppInfo = Schema.Struct({
2120323477 logoUrlDark: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2120423478 name: Schema.String,
2120523479 pluginDisplayNames: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
21206}).annotate({ description: "EXPERIMENTAL - app metadata returned by app-list APIs." });
23480}).annotate({
23481 description: "EXPERIMENTAL - app metadata returned by app-list APIs.",
23482 identifier: "V2AppsListResponse__AppInfo",
23483});
23484
23485export type V2ConfigReadResponse__ToolsV2 = {
23486 readonly web_search?: V2ConfigReadResponse__WebSearchToolConfig | null;
23487};
23488export const V2ConfigReadResponse__ToolsV2 = Schema.Struct({
23489 web_search: Schema.optionalKey(
23490 Schema.Union([V2ConfigReadResponse__WebSearchToolConfig, Schema.Null]),
23491 ),
23492}).annotate({ identifier: "V2ConfigReadResponse__ToolsV2" });
2120723493
2120823494export type V2ConfigReadResponse__ConfigLayer = {
21209 readonly config: unknown;
23495 readonly config: Schema.Json;
2121023496 readonly disabledReason?: string | null;
2121123497 readonly name: V2ConfigReadResponse__ConfigLayerSource;
2121223498 readonly version: string;
2121323499};
2121423500export const V2ConfigReadResponse__ConfigLayer = Schema.Struct({
21215 config: Schema.Unknown,
23501 config: Schema.Json.annotate({ expected: "JSON value" }),
2121623502 disabledReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2121723503 name: V2ConfigReadResponse__ConfigLayerSource,
2121823504 version: Schema.String,
21219});
23505}).annotate({ identifier: "V2ConfigReadResponse__ConfigLayer" });
2122023506
2122123507export type V2ConfigReadResponse__ConfigLayerMetadata = {
2122223508 readonly name: V2ConfigReadResponse__ConfigLayerSource;
......@@ -21225,16 +23511,7 @@ export type V2ConfigReadResponse__ConfigLayerMetadata = {
2122523511export const V2ConfigReadResponse__ConfigLayerMetadata = Schema.Struct({
2122623512 name: V2ConfigReadResponse__ConfigLayerSource,
2122723513 version: Schema.String,
21228});
21229
21230export type V2ConfigReadResponse__ToolsV2 = {
21231 readonly web_search?: V2ConfigReadResponse__WebSearchToolConfig | null;
21232};
21233export const V2ConfigReadResponse__ToolsV2 = Schema.Struct({
21234 web_search: Schema.optionalKey(
21235 Schema.Union([V2ConfigReadResponse__WebSearchToolConfig, Schema.Null]),
21236 ),
21237});
23514}).annotate({ identifier: "V2ConfigReadResponse__ConfigLayerMetadata" });
2123823515
2123923516export type V2ConfigRequirementsReadResponse__ModelsRequirements = {
2124023517 readonly newThread?: V2ConfigRequirementsReadResponse__NewThreadModelDefaults | null;
......@@ -21243,7 +23520,7 @@ export const V2ConfigRequirementsReadResponse__ModelsRequirements = Schema.Struc
2124323520 newThread: Schema.optionalKey(
2124423521 Schema.Union([V2ConfigRequirementsReadResponse__NewThreadModelDefaults, Schema.Null]),
2124523522 ),
21246});
23523}).annotate({ identifier: "V2ConfigRequirementsReadResponse__ModelsRequirements" });
2124723524
2124823525export type V2ConfigWriteResponse__ConfigLayerMetadata = {
2124923526 readonly name: V2ConfigWriteResponse__ConfigLayerSource;
......@@ -21252,7 +23529,7 @@ export type V2ConfigWriteResponse__ConfigLayerMetadata = {
2125223529export const V2ConfigWriteResponse__ConfigLayerMetadata = Schema.Struct({
2125323530 name: V2ConfigWriteResponse__ConfigLayerSource,
2125423531 version: Schema.String,
21255});
23532}).annotate({ identifier: "V2ConfigWriteResponse__ConfigLayerMetadata" });
2125623533
2125723534export type V2ErrorNotification__TurnError = {
2125823535 readonly additionalDetails?: string | null;
......@@ -21265,7 +23542,7 @@ export const V2ErrorNotification__TurnError = Schema.Struct({
2126523542 Schema.Union([V2ErrorNotification__CodexErrorInfo, Schema.Null]),
2126623543 ),
2126723544 message: Schema.String,
21268});
23545}).annotate({ identifier: "V2ErrorNotification__TurnError" });
2126923546
2127023547export type V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItem = {
2127123548 readonly cwd?: string | null;
......@@ -21288,6 +23565,8 @@ export const V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationIt
2128823565 Schema.Union([V2ExternalAgentConfigDetectResponse__MigrationDetails, Schema.Null]),
2128923566 ),
2129023567 itemType: V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItemType,
23568}).annotate({
23569 identifier: "V2ExternalAgentConfigDetectResponse__ExternalAgentConfigMigrationItem",
2129123570});
2129223571
2129323572export type V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportTypeResult =
......@@ -21306,6 +23585,9 @@ export const V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConf
2130623585 successes: Schema.Array(
2130723586 V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportItemTypeSuccess,
2130823587 ),
23588 }).annotate({
23589 identifier:
23590 "V2ExternalAgentConfigImportCompletedNotification__ExternalAgentConfigImportTypeResult",
2130923591 });
2131023592
2131123593export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportHistory = {
......@@ -21316,7 +23598,9 @@ export type V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfi
2131623598};
2131723599export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportHistory =
2131823600 Schema.Struct({
21319 completedAtMs: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
23601 completedAtMs: Schema.Number.annotate({ format: "int64" }).check(
23602 Schema.isInt().annotate({ expected: "an integer" }),
23603 ),
2132023604 failures: Schema.Array(
2132123605 V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeFailure,
2132223606 ),
......@@ -21324,6 +23608,9 @@ export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConf
2132423608 successes: Schema.Array(
2132523609 V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportItemTypeSuccess,
2132623610 ),
23611 }).annotate({
23612 identifier:
23613 "V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigImportHistory",
2132723614 });
2132823615
2132923616export type V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItem = {
......@@ -21347,7 +23634,7 @@ export const V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItem
2134723634 Schema.Union([V2ExternalAgentConfigImportParams__MigrationDetails, Schema.Null]),
2134823635 ),
2134923636 itemType: V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItemType,
21350});
23637}).annotate({ identifier: "V2ExternalAgentConfigImportParams__ExternalAgentConfigMigrationItem" });
2135123638
2135223639export type V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportTypeResult = {
2135323640 readonly failures: ReadonlyArray<V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeFailure>;
......@@ -21363,6 +23650,9 @@ export const V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfi
2136323650 successes: Schema.Array(
2136423651 V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportItemTypeSuccess,
2136523652 ),
23653 }).annotate({
23654 identifier:
23655 "V2ExternalAgentConfigImportProgressNotification__ExternalAgentConfigImportTypeResult",
2136623656 });
2136723657
2136823658export type V2GetAccountRateLimitsResponse__RateLimitResetCreditsSummary = {
......@@ -21370,7 +23660,9 @@ export type V2GetAccountRateLimitsResponse__RateLimitResetCreditsSummary = {
2137023660 readonly credits?: ReadonlyArray<V2GetAccountRateLimitsResponse__RateLimitResetCredit> | null;
2137123661};
2137223662export const V2GetAccountRateLimitsResponse__RateLimitResetCreditsSummary = Schema.Struct({
21373 availableCount: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
23663 availableCount: Schema.Number.annotate({ format: "int64" }).check(
23664 Schema.isInt().annotate({ expected: "an integer" }),
23665 ),
2137423666 credits: Schema.optionalKey(
2137523667 Schema.Union([
2137623668 Schema.Array(V2GetAccountRateLimitsResponse__RateLimitResetCredit).annotate({
......@@ -21380,7 +23672,7 @@ export const V2GetAccountRateLimitsResponse__RateLimitResetCreditsSummary = Sche
2138023672 Schema.Null,
2138123673 ]),
2138223674 ),
21383});
23675}).annotate({ identifier: "V2GetAccountRateLimitsResponse__RateLimitResetCreditsSummary" });
2138423676
2138523677export type V2HookCompletedNotification__HookRunSummary = {
2138623678 readonly completedAt?: number | null;
......@@ -21392,18 +23684,7 @@ export type V2HookCompletedNotification__HookRunSummary = {
2139223684 readonly handlerType: V2HookCompletedNotification__HookHandlerType;
2139323685 readonly id: string;
2139423686 readonly scope: V2HookCompletedNotification__HookScope;
21395 readonly source?:
21396 | "system"
21397 | "user"
21398 | "project"
21399 | "mdm"
21400 | "sessionFlags"
21401 | "plugin"
21402 | "cloudRequirements"
21403 | "cloudManagedConfig"
21404 | "legacyManagedConfigFile"
21405 | "legacyManagedConfigMdm"
21406 | "unknown";
23687 readonly source?: V2HookCompletedNotification__HookSource;
2140723688 readonly sourcePath: V2HookCompletedNotification__AbsolutePathBuf;
2140823689 readonly startedAt: number;
2140923690 readonly status: V2HookCompletedNotification__HookRunStatus;
......@@ -21411,11 +23692,23 @@ export type V2HookCompletedNotification__HookRunSummary = {
2141123692};
2141223693export const V2HookCompletedNotification__HookRunSummary = Schema.Struct({
2141323694 completedAt: Schema.optionalKey(
21414 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
23695 Schema.Union([
23696 Schema.Number.annotate({ format: "int64" }).check(
23697 Schema.isInt().annotate({ expected: "an integer" }),
23698 ),
23699 Schema.Null,
23700 ]),
23701 ),
23702 displayOrder: Schema.Number.annotate({ format: "int64" }).check(
23703 Schema.isInt().annotate({ expected: "an integer" }),
2141523704 ),
21416 displayOrder: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2141723705 durationMs: Schema.optionalKey(
21418 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
23706 Schema.Union([
23707 Schema.Number.annotate({ format: "int64" }).check(
23708 Schema.isInt().annotate({ expected: "an integer" }),
23709 ),
23710 Schema.Null,
23711 ]),
2141923712 ),
2142023713 entries: Schema.Array(V2HookCompletedNotification__HookOutputEntry),
2142123714 eventName: V2HookCompletedNotification__HookEventName,
......@@ -21424,25 +23717,18 @@ export const V2HookCompletedNotification__HookRunSummary = Schema.Struct({
2142423717 id: Schema.String,
2142523718 scope: V2HookCompletedNotification__HookScope,
2142623719 source: Schema.optionalKey(
21427 Schema.Literals([
21428 "system",
21429 "user",
21430 "project",
21431 "mdm",
21432 "sessionFlags",
21433 "plugin",
21434 "cloudRequirements",
21435 "cloudManagedConfig",
21436 "legacyManagedConfigFile",
21437 "legacyManagedConfigMdm",
21438 "unknown",
21439 ]).annotate({ default: "unknown" }),
23720 Schema.suspend(
23721 (): Schema.Codec<V2HookCompletedNotification__HookSource> =>
23722 V2HookCompletedNotification__HookSource,
23723 ).annotate({ default: "unknown" }),
2144023724 ),
2144123725 sourcePath: V2HookCompletedNotification__AbsolutePathBuf,
21442 startedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
23726 startedAt: Schema.Number.annotate({ format: "int64" }).check(
23727 Schema.isInt().annotate({ expected: "an integer" }),
23728 ),
2144323729 status: V2HookCompletedNotification__HookRunStatus,
2144423730 statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
21445});
23731}).annotate({ identifier: "V2HookCompletedNotification__HookRunSummary" });
2144623732
2144723733export type V2HooksListResponse__HooksListEntry = {
2144823734 readonly cwd: string;
......@@ -21455,7 +23741,7 @@ export const V2HooksListResponse__HooksListEntry = Schema.Struct({
2145523741 errors: Schema.Array(V2HooksListResponse__HookErrorInfo),
2145623742 hooks: Schema.Array(V2HooksListResponse__HookMetadata),
2145723743 warnings: Schema.Array(Schema.String),
21458});
23744}).annotate({ identifier: "V2HooksListResponse__HooksListEntry" });
2145923745
2146023746export type V2HookStartedNotification__HookRunSummary = {
2146123747 readonly completedAt?: number | null;
......@@ -21467,18 +23753,7 @@ export type V2HookStartedNotification__HookRunSummary = {
2146723753 readonly handlerType: V2HookStartedNotification__HookHandlerType;
2146823754 readonly id: string;
2146923755 readonly scope: V2HookStartedNotification__HookScope;
21470 readonly source?:
21471 | "system"
21472 | "user"
21473 | "project"
21474 | "mdm"
21475 | "sessionFlags"
21476 | "plugin"
21477 | "cloudRequirements"
21478 | "cloudManagedConfig"
21479 | "legacyManagedConfigFile"
21480 | "legacyManagedConfigMdm"
21481 | "unknown";
23756 readonly source?: V2HookStartedNotification__HookSource;
2148223757 readonly sourcePath: V2HookStartedNotification__AbsolutePathBuf;
2148323758 readonly startedAt: number;
2148423759 readonly status: V2HookStartedNotification__HookRunStatus;
......@@ -21486,11 +23761,23 @@ export type V2HookStartedNotification__HookRunSummary = {
2148623761};
2148723762export const V2HookStartedNotification__HookRunSummary = Schema.Struct({
2148823763 completedAt: Schema.optionalKey(
21489 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
23764 Schema.Union([
23765 Schema.Number.annotate({ format: "int64" }).check(
23766 Schema.isInt().annotate({ expected: "an integer" }),
23767 ),
23768 Schema.Null,
23769 ]),
23770 ),
23771 displayOrder: Schema.Number.annotate({ format: "int64" }).check(
23772 Schema.isInt().annotate({ expected: "an integer" }),
2149023773 ),
21491 displayOrder: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2149223774 durationMs: Schema.optionalKey(
21493 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
23775 Schema.Union([
23776 Schema.Number.annotate({ format: "int64" }).check(
23777 Schema.isInt().annotate({ expected: "an integer" }),
23778 ),
23779 Schema.Null,
23780 ]),
2149423781 ),
2149523782 entries: Schema.Array(V2HookStartedNotification__HookOutputEntry),
2149623783 eventName: V2HookStartedNotification__HookEventName,
......@@ -21499,1775 +23786,2114 @@ export const V2HookStartedNotification__HookRunSummary = Schema.Struct({
2149923786 id: Schema.String,
2150023787 scope: V2HookStartedNotification__HookScope,
2150123788 source: Schema.optionalKey(
21502 Schema.Literals([
21503 "system",
21504 "user",
21505 "project",
21506 "mdm",
21507 "sessionFlags",
21508 "plugin",
21509 "cloudRequirements",
21510 "cloudManagedConfig",
21511 "legacyManagedConfigFile",
21512 "legacyManagedConfigMdm",
21513 "unknown",
21514 ]).annotate({ default: "unknown" }),
23789 Schema.suspend(
23790 (): Schema.Codec<V2HookStartedNotification__HookSource> =>
23791 V2HookStartedNotification__HookSource,
23792 ).annotate({ default: "unknown" }),
2151523793 ),
2151623794 sourcePath: V2HookStartedNotification__AbsolutePathBuf,
21517 startedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
23795 startedAt: Schema.Number.annotate({ format: "int64" }).check(
23796 Schema.isInt().annotate({ expected: "an integer" }),
23797 ),
2151823798 status: V2HookStartedNotification__HookRunStatus,
2151923799 statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
21520});
23800}).annotate({ identifier: "V2HookStartedNotification__HookRunSummary" });
2152123801
21522export type V2ItemCompletedNotification__ThreadItem =
21523 | {
21524 readonly clientId?: string | null;
21525 readonly content: ReadonlyArray<V2ItemCompletedNotification__UserInput>;
21526 readonly id: string;
21527 readonly type: "userMessage";
21528 }
21529 | {
21530 readonly fragments: ReadonlyArray<V2ItemCompletedNotification__HookPromptFragment>;
21531 readonly id: string;
21532 readonly type: "hookPrompt";
21533 }
23802export type V2ItemCompletedNotification__UserInput =
2153423803 | {
21535 readonly id: string;
21536 readonly memoryCitation?: V2ItemCompletedNotification__MemoryCitation | null;
21537 readonly phase?: V2ItemCompletedNotification__MessagePhase | null;
2153823804 readonly text: string;
21539 readonly delivery?: "async" | null;
21540 readonly questions?: ReadonlyArray<{
21541 readonly title: string;
21542 readonly options?: ReadonlyArray<string> | null;
21543 }> | null;
21544 readonly type: "agentMessage";
21545 }
21546 | { readonly id: string; readonly text: string; readonly type: "plan" }
21547 | {
21548 readonly content?: ReadonlyArray<string>;
21549 readonly id: string;
21550 readonly summary?: ReadonlyArray<string>;
21551 readonly type: "reasoning";
23805 readonly text_elements?: ReadonlyArray<V2ItemCompletedNotification__TextElement>;
23806 readonly type: "text";
2155223807 }
2155323808 | {
21554 readonly aggregatedOutput?: string | null;
21555 readonly command: string;
21556 readonly commandActions: ReadonlyArray<V2ItemCompletedNotification__CommandAction>;
21557 readonly cwd: string;
21558 readonly durationMs?: number | null;
21559 readonly exitCode?: number | null;
21560 readonly id: string;
21561 readonly processId?: string | null;
21562 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
21563 readonly status: V2ItemCompletedNotification__CommandExecutionStatus;
21564 readonly type: "commandExecution";
23809 readonly detail?: V2ItemCompletedNotification__ImageDetail | null;
23810 readonly type: "image";
23811 readonly url: string;
2156523812 }
2156623813 | {
21567 readonly changes: ReadonlyArray<V2ItemCompletedNotification__FileUpdateChange>;
21568 readonly id: string;
21569 readonly status: V2ItemCompletedNotification__PatchApplyStatus;
21570 readonly type: "fileChange";
23814 readonly detail?: V2ItemCompletedNotification__ImageDetail | null;
23815 readonly path: string;
23816 readonly type: "localImage";
2157123817 }
23818 | { readonly type: "audio"; readonly url: string }
23819 | { readonly path: string; readonly type: "localAudio" }
23820 | { readonly name: string; readonly path: string; readonly type: "skill" }
23821 | { readonly name: string; readonly path: string; readonly type: "mention" };
23822export const V2ItemCompletedNotification__UserInput = Schema.Union(
23823 [
23824 Schema.Struct({
23825 text: Schema.String,
23826 text_elements: Schema.optionalKey(
23827 Schema.Array(V2ItemCompletedNotification__TextElement).annotate({
23828 description: "UI-defined spans within `text` used to render or persist special elements.",
23829 default: [],
23830 }),
23831 ),
23832 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
23833 }).annotate({ title: "TextUserInput" }),
23834 Schema.Struct({
23835 detail: Schema.optionalKey(
23836 Schema.Union([V2ItemCompletedNotification__ImageDetail, Schema.Null]),
23837 ),
23838 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
23839 url: Schema.String,
23840 }).annotate({ title: "ImageUserInput" }),
23841 Schema.Struct({
23842 detail: Schema.optionalKey(
23843 Schema.Union([V2ItemCompletedNotification__ImageDetail, Schema.Null]),
23844 ),
23845 path: Schema.String,
23846 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
23847 }).annotate({ title: "LocalImageUserInput" }),
23848 Schema.Struct({
23849 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
23850 url: Schema.String,
23851 }).annotate({ title: "AudioUserInput" }),
23852 Schema.Struct({
23853 path: Schema.String,
23854 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
23855 }).annotate({ title: "LocalAudioUserInput" }),
23856 Schema.Struct({
23857 name: Schema.String,
23858 path: Schema.String,
23859 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
23860 }).annotate({ title: "SkillUserInput" }),
23861 Schema.Struct({
23862 name: Schema.String,
23863 path: Schema.String,
23864 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
23865 }).annotate({ title: "MentionUserInput" }),
23866 ],
23867 { mode: "oneOf" },
23868).annotate({ identifier: "V2ItemCompletedNotification__UserInput" });
23869
23870export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath =
2157223871 | {
21573 readonly appContext?: V2ItemCompletedNotification__McpToolCallAppContext | null;
21574 readonly arguments: unknown;
21575 readonly durationMs?: number | null;
21576 readonly error?: V2ItemCompletedNotification__McpToolCallError | null;
21577 readonly id: string;
21578 readonly mcpAppResourceUri?: string | null;
21579 readonly pluginId?: string | null;
21580 readonly result?: V2ItemCompletedNotification__McpToolCallResult | null;
21581 readonly server: string;
21582 readonly status: V2ItemCompletedNotification__McpToolCallStatus;
21583 readonly tool: string;
21584 readonly type: "mcpToolCall";
23872 readonly path: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString;
23873 readonly type: "path";
2158523874 }
23875 | { readonly pattern: string; readonly type: "glob_pattern" }
2158623876 | {
21587 readonly arguments: unknown;
21588 readonly contentItems?: ReadonlyArray<V2ItemCompletedNotification__DynamicToolCallOutputContentItem> | null;
21589 readonly durationMs?: number | null;
21590 readonly id: string;
21591 readonly namespace?: string | null;
21592 readonly status: V2ItemCompletedNotification__DynamicToolCallStatus;
21593 readonly success?: boolean | null;
21594 readonly tool: string;
21595 readonly type: "dynamicToolCall";
21596 }
23877 readonly type: "special";
23878 readonly value: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath;
23879 };
23880export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath = Schema.Union(
23881 [
23882 Schema.Struct({
23883 path: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString,
23884 type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }),
23885 }).annotate({ title: "PathFileSystemPath" }),
23886 Schema.Struct({
23887 pattern: Schema.String,
23888 type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }),
23889 }).annotate({ title: "GlobPatternFileSystemPath" }),
23890 Schema.Struct({
23891 type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }),
23892 value: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath,
23893 }).annotate({ title: "SpecialFileSystemPath" }),
23894 ],
23895 { mode: "oneOf" },
23896).annotate({ identifier: "V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath" });
23897
23898export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath =
2159723899 | {
21598 readonly agentsStates: {
21599 readonly [x: string]: V2ItemCompletedNotification__CollabAgentState;
21600 };
21601 readonly id: string;
21602 readonly model?: string | null;
21603 readonly prompt?: string | null;
21604 readonly reasoningEffort?: V2ItemCompletedNotification__ReasoningEffort | null;
21605 readonly receiverThreadIds: ReadonlyArray<string>;
21606 readonly senderThreadId: string;
21607 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
21608 readonly tool:
21609 | "spawnAgent"
21610 | "sendInput"
21611 | "resumeAgent"
21612 | "wait"
21613 | "closeAgent"
21614 | "sendMessage"
21615 | "followupTask"
21616 | "interruptAgent"
21617 | "listAgents";
21618 readonly type: "collabAgentToolCall";
23900 readonly path: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString;
23901 readonly type: "path";
2161923902 }
23903 | { readonly pattern: string; readonly type: "glob_pattern" }
2162023904 | {
21621 readonly agentPath: string;
21622 readonly agentThreadId: string;
21623 readonly id: string;
21624 readonly kind: V2ItemCompletedNotification__SubAgentActivityKind;
21625 readonly type: "subAgentActivity";
21626 }
23905 readonly type: "special";
23906 readonly value: V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath;
23907 };
23908export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath = Schema.Union(
23909 [
23910 Schema.Struct({
23911 path: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString,
23912 type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }),
23913 }).annotate({ title: "PathFileSystemPath" }),
23914 Schema.Struct({
23915 pattern: Schema.String,
23916 type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }),
23917 }).annotate({ title: "GlobPatternFileSystemPath" }),
23918 Schema.Struct({
23919 type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }),
23920 value: V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath,
23921 }).annotate({ title: "SpecialFileSystemPath" }),
23922 ],
23923 { mode: "oneOf" },
23924).annotate({ identifier: "V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath" });
23925
23926export type V2ItemStartedNotification__UserInput =
2162723927 | {
21628 readonly action?: V2ItemCompletedNotification__WebSearchAction | null;
21629 readonly id: string;
21630 readonly query: string;
21631 readonly results?: ReadonlyArray<unknown> | null;
21632 readonly type: "webSearch";
23928 readonly text: string;
23929 readonly text_elements?: ReadonlyArray<V2ItemStartedNotification__TextElement>;
23930 readonly type: "text";
2163323931 }
2163423932 | {
21635 readonly id: string;
21636 readonly path: V2ItemCompletedNotification__LegacyAppPathString;
21637 readonly type: "imageView";
23933 readonly detail?: V2ItemStartedNotification__ImageDetail | null;
23934 readonly type: "image";
23935 readonly url: string;
2163823936 }
21639 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
2164023937 | {
21641 readonly id: string;
21642 readonly result: string;
21643 readonly revisedPrompt?: string | null;
21644 readonly savedPath?: V2ItemCompletedNotification__AbsolutePathBuf | null;
21645 readonly status: string;
21646 readonly type: "imageGeneration";
23938 readonly detail?: V2ItemStartedNotification__ImageDetail | null;
23939 readonly path: string;
23940 readonly type: "localImage";
2164723941 }
21648 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
21649 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
21650 | { readonly id: string; readonly type: "contextCompaction" };
21651export const V2ItemCompletedNotification__ThreadItem = Schema.Union(
23942 | { readonly type: "audio"; readonly url: string }
23943 | { readonly path: string; readonly type: "localAudio" }
23944 | { readonly name: string; readonly path: string; readonly type: "skill" }
23945 | { readonly name: string; readonly path: string; readonly type: "mention" };
23946export const V2ItemStartedNotification__UserInput = Schema.Union(
2165223947 [
2165323948 Schema.Struct({
21654 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
21655 content: Schema.Array(V2ItemCompletedNotification__UserInput),
21656 id: Schema.String,
21657 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
21658 }).annotate({ title: "UserMessageThreadItem" }),
21659 Schema.Struct({
21660 fragments: Schema.Array(V2ItemCompletedNotification__HookPromptFragment),
21661 id: Schema.String,
21662 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
21663 }).annotate({ title: "HookPromptThreadItem" }),
21664 Schema.Struct({
21665 id: Schema.String,
21666 memoryCitation: Schema.optionalKey(
21667 Schema.Union([V2ItemCompletedNotification__MemoryCitation, Schema.Null]),
21668 ),
21669 phase: Schema.optionalKey(
21670 Schema.Union([V2ItemCompletedNotification__MessagePhase, Schema.Null]),
21671 ),
2167223949 text: Schema.String,
21673 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
21674 questions: Schema.optionalKey(
21675 Schema.Union([
21676 Schema.Array(
21677 Schema.Struct({
21678 title: Schema.String,
21679 options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
21680 }),
21681 ),
21682 Schema.Null,
21683 ]),
23950 text_elements: Schema.optionalKey(
23951 Schema.Array(V2ItemStartedNotification__TextElement).annotate({
23952 description: "UI-defined spans within `text` used to render or persist special elements.",
23953 default: [],
23954 }),
2168423955 ),
21685 type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }),
21686 }).annotate({ title: "AgentMessageThreadItem" }),
21687 Schema.Struct({
21688 id: Schema.String,
21689 text: Schema.String,
21690 type: Schema.Literal("plan").annotate({ title: "PlanThreadItemType" }),
21691 }).annotate({
21692 title: "PlanThreadItem",
21693 description:
21694 "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
21695 }),
21696 Schema.Struct({
21697 content: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
21698 id: Schema.String,
21699 summary: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
21700 type: Schema.Literal("reasoning").annotate({ title: "ReasoningThreadItemType" }),
21701 }).annotate({ title: "ReasoningThreadItem" }),
23956 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
23957 }).annotate({ title: "TextUserInput" }),
2170223958 Schema.Struct({
21703 aggregatedOutput: Schema.optionalKey(
21704 Schema.Union([
21705 Schema.String.annotate({
21706 description: "The command's output, aggregated from stdout and stderr.",
21707 }),
21708 Schema.Null,
21709 ]),
21710 ),
21711 command: Schema.String.annotate({ description: "The command to be executed." }),
21712 commandActions: Schema.Array(V2ItemCompletedNotification__CommandAction).annotate({
21713 description:
21714 "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.",
21715 }),
21716 cwd: Schema.String.annotate({ description: "The command's working directory." }),
21717 durationMs: Schema.optionalKey(
21718 Schema.Union([
21719 Schema.Number.annotate({
21720 description: "The duration of the command execution in milliseconds.",
21721 format: "int64",
21722 }).check(Schema.isInt()),
21723 Schema.Null,
21724 ]),
21725 ),
21726 exitCode: Schema.optionalKey(
21727 Schema.Union([
21728 Schema.Number.annotate({
21729 description: "The command's exit code.",
21730 format: "int32",
21731 }).check(Schema.isInt()),
21732 Schema.Null,
21733 ]),
21734 ),
21735 id: Schema.String,
21736 processId: Schema.optionalKey(
21737 Schema.Union([
21738 Schema.String.annotate({
21739 description: "Identifier for the underlying PTY process (when available).",
21740 }),
21741 Schema.Null,
21742 ]),
23959 detail: Schema.optionalKey(
23960 Schema.Union([V2ItemStartedNotification__ImageDetail, Schema.Null]),
2174323961 ),
21744 source: Schema.optionalKey(
21745 Schema.Literals([
21746 "agent",
21747 "userShell",
21748 "unifiedExecStartup",
21749 "unifiedExecInteraction",
21750 ]).annotate({ default: "agent" }),
23962 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
23963 url: Schema.String,
23964 }).annotate({ title: "ImageUserInput" }),
23965 Schema.Struct({
23966 detail: Schema.optionalKey(
23967 Schema.Union([V2ItemStartedNotification__ImageDetail, Schema.Null]),
2175123968 ),
21752 status: V2ItemCompletedNotification__CommandExecutionStatus,
21753 type: Schema.Literal("commandExecution").annotate({
21754 title: "CommandExecutionThreadItemType",
21755 }),
21756 }).annotate({ title: "CommandExecutionThreadItem" }),
23969 path: Schema.String,
23970 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
23971 }).annotate({ title: "LocalImageUserInput" }),
2175723972 Schema.Struct({
21758 changes: Schema.Array(V2ItemCompletedNotification__FileUpdateChange),
21759 id: Schema.String,
21760 status: V2ItemCompletedNotification__PatchApplyStatus,
21761 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
21762 }).annotate({ title: "FileChangeThreadItem" }),
23973 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
23974 url: Schema.String,
23975 }).annotate({ title: "AudioUserInput" }),
2176323976 Schema.Struct({
21764 appContext: Schema.optionalKey(
21765 Schema.Union([V2ItemCompletedNotification__McpToolCallAppContext, Schema.Null]),
21766 ),
21767 arguments: Schema.Unknown,
21768 durationMs: Schema.optionalKey(
21769 Schema.Union([
21770 Schema.Number.annotate({
21771 description: "The duration of the MCP tool call in milliseconds.",
21772 format: "int64",
21773 }).check(Schema.isInt()),
21774 Schema.Null,
21775 ]),
21776 ),
21777 error: Schema.optionalKey(
21778 Schema.Union([V2ItemCompletedNotification__McpToolCallError, Schema.Null]),
21779 ),
21780 id: Schema.String,
21781 mcpAppResourceUri: Schema.optionalKey(
21782 Schema.Union([
21783 Schema.String.annotate({
21784 description: "Deprecated: use `appContext.resourceUri` instead.",
21785 }),
21786 Schema.Null,
21787 ]),
21788 ),
21789 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
21790 result: Schema.optionalKey(
21791 Schema.Union([V2ItemCompletedNotification__McpToolCallResult, Schema.Null]),
21792 ),
21793 server: Schema.String,
21794 status: V2ItemCompletedNotification__McpToolCallStatus,
21795 tool: Schema.String,
21796 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
21797 }).annotate({ title: "McpToolCallThreadItem" }),
23977 path: Schema.String,
23978 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
23979 }).annotate({ title: "LocalAudioUserInput" }),
2179823980 Schema.Struct({
21799 arguments: Schema.Unknown,
21800 contentItems: Schema.optionalKey(
21801 Schema.Union([
21802 Schema.Array(V2ItemCompletedNotification__DynamicToolCallOutputContentItem),
21803 Schema.Null,
21804 ]),
21805 ),
21806 durationMs: Schema.optionalKey(
21807 Schema.Union([
21808 Schema.Number.annotate({
21809 description: "The duration of the dynamic tool call in milliseconds.",
21810 format: "int64",
21811 }).check(Schema.isInt()),
21812 Schema.Null,
21813 ]),
21814 ),
21815 id: Schema.String,
21816 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
21817 status: V2ItemCompletedNotification__DynamicToolCallStatus,
21818 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
21819 tool: Schema.String,
21820 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
21821 }).annotate({ title: "DynamicToolCallThreadItem" }),
23981 name: Schema.String,
23982 path: Schema.String,
23983 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
23984 }).annotate({ title: "SkillUserInput" }),
2182223985 Schema.Struct({
21823 agentsStates: Schema.Record(
21824 Schema.String,
21825 V2ItemCompletedNotification__CollabAgentState,
21826 ).annotate({ description: "Last known status of the target agents, when available." }),
21827 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
21828 model: Schema.optionalKey(
21829 Schema.Union([
21830 Schema.String.annotate({
21831 description: "Model requested for the spawned agent, when applicable.",
21832 }),
21833 Schema.Null,
21834 ]),
21835 ),
21836 prompt: Schema.optionalKey(
21837 Schema.Union([
21838 Schema.String.annotate({
21839 description: "Prompt text sent as part of the collab tool call, when available.",
21840 }),
21841 Schema.Null,
21842 ]),
21843 ),
21844 reasoningEffort: Schema.optionalKey(
21845 Schema.Union([V2ItemCompletedNotification__ReasoningEffort, Schema.Null]).annotate({
21846 description: "Reasoning effort requested for the spawned agent, when applicable.",
21847 }),
21848 ),
21849 receiverThreadIds: Schema.Array(Schema.String).annotate({
21850 description:
21851 "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
23986 name: Schema.String,
23987 path: Schema.String,
23988 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
23989 }).annotate({ title: "MentionUserInput" }),
23990 ],
23991 { mode: "oneOf" },
23992).annotate({ identifier: "V2ItemStartedNotification__UserInput" });
23993
23994export type V2ModelListResponse__Model = {
23995 readonly additionalSpeedTiers?: ReadonlyArray<string>;
23996 readonly availabilityNux?: V2ModelListResponse__ModelAvailabilityNux | null;
23997 readonly defaultReasoningEffort: V2ModelListResponse__ReasoningEffort;
23998 readonly defaultServiceTier?: string | null;
23999 readonly description: string;
24000 readonly displayName: string;
24001 readonly hidden: boolean;
24002 readonly id: string;
24003 readonly inputModalities?: ReadonlyArray<V2ModelListResponse__InputModality>;
24004 readonly isDefault: boolean;
24005 readonly model: string;
24006 readonly serviceTiers?: ReadonlyArray<V2ModelListResponse__ModelServiceTier>;
24007 readonly supportedReasoningEfforts: ReadonlyArray<V2ModelListResponse__ReasoningEffortOption>;
24008 readonly supportsPersonality?: boolean;
24009 readonly upgrade?: string | null;
24010 readonly upgradeInfo?: V2ModelListResponse__ModelUpgradeInfo | null;
24011};
24012export const V2ModelListResponse__Model = Schema.Struct({
24013 additionalSpeedTiers: Schema.optionalKey(
24014 Schema.Array(Schema.String).annotate({
24015 description: "Deprecated: use `serviceTiers` instead.",
24016 default: [],
24017 }),
24018 ),
24019 availabilityNux: Schema.optionalKey(
24020 Schema.Union([V2ModelListResponse__ModelAvailabilityNux, Schema.Null]),
24021 ),
24022 defaultReasoningEffort: V2ModelListResponse__ReasoningEffort,
24023 defaultServiceTier: Schema.optionalKey(
24024 Schema.Union([
24025 Schema.String.annotate({
24026 description: "Catalog default service tier id for this model, when one is configured.",
2185224027 }),
21853 senderThreadId: Schema.String.annotate({
21854 description: "Thread ID of the agent issuing the collab request.",
24028 Schema.Null,
24029 ]),
24030 ),
24031 description: Schema.String,
24032 displayName: Schema.String,
24033 hidden: Schema.Boolean,
24034 id: Schema.String,
24035 inputModalities: Schema.optionalKey(
24036 Schema.Array(V2ModelListResponse__InputModality).annotate({ default: ["text", "image"] }),
24037 ),
24038 isDefault: Schema.Boolean,
24039 model: Schema.String,
24040 serviceTiers: Schema.optionalKey(
24041 Schema.Array(V2ModelListResponse__ModelServiceTier).annotate({ default: [] }),
24042 ),
24043 supportedReasoningEfforts: Schema.Array(V2ModelListResponse__ReasoningEffortOption),
24044 supportsPersonality: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
24045 upgrade: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24046 upgradeInfo: Schema.optionalKey(
24047 Schema.Union([V2ModelListResponse__ModelUpgradeInfo, Schema.Null]),
24048 ),
24049}).annotate({ identifier: "V2ModelListResponse__Model" });
24050
24051export type V2PluginInstalledResponse__PluginShareContext = {
24052 readonly creatorAccountUserId?: string | null;
24053 readonly creatorName?: string | null;
24054 readonly discoverability?: V2PluginInstalledResponse__PluginShareDiscoverability | null;
24055 readonly remotePluginId: string;
24056 readonly remoteVersion?: string | null;
24057 readonly sharePrincipals?: ReadonlyArray<V2PluginInstalledResponse__PluginSharePrincipal> | null;
24058 readonly shareUrl?: string | null;
24059};
24060export const V2PluginInstalledResponse__PluginShareContext = Schema.Struct({
24061 creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24062 creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24063 discoverability: Schema.optionalKey(
24064 Schema.Union([V2PluginInstalledResponse__PluginShareDiscoverability, Schema.Null]),
24065 ),
24066 remotePluginId: Schema.String,
24067 remoteVersion: Schema.optionalKey(
24068 Schema.Union([
24069 Schema.String.annotate({
24070 description: "Version of the remote shared plugin release when available.",
2185524071 }),
21856 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
21857 description: "Current status of the collab tool call.",
21858 }),
21859 tool: Schema.Literals([
21860 "spawnAgent",
21861 "sendInput",
21862 "resumeAgent",
21863 "wait",
21864 "closeAgent",
21865 "sendMessage",
21866 "followupTask",
21867 "interruptAgent",
21868 "listAgents",
21869 ]).annotate({ description: "Name of the collab tool that was invoked." }),
21870 type: Schema.Literal("collabAgentToolCall").annotate({
21871 title: "CollabAgentToolCallThreadItemType",
24072 Schema.Null,
24073 ]),
24074 ),
24075 sharePrincipals: Schema.optionalKey(
24076 Schema.Union([Schema.Array(V2PluginInstalledResponse__PluginSharePrincipal), Schema.Null]),
24077 ),
24078 shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24079}).annotate({ identifier: "V2PluginInstalledResponse__PluginShareContext" });
24080
24081export type V2PluginListResponse__PluginShareContext = {
24082 readonly creatorAccountUserId?: string | null;
24083 readonly creatorName?: string | null;
24084 readonly discoverability?: V2PluginListResponse__PluginShareDiscoverability | null;
24085 readonly remotePluginId: string;
24086 readonly remoteVersion?: string | null;
24087 readonly sharePrincipals?: ReadonlyArray<V2PluginListResponse__PluginSharePrincipal> | null;
24088 readonly shareUrl?: string | null;
24089};
24090export const V2PluginListResponse__PluginShareContext = Schema.Struct({
24091 creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24092 creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24093 discoverability: Schema.optionalKey(
24094 Schema.Union([V2PluginListResponse__PluginShareDiscoverability, Schema.Null]),
24095 ),
24096 remotePluginId: Schema.String,
24097 remoteVersion: Schema.optionalKey(
24098 Schema.Union([
24099 Schema.String.annotate({
24100 description: "Version of the remote shared plugin release when available.",
2187224101 }),
21873 }).annotate({ title: "CollabAgentToolCallThreadItem" }),
21874 Schema.Struct({
21875 agentPath: Schema.String,
21876 agentThreadId: Schema.String,
21877 id: Schema.String,
21878 kind: V2ItemCompletedNotification__SubAgentActivityKind,
21879 type: Schema.Literal("subAgentActivity").annotate({
21880 title: "SubAgentActivityThreadItemType",
24102 Schema.Null,
24103 ]),
24104 ),
24105 sharePrincipals: Schema.optionalKey(
24106 Schema.Union([Schema.Array(V2PluginListResponse__PluginSharePrincipal), Schema.Null]),
24107 ),
24108 shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24109}).annotate({ identifier: "V2PluginListResponse__PluginShareContext" });
24110
24111export type V2PluginReadResponse__SkillSummary = {
24112 readonly description: string;
24113 readonly enabled: boolean;
24114 readonly interface?: V2PluginReadResponse__SkillInterface | null;
24115 readonly name: string;
24116 readonly path?: V2PluginReadResponse__AbsolutePathBuf | null;
24117 readonly shortDescription?: string | null;
24118};
24119export const V2PluginReadResponse__SkillSummary = Schema.Struct({
24120 description: Schema.String,
24121 enabled: Schema.Boolean,
24122 interface: Schema.optionalKey(Schema.Union([V2PluginReadResponse__SkillInterface, Schema.Null])),
24123 name: Schema.String,
24124 path: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])),
24125 shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24126}).annotate({ identifier: "V2PluginReadResponse__SkillSummary" });
24127
24128export type V2PluginReadResponse__ScheduledTaskSummary = {
24129 readonly key: string;
24130 readonly name: string;
24131 readonly prompt: string;
24132 readonly schedule: V2PluginReadResponse__ScheduledTaskSchedule;
24133};
24134export const V2PluginReadResponse__ScheduledTaskSummary = Schema.Struct({
24135 key: Schema.String,
24136 name: Schema.String,
24137 prompt: Schema.String,
24138 schedule: V2PluginReadResponse__ScheduledTaskSchedule,
24139}).annotate({ identifier: "V2PluginReadResponse__ScheduledTaskSummary" });
24140
24141export type V2PluginReadResponse__PluginShareContext = {
24142 readonly creatorAccountUserId?: string | null;
24143 readonly creatorName?: string | null;
24144 readonly discoverability?: V2PluginReadResponse__PluginShareDiscoverability | null;
24145 readonly remotePluginId: string;
24146 readonly remoteVersion?: string | null;
24147 readonly sharePrincipals?: ReadonlyArray<V2PluginReadResponse__PluginSharePrincipal> | null;
24148 readonly shareUrl?: string | null;
24149};
24150export const V2PluginReadResponse__PluginShareContext = Schema.Struct({
24151 creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24152 creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24153 discoverability: Schema.optionalKey(
24154 Schema.Union([V2PluginReadResponse__PluginShareDiscoverability, Schema.Null]),
24155 ),
24156 remotePluginId: Schema.String,
24157 remoteVersion: Schema.optionalKey(
24158 Schema.Union([
24159 Schema.String.annotate({
24160 description: "Version of the remote shared plugin release when available.",
2188124161 }),
21882 }).annotate({ title: "SubAgentActivityThreadItem" }),
24162 Schema.Null,
24163 ]),
24164 ),
24165 sharePrincipals: Schema.optionalKey(
24166 Schema.Union([Schema.Array(V2PluginReadResponse__PluginSharePrincipal), Schema.Null]),
24167 ),
24168 shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24169}).annotate({ identifier: "V2PluginReadResponse__PluginShareContext" });
24170
24171export type V2PluginShareListResponse__PluginShareContext = {
24172 readonly creatorAccountUserId?: string | null;
24173 readonly creatorName?: string | null;
24174 readonly discoverability?: V2PluginShareListResponse__PluginShareDiscoverability | null;
24175 readonly remotePluginId: string;
24176 readonly remoteVersion?: string | null;
24177 readonly sharePrincipals?: ReadonlyArray<V2PluginShareListResponse__PluginSharePrincipal> | null;
24178 readonly shareUrl?: string | null;
24179};
24180export const V2PluginShareListResponse__PluginShareContext = Schema.Struct({
24181 creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24182 creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24183 discoverability: Schema.optionalKey(
24184 Schema.Union([V2PluginShareListResponse__PluginShareDiscoverability, Schema.Null]),
24185 ),
24186 remotePluginId: Schema.String,
24187 remoteVersion: Schema.optionalKey(
24188 Schema.Union([
24189 Schema.String.annotate({
24190 description: "Version of the remote shared plugin release when available.",
24191 }),
24192 Schema.Null,
24193 ]),
24194 ),
24195 sharePrincipals: Schema.optionalKey(
24196 Schema.Union([Schema.Array(V2PluginShareListResponse__PluginSharePrincipal), Schema.Null]),
24197 ),
24198 shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24199}).annotate({ identifier: "V2PluginShareListResponse__PluginShareContext" });
24200
24201export type V2RawResponseItemCompletedNotification__FunctionCallOutputBody =
24202 | string
24203 | ReadonlyArray<V2RawResponseItemCompletedNotification__FunctionCallOutputContentItem>;
24204export const V2RawResponseItemCompletedNotification__FunctionCallOutputBody = Schema.Union([
24205 Schema.String,
24206 Schema.Array(V2RawResponseItemCompletedNotification__FunctionCallOutputContentItem),
24207]).annotate({ identifier: "V2RawResponseItemCompletedNotification__FunctionCallOutputBody" });
24208
24209export type V2ReviewStartResponse__TurnError = {
24210 readonly additionalDetails?: string | null;
24211 readonly codexErrorInfo?: V2ReviewStartResponse__CodexErrorInfo | null;
24212 readonly message: string;
24213};
24214export const V2ReviewStartResponse__TurnError = Schema.Struct({
24215 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24216 codexErrorInfo: Schema.optionalKey(
24217 Schema.Union([V2ReviewStartResponse__CodexErrorInfo, Schema.Null]),
24218 ),
24219 message: Schema.String,
24220}).annotate({ identifier: "V2ReviewStartResponse__TurnError" });
24221
24222export type V2ReviewStartResponse__UserInput =
24223 | {
24224 readonly text: string;
24225 readonly text_elements?: ReadonlyArray<V2ReviewStartResponse__TextElement>;
24226 readonly type: "text";
24227 }
24228 | {
24229 readonly detail?: V2ReviewStartResponse__ImageDetail | null;
24230 readonly type: "image";
24231 readonly url: string;
24232 }
24233 | {
24234 readonly detail?: V2ReviewStartResponse__ImageDetail | null;
24235 readonly path: string;
24236 readonly type: "localImage";
24237 }
24238 | { readonly type: "audio"; readonly url: string }
24239 | { readonly path: string; readonly type: "localAudio" }
24240 | { readonly name: string; readonly path: string; readonly type: "skill" }
24241 | { readonly name: string; readonly path: string; readonly type: "mention" };
24242export const V2ReviewStartResponse__UserInput = Schema.Union(
24243 [
2188324244 Schema.Struct({
21884 action: Schema.optionalKey(
21885 Schema.Union([V2ItemCompletedNotification__WebSearchAction, Schema.Null]),
21886 ),
21887 id: Schema.String,
21888 query: Schema.String,
21889 results: Schema.optionalKey(
21890 Schema.Union([
21891 Schema.Array(Schema.Unknown).annotate({
21892 description:
21893 "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.",
21894 }),
21895 Schema.Null,
21896 ]),
24245 text: Schema.String,
24246 text_elements: Schema.optionalKey(
24247 Schema.Array(V2ReviewStartResponse__TextElement).annotate({
24248 description: "UI-defined spans within `text` used to render or persist special elements.",
24249 default: [],
24250 }),
2189724251 ),
21898 type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }),
21899 }).annotate({ title: "WebSearchThreadItem" }),
24252 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
24253 }).annotate({ title: "TextUserInput" }),
2190024254 Schema.Struct({
21901 id: Schema.String,
21902 path: V2ItemCompletedNotification__LegacyAppPathString,
21903 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
21904 }).annotate({ title: "ImageViewThreadItem" }),
24255 detail: Schema.optionalKey(Schema.Union([V2ReviewStartResponse__ImageDetail, Schema.Null])),
24256 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
24257 url: Schema.String,
24258 }).annotate({ title: "ImageUserInput" }),
2190524259 Schema.Struct({
21906 durationMs: Schema.Number.annotate({ format: "uint64" })
21907 .check(Schema.isInt())
21908 .check(Schema.isGreaterThanOrEqualTo(0)),
21909 id: Schema.String,
21910 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
21911 }).annotate({
21912 title: "SleepThreadItem",
21913 description: "Display item emitted by the interruptible `clock.sleep` tool.",
21914 }),
24260 detail: Schema.optionalKey(Schema.Union([V2ReviewStartResponse__ImageDetail, Schema.Null])),
24261 path: Schema.String,
24262 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
24263 }).annotate({ title: "LocalImageUserInput" }),
2191524264 Schema.Struct({
21916 id: Schema.String,
21917 result: Schema.String,
21918 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
21919 savedPath: Schema.optionalKey(
21920 Schema.Union([V2ItemCompletedNotification__AbsolutePathBuf, Schema.Null]),
21921 ),
21922 status: Schema.String,
21923 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
21924 }).annotate({ title: "ImageGenerationThreadItem" }),
24265 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
24266 url: Schema.String,
24267 }).annotate({ title: "AudioUserInput" }),
2192524268 Schema.Struct({
21926 id: Schema.String,
21927 review: Schema.String,
21928 type: Schema.Literal("enteredReviewMode").annotate({
21929 title: "EnteredReviewModeThreadItemType",
21930 }),
21931 }).annotate({ title: "EnteredReviewModeThreadItem" }),
24269 path: Schema.String,
24270 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
24271 }).annotate({ title: "LocalAudioUserInput" }),
2193224272 Schema.Struct({
21933 id: Schema.String,
21934 review: Schema.String,
21935 type: Schema.Literal("exitedReviewMode").annotate({
21936 title: "ExitedReviewModeThreadItemType",
21937 }),
21938 }).annotate({ title: "ExitedReviewModeThreadItem" }),
24273 name: Schema.String,
24274 path: Schema.String,
24275 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
24276 }).annotate({ title: "SkillUserInput" }),
2193924277 Schema.Struct({
21940 id: Schema.String,
21941 type: Schema.Literal("contextCompaction").annotate({
21942 title: "ContextCompactionThreadItemType",
24278 name: Schema.String,
24279 path: Schema.String,
24280 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
24281 }).annotate({ title: "MentionUserInput" }),
24282 ],
24283 { mode: "oneOf" },
24284).annotate({ identifier: "V2ReviewStartResponse__UserInput" });
24285
24286export type V2SkillsListResponse__SkillMetadata = {
24287 readonly dependencies?: V2SkillsListResponse__SkillDependencies | null;
24288 readonly description: string;
24289 readonly enabled: boolean;
24290 readonly interface?: V2SkillsListResponse__SkillInterface | null;
24291 readonly name: string;
24292 readonly path: V2SkillsListResponse__AbsolutePathBuf;
24293 readonly scope: V2SkillsListResponse__SkillScope;
24294 readonly shortDescription?: string | null;
24295};
24296export const V2SkillsListResponse__SkillMetadata = Schema.Struct({
24297 dependencies: Schema.optionalKey(
24298 Schema.Union([V2SkillsListResponse__SkillDependencies, Schema.Null]),
24299 ),
24300 description: Schema.String,
24301 enabled: Schema.Boolean,
24302 interface: Schema.optionalKey(Schema.Union([V2SkillsListResponse__SkillInterface, Schema.Null])),
24303 name: Schema.String,
24304 path: V2SkillsListResponse__AbsolutePathBuf,
24305 scope: V2SkillsListResponse__SkillScope,
24306 shortDescription: Schema.optionalKey(
24307 Schema.Union([
24308 Schema.String.annotate({
24309 description:
24310 "Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.",
2194324311 }),
21944 }).annotate({ title: "ContextCompactionThreadItem" }),
24312 Schema.Null,
24313 ]),
24314 ),
24315}).annotate({ identifier: "V2SkillsListResponse__SkillMetadata" });
24316
24317export type V2ThreadForkResponse__SessionSource =
24318 | "cli"
24319 | "vscode"
24320 | "exec"
24321 | "appServer"
24322 | "unknown"
24323 | { readonly custom: string }
24324 | { readonly subAgent: V2ThreadForkResponse__SubAgentSource };
24325export const V2ThreadForkResponse__SessionSource = Schema.Union(
24326 [
24327 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
24328 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
24329 Schema.Struct({ subAgent: V2ThreadForkResponse__SubAgentSource }).annotate({
24330 title: "SubAgentSessionSource",
24331 }),
2194524332 ],
2194624333 { mode: "oneOf" },
21947);
24334).annotate({ identifier: "V2ThreadForkResponse__SessionSource" });
2194824335
21949export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath =
24336export type V2ThreadForkResponse__TurnError = {
24337 readonly additionalDetails?: string | null;
24338 readonly codexErrorInfo?: V2ThreadForkResponse__CodexErrorInfo | null;
24339 readonly message: string;
24340};
24341export const V2ThreadForkResponse__TurnError = Schema.Struct({
24342 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24343 codexErrorInfo: Schema.optionalKey(
24344 Schema.Union([V2ThreadForkResponse__CodexErrorInfo, Schema.Null]),
24345 ),
24346 message: Schema.String,
24347}).annotate({ identifier: "V2ThreadForkResponse__TurnError" });
24348
24349export type V2ThreadForkResponse__UserInput =
2195024350 | {
21951 readonly path: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString;
21952 readonly type: "path";
24351 readonly text: string;
24352 readonly text_elements?: ReadonlyArray<V2ThreadForkResponse__TextElement>;
24353 readonly type: "text";
2195324354 }
21954 | { readonly pattern: string; readonly type: "glob_pattern" }
2195524355 | {
21956 readonly type: "special";
21957 readonly value: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath;
21958 };
21959export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath = Schema.Union(
24356 readonly detail?: V2ThreadForkResponse__ImageDetail | null;
24357 readonly type: "image";
24358 readonly url: string;
24359 }
24360 | {
24361 readonly detail?: V2ThreadForkResponse__ImageDetail | null;
24362 readonly path: string;
24363 readonly type: "localImage";
24364 }
24365 | { readonly type: "audio"; readonly url: string }
24366 | { readonly path: string; readonly type: "localAudio" }
24367 | { readonly name: string; readonly path: string; readonly type: "skill" }
24368 | { readonly name: string; readonly path: string; readonly type: "mention" };
24369export const V2ThreadForkResponse__UserInput = Schema.Union(
2196024370 [
2196124371 Schema.Struct({
21962 path: V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString,
21963 type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }),
21964 }).annotate({ title: "PathFileSystemPath" }),
24372 text: Schema.String,
24373 text_elements: Schema.optionalKey(
24374 Schema.Array(V2ThreadForkResponse__TextElement).annotate({
24375 description: "UI-defined spans within `text` used to render or persist special elements.",
24376 default: [],
24377 }),
24378 ),
24379 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
24380 }).annotate({ title: "TextUserInput" }),
2196524381 Schema.Struct({
21966 pattern: Schema.String,
21967 type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }),
21968 }).annotate({ title: "GlobPatternFileSystemPath" }),
24382 detail: Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ImageDetail, Schema.Null])),
24383 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
24384 url: Schema.String,
24385 }).annotate({ title: "ImageUserInput" }),
2196924386 Schema.Struct({
21970 type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }),
21971 value: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath,
21972 }).annotate({ title: "SpecialFileSystemPath" }),
24387 detail: Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ImageDetail, Schema.Null])),
24388 path: Schema.String,
24389 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
24390 }).annotate({ title: "LocalImageUserInput" }),
24391 Schema.Struct({
24392 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
24393 url: Schema.String,
24394 }).annotate({ title: "AudioUserInput" }),
24395 Schema.Struct({
24396 path: Schema.String,
24397 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
24398 }).annotate({ title: "LocalAudioUserInput" }),
24399 Schema.Struct({
24400 name: Schema.String,
24401 path: Schema.String,
24402 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
24403 }).annotate({ title: "SkillUserInput" }),
24404 Schema.Struct({
24405 name: Schema.String,
24406 path: Schema.String,
24407 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
24408 }).annotate({ title: "MentionUserInput" }),
2197324409 ],
2197424410 { mode: "oneOf" },
21975);
24411).annotate({ identifier: "V2ThreadForkResponse__UserInput" });
2197624412
21977export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath =
21978 | {
21979 readonly path: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString;
21980 readonly type: "path";
21981 }
21982 | { readonly pattern: string; readonly type: "glob_pattern" }
21983 | {
21984 readonly type: "special";
21985 readonly value: V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath;
21986 };
21987export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath = Schema.Union(
24413export type V2ThreadListResponse__SessionSource =
24414 | "cli"
24415 | "vscode"
24416 | "exec"
24417 | "appServer"
24418 | "unknown"
24419 | { readonly custom: string }
24420 | { readonly subAgent: V2ThreadListResponse__SubAgentSource };
24421export const V2ThreadListResponse__SessionSource = Schema.Union(
2198824422 [
21989 Schema.Struct({
21990 path: V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString,
21991 type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }),
21992 }).annotate({ title: "PathFileSystemPath" }),
21993 Schema.Struct({
21994 pattern: Schema.String,
21995 type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }),
21996 }).annotate({ title: "GlobPatternFileSystemPath" }),
21997 Schema.Struct({
21998 type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }),
21999 value: V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath,
22000 }).annotate({ title: "SpecialFileSystemPath" }),
24423 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
24424 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
24425 Schema.Struct({ subAgent: V2ThreadListResponse__SubAgentSource }).annotate({
24426 title: "SubAgentSessionSource",
24427 }),
2200124428 ],
2200224429 { mode: "oneOf" },
22003);
24430).annotate({ identifier: "V2ThreadListResponse__SessionSource" });
2200424431
22005export type V2ItemStartedNotification__ThreadItem =
22006 | {
22007 readonly clientId?: string | null;
22008 readonly content: ReadonlyArray<V2ItemStartedNotification__UserInput>;
22009 readonly id: string;
22010 readonly type: "userMessage";
22011 }
22012 | {
22013 readonly fragments: ReadonlyArray<V2ItemStartedNotification__HookPromptFragment>;
22014 readonly id: string;
22015 readonly type: "hookPrompt";
22016 }
24432export type V2ThreadListResponse__TurnError = {
24433 readonly additionalDetails?: string | null;
24434 readonly codexErrorInfo?: V2ThreadListResponse__CodexErrorInfo | null;
24435 readonly message: string;
24436};
24437export const V2ThreadListResponse__TurnError = Schema.Struct({
24438 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24439 codexErrorInfo: Schema.optionalKey(
24440 Schema.Union([V2ThreadListResponse__CodexErrorInfo, Schema.Null]),
24441 ),
24442 message: Schema.String,
24443}).annotate({ identifier: "V2ThreadListResponse__TurnError" });
24444
24445export type V2ThreadListResponse__UserInput =
2201724446 | {
22018 readonly id: string;
22019 readonly memoryCitation?: V2ItemStartedNotification__MemoryCitation | null;
22020 readonly phase?: V2ItemStartedNotification__MessagePhase | null;
2202124447 readonly text: string;
22022 readonly delivery?: "async" | null;
22023 readonly questions?: ReadonlyArray<{
22024 readonly title: string;
22025 readonly options?: ReadonlyArray<string> | null;
22026 }> | null;
22027 readonly type: "agentMessage";
22028 }
22029 | { readonly id: string; readonly text: string; readonly type: "plan" }
22030 | {
22031 readonly content?: ReadonlyArray<string>;
22032 readonly id: string;
22033 readonly summary?: ReadonlyArray<string>;
22034 readonly type: "reasoning";
22035 }
22036 | {
22037 readonly aggregatedOutput?: string | null;
22038 readonly command: string;
22039 readonly commandActions: ReadonlyArray<V2ItemStartedNotification__CommandAction>;
22040 readonly cwd: string;
22041 readonly durationMs?: number | null;
22042 readonly exitCode?: number | null;
22043 readonly id: string;
22044 readonly processId?: string | null;
22045 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
22046 readonly status: V2ItemStartedNotification__CommandExecutionStatus;
22047 readonly type: "commandExecution";
24448 readonly text_elements?: ReadonlyArray<V2ThreadListResponse__TextElement>;
24449 readonly type: "text";
2204824450 }
2204924451 | {
22050 readonly changes: ReadonlyArray<V2ItemStartedNotification__FileUpdateChange>;
22051 readonly id: string;
22052 readonly status: V2ItemStartedNotification__PatchApplyStatus;
22053 readonly type: "fileChange";
24452 readonly detail?: V2ThreadListResponse__ImageDetail | null;
24453 readonly type: "image";
24454 readonly url: string;
2205424455 }
2205524456 | {
22056 readonly appContext?: V2ItemStartedNotification__McpToolCallAppContext | null;
22057 readonly arguments: unknown;
22058 readonly durationMs?: number | null;
22059 readonly error?: V2ItemStartedNotification__McpToolCallError | null;
22060 readonly id: string;
22061 readonly mcpAppResourceUri?: string | null;
22062 readonly pluginId?: string | null;
22063 readonly result?: V2ItemStartedNotification__McpToolCallResult | null;
22064 readonly server: string;
22065 readonly status: V2ItemStartedNotification__McpToolCallStatus;
22066 readonly tool: string;
22067 readonly type: "mcpToolCall";
24457 readonly detail?: V2ThreadListResponse__ImageDetail | null;
24458 readonly path: string;
24459 readonly type: "localImage";
2206824460 }
24461 | { readonly type: "audio"; readonly url: string }
24462 | { readonly path: string; readonly type: "localAudio" }
24463 | { readonly name: string; readonly path: string; readonly type: "skill" }
24464 | { readonly name: string; readonly path: string; readonly type: "mention" };
24465export const V2ThreadListResponse__UserInput = Schema.Union(
24466 [
24467 Schema.Struct({
24468 text: Schema.String,
24469 text_elements: Schema.optionalKey(
24470 Schema.Array(V2ThreadListResponse__TextElement).annotate({
24471 description: "UI-defined spans within `text` used to render or persist special elements.",
24472 default: [],
24473 }),
24474 ),
24475 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
24476 }).annotate({ title: "TextUserInput" }),
24477 Schema.Struct({
24478 detail: Schema.optionalKey(Schema.Union([V2ThreadListResponse__ImageDetail, Schema.Null])),
24479 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
24480 url: Schema.String,
24481 }).annotate({ title: "ImageUserInput" }),
24482 Schema.Struct({
24483 detail: Schema.optionalKey(Schema.Union([V2ThreadListResponse__ImageDetail, Schema.Null])),
24484 path: Schema.String,
24485 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
24486 }).annotate({ title: "LocalImageUserInput" }),
24487 Schema.Struct({
24488 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
24489 url: Schema.String,
24490 }).annotate({ title: "AudioUserInput" }),
24491 Schema.Struct({
24492 path: Schema.String,
24493 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
24494 }).annotate({ title: "LocalAudioUserInput" }),
24495 Schema.Struct({
24496 name: Schema.String,
24497 path: Schema.String,
24498 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
24499 }).annotate({ title: "SkillUserInput" }),
24500 Schema.Struct({
24501 name: Schema.String,
24502 path: Schema.String,
24503 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
24504 }).annotate({ title: "MentionUserInput" }),
24505 ],
24506 { mode: "oneOf" },
24507).annotate({ identifier: "V2ThreadListResponse__UserInput" });
24508
24509export type V2ThreadMetadataUpdateResponse__SessionSource =
24510 | "cli"
24511 | "vscode"
24512 | "exec"
24513 | "appServer"
24514 | "unknown"
24515 | { readonly custom: string }
24516 | { readonly subAgent: V2ThreadMetadataUpdateResponse__SubAgentSource };
24517export const V2ThreadMetadataUpdateResponse__SessionSource = Schema.Union(
24518 [
24519 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
24520 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
24521 Schema.Struct({ subAgent: V2ThreadMetadataUpdateResponse__SubAgentSource }).annotate({
24522 title: "SubAgentSessionSource",
24523 }),
24524 ],
24525 { mode: "oneOf" },
24526).annotate({ identifier: "V2ThreadMetadataUpdateResponse__SessionSource" });
24527
24528export type V2ThreadMetadataUpdateResponse__TurnError = {
24529 readonly additionalDetails?: string | null;
24530 readonly codexErrorInfo?: V2ThreadMetadataUpdateResponse__CodexErrorInfo | null;
24531 readonly message: string;
24532};
24533export const V2ThreadMetadataUpdateResponse__TurnError = Schema.Struct({
24534 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24535 codexErrorInfo: Schema.optionalKey(
24536 Schema.Union([V2ThreadMetadataUpdateResponse__CodexErrorInfo, Schema.Null]),
24537 ),
24538 message: Schema.String,
24539}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__TurnError" });
24540
24541export type V2ThreadMetadataUpdateResponse__UserInput =
2206924542 | {
22070 readonly arguments: unknown;
22071 readonly contentItems?: ReadonlyArray<V2ItemStartedNotification__DynamicToolCallOutputContentItem> | null;
22072 readonly durationMs?: number | null;
22073 readonly id: string;
22074 readonly namespace?: string | null;
22075 readonly status: V2ItemStartedNotification__DynamicToolCallStatus;
22076 readonly success?: boolean | null;
22077 readonly tool: string;
22078 readonly type: "dynamicToolCall";
24543 readonly text: string;
24544 readonly text_elements?: ReadonlyArray<V2ThreadMetadataUpdateResponse__TextElement>;
24545 readonly type: "text";
2207924546 }
2208024547 | {
22081 readonly agentsStates: { readonly [x: string]: V2ItemStartedNotification__CollabAgentState };
22082 readonly id: string;
22083 readonly model?: string | null;
22084 readonly prompt?: string | null;
22085 readonly reasoningEffort?: V2ItemStartedNotification__ReasoningEffort | null;
22086 readonly receiverThreadIds: ReadonlyArray<string>;
22087 readonly senderThreadId: string;
22088 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
22089 readonly tool:
22090 | "spawnAgent"
22091 | "sendInput"
22092 | "resumeAgent"
22093 | "wait"
22094 | "closeAgent"
22095 | "sendMessage"
22096 | "followupTask"
22097 | "interruptAgent"
22098 | "listAgents";
22099 readonly type: "collabAgentToolCall";
24548 readonly detail?: V2ThreadMetadataUpdateResponse__ImageDetail | null;
24549 readonly type: "image";
24550 readonly url: string;
2210024551 }
2210124552 | {
22102 readonly agentPath: string;
22103 readonly agentThreadId: string;
22104 readonly id: string;
22105 readonly kind: V2ItemStartedNotification__SubAgentActivityKind;
22106 readonly type: "subAgentActivity";
24553 readonly detail?: V2ThreadMetadataUpdateResponse__ImageDetail | null;
24554 readonly path: string;
24555 readonly type: "localImage";
2210724556 }
24557 | { readonly type: "audio"; readonly url: string }
24558 | { readonly path: string; readonly type: "localAudio" }
24559 | { readonly name: string; readonly path: string; readonly type: "skill" }
24560 | { readonly name: string; readonly path: string; readonly type: "mention" };
24561export const V2ThreadMetadataUpdateResponse__UserInput = Schema.Union(
24562 [
24563 Schema.Struct({
24564 text: Schema.String,
24565 text_elements: Schema.optionalKey(
24566 Schema.Array(V2ThreadMetadataUpdateResponse__TextElement).annotate({
24567 description: "UI-defined spans within `text` used to render or persist special elements.",
24568 default: [],
24569 }),
24570 ),
24571 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
24572 }).annotate({ title: "TextUserInput" }),
24573 Schema.Struct({
24574 detail: Schema.optionalKey(
24575 Schema.Union([V2ThreadMetadataUpdateResponse__ImageDetail, Schema.Null]),
24576 ),
24577 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
24578 url: Schema.String,
24579 }).annotate({ title: "ImageUserInput" }),
24580 Schema.Struct({
24581 detail: Schema.optionalKey(
24582 Schema.Union([V2ThreadMetadataUpdateResponse__ImageDetail, Schema.Null]),
24583 ),
24584 path: Schema.String,
24585 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
24586 }).annotate({ title: "LocalImageUserInput" }),
24587 Schema.Struct({
24588 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
24589 url: Schema.String,
24590 }).annotate({ title: "AudioUserInput" }),
24591 Schema.Struct({
24592 path: Schema.String,
24593 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
24594 }).annotate({ title: "LocalAudioUserInput" }),
24595 Schema.Struct({
24596 name: Schema.String,
24597 path: Schema.String,
24598 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
24599 }).annotate({ title: "SkillUserInput" }),
24600 Schema.Struct({
24601 name: Schema.String,
24602 path: Schema.String,
24603 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
24604 }).annotate({ title: "MentionUserInput" }),
24605 ],
24606 { mode: "oneOf" },
24607).annotate({ identifier: "V2ThreadMetadataUpdateResponse__UserInput" });
24608
24609export type V2ThreadReadResponse__SessionSource =
24610 | "cli"
24611 | "vscode"
24612 | "exec"
24613 | "appServer"
24614 | "unknown"
24615 | { readonly custom: string }
24616 | { readonly subAgent: V2ThreadReadResponse__SubAgentSource };
24617export const V2ThreadReadResponse__SessionSource = Schema.Union(
24618 [
24619 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
24620 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
24621 Schema.Struct({ subAgent: V2ThreadReadResponse__SubAgentSource }).annotate({
24622 title: "SubAgentSessionSource",
24623 }),
24624 ],
24625 { mode: "oneOf" },
24626).annotate({ identifier: "V2ThreadReadResponse__SessionSource" });
24627
24628export type V2ThreadReadResponse__TurnError = {
24629 readonly additionalDetails?: string | null;
24630 readonly codexErrorInfo?: V2ThreadReadResponse__CodexErrorInfo | null;
24631 readonly message: string;
24632};
24633export const V2ThreadReadResponse__TurnError = Schema.Struct({
24634 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24635 codexErrorInfo: Schema.optionalKey(
24636 Schema.Union([V2ThreadReadResponse__CodexErrorInfo, Schema.Null]),
24637 ),
24638 message: Schema.String,
24639}).annotate({ identifier: "V2ThreadReadResponse__TurnError" });
24640
24641export type V2ThreadReadResponse__UserInput =
2210824642 | {
22109 readonly action?: V2ItemStartedNotification__WebSearchAction | null;
22110 readonly id: string;
22111 readonly query: string;
22112 readonly results?: ReadonlyArray<unknown> | null;
22113 readonly type: "webSearch";
24643 readonly text: string;
24644 readonly text_elements?: ReadonlyArray<V2ThreadReadResponse__TextElement>;
24645 readonly type: "text";
2211424646 }
2211524647 | {
22116 readonly id: string;
22117 readonly path: V2ItemStartedNotification__LegacyAppPathString;
22118 readonly type: "imageView";
24648 readonly detail?: V2ThreadReadResponse__ImageDetail | null;
24649 readonly type: "image";
24650 readonly url: string;
2211924651 }
22120 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
2212124652 | {
22122 readonly id: string;
22123 readonly result: string;
22124 readonly revisedPrompt?: string | null;
22125 readonly savedPath?: V2ItemStartedNotification__AbsolutePathBuf | null;
22126 readonly status: string;
22127 readonly type: "imageGeneration";
24653 readonly detail?: V2ThreadReadResponse__ImageDetail | null;
24654 readonly path: string;
24655 readonly type: "localImage";
2212824656 }
22129 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
22130 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
22131 | { readonly id: string; readonly type: "contextCompaction" };
22132export const V2ItemStartedNotification__ThreadItem = Schema.Union(
24657 | { readonly type: "audio"; readonly url: string }
24658 | { readonly path: string; readonly type: "localAudio" }
24659 | { readonly name: string; readonly path: string; readonly type: "skill" }
24660 | { readonly name: string; readonly path: string; readonly type: "mention" };
24661export const V2ThreadReadResponse__UserInput = Schema.Union(
2213324662 [
2213424663 Schema.Struct({
22135 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22136 content: Schema.Array(V2ItemStartedNotification__UserInput),
22137 id: Schema.String,
22138 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
22139 }).annotate({ title: "UserMessageThreadItem" }),
22140 Schema.Struct({
22141 fragments: Schema.Array(V2ItemStartedNotification__HookPromptFragment),
22142 id: Schema.String,
22143 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
22144 }).annotate({ title: "HookPromptThreadItem" }),
22145 Schema.Struct({
22146 id: Schema.String,
22147 memoryCitation: Schema.optionalKey(
22148 Schema.Union([V2ItemStartedNotification__MemoryCitation, Schema.Null]),
22149 ),
22150 phase: Schema.optionalKey(
22151 Schema.Union([V2ItemStartedNotification__MessagePhase, Schema.Null]),
22152 ),
2215324664 text: Schema.String,
22154 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
22155 questions: Schema.optionalKey(
22156 Schema.Union([
22157 Schema.Array(
22158 Schema.Struct({
22159 title: Schema.String,
22160 options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
22161 }),
22162 ),
22163 Schema.Null,
22164 ]),
24665 text_elements: Schema.optionalKey(
24666 Schema.Array(V2ThreadReadResponse__TextElement).annotate({
24667 description: "UI-defined spans within `text` used to render or persist special elements.",
24668 default: [],
24669 }),
2216524670 ),
22166 type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }),
22167 }).annotate({ title: "AgentMessageThreadItem" }),
24671 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
24672 }).annotate({ title: "TextUserInput" }),
2216824673 Schema.Struct({
22169 id: Schema.String,
22170 text: Schema.String,
22171 type: Schema.Literal("plan").annotate({ title: "PlanThreadItemType" }),
22172 }).annotate({
22173 title: "PlanThreadItem",
22174 description:
22175 "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
22176 }),
24674 detail: Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ImageDetail, Schema.Null])),
24675 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
24676 url: Schema.String,
24677 }).annotate({ title: "ImageUserInput" }),
2217724678 Schema.Struct({
22178 content: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
22179 id: Schema.String,
22180 summary: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
22181 type: Schema.Literal("reasoning").annotate({ title: "ReasoningThreadItemType" }),
22182 }).annotate({ title: "ReasoningThreadItem" }),
24679 detail: Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ImageDetail, Schema.Null])),
24680 path: Schema.String,
24681 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
24682 }).annotate({ title: "LocalImageUserInput" }),
2218324683 Schema.Struct({
22184 aggregatedOutput: Schema.optionalKey(
22185 Schema.Union([
22186 Schema.String.annotate({
22187 description: "The command's output, aggregated from stdout and stderr.",
22188 }),
22189 Schema.Null,
22190 ]),
22191 ),
22192 command: Schema.String.annotate({ description: "The command to be executed." }),
22193 commandActions: Schema.Array(V2ItemStartedNotification__CommandAction).annotate({
22194 description:
22195 "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.",
22196 }),
22197 cwd: Schema.String.annotate({ description: "The command's working directory." }),
22198 durationMs: Schema.optionalKey(
22199 Schema.Union([
22200 Schema.Number.annotate({
22201 description: "The duration of the command execution in milliseconds.",
22202 format: "int64",
22203 }).check(Schema.isInt()),
22204 Schema.Null,
22205 ]),
22206 ),
22207 exitCode: Schema.optionalKey(
22208 Schema.Union([
22209 Schema.Number.annotate({
22210 description: "The command's exit code.",
22211 format: "int32",
22212 }).check(Schema.isInt()),
22213 Schema.Null,
22214 ]),
22215 ),
22216 id: Schema.String,
22217 processId: Schema.optionalKey(
22218 Schema.Union([
22219 Schema.String.annotate({
22220 description: "Identifier for the underlying PTY process (when available).",
22221 }),
22222 Schema.Null,
22223 ]),
22224 ),
22225 source: Schema.optionalKey(
22226 Schema.Literals([
22227 "agent",
22228 "userShell",
22229 "unifiedExecStartup",
22230 "unifiedExecInteraction",
22231 ]).annotate({ default: "agent" }),
22232 ),
22233 status: V2ItemStartedNotification__CommandExecutionStatus,
22234 type: Schema.Literal("commandExecution").annotate({
22235 title: "CommandExecutionThreadItemType",
22236 }),
22237 }).annotate({ title: "CommandExecutionThreadItem" }),
24684 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
24685 url: Schema.String,
24686 }).annotate({ title: "AudioUserInput" }),
2223824687 Schema.Struct({
22239 changes: Schema.Array(V2ItemStartedNotification__FileUpdateChange),
22240 id: Schema.String,
22241 status: V2ItemStartedNotification__PatchApplyStatus,
22242 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
22243 }).annotate({ title: "FileChangeThreadItem" }),
24688 path: Schema.String,
24689 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
24690 }).annotate({ title: "LocalAudioUserInput" }),
2224424691 Schema.Struct({
22245 appContext: Schema.optionalKey(
22246 Schema.Union([V2ItemStartedNotification__McpToolCallAppContext, Schema.Null]),
22247 ),
22248 arguments: Schema.Unknown,
22249 durationMs: Schema.optionalKey(
22250 Schema.Union([
22251 Schema.Number.annotate({
22252 description: "The duration of the MCP tool call in milliseconds.",
22253 format: "int64",
22254 }).check(Schema.isInt()),
22255 Schema.Null,
22256 ]),
22257 ),
22258 error: Schema.optionalKey(
22259 Schema.Union([V2ItemStartedNotification__McpToolCallError, Schema.Null]),
22260 ),
22261 id: Schema.String,
22262 mcpAppResourceUri: Schema.optionalKey(
22263 Schema.Union([
22264 Schema.String.annotate({
22265 description: "Deprecated: use `appContext.resourceUri` instead.",
22266 }),
22267 Schema.Null,
22268 ]),
22269 ),
22270 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22271 result: Schema.optionalKey(
22272 Schema.Union([V2ItemStartedNotification__McpToolCallResult, Schema.Null]),
22273 ),
22274 server: Schema.String,
22275 status: V2ItemStartedNotification__McpToolCallStatus,
22276 tool: Schema.String,
22277 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
22278 }).annotate({ title: "McpToolCallThreadItem" }),
24692 name: Schema.String,
24693 path: Schema.String,
24694 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
24695 }).annotate({ title: "SkillUserInput" }),
2227924696 Schema.Struct({
22280 arguments: Schema.Unknown,
22281 contentItems: Schema.optionalKey(
22282 Schema.Union([
22283 Schema.Array(V2ItemStartedNotification__DynamicToolCallOutputContentItem),
22284 Schema.Null,
22285 ]),
22286 ),
22287 durationMs: Schema.optionalKey(
22288 Schema.Union([
22289 Schema.Number.annotate({
22290 description: "The duration of the dynamic tool call in milliseconds.",
22291 format: "int64",
22292 }).check(Schema.isInt()),
22293 Schema.Null,
22294 ]),
22295 ),
22296 id: Schema.String,
22297 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22298 status: V2ItemStartedNotification__DynamicToolCallStatus,
22299 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
22300 tool: Schema.String,
22301 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
22302 }).annotate({ title: "DynamicToolCallThreadItem" }),
24697 name: Schema.String,
24698 path: Schema.String,
24699 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
24700 }).annotate({ title: "MentionUserInput" }),
24701 ],
24702 { mode: "oneOf" },
24703).annotate({ identifier: "V2ThreadReadResponse__UserInput" });
24704
24705export type V2ThreadResumeParams__FunctionCallOutputBody =
24706 | string
24707 | ReadonlyArray<V2ThreadResumeParams__FunctionCallOutputContentItem>;
24708export const V2ThreadResumeParams__FunctionCallOutputBody = Schema.Union([
24709 Schema.String,
24710 Schema.Array(V2ThreadResumeParams__FunctionCallOutputContentItem),
24711]).annotate({ identifier: "V2ThreadResumeParams__FunctionCallOutputBody" });
24712
24713export type V2ThreadResumeResponse__SessionSource =
24714 | "cli"
24715 | "vscode"
24716 | "exec"
24717 | "appServer"
24718 | "unknown"
24719 | { readonly custom: string }
24720 | { readonly subAgent: V2ThreadResumeResponse__SubAgentSource };
24721export const V2ThreadResumeResponse__SessionSource = Schema.Union(
24722 [
24723 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
24724 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
24725 Schema.Struct({ subAgent: V2ThreadResumeResponse__SubAgentSource }).annotate({
24726 title: "SubAgentSessionSource",
24727 }),
24728 ],
24729 { mode: "oneOf" },
24730).annotate({ identifier: "V2ThreadResumeResponse__SessionSource" });
24731
24732export type V2ThreadResumeResponse__TurnError = {
24733 readonly additionalDetails?: string | null;
24734 readonly codexErrorInfo?: V2ThreadResumeResponse__CodexErrorInfo | null;
24735 readonly message: string;
24736};
24737export const V2ThreadResumeResponse__TurnError = Schema.Struct({
24738 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24739 codexErrorInfo: Schema.optionalKey(
24740 Schema.Union([V2ThreadResumeResponse__CodexErrorInfo, Schema.Null]),
24741 ),
24742 message: Schema.String,
24743}).annotate({ identifier: "V2ThreadResumeResponse__TurnError" });
24744
24745export type V2ThreadResumeResponse__UserInput =
24746 | {
24747 readonly text: string;
24748 readonly text_elements?: ReadonlyArray<V2ThreadResumeResponse__TextElement>;
24749 readonly type: "text";
24750 }
24751 | {
24752 readonly detail?: V2ThreadResumeResponse__ImageDetail | null;
24753 readonly type: "image";
24754 readonly url: string;
24755 }
24756 | {
24757 readonly detail?: V2ThreadResumeResponse__ImageDetail | null;
24758 readonly path: string;
24759 readonly type: "localImage";
24760 }
24761 | { readonly type: "audio"; readonly url: string }
24762 | { readonly path: string; readonly type: "localAudio" }
24763 | { readonly name: string; readonly path: string; readonly type: "skill" }
24764 | { readonly name: string; readonly path: string; readonly type: "mention" };
24765export const V2ThreadResumeResponse__UserInput = Schema.Union(
24766 [
2230324767 Schema.Struct({
22304 agentsStates: Schema.Record(
22305 Schema.String,
22306 V2ItemStartedNotification__CollabAgentState,
22307 ).annotate({ description: "Last known status of the target agents, when available." }),
22308 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
22309 model: Schema.optionalKey(
22310 Schema.Union([
22311 Schema.String.annotate({
22312 description: "Model requested for the spawned agent, when applicable.",
22313 }),
22314 Schema.Null,
22315 ]),
22316 ),
22317 prompt: Schema.optionalKey(
22318 Schema.Union([
22319 Schema.String.annotate({
22320 description: "Prompt text sent as part of the collab tool call, when available.",
22321 }),
22322 Schema.Null,
22323 ]),
22324 ),
22325 reasoningEffort: Schema.optionalKey(
22326 Schema.Union([V2ItemStartedNotification__ReasoningEffort, Schema.Null]).annotate({
22327 description: "Reasoning effort requested for the spawned agent, when applicable.",
24768 text: Schema.String,
24769 text_elements: Schema.optionalKey(
24770 Schema.Array(V2ThreadResumeResponse__TextElement).annotate({
24771 description: "UI-defined spans within `text` used to render or persist special elements.",
24772 default: [],
2232824773 }),
2232924774 ),
22330 receiverThreadIds: Schema.Array(Schema.String).annotate({
22331 description:
22332 "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
22333 }),
22334 senderThreadId: Schema.String.annotate({
22335 description: "Thread ID of the agent issuing the collab request.",
22336 }),
22337 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
22338 description: "Current status of the collab tool call.",
22339 }),
22340 tool: Schema.Literals([
22341 "spawnAgent",
22342 "sendInput",
22343 "resumeAgent",
22344 "wait",
22345 "closeAgent",
22346 "sendMessage",
22347 "followupTask",
22348 "interruptAgent",
22349 "listAgents",
22350 ]).annotate({ description: "Name of the collab tool that was invoked." }),
22351 type: Schema.Literal("collabAgentToolCall").annotate({
22352 title: "CollabAgentToolCallThreadItemType",
22353 }),
22354 }).annotate({ title: "CollabAgentToolCallThreadItem" }),
24775 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
24776 }).annotate({ title: "TextUserInput" }),
2235524777 Schema.Struct({
22356 agentPath: Schema.String,
22357 agentThreadId: Schema.String,
22358 id: Schema.String,
22359 kind: V2ItemStartedNotification__SubAgentActivityKind,
22360 type: Schema.Literal("subAgentActivity").annotate({
22361 title: "SubAgentActivityThreadItemType",
22362 }),
22363 }).annotate({ title: "SubAgentActivityThreadItem" }),
24778 detail: Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ImageDetail, Schema.Null])),
24779 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
24780 url: Schema.String,
24781 }).annotate({ title: "ImageUserInput" }),
2236424782 Schema.Struct({
22365 action: Schema.optionalKey(
22366 Schema.Union([V2ItemStartedNotification__WebSearchAction, Schema.Null]),
22367 ),
22368 id: Schema.String,
22369 query: Schema.String,
22370 results: Schema.optionalKey(
22371 Schema.Union([
22372 Schema.Array(Schema.Unknown).annotate({
22373 description:
22374 "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.",
22375 }),
22376 Schema.Null,
22377 ]),
22378 ),
22379 type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }),
22380 }).annotate({ title: "WebSearchThreadItem" }),
24783 detail: Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ImageDetail, Schema.Null])),
24784 path: Schema.String,
24785 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
24786 }).annotate({ title: "LocalImageUserInput" }),
2238124787 Schema.Struct({
22382 id: Schema.String,
22383 path: V2ItemStartedNotification__LegacyAppPathString,
22384 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
22385 }).annotate({ title: "ImageViewThreadItem" }),
24788 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
24789 url: Schema.String,
24790 }).annotate({ title: "AudioUserInput" }),
2238624791 Schema.Struct({
22387 durationMs: Schema.Number.annotate({ format: "uint64" })
22388 .check(Schema.isInt())
22389 .check(Schema.isGreaterThanOrEqualTo(0)),
22390 id: Schema.String,
22391 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
22392 }).annotate({
22393 title: "SleepThreadItem",
22394 description: "Display item emitted by the interruptible `clock.sleep` tool.",
24792 path: Schema.String,
24793 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
24794 }).annotate({ title: "LocalAudioUserInput" }),
24795 Schema.Struct({
24796 name: Schema.String,
24797 path: Schema.String,
24798 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
24799 }).annotate({ title: "SkillUserInput" }),
24800 Schema.Struct({
24801 name: Schema.String,
24802 path: Schema.String,
24803 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
24804 }).annotate({ title: "MentionUserInput" }),
24805 ],
24806 { mode: "oneOf" },
24807).annotate({ identifier: "V2ThreadResumeResponse__UserInput" });
24808
24809export type V2ThreadRollbackResponse__SessionSource =
24810 | "cli"
24811 | "vscode"
24812 | "exec"
24813 | "appServer"
24814 | "unknown"
24815 | { readonly custom: string }
24816 | { readonly subAgent: V2ThreadRollbackResponse__SubAgentSource };
24817export const V2ThreadRollbackResponse__SessionSource = Schema.Union(
24818 [
24819 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
24820 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
24821 Schema.Struct({ subAgent: V2ThreadRollbackResponse__SubAgentSource }).annotate({
24822 title: "SubAgentSessionSource",
2239524823 }),
24824 ],
24825 { mode: "oneOf" },
24826).annotate({ identifier: "V2ThreadRollbackResponse__SessionSource" });
24827
24828export type V2ThreadRollbackResponse__TurnError = {
24829 readonly additionalDetails?: string | null;
24830 readonly codexErrorInfo?: V2ThreadRollbackResponse__CodexErrorInfo | null;
24831 readonly message: string;
24832};
24833export const V2ThreadRollbackResponse__TurnError = Schema.Struct({
24834 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24835 codexErrorInfo: Schema.optionalKey(
24836 Schema.Union([V2ThreadRollbackResponse__CodexErrorInfo, Schema.Null]),
24837 ),
24838 message: Schema.String,
24839}).annotate({ identifier: "V2ThreadRollbackResponse__TurnError" });
24840
24841export type V2ThreadRollbackResponse__UserInput =
24842 | {
24843 readonly text: string;
24844 readonly text_elements?: ReadonlyArray<V2ThreadRollbackResponse__TextElement>;
24845 readonly type: "text";
24846 }
24847 | {
24848 readonly detail?: V2ThreadRollbackResponse__ImageDetail | null;
24849 readonly type: "image";
24850 readonly url: string;
24851 }
24852 | {
24853 readonly detail?: V2ThreadRollbackResponse__ImageDetail | null;
24854 readonly path: string;
24855 readonly type: "localImage";
24856 }
24857 | { readonly type: "audio"; readonly url: string }
24858 | { readonly path: string; readonly type: "localAudio" }
24859 | { readonly name: string; readonly path: string; readonly type: "skill" }
24860 | { readonly name: string; readonly path: string; readonly type: "mention" };
24861export const V2ThreadRollbackResponse__UserInput = Schema.Union(
24862 [
2239624863 Schema.Struct({
22397 id: Schema.String,
22398 result: Schema.String,
22399 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22400 savedPath: Schema.optionalKey(
22401 Schema.Union([V2ItemStartedNotification__AbsolutePathBuf, Schema.Null]),
24864 text: Schema.String,
24865 text_elements: Schema.optionalKey(
24866 Schema.Array(V2ThreadRollbackResponse__TextElement).annotate({
24867 description: "UI-defined spans within `text` used to render or persist special elements.",
24868 default: [],
24869 }),
2240224870 ),
22403 status: Schema.String,
22404 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
22405 }).annotate({ title: "ImageGenerationThreadItem" }),
24871 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
24872 }).annotate({ title: "TextUserInput" }),
2240624873 Schema.Struct({
22407 id: Schema.String,
22408 review: Schema.String,
22409 type: Schema.Literal("enteredReviewMode").annotate({
22410 title: "EnteredReviewModeThreadItemType",
22411 }),
22412 }).annotate({ title: "EnteredReviewModeThreadItem" }),
24874 detail: Schema.optionalKey(
24875 Schema.Union([V2ThreadRollbackResponse__ImageDetail, Schema.Null]),
24876 ),
24877 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
24878 url: Schema.String,
24879 }).annotate({ title: "ImageUserInput" }),
2241324880 Schema.Struct({
22414 id: Schema.String,
22415 review: Schema.String,
22416 type: Schema.Literal("exitedReviewMode").annotate({
22417 title: "ExitedReviewModeThreadItemType",
22418 }),
22419 }).annotate({ title: "ExitedReviewModeThreadItem" }),
24881 detail: Schema.optionalKey(
24882 Schema.Union([V2ThreadRollbackResponse__ImageDetail, Schema.Null]),
24883 ),
24884 path: Schema.String,
24885 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
24886 }).annotate({ title: "LocalImageUserInput" }),
2242024887 Schema.Struct({
22421 id: Schema.String,
22422 type: Schema.Literal("contextCompaction").annotate({
22423 title: "ContextCompactionThreadItemType",
22424 }),
22425 }).annotate({ title: "ContextCompactionThreadItem" }),
24888 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
24889 url: Schema.String,
24890 }).annotate({ title: "AudioUserInput" }),
24891 Schema.Struct({
24892 path: Schema.String,
24893 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
24894 }).annotate({ title: "LocalAudioUserInput" }),
24895 Schema.Struct({
24896 name: Schema.String,
24897 path: Schema.String,
24898 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
24899 }).annotate({ title: "SkillUserInput" }),
24900 Schema.Struct({
24901 name: Schema.String,
24902 path: Schema.String,
24903 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
24904 }).annotate({ title: "MentionUserInput" }),
2242624905 ],
2242724906 { mode: "oneOf" },
22428);
24907).annotate({ identifier: "V2ThreadRollbackResponse__UserInput" });
2242924908
22430export type V2ModelListResponse__Model = {
22431 readonly additionalSpeedTiers?: ReadonlyArray<string>;
22432 readonly availabilityNux?: V2ModelListResponse__ModelAvailabilityNux | null;
22433 readonly defaultReasoningEffort: V2ModelListResponse__ReasoningEffort;
22434 readonly defaultServiceTier?: string | null;
22435 readonly description: string;
22436 readonly displayName: string;
22437 readonly hidden: boolean;
22438 readonly id: string;
22439 readonly inputModalities?: ReadonlyArray<V2ModelListResponse__InputModality>;
22440 readonly isDefault: boolean;
22441 readonly model: string;
22442 readonly serviceTiers?: ReadonlyArray<V2ModelListResponse__ModelServiceTier>;
22443 readonly supportedReasoningEfforts: ReadonlyArray<V2ModelListResponse__ReasoningEffortOption>;
22444 readonly supportsPersonality?: boolean;
22445 readonly upgrade?: string | null;
22446 readonly upgradeInfo?: V2ModelListResponse__ModelUpgradeInfo | null;
24909export type V2ThreadSettingsUpdatedNotification__CollaborationMode = {
24910 readonly mode: V2ThreadSettingsUpdatedNotification__ModeKind;
24911 readonly settings: V2ThreadSettingsUpdatedNotification__Settings;
2244724912};
22448export const V2ModelListResponse__Model = Schema.Struct({
22449 additionalSpeedTiers: Schema.optionalKey(
22450 Schema.Array(Schema.String).annotate({
22451 description: "Deprecated: use `serviceTiers` instead.",
22452 default: [],
22453 }),
22454 ),
22455 availabilityNux: Schema.optionalKey(
22456 Schema.Union([V2ModelListResponse__ModelAvailabilityNux, Schema.Null]),
22457 ),
22458 defaultReasoningEffort: V2ModelListResponse__ReasoningEffort,
22459 defaultServiceTier: Schema.optionalKey(
22460 Schema.Union([
22461 Schema.String.annotate({
22462 description: "Catalog default service tier id for this model, when one is configured.",
22463 }),
22464 Schema.Null,
22465 ]),
22466 ),
22467 description: Schema.String,
22468 displayName: Schema.String,
22469 hidden: Schema.Boolean,
22470 id: Schema.String,
22471 inputModalities: Schema.optionalKey(
22472 Schema.Array(V2ModelListResponse__InputModality).annotate({ default: ["text", "image"] }),
22473 ),
22474 isDefault: Schema.Boolean,
22475 model: Schema.String,
22476 serviceTiers: Schema.optionalKey(
22477 Schema.Array(V2ModelListResponse__ModelServiceTier).annotate({ default: [] }),
22478 ),
22479 supportedReasoningEfforts: Schema.Array(V2ModelListResponse__ReasoningEffortOption),
22480 supportsPersonality: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
22481 upgrade: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22482 upgradeInfo: Schema.optionalKey(
22483 Schema.Union([V2ModelListResponse__ModelUpgradeInfo, Schema.Null]),
22484 ),
24913export const V2ThreadSettingsUpdatedNotification__CollaborationMode = Schema.Struct({
24914 mode: V2ThreadSettingsUpdatedNotification__ModeKind,
24915 settings: V2ThreadSettingsUpdatedNotification__Settings,
24916}).annotate({
24917 description: "Collaboration mode for a Codex session.",
24918 identifier: "V2ThreadSettingsUpdatedNotification__CollaborationMode",
2248524919});
2248624920
22487export type V2PluginInstalledResponse__PluginShareContext = {
22488 readonly creatorAccountUserId?: string | null;
22489 readonly creatorName?: string | null;
22490 readonly discoverability?: V2PluginInstalledResponse__PluginShareDiscoverability | null;
22491 readonly remotePluginId: string;
22492 readonly remoteVersion?: string | null;
22493 readonly sharePrincipals?: ReadonlyArray<V2PluginInstalledResponse__PluginSharePrincipal> | null;
22494 readonly shareUrl?: string | null;
24921export type V2ThreadStartedNotification__SessionSource =
24922 | "cli"
24923 | "vscode"
24924 | "exec"
24925 | "appServer"
24926 | "unknown"
24927 | { readonly custom: string }
24928 | { readonly subAgent: V2ThreadStartedNotification__SubAgentSource };
24929export const V2ThreadStartedNotification__SessionSource = Schema.Union(
24930 [
24931 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
24932 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
24933 Schema.Struct({ subAgent: V2ThreadStartedNotification__SubAgentSource }).annotate({
24934 title: "SubAgentSessionSource",
24935 }),
24936 ],
24937 { mode: "oneOf" },
24938).annotate({ identifier: "V2ThreadStartedNotification__SessionSource" });
24939
24940export type V2ThreadStartedNotification__TurnError = {
24941 readonly additionalDetails?: string | null;
24942 readonly codexErrorInfo?: V2ThreadStartedNotification__CodexErrorInfo | null;
24943 readonly message: string;
2249524944};
22496export const V2PluginInstalledResponse__PluginShareContext = Schema.Struct({
22497 creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22498 creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22499 discoverability: Schema.optionalKey(
22500 Schema.Union([V2PluginInstalledResponse__PluginShareDiscoverability, Schema.Null]),
22501 ),
22502 remotePluginId: Schema.String,
22503 remoteVersion: Schema.optionalKey(
22504 Schema.Union([
22505 Schema.String.annotate({
22506 description: "Version of the remote shared plugin release when available.",
22507 }),
22508 Schema.Null,
22509 ]),
22510 ),
22511 sharePrincipals: Schema.optionalKey(
22512 Schema.Union([Schema.Array(V2PluginInstalledResponse__PluginSharePrincipal), Schema.Null]),
22513 ),
22514 shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22515});
22516
22517export type V2PluginListResponse__PluginShareContext = {
22518 readonly creatorAccountUserId?: string | null;
22519 readonly creatorName?: string | null;
22520 readonly discoverability?: V2PluginListResponse__PluginShareDiscoverability | null;
22521 readonly remotePluginId: string;
22522 readonly remoteVersion?: string | null;
22523 readonly sharePrincipals?: ReadonlyArray<V2PluginListResponse__PluginSharePrincipal> | null;
22524 readonly shareUrl?: string | null;
22525};
22526export const V2PluginListResponse__PluginShareContext = Schema.Struct({
22527 creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22528 creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22529 discoverability: Schema.optionalKey(
22530 Schema.Union([V2PluginListResponse__PluginShareDiscoverability, Schema.Null]),
22531 ),
22532 remotePluginId: Schema.String,
22533 remoteVersion: Schema.optionalKey(
22534 Schema.Union([
22535 Schema.String.annotate({
22536 description: "Version of the remote shared plugin release when available.",
22537 }),
22538 Schema.Null,
22539 ]),
22540 ),
22541 sharePrincipals: Schema.optionalKey(
22542 Schema.Union([Schema.Array(V2PluginListResponse__PluginSharePrincipal), Schema.Null]),
22543 ),
22544 shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22545});
22546
22547export type V2PluginReadResponse__SkillSummary = {
22548 readonly description: string;
22549 readonly enabled: boolean;
22550 readonly interface?: V2PluginReadResponse__SkillInterface | null;
22551 readonly name: string;
22552 readonly path?: V2PluginReadResponse__AbsolutePathBuf | null;
22553 readonly shortDescription?: string | null;
22554};
22555export const V2PluginReadResponse__SkillSummary = Schema.Struct({
22556 description: Schema.String,
22557 enabled: Schema.Boolean,
22558 interface: Schema.optionalKey(Schema.Union([V2PluginReadResponse__SkillInterface, Schema.Null])),
22559 name: Schema.String,
22560 path: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])),
22561 shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22562});
22563
22564export type V2PluginReadResponse__PluginShareContext = {
22565 readonly creatorAccountUserId?: string | null;
22566 readonly creatorName?: string | null;
22567 readonly discoverability?: V2PluginReadResponse__PluginShareDiscoverability | null;
22568 readonly remotePluginId: string;
22569 readonly remoteVersion?: string | null;
22570 readonly sharePrincipals?: ReadonlyArray<V2PluginReadResponse__PluginSharePrincipal> | null;
22571 readonly shareUrl?: string | null;
22572};
22573export const V2PluginReadResponse__PluginShareContext = Schema.Struct({
22574 creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22575 creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22576 discoverability: Schema.optionalKey(
22577 Schema.Union([V2PluginReadResponse__PluginShareDiscoverability, Schema.Null]),
22578 ),
22579 remotePluginId: Schema.String,
22580 remoteVersion: Schema.optionalKey(
22581 Schema.Union([
22582 Schema.String.annotate({
22583 description: "Version of the remote shared plugin release when available.",
22584 }),
22585 Schema.Null,
22586 ]),
22587 ),
22588 sharePrincipals: Schema.optionalKey(
22589 Schema.Union([Schema.Array(V2PluginReadResponse__PluginSharePrincipal), Schema.Null]),
24945export const V2ThreadStartedNotification__TurnError = Schema.Struct({
24946 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24947 codexErrorInfo: Schema.optionalKey(
24948 Schema.Union([V2ThreadStartedNotification__CodexErrorInfo, Schema.Null]),
2259024949 ),
22591 shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22592});
22593
22594export type V2PluginReadResponse__ScheduledTaskSummary = {
22595 readonly key: string;
22596 readonly name: string;
22597 readonly prompt: string;
22598 readonly schedule: V2PluginReadResponse__ScheduledTaskSchedule;
22599};
22600export const V2PluginReadResponse__ScheduledTaskSummary = Schema.Struct({
22601 key: Schema.String,
22602 name: Schema.String,
22603 prompt: Schema.String,
22604 schedule: V2PluginReadResponse__ScheduledTaskSchedule,
22605});
24950 message: Schema.String,
24951}).annotate({ identifier: "V2ThreadStartedNotification__TurnError" });
2260624952
22607export type V2PluginShareListResponse__PluginShareContext = {
22608 readonly creatorAccountUserId?: string | null;
22609 readonly creatorName?: string | null;
22610 readonly discoverability?: V2PluginShareListResponse__PluginShareDiscoverability | null;
22611 readonly remotePluginId: string;
22612 readonly remoteVersion?: string | null;
22613 readonly sharePrincipals?: ReadonlyArray<V2PluginShareListResponse__PluginSharePrincipal> | null;
22614 readonly shareUrl?: string | null;
22615};
22616export const V2PluginShareListResponse__PluginShareContext = Schema.Struct({
22617 creatorAccountUserId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22618 creatorName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22619 discoverability: Schema.optionalKey(
22620 Schema.Union([V2PluginShareListResponse__PluginShareDiscoverability, Schema.Null]),
22621 ),
22622 remotePluginId: Schema.String,
22623 remoteVersion: Schema.optionalKey(
22624 Schema.Union([
22625 Schema.String.annotate({
22626 description: "Version of the remote shared plugin release when available.",
22627 }),
22628 Schema.Null,
22629 ]),
22630 ),
22631 sharePrincipals: Schema.optionalKey(
22632 Schema.Union([Schema.Array(V2PluginShareListResponse__PluginSharePrincipal), Schema.Null]),
22633 ),
22634 shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22635});
24953export type V2ThreadStartedNotification__UserInput =
24954 | {
24955 readonly text: string;
24956 readonly text_elements?: ReadonlyArray<V2ThreadStartedNotification__TextElement>;
24957 readonly type: "text";
24958 }
24959 | {
24960 readonly detail?: V2ThreadStartedNotification__ImageDetail | null;
24961 readonly type: "image";
24962 readonly url: string;
24963 }
24964 | {
24965 readonly detail?: V2ThreadStartedNotification__ImageDetail | null;
24966 readonly path: string;
24967 readonly type: "localImage";
24968 }
24969 | { readonly type: "audio"; readonly url: string }
24970 | { readonly path: string; readonly type: "localAudio" }
24971 | { readonly name: string; readonly path: string; readonly type: "skill" }
24972 | { readonly name: string; readonly path: string; readonly type: "mention" };
24973export const V2ThreadStartedNotification__UserInput = Schema.Union(
24974 [
24975 Schema.Struct({
24976 text: Schema.String,
24977 text_elements: Schema.optionalKey(
24978 Schema.Array(V2ThreadStartedNotification__TextElement).annotate({
24979 description: "UI-defined spans within `text` used to render or persist special elements.",
24980 default: [],
24981 }),
24982 ),
24983 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
24984 }).annotate({ title: "TextUserInput" }),
24985 Schema.Struct({
24986 detail: Schema.optionalKey(
24987 Schema.Union([V2ThreadStartedNotification__ImageDetail, Schema.Null]),
24988 ),
24989 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
24990 url: Schema.String,
24991 }).annotate({ title: "ImageUserInput" }),
24992 Schema.Struct({
24993 detail: Schema.optionalKey(
24994 Schema.Union([V2ThreadStartedNotification__ImageDetail, Schema.Null]),
24995 ),
24996 path: Schema.String,
24997 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
24998 }).annotate({ title: "LocalImageUserInput" }),
24999 Schema.Struct({
25000 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
25001 url: Schema.String,
25002 }).annotate({ title: "AudioUserInput" }),
25003 Schema.Struct({
25004 path: Schema.String,
25005 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
25006 }).annotate({ title: "LocalAudioUserInput" }),
25007 Schema.Struct({
25008 name: Schema.String,
25009 path: Schema.String,
25010 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
25011 }).annotate({ title: "SkillUserInput" }),
25012 Schema.Struct({
25013 name: Schema.String,
25014 path: Schema.String,
25015 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
25016 }).annotate({ title: "MentionUserInput" }),
25017 ],
25018 { mode: "oneOf" },
25019).annotate({ identifier: "V2ThreadStartedNotification__UserInput" });
2263625020
22637export type V2RawResponseItemCompletedNotification__FunctionCallOutputBody =
22638 | string
22639 | ReadonlyArray<V2RawResponseItemCompletedNotification__FunctionCallOutputContentItem>;
22640export const V2RawResponseItemCompletedNotification__FunctionCallOutputBody = Schema.Union([
22641 Schema.String,
22642 Schema.Array(V2RawResponseItemCompletedNotification__FunctionCallOutputContentItem),
22643]);
25021export type V2ThreadStartResponse__SessionSource =
25022 | "cli"
25023 | "vscode"
25024 | "exec"
25025 | "appServer"
25026 | "unknown"
25027 | { readonly custom: string }
25028 | { readonly subAgent: V2ThreadStartResponse__SubAgentSource };
25029export const V2ThreadStartResponse__SessionSource = Schema.Union(
25030 [
25031 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
25032 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
25033 Schema.Struct({ subAgent: V2ThreadStartResponse__SubAgentSource }).annotate({
25034 title: "SubAgentSessionSource",
25035 }),
25036 ],
25037 { mode: "oneOf" },
25038).annotate({ identifier: "V2ThreadStartResponse__SessionSource" });
2264425039
22645export type V2ReviewStartResponse__TurnError = {
25040export type V2ThreadStartResponse__TurnError = {
2264625041 readonly additionalDetails?: string | null;
22647 readonly codexErrorInfo?: V2ReviewStartResponse__CodexErrorInfo | null;
25042 readonly codexErrorInfo?: V2ThreadStartResponse__CodexErrorInfo | null;
2264825043 readonly message: string;
2264925044};
22650export const V2ReviewStartResponse__TurnError = Schema.Struct({
25045export const V2ThreadStartResponse__TurnError = Schema.Struct({
2265125046 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2265225047 codexErrorInfo: Schema.optionalKey(
22653 Schema.Union([V2ReviewStartResponse__CodexErrorInfo, Schema.Null]),
25048 Schema.Union([V2ThreadStartResponse__CodexErrorInfo, Schema.Null]),
2265425049 ),
2265525050 message: Schema.String,
22656});
25051}).annotate({ identifier: "V2ThreadStartResponse__TurnError" });
2265725052
22658export type V2ReviewStartResponse__ThreadItem =
22659 | {
22660 readonly clientId?: string | null;
22661 readonly content: ReadonlyArray<V2ReviewStartResponse__UserInput>;
22662 readonly id: string;
22663 readonly type: "userMessage";
22664 }
22665 | {
22666 readonly fragments: ReadonlyArray<V2ReviewStartResponse__HookPromptFragment>;
22667 readonly id: string;
22668 readonly type: "hookPrompt";
22669 }
25053export type V2ThreadStartResponse__UserInput =
2267025054 | {
22671 readonly id: string;
22672 readonly memoryCitation?: V2ReviewStartResponse__MemoryCitation | null;
22673 readonly phase?: V2ReviewStartResponse__MessagePhase | null;
2267425055 readonly text: string;
22675 readonly delivery?: "async" | null;
22676 readonly questions?: ReadonlyArray<{
22677 readonly title: string;
22678 readonly options?: ReadonlyArray<string> | null;
22679 }> | null;
22680 readonly type: "agentMessage";
22681 }
22682 | { readonly id: string; readonly text: string; readonly type: "plan" }
22683 | {
22684 readonly content?: ReadonlyArray<string>;
22685 readonly id: string;
22686 readonly summary?: ReadonlyArray<string>;
22687 readonly type: "reasoning";
22688 }
22689 | {
22690 readonly aggregatedOutput?: string | null;
22691 readonly command: string;
22692 readonly commandActions: ReadonlyArray<V2ReviewStartResponse__CommandAction>;
22693 readonly cwd: string;
22694 readonly durationMs?: number | null;
22695 readonly exitCode?: number | null;
22696 readonly id: string;
22697 readonly processId?: string | null;
22698 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
22699 readonly status: V2ReviewStartResponse__CommandExecutionStatus;
22700 readonly type: "commandExecution";
22701 }
22702 | {
22703 readonly changes: ReadonlyArray<V2ReviewStartResponse__FileUpdateChange>;
22704 readonly id: string;
22705 readonly status: V2ReviewStartResponse__PatchApplyStatus;
22706 readonly type: "fileChange";
22707 }
22708 | {
22709 readonly appContext?: V2ReviewStartResponse__McpToolCallAppContext | null;
22710 readonly arguments: unknown;
22711 readonly durationMs?: number | null;
22712 readonly error?: V2ReviewStartResponse__McpToolCallError | null;
22713 readonly id: string;
22714 readonly mcpAppResourceUri?: string | null;
22715 readonly pluginId?: string | null;
22716 readonly result?: V2ReviewStartResponse__McpToolCallResult | null;
22717 readonly server: string;
22718 readonly status: V2ReviewStartResponse__McpToolCallStatus;
22719 readonly tool: string;
22720 readonly type: "mcpToolCall";
22721 }
22722 | {
22723 readonly arguments: unknown;
22724 readonly contentItems?: ReadonlyArray<V2ReviewStartResponse__DynamicToolCallOutputContentItem> | null;
22725 readonly durationMs?: number | null;
22726 readonly id: string;
22727 readonly namespace?: string | null;
22728 readonly status: V2ReviewStartResponse__DynamicToolCallStatus;
22729 readonly success?: boolean | null;
22730 readonly tool: string;
22731 readonly type: "dynamicToolCall";
25056 readonly text_elements?: ReadonlyArray<V2ThreadStartResponse__TextElement>;
25057 readonly type: "text";
2273225058 }
2273325059 | {
22734 readonly agentsStates: { readonly [x: string]: V2ReviewStartResponse__CollabAgentState };
22735 readonly id: string;
22736 readonly model?: string | null;
22737 readonly prompt?: string | null;
22738 readonly reasoningEffort?: V2ReviewStartResponse__ReasoningEffort | null;
22739 readonly receiverThreadIds: ReadonlyArray<string>;
22740 readonly senderThreadId: string;
22741 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
22742 readonly tool:
22743 | "spawnAgent"
22744 | "sendInput"
22745 | "resumeAgent"
22746 | "wait"
22747 | "closeAgent"
22748 | "sendMessage"
22749 | "followupTask"
22750 | "interruptAgent"
22751 | "listAgents";
22752 readonly type: "collabAgentToolCall";
25060 readonly detail?: V2ThreadStartResponse__ImageDetail | null;
25061 readonly type: "image";
25062 readonly url: string;
2275325063 }
2275425064 | {
22755 readonly agentPath: string;
22756 readonly agentThreadId: string;
22757 readonly id: string;
22758 readonly kind: V2ReviewStartResponse__SubAgentActivityKind;
22759 readonly type: "subAgentActivity";
25065 readonly detail?: V2ThreadStartResponse__ImageDetail | null;
25066 readonly path: string;
25067 readonly type: "localImage";
2276025068 }
25069 | { readonly type: "audio"; readonly url: string }
25070 | { readonly path: string; readonly type: "localAudio" }
25071 | { readonly name: string; readonly path: string; readonly type: "skill" }
25072 | { readonly name: string; readonly path: string; readonly type: "mention" };
25073export const V2ThreadStartResponse__UserInput = Schema.Union(
25074 [
25075 Schema.Struct({
25076 text: Schema.String,
25077 text_elements: Schema.optionalKey(
25078 Schema.Array(V2ThreadStartResponse__TextElement).annotate({
25079 description: "UI-defined spans within `text` used to render or persist special elements.",
25080 default: [],
25081 }),
25082 ),
25083 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
25084 }).annotate({ title: "TextUserInput" }),
25085 Schema.Struct({
25086 detail: Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ImageDetail, Schema.Null])),
25087 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
25088 url: Schema.String,
25089 }).annotate({ title: "ImageUserInput" }),
25090 Schema.Struct({
25091 detail: Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ImageDetail, Schema.Null])),
25092 path: Schema.String,
25093 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
25094 }).annotate({ title: "LocalImageUserInput" }),
25095 Schema.Struct({
25096 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
25097 url: Schema.String,
25098 }).annotate({ title: "AudioUserInput" }),
25099 Schema.Struct({
25100 path: Schema.String,
25101 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
25102 }).annotate({ title: "LocalAudioUserInput" }),
25103 Schema.Struct({
25104 name: Schema.String,
25105 path: Schema.String,
25106 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
25107 }).annotate({ title: "SkillUserInput" }),
25108 Schema.Struct({
25109 name: Schema.String,
25110 path: Schema.String,
25111 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
25112 }).annotate({ title: "MentionUserInput" }),
25113 ],
25114 { mode: "oneOf" },
25115).annotate({ identifier: "V2ThreadStartResponse__UserInput" });
25116
25117export type V2ThreadUnarchiveResponse__SessionSource =
25118 | "cli"
25119 | "vscode"
25120 | "exec"
25121 | "appServer"
25122 | "unknown"
25123 | { readonly custom: string }
25124 | { readonly subAgent: V2ThreadUnarchiveResponse__SubAgentSource };
25125export const V2ThreadUnarchiveResponse__SessionSource = Schema.Union(
25126 [
25127 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
25128 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
25129 Schema.Struct({ subAgent: V2ThreadUnarchiveResponse__SubAgentSource }).annotate({
25130 title: "SubAgentSessionSource",
25131 }),
25132 ],
25133 { mode: "oneOf" },
25134).annotate({ identifier: "V2ThreadUnarchiveResponse__SessionSource" });
25135
25136export type V2ThreadUnarchiveResponse__TurnError = {
25137 readonly additionalDetails?: string | null;
25138 readonly codexErrorInfo?: V2ThreadUnarchiveResponse__CodexErrorInfo | null;
25139 readonly message: string;
25140};
25141export const V2ThreadUnarchiveResponse__TurnError = Schema.Struct({
25142 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25143 codexErrorInfo: Schema.optionalKey(
25144 Schema.Union([V2ThreadUnarchiveResponse__CodexErrorInfo, Schema.Null]),
25145 ),
25146 message: Schema.String,
25147}).annotate({ identifier: "V2ThreadUnarchiveResponse__TurnError" });
25148
25149export type V2ThreadUnarchiveResponse__UserInput =
2276125150 | {
22762 readonly action?: V2ReviewStartResponse__WebSearchAction | null;
22763 readonly id: string;
22764 readonly query: string;
22765 readonly results?: ReadonlyArray<unknown> | null;
22766 readonly type: "webSearch";
25151 readonly text: string;
25152 readonly text_elements?: ReadonlyArray<V2ThreadUnarchiveResponse__TextElement>;
25153 readonly type: "text";
2276725154 }
2276825155 | {
22769 readonly id: string;
22770 readonly path: V2ReviewStartResponse__LegacyAppPathString;
22771 readonly type: "imageView";
25156 readonly detail?: V2ThreadUnarchiveResponse__ImageDetail | null;
25157 readonly type: "image";
25158 readonly url: string;
2277225159 }
22773 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
2277425160 | {
22775 readonly id: string;
22776 readonly result: string;
22777 readonly revisedPrompt?: string | null;
22778 readonly savedPath?: V2ReviewStartResponse__AbsolutePathBuf | null;
22779 readonly status: string;
22780 readonly type: "imageGeneration";
25161 readonly detail?: V2ThreadUnarchiveResponse__ImageDetail | null;
25162 readonly path: string;
25163 readonly type: "localImage";
2278125164 }
22782 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
22783 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
22784 | { readonly id: string; readonly type: "contextCompaction" };
22785export const V2ReviewStartResponse__ThreadItem = Schema.Union(
25165 | { readonly type: "audio"; readonly url: string }
25166 | { readonly path: string; readonly type: "localAudio" }
25167 | { readonly name: string; readonly path: string; readonly type: "skill" }
25168 | { readonly name: string; readonly path: string; readonly type: "mention" };
25169export const V2ThreadUnarchiveResponse__UserInput = Schema.Union(
2278625170 [
2278725171 Schema.Struct({
22788 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22789 content: Schema.Array(V2ReviewStartResponse__UserInput),
22790 id: Schema.String,
22791 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
22792 }).annotate({ title: "UserMessageThreadItem" }),
22793 Schema.Struct({
22794 fragments: Schema.Array(V2ReviewStartResponse__HookPromptFragment),
22795 id: Schema.String,
22796 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
22797 }).annotate({ title: "HookPromptThreadItem" }),
25172 text: Schema.String,
25173 text_elements: Schema.optionalKey(
25174 Schema.Array(V2ThreadUnarchiveResponse__TextElement).annotate({
25175 description: "UI-defined spans within `text` used to render or persist special elements.",
25176 default: [],
25177 }),
25178 ),
25179 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
25180 }).annotate({ title: "TextUserInput" }),
2279825181 Schema.Struct({
22799 id: Schema.String,
22800 memoryCitation: Schema.optionalKey(
22801 Schema.Union([V2ReviewStartResponse__MemoryCitation, Schema.Null]),
25182 detail: Schema.optionalKey(
25183 Schema.Union([V2ThreadUnarchiveResponse__ImageDetail, Schema.Null]),
2280225184 ),
22803 phase: Schema.optionalKey(Schema.Union([V2ReviewStartResponse__MessagePhase, Schema.Null])),
22804 text: Schema.String,
22805 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
22806 questions: Schema.optionalKey(
22807 Schema.Union([
22808 Schema.Array(
22809 Schema.Struct({
22810 title: Schema.String,
22811 options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
22812 }),
22813 ),
22814 Schema.Null,
22815 ]),
25185 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
25186 url: Schema.String,
25187 }).annotate({ title: "ImageUserInput" }),
25188 Schema.Struct({
25189 detail: Schema.optionalKey(
25190 Schema.Union([V2ThreadUnarchiveResponse__ImageDetail, Schema.Null]),
2281625191 ),
22817 type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }),
22818 }).annotate({ title: "AgentMessageThreadItem" }),
25192 path: Schema.String,
25193 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
25194 }).annotate({ title: "LocalImageUserInput" }),
2281925195 Schema.Struct({
22820 id: Schema.String,
22821 text: Schema.String,
22822 type: Schema.Literal("plan").annotate({ title: "PlanThreadItemType" }),
22823 }).annotate({
22824 title: "PlanThreadItem",
22825 description:
22826 "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
22827 }),
25196 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
25197 url: Schema.String,
25198 }).annotate({ title: "AudioUserInput" }),
2282825199 Schema.Struct({
22829 content: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
22830 id: Schema.String,
22831 summary: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
22832 type: Schema.Literal("reasoning").annotate({ title: "ReasoningThreadItemType" }),
22833 }).annotate({ title: "ReasoningThreadItem" }),
25200 path: Schema.String,
25201 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
25202 }).annotate({ title: "LocalAudioUserInput" }),
2283425203 Schema.Struct({
22835 aggregatedOutput: Schema.optionalKey(
22836 Schema.Union([
22837 Schema.String.annotate({
22838 description: "The command's output, aggregated from stdout and stderr.",
22839 }),
22840 Schema.Null,
22841 ]),
22842 ),
22843 command: Schema.String.annotate({ description: "The command to be executed." }),
22844 commandActions: Schema.Array(V2ReviewStartResponse__CommandAction).annotate({
22845 description:
22846 "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.",
22847 }),
22848 cwd: Schema.String.annotate({ description: "The command's working directory." }),
22849 durationMs: Schema.optionalKey(
22850 Schema.Union([
22851 Schema.Number.annotate({
22852 description: "The duration of the command execution in milliseconds.",
22853 format: "int64",
22854 }).check(Schema.isInt()),
22855 Schema.Null,
22856 ]),
22857 ),
22858 exitCode: Schema.optionalKey(
22859 Schema.Union([
22860 Schema.Number.annotate({
22861 description: "The command's exit code.",
22862 format: "int32",
22863 }).check(Schema.isInt()),
22864 Schema.Null,
22865 ]),
22866 ),
22867 id: Schema.String,
22868 processId: Schema.optionalKey(
22869 Schema.Union([
22870 Schema.String.annotate({
22871 description: "Identifier for the underlying PTY process (when available).",
22872 }),
22873 Schema.Null,
22874 ]),
22875 ),
22876 source: Schema.optionalKey(
22877 Schema.Literals([
22878 "agent",
22879 "userShell",
22880 "unifiedExecStartup",
22881 "unifiedExecInteraction",
22882 ]).annotate({ default: "agent" }),
22883 ),
22884 status: V2ReviewStartResponse__CommandExecutionStatus,
22885 type: Schema.Literal("commandExecution").annotate({
22886 title: "CommandExecutionThreadItemType",
22887 }),
22888 }).annotate({ title: "CommandExecutionThreadItem" }),
22889 Schema.Struct({
22890 changes: Schema.Array(V2ReviewStartResponse__FileUpdateChange),
22891 id: Schema.String,
22892 status: V2ReviewStartResponse__PatchApplyStatus,
22893 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
22894 }).annotate({ title: "FileChangeThreadItem" }),
22895 Schema.Struct({
22896 appContext: Schema.optionalKey(
22897 Schema.Union([V2ReviewStartResponse__McpToolCallAppContext, Schema.Null]),
22898 ),
22899 arguments: Schema.Unknown,
22900 durationMs: Schema.optionalKey(
22901 Schema.Union([
22902 Schema.Number.annotate({
22903 description: "The duration of the MCP tool call in milliseconds.",
22904 format: "int64",
22905 }).check(Schema.isInt()),
22906 Schema.Null,
22907 ]),
22908 ),
22909 error: Schema.optionalKey(
22910 Schema.Union([V2ReviewStartResponse__McpToolCallError, Schema.Null]),
22911 ),
22912 id: Schema.String,
22913 mcpAppResourceUri: Schema.optionalKey(
22914 Schema.Union([
22915 Schema.String.annotate({
22916 description: "Deprecated: use `appContext.resourceUri` instead.",
22917 }),
22918 Schema.Null,
22919 ]),
22920 ),
22921 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22922 result: Schema.optionalKey(
22923 Schema.Union([V2ReviewStartResponse__McpToolCallResult, Schema.Null]),
22924 ),
22925 server: Schema.String,
22926 status: V2ReviewStartResponse__McpToolCallStatus,
22927 tool: Schema.String,
22928 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
22929 }).annotate({ title: "McpToolCallThreadItem" }),
25204 name: Schema.String,
25205 path: Schema.String,
25206 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
25207 }).annotate({ title: "SkillUserInput" }),
2293025208 Schema.Struct({
22931 arguments: Schema.Unknown,
22932 contentItems: Schema.optionalKey(
22933 Schema.Union([
22934 Schema.Array(V2ReviewStartResponse__DynamicToolCallOutputContentItem),
22935 Schema.Null,
22936 ]),
22937 ),
22938 durationMs: Schema.optionalKey(
22939 Schema.Union([
22940 Schema.Number.annotate({
22941 description: "The duration of the dynamic tool call in milliseconds.",
22942 format: "int64",
22943 }).check(Schema.isInt()),
22944 Schema.Null,
22945 ]),
22946 ),
22947 id: Schema.String,
22948 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
22949 status: V2ReviewStartResponse__DynamicToolCallStatus,
22950 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
22951 tool: Schema.String,
22952 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
22953 }).annotate({ title: "DynamicToolCallThreadItem" }),
25209 name: Schema.String,
25210 path: Schema.String,
25211 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
25212 }).annotate({ title: "MentionUserInput" }),
25213 ],
25214 { mode: "oneOf" },
25215).annotate({ identifier: "V2ThreadUnarchiveResponse__UserInput" });
25216
25217export type V2TurnCompletedNotification__TurnError = {
25218 readonly additionalDetails?: string | null;
25219 readonly codexErrorInfo?: V2TurnCompletedNotification__CodexErrorInfo | null;
25220 readonly message: string;
25221};
25222export const V2TurnCompletedNotification__TurnError = Schema.Struct({
25223 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25224 codexErrorInfo: Schema.optionalKey(
25225 Schema.Union([V2TurnCompletedNotification__CodexErrorInfo, Schema.Null]),
25226 ),
25227 message: Schema.String,
25228}).annotate({ identifier: "V2TurnCompletedNotification__TurnError" });
25229
25230export type V2TurnCompletedNotification__UserInput =
25231 | {
25232 readonly text: string;
25233 readonly text_elements?: ReadonlyArray<V2TurnCompletedNotification__TextElement>;
25234 readonly type: "text";
25235 }
25236 | {
25237 readonly detail?: V2TurnCompletedNotification__ImageDetail | null;
25238 readonly type: "image";
25239 readonly url: string;
25240 }
25241 | {
25242 readonly detail?: V2TurnCompletedNotification__ImageDetail | null;
25243 readonly path: string;
25244 readonly type: "localImage";
25245 }
25246 | { readonly type: "audio"; readonly url: string }
25247 | { readonly path: string; readonly type: "localAudio" }
25248 | { readonly name: string; readonly path: string; readonly type: "skill" }
25249 | { readonly name: string; readonly path: string; readonly type: "mention" };
25250export const V2TurnCompletedNotification__UserInput = Schema.Union(
25251 [
2295425252 Schema.Struct({
22955 agentsStates: Schema.Record(Schema.String, V2ReviewStartResponse__CollabAgentState).annotate({
22956 description: "Last known status of the target agents, when available.",
22957 }),
22958 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
22959 model: Schema.optionalKey(
22960 Schema.Union([
22961 Schema.String.annotate({
22962 description: "Model requested for the spawned agent, when applicable.",
22963 }),
22964 Schema.Null,
22965 ]),
22966 ),
22967 prompt: Schema.optionalKey(
22968 Schema.Union([
22969 Schema.String.annotate({
22970 description: "Prompt text sent as part of the collab tool call, when available.",
22971 }),
22972 Schema.Null,
22973 ]),
22974 ),
22975 reasoningEffort: Schema.optionalKey(
22976 Schema.Union([V2ReviewStartResponse__ReasoningEffort, Schema.Null]).annotate({
22977 description: "Reasoning effort requested for the spawned agent, when applicable.",
25253 text: Schema.String,
25254 text_elements: Schema.optionalKey(
25255 Schema.Array(V2TurnCompletedNotification__TextElement).annotate({
25256 description: "UI-defined spans within `text` used to render or persist special elements.",
25257 default: [],
2297825258 }),
2297925259 ),
22980 receiverThreadIds: Schema.Array(Schema.String).annotate({
22981 description:
22982 "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
22983 }),
22984 senderThreadId: Schema.String.annotate({
22985 description: "Thread ID of the agent issuing the collab request.",
22986 }),
22987 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
22988 description: "Current status of the collab tool call.",
22989 }),
22990 tool: Schema.Literals([
22991 "spawnAgent",
22992 "sendInput",
22993 "resumeAgent",
22994 "wait",
22995 "closeAgent",
22996 "sendMessage",
22997 "followupTask",
22998 "interruptAgent",
22999 "listAgents",
23000 ]).annotate({ description: "Name of the collab tool that was invoked." }),
23001 type: Schema.Literal("collabAgentToolCall").annotate({
23002 title: "CollabAgentToolCallThreadItemType",
23003 }),
23004 }).annotate({ title: "CollabAgentToolCallThreadItem" }),
23005 Schema.Struct({
23006 agentPath: Schema.String,
23007 agentThreadId: Schema.String,
23008 id: Schema.String,
23009 kind: V2ReviewStartResponse__SubAgentActivityKind,
23010 type: Schema.Literal("subAgentActivity").annotate({
23011 title: "SubAgentActivityThreadItemType",
23012 }),
23013 }).annotate({ title: "SubAgentActivityThreadItem" }),
25260 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
25261 }).annotate({ title: "TextUserInput" }),
2301425262 Schema.Struct({
23015 action: Schema.optionalKey(
23016 Schema.Union([V2ReviewStartResponse__WebSearchAction, Schema.Null]),
23017 ),
23018 id: Schema.String,
23019 query: Schema.String,
23020 results: Schema.optionalKey(
23021 Schema.Union([
23022 Schema.Array(Schema.Unknown).annotate({
23023 description:
23024 "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.",
23025 }),
23026 Schema.Null,
23027 ]),
25263 detail: Schema.optionalKey(
25264 Schema.Union([V2TurnCompletedNotification__ImageDetail, Schema.Null]),
2302825265 ),
23029 type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }),
23030 }).annotate({ title: "WebSearchThreadItem" }),
23031 Schema.Struct({
23032 id: Schema.String,
23033 path: V2ReviewStartResponse__LegacyAppPathString,
23034 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
23035 }).annotate({ title: "ImageViewThreadItem" }),
23036 Schema.Struct({
23037 durationMs: Schema.Number.annotate({ format: "uint64" })
23038 .check(Schema.isInt())
23039 .check(Schema.isGreaterThanOrEqualTo(0)),
23040 id: Schema.String,
23041 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
23042 }).annotate({
23043 title: "SleepThreadItem",
23044 description: "Display item emitted by the interruptible `clock.sleep` tool.",
23045 }),
25266 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
25267 url: Schema.String,
25268 }).annotate({ title: "ImageUserInput" }),
2304625269 Schema.Struct({
23047 id: Schema.String,
23048 result: Schema.String,
23049 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
23050 savedPath: Schema.optionalKey(
23051 Schema.Union([V2ReviewStartResponse__AbsolutePathBuf, Schema.Null]),
25270 detail: Schema.optionalKey(
25271 Schema.Union([V2TurnCompletedNotification__ImageDetail, Schema.Null]),
2305225272 ),
23053 status: Schema.String,
23054 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
23055 }).annotate({ title: "ImageGenerationThreadItem" }),
25273 path: Schema.String,
25274 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
25275 }).annotate({ title: "LocalImageUserInput" }),
2305625276 Schema.Struct({
23057 id: Schema.String,
23058 review: Schema.String,
23059 type: Schema.Literal("enteredReviewMode").annotate({
23060 title: "EnteredReviewModeThreadItemType",
23061 }),
23062 }).annotate({ title: "EnteredReviewModeThreadItem" }),
25277 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
25278 url: Schema.String,
25279 }).annotate({ title: "AudioUserInput" }),
2306325280 Schema.Struct({
23064 id: Schema.String,
23065 review: Schema.String,
23066 type: Schema.Literal("exitedReviewMode").annotate({
23067 title: "ExitedReviewModeThreadItemType",
23068 }),
23069 }).annotate({ title: "ExitedReviewModeThreadItem" }),
25281 path: Schema.String,
25282 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
25283 }).annotate({ title: "LocalAudioUserInput" }),
2307025284 Schema.Struct({
23071 id: Schema.String,
23072 type: Schema.Literal("contextCompaction").annotate({
23073 title: "ContextCompactionThreadItemType",
23074 }),
23075 }).annotate({ title: "ContextCompactionThreadItem" }),
25285 name: Schema.String,
25286 path: Schema.String,
25287 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
25288 }).annotate({ title: "SkillUserInput" }),
25289 Schema.Struct({
25290 name: Schema.String,
25291 path: Schema.String,
25292 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
25293 }).annotate({ title: "MentionUserInput" }),
2307625294 ],
2307725295 { mode: "oneOf" },
23078);
23079
23080export type V2SkillsListResponse__SkillMetadata = {
23081 readonly dependencies?: V2SkillsListResponse__SkillDependencies | null;
23082 readonly description: string;
23083 readonly enabled: boolean;
23084 readonly interface?: V2SkillsListResponse__SkillInterface | null;
23085 readonly name: string;
23086 readonly path: V2SkillsListResponse__AbsolutePathBuf;
23087 readonly scope: V2SkillsListResponse__SkillScope;
23088 readonly shortDescription?: string | null;
23089};
23090export const V2SkillsListResponse__SkillMetadata = Schema.Struct({
23091 dependencies: Schema.optionalKey(
23092 Schema.Union([V2SkillsListResponse__SkillDependencies, Schema.Null]),
23093 ),
23094 description: Schema.String,
23095 enabled: Schema.Boolean,
23096 interface: Schema.optionalKey(Schema.Union([V2SkillsListResponse__SkillInterface, Schema.Null])),
23097 name: Schema.String,
23098 path: V2SkillsListResponse__AbsolutePathBuf,
23099 scope: V2SkillsListResponse__SkillScope,
23100 shortDescription: Schema.optionalKey(
23101 Schema.Union([
23102 Schema.String.annotate({
23103 description:
23104 "Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.",
23105 }),
23106 Schema.Null,
23107 ]),
23108 ),
23109});
25296).annotate({ identifier: "V2TurnCompletedNotification__UserInput" });
2311025297
23111export type V2ThreadForkResponse__TurnError = {
25298export type V2TurnStartedNotification__TurnError = {
2311225299 readonly additionalDetails?: string | null;
23113 readonly codexErrorInfo?: V2ThreadForkResponse__CodexErrorInfo | null;
25300 readonly codexErrorInfo?: V2TurnStartedNotification__CodexErrorInfo | null;
2311425301 readonly message: string;
2311525302};
23116export const V2ThreadForkResponse__TurnError = Schema.Struct({
25303export const V2TurnStartedNotification__TurnError = Schema.Struct({
2311725304 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2311825305 codexErrorInfo: Schema.optionalKey(
23119 Schema.Union([V2ThreadForkResponse__CodexErrorInfo, Schema.Null]),
25306 Schema.Union([V2TurnStartedNotification__CodexErrorInfo, Schema.Null]),
2312025307 ),
2312125308 message: Schema.String,
23122});
25309}).annotate({ identifier: "V2TurnStartedNotification__TurnError" });
2312325310
23124export type V2ThreadForkResponse__ThreadItem =
23125 | {
23126 readonly clientId?: string | null;
23127 readonly content: ReadonlyArray<V2ThreadForkResponse__UserInput>;
23128 readonly id: string;
23129 readonly type: "userMessage";
23130 }
23131 | {
23132 readonly fragments: ReadonlyArray<V2ThreadForkResponse__HookPromptFragment>;
23133 readonly id: string;
23134 readonly type: "hookPrompt";
23135 }
25311export type V2TurnStartedNotification__UserInput =
2313625312 | {
23137 readonly id: string;
23138 readonly memoryCitation?: V2ThreadForkResponse__MemoryCitation | null;
23139 readonly phase?: V2ThreadForkResponse__MessagePhase | null;
2314025313 readonly text: string;
23141 readonly delivery?: "async" | null;
23142 readonly questions?: ReadonlyArray<{
23143 readonly title: string;
23144 readonly options?: ReadonlyArray<string> | null;
23145 }> | null;
23146 readonly type: "agentMessage";
23147 }
23148 | { readonly id: string; readonly text: string; readonly type: "plan" }
23149 | {
23150 readonly content?: ReadonlyArray<string>;
23151 readonly id: string;
23152 readonly summary?: ReadonlyArray<string>;
23153 readonly type: "reasoning";
23154 }
23155 | {
23156 readonly aggregatedOutput?: string | null;
23157 readonly command: string;
23158 readonly commandActions: ReadonlyArray<V2ThreadForkResponse__CommandAction>;
23159 readonly cwd: string;
23160 readonly durationMs?: number | null;
23161 readonly exitCode?: number | null;
23162 readonly id: string;
23163 readonly processId?: string | null;
23164 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
23165 readonly status: V2ThreadForkResponse__CommandExecutionStatus;
23166 readonly type: "commandExecution";
23167 }
23168 | {
23169 readonly changes: ReadonlyArray<V2ThreadForkResponse__FileUpdateChange>;
23170 readonly id: string;
23171 readonly status: V2ThreadForkResponse__PatchApplyStatus;
23172 readonly type: "fileChange";
23173 }
23174 | {
23175 readonly appContext?: V2ThreadForkResponse__McpToolCallAppContext | null;
23176 readonly arguments: unknown;
23177 readonly durationMs?: number | null;
23178 readonly error?: V2ThreadForkResponse__McpToolCallError | null;
23179 readonly id: string;
23180 readonly mcpAppResourceUri?: string | null;
23181 readonly pluginId?: string | null;
23182 readonly result?: V2ThreadForkResponse__McpToolCallResult | null;
23183 readonly server: string;
23184 readonly status: V2ThreadForkResponse__McpToolCallStatus;
23185 readonly tool: string;
23186 readonly type: "mcpToolCall";
23187 }
23188 | {
23189 readonly arguments: unknown;
23190 readonly contentItems?: ReadonlyArray<V2ThreadForkResponse__DynamicToolCallOutputContentItem> | null;
23191 readonly durationMs?: number | null;
23192 readonly id: string;
23193 readonly namespace?: string | null;
23194 readonly status: V2ThreadForkResponse__DynamicToolCallStatus;
23195 readonly success?: boolean | null;
23196 readonly tool: string;
23197 readonly type: "dynamicToolCall";
25314 readonly text_elements?: ReadonlyArray<V2TurnStartedNotification__TextElement>;
25315 readonly type: "text";
2319825316 }
2319925317 | {
23200 readonly agentsStates: { readonly [x: string]: V2ThreadForkResponse__CollabAgentState };
23201 readonly id: string;
23202 readonly model?: string | null;
23203 readonly prompt?: string | null;
23204 readonly reasoningEffort?: V2ThreadForkResponse__ReasoningEffort | null;
23205 readonly receiverThreadIds: ReadonlyArray<string>;
23206 readonly senderThreadId: string;
23207 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
23208 readonly tool:
23209 | "spawnAgent"
23210 | "sendInput"
23211 | "resumeAgent"
23212 | "wait"
23213 | "closeAgent"
23214 | "sendMessage"
23215 | "followupTask"
23216 | "interruptAgent"
23217 | "listAgents";
23218 readonly type: "collabAgentToolCall";
25318 readonly detail?: V2TurnStartedNotification__ImageDetail | null;
25319 readonly type: "image";
25320 readonly url: string;
2321925321 }
2322025322 | {
23221 readonly agentPath: string;
23222 readonly agentThreadId: string;
23223 readonly id: string;
23224 readonly kind: V2ThreadForkResponse__SubAgentActivityKind;
23225 readonly type: "subAgentActivity";
25323 readonly detail?: V2TurnStartedNotification__ImageDetail | null;
25324 readonly path: string;
25325 readonly type: "localImage";
2322625326 }
25327 | { readonly type: "audio"; readonly url: string }
25328 | { readonly path: string; readonly type: "localAudio" }
25329 | { readonly name: string; readonly path: string; readonly type: "skill" }
25330 | { readonly name: string; readonly path: string; readonly type: "mention" };
25331export const V2TurnStartedNotification__UserInput = Schema.Union(
25332 [
25333 Schema.Struct({
25334 text: Schema.String,
25335 text_elements: Schema.optionalKey(
25336 Schema.Array(V2TurnStartedNotification__TextElement).annotate({
25337 description: "UI-defined spans within `text` used to render or persist special elements.",
25338 default: [],
25339 }),
25340 ),
25341 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
25342 }).annotate({ title: "TextUserInput" }),
25343 Schema.Struct({
25344 detail: Schema.optionalKey(
25345 Schema.Union([V2TurnStartedNotification__ImageDetail, Schema.Null]),
25346 ),
25347 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
25348 url: Schema.String,
25349 }).annotate({ title: "ImageUserInput" }),
25350 Schema.Struct({
25351 detail: Schema.optionalKey(
25352 Schema.Union([V2TurnStartedNotification__ImageDetail, Schema.Null]),
25353 ),
25354 path: Schema.String,
25355 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
25356 }).annotate({ title: "LocalImageUserInput" }),
25357 Schema.Struct({
25358 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
25359 url: Schema.String,
25360 }).annotate({ title: "AudioUserInput" }),
25361 Schema.Struct({
25362 path: Schema.String,
25363 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
25364 }).annotate({ title: "LocalAudioUserInput" }),
25365 Schema.Struct({
25366 name: Schema.String,
25367 path: Schema.String,
25368 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
25369 }).annotate({ title: "SkillUserInput" }),
25370 Schema.Struct({
25371 name: Schema.String,
25372 path: Schema.String,
25373 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
25374 }).annotate({ title: "MentionUserInput" }),
25375 ],
25376 { mode: "oneOf" },
25377).annotate({ identifier: "V2TurnStartedNotification__UserInput" });
25378
25379export type V2TurnStartParams__UserInput =
2322725380 | {
23228 readonly action?: V2ThreadForkResponse__WebSearchAction | null;
23229 readonly id: string;
23230 readonly query: string;
23231 readonly results?: ReadonlyArray<unknown> | null;
23232 readonly type: "webSearch";
25381 readonly text: string;
25382 readonly text_elements?: ReadonlyArray<V2TurnStartParams__TextElement>;
25383 readonly type: "text";
2323325384 }
2323425385 | {
23235 readonly id: string;
23236 readonly path: V2ThreadForkResponse__LegacyAppPathString;
23237 readonly type: "imageView";
25386 readonly detail?: V2TurnStartParams__ImageDetail | null;
25387 readonly type: "image";
25388 readonly url: string;
2323825389 }
23239 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
2324025390 | {
23241 readonly id: string;
23242 readonly result: string;
23243 readonly revisedPrompt?: string | null;
23244 readonly savedPath?: V2ThreadForkResponse__AbsolutePathBuf | null;
23245 readonly status: string;
23246 readonly type: "imageGeneration";
25391 readonly detail?: V2TurnStartParams__ImageDetail | null;
25392 readonly path: string;
25393 readonly type: "localImage";
2324725394 }
23248 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
23249 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
23250 | { readonly id: string; readonly type: "contextCompaction" };
23251export const V2ThreadForkResponse__ThreadItem = Schema.Union(
25395 | { readonly type: "audio"; readonly url: string }
25396 | { readonly path: string; readonly type: "localAudio" }
25397 | { readonly name: string; readonly path: string; readonly type: "skill" }
25398 | { readonly name: string; readonly path: string; readonly type: "mention" };
25399export const V2TurnStartParams__UserInput = Schema.Union(
2325225400 [
2325325401 Schema.Struct({
23254 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
23255 content: Schema.Array(V2ThreadForkResponse__UserInput),
23256 id: Schema.String,
23257 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
23258 }).annotate({ title: "UserMessageThreadItem" }),
25402 text: Schema.String,
25403 text_elements: Schema.optionalKey(
25404 Schema.Array(V2TurnStartParams__TextElement).annotate({
25405 description: "UI-defined spans within `text` used to render or persist special elements.",
25406 default: [],
25407 }),
25408 ),
25409 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
25410 }).annotate({ title: "TextUserInput" }),
2325925411 Schema.Struct({
23260 fragments: Schema.Array(V2ThreadForkResponse__HookPromptFragment),
23261 id: Schema.String,
23262 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
23263 }).annotate({ title: "HookPromptThreadItem" }),
25412 detail: Schema.optionalKey(Schema.Union([V2TurnStartParams__ImageDetail, Schema.Null])),
25413 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
25414 url: Schema.String,
25415 }).annotate({ title: "ImageUserInput" }),
2326425416 Schema.Struct({
23265 id: Schema.String,
23266 memoryCitation: Schema.optionalKey(
23267 Schema.Union([V2ThreadForkResponse__MemoryCitation, Schema.Null]),
23268 ),
23269 phase: Schema.optionalKey(Schema.Union([V2ThreadForkResponse__MessagePhase, Schema.Null])),
23270 text: Schema.String,
25417 detail: Schema.optionalKey(Schema.Union([V2TurnStartParams__ImageDetail, Schema.Null])),
25418 path: Schema.String,
25419 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
25420 }).annotate({ title: "LocalImageUserInput" }),
25421 Schema.Struct({
25422 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
25423 url: Schema.String,
25424 }).annotate({ title: "AudioUserInput" }),
25425 Schema.Struct({
25426 path: Schema.String,
25427 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
25428 }).annotate({ title: "LocalAudioUserInput" }),
25429 Schema.Struct({
25430 name: Schema.String,
25431 path: Schema.String,
25432 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
25433 }).annotate({ title: "SkillUserInput" }),
25434 Schema.Struct({
25435 name: Schema.String,
25436 path: Schema.String,
25437 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
25438 }).annotate({ title: "MentionUserInput" }),
25439 ],
25440 { mode: "oneOf" },
25441).annotate({ identifier: "V2TurnStartParams__UserInput" });
25442
25443export type V2TurnStartResponse__TurnError = {
25444 readonly additionalDetails?: string | null;
25445 readonly codexErrorInfo?: V2TurnStartResponse__CodexErrorInfo | null;
25446 readonly message: string;
25447};
25448export const V2TurnStartResponse__TurnError = Schema.Struct({
25449 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25450 codexErrorInfo: Schema.optionalKey(
25451 Schema.Union([V2TurnStartResponse__CodexErrorInfo, Schema.Null]),
25452 ),
25453 message: Schema.String,
25454}).annotate({ identifier: "V2TurnStartResponse__TurnError" });
25455
25456export type V2TurnStartResponse__UserInput =
25457 | {
25458 readonly text: string;
25459 readonly text_elements?: ReadonlyArray<V2TurnStartResponse__TextElement>;
25460 readonly type: "text";
25461 }
25462 | {
25463 readonly detail?: V2TurnStartResponse__ImageDetail | null;
25464 readonly type: "image";
25465 readonly url: string;
25466 }
25467 | {
25468 readonly detail?: V2TurnStartResponse__ImageDetail | null;
25469 readonly path: string;
25470 readonly type: "localImage";
25471 }
25472 | { readonly type: "audio"; readonly url: string }
25473 | { readonly path: string; readonly type: "localAudio" }
25474 | { readonly name: string; readonly path: string; readonly type: "skill" }
25475 | { readonly name: string; readonly path: string; readonly type: "mention" };
25476export const V2TurnStartResponse__UserInput = Schema.Union(
25477 [
25478 Schema.Struct({
25479 text: Schema.String,
25480 text_elements: Schema.optionalKey(
25481 Schema.Array(V2TurnStartResponse__TextElement).annotate({
25482 description: "UI-defined spans within `text` used to render or persist special elements.",
25483 default: [],
25484 }),
25485 ),
25486 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
25487 }).annotate({ title: "TextUserInput" }),
25488 Schema.Struct({
25489 detail: Schema.optionalKey(Schema.Union([V2TurnStartResponse__ImageDetail, Schema.Null])),
25490 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
25491 url: Schema.String,
25492 }).annotate({ title: "ImageUserInput" }),
25493 Schema.Struct({
25494 detail: Schema.optionalKey(Schema.Union([V2TurnStartResponse__ImageDetail, Schema.Null])),
25495 path: Schema.String,
25496 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
25497 }).annotate({ title: "LocalImageUserInput" }),
25498 Schema.Struct({
25499 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
25500 url: Schema.String,
25501 }).annotate({ title: "AudioUserInput" }),
25502 Schema.Struct({
25503 path: Schema.String,
25504 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
25505 }).annotate({ title: "LocalAudioUserInput" }),
25506 Schema.Struct({
25507 name: Schema.String,
25508 path: Schema.String,
25509 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
25510 }).annotate({ title: "SkillUserInput" }),
25511 Schema.Struct({
25512 name: Schema.String,
25513 path: Schema.String,
25514 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
25515 }).annotate({ title: "MentionUserInput" }),
25516 ],
25517 { mode: "oneOf" },
25518).annotate({ identifier: "V2TurnStartResponse__UserInput" });
25519
25520export type V2TurnSteerParams__UserInput =
25521 | {
25522 readonly text: string;
25523 readonly text_elements?: ReadonlyArray<V2TurnSteerParams__TextElement>;
25524 readonly type: "text";
25525 }
25526 | {
25527 readonly detail?: V2TurnSteerParams__ImageDetail | null;
25528 readonly type: "image";
25529 readonly url: string;
25530 }
25531 | {
25532 readonly detail?: V2TurnSteerParams__ImageDetail | null;
25533 readonly path: string;
25534 readonly type: "localImage";
25535 }
25536 | { readonly type: "audio"; readonly url: string }
25537 | { readonly path: string; readonly type: "localAudio" }
25538 | { readonly name: string; readonly path: string; readonly type: "skill" }
25539 | { readonly name: string; readonly path: string; readonly type: "mention" };
25540export const V2TurnSteerParams__UserInput = Schema.Union(
25541 [
25542 Schema.Struct({
25543 text: Schema.String,
25544 text_elements: Schema.optionalKey(
25545 Schema.Array(V2TurnSteerParams__TextElement).annotate({
25546 description: "UI-defined spans within `text` used to render or persist special elements.",
25547 default: [],
25548 }),
25549 ),
25550 type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
25551 }).annotate({ title: "TextUserInput" }),
25552 Schema.Struct({
25553 detail: Schema.optionalKey(Schema.Union([V2TurnSteerParams__ImageDetail, Schema.Null])),
25554 type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
25555 url: Schema.String,
25556 }).annotate({ title: "ImageUserInput" }),
25557 Schema.Struct({
25558 detail: Schema.optionalKey(Schema.Union([V2TurnSteerParams__ImageDetail, Schema.Null])),
25559 path: Schema.String,
25560 type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
25561 }).annotate({ title: "LocalImageUserInput" }),
25562 Schema.Struct({
25563 type: Schema.Literal("audio").annotate({ title: "AudioUserInputType" }),
25564 url: Schema.String,
25565 }).annotate({ title: "AudioUserInput" }),
25566 Schema.Struct({
25567 path: Schema.String,
25568 type: Schema.Literal("localAudio").annotate({ title: "LocalAudioUserInputType" }),
25569 }).annotate({ title: "LocalAudioUserInput" }),
25570 Schema.Struct({
25571 name: Schema.String,
25572 path: Schema.String,
25573 type: Schema.Literal("skill").annotate({ title: "SkillUserInputType" }),
25574 }).annotate({ title: "SkillUserInput" }),
25575 Schema.Struct({
25576 name: Schema.String,
25577 path: Schema.String,
25578 type: Schema.Literal("mention").annotate({ title: "MentionUserInputType" }),
25579 }).annotate({ title: "MentionUserInput" }),
25580 ],
25581 { mode: "oneOf" },
25582).annotate({ identifier: "V2TurnSteerParams__UserInput" });
25583
25584export type ClientRequest__TurnStartParams = {
25585 readonly approvalPolicy?: ClientRequest__AskForApproval | null;
25586 readonly approvalsReviewer?: ClientRequest__ApprovalsReviewer | null;
25587 readonly clientUserMessageId?: string | null;
25588 readonly cwd?: string | null;
25589 readonly effort?: ClientRequest__ReasoningEffort | null;
25590 readonly input: ReadonlyArray<ClientRequest__UserInput>;
25591 readonly model?: string | null;
25592 readonly outputSchema?: Schema.Json;
25593 readonly personality?: ClientRequest__Personality | null;
25594 readonly sandboxPolicy?: ClientRequest__SandboxPolicy | null;
25595 readonly serviceTier?: string | null;
25596 readonly summary?: ClientRequest__ReasoningSummary | null;
25597 readonly threadId: string;
25598};
25599export const ClientRequest__TurnStartParams = Schema.Struct({
25600 approvalPolicy: Schema.optionalKey(
25601 Schema.Union([ClientRequest__AskForApproval, Schema.Null]).annotate({
25602 description: "Override the approval policy for this turn and subsequent turns.",
25603 }),
25604 ),
25605 approvalsReviewer: Schema.optionalKey(
25606 Schema.Union([ClientRequest__ApprovalsReviewer, Schema.Null]).annotate({
25607 description:
25608 "Override where approval requests are routed for review on this turn and subsequent turns.",
25609 }),
25610 ),
25611 clientUserMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25612 cwd: Schema.optionalKey(
25613 Schema.Union([
25614 Schema.String.annotate({
25615 description: "Override the working directory for this turn and subsequent turns.",
25616 }),
25617 Schema.Null,
25618 ]),
25619 ),
25620 effort: Schema.optionalKey(
25621 Schema.Union([ClientRequest__ReasoningEffort, Schema.Null]).annotate({
25622 description: "Override the reasoning effort for this turn and subsequent turns.",
25623 }),
25624 ),
25625 input: Schema.Array(ClientRequest__UserInput),
25626 model: Schema.optionalKey(
25627 Schema.Union([
25628 Schema.String.annotate({
25629 description: "Override the model for this turn and subsequent turns.",
25630 }),
25631 Schema.Null,
25632 ]),
25633 ),
25634 outputSchema: Schema.optionalKey(
25635 Schema.Json.annotate({
25636 expected: "JSON value",
25637 description:
25638 "Optional JSON Schema used to constrain the final assistant message for this turn.",
25639 }),
25640 ),
25641 personality: Schema.optionalKey(
25642 Schema.Union([ClientRequest__Personality, Schema.Null]).annotate({
25643 description: "Override the personality for this turn and subsequent turns.",
25644 }),
25645 ),
25646 sandboxPolicy: Schema.optionalKey(
25647 Schema.Union([ClientRequest__SandboxPolicy, Schema.Null]).annotate({
25648 description: "Override the sandbox policy for this turn and subsequent turns.",
25649 }),
25650 ),
25651 serviceTier: Schema.optionalKey(
25652 Schema.Union([
25653 Schema.String.annotate({
25654 description: "Override the service tier for this turn and subsequent turns.",
25655 }),
25656 Schema.Null,
25657 ]),
25658 ),
25659 summary: Schema.optionalKey(
25660 Schema.Union([ClientRequest__ReasoningSummary, Schema.Null]).annotate({
25661 description: "Override the reasoning summary for this turn and subsequent turns.",
25662 }),
25663 ),
25664 threadId: Schema.String,
25665}).annotate({ identifier: "ClientRequest__TurnStartParams" });
25666
25667export type ClientRequest__TurnSteerParams = {
25668 readonly clientUserMessageId?: string | null;
25669 readonly expectedTurnId: string;
25670 readonly input: ReadonlyArray<ClientRequest__UserInput>;
25671 readonly threadId: string;
25672};
25673export const ClientRequest__TurnSteerParams = Schema.Struct({
25674 clientUserMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25675 expectedTurnId: Schema.String.annotate({
25676 description:
25677 "Required active turn id precondition. The request fails when it does not match the currently active turn.",
25678 }),
25679 input: Schema.Array(ClientRequest__UserInput),
25680 threadId: Schema.String,
25681}).annotate({ identifier: "ClientRequest__TurnSteerParams" });
25682
25683export type ClientRequest__ExternalAgentConfigImportParams = {
25684 readonly migrationItems: ReadonlyArray<ClientRequest__ExternalAgentConfigMigrationItem>;
25685 readonly migrationSource?: string | null;
25686 readonly source?: string | null;
25687};
25688export const ClientRequest__ExternalAgentConfigImportParams = Schema.Struct({
25689 migrationItems: Schema.Array(ClientRequest__ExternalAgentConfigMigrationItem),
25690 migrationSource: Schema.optionalKey(
25691 Schema.Union([
25692 Schema.String.annotate({
25693 description:
25694 "Migration-source selector used to produce the migration items. Pass the same value to detection and import; missing or unrecognized values use the default source.",
25695 }),
25696 Schema.Null,
25697 ]),
25698 ),
25699 source: Schema.optionalKey(
25700 Schema.Union([
25701 Schema.String.annotate({
25702 description: "Optional identifier for the product that initiated the import.",
25703 }),
25704 Schema.Null,
25705 ]),
25706 ),
25707}).annotate({ identifier: "ClientRequest__ExternalAgentConfigImportParams" });
25708
25709export type CommandExecutionRequestApprovalParams__FileSystemSandboxEntry = {
25710 readonly access: CommandExecutionRequestApprovalParams__FileSystemAccessMode;
25711 readonly path: CommandExecutionRequestApprovalParams__FileSystemPath;
25712};
25713export const CommandExecutionRequestApprovalParams__FileSystemSandboxEntry = Schema.Struct({
25714 access: CommandExecutionRequestApprovalParams__FileSystemAccessMode,
25715 path: CommandExecutionRequestApprovalParams__FileSystemPath,
25716}).annotate({ identifier: "CommandExecutionRequestApprovalParams__FileSystemSandboxEntry" });
25717
25718export type McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema =
25719 | McpServerElicitationRequestParams__McpElicitationUntitledMultiSelectEnumSchema
25720 | McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema;
25721export const McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema = Schema.Union([
25722 McpServerElicitationRequestParams__McpElicitationUntitledMultiSelectEnumSchema,
25723 McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema,
25724]).annotate({
25725 identifier: "McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema",
25726});
25727
25728export type PermissionsRequestApprovalParams__FileSystemSandboxEntry = {
25729 readonly access: PermissionsRequestApprovalParams__FileSystemAccessMode;
25730 readonly path: PermissionsRequestApprovalParams__FileSystemPath;
25731};
25732export const PermissionsRequestApprovalParams__FileSystemSandboxEntry = Schema.Struct({
25733 access: PermissionsRequestApprovalParams__FileSystemAccessMode,
25734 path: PermissionsRequestApprovalParams__FileSystemPath,
25735}).annotate({ identifier: "PermissionsRequestApprovalParams__FileSystemSandboxEntry" });
25736
25737export type PermissionsRequestApprovalResponse__FileSystemSandboxEntry = {
25738 readonly access: PermissionsRequestApprovalResponse__FileSystemAccessMode;
25739 readonly path: PermissionsRequestApprovalResponse__FileSystemPath;
25740};
25741export const PermissionsRequestApprovalResponse__FileSystemSandboxEntry = Schema.Struct({
25742 access: PermissionsRequestApprovalResponse__FileSystemAccessMode,
25743 path: PermissionsRequestApprovalResponse__FileSystemPath,
25744}).annotate({ identifier: "PermissionsRequestApprovalResponse__FileSystemSandboxEntry" });
25745
25746export type ServerNotification__ErrorNotification = {
25747 readonly error: ServerNotification__TurnError;
25748 readonly threadId: string;
25749 readonly turnId: string;
25750 readonly willRetry: boolean;
25751};
25752export const ServerNotification__ErrorNotification = Schema.Struct({
25753 error: ServerNotification__TurnError,
25754 threadId: Schema.String,
25755 turnId: Schema.String,
25756 willRetry: Schema.Boolean,
25757}).annotate({ identifier: "ServerNotification__ErrorNotification" });
25758
25759export type ServerNotification__ThreadItem =
25760 | {
25761 readonly clientId?: string | null;
25762 readonly content: ReadonlyArray<ServerNotification__UserInput>;
25763 readonly id: string;
25764 readonly type: "userMessage";
25765 }
25766 | {
25767 readonly fragments: ReadonlyArray<ServerNotification__HookPromptFragment>;
25768 readonly id: string;
25769 readonly type: "hookPrompt";
25770 }
25771 | {
25772 readonly id: string;
25773 readonly memoryCitation?: ServerNotification__MemoryCitation | null;
25774 readonly phase?: ServerNotification__MessagePhase | null;
25775 readonly text: string;
25776 readonly delivery?: "async" | null;
25777 readonly questions?: ReadonlyArray<{
25778 readonly title: string;
25779 readonly options?: ReadonlyArray<string> | null;
25780 }> | null;
25781 readonly type: "agentMessage";
25782 }
25783 | { readonly id: string; readonly text: string; readonly type: "plan" }
25784 | {
25785 readonly content?: ReadonlyArray<string>;
25786 readonly id: string;
25787 readonly summary?: ReadonlyArray<string>;
25788 readonly type: "reasoning";
25789 }
25790 | {
25791 readonly aggregatedOutput?: string | null;
25792 readonly command: string;
25793 readonly commandActions: ReadonlyArray<ServerNotification__CommandAction>;
25794 readonly cwd: ServerNotification__LegacyAppPathString;
25795 readonly durationMs?: number | null;
25796 readonly exitCode?: number | null;
25797 readonly id: string;
25798 readonly processId?: string | null;
25799 readonly source?: ServerNotification__CommandExecutionSource;
25800 readonly status: ServerNotification__CommandExecutionStatus;
25801 readonly type: "commandExecution";
25802 }
25803 | {
25804 readonly changes: ReadonlyArray<ServerNotification__FileUpdateChange>;
25805 readonly id: string;
25806 readonly status: ServerNotification__PatchApplyStatus;
25807 readonly type: "fileChange";
25808 }
25809 | {
25810 readonly appContext?: ServerNotification__McpToolCallAppContext | null;
25811 readonly arguments: Schema.Json;
25812 readonly durationMs?: number | null;
25813 readonly error?: ServerNotification__McpToolCallError | null;
25814 readonly id: string;
25815 readonly mcpAppResourceUri?: string | null;
25816 readonly pluginId?: string | null;
25817 readonly result?: ServerNotification__McpToolCallResult | null;
25818 readonly server: string;
25819 readonly status: ServerNotification__McpToolCallStatus;
25820 readonly tool: string;
25821 readonly type: "mcpToolCall";
25822 }
25823 | {
25824 readonly arguments: Schema.Json;
25825 readonly contentItems?: ReadonlyArray<ServerNotification__DynamicToolCallOutputContentItem> | null;
25826 readonly durationMs?: number | null;
25827 readonly id: string;
25828 readonly namespace?: string | null;
25829 readonly status: ServerNotification__DynamicToolCallStatus;
25830 readonly success?: boolean | null;
25831 readonly tool: string;
25832 readonly type: "dynamicToolCall";
25833 }
25834 | {
25835 readonly agentsStates: { readonly [x: string]: ServerNotification__CollabAgentState };
25836 readonly id: string;
25837 readonly model?: string | null;
25838 readonly prompt?: string | null;
25839 readonly reasoningEffort?: ServerNotification__ReasoningEffort | null;
25840 readonly receiverThreadIds: ReadonlyArray<string>;
25841 readonly senderThreadId: string;
25842 readonly status: ServerNotification__CollabAgentToolCallStatus;
25843 readonly tool: ServerNotification__CollabAgentTool;
25844 readonly type: "collabAgentToolCall";
25845 }
25846 | {
25847 readonly agentPath: string;
25848 readonly agentThreadId: string;
25849 readonly id: string;
25850 readonly kind: ServerNotification__SubAgentActivityKind;
25851 readonly type: "subAgentActivity";
25852 }
25853 | {
25854 readonly action?: ServerNotification__WebSearchAction | null;
25855 readonly id: string;
25856 readonly query: string;
25857 readonly results?: ReadonlyArray<Schema.Json> | null;
25858 readonly type: "webSearch";
25859 }
25860 | {
25861 readonly id: string;
25862 readonly path: ServerNotification__LegacyAppPathString;
25863 readonly type: "imageView";
25864 }
25865 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
25866 | {
25867 readonly id: string;
25868 readonly result: string;
25869 readonly revisedPrompt?: string | null;
25870 readonly savedPath?: ServerNotification__AbsolutePathBuf | null;
25871 readonly status: string;
25872 readonly type: "imageGeneration";
25873 }
25874 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
25875 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
25876 | { readonly id: string; readonly type: "contextCompaction" };
25877export const ServerNotification__ThreadItem = Schema.Union(
25878 [
25879 Schema.Struct({
25880 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25881 content: Schema.Array(ServerNotification__UserInput),
25882 id: Schema.String,
25883 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
25884 }).annotate({ title: "UserMessageThreadItem" }),
25885 Schema.Struct({
25886 fragments: Schema.Array(ServerNotification__HookPromptFragment),
25887 id: Schema.String,
25888 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
25889 }).annotate({ title: "HookPromptThreadItem" }),
25890 Schema.Struct({
25891 id: Schema.String,
25892 memoryCitation: Schema.optionalKey(
25893 Schema.Union([ServerNotification__MemoryCitation, Schema.Null]),
25894 ),
25895 phase: Schema.optionalKey(Schema.Union([ServerNotification__MessagePhase, Schema.Null])),
25896 text: Schema.String,
2327125897 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
2327225898 questions: Schema.optionalKey(
2327325899 Schema.Union([
......@@ -23307,17 +25933,20 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union(
2330725933 ]),
2330825934 ),
2330925935 command: Schema.String.annotate({ description: "The command to be executed." }),
23310 commandActions: Schema.Array(V2ThreadForkResponse__CommandAction).annotate({
25936 commandActions: Schema.Array(ServerNotification__CommandAction).annotate({
2331125937 description:
2331225938 "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.",
2331325939 }),
23314 cwd: Schema.String.annotate({ description: "The command's working directory." }),
25940 cwd: Schema.suspend(
25941 (): Schema.Codec<ServerNotification__LegacyAppPathString> =>
25942 ServerNotification__LegacyAppPathString,
25943 ).annotate({ description: "The command's working directory." }),
2331525944 durationMs: Schema.optionalKey(
2331625945 Schema.Union([
2331725946 Schema.Number.annotate({
2331825947 description: "The duration of the command execution in milliseconds.",
2331925948 format: "int64",
23320 }).check(Schema.isInt()),
25949 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2332125950 Schema.Null,
2332225951 ]),
2332325952 ),
......@@ -23326,7 +25955,7 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union(
2332625955 Schema.Number.annotate({
2332725956 description: "The command's exit code.",
2332825957 format: "int32",
23329 }).check(Schema.isInt()),
25958 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2333025959 Schema.Null,
2333125960 ]),
2333225961 ),
......@@ -23340,41 +25969,37 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union(
2334025969 ]),
2334125970 ),
2334225971 source: Schema.optionalKey(
23343 Schema.Literals([
23344 "agent",
23345 "userShell",
23346 "unifiedExecStartup",
23347 "unifiedExecInteraction",
23348 ]).annotate({ default: "agent" }),
25972 Schema.suspend(
25973 (): Schema.Codec<ServerNotification__CommandExecutionSource> =>
25974 ServerNotification__CommandExecutionSource,
25975 ).annotate({ default: "agent" }),
2334925976 ),
23350 status: V2ThreadForkResponse__CommandExecutionStatus,
25977 status: ServerNotification__CommandExecutionStatus,
2335125978 type: Schema.Literal("commandExecution").annotate({
2335225979 title: "CommandExecutionThreadItemType",
2335325980 }),
2335425981 }).annotate({ title: "CommandExecutionThreadItem" }),
2335525982 Schema.Struct({
23356 changes: Schema.Array(V2ThreadForkResponse__FileUpdateChange),
25983 changes: Schema.Array(ServerNotification__FileUpdateChange),
2335725984 id: Schema.String,
23358 status: V2ThreadForkResponse__PatchApplyStatus,
25985 status: ServerNotification__PatchApplyStatus,
2335925986 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
2336025987 }).annotate({ title: "FileChangeThreadItem" }),
2336125988 Schema.Struct({
2336225989 appContext: Schema.optionalKey(
23363 Schema.Union([V2ThreadForkResponse__McpToolCallAppContext, Schema.Null]),
25990 Schema.Union([ServerNotification__McpToolCallAppContext, Schema.Null]),
2336425991 ),
23365 arguments: Schema.Unknown,
25992 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2336625993 durationMs: Schema.optionalKey(
2336725994 Schema.Union([
2336825995 Schema.Number.annotate({
2336925996 description: "The duration of the MCP tool call in milliseconds.",
2337025997 format: "int64",
23371 }).check(Schema.isInt()),
25998 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2337225999 Schema.Null,
2337326000 ]),
2337426001 ),
23375 error: Schema.optionalKey(
23376 Schema.Union([V2ThreadForkResponse__McpToolCallError, Schema.Null]),
23377 ),
26002 error: Schema.optionalKey(Schema.Union([ServerNotification__McpToolCallError, Schema.Null])),
2337826003 id: Schema.String,
2337926004 mcpAppResourceUri: Schema.optionalKey(
2338026005 Schema.Union([
......@@ -23386,18 +26011,18 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union(
2338626011 ),
2338726012 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2338826013 result: Schema.optionalKey(
23389 Schema.Union([V2ThreadForkResponse__McpToolCallResult, Schema.Null]),
26014 Schema.Union([ServerNotification__McpToolCallResult, Schema.Null]),
2339026015 ),
2339126016 server: Schema.String,
23392 status: V2ThreadForkResponse__McpToolCallStatus,
26017 status: ServerNotification__McpToolCallStatus,
2339326018 tool: Schema.String,
2339426019 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
2339526020 }).annotate({ title: "McpToolCallThreadItem" }),
2339626021 Schema.Struct({
23397 arguments: Schema.Unknown,
26022 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2339826023 contentItems: Schema.optionalKey(
2339926024 Schema.Union([
23400 Schema.Array(V2ThreadForkResponse__DynamicToolCallOutputContentItem),
26025 Schema.Array(ServerNotification__DynamicToolCallOutputContentItem),
2340126026 Schema.Null,
2340226027 ]),
2340326028 ),
......@@ -23406,19 +26031,19 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union(
2340626031 Schema.Number.annotate({
2340726032 description: "The duration of the dynamic tool call in milliseconds.",
2340826033 format: "int64",
23409 }).check(Schema.isInt()),
26034 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2341026035 Schema.Null,
2341126036 ]),
2341226037 ),
2341326038 id: Schema.String,
2341426039 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
23415 status: V2ThreadForkResponse__DynamicToolCallStatus,
26040 status: ServerNotification__DynamicToolCallStatus,
2341626041 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2341726042 tool: Schema.String,
2341826043 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
2341926044 }).annotate({ title: "DynamicToolCallThreadItem" }),
2342026045 Schema.Struct({
23421 agentsStates: Schema.Record(Schema.String, V2ThreadForkResponse__CollabAgentState).annotate({
26046 agentsStates: Schema.Record(Schema.String, ServerNotification__CollabAgentState).annotate({
2342226047 description: "Last known status of the target agents, when available.",
2342326048 }),
2342426049 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
......@@ -23439,7 +26064,7 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union(
2343926064 ]),
2344026065 ),
2344126066 reasoningEffort: Schema.optionalKey(
23442 Schema.Union([V2ThreadForkResponse__ReasoningEffort, Schema.Null]).annotate({
26067 Schema.Union([ServerNotification__ReasoningEffort, Schema.Null]).annotate({
2344326068 description: "Reasoning effort requested for the spawned agent, when applicable.",
2344426069 }),
2344526070 ),
......@@ -23450,20 +26075,14 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union(
2345026075 senderThreadId: Schema.String.annotate({
2345126076 description: "Thread ID of the agent issuing the collab request.",
2345226077 }),
23453 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
23454 description: "Current status of the collab tool call.",
23455 }),
23456 tool: Schema.Literals([
23457 "spawnAgent",
23458 "sendInput",
23459 "resumeAgent",
23460 "wait",
23461 "closeAgent",
23462 "sendMessage",
23463 "followupTask",
23464 "interruptAgent",
23465 "listAgents",
23466 ]).annotate({ description: "Name of the collab tool that was invoked." }),
26078 status: Schema.suspend(
26079 (): Schema.Codec<ServerNotification__CollabAgentToolCallStatus> =>
26080 ServerNotification__CollabAgentToolCallStatus,
26081 ).annotate({ description: "Current status of the collab tool call." }),
26082 tool: Schema.suspend(
26083 (): Schema.Codec<ServerNotification__CollabAgentTool> =>
26084 ServerNotification__CollabAgentTool,
26085 ).annotate({ description: "Name of the collab tool that was invoked." }),
2346726086 type: Schema.Literal("collabAgentToolCall").annotate({
2346826087 title: "CollabAgentToolCallThreadItemType",
2346926088 }),
......@@ -23472,20 +26091,18 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union(
2347226091 agentPath: Schema.String,
2347326092 agentThreadId: Schema.String,
2347426093 id: Schema.String,
23475 kind: V2ThreadForkResponse__SubAgentActivityKind,
26094 kind: ServerNotification__SubAgentActivityKind,
2347626095 type: Schema.Literal("subAgentActivity").annotate({
2347726096 title: "SubAgentActivityThreadItemType",
2347826097 }),
2347926098 }).annotate({ title: "SubAgentActivityThreadItem" }),
2348026099 Schema.Struct({
23481 action: Schema.optionalKey(
23482 Schema.Union([V2ThreadForkResponse__WebSearchAction, Schema.Null]),
23483 ),
26100 action: Schema.optionalKey(Schema.Union([ServerNotification__WebSearchAction, Schema.Null])),
2348426101 id: Schema.String,
2348526102 query: Schema.String,
2348626103 results: Schema.optionalKey(
2348726104 Schema.Union([
23488 Schema.Array(Schema.Unknown).annotate({
26105 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
2348926106 description:
2349026107 "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.",
2349126108 }),
......@@ -23496,13 +26113,17 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union(
2349626113 }).annotate({ title: "WebSearchThreadItem" }),
2349726114 Schema.Struct({
2349826115 id: Schema.String,
23499 path: V2ThreadForkResponse__LegacyAppPathString,
26116 path: ServerNotification__LegacyAppPathString,
2350026117 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
2350126118 }).annotate({ title: "ImageViewThreadItem" }),
2350226119 Schema.Struct({
2350326120 durationMs: Schema.Number.annotate({ format: "uint64" })
23504 .check(Schema.isInt())
23505 .check(Schema.isGreaterThanOrEqualTo(0)),
26121 .check(Schema.isInt().annotate({ expected: "an integer" }))
26122 .check(
26123 Schema.isGreaterThanOrEqualTo(0).annotate({
26124 expected: "a value greater than or equal to 0",
26125 }),
26126 ),
2350626127 id: Schema.String,
2350726128 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
2350826129 }).annotate({
......@@ -23514,7 +26135,7 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union(
2351426135 result: Schema.String,
2351526136 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2351626137 savedPath: Schema.optionalKey(
23517 Schema.Union([V2ThreadForkResponse__AbsolutePathBuf, Schema.Null]),
26138 Schema.Union([ServerNotification__AbsolutePathBuf, Schema.Null]),
2351826139 ),
2351926140 status: Schema.String,
2352026141 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
......@@ -23541,37 +26162,294 @@ export const V2ThreadForkResponse__ThreadItem = Schema.Union(
2354126162 }).annotate({ title: "ContextCompactionThreadItem" }),
2354226163 ],
2354326164 { mode: "oneOf" },
23544);
26165).annotate({ identifier: "ServerNotification__ThreadItem" });
2354526166
23546export type V2ThreadListResponse__TurnError = {
23547 readonly additionalDetails?: string | null;
23548 readonly codexErrorInfo?: V2ThreadListResponse__CodexErrorInfo | null;
23549 readonly message: string;
26167export type ServerNotification__FileSystemSandboxEntry = {
26168 readonly access: ServerNotification__FileSystemAccessMode;
26169 readonly path: ServerNotification__FileSystemPath;
2355026170};
23551export const V2ThreadListResponse__TurnError = Schema.Struct({
23552 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
23553 codexErrorInfo: Schema.optionalKey(
23554 Schema.Union([V2ThreadListResponse__CodexErrorInfo, Schema.Null]),
23555 ),
23556 message: Schema.String,
23557});
23558
23559export type V2ThreadListResponse__ThreadItem =
26171export const ServerNotification__FileSystemSandboxEntry = Schema.Struct({
26172 access: ServerNotification__FileSystemAccessMode,
26173 path: ServerNotification__FileSystemPath,
26174}).annotate({ identifier: "ServerNotification__FileSystemSandboxEntry" });
26175
26176export type ServerNotification__ThreadSettings = {
26177 readonly activePermissionProfile?: ServerNotification__ActivePermissionProfile | null;
26178 readonly approvalPolicy: ServerNotification__AskForApproval;
26179 readonly approvalsReviewer: ServerNotification__ApprovalsReviewer;
26180 readonly collaborationMode: ServerNotification__CollaborationMode;
26181 readonly cwd: ServerNotification__AbsolutePathBuf;
26182 readonly effort?: ServerNotification__ReasoningEffort | null;
26183 readonly model: string;
26184 readonly modelProvider: string;
26185 readonly personality?: ServerNotification__Personality | null;
26186 readonly sandboxPolicy: ServerNotification__SandboxPolicy;
26187 readonly serviceTier?: string | null;
26188 readonly summary?: ServerNotification__ReasoningSummary | null;
26189};
26190export const ServerNotification__ThreadSettings = Schema.Struct({
26191 activePermissionProfile: Schema.optionalKey(
26192 Schema.Union([ServerNotification__ActivePermissionProfile, Schema.Null]),
26193 ),
26194 approvalPolicy: ServerNotification__AskForApproval,
26195 approvalsReviewer: ServerNotification__ApprovalsReviewer,
26196 collaborationMode: ServerNotification__CollaborationMode,
26197 cwd: ServerNotification__AbsolutePathBuf,
26198 effort: Schema.optionalKey(Schema.Union([ServerNotification__ReasoningEffort, Schema.Null])),
26199 model: Schema.String,
26200 modelProvider: Schema.String,
26201 personality: Schema.optionalKey(Schema.Union([ServerNotification__Personality, Schema.Null])),
26202 sandboxPolicy: ServerNotification__SandboxPolicy,
26203 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26204 summary: Schema.optionalKey(Schema.Union([ServerNotification__ReasoningSummary, Schema.Null])),
26205}).annotate({ identifier: "ServerNotification__ThreadSettings" });
26206
26207export type ServerNotification__HookStartedNotification = {
26208 readonly run: ServerNotification__HookRunSummary;
26209 readonly threadId: string;
26210 readonly turnId?: string | null;
26211};
26212export const ServerNotification__HookStartedNotification = Schema.Struct({
26213 run: ServerNotification__HookRunSummary,
26214 threadId: Schema.String,
26215 turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26216}).annotate({ identifier: "ServerNotification__HookStartedNotification" });
26217
26218export type ServerNotification__HookCompletedNotification = {
26219 readonly run: ServerNotification__HookRunSummary;
26220 readonly threadId: string;
26221 readonly turnId?: string | null;
26222};
26223export const ServerNotification__HookCompletedNotification = Schema.Struct({
26224 run: ServerNotification__HookRunSummary,
26225 threadId: Schema.String,
26226 turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26227}).annotate({ identifier: "ServerNotification__HookCompletedNotification" });
26228
26229export type ServerNotification__AppListUpdatedNotification = {
26230 readonly data: ReadonlyArray<ServerNotification__AppInfo>;
26231};
26232export const ServerNotification__AppListUpdatedNotification = Schema.Struct({
26233 data: Schema.Array(ServerNotification__AppInfo),
26234}).annotate({
26235 description: "EXPERIMENTAL - notification emitted when the app list changes.",
26236 identifier: "ServerNotification__AppListUpdatedNotification",
26237});
26238
26239export type ServerNotification__ExternalAgentConfigImportProgressNotification = {
26240 readonly importId: string;
26241 readonly itemTypeResults: ReadonlyArray<ServerNotification__ExternalAgentConfigImportTypeResult>;
26242};
26243export const ServerNotification__ExternalAgentConfigImportProgressNotification = Schema.Struct({
26244 importId: Schema.String,
26245 itemTypeResults: Schema.Array(ServerNotification__ExternalAgentConfigImportTypeResult),
26246}).annotate({ identifier: "ServerNotification__ExternalAgentConfigImportProgressNotification" });
26247
26248export type ServerNotification__ExternalAgentConfigImportCompletedNotification = {
26249 readonly importId: string;
26250 readonly itemTypeResults: ReadonlyArray<ServerNotification__ExternalAgentConfigImportTypeResult>;
26251};
26252export const ServerNotification__ExternalAgentConfigImportCompletedNotification = Schema.Struct({
26253 importId: Schema.String,
26254 itemTypeResults: Schema.Array(ServerNotification__ExternalAgentConfigImportTypeResult),
26255}).annotate({ identifier: "ServerNotification__ExternalAgentConfigImportCompletedNotification" });
26256
26257export type ServerRequest__FileSystemSandboxEntry = {
26258 readonly access: ServerRequest__FileSystemAccessMode;
26259 readonly path: ServerRequest__FileSystemPath;
26260};
26261export const ServerRequest__FileSystemSandboxEntry = Schema.Struct({
26262 access: ServerRequest__FileSystemAccessMode,
26263 path: ServerRequest__FileSystemPath,
26264}).annotate({ identifier: "ServerRequest__FileSystemSandboxEntry" });
26265
26266export type ServerRequest__McpElicitationMultiSelectEnumSchema =
26267 | ServerRequest__McpElicitationUntitledMultiSelectEnumSchema
26268 | ServerRequest__McpElicitationTitledMultiSelectEnumSchema;
26269export const ServerRequest__McpElicitationMultiSelectEnumSchema = Schema.Union([
26270 ServerRequest__McpElicitationUntitledMultiSelectEnumSchema,
26271 ServerRequest__McpElicitationTitledMultiSelectEnumSchema,
26272]).annotate({ identifier: "ServerRequest__McpElicitationMultiSelectEnumSchema" });
26273
26274export type V2ConfigReadResponse__Config = {
26275 readonly analytics?: V2ConfigReadResponse__AnalyticsConfig | null;
26276 readonly approval_policy?: V2ConfigReadResponse__AskForApproval | null;
26277 readonly approvals_reviewer?: V2ConfigReadResponse__ApprovalsReviewer | null;
26278 readonly compact_prompt?: string | null;
26279 readonly desktop?: { readonly [x: string]: Schema.Json } | null;
26280 readonly developer_instructions?: string | null;
26281 readonly forced_chatgpt_workspace_id?: V2ConfigReadResponse__ForcedChatgptWorkspaceIds | null;
26282 readonly forced_login_method?: V2ConfigReadResponse__ForcedLoginMethod | null;
26283 readonly instructions?: string | null;
26284 readonly model?: string | null;
26285 readonly model_auto_compact_token_limit?: number | null;
26286 readonly model_auto_compact_token_limit_scope?: V2ConfigReadResponse__AutoCompactTokenLimitScope | null;
26287 readonly model_context_window?: number | null;
26288 readonly model_provider?: string | null;
26289 readonly model_reasoning_effort?: V2ConfigReadResponse__ReasoningEffort | null;
26290 readonly model_reasoning_summary?: V2ConfigReadResponse__ReasoningSummary | null;
26291 readonly model_verbosity?: V2ConfigReadResponse__Verbosity | null;
26292 readonly review_model?: string | null;
26293 readonly sandbox_mode?: V2ConfigReadResponse__SandboxMode | null;
26294 readonly sandbox_workspace_write?: V2ConfigReadResponse__SandboxWorkspaceWrite | null;
26295 readonly service_tier?: string | null;
26296 readonly tools?: V2ConfigReadResponse__ToolsV2 | null;
26297 readonly web_search?: V2ConfigReadResponse__WebSearchMode | null;
26298} & { readonly [x: string]: Schema.Json };
26299export const V2ConfigReadResponse__Config = Schema.StructWithRest(
26300 Schema.Struct({
26301 analytics: Schema.optionalKey(
26302 Schema.Union([V2ConfigReadResponse__AnalyticsConfig, Schema.Null]),
26303 ),
26304 approval_policy: Schema.optionalKey(
26305 Schema.Union([V2ConfigReadResponse__AskForApproval, Schema.Null]),
26306 ),
26307 approvals_reviewer: Schema.optionalKey(
26308 Schema.Union([V2ConfigReadResponse__ApprovalsReviewer, Schema.Null]).annotate({
26309 description:
26310 "[UNSTABLE] Optional default for where approval requests are routed for review.",
26311 }),
26312 ),
26313 compact_prompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26314 desktop: Schema.optionalKey(
26315 Schema.Union([
26316 Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
26317 Schema.Null,
26318 ]),
26319 ),
26320 developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26321 forced_chatgpt_workspace_id: Schema.optionalKey(
26322 Schema.Union([V2ConfigReadResponse__ForcedChatgptWorkspaceIds, Schema.Null]),
26323 ),
26324 forced_login_method: Schema.optionalKey(
26325 Schema.Union([V2ConfigReadResponse__ForcedLoginMethod, Schema.Null]),
26326 ),
26327 instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26328 model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26329 model_auto_compact_token_limit: Schema.optionalKey(
26330 Schema.Union([
26331 Schema.Number.annotate({ format: "int64" }).check(
26332 Schema.isInt().annotate({ expected: "an integer" }),
26333 ),
26334 Schema.Null,
26335 ]),
26336 ),
26337 model_auto_compact_token_limit_scope: Schema.optionalKey(
26338 Schema.Union([V2ConfigReadResponse__AutoCompactTokenLimitScope, Schema.Null]),
26339 ),
26340 model_context_window: Schema.optionalKey(
26341 Schema.Union([
26342 Schema.Number.annotate({ format: "int64" }).check(
26343 Schema.isInt().annotate({ expected: "an integer" }),
26344 ),
26345 Schema.Null,
26346 ]),
26347 ),
26348 model_provider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26349 model_reasoning_effort: Schema.optionalKey(
26350 Schema.Union([V2ConfigReadResponse__ReasoningEffort, Schema.Null]),
26351 ),
26352 model_reasoning_summary: Schema.optionalKey(
26353 Schema.Union([V2ConfigReadResponse__ReasoningSummary, Schema.Null]),
26354 ),
26355 model_verbosity: Schema.optionalKey(
26356 Schema.Union([V2ConfigReadResponse__Verbosity, Schema.Null]),
26357 ),
26358 review_model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26359 sandbox_mode: Schema.optionalKey(
26360 Schema.Union([V2ConfigReadResponse__SandboxMode, Schema.Null]),
26361 ),
26362 sandbox_workspace_write: Schema.optionalKey(
26363 Schema.Union([V2ConfigReadResponse__SandboxWorkspaceWrite, Schema.Null]),
26364 ),
26365 service_tier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26366 tools: Schema.optionalKey(Schema.Union([V2ConfigReadResponse__ToolsV2, Schema.Null])),
26367 web_search: Schema.optionalKey(
26368 Schema.Union([V2ConfigReadResponse__WebSearchMode, Schema.Null]),
26369 ),
26370 }),
26371 [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))],
26372).annotate({ identifier: "V2ConfigReadResponse__Config" });
26373
26374export type V2ConfigRequirementsReadResponse__ConfigRequirements = {
26375 readonly allowAppshots?: boolean | null;
26376 readonly allowManagedHooksOnly?: boolean | null;
26377 readonly allowRemoteControl?: boolean | null;
26378 readonly allowedApprovalPolicies?: ReadonlyArray<V2ConfigRequirementsReadResponse__AskForApproval> | null;
26379 readonly allowedPermissionProfiles?: { readonly [x: string]: boolean } | null;
26380 readonly allowedSandboxModes?: ReadonlyArray<V2ConfigRequirementsReadResponse__SandboxMode> | null;
26381 readonly allowedWebSearchModes?: ReadonlyArray<V2ConfigRequirementsReadResponse__WebSearchMode> | null;
26382 readonly allowedWindowsSandboxImplementations?: ReadonlyArray<V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode> | null;
26383 readonly computerUse?: V2ConfigRequirementsReadResponse__ComputerUseRequirements | null;
26384 readonly defaultPermissions?: string | null;
26385 readonly enforceResidency?: V2ConfigRequirementsReadResponse__ResidencyRequirement | null;
26386 readonly featureRequirements?: { readonly [x: string]: boolean } | null;
26387 readonly models?: V2ConfigRequirementsReadResponse__ModelsRequirements | null;
26388};
26389export const V2ConfigRequirementsReadResponse__ConfigRequirements = Schema.Struct({
26390 allowAppshots: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
26391 allowManagedHooksOnly: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
26392 allowRemoteControl: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
26393 allowedApprovalPolicies: Schema.optionalKey(
26394 Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__AskForApproval), Schema.Null]),
26395 ),
26396 allowedPermissionProfiles: Schema.optionalKey(
26397 Schema.Union([Schema.Record(Schema.String, Schema.Boolean), Schema.Null]),
26398 ),
26399 allowedSandboxModes: Schema.optionalKey(
26400 Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__SandboxMode), Schema.Null]),
26401 ),
26402 allowedWebSearchModes: Schema.optionalKey(
26403 Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__WebSearchMode), Schema.Null]),
26404 ),
26405 allowedWindowsSandboxImplementations: Schema.optionalKey(
26406 Schema.Union([
26407 Schema.Array(V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode),
26408 Schema.Null,
26409 ]),
26410 ),
26411 computerUse: Schema.optionalKey(
26412 Schema.Union([V2ConfigRequirementsReadResponse__ComputerUseRequirements, Schema.Null]),
26413 ),
26414 defaultPermissions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26415 enforceResidency: Schema.optionalKey(
26416 Schema.Union([V2ConfigRequirementsReadResponse__ResidencyRequirement, Schema.Null]),
26417 ),
26418 featureRequirements: Schema.optionalKey(
26419 Schema.Union([Schema.Record(Schema.String, Schema.Boolean), Schema.Null]),
26420 ),
26421 models: Schema.optionalKey(
26422 Schema.Union([V2ConfigRequirementsReadResponse__ModelsRequirements, Schema.Null]),
26423 ),
26424}).annotate({ identifier: "V2ConfigRequirementsReadResponse__ConfigRequirements" });
26425
26426export type V2ConfigWriteResponse__OverriddenMetadata = {
26427 readonly effectiveValue: Schema.Json;
26428 readonly message: string;
26429 readonly overridingLayer: V2ConfigWriteResponse__ConfigLayerMetadata;
26430};
26431export const V2ConfigWriteResponse__OverriddenMetadata = Schema.Struct({
26432 effectiveValue: Schema.Json.annotate({ expected: "JSON value" }),
26433 message: Schema.String,
26434 overridingLayer: V2ConfigWriteResponse__ConfigLayerMetadata,
26435}).annotate({ identifier: "V2ConfigWriteResponse__OverriddenMetadata" });
26436
26437export type V2ItemCompletedNotification__ThreadItem =
2356026438 | {
2356126439 readonly clientId?: string | null;
23562 readonly content: ReadonlyArray<V2ThreadListResponse__UserInput>;
26440 readonly content: ReadonlyArray<V2ItemCompletedNotification__UserInput>;
2356326441 readonly id: string;
2356426442 readonly type: "userMessage";
2356526443 }
2356626444 | {
23567 readonly fragments: ReadonlyArray<V2ThreadListResponse__HookPromptFragment>;
26445 readonly fragments: ReadonlyArray<V2ItemCompletedNotification__HookPromptFragment>;
2356826446 readonly id: string;
2356926447 readonly type: "hookPrompt";
2357026448 }
2357126449 | {
2357226450 readonly id: string;
23573 readonly memoryCitation?: V2ThreadListResponse__MemoryCitation | null;
23574 readonly phase?: V2ThreadListResponse__MessagePhase | null;
26451 readonly memoryCitation?: V2ItemCompletedNotification__MemoryCitation | null;
26452 readonly phase?: V2ItemCompletedNotification__MessagePhase | null;
2357526453 readonly text: string;
2357626454 readonly delivery?: "async" | null;
2357726455 readonly questions?: ReadonlyArray<{
......@@ -23590,85 +26468,78 @@ export type V2ThreadListResponse__ThreadItem =
2359026468 | {
2359126469 readonly aggregatedOutput?: string | null;
2359226470 readonly command: string;
23593 readonly commandActions: ReadonlyArray<V2ThreadListResponse__CommandAction>;
23594 readonly cwd: string;
26471 readonly commandActions: ReadonlyArray<V2ItemCompletedNotification__CommandAction>;
26472 readonly cwd: V2ItemCompletedNotification__LegacyAppPathString;
2359526473 readonly durationMs?: number | null;
2359626474 readonly exitCode?: number | null;
2359726475 readonly id: string;
2359826476 readonly processId?: string | null;
23599 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
23600 readonly status: V2ThreadListResponse__CommandExecutionStatus;
26477 readonly source?: V2ItemCompletedNotification__CommandExecutionSource;
26478 readonly status: V2ItemCompletedNotification__CommandExecutionStatus;
2360126479 readonly type: "commandExecution";
2360226480 }
2360326481 | {
23604 readonly changes: ReadonlyArray<V2ThreadListResponse__FileUpdateChange>;
26482 readonly changes: ReadonlyArray<V2ItemCompletedNotification__FileUpdateChange>;
2360526483 readonly id: string;
23606 readonly status: V2ThreadListResponse__PatchApplyStatus;
26484 readonly status: V2ItemCompletedNotification__PatchApplyStatus;
2360726485 readonly type: "fileChange";
2360826486 }
2360926487 | {
23610 readonly appContext?: V2ThreadListResponse__McpToolCallAppContext | null;
23611 readonly arguments: unknown;
26488 readonly appContext?: V2ItemCompletedNotification__McpToolCallAppContext | null;
26489 readonly arguments: Schema.Json;
2361226490 readonly durationMs?: number | null;
23613 readonly error?: V2ThreadListResponse__McpToolCallError | null;
26491 readonly error?: V2ItemCompletedNotification__McpToolCallError | null;
2361426492 readonly id: string;
2361526493 readonly mcpAppResourceUri?: string | null;
2361626494 readonly pluginId?: string | null;
23617 readonly result?: V2ThreadListResponse__McpToolCallResult | null;
26495 readonly result?: V2ItemCompletedNotification__McpToolCallResult | null;
2361826496 readonly server: string;
23619 readonly status: V2ThreadListResponse__McpToolCallStatus;
26497 readonly status: V2ItemCompletedNotification__McpToolCallStatus;
2362026498 readonly tool: string;
2362126499 readonly type: "mcpToolCall";
2362226500 }
2362326501 | {
23624 readonly arguments: unknown;
23625 readonly contentItems?: ReadonlyArray<V2ThreadListResponse__DynamicToolCallOutputContentItem> | null;
26502 readonly arguments: Schema.Json;
26503 readonly contentItems?: ReadonlyArray<V2ItemCompletedNotification__DynamicToolCallOutputContentItem> | null;
2362626504 readonly durationMs?: number | null;
2362726505 readonly id: string;
2362826506 readonly namespace?: string | null;
23629 readonly status: V2ThreadListResponse__DynamicToolCallStatus;
26507 readonly status: V2ItemCompletedNotification__DynamicToolCallStatus;
2363026508 readonly success?: boolean | null;
2363126509 readonly tool: string;
2363226510 readonly type: "dynamicToolCall";
2363326511 }
2363426512 | {
23635 readonly agentsStates: { readonly [x: string]: V2ThreadListResponse__CollabAgentState };
26513 readonly agentsStates: {
26514 readonly [x: string]: V2ItemCompletedNotification__CollabAgentState;
26515 };
2363626516 readonly id: string;
2363726517 readonly model?: string | null;
2363826518 readonly prompt?: string | null;
23639 readonly reasoningEffort?: V2ThreadListResponse__ReasoningEffort | null;
26519 readonly reasoningEffort?: V2ItemCompletedNotification__ReasoningEffort | null;
2364026520 readonly receiverThreadIds: ReadonlyArray<string>;
2364126521 readonly senderThreadId: string;
23642 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
23643 readonly tool:
23644 | "spawnAgent"
23645 | "sendInput"
23646 | "resumeAgent"
23647 | "wait"
23648 | "closeAgent"
23649 | "sendMessage"
23650 | "followupTask"
23651 | "interruptAgent"
23652 | "listAgents";
26522 readonly status: V2ItemCompletedNotification__CollabAgentToolCallStatus;
26523 readonly tool: V2ItemCompletedNotification__CollabAgentTool;
2365326524 readonly type: "collabAgentToolCall";
2365426525 }
2365526526 | {
2365626527 readonly agentPath: string;
2365726528 readonly agentThreadId: string;
2365826529 readonly id: string;
23659 readonly kind: V2ThreadListResponse__SubAgentActivityKind;
26530 readonly kind: V2ItemCompletedNotification__SubAgentActivityKind;
2366026531 readonly type: "subAgentActivity";
2366126532 }
2366226533 | {
23663 readonly action?: V2ThreadListResponse__WebSearchAction | null;
26534 readonly action?: V2ItemCompletedNotification__WebSearchAction | null;
2366426535 readonly id: string;
2366526536 readonly query: string;
23666 readonly results?: ReadonlyArray<unknown> | null;
26537 readonly results?: ReadonlyArray<Schema.Json> | null;
2366726538 readonly type: "webSearch";
2366826539 }
2366926540 | {
2367026541 readonly id: string;
23671 readonly path: V2ThreadListResponse__LegacyAppPathString;
26542 readonly path: V2ItemCompletedNotification__LegacyAppPathString;
2367226543 readonly type: "imageView";
2367326544 }
2367426545 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
......@@ -23676,32 +26547,34 @@ export type V2ThreadListResponse__ThreadItem =
2367626547 readonly id: string;
2367726548 readonly result: string;
2367826549 readonly revisedPrompt?: string | null;
23679 readonly savedPath?: V2ThreadListResponse__AbsolutePathBuf | null;
26550 readonly savedPath?: V2ItemCompletedNotification__AbsolutePathBuf | null;
2368026551 readonly status: string;
2368126552 readonly type: "imageGeneration";
2368226553 }
2368326554 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
2368426555 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
2368526556 | { readonly id: string; readonly type: "contextCompaction" };
23686export const V2ThreadListResponse__ThreadItem = Schema.Union(
26557export const V2ItemCompletedNotification__ThreadItem = Schema.Union(
2368726558 [
2368826559 Schema.Struct({
2368926560 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
23690 content: Schema.Array(V2ThreadListResponse__UserInput),
26561 content: Schema.Array(V2ItemCompletedNotification__UserInput),
2369126562 id: Schema.String,
2369226563 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
2369326564 }).annotate({ title: "UserMessageThreadItem" }),
2369426565 Schema.Struct({
23695 fragments: Schema.Array(V2ThreadListResponse__HookPromptFragment),
26566 fragments: Schema.Array(V2ItemCompletedNotification__HookPromptFragment),
2369626567 id: Schema.String,
2369726568 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
2369826569 }).annotate({ title: "HookPromptThreadItem" }),
2369926570 Schema.Struct({
2370026571 id: Schema.String,
2370126572 memoryCitation: Schema.optionalKey(
23702 Schema.Union([V2ThreadListResponse__MemoryCitation, Schema.Null]),
26573 Schema.Union([V2ItemCompletedNotification__MemoryCitation, Schema.Null]),
26574 ),
26575 phase: Schema.optionalKey(
26576 Schema.Union([V2ItemCompletedNotification__MessagePhase, Schema.Null]),
2370326577 ),
23704 phase: Schema.optionalKey(Schema.Union([V2ThreadListResponse__MessagePhase, Schema.Null])),
2370526578 text: Schema.String,
2370626579 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
2370726580 questions: Schema.optionalKey(
......@@ -23742,17 +26615,20 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union(
2374226615 ]),
2374326616 ),
2374426617 command: Schema.String.annotate({ description: "The command to be executed." }),
23745 commandActions: Schema.Array(V2ThreadListResponse__CommandAction).annotate({
26618 commandActions: Schema.Array(V2ItemCompletedNotification__CommandAction).annotate({
2374626619 description:
2374726620 "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.",
2374826621 }),
23749 cwd: Schema.String.annotate({ description: "The command's working directory." }),
26622 cwd: Schema.suspend(
26623 (): Schema.Codec<V2ItemCompletedNotification__LegacyAppPathString> =>
26624 V2ItemCompletedNotification__LegacyAppPathString,
26625 ).annotate({ description: "The command's working directory." }),
2375026626 durationMs: Schema.optionalKey(
2375126627 Schema.Union([
2375226628 Schema.Number.annotate({
2375326629 description: "The duration of the command execution in milliseconds.",
2375426630 format: "int64",
23755 }).check(Schema.isInt()),
26631 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2375626632 Schema.Null,
2375726633 ]),
2375826634 ),
......@@ -23761,7 +26637,7 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union(
2376126637 Schema.Number.annotate({
2376226638 description: "The command's exit code.",
2376326639 format: "int32",
23764 }).check(Schema.isInt()),
26640 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2376526641 Schema.Null,
2376626642 ]),
2376726643 ),
......@@ -23775,40 +26651,38 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union(
2377526651 ]),
2377626652 ),
2377726653 source: Schema.optionalKey(
23778 Schema.Literals([
23779 "agent",
23780 "userShell",
23781 "unifiedExecStartup",
23782 "unifiedExecInteraction",
23783 ]).annotate({ default: "agent" }),
26654 Schema.suspend(
26655 (): Schema.Codec<V2ItemCompletedNotification__CommandExecutionSource> =>
26656 V2ItemCompletedNotification__CommandExecutionSource,
26657 ).annotate({ default: "agent" }),
2378426658 ),
23785 status: V2ThreadListResponse__CommandExecutionStatus,
26659 status: V2ItemCompletedNotification__CommandExecutionStatus,
2378626660 type: Schema.Literal("commandExecution").annotate({
2378726661 title: "CommandExecutionThreadItemType",
2378826662 }),
2378926663 }).annotate({ title: "CommandExecutionThreadItem" }),
2379026664 Schema.Struct({
23791 changes: Schema.Array(V2ThreadListResponse__FileUpdateChange),
26665 changes: Schema.Array(V2ItemCompletedNotification__FileUpdateChange),
2379226666 id: Schema.String,
23793 status: V2ThreadListResponse__PatchApplyStatus,
26667 status: V2ItemCompletedNotification__PatchApplyStatus,
2379426668 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
2379526669 }).annotate({ title: "FileChangeThreadItem" }),
2379626670 Schema.Struct({
2379726671 appContext: Schema.optionalKey(
23798 Schema.Union([V2ThreadListResponse__McpToolCallAppContext, Schema.Null]),
26672 Schema.Union([V2ItemCompletedNotification__McpToolCallAppContext, Schema.Null]),
2379926673 ),
23800 arguments: Schema.Unknown,
26674 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2380126675 durationMs: Schema.optionalKey(
2380226676 Schema.Union([
2380326677 Schema.Number.annotate({
2380426678 description: "The duration of the MCP tool call in milliseconds.",
2380526679 format: "int64",
23806 }).check(Schema.isInt()),
26680 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2380726681 Schema.Null,
2380826682 ]),
2380926683 ),
2381026684 error: Schema.optionalKey(
23811 Schema.Union([V2ThreadListResponse__McpToolCallError, Schema.Null]),
26685 Schema.Union([V2ItemCompletedNotification__McpToolCallError, Schema.Null]),
2381226686 ),
2381326687 id: Schema.String,
2381426688 mcpAppResourceUri: Schema.optionalKey(
......@@ -23821,18 +26695,18 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union(
2382126695 ),
2382226696 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2382326697 result: Schema.optionalKey(
23824 Schema.Union([V2ThreadListResponse__McpToolCallResult, Schema.Null]),
26698 Schema.Union([V2ItemCompletedNotification__McpToolCallResult, Schema.Null]),
2382526699 ),
2382626700 server: Schema.String,
23827 status: V2ThreadListResponse__McpToolCallStatus,
26701 status: V2ItemCompletedNotification__McpToolCallStatus,
2382826702 tool: Schema.String,
2382926703 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
2383026704 }).annotate({ title: "McpToolCallThreadItem" }),
2383126705 Schema.Struct({
23832 arguments: Schema.Unknown,
26706 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2383326707 contentItems: Schema.optionalKey(
2383426708 Schema.Union([
23835 Schema.Array(V2ThreadListResponse__DynamicToolCallOutputContentItem),
26709 Schema.Array(V2ItemCompletedNotification__DynamicToolCallOutputContentItem),
2383626710 Schema.Null,
2383726711 ]),
2383826712 ),
......@@ -23841,21 +26715,22 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union(
2384126715 Schema.Number.annotate({
2384226716 description: "The duration of the dynamic tool call in milliseconds.",
2384326717 format: "int64",
23844 }).check(Schema.isInt()),
26718 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2384526719 Schema.Null,
2384626720 ]),
2384726721 ),
2384826722 id: Schema.String,
2384926723 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
23850 status: V2ThreadListResponse__DynamicToolCallStatus,
26724 status: V2ItemCompletedNotification__DynamicToolCallStatus,
2385126725 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2385226726 tool: Schema.String,
2385326727 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
2385426728 }).annotate({ title: "DynamicToolCallThreadItem" }),
2385526729 Schema.Struct({
23856 agentsStates: Schema.Record(Schema.String, V2ThreadListResponse__CollabAgentState).annotate({
23857 description: "Last known status of the target agents, when available.",
23858 }),
26730 agentsStates: Schema.Record(
26731 Schema.String,
26732 V2ItemCompletedNotification__CollabAgentState,
26733 ).annotate({ description: "Last known status of the target agents, when available." }),
2385926734 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
2386026735 model: Schema.optionalKey(
2386126736 Schema.Union([
......@@ -23874,7 +26749,7 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union(
2387426749 ]),
2387526750 ),
2387626751 reasoningEffort: Schema.optionalKey(
23877 Schema.Union([V2ThreadListResponse__ReasoningEffort, Schema.Null]).annotate({
26752 Schema.Union([V2ItemCompletedNotification__ReasoningEffort, Schema.Null]).annotate({
2387826753 description: "Reasoning effort requested for the spawned agent, when applicable.",
2387926754 }),
2388026755 ),
......@@ -23885,20 +26760,14 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union(
2388526760 senderThreadId: Schema.String.annotate({
2388626761 description: "Thread ID of the agent issuing the collab request.",
2388726762 }),
23888 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
23889 description: "Current status of the collab tool call.",
23890 }),
23891 tool: Schema.Literals([
23892 "spawnAgent",
23893 "sendInput",
23894 "resumeAgent",
23895 "wait",
23896 "closeAgent",
23897 "sendMessage",
23898 "followupTask",
23899 "interruptAgent",
23900 "listAgents",
23901 ]).annotate({ description: "Name of the collab tool that was invoked." }),
26763 status: Schema.suspend(
26764 (): Schema.Codec<V2ItemCompletedNotification__CollabAgentToolCallStatus> =>
26765 V2ItemCompletedNotification__CollabAgentToolCallStatus,
26766 ).annotate({ description: "Current status of the collab tool call." }),
26767 tool: Schema.suspend(
26768 (): Schema.Codec<V2ItemCompletedNotification__CollabAgentTool> =>
26769 V2ItemCompletedNotification__CollabAgentTool,
26770 ).annotate({ description: "Name of the collab tool that was invoked." }),
2390226771 type: Schema.Literal("collabAgentToolCall").annotate({
2390326772 title: "CollabAgentToolCallThreadItemType",
2390426773 }),
......@@ -23907,20 +26776,20 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union(
2390726776 agentPath: Schema.String,
2390826777 agentThreadId: Schema.String,
2390926778 id: Schema.String,
23910 kind: V2ThreadListResponse__SubAgentActivityKind,
26779 kind: V2ItemCompletedNotification__SubAgentActivityKind,
2391126780 type: Schema.Literal("subAgentActivity").annotate({
2391226781 title: "SubAgentActivityThreadItemType",
2391326782 }),
2391426783 }).annotate({ title: "SubAgentActivityThreadItem" }),
2391526784 Schema.Struct({
2391626785 action: Schema.optionalKey(
23917 Schema.Union([V2ThreadListResponse__WebSearchAction, Schema.Null]),
26786 Schema.Union([V2ItemCompletedNotification__WebSearchAction, Schema.Null]),
2391826787 ),
2391926788 id: Schema.String,
2392026789 query: Schema.String,
2392126790 results: Schema.optionalKey(
2392226791 Schema.Union([
23923 Schema.Array(Schema.Unknown).annotate({
26792 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
2392426793 description:
2392526794 "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.",
2392626795 }),
......@@ -23931,13 +26800,17 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union(
2393126800 }).annotate({ title: "WebSearchThreadItem" }),
2393226801 Schema.Struct({
2393326802 id: Schema.String,
23934 path: V2ThreadListResponse__LegacyAppPathString,
26803 path: V2ItemCompletedNotification__LegacyAppPathString,
2393526804 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
2393626805 }).annotate({ title: "ImageViewThreadItem" }),
2393726806 Schema.Struct({
2393826807 durationMs: Schema.Number.annotate({ format: "uint64" })
23939 .check(Schema.isInt())
23940 .check(Schema.isGreaterThanOrEqualTo(0)),
26808 .check(Schema.isInt().annotate({ expected: "an integer" }))
26809 .check(
26810 Schema.isGreaterThanOrEqualTo(0).annotate({
26811 expected: "a value greater than or equal to 0",
26812 }),
26813 ),
2394126814 id: Schema.String,
2394226815 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
2394326816 }).annotate({
......@@ -23949,7 +26822,7 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union(
2394926822 result: Schema.String,
2395026823 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2395126824 savedPath: Schema.optionalKey(
23952 Schema.Union([V2ThreadListResponse__AbsolutePathBuf, Schema.Null]),
26825 Schema.Union([V2ItemCompletedNotification__AbsolutePathBuf, Schema.Null]),
2395326826 ),
2395426827 status: Schema.String,
2395526828 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
......@@ -23976,37 +26849,48 @@ export const V2ThreadListResponse__ThreadItem = Schema.Union(
2397626849 }).annotate({ title: "ContextCompactionThreadItem" }),
2397726850 ],
2397826851 { mode: "oneOf" },
23979);
26852).annotate({ identifier: "V2ItemCompletedNotification__ThreadItem" });
2398026853
23981export type V2ThreadMetadataUpdateResponse__TurnError = {
23982 readonly additionalDetails?: string | null;
23983 readonly codexErrorInfo?: V2ThreadMetadataUpdateResponse__CodexErrorInfo | null;
23984 readonly message: string;
26854export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry = {
26855 readonly access: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode;
26856 readonly path: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath;
2398526857};
23986export const V2ThreadMetadataUpdateResponse__TurnError = Schema.Struct({
23987 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
23988 codexErrorInfo: Schema.optionalKey(
23989 Schema.Union([V2ThreadMetadataUpdateResponse__CodexErrorInfo, Schema.Null]),
23990 ),
23991 message: Schema.String,
23992});
26858export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry =
26859 Schema.Struct({
26860 access: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode,
26861 path: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath,
26862 }).annotate({
26863 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry",
26864 });
2399326865
23994export type V2ThreadMetadataUpdateResponse__ThreadItem =
26866export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry = {
26867 readonly access: V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode;
26868 readonly path: V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath;
26869};
26870export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry =
26871 Schema.Struct({
26872 access: V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode,
26873 path: V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath,
26874 }).annotate({
26875 identifier: "V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry",
26876 });
26877
26878export type V2ItemStartedNotification__ThreadItem =
2399526879 | {
2399626880 readonly clientId?: string | null;
23997 readonly content: ReadonlyArray<V2ThreadMetadataUpdateResponse__UserInput>;
26881 readonly content: ReadonlyArray<V2ItemStartedNotification__UserInput>;
2399826882 readonly id: string;
2399926883 readonly type: "userMessage";
2400026884 }
2400126885 | {
24002 readonly fragments: ReadonlyArray<V2ThreadMetadataUpdateResponse__HookPromptFragment>;
26886 readonly fragments: ReadonlyArray<V2ItemStartedNotification__HookPromptFragment>;
2400326887 readonly id: string;
2400426888 readonly type: "hookPrompt";
2400526889 }
2400626890 | {
2400726891 readonly id: string;
24008 readonly memoryCitation?: V2ThreadMetadataUpdateResponse__MemoryCitation | null;
24009 readonly phase?: V2ThreadMetadataUpdateResponse__MessagePhase | null;
26892 readonly memoryCitation?: V2ItemStartedNotification__MemoryCitation | null;
26893 readonly phase?: V2ItemStartedNotification__MessagePhase | null;
2401026894 readonly text: string;
2401126895 readonly delivery?: "async" | null;
2401226896 readonly questions?: ReadonlyArray<{
......@@ -24025,87 +26909,76 @@ export type V2ThreadMetadataUpdateResponse__ThreadItem =
2402526909 | {
2402626910 readonly aggregatedOutput?: string | null;
2402726911 readonly command: string;
24028 readonly commandActions: ReadonlyArray<V2ThreadMetadataUpdateResponse__CommandAction>;
24029 readonly cwd: string;
26912 readonly commandActions: ReadonlyArray<V2ItemStartedNotification__CommandAction>;
26913 readonly cwd: V2ItemStartedNotification__LegacyAppPathString;
2403026914 readonly durationMs?: number | null;
2403126915 readonly exitCode?: number | null;
2403226916 readonly id: string;
2403326917 readonly processId?: string | null;
24034 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
24035 readonly status: V2ThreadMetadataUpdateResponse__CommandExecutionStatus;
26918 readonly source?: V2ItemStartedNotification__CommandExecutionSource;
26919 readonly status: V2ItemStartedNotification__CommandExecutionStatus;
2403626920 readonly type: "commandExecution";
2403726921 }
2403826922 | {
24039 readonly changes: ReadonlyArray<V2ThreadMetadataUpdateResponse__FileUpdateChange>;
26923 readonly changes: ReadonlyArray<V2ItemStartedNotification__FileUpdateChange>;
2404026924 readonly id: string;
24041 readonly status: V2ThreadMetadataUpdateResponse__PatchApplyStatus;
26925 readonly status: V2ItemStartedNotification__PatchApplyStatus;
2404226926 readonly type: "fileChange";
2404326927 }
2404426928 | {
24045 readonly appContext?: V2ThreadMetadataUpdateResponse__McpToolCallAppContext | null;
24046 readonly arguments: unknown;
26929 readonly appContext?: V2ItemStartedNotification__McpToolCallAppContext | null;
26930 readonly arguments: Schema.Json;
2404726931 readonly durationMs?: number | null;
24048 readonly error?: V2ThreadMetadataUpdateResponse__McpToolCallError | null;
26932 readonly error?: V2ItemStartedNotification__McpToolCallError | null;
2404926933 readonly id: string;
2405026934 readonly mcpAppResourceUri?: string | null;
2405126935 readonly pluginId?: string | null;
24052 readonly result?: V2ThreadMetadataUpdateResponse__McpToolCallResult | null;
26936 readonly result?: V2ItemStartedNotification__McpToolCallResult | null;
2405326937 readonly server: string;
24054 readonly status: V2ThreadMetadataUpdateResponse__McpToolCallStatus;
26938 readonly status: V2ItemStartedNotification__McpToolCallStatus;
2405526939 readonly tool: string;
2405626940 readonly type: "mcpToolCall";
2405726941 }
2405826942 | {
24059 readonly arguments: unknown;
24060 readonly contentItems?: ReadonlyArray<V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem> | null;
26943 readonly arguments: Schema.Json;
26944 readonly contentItems?: ReadonlyArray<V2ItemStartedNotification__DynamicToolCallOutputContentItem> | null;
2406126945 readonly durationMs?: number | null;
2406226946 readonly id: string;
2406326947 readonly namespace?: string | null;
24064 readonly status: V2ThreadMetadataUpdateResponse__DynamicToolCallStatus;
26948 readonly status: V2ItemStartedNotification__DynamicToolCallStatus;
2406526949 readonly success?: boolean | null;
2406626950 readonly tool: string;
2406726951 readonly type: "dynamicToolCall";
2406826952 }
2406926953 | {
24070 readonly agentsStates: {
24071 readonly [x: string]: V2ThreadMetadataUpdateResponse__CollabAgentState;
24072 };
26954 readonly agentsStates: { readonly [x: string]: V2ItemStartedNotification__CollabAgentState };
2407326955 readonly id: string;
2407426956 readonly model?: string | null;
2407526957 readonly prompt?: string | null;
24076 readonly reasoningEffort?: V2ThreadMetadataUpdateResponse__ReasoningEffort | null;
26958 readonly reasoningEffort?: V2ItemStartedNotification__ReasoningEffort | null;
2407726959 readonly receiverThreadIds: ReadonlyArray<string>;
2407826960 readonly senderThreadId: string;
24079 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
24080 readonly tool:
24081 | "spawnAgent"
24082 | "sendInput"
24083 | "resumeAgent"
24084 | "wait"
24085 | "closeAgent"
24086 | "sendMessage"
24087 | "followupTask"
24088 | "interruptAgent"
24089 | "listAgents";
26961 readonly status: V2ItemStartedNotification__CollabAgentToolCallStatus;
26962 readonly tool: V2ItemStartedNotification__CollabAgentTool;
2409026963 readonly type: "collabAgentToolCall";
2409126964 }
2409226965 | {
2409326966 readonly agentPath: string;
2409426967 readonly agentThreadId: string;
2409526968 readonly id: string;
24096 readonly kind: V2ThreadMetadataUpdateResponse__SubAgentActivityKind;
26969 readonly kind: V2ItemStartedNotification__SubAgentActivityKind;
2409726970 readonly type: "subAgentActivity";
2409826971 }
2409926972 | {
24100 readonly action?: V2ThreadMetadataUpdateResponse__WebSearchAction | null;
26973 readonly action?: V2ItemStartedNotification__WebSearchAction | null;
2410126974 readonly id: string;
2410226975 readonly query: string;
24103 readonly results?: ReadonlyArray<unknown> | null;
26976 readonly results?: ReadonlyArray<Schema.Json> | null;
2410426977 readonly type: "webSearch";
2410526978 }
2410626979 | {
2410726980 readonly id: string;
24108 readonly path: V2ThreadMetadataUpdateResponse__LegacyAppPathString;
26981 readonly path: V2ItemStartedNotification__LegacyAppPathString;
2410926982 readonly type: "imageView";
2411026983 }
2411126984 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
......@@ -24113,33 +26986,33 @@ export type V2ThreadMetadataUpdateResponse__ThreadItem =
2411326986 readonly id: string;
2411426987 readonly result: string;
2411526988 readonly revisedPrompt?: string | null;
24116 readonly savedPath?: V2ThreadMetadataUpdateResponse__AbsolutePathBuf | null;
26989 readonly savedPath?: V2ItemStartedNotification__AbsolutePathBuf | null;
2411726990 readonly status: string;
2411826991 readonly type: "imageGeneration";
2411926992 }
2412026993 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
2412126994 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
2412226995 | { readonly id: string; readonly type: "contextCompaction" };
24123export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
26996export const V2ItemStartedNotification__ThreadItem = Schema.Union(
2412426997 [
2412526998 Schema.Struct({
2412626999 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24127 content: Schema.Array(V2ThreadMetadataUpdateResponse__UserInput),
27000 content: Schema.Array(V2ItemStartedNotification__UserInput),
2412827001 id: Schema.String,
2412927002 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
2413027003 }).annotate({ title: "UserMessageThreadItem" }),
2413127004 Schema.Struct({
24132 fragments: Schema.Array(V2ThreadMetadataUpdateResponse__HookPromptFragment),
27005 fragments: Schema.Array(V2ItemStartedNotification__HookPromptFragment),
2413327006 id: Schema.String,
2413427007 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
2413527008 }).annotate({ title: "HookPromptThreadItem" }),
2413627009 Schema.Struct({
2413727010 id: Schema.String,
2413827011 memoryCitation: Schema.optionalKey(
24139 Schema.Union([V2ThreadMetadataUpdateResponse__MemoryCitation, Schema.Null]),
27012 Schema.Union([V2ItemStartedNotification__MemoryCitation, Schema.Null]),
2414027013 ),
2414127014 phase: Schema.optionalKey(
24142 Schema.Union([V2ThreadMetadataUpdateResponse__MessagePhase, Schema.Null]),
27015 Schema.Union([V2ItemStartedNotification__MessagePhase, Schema.Null]),
2414327016 ),
2414427017 text: Schema.String,
2414527018 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
......@@ -24181,17 +27054,20 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2418127054 ]),
2418227055 ),
2418327056 command: Schema.String.annotate({ description: "The command to be executed." }),
24184 commandActions: Schema.Array(V2ThreadMetadataUpdateResponse__CommandAction).annotate({
27057 commandActions: Schema.Array(V2ItemStartedNotification__CommandAction).annotate({
2418527058 description:
2418627059 "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.",
2418727060 }),
24188 cwd: Schema.String.annotate({ description: "The command's working directory." }),
27061 cwd: Schema.suspend(
27062 (): Schema.Codec<V2ItemStartedNotification__LegacyAppPathString> =>
27063 V2ItemStartedNotification__LegacyAppPathString,
27064 ).annotate({ description: "The command's working directory." }),
2418927065 durationMs: Schema.optionalKey(
2419027066 Schema.Union([
2419127067 Schema.Number.annotate({
2419227068 description: "The duration of the command execution in milliseconds.",
2419327069 format: "int64",
24194 }).check(Schema.isInt()),
27070 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2419527071 Schema.Null,
2419627072 ]),
2419727073 ),
......@@ -24200,7 +27076,7 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2420027076 Schema.Number.annotate({
2420127077 description: "The command's exit code.",
2420227078 format: "int32",
24203 }).check(Schema.isInt()),
27079 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2420427080 Schema.Null,
2420527081 ]),
2420627082 ),
......@@ -24214,40 +27090,38 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2421427090 ]),
2421527091 ),
2421627092 source: Schema.optionalKey(
24217 Schema.Literals([
24218 "agent",
24219 "userShell",
24220 "unifiedExecStartup",
24221 "unifiedExecInteraction",
24222 ]).annotate({ default: "agent" }),
27093 Schema.suspend(
27094 (): Schema.Codec<V2ItemStartedNotification__CommandExecutionSource> =>
27095 V2ItemStartedNotification__CommandExecutionSource,
27096 ).annotate({ default: "agent" }),
2422327097 ),
24224 status: V2ThreadMetadataUpdateResponse__CommandExecutionStatus,
27098 status: V2ItemStartedNotification__CommandExecutionStatus,
2422527099 type: Schema.Literal("commandExecution").annotate({
2422627100 title: "CommandExecutionThreadItemType",
2422727101 }),
2422827102 }).annotate({ title: "CommandExecutionThreadItem" }),
2422927103 Schema.Struct({
24230 changes: Schema.Array(V2ThreadMetadataUpdateResponse__FileUpdateChange),
27104 changes: Schema.Array(V2ItemStartedNotification__FileUpdateChange),
2423127105 id: Schema.String,
24232 status: V2ThreadMetadataUpdateResponse__PatchApplyStatus,
27106 status: V2ItemStartedNotification__PatchApplyStatus,
2423327107 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
2423427108 }).annotate({ title: "FileChangeThreadItem" }),
2423527109 Schema.Struct({
2423627110 appContext: Schema.optionalKey(
24237 Schema.Union([V2ThreadMetadataUpdateResponse__McpToolCallAppContext, Schema.Null]),
27111 Schema.Union([V2ItemStartedNotification__McpToolCallAppContext, Schema.Null]),
2423827112 ),
24239 arguments: Schema.Unknown,
27113 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2424027114 durationMs: Schema.optionalKey(
2424127115 Schema.Union([
2424227116 Schema.Number.annotate({
2424327117 description: "The duration of the MCP tool call in milliseconds.",
2424427118 format: "int64",
24245 }).check(Schema.isInt()),
27119 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2424627120 Schema.Null,
2424727121 ]),
2424827122 ),
2424927123 error: Schema.optionalKey(
24250 Schema.Union([V2ThreadMetadataUpdateResponse__McpToolCallError, Schema.Null]),
27124 Schema.Union([V2ItemStartedNotification__McpToolCallError, Schema.Null]),
2425127125 ),
2425227126 id: Schema.String,
2425327127 mcpAppResourceUri: Schema.optionalKey(
......@@ -24260,18 +27134,18 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2426027134 ),
2426127135 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2426227136 result: Schema.optionalKey(
24263 Schema.Union([V2ThreadMetadataUpdateResponse__McpToolCallResult, Schema.Null]),
27137 Schema.Union([V2ItemStartedNotification__McpToolCallResult, Schema.Null]),
2426427138 ),
2426527139 server: Schema.String,
24266 status: V2ThreadMetadataUpdateResponse__McpToolCallStatus,
27140 status: V2ItemStartedNotification__McpToolCallStatus,
2426727141 tool: Schema.String,
2426827142 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
2426927143 }).annotate({ title: "McpToolCallThreadItem" }),
2427027144 Schema.Struct({
24271 arguments: Schema.Unknown,
27145 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2427227146 contentItems: Schema.optionalKey(
2427327147 Schema.Union([
24274 Schema.Array(V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem),
27148 Schema.Array(V2ItemStartedNotification__DynamicToolCallOutputContentItem),
2427527149 Schema.Null,
2427627150 ]),
2427727151 ),
......@@ -24280,13 +27154,13 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2428027154 Schema.Number.annotate({
2428127155 description: "The duration of the dynamic tool call in milliseconds.",
2428227156 format: "int64",
24283 }).check(Schema.isInt()),
27157 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2428427158 Schema.Null,
2428527159 ]),
2428627160 ),
2428727161 id: Schema.String,
2428827162 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24289 status: V2ThreadMetadataUpdateResponse__DynamicToolCallStatus,
27163 status: V2ItemStartedNotification__DynamicToolCallStatus,
2429027164 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2429127165 tool: Schema.String,
2429227166 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
......@@ -24294,7 +27168,7 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2429427168 Schema.Struct({
2429527169 agentsStates: Schema.Record(
2429627170 Schema.String,
24297 V2ThreadMetadataUpdateResponse__CollabAgentState,
27171 V2ItemStartedNotification__CollabAgentState,
2429827172 ).annotate({ description: "Last known status of the target agents, when available." }),
2429927173 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
2430027174 model: Schema.optionalKey(
......@@ -24314,7 +27188,7 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2431427188 ]),
2431527189 ),
2431627190 reasoningEffort: Schema.optionalKey(
24317 Schema.Union([V2ThreadMetadataUpdateResponse__ReasoningEffort, Schema.Null]).annotate({
27191 Schema.Union([V2ItemStartedNotification__ReasoningEffort, Schema.Null]).annotate({
2431827192 description: "Reasoning effort requested for the spawned agent, when applicable.",
2431927193 }),
2432027194 ),
......@@ -24325,20 +27199,14 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2432527199 senderThreadId: Schema.String.annotate({
2432627200 description: "Thread ID of the agent issuing the collab request.",
2432727201 }),
24328 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
24329 description: "Current status of the collab tool call.",
24330 }),
24331 tool: Schema.Literals([
24332 "spawnAgent",
24333 "sendInput",
24334 "resumeAgent",
24335 "wait",
24336 "closeAgent",
24337 "sendMessage",
24338 "followupTask",
24339 "interruptAgent",
24340 "listAgents",
24341 ]).annotate({ description: "Name of the collab tool that was invoked." }),
27202 status: Schema.suspend(
27203 (): Schema.Codec<V2ItemStartedNotification__CollabAgentToolCallStatus> =>
27204 V2ItemStartedNotification__CollabAgentToolCallStatus,
27205 ).annotate({ description: "Current status of the collab tool call." }),
27206 tool: Schema.suspend(
27207 (): Schema.Codec<V2ItemStartedNotification__CollabAgentTool> =>
27208 V2ItemStartedNotification__CollabAgentTool,
27209 ).annotate({ description: "Name of the collab tool that was invoked." }),
2434227210 type: Schema.Literal("collabAgentToolCall").annotate({
2434327211 title: "CollabAgentToolCallThreadItemType",
2434427212 }),
......@@ -24347,20 +27215,20 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2434727215 agentPath: Schema.String,
2434827216 agentThreadId: Schema.String,
2434927217 id: Schema.String,
24350 kind: V2ThreadMetadataUpdateResponse__SubAgentActivityKind,
27218 kind: V2ItemStartedNotification__SubAgentActivityKind,
2435127219 type: Schema.Literal("subAgentActivity").annotate({
2435227220 title: "SubAgentActivityThreadItemType",
2435327221 }),
2435427222 }).annotate({ title: "SubAgentActivityThreadItem" }),
2435527223 Schema.Struct({
2435627224 action: Schema.optionalKey(
24357 Schema.Union([V2ThreadMetadataUpdateResponse__WebSearchAction, Schema.Null]),
27225 Schema.Union([V2ItemStartedNotification__WebSearchAction, Schema.Null]),
2435827226 ),
2435927227 id: Schema.String,
2436027228 query: Schema.String,
2436127229 results: Schema.optionalKey(
2436227230 Schema.Union([
24363 Schema.Array(Schema.Unknown).annotate({
27231 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
2436427232 description:
2436527233 "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.",
2436627234 }),
......@@ -24371,13 +27239,17 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2437127239 }).annotate({ title: "WebSearchThreadItem" }),
2437227240 Schema.Struct({
2437327241 id: Schema.String,
24374 path: V2ThreadMetadataUpdateResponse__LegacyAppPathString,
27242 path: V2ItemStartedNotification__LegacyAppPathString,
2437527243 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
2437627244 }).annotate({ title: "ImageViewThreadItem" }),
2437727245 Schema.Struct({
2437827246 durationMs: Schema.Number.annotate({ format: "uint64" })
24379 .check(Schema.isInt())
24380 .check(Schema.isGreaterThanOrEqualTo(0)),
27247 .check(Schema.isInt().annotate({ expected: "an integer" }))
27248 .check(
27249 Schema.isGreaterThanOrEqualTo(0).annotate({
27250 expected: "a value greater than or equal to 0",
27251 }),
27252 ),
2438127253 id: Schema.String,
2438227254 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
2438327255 }).annotate({
......@@ -24389,7 +27261,7 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2438927261 result: Schema.String,
2439027262 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2439127263 savedPath: Schema.optionalKey(
24392 Schema.Union([V2ThreadMetadataUpdateResponse__AbsolutePathBuf, Schema.Null]),
27264 Schema.Union([V2ItemStartedNotification__AbsolutePathBuf, Schema.Null]),
2439327265 ),
2439427266 status: Schema.String,
2439527267 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
......@@ -24416,480 +27288,657 @@ export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2441627288 }).annotate({ title: "ContextCompactionThreadItem" }),
2441727289 ],
2441827290 { mode: "oneOf" },
24419);
27291).annotate({ identifier: "V2ItemStartedNotification__ThreadItem" });
2442027292
24421export type V2ThreadReadResponse__TurnError = {
24422 readonly additionalDetails?: string | null;
24423 readonly codexErrorInfo?: V2ThreadReadResponse__CodexErrorInfo | null;
24424 readonly message: string;
27293export type V2PluginInstalledResponse__PluginSummary = {
27294 readonly authPolicy: V2PluginInstalledResponse__PluginAuthPolicy;
27295 readonly availability?: V2PluginInstalledResponse__PluginAvailability;
27296 readonly enabled: boolean;
27297 readonly id: string;
27298 readonly installPolicy: V2PluginInstalledResponse__PluginInstallPolicy;
27299 readonly installPolicySource?: V2PluginInstalledResponse__PluginInstallPolicySource | null;
27300 readonly installed: boolean;
27301 readonly interface?: V2PluginInstalledResponse__PluginInterface | null;
27302 readonly keywords?: ReadonlyArray<string>;
27303 readonly localVersion?: string | null;
27304 readonly mustShowInstallationInterstitial?: boolean | null;
27305 readonly name: string;
27306 readonly remotePluginId?: string | null;
27307 readonly shareContext?: V2PluginInstalledResponse__PluginShareContext | null;
27308 readonly source: V2PluginInstalledResponse__PluginSource;
27309 readonly version?: string | null;
2442527310};
24426export const V2ThreadReadResponse__TurnError = Schema.Struct({
24427 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24428 codexErrorInfo: Schema.optionalKey(
24429 Schema.Union([V2ThreadReadResponse__CodexErrorInfo, Schema.Null]),
27311export const V2PluginInstalledResponse__PluginSummary = Schema.Struct({
27312 authPolicy: V2PluginInstalledResponse__PluginAuthPolicy,
27313 availability: Schema.optionalKey(
27314 Schema.suspend(
27315 (): Schema.Codec<V2PluginInstalledResponse__PluginAvailability> =>
27316 V2PluginInstalledResponse__PluginAvailability,
27317 ).annotate({
27318 description: "Availability state for installing and using the plugin.",
27319 default: "AVAILABLE",
27320 }),
2443027321 ),
24431 message: Schema.String,
24432});
24433
24434export type V2ThreadReadResponse__ThreadItem =
24435 | {
24436 readonly clientId?: string | null;
24437 readonly content: ReadonlyArray<V2ThreadReadResponse__UserInput>;
24438 readonly id: string;
24439 readonly type: "userMessage";
24440 }
24441 | {
24442 readonly fragments: ReadonlyArray<V2ThreadReadResponse__HookPromptFragment>;
24443 readonly id: string;
24444 readonly type: "hookPrompt";
24445 }
24446 | {
24447 readonly id: string;
24448 readonly memoryCitation?: V2ThreadReadResponse__MemoryCitation | null;
24449 readonly phase?: V2ThreadReadResponse__MessagePhase | null;
24450 readonly text: string;
24451 readonly delivery?: "async" | null;
24452 readonly questions?: ReadonlyArray<{
24453 readonly title: string;
24454 readonly options?: ReadonlyArray<string> | null;
24455 }> | null;
24456 readonly type: "agentMessage";
27322 enabled: Schema.Boolean,
27323 id: Schema.String,
27324 installPolicy: V2PluginInstalledResponse__PluginInstallPolicy,
27325 installPolicySource: Schema.optionalKey(
27326 Schema.Union([V2PluginInstalledResponse__PluginInstallPolicySource, Schema.Null]),
27327 ),
27328 installed: Schema.Boolean,
27329 interface: Schema.optionalKey(
27330 Schema.Union([V2PluginInstalledResponse__PluginInterface, Schema.Null]),
27331 ),
27332 keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
27333 localVersion: Schema.optionalKey(
27334 Schema.Union([
27335 Schema.String.annotate({
27336 description: "Version of the locally materialized plugin package when available.",
27337 }),
27338 Schema.Null,
27339 ]),
27340 ),
27341 mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
27342 name: Schema.String,
27343 remotePluginId: Schema.optionalKey(
27344 Schema.Union([
27345 Schema.String.annotate({ description: "Backend remote plugin identifier when available." }),
27346 Schema.Null,
27347 ]),
27348 ),
27349 shareContext: Schema.optionalKey(
27350 Schema.Union([V2PluginInstalledResponse__PluginShareContext, Schema.Null]).annotate({
27351 description: "Remote sharing context associated with this plugin when available.",
27352 }),
27353 ),
27354 source: V2PluginInstalledResponse__PluginSource,
27355 version: Schema.optionalKey(
27356 Schema.Union([
27357 Schema.String.annotate({
27358 description: "Version advertised by the remote marketplace backend when available.",
27359 }),
27360 Schema.Null,
27361 ]),
27362 ),
27363}).annotate({ identifier: "V2PluginInstalledResponse__PluginSummary" });
27364
27365export type V2PluginListResponse__PluginSummary = {
27366 readonly authPolicy: V2PluginListResponse__PluginAuthPolicy;
27367 readonly availability?: V2PluginListResponse__PluginAvailability;
27368 readonly enabled: boolean;
27369 readonly id: string;
27370 readonly installPolicy: V2PluginListResponse__PluginInstallPolicy;
27371 readonly installPolicySource?: V2PluginListResponse__PluginInstallPolicySource | null;
27372 readonly installed: boolean;
27373 readonly interface?: V2PluginListResponse__PluginInterface | null;
27374 readonly keywords?: ReadonlyArray<string>;
27375 readonly localVersion?: string | null;
27376 readonly mustShowInstallationInterstitial?: boolean | null;
27377 readonly name: string;
27378 readonly remotePluginId?: string | null;
27379 readonly shareContext?: V2PluginListResponse__PluginShareContext | null;
27380 readonly source: V2PluginListResponse__PluginSource;
27381 readonly version?: string | null;
27382};
27383export const V2PluginListResponse__PluginSummary = Schema.Struct({
27384 authPolicy: V2PluginListResponse__PluginAuthPolicy,
27385 availability: Schema.optionalKey(
27386 Schema.suspend(
27387 (): Schema.Codec<V2PluginListResponse__PluginAvailability> =>
27388 V2PluginListResponse__PluginAvailability,
27389 ).annotate({
27390 description: "Availability state for installing and using the plugin.",
27391 default: "AVAILABLE",
27392 }),
27393 ),
27394 enabled: Schema.Boolean,
27395 id: Schema.String,
27396 installPolicy: V2PluginListResponse__PluginInstallPolicy,
27397 installPolicySource: Schema.optionalKey(
27398 Schema.Union([V2PluginListResponse__PluginInstallPolicySource, Schema.Null]),
27399 ),
27400 installed: Schema.Boolean,
27401 interface: Schema.optionalKey(Schema.Union([V2PluginListResponse__PluginInterface, Schema.Null])),
27402 keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
27403 localVersion: Schema.optionalKey(
27404 Schema.Union([
27405 Schema.String.annotate({
27406 description: "Version of the locally materialized plugin package when available.",
27407 }),
27408 Schema.Null,
27409 ]),
27410 ),
27411 mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
27412 name: Schema.String,
27413 remotePluginId: Schema.optionalKey(
27414 Schema.Union([
27415 Schema.String.annotate({ description: "Backend remote plugin identifier when available." }),
27416 Schema.Null,
27417 ]),
27418 ),
27419 shareContext: Schema.optionalKey(
27420 Schema.Union([V2PluginListResponse__PluginShareContext, Schema.Null]).annotate({
27421 description: "Remote sharing context associated with this plugin when available.",
27422 }),
27423 ),
27424 source: V2PluginListResponse__PluginSource,
27425 version: Schema.optionalKey(
27426 Schema.Union([
27427 Schema.String.annotate({
27428 description: "Version advertised by the remote marketplace backend when available.",
27429 }),
27430 Schema.Null,
27431 ]),
27432 ),
27433}).annotate({ identifier: "V2PluginListResponse__PluginSummary" });
27434
27435export type V2PluginReadResponse__PluginSummary = {
27436 readonly authPolicy: V2PluginReadResponse__PluginAuthPolicy;
27437 readonly availability?: V2PluginReadResponse__PluginAvailability;
27438 readonly enabled: boolean;
27439 readonly id: string;
27440 readonly installPolicy: V2PluginReadResponse__PluginInstallPolicy;
27441 readonly installPolicySource?: V2PluginReadResponse__PluginInstallPolicySource | null;
27442 readonly installed: boolean;
27443 readonly interface?: V2PluginReadResponse__PluginInterface | null;
27444 readonly keywords?: ReadonlyArray<string>;
27445 readonly localVersion?: string | null;
27446 readonly mustShowInstallationInterstitial?: boolean | null;
27447 readonly name: string;
27448 readonly remotePluginId?: string | null;
27449 readonly shareContext?: V2PluginReadResponse__PluginShareContext | null;
27450 readonly source: V2PluginReadResponse__PluginSource;
27451 readonly version?: string | null;
27452};
27453export const V2PluginReadResponse__PluginSummary = Schema.Struct({
27454 authPolicy: V2PluginReadResponse__PluginAuthPolicy,
27455 availability: Schema.optionalKey(
27456 Schema.suspend(
27457 (): Schema.Codec<V2PluginReadResponse__PluginAvailability> =>
27458 V2PluginReadResponse__PluginAvailability,
27459 ).annotate({
27460 description: "Availability state for installing and using the plugin.",
27461 default: "AVAILABLE",
27462 }),
27463 ),
27464 enabled: Schema.Boolean,
27465 id: Schema.String,
27466 installPolicy: V2PluginReadResponse__PluginInstallPolicy,
27467 installPolicySource: Schema.optionalKey(
27468 Schema.Union([V2PluginReadResponse__PluginInstallPolicySource, Schema.Null]),
27469 ),
27470 installed: Schema.Boolean,
27471 interface: Schema.optionalKey(Schema.Union([V2PluginReadResponse__PluginInterface, Schema.Null])),
27472 keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
27473 localVersion: Schema.optionalKey(
27474 Schema.Union([
27475 Schema.String.annotate({
27476 description: "Version of the locally materialized plugin package when available.",
27477 }),
27478 Schema.Null,
27479 ]),
27480 ),
27481 mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
27482 name: Schema.String,
27483 remotePluginId: Schema.optionalKey(
27484 Schema.Union([
27485 Schema.String.annotate({ description: "Backend remote plugin identifier when available." }),
27486 Schema.Null,
27487 ]),
27488 ),
27489 shareContext: Schema.optionalKey(
27490 Schema.Union([V2PluginReadResponse__PluginShareContext, Schema.Null]).annotate({
27491 description: "Remote sharing context associated with this plugin when available.",
27492 }),
27493 ),
27494 source: V2PluginReadResponse__PluginSource,
27495 version: Schema.optionalKey(
27496 Schema.Union([
27497 Schema.String.annotate({
27498 description: "Version advertised by the remote marketplace backend when available.",
27499 }),
27500 Schema.Null,
27501 ]),
27502 ),
27503}).annotate({ identifier: "V2PluginReadResponse__PluginSummary" });
27504
27505export type V2PluginShareListResponse__PluginSummary = {
27506 readonly authPolicy: V2PluginShareListResponse__PluginAuthPolicy;
27507 readonly availability?: V2PluginShareListResponse__PluginAvailability;
27508 readonly enabled: boolean;
27509 readonly id: string;
27510 readonly installPolicy: V2PluginShareListResponse__PluginInstallPolicy;
27511 readonly installPolicySource?: V2PluginShareListResponse__PluginInstallPolicySource | null;
27512 readonly installed: boolean;
27513 readonly interface?: V2PluginShareListResponse__PluginInterface | null;
27514 readonly keywords?: ReadonlyArray<string>;
27515 readonly localVersion?: string | null;
27516 readonly mustShowInstallationInterstitial?: boolean | null;
27517 readonly name: string;
27518 readonly remotePluginId?: string | null;
27519 readonly shareContext?: V2PluginShareListResponse__PluginShareContext | null;
27520 readonly source: V2PluginShareListResponse__PluginSource;
27521 readonly version?: string | null;
27522};
27523export const V2PluginShareListResponse__PluginSummary = Schema.Struct({
27524 authPolicy: V2PluginShareListResponse__PluginAuthPolicy,
27525 availability: Schema.optionalKey(
27526 Schema.suspend(
27527 (): Schema.Codec<V2PluginShareListResponse__PluginAvailability> =>
27528 V2PluginShareListResponse__PluginAvailability,
27529 ).annotate({
27530 description: "Availability state for installing and using the plugin.",
27531 default: "AVAILABLE",
27532 }),
27533 ),
27534 enabled: Schema.Boolean,
27535 id: Schema.String,
27536 installPolicy: V2PluginShareListResponse__PluginInstallPolicy,
27537 installPolicySource: Schema.optionalKey(
27538 Schema.Union([V2PluginShareListResponse__PluginInstallPolicySource, Schema.Null]),
27539 ),
27540 installed: Schema.Boolean,
27541 interface: Schema.optionalKey(
27542 Schema.Union([V2PluginShareListResponse__PluginInterface, Schema.Null]),
27543 ),
27544 keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
27545 localVersion: Schema.optionalKey(
27546 Schema.Union([
27547 Schema.String.annotate({
27548 description: "Version of the locally materialized plugin package when available.",
27549 }),
27550 Schema.Null,
27551 ]),
27552 ),
27553 mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
27554 name: Schema.String,
27555 remotePluginId: Schema.optionalKey(
27556 Schema.Union([
27557 Schema.String.annotate({ description: "Backend remote plugin identifier when available." }),
27558 Schema.Null,
27559 ]),
27560 ),
27561 shareContext: Schema.optionalKey(
27562 Schema.Union([V2PluginShareListResponse__PluginShareContext, Schema.Null]).annotate({
27563 description: "Remote sharing context associated with this plugin when available.",
27564 }),
27565 ),
27566 source: V2PluginShareListResponse__PluginSource,
27567 version: Schema.optionalKey(
27568 Schema.Union([
27569 Schema.String.annotate({
27570 description: "Version advertised by the remote marketplace backend when available.",
27571 }),
27572 Schema.Null,
27573 ]),
27574 ),
27575}).annotate({ identifier: "V2PluginShareListResponse__PluginSummary" });
27576
27577export type V2RawResponseItemCompletedNotification__ResponseItem =
27578 | {
27579 readonly content: ReadonlyArray<V2RawResponseItemCompletedNotification__ContentItem>;
27580 readonly id?: string | null;
27581 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27582 readonly phase?: V2RawResponseItemCompletedNotification__MessagePhase | null;
27583 readonly role: string;
27584 readonly type: "message";
2445727585 }
24458 | { readonly id: string; readonly text: string; readonly type: "plan" }
2445927586 | {
24460 readonly content?: ReadonlyArray<string>;
24461 readonly id: string;
24462 readonly summary?: ReadonlyArray<string>;
27587 readonly author: string;
27588 readonly content: ReadonlyArray<V2RawResponseItemCompletedNotification__AgentMessageInputContent>;
27589 readonly id?: string | null;
27590 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27591 readonly recipient: string;
27592 readonly type: "agent_message";
27593 }
27594 | {
27595 readonly content?: ReadonlyArray<V2RawResponseItemCompletedNotification__ReasoningItemContent> | null;
27596 readonly encrypted_content?: string | null;
27597 readonly id?: string | null;
27598 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27599 readonly summary: ReadonlyArray<V2RawResponseItemCompletedNotification__ReasoningItemReasoningSummary>;
2446327600 readonly type: "reasoning";
2446427601 }
2446527602 | {
24466 readonly aggregatedOutput?: string | null;
24467 readonly command: string;
24468 readonly commandActions: ReadonlyArray<V2ThreadReadResponse__CommandAction>;
24469 readonly cwd: string;
24470 readonly durationMs?: number | null;
24471 readonly exitCode?: number | null;
24472 readonly id: string;
24473 readonly processId?: string | null;
24474 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
24475 readonly status: V2ThreadReadResponse__CommandExecutionStatus;
24476 readonly type: "commandExecution";
27603 readonly action: V2RawResponseItemCompletedNotification__LocalShellAction;
27604 readonly call_id?: string | null;
27605 readonly id?: string | null;
27606 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27607 readonly status: V2RawResponseItemCompletedNotification__LocalShellStatus;
27608 readonly type: "local_shell_call";
2447727609 }
2447827610 | {
24479 readonly changes: ReadonlyArray<V2ThreadReadResponse__FileUpdateChange>;
24480 readonly id: string;
24481 readonly status: V2ThreadReadResponse__PatchApplyStatus;
24482 readonly type: "fileChange";
27611 readonly arguments: string;
27612 readonly call_id: string;
27613 readonly id?: string | null;
27614 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27615 readonly name: string;
27616 readonly namespace?: string | null;
27617 readonly type: "function_call";
2448327618 }
2448427619 | {
24485 readonly appContext?: V2ThreadReadResponse__McpToolCallAppContext | null;
24486 readonly arguments: unknown;
24487 readonly durationMs?: number | null;
24488 readonly error?: V2ThreadReadResponse__McpToolCallError | null;
24489 readonly id: string;
24490 readonly mcpAppResourceUri?: string | null;
24491 readonly pluginId?: string | null;
24492 readonly result?: V2ThreadReadResponse__McpToolCallResult | null;
24493 readonly server: string;
24494 readonly status: V2ThreadReadResponse__McpToolCallStatus;
24495 readonly tool: string;
24496 readonly type: "mcpToolCall";
27620 readonly arguments: Schema.Json;
27621 readonly call_id?: string | null;
27622 readonly execution: string;
27623 readonly id?: string | null;
27624 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27625 readonly status?: string | null;
27626 readonly type: "tool_search_call";
2449727627 }
2449827628 | {
24499 readonly arguments: unknown;
24500 readonly contentItems?: ReadonlyArray<V2ThreadReadResponse__DynamicToolCallOutputContentItem> | null;
24501 readonly durationMs?: number | null;
24502 readonly id: string;
24503 readonly namespace?: string | null;
24504 readonly status: V2ThreadReadResponse__DynamicToolCallStatus;
24505 readonly success?: boolean | null;
24506 readonly tool: string;
24507 readonly type: "dynamicToolCall";
27629 readonly call_id: string;
27630 readonly id?: string | null;
27631 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27632 readonly output: V2RawResponseItemCompletedNotification__FunctionCallOutputBody;
27633 readonly type: "function_call_output";
2450827634 }
2450927635 | {
24510 readonly agentsStates: { readonly [x: string]: V2ThreadReadResponse__CollabAgentState };
24511 readonly id: string;
24512 readonly model?: string | null;
24513 readonly prompt?: string | null;
24514 readonly reasoningEffort?: V2ThreadReadResponse__ReasoningEffort | null;
24515 readonly receiverThreadIds: ReadonlyArray<string>;
24516 readonly senderThreadId: string;
24517 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
24518 readonly tool:
24519 | "spawnAgent"
24520 | "sendInput"
24521 | "resumeAgent"
24522 | "wait"
24523 | "closeAgent"
24524 | "sendMessage"
24525 | "followupTask"
24526 | "interruptAgent"
24527 | "listAgents";
24528 readonly type: "collabAgentToolCall";
27636 readonly call_id: string;
27637 readonly id?: string | null;
27638 readonly input: string;
27639 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27640 readonly name: string;
27641 readonly namespace?: string | null;
27642 readonly status?: string | null;
27643 readonly type: "custom_tool_call";
2452927644 }
2453027645 | {
24531 readonly agentPath: string;
24532 readonly agentThreadId: string;
24533 readonly id: string;
24534 readonly kind: V2ThreadReadResponse__SubAgentActivityKind;
24535 readonly type: "subAgentActivity";
27646 readonly call_id: string;
27647 readonly id?: string | null;
27648 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27649 readonly name?: string | null;
27650 readonly output: V2RawResponseItemCompletedNotification__FunctionCallOutputBody;
27651 readonly type: "custom_tool_call_output";
2453627652 }
2453727653 | {
24538 readonly action?: V2ThreadReadResponse__WebSearchAction | null;
24539 readonly id: string;
24540 readonly query: string;
24541 readonly results?: ReadonlyArray<unknown> | null;
24542 readonly type: "webSearch";
27654 readonly call_id?: string | null;
27655 readonly execution: string;
27656 readonly id?: string | null;
27657 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27658 readonly status: string;
27659 readonly tools: ReadonlyArray<Schema.Json>;
27660 readonly type: "tool_search_output";
2454327661 }
2454427662 | {
24545 readonly id: string;
24546 readonly path: V2ThreadReadResponse__LegacyAppPathString;
24547 readonly type: "imageView";
27663 readonly action?: V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction | null;
27664 readonly id?: string | null;
27665 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27666 readonly status?: string | null;
27667 readonly type: "web_search_call";
2454827668 }
24549 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
2455027669 | {
24551 readonly id: string;
27670 readonly id?: string | null;
27671 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
2455227672 readonly result: string;
24553 readonly revisedPrompt?: string | null;
24554 readonly savedPath?: V2ThreadReadResponse__AbsolutePathBuf | null;
27673 readonly revised_prompt?: string | null;
2455527674 readonly status: string;
24556 readonly type: "imageGeneration";
27675 readonly type: "image_generation_call";
2455727676 }
24558 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
24559 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
24560 | { readonly id: string; readonly type: "contextCompaction" };
24561export const V2ThreadReadResponse__ThreadItem = Schema.Union(
27677 | {
27678 readonly encrypted_content: string;
27679 readonly id?: string | null;
27680 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27681 readonly type: "compaction";
27682 }
27683 | { readonly type: "compaction_trigger" }
27684 | {
27685 readonly encrypted_content?: string | null;
27686 readonly id?: string | null;
27687 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
27688 readonly type: "context_compaction";
27689 }
27690 | { readonly type: "other" };
27691export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union(
2456227692 [
2456327693 Schema.Struct({
24564 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24565 content: Schema.Array(V2ThreadReadResponse__UserInput),
24566 id: Schema.String,
24567 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
24568 }).annotate({ title: "UserMessageThreadItem" }),
24569 Schema.Struct({
24570 fragments: Schema.Array(V2ThreadReadResponse__HookPromptFragment),
24571 id: Schema.String,
24572 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
24573 }).annotate({ title: "HookPromptThreadItem" }),
24574 Schema.Struct({
24575 id: Schema.String,
24576 memoryCitation: Schema.optionalKey(
24577 Schema.Union([V2ThreadReadResponse__MemoryCitation, Schema.Null]),
24578 ),
24579 phase: Schema.optionalKey(Schema.Union([V2ThreadReadResponse__MessagePhase, Schema.Null])),
24580 text: Schema.String,
24581 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
24582 questions: Schema.optionalKey(
27694 content: Schema.Array(V2RawResponseItemCompletedNotification__ContentItem),
27695 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27696 internal_chat_message_metadata_passthrough: Schema.optionalKey(
2458327697 Schema.Union([
24584 Schema.Array(
24585 Schema.Struct({
24586 title: Schema.String,
24587 options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
24588 }),
24589 ),
27698 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
2459027699 Schema.Null,
2459127700 ]),
2459227701 ),
24593 type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }),
24594 }).annotate({ title: "AgentMessageThreadItem" }),
24595 Schema.Struct({
24596 id: Schema.String,
24597 text: Schema.String,
24598 type: Schema.Literal("plan").annotate({ title: "PlanThreadItemType" }),
24599 }).annotate({
24600 title: "PlanThreadItem",
24601 description:
24602 "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
24603 }),
27702 phase: Schema.optionalKey(
27703 Schema.Union([V2RawResponseItemCompletedNotification__MessagePhase, Schema.Null]),
27704 ),
27705 role: Schema.String,
27706 type: Schema.Literal("message").annotate({ title: "MessageResponseItemType" }),
27707 }).annotate({ title: "MessageResponseItem" }),
2460427708 Schema.Struct({
24605 content: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
24606 id: Schema.String,
24607 summary: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
24608 type: Schema.Literal("reasoning").annotate({ title: "ReasoningThreadItemType" }),
24609 }).annotate({ title: "ReasoningThreadItem" }),
27709 author: Schema.String,
27710 content: Schema.Array(V2RawResponseItemCompletedNotification__AgentMessageInputContent),
27711 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27712 internal_chat_message_metadata_passthrough: Schema.optionalKey(
27713 Schema.Union([
27714 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
27715 Schema.Null,
27716 ]),
27717 ),
27718 recipient: Schema.String,
27719 type: Schema.Literal("agent_message").annotate({ title: "AgentMessageResponseItemType" }),
27720 }).annotate({ title: "AgentMessageResponseItem" }),
2461027721 Schema.Struct({
24611 aggregatedOutput: Schema.optionalKey(
27722 content: Schema.optionalKey(
2461227723 Schema.Union([
24613 Schema.String.annotate({
24614 description: "The command's output, aggregated from stdout and stderr.",
24615 }),
27724 Schema.Array(V2RawResponseItemCompletedNotification__ReasoningItemContent),
2461627725 Schema.Null,
2461727726 ]),
2461827727 ),
24619 command: Schema.String.annotate({ description: "The command to be executed." }),
24620 commandActions: Schema.Array(V2ThreadReadResponse__CommandAction).annotate({
24621 description:
24622 "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.",
24623 }),
24624 cwd: Schema.String.annotate({ description: "The command's working directory." }),
24625 durationMs: Schema.optionalKey(
27728 encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27729 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27730 internal_chat_message_metadata_passthrough: Schema.optionalKey(
2462627731 Schema.Union([
24627 Schema.Number.annotate({
24628 description: "The duration of the command execution in milliseconds.",
24629 format: "int64",
24630 }).check(Schema.isInt()),
27732 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
2463127733 Schema.Null,
2463227734 ]),
2463327735 ),
24634 exitCode: Schema.optionalKey(
27736 summary: Schema.Array(V2RawResponseItemCompletedNotification__ReasoningItemReasoningSummary),
27737 type: Schema.Literal("reasoning").annotate({ title: "ReasoningResponseItemType" }),
27738 }).annotate({ title: "ReasoningResponseItem" }),
27739 Schema.Struct({
27740 action: V2RawResponseItemCompletedNotification__LocalShellAction,
27741 call_id: Schema.optionalKey(
2463527742 Schema.Union([
24636 Schema.Number.annotate({
24637 description: "The command's exit code.",
24638 format: "int32",
24639 }).check(Schema.isInt()),
27743 Schema.String.annotate({ description: "Set when using the Responses API." }),
2464027744 Schema.Null,
2464127745 ]),
2464227746 ),
24643 id: Schema.String,
24644 processId: Schema.optionalKey(
27747 id: Schema.optionalKey(
2464527748 Schema.Union([
2464627749 Schema.String.annotate({
24647 description: "Identifier for the underlying PTY process (when available).",
27750 description: "Legacy id field retained for compatibility with older payloads.",
2464827751 }),
2464927752 Schema.Null,
2465027753 ]),
2465127754 ),
24652 source: Schema.optionalKey(
24653 Schema.Literals([
24654 "agent",
24655 "userShell",
24656 "unifiedExecStartup",
24657 "unifiedExecInteraction",
24658 ]).annotate({ default: "agent" }),
27755 internal_chat_message_metadata_passthrough: Schema.optionalKey(
27756 Schema.Union([
27757 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
27758 Schema.Null,
27759 ]),
2465927760 ),
24660 status: V2ThreadReadResponse__CommandExecutionStatus,
24661 type: Schema.Literal("commandExecution").annotate({
24662 title: "CommandExecutionThreadItemType",
27761 status: V2RawResponseItemCompletedNotification__LocalShellStatus,
27762 type: Schema.Literal("local_shell_call").annotate({
27763 title: "LocalShellCallResponseItemType",
2466327764 }),
24664 }).annotate({ title: "CommandExecutionThreadItem" }),
27765 }).annotate({ title: "LocalShellCallResponseItem" }),
2466527766 Schema.Struct({
24666 changes: Schema.Array(V2ThreadReadResponse__FileUpdateChange),
24667 id: Schema.String,
24668 status: V2ThreadReadResponse__PatchApplyStatus,
24669 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
24670 }).annotate({ title: "FileChangeThreadItem" }),
24671 Schema.Struct({
24672 appContext: Schema.optionalKey(
24673 Schema.Union([V2ThreadReadResponse__McpToolCallAppContext, Schema.Null]),
24674 ),
24675 arguments: Schema.Unknown,
24676 durationMs: Schema.optionalKey(
27767 arguments: Schema.String,
27768 call_id: Schema.String,
27769 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27770 internal_chat_message_metadata_passthrough: Schema.optionalKey(
2467727771 Schema.Union([
24678 Schema.Number.annotate({
24679 description: "The duration of the MCP tool call in milliseconds.",
24680 format: "int64",
24681 }).check(Schema.isInt()),
27772 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
2468227773 Schema.Null,
2468327774 ]),
2468427775 ),
24685 error: Schema.optionalKey(
24686 Schema.Union([V2ThreadReadResponse__McpToolCallError, Schema.Null]),
24687 ),
24688 id: Schema.String,
24689 mcpAppResourceUri: Schema.optionalKey(
27776 name: Schema.String,
27777 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27778 type: Schema.Literal("function_call").annotate({ title: "FunctionCallResponseItemType" }),
27779 }).annotate({ title: "FunctionCallResponseItem" }),
27780 Schema.Struct({
27781 arguments: Schema.Json.annotate({ expected: "JSON value" }),
27782 call_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27783 execution: Schema.String,
27784 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27785 internal_chat_message_metadata_passthrough: Schema.optionalKey(
2469027786 Schema.Union([
24691 Schema.String.annotate({
24692 description: "Deprecated: use `appContext.resourceUri` instead.",
24693 }),
27787 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
2469427788 Schema.Null,
2469527789 ]),
2469627790 ),
24697 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24698 result: Schema.optionalKey(
24699 Schema.Union([V2ThreadReadResponse__McpToolCallResult, Schema.Null]),
24700 ),
24701 server: Schema.String,
24702 status: V2ThreadReadResponse__McpToolCallStatus,
24703 tool: Schema.String,
24704 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
24705 }).annotate({ title: "McpToolCallThreadItem" }),
27791 status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27792 type: Schema.Literal("tool_search_call").annotate({
27793 title: "ToolSearchCallResponseItemType",
27794 }),
27795 }).annotate({ title: "ToolSearchCallResponseItem" }),
2470627796 Schema.Struct({
24707 arguments: Schema.Unknown,
24708 contentItems: Schema.optionalKey(
27797 call_id: Schema.String,
27798 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27799 internal_chat_message_metadata_passthrough: Schema.optionalKey(
2470927800 Schema.Union([
24710 Schema.Array(V2ThreadReadResponse__DynamicToolCallOutputContentItem),
27801 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
2471127802 Schema.Null,
2471227803 ]),
2471327804 ),
24714 durationMs: Schema.optionalKey(
27805 output: V2RawResponseItemCompletedNotification__FunctionCallOutputBody,
27806 type: Schema.Literal("function_call_output").annotate({
27807 title: "FunctionCallOutputResponseItemType",
27808 }),
27809 }).annotate({ title: "FunctionCallOutputResponseItem" }),
27810 Schema.Struct({
27811 call_id: Schema.String,
27812 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27813 input: Schema.String,
27814 internal_chat_message_metadata_passthrough: Schema.optionalKey(
2471527815 Schema.Union([
24716 Schema.Number.annotate({
24717 description: "The duration of the dynamic tool call in milliseconds.",
24718 format: "int64",
24719 }).check(Schema.isInt()),
27816 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
2472027817 Schema.Null,
2472127818 ]),
2472227819 ),
24723 id: Schema.String,
27820 name: Schema.String,
2472427821 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24725 status: V2ThreadReadResponse__DynamicToolCallStatus,
24726 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
24727 tool: Schema.String,
24728 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
24729 }).annotate({ title: "DynamicToolCallThreadItem" }),
24730 Schema.Struct({
24731 agentsStates: Schema.Record(Schema.String, V2ThreadReadResponse__CollabAgentState).annotate({
24732 description: "Last known status of the target agents, when available.",
27822 status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27823 type: Schema.Literal("custom_tool_call").annotate({
27824 title: "CustomToolCallResponseItemType",
2473327825 }),
24734 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
24735 model: Schema.optionalKey(
27826 }).annotate({ title: "CustomToolCallResponseItem" }),
27827 Schema.Struct({
27828 call_id: Schema.String,
27829 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27830 internal_chat_message_metadata_passthrough: Schema.optionalKey(
2473627831 Schema.Union([
24737 Schema.String.annotate({
24738 description: "Model requested for the spawned agent, when applicable.",
24739 }),
27832 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
2474027833 Schema.Null,
2474127834 ]),
2474227835 ),
24743 prompt: Schema.optionalKey(
27836 name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27837 output: V2RawResponseItemCompletedNotification__FunctionCallOutputBody,
27838 type: Schema.Literal("custom_tool_call_output").annotate({
27839 title: "CustomToolCallOutputResponseItemType",
27840 }),
27841 }).annotate({ title: "CustomToolCallOutputResponseItem" }),
27842 Schema.Struct({
27843 call_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27844 execution: Schema.String,
27845 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27846 internal_chat_message_metadata_passthrough: Schema.optionalKey(
2474427847 Schema.Union([
24745 Schema.String.annotate({
24746 description: "Prompt text sent as part of the collab tool call, when available.",
24747 }),
27848 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
2474827849 Schema.Null,
2474927850 ]),
2475027851 ),
24751 reasoningEffort: Schema.optionalKey(
24752 Schema.Union([V2ThreadReadResponse__ReasoningEffort, Schema.Null]).annotate({
24753 description: "Reasoning effort requested for the spawned agent, when applicable.",
24754 }),
24755 ),
24756 receiverThreadIds: Schema.Array(Schema.String).annotate({
24757 description:
24758 "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
24759 }),
24760 senderThreadId: Schema.String.annotate({
24761 description: "Thread ID of the agent issuing the collab request.",
24762 }),
24763 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
24764 description: "Current status of the collab tool call.",
24765 }),
24766 tool: Schema.Literals([
24767 "spawnAgent",
24768 "sendInput",
24769 "resumeAgent",
24770 "wait",
24771 "closeAgent",
24772 "sendMessage",
24773 "followupTask",
24774 "interruptAgent",
24775 "listAgents",
24776 ]).annotate({ description: "Name of the collab tool that was invoked." }),
24777 type: Schema.Literal("collabAgentToolCall").annotate({
24778 title: "CollabAgentToolCallThreadItemType",
24779 }),
24780 }).annotate({ title: "CollabAgentToolCallThreadItem" }),
24781 Schema.Struct({
24782 agentPath: Schema.String,
24783 agentThreadId: Schema.String,
24784 id: Schema.String,
24785 kind: V2ThreadReadResponse__SubAgentActivityKind,
24786 type: Schema.Literal("subAgentActivity").annotate({
24787 title: "SubAgentActivityThreadItemType",
27852 status: Schema.String,
27853 tools: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
27854 type: Schema.Literal("tool_search_output").annotate({
27855 title: "ToolSearchOutputResponseItemType",
2478827856 }),
24789 }).annotate({ title: "SubAgentActivityThreadItem" }),
27857 }).annotate({ title: "ToolSearchOutputResponseItem" }),
2479027858 Schema.Struct({
2479127859 action: Schema.optionalKey(
24792 Schema.Union([V2ThreadReadResponse__WebSearchAction, Schema.Null]),
27860 Schema.Union([
27861 V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction,
27862 Schema.Null,
27863 ]),
2479327864 ),
24794 id: Schema.String,
24795 query: Schema.String,
24796 results: Schema.optionalKey(
27865 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27866 internal_chat_message_metadata_passthrough: Schema.optionalKey(
2479727867 Schema.Union([
24798 Schema.Array(Schema.Unknown).annotate({
24799 description:
24800 "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.",
24801 }),
27868 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
2480227869 Schema.Null,
2480327870 ]),
2480427871 ),
24805 type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }),
24806 }).annotate({ title: "WebSearchThreadItem" }),
24807 Schema.Struct({
24808 id: Schema.String,
24809 path: V2ThreadReadResponse__LegacyAppPathString,
24810 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
24811 }).annotate({ title: "ImageViewThreadItem" }),
24812 Schema.Struct({
24813 durationMs: Schema.Number.annotate({ format: "uint64" })
24814 .check(Schema.isInt())
24815 .check(Schema.isGreaterThanOrEqualTo(0)),
24816 id: Schema.String,
24817 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
24818 }).annotate({
24819 title: "SleepThreadItem",
24820 description: "Display item emitted by the interruptible `clock.sleep` tool.",
24821 }),
27872 status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27873 type: Schema.Literal("web_search_call").annotate({ title: "WebSearchCallResponseItemType" }),
27874 }).annotate({ title: "WebSearchCallResponseItem" }),
2482227875 Schema.Struct({
24823 id: Schema.String,
24824 result: Schema.String,
24825 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24826 savedPath: Schema.optionalKey(
24827 Schema.Union([V2ThreadReadResponse__AbsolutePathBuf, Schema.Null]),
27876 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27877 internal_chat_message_metadata_passthrough: Schema.optionalKey(
27878 Schema.Union([
27879 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
27880 Schema.Null,
27881 ]),
2482827882 ),
27883 result: Schema.String,
27884 revised_prompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2482927885 status: Schema.String,
24830 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
24831 }).annotate({ title: "ImageGenerationThreadItem" }),
24832 Schema.Struct({
24833 id: Schema.String,
24834 review: Schema.String,
24835 type: Schema.Literal("enteredReviewMode").annotate({
24836 title: "EnteredReviewModeThreadItemType",
27886 type: Schema.Literal("image_generation_call").annotate({
27887 title: "ImageGenerationCallResponseItemType",
2483727888 }),
24838 }).annotate({ title: "EnteredReviewModeThreadItem" }),
27889 }).annotate({ title: "ImageGenerationCallResponseItem" }),
2483927890 Schema.Struct({
24840 id: Schema.String,
24841 review: Schema.String,
24842 type: Schema.Literal("exitedReviewMode").annotate({
24843 title: "ExitedReviewModeThreadItemType",
27891 encrypted_content: Schema.String,
27892 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27893 internal_chat_message_metadata_passthrough: Schema.optionalKey(
27894 Schema.Union([
27895 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
27896 Schema.Null,
27897 ]),
27898 ),
27899 type: Schema.Literal("compaction").annotate({ title: "CompactionResponseItemType" }),
27900 }).annotate({ title: "CompactionResponseItem" }),
27901 Schema.Struct({
27902 type: Schema.Literal("compaction_trigger").annotate({
27903 title: "CompactionTriggerResponseItemType",
2484427904 }),
24845 }).annotate({ title: "ExitedReviewModeThreadItem" }),
27905 }).annotate({ title: "CompactionTriggerResponseItem" }),
2484627906 Schema.Struct({
24847 id: Schema.String,
24848 type: Schema.Literal("contextCompaction").annotate({
24849 title: "ContextCompactionThreadItemType",
27907 encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27908 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27909 internal_chat_message_metadata_passthrough: Schema.optionalKey(
27910 Schema.Union([
27911 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
27912 Schema.Null,
27913 ]),
27914 ),
27915 type: Schema.Literal("context_compaction").annotate({
27916 title: "ContextCompactionResponseItemType",
2485027917 }),
24851 }).annotate({ title: "ContextCompactionThreadItem" }),
27918 }).annotate({ title: "ContextCompactionResponseItem" }),
27919 Schema.Struct({
27920 type: Schema.Literal("other").annotate({ title: "OtherResponseItemType" }),
27921 }).annotate({ title: "OtherResponseItem" }),
2485227922 ],
2485327923 { mode: "oneOf" },
24854);
27924).annotate({ identifier: "V2RawResponseItemCompletedNotification__ResponseItem" });
2485527925
24856export type V2ThreadResumeParams__FunctionCallOutputBody =
24857 | string
24858 | ReadonlyArray<V2ThreadResumeParams__FunctionCallOutputContentItem>;
24859export const V2ThreadResumeParams__FunctionCallOutputBody = Schema.Union([
24860 Schema.String,
24861 Schema.Array(V2ThreadResumeParams__FunctionCallOutputContentItem),
24862]);
24863
24864export type V2ThreadResumeResponse__TurnError = {
24865 readonly additionalDetails?: string | null;
24866 readonly codexErrorInfo?: V2ThreadResumeResponse__CodexErrorInfo | null;
24867 readonly message: string;
24868};
24869export const V2ThreadResumeResponse__TurnError = Schema.Struct({
24870 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24871 codexErrorInfo: Schema.optionalKey(
24872 Schema.Union([V2ThreadResumeResponse__CodexErrorInfo, Schema.Null]),
24873 ),
24874 message: Schema.String,
24875});
24876
24877export type V2ThreadResumeResponse__ThreadItem =
27926export type V2ReviewStartResponse__ThreadItem =
2487827927 | {
2487927928 readonly clientId?: string | null;
24880 readonly content: ReadonlyArray<V2ThreadResumeResponse__UserInput>;
27929 readonly content: ReadonlyArray<V2ReviewStartResponse__UserInput>;
2488127930 readonly id: string;
2488227931 readonly type: "userMessage";
2488327932 }
2488427933 | {
24885 readonly fragments: ReadonlyArray<V2ThreadResumeResponse__HookPromptFragment>;
27934 readonly fragments: ReadonlyArray<V2ReviewStartResponse__HookPromptFragment>;
2488627935 readonly id: string;
2488727936 readonly type: "hookPrompt";
2488827937 }
2488927938 | {
2489027939 readonly id: string;
24891 readonly memoryCitation?: V2ThreadResumeResponse__MemoryCitation | null;
24892 readonly phase?: V2ThreadResumeResponse__MessagePhase | null;
27940 readonly memoryCitation?: V2ReviewStartResponse__MemoryCitation | null;
27941 readonly phase?: V2ReviewStartResponse__MessagePhase | null;
2489327942 readonly text: string;
2489427943 readonly delivery?: "async" | null;
2489527944 readonly questions?: ReadonlyArray<{
......@@ -24908,85 +27957,76 @@ export type V2ThreadResumeResponse__ThreadItem =
2490827957 | {
2490927958 readonly aggregatedOutput?: string | null;
2491027959 readonly command: string;
24911 readonly commandActions: ReadonlyArray<V2ThreadResumeResponse__CommandAction>;
24912 readonly cwd: string;
27960 readonly commandActions: ReadonlyArray<V2ReviewStartResponse__CommandAction>;
27961 readonly cwd: V2ReviewStartResponse__LegacyAppPathString;
2491327962 readonly durationMs?: number | null;
2491427963 readonly exitCode?: number | null;
2491527964 readonly id: string;
2491627965 readonly processId?: string | null;
24917 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
24918 readonly status: V2ThreadResumeResponse__CommandExecutionStatus;
27966 readonly source?: V2ReviewStartResponse__CommandExecutionSource;
27967 readonly status: V2ReviewStartResponse__CommandExecutionStatus;
2491927968 readonly type: "commandExecution";
2492027969 }
2492127970 | {
24922 readonly changes: ReadonlyArray<V2ThreadResumeResponse__FileUpdateChange>;
27971 readonly changes: ReadonlyArray<V2ReviewStartResponse__FileUpdateChange>;
2492327972 readonly id: string;
24924 readonly status: V2ThreadResumeResponse__PatchApplyStatus;
27973 readonly status: V2ReviewStartResponse__PatchApplyStatus;
2492527974 readonly type: "fileChange";
2492627975 }
2492727976 | {
24928 readonly appContext?: V2ThreadResumeResponse__McpToolCallAppContext | null;
24929 readonly arguments: unknown;
27977 readonly appContext?: V2ReviewStartResponse__McpToolCallAppContext | null;
27978 readonly arguments: Schema.Json;
2493027979 readonly durationMs?: number | null;
24931 readonly error?: V2ThreadResumeResponse__McpToolCallError | null;
27980 readonly error?: V2ReviewStartResponse__McpToolCallError | null;
2493227981 readonly id: string;
2493327982 readonly mcpAppResourceUri?: string | null;
2493427983 readonly pluginId?: string | null;
24935 readonly result?: V2ThreadResumeResponse__McpToolCallResult | null;
27984 readonly result?: V2ReviewStartResponse__McpToolCallResult | null;
2493627985 readonly server: string;
24937 readonly status: V2ThreadResumeResponse__McpToolCallStatus;
27986 readonly status: V2ReviewStartResponse__McpToolCallStatus;
2493827987 readonly tool: string;
2493927988 readonly type: "mcpToolCall";
2494027989 }
2494127990 | {
24942 readonly arguments: unknown;
24943 readonly contentItems?: ReadonlyArray<V2ThreadResumeResponse__DynamicToolCallOutputContentItem> | null;
27991 readonly arguments: Schema.Json;
27992 readonly contentItems?: ReadonlyArray<V2ReviewStartResponse__DynamicToolCallOutputContentItem> | null;
2494427993 readonly durationMs?: number | null;
2494527994 readonly id: string;
2494627995 readonly namespace?: string | null;
24947 readonly status: V2ThreadResumeResponse__DynamicToolCallStatus;
27996 readonly status: V2ReviewStartResponse__DynamicToolCallStatus;
2494827997 readonly success?: boolean | null;
2494927998 readonly tool: string;
2495027999 readonly type: "dynamicToolCall";
2495128000 }
2495228001 | {
24953 readonly agentsStates: { readonly [x: string]: V2ThreadResumeResponse__CollabAgentState };
28002 readonly agentsStates: { readonly [x: string]: V2ReviewStartResponse__CollabAgentState };
2495428003 readonly id: string;
2495528004 readonly model?: string | null;
2495628005 readonly prompt?: string | null;
24957 readonly reasoningEffort?: V2ThreadResumeResponse__ReasoningEffort | null;
28006 readonly reasoningEffort?: V2ReviewStartResponse__ReasoningEffort | null;
2495828007 readonly receiverThreadIds: ReadonlyArray<string>;
2495928008 readonly senderThreadId: string;
24960 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
24961 readonly tool:
24962 | "spawnAgent"
24963 | "sendInput"
24964 | "resumeAgent"
24965 | "wait"
24966 | "closeAgent"
24967 | "sendMessage"
24968 | "followupTask"
24969 | "interruptAgent"
24970 | "listAgents";
28009 readonly status: V2ReviewStartResponse__CollabAgentToolCallStatus;
28010 readonly tool: V2ReviewStartResponse__CollabAgentTool;
2497128011 readonly type: "collabAgentToolCall";
2497228012 }
2497328013 | {
2497428014 readonly agentPath: string;
2497528015 readonly agentThreadId: string;
2497628016 readonly id: string;
24977 readonly kind: V2ThreadResumeResponse__SubAgentActivityKind;
28017 readonly kind: V2ReviewStartResponse__SubAgentActivityKind;
2497828018 readonly type: "subAgentActivity";
2497928019 }
2498028020 | {
24981 readonly action?: V2ThreadResumeResponse__WebSearchAction | null;
28021 readonly action?: V2ReviewStartResponse__WebSearchAction | null;
2498228022 readonly id: string;
2498328023 readonly query: string;
24984 readonly results?: ReadonlyArray<unknown> | null;
28024 readonly results?: ReadonlyArray<Schema.Json> | null;
2498528025 readonly type: "webSearch";
2498628026 }
2498728027 | {
2498828028 readonly id: string;
24989 readonly path: V2ThreadResumeResponse__LegacyAppPathString;
28029 readonly path: V2ReviewStartResponse__LegacyAppPathString;
2499028030 readonly type: "imageView";
2499128031 }
2499228032 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
......@@ -24994,32 +28034,32 @@ export type V2ThreadResumeResponse__ThreadItem =
2499428034 readonly id: string;
2499528035 readonly result: string;
2499628036 readonly revisedPrompt?: string | null;
24997 readonly savedPath?: V2ThreadResumeResponse__AbsolutePathBuf | null;
28037 readonly savedPath?: V2ReviewStartResponse__AbsolutePathBuf | null;
2499828038 readonly status: string;
2499928039 readonly type: "imageGeneration";
2500028040 }
2500128041 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
2500228042 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
2500328043 | { readonly id: string; readonly type: "contextCompaction" };
25004export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
28044export const V2ReviewStartResponse__ThreadItem = Schema.Union(
2500528045 [
2500628046 Schema.Struct({
2500728047 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25008 content: Schema.Array(V2ThreadResumeResponse__UserInput),
28048 content: Schema.Array(V2ReviewStartResponse__UserInput),
2500928049 id: Schema.String,
2501028050 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
2501128051 }).annotate({ title: "UserMessageThreadItem" }),
2501228052 Schema.Struct({
25013 fragments: Schema.Array(V2ThreadResumeResponse__HookPromptFragment),
28053 fragments: Schema.Array(V2ReviewStartResponse__HookPromptFragment),
2501428054 id: Schema.String,
2501528055 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
2501628056 }).annotate({ title: "HookPromptThreadItem" }),
2501728057 Schema.Struct({
2501828058 id: Schema.String,
2501928059 memoryCitation: Schema.optionalKey(
25020 Schema.Union([V2ThreadResumeResponse__MemoryCitation, Schema.Null]),
28060 Schema.Union([V2ReviewStartResponse__MemoryCitation, Schema.Null]),
2502128061 ),
25022 phase: Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__MessagePhase, Schema.Null])),
28062 phase: Schema.optionalKey(Schema.Union([V2ReviewStartResponse__MessagePhase, Schema.Null])),
2502328063 text: Schema.String,
2502428064 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
2502528065 questions: Schema.optionalKey(
......@@ -25060,17 +28100,20 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
2506028100 ]),
2506128101 ),
2506228102 command: Schema.String.annotate({ description: "The command to be executed." }),
25063 commandActions: Schema.Array(V2ThreadResumeResponse__CommandAction).annotate({
28103 commandActions: Schema.Array(V2ReviewStartResponse__CommandAction).annotate({
2506428104 description:
2506528105 "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.",
2506628106 }),
25067 cwd: Schema.String.annotate({ description: "The command's working directory." }),
28107 cwd: Schema.suspend(
28108 (): Schema.Codec<V2ReviewStartResponse__LegacyAppPathString> =>
28109 V2ReviewStartResponse__LegacyAppPathString,
28110 ).annotate({ description: "The command's working directory." }),
2506828111 durationMs: Schema.optionalKey(
2506928112 Schema.Union([
2507028113 Schema.Number.annotate({
2507128114 description: "The duration of the command execution in milliseconds.",
2507228115 format: "int64",
25073 }).check(Schema.isInt()),
28116 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2507428117 Schema.Null,
2507528118 ]),
2507628119 ),
......@@ -25079,7 +28122,7 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
2507928122 Schema.Number.annotate({
2508028123 description: "The command's exit code.",
2508128124 format: "int32",
25082 }).check(Schema.isInt()),
28125 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2508328126 Schema.Null,
2508428127 ]),
2508528128 ),
......@@ -25093,40 +28136,38 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
2509328136 ]),
2509428137 ),
2509528138 source: Schema.optionalKey(
25096 Schema.Literals([
25097 "agent",
25098 "userShell",
25099 "unifiedExecStartup",
25100 "unifiedExecInteraction",
25101 ]).annotate({ default: "agent" }),
28139 Schema.suspend(
28140 (): Schema.Codec<V2ReviewStartResponse__CommandExecutionSource> =>
28141 V2ReviewStartResponse__CommandExecutionSource,
28142 ).annotate({ default: "agent" }),
2510228143 ),
25103 status: V2ThreadResumeResponse__CommandExecutionStatus,
28144 status: V2ReviewStartResponse__CommandExecutionStatus,
2510428145 type: Schema.Literal("commandExecution").annotate({
2510528146 title: "CommandExecutionThreadItemType",
2510628147 }),
2510728148 }).annotate({ title: "CommandExecutionThreadItem" }),
2510828149 Schema.Struct({
25109 changes: Schema.Array(V2ThreadResumeResponse__FileUpdateChange),
28150 changes: Schema.Array(V2ReviewStartResponse__FileUpdateChange),
2511028151 id: Schema.String,
25111 status: V2ThreadResumeResponse__PatchApplyStatus,
28152 status: V2ReviewStartResponse__PatchApplyStatus,
2511228153 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
2511328154 }).annotate({ title: "FileChangeThreadItem" }),
2511428155 Schema.Struct({
2511528156 appContext: Schema.optionalKey(
25116 Schema.Union([V2ThreadResumeResponse__McpToolCallAppContext, Schema.Null]),
28157 Schema.Union([V2ReviewStartResponse__McpToolCallAppContext, Schema.Null]),
2511728158 ),
25118 arguments: Schema.Unknown,
28159 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2511928160 durationMs: Schema.optionalKey(
2512028161 Schema.Union([
2512128162 Schema.Number.annotate({
2512228163 description: "The duration of the MCP tool call in milliseconds.",
2512328164 format: "int64",
25124 }).check(Schema.isInt()),
28165 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2512528166 Schema.Null,
2512628167 ]),
2512728168 ),
2512828169 error: Schema.optionalKey(
25129 Schema.Union([V2ThreadResumeResponse__McpToolCallError, Schema.Null]),
28170 Schema.Union([V2ReviewStartResponse__McpToolCallError, Schema.Null]),
2513028171 ),
2513128172 id: Schema.String,
2513228173 mcpAppResourceUri: Schema.optionalKey(
......@@ -25139,18 +28180,18 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
2513928180 ),
2514028181 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2514128182 result: Schema.optionalKey(
25142 Schema.Union([V2ThreadResumeResponse__McpToolCallResult, Schema.Null]),
28183 Schema.Union([V2ReviewStartResponse__McpToolCallResult, Schema.Null]),
2514328184 ),
2514428185 server: Schema.String,
25145 status: V2ThreadResumeResponse__McpToolCallStatus,
28186 status: V2ReviewStartResponse__McpToolCallStatus,
2514628187 tool: Schema.String,
2514728188 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
2514828189 }).annotate({ title: "McpToolCallThreadItem" }),
2514928190 Schema.Struct({
25150 arguments: Schema.Unknown,
28191 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2515128192 contentItems: Schema.optionalKey(
2515228193 Schema.Union([
25153 Schema.Array(V2ThreadResumeResponse__DynamicToolCallOutputContentItem),
28194 Schema.Array(V2ReviewStartResponse__DynamicToolCallOutputContentItem),
2515428195 Schema.Null,
2515528196 ]),
2515628197 ),
......@@ -25159,21 +28200,21 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
2515928200 Schema.Number.annotate({
2516028201 description: "The duration of the dynamic tool call in milliseconds.",
2516128202 format: "int64",
25162 }).check(Schema.isInt()),
28203 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2516328204 Schema.Null,
2516428205 ]),
2516528206 ),
2516628207 id: Schema.String,
2516728208 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25168 status: V2ThreadResumeResponse__DynamicToolCallStatus,
28209 status: V2ReviewStartResponse__DynamicToolCallStatus,
2516928210 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2517028211 tool: Schema.String,
2517128212 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
2517228213 }).annotate({ title: "DynamicToolCallThreadItem" }),
2517328214 Schema.Struct({
25174 agentsStates: Schema.Record(Schema.String, V2ThreadResumeResponse__CollabAgentState).annotate(
25175 { description: "Last known status of the target agents, when available." },
25176 ),
28215 agentsStates: Schema.Record(Schema.String, V2ReviewStartResponse__CollabAgentState).annotate({
28216 description: "Last known status of the target agents, when available.",
28217 }),
2517728218 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
2517828219 model: Schema.optionalKey(
2517928220 Schema.Union([
......@@ -25192,7 +28233,7 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
2519228233 ]),
2519328234 ),
2519428235 reasoningEffort: Schema.optionalKey(
25195 Schema.Union([V2ThreadResumeResponse__ReasoningEffort, Schema.Null]).annotate({
28236 Schema.Union([V2ReviewStartResponse__ReasoningEffort, Schema.Null]).annotate({
2519628237 description: "Reasoning effort requested for the spawned agent, when applicable.",
2519728238 }),
2519828239 ),
......@@ -25203,20 +28244,14 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
2520328244 senderThreadId: Schema.String.annotate({
2520428245 description: "Thread ID of the agent issuing the collab request.",
2520528246 }),
25206 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
25207 description: "Current status of the collab tool call.",
25208 }),
25209 tool: Schema.Literals([
25210 "spawnAgent",
25211 "sendInput",
25212 "resumeAgent",
25213 "wait",
25214 "closeAgent",
25215 "sendMessage",
25216 "followupTask",
25217 "interruptAgent",
25218 "listAgents",
25219 ]).annotate({ description: "Name of the collab tool that was invoked." }),
28247 status: Schema.suspend(
28248 (): Schema.Codec<V2ReviewStartResponse__CollabAgentToolCallStatus> =>
28249 V2ReviewStartResponse__CollabAgentToolCallStatus,
28250 ).annotate({ description: "Current status of the collab tool call." }),
28251 tool: Schema.suspend(
28252 (): Schema.Codec<V2ReviewStartResponse__CollabAgentTool> =>
28253 V2ReviewStartResponse__CollabAgentTool,
28254 ).annotate({ description: "Name of the collab tool that was invoked." }),
2522028255 type: Schema.Literal("collabAgentToolCall").annotate({
2522128256 title: "CollabAgentToolCallThreadItemType",
2522228257 }),
......@@ -25225,20 +28260,20 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
2522528260 agentPath: Schema.String,
2522628261 agentThreadId: Schema.String,
2522728262 id: Schema.String,
25228 kind: V2ThreadResumeResponse__SubAgentActivityKind,
28263 kind: V2ReviewStartResponse__SubAgentActivityKind,
2522928264 type: Schema.Literal("subAgentActivity").annotate({
2523028265 title: "SubAgentActivityThreadItemType",
2523128266 }),
2523228267 }).annotate({ title: "SubAgentActivityThreadItem" }),
2523328268 Schema.Struct({
2523428269 action: Schema.optionalKey(
25235 Schema.Union([V2ThreadResumeResponse__WebSearchAction, Schema.Null]),
28270 Schema.Union([V2ReviewStartResponse__WebSearchAction, Schema.Null]),
2523628271 ),
2523728272 id: Schema.String,
2523828273 query: Schema.String,
2523928274 results: Schema.optionalKey(
2524028275 Schema.Union([
25241 Schema.Array(Schema.Unknown).annotate({
28276 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
2524228277 description:
2524328278 "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.",
2524428279 }),
......@@ -25249,13 +28284,17 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
2524928284 }).annotate({ title: "WebSearchThreadItem" }),
2525028285 Schema.Struct({
2525128286 id: Schema.String,
25252 path: V2ThreadResumeResponse__LegacyAppPathString,
28287 path: V2ReviewStartResponse__LegacyAppPathString,
2525328288 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
2525428289 }).annotate({ title: "ImageViewThreadItem" }),
2525528290 Schema.Struct({
2525628291 durationMs: Schema.Number.annotate({ format: "uint64" })
25257 .check(Schema.isInt())
25258 .check(Schema.isGreaterThanOrEqualTo(0)),
28292 .check(Schema.isInt().annotate({ expected: "an integer" }))
28293 .check(
28294 Schema.isGreaterThanOrEqualTo(0).annotate({
28295 expected: "a value greater than or equal to 0",
28296 }),
28297 ),
2525928298 id: Schema.String,
2526028299 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
2526128300 }).annotate({
......@@ -25267,7 +28306,7 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
2526728306 result: Schema.String,
2526828307 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2526928308 savedPath: Schema.optionalKey(
25270 Schema.Union([V2ThreadResumeResponse__AbsolutePathBuf, Schema.Null]),
28309 Schema.Union([V2ReviewStartResponse__AbsolutePathBuf, Schema.Null]),
2527128310 ),
2527228311 status: Schema.String,
2527328312 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
......@@ -25294,37 +28333,35 @@ export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
2529428333 }).annotate({ title: "ContextCompactionThreadItem" }),
2529528334 ],
2529628335 { mode: "oneOf" },
25297);
28336).annotate({ identifier: "V2ReviewStartResponse__ThreadItem" });
2529828337
25299export type V2ThreadRollbackResponse__TurnError = {
25300 readonly additionalDetails?: string | null;
25301 readonly codexErrorInfo?: V2ThreadRollbackResponse__CodexErrorInfo | null;
25302 readonly message: string;
28338export type V2SkillsListResponse__SkillsListEntry = {
28339 readonly cwd: string;
28340 readonly errors: ReadonlyArray<V2SkillsListResponse__SkillErrorInfo>;
28341 readonly skills: ReadonlyArray<V2SkillsListResponse__SkillMetadata>;
2530328342};
25304export const V2ThreadRollbackResponse__TurnError = Schema.Struct({
25305 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25306 codexErrorInfo: Schema.optionalKey(
25307 Schema.Union([V2ThreadRollbackResponse__CodexErrorInfo, Schema.Null]),
25308 ),
25309 message: Schema.String,
25310});
28343export const V2SkillsListResponse__SkillsListEntry = Schema.Struct({
28344 cwd: Schema.String,
28345 errors: Schema.Array(V2SkillsListResponse__SkillErrorInfo),
28346 skills: Schema.Array(V2SkillsListResponse__SkillMetadata),
28347}).annotate({ identifier: "V2SkillsListResponse__SkillsListEntry" });
2531128348
25312export type V2ThreadRollbackResponse__ThreadItem =
28349export type V2ThreadForkResponse__ThreadItem =
2531328350 | {
2531428351 readonly clientId?: string | null;
25315 readonly content: ReadonlyArray<V2ThreadRollbackResponse__UserInput>;
28352 readonly content: ReadonlyArray<V2ThreadForkResponse__UserInput>;
2531628353 readonly id: string;
2531728354 readonly type: "userMessage";
2531828355 }
2531928356 | {
25320 readonly fragments: ReadonlyArray<V2ThreadRollbackResponse__HookPromptFragment>;
28357 readonly fragments: ReadonlyArray<V2ThreadForkResponse__HookPromptFragment>;
2532128358 readonly id: string;
2532228359 readonly type: "hookPrompt";
2532328360 }
2532428361 | {
2532528362 readonly id: string;
25326 readonly memoryCitation?: V2ThreadRollbackResponse__MemoryCitation | null;
25327 readonly phase?: V2ThreadRollbackResponse__MessagePhase | null;
28363 readonly memoryCitation?: V2ThreadForkResponse__MemoryCitation | null;
28364 readonly phase?: V2ThreadForkResponse__MessagePhase | null;
2532828365 readonly text: string;
2532928366 readonly delivery?: "async" | null;
2533028367 readonly questions?: ReadonlyArray<{
......@@ -25343,85 +28380,76 @@ export type V2ThreadRollbackResponse__ThreadItem =
2534328380 | {
2534428381 readonly aggregatedOutput?: string | null;
2534528382 readonly command: string;
25346 readonly commandActions: ReadonlyArray<V2ThreadRollbackResponse__CommandAction>;
25347 readonly cwd: string;
28383 readonly commandActions: ReadonlyArray<V2ThreadForkResponse__CommandAction>;
28384 readonly cwd: V2ThreadForkResponse__LegacyAppPathString;
2534828385 readonly durationMs?: number | null;
2534928386 readonly exitCode?: number | null;
2535028387 readonly id: string;
2535128388 readonly processId?: string | null;
25352 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
25353 readonly status: V2ThreadRollbackResponse__CommandExecutionStatus;
28389 readonly source?: V2ThreadForkResponse__CommandExecutionSource;
28390 readonly status: V2ThreadForkResponse__CommandExecutionStatus;
2535428391 readonly type: "commandExecution";
2535528392 }
2535628393 | {
25357 readonly changes: ReadonlyArray<V2ThreadRollbackResponse__FileUpdateChange>;
28394 readonly changes: ReadonlyArray<V2ThreadForkResponse__FileUpdateChange>;
2535828395 readonly id: string;
25359 readonly status: V2ThreadRollbackResponse__PatchApplyStatus;
28396 readonly status: V2ThreadForkResponse__PatchApplyStatus;
2536028397 readonly type: "fileChange";
2536128398 }
2536228399 | {
25363 readonly appContext?: V2ThreadRollbackResponse__McpToolCallAppContext | null;
25364 readonly arguments: unknown;
28400 readonly appContext?: V2ThreadForkResponse__McpToolCallAppContext | null;
28401 readonly arguments: Schema.Json;
2536528402 readonly durationMs?: number | null;
25366 readonly error?: V2ThreadRollbackResponse__McpToolCallError | null;
28403 readonly error?: V2ThreadForkResponse__McpToolCallError | null;
2536728404 readonly id: string;
2536828405 readonly mcpAppResourceUri?: string | null;
2536928406 readonly pluginId?: string | null;
25370 readonly result?: V2ThreadRollbackResponse__McpToolCallResult | null;
28407 readonly result?: V2ThreadForkResponse__McpToolCallResult | null;
2537128408 readonly server: string;
25372 readonly status: V2ThreadRollbackResponse__McpToolCallStatus;
28409 readonly status: V2ThreadForkResponse__McpToolCallStatus;
2537328410 readonly tool: string;
2537428411 readonly type: "mcpToolCall";
2537528412 }
2537628413 | {
25377 readonly arguments: unknown;
25378 readonly contentItems?: ReadonlyArray<V2ThreadRollbackResponse__DynamicToolCallOutputContentItem> | null;
28414 readonly arguments: Schema.Json;
28415 readonly contentItems?: ReadonlyArray<V2ThreadForkResponse__DynamicToolCallOutputContentItem> | null;
2537928416 readonly durationMs?: number | null;
2538028417 readonly id: string;
2538128418 readonly namespace?: string | null;
25382 readonly status: V2ThreadRollbackResponse__DynamicToolCallStatus;
28419 readonly status: V2ThreadForkResponse__DynamicToolCallStatus;
2538328420 readonly success?: boolean | null;
2538428421 readonly tool: string;
2538528422 readonly type: "dynamicToolCall";
2538628423 }
2538728424 | {
25388 readonly agentsStates: { readonly [x: string]: V2ThreadRollbackResponse__CollabAgentState };
28425 readonly agentsStates: { readonly [x: string]: V2ThreadForkResponse__CollabAgentState };
2538928426 readonly id: string;
2539028427 readonly model?: string | null;
2539128428 readonly prompt?: string | null;
25392 readonly reasoningEffort?: V2ThreadRollbackResponse__ReasoningEffort | null;
28429 readonly reasoningEffort?: V2ThreadForkResponse__ReasoningEffort | null;
2539328430 readonly receiverThreadIds: ReadonlyArray<string>;
2539428431 readonly senderThreadId: string;
25395 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
25396 readonly tool:
25397 | "spawnAgent"
25398 | "sendInput"
25399 | "resumeAgent"
25400 | "wait"
25401 | "closeAgent"
25402 | "sendMessage"
25403 | "followupTask"
25404 | "interruptAgent"
25405 | "listAgents";
28432 readonly status: V2ThreadForkResponse__CollabAgentToolCallStatus;
28433 readonly tool: V2ThreadForkResponse__CollabAgentTool;
2540628434 readonly type: "collabAgentToolCall";
2540728435 }
2540828436 | {
2540928437 readonly agentPath: string;
2541028438 readonly agentThreadId: string;
2541128439 readonly id: string;
25412 readonly kind: V2ThreadRollbackResponse__SubAgentActivityKind;
28440 readonly kind: V2ThreadForkResponse__SubAgentActivityKind;
2541328441 readonly type: "subAgentActivity";
2541428442 }
2541528443 | {
25416 readonly action?: V2ThreadRollbackResponse__WebSearchAction | null;
28444 readonly action?: V2ThreadForkResponse__WebSearchAction | null;
2541728445 readonly id: string;
2541828446 readonly query: string;
25419 readonly results?: ReadonlyArray<unknown> | null;
28447 readonly results?: ReadonlyArray<Schema.Json> | null;
2542028448 readonly type: "webSearch";
2542128449 }
2542228450 | {
2542328451 readonly id: string;
25424 readonly path: V2ThreadRollbackResponse__LegacyAppPathString;
28452 readonly path: V2ThreadForkResponse__LegacyAppPathString;
2542528453 readonly type: "imageView";
2542628454 }
2542728455 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
......@@ -25429,34 +28457,32 @@ export type V2ThreadRollbackResponse__ThreadItem =
2542928457 readonly id: string;
2543028458 readonly result: string;
2543128459 readonly revisedPrompt?: string | null;
25432 readonly savedPath?: V2ThreadRollbackResponse__AbsolutePathBuf | null;
28460 readonly savedPath?: V2ThreadForkResponse__AbsolutePathBuf | null;
2543328461 readonly status: string;
2543428462 readonly type: "imageGeneration";
2543528463 }
2543628464 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
2543728465 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
2543828466 | { readonly id: string; readonly type: "contextCompaction" };
25439export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
28467export const V2ThreadForkResponse__ThreadItem = Schema.Union(
2544028468 [
2544128469 Schema.Struct({
2544228470 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25443 content: Schema.Array(V2ThreadRollbackResponse__UserInput),
28471 content: Schema.Array(V2ThreadForkResponse__UserInput),
2544428472 id: Schema.String,
2544528473 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
2544628474 }).annotate({ title: "UserMessageThreadItem" }),
2544728475 Schema.Struct({
25448 fragments: Schema.Array(V2ThreadRollbackResponse__HookPromptFragment),
28476 fragments: Schema.Array(V2ThreadForkResponse__HookPromptFragment),
2544928477 id: Schema.String,
2545028478 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
2545128479 }).annotate({ title: "HookPromptThreadItem" }),
2545228480 Schema.Struct({
2545328481 id: Schema.String,
2545428482 memoryCitation: Schema.optionalKey(
25455 Schema.Union([V2ThreadRollbackResponse__MemoryCitation, Schema.Null]),
25456 ),
25457 phase: Schema.optionalKey(
25458 Schema.Union([V2ThreadRollbackResponse__MessagePhase, Schema.Null]),
28483 Schema.Union([V2ThreadForkResponse__MemoryCitation, Schema.Null]),
2545928484 ),
28485 phase: Schema.optionalKey(Schema.Union([V2ThreadForkResponse__MessagePhase, Schema.Null])),
2546028486 text: Schema.String,
2546128487 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
2546228488 questions: Schema.optionalKey(
......@@ -25497,17 +28523,20 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
2549728523 ]),
2549828524 ),
2549928525 command: Schema.String.annotate({ description: "The command to be executed." }),
25500 commandActions: Schema.Array(V2ThreadRollbackResponse__CommandAction).annotate({
28526 commandActions: Schema.Array(V2ThreadForkResponse__CommandAction).annotate({
2550128527 description:
2550228528 "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.",
2550328529 }),
25504 cwd: Schema.String.annotate({ description: "The command's working directory." }),
28530 cwd: Schema.suspend(
28531 (): Schema.Codec<V2ThreadForkResponse__LegacyAppPathString> =>
28532 V2ThreadForkResponse__LegacyAppPathString,
28533 ).annotate({ description: "The command's working directory." }),
2550528534 durationMs: Schema.optionalKey(
2550628535 Schema.Union([
2550728536 Schema.Number.annotate({
2550828537 description: "The duration of the command execution in milliseconds.",
2550928538 format: "int64",
25510 }).check(Schema.isInt()),
28539 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2551128540 Schema.Null,
2551228541 ]),
2551328542 ),
......@@ -25516,7 +28545,7 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
2551628545 Schema.Number.annotate({
2551728546 description: "The command's exit code.",
2551828547 format: "int32",
25519 }).check(Schema.isInt()),
28548 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2552028549 Schema.Null,
2552128550 ]),
2552228551 ),
......@@ -25530,40 +28559,38 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
2553028559 ]),
2553128560 ),
2553228561 source: Schema.optionalKey(
25533 Schema.Literals([
25534 "agent",
25535 "userShell",
25536 "unifiedExecStartup",
25537 "unifiedExecInteraction",
25538 ]).annotate({ default: "agent" }),
28562 Schema.suspend(
28563 (): Schema.Codec<V2ThreadForkResponse__CommandExecutionSource> =>
28564 V2ThreadForkResponse__CommandExecutionSource,
28565 ).annotate({ default: "agent" }),
2553928566 ),
25540 status: V2ThreadRollbackResponse__CommandExecutionStatus,
28567 status: V2ThreadForkResponse__CommandExecutionStatus,
2554128568 type: Schema.Literal("commandExecution").annotate({
2554228569 title: "CommandExecutionThreadItemType",
2554328570 }),
2554428571 }).annotate({ title: "CommandExecutionThreadItem" }),
2554528572 Schema.Struct({
25546 changes: Schema.Array(V2ThreadRollbackResponse__FileUpdateChange),
28573 changes: Schema.Array(V2ThreadForkResponse__FileUpdateChange),
2554728574 id: Schema.String,
25548 status: V2ThreadRollbackResponse__PatchApplyStatus,
28575 status: V2ThreadForkResponse__PatchApplyStatus,
2554928576 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
2555028577 }).annotate({ title: "FileChangeThreadItem" }),
2555128578 Schema.Struct({
2555228579 appContext: Schema.optionalKey(
25553 Schema.Union([V2ThreadRollbackResponse__McpToolCallAppContext, Schema.Null]),
28580 Schema.Union([V2ThreadForkResponse__McpToolCallAppContext, Schema.Null]),
2555428581 ),
25555 arguments: Schema.Unknown,
28582 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2555628583 durationMs: Schema.optionalKey(
2555728584 Schema.Union([
2555828585 Schema.Number.annotate({
2555928586 description: "The duration of the MCP tool call in milliseconds.",
2556028587 format: "int64",
25561 }).check(Schema.isInt()),
28588 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2556228589 Schema.Null,
2556328590 ]),
2556428591 ),
2556528592 error: Schema.optionalKey(
25566 Schema.Union([V2ThreadRollbackResponse__McpToolCallError, Schema.Null]),
28593 Schema.Union([V2ThreadForkResponse__McpToolCallError, Schema.Null]),
2556728594 ),
2556828595 id: Schema.String,
2556928596 mcpAppResourceUri: Schema.optionalKey(
......@@ -25576,18 +28603,18 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
2557628603 ),
2557728604 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2557828605 result: Schema.optionalKey(
25579 Schema.Union([V2ThreadRollbackResponse__McpToolCallResult, Schema.Null]),
28606 Schema.Union([V2ThreadForkResponse__McpToolCallResult, Schema.Null]),
2558028607 ),
2558128608 server: Schema.String,
25582 status: V2ThreadRollbackResponse__McpToolCallStatus,
28609 status: V2ThreadForkResponse__McpToolCallStatus,
2558328610 tool: Schema.String,
2558428611 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
2558528612 }).annotate({ title: "McpToolCallThreadItem" }),
2558628613 Schema.Struct({
25587 arguments: Schema.Unknown,
28614 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2558828615 contentItems: Schema.optionalKey(
2558928616 Schema.Union([
25590 Schema.Array(V2ThreadRollbackResponse__DynamicToolCallOutputContentItem),
28617 Schema.Array(V2ThreadForkResponse__DynamicToolCallOutputContentItem),
2559128618 Schema.Null,
2559228619 ]),
2559328620 ),
......@@ -25596,22 +28623,21 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
2559628623 Schema.Number.annotate({
2559728624 description: "The duration of the dynamic tool call in milliseconds.",
2559828625 format: "int64",
25599 }).check(Schema.isInt()),
28626 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2560028627 Schema.Null,
2560128628 ]),
2560228629 ),
2560328630 id: Schema.String,
2560428631 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25605 status: V2ThreadRollbackResponse__DynamicToolCallStatus,
28632 status: V2ThreadForkResponse__DynamicToolCallStatus,
2560628633 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2560728634 tool: Schema.String,
2560828635 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
2560928636 }).annotate({ title: "DynamicToolCallThreadItem" }),
2561028637 Schema.Struct({
25611 agentsStates: Schema.Record(
25612 Schema.String,
25613 V2ThreadRollbackResponse__CollabAgentState,
25614 ).annotate({ description: "Last known status of the target agents, when available." }),
28638 agentsStates: Schema.Record(Schema.String, V2ThreadForkResponse__CollabAgentState).annotate({
28639 description: "Last known status of the target agents, when available.",
28640 }),
2561528641 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
2561628642 model: Schema.optionalKey(
2561728643 Schema.Union([
......@@ -25630,7 +28656,7 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
2563028656 ]),
2563128657 ),
2563228658 reasoningEffort: Schema.optionalKey(
25633 Schema.Union([V2ThreadRollbackResponse__ReasoningEffort, Schema.Null]).annotate({
28659 Schema.Union([V2ThreadForkResponse__ReasoningEffort, Schema.Null]).annotate({
2563428660 description: "Reasoning effort requested for the spawned agent, when applicable.",
2563528661 }),
2563628662 ),
......@@ -25641,20 +28667,14 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
2564128667 senderThreadId: Schema.String.annotate({
2564228668 description: "Thread ID of the agent issuing the collab request.",
2564328669 }),
25644 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
25645 description: "Current status of the collab tool call.",
25646 }),
25647 tool: Schema.Literals([
25648 "spawnAgent",
25649 "sendInput",
25650 "resumeAgent",
25651 "wait",
25652 "closeAgent",
25653 "sendMessage",
25654 "followupTask",
25655 "interruptAgent",
25656 "listAgents",
25657 ]).annotate({ description: "Name of the collab tool that was invoked." }),
28670 status: Schema.suspend(
28671 (): Schema.Codec<V2ThreadForkResponse__CollabAgentToolCallStatus> =>
28672 V2ThreadForkResponse__CollabAgentToolCallStatus,
28673 ).annotate({ description: "Current status of the collab tool call." }),
28674 tool: Schema.suspend(
28675 (): Schema.Codec<V2ThreadForkResponse__CollabAgentTool> =>
28676 V2ThreadForkResponse__CollabAgentTool,
28677 ).annotate({ description: "Name of the collab tool that was invoked." }),
2565828678 type: Schema.Literal("collabAgentToolCall").annotate({
2565928679 title: "CollabAgentToolCallThreadItemType",
2566028680 }),
......@@ -25663,20 +28683,20 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
2566328683 agentPath: Schema.String,
2566428684 agentThreadId: Schema.String,
2566528685 id: Schema.String,
25666 kind: V2ThreadRollbackResponse__SubAgentActivityKind,
28686 kind: V2ThreadForkResponse__SubAgentActivityKind,
2566728687 type: Schema.Literal("subAgentActivity").annotate({
2566828688 title: "SubAgentActivityThreadItemType",
2566928689 }),
2567028690 }).annotate({ title: "SubAgentActivityThreadItem" }),
2567128691 Schema.Struct({
2567228692 action: Schema.optionalKey(
25673 Schema.Union([V2ThreadRollbackResponse__WebSearchAction, Schema.Null]),
28693 Schema.Union([V2ThreadForkResponse__WebSearchAction, Schema.Null]),
2567428694 ),
2567528695 id: Schema.String,
2567628696 query: Schema.String,
2567728697 results: Schema.optionalKey(
2567828698 Schema.Union([
25679 Schema.Array(Schema.Unknown).annotate({
28699 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
2568028700 description:
2568128701 "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.",
2568228702 }),
......@@ -25687,13 +28707,17 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
2568728707 }).annotate({ title: "WebSearchThreadItem" }),
2568828708 Schema.Struct({
2568928709 id: Schema.String,
25690 path: V2ThreadRollbackResponse__LegacyAppPathString,
28710 path: V2ThreadForkResponse__LegacyAppPathString,
2569128711 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
2569228712 }).annotate({ title: "ImageViewThreadItem" }),
2569328713 Schema.Struct({
2569428714 durationMs: Schema.Number.annotate({ format: "uint64" })
25695 .check(Schema.isInt())
25696 .check(Schema.isGreaterThanOrEqualTo(0)),
28715 .check(Schema.isInt().annotate({ expected: "an integer" }))
28716 .check(
28717 Schema.isGreaterThanOrEqualTo(0).annotate({
28718 expected: "a value greater than or equal to 0",
28719 }),
28720 ),
2569728721 id: Schema.String,
2569828722 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
2569928723 }).annotate({
......@@ -25705,7 +28729,7 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
2570528729 result: Schema.String,
2570628730 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2570728731 savedPath: Schema.optionalKey(
25708 Schema.Union([V2ThreadRollbackResponse__AbsolutePathBuf, Schema.Null]),
28732 Schema.Union([V2ThreadForkResponse__AbsolutePathBuf, Schema.Null]),
2570928733 ),
2571028734 status: Schema.String,
2571128735 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
......@@ -25732,46 +28756,24 @@ export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
2573228756 }).annotate({ title: "ContextCompactionThreadItem" }),
2573328757 ],
2573428758 { mode: "oneOf" },
25735);
25736
25737export type V2ThreadSettingsUpdatedNotification__CollaborationMode = {
25738 readonly mode: V2ThreadSettingsUpdatedNotification__ModeKind;
25739 readonly settings: V2ThreadSettingsUpdatedNotification__Settings;
25740};
25741export const V2ThreadSettingsUpdatedNotification__CollaborationMode = Schema.Struct({
25742 mode: V2ThreadSettingsUpdatedNotification__ModeKind,
25743 settings: V2ThreadSettingsUpdatedNotification__Settings,
25744}).annotate({ description: "Collaboration mode for a Codex session." });
28759).annotate({ identifier: "V2ThreadForkResponse__ThreadItem" });
2574528760
25746export type V2ThreadStartedNotification__TurnError = {
25747 readonly additionalDetails?: string | null;
25748 readonly codexErrorInfo?: V2ThreadStartedNotification__CodexErrorInfo | null;
25749 readonly message: string;
25750};
25751export const V2ThreadStartedNotification__TurnError = Schema.Struct({
25752 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25753 codexErrorInfo: Schema.optionalKey(
25754 Schema.Union([V2ThreadStartedNotification__CodexErrorInfo, Schema.Null]),
25755 ),
25756 message: Schema.String,
25757});
25758
25759export type V2ThreadStartedNotification__ThreadItem =
28761export type V2ThreadListResponse__ThreadItem =
2576028762 | {
2576128763 readonly clientId?: string | null;
25762 readonly content: ReadonlyArray<V2ThreadStartedNotification__UserInput>;
28764 readonly content: ReadonlyArray<V2ThreadListResponse__UserInput>;
2576328765 readonly id: string;
2576428766 readonly type: "userMessage";
2576528767 }
2576628768 | {
25767 readonly fragments: ReadonlyArray<V2ThreadStartedNotification__HookPromptFragment>;
28769 readonly fragments: ReadonlyArray<V2ThreadListResponse__HookPromptFragment>;
2576828770 readonly id: string;
2576928771 readonly type: "hookPrompt";
2577028772 }
2577128773 | {
2577228774 readonly id: string;
25773 readonly memoryCitation?: V2ThreadStartedNotification__MemoryCitation | null;
25774 readonly phase?: V2ThreadStartedNotification__MessagePhase | null;
28775 readonly memoryCitation?: V2ThreadListResponse__MemoryCitation | null;
28776 readonly phase?: V2ThreadListResponse__MessagePhase | null;
2577528777 readonly text: string;
2577628778 readonly delivery?: "async" | null;
2577728779 readonly questions?: ReadonlyArray<{
......@@ -25790,87 +28792,76 @@ export type V2ThreadStartedNotification__ThreadItem =
2579028792 | {
2579128793 readonly aggregatedOutput?: string | null;
2579228794 readonly command: string;
25793 readonly commandActions: ReadonlyArray<V2ThreadStartedNotification__CommandAction>;
25794 readonly cwd: string;
28795 readonly commandActions: ReadonlyArray<V2ThreadListResponse__CommandAction>;
28796 readonly cwd: V2ThreadListResponse__LegacyAppPathString;
2579528797 readonly durationMs?: number | null;
2579628798 readonly exitCode?: number | null;
2579728799 readonly id: string;
2579828800 readonly processId?: string | null;
25799 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
25800 readonly status: V2ThreadStartedNotification__CommandExecutionStatus;
28801 readonly source?: V2ThreadListResponse__CommandExecutionSource;
28802 readonly status: V2ThreadListResponse__CommandExecutionStatus;
2580128803 readonly type: "commandExecution";
2580228804 }
2580328805 | {
25804 readonly changes: ReadonlyArray<V2ThreadStartedNotification__FileUpdateChange>;
28806 readonly changes: ReadonlyArray<V2ThreadListResponse__FileUpdateChange>;
2580528807 readonly id: string;
25806 readonly status: V2ThreadStartedNotification__PatchApplyStatus;
28808 readonly status: V2ThreadListResponse__PatchApplyStatus;
2580728809 readonly type: "fileChange";
2580828810 }
2580928811 | {
25810 readonly appContext?: V2ThreadStartedNotification__McpToolCallAppContext | null;
25811 readonly arguments: unknown;
28812 readonly appContext?: V2ThreadListResponse__McpToolCallAppContext | null;
28813 readonly arguments: Schema.Json;
2581228814 readonly durationMs?: number | null;
25813 readonly error?: V2ThreadStartedNotification__McpToolCallError | null;
28815 readonly error?: V2ThreadListResponse__McpToolCallError | null;
2581428816 readonly id: string;
2581528817 readonly mcpAppResourceUri?: string | null;
2581628818 readonly pluginId?: string | null;
25817 readonly result?: V2ThreadStartedNotification__McpToolCallResult | null;
28819 readonly result?: V2ThreadListResponse__McpToolCallResult | null;
2581828820 readonly server: string;
25819 readonly status: V2ThreadStartedNotification__McpToolCallStatus;
28821 readonly status: V2ThreadListResponse__McpToolCallStatus;
2582028822 readonly tool: string;
2582128823 readonly type: "mcpToolCall";
2582228824 }
2582328825 | {
25824 readonly arguments: unknown;
25825 readonly contentItems?: ReadonlyArray<V2ThreadStartedNotification__DynamicToolCallOutputContentItem> | null;
28826 readonly arguments: Schema.Json;
28827 readonly contentItems?: ReadonlyArray<V2ThreadListResponse__DynamicToolCallOutputContentItem> | null;
2582628828 readonly durationMs?: number | null;
2582728829 readonly id: string;
2582828830 readonly namespace?: string | null;
25829 readonly status: V2ThreadStartedNotification__DynamicToolCallStatus;
28831 readonly status: V2ThreadListResponse__DynamicToolCallStatus;
2583028832 readonly success?: boolean | null;
2583128833 readonly tool: string;
2583228834 readonly type: "dynamicToolCall";
2583328835 }
2583428836 | {
25835 readonly agentsStates: {
25836 readonly [x: string]: V2ThreadStartedNotification__CollabAgentState;
25837 };
28837 readonly agentsStates: { readonly [x: string]: V2ThreadListResponse__CollabAgentState };
2583828838 readonly id: string;
2583928839 readonly model?: string | null;
2584028840 readonly prompt?: string | null;
25841 readonly reasoningEffort?: V2ThreadStartedNotification__ReasoningEffort | null;
28841 readonly reasoningEffort?: V2ThreadListResponse__ReasoningEffort | null;
2584228842 readonly receiverThreadIds: ReadonlyArray<string>;
2584328843 readonly senderThreadId: string;
25844 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
25845 readonly tool:
25846 | "spawnAgent"
25847 | "sendInput"
25848 | "resumeAgent"
25849 | "wait"
25850 | "closeAgent"
25851 | "sendMessage"
25852 | "followupTask"
25853 | "interruptAgent"
25854 | "listAgents";
28844 readonly status: V2ThreadListResponse__CollabAgentToolCallStatus;
28845 readonly tool: V2ThreadListResponse__CollabAgentTool;
2585528846 readonly type: "collabAgentToolCall";
2585628847 }
2585728848 | {
2585828849 readonly agentPath: string;
2585928850 readonly agentThreadId: string;
2586028851 readonly id: string;
25861 readonly kind: V2ThreadStartedNotification__SubAgentActivityKind;
28852 readonly kind: V2ThreadListResponse__SubAgentActivityKind;
2586228853 readonly type: "subAgentActivity";
2586328854 }
2586428855 | {
25865 readonly action?: V2ThreadStartedNotification__WebSearchAction | null;
28856 readonly action?: V2ThreadListResponse__WebSearchAction | null;
2586628857 readonly id: string;
2586728858 readonly query: string;
25868 readonly results?: ReadonlyArray<unknown> | null;
28859 readonly results?: ReadonlyArray<Schema.Json> | null;
2586928860 readonly type: "webSearch";
2587028861 }
2587128862 | {
2587228863 readonly id: string;
25873 readonly path: V2ThreadStartedNotification__LegacyAppPathString;
28864 readonly path: V2ThreadListResponse__LegacyAppPathString;
2587428865 readonly type: "imageView";
2587528866 }
2587628867 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
......@@ -25878,34 +28869,32 @@ export type V2ThreadStartedNotification__ThreadItem =
2587828869 readonly id: string;
2587928870 readonly result: string;
2588028871 readonly revisedPrompt?: string | null;
25881 readonly savedPath?: V2ThreadStartedNotification__AbsolutePathBuf | null;
28872 readonly savedPath?: V2ThreadListResponse__AbsolutePathBuf | null;
2588228873 readonly status: string;
2588328874 readonly type: "imageGeneration";
2588428875 }
2588528876 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
2588628877 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
2588728878 | { readonly id: string; readonly type: "contextCompaction" };
25888export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
28879export const V2ThreadListResponse__ThreadItem = Schema.Union(
2588928880 [
2589028881 Schema.Struct({
2589128882 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
25892 content: Schema.Array(V2ThreadStartedNotification__UserInput),
28883 content: Schema.Array(V2ThreadListResponse__UserInput),
2589328884 id: Schema.String,
2589428885 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
2589528886 }).annotate({ title: "UserMessageThreadItem" }),
2589628887 Schema.Struct({
25897 fragments: Schema.Array(V2ThreadStartedNotification__HookPromptFragment),
28888 fragments: Schema.Array(V2ThreadListResponse__HookPromptFragment),
2589828889 id: Schema.String,
2589928890 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
2590028891 }).annotate({ title: "HookPromptThreadItem" }),
2590128892 Schema.Struct({
2590228893 id: Schema.String,
2590328894 memoryCitation: Schema.optionalKey(
25904 Schema.Union([V2ThreadStartedNotification__MemoryCitation, Schema.Null]),
25905 ),
25906 phase: Schema.optionalKey(
25907 Schema.Union([V2ThreadStartedNotification__MessagePhase, Schema.Null]),
28895 Schema.Union([V2ThreadListResponse__MemoryCitation, Schema.Null]),
2590828896 ),
28897 phase: Schema.optionalKey(Schema.Union([V2ThreadListResponse__MessagePhase, Schema.Null])),
2590928898 text: Schema.String,
2591028899 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
2591128900 questions: Schema.optionalKey(
......@@ -25946,17 +28935,20 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
2594628935 ]),
2594728936 ),
2594828937 command: Schema.String.annotate({ description: "The command to be executed." }),
25949 commandActions: Schema.Array(V2ThreadStartedNotification__CommandAction).annotate({
28938 commandActions: Schema.Array(V2ThreadListResponse__CommandAction).annotate({
2595028939 description:
2595128940 "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.",
2595228941 }),
25953 cwd: Schema.String.annotate({ description: "The command's working directory." }),
28942 cwd: Schema.suspend(
28943 (): Schema.Codec<V2ThreadListResponse__LegacyAppPathString> =>
28944 V2ThreadListResponse__LegacyAppPathString,
28945 ).annotate({ description: "The command's working directory." }),
2595428946 durationMs: Schema.optionalKey(
2595528947 Schema.Union([
2595628948 Schema.Number.annotate({
2595728949 description: "The duration of the command execution in milliseconds.",
2595828950 format: "int64",
25959 }).check(Schema.isInt()),
28951 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2596028952 Schema.Null,
2596128953 ]),
2596228954 ),
......@@ -25965,7 +28957,7 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
2596528957 Schema.Number.annotate({
2596628958 description: "The command's exit code.",
2596728959 format: "int32",
25968 }).check(Schema.isInt()),
28960 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2596928961 Schema.Null,
2597028962 ]),
2597128963 ),
......@@ -25979,40 +28971,38 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
2597928971 ]),
2598028972 ),
2598128973 source: Schema.optionalKey(
25982 Schema.Literals([
25983 "agent",
25984 "userShell",
25985 "unifiedExecStartup",
25986 "unifiedExecInteraction",
25987 ]).annotate({ default: "agent" }),
28974 Schema.suspend(
28975 (): Schema.Codec<V2ThreadListResponse__CommandExecutionSource> =>
28976 V2ThreadListResponse__CommandExecutionSource,
28977 ).annotate({ default: "agent" }),
2598828978 ),
25989 status: V2ThreadStartedNotification__CommandExecutionStatus,
28979 status: V2ThreadListResponse__CommandExecutionStatus,
2599028980 type: Schema.Literal("commandExecution").annotate({
2599128981 title: "CommandExecutionThreadItemType",
2599228982 }),
2599328983 }).annotate({ title: "CommandExecutionThreadItem" }),
2599428984 Schema.Struct({
25995 changes: Schema.Array(V2ThreadStartedNotification__FileUpdateChange),
28985 changes: Schema.Array(V2ThreadListResponse__FileUpdateChange),
2599628986 id: Schema.String,
25997 status: V2ThreadStartedNotification__PatchApplyStatus,
28987 status: V2ThreadListResponse__PatchApplyStatus,
2599828988 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
2599928989 }).annotate({ title: "FileChangeThreadItem" }),
2600028990 Schema.Struct({
2600128991 appContext: Schema.optionalKey(
26002 Schema.Union([V2ThreadStartedNotification__McpToolCallAppContext, Schema.Null]),
28992 Schema.Union([V2ThreadListResponse__McpToolCallAppContext, Schema.Null]),
2600328993 ),
26004 arguments: Schema.Unknown,
28994 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2600528995 durationMs: Schema.optionalKey(
2600628996 Schema.Union([
2600728997 Schema.Number.annotate({
2600828998 description: "The duration of the MCP tool call in milliseconds.",
2600928999 format: "int64",
26010 }).check(Schema.isInt()),
29000 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2601129001 Schema.Null,
2601229002 ]),
2601329003 ),
2601429004 error: Schema.optionalKey(
26015 Schema.Union([V2ThreadStartedNotification__McpToolCallError, Schema.Null]),
29005 Schema.Union([V2ThreadListResponse__McpToolCallError, Schema.Null]),
2601629006 ),
2601729007 id: Schema.String,
2601829008 mcpAppResourceUri: Schema.optionalKey(
......@@ -26025,18 +29015,18 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
2602529015 ),
2602629016 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2602729017 result: Schema.optionalKey(
26028 Schema.Union([V2ThreadStartedNotification__McpToolCallResult, Schema.Null]),
29018 Schema.Union([V2ThreadListResponse__McpToolCallResult, Schema.Null]),
2602929019 ),
2603029020 server: Schema.String,
26031 status: V2ThreadStartedNotification__McpToolCallStatus,
29021 status: V2ThreadListResponse__McpToolCallStatus,
2603229022 tool: Schema.String,
2603329023 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
2603429024 }).annotate({ title: "McpToolCallThreadItem" }),
2603529025 Schema.Struct({
26036 arguments: Schema.Unknown,
29026 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2603729027 contentItems: Schema.optionalKey(
2603829028 Schema.Union([
26039 Schema.Array(V2ThreadStartedNotification__DynamicToolCallOutputContentItem),
29029 Schema.Array(V2ThreadListResponse__DynamicToolCallOutputContentItem),
2604029030 Schema.Null,
2604129031 ]),
2604229032 ),
......@@ -26045,22 +29035,21 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
2604529035 Schema.Number.annotate({
2604629036 description: "The duration of the dynamic tool call in milliseconds.",
2604729037 format: "int64",
26048 }).check(Schema.isInt()),
29038 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2604929039 Schema.Null,
2605029040 ]),
2605129041 ),
2605229042 id: Schema.String,
2605329043 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26054 status: V2ThreadStartedNotification__DynamicToolCallStatus,
29044 status: V2ThreadListResponse__DynamicToolCallStatus,
2605529045 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2605629046 tool: Schema.String,
2605729047 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
2605829048 }).annotate({ title: "DynamicToolCallThreadItem" }),
2605929049 Schema.Struct({
26060 agentsStates: Schema.Record(
26061 Schema.String,
26062 V2ThreadStartedNotification__CollabAgentState,
26063 ).annotate({ description: "Last known status of the target agents, when available." }),
29050 agentsStates: Schema.Record(Schema.String, V2ThreadListResponse__CollabAgentState).annotate({
29051 description: "Last known status of the target agents, when available.",
29052 }),
2606429053 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
2606529054 model: Schema.optionalKey(
2606629055 Schema.Union([
......@@ -26079,7 +29068,7 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
2607929068 ]),
2608029069 ),
2608129070 reasoningEffort: Schema.optionalKey(
26082 Schema.Union([V2ThreadStartedNotification__ReasoningEffort, Schema.Null]).annotate({
29071 Schema.Union([V2ThreadListResponse__ReasoningEffort, Schema.Null]).annotate({
2608329072 description: "Reasoning effort requested for the spawned agent, when applicable.",
2608429073 }),
2608529074 ),
......@@ -26090,20 +29079,14 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
2609029079 senderThreadId: Schema.String.annotate({
2609129080 description: "Thread ID of the agent issuing the collab request.",
2609229081 }),
26093 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
26094 description: "Current status of the collab tool call.",
26095 }),
26096 tool: Schema.Literals([
26097 "spawnAgent",
26098 "sendInput",
26099 "resumeAgent",
26100 "wait",
26101 "closeAgent",
26102 "sendMessage",
26103 "followupTask",
26104 "interruptAgent",
26105 "listAgents",
26106 ]).annotate({ description: "Name of the collab tool that was invoked." }),
29082 status: Schema.suspend(
29083 (): Schema.Codec<V2ThreadListResponse__CollabAgentToolCallStatus> =>
29084 V2ThreadListResponse__CollabAgentToolCallStatus,
29085 ).annotate({ description: "Current status of the collab tool call." }),
29086 tool: Schema.suspend(
29087 (): Schema.Codec<V2ThreadListResponse__CollabAgentTool> =>
29088 V2ThreadListResponse__CollabAgentTool,
29089 ).annotate({ description: "Name of the collab tool that was invoked." }),
2610729090 type: Schema.Literal("collabAgentToolCall").annotate({
2610829091 title: "CollabAgentToolCallThreadItemType",
2610929092 }),
......@@ -26112,20 +29095,20 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
2611229095 agentPath: Schema.String,
2611329096 agentThreadId: Schema.String,
2611429097 id: Schema.String,
26115 kind: V2ThreadStartedNotification__SubAgentActivityKind,
29098 kind: V2ThreadListResponse__SubAgentActivityKind,
2611629099 type: Schema.Literal("subAgentActivity").annotate({
2611729100 title: "SubAgentActivityThreadItemType",
2611829101 }),
2611929102 }).annotate({ title: "SubAgentActivityThreadItem" }),
2612029103 Schema.Struct({
2612129104 action: Schema.optionalKey(
26122 Schema.Union([V2ThreadStartedNotification__WebSearchAction, Schema.Null]),
29105 Schema.Union([V2ThreadListResponse__WebSearchAction, Schema.Null]),
2612329106 ),
2612429107 id: Schema.String,
2612529108 query: Schema.String,
2612629109 results: Schema.optionalKey(
2612729110 Schema.Union([
26128 Schema.Array(Schema.Unknown).annotate({
29111 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
2612929112 description:
2613029113 "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.",
2613129114 }),
......@@ -26136,13 +29119,17 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
2613629119 }).annotate({ title: "WebSearchThreadItem" }),
2613729120 Schema.Struct({
2613829121 id: Schema.String,
26139 path: V2ThreadStartedNotification__LegacyAppPathString,
29122 path: V2ThreadListResponse__LegacyAppPathString,
2614029123 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
2614129124 }).annotate({ title: "ImageViewThreadItem" }),
2614229125 Schema.Struct({
2614329126 durationMs: Schema.Number.annotate({ format: "uint64" })
26144 .check(Schema.isInt())
26145 .check(Schema.isGreaterThanOrEqualTo(0)),
29127 .check(Schema.isInt().annotate({ expected: "an integer" }))
29128 .check(
29129 Schema.isGreaterThanOrEqualTo(0).annotate({
29130 expected: "a value greater than or equal to 0",
29131 }),
29132 ),
2614629133 id: Schema.String,
2614729134 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
2614829135 }).annotate({
......@@ -26154,7 +29141,7 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
2615429141 result: Schema.String,
2615529142 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2615629143 savedPath: Schema.optionalKey(
26157 Schema.Union([V2ThreadStartedNotification__AbsolutePathBuf, Schema.Null]),
29144 Schema.Union([V2ThreadListResponse__AbsolutePathBuf, Schema.Null]),
2615829145 ),
2615929146 status: Schema.String,
2616029147 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
......@@ -26181,37 +29168,24 @@ export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
2618129168 }).annotate({ title: "ContextCompactionThreadItem" }),
2618229169 ],
2618329170 { mode: "oneOf" },
26184);
29171).annotate({ identifier: "V2ThreadListResponse__ThreadItem" });
2618529172
26186export type V2ThreadStartResponse__TurnError = {
26187 readonly additionalDetails?: string | null;
26188 readonly codexErrorInfo?: V2ThreadStartResponse__CodexErrorInfo | null;
26189 readonly message: string;
26190};
26191export const V2ThreadStartResponse__TurnError = Schema.Struct({
26192 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26193 codexErrorInfo: Schema.optionalKey(
26194 Schema.Union([V2ThreadStartResponse__CodexErrorInfo, Schema.Null]),
26195 ),
26196 message: Schema.String,
26197});
26198
26199export type V2ThreadStartResponse__ThreadItem =
29173export type V2ThreadMetadataUpdateResponse__ThreadItem =
2620029174 | {
2620129175 readonly clientId?: string | null;
26202 readonly content: ReadonlyArray<V2ThreadStartResponse__UserInput>;
29176 readonly content: ReadonlyArray<V2ThreadMetadataUpdateResponse__UserInput>;
2620329177 readonly id: string;
2620429178 readonly type: "userMessage";
2620529179 }
2620629180 | {
26207 readonly fragments: ReadonlyArray<V2ThreadStartResponse__HookPromptFragment>;
29181 readonly fragments: ReadonlyArray<V2ThreadMetadataUpdateResponse__HookPromptFragment>;
2620829182 readonly id: string;
2620929183 readonly type: "hookPrompt";
2621029184 }
2621129185 | {
2621229186 readonly id: string;
26213 readonly memoryCitation?: V2ThreadStartResponse__MemoryCitation | null;
26214 readonly phase?: V2ThreadStartResponse__MessagePhase | null;
29187 readonly memoryCitation?: V2ThreadMetadataUpdateResponse__MemoryCitation | null;
29188 readonly phase?: V2ThreadMetadataUpdateResponse__MessagePhase | null;
2621529189 readonly text: string;
2621629190 readonly delivery?: "async" | null;
2621729191 readonly questions?: ReadonlyArray<{
......@@ -26230,85 +29204,78 @@ export type V2ThreadStartResponse__ThreadItem =
2623029204 | {
2623129205 readonly aggregatedOutput?: string | null;
2623229206 readonly command: string;
26233 readonly commandActions: ReadonlyArray<V2ThreadStartResponse__CommandAction>;
26234 readonly cwd: string;
29207 readonly commandActions: ReadonlyArray<V2ThreadMetadataUpdateResponse__CommandAction>;
29208 readonly cwd: V2ThreadMetadataUpdateResponse__LegacyAppPathString;
2623529209 readonly durationMs?: number | null;
2623629210 readonly exitCode?: number | null;
2623729211 readonly id: string;
2623829212 readonly processId?: string | null;
26239 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
26240 readonly status: V2ThreadStartResponse__CommandExecutionStatus;
29213 readonly source?: V2ThreadMetadataUpdateResponse__CommandExecutionSource;
29214 readonly status: V2ThreadMetadataUpdateResponse__CommandExecutionStatus;
2624129215 readonly type: "commandExecution";
2624229216 }
2624329217 | {
26244 readonly changes: ReadonlyArray<V2ThreadStartResponse__FileUpdateChange>;
29218 readonly changes: ReadonlyArray<V2ThreadMetadataUpdateResponse__FileUpdateChange>;
2624529219 readonly id: string;
26246 readonly status: V2ThreadStartResponse__PatchApplyStatus;
29220 readonly status: V2ThreadMetadataUpdateResponse__PatchApplyStatus;
2624729221 readonly type: "fileChange";
2624829222 }
2624929223 | {
26250 readonly appContext?: V2ThreadStartResponse__McpToolCallAppContext | null;
26251 readonly arguments: unknown;
29224 readonly appContext?: V2ThreadMetadataUpdateResponse__McpToolCallAppContext | null;
29225 readonly arguments: Schema.Json;
2625229226 readonly durationMs?: number | null;
26253 readonly error?: V2ThreadStartResponse__McpToolCallError | null;
29227 readonly error?: V2ThreadMetadataUpdateResponse__McpToolCallError | null;
2625429228 readonly id: string;
2625529229 readonly mcpAppResourceUri?: string | null;
2625629230 readonly pluginId?: string | null;
26257 readonly result?: V2ThreadStartResponse__McpToolCallResult | null;
29231 readonly result?: V2ThreadMetadataUpdateResponse__McpToolCallResult | null;
2625829232 readonly server: string;
26259 readonly status: V2ThreadStartResponse__McpToolCallStatus;
29233 readonly status: V2ThreadMetadataUpdateResponse__McpToolCallStatus;
2626029234 readonly tool: string;
2626129235 readonly type: "mcpToolCall";
2626229236 }
2626329237 | {
26264 readonly arguments: unknown;
26265 readonly contentItems?: ReadonlyArray<V2ThreadStartResponse__DynamicToolCallOutputContentItem> | null;
29238 readonly arguments: Schema.Json;
29239 readonly contentItems?: ReadonlyArray<V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem> | null;
2626629240 readonly durationMs?: number | null;
2626729241 readonly id: string;
2626829242 readonly namespace?: string | null;
26269 readonly status: V2ThreadStartResponse__DynamicToolCallStatus;
29243 readonly status: V2ThreadMetadataUpdateResponse__DynamicToolCallStatus;
2627029244 readonly success?: boolean | null;
2627129245 readonly tool: string;
2627229246 readonly type: "dynamicToolCall";
2627329247 }
2627429248 | {
26275 readonly agentsStates: { readonly [x: string]: V2ThreadStartResponse__CollabAgentState };
29249 readonly agentsStates: {
29250 readonly [x: string]: V2ThreadMetadataUpdateResponse__CollabAgentState;
29251 };
2627629252 readonly id: string;
2627729253 readonly model?: string | null;
2627829254 readonly prompt?: string | null;
26279 readonly reasoningEffort?: V2ThreadStartResponse__ReasoningEffort | null;
29255 readonly reasoningEffort?: V2ThreadMetadataUpdateResponse__ReasoningEffort | null;
2628029256 readonly receiverThreadIds: ReadonlyArray<string>;
2628129257 readonly senderThreadId: string;
26282 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
26283 readonly tool:
26284 | "spawnAgent"
26285 | "sendInput"
26286 | "resumeAgent"
26287 | "wait"
26288 | "closeAgent"
26289 | "sendMessage"
26290 | "followupTask"
26291 | "interruptAgent"
26292 | "listAgents";
29258 readonly status: V2ThreadMetadataUpdateResponse__CollabAgentToolCallStatus;
29259 readonly tool: V2ThreadMetadataUpdateResponse__CollabAgentTool;
2629329260 readonly type: "collabAgentToolCall";
2629429261 }
2629529262 | {
2629629263 readonly agentPath: string;
2629729264 readonly agentThreadId: string;
2629829265 readonly id: string;
26299 readonly kind: V2ThreadStartResponse__SubAgentActivityKind;
29266 readonly kind: V2ThreadMetadataUpdateResponse__SubAgentActivityKind;
2630029267 readonly type: "subAgentActivity";
2630129268 }
2630229269 | {
26303 readonly action?: V2ThreadStartResponse__WebSearchAction | null;
29270 readonly action?: V2ThreadMetadataUpdateResponse__WebSearchAction | null;
2630429271 readonly id: string;
2630529272 readonly query: string;
26306 readonly results?: ReadonlyArray<unknown> | null;
29273 readonly results?: ReadonlyArray<Schema.Json> | null;
2630729274 readonly type: "webSearch";
2630829275 }
2630929276 | {
2631029277 readonly id: string;
26311 readonly path: V2ThreadStartResponse__LegacyAppPathString;
29278 readonly path: V2ThreadMetadataUpdateResponse__LegacyAppPathString;
2631229279 readonly type: "imageView";
2631329280 }
2631429281 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
......@@ -26316,32 +29283,34 @@ export type V2ThreadStartResponse__ThreadItem =
2631629283 readonly id: string;
2631729284 readonly result: string;
2631829285 readonly revisedPrompt?: string | null;
26319 readonly savedPath?: V2ThreadStartResponse__AbsolutePathBuf | null;
29286 readonly savedPath?: V2ThreadMetadataUpdateResponse__AbsolutePathBuf | null;
2632029287 readonly status: string;
2632129288 readonly type: "imageGeneration";
2632229289 }
2632329290 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
2632429291 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
2632529292 | { readonly id: string; readonly type: "contextCompaction" };
26326export const V2ThreadStartResponse__ThreadItem = Schema.Union(
29293export const V2ThreadMetadataUpdateResponse__ThreadItem = Schema.Union(
2632729294 [
2632829295 Schema.Struct({
2632929296 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26330 content: Schema.Array(V2ThreadStartResponse__UserInput),
29297 content: Schema.Array(V2ThreadMetadataUpdateResponse__UserInput),
2633129298 id: Schema.String,
2633229299 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
2633329300 }).annotate({ title: "UserMessageThreadItem" }),
2633429301 Schema.Struct({
26335 fragments: Schema.Array(V2ThreadStartResponse__HookPromptFragment),
29302 fragments: Schema.Array(V2ThreadMetadataUpdateResponse__HookPromptFragment),
2633629303 id: Schema.String,
2633729304 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
2633829305 }).annotate({ title: "HookPromptThreadItem" }),
2633929306 Schema.Struct({
2634029307 id: Schema.String,
2634129308 memoryCitation: Schema.optionalKey(
26342 Schema.Union([V2ThreadStartResponse__MemoryCitation, Schema.Null]),
29309 Schema.Union([V2ThreadMetadataUpdateResponse__MemoryCitation, Schema.Null]),
29310 ),
29311 phase: Schema.optionalKey(
29312 Schema.Union([V2ThreadMetadataUpdateResponse__MessagePhase, Schema.Null]),
2634329313 ),
26344 phase: Schema.optionalKey(Schema.Union([V2ThreadStartResponse__MessagePhase, Schema.Null])),
2634529314 text: Schema.String,
2634629315 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
2634729316 questions: Schema.optionalKey(
......@@ -26382,17 +29351,20 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union(
2638229351 ]),
2638329352 ),
2638429353 command: Schema.String.annotate({ description: "The command to be executed." }),
26385 commandActions: Schema.Array(V2ThreadStartResponse__CommandAction).annotate({
29354 commandActions: Schema.Array(V2ThreadMetadataUpdateResponse__CommandAction).annotate({
2638629355 description:
2638729356 "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.",
2638829357 }),
26389 cwd: Schema.String.annotate({ description: "The command's working directory." }),
29358 cwd: Schema.suspend(
29359 (): Schema.Codec<V2ThreadMetadataUpdateResponse__LegacyAppPathString> =>
29360 V2ThreadMetadataUpdateResponse__LegacyAppPathString,
29361 ).annotate({ description: "The command's working directory." }),
2639029362 durationMs: Schema.optionalKey(
2639129363 Schema.Union([
2639229364 Schema.Number.annotate({
2639329365 description: "The duration of the command execution in milliseconds.",
2639429366 format: "int64",
26395 }).check(Schema.isInt()),
29367 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2639629368 Schema.Null,
2639729369 ]),
2639829370 ),
......@@ -26401,7 +29373,7 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union(
2640129373 Schema.Number.annotate({
2640229374 description: "The command's exit code.",
2640329375 format: "int32",
26404 }).check(Schema.isInt()),
29376 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2640529377 Schema.Null,
2640629378 ]),
2640729379 ),
......@@ -26415,40 +29387,38 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union(
2641529387 ]),
2641629388 ),
2641729389 source: Schema.optionalKey(
26418 Schema.Literals([
26419 "agent",
26420 "userShell",
26421 "unifiedExecStartup",
26422 "unifiedExecInteraction",
26423 ]).annotate({ default: "agent" }),
29390 Schema.suspend(
29391 (): Schema.Codec<V2ThreadMetadataUpdateResponse__CommandExecutionSource> =>
29392 V2ThreadMetadataUpdateResponse__CommandExecutionSource,
29393 ).annotate({ default: "agent" }),
2642429394 ),
26425 status: V2ThreadStartResponse__CommandExecutionStatus,
29395 status: V2ThreadMetadataUpdateResponse__CommandExecutionStatus,
2642629396 type: Schema.Literal("commandExecution").annotate({
2642729397 title: "CommandExecutionThreadItemType",
2642829398 }),
2642929399 }).annotate({ title: "CommandExecutionThreadItem" }),
2643029400 Schema.Struct({
26431 changes: Schema.Array(V2ThreadStartResponse__FileUpdateChange),
29401 changes: Schema.Array(V2ThreadMetadataUpdateResponse__FileUpdateChange),
2643229402 id: Schema.String,
26433 status: V2ThreadStartResponse__PatchApplyStatus,
29403 status: V2ThreadMetadataUpdateResponse__PatchApplyStatus,
2643429404 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
2643529405 }).annotate({ title: "FileChangeThreadItem" }),
2643629406 Schema.Struct({
2643729407 appContext: Schema.optionalKey(
26438 Schema.Union([V2ThreadStartResponse__McpToolCallAppContext, Schema.Null]),
29408 Schema.Union([V2ThreadMetadataUpdateResponse__McpToolCallAppContext, Schema.Null]),
2643929409 ),
26440 arguments: Schema.Unknown,
29410 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2644129411 durationMs: Schema.optionalKey(
2644229412 Schema.Union([
2644329413 Schema.Number.annotate({
2644429414 description: "The duration of the MCP tool call in milliseconds.",
2644529415 format: "int64",
26446 }).check(Schema.isInt()),
29416 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2644729417 Schema.Null,
2644829418 ]),
2644929419 ),
2645029420 error: Schema.optionalKey(
26451 Schema.Union([V2ThreadStartResponse__McpToolCallError, Schema.Null]),
29421 Schema.Union([V2ThreadMetadataUpdateResponse__McpToolCallError, Schema.Null]),
2645229422 ),
2645329423 id: Schema.String,
2645429424 mcpAppResourceUri: Schema.optionalKey(
......@@ -26461,18 +29431,18 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union(
2646129431 ),
2646229432 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2646329433 result: Schema.optionalKey(
26464 Schema.Union([V2ThreadStartResponse__McpToolCallResult, Schema.Null]),
29434 Schema.Union([V2ThreadMetadataUpdateResponse__McpToolCallResult, Schema.Null]),
2646529435 ),
2646629436 server: Schema.String,
26467 status: V2ThreadStartResponse__McpToolCallStatus,
29437 status: V2ThreadMetadataUpdateResponse__McpToolCallStatus,
2646829438 tool: Schema.String,
2646929439 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
2647029440 }).annotate({ title: "McpToolCallThreadItem" }),
2647129441 Schema.Struct({
26472 arguments: Schema.Unknown,
29442 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2647329443 contentItems: Schema.optionalKey(
2647429444 Schema.Union([
26475 Schema.Array(V2ThreadStartResponse__DynamicToolCallOutputContentItem),
29445 Schema.Array(V2ThreadMetadataUpdateResponse__DynamicToolCallOutputContentItem),
2647629446 Schema.Null,
2647729447 ]),
2647829448 ),
......@@ -26481,21 +29451,22 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union(
2648129451 Schema.Number.annotate({
2648229452 description: "The duration of the dynamic tool call in milliseconds.",
2648329453 format: "int64",
26484 }).check(Schema.isInt()),
29454 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2648529455 Schema.Null,
2648629456 ]),
2648729457 ),
2648829458 id: Schema.String,
2648929459 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26490 status: V2ThreadStartResponse__DynamicToolCallStatus,
29460 status: V2ThreadMetadataUpdateResponse__DynamicToolCallStatus,
2649129461 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2649229462 tool: Schema.String,
2649329463 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
2649429464 }).annotate({ title: "DynamicToolCallThreadItem" }),
2649529465 Schema.Struct({
26496 agentsStates: Schema.Record(Schema.String, V2ThreadStartResponse__CollabAgentState).annotate({
26497 description: "Last known status of the target agents, when available.",
26498 }),
29466 agentsStates: Schema.Record(
29467 Schema.String,
29468 V2ThreadMetadataUpdateResponse__CollabAgentState,
29469 ).annotate({ description: "Last known status of the target agents, when available." }),
2649929470 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
2650029471 model: Schema.optionalKey(
2650129472 Schema.Union([
......@@ -26514,7 +29485,7 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union(
2651429485 ]),
2651529486 ),
2651629487 reasoningEffort: Schema.optionalKey(
26517 Schema.Union([V2ThreadStartResponse__ReasoningEffort, Schema.Null]).annotate({
29488 Schema.Union([V2ThreadMetadataUpdateResponse__ReasoningEffort, Schema.Null]).annotate({
2651829489 description: "Reasoning effort requested for the spawned agent, when applicable.",
2651929490 }),
2652029491 ),
......@@ -26525,20 +29496,14 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union(
2652529496 senderThreadId: Schema.String.annotate({
2652629497 description: "Thread ID of the agent issuing the collab request.",
2652729498 }),
26528 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
26529 description: "Current status of the collab tool call.",
26530 }),
26531 tool: Schema.Literals([
26532 "spawnAgent",
26533 "sendInput",
26534 "resumeAgent",
26535 "wait",
26536 "closeAgent",
26537 "sendMessage",
26538 "followupTask",
26539 "interruptAgent",
26540 "listAgents",
26541 ]).annotate({ description: "Name of the collab tool that was invoked." }),
29499 status: Schema.suspend(
29500 (): Schema.Codec<V2ThreadMetadataUpdateResponse__CollabAgentToolCallStatus> =>
29501 V2ThreadMetadataUpdateResponse__CollabAgentToolCallStatus,
29502 ).annotate({ description: "Current status of the collab tool call." }),
29503 tool: Schema.suspend(
29504 (): Schema.Codec<V2ThreadMetadataUpdateResponse__CollabAgentTool> =>
29505 V2ThreadMetadataUpdateResponse__CollabAgentTool,
29506 ).annotate({ description: "Name of the collab tool that was invoked." }),
2654229507 type: Schema.Literal("collabAgentToolCall").annotate({
2654329508 title: "CollabAgentToolCallThreadItemType",
2654429509 }),
......@@ -26547,20 +29512,20 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union(
2654729512 agentPath: Schema.String,
2654829513 agentThreadId: Schema.String,
2654929514 id: Schema.String,
26550 kind: V2ThreadStartResponse__SubAgentActivityKind,
29515 kind: V2ThreadMetadataUpdateResponse__SubAgentActivityKind,
2655129516 type: Schema.Literal("subAgentActivity").annotate({
2655229517 title: "SubAgentActivityThreadItemType",
2655329518 }),
2655429519 }).annotate({ title: "SubAgentActivityThreadItem" }),
2655529520 Schema.Struct({
2655629521 action: Schema.optionalKey(
26557 Schema.Union([V2ThreadStartResponse__WebSearchAction, Schema.Null]),
29522 Schema.Union([V2ThreadMetadataUpdateResponse__WebSearchAction, Schema.Null]),
2655829523 ),
2655929524 id: Schema.String,
2656029525 query: Schema.String,
2656129526 results: Schema.optionalKey(
2656229527 Schema.Union([
26563 Schema.Array(Schema.Unknown).annotate({
29528 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
2656429529 description:
2656529530 "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.",
2656629531 }),
......@@ -26571,13 +29536,17 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union(
2657129536 }).annotate({ title: "WebSearchThreadItem" }),
2657229537 Schema.Struct({
2657329538 id: Schema.String,
26574 path: V2ThreadStartResponse__LegacyAppPathString,
29539 path: V2ThreadMetadataUpdateResponse__LegacyAppPathString,
2657529540 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
2657629541 }).annotate({ title: "ImageViewThreadItem" }),
2657729542 Schema.Struct({
2657829543 durationMs: Schema.Number.annotate({ format: "uint64" })
26579 .check(Schema.isInt())
26580 .check(Schema.isGreaterThanOrEqualTo(0)),
29544 .check(Schema.isInt().annotate({ expected: "an integer" }))
29545 .check(
29546 Schema.isGreaterThanOrEqualTo(0).annotate({
29547 expected: "a value greater than or equal to 0",
29548 }),
29549 ),
2658129550 id: Schema.String,
2658229551 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
2658329552 }).annotate({
......@@ -26589,7 +29558,7 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union(
2658929558 result: Schema.String,
2659029559 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2659129560 savedPath: Schema.optionalKey(
26592 Schema.Union([V2ThreadStartResponse__AbsolutePathBuf, Schema.Null]),
29561 Schema.Union([V2ThreadMetadataUpdateResponse__AbsolutePathBuf, Schema.Null]),
2659329562 ),
2659429563 status: Schema.String,
2659529564 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
......@@ -26616,37 +29585,24 @@ export const V2ThreadStartResponse__ThreadItem = Schema.Union(
2661629585 }).annotate({ title: "ContextCompactionThreadItem" }),
2661729586 ],
2661829587 { mode: "oneOf" },
26619);
26620
26621export type V2ThreadUnarchiveResponse__TurnError = {
26622 readonly additionalDetails?: string | null;
26623 readonly codexErrorInfo?: V2ThreadUnarchiveResponse__CodexErrorInfo | null;
26624 readonly message: string;
26625};
26626export const V2ThreadUnarchiveResponse__TurnError = Schema.Struct({
26627 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26628 codexErrorInfo: Schema.optionalKey(
26629 Schema.Union([V2ThreadUnarchiveResponse__CodexErrorInfo, Schema.Null]),
26630 ),
26631 message: Schema.String,
26632});
29588).annotate({ identifier: "V2ThreadMetadataUpdateResponse__ThreadItem" });
2663329589
26634export type V2ThreadUnarchiveResponse__ThreadItem =
29590export type V2ThreadReadResponse__ThreadItem =
2663529591 | {
2663629592 readonly clientId?: string | null;
26637 readonly content: ReadonlyArray<V2ThreadUnarchiveResponse__UserInput>;
29593 readonly content: ReadonlyArray<V2ThreadReadResponse__UserInput>;
2663829594 readonly id: string;
2663929595 readonly type: "userMessage";
2664029596 }
2664129597 | {
26642 readonly fragments: ReadonlyArray<V2ThreadUnarchiveResponse__HookPromptFragment>;
29598 readonly fragments: ReadonlyArray<V2ThreadReadResponse__HookPromptFragment>;
2664329599 readonly id: string;
2664429600 readonly type: "hookPrompt";
2664529601 }
2664629602 | {
2664729603 readonly id: string;
26648 readonly memoryCitation?: V2ThreadUnarchiveResponse__MemoryCitation | null;
26649 readonly phase?: V2ThreadUnarchiveResponse__MessagePhase | null;
29604 readonly memoryCitation?: V2ThreadReadResponse__MemoryCitation | null;
29605 readonly phase?: V2ThreadReadResponse__MessagePhase | null;
2665029606 readonly text: string;
2665129607 readonly delivery?: "async" | null;
2665229608 readonly questions?: ReadonlyArray<{
......@@ -26665,85 +29621,76 @@ export type V2ThreadUnarchiveResponse__ThreadItem =
2666529621 | {
2666629622 readonly aggregatedOutput?: string | null;
2666729623 readonly command: string;
26668 readonly commandActions: ReadonlyArray<V2ThreadUnarchiveResponse__CommandAction>;
26669 readonly cwd: string;
29624 readonly commandActions: ReadonlyArray<V2ThreadReadResponse__CommandAction>;
29625 readonly cwd: V2ThreadReadResponse__LegacyAppPathString;
2667029626 readonly durationMs?: number | null;
2667129627 readonly exitCode?: number | null;
2667229628 readonly id: string;
2667329629 readonly processId?: string | null;
26674 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
26675 readonly status: V2ThreadUnarchiveResponse__CommandExecutionStatus;
29630 readonly source?: V2ThreadReadResponse__CommandExecutionSource;
29631 readonly status: V2ThreadReadResponse__CommandExecutionStatus;
2667629632 readonly type: "commandExecution";
2667729633 }
2667829634 | {
26679 readonly changes: ReadonlyArray<V2ThreadUnarchiveResponse__FileUpdateChange>;
29635 readonly changes: ReadonlyArray<V2ThreadReadResponse__FileUpdateChange>;
2668029636 readonly id: string;
26681 readonly status: V2ThreadUnarchiveResponse__PatchApplyStatus;
29637 readonly status: V2ThreadReadResponse__PatchApplyStatus;
2668229638 readonly type: "fileChange";
2668329639 }
2668429640 | {
26685 readonly appContext?: V2ThreadUnarchiveResponse__McpToolCallAppContext | null;
26686 readonly arguments: unknown;
29641 readonly appContext?: V2ThreadReadResponse__McpToolCallAppContext | null;
29642 readonly arguments: Schema.Json;
2668729643 readonly durationMs?: number | null;
26688 readonly error?: V2ThreadUnarchiveResponse__McpToolCallError | null;
29644 readonly error?: V2ThreadReadResponse__McpToolCallError | null;
2668929645 readonly id: string;
2669029646 readonly mcpAppResourceUri?: string | null;
2669129647 readonly pluginId?: string | null;
26692 readonly result?: V2ThreadUnarchiveResponse__McpToolCallResult | null;
29648 readonly result?: V2ThreadReadResponse__McpToolCallResult | null;
2669329649 readonly server: string;
26694 readonly status: V2ThreadUnarchiveResponse__McpToolCallStatus;
29650 readonly status: V2ThreadReadResponse__McpToolCallStatus;
2669529651 readonly tool: string;
2669629652 readonly type: "mcpToolCall";
2669729653 }
2669829654 | {
26699 readonly arguments: unknown;
26700 readonly contentItems?: ReadonlyArray<V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem> | null;
29655 readonly arguments: Schema.Json;
29656 readonly contentItems?: ReadonlyArray<V2ThreadReadResponse__DynamicToolCallOutputContentItem> | null;
2670129657 readonly durationMs?: number | null;
2670229658 readonly id: string;
2670329659 readonly namespace?: string | null;
26704 readonly status: V2ThreadUnarchiveResponse__DynamicToolCallStatus;
29660 readonly status: V2ThreadReadResponse__DynamicToolCallStatus;
2670529661 readonly success?: boolean | null;
2670629662 readonly tool: string;
2670729663 readonly type: "dynamicToolCall";
2670829664 }
2670929665 | {
26710 readonly agentsStates: { readonly [x: string]: V2ThreadUnarchiveResponse__CollabAgentState };
29666 readonly agentsStates: { readonly [x: string]: V2ThreadReadResponse__CollabAgentState };
2671129667 readonly id: string;
2671229668 readonly model?: string | null;
2671329669 readonly prompt?: string | null;
26714 readonly reasoningEffort?: V2ThreadUnarchiveResponse__ReasoningEffort | null;
29670 readonly reasoningEffort?: V2ThreadReadResponse__ReasoningEffort | null;
2671529671 readonly receiverThreadIds: ReadonlyArray<string>;
2671629672 readonly senderThreadId: string;
26717 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
26718 readonly tool:
26719 | "spawnAgent"
26720 | "sendInput"
26721 | "resumeAgent"
26722 | "wait"
26723 | "closeAgent"
26724 | "sendMessage"
26725 | "followupTask"
26726 | "interruptAgent"
26727 | "listAgents";
29673 readonly status: V2ThreadReadResponse__CollabAgentToolCallStatus;
29674 readonly tool: V2ThreadReadResponse__CollabAgentTool;
2672829675 readonly type: "collabAgentToolCall";
2672929676 }
2673029677 | {
2673129678 readonly agentPath: string;
2673229679 readonly agentThreadId: string;
2673329680 readonly id: string;
26734 readonly kind: V2ThreadUnarchiveResponse__SubAgentActivityKind;
29681 readonly kind: V2ThreadReadResponse__SubAgentActivityKind;
2673529682 readonly type: "subAgentActivity";
2673629683 }
2673729684 | {
26738 readonly action?: V2ThreadUnarchiveResponse__WebSearchAction | null;
29685 readonly action?: V2ThreadReadResponse__WebSearchAction | null;
2673929686 readonly id: string;
2674029687 readonly query: string;
26741 readonly results?: ReadonlyArray<unknown> | null;
29688 readonly results?: ReadonlyArray<Schema.Json> | null;
2674229689 readonly type: "webSearch";
2674329690 }
2674429691 | {
2674529692 readonly id: string;
26746 readonly path: V2ThreadUnarchiveResponse__LegacyAppPathString;
29693 readonly path: V2ThreadReadResponse__LegacyAppPathString;
2674729694 readonly type: "imageView";
2674829695 }
2674929696 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
......@@ -26751,34 +29698,32 @@ export type V2ThreadUnarchiveResponse__ThreadItem =
2675129698 readonly id: string;
2675229699 readonly result: string;
2675329700 readonly revisedPrompt?: string | null;
26754 readonly savedPath?: V2ThreadUnarchiveResponse__AbsolutePathBuf | null;
29701 readonly savedPath?: V2ThreadReadResponse__AbsolutePathBuf | null;
2675529702 readonly status: string;
2675629703 readonly type: "imageGeneration";
2675729704 }
2675829705 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
2675929706 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
2676029707 | { readonly id: string; readonly type: "contextCompaction" };
26761export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
29708export const V2ThreadReadResponse__ThreadItem = Schema.Union(
2676229709 [
2676329710 Schema.Struct({
2676429711 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26765 content: Schema.Array(V2ThreadUnarchiveResponse__UserInput),
29712 content: Schema.Array(V2ThreadReadResponse__UserInput),
2676629713 id: Schema.String,
2676729714 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
2676829715 }).annotate({ title: "UserMessageThreadItem" }),
2676929716 Schema.Struct({
26770 fragments: Schema.Array(V2ThreadUnarchiveResponse__HookPromptFragment),
29717 fragments: Schema.Array(V2ThreadReadResponse__HookPromptFragment),
2677129718 id: Schema.String,
2677229719 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
2677329720 }).annotate({ title: "HookPromptThreadItem" }),
2677429721 Schema.Struct({
2677529722 id: Schema.String,
2677629723 memoryCitation: Schema.optionalKey(
26777 Schema.Union([V2ThreadUnarchiveResponse__MemoryCitation, Schema.Null]),
26778 ),
26779 phase: Schema.optionalKey(
26780 Schema.Union([V2ThreadUnarchiveResponse__MessagePhase, Schema.Null]),
29724 Schema.Union([V2ThreadReadResponse__MemoryCitation, Schema.Null]),
2678129725 ),
29726 phase: Schema.optionalKey(Schema.Union([V2ThreadReadResponse__MessagePhase, Schema.Null])),
2678229727 text: Schema.String,
2678329728 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
2678429729 questions: Schema.optionalKey(
......@@ -26819,17 +29764,20 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
2681929764 ]),
2682029765 ),
2682129766 command: Schema.String.annotate({ description: "The command to be executed." }),
26822 commandActions: Schema.Array(V2ThreadUnarchiveResponse__CommandAction).annotate({
29767 commandActions: Schema.Array(V2ThreadReadResponse__CommandAction).annotate({
2682329768 description:
2682429769 "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.",
2682529770 }),
26826 cwd: Schema.String.annotate({ description: "The command's working directory." }),
29771 cwd: Schema.suspend(
29772 (): Schema.Codec<V2ThreadReadResponse__LegacyAppPathString> =>
29773 V2ThreadReadResponse__LegacyAppPathString,
29774 ).annotate({ description: "The command's working directory." }),
2682729775 durationMs: Schema.optionalKey(
2682829776 Schema.Union([
2682929777 Schema.Number.annotate({
2683029778 description: "The duration of the command execution in milliseconds.",
2683129779 format: "int64",
26832 }).check(Schema.isInt()),
29780 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2683329781 Schema.Null,
2683429782 ]),
2683529783 ),
......@@ -26838,7 +29786,7 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
2683829786 Schema.Number.annotate({
2683929787 description: "The command's exit code.",
2684029788 format: "int32",
26841 }).check(Schema.isInt()),
29789 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2684229790 Schema.Null,
2684329791 ]),
2684429792 ),
......@@ -26852,40 +29800,38 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
2685229800 ]),
2685329801 ),
2685429802 source: Schema.optionalKey(
26855 Schema.Literals([
26856 "agent",
26857 "userShell",
26858 "unifiedExecStartup",
26859 "unifiedExecInteraction",
26860 ]).annotate({ default: "agent" }),
29803 Schema.suspend(
29804 (): Schema.Codec<V2ThreadReadResponse__CommandExecutionSource> =>
29805 V2ThreadReadResponse__CommandExecutionSource,
29806 ).annotate({ default: "agent" }),
2686129807 ),
26862 status: V2ThreadUnarchiveResponse__CommandExecutionStatus,
29808 status: V2ThreadReadResponse__CommandExecutionStatus,
2686329809 type: Schema.Literal("commandExecution").annotate({
2686429810 title: "CommandExecutionThreadItemType",
2686529811 }),
2686629812 }).annotate({ title: "CommandExecutionThreadItem" }),
2686729813 Schema.Struct({
26868 changes: Schema.Array(V2ThreadUnarchiveResponse__FileUpdateChange),
29814 changes: Schema.Array(V2ThreadReadResponse__FileUpdateChange),
2686929815 id: Schema.String,
26870 status: V2ThreadUnarchiveResponse__PatchApplyStatus,
29816 status: V2ThreadReadResponse__PatchApplyStatus,
2687129817 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
2687229818 }).annotate({ title: "FileChangeThreadItem" }),
2687329819 Schema.Struct({
2687429820 appContext: Schema.optionalKey(
26875 Schema.Union([V2ThreadUnarchiveResponse__McpToolCallAppContext, Schema.Null]),
29821 Schema.Union([V2ThreadReadResponse__McpToolCallAppContext, Schema.Null]),
2687629822 ),
26877 arguments: Schema.Unknown,
29823 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2687829824 durationMs: Schema.optionalKey(
2687929825 Schema.Union([
2688029826 Schema.Number.annotate({
2688129827 description: "The duration of the MCP tool call in milliseconds.",
2688229828 format: "int64",
26883 }).check(Schema.isInt()),
29829 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2688429830 Schema.Null,
2688529831 ]),
2688629832 ),
2688729833 error: Schema.optionalKey(
26888 Schema.Union([V2ThreadUnarchiveResponse__McpToolCallError, Schema.Null]),
29834 Schema.Union([V2ThreadReadResponse__McpToolCallError, Schema.Null]),
2688929835 ),
2689029836 id: Schema.String,
2689129837 mcpAppResourceUri: Schema.optionalKey(
......@@ -26898,18 +29844,18 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
2689829844 ),
2689929845 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2690029846 result: Schema.optionalKey(
26901 Schema.Union([V2ThreadUnarchiveResponse__McpToolCallResult, Schema.Null]),
29847 Schema.Union([V2ThreadReadResponse__McpToolCallResult, Schema.Null]),
2690229848 ),
2690329849 server: Schema.String,
26904 status: V2ThreadUnarchiveResponse__McpToolCallStatus,
29850 status: V2ThreadReadResponse__McpToolCallStatus,
2690529851 tool: Schema.String,
2690629852 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
2690729853 }).annotate({ title: "McpToolCallThreadItem" }),
2690829854 Schema.Struct({
26909 arguments: Schema.Unknown,
29855 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2691029856 contentItems: Schema.optionalKey(
2691129857 Schema.Union([
26912 Schema.Array(V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem),
29858 Schema.Array(V2ThreadReadResponse__DynamicToolCallOutputContentItem),
2691329859 Schema.Null,
2691429860 ]),
2691529861 ),
......@@ -26918,22 +29864,21 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
2691829864 Schema.Number.annotate({
2691929865 description: "The duration of the dynamic tool call in milliseconds.",
2692029866 format: "int64",
26921 }).check(Schema.isInt()),
29867 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2692229868 Schema.Null,
2692329869 ]),
2692429870 ),
2692529871 id: Schema.String,
2692629872 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
26927 status: V2ThreadUnarchiveResponse__DynamicToolCallStatus,
29873 status: V2ThreadReadResponse__DynamicToolCallStatus,
2692829874 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2692929875 tool: Schema.String,
2693029876 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
2693129877 }).annotate({ title: "DynamicToolCallThreadItem" }),
2693229878 Schema.Struct({
26933 agentsStates: Schema.Record(
26934 Schema.String,
26935 V2ThreadUnarchiveResponse__CollabAgentState,
26936 ).annotate({ description: "Last known status of the target agents, when available." }),
29879 agentsStates: Schema.Record(Schema.String, V2ThreadReadResponse__CollabAgentState).annotate({
29880 description: "Last known status of the target agents, when available.",
29881 }),
2693729882 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
2693829883 model: Schema.optionalKey(
2693929884 Schema.Union([
......@@ -26952,7 +29897,7 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
2695229897 ]),
2695329898 ),
2695429899 reasoningEffort: Schema.optionalKey(
26955 Schema.Union([V2ThreadUnarchiveResponse__ReasoningEffort, Schema.Null]).annotate({
29900 Schema.Union([V2ThreadReadResponse__ReasoningEffort, Schema.Null]).annotate({
2695629901 description: "Reasoning effort requested for the spawned agent, when applicable.",
2695729902 }),
2695829903 ),
......@@ -26963,20 +29908,14 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
2696329908 senderThreadId: Schema.String.annotate({
2696429909 description: "Thread ID of the agent issuing the collab request.",
2696529910 }),
26966 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
26967 description: "Current status of the collab tool call.",
26968 }),
26969 tool: Schema.Literals([
26970 "spawnAgent",
26971 "sendInput",
26972 "resumeAgent",
26973 "wait",
26974 "closeAgent",
26975 "sendMessage",
26976 "followupTask",
26977 "interruptAgent",
26978 "listAgents",
26979 ]).annotate({ description: "Name of the collab tool that was invoked." }),
29911 status: Schema.suspend(
29912 (): Schema.Codec<V2ThreadReadResponse__CollabAgentToolCallStatus> =>
29913 V2ThreadReadResponse__CollabAgentToolCallStatus,
29914 ).annotate({ description: "Current status of the collab tool call." }),
29915 tool: Schema.suspend(
29916 (): Schema.Codec<V2ThreadReadResponse__CollabAgentTool> =>
29917 V2ThreadReadResponse__CollabAgentTool,
29918 ).annotate({ description: "Name of the collab tool that was invoked." }),
2698029919 type: Schema.Literal("collabAgentToolCall").annotate({
2698129920 title: "CollabAgentToolCallThreadItemType",
2698229921 }),
......@@ -26985,20 +29924,20 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
2698529924 agentPath: Schema.String,
2698629925 agentThreadId: Schema.String,
2698729926 id: Schema.String,
26988 kind: V2ThreadUnarchiveResponse__SubAgentActivityKind,
29927 kind: V2ThreadReadResponse__SubAgentActivityKind,
2698929928 type: Schema.Literal("subAgentActivity").annotate({
2699029929 title: "SubAgentActivityThreadItemType",
2699129930 }),
2699229931 }).annotate({ title: "SubAgentActivityThreadItem" }),
2699329932 Schema.Struct({
2699429933 action: Schema.optionalKey(
26995 Schema.Union([V2ThreadUnarchiveResponse__WebSearchAction, Schema.Null]),
29934 Schema.Union([V2ThreadReadResponse__WebSearchAction, Schema.Null]),
2699629935 ),
2699729936 id: Schema.String,
2699829937 query: Schema.String,
2699929938 results: Schema.optionalKey(
2700029939 Schema.Union([
27001 Schema.Array(Schema.Unknown).annotate({
29940 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
2700229941 description:
2700329942 "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.",
2700429943 }),
......@@ -27009,13 +29948,17 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
2700929948 }).annotate({ title: "WebSearchThreadItem" }),
2701029949 Schema.Struct({
2701129950 id: Schema.String,
27012 path: V2ThreadUnarchiveResponse__LegacyAppPathString,
29951 path: V2ThreadReadResponse__LegacyAppPathString,
2701329952 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
2701429953 }).annotate({ title: "ImageViewThreadItem" }),
2701529954 Schema.Struct({
2701629955 durationMs: Schema.Number.annotate({ format: "uint64" })
27017 .check(Schema.isInt())
27018 .check(Schema.isGreaterThanOrEqualTo(0)),
29956 .check(Schema.isInt().annotate({ expected: "an integer" }))
29957 .check(
29958 Schema.isGreaterThanOrEqualTo(0).annotate({
29959 expected: "a value greater than or equal to 0",
29960 }),
29961 ),
2701929962 id: Schema.String,
2702029963 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
2702129964 }).annotate({
......@@ -27027,7 +29970,7 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
2702729970 result: Schema.String,
2702829971 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2702929972 savedPath: Schema.optionalKey(
27030 Schema.Union([V2ThreadUnarchiveResponse__AbsolutePathBuf, Schema.Null]),
29973 Schema.Union([V2ThreadReadResponse__AbsolutePathBuf, Schema.Null]),
2703129974 ),
2703229975 status: Schema.String,
2703329976 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
......@@ -27054,37 +29997,24 @@ export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
2705429997 }).annotate({ title: "ContextCompactionThreadItem" }),
2705529998 ],
2705629999 { mode: "oneOf" },
27057);
30000).annotate({ identifier: "V2ThreadReadResponse__ThreadItem" });
2705830001
27059export type V2TurnCompletedNotification__TurnError = {
27060 readonly additionalDetails?: string | null;
27061 readonly codexErrorInfo?: V2TurnCompletedNotification__CodexErrorInfo | null;
27062 readonly message: string;
27063};
27064export const V2TurnCompletedNotification__TurnError = Schema.Struct({
27065 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27066 codexErrorInfo: Schema.optionalKey(
27067 Schema.Union([V2TurnCompletedNotification__CodexErrorInfo, Schema.Null]),
27068 ),
27069 message: Schema.String,
27070});
27071
27072export type V2TurnCompletedNotification__ThreadItem =
30002export type V2ThreadResumeResponse__ThreadItem =
2707330003 | {
2707430004 readonly clientId?: string | null;
27075 readonly content: ReadonlyArray<V2TurnCompletedNotification__UserInput>;
30005 readonly content: ReadonlyArray<V2ThreadResumeResponse__UserInput>;
2707630006 readonly id: string;
2707730007 readonly type: "userMessage";
2707830008 }
2707930009 | {
27080 readonly fragments: ReadonlyArray<V2TurnCompletedNotification__HookPromptFragment>;
30010 readonly fragments: ReadonlyArray<V2ThreadResumeResponse__HookPromptFragment>;
2708130011 readonly id: string;
2708230012 readonly type: "hookPrompt";
2708330013 }
2708430014 | {
2708530015 readonly id: string;
27086 readonly memoryCitation?: V2TurnCompletedNotification__MemoryCitation | null;
27087 readonly phase?: V2TurnCompletedNotification__MessagePhase | null;
30016 readonly memoryCitation?: V2ThreadResumeResponse__MemoryCitation | null;
30017 readonly phase?: V2ThreadResumeResponse__MessagePhase | null;
2708830018 readonly text: string;
2708930019 readonly delivery?: "async" | null;
2709030020 readonly questions?: ReadonlyArray<{
......@@ -27103,87 +30033,76 @@ export type V2TurnCompletedNotification__ThreadItem =
2710330033 | {
2710430034 readonly aggregatedOutput?: string | null;
2710530035 readonly command: string;
27106 readonly commandActions: ReadonlyArray<V2TurnCompletedNotification__CommandAction>;
27107 readonly cwd: string;
30036 readonly commandActions: ReadonlyArray<V2ThreadResumeResponse__CommandAction>;
30037 readonly cwd: V2ThreadResumeResponse__LegacyAppPathString;
2710830038 readonly durationMs?: number | null;
2710930039 readonly exitCode?: number | null;
2711030040 readonly id: string;
2711130041 readonly processId?: string | null;
27112 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
27113 readonly status: V2TurnCompletedNotification__CommandExecutionStatus;
30042 readonly source?: V2ThreadResumeResponse__CommandExecutionSource;
30043 readonly status: V2ThreadResumeResponse__CommandExecutionStatus;
2711430044 readonly type: "commandExecution";
2711530045 }
2711630046 | {
27117 readonly changes: ReadonlyArray<V2TurnCompletedNotification__FileUpdateChange>;
30047 readonly changes: ReadonlyArray<V2ThreadResumeResponse__FileUpdateChange>;
2711830048 readonly id: string;
27119 readonly status: V2TurnCompletedNotification__PatchApplyStatus;
30049 readonly status: V2ThreadResumeResponse__PatchApplyStatus;
2712030050 readonly type: "fileChange";
2712130051 }
2712230052 | {
27123 readonly appContext?: V2TurnCompletedNotification__McpToolCallAppContext | null;
27124 readonly arguments: unknown;
30053 readonly appContext?: V2ThreadResumeResponse__McpToolCallAppContext | null;
30054 readonly arguments: Schema.Json;
2712530055 readonly durationMs?: number | null;
27126 readonly error?: V2TurnCompletedNotification__McpToolCallError | null;
30056 readonly error?: V2ThreadResumeResponse__McpToolCallError | null;
2712730057 readonly id: string;
2712830058 readonly mcpAppResourceUri?: string | null;
2712930059 readonly pluginId?: string | null;
27130 readonly result?: V2TurnCompletedNotification__McpToolCallResult | null;
30060 readonly result?: V2ThreadResumeResponse__McpToolCallResult | null;
2713130061 readonly server: string;
27132 readonly status: V2TurnCompletedNotification__McpToolCallStatus;
30062 readonly status: V2ThreadResumeResponse__McpToolCallStatus;
2713330063 readonly tool: string;
2713430064 readonly type: "mcpToolCall";
2713530065 }
2713630066 | {
27137 readonly arguments: unknown;
27138 readonly contentItems?: ReadonlyArray<V2TurnCompletedNotification__DynamicToolCallOutputContentItem> | null;
30067 readonly arguments: Schema.Json;
30068 readonly contentItems?: ReadonlyArray<V2ThreadResumeResponse__DynamicToolCallOutputContentItem> | null;
2713930069 readonly durationMs?: number | null;
2714030070 readonly id: string;
2714130071 readonly namespace?: string | null;
27142 readonly status: V2TurnCompletedNotification__DynamicToolCallStatus;
30072 readonly status: V2ThreadResumeResponse__DynamicToolCallStatus;
2714330073 readonly success?: boolean | null;
2714430074 readonly tool: string;
2714530075 readonly type: "dynamicToolCall";
2714630076 }
2714730077 | {
27148 readonly agentsStates: {
27149 readonly [x: string]: V2TurnCompletedNotification__CollabAgentState;
27150 };
30078 readonly agentsStates: { readonly [x: string]: V2ThreadResumeResponse__CollabAgentState };
2715130079 readonly id: string;
2715230080 readonly model?: string | null;
2715330081 readonly prompt?: string | null;
27154 readonly reasoningEffort?: V2TurnCompletedNotification__ReasoningEffort | null;
30082 readonly reasoningEffort?: V2ThreadResumeResponse__ReasoningEffort | null;
2715530083 readonly receiverThreadIds: ReadonlyArray<string>;
2715630084 readonly senderThreadId: string;
27157 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
27158 readonly tool:
27159 | "spawnAgent"
27160 | "sendInput"
27161 | "resumeAgent"
27162 | "wait"
27163 | "closeAgent"
27164 | "sendMessage"
27165 | "followupTask"
27166 | "interruptAgent"
27167 | "listAgents";
30085 readonly status: V2ThreadResumeResponse__CollabAgentToolCallStatus;
30086 readonly tool: V2ThreadResumeResponse__CollabAgentTool;
2716830087 readonly type: "collabAgentToolCall";
2716930088 }
2717030089 | {
2717130090 readonly agentPath: string;
2717230091 readonly agentThreadId: string;
2717330092 readonly id: string;
27174 readonly kind: V2TurnCompletedNotification__SubAgentActivityKind;
30093 readonly kind: V2ThreadResumeResponse__SubAgentActivityKind;
2717530094 readonly type: "subAgentActivity";
2717630095 }
2717730096 | {
27178 readonly action?: V2TurnCompletedNotification__WebSearchAction | null;
30097 readonly action?: V2ThreadResumeResponse__WebSearchAction | null;
2717930098 readonly id: string;
2718030099 readonly query: string;
27181 readonly results?: ReadonlyArray<unknown> | null;
30100 readonly results?: ReadonlyArray<Schema.Json> | null;
2718230101 readonly type: "webSearch";
2718330102 }
2718430103 | {
2718530104 readonly id: string;
27186 readonly path: V2TurnCompletedNotification__LegacyAppPathString;
30105 readonly path: V2ThreadResumeResponse__LegacyAppPathString;
2718730106 readonly type: "imageView";
2718830107 }
2718930108 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
......@@ -27191,34 +30110,32 @@ export type V2TurnCompletedNotification__ThreadItem =
2719130110 readonly id: string;
2719230111 readonly result: string;
2719330112 readonly revisedPrompt?: string | null;
27194 readonly savedPath?: V2TurnCompletedNotification__AbsolutePathBuf | null;
30113 readonly savedPath?: V2ThreadResumeResponse__AbsolutePathBuf | null;
2719530114 readonly status: string;
2719630115 readonly type: "imageGeneration";
2719730116 }
2719830117 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
2719930118 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
2720030119 | { readonly id: string; readonly type: "contextCompaction" };
27201export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
30120export const V2ThreadResumeResponse__ThreadItem = Schema.Union(
2720230121 [
2720330122 Schema.Struct({
2720430123 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27205 content: Schema.Array(V2TurnCompletedNotification__UserInput),
30124 content: Schema.Array(V2ThreadResumeResponse__UserInput),
2720630125 id: Schema.String,
2720730126 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
2720830127 }).annotate({ title: "UserMessageThreadItem" }),
2720930128 Schema.Struct({
27210 fragments: Schema.Array(V2TurnCompletedNotification__HookPromptFragment),
30129 fragments: Schema.Array(V2ThreadResumeResponse__HookPromptFragment),
2721130130 id: Schema.String,
2721230131 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
2721330132 }).annotate({ title: "HookPromptThreadItem" }),
2721430133 Schema.Struct({
2721530134 id: Schema.String,
2721630135 memoryCitation: Schema.optionalKey(
27217 Schema.Union([V2TurnCompletedNotification__MemoryCitation, Schema.Null]),
27218 ),
27219 phase: Schema.optionalKey(
27220 Schema.Union([V2TurnCompletedNotification__MessagePhase, Schema.Null]),
30136 Schema.Union([V2ThreadResumeResponse__MemoryCitation, Schema.Null]),
2722130137 ),
30138 phase: Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__MessagePhase, Schema.Null])),
2722230139 text: Schema.String,
2722330140 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
2722430141 questions: Schema.optionalKey(
......@@ -27259,17 +30176,20 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
2725930176 ]),
2726030177 ),
2726130178 command: Schema.String.annotate({ description: "The command to be executed." }),
27262 commandActions: Schema.Array(V2TurnCompletedNotification__CommandAction).annotate({
30179 commandActions: Schema.Array(V2ThreadResumeResponse__CommandAction).annotate({
2726330180 description:
2726430181 "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.",
2726530182 }),
27266 cwd: Schema.String.annotate({ description: "The command's working directory." }),
30183 cwd: Schema.suspend(
30184 (): Schema.Codec<V2ThreadResumeResponse__LegacyAppPathString> =>
30185 V2ThreadResumeResponse__LegacyAppPathString,
30186 ).annotate({ description: "The command's working directory." }),
2726730187 durationMs: Schema.optionalKey(
2726830188 Schema.Union([
2726930189 Schema.Number.annotate({
2727030190 description: "The duration of the command execution in milliseconds.",
2727130191 format: "int64",
27272 }).check(Schema.isInt()),
30192 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2727330193 Schema.Null,
2727430194 ]),
2727530195 ),
......@@ -27278,7 +30198,7 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
2727830198 Schema.Number.annotate({
2727930199 description: "The command's exit code.",
2728030200 format: "int32",
27281 }).check(Schema.isInt()),
30201 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2728230202 Schema.Null,
2728330203 ]),
2728430204 ),
......@@ -27292,40 +30212,38 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
2729230212 ]),
2729330213 ),
2729430214 source: Schema.optionalKey(
27295 Schema.Literals([
27296 "agent",
27297 "userShell",
27298 "unifiedExecStartup",
27299 "unifiedExecInteraction",
27300 ]).annotate({ default: "agent" }),
30215 Schema.suspend(
30216 (): Schema.Codec<V2ThreadResumeResponse__CommandExecutionSource> =>
30217 V2ThreadResumeResponse__CommandExecutionSource,
30218 ).annotate({ default: "agent" }),
2730130219 ),
27302 status: V2TurnCompletedNotification__CommandExecutionStatus,
30220 status: V2ThreadResumeResponse__CommandExecutionStatus,
2730330221 type: Schema.Literal("commandExecution").annotate({
2730430222 title: "CommandExecutionThreadItemType",
2730530223 }),
2730630224 }).annotate({ title: "CommandExecutionThreadItem" }),
2730730225 Schema.Struct({
27308 changes: Schema.Array(V2TurnCompletedNotification__FileUpdateChange),
30226 changes: Schema.Array(V2ThreadResumeResponse__FileUpdateChange),
2730930227 id: Schema.String,
27310 status: V2TurnCompletedNotification__PatchApplyStatus,
30228 status: V2ThreadResumeResponse__PatchApplyStatus,
2731130229 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
2731230230 }).annotate({ title: "FileChangeThreadItem" }),
2731330231 Schema.Struct({
2731430232 appContext: Schema.optionalKey(
27315 Schema.Union([V2TurnCompletedNotification__McpToolCallAppContext, Schema.Null]),
30233 Schema.Union([V2ThreadResumeResponse__McpToolCallAppContext, Schema.Null]),
2731630234 ),
27317 arguments: Schema.Unknown,
30235 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2731830236 durationMs: Schema.optionalKey(
2731930237 Schema.Union([
2732030238 Schema.Number.annotate({
2732130239 description: "The duration of the MCP tool call in milliseconds.",
2732230240 format: "int64",
27323 }).check(Schema.isInt()),
30241 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2732430242 Schema.Null,
2732530243 ]),
2732630244 ),
2732730245 error: Schema.optionalKey(
27328 Schema.Union([V2TurnCompletedNotification__McpToolCallError, Schema.Null]),
30246 Schema.Union([V2ThreadResumeResponse__McpToolCallError, Schema.Null]),
2732930247 ),
2733030248 id: Schema.String,
2733130249 mcpAppResourceUri: Schema.optionalKey(
......@@ -27338,18 +30256,18 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
2733830256 ),
2733930257 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2734030258 result: Schema.optionalKey(
27341 Schema.Union([V2TurnCompletedNotification__McpToolCallResult, Schema.Null]),
30259 Schema.Union([V2ThreadResumeResponse__McpToolCallResult, Schema.Null]),
2734230260 ),
2734330261 server: Schema.String,
27344 status: V2TurnCompletedNotification__McpToolCallStatus,
30262 status: V2ThreadResumeResponse__McpToolCallStatus,
2734530263 tool: Schema.String,
2734630264 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
2734730265 }).annotate({ title: "McpToolCallThreadItem" }),
2734830266 Schema.Struct({
27349 arguments: Schema.Unknown,
30267 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2735030268 contentItems: Schema.optionalKey(
2735130269 Schema.Union([
27352 Schema.Array(V2TurnCompletedNotification__DynamicToolCallOutputContentItem),
30270 Schema.Array(V2ThreadResumeResponse__DynamicToolCallOutputContentItem),
2735330271 Schema.Null,
2735430272 ]),
2735530273 ),
......@@ -27358,22 +30276,21 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
2735830276 Schema.Number.annotate({
2735930277 description: "The duration of the dynamic tool call in milliseconds.",
2736030278 format: "int64",
27361 }).check(Schema.isInt()),
30279 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2736230280 Schema.Null,
2736330281 ]),
2736430282 ),
2736530283 id: Schema.String,
2736630284 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27367 status: V2TurnCompletedNotification__DynamicToolCallStatus,
30285 status: V2ThreadResumeResponse__DynamicToolCallStatus,
2736830286 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2736930287 tool: Schema.String,
2737030288 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
2737130289 }).annotate({ title: "DynamicToolCallThreadItem" }),
2737230290 Schema.Struct({
27373 agentsStates: Schema.Record(
27374 Schema.String,
27375 V2TurnCompletedNotification__CollabAgentState,
27376 ).annotate({ description: "Last known status of the target agents, when available." }),
30291 agentsStates: Schema.Record(Schema.String, V2ThreadResumeResponse__CollabAgentState).annotate(
30292 { description: "Last known status of the target agents, when available." },
30293 ),
2737730294 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
2737830295 model: Schema.optionalKey(
2737930296 Schema.Union([
......@@ -27392,7 +30309,7 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
2739230309 ]),
2739330310 ),
2739430311 reasoningEffort: Schema.optionalKey(
27395 Schema.Union([V2TurnCompletedNotification__ReasoningEffort, Schema.Null]).annotate({
30312 Schema.Union([V2ThreadResumeResponse__ReasoningEffort, Schema.Null]).annotate({
2739630313 description: "Reasoning effort requested for the spawned agent, when applicable.",
2739730314 }),
2739830315 ),
......@@ -27403,20 +30320,14 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
2740330320 senderThreadId: Schema.String.annotate({
2740430321 description: "Thread ID of the agent issuing the collab request.",
2740530322 }),
27406 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
27407 description: "Current status of the collab tool call.",
27408 }),
27409 tool: Schema.Literals([
27410 "spawnAgent",
27411 "sendInput",
27412 "resumeAgent",
27413 "wait",
27414 "closeAgent",
27415 "sendMessage",
27416 "followupTask",
27417 "interruptAgent",
27418 "listAgents",
27419 ]).annotate({ description: "Name of the collab tool that was invoked." }),
30323 status: Schema.suspend(
30324 (): Schema.Codec<V2ThreadResumeResponse__CollabAgentToolCallStatus> =>
30325 V2ThreadResumeResponse__CollabAgentToolCallStatus,
30326 ).annotate({ description: "Current status of the collab tool call." }),
30327 tool: Schema.suspend(
30328 (): Schema.Codec<V2ThreadResumeResponse__CollabAgentTool> =>
30329 V2ThreadResumeResponse__CollabAgentTool,
30330 ).annotate({ description: "Name of the collab tool that was invoked." }),
2742030331 type: Schema.Literal("collabAgentToolCall").annotate({
2742130332 title: "CollabAgentToolCallThreadItemType",
2742230333 }),
......@@ -27425,20 +30336,20 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
2742530336 agentPath: Schema.String,
2742630337 agentThreadId: Schema.String,
2742730338 id: Schema.String,
27428 kind: V2TurnCompletedNotification__SubAgentActivityKind,
30339 kind: V2ThreadResumeResponse__SubAgentActivityKind,
2742930340 type: Schema.Literal("subAgentActivity").annotate({
2743030341 title: "SubAgentActivityThreadItemType",
2743130342 }),
2743230343 }).annotate({ title: "SubAgentActivityThreadItem" }),
2743330344 Schema.Struct({
2743430345 action: Schema.optionalKey(
27435 Schema.Union([V2TurnCompletedNotification__WebSearchAction, Schema.Null]),
30346 Schema.Union([V2ThreadResumeResponse__WebSearchAction, Schema.Null]),
2743630347 ),
2743730348 id: Schema.String,
2743830349 query: Schema.String,
2743930350 results: Schema.optionalKey(
2744030351 Schema.Union([
27441 Schema.Array(Schema.Unknown).annotate({
30352 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
2744230353 description:
2744330354 "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.",
2744430355 }),
......@@ -27449,13 +30360,17 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
2744930360 }).annotate({ title: "WebSearchThreadItem" }),
2745030361 Schema.Struct({
2745130362 id: Schema.String,
27452 path: V2TurnCompletedNotification__LegacyAppPathString,
30363 path: V2ThreadResumeResponse__LegacyAppPathString,
2745330364 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
2745430365 }).annotate({ title: "ImageViewThreadItem" }),
2745530366 Schema.Struct({
2745630367 durationMs: Schema.Number.annotate({ format: "uint64" })
27457 .check(Schema.isInt())
27458 .check(Schema.isGreaterThanOrEqualTo(0)),
30368 .check(Schema.isInt().annotate({ expected: "an integer" }))
30369 .check(
30370 Schema.isGreaterThanOrEqualTo(0).annotate({
30371 expected: "a value greater than or equal to 0",
30372 }),
30373 ),
2745930374 id: Schema.String,
2746030375 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
2746130376 }).annotate({
......@@ -27467,7 +30382,7 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
2746730382 result: Schema.String,
2746830383 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2746930384 savedPath: Schema.optionalKey(
27470 Schema.Union([V2TurnCompletedNotification__AbsolutePathBuf, Schema.Null]),
30385 Schema.Union([V2ThreadResumeResponse__AbsolutePathBuf, Schema.Null]),
2747130386 ),
2747230387 status: Schema.String,
2747330388 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
......@@ -27494,37 +30409,24 @@ export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
2749430409 }).annotate({ title: "ContextCompactionThreadItem" }),
2749530410 ],
2749630411 { mode: "oneOf" },
27497);
30412).annotate({ identifier: "V2ThreadResumeResponse__ThreadItem" });
2749830413
27499export type V2TurnStartedNotification__TurnError = {
27500 readonly additionalDetails?: string | null;
27501 readonly codexErrorInfo?: V2TurnStartedNotification__CodexErrorInfo | null;
27502 readonly message: string;
27503};
27504export const V2TurnStartedNotification__TurnError = Schema.Struct({
27505 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27506 codexErrorInfo: Schema.optionalKey(
27507 Schema.Union([V2TurnStartedNotification__CodexErrorInfo, Schema.Null]),
27508 ),
27509 message: Schema.String,
27510});
27511
27512export type V2TurnStartedNotification__ThreadItem =
30414export type V2ThreadRollbackResponse__ThreadItem =
2751330415 | {
2751430416 readonly clientId?: string | null;
27515 readonly content: ReadonlyArray<V2TurnStartedNotification__UserInput>;
30417 readonly content: ReadonlyArray<V2ThreadRollbackResponse__UserInput>;
2751630418 readonly id: string;
2751730419 readonly type: "userMessage";
2751830420 }
2751930421 | {
27520 readonly fragments: ReadonlyArray<V2TurnStartedNotification__HookPromptFragment>;
30422 readonly fragments: ReadonlyArray<V2ThreadRollbackResponse__HookPromptFragment>;
2752130423 readonly id: string;
2752230424 readonly type: "hookPrompt";
2752330425 }
2752430426 | {
2752530427 readonly id: string;
27526 readonly memoryCitation?: V2TurnStartedNotification__MemoryCitation | null;
27527 readonly phase?: V2TurnStartedNotification__MessagePhase | null;
30428 readonly memoryCitation?: V2ThreadRollbackResponse__MemoryCitation | null;
30429 readonly phase?: V2ThreadRollbackResponse__MessagePhase | null;
2752830430 readonly text: string;
2752930431 readonly delivery?: "async" | null;
2753030432 readonly questions?: ReadonlyArray<{
......@@ -27543,85 +30445,76 @@ export type V2TurnStartedNotification__ThreadItem =
2754330445 | {
2754430446 readonly aggregatedOutput?: string | null;
2754530447 readonly command: string;
27546 readonly commandActions: ReadonlyArray<V2TurnStartedNotification__CommandAction>;
27547 readonly cwd: string;
30448 readonly commandActions: ReadonlyArray<V2ThreadRollbackResponse__CommandAction>;
30449 readonly cwd: V2ThreadRollbackResponse__LegacyAppPathString;
2754830450 readonly durationMs?: number | null;
2754930451 readonly exitCode?: number | null;
2755030452 readonly id: string;
2755130453 readonly processId?: string | null;
27552 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
27553 readonly status: V2TurnStartedNotification__CommandExecutionStatus;
30454 readonly source?: V2ThreadRollbackResponse__CommandExecutionSource;
30455 readonly status: V2ThreadRollbackResponse__CommandExecutionStatus;
2755430456 readonly type: "commandExecution";
2755530457 }
2755630458 | {
27557 readonly changes: ReadonlyArray<V2TurnStartedNotification__FileUpdateChange>;
30459 readonly changes: ReadonlyArray<V2ThreadRollbackResponse__FileUpdateChange>;
2755830460 readonly id: string;
27559 readonly status: V2TurnStartedNotification__PatchApplyStatus;
30461 readonly status: V2ThreadRollbackResponse__PatchApplyStatus;
2756030462 readonly type: "fileChange";
2756130463 }
2756230464 | {
27563 readonly appContext?: V2TurnStartedNotification__McpToolCallAppContext | null;
27564 readonly arguments: unknown;
30465 readonly appContext?: V2ThreadRollbackResponse__McpToolCallAppContext | null;
30466 readonly arguments: Schema.Json;
2756530467 readonly durationMs?: number | null;
27566 readonly error?: V2TurnStartedNotification__McpToolCallError | null;
30468 readonly error?: V2ThreadRollbackResponse__McpToolCallError | null;
2756730469 readonly id: string;
2756830470 readonly mcpAppResourceUri?: string | null;
2756930471 readonly pluginId?: string | null;
27570 readonly result?: V2TurnStartedNotification__McpToolCallResult | null;
30472 readonly result?: V2ThreadRollbackResponse__McpToolCallResult | null;
2757130473 readonly server: string;
27572 readonly status: V2TurnStartedNotification__McpToolCallStatus;
30474 readonly status: V2ThreadRollbackResponse__McpToolCallStatus;
2757330475 readonly tool: string;
2757430476 readonly type: "mcpToolCall";
2757530477 }
2757630478 | {
27577 readonly arguments: unknown;
27578 readonly contentItems?: ReadonlyArray<V2TurnStartedNotification__DynamicToolCallOutputContentItem> | null;
30479 readonly arguments: Schema.Json;
30480 readonly contentItems?: ReadonlyArray<V2ThreadRollbackResponse__DynamicToolCallOutputContentItem> | null;
2757930481 readonly durationMs?: number | null;
2758030482 readonly id: string;
2758130483 readonly namespace?: string | null;
27582 readonly status: V2TurnStartedNotification__DynamicToolCallStatus;
30484 readonly status: V2ThreadRollbackResponse__DynamicToolCallStatus;
2758330485 readonly success?: boolean | null;
2758430486 readonly tool: string;
2758530487 readonly type: "dynamicToolCall";
2758630488 }
2758730489 | {
27588 readonly agentsStates: { readonly [x: string]: V2TurnStartedNotification__CollabAgentState };
30490 readonly agentsStates: { readonly [x: string]: V2ThreadRollbackResponse__CollabAgentState };
2758930491 readonly id: string;
2759030492 readonly model?: string | null;
2759130493 readonly prompt?: string | null;
27592 readonly reasoningEffort?: V2TurnStartedNotification__ReasoningEffort | null;
30494 readonly reasoningEffort?: V2ThreadRollbackResponse__ReasoningEffort | null;
2759330495 readonly receiverThreadIds: ReadonlyArray<string>;
2759430496 readonly senderThreadId: string;
27595 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
27596 readonly tool:
27597 | "spawnAgent"
27598 | "sendInput"
27599 | "resumeAgent"
27600 | "wait"
27601 | "closeAgent"
27602 | "sendMessage"
27603 | "followupTask"
27604 | "interruptAgent"
27605 | "listAgents";
30497 readonly status: V2ThreadRollbackResponse__CollabAgentToolCallStatus;
30498 readonly tool: V2ThreadRollbackResponse__CollabAgentTool;
2760630499 readonly type: "collabAgentToolCall";
2760730500 }
2760830501 | {
2760930502 readonly agentPath: string;
2761030503 readonly agentThreadId: string;
2761130504 readonly id: string;
27612 readonly kind: V2TurnStartedNotification__SubAgentActivityKind;
30505 readonly kind: V2ThreadRollbackResponse__SubAgentActivityKind;
2761330506 readonly type: "subAgentActivity";
2761430507 }
2761530508 | {
27616 readonly action?: V2TurnStartedNotification__WebSearchAction | null;
30509 readonly action?: V2ThreadRollbackResponse__WebSearchAction | null;
2761730510 readonly id: string;
2761830511 readonly query: string;
27619 readonly results?: ReadonlyArray<unknown> | null;
30512 readonly results?: ReadonlyArray<Schema.Json> | null;
2762030513 readonly type: "webSearch";
2762130514 }
2762230515 | {
2762330516 readonly id: string;
27624 readonly path: V2TurnStartedNotification__LegacyAppPathString;
30517 readonly path: V2ThreadRollbackResponse__LegacyAppPathString;
2762530518 readonly type: "imageView";
2762630519 }
2762730520 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
......@@ -27629,33 +30522,33 @@ export type V2TurnStartedNotification__ThreadItem =
2762930522 readonly id: string;
2763030523 readonly result: string;
2763130524 readonly revisedPrompt?: string | null;
27632 readonly savedPath?: V2TurnStartedNotification__AbsolutePathBuf | null;
30525 readonly savedPath?: V2ThreadRollbackResponse__AbsolutePathBuf | null;
2763330526 readonly status: string;
2763430527 readonly type: "imageGeneration";
2763530528 }
2763630529 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
2763730530 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
2763830531 | { readonly id: string; readonly type: "contextCompaction" };
27639export const V2TurnStartedNotification__ThreadItem = Schema.Union(
30532export const V2ThreadRollbackResponse__ThreadItem = Schema.Union(
2764030533 [
2764130534 Schema.Struct({
2764230535 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27643 content: Schema.Array(V2TurnStartedNotification__UserInput),
30536 content: Schema.Array(V2ThreadRollbackResponse__UserInput),
2764430537 id: Schema.String,
2764530538 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
2764630539 }).annotate({ title: "UserMessageThreadItem" }),
2764730540 Schema.Struct({
27648 fragments: Schema.Array(V2TurnStartedNotification__HookPromptFragment),
30541 fragments: Schema.Array(V2ThreadRollbackResponse__HookPromptFragment),
2764930542 id: Schema.String,
2765030543 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
2765130544 }).annotate({ title: "HookPromptThreadItem" }),
2765230545 Schema.Struct({
2765330546 id: Schema.String,
2765430547 memoryCitation: Schema.optionalKey(
27655 Schema.Union([V2TurnStartedNotification__MemoryCitation, Schema.Null]),
30548 Schema.Union([V2ThreadRollbackResponse__MemoryCitation, Schema.Null]),
2765630549 ),
2765730550 phase: Schema.optionalKey(
27658 Schema.Union([V2TurnStartedNotification__MessagePhase, Schema.Null]),
30551 Schema.Union([V2ThreadRollbackResponse__MessagePhase, Schema.Null]),
2765930552 ),
2766030553 text: Schema.String,
2766130554 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
......@@ -27697,17 +30590,20 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union(
2769730590 ]),
2769830591 ),
2769930592 command: Schema.String.annotate({ description: "The command to be executed." }),
27700 commandActions: Schema.Array(V2TurnStartedNotification__CommandAction).annotate({
30593 commandActions: Schema.Array(V2ThreadRollbackResponse__CommandAction).annotate({
2770130594 description:
2770230595 "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.",
2770330596 }),
27704 cwd: Schema.String.annotate({ description: "The command's working directory." }),
30597 cwd: Schema.suspend(
30598 (): Schema.Codec<V2ThreadRollbackResponse__LegacyAppPathString> =>
30599 V2ThreadRollbackResponse__LegacyAppPathString,
30600 ).annotate({ description: "The command's working directory." }),
2770530601 durationMs: Schema.optionalKey(
2770630602 Schema.Union([
2770730603 Schema.Number.annotate({
2770830604 description: "The duration of the command execution in milliseconds.",
2770930605 format: "int64",
27710 }).check(Schema.isInt()),
30606 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2771130607 Schema.Null,
2771230608 ]),
2771330609 ),
......@@ -27716,7 +30612,7 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union(
2771630612 Schema.Number.annotate({
2771730613 description: "The command's exit code.",
2771830614 format: "int32",
27719 }).check(Schema.isInt()),
30615 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2772030616 Schema.Null,
2772130617 ]),
2772230618 ),
......@@ -27730,40 +30626,38 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union(
2773030626 ]),
2773130627 ),
2773230628 source: Schema.optionalKey(
27733 Schema.Literals([
27734 "agent",
27735 "userShell",
27736 "unifiedExecStartup",
27737 "unifiedExecInteraction",
27738 ]).annotate({ default: "agent" }),
30629 Schema.suspend(
30630 (): Schema.Codec<V2ThreadRollbackResponse__CommandExecutionSource> =>
30631 V2ThreadRollbackResponse__CommandExecutionSource,
30632 ).annotate({ default: "agent" }),
2773930633 ),
27740 status: V2TurnStartedNotification__CommandExecutionStatus,
30634 status: V2ThreadRollbackResponse__CommandExecutionStatus,
2774130635 type: Schema.Literal("commandExecution").annotate({
2774230636 title: "CommandExecutionThreadItemType",
2774330637 }),
2774430638 }).annotate({ title: "CommandExecutionThreadItem" }),
2774530639 Schema.Struct({
27746 changes: Schema.Array(V2TurnStartedNotification__FileUpdateChange),
30640 changes: Schema.Array(V2ThreadRollbackResponse__FileUpdateChange),
2774730641 id: Schema.String,
27748 status: V2TurnStartedNotification__PatchApplyStatus,
30642 status: V2ThreadRollbackResponse__PatchApplyStatus,
2774930643 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
2775030644 }).annotate({ title: "FileChangeThreadItem" }),
2775130645 Schema.Struct({
2775230646 appContext: Schema.optionalKey(
27753 Schema.Union([V2TurnStartedNotification__McpToolCallAppContext, Schema.Null]),
30647 Schema.Union([V2ThreadRollbackResponse__McpToolCallAppContext, Schema.Null]),
2775430648 ),
27755 arguments: Schema.Unknown,
30649 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2775630650 durationMs: Schema.optionalKey(
2775730651 Schema.Union([
2775830652 Schema.Number.annotate({
2775930653 description: "The duration of the MCP tool call in milliseconds.",
2776030654 format: "int64",
27761 }).check(Schema.isInt()),
30655 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2776230656 Schema.Null,
2776330657 ]),
2776430658 ),
2776530659 error: Schema.optionalKey(
27766 Schema.Union([V2TurnStartedNotification__McpToolCallError, Schema.Null]),
30660 Schema.Union([V2ThreadRollbackResponse__McpToolCallError, Schema.Null]),
2776730661 ),
2776830662 id: Schema.String,
2776930663 mcpAppResourceUri: Schema.optionalKey(
......@@ -27776,18 +30670,18 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union(
2777630670 ),
2777730671 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2777830672 result: Schema.optionalKey(
27779 Schema.Union([V2TurnStartedNotification__McpToolCallResult, Schema.Null]),
30673 Schema.Union([V2ThreadRollbackResponse__McpToolCallResult, Schema.Null]),
2778030674 ),
2778130675 server: Schema.String,
27782 status: V2TurnStartedNotification__McpToolCallStatus,
30676 status: V2ThreadRollbackResponse__McpToolCallStatus,
2778330677 tool: Schema.String,
2778430678 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
2778530679 }).annotate({ title: "McpToolCallThreadItem" }),
2778630680 Schema.Struct({
27787 arguments: Schema.Unknown,
30681 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2778830682 contentItems: Schema.optionalKey(
2778930683 Schema.Union([
27790 Schema.Array(V2TurnStartedNotification__DynamicToolCallOutputContentItem),
30684 Schema.Array(V2ThreadRollbackResponse__DynamicToolCallOutputContentItem),
2779130685 Schema.Null,
2779230686 ]),
2779330687 ),
......@@ -27796,13 +30690,13 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union(
2779630690 Schema.Number.annotate({
2779730691 description: "The duration of the dynamic tool call in milliseconds.",
2779830692 format: "int64",
27799 }).check(Schema.isInt()),
30693 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2780030694 Schema.Null,
2780130695 ]),
2780230696 ),
2780330697 id: Schema.String,
2780430698 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27805 status: V2TurnStartedNotification__DynamicToolCallStatus,
30699 status: V2ThreadRollbackResponse__DynamicToolCallStatus,
2780630700 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2780730701 tool: Schema.String,
2780830702 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
......@@ -27810,7 +30704,7 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union(
2781030704 Schema.Struct({
2781130705 agentsStates: Schema.Record(
2781230706 Schema.String,
27813 V2TurnStartedNotification__CollabAgentState,
30707 V2ThreadRollbackResponse__CollabAgentState,
2781430708 ).annotate({ description: "Last known status of the target agents, when available." }),
2781530709 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
2781630710 model: Schema.optionalKey(
......@@ -27830,7 +30724,7 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union(
2783030724 ]),
2783130725 ),
2783230726 reasoningEffort: Schema.optionalKey(
27833 Schema.Union([V2TurnStartedNotification__ReasoningEffort, Schema.Null]).annotate({
30727 Schema.Union([V2ThreadRollbackResponse__ReasoningEffort, Schema.Null]).annotate({
2783430728 description: "Reasoning effort requested for the spawned agent, when applicable.",
2783530729 }),
2783630730 ),
......@@ -27841,20 +30735,14 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union(
2784130735 senderThreadId: Schema.String.annotate({
2784230736 description: "Thread ID of the agent issuing the collab request.",
2784330737 }),
27844 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
27845 description: "Current status of the collab tool call.",
27846 }),
27847 tool: Schema.Literals([
27848 "spawnAgent",
27849 "sendInput",
27850 "resumeAgent",
27851 "wait",
27852 "closeAgent",
27853 "sendMessage",
27854 "followupTask",
27855 "interruptAgent",
27856 "listAgents",
27857 ]).annotate({ description: "Name of the collab tool that was invoked." }),
30738 status: Schema.suspend(
30739 (): Schema.Codec<V2ThreadRollbackResponse__CollabAgentToolCallStatus> =>
30740 V2ThreadRollbackResponse__CollabAgentToolCallStatus,
30741 ).annotate({ description: "Current status of the collab tool call." }),
30742 tool: Schema.suspend(
30743 (): Schema.Codec<V2ThreadRollbackResponse__CollabAgentTool> =>
30744 V2ThreadRollbackResponse__CollabAgentTool,
30745 ).annotate({ description: "Name of the collab tool that was invoked." }),
2785830746 type: Schema.Literal("collabAgentToolCall").annotate({
2785930747 title: "CollabAgentToolCallThreadItemType",
2786030748 }),
......@@ -27863,20 +30751,20 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union(
2786330751 agentPath: Schema.String,
2786430752 agentThreadId: Schema.String,
2786530753 id: Schema.String,
27866 kind: V2TurnStartedNotification__SubAgentActivityKind,
30754 kind: V2ThreadRollbackResponse__SubAgentActivityKind,
2786730755 type: Schema.Literal("subAgentActivity").annotate({
2786830756 title: "SubAgentActivityThreadItemType",
2786930757 }),
2787030758 }).annotate({ title: "SubAgentActivityThreadItem" }),
2787130759 Schema.Struct({
2787230760 action: Schema.optionalKey(
27873 Schema.Union([V2TurnStartedNotification__WebSearchAction, Schema.Null]),
30761 Schema.Union([V2ThreadRollbackResponse__WebSearchAction, Schema.Null]),
2787430762 ),
2787530763 id: Schema.String,
2787630764 query: Schema.String,
2787730765 results: Schema.optionalKey(
2787830766 Schema.Union([
27879 Schema.Array(Schema.Unknown).annotate({
30767 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
2788030768 description:
2788130769 "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.",
2788230770 }),
......@@ -27887,13 +30775,17 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union(
2788730775 }).annotate({ title: "WebSearchThreadItem" }),
2788830776 Schema.Struct({
2788930777 id: Schema.String,
27890 path: V2TurnStartedNotification__LegacyAppPathString,
30778 path: V2ThreadRollbackResponse__LegacyAppPathString,
2789130779 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
2789230780 }).annotate({ title: "ImageViewThreadItem" }),
2789330781 Schema.Struct({
2789430782 durationMs: Schema.Number.annotate({ format: "uint64" })
27895 .check(Schema.isInt())
27896 .check(Schema.isGreaterThanOrEqualTo(0)),
30783 .check(Schema.isInt().annotate({ expected: "an integer" }))
30784 .check(
30785 Schema.isGreaterThanOrEqualTo(0).annotate({
30786 expected: "a value greater than or equal to 0",
30787 }),
30788 ),
2789730789 id: Schema.String,
2789830790 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
2789930791 }).annotate({
......@@ -27905,7 +30797,7 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union(
2790530797 result: Schema.String,
2790630798 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2790730799 savedPath: Schema.optionalKey(
27908 Schema.Union([V2TurnStartedNotification__AbsolutePathBuf, Schema.Null]),
30800 Schema.Union([V2ThreadRollbackResponse__AbsolutePathBuf, Schema.Null]),
2790930801 ),
2791030802 status: Schema.String,
2791130803 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
......@@ -27932,37 +30824,61 @@ export const V2TurnStartedNotification__ThreadItem = Schema.Union(
2793230824 }).annotate({ title: "ContextCompactionThreadItem" }),
2793330825 ],
2793430826 { mode: "oneOf" },
27935);
30827).annotate({ identifier: "V2ThreadRollbackResponse__ThreadItem" });
2793630828
27937export type V2TurnStartResponse__TurnError = {
27938 readonly additionalDetails?: string | null;
27939 readonly codexErrorInfo?: V2TurnStartResponse__CodexErrorInfo | null;
27940 readonly message: string;
30829export type V2ThreadSettingsUpdatedNotification__ThreadSettings = {
30830 readonly activePermissionProfile?: V2ThreadSettingsUpdatedNotification__ActivePermissionProfile | null;
30831 readonly approvalPolicy: V2ThreadSettingsUpdatedNotification__AskForApproval;
30832 readonly approvalsReviewer: V2ThreadSettingsUpdatedNotification__ApprovalsReviewer;
30833 readonly collaborationMode: V2ThreadSettingsUpdatedNotification__CollaborationMode;
30834 readonly cwd: V2ThreadSettingsUpdatedNotification__AbsolutePathBuf;
30835 readonly effort?: V2ThreadSettingsUpdatedNotification__ReasoningEffort | null;
30836 readonly model: string;
30837 readonly modelProvider: string;
30838 readonly personality?: V2ThreadSettingsUpdatedNotification__Personality | null;
30839 readonly sandboxPolicy: V2ThreadSettingsUpdatedNotification__SandboxPolicy;
30840 readonly serviceTier?: string | null;
30841 readonly summary?: V2ThreadSettingsUpdatedNotification__ReasoningSummary | null;
2794130842};
27942export const V2TurnStartResponse__TurnError = Schema.Struct({
27943 additionalDetails: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
27944 codexErrorInfo: Schema.optionalKey(
27945 Schema.Union([V2TurnStartResponse__CodexErrorInfo, Schema.Null]),
30843export const V2ThreadSettingsUpdatedNotification__ThreadSettings = Schema.Struct({
30844 activePermissionProfile: Schema.optionalKey(
30845 Schema.Union([V2ThreadSettingsUpdatedNotification__ActivePermissionProfile, Schema.Null]),
2794630846 ),
27947 message: Schema.String,
27948});
30847 approvalPolicy: V2ThreadSettingsUpdatedNotification__AskForApproval,
30848 approvalsReviewer: V2ThreadSettingsUpdatedNotification__ApprovalsReviewer,
30849 collaborationMode: V2ThreadSettingsUpdatedNotification__CollaborationMode,
30850 cwd: V2ThreadSettingsUpdatedNotification__AbsolutePathBuf,
30851 effort: Schema.optionalKey(
30852 Schema.Union([V2ThreadSettingsUpdatedNotification__ReasoningEffort, Schema.Null]),
30853 ),
30854 model: Schema.String,
30855 modelProvider: Schema.String,
30856 personality: Schema.optionalKey(
30857 Schema.Union([V2ThreadSettingsUpdatedNotification__Personality, Schema.Null]),
30858 ),
30859 sandboxPolicy: V2ThreadSettingsUpdatedNotification__SandboxPolicy,
30860 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
30861 summary: Schema.optionalKey(
30862 Schema.Union([V2ThreadSettingsUpdatedNotification__ReasoningSummary, Schema.Null]),
30863 ),
30864}).annotate({ identifier: "V2ThreadSettingsUpdatedNotification__ThreadSettings" });
2794930865
27950export type V2TurnStartResponse__ThreadItem =
30866export type V2ThreadStartedNotification__ThreadItem =
2795130867 | {
2795230868 readonly clientId?: string | null;
27953 readonly content: ReadonlyArray<V2TurnStartResponse__UserInput>;
30869 readonly content: ReadonlyArray<V2ThreadStartedNotification__UserInput>;
2795430870 readonly id: string;
2795530871 readonly type: "userMessage";
2795630872 }
2795730873 | {
27958 readonly fragments: ReadonlyArray<V2TurnStartResponse__HookPromptFragment>;
30874 readonly fragments: ReadonlyArray<V2ThreadStartedNotification__HookPromptFragment>;
2795930875 readonly id: string;
2796030876 readonly type: "hookPrompt";
2796130877 }
2796230878 | {
2796330879 readonly id: string;
27964 readonly memoryCitation?: V2TurnStartResponse__MemoryCitation | null;
27965 readonly phase?: V2TurnStartResponse__MessagePhase | null;
30880 readonly memoryCitation?: V2ThreadStartedNotification__MemoryCitation | null;
30881 readonly phase?: V2ThreadStartedNotification__MessagePhase | null;
2796630882 readonly text: string;
2796730883 readonly delivery?: "async" | null;
2796830884 readonly questions?: ReadonlyArray<{
......@@ -27981,85 +30897,78 @@ export type V2TurnStartResponse__ThreadItem =
2798130897 | {
2798230898 readonly aggregatedOutput?: string | null;
2798330899 readonly command: string;
27984 readonly commandActions: ReadonlyArray<V2TurnStartResponse__CommandAction>;
27985 readonly cwd: string;
30900 readonly commandActions: ReadonlyArray<V2ThreadStartedNotification__CommandAction>;
30901 readonly cwd: V2ThreadStartedNotification__LegacyAppPathString;
2798630902 readonly durationMs?: number | null;
2798730903 readonly exitCode?: number | null;
2798830904 readonly id: string;
2798930905 readonly processId?: string | null;
27990 readonly source?: "agent" | "userShell" | "unifiedExecStartup" | "unifiedExecInteraction";
27991 readonly status: V2TurnStartResponse__CommandExecutionStatus;
30906 readonly source?: V2ThreadStartedNotification__CommandExecutionSource;
30907 readonly status: V2ThreadStartedNotification__CommandExecutionStatus;
2799230908 readonly type: "commandExecution";
2799330909 }
2799430910 | {
27995 readonly changes: ReadonlyArray<V2TurnStartResponse__FileUpdateChange>;
30911 readonly changes: ReadonlyArray<V2ThreadStartedNotification__FileUpdateChange>;
2799630912 readonly id: string;
27997 readonly status: V2TurnStartResponse__PatchApplyStatus;
30913 readonly status: V2ThreadStartedNotification__PatchApplyStatus;
2799830914 readonly type: "fileChange";
2799930915 }
2800030916 | {
28001 readonly appContext?: V2TurnStartResponse__McpToolCallAppContext | null;
28002 readonly arguments: unknown;
30917 readonly appContext?: V2ThreadStartedNotification__McpToolCallAppContext | null;
30918 readonly arguments: Schema.Json;
2800330919 readonly durationMs?: number | null;
28004 readonly error?: V2TurnStartResponse__McpToolCallError | null;
30920 readonly error?: V2ThreadStartedNotification__McpToolCallError | null;
2800530921 readonly id: string;
2800630922 readonly mcpAppResourceUri?: string | null;
2800730923 readonly pluginId?: string | null;
28008 readonly result?: V2TurnStartResponse__McpToolCallResult | null;
30924 readonly result?: V2ThreadStartedNotification__McpToolCallResult | null;
2800930925 readonly server: string;
28010 readonly status: V2TurnStartResponse__McpToolCallStatus;
30926 readonly status: V2ThreadStartedNotification__McpToolCallStatus;
2801130927 readonly tool: string;
2801230928 readonly type: "mcpToolCall";
2801330929 }
2801430930 | {
28015 readonly arguments: unknown;
28016 readonly contentItems?: ReadonlyArray<V2TurnStartResponse__DynamicToolCallOutputContentItem> | null;
30931 readonly arguments: Schema.Json;
30932 readonly contentItems?: ReadonlyArray<V2ThreadStartedNotification__DynamicToolCallOutputContentItem> | null;
2801730933 readonly durationMs?: number | null;
2801830934 readonly id: string;
2801930935 readonly namespace?: string | null;
28020 readonly status: V2TurnStartResponse__DynamicToolCallStatus;
30936 readonly status: V2ThreadStartedNotification__DynamicToolCallStatus;
2802130937 readonly success?: boolean | null;
2802230938 readonly tool: string;
2802330939 readonly type: "dynamicToolCall";
2802430940 }
2802530941 | {
28026 readonly agentsStates: { readonly [x: string]: V2TurnStartResponse__CollabAgentState };
30942 readonly agentsStates: {
30943 readonly [x: string]: V2ThreadStartedNotification__CollabAgentState;
30944 };
2802730945 readonly id: string;
2802830946 readonly model?: string | null;
2802930947 readonly prompt?: string | null;
28030 readonly reasoningEffort?: V2TurnStartResponse__ReasoningEffort | null;
30948 readonly reasoningEffort?: V2ThreadStartedNotification__ReasoningEffort | null;
2803130949 readonly receiverThreadIds: ReadonlyArray<string>;
2803230950 readonly senderThreadId: string;
28033 readonly status: "inProgress" | "completed" | "failed" | "interrupted";
28034 readonly tool:
28035 | "spawnAgent"
28036 | "sendInput"
28037 | "resumeAgent"
28038 | "wait"
28039 | "closeAgent"
28040 | "sendMessage"
28041 | "followupTask"
28042 | "interruptAgent"
28043 | "listAgents";
30951 readonly status: V2ThreadStartedNotification__CollabAgentToolCallStatus;
30952 readonly tool: V2ThreadStartedNotification__CollabAgentTool;
2804430953 readonly type: "collabAgentToolCall";
2804530954 }
2804630955 | {
2804730956 readonly agentPath: string;
2804830957 readonly agentThreadId: string;
2804930958 readonly id: string;
28050 readonly kind: V2TurnStartResponse__SubAgentActivityKind;
30959 readonly kind: V2ThreadStartedNotification__SubAgentActivityKind;
2805130960 readonly type: "subAgentActivity";
2805230961 }
2805330962 | {
28054 readonly action?: V2TurnStartResponse__WebSearchAction | null;
30963 readonly action?: V2ThreadStartedNotification__WebSearchAction | null;
2805530964 readonly id: string;
2805630965 readonly query: string;
28057 readonly results?: ReadonlyArray<unknown> | null;
30966 readonly results?: ReadonlyArray<Schema.Json> | null;
2805830967 readonly type: "webSearch";
2805930968 }
2806030969 | {
2806130970 readonly id: string;
28062 readonly path: V2TurnStartResponse__LegacyAppPathString;
30971 readonly path: V2ThreadStartedNotification__LegacyAppPathString;
2806330972 readonly type: "imageView";
2806430973 }
2806530974 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
......@@ -28067,32 +30976,34 @@ export type V2TurnStartResponse__ThreadItem =
2806730976 readonly id: string;
2806830977 readonly result: string;
2806930978 readonly revisedPrompt?: string | null;
28070 readonly savedPath?: V2TurnStartResponse__AbsolutePathBuf | null;
30979 readonly savedPath?: V2ThreadStartedNotification__AbsolutePathBuf | null;
2807130980 readonly status: string;
2807230981 readonly type: "imageGeneration";
2807330982 }
2807430983 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
2807530984 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
2807630985 | { readonly id: string; readonly type: "contextCompaction" };
28077export const V2TurnStartResponse__ThreadItem = Schema.Union(
30986export const V2ThreadStartedNotification__ThreadItem = Schema.Union(
2807830987 [
2807930988 Schema.Struct({
2808030989 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28081 content: Schema.Array(V2TurnStartResponse__UserInput),
30990 content: Schema.Array(V2ThreadStartedNotification__UserInput),
2808230991 id: Schema.String,
2808330992 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
2808430993 }).annotate({ title: "UserMessageThreadItem" }),
2808530994 Schema.Struct({
28086 fragments: Schema.Array(V2TurnStartResponse__HookPromptFragment),
30995 fragments: Schema.Array(V2ThreadStartedNotification__HookPromptFragment),
2808730996 id: Schema.String,
2808830997 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
2808930998 }).annotate({ title: "HookPromptThreadItem" }),
2809030999 Schema.Struct({
2809131000 id: Schema.String,
2809231001 memoryCitation: Schema.optionalKey(
28093 Schema.Union([V2TurnStartResponse__MemoryCitation, Schema.Null]),
31002 Schema.Union([V2ThreadStartedNotification__MemoryCitation, Schema.Null]),
31003 ),
31004 phase: Schema.optionalKey(
31005 Schema.Union([V2ThreadStartedNotification__MessagePhase, Schema.Null]),
2809431006 ),
28095 phase: Schema.optionalKey(Schema.Union([V2TurnStartResponse__MessagePhase, Schema.Null])),
2809631007 text: Schema.String,
2809731008 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
2809831009 questions: Schema.optionalKey(
......@@ -28133,17 +31044,20 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union(
2813331044 ]),
2813431045 ),
2813531046 command: Schema.String.annotate({ description: "The command to be executed." }),
28136 commandActions: Schema.Array(V2TurnStartResponse__CommandAction).annotate({
31047 commandActions: Schema.Array(V2ThreadStartedNotification__CommandAction).annotate({
2813731048 description:
2813831049 "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.",
2813931050 }),
28140 cwd: Schema.String.annotate({ description: "The command's working directory." }),
31051 cwd: Schema.suspend(
31052 (): Schema.Codec<V2ThreadStartedNotification__LegacyAppPathString> =>
31053 V2ThreadStartedNotification__LegacyAppPathString,
31054 ).annotate({ description: "The command's working directory." }),
2814131055 durationMs: Schema.optionalKey(
2814231056 Schema.Union([
2814331057 Schema.Number.annotate({
2814431058 description: "The duration of the command execution in milliseconds.",
2814531059 format: "int64",
28146 }).check(Schema.isInt()),
31060 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2814731061 Schema.Null,
2814831062 ]),
2814931063 ),
......@@ -28152,7 +31066,7 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union(
2815231066 Schema.Number.annotate({
2815331067 description: "The command's exit code.",
2815431068 format: "int32",
28155 }).check(Schema.isInt()),
31069 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2815631070 Schema.Null,
2815731071 ]),
2815831072 ),
......@@ -28166,39 +31080,39 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union(
2816631080 ]),
2816731081 ),
2816831082 source: Schema.optionalKey(
28169 Schema.Literals([
28170 "agent",
28171 "userShell",
28172 "unifiedExecStartup",
28173 "unifiedExecInteraction",
28174 ]).annotate({ default: "agent" }),
31083 Schema.suspend(
31084 (): Schema.Codec<V2ThreadStartedNotification__CommandExecutionSource> =>
31085 V2ThreadStartedNotification__CommandExecutionSource,
31086 ).annotate({ default: "agent" }),
2817531087 ),
28176 status: V2TurnStartResponse__CommandExecutionStatus,
31088 status: V2ThreadStartedNotification__CommandExecutionStatus,
2817731089 type: Schema.Literal("commandExecution").annotate({
2817831090 title: "CommandExecutionThreadItemType",
2817931091 }),
2818031092 }).annotate({ title: "CommandExecutionThreadItem" }),
2818131093 Schema.Struct({
28182 changes: Schema.Array(V2TurnStartResponse__FileUpdateChange),
31094 changes: Schema.Array(V2ThreadStartedNotification__FileUpdateChange),
2818331095 id: Schema.String,
28184 status: V2TurnStartResponse__PatchApplyStatus,
31096 status: V2ThreadStartedNotification__PatchApplyStatus,
2818531097 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
2818631098 }).annotate({ title: "FileChangeThreadItem" }),
2818731099 Schema.Struct({
2818831100 appContext: Schema.optionalKey(
28189 Schema.Union([V2TurnStartResponse__McpToolCallAppContext, Schema.Null]),
31101 Schema.Union([V2ThreadStartedNotification__McpToolCallAppContext, Schema.Null]),
2819031102 ),
28191 arguments: Schema.Unknown,
31103 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2819231104 durationMs: Schema.optionalKey(
2819331105 Schema.Union([
2819431106 Schema.Number.annotate({
2819531107 description: "The duration of the MCP tool call in milliseconds.",
2819631108 format: "int64",
28197 }).check(Schema.isInt()),
31109 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2819831110 Schema.Null,
2819931111 ]),
2820031112 ),
28201 error: Schema.optionalKey(Schema.Union([V2TurnStartResponse__McpToolCallError, Schema.Null])),
31113 error: Schema.optionalKey(
31114 Schema.Union([V2ThreadStartedNotification__McpToolCallError, Schema.Null]),
31115 ),
2820231116 id: Schema.String,
2820331117 mcpAppResourceUri: Schema.optionalKey(
2820431118 Schema.Union([
......@@ -28210,18 +31124,18 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union(
2821031124 ),
2821131125 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2821231126 result: Schema.optionalKey(
28213 Schema.Union([V2TurnStartResponse__McpToolCallResult, Schema.Null]),
31127 Schema.Union([V2ThreadStartedNotification__McpToolCallResult, Schema.Null]),
2821431128 ),
2821531129 server: Schema.String,
28216 status: V2TurnStartResponse__McpToolCallStatus,
31130 status: V2ThreadStartedNotification__McpToolCallStatus,
2821731131 tool: Schema.String,
2821831132 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
2821931133 }).annotate({ title: "McpToolCallThreadItem" }),
2822031134 Schema.Struct({
28221 arguments: Schema.Unknown,
31135 arguments: Schema.Json.annotate({ expected: "JSON value" }),
2822231136 contentItems: Schema.optionalKey(
2822331137 Schema.Union([
28224 Schema.Array(V2TurnStartResponse__DynamicToolCallOutputContentItem),
31138 Schema.Array(V2ThreadStartedNotification__DynamicToolCallOutputContentItem),
2822531139 Schema.Null,
2822631140 ]),
2822731141 ),
......@@ -28230,21 +31144,22 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union(
2823031144 Schema.Number.annotate({
2823131145 description: "The duration of the dynamic tool call in milliseconds.",
2823231146 format: "int64",
28233 }).check(Schema.isInt()),
31147 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2823431148 Schema.Null,
2823531149 ]),
2823631150 ),
2823731151 id: Schema.String,
2823831152 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28239 status: V2TurnStartResponse__DynamicToolCallStatus,
31153 status: V2ThreadStartedNotification__DynamicToolCallStatus,
2824031154 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2824131155 tool: Schema.String,
2824231156 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
2824331157 }).annotate({ title: "DynamicToolCallThreadItem" }),
2824431158 Schema.Struct({
28245 agentsStates: Schema.Record(Schema.String, V2TurnStartResponse__CollabAgentState).annotate({
28246 description: "Last known status of the target agents, when available.",
28247 }),
31159 agentsStates: Schema.Record(
31160 Schema.String,
31161 V2ThreadStartedNotification__CollabAgentState,
31162 ).annotate({ description: "Last known status of the target agents, when available." }),
2824831163 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
2824931164 model: Schema.optionalKey(
2825031165 Schema.Union([
......@@ -28263,7 +31178,7 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union(
2826331178 ]),
2826431179 ),
2826531180 reasoningEffort: Schema.optionalKey(
28266 Schema.Union([V2TurnStartResponse__ReasoningEffort, Schema.Null]).annotate({
31181 Schema.Union([V2ThreadStartedNotification__ReasoningEffort, Schema.Null]).annotate({
2826731182 description: "Reasoning effort requested for the spawned agent, when applicable.",
2826831183 }),
2826931184 ),
......@@ -28274,20 +31189,14 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union(
2827431189 senderThreadId: Schema.String.annotate({
2827531190 description: "Thread ID of the agent issuing the collab request.",
2827631191 }),
28277 status: Schema.Literals(["inProgress", "completed", "failed", "interrupted"]).annotate({
28278 description: "Current status of the collab tool call.",
28279 }),
28280 tool: Schema.Literals([
28281 "spawnAgent",
28282 "sendInput",
28283 "resumeAgent",
28284 "wait",
28285 "closeAgent",
28286 "sendMessage",
28287 "followupTask",
28288 "interruptAgent",
28289 "listAgents",
28290 ]).annotate({ description: "Name of the collab tool that was invoked." }),
31192 status: Schema.suspend(
31193 (): Schema.Codec<V2ThreadStartedNotification__CollabAgentToolCallStatus> =>
31194 V2ThreadStartedNotification__CollabAgentToolCallStatus,
31195 ).annotate({ description: "Current status of the collab tool call." }),
31196 tool: Schema.suspend(
31197 (): Schema.Codec<V2ThreadStartedNotification__CollabAgentTool> =>
31198 V2ThreadStartedNotification__CollabAgentTool,
31199 ).annotate({ description: "Name of the collab tool that was invoked." }),
2829131200 type: Schema.Literal("collabAgentToolCall").annotate({
2829231201 title: "CollabAgentToolCallThreadItemType",
2829331202 }),
......@@ -28296,18 +31205,20 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union(
2829631205 agentPath: Schema.String,
2829731206 agentThreadId: Schema.String,
2829831207 id: Schema.String,
28299 kind: V2TurnStartResponse__SubAgentActivityKind,
31208 kind: V2ThreadStartedNotification__SubAgentActivityKind,
2830031209 type: Schema.Literal("subAgentActivity").annotate({
2830131210 title: "SubAgentActivityThreadItemType",
2830231211 }),
2830331212 }).annotate({ title: "SubAgentActivityThreadItem" }),
2830431213 Schema.Struct({
28305 action: Schema.optionalKey(Schema.Union([V2TurnStartResponse__WebSearchAction, Schema.Null])),
31214 action: Schema.optionalKey(
31215 Schema.Union([V2ThreadStartedNotification__WebSearchAction, Schema.Null]),
31216 ),
2830631217 id: Schema.String,
2830731218 query: Schema.String,
2830831219 results: Schema.optionalKey(
2830931220 Schema.Union([
28310 Schema.Array(Schema.Unknown).annotate({
31221 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
2831131222 description:
2831231223 "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.",
2831331224 }),
......@@ -28318,13 +31229,17 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union(
2831831229 }).annotate({ title: "WebSearchThreadItem" }),
2831931230 Schema.Struct({
2832031231 id: Schema.String,
28321 path: V2TurnStartResponse__LegacyAppPathString,
31232 path: V2ThreadStartedNotification__LegacyAppPathString,
2832231233 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
2832331234 }).annotate({ title: "ImageViewThreadItem" }),
2832431235 Schema.Struct({
2832531236 durationMs: Schema.Number.annotate({ format: "uint64" })
28326 .check(Schema.isInt())
28327 .check(Schema.isGreaterThanOrEqualTo(0)),
31237 .check(Schema.isInt().annotate({ expected: "an integer" }))
31238 .check(
31239 Schema.isGreaterThanOrEqualTo(0).annotate({
31240 expected: "a value greater than or equal to 0",
31241 }),
31242 ),
2832831243 id: Schema.String,
2832931244 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
2833031245 }).annotate({
......@@ -28336,7 +31251,7 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union(
2833631251 result: Schema.String,
2833731252 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2833831253 savedPath: Schema.optionalKey(
28339 Schema.Union([V2TurnStartResponse__AbsolutePathBuf, Schema.Null]),
31254 Schema.Union([V2ThreadStartedNotification__AbsolutePathBuf, Schema.Null]),
2834031255 ),
2834131256 status: Schema.String,
2834231257 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
......@@ -28363,1073 +31278,2583 @@ export const V2TurnStartResponse__ThreadItem = Schema.Union(
2836331278 }).annotate({ title: "ContextCompactionThreadItem" }),
2836431279 ],
2836531280 { mode: "oneOf" },
28366);
31281).annotate({ identifier: "V2ThreadStartedNotification__ThreadItem" });
2836731282
28368export type ClientRequest__ExternalAgentConfigImportParams = {
28369 readonly migrationItems: ReadonlyArray<ClientRequest__ExternalAgentConfigMigrationItem>;
28370 readonly migrationSource?: string | null;
28371 readonly source?: string | null;
28372};
28373export const ClientRequest__ExternalAgentConfigImportParams = Schema.Struct({
28374 migrationItems: Schema.Array(ClientRequest__ExternalAgentConfigMigrationItem),
28375 migrationSource: Schema.optionalKey(
28376 Schema.Union([
28377 Schema.String.annotate({
31283export type V2ThreadStartResponse__ThreadItem =
31284 | {
31285 readonly clientId?: string | null;
31286 readonly content: ReadonlyArray<V2ThreadStartResponse__UserInput>;
31287 readonly id: string;
31288 readonly type: "userMessage";
31289 }
31290 | {
31291 readonly fragments: ReadonlyArray<V2ThreadStartResponse__HookPromptFragment>;
31292 readonly id: string;
31293 readonly type: "hookPrompt";
31294 }
31295 | {
31296 readonly id: string;
31297 readonly memoryCitation?: V2ThreadStartResponse__MemoryCitation | null;
31298 readonly phase?: V2ThreadStartResponse__MessagePhase | null;
31299 readonly text: string;
31300 readonly delivery?: "async" | null;
31301 readonly questions?: ReadonlyArray<{
31302 readonly title: string;
31303 readonly options?: ReadonlyArray<string> | null;
31304 }> | null;
31305 readonly type: "agentMessage";
31306 }
31307 | { readonly id: string; readonly text: string; readonly type: "plan" }
31308 | {
31309 readonly content?: ReadonlyArray<string>;
31310 readonly id: string;
31311 readonly summary?: ReadonlyArray<string>;
31312 readonly type: "reasoning";
31313 }
31314 | {
31315 readonly aggregatedOutput?: string | null;
31316 readonly command: string;
31317 readonly commandActions: ReadonlyArray<V2ThreadStartResponse__CommandAction>;
31318 readonly cwd: V2ThreadStartResponse__LegacyAppPathString;
31319 readonly durationMs?: number | null;
31320 readonly exitCode?: number | null;
31321 readonly id: string;
31322 readonly processId?: string | null;
31323 readonly source?: V2ThreadStartResponse__CommandExecutionSource;
31324 readonly status: V2ThreadStartResponse__CommandExecutionStatus;
31325 readonly type: "commandExecution";
31326 }
31327 | {
31328 readonly changes: ReadonlyArray<V2ThreadStartResponse__FileUpdateChange>;
31329 readonly id: string;
31330 readonly status: V2ThreadStartResponse__PatchApplyStatus;
31331 readonly type: "fileChange";
31332 }
31333 | {
31334 readonly appContext?: V2ThreadStartResponse__McpToolCallAppContext | null;
31335 readonly arguments: Schema.Json;
31336 readonly durationMs?: number | null;
31337 readonly error?: V2ThreadStartResponse__McpToolCallError | null;
31338 readonly id: string;
31339 readonly mcpAppResourceUri?: string | null;
31340 readonly pluginId?: string | null;
31341 readonly result?: V2ThreadStartResponse__McpToolCallResult | null;
31342 readonly server: string;
31343 readonly status: V2ThreadStartResponse__McpToolCallStatus;
31344 readonly tool: string;
31345 readonly type: "mcpToolCall";
31346 }
31347 | {
31348 readonly arguments: Schema.Json;
31349 readonly contentItems?: ReadonlyArray<V2ThreadStartResponse__DynamicToolCallOutputContentItem> | null;
31350 readonly durationMs?: number | null;
31351 readonly id: string;
31352 readonly namespace?: string | null;
31353 readonly status: V2ThreadStartResponse__DynamicToolCallStatus;
31354 readonly success?: boolean | null;
31355 readonly tool: string;
31356 readonly type: "dynamicToolCall";
31357 }
31358 | {
31359 readonly agentsStates: { readonly [x: string]: V2ThreadStartResponse__CollabAgentState };
31360 readonly id: string;
31361 readonly model?: string | null;
31362 readonly prompt?: string | null;
31363 readonly reasoningEffort?: V2ThreadStartResponse__ReasoningEffort | null;
31364 readonly receiverThreadIds: ReadonlyArray<string>;
31365 readonly senderThreadId: string;
31366 readonly status: V2ThreadStartResponse__CollabAgentToolCallStatus;
31367 readonly tool: V2ThreadStartResponse__CollabAgentTool;
31368 readonly type: "collabAgentToolCall";
31369 }
31370 | {
31371 readonly agentPath: string;
31372 readonly agentThreadId: string;
31373 readonly id: string;
31374 readonly kind: V2ThreadStartResponse__SubAgentActivityKind;
31375 readonly type: "subAgentActivity";
31376 }
31377 | {
31378 readonly action?: V2ThreadStartResponse__WebSearchAction | null;
31379 readonly id: string;
31380 readonly query: string;
31381 readonly results?: ReadonlyArray<Schema.Json> | null;
31382 readonly type: "webSearch";
31383 }
31384 | {
31385 readonly id: string;
31386 readonly path: V2ThreadStartResponse__LegacyAppPathString;
31387 readonly type: "imageView";
31388 }
31389 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
31390 | {
31391 readonly id: string;
31392 readonly result: string;
31393 readonly revisedPrompt?: string | null;
31394 readonly savedPath?: V2ThreadStartResponse__AbsolutePathBuf | null;
31395 readonly status: string;
31396 readonly type: "imageGeneration";
31397 }
31398 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
31399 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
31400 | { readonly id: string; readonly type: "contextCompaction" };
31401export const V2ThreadStartResponse__ThreadItem = Schema.Union(
31402 [
31403 Schema.Struct({
31404 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
31405 content: Schema.Array(V2ThreadStartResponse__UserInput),
31406 id: Schema.String,
31407 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
31408 }).annotate({ title: "UserMessageThreadItem" }),
31409 Schema.Struct({
31410 fragments: Schema.Array(V2ThreadStartResponse__HookPromptFragment),
31411 id: Schema.String,
31412 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
31413 }).annotate({ title: "HookPromptThreadItem" }),
31414 Schema.Struct({
31415 id: Schema.String,
31416 memoryCitation: Schema.optionalKey(
31417 Schema.Union([V2ThreadStartResponse__MemoryCitation, Schema.Null]),
31418 ),
31419 phase: Schema.optionalKey(Schema.Union([V2ThreadStartResponse__MessagePhase, Schema.Null])),
31420 text: Schema.String,
31421 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
31422 questions: Schema.optionalKey(
31423 Schema.Union([
31424 Schema.Array(
31425 Schema.Struct({
31426 title: Schema.String,
31427 options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
31428 }),
31429 ),
31430 Schema.Null,
31431 ]),
31432 ),
31433 type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }),
31434 }).annotate({ title: "AgentMessageThreadItem" }),
31435 Schema.Struct({
31436 id: Schema.String,
31437 text: Schema.String,
31438 type: Schema.Literal("plan").annotate({ title: "PlanThreadItemType" }),
31439 }).annotate({
31440 title: "PlanThreadItem",
31441 description:
31442 "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
31443 }),
31444 Schema.Struct({
31445 content: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
31446 id: Schema.String,
31447 summary: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
31448 type: Schema.Literal("reasoning").annotate({ title: "ReasoningThreadItemType" }),
31449 }).annotate({ title: "ReasoningThreadItem" }),
31450 Schema.Struct({
31451 aggregatedOutput: Schema.optionalKey(
31452 Schema.Union([
31453 Schema.String.annotate({
31454 description: "The command's output, aggregated from stdout and stderr.",
31455 }),
31456 Schema.Null,
31457 ]),
31458 ),
31459 command: Schema.String.annotate({ description: "The command to be executed." }),
31460 commandActions: Schema.Array(V2ThreadStartResponse__CommandAction).annotate({
2837831461 description:
28379 "Migration-source selector used to produce the migration items. Pass the same value to detection and import; missing or unrecognized values use the default source.",
31462 "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.",
2838031463 }),
28381 Schema.Null,
28382 ]),
28383 ),
28384 source: Schema.optionalKey(
28385 Schema.Union([
28386 Schema.String.annotate({
28387 description: "Optional identifier for the product that initiated the import.",
31464 cwd: Schema.suspend(
31465 (): Schema.Codec<V2ThreadStartResponse__LegacyAppPathString> =>
31466 V2ThreadStartResponse__LegacyAppPathString,
31467 ).annotate({ description: "The command's working directory." }),
31468 durationMs: Schema.optionalKey(
31469 Schema.Union([
31470 Schema.Number.annotate({
31471 description: "The duration of the command execution in milliseconds.",
31472 format: "int64",
31473 }).check(Schema.isInt().annotate({ expected: "an integer" })),
31474 Schema.Null,
31475 ]),
31476 ),
31477 exitCode: Schema.optionalKey(
31478 Schema.Union([
31479 Schema.Number.annotate({
31480 description: "The command's exit code.",
31481 format: "int32",
31482 }).check(Schema.isInt().annotate({ expected: "an integer" })),
31483 Schema.Null,
31484 ]),
31485 ),
31486 id: Schema.String,
31487 processId: Schema.optionalKey(
31488 Schema.Union([
31489 Schema.String.annotate({
31490 description: "Identifier for the underlying PTY process (when available).",
31491 }),
31492 Schema.Null,
31493 ]),
31494 ),
31495 source: Schema.optionalKey(
31496 Schema.suspend(
31497 (): Schema.Codec<V2ThreadStartResponse__CommandExecutionSource> =>
31498 V2ThreadStartResponse__CommandExecutionSource,
31499 ).annotate({ default: "agent" }),
31500 ),
31501 status: V2ThreadStartResponse__CommandExecutionStatus,
31502 type: Schema.Literal("commandExecution").annotate({
31503 title: "CommandExecutionThreadItemType",
2838831504 }),
28389 Schema.Null,
28390 ]),
28391 ),
28392});
28393
28394export type CommandExecutionRequestApprovalParams__FileSystemSandboxEntry = {
28395 readonly access: CommandExecutionRequestApprovalParams__FileSystemAccessMode;
28396 readonly path: CommandExecutionRequestApprovalParams__FileSystemPath;
28397};
28398export const CommandExecutionRequestApprovalParams__FileSystemSandboxEntry = Schema.Struct({
28399 access: CommandExecutionRequestApprovalParams__FileSystemAccessMode,
28400 path: CommandExecutionRequestApprovalParams__FileSystemPath,
28401});
28402
28403export type McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema =
28404 | McpServerElicitationRequestParams__McpElicitationUntitledMultiSelectEnumSchema
28405 | McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema;
28406export const McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema = Schema.Union([
28407 McpServerElicitationRequestParams__McpElicitationUntitledMultiSelectEnumSchema,
28408 McpServerElicitationRequestParams__McpElicitationTitledMultiSelectEnumSchema,
28409]);
28410
28411export type PermissionsRequestApprovalParams__FileSystemSandboxEntry = {
28412 readonly access: PermissionsRequestApprovalParams__FileSystemAccessMode;
28413 readonly path: PermissionsRequestApprovalParams__FileSystemPath;
28414};
28415export const PermissionsRequestApprovalParams__FileSystemSandboxEntry = Schema.Struct({
28416 access: PermissionsRequestApprovalParams__FileSystemAccessMode,
28417 path: PermissionsRequestApprovalParams__FileSystemPath,
28418});
28419
28420export type PermissionsRequestApprovalResponse__FileSystemSandboxEntry = {
28421 readonly access: PermissionsRequestApprovalResponse__FileSystemAccessMode;
28422 readonly path: PermissionsRequestApprovalResponse__FileSystemPath;
28423};
28424export const PermissionsRequestApprovalResponse__FileSystemSandboxEntry = Schema.Struct({
28425 access: PermissionsRequestApprovalResponse__FileSystemAccessMode,
28426 path: PermissionsRequestApprovalResponse__FileSystemPath,
28427});
28428
28429export type ServerNotification__AppListUpdatedNotification = {
28430 readonly data: ReadonlyArray<ServerNotification__AppInfo>;
28431};
28432export const ServerNotification__AppListUpdatedNotification = Schema.Struct({
28433 data: Schema.Array(ServerNotification__AppInfo),
28434}).annotate({ description: "EXPERIMENTAL - notification emitted when the app list changes." });
28435
28436export type ServerNotification__ExternalAgentConfigImportCompletedNotification = {
28437 readonly importId: string;
28438 readonly itemTypeResults: ReadonlyArray<ServerNotification__ExternalAgentConfigImportTypeResult>;
28439};
28440export const ServerNotification__ExternalAgentConfigImportCompletedNotification = Schema.Struct({
28441 importId: Schema.String,
28442 itemTypeResults: Schema.Array(ServerNotification__ExternalAgentConfigImportTypeResult),
28443});
28444
28445export type ServerNotification__ExternalAgentConfigImportProgressNotification = {
28446 readonly importId: string;
28447 readonly itemTypeResults: ReadonlyArray<ServerNotification__ExternalAgentConfigImportTypeResult>;
28448};
28449export const ServerNotification__ExternalAgentConfigImportProgressNotification = Schema.Struct({
28450 importId: Schema.String,
28451 itemTypeResults: Schema.Array(ServerNotification__ExternalAgentConfigImportTypeResult),
28452});
28453
28454export type ServerNotification__HookCompletedNotification = {
28455 readonly run: ServerNotification__HookRunSummary;
28456 readonly threadId: string;
28457 readonly turnId?: string | null;
28458};
28459export const ServerNotification__HookCompletedNotification = Schema.Struct({
28460 run: ServerNotification__HookRunSummary,
28461 threadId: Schema.String,
28462 turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28463});
31505 }).annotate({ title: "CommandExecutionThreadItem" }),
31506 Schema.Struct({
31507 changes: Schema.Array(V2ThreadStartResponse__FileUpdateChange),
31508 id: Schema.String,
31509 status: V2ThreadStartResponse__PatchApplyStatus,
31510 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
31511 }).annotate({ title: "FileChangeThreadItem" }),
31512 Schema.Struct({
31513 appContext: Schema.optionalKey(
31514 Schema.Union([V2ThreadStartResponse__McpToolCallAppContext, Schema.Null]),
31515 ),
31516 arguments: Schema.Json.annotate({ expected: "JSON value" }),
31517 durationMs: Schema.optionalKey(
31518 Schema.Union([
31519 Schema.Number.annotate({
31520 description: "The duration of the MCP tool call in milliseconds.",
31521 format: "int64",
31522 }).check(Schema.isInt().annotate({ expected: "an integer" })),
31523 Schema.Null,
31524 ]),
31525 ),
31526 error: Schema.optionalKey(
31527 Schema.Union([V2ThreadStartResponse__McpToolCallError, Schema.Null]),
31528 ),
31529 id: Schema.String,
31530 mcpAppResourceUri: Schema.optionalKey(
31531 Schema.Union([
31532 Schema.String.annotate({
31533 description: "Deprecated: use `appContext.resourceUri` instead.",
31534 }),
31535 Schema.Null,
31536 ]),
31537 ),
31538 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
31539 result: Schema.optionalKey(
31540 Schema.Union([V2ThreadStartResponse__McpToolCallResult, Schema.Null]),
31541 ),
31542 server: Schema.String,
31543 status: V2ThreadStartResponse__McpToolCallStatus,
31544 tool: Schema.String,
31545 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
31546 }).annotate({ title: "McpToolCallThreadItem" }),
31547 Schema.Struct({
31548 arguments: Schema.Json.annotate({ expected: "JSON value" }),
31549 contentItems: Schema.optionalKey(
31550 Schema.Union([
31551 Schema.Array(V2ThreadStartResponse__DynamicToolCallOutputContentItem),
31552 Schema.Null,
31553 ]),
31554 ),
31555 durationMs: Schema.optionalKey(
31556 Schema.Union([
31557 Schema.Number.annotate({
31558 description: "The duration of the dynamic tool call in milliseconds.",
31559 format: "int64",
31560 }).check(Schema.isInt().annotate({ expected: "an integer" })),
31561 Schema.Null,
31562 ]),
31563 ),
31564 id: Schema.String,
31565 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
31566 status: V2ThreadStartResponse__DynamicToolCallStatus,
31567 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
31568 tool: Schema.String,
31569 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
31570 }).annotate({ title: "DynamicToolCallThreadItem" }),
31571 Schema.Struct({
31572 agentsStates: Schema.Record(Schema.String, V2ThreadStartResponse__CollabAgentState).annotate({
31573 description: "Last known status of the target agents, when available.",
31574 }),
31575 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
31576 model: Schema.optionalKey(
31577 Schema.Union([
31578 Schema.String.annotate({
31579 description: "Model requested for the spawned agent, when applicable.",
31580 }),
31581 Schema.Null,
31582 ]),
31583 ),
31584 prompt: Schema.optionalKey(
31585 Schema.Union([
31586 Schema.String.annotate({
31587 description: "Prompt text sent as part of the collab tool call, when available.",
31588 }),
31589 Schema.Null,
31590 ]),
31591 ),
31592 reasoningEffort: Schema.optionalKey(
31593 Schema.Union([V2ThreadStartResponse__ReasoningEffort, Schema.Null]).annotate({
31594 description: "Reasoning effort requested for the spawned agent, when applicable.",
31595 }),
31596 ),
31597 receiverThreadIds: Schema.Array(Schema.String).annotate({
31598 description:
31599 "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
31600 }),
31601 senderThreadId: Schema.String.annotate({
31602 description: "Thread ID of the agent issuing the collab request.",
31603 }),
31604 status: Schema.suspend(
31605 (): Schema.Codec<V2ThreadStartResponse__CollabAgentToolCallStatus> =>
31606 V2ThreadStartResponse__CollabAgentToolCallStatus,
31607 ).annotate({ description: "Current status of the collab tool call." }),
31608 tool: Schema.suspend(
31609 (): Schema.Codec<V2ThreadStartResponse__CollabAgentTool> =>
31610 V2ThreadStartResponse__CollabAgentTool,
31611 ).annotate({ description: "Name of the collab tool that was invoked." }),
31612 type: Schema.Literal("collabAgentToolCall").annotate({
31613 title: "CollabAgentToolCallThreadItemType",
31614 }),
31615 }).annotate({ title: "CollabAgentToolCallThreadItem" }),
31616 Schema.Struct({
31617 agentPath: Schema.String,
31618 agentThreadId: Schema.String,
31619 id: Schema.String,
31620 kind: V2ThreadStartResponse__SubAgentActivityKind,
31621 type: Schema.Literal("subAgentActivity").annotate({
31622 title: "SubAgentActivityThreadItemType",
31623 }),
31624 }).annotate({ title: "SubAgentActivityThreadItem" }),
31625 Schema.Struct({
31626 action: Schema.optionalKey(
31627 Schema.Union([V2ThreadStartResponse__WebSearchAction, Schema.Null]),
31628 ),
31629 id: Schema.String,
31630 query: Schema.String,
31631 results: Schema.optionalKey(
31632 Schema.Union([
31633 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
31634 description:
31635 "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.",
31636 }),
31637 Schema.Null,
31638 ]),
31639 ),
31640 type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }),
31641 }).annotate({ title: "WebSearchThreadItem" }),
31642 Schema.Struct({
31643 id: Schema.String,
31644 path: V2ThreadStartResponse__LegacyAppPathString,
31645 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
31646 }).annotate({ title: "ImageViewThreadItem" }),
31647 Schema.Struct({
31648 durationMs: Schema.Number.annotate({ format: "uint64" })
31649 .check(Schema.isInt().annotate({ expected: "an integer" }))
31650 .check(
31651 Schema.isGreaterThanOrEqualTo(0).annotate({
31652 expected: "a value greater than or equal to 0",
31653 }),
31654 ),
31655 id: Schema.String,
31656 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
31657 }).annotate({
31658 title: "SleepThreadItem",
31659 description: "Display item emitted by the interruptible `clock.sleep` tool.",
31660 }),
31661 Schema.Struct({
31662 id: Schema.String,
31663 result: Schema.String,
31664 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
31665 savedPath: Schema.optionalKey(
31666 Schema.Union([V2ThreadStartResponse__AbsolutePathBuf, Schema.Null]),
31667 ),
31668 status: Schema.String,
31669 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
31670 }).annotate({ title: "ImageGenerationThreadItem" }),
31671 Schema.Struct({
31672 id: Schema.String,
31673 review: Schema.String,
31674 type: Schema.Literal("enteredReviewMode").annotate({
31675 title: "EnteredReviewModeThreadItemType",
31676 }),
31677 }).annotate({ title: "EnteredReviewModeThreadItem" }),
31678 Schema.Struct({
31679 id: Schema.String,
31680 review: Schema.String,
31681 type: Schema.Literal("exitedReviewMode").annotate({
31682 title: "ExitedReviewModeThreadItemType",
31683 }),
31684 }).annotate({ title: "ExitedReviewModeThreadItem" }),
31685 Schema.Struct({
31686 id: Schema.String,
31687 type: Schema.Literal("contextCompaction").annotate({
31688 title: "ContextCompactionThreadItemType",
31689 }),
31690 }).annotate({ title: "ContextCompactionThreadItem" }),
31691 ],
31692 { mode: "oneOf" },
31693).annotate({ identifier: "V2ThreadStartResponse__ThreadItem" });
2846431694
28465export type ServerNotification__HookStartedNotification = {
28466 readonly run: ServerNotification__HookRunSummary;
28467 readonly threadId: string;
28468 readonly turnId?: string | null;
28469};
28470export const ServerNotification__HookStartedNotification = Schema.Struct({
28471 run: ServerNotification__HookRunSummary,
28472 threadId: Schema.String,
28473 turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28474});
28475
28476export type ServerNotification__FileSystemSandboxEntry = {
28477 readonly access: ServerNotification__FileSystemAccessMode;
28478 readonly path: ServerNotification__FileSystemPath;
28479};
28480export const ServerNotification__FileSystemSandboxEntry = Schema.Struct({
28481 access: ServerNotification__FileSystemAccessMode,
28482 path: ServerNotification__FileSystemPath,
28483});
28484
28485export type ServerNotification__ErrorNotification = {
28486 readonly error: ServerNotification__TurnError;
28487 readonly threadId: string;
28488 readonly turnId: string;
28489 readonly willRetry: boolean;
28490};
28491export const ServerNotification__ErrorNotification = Schema.Struct({
28492 error: ServerNotification__TurnError,
28493 threadId: Schema.String,
28494 turnId: Schema.String,
28495 willRetry: Schema.Boolean,
28496});
28497
28498export type ServerNotification__ThreadSettings = {
28499 readonly activePermissionProfile?: ServerNotification__ActivePermissionProfile | null;
28500 readonly approvalPolicy: ServerNotification__AskForApproval;
28501 readonly approvalsReviewer: ServerNotification__ApprovalsReviewer;
28502 readonly collaborationMode: ServerNotification__CollaborationMode;
28503 readonly cwd: ServerNotification__AbsolutePathBuf;
28504 readonly effort?: ServerNotification__ReasoningEffort | null;
28505 readonly model: string;
28506 readonly modelProvider: string;
28507 readonly personality?: ServerNotification__Personality | null;
28508 readonly sandboxPolicy: ServerNotification__SandboxPolicy;
28509 readonly serviceTier?: string | null;
28510 readonly summary?: ServerNotification__ReasoningSummary | null;
28511};
28512export const ServerNotification__ThreadSettings = Schema.Struct({
28513 activePermissionProfile: Schema.optionalKey(
28514 Schema.Union([ServerNotification__ActivePermissionProfile, Schema.Null]),
28515 ),
28516 approvalPolicy: ServerNotification__AskForApproval,
28517 approvalsReviewer: ServerNotification__ApprovalsReviewer,
28518 collaborationMode: ServerNotification__CollaborationMode,
28519 cwd: ServerNotification__AbsolutePathBuf,
28520 effort: Schema.optionalKey(Schema.Union([ServerNotification__ReasoningEffort, Schema.Null])),
28521 model: Schema.String,
28522 modelProvider: Schema.String,
28523 personality: Schema.optionalKey(Schema.Union([ServerNotification__Personality, Schema.Null])),
28524 sandboxPolicy: ServerNotification__SandboxPolicy,
28525 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28526 summary: Schema.optionalKey(Schema.Union([ServerNotification__ReasoningSummary, Schema.Null])),
28527});
28528
28529export type ServerNotification__ItemCompletedNotification = {
28530 readonly completedAtMs: number;
28531 readonly item: ServerNotification__ThreadItem;
28532 readonly threadId: string;
28533 readonly turnId: string;
28534};
28535export const ServerNotification__ItemCompletedNotification = Schema.Struct({
28536 completedAtMs: Schema.Number.annotate({
28537 description: "Unix timestamp (in milliseconds) when this item lifecycle completed.",
28538 format: "int64",
28539 }).check(Schema.isInt()),
28540 item: ServerNotification__ThreadItem,
28541 threadId: Schema.String,
28542 turnId: Schema.String,
28543});
28544
28545export type ServerNotification__ItemStartedNotification = {
28546 readonly item: ServerNotification__ThreadItem;
28547 readonly startedAtMs: number;
28548 readonly threadId: string;
28549 readonly turnId: string;
28550};
28551export const ServerNotification__ItemStartedNotification = Schema.Struct({
28552 item: ServerNotification__ThreadItem,
28553 startedAtMs: Schema.Number.annotate({
28554 description: "Unix timestamp (in milliseconds) when this item lifecycle started.",
28555 format: "int64",
28556 }).check(Schema.isInt()),
28557 threadId: Schema.String,
28558 turnId: Schema.String,
28559});
28560
28561export type ServerNotification__Turn = {
28562 readonly completedAt?: number | null;
28563 readonly durationMs?: number | null;
28564 readonly error?: ServerNotification__TurnError | null;
28565 readonly id: string;
28566 readonly items: ReadonlyArray<ServerNotification__ThreadItem>;
28567 readonly itemsView?: "notLoaded" | "summary" | "full";
28568 readonly startedAt?: number | null;
28569 readonly status: ServerNotification__TurnStatus;
28570};
28571export const ServerNotification__Turn = Schema.Struct({
28572 completedAt: Schema.optionalKey(
28573 Schema.Union([
28574 Schema.Number.annotate({
28575 description: "Unix timestamp (in seconds) when the turn completed.",
28576 format: "int64",
28577 }).check(Schema.isInt()),
28578 Schema.Null,
28579 ]),
28580 ),
28581 durationMs: Schema.optionalKey(
28582 Schema.Union([
28583 Schema.Number.annotate({
28584 description: "Duration between turn start and completion in milliseconds, if known.",
28585 format: "int64",
28586 }).check(Schema.isInt()),
28587 Schema.Null,
28588 ]),
28589 ),
28590 error: Schema.optionalKey(
28591 Schema.Union([ServerNotification__TurnError, Schema.Null]).annotate({
28592 description: "Only populated when the Turn's status is failed.",
31695export type V2ThreadUnarchiveResponse__ThreadItem =
31696 | {
31697 readonly clientId?: string | null;
31698 readonly content: ReadonlyArray<V2ThreadUnarchiveResponse__UserInput>;
31699 readonly id: string;
31700 readonly type: "userMessage";
31701 }
31702 | {
31703 readonly fragments: ReadonlyArray<V2ThreadUnarchiveResponse__HookPromptFragment>;
31704 readonly id: string;
31705 readonly type: "hookPrompt";
31706 }
31707 | {
31708 readonly id: string;
31709 readonly memoryCitation?: V2ThreadUnarchiveResponse__MemoryCitation | null;
31710 readonly phase?: V2ThreadUnarchiveResponse__MessagePhase | null;
31711 readonly text: string;
31712 readonly delivery?: "async" | null;
31713 readonly questions?: ReadonlyArray<{
31714 readonly title: string;
31715 readonly options?: ReadonlyArray<string> | null;
31716 }> | null;
31717 readonly type: "agentMessage";
31718 }
31719 | { readonly id: string; readonly text: string; readonly type: "plan" }
31720 | {
31721 readonly content?: ReadonlyArray<string>;
31722 readonly id: string;
31723 readonly summary?: ReadonlyArray<string>;
31724 readonly type: "reasoning";
31725 }
31726 | {
31727 readonly aggregatedOutput?: string | null;
31728 readonly command: string;
31729 readonly commandActions: ReadonlyArray<V2ThreadUnarchiveResponse__CommandAction>;
31730 readonly cwd: V2ThreadUnarchiveResponse__LegacyAppPathString;
31731 readonly durationMs?: number | null;
31732 readonly exitCode?: number | null;
31733 readonly id: string;
31734 readonly processId?: string | null;
31735 readonly source?: V2ThreadUnarchiveResponse__CommandExecutionSource;
31736 readonly status: V2ThreadUnarchiveResponse__CommandExecutionStatus;
31737 readonly type: "commandExecution";
31738 }
31739 | {
31740 readonly changes: ReadonlyArray<V2ThreadUnarchiveResponse__FileUpdateChange>;
31741 readonly id: string;
31742 readonly status: V2ThreadUnarchiveResponse__PatchApplyStatus;
31743 readonly type: "fileChange";
31744 }
31745 | {
31746 readonly appContext?: V2ThreadUnarchiveResponse__McpToolCallAppContext | null;
31747 readonly arguments: Schema.Json;
31748 readonly durationMs?: number | null;
31749 readonly error?: V2ThreadUnarchiveResponse__McpToolCallError | null;
31750 readonly id: string;
31751 readonly mcpAppResourceUri?: string | null;
31752 readonly pluginId?: string | null;
31753 readonly result?: V2ThreadUnarchiveResponse__McpToolCallResult | null;
31754 readonly server: string;
31755 readonly status: V2ThreadUnarchiveResponse__McpToolCallStatus;
31756 readonly tool: string;
31757 readonly type: "mcpToolCall";
31758 }
31759 | {
31760 readonly arguments: Schema.Json;
31761 readonly contentItems?: ReadonlyArray<V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem> | null;
31762 readonly durationMs?: number | null;
31763 readonly id: string;
31764 readonly namespace?: string | null;
31765 readonly status: V2ThreadUnarchiveResponse__DynamicToolCallStatus;
31766 readonly success?: boolean | null;
31767 readonly tool: string;
31768 readonly type: "dynamicToolCall";
31769 }
31770 | {
31771 readonly agentsStates: { readonly [x: string]: V2ThreadUnarchiveResponse__CollabAgentState };
31772 readonly id: string;
31773 readonly model?: string | null;
31774 readonly prompt?: string | null;
31775 readonly reasoningEffort?: V2ThreadUnarchiveResponse__ReasoningEffort | null;
31776 readonly receiverThreadIds: ReadonlyArray<string>;
31777 readonly senderThreadId: string;
31778 readonly status: V2ThreadUnarchiveResponse__CollabAgentToolCallStatus;
31779 readonly tool: V2ThreadUnarchiveResponse__CollabAgentTool;
31780 readonly type: "collabAgentToolCall";
31781 }
31782 | {
31783 readonly agentPath: string;
31784 readonly agentThreadId: string;
31785 readonly id: string;
31786 readonly kind: V2ThreadUnarchiveResponse__SubAgentActivityKind;
31787 readonly type: "subAgentActivity";
31788 }
31789 | {
31790 readonly action?: V2ThreadUnarchiveResponse__WebSearchAction | null;
31791 readonly id: string;
31792 readonly query: string;
31793 readonly results?: ReadonlyArray<Schema.Json> | null;
31794 readonly type: "webSearch";
31795 }
31796 | {
31797 readonly id: string;
31798 readonly path: V2ThreadUnarchiveResponse__LegacyAppPathString;
31799 readonly type: "imageView";
31800 }
31801 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
31802 | {
31803 readonly id: string;
31804 readonly result: string;
31805 readonly revisedPrompt?: string | null;
31806 readonly savedPath?: V2ThreadUnarchiveResponse__AbsolutePathBuf | null;
31807 readonly status: string;
31808 readonly type: "imageGeneration";
31809 }
31810 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
31811 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
31812 | { readonly id: string; readonly type: "contextCompaction" };
31813export const V2ThreadUnarchiveResponse__ThreadItem = Schema.Union(
31814 [
31815 Schema.Struct({
31816 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
31817 content: Schema.Array(V2ThreadUnarchiveResponse__UserInput),
31818 id: Schema.String,
31819 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
31820 }).annotate({ title: "UserMessageThreadItem" }),
31821 Schema.Struct({
31822 fragments: Schema.Array(V2ThreadUnarchiveResponse__HookPromptFragment),
31823 id: Schema.String,
31824 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
31825 }).annotate({ title: "HookPromptThreadItem" }),
31826 Schema.Struct({
31827 id: Schema.String,
31828 memoryCitation: Schema.optionalKey(
31829 Schema.Union([V2ThreadUnarchiveResponse__MemoryCitation, Schema.Null]),
31830 ),
31831 phase: Schema.optionalKey(
31832 Schema.Union([V2ThreadUnarchiveResponse__MessagePhase, Schema.Null]),
31833 ),
31834 text: Schema.String,
31835 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
31836 questions: Schema.optionalKey(
31837 Schema.Union([
31838 Schema.Array(
31839 Schema.Struct({
31840 title: Schema.String,
31841 options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
31842 }),
31843 ),
31844 Schema.Null,
31845 ]),
31846 ),
31847 type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }),
31848 }).annotate({ title: "AgentMessageThreadItem" }),
31849 Schema.Struct({
31850 id: Schema.String,
31851 text: Schema.String,
31852 type: Schema.Literal("plan").annotate({ title: "PlanThreadItemType" }),
31853 }).annotate({
31854 title: "PlanThreadItem",
31855 description:
31856 "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
2859331857 }),
28594 ),
28595 id: Schema.String.annotate({
28596 description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
28597 }),
28598 items: Schema.Array(ServerNotification__ThreadItem).annotate({
28599 description: "Thread items currently included in this turn payload.",
28600 }),
28601 itemsView: Schema.optionalKey(
28602 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
28603 description: "Describes how much of `items` has been loaded for this turn.",
28604 default: "full",
31858 Schema.Struct({
31859 content: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
31860 id: Schema.String,
31861 summary: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
31862 type: Schema.Literal("reasoning").annotate({ title: "ReasoningThreadItemType" }),
31863 }).annotate({ title: "ReasoningThreadItem" }),
31864 Schema.Struct({
31865 aggregatedOutput: Schema.optionalKey(
31866 Schema.Union([
31867 Schema.String.annotate({
31868 description: "The command's output, aggregated from stdout and stderr.",
31869 }),
31870 Schema.Null,
31871 ]),
31872 ),
31873 command: Schema.String.annotate({ description: "The command to be executed." }),
31874 commandActions: Schema.Array(V2ThreadUnarchiveResponse__CommandAction).annotate({
31875 description:
31876 "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.",
31877 }),
31878 cwd: Schema.suspend(
31879 (): Schema.Codec<V2ThreadUnarchiveResponse__LegacyAppPathString> =>
31880 V2ThreadUnarchiveResponse__LegacyAppPathString,
31881 ).annotate({ description: "The command's working directory." }),
31882 durationMs: Schema.optionalKey(
31883 Schema.Union([
31884 Schema.Number.annotate({
31885 description: "The duration of the command execution in milliseconds.",
31886 format: "int64",
31887 }).check(Schema.isInt().annotate({ expected: "an integer" })),
31888 Schema.Null,
31889 ]),
31890 ),
31891 exitCode: Schema.optionalKey(
31892 Schema.Union([
31893 Schema.Number.annotate({
31894 description: "The command's exit code.",
31895 format: "int32",
31896 }).check(Schema.isInt().annotate({ expected: "an integer" })),
31897 Schema.Null,
31898 ]),
31899 ),
31900 id: Schema.String,
31901 processId: Schema.optionalKey(
31902 Schema.Union([
31903 Schema.String.annotate({
31904 description: "Identifier for the underlying PTY process (when available).",
31905 }),
31906 Schema.Null,
31907 ]),
31908 ),
31909 source: Schema.optionalKey(
31910 Schema.suspend(
31911 (): Schema.Codec<V2ThreadUnarchiveResponse__CommandExecutionSource> =>
31912 V2ThreadUnarchiveResponse__CommandExecutionSource,
31913 ).annotate({ default: "agent" }),
31914 ),
31915 status: V2ThreadUnarchiveResponse__CommandExecutionStatus,
31916 type: Schema.Literal("commandExecution").annotate({
31917 title: "CommandExecutionThreadItemType",
31918 }),
31919 }).annotate({ title: "CommandExecutionThreadItem" }),
31920 Schema.Struct({
31921 changes: Schema.Array(V2ThreadUnarchiveResponse__FileUpdateChange),
31922 id: Schema.String,
31923 status: V2ThreadUnarchiveResponse__PatchApplyStatus,
31924 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
31925 }).annotate({ title: "FileChangeThreadItem" }),
31926 Schema.Struct({
31927 appContext: Schema.optionalKey(
31928 Schema.Union([V2ThreadUnarchiveResponse__McpToolCallAppContext, Schema.Null]),
31929 ),
31930 arguments: Schema.Json.annotate({ expected: "JSON value" }),
31931 durationMs: Schema.optionalKey(
31932 Schema.Union([
31933 Schema.Number.annotate({
31934 description: "The duration of the MCP tool call in milliseconds.",
31935 format: "int64",
31936 }).check(Schema.isInt().annotate({ expected: "an integer" })),
31937 Schema.Null,
31938 ]),
31939 ),
31940 error: Schema.optionalKey(
31941 Schema.Union([V2ThreadUnarchiveResponse__McpToolCallError, Schema.Null]),
31942 ),
31943 id: Schema.String,
31944 mcpAppResourceUri: Schema.optionalKey(
31945 Schema.Union([
31946 Schema.String.annotate({
31947 description: "Deprecated: use `appContext.resourceUri` instead.",
31948 }),
31949 Schema.Null,
31950 ]),
31951 ),
31952 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
31953 result: Schema.optionalKey(
31954 Schema.Union([V2ThreadUnarchiveResponse__McpToolCallResult, Schema.Null]),
31955 ),
31956 server: Schema.String,
31957 status: V2ThreadUnarchiveResponse__McpToolCallStatus,
31958 tool: Schema.String,
31959 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
31960 }).annotate({ title: "McpToolCallThreadItem" }),
31961 Schema.Struct({
31962 arguments: Schema.Json.annotate({ expected: "JSON value" }),
31963 contentItems: Schema.optionalKey(
31964 Schema.Union([
31965 Schema.Array(V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem),
31966 Schema.Null,
31967 ]),
31968 ),
31969 durationMs: Schema.optionalKey(
31970 Schema.Union([
31971 Schema.Number.annotate({
31972 description: "The duration of the dynamic tool call in milliseconds.",
31973 format: "int64",
31974 }).check(Schema.isInt().annotate({ expected: "an integer" })),
31975 Schema.Null,
31976 ]),
31977 ),
31978 id: Schema.String,
31979 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
31980 status: V2ThreadUnarchiveResponse__DynamicToolCallStatus,
31981 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
31982 tool: Schema.String,
31983 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
31984 }).annotate({ title: "DynamicToolCallThreadItem" }),
31985 Schema.Struct({
31986 agentsStates: Schema.Record(
31987 Schema.String,
31988 V2ThreadUnarchiveResponse__CollabAgentState,
31989 ).annotate({ description: "Last known status of the target agents, when available." }),
31990 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
31991 model: Schema.optionalKey(
31992 Schema.Union([
31993 Schema.String.annotate({
31994 description: "Model requested for the spawned agent, when applicable.",
31995 }),
31996 Schema.Null,
31997 ]),
31998 ),
31999 prompt: Schema.optionalKey(
32000 Schema.Union([
32001 Schema.String.annotate({
32002 description: "Prompt text sent as part of the collab tool call, when available.",
32003 }),
32004 Schema.Null,
32005 ]),
32006 ),
32007 reasoningEffort: Schema.optionalKey(
32008 Schema.Union([V2ThreadUnarchiveResponse__ReasoningEffort, Schema.Null]).annotate({
32009 description: "Reasoning effort requested for the spawned agent, when applicable.",
32010 }),
32011 ),
32012 receiverThreadIds: Schema.Array(Schema.String).annotate({
32013 description:
32014 "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
32015 }),
32016 senderThreadId: Schema.String.annotate({
32017 description: "Thread ID of the agent issuing the collab request.",
32018 }),
32019 status: Schema.suspend(
32020 (): Schema.Codec<V2ThreadUnarchiveResponse__CollabAgentToolCallStatus> =>
32021 V2ThreadUnarchiveResponse__CollabAgentToolCallStatus,
32022 ).annotate({ description: "Current status of the collab tool call." }),
32023 tool: Schema.suspend(
32024 (): Schema.Codec<V2ThreadUnarchiveResponse__CollabAgentTool> =>
32025 V2ThreadUnarchiveResponse__CollabAgentTool,
32026 ).annotate({ description: "Name of the collab tool that was invoked." }),
32027 type: Schema.Literal("collabAgentToolCall").annotate({
32028 title: "CollabAgentToolCallThreadItemType",
32029 }),
32030 }).annotate({ title: "CollabAgentToolCallThreadItem" }),
32031 Schema.Struct({
32032 agentPath: Schema.String,
32033 agentThreadId: Schema.String,
32034 id: Schema.String,
32035 kind: V2ThreadUnarchiveResponse__SubAgentActivityKind,
32036 type: Schema.Literal("subAgentActivity").annotate({
32037 title: "SubAgentActivityThreadItemType",
32038 }),
32039 }).annotate({ title: "SubAgentActivityThreadItem" }),
32040 Schema.Struct({
32041 action: Schema.optionalKey(
32042 Schema.Union([V2ThreadUnarchiveResponse__WebSearchAction, Schema.Null]),
32043 ),
32044 id: Schema.String,
32045 query: Schema.String,
32046 results: Schema.optionalKey(
32047 Schema.Union([
32048 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
32049 description:
32050 "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.",
32051 }),
32052 Schema.Null,
32053 ]),
32054 ),
32055 type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }),
32056 }).annotate({ title: "WebSearchThreadItem" }),
32057 Schema.Struct({
32058 id: Schema.String,
32059 path: V2ThreadUnarchiveResponse__LegacyAppPathString,
32060 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
32061 }).annotate({ title: "ImageViewThreadItem" }),
32062 Schema.Struct({
32063 durationMs: Schema.Number.annotate({ format: "uint64" })
32064 .check(Schema.isInt().annotate({ expected: "an integer" }))
32065 .check(
32066 Schema.isGreaterThanOrEqualTo(0).annotate({
32067 expected: "a value greater than or equal to 0",
32068 }),
32069 ),
32070 id: Schema.String,
32071 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
32072 }).annotate({
32073 title: "SleepThreadItem",
32074 description: "Display item emitted by the interruptible `clock.sleep` tool.",
2860532075 }),
28606 ),
28607 startedAt: Schema.optionalKey(
28608 Schema.Union([
28609 Schema.Number.annotate({
28610 description: "Unix timestamp (in seconds) when the turn started.",
28611 format: "int64",
28612 }).check(Schema.isInt()),
28613 Schema.Null,
28614 ]),
28615 ),
28616 status: ServerNotification__TurnStatus,
28617});
28618
28619export type ServerRequest__FileSystemSandboxEntry = {
28620 readonly access: ServerRequest__FileSystemAccessMode;
28621 readonly path: ServerRequest__FileSystemPath;
28622};
28623export const ServerRequest__FileSystemSandboxEntry = Schema.Struct({
28624 access: ServerRequest__FileSystemAccessMode,
28625 path: ServerRequest__FileSystemPath,
28626});
28627
28628export type ServerRequest__McpElicitationMultiSelectEnumSchema =
28629 | ServerRequest__McpElicitationUntitledMultiSelectEnumSchema
28630 | ServerRequest__McpElicitationTitledMultiSelectEnumSchema;
28631export const ServerRequest__McpElicitationMultiSelectEnumSchema = Schema.Union([
28632 ServerRequest__McpElicitationUntitledMultiSelectEnumSchema,
28633 ServerRequest__McpElicitationTitledMultiSelectEnumSchema,
28634]);
32076 Schema.Struct({
32077 id: Schema.String,
32078 result: Schema.String,
32079 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
32080 savedPath: Schema.optionalKey(
32081 Schema.Union([V2ThreadUnarchiveResponse__AbsolutePathBuf, Schema.Null]),
32082 ),
32083 status: Schema.String,
32084 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
32085 }).annotate({ title: "ImageGenerationThreadItem" }),
32086 Schema.Struct({
32087 id: Schema.String,
32088 review: Schema.String,
32089 type: Schema.Literal("enteredReviewMode").annotate({
32090 title: "EnteredReviewModeThreadItemType",
32091 }),
32092 }).annotate({ title: "EnteredReviewModeThreadItem" }),
32093 Schema.Struct({
32094 id: Schema.String,
32095 review: Schema.String,
32096 type: Schema.Literal("exitedReviewMode").annotate({
32097 title: "ExitedReviewModeThreadItemType",
32098 }),
32099 }).annotate({ title: "ExitedReviewModeThreadItem" }),
32100 Schema.Struct({
32101 id: Schema.String,
32102 type: Schema.Literal("contextCompaction").annotate({
32103 title: "ContextCompactionThreadItemType",
32104 }),
32105 }).annotate({ title: "ContextCompactionThreadItem" }),
32106 ],
32107 { mode: "oneOf" },
32108).annotate({ identifier: "V2ThreadUnarchiveResponse__ThreadItem" });
2863532109
28636export type V2ConfigReadResponse__Config = {
28637 readonly analytics?: V2ConfigReadResponse__AnalyticsConfig | null;
28638 readonly approval_policy?: V2ConfigReadResponse__AskForApproval | null;
28639 readonly approvals_reviewer?: V2ConfigReadResponse__ApprovalsReviewer | null;
28640 readonly compact_prompt?: string | null;
28641 readonly desktop?: { readonly [x: string]: unknown } | null;
28642 readonly developer_instructions?: string | null;
28643 readonly forced_chatgpt_workspace_id?: V2ConfigReadResponse__ForcedChatgptWorkspaceIds | null;
28644 readonly forced_login_method?: V2ConfigReadResponse__ForcedLoginMethod | null;
28645 readonly instructions?: string | null;
28646 readonly model?: string | null;
28647 readonly model_auto_compact_token_limit?: number | null;
28648 readonly model_auto_compact_token_limit_scope?: V2ConfigReadResponse__AutoCompactTokenLimitScope | null;
28649 readonly model_context_window?: number | null;
28650 readonly model_provider?: string | null;
28651 readonly model_reasoning_effort?: V2ConfigReadResponse__ReasoningEffort | null;
28652 readonly model_reasoning_summary?: V2ConfigReadResponse__ReasoningSummary | null;
28653 readonly model_verbosity?: V2ConfigReadResponse__Verbosity | null;
28654 readonly review_model?: string | null;
28655 readonly sandbox_mode?: V2ConfigReadResponse__SandboxMode | null;
28656 readonly sandbox_workspace_write?: V2ConfigReadResponse__SandboxWorkspaceWrite | null;
28657 readonly service_tier?: string | null;
28658 readonly tools?: V2ConfigReadResponse__ToolsV2 | null;
28659 readonly web_search?: V2ConfigReadResponse__WebSearchMode | null;
28660 readonly [x: string]: unknown;
28661};
28662export const V2ConfigReadResponse__Config = Schema.StructWithRest(
28663 Schema.Struct({
28664 analytics: Schema.optionalKey(
28665 Schema.Union([V2ConfigReadResponse__AnalyticsConfig, Schema.Null]),
28666 ),
28667 approval_policy: Schema.optionalKey(
28668 Schema.Union([V2ConfigReadResponse__AskForApproval, Schema.Null]),
28669 ),
28670 approvals_reviewer: Schema.optionalKey(
28671 Schema.Union([V2ConfigReadResponse__ApprovalsReviewer, Schema.Null]).annotate({
32110export type V2TurnCompletedNotification__ThreadItem =
32111 | {
32112 readonly clientId?: string | null;
32113 readonly content: ReadonlyArray<V2TurnCompletedNotification__UserInput>;
32114 readonly id: string;
32115 readonly type: "userMessage";
32116 }
32117 | {
32118 readonly fragments: ReadonlyArray<V2TurnCompletedNotification__HookPromptFragment>;
32119 readonly id: string;
32120 readonly type: "hookPrompt";
32121 }
32122 | {
32123 readonly id: string;
32124 readonly memoryCitation?: V2TurnCompletedNotification__MemoryCitation | null;
32125 readonly phase?: V2TurnCompletedNotification__MessagePhase | null;
32126 readonly text: string;
32127 readonly delivery?: "async" | null;
32128 readonly questions?: ReadonlyArray<{
32129 readonly title: string;
32130 readonly options?: ReadonlyArray<string> | null;
32131 }> | null;
32132 readonly type: "agentMessage";
32133 }
32134 | { readonly id: string; readonly text: string; readonly type: "plan" }
32135 | {
32136 readonly content?: ReadonlyArray<string>;
32137 readonly id: string;
32138 readonly summary?: ReadonlyArray<string>;
32139 readonly type: "reasoning";
32140 }
32141 | {
32142 readonly aggregatedOutput?: string | null;
32143 readonly command: string;
32144 readonly commandActions: ReadonlyArray<V2TurnCompletedNotification__CommandAction>;
32145 readonly cwd: V2TurnCompletedNotification__LegacyAppPathString;
32146 readonly durationMs?: number | null;
32147 readonly exitCode?: number | null;
32148 readonly id: string;
32149 readonly processId?: string | null;
32150 readonly source?: V2TurnCompletedNotification__CommandExecutionSource;
32151 readonly status: V2TurnCompletedNotification__CommandExecutionStatus;
32152 readonly type: "commandExecution";
32153 }
32154 | {
32155 readonly changes: ReadonlyArray<V2TurnCompletedNotification__FileUpdateChange>;
32156 readonly id: string;
32157 readonly status: V2TurnCompletedNotification__PatchApplyStatus;
32158 readonly type: "fileChange";
32159 }
32160 | {
32161 readonly appContext?: V2TurnCompletedNotification__McpToolCallAppContext | null;
32162 readonly arguments: Schema.Json;
32163 readonly durationMs?: number | null;
32164 readonly error?: V2TurnCompletedNotification__McpToolCallError | null;
32165 readonly id: string;
32166 readonly mcpAppResourceUri?: string | null;
32167 readonly pluginId?: string | null;
32168 readonly result?: V2TurnCompletedNotification__McpToolCallResult | null;
32169 readonly server: string;
32170 readonly status: V2TurnCompletedNotification__McpToolCallStatus;
32171 readonly tool: string;
32172 readonly type: "mcpToolCall";
32173 }
32174 | {
32175 readonly arguments: Schema.Json;
32176 readonly contentItems?: ReadonlyArray<V2TurnCompletedNotification__DynamicToolCallOutputContentItem> | null;
32177 readonly durationMs?: number | null;
32178 readonly id: string;
32179 readonly namespace?: string | null;
32180 readonly status: V2TurnCompletedNotification__DynamicToolCallStatus;
32181 readonly success?: boolean | null;
32182 readonly tool: string;
32183 readonly type: "dynamicToolCall";
32184 }
32185 | {
32186 readonly agentsStates: {
32187 readonly [x: string]: V2TurnCompletedNotification__CollabAgentState;
32188 };
32189 readonly id: string;
32190 readonly model?: string | null;
32191 readonly prompt?: string | null;
32192 readonly reasoningEffort?: V2TurnCompletedNotification__ReasoningEffort | null;
32193 readonly receiverThreadIds: ReadonlyArray<string>;
32194 readonly senderThreadId: string;
32195 readonly status: V2TurnCompletedNotification__CollabAgentToolCallStatus;
32196 readonly tool: V2TurnCompletedNotification__CollabAgentTool;
32197 readonly type: "collabAgentToolCall";
32198 }
32199 | {
32200 readonly agentPath: string;
32201 readonly agentThreadId: string;
32202 readonly id: string;
32203 readonly kind: V2TurnCompletedNotification__SubAgentActivityKind;
32204 readonly type: "subAgentActivity";
32205 }
32206 | {
32207 readonly action?: V2TurnCompletedNotification__WebSearchAction | null;
32208 readonly id: string;
32209 readonly query: string;
32210 readonly results?: ReadonlyArray<Schema.Json> | null;
32211 readonly type: "webSearch";
32212 }
32213 | {
32214 readonly id: string;
32215 readonly path: V2TurnCompletedNotification__LegacyAppPathString;
32216 readonly type: "imageView";
32217 }
32218 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
32219 | {
32220 readonly id: string;
32221 readonly result: string;
32222 readonly revisedPrompt?: string | null;
32223 readonly savedPath?: V2TurnCompletedNotification__AbsolutePathBuf | null;
32224 readonly status: string;
32225 readonly type: "imageGeneration";
32226 }
32227 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
32228 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
32229 | { readonly id: string; readonly type: "contextCompaction" };
32230export const V2TurnCompletedNotification__ThreadItem = Schema.Union(
32231 [
32232 Schema.Struct({
32233 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
32234 content: Schema.Array(V2TurnCompletedNotification__UserInput),
32235 id: Schema.String,
32236 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
32237 }).annotate({ title: "UserMessageThreadItem" }),
32238 Schema.Struct({
32239 fragments: Schema.Array(V2TurnCompletedNotification__HookPromptFragment),
32240 id: Schema.String,
32241 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
32242 }).annotate({ title: "HookPromptThreadItem" }),
32243 Schema.Struct({
32244 id: Schema.String,
32245 memoryCitation: Schema.optionalKey(
32246 Schema.Union([V2TurnCompletedNotification__MemoryCitation, Schema.Null]),
32247 ),
32248 phase: Schema.optionalKey(
32249 Schema.Union([V2TurnCompletedNotification__MessagePhase, Schema.Null]),
32250 ),
32251 text: Schema.String,
32252 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
32253 questions: Schema.optionalKey(
32254 Schema.Union([
32255 Schema.Array(
32256 Schema.Struct({
32257 title: Schema.String,
32258 options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
32259 }),
32260 ),
32261 Schema.Null,
32262 ]),
32263 ),
32264 type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }),
32265 }).annotate({ title: "AgentMessageThreadItem" }),
32266 Schema.Struct({
32267 id: Schema.String,
32268 text: Schema.String,
32269 type: Schema.Literal("plan").annotate({ title: "PlanThreadItemType" }),
32270 }).annotate({
32271 title: "PlanThreadItem",
32272 description:
32273 "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
32274 }),
32275 Schema.Struct({
32276 content: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
32277 id: Schema.String,
32278 summary: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
32279 type: Schema.Literal("reasoning").annotate({ title: "ReasoningThreadItemType" }),
32280 }).annotate({ title: "ReasoningThreadItem" }),
32281 Schema.Struct({
32282 aggregatedOutput: Schema.optionalKey(
32283 Schema.Union([
32284 Schema.String.annotate({
32285 description: "The command's output, aggregated from stdout and stderr.",
32286 }),
32287 Schema.Null,
32288 ]),
32289 ),
32290 command: Schema.String.annotate({ description: "The command to be executed." }),
32291 commandActions: Schema.Array(V2TurnCompletedNotification__CommandAction).annotate({
32292 description:
32293 "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.",
32294 }),
32295 cwd: Schema.suspend(
32296 (): Schema.Codec<V2TurnCompletedNotification__LegacyAppPathString> =>
32297 V2TurnCompletedNotification__LegacyAppPathString,
32298 ).annotate({ description: "The command's working directory." }),
32299 durationMs: Schema.optionalKey(
32300 Schema.Union([
32301 Schema.Number.annotate({
32302 description: "The duration of the command execution in milliseconds.",
32303 format: "int64",
32304 }).check(Schema.isInt().annotate({ expected: "an integer" })),
32305 Schema.Null,
32306 ]),
32307 ),
32308 exitCode: Schema.optionalKey(
32309 Schema.Union([
32310 Schema.Number.annotate({
32311 description: "The command's exit code.",
32312 format: "int32",
32313 }).check(Schema.isInt().annotate({ expected: "an integer" })),
32314 Schema.Null,
32315 ]),
32316 ),
32317 id: Schema.String,
32318 processId: Schema.optionalKey(
32319 Schema.Union([
32320 Schema.String.annotate({
32321 description: "Identifier for the underlying PTY process (when available).",
32322 }),
32323 Schema.Null,
32324 ]),
32325 ),
32326 source: Schema.optionalKey(
32327 Schema.suspend(
32328 (): Schema.Codec<V2TurnCompletedNotification__CommandExecutionSource> =>
32329 V2TurnCompletedNotification__CommandExecutionSource,
32330 ).annotate({ default: "agent" }),
32331 ),
32332 status: V2TurnCompletedNotification__CommandExecutionStatus,
32333 type: Schema.Literal("commandExecution").annotate({
32334 title: "CommandExecutionThreadItemType",
32335 }),
32336 }).annotate({ title: "CommandExecutionThreadItem" }),
32337 Schema.Struct({
32338 changes: Schema.Array(V2TurnCompletedNotification__FileUpdateChange),
32339 id: Schema.String,
32340 status: V2TurnCompletedNotification__PatchApplyStatus,
32341 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
32342 }).annotate({ title: "FileChangeThreadItem" }),
32343 Schema.Struct({
32344 appContext: Schema.optionalKey(
32345 Schema.Union([V2TurnCompletedNotification__McpToolCallAppContext, Schema.Null]),
32346 ),
32347 arguments: Schema.Json.annotate({ expected: "JSON value" }),
32348 durationMs: Schema.optionalKey(
32349 Schema.Union([
32350 Schema.Number.annotate({
32351 description: "The duration of the MCP tool call in milliseconds.",
32352 format: "int64",
32353 }).check(Schema.isInt().annotate({ expected: "an integer" })),
32354 Schema.Null,
32355 ]),
32356 ),
32357 error: Schema.optionalKey(
32358 Schema.Union([V2TurnCompletedNotification__McpToolCallError, Schema.Null]),
32359 ),
32360 id: Schema.String,
32361 mcpAppResourceUri: Schema.optionalKey(
32362 Schema.Union([
32363 Schema.String.annotate({
32364 description: "Deprecated: use `appContext.resourceUri` instead.",
32365 }),
32366 Schema.Null,
32367 ]),
32368 ),
32369 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
32370 result: Schema.optionalKey(
32371 Schema.Union([V2TurnCompletedNotification__McpToolCallResult, Schema.Null]),
32372 ),
32373 server: Schema.String,
32374 status: V2TurnCompletedNotification__McpToolCallStatus,
32375 tool: Schema.String,
32376 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
32377 }).annotate({ title: "McpToolCallThreadItem" }),
32378 Schema.Struct({
32379 arguments: Schema.Json.annotate({ expected: "JSON value" }),
32380 contentItems: Schema.optionalKey(
32381 Schema.Union([
32382 Schema.Array(V2TurnCompletedNotification__DynamicToolCallOutputContentItem),
32383 Schema.Null,
32384 ]),
32385 ),
32386 durationMs: Schema.optionalKey(
32387 Schema.Union([
32388 Schema.Number.annotate({
32389 description: "The duration of the dynamic tool call in milliseconds.",
32390 format: "int64",
32391 }).check(Schema.isInt().annotate({ expected: "an integer" })),
32392 Schema.Null,
32393 ]),
32394 ),
32395 id: Schema.String,
32396 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
32397 status: V2TurnCompletedNotification__DynamicToolCallStatus,
32398 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
32399 tool: Schema.String,
32400 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
32401 }).annotate({ title: "DynamicToolCallThreadItem" }),
32402 Schema.Struct({
32403 agentsStates: Schema.Record(
32404 Schema.String,
32405 V2TurnCompletedNotification__CollabAgentState,
32406 ).annotate({ description: "Last known status of the target agents, when available." }),
32407 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
32408 model: Schema.optionalKey(
32409 Schema.Union([
32410 Schema.String.annotate({
32411 description: "Model requested for the spawned agent, when applicable.",
32412 }),
32413 Schema.Null,
32414 ]),
32415 ),
32416 prompt: Schema.optionalKey(
32417 Schema.Union([
32418 Schema.String.annotate({
32419 description: "Prompt text sent as part of the collab tool call, when available.",
32420 }),
32421 Schema.Null,
32422 ]),
32423 ),
32424 reasoningEffort: Schema.optionalKey(
32425 Schema.Union([V2TurnCompletedNotification__ReasoningEffort, Schema.Null]).annotate({
32426 description: "Reasoning effort requested for the spawned agent, when applicable.",
32427 }),
32428 ),
32429 receiverThreadIds: Schema.Array(Schema.String).annotate({
2867232430 description:
28673 "[UNSTABLE] Optional default for where approval requests are routed for review.",
32431 "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
2867432432 }),
28675 ),
28676 compact_prompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28677 desktop: Schema.optionalKey(
28678 Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]),
28679 ),
28680 developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28681 forced_chatgpt_workspace_id: Schema.optionalKey(
28682 Schema.Union([V2ConfigReadResponse__ForcedChatgptWorkspaceIds, Schema.Null]),
28683 ),
28684 forced_login_method: Schema.optionalKey(
28685 Schema.Union([V2ConfigReadResponse__ForcedLoginMethod, Schema.Null]),
28686 ),
28687 instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28688 model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28689 model_auto_compact_token_limit: Schema.optionalKey(
28690 Schema.Union([
28691 Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
28692 Schema.Null,
28693 ]),
28694 ),
28695 model_auto_compact_token_limit_scope: Schema.optionalKey(
28696 Schema.Union([V2ConfigReadResponse__AutoCompactTokenLimitScope, Schema.Null]),
28697 ),
28698 model_context_window: Schema.optionalKey(
28699 Schema.Union([
28700 Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
28701 Schema.Null,
28702 ]),
28703 ),
28704 model_provider: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28705 model_reasoning_effort: Schema.optionalKey(
28706 Schema.Union([V2ConfigReadResponse__ReasoningEffort, Schema.Null]),
28707 ),
28708 model_reasoning_summary: Schema.optionalKey(
28709 Schema.Union([V2ConfigReadResponse__ReasoningSummary, Schema.Null]),
28710 ),
28711 model_verbosity: Schema.optionalKey(
28712 Schema.Union([V2ConfigReadResponse__Verbosity, Schema.Null]),
28713 ),
28714 review_model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28715 sandbox_mode: Schema.optionalKey(
28716 Schema.Union([V2ConfigReadResponse__SandboxMode, Schema.Null]),
28717 ),
28718 sandbox_workspace_write: Schema.optionalKey(
28719 Schema.Union([V2ConfigReadResponse__SandboxWorkspaceWrite, Schema.Null]),
28720 ),
28721 service_tier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28722 tools: Schema.optionalKey(Schema.Union([V2ConfigReadResponse__ToolsV2, Schema.Null])),
28723 web_search: Schema.optionalKey(
28724 Schema.Union([V2ConfigReadResponse__WebSearchMode, Schema.Null]),
28725 ),
28726 }),
28727 [Schema.Record(Schema.String, Schema.Unknown)],
28728);
28729
28730export type V2ConfigRequirementsReadResponse__ConfigRequirements = {
28731 readonly allowAppshots?: boolean | null;
28732 readonly allowManagedHooksOnly?: boolean | null;
28733 readonly allowRemoteControl?: boolean | null;
28734 readonly allowedApprovalPolicies?: ReadonlyArray<V2ConfigRequirementsReadResponse__AskForApproval> | null;
28735 readonly allowedPermissionProfiles?: { readonly [x: string]: boolean } | null;
28736 readonly allowedSandboxModes?: ReadonlyArray<V2ConfigRequirementsReadResponse__SandboxMode> | null;
28737 readonly allowedWebSearchModes?: ReadonlyArray<V2ConfigRequirementsReadResponse__WebSearchMode> | null;
28738 readonly allowedWindowsSandboxImplementations?: ReadonlyArray<V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode> | null;
28739 readonly computerUse?: V2ConfigRequirementsReadResponse__ComputerUseRequirements | null;
28740 readonly defaultPermissions?: string | null;
28741 readonly enforceResidency?: V2ConfigRequirementsReadResponse__ResidencyRequirement | null;
28742 readonly featureRequirements?: { readonly [x: string]: boolean } | null;
28743 readonly models?: V2ConfigRequirementsReadResponse__ModelsRequirements | null;
28744};
28745export const V2ConfigRequirementsReadResponse__ConfigRequirements = Schema.Struct({
28746 allowAppshots: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
28747 allowManagedHooksOnly: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
28748 allowRemoteControl: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
28749 allowedApprovalPolicies: Schema.optionalKey(
28750 Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__AskForApproval), Schema.Null]),
28751 ),
28752 allowedPermissionProfiles: Schema.optionalKey(
28753 Schema.Union([Schema.Record(Schema.String, Schema.Boolean), Schema.Null]),
28754 ),
28755 allowedSandboxModes: Schema.optionalKey(
28756 Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__SandboxMode), Schema.Null]),
28757 ),
28758 allowedWebSearchModes: Schema.optionalKey(
28759 Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__WebSearchMode), Schema.Null]),
28760 ),
28761 allowedWindowsSandboxImplementations: Schema.optionalKey(
28762 Schema.Union([
28763 Schema.Array(V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode),
28764 Schema.Null,
28765 ]),
28766 ),
28767 computerUse: Schema.optionalKey(
28768 Schema.Union([V2ConfigRequirementsReadResponse__ComputerUseRequirements, Schema.Null]),
28769 ),
28770 defaultPermissions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
28771 enforceResidency: Schema.optionalKey(
28772 Schema.Union([V2ConfigRequirementsReadResponse__ResidencyRequirement, Schema.Null]),
28773 ),
28774 featureRequirements: Schema.optionalKey(
28775 Schema.Union([Schema.Record(Schema.String, Schema.Boolean), Schema.Null]),
28776 ),
28777 models: Schema.optionalKey(
28778 Schema.Union([V2ConfigRequirementsReadResponse__ModelsRequirements, Schema.Null]),
28779 ),
28780});
28781
28782export type V2ConfigWriteResponse__OverriddenMetadata = {
28783 readonly effectiveValue: unknown;
28784 readonly message: string;
28785 readonly overridingLayer: V2ConfigWriteResponse__ConfigLayerMetadata;
28786};
28787export const V2ConfigWriteResponse__OverriddenMetadata = Schema.Struct({
28788 effectiveValue: Schema.Unknown,
28789 message: Schema.String,
28790 overridingLayer: V2ConfigWriteResponse__ConfigLayerMetadata,
28791});
28792
28793export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry = {
28794 readonly access: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode;
28795 readonly path: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath;
28796};
28797export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry =
28798 Schema.Struct({
28799 access: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode,
28800 path: V2ItemGuardianApprovalReviewCompletedNotification__FileSystemPath,
28801 });
28802
28803export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry = {
28804 readonly access: V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode;
28805 readonly path: V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath;
28806};
28807export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry =
28808 Schema.Struct({
28809 access: V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode,
28810 path: V2ItemGuardianApprovalReviewStartedNotification__FileSystemPath,
28811 });
28812
28813export type V2PluginInstalledResponse__PluginSummary = {
28814 readonly authPolicy: V2PluginInstalledResponse__PluginAuthPolicy;
28815 readonly availability?: "DISABLED_BY_ADMIN" | "AVAILABLE";
28816 readonly enabled: boolean;
28817 readonly id: string;
28818 readonly installPolicy: V2PluginInstalledResponse__PluginInstallPolicy;
28819 readonly installPolicySource?: V2PluginInstalledResponse__PluginInstallPolicySource | null;
28820 readonly installed: boolean;
28821 readonly interface?: V2PluginInstalledResponse__PluginInterface | null;
28822 readonly keywords?: ReadonlyArray<string>;
28823 readonly localVersion?: string | null;
28824 readonly mustShowInstallationInterstitial?: boolean | null;
28825 readonly name: string;
28826 readonly remotePluginId?: string | null;
28827 readonly shareContext?: V2PluginInstalledResponse__PluginShareContext | null;
28828 readonly source: V2PluginInstalledResponse__PluginSource;
28829 readonly version?: string | null;
28830};
28831export const V2PluginInstalledResponse__PluginSummary = Schema.Struct({
28832 authPolicy: V2PluginInstalledResponse__PluginAuthPolicy,
28833 availability: Schema.optionalKey(
28834 Schema.Literals(["DISABLED_BY_ADMIN", "AVAILABLE"]).annotate({
28835 description: "Availability state for installing and using the plugin.",
28836 default: "AVAILABLE",
32433 senderThreadId: Schema.String.annotate({
32434 description: "Thread ID of the agent issuing the collab request.",
32435 }),
32436 status: Schema.suspend(
32437 (): Schema.Codec<V2TurnCompletedNotification__CollabAgentToolCallStatus> =>
32438 V2TurnCompletedNotification__CollabAgentToolCallStatus,
32439 ).annotate({ description: "Current status of the collab tool call." }),
32440 tool: Schema.suspend(
32441 (): Schema.Codec<V2TurnCompletedNotification__CollabAgentTool> =>
32442 V2TurnCompletedNotification__CollabAgentTool,
32443 ).annotate({ description: "Name of the collab tool that was invoked." }),
32444 type: Schema.Literal("collabAgentToolCall").annotate({
32445 title: "CollabAgentToolCallThreadItemType",
32446 }),
32447 }).annotate({ title: "CollabAgentToolCallThreadItem" }),
32448 Schema.Struct({
32449 agentPath: Schema.String,
32450 agentThreadId: Schema.String,
32451 id: Schema.String,
32452 kind: V2TurnCompletedNotification__SubAgentActivityKind,
32453 type: Schema.Literal("subAgentActivity").annotate({
32454 title: "SubAgentActivityThreadItemType",
32455 }),
32456 }).annotate({ title: "SubAgentActivityThreadItem" }),
32457 Schema.Struct({
32458 action: Schema.optionalKey(
32459 Schema.Union([V2TurnCompletedNotification__WebSearchAction, Schema.Null]),
32460 ),
32461 id: Schema.String,
32462 query: Schema.String,
32463 results: Schema.optionalKey(
32464 Schema.Union([
32465 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
32466 description:
32467 "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.",
32468 }),
32469 Schema.Null,
32470 ]),
32471 ),
32472 type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }),
32473 }).annotate({ title: "WebSearchThreadItem" }),
32474 Schema.Struct({
32475 id: Schema.String,
32476 path: V2TurnCompletedNotification__LegacyAppPathString,
32477 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
32478 }).annotate({ title: "ImageViewThreadItem" }),
32479 Schema.Struct({
32480 durationMs: Schema.Number.annotate({ format: "uint64" })
32481 .check(Schema.isInt().annotate({ expected: "an integer" }))
32482 .check(
32483 Schema.isGreaterThanOrEqualTo(0).annotate({
32484 expected: "a value greater than or equal to 0",
32485 }),
32486 ),
32487 id: Schema.String,
32488 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
32489 }).annotate({
32490 title: "SleepThreadItem",
32491 description: "Display item emitted by the interruptible `clock.sleep` tool.",
2883732492 }),
28838 ),
28839 enabled: Schema.Boolean,
28840 id: Schema.String,
28841 installPolicy: V2PluginInstalledResponse__PluginInstallPolicy,
28842 installPolicySource: Schema.optionalKey(
28843 Schema.Union([V2PluginInstalledResponse__PluginInstallPolicySource, Schema.Null]),
28844 ),
28845 installed: Schema.Boolean,
28846 interface: Schema.optionalKey(
28847 Schema.Union([V2PluginInstalledResponse__PluginInterface, Schema.Null]),
28848 ),
28849 keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
28850 localVersion: Schema.optionalKey(
28851 Schema.Union([
28852 Schema.String.annotate({
28853 description: "Version of the locally materialized plugin package when available.",
32493 Schema.Struct({
32494 id: Schema.String,
32495 result: Schema.String,
32496 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
32497 savedPath: Schema.optionalKey(
32498 Schema.Union([V2TurnCompletedNotification__AbsolutePathBuf, Schema.Null]),
32499 ),
32500 status: Schema.String,
32501 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
32502 }).annotate({ title: "ImageGenerationThreadItem" }),
32503 Schema.Struct({
32504 id: Schema.String,
32505 review: Schema.String,
32506 type: Schema.Literal("enteredReviewMode").annotate({
32507 title: "EnteredReviewModeThreadItemType",
2885432508 }),
28855 Schema.Null,
28856 ]),
28857 ),
28858 mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
28859 name: Schema.String,
28860 remotePluginId: Schema.optionalKey(
28861 Schema.Union([
28862 Schema.String.annotate({ description: "Backend remote plugin identifier when available." }),
28863 Schema.Null,
28864 ]),
28865 ),
28866 shareContext: Schema.optionalKey(
28867 Schema.Union([V2PluginInstalledResponse__PluginShareContext, Schema.Null]).annotate({
28868 description: "Remote sharing context associated with this plugin when available.",
32509 }).annotate({ title: "EnteredReviewModeThreadItem" }),
32510 Schema.Struct({
32511 id: Schema.String,
32512 review: Schema.String,
32513 type: Schema.Literal("exitedReviewMode").annotate({
32514 title: "ExitedReviewModeThreadItemType",
32515 }),
32516 }).annotate({ title: "ExitedReviewModeThreadItem" }),
32517 Schema.Struct({
32518 id: Schema.String,
32519 type: Schema.Literal("contextCompaction").annotate({
32520 title: "ContextCompactionThreadItemType",
32521 }),
32522 }).annotate({ title: "ContextCompactionThreadItem" }),
32523 ],
32524 { mode: "oneOf" },
32525).annotate({ identifier: "V2TurnCompletedNotification__ThreadItem" });
32526
32527export type V2TurnStartedNotification__ThreadItem =
32528 | {
32529 readonly clientId?: string | null;
32530 readonly content: ReadonlyArray<V2TurnStartedNotification__UserInput>;
32531 readonly id: string;
32532 readonly type: "userMessage";
32533 }
32534 | {
32535 readonly fragments: ReadonlyArray<V2TurnStartedNotification__HookPromptFragment>;
32536 readonly id: string;
32537 readonly type: "hookPrompt";
32538 }
32539 | {
32540 readonly id: string;
32541 readonly memoryCitation?: V2TurnStartedNotification__MemoryCitation | null;
32542 readonly phase?: V2TurnStartedNotification__MessagePhase | null;
32543 readonly text: string;
32544 readonly delivery?: "async" | null;
32545 readonly questions?: ReadonlyArray<{
32546 readonly title: string;
32547 readonly options?: ReadonlyArray<string> | null;
32548 }> | null;
32549 readonly type: "agentMessage";
32550 }
32551 | { readonly id: string; readonly text: string; readonly type: "plan" }
32552 | {
32553 readonly content?: ReadonlyArray<string>;
32554 readonly id: string;
32555 readonly summary?: ReadonlyArray<string>;
32556 readonly type: "reasoning";
32557 }
32558 | {
32559 readonly aggregatedOutput?: string | null;
32560 readonly command: string;
32561 readonly commandActions: ReadonlyArray<V2TurnStartedNotification__CommandAction>;
32562 readonly cwd: V2TurnStartedNotification__LegacyAppPathString;
32563 readonly durationMs?: number | null;
32564 readonly exitCode?: number | null;
32565 readonly id: string;
32566 readonly processId?: string | null;
32567 readonly source?: V2TurnStartedNotification__CommandExecutionSource;
32568 readonly status: V2TurnStartedNotification__CommandExecutionStatus;
32569 readonly type: "commandExecution";
32570 }
32571 | {
32572 readonly changes: ReadonlyArray<V2TurnStartedNotification__FileUpdateChange>;
32573 readonly id: string;
32574 readonly status: V2TurnStartedNotification__PatchApplyStatus;
32575 readonly type: "fileChange";
32576 }
32577 | {
32578 readonly appContext?: V2TurnStartedNotification__McpToolCallAppContext | null;
32579 readonly arguments: Schema.Json;
32580 readonly durationMs?: number | null;
32581 readonly error?: V2TurnStartedNotification__McpToolCallError | null;
32582 readonly id: string;
32583 readonly mcpAppResourceUri?: string | null;
32584 readonly pluginId?: string | null;
32585 readonly result?: V2TurnStartedNotification__McpToolCallResult | null;
32586 readonly server: string;
32587 readonly status: V2TurnStartedNotification__McpToolCallStatus;
32588 readonly tool: string;
32589 readonly type: "mcpToolCall";
32590 }
32591 | {
32592 readonly arguments: Schema.Json;
32593 readonly contentItems?: ReadonlyArray<V2TurnStartedNotification__DynamicToolCallOutputContentItem> | null;
32594 readonly durationMs?: number | null;
32595 readonly id: string;
32596 readonly namespace?: string | null;
32597 readonly status: V2TurnStartedNotification__DynamicToolCallStatus;
32598 readonly success?: boolean | null;
32599 readonly tool: string;
32600 readonly type: "dynamicToolCall";
32601 }
32602 | {
32603 readonly agentsStates: { readonly [x: string]: V2TurnStartedNotification__CollabAgentState };
32604 readonly id: string;
32605 readonly model?: string | null;
32606 readonly prompt?: string | null;
32607 readonly reasoningEffort?: V2TurnStartedNotification__ReasoningEffort | null;
32608 readonly receiverThreadIds: ReadonlyArray<string>;
32609 readonly senderThreadId: string;
32610 readonly status: V2TurnStartedNotification__CollabAgentToolCallStatus;
32611 readonly tool: V2TurnStartedNotification__CollabAgentTool;
32612 readonly type: "collabAgentToolCall";
32613 }
32614 | {
32615 readonly agentPath: string;
32616 readonly agentThreadId: string;
32617 readonly id: string;
32618 readonly kind: V2TurnStartedNotification__SubAgentActivityKind;
32619 readonly type: "subAgentActivity";
32620 }
32621 | {
32622 readonly action?: V2TurnStartedNotification__WebSearchAction | null;
32623 readonly id: string;
32624 readonly query: string;
32625 readonly results?: ReadonlyArray<Schema.Json> | null;
32626 readonly type: "webSearch";
32627 }
32628 | {
32629 readonly id: string;
32630 readonly path: V2TurnStartedNotification__LegacyAppPathString;
32631 readonly type: "imageView";
32632 }
32633 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
32634 | {
32635 readonly id: string;
32636 readonly result: string;
32637 readonly revisedPrompt?: string | null;
32638 readonly savedPath?: V2TurnStartedNotification__AbsolutePathBuf | null;
32639 readonly status: string;
32640 readonly type: "imageGeneration";
32641 }
32642 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
32643 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
32644 | { readonly id: string; readonly type: "contextCompaction" };
32645export const V2TurnStartedNotification__ThreadItem = Schema.Union(
32646 [
32647 Schema.Struct({
32648 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
32649 content: Schema.Array(V2TurnStartedNotification__UserInput),
32650 id: Schema.String,
32651 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
32652 }).annotate({ title: "UserMessageThreadItem" }),
32653 Schema.Struct({
32654 fragments: Schema.Array(V2TurnStartedNotification__HookPromptFragment),
32655 id: Schema.String,
32656 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
32657 }).annotate({ title: "HookPromptThreadItem" }),
32658 Schema.Struct({
32659 id: Schema.String,
32660 memoryCitation: Schema.optionalKey(
32661 Schema.Union([V2TurnStartedNotification__MemoryCitation, Schema.Null]),
32662 ),
32663 phase: Schema.optionalKey(
32664 Schema.Union([V2TurnStartedNotification__MessagePhase, Schema.Null]),
32665 ),
32666 text: Schema.String,
32667 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
32668 questions: Schema.optionalKey(
32669 Schema.Union([
32670 Schema.Array(
32671 Schema.Struct({
32672 title: Schema.String,
32673 options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
32674 }),
32675 ),
32676 Schema.Null,
32677 ]),
32678 ),
32679 type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }),
32680 }).annotate({ title: "AgentMessageThreadItem" }),
32681 Schema.Struct({
32682 id: Schema.String,
32683 text: Schema.String,
32684 type: Schema.Literal("plan").annotate({ title: "PlanThreadItemType" }),
32685 }).annotate({
32686 title: "PlanThreadItem",
32687 description:
32688 "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
2886932689 }),
28870 ),
28871 source: V2PluginInstalledResponse__PluginSource,
28872 version: Schema.optionalKey(
28873 Schema.Union([
28874 Schema.String.annotate({
28875 description: "Version advertised by the remote marketplace backend when available.",
32690 Schema.Struct({
32691 content: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
32692 id: Schema.String,
32693 summary: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
32694 type: Schema.Literal("reasoning").annotate({ title: "ReasoningThreadItemType" }),
32695 }).annotate({ title: "ReasoningThreadItem" }),
32696 Schema.Struct({
32697 aggregatedOutput: Schema.optionalKey(
32698 Schema.Union([
32699 Schema.String.annotate({
32700 description: "The command's output, aggregated from stdout and stderr.",
32701 }),
32702 Schema.Null,
32703 ]),
32704 ),
32705 command: Schema.String.annotate({ description: "The command to be executed." }),
32706 commandActions: Schema.Array(V2TurnStartedNotification__CommandAction).annotate({
32707 description:
32708 "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.",
32709 }),
32710 cwd: Schema.suspend(
32711 (): Schema.Codec<V2TurnStartedNotification__LegacyAppPathString> =>
32712 V2TurnStartedNotification__LegacyAppPathString,
32713 ).annotate({ description: "The command's working directory." }),
32714 durationMs: Schema.optionalKey(
32715 Schema.Union([
32716 Schema.Number.annotate({
32717 description: "The duration of the command execution in milliseconds.",
32718 format: "int64",
32719 }).check(Schema.isInt().annotate({ expected: "an integer" })),
32720 Schema.Null,
32721 ]),
32722 ),
32723 exitCode: Schema.optionalKey(
32724 Schema.Union([
32725 Schema.Number.annotate({
32726 description: "The command's exit code.",
32727 format: "int32",
32728 }).check(Schema.isInt().annotate({ expected: "an integer" })),
32729 Schema.Null,
32730 ]),
32731 ),
32732 id: Schema.String,
32733 processId: Schema.optionalKey(
32734 Schema.Union([
32735 Schema.String.annotate({
32736 description: "Identifier for the underlying PTY process (when available).",
32737 }),
32738 Schema.Null,
32739 ]),
32740 ),
32741 source: Schema.optionalKey(
32742 Schema.suspend(
32743 (): Schema.Codec<V2TurnStartedNotification__CommandExecutionSource> =>
32744 V2TurnStartedNotification__CommandExecutionSource,
32745 ).annotate({ default: "agent" }),
32746 ),
32747 status: V2TurnStartedNotification__CommandExecutionStatus,
32748 type: Schema.Literal("commandExecution").annotate({
32749 title: "CommandExecutionThreadItemType",
32750 }),
32751 }).annotate({ title: "CommandExecutionThreadItem" }),
32752 Schema.Struct({
32753 changes: Schema.Array(V2TurnStartedNotification__FileUpdateChange),
32754 id: Schema.String,
32755 status: V2TurnStartedNotification__PatchApplyStatus,
32756 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
32757 }).annotate({ title: "FileChangeThreadItem" }),
32758 Schema.Struct({
32759 appContext: Schema.optionalKey(
32760 Schema.Union([V2TurnStartedNotification__McpToolCallAppContext, Schema.Null]),
32761 ),
32762 arguments: Schema.Json.annotate({ expected: "JSON value" }),
32763 durationMs: Schema.optionalKey(
32764 Schema.Union([
32765 Schema.Number.annotate({
32766 description: "The duration of the MCP tool call in milliseconds.",
32767 format: "int64",
32768 }).check(Schema.isInt().annotate({ expected: "an integer" })),
32769 Schema.Null,
32770 ]),
32771 ),
32772 error: Schema.optionalKey(
32773 Schema.Union([V2TurnStartedNotification__McpToolCallError, Schema.Null]),
32774 ),
32775 id: Schema.String,
32776 mcpAppResourceUri: Schema.optionalKey(
32777 Schema.Union([
32778 Schema.String.annotate({
32779 description: "Deprecated: use `appContext.resourceUri` instead.",
32780 }),
32781 Schema.Null,
32782 ]),
32783 ),
32784 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
32785 result: Schema.optionalKey(
32786 Schema.Union([V2TurnStartedNotification__McpToolCallResult, Schema.Null]),
32787 ),
32788 server: Schema.String,
32789 status: V2TurnStartedNotification__McpToolCallStatus,
32790 tool: Schema.String,
32791 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
32792 }).annotate({ title: "McpToolCallThreadItem" }),
32793 Schema.Struct({
32794 arguments: Schema.Json.annotate({ expected: "JSON value" }),
32795 contentItems: Schema.optionalKey(
32796 Schema.Union([
32797 Schema.Array(V2TurnStartedNotification__DynamicToolCallOutputContentItem),
32798 Schema.Null,
32799 ]),
32800 ),
32801 durationMs: Schema.optionalKey(
32802 Schema.Union([
32803 Schema.Number.annotate({
32804 description: "The duration of the dynamic tool call in milliseconds.",
32805 format: "int64",
32806 }).check(Schema.isInt().annotate({ expected: "an integer" })),
32807 Schema.Null,
32808 ]),
32809 ),
32810 id: Schema.String,
32811 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
32812 status: V2TurnStartedNotification__DynamicToolCallStatus,
32813 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
32814 tool: Schema.String,
32815 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
32816 }).annotate({ title: "DynamicToolCallThreadItem" }),
32817 Schema.Struct({
32818 agentsStates: Schema.Record(
32819 Schema.String,
32820 V2TurnStartedNotification__CollabAgentState,
32821 ).annotate({ description: "Last known status of the target agents, when available." }),
32822 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
32823 model: Schema.optionalKey(
32824 Schema.Union([
32825 Schema.String.annotate({
32826 description: "Model requested for the spawned agent, when applicable.",
32827 }),
32828 Schema.Null,
32829 ]),
32830 ),
32831 prompt: Schema.optionalKey(
32832 Schema.Union([
32833 Schema.String.annotate({
32834 description: "Prompt text sent as part of the collab tool call, when available.",
32835 }),
32836 Schema.Null,
32837 ]),
32838 ),
32839 reasoningEffort: Schema.optionalKey(
32840 Schema.Union([V2TurnStartedNotification__ReasoningEffort, Schema.Null]).annotate({
32841 description: "Reasoning effort requested for the spawned agent, when applicable.",
32842 }),
32843 ),
32844 receiverThreadIds: Schema.Array(Schema.String).annotate({
32845 description:
32846 "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
2887632847 }),
28877 Schema.Null,
28878 ]),
28879 ),
28880});
28881
28882export type V2PluginListResponse__PluginSummary = {
28883 readonly authPolicy: V2PluginListResponse__PluginAuthPolicy;
28884 readonly availability?: "DISABLED_BY_ADMIN" | "AVAILABLE";
28885 readonly enabled: boolean;
28886 readonly id: string;
28887 readonly installPolicy: V2PluginListResponse__PluginInstallPolicy;
28888 readonly installPolicySource?: V2PluginListResponse__PluginInstallPolicySource | null;
28889 readonly installed: boolean;
28890 readonly interface?: V2PluginListResponse__PluginInterface | null;
28891 readonly keywords?: ReadonlyArray<string>;
28892 readonly localVersion?: string | null;
28893 readonly mustShowInstallationInterstitial?: boolean | null;
28894 readonly name: string;
28895 readonly remotePluginId?: string | null;
28896 readonly shareContext?: V2PluginListResponse__PluginShareContext | null;
28897 readonly source: V2PluginListResponse__PluginSource;
28898 readonly version?: string | null;
28899};
28900export const V2PluginListResponse__PluginSummary = Schema.Struct({
28901 authPolicy: V2PluginListResponse__PluginAuthPolicy,
28902 availability: Schema.optionalKey(
28903 Schema.Literals(["DISABLED_BY_ADMIN", "AVAILABLE"]).annotate({
28904 description: "Availability state for installing and using the plugin.",
28905 default: "AVAILABLE",
28906 }),
28907 ),
28908 enabled: Schema.Boolean,
28909 id: Schema.String,
28910 installPolicy: V2PluginListResponse__PluginInstallPolicy,
28911 installPolicySource: Schema.optionalKey(
28912 Schema.Union([V2PluginListResponse__PluginInstallPolicySource, Schema.Null]),
28913 ),
28914 installed: Schema.Boolean,
28915 interface: Schema.optionalKey(Schema.Union([V2PluginListResponse__PluginInterface, Schema.Null])),
28916 keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
28917 localVersion: Schema.optionalKey(
28918 Schema.Union([
28919 Schema.String.annotate({
28920 description: "Version of the locally materialized plugin package when available.",
32848 senderThreadId: Schema.String.annotate({
32849 description: "Thread ID of the agent issuing the collab request.",
2892132850 }),
28922 Schema.Null,
28923 ]),
28924 ),
28925 mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
28926 name: Schema.String,
28927 remotePluginId: Schema.optionalKey(
28928 Schema.Union([
28929 Schema.String.annotate({ description: "Backend remote plugin identifier when available." }),
28930 Schema.Null,
28931 ]),
28932 ),
28933 shareContext: Schema.optionalKey(
28934 Schema.Union([V2PluginListResponse__PluginShareContext, Schema.Null]).annotate({
28935 description: "Remote sharing context associated with this plugin when available.",
28936 }),
28937 ),
28938 source: V2PluginListResponse__PluginSource,
28939 version: Schema.optionalKey(
28940 Schema.Union([
28941 Schema.String.annotate({
28942 description: "Version advertised by the remote marketplace backend when available.",
32851 status: Schema.suspend(
32852 (): Schema.Codec<V2TurnStartedNotification__CollabAgentToolCallStatus> =>
32853 V2TurnStartedNotification__CollabAgentToolCallStatus,
32854 ).annotate({ description: "Current status of the collab tool call." }),
32855 tool: Schema.suspend(
32856 (): Schema.Codec<V2TurnStartedNotification__CollabAgentTool> =>
32857 V2TurnStartedNotification__CollabAgentTool,
32858 ).annotate({ description: "Name of the collab tool that was invoked." }),
32859 type: Schema.Literal("collabAgentToolCall").annotate({
32860 title: "CollabAgentToolCallThreadItemType",
2894332861 }),
28944 Schema.Null,
28945 ]),
28946 ),
28947});
28948
28949export type V2PluginReadResponse__PluginSummary = {
28950 readonly authPolicy: V2PluginReadResponse__PluginAuthPolicy;
28951 readonly availability?: "DISABLED_BY_ADMIN" | "AVAILABLE";
28952 readonly enabled: boolean;
28953 readonly id: string;
28954 readonly installPolicy: V2PluginReadResponse__PluginInstallPolicy;
28955 readonly installPolicySource?: V2PluginReadResponse__PluginInstallPolicySource | null;
28956 readonly installed: boolean;
28957 readonly interface?: V2PluginReadResponse__PluginInterface | null;
28958 readonly keywords?: ReadonlyArray<string>;
28959 readonly localVersion?: string | null;
28960 readonly mustShowInstallationInterstitial?: boolean | null;
28961 readonly name: string;
28962 readonly remotePluginId?: string | null;
28963 readonly shareContext?: V2PluginReadResponse__PluginShareContext | null;
28964 readonly source: V2PluginReadResponse__PluginSource;
28965 readonly version?: string | null;
28966};
28967export const V2PluginReadResponse__PluginSummary = Schema.Struct({
28968 authPolicy: V2PluginReadResponse__PluginAuthPolicy,
28969 availability: Schema.optionalKey(
28970 Schema.Literals(["DISABLED_BY_ADMIN", "AVAILABLE"]).annotate({
28971 description: "Availability state for installing and using the plugin.",
28972 default: "AVAILABLE",
28973 }),
28974 ),
28975 enabled: Schema.Boolean,
28976 id: Schema.String,
28977 installPolicy: V2PluginReadResponse__PluginInstallPolicy,
28978 installPolicySource: Schema.optionalKey(
28979 Schema.Union([V2PluginReadResponse__PluginInstallPolicySource, Schema.Null]),
28980 ),
28981 installed: Schema.Boolean,
28982 interface: Schema.optionalKey(Schema.Union([V2PluginReadResponse__PluginInterface, Schema.Null])),
28983 keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
28984 localVersion: Schema.optionalKey(
28985 Schema.Union([
28986 Schema.String.annotate({
28987 description: "Version of the locally materialized plugin package when available.",
32862 }).annotate({ title: "CollabAgentToolCallThreadItem" }),
32863 Schema.Struct({
32864 agentPath: Schema.String,
32865 agentThreadId: Schema.String,
32866 id: Schema.String,
32867 kind: V2TurnStartedNotification__SubAgentActivityKind,
32868 type: Schema.Literal("subAgentActivity").annotate({
32869 title: "SubAgentActivityThreadItemType",
2898832870 }),
28989 Schema.Null,
28990 ]),
28991 ),
28992 mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
28993 name: Schema.String,
28994 remotePluginId: Schema.optionalKey(
28995 Schema.Union([
28996 Schema.String.annotate({ description: "Backend remote plugin identifier when available." }),
28997 Schema.Null,
28998 ]),
28999 ),
29000 shareContext: Schema.optionalKey(
29001 Schema.Union([V2PluginReadResponse__PluginShareContext, Schema.Null]).annotate({
29002 description: "Remote sharing context associated with this plugin when available.",
32871 }).annotate({ title: "SubAgentActivityThreadItem" }),
32872 Schema.Struct({
32873 action: Schema.optionalKey(
32874 Schema.Union([V2TurnStartedNotification__WebSearchAction, Schema.Null]),
32875 ),
32876 id: Schema.String,
32877 query: Schema.String,
32878 results: Schema.optionalKey(
32879 Schema.Union([
32880 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
32881 description:
32882 "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.",
32883 }),
32884 Schema.Null,
32885 ]),
32886 ),
32887 type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }),
32888 }).annotate({ title: "WebSearchThreadItem" }),
32889 Schema.Struct({
32890 id: Schema.String,
32891 path: V2TurnStartedNotification__LegacyAppPathString,
32892 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
32893 }).annotate({ title: "ImageViewThreadItem" }),
32894 Schema.Struct({
32895 durationMs: Schema.Number.annotate({ format: "uint64" })
32896 .check(Schema.isInt().annotate({ expected: "an integer" }))
32897 .check(
32898 Schema.isGreaterThanOrEqualTo(0).annotate({
32899 expected: "a value greater than or equal to 0",
32900 }),
32901 ),
32902 id: Schema.String,
32903 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
32904 }).annotate({
32905 title: "SleepThreadItem",
32906 description: "Display item emitted by the interruptible `clock.sleep` tool.",
2900332907 }),
29004 ),
29005 source: V2PluginReadResponse__PluginSource,
29006 version: Schema.optionalKey(
29007 Schema.Union([
29008 Schema.String.annotate({
29009 description: "Version advertised by the remote marketplace backend when available.",
32908 Schema.Struct({
32909 id: Schema.String,
32910 result: Schema.String,
32911 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
32912 savedPath: Schema.optionalKey(
32913 Schema.Union([V2TurnStartedNotification__AbsolutePathBuf, Schema.Null]),
32914 ),
32915 status: Schema.String,
32916 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
32917 }).annotate({ title: "ImageGenerationThreadItem" }),
32918 Schema.Struct({
32919 id: Schema.String,
32920 review: Schema.String,
32921 type: Schema.Literal("enteredReviewMode").annotate({
32922 title: "EnteredReviewModeThreadItemType",
2901032923 }),
29011 Schema.Null,
29012 ]),
29013 ),
29014});
29015
29016export type V2PluginShareListResponse__PluginSummary = {
29017 readonly authPolicy: V2PluginShareListResponse__PluginAuthPolicy;
29018 readonly availability?: "DISABLED_BY_ADMIN" | "AVAILABLE";
29019 readonly enabled: boolean;
29020 readonly id: string;
29021 readonly installPolicy: V2PluginShareListResponse__PluginInstallPolicy;
29022 readonly installPolicySource?: V2PluginShareListResponse__PluginInstallPolicySource | null;
29023 readonly installed: boolean;
29024 readonly interface?: V2PluginShareListResponse__PluginInterface | null;
29025 readonly keywords?: ReadonlyArray<string>;
29026 readonly localVersion?: string | null;
29027 readonly mustShowInstallationInterstitial?: boolean | null;
29028 readonly name: string;
29029 readonly remotePluginId?: string | null;
29030 readonly shareContext?: V2PluginShareListResponse__PluginShareContext | null;
29031 readonly source: V2PluginShareListResponse__PluginSource;
29032 readonly version?: string | null;
29033};
29034export const V2PluginShareListResponse__PluginSummary = Schema.Struct({
29035 authPolicy: V2PluginShareListResponse__PluginAuthPolicy,
29036 availability: Schema.optionalKey(
29037 Schema.Literals(["DISABLED_BY_ADMIN", "AVAILABLE"]).annotate({
29038 description: "Availability state for installing and using the plugin.",
29039 default: "AVAILABLE",
29040 }),
29041 ),
29042 enabled: Schema.Boolean,
29043 id: Schema.String,
29044 installPolicy: V2PluginShareListResponse__PluginInstallPolicy,
29045 installPolicySource: Schema.optionalKey(
29046 Schema.Union([V2PluginShareListResponse__PluginInstallPolicySource, Schema.Null]),
29047 ),
29048 installed: Schema.Boolean,
29049 interface: Schema.optionalKey(
29050 Schema.Union([V2PluginShareListResponse__PluginInterface, Schema.Null]),
29051 ),
29052 keywords: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
29053 localVersion: Schema.optionalKey(
29054 Schema.Union([
29055 Schema.String.annotate({
29056 description: "Version of the locally materialized plugin package when available.",
32924 }).annotate({ title: "EnteredReviewModeThreadItem" }),
32925 Schema.Struct({
32926 id: Schema.String,
32927 review: Schema.String,
32928 type: Schema.Literal("exitedReviewMode").annotate({
32929 title: "ExitedReviewModeThreadItemType",
2905732930 }),
29058 Schema.Null,
29059 ]),
29060 ),
29061 mustShowInstallationInterstitial: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
29062 name: Schema.String,
29063 remotePluginId: Schema.optionalKey(
29064 Schema.Union([
29065 Schema.String.annotate({ description: "Backend remote plugin identifier when available." }),
29066 Schema.Null,
29067 ]),
29068 ),
29069 shareContext: Schema.optionalKey(
29070 Schema.Union([V2PluginShareListResponse__PluginShareContext, Schema.Null]).annotate({
29071 description: "Remote sharing context associated with this plugin when available.",
29072 }),
29073 ),
29074 source: V2PluginShareListResponse__PluginSource,
29075 version: Schema.optionalKey(
29076 Schema.Union([
29077 Schema.String.annotate({
29078 description: "Version advertised by the remote marketplace backend when available.",
32931 }).annotate({ title: "ExitedReviewModeThreadItem" }),
32932 Schema.Struct({
32933 id: Schema.String,
32934 type: Schema.Literal("contextCompaction").annotate({
32935 title: "ContextCompactionThreadItemType",
2907932936 }),
29080 Schema.Null,
29081 ]),
29082 ),
29083});
32937 }).annotate({ title: "ContextCompactionThreadItem" }),
32938 ],
32939 { mode: "oneOf" },
32940).annotate({ identifier: "V2TurnStartedNotification__ThreadItem" });
2908432941
29085export type V2RawResponseItemCompletedNotification__ResponseItem =
32942export type V2TurnStartResponse__ThreadItem =
2908632943 | {
29087 readonly content: ReadonlyArray<V2RawResponseItemCompletedNotification__ContentItem>;
29088 readonly id?: string | null;
29089 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29090 readonly phase?: V2RawResponseItemCompletedNotification__MessagePhase | null;
29091 readonly role: string;
29092 readonly type: "message";
32944 readonly clientId?: string | null;
32945 readonly content: ReadonlyArray<V2TurnStartResponse__UserInput>;
32946 readonly id: string;
32947 readonly type: "userMessage";
2909332948 }
2909432949 | {
29095 readonly author: string;
29096 readonly content: ReadonlyArray<V2RawResponseItemCompletedNotification__AgentMessageInputContent>;
29097 readonly id?: string | null;
29098 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29099 readonly recipient: string;
29100 readonly type: "agent_message";
32950 readonly fragments: ReadonlyArray<V2TurnStartResponse__HookPromptFragment>;
32951 readonly id: string;
32952 readonly type: "hookPrompt";
2910132953 }
2910232954 | {
29103 readonly content?: ReadonlyArray<V2RawResponseItemCompletedNotification__ReasoningItemContent> | null;
29104 readonly encrypted_content?: string | null;
29105 readonly id?: string | null;
29106 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29107 readonly summary: ReadonlyArray<V2RawResponseItemCompletedNotification__ReasoningItemReasoningSummary>;
29108 readonly type: "reasoning";
32955 readonly id: string;
32956 readonly memoryCitation?: V2TurnStartResponse__MemoryCitation | null;
32957 readonly phase?: V2TurnStartResponse__MessagePhase | null;
32958 readonly text: string;
32959 readonly delivery?: "async" | null;
32960 readonly questions?: ReadonlyArray<{
32961 readonly title: string;
32962 readonly options?: ReadonlyArray<string> | null;
32963 }> | null;
32964 readonly type: "agentMessage";
2910932965 }
32966 | { readonly id: string; readonly text: string; readonly type: "plan" }
2911032967 | {
29111 readonly action: V2RawResponseItemCompletedNotification__LocalShellAction;
29112 readonly call_id?: string | null;
29113 readonly id?: string | null;
29114 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29115 readonly status: V2RawResponseItemCompletedNotification__LocalShellStatus;
29116 readonly type: "local_shell_call";
32968 readonly content?: ReadonlyArray<string>;
32969 readonly id: string;
32970 readonly summary?: ReadonlyArray<string>;
32971 readonly type: "reasoning";
2911732972 }
2911832973 | {
29119 readonly arguments: string;
29120 readonly call_id: string;
29121 readonly id?: string | null;
29122 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29123 readonly name: string;
29124 readonly namespace?: string | null;
29125 readonly type: "function_call";
32974 readonly aggregatedOutput?: string | null;
32975 readonly command: string;
32976 readonly commandActions: ReadonlyArray<V2TurnStartResponse__CommandAction>;
32977 readonly cwd: V2TurnStartResponse__LegacyAppPathString;
32978 readonly durationMs?: number | null;
32979 readonly exitCode?: number | null;
32980 readonly id: string;
32981 readonly processId?: string | null;
32982 readonly source?: V2TurnStartResponse__CommandExecutionSource;
32983 readonly status: V2TurnStartResponse__CommandExecutionStatus;
32984 readonly type: "commandExecution";
2912632985 }
2912732986 | {
29128 readonly arguments: unknown;
29129 readonly call_id?: string | null;
29130 readonly execution: string;
29131 readonly id?: string | null;
29132 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29133 readonly status?: string | null;
29134 readonly type: "tool_search_call";
32987 readonly changes: ReadonlyArray<V2TurnStartResponse__FileUpdateChange>;
32988 readonly id: string;
32989 readonly status: V2TurnStartResponse__PatchApplyStatus;
32990 readonly type: "fileChange";
2913532991 }
2913632992 | {
29137 readonly call_id: string;
29138 readonly id?: string | null;
29139 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29140 readonly output: V2RawResponseItemCompletedNotification__FunctionCallOutputBody;
29141 readonly type: "function_call_output";
32993 readonly appContext?: V2TurnStartResponse__McpToolCallAppContext | null;
32994 readonly arguments: Schema.Json;
32995 readonly durationMs?: number | null;
32996 readonly error?: V2TurnStartResponse__McpToolCallError | null;
32997 readonly id: string;
32998 readonly mcpAppResourceUri?: string | null;
32999 readonly pluginId?: string | null;
33000 readonly result?: V2TurnStartResponse__McpToolCallResult | null;
33001 readonly server: string;
33002 readonly status: V2TurnStartResponse__McpToolCallStatus;
33003 readonly tool: string;
33004 readonly type: "mcpToolCall";
2914233005 }
2914333006 | {
29144 readonly call_id: string;
29145 readonly id?: string | null;
29146 readonly input: string;
29147 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29148 readonly name: string;
33007 readonly arguments: Schema.Json;
33008 readonly contentItems?: ReadonlyArray<V2TurnStartResponse__DynamicToolCallOutputContentItem> | null;
33009 readonly durationMs?: number | null;
33010 readonly id: string;
2914933011 readonly namespace?: string | null;
29150 readonly status?: string | null;
29151 readonly type: "custom_tool_call";
29152 }
29153 | {
29154 readonly call_id: string;
29155 readonly id?: string | null;
29156 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29157 readonly name?: string | null;
29158 readonly output: V2RawResponseItemCompletedNotification__FunctionCallOutputBody;
29159 readonly type: "custom_tool_call_output";
33012 readonly status: V2TurnStartResponse__DynamicToolCallStatus;
33013 readonly success?: boolean | null;
33014 readonly tool: string;
33015 readonly type: "dynamicToolCall";
2916033016 }
2916133017 | {
29162 readonly call_id?: string | null;
29163 readonly execution: string;
29164 readonly id?: string | null;
29165 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29166 readonly status: string;
29167 readonly tools: ReadonlyArray<unknown>;
29168 readonly type: "tool_search_output";
33018 readonly agentsStates: { readonly [x: string]: V2TurnStartResponse__CollabAgentState };
33019 readonly id: string;
33020 readonly model?: string | null;
33021 readonly prompt?: string | null;
33022 readonly reasoningEffort?: V2TurnStartResponse__ReasoningEffort | null;
33023 readonly receiverThreadIds: ReadonlyArray<string>;
33024 readonly senderThreadId: string;
33025 readonly status: V2TurnStartResponse__CollabAgentToolCallStatus;
33026 readonly tool: V2TurnStartResponse__CollabAgentTool;
33027 readonly type: "collabAgentToolCall";
2916933028 }
2917033029 | {
29171 readonly action?: V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction | null;
29172 readonly id?: string | null;
29173 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29174 readonly status?: string | null;
29175 readonly type: "web_search_call";
33030 readonly agentPath: string;
33031 readonly agentThreadId: string;
33032 readonly id: string;
33033 readonly kind: V2TurnStartResponse__SubAgentActivityKind;
33034 readonly type: "subAgentActivity";
2917633035 }
2917733036 | {
29178 readonly id?: string | null;
29179 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29180 readonly result: string;
29181 readonly revised_prompt?: string | null;
29182 readonly status: string;
29183 readonly type: "image_generation_call";
33037 readonly action?: V2TurnStartResponse__WebSearchAction | null;
33038 readonly id: string;
33039 readonly query: string;
33040 readonly results?: ReadonlyArray<Schema.Json> | null;
33041 readonly type: "webSearch";
2918433042 }
2918533043 | {
29186 readonly encrypted_content: string;
29187 readonly id?: string | null;
29188 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29189 readonly type: "compaction";
33044 readonly id: string;
33045 readonly path: V2TurnStartResponse__LegacyAppPathString;
33046 readonly type: "imageView";
2919033047 }
29191 | { readonly type: "compaction_trigger" }
33048 | { readonly durationMs: number; readonly id: string; readonly type: "sleep" }
2919233049 | {
29193 readonly encrypted_content?: string | null;
29194 readonly id?: string | null;
29195 readonly internal_chat_message_metadata_passthrough?: V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough | null;
29196 readonly type: "context_compaction";
33050 readonly id: string;
33051 readonly result: string;
33052 readonly revisedPrompt?: string | null;
33053 readonly savedPath?: V2TurnStartResponse__AbsolutePathBuf | null;
33054 readonly status: string;
33055 readonly type: "imageGeneration";
2919733056 }
29198 | { readonly type: "other" };
29199export const V2RawResponseItemCompletedNotification__ResponseItem = Schema.Union(
33057 | { readonly id: string; readonly review: string; readonly type: "enteredReviewMode" }
33058 | { readonly id: string; readonly review: string; readonly type: "exitedReviewMode" }
33059 | { readonly id: string; readonly type: "contextCompaction" };
33060export const V2TurnStartResponse__ThreadItem = Schema.Union(
2920033061 [
2920133062 Schema.Struct({
29202 content: Schema.Array(V2RawResponseItemCompletedNotification__ContentItem),
29203 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29204 internal_chat_message_metadata_passthrough: Schema.optionalKey(
29205 Schema.Union([
29206 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
29207 Schema.Null,
29208 ]),
29209 ),
29210 phase: Schema.optionalKey(
29211 Schema.Union([V2RawResponseItemCompletedNotification__MessagePhase, Schema.Null]),
29212 ),
29213 role: Schema.String,
29214 type: Schema.Literal("message").annotate({ title: "MessageResponseItemType" }),
29215 }).annotate({ title: "MessageResponseItem" }),
33063 clientId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
33064 content: Schema.Array(V2TurnStartResponse__UserInput),
33065 id: Schema.String,
33066 type: Schema.Literal("userMessage").annotate({ title: "UserMessageThreadItemType" }),
33067 }).annotate({ title: "UserMessageThreadItem" }),
33068 Schema.Struct({
33069 fragments: Schema.Array(V2TurnStartResponse__HookPromptFragment),
33070 id: Schema.String,
33071 type: Schema.Literal("hookPrompt").annotate({ title: "HookPromptThreadItemType" }),
33072 }).annotate({ title: "HookPromptThreadItem" }),
2921633073 Schema.Struct({
29217 author: Schema.String,
29218 content: Schema.Array(V2RawResponseItemCompletedNotification__AgentMessageInputContent),
29219 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29220 internal_chat_message_metadata_passthrough: Schema.optionalKey(
33074 id: Schema.String,
33075 memoryCitation: Schema.optionalKey(
33076 Schema.Union([V2TurnStartResponse__MemoryCitation, Schema.Null]),
33077 ),
33078 phase: Schema.optionalKey(Schema.Union([V2TurnStartResponse__MessagePhase, Schema.Null])),
33079 text: Schema.String,
33080 delivery: Schema.optionalKey(Schema.Union([Schema.Literal("async"), Schema.Null])),
33081 questions: Schema.optionalKey(
2922133082 Schema.Union([
29222 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
33083 Schema.Array(
33084 Schema.Struct({
33085 title: Schema.String,
33086 options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
33087 }),
33088 ),
2922333089 Schema.Null,
2922433090 ]),
2922533091 ),
29226 recipient: Schema.String,
29227 type: Schema.Literal("agent_message").annotate({ title: "AgentMessageResponseItemType" }),
29228 }).annotate({ title: "AgentMessageResponseItem" }),
33092 type: Schema.Literal("agentMessage").annotate({ title: "AgentMessageThreadItemType" }),
33093 }).annotate({ title: "AgentMessageThreadItem" }),
2922933094 Schema.Struct({
29230 content: Schema.optionalKey(
33095 id: Schema.String,
33096 text: Schema.String,
33097 type: Schema.Literal("plan").annotate({ title: "PlanThreadItemType" }),
33098 }).annotate({
33099 title: "PlanThreadItem",
33100 description:
33101 "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
33102 }),
33103 Schema.Struct({
33104 content: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
33105 id: Schema.String,
33106 summary: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
33107 type: Schema.Literal("reasoning").annotate({ title: "ReasoningThreadItemType" }),
33108 }).annotate({ title: "ReasoningThreadItem" }),
33109 Schema.Struct({
33110 aggregatedOutput: Schema.optionalKey(
2923133111 Schema.Union([
29232 Schema.Array(V2RawResponseItemCompletedNotification__ReasoningItemContent),
33112 Schema.String.annotate({
33113 description: "The command's output, aggregated from stdout and stderr.",
33114 }),
2923333115 Schema.Null,
2923433116 ]),
2923533117 ),
29236 encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29237 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29238 internal_chat_message_metadata_passthrough: Schema.optionalKey(
33118 command: Schema.String.annotate({ description: "The command to be executed." }),
33119 commandActions: Schema.Array(V2TurnStartResponse__CommandAction).annotate({
33120 description:
33121 "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.",
33122 }),
33123 cwd: Schema.suspend(
33124 (): Schema.Codec<V2TurnStartResponse__LegacyAppPathString> =>
33125 V2TurnStartResponse__LegacyAppPathString,
33126 ).annotate({ description: "The command's working directory." }),
33127 durationMs: Schema.optionalKey(
2923933128 Schema.Union([
29240 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
33129 Schema.Number.annotate({
33130 description: "The duration of the command execution in milliseconds.",
33131 format: "int64",
33132 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2924133133 Schema.Null,
2924233134 ]),
2924333135 ),
29244 summary: Schema.Array(V2RawResponseItemCompletedNotification__ReasoningItemReasoningSummary),
29245 type: Schema.Literal("reasoning").annotate({ title: "ReasoningResponseItemType" }),
29246 }).annotate({ title: "ReasoningResponseItem" }),
29247 Schema.Struct({
29248 action: V2RawResponseItemCompletedNotification__LocalShellAction,
29249 call_id: Schema.optionalKey(
33136 exitCode: Schema.optionalKey(
2925033137 Schema.Union([
29251 Schema.String.annotate({ description: "Set when using the Responses API." }),
33138 Schema.Number.annotate({
33139 description: "The command's exit code.",
33140 format: "int32",
33141 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2925233142 Schema.Null,
2925333143 ]),
2925433144 ),
29255 id: Schema.optionalKey(
33145 id: Schema.String,
33146 processId: Schema.optionalKey(
2925633147 Schema.Union([
2925733148 Schema.String.annotate({
29258 description: "Legacy id field retained for compatibility with older payloads.",
33149 description: "Identifier for the underlying PTY process (when available).",
2925933150 }),
2926033151 Schema.Null,
2926133152 ]),
2926233153 ),
29263 internal_chat_message_metadata_passthrough: Schema.optionalKey(
29264 Schema.Union([
29265 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
29266 Schema.Null,
29267 ]),
33154 source: Schema.optionalKey(
33155 Schema.suspend(
33156 (): Schema.Codec<V2TurnStartResponse__CommandExecutionSource> =>
33157 V2TurnStartResponse__CommandExecutionSource,
33158 ).annotate({ default: "agent" }),
2926833159 ),
29269 status: V2RawResponseItemCompletedNotification__LocalShellStatus,
29270 type: Schema.Literal("local_shell_call").annotate({
29271 title: "LocalShellCallResponseItemType",
33160 status: V2TurnStartResponse__CommandExecutionStatus,
33161 type: Schema.Literal("commandExecution").annotate({
33162 title: "CommandExecutionThreadItemType",
2927233163 }),
29273 }).annotate({ title: "LocalShellCallResponseItem" }),
33164 }).annotate({ title: "CommandExecutionThreadItem" }),
2927433165 Schema.Struct({
29275 arguments: Schema.String,
29276 call_id: Schema.String,
29277 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29278 internal_chat_message_metadata_passthrough: Schema.optionalKey(
33166 changes: Schema.Array(V2TurnStartResponse__FileUpdateChange),
33167 id: Schema.String,
33168 status: V2TurnStartResponse__PatchApplyStatus,
33169 type: Schema.Literal("fileChange").annotate({ title: "FileChangeThreadItemType" }),
33170 }).annotate({ title: "FileChangeThreadItem" }),
33171 Schema.Struct({
33172 appContext: Schema.optionalKey(
33173 Schema.Union([V2TurnStartResponse__McpToolCallAppContext, Schema.Null]),
33174 ),
33175 arguments: Schema.Json.annotate({ expected: "JSON value" }),
33176 durationMs: Schema.optionalKey(
2927933177 Schema.Union([
29280 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
33178 Schema.Number.annotate({
33179 description: "The duration of the MCP tool call in milliseconds.",
33180 format: "int64",
33181 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2928133182 Schema.Null,
2928233183 ]),
2928333184 ),
29284 name: Schema.String,
29285 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29286 type: Schema.Literal("function_call").annotate({ title: "FunctionCallResponseItemType" }),
29287 }).annotate({ title: "FunctionCallResponseItem" }),
29288 Schema.Struct({
29289 arguments: Schema.Unknown,
29290 call_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29291 execution: Schema.String,
29292 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29293 internal_chat_message_metadata_passthrough: Schema.optionalKey(
33185 error: Schema.optionalKey(Schema.Union([V2TurnStartResponse__McpToolCallError, Schema.Null])),
33186 id: Schema.String,
33187 mcpAppResourceUri: Schema.optionalKey(
2929433188 Schema.Union([
29295 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
33189 Schema.String.annotate({
33190 description: "Deprecated: use `appContext.resourceUri` instead.",
33191 }),
2929633192 Schema.Null,
2929733193 ]),
2929833194 ),
29299 status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29300 type: Schema.Literal("tool_search_call").annotate({
29301 title: "ToolSearchCallResponseItemType",
29302 }),
29303 }).annotate({ title: "ToolSearchCallResponseItem" }),
33195 pluginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
33196 result: Schema.optionalKey(
33197 Schema.Union([V2TurnStartResponse__McpToolCallResult, Schema.Null]),
33198 ),
33199 server: Schema.String,
33200 status: V2TurnStartResponse__McpToolCallStatus,
33201 tool: Schema.String,
33202 type: Schema.Literal("mcpToolCall").annotate({ title: "McpToolCallThreadItemType" }),
33203 }).annotate({ title: "McpToolCallThreadItem" }),
2930433204 Schema.Struct({
29305 call_id: Schema.String,
29306 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29307 internal_chat_message_metadata_passthrough: Schema.optionalKey(
33205 arguments: Schema.Json.annotate({ expected: "JSON value" }),
33206 contentItems: Schema.optionalKey(
2930833207 Schema.Union([
29309 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
33208 Schema.Array(V2TurnStartResponse__DynamicToolCallOutputContentItem),
2931033209 Schema.Null,
2931133210 ]),
2931233211 ),
29313 output: V2RawResponseItemCompletedNotification__FunctionCallOutputBody,
29314 type: Schema.Literal("function_call_output").annotate({
29315 title: "FunctionCallOutputResponseItemType",
29316 }),
29317 }).annotate({ title: "FunctionCallOutputResponseItem" }),
29318 Schema.Struct({
29319 call_id: Schema.String,
29320 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29321 input: Schema.String,
29322 internal_chat_message_metadata_passthrough: Schema.optionalKey(
33212 durationMs: Schema.optionalKey(
2932333213 Schema.Union([
29324 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
33214 Schema.Number.annotate({
33215 description: "The duration of the dynamic tool call in milliseconds.",
33216 format: "int64",
33217 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2932533218 Schema.Null,
2932633219 ]),
2932733220 ),
29328 name: Schema.String,
33221 id: Schema.String,
2932933222 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29330 status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29331 type: Schema.Literal("custom_tool_call").annotate({
29332 title: "CustomToolCallResponseItemType",
29333 }),
29334 }).annotate({ title: "CustomToolCallResponseItem" }),
33223 status: V2TurnStartResponse__DynamicToolCallStatus,
33224 success: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
33225 tool: Schema.String,
33226 type: Schema.Literal("dynamicToolCall").annotate({ title: "DynamicToolCallThreadItemType" }),
33227 }).annotate({ title: "DynamicToolCallThreadItem" }),
2933533228 Schema.Struct({
29336 call_id: Schema.String,
29337 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29338 internal_chat_message_metadata_passthrough: Schema.optionalKey(
33229 agentsStates: Schema.Record(Schema.String, V2TurnStartResponse__CollabAgentState).annotate({
33230 description: "Last known status of the target agents, when available.",
33231 }),
33232 id: Schema.String.annotate({ description: "Unique identifier for this collab tool call." }),
33233 model: Schema.optionalKey(
2933933234 Schema.Union([
29340 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
33235 Schema.String.annotate({
33236 description: "Model requested for the spawned agent, when applicable.",
33237 }),
2934133238 Schema.Null,
2934233239 ]),
2934333240 ),
29344 name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29345 output: V2RawResponseItemCompletedNotification__FunctionCallOutputBody,
29346 type: Schema.Literal("custom_tool_call_output").annotate({
29347 title: "CustomToolCallOutputResponseItemType",
33241 prompt: Schema.optionalKey(
33242 Schema.Union([
33243 Schema.String.annotate({
33244 description: "Prompt text sent as part of the collab tool call, when available.",
33245 }),
33246 Schema.Null,
33247 ]),
33248 ),
33249 reasoningEffort: Schema.optionalKey(
33250 Schema.Union([V2TurnStartResponse__ReasoningEffort, Schema.Null]).annotate({
33251 description: "Reasoning effort requested for the spawned agent, when applicable.",
33252 }),
33253 ),
33254 receiverThreadIds: Schema.Array(Schema.String).annotate({
33255 description:
33256 "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
2934833257 }),
29349 }).annotate({ title: "CustomToolCallOutputResponseItem" }),
33258 senderThreadId: Schema.String.annotate({
33259 description: "Thread ID of the agent issuing the collab request.",
33260 }),
33261 status: Schema.suspend(
33262 (): Schema.Codec<V2TurnStartResponse__CollabAgentToolCallStatus> =>
33263 V2TurnStartResponse__CollabAgentToolCallStatus,
33264 ).annotate({ description: "Current status of the collab tool call." }),
33265 tool: Schema.suspend(
33266 (): Schema.Codec<V2TurnStartResponse__CollabAgentTool> =>
33267 V2TurnStartResponse__CollabAgentTool,
33268 ).annotate({ description: "Name of the collab tool that was invoked." }),
33269 type: Schema.Literal("collabAgentToolCall").annotate({
33270 title: "CollabAgentToolCallThreadItemType",
33271 }),
33272 }).annotate({ title: "CollabAgentToolCallThreadItem" }),
2935033273 Schema.Struct({
29351 call_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29352 execution: Schema.String,
29353 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29354 internal_chat_message_metadata_passthrough: Schema.optionalKey(
33274 agentPath: Schema.String,
33275 agentThreadId: Schema.String,
33276 id: Schema.String,
33277 kind: V2TurnStartResponse__SubAgentActivityKind,
33278 type: Schema.Literal("subAgentActivity").annotate({
33279 title: "SubAgentActivityThreadItemType",
33280 }),
33281 }).annotate({ title: "SubAgentActivityThreadItem" }),
33282 Schema.Struct({
33283 action: Schema.optionalKey(Schema.Union([V2TurnStartResponse__WebSearchAction, Schema.Null])),
33284 id: Schema.String,
33285 query: Schema.String,
33286 results: Schema.optionalKey(
2935533287 Schema.Union([
29356 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
33288 Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
33289 description:
33290 "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.",
33291 }),
2935733292 Schema.Null,
2935833293 ]),
2935933294 ),
33295 type: Schema.Literal("webSearch").annotate({ title: "WebSearchThreadItemType" }),
33296 }).annotate({ title: "WebSearchThreadItem" }),
33297 Schema.Struct({
33298 id: Schema.String,
33299 path: V2TurnStartResponse__LegacyAppPathString,
33300 type: Schema.Literal("imageView").annotate({ title: "ImageViewThreadItemType" }),
33301 }).annotate({ title: "ImageViewThreadItem" }),
33302 Schema.Struct({
33303 durationMs: Schema.Number.annotate({ format: "uint64" })
33304 .check(Schema.isInt().annotate({ expected: "an integer" }))
33305 .check(
33306 Schema.isGreaterThanOrEqualTo(0).annotate({
33307 expected: "a value greater than or equal to 0",
33308 }),
33309 ),
33310 id: Schema.String,
33311 type: Schema.Literal("sleep").annotate({ title: "SleepThreadItemType" }),
33312 }).annotate({
33313 title: "SleepThreadItem",
33314 description: "Display item emitted by the interruptible `clock.sleep` tool.",
33315 }),
33316 Schema.Struct({
33317 id: Schema.String,
33318 result: Schema.String,
33319 revisedPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
33320 savedPath: Schema.optionalKey(
33321 Schema.Union([V2TurnStartResponse__AbsolutePathBuf, Schema.Null]),
33322 ),
2936033323 status: Schema.String,
29361 tools: Schema.Array(Schema.Unknown),
29362 type: Schema.Literal("tool_search_output").annotate({
29363 title: "ToolSearchOutputResponseItemType",
33324 type: Schema.Literal("imageGeneration").annotate({ title: "ImageGenerationThreadItemType" }),
33325 }).annotate({ title: "ImageGenerationThreadItem" }),
33326 Schema.Struct({
33327 id: Schema.String,
33328 review: Schema.String,
33329 type: Schema.Literal("enteredReviewMode").annotate({
33330 title: "EnteredReviewModeThreadItemType",
33331 }),
33332 }).annotate({ title: "EnteredReviewModeThreadItem" }),
33333 Schema.Struct({
33334 id: Schema.String,
33335 review: Schema.String,
33336 type: Schema.Literal("exitedReviewMode").annotate({
33337 title: "ExitedReviewModeThreadItemType",
33338 }),
33339 }).annotate({ title: "ExitedReviewModeThreadItem" }),
33340 Schema.Struct({
33341 id: Schema.String,
33342 type: Schema.Literal("contextCompaction").annotate({
33343 title: "ContextCompactionThreadItemType",
33344 }),
33345 }).annotate({ title: "ContextCompactionThreadItem" }),
33346 ],
33347 { mode: "oneOf" },
33348).annotate({ identifier: "V2TurnStartResponse__ThreadItem" });
33349
33350export type CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions = {
33351 readonly entries?: ReadonlyArray<CommandExecutionRequestApprovalParams__FileSystemSandboxEntry> | null;
33352 readonly globScanMaxDepth?: number | null;
33353 readonly read?: ReadonlyArray<CommandExecutionRequestApprovalParams__LegacyAppPathString> | null;
33354 readonly write?: ReadonlyArray<CommandExecutionRequestApprovalParams__LegacyAppPathString> | null;
33355};
33356export const CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions = Schema.Struct(
33357 {
33358 entries: Schema.optionalKey(
33359 Schema.Union([
33360 Schema.Array(CommandExecutionRequestApprovalParams__FileSystemSandboxEntry),
33361 Schema.Null,
33362 ]),
33363 ),
33364 globScanMaxDepth: Schema.optionalKey(
33365 Schema.Union([
33366 Schema.Number.annotate({ format: "uint" })
33367 .check(Schema.isInt().annotate({ expected: "an integer" }))
33368 .check(
33369 Schema.isGreaterThanOrEqualTo(1).annotate({
33370 expected: "a value greater than or equal to 1",
33371 }),
33372 ),
33373 Schema.Null,
33374 ]),
33375 ),
33376 read: Schema.optionalKey(
33377 Schema.Union([
33378 Schema.Array(CommandExecutionRequestApprovalParams__LegacyAppPathString).annotate({
33379 description: "This will be removed in favor of `entries`.",
33380 }),
33381 Schema.Null,
33382 ]),
33383 ),
33384 write: Schema.optionalKey(
33385 Schema.Union([
33386 Schema.Array(CommandExecutionRequestApprovalParams__LegacyAppPathString).annotate({
33387 description: "This will be removed in favor of `entries`.",
33388 }),
33389 Schema.Null,
33390 ]),
33391 ),
33392 },
33393).annotate({
33394 identifier: "CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions",
33395});
33396
33397export type McpServerElicitationRequestParams__McpElicitationEnumSchema =
33398 | McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSchema
33399 | McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema
33400 | McpServerElicitationRequestParams__McpElicitationLegacyTitledEnumSchema;
33401export const McpServerElicitationRequestParams__McpElicitationEnumSchema = Schema.Union([
33402 McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSchema,
33403 McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema,
33404 McpServerElicitationRequestParams__McpElicitationLegacyTitledEnumSchema,
33405]).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationEnumSchema" });
33406
33407export type PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = {
33408 readonly entries?: ReadonlyArray<PermissionsRequestApprovalParams__FileSystemSandboxEntry> | null;
33409 readonly globScanMaxDepth?: number | null;
33410 readonly read?: ReadonlyArray<PermissionsRequestApprovalParams__LegacyAppPathString> | null;
33411 readonly write?: ReadonlyArray<PermissionsRequestApprovalParams__LegacyAppPathString> | null;
33412};
33413export const PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = Schema.Struct({
33414 entries: Schema.optionalKey(
33415 Schema.Union([
33416 Schema.Array(PermissionsRequestApprovalParams__FileSystemSandboxEntry),
33417 Schema.Null,
33418 ]),
33419 ),
33420 globScanMaxDepth: Schema.optionalKey(
33421 Schema.Union([
33422 Schema.Number.annotate({ format: "uint" })
33423 .check(Schema.isInt().annotate({ expected: "an integer" }))
33424 .check(
33425 Schema.isGreaterThanOrEqualTo(1).annotate({
33426 expected: "a value greater than or equal to 1",
33427 }),
33428 ),
33429 Schema.Null,
33430 ]),
33431 ),
33432 read: Schema.optionalKey(
33433 Schema.Union([
33434 Schema.Array(PermissionsRequestApprovalParams__LegacyAppPathString).annotate({
33435 description: "This will be removed in favor of `entries`.",
33436 }),
33437 Schema.Null,
33438 ]),
33439 ),
33440 write: Schema.optionalKey(
33441 Schema.Union([
33442 Schema.Array(PermissionsRequestApprovalParams__LegacyAppPathString).annotate({
33443 description: "This will be removed in favor of `entries`.",
33444 }),
33445 Schema.Null,
33446 ]),
33447 ),
33448}).annotate({ identifier: "PermissionsRequestApprovalParams__AdditionalFileSystemPermissions" });
33449
33450export type PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions = {
33451 readonly entries?: ReadonlyArray<PermissionsRequestApprovalResponse__FileSystemSandboxEntry> | null;
33452 readonly globScanMaxDepth?: number | null;
33453 readonly read?: ReadonlyArray<PermissionsRequestApprovalResponse__LegacyAppPathString> | null;
33454 readonly write?: ReadonlyArray<PermissionsRequestApprovalResponse__LegacyAppPathString> | null;
33455};
33456export const PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions = Schema.Struct({
33457 entries: Schema.optionalKey(
33458 Schema.Union([
33459 Schema.Array(PermissionsRequestApprovalResponse__FileSystemSandboxEntry),
33460 Schema.Null,
33461 ]),
33462 ),
33463 globScanMaxDepth: Schema.optionalKey(
33464 Schema.Union([
33465 Schema.Number.annotate({ format: "uint" })
33466 .check(Schema.isInt().annotate({ expected: "an integer" }))
33467 .check(
33468 Schema.isGreaterThanOrEqualTo(1).annotate({
33469 expected: "a value greater than or equal to 1",
33470 }),
33471 ),
33472 Schema.Null,
33473 ]),
33474 ),
33475 read: Schema.optionalKey(
33476 Schema.Union([
33477 Schema.Array(PermissionsRequestApprovalResponse__LegacyAppPathString).annotate({
33478 description: "This will be removed in favor of `entries`.",
33479 }),
33480 Schema.Null,
33481 ]),
33482 ),
33483 write: Schema.optionalKey(
33484 Schema.Union([
33485 Schema.Array(PermissionsRequestApprovalResponse__LegacyAppPathString).annotate({
33486 description: "This will be removed in favor of `entries`.",
33487 }),
33488 Schema.Null,
33489 ]),
33490 ),
33491}).annotate({ identifier: "PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions" });
33492
33493export type ServerNotification__Turn = {
33494 readonly completedAt?: number | null;
33495 readonly durationMs?: number | null;
33496 readonly error?: ServerNotification__TurnError | null;
33497 readonly id: string;
33498 readonly items: ReadonlyArray<ServerNotification__ThreadItem>;
33499 readonly itemsView?: ServerNotification__TurnItemsView;
33500 readonly startedAt?: number | null;
33501 readonly status: ServerNotification__TurnStatus;
33502};
33503export const ServerNotification__Turn = Schema.Struct({
33504 completedAt: Schema.optionalKey(
33505 Schema.Union([
33506 Schema.Number.annotate({
33507 description: "Unix timestamp (in seconds) when the turn completed.",
33508 format: "int64",
33509 }).check(Schema.isInt().annotate({ expected: "an integer" })),
33510 Schema.Null,
33511 ]),
33512 ),
33513 durationMs: Schema.optionalKey(
33514 Schema.Union([
33515 Schema.Number.annotate({
33516 description: "Duration between turn start and completion in milliseconds, if known.",
33517 format: "int64",
33518 }).check(Schema.isInt().annotate({ expected: "an integer" })),
33519 Schema.Null,
33520 ]),
33521 ),
33522 error: Schema.optionalKey(
33523 Schema.Union([ServerNotification__TurnError, Schema.Null]).annotate({
33524 description: "Only populated when the Turn's status is failed.",
33525 }),
33526 ),
33527 id: Schema.String.annotate({
33528 description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
33529 }),
33530 items: Schema.Array(ServerNotification__ThreadItem).annotate({
33531 description: "Thread items currently included in this turn payload.",
33532 }),
33533 itemsView: Schema.optionalKey(
33534 Schema.suspend(
33535 (): Schema.Codec<ServerNotification__TurnItemsView> => ServerNotification__TurnItemsView,
33536 ).annotate({
33537 description: "Describes how much of `items` has been loaded for this turn.",
33538 default: "full",
33539 }),
33540 ),
33541 startedAt: Schema.optionalKey(
33542 Schema.Union([
33543 Schema.Number.annotate({
33544 description: "Unix timestamp (in seconds) when the turn started.",
33545 format: "int64",
33546 }).check(Schema.isInt().annotate({ expected: "an integer" })),
33547 Schema.Null,
33548 ]),
33549 ),
33550 status: ServerNotification__TurnStatus,
33551}).annotate({ identifier: "ServerNotification__Turn" });
33552
33553export type ServerNotification__ItemStartedNotification = {
33554 readonly item: ServerNotification__ThreadItem;
33555 readonly startedAtMs: number;
33556 readonly threadId: string;
33557 readonly turnId: string;
33558};
33559export const ServerNotification__ItemStartedNotification = Schema.Struct({
33560 item: ServerNotification__ThreadItem,
33561 startedAtMs: Schema.Number.annotate({
33562 description: "Unix timestamp (in milliseconds) when this item lifecycle started.",
33563 format: "int64",
33564 }).check(Schema.isInt().annotate({ expected: "an integer" })),
33565 threadId: Schema.String,
33566 turnId: Schema.String,
33567}).annotate({ identifier: "ServerNotification__ItemStartedNotification" });
33568
33569export type ServerNotification__ItemCompletedNotification = {
33570 readonly completedAtMs: number;
33571 readonly item: ServerNotification__ThreadItem;
33572 readonly threadId: string;
33573 readonly turnId: string;
33574};
33575export const ServerNotification__ItemCompletedNotification = Schema.Struct({
33576 completedAtMs: Schema.Number.annotate({
33577 description: "Unix timestamp (in milliseconds) when this item lifecycle completed.",
33578 format: "int64",
33579 }).check(Schema.isInt().annotate({ expected: "an integer" })),
33580 item: ServerNotification__ThreadItem,
33581 threadId: Schema.String,
33582 turnId: Schema.String,
33583}).annotate({ identifier: "ServerNotification__ItemCompletedNotification" });
33584
33585export type ServerNotification__AdditionalFileSystemPermissions = {
33586 readonly entries?: ReadonlyArray<ServerNotification__FileSystemSandboxEntry> | null;
33587 readonly globScanMaxDepth?: number | null;
33588 readonly read?: ReadonlyArray<ServerNotification__LegacyAppPathString> | null;
33589 readonly write?: ReadonlyArray<ServerNotification__LegacyAppPathString> | null;
33590};
33591export const ServerNotification__AdditionalFileSystemPermissions = Schema.Struct({
33592 entries: Schema.optionalKey(
33593 Schema.Union([Schema.Array(ServerNotification__FileSystemSandboxEntry), Schema.Null]),
33594 ),
33595 globScanMaxDepth: Schema.optionalKey(
33596 Schema.Union([
33597 Schema.Number.annotate({ format: "uint" })
33598 .check(Schema.isInt().annotate({ expected: "an integer" }))
33599 .check(
33600 Schema.isGreaterThanOrEqualTo(1).annotate({
33601 expected: "a value greater than or equal to 1",
33602 }),
33603 ),
33604 Schema.Null,
33605 ]),
33606 ),
33607 read: Schema.optionalKey(
33608 Schema.Union([
33609 Schema.Array(ServerNotification__LegacyAppPathString).annotate({
33610 description: "This will be removed in favor of `entries`.",
2936433611 }),
29365 }).annotate({ title: "ToolSearchOutputResponseItem" }),
29366 Schema.Struct({
29367 action: Schema.optionalKey(
29368 Schema.Union([
29369 V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction,
29370 Schema.Null,
29371 ]),
29372 ),
29373 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29374 internal_chat_message_metadata_passthrough: Schema.optionalKey(
29375 Schema.Union([
29376 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
29377 Schema.Null,
29378 ]),
29379 ),
29380 status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29381 type: Schema.Literal("web_search_call").annotate({ title: "WebSearchCallResponseItemType" }),
29382 }).annotate({ title: "WebSearchCallResponseItem" }),
29383 Schema.Struct({
29384 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29385 internal_chat_message_metadata_passthrough: Schema.optionalKey(
29386 Schema.Union([
29387 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
29388 Schema.Null,
29389 ]),
29390 ),
29391 result: Schema.String,
29392 revised_prompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29393 status: Schema.String,
29394 type: Schema.Literal("image_generation_call").annotate({
29395 title: "ImageGenerationCallResponseItemType",
33612 Schema.Null,
33613 ]),
33614 ),
33615 write: Schema.optionalKey(
33616 Schema.Union([
33617 Schema.Array(ServerNotification__LegacyAppPathString).annotate({
33618 description: "This will be removed in favor of `entries`.",
2939633619 }),
29397 }).annotate({ title: "ImageGenerationCallResponseItem" }),
29398 Schema.Struct({
29399 encrypted_content: Schema.String,
29400 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29401 internal_chat_message_metadata_passthrough: Schema.optionalKey(
29402 Schema.Union([
29403 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
29404 Schema.Null,
29405 ]),
29406 ),
29407 type: Schema.Literal("compaction").annotate({ title: "CompactionResponseItemType" }),
29408 }).annotate({ title: "CompactionResponseItem" }),
29409 Schema.Struct({
29410 type: Schema.Literal("compaction_trigger").annotate({
29411 title: "CompactionTriggerResponseItemType",
33620 Schema.Null,
33621 ]),
33622 ),
33623}).annotate({ identifier: "ServerNotification__AdditionalFileSystemPermissions" });
33624
33625export type ServerNotification__ThreadSettingsUpdatedNotification = {
33626 readonly threadId: string;
33627 readonly threadSettings: ServerNotification__ThreadSettings;
33628};
33629export const ServerNotification__ThreadSettingsUpdatedNotification = Schema.Struct({
33630 threadId: Schema.String,
33631 threadSettings: ServerNotification__ThreadSettings,
33632}).annotate({ identifier: "ServerNotification__ThreadSettingsUpdatedNotification" });
33633
33634export type ServerRequest__AdditionalFileSystemPermissions = {
33635 readonly entries?: ReadonlyArray<ServerRequest__FileSystemSandboxEntry> | null;
33636 readonly globScanMaxDepth?: number | null;
33637 readonly read?: ReadonlyArray<ServerRequest__LegacyAppPathString> | null;
33638 readonly write?: ReadonlyArray<ServerRequest__LegacyAppPathString> | null;
33639};
33640export const ServerRequest__AdditionalFileSystemPermissions = Schema.Struct({
33641 entries: Schema.optionalKey(
33642 Schema.Union([Schema.Array(ServerRequest__FileSystemSandboxEntry), Schema.Null]),
33643 ),
33644 globScanMaxDepth: Schema.optionalKey(
33645 Schema.Union([
33646 Schema.Number.annotate({ format: "uint" })
33647 .check(Schema.isInt().annotate({ expected: "an integer" }))
33648 .check(
33649 Schema.isGreaterThanOrEqualTo(1).annotate({
33650 expected: "a value greater than or equal to 1",
33651 }),
33652 ),
33653 Schema.Null,
33654 ]),
33655 ),
33656 read: Schema.optionalKey(
33657 Schema.Union([
33658 Schema.Array(ServerRequest__LegacyAppPathString).annotate({
33659 description: "This will be removed in favor of `entries`.",
2941233660 }),
29413 }).annotate({ title: "CompactionTriggerResponseItem" }),
29414 Schema.Struct({
29415 encrypted_content: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29416 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29417 internal_chat_message_metadata_passthrough: Schema.optionalKey(
29418 Schema.Union([
29419 V2RawResponseItemCompletedNotification__InternalChatMessageMetadataPassthrough,
29420 Schema.Null,
29421 ]),
29422 ),
29423 type: Schema.Literal("context_compaction").annotate({
29424 title: "ContextCompactionResponseItemType",
33661 Schema.Null,
33662 ]),
33663 ),
33664 write: Schema.optionalKey(
33665 Schema.Union([
33666 Schema.Array(ServerRequest__LegacyAppPathString).annotate({
33667 description: "This will be removed in favor of `entries`.",
2942533668 }),
29426 }).annotate({ title: "ContextCompactionResponseItem" }),
29427 Schema.Struct({
29428 type: Schema.Literal("other").annotate({ title: "OtherResponseItemType" }),
29429 }).annotate({ title: "OtherResponseItem" }),
29430 ],
29431 { mode: "oneOf" },
29432);
33669 Schema.Null,
33670 ]),
33671 ),
33672}).annotate({ identifier: "ServerRequest__AdditionalFileSystemPermissions" });
33673
33674export type ServerRequest__McpElicitationEnumSchema =
33675 | ServerRequest__McpElicitationSingleSelectEnumSchema
33676 | ServerRequest__McpElicitationMultiSelectEnumSchema
33677 | ServerRequest__McpElicitationLegacyTitledEnumSchema;
33678export const ServerRequest__McpElicitationEnumSchema = Schema.Union([
33679 ServerRequest__McpElicitationSingleSelectEnumSchema,
33680 ServerRequest__McpElicitationMultiSelectEnumSchema,
33681 ServerRequest__McpElicitationLegacyTitledEnumSchema,
33682]).annotate({ identifier: "ServerRequest__McpElicitationEnumSchema" });
33683
33684export type V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions = {
33685 readonly entries?: ReadonlyArray<V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry> | null;
33686 readonly globScanMaxDepth?: number | null;
33687 readonly read?: ReadonlyArray<V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString> | null;
33688 readonly write?: ReadonlyArray<V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString> | null;
33689};
33690export const V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions =
33691 Schema.Struct({
33692 entries: Schema.optionalKey(
33693 Schema.Union([
33694 Schema.Array(V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry),
33695 Schema.Null,
33696 ]),
33697 ),
33698 globScanMaxDepth: Schema.optionalKey(
33699 Schema.Union([
33700 Schema.Number.annotate({ format: "uint" })
33701 .check(Schema.isInt().annotate({ expected: "an integer" }))
33702 .check(
33703 Schema.isGreaterThanOrEqualTo(1).annotate({
33704 expected: "a value greater than or equal to 1",
33705 }),
33706 ),
33707 Schema.Null,
33708 ]),
33709 ),
33710 read: Schema.optionalKey(
33711 Schema.Union([
33712 Schema.Array(
33713 V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString,
33714 ).annotate({ description: "This will be removed in favor of `entries`." }),
33715 Schema.Null,
33716 ]),
33717 ),
33718 write: Schema.optionalKey(
33719 Schema.Union([
33720 Schema.Array(
33721 V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString,
33722 ).annotate({ description: "This will be removed in favor of `entries`." }),
33723 Schema.Null,
33724 ]),
33725 ),
33726 }).annotate({
33727 identifier:
33728 "V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions",
33729 });
33730
33731export type V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions = {
33732 readonly entries?: ReadonlyArray<V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry> | null;
33733 readonly globScanMaxDepth?: number | null;
33734 readonly read?: ReadonlyArray<V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString> | null;
33735 readonly write?: ReadonlyArray<V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString> | null;
33736};
33737export const V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions =
33738 Schema.Struct({
33739 entries: Schema.optionalKey(
33740 Schema.Union([
33741 Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry),
33742 Schema.Null,
33743 ]),
33744 ),
33745 globScanMaxDepth: Schema.optionalKey(
33746 Schema.Union([
33747 Schema.Number.annotate({ format: "uint" })
33748 .check(Schema.isInt().annotate({ expected: "an integer" }))
33749 .check(
33750 Schema.isGreaterThanOrEqualTo(1).annotate({
33751 expected: "a value greater than or equal to 1",
33752 }),
33753 ),
33754 Schema.Null,
33755 ]),
33756 ),
33757 read: Schema.optionalKey(
33758 Schema.Union([
33759 Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString).annotate(
33760 { description: "This will be removed in favor of `entries`." },
33761 ),
33762 Schema.Null,
33763 ]),
33764 ),
33765 write: Schema.optionalKey(
33766 Schema.Union([
33767 Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString).annotate(
33768 { description: "This will be removed in favor of `entries`." },
33769 ),
33770 Schema.Null,
33771 ]),
33772 ),
33773 }).annotate({
33774 identifier: "V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions",
33775 });
33776
33777export type V2PluginInstalledResponse__PluginMarketplaceEntry = {
33778 readonly interface?: V2PluginInstalledResponse__MarketplaceInterface | null;
33779 readonly name: string;
33780 readonly path?: V2PluginInstalledResponse__AbsolutePathBuf | null;
33781 readonly plugins: ReadonlyArray<V2PluginInstalledResponse__PluginSummary>;
33782};
33783export const V2PluginInstalledResponse__PluginMarketplaceEntry = Schema.Struct({
33784 interface: Schema.optionalKey(
33785 Schema.Union([V2PluginInstalledResponse__MarketplaceInterface, Schema.Null]),
33786 ),
33787 name: Schema.String,
33788 path: Schema.optionalKey(
33789 Schema.Union([V2PluginInstalledResponse__AbsolutePathBuf, Schema.Null]).annotate({
33790 description:
33791 "Local marketplace file path when the marketplace is backed by a local file. Remote-only catalog marketplaces do not have a local path.",
33792 }),
33793 ),
33794 plugins: Schema.Array(V2PluginInstalledResponse__PluginSummary),
33795}).annotate({ identifier: "V2PluginInstalledResponse__PluginMarketplaceEntry" });
33796
33797export type V2PluginListResponse__PluginMarketplaceEntry = {
33798 readonly interface?: V2PluginListResponse__MarketplaceInterface | null;
33799 readonly name: string;
33800 readonly path?: V2PluginListResponse__AbsolutePathBuf | null;
33801 readonly plugins: ReadonlyArray<V2PluginListResponse__PluginSummary>;
33802};
33803export const V2PluginListResponse__PluginMarketplaceEntry = Schema.Struct({
33804 interface: Schema.optionalKey(
33805 Schema.Union([V2PluginListResponse__MarketplaceInterface, Schema.Null]),
33806 ),
33807 name: Schema.String,
33808 path: Schema.optionalKey(
33809 Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]).annotate({
33810 description:
33811 "Local marketplace file path when the marketplace is backed by a local file. Remote-only catalog marketplaces do not have a local path.",
33812 }),
33813 ),
33814 plugins: Schema.Array(V2PluginListResponse__PluginSummary),
33815}).annotate({ identifier: "V2PluginListResponse__PluginMarketplaceEntry" });
33816
33817export type V2PluginReadResponse__PluginDetail = {
33818 readonly appTemplates: ReadonlyArray<V2PluginReadResponse__AppTemplateSummary>;
33819 readonly apps: ReadonlyArray<V2PluginReadResponse__AppSummary>;
33820 readonly description?: string | null;
33821 readonly hooks: ReadonlyArray<V2PluginReadResponse__PluginHookSummary>;
33822 readonly marketplaceName: string;
33823 readonly marketplacePath?: V2PluginReadResponse__AbsolutePathBuf | null;
33824 readonly mcpServers: ReadonlyArray<string>;
33825 readonly scheduledTasks?: ReadonlyArray<V2PluginReadResponse__ScheduledTaskSummary> | null;
33826 readonly shareUrl?: string | null;
33827 readonly skills: ReadonlyArray<V2PluginReadResponse__SkillSummary>;
33828 readonly summary: V2PluginReadResponse__PluginSummary;
33829};
33830export const V2PluginReadResponse__PluginDetail = Schema.Struct({
33831 appTemplates: Schema.Array(V2PluginReadResponse__AppTemplateSummary),
33832 apps: Schema.Array(V2PluginReadResponse__AppSummary),
33833 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
33834 hooks: Schema.Array(V2PluginReadResponse__PluginHookSummary),
33835 marketplaceName: Schema.String,
33836 marketplacePath: Schema.optionalKey(
33837 Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null]),
33838 ),
33839 mcpServers: Schema.Array(Schema.String),
33840 scheduledTasks: Schema.optionalKey(
33841 Schema.Union([Schema.Array(V2PluginReadResponse__ScheduledTaskSummary), Schema.Null]),
33842 ),
33843 shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
33844 skills: Schema.Array(V2PluginReadResponse__SkillSummary),
33845 summary: V2PluginReadResponse__PluginSummary,
33846}).annotate({ identifier: "V2PluginReadResponse__PluginDetail" });
33847
33848export type V2PluginShareListResponse__PluginShareListItem = {
33849 readonly localPluginPath?: V2PluginShareListResponse__AbsolutePathBuf | null;
33850 readonly plugin: V2PluginShareListResponse__PluginSummary;
33851};
33852export const V2PluginShareListResponse__PluginShareListItem = Schema.Struct({
33853 localPluginPath: Schema.optionalKey(
33854 Schema.Union([V2PluginShareListResponse__AbsolutePathBuf, Schema.Null]),
33855 ),
33856 plugin: V2PluginShareListResponse__PluginSummary,
33857}).annotate({ identifier: "V2PluginShareListResponse__PluginShareListItem" });
2943333858
2943433859export type V2ReviewStartResponse__Turn = {
2943533860 readonly completedAt?: number | null;
......@@ -29437,7 +33862,7 @@ export type V2ReviewStartResponse__Turn = {
2943733862 readonly error?: V2ReviewStartResponse__TurnError | null;
2943833863 readonly id: string;
2943933864 readonly items: ReadonlyArray<V2ReviewStartResponse__ThreadItem>;
29440 readonly itemsView?: "notLoaded" | "summary" | "full";
33865 readonly itemsView?: V2ReviewStartResponse__TurnItemsView;
2944133866 readonly startedAt?: number | null;
2944233867 readonly status: V2ReviewStartResponse__TurnStatus;
2944333868};
......@@ -29447,7 +33872,7 @@ export const V2ReviewStartResponse__Turn = Schema.Struct({
2944733872 Schema.Number.annotate({
2944833873 description: "Unix timestamp (in seconds) when the turn completed.",
2944933874 format: "int64",
29450 }).check(Schema.isInt()),
33875 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2945133876 Schema.Null,
2945233877 ]),
2945333878 ),
......@@ -29456,7 +33881,7 @@ export const V2ReviewStartResponse__Turn = Schema.Struct({
2945633881 Schema.Number.annotate({
2945733882 description: "Duration between turn start and completion in milliseconds, if known.",
2945833883 format: "int64",
29459 }).check(Schema.isInt()),
33884 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2946033885 Schema.Null,
2946133886 ]),
2946233887 ),
......@@ -29472,7 +33897,10 @@ export const V2ReviewStartResponse__Turn = Schema.Struct({
2947233897 description: "Thread items currently included in this turn payload.",
2947333898 }),
2947433899 itemsView: Schema.optionalKey(
29475 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
33900 Schema.suspend(
33901 (): Schema.Codec<V2ReviewStartResponse__TurnItemsView> =>
33902 V2ReviewStartResponse__TurnItemsView,
33903 ).annotate({
2947633904 description: "Describes how much of `items` has been loaded for this turn.",
2947733905 default: "full",
2947833906 }),
......@@ -29482,23 +33910,12 @@ export const V2ReviewStartResponse__Turn = Schema.Struct({
2948233910 Schema.Number.annotate({
2948333911 description: "Unix timestamp (in seconds) when the turn started.",
2948433912 format: "int64",
29485 }).check(Schema.isInt()),
33913 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2948633914 Schema.Null,
2948733915 ]),
2948833916 ),
2948933917 status: V2ReviewStartResponse__TurnStatus,
29490});
29491
29492export type V2SkillsListResponse__SkillsListEntry = {
29493 readonly cwd: string;
29494 readonly errors: ReadonlyArray<V2SkillsListResponse__SkillErrorInfo>;
29495 readonly skills: ReadonlyArray<V2SkillsListResponse__SkillMetadata>;
29496};
29497export const V2SkillsListResponse__SkillsListEntry = Schema.Struct({
29498 cwd: Schema.String,
29499 errors: Schema.Array(V2SkillsListResponse__SkillErrorInfo),
29500 skills: Schema.Array(V2SkillsListResponse__SkillMetadata),
29501});
33918}).annotate({ identifier: "V2ReviewStartResponse__Turn" });
2950233919
2950333920export type V2ThreadForkResponse__Turn = {
2950433921 readonly completedAt?: number | null;
......@@ -29506,7 +33923,7 @@ export type V2ThreadForkResponse__Turn = {
2950633923 readonly error?: V2ThreadForkResponse__TurnError | null;
2950733924 readonly id: string;
2950833925 readonly items: ReadonlyArray<V2ThreadForkResponse__ThreadItem>;
29509 readonly itemsView?: "notLoaded" | "summary" | "full";
33926 readonly itemsView?: V2ThreadForkResponse__TurnItemsView;
2951033927 readonly startedAt?: number | null;
2951133928 readonly status: V2ThreadForkResponse__TurnStatus;
2951233929};
......@@ -29516,7 +33933,7 @@ export const V2ThreadForkResponse__Turn = Schema.Struct({
2951633933 Schema.Number.annotate({
2951733934 description: "Unix timestamp (in seconds) when the turn completed.",
2951833935 format: "int64",
29519 }).check(Schema.isInt()),
33936 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2952033937 Schema.Null,
2952133938 ]),
2952233939 ),
......@@ -29525,7 +33942,7 @@ export const V2ThreadForkResponse__Turn = Schema.Struct({
2952533942 Schema.Number.annotate({
2952633943 description: "Duration between turn start and completion in milliseconds, if known.",
2952733944 format: "int64",
29528 }).check(Schema.isInt()),
33945 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2952933946 Schema.Null,
2953033947 ]),
2953133948 ),
......@@ -29541,7 +33958,9 @@ export const V2ThreadForkResponse__Turn = Schema.Struct({
2954133958 description: "Thread items currently included in this turn payload.",
2954233959 }),
2954333960 itemsView: Schema.optionalKey(
29544 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
33961 Schema.suspend(
33962 (): Schema.Codec<V2ThreadForkResponse__TurnItemsView> => V2ThreadForkResponse__TurnItemsView,
33963 ).annotate({
2954533964 description: "Describes how much of `items` has been loaded for this turn.",
2954633965 default: "full",
2954733966 }),
......@@ -29551,12 +33970,12 @@ export const V2ThreadForkResponse__Turn = Schema.Struct({
2955133970 Schema.Number.annotate({
2955233971 description: "Unix timestamp (in seconds) when the turn started.",
2955333972 format: "int64",
29554 }).check(Schema.isInt()),
33973 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2955533974 Schema.Null,
2955633975 ]),
2955733976 ),
2955833977 status: V2ThreadForkResponse__TurnStatus,
29559});
33978}).annotate({ identifier: "V2ThreadForkResponse__Turn" });
2956033979
2956133980export type V2ThreadListResponse__Turn = {
2956233981 readonly completedAt?: number | null;
......@@ -29564,7 +33983,7 @@ export type V2ThreadListResponse__Turn = {
2956433983 readonly error?: V2ThreadListResponse__TurnError | null;
2956533984 readonly id: string;
2956633985 readonly items: ReadonlyArray<V2ThreadListResponse__ThreadItem>;
29567 readonly itemsView?: "notLoaded" | "summary" | "full";
33986 readonly itemsView?: V2ThreadListResponse__TurnItemsView;
2956833987 readonly startedAt?: number | null;
2956933988 readonly status: V2ThreadListResponse__TurnStatus;
2957033989};
......@@ -29574,7 +33993,7 @@ export const V2ThreadListResponse__Turn = Schema.Struct({
2957433993 Schema.Number.annotate({
2957533994 description: "Unix timestamp (in seconds) when the turn completed.",
2957633995 format: "int64",
29577 }).check(Schema.isInt()),
33996 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2957833997 Schema.Null,
2957933998 ]),
2958033999 ),
......@@ -29583,7 +34002,7 @@ export const V2ThreadListResponse__Turn = Schema.Struct({
2958334002 Schema.Number.annotate({
2958434003 description: "Duration between turn start and completion in milliseconds, if known.",
2958534004 format: "int64",
29586 }).check(Schema.isInt()),
34005 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2958734006 Schema.Null,
2958834007 ]),
2958934008 ),
......@@ -29599,7 +34018,9 @@ export const V2ThreadListResponse__Turn = Schema.Struct({
2959934018 description: "Thread items currently included in this turn payload.",
2960034019 }),
2960134020 itemsView: Schema.optionalKey(
29602 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
34021 Schema.suspend(
34022 (): Schema.Codec<V2ThreadListResponse__TurnItemsView> => V2ThreadListResponse__TurnItemsView,
34023 ).annotate({
2960334024 description: "Describes how much of `items` has been loaded for this turn.",
2960434025 default: "full",
2960534026 }),
......@@ -29609,12 +34030,12 @@ export const V2ThreadListResponse__Turn = Schema.Struct({
2960934030 Schema.Number.annotate({
2961034031 description: "Unix timestamp (in seconds) when the turn started.",
2961134032 format: "int64",
29612 }).check(Schema.isInt()),
34033 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2961334034 Schema.Null,
2961434035 ]),
2961534036 ),
2961634037 status: V2ThreadListResponse__TurnStatus,
29617});
34038}).annotate({ identifier: "V2ThreadListResponse__Turn" });
2961834039
2961934040export type V2ThreadMetadataUpdateResponse__Turn = {
2962034041 readonly completedAt?: number | null;
......@@ -29622,7 +34043,7 @@ export type V2ThreadMetadataUpdateResponse__Turn = {
2962234043 readonly error?: V2ThreadMetadataUpdateResponse__TurnError | null;
2962334044 readonly id: string;
2962434045 readonly items: ReadonlyArray<V2ThreadMetadataUpdateResponse__ThreadItem>;
29625 readonly itemsView?: "notLoaded" | "summary" | "full";
34046 readonly itemsView?: V2ThreadMetadataUpdateResponse__TurnItemsView;
2962634047 readonly startedAt?: number | null;
2962734048 readonly status: V2ThreadMetadataUpdateResponse__TurnStatus;
2962834049};
......@@ -29632,7 +34053,7 @@ export const V2ThreadMetadataUpdateResponse__Turn = Schema.Struct({
2963234053 Schema.Number.annotate({
2963334054 description: "Unix timestamp (in seconds) when the turn completed.",
2963434055 format: "int64",
29635 }).check(Schema.isInt()),
34056 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2963634057 Schema.Null,
2963734058 ]),
2963834059 ),
......@@ -29641,7 +34062,7 @@ export const V2ThreadMetadataUpdateResponse__Turn = Schema.Struct({
2964134062 Schema.Number.annotate({
2964234063 description: "Duration between turn start and completion in milliseconds, if known.",
2964334064 format: "int64",
29644 }).check(Schema.isInt()),
34065 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2964534066 Schema.Null,
2964634067 ]),
2964734068 ),
......@@ -29657,7 +34078,10 @@ export const V2ThreadMetadataUpdateResponse__Turn = Schema.Struct({
2965734078 description: "Thread items currently included in this turn payload.",
2965834079 }),
2965934080 itemsView: Schema.optionalKey(
29660 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
34081 Schema.suspend(
34082 (): Schema.Codec<V2ThreadMetadataUpdateResponse__TurnItemsView> =>
34083 V2ThreadMetadataUpdateResponse__TurnItemsView,
34084 ).annotate({
2966134085 description: "Describes how much of `items` has been loaded for this turn.",
2966234086 default: "full",
2966334087 }),
......@@ -29667,12 +34091,12 @@ export const V2ThreadMetadataUpdateResponse__Turn = Schema.Struct({
2966734091 Schema.Number.annotate({
2966834092 description: "Unix timestamp (in seconds) when the turn started.",
2966934093 format: "int64",
29670 }).check(Schema.isInt()),
34094 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2967134095 Schema.Null,
2967234096 ]),
2967334097 ),
2967434098 status: V2ThreadMetadataUpdateResponse__TurnStatus,
29675});
34099}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__Turn" });
2967634100
2967734101export type V2ThreadReadResponse__Turn = {
2967834102 readonly completedAt?: number | null;
......@@ -29680,7 +34104,7 @@ export type V2ThreadReadResponse__Turn = {
2968034104 readonly error?: V2ThreadReadResponse__TurnError | null;
2968134105 readonly id: string;
2968234106 readonly items: ReadonlyArray<V2ThreadReadResponse__ThreadItem>;
29683 readonly itemsView?: "notLoaded" | "summary" | "full";
34107 readonly itemsView?: V2ThreadReadResponse__TurnItemsView;
2968434108 readonly startedAt?: number | null;
2968534109 readonly status: V2ThreadReadResponse__TurnStatus;
2968634110};
......@@ -29690,7 +34114,7 @@ export const V2ThreadReadResponse__Turn = Schema.Struct({
2969034114 Schema.Number.annotate({
2969134115 description: "Unix timestamp (in seconds) when the turn completed.",
2969234116 format: "int64",
29693 }).check(Schema.isInt()),
34117 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2969434118 Schema.Null,
2969534119 ]),
2969634120 ),
......@@ -29699,7 +34123,7 @@ export const V2ThreadReadResponse__Turn = Schema.Struct({
2969934123 Schema.Number.annotate({
2970034124 description: "Duration between turn start and completion in milliseconds, if known.",
2970134125 format: "int64",
29702 }).check(Schema.isInt()),
34126 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2970334127 Schema.Null,
2970434128 ]),
2970534129 ),
......@@ -29715,7 +34139,9 @@ export const V2ThreadReadResponse__Turn = Schema.Struct({
2971534139 description: "Thread items currently included in this turn payload.",
2971634140 }),
2971734141 itemsView: Schema.optionalKey(
29718 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
34142 Schema.suspend(
34143 (): Schema.Codec<V2ThreadReadResponse__TurnItemsView> => V2ThreadReadResponse__TurnItemsView,
34144 ).annotate({
2971934145 description: "Describes how much of `items` has been loaded for this turn.",
2972034146 default: "full",
2972134147 }),
......@@ -29725,12 +34151,12 @@ export const V2ThreadReadResponse__Turn = Schema.Struct({
2972534151 Schema.Number.annotate({
2972634152 description: "Unix timestamp (in seconds) when the turn started.",
2972734153 format: "int64",
29728 }).check(Schema.isInt()),
34154 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2972934155 Schema.Null,
2973034156 ]),
2973134157 ),
2973234158 status: V2ThreadReadResponse__TurnStatus,
29733});
34159}).annotate({ identifier: "V2ThreadReadResponse__Turn" });
2973434160
2973534161export type V2ThreadResumeResponse__Turn = {
2973634162 readonly completedAt?: number | null;
......@@ -29738,7 +34164,7 @@ export type V2ThreadResumeResponse__Turn = {
2973834164 readonly error?: V2ThreadResumeResponse__TurnError | null;
2973934165 readonly id: string;
2974034166 readonly items: ReadonlyArray<V2ThreadResumeResponse__ThreadItem>;
29741 readonly itemsView?: "notLoaded" | "summary" | "full";
34167 readonly itemsView?: V2ThreadResumeResponse__TurnItemsView;
2974234168 readonly startedAt?: number | null;
2974334169 readonly status: V2ThreadResumeResponse__TurnStatus;
2974434170};
......@@ -29748,7 +34174,7 @@ export const V2ThreadResumeResponse__Turn = Schema.Struct({
2974834174 Schema.Number.annotate({
2974934175 description: "Unix timestamp (in seconds) when the turn completed.",
2975034176 format: "int64",
29751 }).check(Schema.isInt()),
34177 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2975234178 Schema.Null,
2975334179 ]),
2975434180 ),
......@@ -29757,7 +34183,7 @@ export const V2ThreadResumeResponse__Turn = Schema.Struct({
2975734183 Schema.Number.annotate({
2975834184 description: "Duration between turn start and completion in milliseconds, if known.",
2975934185 format: "int64",
29760 }).check(Schema.isInt()),
34186 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2976134187 Schema.Null,
2976234188 ]),
2976334189 ),
......@@ -29773,7 +34199,10 @@ export const V2ThreadResumeResponse__Turn = Schema.Struct({
2977334199 description: "Thread items currently included in this turn payload.",
2977434200 }),
2977534201 itemsView: Schema.optionalKey(
29776 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
34202 Schema.suspend(
34203 (): Schema.Codec<V2ThreadResumeResponse__TurnItemsView> =>
34204 V2ThreadResumeResponse__TurnItemsView,
34205 ).annotate({
2977734206 description: "Describes how much of `items` has been loaded for this turn.",
2977834207 default: "full",
2977934208 }),
......@@ -29783,12 +34212,12 @@ export const V2ThreadResumeResponse__Turn = Schema.Struct({
2978334212 Schema.Number.annotate({
2978434213 description: "Unix timestamp (in seconds) when the turn started.",
2978534214 format: "int64",
29786 }).check(Schema.isInt()),
34215 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2978734216 Schema.Null,
2978834217 ]),
2978934218 ),
2979034219 status: V2ThreadResumeResponse__TurnStatus,
29791});
34220}).annotate({ identifier: "V2ThreadResumeResponse__Turn" });
2979234221
2979334222export type V2ThreadRollbackResponse__Turn = {
2979434223 readonly completedAt?: number | null;
......@@ -29796,7 +34225,7 @@ export type V2ThreadRollbackResponse__Turn = {
2979634225 readonly error?: V2ThreadRollbackResponse__TurnError | null;
2979734226 readonly id: string;
2979834227 readonly items: ReadonlyArray<V2ThreadRollbackResponse__ThreadItem>;
29799 readonly itemsView?: "notLoaded" | "summary" | "full";
34228 readonly itemsView?: V2ThreadRollbackResponse__TurnItemsView;
2980034229 readonly startedAt?: number | null;
2980134230 readonly status: V2ThreadRollbackResponse__TurnStatus;
2980234231};
......@@ -29806,7 +34235,7 @@ export const V2ThreadRollbackResponse__Turn = Schema.Struct({
2980634235 Schema.Number.annotate({
2980734236 description: "Unix timestamp (in seconds) when the turn completed.",
2980834237 format: "int64",
29809 }).check(Schema.isInt()),
34238 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2981034239 Schema.Null,
2981134240 ]),
2981234241 ),
......@@ -29815,7 +34244,7 @@ export const V2ThreadRollbackResponse__Turn = Schema.Struct({
2981534244 Schema.Number.annotate({
2981634245 description: "Duration between turn start and completion in milliseconds, if known.",
2981734246 format: "int64",
29818 }).check(Schema.isInt()),
34247 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2981934248 Schema.Null,
2982034249 ]),
2982134250 ),
......@@ -29831,7 +34260,10 @@ export const V2ThreadRollbackResponse__Turn = Schema.Struct({
2983134260 description: "Thread items currently included in this turn payload.",
2983234261 }),
2983334262 itemsView: Schema.optionalKey(
29834 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
34263 Schema.suspend(
34264 (): Schema.Codec<V2ThreadRollbackResponse__TurnItemsView> =>
34265 V2ThreadRollbackResponse__TurnItemsView,
34266 ).annotate({
2983534267 description: "Describes how much of `items` has been loaded for this turn.",
2983634268 default: "full",
2983734269 }),
......@@ -29841,49 +34273,12 @@ export const V2ThreadRollbackResponse__Turn = Schema.Struct({
2984134273 Schema.Number.annotate({
2984234274 description: "Unix timestamp (in seconds) when the turn started.",
2984334275 format: "int64",
29844 }).check(Schema.isInt()),
34276 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2984534277 Schema.Null,
2984634278 ]),
2984734279 ),
2984834280 status: V2ThreadRollbackResponse__TurnStatus,
29849});
29850
29851export type V2ThreadSettingsUpdatedNotification__ThreadSettings = {
29852 readonly activePermissionProfile?: V2ThreadSettingsUpdatedNotification__ActivePermissionProfile | null;
29853 readonly approvalPolicy: V2ThreadSettingsUpdatedNotification__AskForApproval;
29854 readonly approvalsReviewer: V2ThreadSettingsUpdatedNotification__ApprovalsReviewer;
29855 readonly collaborationMode: V2ThreadSettingsUpdatedNotification__CollaborationMode;
29856 readonly cwd: V2ThreadSettingsUpdatedNotification__AbsolutePathBuf;
29857 readonly effort?: V2ThreadSettingsUpdatedNotification__ReasoningEffort | null;
29858 readonly model: string;
29859 readonly modelProvider: string;
29860 readonly personality?: V2ThreadSettingsUpdatedNotification__Personality | null;
29861 readonly sandboxPolicy: V2ThreadSettingsUpdatedNotification__SandboxPolicy;
29862 readonly serviceTier?: string | null;
29863 readonly summary?: V2ThreadSettingsUpdatedNotification__ReasoningSummary | null;
29864};
29865export const V2ThreadSettingsUpdatedNotification__ThreadSettings = Schema.Struct({
29866 activePermissionProfile: Schema.optionalKey(
29867 Schema.Union([V2ThreadSettingsUpdatedNotification__ActivePermissionProfile, Schema.Null]),
29868 ),
29869 approvalPolicy: V2ThreadSettingsUpdatedNotification__AskForApproval,
29870 approvalsReviewer: V2ThreadSettingsUpdatedNotification__ApprovalsReviewer,
29871 collaborationMode: V2ThreadSettingsUpdatedNotification__CollaborationMode,
29872 cwd: V2ThreadSettingsUpdatedNotification__AbsolutePathBuf,
29873 effort: Schema.optionalKey(
29874 Schema.Union([V2ThreadSettingsUpdatedNotification__ReasoningEffort, Schema.Null]),
29875 ),
29876 model: Schema.String,
29877 modelProvider: Schema.String,
29878 personality: Schema.optionalKey(
29879 Schema.Union([V2ThreadSettingsUpdatedNotification__Personality, Schema.Null]),
29880 ),
29881 sandboxPolicy: V2ThreadSettingsUpdatedNotification__SandboxPolicy,
29882 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
29883 summary: Schema.optionalKey(
29884 Schema.Union([V2ThreadSettingsUpdatedNotification__ReasoningSummary, Schema.Null]),
29885 ),
29886});
34281}).annotate({ identifier: "V2ThreadRollbackResponse__Turn" });
2988734282
2988834283export type V2ThreadStartedNotification__Turn = {
2988934284 readonly completedAt?: number | null;
......@@ -29891,7 +34286,7 @@ export type V2ThreadStartedNotification__Turn = {
2989134286 readonly error?: V2ThreadStartedNotification__TurnError | null;
2989234287 readonly id: string;
2989334288 readonly items: ReadonlyArray<V2ThreadStartedNotification__ThreadItem>;
29894 readonly itemsView?: "notLoaded" | "summary" | "full";
34289 readonly itemsView?: V2ThreadStartedNotification__TurnItemsView;
2989534290 readonly startedAt?: number | null;
2989634291 readonly status: V2ThreadStartedNotification__TurnStatus;
2989734292};
......@@ -29901,7 +34296,7 @@ export const V2ThreadStartedNotification__Turn = Schema.Struct({
2990134296 Schema.Number.annotate({
2990234297 description: "Unix timestamp (in seconds) when the turn completed.",
2990334298 format: "int64",
29904 }).check(Schema.isInt()),
34299 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2990534300 Schema.Null,
2990634301 ]),
2990734302 ),
......@@ -29910,7 +34305,7 @@ export const V2ThreadStartedNotification__Turn = Schema.Struct({
2991034305 Schema.Number.annotate({
2991134306 description: "Duration between turn start and completion in milliseconds, if known.",
2991234307 format: "int64",
29913 }).check(Schema.isInt()),
34308 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2991434309 Schema.Null,
2991534310 ]),
2991634311 ),
......@@ -29926,7 +34321,10 @@ export const V2ThreadStartedNotification__Turn = Schema.Struct({
2992634321 description: "Thread items currently included in this turn payload.",
2992734322 }),
2992834323 itemsView: Schema.optionalKey(
29929 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
34324 Schema.suspend(
34325 (): Schema.Codec<V2ThreadStartedNotification__TurnItemsView> =>
34326 V2ThreadStartedNotification__TurnItemsView,
34327 ).annotate({
2993034328 description: "Describes how much of `items` has been loaded for this turn.",
2993134329 default: "full",
2993234330 }),
......@@ -29936,12 +34334,12 @@ export const V2ThreadStartedNotification__Turn = Schema.Struct({
2993634334 Schema.Number.annotate({
2993734335 description: "Unix timestamp (in seconds) when the turn started.",
2993834336 format: "int64",
29939 }).check(Schema.isInt()),
34337 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2994034338 Schema.Null,
2994134339 ]),
2994234340 ),
2994334341 status: V2ThreadStartedNotification__TurnStatus,
29944});
34342}).annotate({ identifier: "V2ThreadStartedNotification__Turn" });
2994534343
2994634344export type V2ThreadStartResponse__Turn = {
2994734345 readonly completedAt?: number | null;
......@@ -29949,7 +34347,7 @@ export type V2ThreadStartResponse__Turn = {
2994934347 readonly error?: V2ThreadStartResponse__TurnError | null;
2995034348 readonly id: string;
2995134349 readonly items: ReadonlyArray<V2ThreadStartResponse__ThreadItem>;
29952 readonly itemsView?: "notLoaded" | "summary" | "full";
34350 readonly itemsView?: V2ThreadStartResponse__TurnItemsView;
2995334351 readonly startedAt?: number | null;
2995434352 readonly status: V2ThreadStartResponse__TurnStatus;
2995534353};
......@@ -29959,7 +34357,7 @@ export const V2ThreadStartResponse__Turn = Schema.Struct({
2995934357 Schema.Number.annotate({
2996034358 description: "Unix timestamp (in seconds) when the turn completed.",
2996134359 format: "int64",
29962 }).check(Schema.isInt()),
34360 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2996334361 Schema.Null,
2996434362 ]),
2996534363 ),
......@@ -29968,7 +34366,7 @@ export const V2ThreadStartResponse__Turn = Schema.Struct({
2996834366 Schema.Number.annotate({
2996934367 description: "Duration between turn start and completion in milliseconds, if known.",
2997034368 format: "int64",
29971 }).check(Schema.isInt()),
34369 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2997234370 Schema.Null,
2997334371 ]),
2997434372 ),
......@@ -29984,7 +34382,10 @@ export const V2ThreadStartResponse__Turn = Schema.Struct({
2998434382 description: "Thread items currently included in this turn payload.",
2998534383 }),
2998634384 itemsView: Schema.optionalKey(
29987 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
34385 Schema.suspend(
34386 (): Schema.Codec<V2ThreadStartResponse__TurnItemsView> =>
34387 V2ThreadStartResponse__TurnItemsView,
34388 ).annotate({
2998834389 description: "Describes how much of `items` has been loaded for this turn.",
2998934390 default: "full",
2999034391 }),
......@@ -29994,12 +34395,12 @@ export const V2ThreadStartResponse__Turn = Schema.Struct({
2999434395 Schema.Number.annotate({
2999534396 description: "Unix timestamp (in seconds) when the turn started.",
2999634397 format: "int64",
29997 }).check(Schema.isInt()),
34398 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2999834399 Schema.Null,
2999934400 ]),
3000034401 ),
3000134402 status: V2ThreadStartResponse__TurnStatus,
30002});
34403}).annotate({ identifier: "V2ThreadStartResponse__Turn" });
3000334404
3000434405export type V2ThreadUnarchiveResponse__Turn = {
3000534406 readonly completedAt?: number | null;
......@@ -30007,7 +34408,7 @@ export type V2ThreadUnarchiveResponse__Turn = {
3000734408 readonly error?: V2ThreadUnarchiveResponse__TurnError | null;
3000834409 readonly id: string;
3000934410 readonly items: ReadonlyArray<V2ThreadUnarchiveResponse__ThreadItem>;
30010 readonly itemsView?: "notLoaded" | "summary" | "full";
34411 readonly itemsView?: V2ThreadUnarchiveResponse__TurnItemsView;
3001134412 readonly startedAt?: number | null;
3001234413 readonly status: V2ThreadUnarchiveResponse__TurnStatus;
3001334414};
......@@ -30017,7 +34418,7 @@ export const V2ThreadUnarchiveResponse__Turn = Schema.Struct({
3001734418 Schema.Number.annotate({
3001834419 description: "Unix timestamp (in seconds) when the turn completed.",
3001934420 format: "int64",
30020 }).check(Schema.isInt()),
34421 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3002134422 Schema.Null,
3002234423 ]),
3002334424 ),
......@@ -30026,7 +34427,7 @@ export const V2ThreadUnarchiveResponse__Turn = Schema.Struct({
3002634427 Schema.Number.annotate({
3002734428 description: "Duration between turn start and completion in milliseconds, if known.",
3002834429 format: "int64",
30029 }).check(Schema.isInt()),
34430 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3003034431 Schema.Null,
3003134432 ]),
3003234433 ),
......@@ -30042,7 +34443,10 @@ export const V2ThreadUnarchiveResponse__Turn = Schema.Struct({
3004234443 description: "Thread items currently included in this turn payload.",
3004334444 }),
3004434445 itemsView: Schema.optionalKey(
30045 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
34446 Schema.suspend(
34447 (): Schema.Codec<V2ThreadUnarchiveResponse__TurnItemsView> =>
34448 V2ThreadUnarchiveResponse__TurnItemsView,
34449 ).annotate({
3004634450 description: "Describes how much of `items` has been loaded for this turn.",
3004734451 default: "full",
3004834452 }),
......@@ -30052,12 +34456,12 @@ export const V2ThreadUnarchiveResponse__Turn = Schema.Struct({
3005234456 Schema.Number.annotate({
3005334457 description: "Unix timestamp (in seconds) when the turn started.",
3005434458 format: "int64",
30055 }).check(Schema.isInt()),
34459 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3005634460 Schema.Null,
3005734461 ]),
3005834462 ),
3005934463 status: V2ThreadUnarchiveResponse__TurnStatus,
30060});
34464}).annotate({ identifier: "V2ThreadUnarchiveResponse__Turn" });
3006134465
3006234466export type V2TurnCompletedNotification__Turn = {
3006334467 readonly completedAt?: number | null;
......@@ -30065,7 +34469,7 @@ export type V2TurnCompletedNotification__Turn = {
3006534469 readonly error?: V2TurnCompletedNotification__TurnError | null;
3006634470 readonly id: string;
3006734471 readonly items: ReadonlyArray<V2TurnCompletedNotification__ThreadItem>;
30068 readonly itemsView?: "notLoaded" | "summary" | "full";
34472 readonly itemsView?: V2TurnCompletedNotification__TurnItemsView;
3006934473 readonly startedAt?: number | null;
3007034474 readonly status: V2TurnCompletedNotification__TurnStatus;
3007134475};
......@@ -30075,7 +34479,7 @@ export const V2TurnCompletedNotification__Turn = Schema.Struct({
3007534479 Schema.Number.annotate({
3007634480 description: "Unix timestamp (in seconds) when the turn completed.",
3007734481 format: "int64",
30078 }).check(Schema.isInt()),
34482 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3007934483 Schema.Null,
3008034484 ]),
3008134485 ),
......@@ -30084,7 +34488,7 @@ export const V2TurnCompletedNotification__Turn = Schema.Struct({
3008434488 Schema.Number.annotate({
3008534489 description: "Duration between turn start and completion in milliseconds, if known.",
3008634490 format: "int64",
30087 }).check(Schema.isInt()),
34491 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3008834492 Schema.Null,
3008934493 ]),
3009034494 ),
......@@ -30100,7 +34504,10 @@ export const V2TurnCompletedNotification__Turn = Schema.Struct({
3010034504 description: "Thread items currently included in this turn payload.",
3010134505 }),
3010234506 itemsView: Schema.optionalKey(
30103 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
34507 Schema.suspend(
34508 (): Schema.Codec<V2TurnCompletedNotification__TurnItemsView> =>
34509 V2TurnCompletedNotification__TurnItemsView,
34510 ).annotate({
3010434511 description: "Describes how much of `items` has been loaded for this turn.",
3010534512 default: "full",
3010634513 }),
......@@ -30110,12 +34517,12 @@ export const V2TurnCompletedNotification__Turn = Schema.Struct({
3011034517 Schema.Number.annotate({
3011134518 description: "Unix timestamp (in seconds) when the turn started.",
3011234519 format: "int64",
30113 }).check(Schema.isInt()),
34520 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3011434521 Schema.Null,
3011534522 ]),
3011634523 ),
3011734524 status: V2TurnCompletedNotification__TurnStatus,
30118});
34525}).annotate({ identifier: "V2TurnCompletedNotification__Turn" });
3011934526
3012034527export type V2TurnStartedNotification__Turn = {
3012134528 readonly completedAt?: number | null;
......@@ -30123,7 +34530,7 @@ export type V2TurnStartedNotification__Turn = {
3012334530 readonly error?: V2TurnStartedNotification__TurnError | null;
3012434531 readonly id: string;
3012534532 readonly items: ReadonlyArray<V2TurnStartedNotification__ThreadItem>;
30126 readonly itemsView?: "notLoaded" | "summary" | "full";
34533 readonly itemsView?: V2TurnStartedNotification__TurnItemsView;
3012734534 readonly startedAt?: number | null;
3012834535 readonly status: V2TurnStartedNotification__TurnStatus;
3012934536};
......@@ -30133,7 +34540,7 @@ export const V2TurnStartedNotification__Turn = Schema.Struct({
3013334540 Schema.Number.annotate({
3013434541 description: "Unix timestamp (in seconds) when the turn completed.",
3013534542 format: "int64",
30136 }).check(Schema.isInt()),
34543 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3013734544 Schema.Null,
3013834545 ]),
3013934546 ),
......@@ -30142,7 +34549,7 @@ export const V2TurnStartedNotification__Turn = Schema.Struct({
3014234549 Schema.Number.annotate({
3014334550 description: "Duration between turn start and completion in milliseconds, if known.",
3014434551 format: "int64",
30145 }).check(Schema.isInt()),
34552 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3014634553 Schema.Null,
3014734554 ]),
3014834555 ),
......@@ -30158,7 +34565,10 @@ export const V2TurnStartedNotification__Turn = Schema.Struct({
3015834565 description: "Thread items currently included in this turn payload.",
3015934566 }),
3016034567 itemsView: Schema.optionalKey(
30161 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
34568 Schema.suspend(
34569 (): Schema.Codec<V2TurnStartedNotification__TurnItemsView> =>
34570 V2TurnStartedNotification__TurnItemsView,
34571 ).annotate({
3016234572 description: "Describes how much of `items` has been loaded for this turn.",
3016334573 default: "full",
3016434574 }),
......@@ -30168,12 +34578,12 @@ export const V2TurnStartedNotification__Turn = Schema.Struct({
3016834578 Schema.Number.annotate({
3016934579 description: "Unix timestamp (in seconds) when the turn started.",
3017034580 format: "int64",
30171 }).check(Schema.isInt()),
34581 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3017234582 Schema.Null,
3017334583 ]),
3017434584 ),
3017534585 status: V2TurnStartedNotification__TurnStatus,
30176});
34586}).annotate({ identifier: "V2TurnStartedNotification__Turn" });
3017734587
3017834588export type V2TurnStartResponse__Turn = {
3017934589 readonly completedAt?: number | null;
......@@ -30181,238 +34591,107 @@ export type V2TurnStartResponse__Turn = {
3018134591 readonly error?: V2TurnStartResponse__TurnError | null;
3018234592 readonly id: string;
3018334593 readonly items: ReadonlyArray<V2TurnStartResponse__ThreadItem>;
30184 readonly itemsView?: "notLoaded" | "summary" | "full";
34594 readonly itemsView?: V2TurnStartResponse__TurnItemsView;
3018534595 readonly startedAt?: number | null;
3018634596 readonly status: V2TurnStartResponse__TurnStatus;
3018734597};
30188export const V2TurnStartResponse__Turn = Schema.Struct({
30189 completedAt: Schema.optionalKey(
30190 Schema.Union([
30191 Schema.Number.annotate({
30192 description: "Unix timestamp (in seconds) when the turn completed.",
30193 format: "int64",
30194 }).check(Schema.isInt()),
30195 Schema.Null,
30196 ]),
30197 ),
30198 durationMs: Schema.optionalKey(
30199 Schema.Union([
30200 Schema.Number.annotate({
30201 description: "Duration between turn start and completion in milliseconds, if known.",
30202 format: "int64",
30203 }).check(Schema.isInt()),
30204 Schema.Null,
30205 ]),
30206 ),
30207 error: Schema.optionalKey(
30208 Schema.Union([V2TurnStartResponse__TurnError, Schema.Null]).annotate({
30209 description: "Only populated when the Turn's status is failed.",
30210 }),
30211 ),
30212 id: Schema.String.annotate({
30213 description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
30214 }),
30215 items: Schema.Array(V2TurnStartResponse__ThreadItem).annotate({
30216 description: "Thread items currently included in this turn payload.",
30217 }),
30218 itemsView: Schema.optionalKey(
30219 Schema.Literals(["notLoaded", "summary", "full"]).annotate({
30220 description: "Describes how much of `items` has been loaded for this turn.",
30221 default: "full",
30222 }),
30223 ),
30224 startedAt: Schema.optionalKey(
30225 Schema.Union([
30226 Schema.Number.annotate({
30227 description: "Unix timestamp (in seconds) when the turn started.",
30228 format: "int64",
30229 }).check(Schema.isInt()),
30230 Schema.Null,
30231 ]),
30232 ),
30233 status: V2TurnStartResponse__TurnStatus,
30234});
30235
30236export type CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions = {
30237 readonly entries?: ReadonlyArray<CommandExecutionRequestApprovalParams__FileSystemSandboxEntry> | null;
30238 readonly globScanMaxDepth?: number | null;
30239 readonly read?: ReadonlyArray<CommandExecutionRequestApprovalParams__LegacyAppPathString> | null;
30240 readonly write?: ReadonlyArray<CommandExecutionRequestApprovalParams__LegacyAppPathString> | null;
30241};
30242export const CommandExecutionRequestApprovalParams__AdditionalFileSystemPermissions = Schema.Struct(
30243 {
30244 entries: Schema.optionalKey(
30245 Schema.Union([
30246 Schema.Array(CommandExecutionRequestApprovalParams__FileSystemSandboxEntry),
30247 Schema.Null,
30248 ]),
30249 ),
30250 globScanMaxDepth: Schema.optionalKey(
30251 Schema.Union([
30252 Schema.Number.annotate({ format: "uint" })
30253 .check(Schema.isInt())
30254 .check(Schema.isGreaterThanOrEqualTo(1)),
30255 Schema.Null,
30256 ]),
30257 ),
30258 read: Schema.optionalKey(
30259 Schema.Union([
30260 Schema.Array(CommandExecutionRequestApprovalParams__LegacyAppPathString).annotate({
30261 description: "This will be removed in favor of `entries`.",
30262 }),
30263 Schema.Null,
30264 ]),
30265 ),
30266 write: Schema.optionalKey(
30267 Schema.Union([
30268 Schema.Array(CommandExecutionRequestApprovalParams__LegacyAppPathString).annotate({
30269 description: "This will be removed in favor of `entries`.",
30270 }),
30271 Schema.Null,
30272 ]),
30273 ),
30274 },
30275);
30276
30277export type McpServerElicitationRequestParams__McpElicitationEnumSchema =
30278 | McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSchema
30279 | McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema
30280 | McpServerElicitationRequestParams__McpElicitationLegacyTitledEnumSchema;
30281export const McpServerElicitationRequestParams__McpElicitationEnumSchema = Schema.Union([
30282 McpServerElicitationRequestParams__McpElicitationSingleSelectEnumSchema,
30283 McpServerElicitationRequestParams__McpElicitationMultiSelectEnumSchema,
30284 McpServerElicitationRequestParams__McpElicitationLegacyTitledEnumSchema,
30285]);
30286
30287export type PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = {
30288 readonly entries?: ReadonlyArray<PermissionsRequestApprovalParams__FileSystemSandboxEntry> | null;
30289 readonly globScanMaxDepth?: number | null;
30290 readonly read?: ReadonlyArray<PermissionsRequestApprovalParams__LegacyAppPathString> | null;
30291 readonly write?: ReadonlyArray<PermissionsRequestApprovalParams__LegacyAppPathString> | null;
30292};
30293export const PermissionsRequestApprovalParams__AdditionalFileSystemPermissions = Schema.Struct({
30294 entries: Schema.optionalKey(
30295 Schema.Union([
30296 Schema.Array(PermissionsRequestApprovalParams__FileSystemSandboxEntry),
30297 Schema.Null,
30298 ]),
30299 ),
30300 globScanMaxDepth: Schema.optionalKey(
30301 Schema.Union([
30302 Schema.Number.annotate({ format: "uint" })
30303 .check(Schema.isInt())
30304 .check(Schema.isGreaterThanOrEqualTo(1)),
30305 Schema.Null,
30306 ]),
30307 ),
30308 read: Schema.optionalKey(
30309 Schema.Union([
30310 Schema.Array(PermissionsRequestApprovalParams__LegacyAppPathString).annotate({
30311 description: "This will be removed in favor of `entries`.",
30312 }),
30313 Schema.Null,
30314 ]),
30315 ),
30316 write: Schema.optionalKey(
30317 Schema.Union([
30318 Schema.Array(PermissionsRequestApprovalParams__LegacyAppPathString).annotate({
30319 description: "This will be removed in favor of `entries`.",
30320 }),
30321 Schema.Null,
30322 ]),
30323 ),
30324});
30325
30326export type PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions = {
30327 readonly entries?: ReadonlyArray<PermissionsRequestApprovalResponse__FileSystemSandboxEntry> | null;
30328 readonly globScanMaxDepth?: number | null;
30329 readonly read?: ReadonlyArray<PermissionsRequestApprovalResponse__LegacyAppPathString> | null;
30330 readonly write?: ReadonlyArray<PermissionsRequestApprovalResponse__LegacyAppPathString> | null;
30331};
30332export const PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions = Schema.Struct({
30333 entries: Schema.optionalKey(
34598export const V2TurnStartResponse__Turn = Schema.Struct({
34599 completedAt: Schema.optionalKey(
3033434600 Schema.Union([
30335 Schema.Array(PermissionsRequestApprovalResponse__FileSystemSandboxEntry),
34601 Schema.Number.annotate({
34602 description: "Unix timestamp (in seconds) when the turn completed.",
34603 format: "int64",
34604 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3033634605 Schema.Null,
3033734606 ]),
3033834607 ),
30339 globScanMaxDepth: Schema.optionalKey(
34608 durationMs: Schema.optionalKey(
3034034609 Schema.Union([
30341 Schema.Number.annotate({ format: "uint" })
30342 .check(Schema.isInt())
30343 .check(Schema.isGreaterThanOrEqualTo(1)),
34610 Schema.Number.annotate({
34611 description: "Duration between turn start and completion in milliseconds, if known.",
34612 format: "int64",
34613 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3034434614 Schema.Null,
3034534615 ]),
3034634616 ),
30347 read: Schema.optionalKey(
30348 Schema.Union([
30349 Schema.Array(PermissionsRequestApprovalResponse__LegacyAppPathString).annotate({
30350 description: "This will be removed in favor of `entries`.",
30351 }),
30352 Schema.Null,
30353 ]),
34617 error: Schema.optionalKey(
34618 Schema.Union([V2TurnStartResponse__TurnError, Schema.Null]).annotate({
34619 description: "Only populated when the Turn's status is failed.",
34620 }),
3035434621 ),
30355 write: Schema.optionalKey(
34622 id: Schema.String.annotate({
34623 description: "Identifier for this turn. Codex-generated turn IDs are UUIDv7.",
34624 }),
34625 items: Schema.Array(V2TurnStartResponse__ThreadItem).annotate({
34626 description: "Thread items currently included in this turn payload.",
34627 }),
34628 itemsView: Schema.optionalKey(
34629 Schema.suspend(
34630 (): Schema.Codec<V2TurnStartResponse__TurnItemsView> => V2TurnStartResponse__TurnItemsView,
34631 ).annotate({
34632 description: "Describes how much of `items` has been loaded for this turn.",
34633 default: "full",
34634 }),
34635 ),
34636 startedAt: Schema.optionalKey(
3035634637 Schema.Union([
30357 Schema.Array(PermissionsRequestApprovalResponse__LegacyAppPathString).annotate({
30358 description: "This will be removed in favor of `entries`.",
30359 }),
34638 Schema.Number.annotate({
34639 description: "Unix timestamp (in seconds) when the turn started.",
34640 format: "int64",
34641 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3036034642 Schema.Null,
3036134643 ]),
3036234644 ),
30363});
34645 status: V2TurnStartResponse__TurnStatus,
34646}).annotate({ identifier: "V2TurnStartResponse__Turn" });
3036434647
30365export type ServerNotification__AdditionalFileSystemPermissions = {
30366 readonly entries?: ReadonlyArray<ServerNotification__FileSystemSandboxEntry> | null;
30367 readonly globScanMaxDepth?: number | null;
30368 readonly read?: ReadonlyArray<ServerNotification__LegacyAppPathString> | null;
30369 readonly write?: ReadonlyArray<ServerNotification__LegacyAppPathString> | null;
34648export type McpServerElicitationRequestParams__McpElicitationPrimitiveSchema =
34649 | McpServerElicitationRequestParams__McpElicitationEnumSchema
34650 | McpServerElicitationRequestParams__McpElicitationStringSchema
34651 | McpServerElicitationRequestParams__McpElicitationNumberSchema
34652 | McpServerElicitationRequestParams__McpElicitationBooleanSchema;
34653export const McpServerElicitationRequestParams__McpElicitationPrimitiveSchema = Schema.Union([
34654 McpServerElicitationRequestParams__McpElicitationEnumSchema,
34655 McpServerElicitationRequestParams__McpElicitationStringSchema,
34656 McpServerElicitationRequestParams__McpElicitationNumberSchema,
34657 McpServerElicitationRequestParams__McpElicitationBooleanSchema,
34658]).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationPrimitiveSchema" });
34659
34660export type PermissionsRequestApprovalParams__RequestPermissionProfile = {
34661 readonly fileSystem?: PermissionsRequestApprovalParams__AdditionalFileSystemPermissions | null;
34662 readonly network?: PermissionsRequestApprovalParams__AdditionalNetworkPermissions | null;
3037034663};
30371export const ServerNotification__AdditionalFileSystemPermissions = Schema.Struct({
30372 entries: Schema.optionalKey(
30373 Schema.Union([Schema.Array(ServerNotification__FileSystemSandboxEntry), Schema.Null]),
34664export const PermissionsRequestApprovalParams__RequestPermissionProfile = Schema.Struct({
34665 fileSystem: Schema.optionalKey(
34666 Schema.Union([PermissionsRequestApprovalParams__AdditionalFileSystemPermissions, Schema.Null]),
3037434667 ),
30375 globScanMaxDepth: Schema.optionalKey(
30376 Schema.Union([
30377 Schema.Number.annotate({ format: "uint" })
30378 .check(Schema.isInt())
30379 .check(Schema.isGreaterThanOrEqualTo(1)),
30380 Schema.Null,
30381 ]),
34668 network: Schema.optionalKey(
34669 Schema.Union([PermissionsRequestApprovalParams__AdditionalNetworkPermissions, Schema.Null]),
3038234670 ),
30383 read: Schema.optionalKey(
34671}).annotate({ identifier: "PermissionsRequestApprovalParams__RequestPermissionProfile" });
34672
34673export type PermissionsRequestApprovalResponse__GrantedPermissionProfile = {
34674 readonly fileSystem?: PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions | null;
34675 readonly network?: PermissionsRequestApprovalResponse__AdditionalNetworkPermissions | null;
34676};
34677export const PermissionsRequestApprovalResponse__GrantedPermissionProfile = Schema.Struct({
34678 fileSystem: Schema.optionalKey(
3038434679 Schema.Union([
30385 Schema.Array(ServerNotification__LegacyAppPathString).annotate({
30386 description: "This will be removed in favor of `entries`.",
30387 }),
34680 PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions,
3038834681 Schema.Null,
3038934682 ]),
3039034683 ),
30391 write: Schema.optionalKey(
30392 Schema.Union([
30393 Schema.Array(ServerNotification__LegacyAppPathString).annotate({
30394 description: "This will be removed in favor of `entries`.",
30395 }),
30396 Schema.Null,
30397 ]),
34684 network: Schema.optionalKey(
34685 Schema.Union([PermissionsRequestApprovalResponse__AdditionalNetworkPermissions, Schema.Null]),
3039834686 ),
30399});
30400
30401export type ServerNotification__ThreadSettingsUpdatedNotification = {
30402 readonly threadId: string;
30403 readonly threadSettings: ServerNotification__ThreadSettings;
30404};
30405export const ServerNotification__ThreadSettingsUpdatedNotification = Schema.Struct({
30406 threadId: Schema.String,
30407 threadSettings: ServerNotification__ThreadSettings,
30408});
34687}).annotate({ identifier: "PermissionsRequestApprovalResponse__GrantedPermissionProfile" });
3040934688
3041034689export type ServerNotification__Thread = {
3041134690 readonly agentNickname?: string | null;
3041234691 readonly agentRole?: string | null;
3041334692 readonly cliVersion: string;
3041434693 readonly createdAt: number;
30415 readonly cwd: string;
34694 readonly cwd: ServerNotification__AbsolutePathBuf;
3041634695 readonly ephemeral: boolean;
3041734696 readonly forkedFromId?: string | null;
3041834697 readonly gitInfo?: ServerNotification__GitInfo | null;
......@@ -30424,22 +34703,8 @@ export type ServerNotification__Thread = {
3042434703 readonly preview: string;
3042534704 readonly recencyAt?: number | null;
3042634705 readonly sessionId: string;
30427 readonly source:
30428 | "cli"
30429 | "vscode"
30430 | "exec"
30431 | "appServer"
30432 | "unknown"
30433 | { readonly custom: string }
30434 | { readonly subAgent: ServerNotification__SubAgentSource };
30435 readonly status:
30436 | { readonly type: "notLoaded" }
30437 | { readonly type: "idle" }
30438 | { readonly type: "systemError" }
30439 | {
30440 readonly activeFlags: ReadonlyArray<ServerNotification__ThreadActiveFlag>;
30441 readonly type: "active";
30442 };
34706 readonly source: ServerNotification__SessionSource;
34707 readonly status: ServerNotification__ThreadStatus;
3044334708 readonly threadSource?: ServerNotification__ThreadSource | null;
3044434709 readonly turns: ReadonlyArray<ServerNotification__Turn>;
3044534710 readonly updatedAt: number;
......@@ -30468,11 +34733,10 @@ export const ServerNotification__Thread = Schema.Struct({
3046834733 createdAt: Schema.Number.annotate({
3046934734 description: "Unix timestamp (in seconds) when the thread was created.",
3047034735 format: "int64",
30471 }).check(Schema.isInt()),
30472 cwd: Schema.String.annotate({
30473 description:
30474 "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.",
30475 }),
34736 }).check(Schema.isInt().annotate({ expected: "an integer" })),
34737 cwd: Schema.suspend(
34738 (): Schema.Codec<ServerNotification__AbsolutePathBuf> => ServerNotification__AbsolutePathBuf,
34739 ).annotate({ description: "Working directory captured for the thread." }),
3047634740 ephemeral: Schema.Boolean.annotate({
3047734741 description: "Whether the thread is ephemeral and should not be materialized on disk.",
3047834742 }),
......@@ -30524,42 +34788,20 @@ export const ServerNotification__Thread = Schema.Struct({
3052434788 Schema.Number.annotate({
3052534789 description: "Unix timestamp (in seconds) used for thread recency ordering.",
3052634790 format: "int64",
30527 }).check(Schema.isInt()),
34791 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3052834792 Schema.Null,
3052934793 ]),
3053034794 ),
3053134795 sessionId: Schema.String.annotate({
3053234796 description: "Session id shared by threads that belong to the same session tree.",
3053334797 }),
30534 source: Schema.Union(
30535 [
30536 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
30537 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
30538 Schema.Struct({ subAgent: ServerNotification__SubAgentSource }).annotate({
30539 title: "SubAgentSessionSource",
30540 }),
30541 ],
30542 { mode: "oneOf" },
34798 source: Schema.suspend(
34799 (): Schema.Codec<ServerNotification__SessionSource> => ServerNotification__SessionSource,
3054334800 ).annotate({
3054434801 description: "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).",
3054534802 }),
30546 status: Schema.Union(
30547 [
30548 Schema.Struct({
30549 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
30550 }).annotate({ title: "NotLoadedThreadStatus" }),
30551 Schema.Struct({
30552 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
30553 }).annotate({ title: "IdleThreadStatus" }),
30554 Schema.Struct({
30555 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
30556 }).annotate({ title: "SystemErrorThreadStatus" }),
30557 Schema.Struct({
30558 activeFlags: Schema.Array(ServerNotification__ThreadActiveFlag),
30559 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
30560 }).annotate({ title: "ActiveThreadStatus" }),
30561 ],
30562 { mode: "oneOf" },
34803 status: Schema.suspend(
34804 (): Schema.Codec<ServerNotification__ThreadStatus> => ServerNotification__ThreadStatus,
3056334805 ).annotate({ description: "Current runtime status for the thread." }),
3056434806 threadSource: Schema.optionalKey(
3056534807 Schema.Union([ServerNotification__ThreadSource, Schema.Null]).annotate({
......@@ -30573,241 +34815,115 @@ export const ServerNotification__Thread = Schema.Struct({
3057334815 updatedAt: Schema.Number.annotate({
3057434816 description: "Unix timestamp (in seconds) when the thread was last updated.",
3057534817 format: "int64",
30576 }).check(Schema.isInt()),
30577});
34818 }).check(Schema.isInt().annotate({ expected: "an integer" })),
34819}).annotate({ identifier: "ServerNotification__Thread" });
3057834820
30579export type ServerNotification__TurnCompletedNotification = {
34821export type ServerNotification__TurnStartedNotification = {
3058034822 readonly threadId: string;
3058134823 readonly turn: ServerNotification__Turn;
3058234824};
30583export const ServerNotification__TurnCompletedNotification = Schema.Struct({
34825export const ServerNotification__TurnStartedNotification = Schema.Struct({
3058434826 threadId: Schema.String,
3058534827 turn: ServerNotification__Turn,
30586});
34828}).annotate({ identifier: "ServerNotification__TurnStartedNotification" });
3058734829
30588export type ServerNotification__TurnStartedNotification = {
34830export type ServerNotification__TurnCompletedNotification = {
3058934831 readonly threadId: string;
3059034832 readonly turn: ServerNotification__Turn;
3059134833};
30592export const ServerNotification__TurnStartedNotification = Schema.Struct({
34834export const ServerNotification__TurnCompletedNotification = Schema.Struct({
3059334835 threadId: Schema.String,
3059434836 turn: ServerNotification__Turn,
30595});
34837}).annotate({ identifier: "ServerNotification__TurnCompletedNotification" });
3059634838
30597export type ServerRequest__AdditionalFileSystemPermissions = {
30598 readonly entries?: ReadonlyArray<ServerRequest__FileSystemSandboxEntry> | null;
30599 readonly globScanMaxDepth?: number | null;
30600 readonly read?: ReadonlyArray<ServerRequest__LegacyAppPathString> | null;
30601 readonly write?: ReadonlyArray<ServerRequest__LegacyAppPathString> | null;
34839export type ServerNotification__RequestPermissionProfile = {
34840 readonly fileSystem?: ServerNotification__AdditionalFileSystemPermissions | null;
34841 readonly network?: ServerNotification__AdditionalNetworkPermissions | null;
3060234842};
30603export const ServerRequest__AdditionalFileSystemPermissions = Schema.Struct({
30604 entries: Schema.optionalKey(
30605 Schema.Union([Schema.Array(ServerRequest__FileSystemSandboxEntry), Schema.Null]),
34843export const ServerNotification__RequestPermissionProfile = Schema.Struct({
34844 fileSystem: Schema.optionalKey(
34845 Schema.Union([ServerNotification__AdditionalFileSystemPermissions, Schema.Null]),
3060634846 ),
30607 globScanMaxDepth: Schema.optionalKey(
30608 Schema.Union([
30609 Schema.Number.annotate({ format: "uint" })
30610 .check(Schema.isInt())
30611 .check(Schema.isGreaterThanOrEqualTo(1)),
30612 Schema.Null,
30613 ]),
34847 network: Schema.optionalKey(
34848 Schema.Union([ServerNotification__AdditionalNetworkPermissions, Schema.Null]),
3061434849 ),
30615 read: Schema.optionalKey(
30616 Schema.Union([
30617 Schema.Array(ServerRequest__LegacyAppPathString).annotate({
30618 description: "This will be removed in favor of `entries`.",
30619 }),
30620 Schema.Null,
30621 ]),
34850}).annotate({ identifier: "ServerNotification__RequestPermissionProfile" });
34851
34852export type ServerRequest__RequestPermissionProfile = {
34853 readonly fileSystem?: ServerRequest__AdditionalFileSystemPermissions | null;
34854 readonly network?: ServerRequest__AdditionalNetworkPermissions | null;
34855};
34856export const ServerRequest__RequestPermissionProfile = Schema.Struct({
34857 fileSystem: Schema.optionalKey(
34858 Schema.Union([ServerRequest__AdditionalFileSystemPermissions, Schema.Null]),
3062234859 ),
30623 write: Schema.optionalKey(
30624 Schema.Union([
30625 Schema.Array(ServerRequest__LegacyAppPathString).annotate({
30626 description: "This will be removed in favor of `entries`.",
30627 }),
30628 Schema.Null,
30629 ]),
34860 network: Schema.optionalKey(
34861 Schema.Union([ServerRequest__AdditionalNetworkPermissions, Schema.Null]),
3063034862 ),
30631});
34863}).annotate({ identifier: "ServerRequest__RequestPermissionProfile" });
3063234864
30633export type ServerRequest__McpElicitationEnumSchema =
30634 | ServerRequest__McpElicitationSingleSelectEnumSchema
30635 | ServerRequest__McpElicitationMultiSelectEnumSchema
30636 | ServerRequest__McpElicitationLegacyTitledEnumSchema;
30637export const ServerRequest__McpElicitationEnumSchema = Schema.Union([
30638 ServerRequest__McpElicitationSingleSelectEnumSchema,
30639 ServerRequest__McpElicitationMultiSelectEnumSchema,
30640 ServerRequest__McpElicitationLegacyTitledEnumSchema,
30641]);
34865export type ServerRequest__McpElicitationPrimitiveSchema =
34866 | ServerRequest__McpElicitationEnumSchema
34867 | ServerRequest__McpElicitationStringSchema
34868 | ServerRequest__McpElicitationNumberSchema
34869 | ServerRequest__McpElicitationBooleanSchema;
34870export const ServerRequest__McpElicitationPrimitiveSchema = Schema.Union([
34871 ServerRequest__McpElicitationEnumSchema,
34872 ServerRequest__McpElicitationStringSchema,
34873 ServerRequest__McpElicitationNumberSchema,
34874 ServerRequest__McpElicitationBooleanSchema,
34875]).annotate({ identifier: "ServerRequest__McpElicitationPrimitiveSchema" });
3064234876
30643export type V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions = {
30644 readonly entries?: ReadonlyArray<V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry> | null;
30645 readonly globScanMaxDepth?: number | null;
30646 readonly read?: ReadonlyArray<V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString> | null;
30647 readonly write?: ReadonlyArray<V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString> | null;
34877export type V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile = {
34878 readonly fileSystem?: V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions | null;
34879 readonly network?: V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions | null;
3064834880};
30649export const V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions =
34881export const V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile =
3065034882 Schema.Struct({
30651 entries: Schema.optionalKey(
30652 Schema.Union([
30653 Schema.Array(V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSandboxEntry),
30654 Schema.Null,
30655 ]),
30656 ),
30657 globScanMaxDepth: Schema.optionalKey(
30658 Schema.Union([
30659 Schema.Number.annotate({ format: "uint" })
30660 .check(Schema.isInt())
30661 .check(Schema.isGreaterThanOrEqualTo(1)),
30662 Schema.Null,
30663 ]),
30664 ),
30665 read: Schema.optionalKey(
34883 fileSystem: Schema.optionalKey(
3066634884 Schema.Union([
30667 Schema.Array(
30668 V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString,
30669 ).annotate({ description: "This will be removed in favor of `entries`." }),
34885 V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions,
3067034886 Schema.Null,
3067134887 ]),
3067234888 ),
30673 write: Schema.optionalKey(
34889 network: Schema.optionalKey(
3067434890 Schema.Union([
30675 Schema.Array(
30676 V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString,
30677 ).annotate({ description: "This will be removed in favor of `entries`." }),
34891 V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions,
3067834892 Schema.Null,
3067934893 ]),
3068034894 ),
34895 }).annotate({
34896 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile",
3068134897 });
3068234898
30683export type V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions = {
30684 readonly entries?: ReadonlyArray<V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry> | null;
30685 readonly globScanMaxDepth?: number | null;
30686 readonly read?: ReadonlyArray<V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString> | null;
30687 readonly write?: ReadonlyArray<V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString> | null;
34899export type V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile = {
34900 readonly fileSystem?: V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions | null;
34901 readonly network?: V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions | null;
3068834902};
30689export const V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions =
34903export const V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile =
3069034904 Schema.Struct({
30691 entries: Schema.optionalKey(
30692 Schema.Union([
30693 Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__FileSystemSandboxEntry),
30694 Schema.Null,
30695 ]),
30696 ),
30697 globScanMaxDepth: Schema.optionalKey(
30698 Schema.Union([
30699 Schema.Number.annotate({ format: "uint" })
30700 .check(Schema.isInt())
30701 .check(Schema.isGreaterThanOrEqualTo(1)),
30702 Schema.Null,
30703 ]),
30704 ),
30705 read: Schema.optionalKey(
34905 fileSystem: Schema.optionalKey(
3070634906 Schema.Union([
30707 Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString).annotate(
30708 { description: "This will be removed in favor of `entries`." },
30709 ),
34907 V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions,
3071034908 Schema.Null,
3071134909 ]),
3071234910 ),
30713 write: Schema.optionalKey(
34911 network: Schema.optionalKey(
3071434912 Schema.Union([
30715 Schema.Array(V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString).annotate(
30716 { description: "This will be removed in favor of `entries`." },
30717 ),
34913 V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions,
3071834914 Schema.Null,
3071934915 ]),
3072034916 ),
34917 }).annotate({
34918 identifier: "V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile",
3072134919 });
3072234920
30723export type V2PluginInstalledResponse__PluginMarketplaceEntry = {
30724 readonly interface?: V2PluginInstalledResponse__MarketplaceInterface | null;
30725 readonly name: string;
30726 readonly path?: V2PluginInstalledResponse__AbsolutePathBuf | null;
30727 readonly plugins: ReadonlyArray<V2PluginInstalledResponse__PluginSummary>;
30728};
30729export const V2PluginInstalledResponse__PluginMarketplaceEntry = Schema.Struct({
30730 interface: Schema.optionalKey(
30731 Schema.Union([V2PluginInstalledResponse__MarketplaceInterface, Schema.Null]),
30732 ),
30733 name: Schema.String,
30734 path: Schema.optionalKey(
30735 Schema.Union([V2PluginInstalledResponse__AbsolutePathBuf, Schema.Null]).annotate({
30736 description:
30737 "Local marketplace file path when the marketplace is backed by a local file. Remote-only catalog marketplaces do not have a local path.",
30738 }),
30739 ),
30740 plugins: Schema.Array(V2PluginInstalledResponse__PluginSummary),
30741});
30742
30743export type V2PluginListResponse__PluginMarketplaceEntry = {
30744 readonly interface?: V2PluginListResponse__MarketplaceInterface | null;
30745 readonly name: string;
30746 readonly path?: V2PluginListResponse__AbsolutePathBuf | null;
30747 readonly plugins: ReadonlyArray<V2PluginListResponse__PluginSummary>;
30748};
30749export const V2PluginListResponse__PluginMarketplaceEntry = Schema.Struct({
30750 interface: Schema.optionalKey(
30751 Schema.Union([V2PluginListResponse__MarketplaceInterface, Schema.Null]),
30752 ),
30753 name: Schema.String,
30754 path: Schema.optionalKey(
30755 Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]).annotate({
30756 description:
30757 "Local marketplace file path when the marketplace is backed by a local file. Remote-only catalog marketplaces do not have a local path.",
30758 }),
30759 ),
30760 plugins: Schema.Array(V2PluginListResponse__PluginSummary),
30761});
30762
30763export type V2PluginReadResponse__PluginDetail = {
30764 readonly appTemplates: ReadonlyArray<V2PluginReadResponse__AppTemplateSummary>;
30765 readonly apps: ReadonlyArray<V2PluginReadResponse__AppSummary>;
30766 readonly description?: string | null;
30767 readonly hooks: ReadonlyArray<V2PluginReadResponse__PluginHookSummary>;
30768 readonly marketplaceName: string;
30769 readonly marketplacePath?: V2PluginReadResponse__AbsolutePathBuf | null;
30770 readonly mcpServers: ReadonlyArray<string>;
30771 readonly scheduledTasks?: ReadonlyArray<V2PluginReadResponse__ScheduledTaskSummary> | null;
30772 readonly shareUrl?: string | null;
30773 readonly skills: ReadonlyArray<V2PluginReadResponse__SkillSummary>;
30774 readonly summary: V2PluginReadResponse__PluginSummary;
30775};
30776export const V2PluginReadResponse__PluginDetail = Schema.Struct({
30777 appTemplates: Schema.Array(V2PluginReadResponse__AppTemplateSummary),
30778 apps: Schema.Array(V2PluginReadResponse__AppSummary),
30779 description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
30780 hooks: Schema.Array(V2PluginReadResponse__PluginHookSummary),
30781 marketplaceName: Schema.String,
30782 marketplacePath: Schema.optionalKey(
30783 Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null]),
30784 ),
30785 mcpServers: Schema.Array(Schema.String),
30786 scheduledTasks: Schema.optionalKey(
30787 Schema.Union([Schema.Array(V2PluginReadResponse__ScheduledTaskSummary), Schema.Null]),
30788 ),
30789 shareUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
30790 skills: Schema.Array(V2PluginReadResponse__SkillSummary),
30791 summary: V2PluginReadResponse__PluginSummary,
30792});
30793
30794export type V2PluginShareListResponse__PluginShareListItem = {
30795 readonly localPluginPath?: V2PluginShareListResponse__AbsolutePathBuf | null;
30796 readonly plugin: V2PluginShareListResponse__PluginSummary;
30797};
30798export const V2PluginShareListResponse__PluginShareListItem = Schema.Struct({
30799 localPluginPath: Schema.optionalKey(
30800 Schema.Union([V2PluginShareListResponse__AbsolutePathBuf, Schema.Null]),
30801 ),
30802 plugin: V2PluginShareListResponse__PluginSummary,
30803});
30804
3080534921export type V2ThreadForkResponse__Thread = {
3080634922 readonly agentNickname?: string | null;
3080734923 readonly agentRole?: string | null;
3080834924 readonly cliVersion: string;
3080934925 readonly createdAt: number;
30810 readonly cwd: string;
34926 readonly cwd: V2ThreadForkResponse__AbsolutePathBuf;
3081134927 readonly ephemeral: boolean;
3081234928 readonly forkedFromId?: string | null;
3081334929 readonly gitInfo?: V2ThreadForkResponse__GitInfo | null;
......@@ -30819,22 +34935,8 @@ export type V2ThreadForkResponse__Thread = {
3081934935 readonly preview: string;
3082034936 readonly recencyAt?: number | null;
3082134937 readonly sessionId: string;
30822 readonly source:
30823 | "cli"
30824 | "vscode"
30825 | "exec"
30826 | "appServer"
30827 | "unknown"
30828 | { readonly custom: string }
30829 | { readonly subAgent: V2ThreadForkResponse__SubAgentSource };
30830 readonly status:
30831 | { readonly type: "notLoaded" }
30832 | { readonly type: "idle" }
30833 | { readonly type: "systemError" }
30834 | {
30835 readonly activeFlags: ReadonlyArray<V2ThreadForkResponse__ThreadActiveFlag>;
30836 readonly type: "active";
30837 };
34938 readonly source: V2ThreadForkResponse__SessionSource;
34939 readonly status: V2ThreadForkResponse__ThreadStatus;
3083834940 readonly threadSource?: V2ThreadForkResponse__ThreadSource | null;
3083934941 readonly turns: ReadonlyArray<V2ThreadForkResponse__Turn>;
3084034942 readonly updatedAt: number;
......@@ -30863,11 +34965,11 @@ export const V2ThreadForkResponse__Thread = Schema.Struct({
3086334965 createdAt: Schema.Number.annotate({
3086434966 description: "Unix timestamp (in seconds) when the thread was created.",
3086534967 format: "int64",
30866 }).check(Schema.isInt()),
30867 cwd: Schema.String.annotate({
30868 description:
30869 "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.",
30870 }),
34968 }).check(Schema.isInt().annotate({ expected: "an integer" })),
34969 cwd: Schema.suspend(
34970 (): Schema.Codec<V2ThreadForkResponse__AbsolutePathBuf> =>
34971 V2ThreadForkResponse__AbsolutePathBuf,
34972 ).annotate({ description: "Working directory captured for the thread." }),
3087134973 ephemeral: Schema.Boolean.annotate({
3087234974 description: "Whether the thread is ephemeral and should not be materialized on disk.",
3087334975 }),
......@@ -30919,42 +35021,20 @@ export const V2ThreadForkResponse__Thread = Schema.Struct({
3091935021 Schema.Number.annotate({
3092035022 description: "Unix timestamp (in seconds) used for thread recency ordering.",
3092135023 format: "int64",
30922 }).check(Schema.isInt()),
35024 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3092335025 Schema.Null,
3092435026 ]),
3092535027 ),
3092635028 sessionId: Schema.String.annotate({
3092735029 description: "Session id shared by threads that belong to the same session tree.",
3092835030 }),
30929 source: Schema.Union(
30930 [
30931 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
30932 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
30933 Schema.Struct({ subAgent: V2ThreadForkResponse__SubAgentSource }).annotate({
30934 title: "SubAgentSessionSource",
30935 }),
30936 ],
30937 { mode: "oneOf" },
35031 source: Schema.suspend(
35032 (): Schema.Codec<V2ThreadForkResponse__SessionSource> => V2ThreadForkResponse__SessionSource,
3093835033 ).annotate({
3093935034 description: "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).",
3094035035 }),
30941 status: Schema.Union(
30942 [
30943 Schema.Struct({
30944 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
30945 }).annotate({ title: "NotLoadedThreadStatus" }),
30946 Schema.Struct({
30947 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
30948 }).annotate({ title: "IdleThreadStatus" }),
30949 Schema.Struct({
30950 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
30951 }).annotate({ title: "SystemErrorThreadStatus" }),
30952 Schema.Struct({
30953 activeFlags: Schema.Array(V2ThreadForkResponse__ThreadActiveFlag),
30954 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
30955 }).annotate({ title: "ActiveThreadStatus" }),
30956 ],
30957 { mode: "oneOf" },
35036 status: Schema.suspend(
35037 (): Schema.Codec<V2ThreadForkResponse__ThreadStatus> => V2ThreadForkResponse__ThreadStatus,
3095835038 ).annotate({ description: "Current runtime status for the thread." }),
3095935039 threadSource: Schema.optionalKey(
3096035040 Schema.Union([V2ThreadForkResponse__ThreadSource, Schema.Null]).annotate({
......@@ -30968,15 +35048,15 @@ export const V2ThreadForkResponse__Thread = Schema.Struct({
3096835048 updatedAt: Schema.Number.annotate({
3096935049 description: "Unix timestamp (in seconds) when the thread was last updated.",
3097035050 format: "int64",
30971 }).check(Schema.isInt()),
30972});
35051 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35052}).annotate({ identifier: "V2ThreadForkResponse__Thread" });
3097335053
3097435054export type V2ThreadListResponse__Thread = {
3097535055 readonly agentNickname?: string | null;
3097635056 readonly agentRole?: string | null;
3097735057 readonly cliVersion: string;
3097835058 readonly createdAt: number;
30979 readonly cwd: string;
35059 readonly cwd: V2ThreadListResponse__AbsolutePathBuf;
3098035060 readonly ephemeral: boolean;
3098135061 readonly forkedFromId?: string | null;
3098235062 readonly gitInfo?: V2ThreadListResponse__GitInfo | null;
......@@ -30988,22 +35068,8 @@ export type V2ThreadListResponse__Thread = {
3098835068 readonly preview: string;
3098935069 readonly recencyAt?: number | null;
3099035070 readonly sessionId: string;
30991 readonly source:
30992 | "cli"
30993 | "vscode"
30994 | "exec"
30995 | "appServer"
30996 | "unknown"
30997 | { readonly custom: string }
30998 | { readonly subAgent: V2ThreadListResponse__SubAgentSource };
30999 readonly status:
31000 | { readonly type: "notLoaded" }
31001 | { readonly type: "idle" }
31002 | { readonly type: "systemError" }
31003 | {
31004 readonly activeFlags: ReadonlyArray<V2ThreadListResponse__ThreadActiveFlag>;
31005 readonly type: "active";
31006 };
35071 readonly source: V2ThreadListResponse__SessionSource;
35072 readonly status: V2ThreadListResponse__ThreadStatus;
3100735073 readonly threadSource?: V2ThreadListResponse__ThreadSource | null;
3100835074 readonly turns: ReadonlyArray<V2ThreadListResponse__Turn>;
3100935075 readonly updatedAt: number;
......@@ -31032,11 +35098,11 @@ export const V2ThreadListResponse__Thread = Schema.Struct({
3103235098 createdAt: Schema.Number.annotate({
3103335099 description: "Unix timestamp (in seconds) when the thread was created.",
3103435100 format: "int64",
31035 }).check(Schema.isInt()),
31036 cwd: Schema.String.annotate({
31037 description:
31038 "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.",
31039 }),
35101 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35102 cwd: Schema.suspend(
35103 (): Schema.Codec<V2ThreadListResponse__AbsolutePathBuf> =>
35104 V2ThreadListResponse__AbsolutePathBuf,
35105 ).annotate({ description: "Working directory captured for the thread." }),
3104035106 ephemeral: Schema.Boolean.annotate({
3104135107 description: "Whether the thread is ephemeral and should not be materialized on disk.",
3104235108 }),
......@@ -31088,42 +35154,20 @@ export const V2ThreadListResponse__Thread = Schema.Struct({
3108835154 Schema.Number.annotate({
3108935155 description: "Unix timestamp (in seconds) used for thread recency ordering.",
3109035156 format: "int64",
31091 }).check(Schema.isInt()),
35157 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3109235158 Schema.Null,
3109335159 ]),
3109435160 ),
3109535161 sessionId: Schema.String.annotate({
3109635162 description: "Session id shared by threads that belong to the same session tree.",
3109735163 }),
31098 source: Schema.Union(
31099 [
31100 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
31101 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
31102 Schema.Struct({ subAgent: V2ThreadListResponse__SubAgentSource }).annotate({
31103 title: "SubAgentSessionSource",
31104 }),
31105 ],
31106 { mode: "oneOf" },
35164 source: Schema.suspend(
35165 (): Schema.Codec<V2ThreadListResponse__SessionSource> => V2ThreadListResponse__SessionSource,
3110735166 ).annotate({
3110835167 description: "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).",
3110935168 }),
31110 status: Schema.Union(
31111 [
31112 Schema.Struct({
31113 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
31114 }).annotate({ title: "NotLoadedThreadStatus" }),
31115 Schema.Struct({
31116 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
31117 }).annotate({ title: "IdleThreadStatus" }),
31118 Schema.Struct({
31119 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
31120 }).annotate({ title: "SystemErrorThreadStatus" }),
31121 Schema.Struct({
31122 activeFlags: Schema.Array(V2ThreadListResponse__ThreadActiveFlag),
31123 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
31124 }).annotate({ title: "ActiveThreadStatus" }),
31125 ],
31126 { mode: "oneOf" },
35169 status: Schema.suspend(
35170 (): Schema.Codec<V2ThreadListResponse__ThreadStatus> => V2ThreadListResponse__ThreadStatus,
3112735171 ).annotate({ description: "Current runtime status for the thread." }),
3112835172 threadSource: Schema.optionalKey(
3112935173 Schema.Union([V2ThreadListResponse__ThreadSource, Schema.Null]).annotate({
......@@ -31137,15 +35181,15 @@ export const V2ThreadListResponse__Thread = Schema.Struct({
3113735181 updatedAt: Schema.Number.annotate({
3113835182 description: "Unix timestamp (in seconds) when the thread was last updated.",
3113935183 format: "int64",
31140 }).check(Schema.isInt()),
31141});
35184 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35185}).annotate({ identifier: "V2ThreadListResponse__Thread" });
3114235186
3114335187export type V2ThreadMetadataUpdateResponse__Thread = {
3114435188 readonly agentNickname?: string | null;
3114535189 readonly agentRole?: string | null;
3114635190 readonly cliVersion: string;
3114735191 readonly createdAt: number;
31148 readonly cwd: string;
35192 readonly cwd: V2ThreadMetadataUpdateResponse__AbsolutePathBuf;
3114935193 readonly ephemeral: boolean;
3115035194 readonly forkedFromId?: string | null;
3115135195 readonly gitInfo?: V2ThreadMetadataUpdateResponse__GitInfo | null;
......@@ -31157,22 +35201,8 @@ export type V2ThreadMetadataUpdateResponse__Thread = {
3115735201 readonly preview: string;
3115835202 readonly recencyAt?: number | null;
3115935203 readonly sessionId: string;
31160 readonly source:
31161 | "cli"
31162 | "vscode"
31163 | "exec"
31164 | "appServer"
31165 | "unknown"
31166 | { readonly custom: string }
31167 | { readonly subAgent: V2ThreadMetadataUpdateResponse__SubAgentSource };
31168 readonly status:
31169 | { readonly type: "notLoaded" }
31170 | { readonly type: "idle" }
31171 | { readonly type: "systemError" }
31172 | {
31173 readonly activeFlags: ReadonlyArray<V2ThreadMetadataUpdateResponse__ThreadActiveFlag>;
31174 readonly type: "active";
31175 };
35204 readonly source: V2ThreadMetadataUpdateResponse__SessionSource;
35205 readonly status: V2ThreadMetadataUpdateResponse__ThreadStatus;
3117635206 readonly threadSource?: V2ThreadMetadataUpdateResponse__ThreadSource | null;
3117735207 readonly turns: ReadonlyArray<V2ThreadMetadataUpdateResponse__Turn>;
3117835208 readonly updatedAt: number;
......@@ -31201,11 +35231,146 @@ export const V2ThreadMetadataUpdateResponse__Thread = Schema.Struct({
3120135231 createdAt: Schema.Number.annotate({
3120235232 description: "Unix timestamp (in seconds) when the thread was created.",
3120335233 format: "int64",
31204 }).check(Schema.isInt()),
31205 cwd: Schema.String.annotate({
35234 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35235 cwd: Schema.suspend(
35236 (): Schema.Codec<V2ThreadMetadataUpdateResponse__AbsolutePathBuf> =>
35237 V2ThreadMetadataUpdateResponse__AbsolutePathBuf,
35238 ).annotate({ description: "Working directory captured for the thread." }),
35239 ephemeral: Schema.Boolean.annotate({
35240 description: "Whether the thread is ephemeral and should not be materialized on disk.",
35241 }),
35242 forkedFromId: Schema.optionalKey(
35243 Schema.Union([
35244 Schema.String.annotate({
35245 description: "Source thread id when this thread was created by forking another thread.",
35246 }),
35247 Schema.Null,
35248 ]),
35249 ),
35250 gitInfo: Schema.optionalKey(
35251 Schema.Union([V2ThreadMetadataUpdateResponse__GitInfo, Schema.Null]).annotate({
35252 description: "Optional Git metadata captured when the thread was created.",
35253 }),
35254 ),
35255 id: Schema.String.annotate({
35256 description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
35257 }),
35258 modelProvider: Schema.String.annotate({
35259 description: "Model provider used for this thread (for example, 'openai').",
35260 }),
35261 name: Schema.optionalKey(
35262 Schema.Union([
35263 Schema.String.annotate({ description: "Optional user-facing thread title." }),
35264 Schema.Null,
35265 ]),
35266 ),
35267 parentThreadId: Schema.optionalKey(
35268 Schema.Union([
35269 Schema.String.annotate({
35270 description:
35271 "The ID of the parent thread. This will only be set if this thread is a subagent.",
35272 }),
35273 Schema.Null,
35274 ]),
35275 ),
35276 path: Schema.optionalKey(
35277 Schema.Union([
35278 Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }),
35279 Schema.Null,
35280 ]),
35281 ),
35282 preview: Schema.String.annotate({
35283 description: "Usually the first user message in the thread, if available.",
35284 }),
35285 recencyAt: Schema.optionalKey(
35286 Schema.Union([
35287 Schema.Number.annotate({
35288 description: "Unix timestamp (in seconds) used for thread recency ordering.",
35289 format: "int64",
35290 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35291 Schema.Null,
35292 ]),
35293 ),
35294 sessionId: Schema.String.annotate({
35295 description: "Session id shared by threads that belong to the same session tree.",
35296 }),
35297 source: Schema.suspend(
35298 (): Schema.Codec<V2ThreadMetadataUpdateResponse__SessionSource> =>
35299 V2ThreadMetadataUpdateResponse__SessionSource,
35300 ).annotate({
35301 description: "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).",
35302 }),
35303 status: Schema.suspend(
35304 (): Schema.Codec<V2ThreadMetadataUpdateResponse__ThreadStatus> =>
35305 V2ThreadMetadataUpdateResponse__ThreadStatus,
35306 ).annotate({ description: "Current runtime status for the thread." }),
35307 threadSource: Schema.optionalKey(
35308 Schema.Union([V2ThreadMetadataUpdateResponse__ThreadSource, Schema.Null]).annotate({
35309 description: "Optional analytics source classification for this thread.",
35310 }),
35311 ),
35312 turns: Schema.Array(V2ThreadMetadataUpdateResponse__Turn).annotate({
3120635313 description:
31207 "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.",
35314 "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.",
35315 }),
35316 updatedAt: Schema.Number.annotate({
35317 description: "Unix timestamp (in seconds) when the thread was last updated.",
35318 format: "int64",
35319 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35320}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__Thread" });
35321
35322export type V2ThreadReadResponse__Thread = {
35323 readonly agentNickname?: string | null;
35324 readonly agentRole?: string | null;
35325 readonly cliVersion: string;
35326 readonly createdAt: number;
35327 readonly cwd: V2ThreadReadResponse__AbsolutePathBuf;
35328 readonly ephemeral: boolean;
35329 readonly forkedFromId?: string | null;
35330 readonly gitInfo?: V2ThreadReadResponse__GitInfo | null;
35331 readonly id: string;
35332 readonly modelProvider: string;
35333 readonly name?: string | null;
35334 readonly parentThreadId?: string | null;
35335 readonly path?: string | null;
35336 readonly preview: string;
35337 readonly recencyAt?: number | null;
35338 readonly sessionId: string;
35339 readonly source: V2ThreadReadResponse__SessionSource;
35340 readonly status: V2ThreadReadResponse__ThreadStatus;
35341 readonly threadSource?: V2ThreadReadResponse__ThreadSource | null;
35342 readonly turns: ReadonlyArray<V2ThreadReadResponse__Turn>;
35343 readonly updatedAt: number;
35344};
35345export const V2ThreadReadResponse__Thread = Schema.Struct({
35346 agentNickname: Schema.optionalKey(
35347 Schema.Union([
35348 Schema.String.annotate({
35349 description:
35350 "Optional random unique nickname assigned to an AgentControl-spawned sub-agent.",
35351 }),
35352 Schema.Null,
35353 ]),
35354 ),
35355 agentRole: Schema.optionalKey(
35356 Schema.Union([
35357 Schema.String.annotate({
35358 description: "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.",
35359 }),
35360 Schema.Null,
35361 ]),
35362 ),
35363 cliVersion: Schema.String.annotate({
35364 description: "Version of the CLI that created the thread.",
3120835365 }),
35366 createdAt: Schema.Number.annotate({
35367 description: "Unix timestamp (in seconds) when the thread was created.",
35368 format: "int64",
35369 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35370 cwd: Schema.suspend(
35371 (): Schema.Codec<V2ThreadReadResponse__AbsolutePathBuf> =>
35372 V2ThreadReadResponse__AbsolutePathBuf,
35373 ).annotate({ description: "Working directory captured for the thread." }),
3120935374 ephemeral: Schema.Boolean.annotate({
3121035375 description: "Whether the thread is ephemeral and should not be materialized on disk.",
3121135376 }),
......@@ -31218,7 +35383,7 @@ export const V2ThreadMetadataUpdateResponse__Thread = Schema.Struct({
3121835383 ]),
3121935384 ),
3122035385 gitInfo: Schema.optionalKey(
31221 Schema.Union([V2ThreadMetadataUpdateResponse__GitInfo, Schema.Null]).annotate({
35386 Schema.Union([V2ThreadReadResponse__GitInfo, Schema.Null]).annotate({
3122235387 description: "Optional Git metadata captured when the thread was created.",
3122335388 }),
3122435389 ),
......@@ -31257,67 +35422,45 @@ export const V2ThreadMetadataUpdateResponse__Thread = Schema.Struct({
3125735422 Schema.Number.annotate({
3125835423 description: "Unix timestamp (in seconds) used for thread recency ordering.",
3125935424 format: "int64",
31260 }).check(Schema.isInt()),
35425 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3126135426 Schema.Null,
3126235427 ]),
3126335428 ),
3126435429 sessionId: Schema.String.annotate({
3126535430 description: "Session id shared by threads that belong to the same session tree.",
3126635431 }),
31267 source: Schema.Union(
31268 [
31269 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
31270 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
31271 Schema.Struct({ subAgent: V2ThreadMetadataUpdateResponse__SubAgentSource }).annotate({
31272 title: "SubAgentSessionSource",
31273 }),
31274 ],
31275 { mode: "oneOf" },
35432 source: Schema.suspend(
35433 (): Schema.Codec<V2ThreadReadResponse__SessionSource> => V2ThreadReadResponse__SessionSource,
3127635434 ).annotate({
3127735435 description: "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).",
3127835436 }),
31279 status: Schema.Union(
31280 [
31281 Schema.Struct({
31282 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
31283 }).annotate({ title: "NotLoadedThreadStatus" }),
31284 Schema.Struct({
31285 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
31286 }).annotate({ title: "IdleThreadStatus" }),
31287 Schema.Struct({
31288 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
31289 }).annotate({ title: "SystemErrorThreadStatus" }),
31290 Schema.Struct({
31291 activeFlags: Schema.Array(V2ThreadMetadataUpdateResponse__ThreadActiveFlag),
31292 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
31293 }).annotate({ title: "ActiveThreadStatus" }),
31294 ],
31295 { mode: "oneOf" },
35437 status: Schema.suspend(
35438 (): Schema.Codec<V2ThreadReadResponse__ThreadStatus> => V2ThreadReadResponse__ThreadStatus,
3129635439 ).annotate({ description: "Current runtime status for the thread." }),
3129735440 threadSource: Schema.optionalKey(
31298 Schema.Union([V2ThreadMetadataUpdateResponse__ThreadSource, Schema.Null]).annotate({
35441 Schema.Union([V2ThreadReadResponse__ThreadSource, Schema.Null]).annotate({
3129935442 description: "Optional analytics source classification for this thread.",
3130035443 }),
3130135444 ),
31302 turns: Schema.Array(V2ThreadMetadataUpdateResponse__Turn).annotate({
35445 turns: Schema.Array(V2ThreadReadResponse__Turn).annotate({
3130335446 description:
3130435447 "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.",
3130535448 }),
3130635449 updatedAt: Schema.Number.annotate({
3130735450 description: "Unix timestamp (in seconds) when the thread was last updated.",
3130835451 format: "int64",
31309 }).check(Schema.isInt()),
31310});
35452 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35453}).annotate({ identifier: "V2ThreadReadResponse__Thread" });
3131135454
31312export type V2ThreadReadResponse__Thread = {
35455export type V2ThreadResumeResponse__Thread = {
3131335456 readonly agentNickname?: string | null;
3131435457 readonly agentRole?: string | null;
3131535458 readonly cliVersion: string;
3131635459 readonly createdAt: number;
31317 readonly cwd: string;
35460 readonly cwd: V2ThreadResumeResponse__AbsolutePathBuf;
3131835461 readonly ephemeral: boolean;
3131935462 readonly forkedFromId?: string | null;
31320 readonly gitInfo?: V2ThreadReadResponse__GitInfo | null;
35463 readonly gitInfo?: V2ThreadResumeResponse__GitInfo | null;
3132135464 readonly id: string;
3132235465 readonly modelProvider: string;
3132335466 readonly name?: string | null;
......@@ -31326,27 +35469,13 @@ export type V2ThreadReadResponse__Thread = {
3132635469 readonly preview: string;
3132735470 readonly recencyAt?: number | null;
3132835471 readonly sessionId: string;
31329 readonly source:
31330 | "cli"
31331 | "vscode"
31332 | "exec"
31333 | "appServer"
31334 | "unknown"
31335 | { readonly custom: string }
31336 | { readonly subAgent: V2ThreadReadResponse__SubAgentSource };
31337 readonly status:
31338 | { readonly type: "notLoaded" }
31339 | { readonly type: "idle" }
31340 | { readonly type: "systemError" }
31341 | {
31342 readonly activeFlags: ReadonlyArray<V2ThreadReadResponse__ThreadActiveFlag>;
31343 readonly type: "active";
31344 };
31345 readonly threadSource?: V2ThreadReadResponse__ThreadSource | null;
31346 readonly turns: ReadonlyArray<V2ThreadReadResponse__Turn>;
35472 readonly source: V2ThreadResumeResponse__SessionSource;
35473 readonly status: V2ThreadResumeResponse__ThreadStatus;
35474 readonly threadSource?: V2ThreadResumeResponse__ThreadSource | null;
35475 readonly turns: ReadonlyArray<V2ThreadResumeResponse__Turn>;
3134735476 readonly updatedAt: number;
3134835477};
31349export const V2ThreadReadResponse__Thread = Schema.Struct({
35478export const V2ThreadResumeResponse__Thread = Schema.Struct({
3135035479 agentNickname: Schema.optionalKey(
3135135480 Schema.Union([
3135235481 Schema.String.annotate({
......@@ -31370,11 +35499,11 @@ export const V2ThreadReadResponse__Thread = Schema.Struct({
3137035499 createdAt: Schema.Number.annotate({
3137135500 description: "Unix timestamp (in seconds) when the thread was created.",
3137235501 format: "int64",
31373 }).check(Schema.isInt()),
31374 cwd: Schema.String.annotate({
31375 description:
31376 "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.",
31377 }),
35502 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35503 cwd: Schema.suspend(
35504 (): Schema.Codec<V2ThreadResumeResponse__AbsolutePathBuf> =>
35505 V2ThreadResumeResponse__AbsolutePathBuf,
35506 ).annotate({ description: "Working directory captured for the thread." }),
3137835507 ephemeral: Schema.Boolean.annotate({
3137935508 description: "Whether the thread is ephemeral and should not be materialized on disk.",
3138035509 }),
......@@ -31387,7 +35516,7 @@ export const V2ThreadReadResponse__Thread = Schema.Struct({
3138735516 ]),
3138835517 ),
3138935518 gitInfo: Schema.optionalKey(
31390 Schema.Union([V2ThreadReadResponse__GitInfo, Schema.Null]).annotate({
35519 Schema.Union([V2ThreadResumeResponse__GitInfo, Schema.Null]).annotate({
3139135520 description: "Optional Git metadata captured when the thread was created.",
3139235521 }),
3139335522 ),
......@@ -31426,67 +35555,46 @@ export const V2ThreadReadResponse__Thread = Schema.Struct({
3142635555 Schema.Number.annotate({
3142735556 description: "Unix timestamp (in seconds) used for thread recency ordering.",
3142835557 format: "int64",
31429 }).check(Schema.isInt()),
35558 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3143035559 Schema.Null,
3143135560 ]),
3143235561 ),
3143335562 sessionId: Schema.String.annotate({
3143435563 description: "Session id shared by threads that belong to the same session tree.",
3143535564 }),
31436 source: Schema.Union(
31437 [
31438 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
31439 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
31440 Schema.Struct({ subAgent: V2ThreadReadResponse__SubAgentSource }).annotate({
31441 title: "SubAgentSessionSource",
31442 }),
31443 ],
31444 { mode: "oneOf" },
35565 source: Schema.suspend(
35566 (): Schema.Codec<V2ThreadResumeResponse__SessionSource> =>
35567 V2ThreadResumeResponse__SessionSource,
3144535568 ).annotate({
3144635569 description: "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).",
3144735570 }),
31448 status: Schema.Union(
31449 [
31450 Schema.Struct({
31451 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
31452 }).annotate({ title: "NotLoadedThreadStatus" }),
31453 Schema.Struct({
31454 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
31455 }).annotate({ title: "IdleThreadStatus" }),
31456 Schema.Struct({
31457 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
31458 }).annotate({ title: "SystemErrorThreadStatus" }),
31459 Schema.Struct({
31460 activeFlags: Schema.Array(V2ThreadReadResponse__ThreadActiveFlag),
31461 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
31462 }).annotate({ title: "ActiveThreadStatus" }),
31463 ],
31464 { mode: "oneOf" },
35571 status: Schema.suspend(
35572 (): Schema.Codec<V2ThreadResumeResponse__ThreadStatus> => V2ThreadResumeResponse__ThreadStatus,
3146535573 ).annotate({ description: "Current runtime status for the thread." }),
3146635574 threadSource: Schema.optionalKey(
31467 Schema.Union([V2ThreadReadResponse__ThreadSource, Schema.Null]).annotate({
35575 Schema.Union([V2ThreadResumeResponse__ThreadSource, Schema.Null]).annotate({
3146835576 description: "Optional analytics source classification for this thread.",
3146935577 }),
3147035578 ),
31471 turns: Schema.Array(V2ThreadReadResponse__Turn).annotate({
35579 turns: Schema.Array(V2ThreadResumeResponse__Turn).annotate({
3147235580 description:
3147335581 "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.",
3147435582 }),
3147535583 updatedAt: Schema.Number.annotate({
3147635584 description: "Unix timestamp (in seconds) when the thread was last updated.",
3147735585 format: "int64",
31478 }).check(Schema.isInt()),
31479});
35586 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35587}).annotate({ identifier: "V2ThreadResumeResponse__Thread" });
3148035588
31481export type V2ThreadResumeResponse__Thread = {
35589export type V2ThreadRollbackResponse__Thread = {
3148235590 readonly agentNickname?: string | null;
3148335591 readonly agentRole?: string | null;
3148435592 readonly cliVersion: string;
3148535593 readonly createdAt: number;
31486 readonly cwd: string;
35594 readonly cwd: V2ThreadRollbackResponse__AbsolutePathBuf;
3148735595 readonly ephemeral: boolean;
3148835596 readonly forkedFromId?: string | null;
31489 readonly gitInfo?: V2ThreadResumeResponse__GitInfo | null;
35597 readonly gitInfo?: V2ThreadRollbackResponse__GitInfo | null;
3149035598 readonly id: string;
3149135599 readonly modelProvider: string;
3149235600 readonly name?: string | null;
......@@ -31495,27 +35603,13 @@ export type V2ThreadResumeResponse__Thread = {
3149535603 readonly preview: string;
3149635604 readonly recencyAt?: number | null;
3149735605 readonly sessionId: string;
31498 readonly source:
31499 | "cli"
31500 | "vscode"
31501 | "exec"
31502 | "appServer"
31503 | "unknown"
31504 | { readonly custom: string }
31505 | { readonly subAgent: V2ThreadResumeResponse__SubAgentSource };
31506 readonly status:
31507 | { readonly type: "notLoaded" }
31508 | { readonly type: "idle" }
31509 | { readonly type: "systemError" }
31510 | {
31511 readonly activeFlags: ReadonlyArray<V2ThreadResumeResponse__ThreadActiveFlag>;
31512 readonly type: "active";
31513 };
31514 readonly threadSource?: V2ThreadResumeResponse__ThreadSource | null;
31515 readonly turns: ReadonlyArray<V2ThreadResumeResponse__Turn>;
35606 readonly source: V2ThreadRollbackResponse__SessionSource;
35607 readonly status: V2ThreadRollbackResponse__ThreadStatus;
35608 readonly threadSource?: V2ThreadRollbackResponse__ThreadSource | null;
35609 readonly turns: ReadonlyArray<V2ThreadRollbackResponse__Turn>;
3151635610 readonly updatedAt: number;
3151735611};
31518export const V2ThreadResumeResponse__Thread = Schema.Struct({
35612export const V2ThreadRollbackResponse__Thread = Schema.Struct({
3151935613 agentNickname: Schema.optionalKey(
3152035614 Schema.Union([
3152135615 Schema.String.annotate({
......@@ -31539,11 +35633,11 @@ export const V2ThreadResumeResponse__Thread = Schema.Struct({
3153935633 createdAt: Schema.Number.annotate({
3154035634 description: "Unix timestamp (in seconds) when the thread was created.",
3154135635 format: "int64",
31542 }).check(Schema.isInt()),
31543 cwd: Schema.String.annotate({
31544 description:
31545 "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.",
31546 }),
35636 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35637 cwd: Schema.suspend(
35638 (): Schema.Codec<V2ThreadRollbackResponse__AbsolutePathBuf> =>
35639 V2ThreadRollbackResponse__AbsolutePathBuf,
35640 ).annotate({ description: "Working directory captured for the thread." }),
3154735641 ephemeral: Schema.Boolean.annotate({
3154835642 description: "Whether the thread is ephemeral and should not be materialized on disk.",
3154935643 }),
......@@ -31556,7 +35650,7 @@ export const V2ThreadResumeResponse__Thread = Schema.Struct({
3155635650 ]),
3155735651 ),
3155835652 gitInfo: Schema.optionalKey(
31559 Schema.Union([V2ThreadResumeResponse__GitInfo, Schema.Null]).annotate({
35653 Schema.Union([V2ThreadRollbackResponse__GitInfo, Schema.Null]).annotate({
3156035654 description: "Optional Git metadata captured when the thread was created.",
3156135655 }),
3156235656 ),
......@@ -31595,64 +35689,44 @@ export const V2ThreadResumeResponse__Thread = Schema.Struct({
3159535689 Schema.Number.annotate({
3159635690 description: "Unix timestamp (in seconds) used for thread recency ordering.",
3159735691 format: "int64",
31598 }).check(Schema.isInt()),
35692 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3159935693 Schema.Null,
3160035694 ]),
3160135695 ),
3160235696 sessionId: Schema.String.annotate({
3160335697 description: "Session id shared by threads that belong to the same session tree.",
3160435698 }),
31605 source: Schema.Union(
31606 [
31607 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
31608 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
31609 Schema.Struct({ subAgent: V2ThreadResumeResponse__SubAgentSource }).annotate({
31610 title: "SubAgentSessionSource",
31611 }),
31612 ],
31613 { mode: "oneOf" },
35699 source: Schema.suspend(
35700 (): Schema.Codec<V2ThreadRollbackResponse__SessionSource> =>
35701 V2ThreadRollbackResponse__SessionSource,
3161435702 ).annotate({
3161535703 description: "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).",
3161635704 }),
31617 status: Schema.Union(
31618 [
31619 Schema.Struct({
31620 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
31621 }).annotate({ title: "NotLoadedThreadStatus" }),
31622 Schema.Struct({
31623 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
31624 }).annotate({ title: "IdleThreadStatus" }),
31625 Schema.Struct({
31626 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
31627 }).annotate({ title: "SystemErrorThreadStatus" }),
31628 Schema.Struct({
31629 activeFlags: Schema.Array(V2ThreadResumeResponse__ThreadActiveFlag),
31630 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
31631 }).annotate({ title: "ActiveThreadStatus" }),
31632 ],
31633 { mode: "oneOf" },
35705 status: Schema.suspend(
35706 (): Schema.Codec<V2ThreadRollbackResponse__ThreadStatus> =>
35707 V2ThreadRollbackResponse__ThreadStatus,
3163435708 ).annotate({ description: "Current runtime status for the thread." }),
3163535709 threadSource: Schema.optionalKey(
31636 Schema.Union([V2ThreadResumeResponse__ThreadSource, Schema.Null]).annotate({
35710 Schema.Union([V2ThreadRollbackResponse__ThreadSource, Schema.Null]).annotate({
3163735711 description: "Optional analytics source classification for this thread.",
3163835712 }),
3163935713 ),
31640 turns: Schema.Array(V2ThreadResumeResponse__Turn).annotate({
35714 turns: Schema.Array(V2ThreadRollbackResponse__Turn).annotate({
3164135715 description:
3164235716 "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.",
3164335717 }),
3164435718 updatedAt: Schema.Number.annotate({
3164535719 description: "Unix timestamp (in seconds) when the thread was last updated.",
3164635720 format: "int64",
31647 }).check(Schema.isInt()),
31648});
35721 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35722}).annotate({ identifier: "V2ThreadRollbackResponse__Thread" });
3164935723
3165035724export type V2ThreadStartedNotification__Thread = {
3165135725 readonly agentNickname?: string | null;
3165235726 readonly agentRole?: string | null;
3165335727 readonly cliVersion: string;
3165435728 readonly createdAt: number;
31655 readonly cwd: string;
35729 readonly cwd: V2ThreadStartedNotification__AbsolutePathBuf;
3165635730 readonly ephemeral: boolean;
3165735731 readonly forkedFromId?: string | null;
3165835732 readonly gitInfo?: V2ThreadStartedNotification__GitInfo | null;
......@@ -31664,22 +35738,8 @@ export type V2ThreadStartedNotification__Thread = {
3166435738 readonly preview: string;
3166535739 readonly recencyAt?: number | null;
3166635740 readonly sessionId: string;
31667 readonly source:
31668 | "cli"
31669 | "vscode"
31670 | "exec"
31671 | "appServer"
31672 | "unknown"
31673 | { readonly custom: string }
31674 | { readonly subAgent: V2ThreadStartedNotification__SubAgentSource };
31675 readonly status:
31676 | { readonly type: "notLoaded" }
31677 | { readonly type: "idle" }
31678 | { readonly type: "systemError" }
31679 | {
31680 readonly activeFlags: ReadonlyArray<V2ThreadStartedNotification__ThreadActiveFlag>;
31681 readonly type: "active";
31682 };
35741 readonly source: V2ThreadStartedNotification__SessionSource;
35742 readonly status: V2ThreadStartedNotification__ThreadStatus;
3168335743 readonly threadSource?: V2ThreadStartedNotification__ThreadSource | null;
3168435744 readonly turns: ReadonlyArray<V2ThreadStartedNotification__Turn>;
3168535745 readonly updatedAt: number;
......@@ -31708,11 +35768,11 @@ export const V2ThreadStartedNotification__Thread = Schema.Struct({
3170835768 createdAt: Schema.Number.annotate({
3170935769 description: "Unix timestamp (in seconds) when the thread was created.",
3171035770 format: "int64",
31711 }).check(Schema.isInt()),
31712 cwd: Schema.String.annotate({
31713 description:
31714 "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.",
31715 }),
35771 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35772 cwd: Schema.suspend(
35773 (): Schema.Codec<V2ThreadStartedNotification__AbsolutePathBuf> =>
35774 V2ThreadStartedNotification__AbsolutePathBuf,
35775 ).annotate({ description: "Working directory captured for the thread." }),
3171635776 ephemeral: Schema.Boolean.annotate({
3171735777 description: "Whether the thread is ephemeral and should not be materialized on disk.",
3171835778 }),
......@@ -31764,42 +35824,22 @@ export const V2ThreadStartedNotification__Thread = Schema.Struct({
3176435824 Schema.Number.annotate({
3176535825 description: "Unix timestamp (in seconds) used for thread recency ordering.",
3176635826 format: "int64",
31767 }).check(Schema.isInt()),
35827 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3176835828 Schema.Null,
3176935829 ]),
3177035830 ),
3177135831 sessionId: Schema.String.annotate({
3177235832 description: "Session id shared by threads that belong to the same session tree.",
3177335833 }),
31774 source: Schema.Union(
31775 [
31776 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
31777 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
31778 Schema.Struct({ subAgent: V2ThreadStartedNotification__SubAgentSource }).annotate({
31779 title: "SubAgentSessionSource",
31780 }),
31781 ],
31782 { mode: "oneOf" },
35834 source: Schema.suspend(
35835 (): Schema.Codec<V2ThreadStartedNotification__SessionSource> =>
35836 V2ThreadStartedNotification__SessionSource,
3178335837 ).annotate({
3178435838 description: "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).",
3178535839 }),
31786 status: Schema.Union(
31787 [
31788 Schema.Struct({
31789 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
31790 }).annotate({ title: "NotLoadedThreadStatus" }),
31791 Schema.Struct({
31792 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
31793 }).annotate({ title: "IdleThreadStatus" }),
31794 Schema.Struct({
31795 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
31796 }).annotate({ title: "SystemErrorThreadStatus" }),
31797 Schema.Struct({
31798 activeFlags: Schema.Array(V2ThreadStartedNotification__ThreadActiveFlag),
31799 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
31800 }).annotate({ title: "ActiveThreadStatus" }),
31801 ],
31802 { mode: "oneOf" },
35840 status: Schema.suspend(
35841 (): Schema.Codec<V2ThreadStartedNotification__ThreadStatus> =>
35842 V2ThreadStartedNotification__ThreadStatus,
3180335843 ).annotate({ description: "Current runtime status for the thread." }),
3180435844 threadSource: Schema.optionalKey(
3180535845 Schema.Union([V2ThreadStartedNotification__ThreadSource, Schema.Null]).annotate({
......@@ -31813,15 +35853,15 @@ export const V2ThreadStartedNotification__Thread = Schema.Struct({
3181335853 updatedAt: Schema.Number.annotate({
3181435854 description: "Unix timestamp (in seconds) when the thread was last updated.",
3181535855 format: "int64",
31816 }).check(Schema.isInt()),
31817});
35856 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35857}).annotate({ identifier: "V2ThreadStartedNotification__Thread" });
3181835858
3181935859export type V2ThreadStartResponse__Thread = {
3182035860 readonly agentNickname?: string | null;
3182135861 readonly agentRole?: string | null;
3182235862 readonly cliVersion: string;
3182335863 readonly createdAt: number;
31824 readonly cwd: string;
35864 readonly cwd: V2ThreadStartResponse__AbsolutePathBuf;
3182535865 readonly ephemeral: boolean;
3182635866 readonly forkedFromId?: string | null;
3182735867 readonly gitInfo?: V2ThreadStartResponse__GitInfo | null;
......@@ -31833,22 +35873,8 @@ export type V2ThreadStartResponse__Thread = {
3183335873 readonly preview: string;
3183435874 readonly recencyAt?: number | null;
3183535875 readonly sessionId: string;
31836 readonly source:
31837 | "cli"
31838 | "vscode"
31839 | "exec"
31840 | "appServer"
31841 | "unknown"
31842 | { readonly custom: string }
31843 | { readonly subAgent: V2ThreadStartResponse__SubAgentSource };
31844 readonly status:
31845 | { readonly type: "notLoaded" }
31846 | { readonly type: "idle" }
31847 | { readonly type: "systemError" }
31848 | {
31849 readonly activeFlags: ReadonlyArray<V2ThreadStartResponse__ThreadActiveFlag>;
31850 readonly type: "active";
31851 };
35876 readonly source: V2ThreadStartResponse__SessionSource;
35877 readonly status: V2ThreadStartResponse__ThreadStatus;
3185235878 readonly threadSource?: V2ThreadStartResponse__ThreadSource | null;
3185335879 readonly turns: ReadonlyArray<V2ThreadStartResponse__Turn>;
3185435880 readonly updatedAt: number;
......@@ -31877,11 +35903,11 @@ export const V2ThreadStartResponse__Thread = Schema.Struct({
3187735903 createdAt: Schema.Number.annotate({
3187835904 description: "Unix timestamp (in seconds) when the thread was created.",
3187935905 format: "int64",
31880 }).check(Schema.isInt()),
31881 cwd: Schema.String.annotate({
31882 description:
31883 "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.",
31884 }),
35906 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35907 cwd: Schema.suspend(
35908 (): Schema.Codec<V2ThreadStartResponse__AbsolutePathBuf> =>
35909 V2ThreadStartResponse__AbsolutePathBuf,
35910 ).annotate({ description: "Working directory captured for the thread." }),
3188535911 ephemeral: Schema.Boolean.annotate({
3188635912 description: "Whether the thread is ephemeral and should not be materialized on disk.",
3188735913 }),
......@@ -31933,42 +35959,20 @@ export const V2ThreadStartResponse__Thread = Schema.Struct({
3193335959 Schema.Number.annotate({
3193435960 description: "Unix timestamp (in seconds) used for thread recency ordering.",
3193535961 format: "int64",
31936 }).check(Schema.isInt()),
35962 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3193735963 Schema.Null,
3193835964 ]),
3193935965 ),
3194035966 sessionId: Schema.String.annotate({
3194135967 description: "Session id shared by threads that belong to the same session tree.",
3194235968 }),
31943 source: Schema.Union(
31944 [
31945 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
31946 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
31947 Schema.Struct({ subAgent: V2ThreadStartResponse__SubAgentSource }).annotate({
31948 title: "SubAgentSessionSource",
31949 }),
31950 ],
31951 { mode: "oneOf" },
35969 source: Schema.suspend(
35970 (): Schema.Codec<V2ThreadStartResponse__SessionSource> => V2ThreadStartResponse__SessionSource,
3195235971 ).annotate({
3195335972 description: "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).",
3195435973 }),
31955 status: Schema.Union(
31956 [
31957 Schema.Struct({
31958 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
31959 }).annotate({ title: "NotLoadedThreadStatus" }),
31960 Schema.Struct({
31961 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
31962 }).annotate({ title: "IdleThreadStatus" }),
31963 Schema.Struct({
31964 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
31965 }).annotate({ title: "SystemErrorThreadStatus" }),
31966 Schema.Struct({
31967 activeFlags: Schema.Array(V2ThreadStartResponse__ThreadActiveFlag),
31968 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
31969 }).annotate({ title: "ActiveThreadStatus" }),
31970 ],
31971 { mode: "oneOf" },
35974 status: Schema.suspend(
35975 (): Schema.Codec<V2ThreadStartResponse__ThreadStatus> => V2ThreadStartResponse__ThreadStatus,
3197235976 ).annotate({ description: "Current runtime status for the thread." }),
3197335977 threadSource: Schema.optionalKey(
3197435978 Schema.Union([V2ThreadStartResponse__ThreadSource, Schema.Null]).annotate({
......@@ -31982,15 +35986,15 @@ export const V2ThreadStartResponse__Thread = Schema.Struct({
3198235986 updatedAt: Schema.Number.annotate({
3198335987 description: "Unix timestamp (in seconds) when the thread was last updated.",
3198435988 format: "int64",
31985 }).check(Schema.isInt()),
31986});
35989 }).check(Schema.isInt().annotate({ expected: "an integer" })),
35990}).annotate({ identifier: "V2ThreadStartResponse__Thread" });
3198735991
3198835992export type V2ThreadUnarchiveResponse__Thread = {
3198935993 readonly agentNickname?: string | null;
3199035994 readonly agentRole?: string | null;
3199135995 readonly cliVersion: string;
3199235996 readonly createdAt: number;
31993 readonly cwd: string;
35997 readonly cwd: V2ThreadUnarchiveResponse__AbsolutePathBuf;
3199435998 readonly ephemeral: boolean;
3199535999 readonly forkedFromId?: string | null;
3199636000 readonly gitInfo?: V2ThreadUnarchiveResponse__GitInfo | null;
......@@ -32002,22 +36006,8 @@ export type V2ThreadUnarchiveResponse__Thread = {
3200236006 readonly preview: string;
3200336007 readonly recencyAt?: number | null;
3200436008 readonly sessionId: string;
32005 readonly source:
32006 | "cli"
32007 | "vscode"
32008 | "exec"
32009 | "appServer"
32010 | "unknown"
32011 | { readonly custom: string }
32012 | { readonly subAgent: V2ThreadUnarchiveResponse__SubAgentSource };
32013 readonly status:
32014 | { readonly type: "notLoaded" }
32015 | { readonly type: "idle" }
32016 | { readonly type: "systemError" }
32017 | {
32018 readonly activeFlags: ReadonlyArray<V2ThreadUnarchiveResponse__ThreadActiveFlag>;
32019 readonly type: "active";
32020 };
36009 readonly source: V2ThreadUnarchiveResponse__SessionSource;
36010 readonly status: V2ThreadUnarchiveResponse__ThreadStatus;
3202136011 readonly threadSource?: V2ThreadUnarchiveResponse__ThreadSource | null;
3202236012 readonly turns: ReadonlyArray<V2ThreadUnarchiveResponse__Turn>;
3202336013 readonly updatedAt: number;
......@@ -32046,11 +36036,11 @@ export const V2ThreadUnarchiveResponse__Thread = Schema.Struct({
3204636036 createdAt: Schema.Number.annotate({
3204736037 description: "Unix timestamp (in seconds) when the thread was created.",
3204836038 format: "int64",
32049 }).check(Schema.isInt()),
32050 cwd: Schema.String.annotate({
32051 description:
32052 "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.",
32053 }),
36039 }).check(Schema.isInt().annotate({ expected: "an integer" })),
36040 cwd: Schema.suspend(
36041 (): Schema.Codec<V2ThreadUnarchiveResponse__AbsolutePathBuf> =>
36042 V2ThreadUnarchiveResponse__AbsolutePathBuf,
36043 ).annotate({ description: "Working directory captured for the thread." }),
3205436044 ephemeral: Schema.Boolean.annotate({
3205536045 description: "Whether the thread is ephemeral and should not be materialized on disk.",
3205636046 }),
......@@ -32102,42 +36092,22 @@ export const V2ThreadUnarchiveResponse__Thread = Schema.Struct({
3210236092 Schema.Number.annotate({
3210336093 description: "Unix timestamp (in seconds) used for thread recency ordering.",
3210436094 format: "int64",
32105 }).check(Schema.isInt()),
36095 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3210636096 Schema.Null,
3210736097 ]),
3210836098 ),
3210936099 sessionId: Schema.String.annotate({
3211036100 description: "Session id shared by threads that belong to the same session tree.",
3211136101 }),
32112 source: Schema.Union(
32113 [
32114 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
32115 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
32116 Schema.Struct({ subAgent: V2ThreadUnarchiveResponse__SubAgentSource }).annotate({
32117 title: "SubAgentSessionSource",
32118 }),
32119 ],
32120 { mode: "oneOf" },
36102 source: Schema.suspend(
36103 (): Schema.Codec<V2ThreadUnarchiveResponse__SessionSource> =>
36104 V2ThreadUnarchiveResponse__SessionSource,
3212136105 ).annotate({
3212236106 description: "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).",
3212336107 }),
32124 status: Schema.Union(
32125 [
32126 Schema.Struct({
32127 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
32128 }).annotate({ title: "NotLoadedThreadStatus" }),
32129 Schema.Struct({
32130 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
32131 }).annotate({ title: "IdleThreadStatus" }),
32132 Schema.Struct({
32133 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
32134 }).annotate({ title: "SystemErrorThreadStatus" }),
32135 Schema.Struct({
32136 activeFlags: Schema.Array(V2ThreadUnarchiveResponse__ThreadActiveFlag),
32137 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
32138 }).annotate({ title: "ActiveThreadStatus" }),
32139 ],
32140 { mode: "oneOf" },
36108 status: Schema.suspend(
36109 (): Schema.Codec<V2ThreadUnarchiveResponse__ThreadStatus> =>
36110 V2ThreadUnarchiveResponse__ThreadStatus,
3214136111 ).annotate({ description: "Current runtime status for the thread." }),
3214236112 threadSource: Schema.optionalKey(
3214336113 Schema.Union([V2ThreadUnarchiveResponse__ThreadSource, Schema.Null]).annotate({
......@@ -32151,134 +36121,8 @@ export const V2ThreadUnarchiveResponse__Thread = Schema.Struct({
3215136121 updatedAt: Schema.Number.annotate({
3215236122 description: "Unix timestamp (in seconds) when the thread was last updated.",
3215336123 format: "int64",
32154 }).check(Schema.isInt()),
32155});
32156
32157export type McpServerElicitationRequestParams__McpElicitationPrimitiveSchema =
32158 | McpServerElicitationRequestParams__McpElicitationEnumSchema
32159 | McpServerElicitationRequestParams__McpElicitationStringSchema
32160 | McpServerElicitationRequestParams__McpElicitationNumberSchema
32161 | McpServerElicitationRequestParams__McpElicitationBooleanSchema;
32162export const McpServerElicitationRequestParams__McpElicitationPrimitiveSchema = Schema.Union([
32163 McpServerElicitationRequestParams__McpElicitationEnumSchema,
32164 McpServerElicitationRequestParams__McpElicitationStringSchema,
32165 McpServerElicitationRequestParams__McpElicitationNumberSchema,
32166 McpServerElicitationRequestParams__McpElicitationBooleanSchema,
32167]);
32168
32169export type PermissionsRequestApprovalParams__RequestPermissionProfile = {
32170 readonly fileSystem?: PermissionsRequestApprovalParams__AdditionalFileSystemPermissions | null;
32171 readonly network?: PermissionsRequestApprovalParams__AdditionalNetworkPermissions | null;
32172};
32173export const PermissionsRequestApprovalParams__RequestPermissionProfile = Schema.Struct({
32174 fileSystem: Schema.optionalKey(
32175 Schema.Union([PermissionsRequestApprovalParams__AdditionalFileSystemPermissions, Schema.Null]),
32176 ),
32177 network: Schema.optionalKey(
32178 Schema.Union([PermissionsRequestApprovalParams__AdditionalNetworkPermissions, Schema.Null]),
32179 ),
32180});
32181
32182export type PermissionsRequestApprovalResponse__GrantedPermissionProfile = {
32183 readonly fileSystem?: PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions | null;
32184 readonly network?: PermissionsRequestApprovalResponse__AdditionalNetworkPermissions | null;
32185};
32186export const PermissionsRequestApprovalResponse__GrantedPermissionProfile = Schema.Struct({
32187 fileSystem: Schema.optionalKey(
32188 Schema.Union([
32189 PermissionsRequestApprovalResponse__AdditionalFileSystemPermissions,
32190 Schema.Null,
32191 ]),
32192 ),
32193 network: Schema.optionalKey(
32194 Schema.Union([PermissionsRequestApprovalResponse__AdditionalNetworkPermissions, Schema.Null]),
32195 ),
32196});
32197
32198export type ServerNotification__RequestPermissionProfile = {
32199 readonly fileSystem?: ServerNotification__AdditionalFileSystemPermissions | null;
32200 readonly network?: ServerNotification__AdditionalNetworkPermissions | null;
32201};
32202export const ServerNotification__RequestPermissionProfile = Schema.Struct({
32203 fileSystem: Schema.optionalKey(
32204 Schema.Union([ServerNotification__AdditionalFileSystemPermissions, Schema.Null]),
32205 ),
32206 network: Schema.optionalKey(
32207 Schema.Union([ServerNotification__AdditionalNetworkPermissions, Schema.Null]),
32208 ),
32209});
32210
32211export type ServerNotification__ThreadStartedNotification = {
32212 readonly thread: ServerNotification__Thread;
32213};
32214export const ServerNotification__ThreadStartedNotification = Schema.Struct({
32215 thread: ServerNotification__Thread,
32216});
32217
32218export type ServerRequest__RequestPermissionProfile = {
32219 readonly fileSystem?: ServerRequest__AdditionalFileSystemPermissions | null;
32220 readonly network?: ServerRequest__AdditionalNetworkPermissions | null;
32221};
32222export const ServerRequest__RequestPermissionProfile = Schema.Struct({
32223 fileSystem: Schema.optionalKey(
32224 Schema.Union([ServerRequest__AdditionalFileSystemPermissions, Schema.Null]),
32225 ),
32226 network: Schema.optionalKey(
32227 Schema.Union([ServerRequest__AdditionalNetworkPermissions, Schema.Null]),
32228 ),
32229});
32230
32231export type ServerRequest__McpElicitationPrimitiveSchema =
32232 | ServerRequest__McpElicitationEnumSchema
32233 | ServerRequest__McpElicitationStringSchema
32234 | ServerRequest__McpElicitationNumberSchema
32235 | ServerRequest__McpElicitationBooleanSchema;
32236export const ServerRequest__McpElicitationPrimitiveSchema = Schema.Union([
32237 ServerRequest__McpElicitationEnumSchema,
32238 ServerRequest__McpElicitationStringSchema,
32239 ServerRequest__McpElicitationNumberSchema,
32240 ServerRequest__McpElicitationBooleanSchema,
32241]);
32242
32243export type V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile = {
32244 readonly fileSystem?: V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions | null;
32245 readonly network?: V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions | null;
32246};
32247export const V2ItemGuardianApprovalReviewCompletedNotification__RequestPermissionProfile =
32248 Schema.Struct({
32249 fileSystem: Schema.optionalKey(
32250 Schema.Union([
32251 V2ItemGuardianApprovalReviewCompletedNotification__AdditionalFileSystemPermissions,
32252 Schema.Null,
32253 ]),
32254 ),
32255 network: Schema.optionalKey(
32256 Schema.Union([
32257 V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions,
32258 Schema.Null,
32259 ]),
32260 ),
32261 });
32262
32263export type V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile = {
32264 readonly fileSystem?: V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions | null;
32265 readonly network?: V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions | null;
32266};
32267export const V2ItemGuardianApprovalReviewStartedNotification__RequestPermissionProfile =
32268 Schema.Struct({
32269 fileSystem: Schema.optionalKey(
32270 Schema.Union([
32271 V2ItemGuardianApprovalReviewStartedNotification__AdditionalFileSystemPermissions,
32272 Schema.Null,
32273 ]),
32274 ),
32275 network: Schema.optionalKey(
32276 Schema.Union([
32277 V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions,
32278 Schema.Null,
32279 ]),
32280 ),
32281 });
36124 }).check(Schema.isInt().annotate({ expected: "an integer" })),
36125}).annotate({ identifier: "V2ThreadUnarchiveResponse__Thread" });
3228236126
3228336127export type McpServerElicitationRequestParams__McpElicitationSchema = {
3228436128 readonly $schema?: string | null;
......@@ -32299,8 +36143,16 @@ export const McpServerElicitationRequestParams__McpElicitationSchema = Schema.St
3229936143}).annotate({
3230036144 description:
3230136145 "Typed form schema for MCP `elicitation/create` requests.\n\nThis matches the `requestedSchema` shape from the MCP 2025-11-25 `ElicitRequestFormParams` schema.",
36146 identifier: "McpServerElicitationRequestParams__McpElicitationSchema",
3230236147});
3230336148
36149export type ServerNotification__ThreadStartedNotification = {
36150 readonly thread: ServerNotification__Thread;
36151};
36152export const ServerNotification__ThreadStartedNotification = Schema.Struct({
36153 thread: ServerNotification__Thread,
36154}).annotate({ identifier: "ServerNotification__ThreadStartedNotification" });
36155
3230436156export type ServerNotification__GuardianApprovalReviewAction =
3230536157 | {
3230636158 readonly command: string;
......@@ -32367,8 +36219,12 @@ export const ServerNotification__GuardianApprovalReviewAction = Schema.Union(
3236736219 Schema.Struct({
3236836220 host: Schema.String,
3236936221 port: Schema.Number.annotate({ format: "uint16" })
32370 .check(Schema.isInt())
32371 .check(Schema.isGreaterThanOrEqualTo(0)),
36222 .check(Schema.isInt().annotate({ expected: "an integer" }))
36223 .check(
36224 Schema.isGreaterThanOrEqualTo(0).annotate({
36225 expected: "a value greater than or equal to 0",
36226 }),
36227 ),
3237236228 protocol: ServerNotification__NetworkApprovalProtocol,
3237336229 target: Schema.String,
3237436230 type: Schema.Literal("networkAccess").annotate({
......@@ -32394,7 +36250,7 @@ export const ServerNotification__GuardianApprovalReviewAction = Schema.Union(
3239436250 }).annotate({ title: "RequestPermissionsGuardianApprovalReviewAction" }),
3239536251 ],
3239636252 { mode: "oneOf" },
32397);
36253).annotate({ identifier: "ServerNotification__GuardianApprovalReviewAction" });
3239836254
3239936255export type ServerRequest__PermissionsRequestApprovalParams = {
3240036256 readonly cwd: ServerRequest__AbsolutePathBuf;
......@@ -32415,10 +36271,10 @@ export const ServerRequest__PermissionsRequestApprovalParams = Schema.Struct({
3241536271 startedAtMs: Schema.Number.annotate({
3241636272 description: "Unix timestamp (in milliseconds) when this approval request started.",
3241736273 format: "int64",
32418 }).check(Schema.isInt()),
36274 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3241936275 threadId: Schema.String,
3242036276 turnId: Schema.String,
32421});
36277}).annotate({ identifier: "ServerRequest__PermissionsRequestApprovalParams" });
3242236278
3242336279export type ServerRequest__McpElicitationSchema = {
3242436280 readonly $schema?: string | null;
......@@ -32434,6 +36290,7 @@ export const ServerRequest__McpElicitationSchema = Schema.Struct({
3243436290}).annotate({
3243536291 description:
3243636292 "Typed form schema for MCP `elicitation/create` requests.\n\nThis matches the `requestedSchema` shape from the MCP 2025-11-25 `ElicitRequestFormParams` schema.",
36293 identifier: "ServerRequest__McpElicitationSchema",
3243736294});
3243836295
3243936296export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewAction =
......@@ -32505,8 +36362,12 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianApproval
3250536362 Schema.Struct({
3250636363 host: Schema.String,
3250736364 port: Schema.Number.annotate({ format: "uint16" })
32508 .check(Schema.isInt())
32509 .check(Schema.isGreaterThanOrEqualTo(0)),
36365 .check(Schema.isInt().annotate({ expected: "an integer" }))
36366 .check(
36367 Schema.isGreaterThanOrEqualTo(0).annotate({
36368 expected: "a value greater than or equal to 0",
36369 }),
36370 ),
3251036371 protocol: V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol,
3251136372 target: Schema.String,
3251236373 type: Schema.Literal("networkAccess").annotate({
......@@ -32532,7 +36393,9 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianApproval
3253236393 }).annotate({ title: "RequestPermissionsGuardianApprovalReviewAction" }),
3253336394 ],
3253436395 { mode: "oneOf" },
32535 );
36396 ).annotate({
36397 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewAction",
36398 });
3253636399
3253736400export type V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewAction =
3253836401 | {
......@@ -32603,8 +36466,12 @@ export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalRe
3260336466 Schema.Struct({
3260436467 host: Schema.String,
3260536468 port: Schema.Number.annotate({ format: "uint16" })
32606 .check(Schema.isInt())
32607 .check(Schema.isGreaterThanOrEqualTo(0)),
36469 .check(Schema.isInt().annotate({ expected: "an integer" }))
36470 .check(
36471 Schema.isGreaterThanOrEqualTo(0).annotate({
36472 expected: "a value greater than or equal to 0",
36473 }),
36474 ),
3260836475 protocol: V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol,
3260936476 target: Schema.String,
3261036477 type: Schema.Literal("networkAccess").annotate({
......@@ -32630,12 +36497,12 @@ export const V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalRe
3263036497 }).annotate({ title: "RequestPermissionsGuardianApprovalReviewAction" }),
3263136498 ],
3263236499 { mode: "oneOf" },
32633 );
36500 ).annotate({
36501 identifier: "V2ItemGuardianApprovalReviewStartedNotification__GuardianApprovalReviewAction",
36502 });
3263436503
32635export type ServerNotification__ItemGuardianApprovalReviewCompletedNotification = {
36504export type ServerNotification__ItemGuardianApprovalReviewStartedNotification = {
3263636505 readonly action: ServerNotification__GuardianApprovalReviewAction;
32637 readonly completedAtMs: number;
32638 readonly decisionSource: ServerNotification__AutoReviewDecisionSource;
3263936506 readonly review: ServerNotification__GuardianApprovalReview;
3264036507 readonly reviewId: string;
3264136508 readonly startedAtMs: number;
......@@ -32643,19 +36510,14 @@ export type ServerNotification__ItemGuardianApprovalReviewCompletedNotification
3264336510 readonly threadId: string;
3264436511 readonly turnId: string;
3264536512};
32646export const ServerNotification__ItemGuardianApprovalReviewCompletedNotification = Schema.Struct({
36513export const ServerNotification__ItemGuardianApprovalReviewStartedNotification = Schema.Struct({
3264736514 action: ServerNotification__GuardianApprovalReviewAction,
32648 completedAtMs: Schema.Number.annotate({
32649 description: "Unix timestamp (in milliseconds) when this review completed.",
32650 format: "int64",
32651 }).check(Schema.isInt()),
32652 decisionSource: ServerNotification__AutoReviewDecisionSource,
3265336515 review: ServerNotification__GuardianApprovalReview,
3265436516 reviewId: Schema.String.annotate({ description: "Stable identifier for this review." }),
3265536517 startedAtMs: Schema.Number.annotate({
3265636518 description: "Unix timestamp (in milliseconds) when this review started.",
3265736519 format: "int64",
32658 }).check(Schema.isInt()),
36520 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3265936521 targetItemId: Schema.optionalKey(
3266036522 Schema.Union([
3266136523 Schema.String.annotate({
......@@ -32670,10 +36532,13 @@ export const ServerNotification__ItemGuardianApprovalReviewCompletedNotification
3267036532}).annotate({
3267136533 description:
3267236534 "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.",
36535 identifier: "ServerNotification__ItemGuardianApprovalReviewStartedNotification",
3267336536});
3267436537
32675export type ServerNotification__ItemGuardianApprovalReviewStartedNotification = {
36538export type ServerNotification__ItemGuardianApprovalReviewCompletedNotification = {
3267636539 readonly action: ServerNotification__GuardianApprovalReviewAction;
36540 readonly completedAtMs: number;
36541 readonly decisionSource: ServerNotification__AutoReviewDecisionSource;
3267736542 readonly review: ServerNotification__GuardianApprovalReview;
3267836543 readonly reviewId: string;
3267936544 readonly startedAtMs: number;
......@@ -32681,14 +36546,19 @@ export type ServerNotification__ItemGuardianApprovalReviewStartedNotification =
3268136546 readonly threadId: string;
3268236547 readonly turnId: string;
3268336548};
32684export const ServerNotification__ItemGuardianApprovalReviewStartedNotification = Schema.Struct({
36549export const ServerNotification__ItemGuardianApprovalReviewCompletedNotification = Schema.Struct({
3268536550 action: ServerNotification__GuardianApprovalReviewAction,
36551 completedAtMs: Schema.Number.annotate({
36552 description: "Unix timestamp (in milliseconds) when this review completed.",
36553 format: "int64",
36554 }).check(Schema.isInt().annotate({ expected: "an integer" })),
36555 decisionSource: ServerNotification__AutoReviewDecisionSource,
3268636556 review: ServerNotification__GuardianApprovalReview,
3268736557 reviewId: Schema.String.annotate({ description: "Stable identifier for this review." }),
3268836558 startedAtMs: Schema.Number.annotate({
3268936559 description: "Unix timestamp (in milliseconds) when this review started.",
3269036560 format: "int64",
32691 }).check(Schema.isInt()),
36561 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3269236562 targetItemId: Schema.optionalKey(
3269336563 Schema.Union([
3269436564 Schema.String.annotate({
......@@ -32703,44 +36573,41 @@ export const ServerNotification__ItemGuardianApprovalReviewStartedNotification =
3270336573}).annotate({
3270436574 description:
3270536575 "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.",
36576 identifier: "ServerNotification__ItemGuardianApprovalReviewCompletedNotification",
3270636577});
3270736578
3270836579export type ServerRequest__McpServerElicitationRequestParams =
3270936580 | {
32710 readonly _meta?: unknown;
36581 readonly serverName: string;
36582 readonly threadId: string;
36583 readonly turnId?: string | null;
36584 readonly _meta?: Schema.Json;
3271136585 readonly message: string;
3271236586 readonly mode: "form";
3271336587 readonly requestedSchema: ServerRequest__McpElicitationSchema;
36588 }
36589 | {
3271436590 readonly serverName: string;
3271536591 readonly threadId: string;
3271636592 readonly turnId?: string | null;
32717 }
32718 | {
32719 readonly _meta?: unknown;
36593 readonly _meta?: Schema.Json;
3272036594 readonly message: string;
3272136595 readonly mode: "openai/form";
32722 readonly requestedSchema: unknown;
36596 readonly requestedSchema: Schema.Json;
36597 }
36598 | {
3272336599 readonly serverName: string;
3272436600 readonly threadId: string;
3272536601 readonly turnId?: string | null;
32726 }
32727 | {
32728 readonly _meta?: unknown;
36602 readonly _meta?: Schema.Json;
3272936603 readonly elicitationId: string;
3273036604 readonly message: string;
3273136605 readonly mode: "url";
3273236606 readonly url: string;
32733 readonly serverName: string;
32734 readonly threadId: string;
32735 readonly turnId?: string | null;
3273636607 };
3273736608export const ServerRequest__McpServerElicitationRequestParams = Schema.Union(
3273836609 [
3273936610 Schema.Struct({
32740 _meta: Schema.optionalKey(Schema.Unknown),
32741 message: Schema.String,
32742 mode: Schema.Literal("form"),
32743 requestedSchema: ServerRequest__McpElicitationSchema,
3274436611 serverName: Schema.String,
3274536612 threadId: Schema.String,
3274636613 turnId: Schema.optionalKey(
......@@ -32752,12 +36619,12 @@ export const ServerRequest__McpServerElicitationRequestParams = Schema.Union(
3275236619 Schema.Null,
3275336620 ]),
3275436621 ),
36622 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
36623 message: Schema.String,
36624 mode: Schema.Literal("form"),
36625 requestedSchema: ServerRequest__McpElicitationSchema,
3275536626 }),
3275636627 Schema.Struct({
32757 _meta: Schema.optionalKey(Schema.Unknown),
32758 message: Schema.String,
32759 mode: Schema.Literal("openai/form"),
32760 requestedSchema: Schema.Unknown,
3276136628 serverName: Schema.String,
3276236629 threadId: Schema.String,
3276336630 turnId: Schema.optionalKey(
......@@ -32769,13 +36636,12 @@ export const ServerRequest__McpServerElicitationRequestParams = Schema.Union(
3276936636 Schema.Null,
3277036637 ]),
3277136638 ),
36639 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
36640 message: Schema.String,
36641 mode: Schema.Literal("openai/form"),
36642 requestedSchema: Schema.Json.annotate({ expected: "JSON value" }),
3277236643 }),
3277336644 Schema.Struct({
32774 _meta: Schema.optionalKey(Schema.Unknown),
32775 elicitationId: Schema.String,
32776 message: Schema.String,
32777 mode: Schema.Literal("url"),
32778 url: Schema.String,
3277936645 serverName: Schema.String,
3278036646 threadId: Schema.String,
3278136647 turnId: Schema.optionalKey(
......@@ -32787,10 +36653,15 @@ export const ServerRequest__McpServerElicitationRequestParams = Schema.Union(
3278736653 Schema.Null,
3278836654 ]),
3278936655 ),
36656 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
36657 elicitationId: Schema.String,
36658 message: Schema.String,
36659 mode: Schema.Literal("url"),
36660 url: Schema.String,
3279036661 }),
3279136662 ],
3279236663 { mode: "oneOf" },
32793);
36664).annotate({ identifier: "ServerRequest__McpServerElicitationRequestParams" });
3279436665
3279536666export type ApplyPatchApprovalParams = {
3279636667 readonly callId: string;
......@@ -32832,10 +36703,11 @@ export const ApplyPatchApprovalResponse = Schema.Struct({
3283236703 decision: ApplyPatchApprovalResponse__ReviewDecision,
3283336704}).annotate({ title: "ApplyPatchApprovalResponse" });
3283436705
32835export type AttestationGenerateParams = {};
32836export const AttestationGenerateParams = Schema.Struct({}).annotate({
32837 title: "AttestationGenerateParams",
32838});
36706export type AttestationGenerateParams = { readonly [x: string]: Schema.Json };
36707export const AttestationGenerateParams = Schema.Record(
36708 Schema.String,
36709 Schema.Json.annotate({ expected: "JSON value" }),
36710).annotate({ title: "AttestationGenerateParams" });
3283936711
3284036712export type AttestationGenerateResponse = { readonly token: string };
3284136713export const AttestationGenerateResponse = Schema.Struct({
......@@ -33903,39 +37775,6 @@ export const ClientRequest__AdditionalContextEntry = Schema.Struct({
3390337775 value: Schema.String,
3390437776});
3390537777
33906export type ClientRequest__ByteRange = { readonly end: number; readonly start: number };
33907export const ClientRequest__ByteRange = Schema.Struct({
33908 end: Schema.Number.annotate({ format: "uint" })
33909 .check(Schema.isInt())
33910 .check(Schema.isGreaterThanOrEqualTo(0)),
33911 start: Schema.Number.annotate({ format: "uint" })
33912 .check(Schema.isInt())
33913 .check(Schema.isGreaterThanOrEqualTo(0)),
33914});
33915
33916export type ClientRequest__CapabilityRootLocation = {
33917 readonly environmentId: string;
33918 readonly path: string;
33919 readonly type: "environment";
33920};
33921export const ClientRequest__CapabilityRootLocation = Schema.Union(
33922 [
33923 Schema.Struct({
33924 environmentId: Schema.String,
33925 path: Schema.String.annotate({
33926 description: "Absolute path for the root in the selected environment.",
33927 }),
33928 type: Schema.Literal("environment").annotate({
33929 title: "EnvironmentCapabilityRootLocationType",
33930 }),
33931 }).annotate({
33932 title: "EnvironmentCapabilityRootLocation",
33933 description: "A path owned by an execution environment.",
33934 }),
33935 ],
33936 { mode: "oneOf" },
33937).annotate({ description: "Location used to resolve a selected capability root." });
33938
3393937778export type ClientRequest__CodexResponseHandoffMode = "thinking" | "commentary" | "bemTags";
3394037779export const ClientRequest__CodexResponseHandoffMode = Schema.Literals([
3394137780 "thinking",
......@@ -33956,7 +37795,7 @@ export type ClientRequest__DynamicToolSpec =
3395637795 | {
3395737796 readonly deferLoading?: boolean;
3395837797 readonly description: string;
33959 readonly inputSchema: unknown;
37798 readonly inputSchema: Schema.Json;
3396037799 readonly name: string;
3396137800 readonly type: "function";
3396237801 }
......@@ -33971,7 +37810,7 @@ export const ClientRequest__DynamicToolSpec = Schema.Union(
3397137810 Schema.Struct({
3397237811 deferLoading: Schema.optionalKey(Schema.Boolean),
3397337812 description: Schema.String,
33974 inputSchema: Schema.Unknown,
37813 inputSchema: Schema.Json.annotate({ expected: "JSON value" }),
3397537814 name: Schema.String,
3397637815 type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolSpecType" }),
3397737816 }).annotate({ title: "FunctionDynamicToolSpec" }),
......@@ -34000,23 +37839,24 @@ export const ClientRequest__MultiAgentMode = Schema.Union(
3400037839 "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.",
3400137840});
3400237841
34003export type ClientRequest__NetworkAccess = "restricted" | "enabled";
34004export const ClientRequest__NetworkAccess = Schema.Literals(["restricted", "enabled"]);
34005
3400637842export type ClientRequest__ProcessTerminalSize = { readonly cols: number; readonly rows: number };
3400737843export const ClientRequest__ProcessTerminalSize = Schema.Struct({
3400837844 cols: Schema.Number.annotate({
3400937845 description: "Terminal width in character cells.",
3401037846 format: "uint16",
3401137847 })
34012 .check(Schema.isInt())
34013 .check(Schema.isGreaterThanOrEqualTo(0)),
37848 .check(Schema.isInt().annotate({ expected: "an integer" }))
37849 .check(
37850 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
37851 ),
3401437852 rows: Schema.Number.annotate({
3401537853 description: "Terminal height in character cells.",
3401637854 format: "uint16",
3401737855 })
34018 .check(Schema.isInt())
34019 .check(Schema.isGreaterThanOrEqualTo(0)),
37856 .check(Schema.isInt().annotate({ expected: "an integer" }))
37857 .check(
37858 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
37859 ),
3402037860}).annotate({ description: "PTY size in character cells for `process/spawn` PTY sessions." });
3402137861
3402237862export type ClientRequest__RealtimeConversationVersion = "v1" | "v2" | "v3";
......@@ -34120,7 +37960,7 @@ export type ClientRequest__ResponseItem =
3412037960 readonly type: "function_call";
3412137961 }
3412237962 | {
34123 readonly arguments: unknown;
37963 readonly arguments: Schema.Json;
3412437964 readonly call_id?: string | null;
3412537965 readonly execution: string;
3412637966 readonly id?: string | null;
......@@ -34159,7 +37999,7 @@ export type ClientRequest__ResponseItem =
3415937999 readonly id?: string | null;
3416038000 readonly internal_chat_message_metadata_passthrough?: ClientRequest__InternalChatMessageMetadataPassthrough | null;
3416138001 readonly status: string;
34162 readonly tools: ReadonlyArray<unknown>;
38002 readonly tools: ReadonlyArray<Schema.Json>;
3416338003 readonly type: "tool_search_output";
3416438004 }
3416538005 | {
......@@ -34261,7 +38101,7 @@ export const ClientRequest__ResponseItem = Schema.Union(
3426138101 type: Schema.Literal("function_call").annotate({ title: "FunctionCallResponseItemType" }),
3426238102 }).annotate({ title: "FunctionCallResponseItem" }),
3426338103 Schema.Struct({
34264 arguments: Schema.Unknown,
38104 arguments: Schema.Json.annotate({ expected: "JSON value" }),
3426538105 call_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3426638106 execution: Schema.String,
3426738107 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
......@@ -34318,7 +38158,7 @@ export const ClientRequest__ResponseItem = Schema.Union(
3431838158 Schema.Union([ClientRequest__InternalChatMessageMetadataPassthrough, Schema.Null]),
3431938159 ),
3432038160 status: Schema.String,
34321 tools: Schema.Array(Schema.Unknown),
38161 tools: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
3432238162 type: Schema.Literal("tool_search_output").annotate({
3432338163 title: "ToolSearchOutputResponseItemType",
3432438164 }),
......@@ -34378,33 +38218,16 @@ export const ClientRequest__ResponseItem = Schema.Union(
3437838218
3437938219export type ClientRequest__SelectedCapabilityRoot = {
3438038220 readonly id: string;
34381 readonly location: {
34382 readonly environmentId: string;
34383 readonly path: string;
34384 readonly type: "environment";
34385 };
38221 readonly location: ClientRequest__CapabilityRootLocation;
3438638222};
3438738223export const ClientRequest__SelectedCapabilityRoot = Schema.Struct({
3438838224 id: Schema.String.annotate({
3438938225 description: "Stable identifier supplied by the capability selection platform.",
3439038226 }),
34391 location: Schema.Union(
34392 [
34393 Schema.Struct({
34394 environmentId: Schema.String,
34395 path: Schema.String.annotate({
34396 description: "Absolute path for the root in the selected environment.",
34397 }),
34398 type: Schema.Literal("environment").annotate({
34399 title: "EnvironmentCapabilityRootLocationType",
34400 }),
34401 }).annotate({
34402 title: "EnvironmentCapabilityRootLocation",
34403 description: "A path owned by an execution environment.",
34404 }),
34405 ],
34406 { mode: "oneOf" },
34407 ).annotate({ description: "Location used to resolve a selected capability root." }),
38227 location: Schema.suspend(
38228 (): Schema.Codec<ClientRequest__CapabilityRootLocation> =>
38229 ClientRequest__CapabilityRootLocation,
38230 ).annotate({ description: "Where the selected root can be resolved." }),
3440838231}).annotate({
3440938232 description: "A user-selected root that can expose one or more runtime capabilities.",
3441038233});
......@@ -34426,16 +38249,24 @@ export const ClientRequest__ThreadRealtimeAudioChunk = Schema.Struct({
3442638249 data: Schema.String,
3442738250 itemId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3442838251 numChannels: Schema.Number.annotate({ format: "uint16" })
34429 .check(Schema.isInt())
34430 .check(Schema.isGreaterThanOrEqualTo(0)),
38252 .check(Schema.isInt().annotate({ expected: "an integer" }))
38253 .check(
38254 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
38255 ),
3443138256 sampleRate: Schema.Number.annotate({ format: "uint32" })
34432 .check(Schema.isInt())
34433 .check(Schema.isGreaterThanOrEqualTo(0)),
38257 .check(Schema.isInt().annotate({ expected: "an integer" }))
38258 .check(
38259 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
38260 ),
3443438261 samplesPerChannel: Schema.optionalKey(
3443538262 Schema.Union([
3443638263 Schema.Number.annotate({ format: "uint32" })
34437 .check(Schema.isInt())
34438 .check(Schema.isGreaterThanOrEqualTo(0)),
38264 .check(Schema.isInt().annotate({ expected: "an integer" }))
38265 .check(
38266 Schema.isGreaterThanOrEqualTo(0).annotate({
38267 expected: "a value greater than or equal to 0",
38268 }),
38269 ),
3443938270 Schema.Null,
3444038271 ]),
3444138272 ),
......@@ -34487,8 +38318,12 @@ export const ClientRequest__ThreadResumeInitialTurnsPageParams = Schema.Struct({
3448738318 limit: Schema.optionalKey(
3448838319 Schema.Union([
3448938320 Schema.Number.annotate({ description: "Optional turn page size.", format: "uint32" })
34490 .check(Schema.isInt())
34491 .check(Schema.isGreaterThanOrEqualTo(0)),
38321 .check(Schema.isInt().annotate({ expected: "an integer" }))
38322 .check(
38323 Schema.isGreaterThanOrEqualTo(0).annotate({
38324 expected: "a value greater than or equal to 0",
38325 }),
38326 ),
3449238327 Schema.Null,
3449338328 ]),
3449438329 ),
......@@ -34604,7 +38439,7 @@ export const CommandExecutionRequestApprovalParams = Schema.Struct({
3460438439 startedAtMs: Schema.Number.annotate({
3460538440 description: "Unix timestamp (in milliseconds) when this approval request started.",
3460638441 format: "int64",
34607 }).check(Schema.isInt()),
38442 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3460838443 threadId: Schema.String,
3460938444 turnId: Schema.String,
3461038445}).annotate({ title: "CommandExecutionRequestApprovalParams" });
......@@ -34685,7 +38520,7 @@ export const CommandExecutionRequestApprovalResponse = Schema.Struct({
3468538520}).annotate({ title: "CommandExecutionRequestApprovalResponse" });
3468638521
3468738522export type DynamicToolCallParams = {
34688 readonly arguments: unknown;
38523 readonly arguments: Schema.Json;
3468938524 readonly callId: string;
3469038525 readonly namespace?: string | null;
3469138526 readonly threadId: string;
......@@ -34693,7 +38528,7 @@ export type DynamicToolCallParams = {
3469338528 readonly turnId: string;
3469438529};
3469538530export const DynamicToolCallParams = Schema.Struct({
34696 arguments: Schema.Unknown,
38531 arguments: Schema.Json.annotate({ expected: "JSON value" }),
3469738532 callId: Schema.String,
3469838533 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3469938534 threadId: Schema.String,
......@@ -34774,7 +38609,7 @@ export const FileChangeRequestApprovalParams = Schema.Struct({
3477438609 startedAtMs: Schema.Number.annotate({
3477538610 description: "Unix timestamp (in milliseconds) when this approval request started.",
3477638611 format: "int64",
34777 }).check(Schema.isInt()),
38612 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3477838613 threadId: Schema.String,
3477938614 turnId: Schema.String,
3478038615}).annotate({ title: "FileChangeRequestApprovalParams" });
......@@ -34830,12 +38665,12 @@ export const GetAuthStatusParams = Schema.Struct({
3483038665}).annotate({ title: "GetAuthStatusParams" });
3483138666
3483238667export type GetAuthStatusResponse = {
34833 readonly authMethod: unknown | null;
38668 readonly authMethod: Schema.Json | null;
3483438669 readonly authToken: string | null;
3483538670 readonly requiresOpenaiAuth: boolean | null;
3483638671};
3483738672export const GetAuthStatusResponse = Schema.Struct({
34838 authMethod: Schema.Union([Schema.Unknown, Schema.Null]),
38673 authMethod: Schema.Union([Schema.Json.annotate({ expected: "JSON value" }), Schema.Null]),
3483938674 authToken: Schema.Union([Schema.String, Schema.Null]),
3484038675 requiresOpenaiAuth: Schema.Union([Schema.Boolean, Schema.Null]),
3484138676}).annotate({ title: "GetAuthStatusResponse" });
......@@ -34848,10 +38683,10 @@ export const GetConversationSummaryParams = Schema.Union(
3484838683 { mode: "oneOf" },
3484938684).annotate({ title: "GetConversationSummaryParams" });
3485038685
34851export type GetConversationSummaryResponse = { readonly summary: unknown };
34852export const GetConversationSummaryResponse = Schema.Struct({ summary: Schema.Unknown }).annotate({
34853 title: "GetConversationSummaryResponse",
34854});
38686export type GetConversationSummaryResponse = { readonly summary: Schema.Json };
38687export const GetConversationSummaryResponse = Schema.Struct({
38688 summary: Schema.Json.annotate({ expected: "JSON value" }),
38689}).annotate({ title: "GetConversationSummaryResponse" });
3485538690
3485638691export type GitDiffToRemoteParams = { readonly cwd: string };
3485738692export const GitDiffToRemoteParams = Schema.Struct({ cwd: Schema.String }).annotate({
......@@ -34878,12 +38713,14 @@ export const JSONRPCError = Schema.Struct({
3487838713
3487938714export type JSONRPCErrorError = {
3488038715 readonly code: number;
34881 readonly data?: unknown;
38716 readonly data?: Schema.Json;
3488238717 readonly message: string;
3488338718};
3488438719export const JSONRPCErrorError = Schema.Struct({
34885 code: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
34886 data: Schema.optionalKey(Schema.Unknown),
38720 code: Schema.Number.annotate({ format: "int64" }).check(
38721 Schema.isInt().annotate({ expected: "an integer" }),
38722 ),
38723 data: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
3488738724 message: Schema.String,
3488838725}).annotate({ title: "JSONRPCErrorError" });
3488938726
......@@ -34903,10 +38740,10 @@ export const JSONRPCMessage = Schema.Union([
3490338740 "Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.",
3490438741});
3490538742
34906export type JSONRPCNotification = { readonly method: string; readonly params?: unknown };
38743export type JSONRPCNotification = { readonly method: string; readonly params?: Schema.Json };
3490738744export const JSONRPCNotification = Schema.Struct({
3490838745 method: Schema.String,
34909 params: Schema.optionalKey(Schema.Unknown),
38746 params: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
3491038747}).annotate({
3491138748 title: "JSONRPCNotification",
3491238749 description: "A notification which does not expect a response.",
......@@ -34915,13 +38752,13 @@ export const JSONRPCNotification = Schema.Struct({
3491538752export type JSONRPCRequest = {
3491638753 readonly id: JSONRPCRequest__RequestId;
3491738754 readonly method: string;
34918 readonly params?: unknown;
38755 readonly params?: Schema.Json;
3491938756 readonly trace?: JSONRPCRequest__W3cTraceContext | null;
3492038757};
3492138758export const JSONRPCRequest = Schema.Struct({
3492238759 id: JSONRPCRequest__RequestId,
3492338760 method: Schema.String,
34924 params: Schema.optionalKey(Schema.Unknown),
38761 params: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
3492538762 trace: Schema.optionalKey(
3492638763 Schema.Union([JSONRPCRequest__W3cTraceContext, Schema.Null]).annotate({
3492738764 description: "Optional W3C Trace Context for distributed tracing.",
......@@ -34929,10 +38766,13 @@ export const JSONRPCRequest = Schema.Struct({
3492938766 ),
3493038767}).annotate({ title: "JSONRPCRequest", description: "A request that expects a response." });
3493138768
34932export type JSONRPCResponse = { readonly id: JSONRPCResponse__RequestId; readonly result: unknown };
38769export type JSONRPCResponse = {
38770 readonly id: JSONRPCResponse__RequestId;
38771 readonly result: Schema.Json;
38772};
3493338773export const JSONRPCResponse = Schema.Struct({
3493438774 id: JSONRPCResponse__RequestId,
34935 result: Schema.Unknown,
38775 result: Schema.Json.annotate({ expected: "JSON value" }),
3493638776}).annotate({
3493738777 title: "JSONRPCResponse",
3493838778 description: "A successful (non-error) response to a request.",
......@@ -34940,40 +38780,36 @@ export const JSONRPCResponse = Schema.Struct({
3494038780
3494138781export type McpServerElicitationRequestParams =
3494238782 | {
34943 readonly _meta?: unknown;
38783 readonly serverName: string;
38784 readonly threadId: string;
38785 readonly turnId?: string | null;
38786 readonly _meta?: Schema.Json;
3494438787 readonly message: string;
3494538788 readonly mode: "form";
3494638789 readonly requestedSchema: McpServerElicitationRequestParams__McpElicitationSchema;
38790 }
38791 | {
3494738792 readonly serverName: string;
3494838793 readonly threadId: string;
3494938794 readonly turnId?: string | null;
34950 }
34951 | {
34952 readonly _meta?: unknown;
38795 readonly _meta?: Schema.Json;
3495338796 readonly message: string;
3495438797 readonly mode: "openai/form";
34955 readonly requestedSchema: unknown;
38798 readonly requestedSchema: Schema.Json;
38799 }
38800 | {
3495638801 readonly serverName: string;
3495738802 readonly threadId: string;
3495838803 readonly turnId?: string | null;
34959 }
34960 | {
34961 readonly _meta?: unknown;
38804 readonly _meta?: Schema.Json;
3496238805 readonly elicitationId: string;
3496338806 readonly message: string;
3496438807 readonly mode: "url";
3496538808 readonly url: string;
34966 readonly serverName: string;
34967 readonly threadId: string;
34968 readonly turnId?: string | null;
3496938809 };
3497038810export const McpServerElicitationRequestParams = Schema.Union(
3497138811 [
3497238812 Schema.Struct({
34973 _meta: Schema.optionalKey(Schema.Unknown),
34974 message: Schema.String,
34975 mode: Schema.Literal("form"),
34976 requestedSchema: McpServerElicitationRequestParams__McpElicitationSchema,
3497738813 serverName: Schema.String,
3497838814 threadId: Schema.String,
3497938815 turnId: Schema.optionalKey(
......@@ -34985,12 +38821,12 @@ export const McpServerElicitationRequestParams = Schema.Union(
3498538821 Schema.Null,
3498638822 ]),
3498738823 ),
34988 }).annotate({ title: "McpServerElicitationRequestParams" }),
34989 Schema.Struct({
34990 _meta: Schema.optionalKey(Schema.Unknown),
38824 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
3499138825 message: Schema.String,
34992 mode: Schema.Literal("openai/form"),
34993 requestedSchema: Schema.Unknown,
38826 mode: Schema.Literal("form"),
38827 requestedSchema: McpServerElicitationRequestParams__McpElicitationSchema,
38828 }),
38829 Schema.Struct({
3499438830 serverName: Schema.String,
3499538831 threadId: Schema.String,
3499638832 turnId: Schema.optionalKey(
......@@ -35002,13 +38838,12 @@ export const McpServerElicitationRequestParams = Schema.Union(
3500238838 Schema.Null,
3500338839 ]),
3500438840 ),
35005 }).annotate({ title: "McpServerElicitationRequestParams" }),
35006 Schema.Struct({
35007 _meta: Schema.optionalKey(Schema.Unknown),
35008 elicitationId: Schema.String,
38841 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
3500938842 message: Schema.String,
35010 mode: Schema.Literal("url"),
35011 url: Schema.String,
38843 mode: Schema.Literal("openai/form"),
38844 requestedSchema: Schema.Json.annotate({ expected: "JSON value" }),
38845 }),
38846 Schema.Struct({
3501238847 serverName: Schema.String,
3501338848 threadId: Schema.String,
3501438849 turnId: Schema.optionalKey(
......@@ -35020,25 +38855,32 @@ export const McpServerElicitationRequestParams = Schema.Union(
3502038855 Schema.Null,
3502138856 ]),
3502238857 ),
35023 }).annotate({ title: "McpServerElicitationRequestParams" }),
38858 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
38859 elicitationId: Schema.String,
38860 message: Schema.String,
38861 mode: Schema.Literal("url"),
38862 url: Schema.String,
38863 }),
3502438864 ],
3502538865 { mode: "oneOf" },
35026);
38866).annotate({ title: "McpServerElicitationRequestParams" });
3502738867
3502838868export type McpServerElicitationRequestResponse = {
35029 readonly _meta?: unknown;
38869 readonly _meta?: Schema.Json;
3503038870 readonly action: McpServerElicitationRequestResponse__McpServerElicitationAction;
35031 readonly content?: unknown;
38871 readonly content?: Schema.Json;
3503238872};
3503338873export const McpServerElicitationRequestResponse = Schema.Struct({
3503438874 _meta: Schema.optionalKey(
35035 Schema.Unknown.annotate({
38875 Schema.Json.annotate({
38876 expected: "JSON value",
3503638877 description: "Optional client metadata for form-mode action handling.",
3503738878 }),
3503838879 ),
3503938880 action: McpServerElicitationRequestResponse__McpServerElicitationAction,
3504038881 content: Schema.optionalKey(
35041 Schema.Unknown.annotate({
38882 Schema.Json.annotate({
38883 expected: "JSON value",
3504238884 description:
3504338885 "Structured user input for accepted elicitations, mirroring RMCP `CreateElicitationResult`.\n\nThis is nullable because decline/cancel responses have no content.",
3504438886 }),
......@@ -35064,19 +38906,24 @@ export const PermissionsRequestApprovalParams = Schema.Struct({
3506438906 startedAtMs: Schema.Number.annotate({
3506538907 description: "Unix timestamp (in milliseconds) when this approval request started.",
3506638908 format: "int64",
35067 }).check(Schema.isInt()),
38909 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3506838910 threadId: Schema.String,
3506938911 turnId: Schema.String,
3507038912}).annotate({ title: "PermissionsRequestApprovalParams" });
3507138913
3507238914export type PermissionsRequestApprovalResponse = {
3507338915 readonly permissions: PermissionsRequestApprovalResponse__GrantedPermissionProfile;
35074 readonly scope?: "turn" | "session";
38916 readonly scope?: PermissionsRequestApprovalResponse__PermissionGrantScope;
3507538917 readonly strictAutoReview?: boolean | null;
3507638918};
3507738919export const PermissionsRequestApprovalResponse = Schema.Struct({
3507838920 permissions: PermissionsRequestApprovalResponse__GrantedPermissionProfile,
35079 scope: Schema.optionalKey(Schema.Literals(["turn", "session"]).annotate({ default: "turn" })),
38921 scope: Schema.optionalKey(
38922 Schema.suspend(
38923 (): Schema.Codec<PermissionsRequestApprovalResponse__PermissionGrantScope> =>
38924 PermissionsRequestApprovalResponse__PermissionGrantScope,
38925 ).annotate({ default: "turn" }),
38926 ),
3508038927 strictAutoReview: Schema.optionalKey(
3508138928 Schema.Union([
3508238929 Schema.Boolean.annotate({
......@@ -35088,1571 +38935,1296 @@ export const PermissionsRequestApprovalResponse = Schema.Struct({
3508838935 ),
3508938936}).annotate({ title: "PermissionsRequestApprovalResponse" });
3509038937
35091export type PermissionsRequestApprovalResponse__PermissionGrantScope = "turn" | "session";
35092export const PermissionsRequestApprovalResponse__PermissionGrantScope = Schema.Literals([
35093 "turn",
35094 "session",
35095]);
35096
3509738938export type RequestId = string | number;
3509838939export const RequestId = Schema.Union([
3509938940 Schema.String,
35100 Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
38941 Schema.Number.annotate({ format: "int64" }).check(
38942 Schema.isInt().annotate({ expected: "an integer" }),
38943 ),
3510138944]).annotate({ title: "RequestId" });
3510238945
3510338946export type ServerNotification =
3510438947 | {
38948 readonly emittedAtMs?: number;
3510538949 readonly method: "error";
3510638950 readonly params: ServerNotification__ErrorNotification;
35107 readonly emittedAtMs?: number;
3510838951 }
3510938952 | {
38953 readonly emittedAtMs?: number;
3511038954 readonly method: "thread/started";
3511138955 readonly params: ServerNotification__ThreadStartedNotification;
35112 readonly emittedAtMs?: number;
3511338956 }
3511438957 | {
38958 readonly emittedAtMs?: number;
3511538959 readonly method: "thread/status/changed";
3511638960 readonly params: ServerNotification__ThreadStatusChangedNotification;
35117 readonly emittedAtMs?: number;
3511838961 }
3511938962 | {
38963 readonly emittedAtMs?: number;
3512038964 readonly method: "thread/archived";
3512138965 readonly params: ServerNotification__ThreadArchivedNotification;
35122 readonly emittedAtMs?: number;
3512338966 }
3512438967 | {
38968 readonly emittedAtMs?: number;
3512538969 readonly method: "thread/deleted";
3512638970 readonly params: ServerNotification__ThreadDeletedNotification;
35127 readonly emittedAtMs?: number;
3512838971 }
3512938972 | {
38973 readonly emittedAtMs?: number;
3513038974 readonly method: "thread/unarchived";
3513138975 readonly params: ServerNotification__ThreadUnarchivedNotification;
35132 readonly emittedAtMs?: number;
3513338976 }
3513438977 | {
38978 readonly emittedAtMs?: number;
3513538979 readonly method: "thread/closed";
3513638980 readonly params: ServerNotification__ThreadClosedNotification;
35137 readonly emittedAtMs?: number;
3513838981 }
3513938982 | {
38983 readonly emittedAtMs?: number;
3514038984 readonly method: "skills/changed";
3514138985 readonly params: ServerNotification__SkillsChangedNotification;
35142 readonly emittedAtMs?: number;
3514338986 }
3514438987 | {
38988 readonly emittedAtMs?: number;
3514538989 readonly method: "thread/name/updated";
3514638990 readonly params: ServerNotification__ThreadNameUpdatedNotification;
35147 readonly emittedAtMs?: number;
3514838991 }
3514938992 | {
38993 readonly emittedAtMs?: number;
3515038994 readonly method: "thread/goal/updated";
3515138995 readonly params: ServerNotification__ThreadGoalUpdatedNotification;
35152 readonly emittedAtMs?: number;
3515338996 }
3515438997 | {
38998 readonly emittedAtMs?: number;
3515538999 readonly method: "thread/goal/cleared";
3515639000 readonly params: ServerNotification__ThreadGoalClearedNotification;
35157 readonly emittedAtMs?: number;
3515839001 }
3515939002 | {
39003 readonly emittedAtMs?: number;
3516039004 readonly method: "thread/environment/connected";
3516139005 readonly params: ServerNotification__EnvironmentConnectionNotification;
35162 readonly emittedAtMs?: number;
3516339006 }
3516439007 | {
39008 readonly emittedAtMs?: number;
3516539009 readonly method: "thread/environment/disconnected";
3516639010 readonly params: ServerNotification__EnvironmentConnectionNotification;
35167 readonly emittedAtMs?: number;
3516839011 }
3516939012 | {
39013 readonly emittedAtMs?: number;
3517039014 readonly method: "thread/settings/updated";
3517139015 readonly params: ServerNotification__ThreadSettingsUpdatedNotification;
35172 readonly emittedAtMs?: number;
3517339016 }
3517439017 | {
39018 readonly emittedAtMs?: number;
3517539019 readonly method: "thread/tokenUsage/updated";
3517639020 readonly params: ServerNotification__ThreadTokenUsageUpdatedNotification;
35177 readonly emittedAtMs?: number;
3517839021 }
3517939022 | {
39023 readonly emittedAtMs?: number;
3518039024 readonly method: "turn/started";
3518139025 readonly params: ServerNotification__TurnStartedNotification;
35182 readonly emittedAtMs?: number;
3518339026 }
3518439027 | {
39028 readonly emittedAtMs?: number;
3518539029 readonly method: "hook/started";
3518639030 readonly params: ServerNotification__HookStartedNotification;
35187 readonly emittedAtMs?: number;
3518839031 }
3518939032 | {
39033 readonly emittedAtMs?: number;
3519039034 readonly method: "turn/completed";
3519139035 readonly params: ServerNotification__TurnCompletedNotification;
35192 readonly emittedAtMs?: number;
3519339036 }
3519439037 | {
39038 readonly emittedAtMs?: number;
3519539039 readonly method: "hook/completed";
3519639040 readonly params: ServerNotification__HookCompletedNotification;
35197 readonly emittedAtMs?: number;
3519839041 }
3519939042 | {
39043 readonly emittedAtMs?: number;
3520039044 readonly method: "turn/diff/updated";
3520139045 readonly params: ServerNotification__TurnDiffUpdatedNotification;
35202 readonly emittedAtMs?: number;
3520339046 }
3520439047 | {
39048 readonly emittedAtMs?: number;
3520539049 readonly method: "turn/plan/updated";
3520639050 readonly params: ServerNotification__TurnPlanUpdatedNotification;
35207 readonly emittedAtMs?: number;
3520839051 }
3520939052 | {
39053 readonly emittedAtMs?: number;
3521039054 readonly method: "item/started";
3521139055 readonly params: ServerNotification__ItemStartedNotification;
35212 readonly emittedAtMs?: number;
3521339056 }
3521439057 | {
39058 readonly emittedAtMs?: number;
3521539059 readonly method: "item/autoApprovalReview/started";
3521639060 readonly params: ServerNotification__ItemGuardianApprovalReviewStartedNotification;
35217 readonly emittedAtMs?: number;
3521839061 }
3521939062 | {
39063 readonly emittedAtMs?: number;
3522039064 readonly method: "item/autoApprovalReview/completed";
3522139065 readonly params: ServerNotification__ItemGuardianApprovalReviewCompletedNotification;
35222 readonly emittedAtMs?: number;
3522339066 }
3522439067 | {
39068 readonly emittedAtMs?: number;
3522539069 readonly method: "item/completed";
3522639070 readonly params: ServerNotification__ItemCompletedNotification;
35227 readonly emittedAtMs?: number;
3522839071 }
3522939072 | {
39073 readonly emittedAtMs?: number;
3523039074 readonly method: "item/agentMessage/delta";
3523139075 readonly params: ServerNotification__AgentMessageDeltaNotification;
35232 readonly emittedAtMs?: number;
3523339076 }
3523439077 | {
39078 readonly emittedAtMs?: number;
3523539079 readonly method: "item/plan/delta";
3523639080 readonly params: ServerNotification__PlanDeltaNotification;
35237 readonly emittedAtMs?: number;
3523839081 }
3523939082 | {
39083 readonly emittedAtMs?: number;
3524039084 readonly method: "command/exec/outputDelta";
3524139085 readonly params: ServerNotification__CommandExecOutputDeltaNotification;
35242 readonly emittedAtMs?: number;
3524339086 }
3524439087 | {
39088 readonly emittedAtMs?: number;
3524539089 readonly method: "process/outputDelta";
3524639090 readonly params: ServerNotification__ProcessOutputDeltaNotification;
35247 readonly emittedAtMs?: number;
3524839091 }
3524939092 | {
39093 readonly emittedAtMs?: number;
3525039094 readonly method: "process/exited";
3525139095 readonly params: ServerNotification__ProcessExitedNotification;
35252 readonly emittedAtMs?: number;
3525339096 }
3525439097 | {
39098 readonly emittedAtMs?: number;
3525539099 readonly method: "item/commandExecution/outputDelta";
3525639100 readonly params: ServerNotification__CommandExecutionOutputDeltaNotification;
35257 readonly emittedAtMs?: number;
3525839101 }
3525939102 | {
39103 readonly emittedAtMs?: number;
3526039104 readonly method: "item/commandExecution/terminalInteraction";
3526139105 readonly params: ServerNotification__TerminalInteractionNotification;
35262 readonly emittedAtMs?: number;
3526339106 }
3526439107 | {
39108 readonly emittedAtMs?: number;
3526539109 readonly method: "item/fileChange/outputDelta";
3526639110 readonly params: ServerNotification__FileChangeOutputDeltaNotification;
35267 readonly emittedAtMs?: number;
3526839111 }
3526939112 | {
39113 readonly emittedAtMs?: number;
3527039114 readonly method: "item/fileChange/patchUpdated";
3527139115 readonly params: ServerNotification__FileChangePatchUpdatedNotification;
35272 readonly emittedAtMs?: number;
3527339116 }
3527439117 | {
39118 readonly emittedAtMs?: number;
3527539119 readonly method: "serverRequest/resolved";
3527639120 readonly params: ServerNotification__ServerRequestResolvedNotification;
35277 readonly emittedAtMs?: number;
3527839121 }
3527939122 | {
39123 readonly emittedAtMs?: number;
3528039124 readonly method: "item/mcpToolCall/progress";
3528139125 readonly params: ServerNotification__McpToolCallProgressNotification;
35282 readonly emittedAtMs?: number;
3528339126 }
3528439127 | {
39128 readonly emittedAtMs?: number;
3528539129 readonly method: "mcpServer/oauthLogin/completed";
3528639130 readonly params: ServerNotification__McpServerOauthLoginCompletedNotification;
35287 readonly emittedAtMs?: number;
3528839131 }
3528939132 | {
39133 readonly emittedAtMs?: number;
3529039134 readonly method: "mcpServer/startupStatus/updated";
3529139135 readonly params: ServerNotification__McpServerStatusUpdatedNotification;
35292 readonly emittedAtMs?: number;
3529339136 }
3529439137 | {
39138 readonly emittedAtMs?: number;
3529539139 readonly method: "account/updated";
3529639140 readonly params: ServerNotification__AccountUpdatedNotification;
35297 readonly emittedAtMs?: number;
3529839141 }
3529939142 | {
39143 readonly emittedAtMs?: number;
3530039144 readonly method: "account/rateLimits/updated";
3530139145 readonly params: ServerNotification__AccountRateLimitsUpdatedNotification;
35302 readonly emittedAtMs?: number;
3530339146 }
3530439147 | {
39148 readonly emittedAtMs?: number;
3530539149 readonly method: "app/list/updated";
3530639150 readonly params: ServerNotification__AppListUpdatedNotification;
35307 readonly emittedAtMs?: number;
3530839151 }
3530939152 | {
39153 readonly emittedAtMs?: number;
3531039154 readonly method: "remoteControl/status/changed";
3531139155 readonly params: ServerNotification__RemoteControlStatusChangedNotification;
35312 readonly emittedAtMs?: number;
3531339156 }
3531439157 | {
39158 readonly emittedAtMs?: number;
3531539159 readonly method: "externalAgentConfig/import/progress";
3531639160 readonly params: ServerNotification__ExternalAgentConfigImportProgressNotification;
35317 readonly emittedAtMs?: number;
3531839161 }
3531939162 | {
39163 readonly emittedAtMs?: number;
3532039164 readonly method: "externalAgentConfig/import/completed";
3532139165 readonly params: ServerNotification__ExternalAgentConfigImportCompletedNotification;
35322 readonly emittedAtMs?: number;
3532339166 }
3532439167 | {
39168 readonly emittedAtMs?: number;
3532539169 readonly method: "fs/changed";
3532639170 readonly params: ServerNotification__FsChangedNotification;
35327 readonly emittedAtMs?: number;
3532839171 }
3532939172 | {
39173 readonly emittedAtMs?: number;
3533039174 readonly method: "item/reasoning/summaryTextDelta";
3533139175 readonly params: ServerNotification__ReasoningSummaryTextDeltaNotification;
35332 readonly emittedAtMs?: number;
3533339176 }
3533439177 | {
39178 readonly emittedAtMs?: number;
3533539179 readonly method: "item/reasoning/summaryPartAdded";
3533639180 readonly params: ServerNotification__ReasoningSummaryPartAddedNotification;
35337 readonly emittedAtMs?: number;
3533839181 }
3533939182 | {
39183 readonly emittedAtMs?: number;
3534039184 readonly method: "item/reasoning/textDelta";
3534139185 readonly params: ServerNotification__ReasoningTextDeltaNotification;
35342 readonly emittedAtMs?: number;
3534339186 }
3534439187 | {
39188 readonly emittedAtMs?: number;
3534539189 readonly method: "thread/compacted";
3534639190 readonly params: ServerNotification__ContextCompactedNotification;
35347 readonly emittedAtMs?: number;
3534839191 }
3534939192 | {
39193 readonly emittedAtMs?: number;
3535039194 readonly method: "model/rerouted";
3535139195 readonly params: ServerNotification__ModelReroutedNotification;
35352 readonly emittedAtMs?: number;
3535339196 }
3535439197 | {
39198 readonly emittedAtMs?: number;
3535539199 readonly method: "model/verification";
3535639200 readonly params: ServerNotification__ModelVerificationNotification;
35357 readonly emittedAtMs?: number;
3535839201 }
3535939202 | {
39203 readonly emittedAtMs?: number;
3536039204 readonly method: "turn/moderationMetadata";
3536139205 readonly params: ServerNotification__TurnModerationMetadataNotification;
35362 readonly emittedAtMs?: number;
3536339206 }
3536439207 | {
39208 readonly emittedAtMs?: number;
3536539209 readonly method: "model/safetyBuffering/updated";
3536639210 readonly params: ServerNotification__ModelSafetyBufferingUpdatedNotification;
35367 readonly emittedAtMs?: number;
3536839211 }
3536939212 | {
39213 readonly emittedAtMs?: number;
3537039214 readonly method: "warning";
3537139215 readonly params: ServerNotification__WarningNotification;
35372 readonly emittedAtMs?: number;
3537339216 }
3537439217 | {
39218 readonly emittedAtMs?: number;
3537539219 readonly method: "guardianWarning";
3537639220 readonly params: ServerNotification__GuardianWarningNotification;
35377 readonly emittedAtMs?: number;
3537839221 }
3537939222 | {
39223 readonly emittedAtMs?: number;
3538039224 readonly method: "deprecationNotice";
3538139225 readonly params: ServerNotification__DeprecationNoticeNotification;
35382 readonly emittedAtMs?: number;
3538339226 }
3538439227 | {
39228 readonly emittedAtMs?: number;
3538539229 readonly method: "configWarning";
3538639230 readonly params: ServerNotification__ConfigWarningNotification;
35387 readonly emittedAtMs?: number;
3538839231 }
3538939232 | {
39233 readonly emittedAtMs?: number;
3539039234 readonly method: "fuzzyFileSearch/sessionUpdated";
3539139235 readonly params: ServerNotification__FuzzyFileSearchSessionUpdatedNotification;
35392 readonly emittedAtMs?: number;
3539339236 }
3539439237 | {
39238 readonly emittedAtMs?: number;
3539539239 readonly method: "fuzzyFileSearch/sessionCompleted";
3539639240 readonly params: ServerNotification__FuzzyFileSearchSessionCompletedNotification;
35397 readonly emittedAtMs?: number;
3539839241 }
3539939242 | {
39243 readonly emittedAtMs?: number;
3540039244 readonly method: "thread/realtime/started";
3540139245 readonly params: ServerNotification__ThreadRealtimeStartedNotification;
35402 readonly emittedAtMs?: number;
3540339246 }
3540439247 | {
39248 readonly emittedAtMs?: number;
3540539249 readonly method: "thread/realtime/itemAdded";
3540639250 readonly params: ServerNotification__ThreadRealtimeItemAddedNotification;
35407 readonly emittedAtMs?: number;
3540839251 }
3540939252 | {
39253 readonly emittedAtMs?: number;
3541039254 readonly method: "thread/realtime/transcript/delta";
3541139255 readonly params: ServerNotification__ThreadRealtimeTranscriptDeltaNotification;
35412 readonly emittedAtMs?: number;
3541339256 }
3541439257 | {
39258 readonly emittedAtMs?: number;
3541539259 readonly method: "thread/realtime/transcript/done";
3541639260 readonly params: ServerNotification__ThreadRealtimeTranscriptDoneNotification;
35417 readonly emittedAtMs?: number;
3541839261 }
3541939262 | {
39263 readonly emittedAtMs?: number;
3542039264 readonly method: "thread/realtime/outputAudio/delta";
3542139265 readonly params: ServerNotification__ThreadRealtimeOutputAudioDeltaNotification;
35422 readonly emittedAtMs?: number;
3542339266 }
3542439267 | {
39268 readonly emittedAtMs?: number;
3542539269 readonly method: "thread/realtime/sdp";
3542639270 readonly params: ServerNotification__ThreadRealtimeSdpNotification;
35427 readonly emittedAtMs?: number;
3542839271 }
3542939272 | {
39273 readonly emittedAtMs?: number;
3543039274 readonly method: "thread/realtime/error";
3543139275 readonly params: ServerNotification__ThreadRealtimeErrorNotification;
35432 readonly emittedAtMs?: number;
3543339276 }
3543439277 | {
39278 readonly emittedAtMs?: number;
3543539279 readonly method: "thread/realtime/closed";
3543639280 readonly params: ServerNotification__ThreadRealtimeClosedNotification;
35437 readonly emittedAtMs?: number;
3543839281 }
3543939282 | {
39283 readonly emittedAtMs?: number;
3544039284 readonly method: "windows/worldWritableWarning";
3544139285 readonly params: ServerNotification__WindowsWorldWritableWarningNotification;
35442 readonly emittedAtMs?: number;
3544339286 }
3544439287 | {
39288 readonly emittedAtMs?: number;
3544539289 readonly method: "windowsSandbox/setupCompleted";
3544639290 readonly params: ServerNotification__WindowsSandboxSetupCompletedNotification;
35447 readonly emittedAtMs?: number;
3544839291 }
3544939292 | {
39293 readonly emittedAtMs?: number;
3545039294 readonly method: "account/login/completed";
3545139295 readonly params: ServerNotification__AccountLoginCompletedNotification;
35452 readonly emittedAtMs?: number;
3545339296 };
3545439297export const ServerNotification = Schema.Union(
3545539298 [
3545639299 Schema.Struct({
39300 emittedAtMs: Schema.optionalKey(
39301 Schema.Number.annotate({
39302 description:
39303 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
39304 format: "int64",
39305 }).check(Schema.isInt().annotate({ expected: "an integer" })),
39306 ),
3545739307 method: Schema.Literal("error").annotate({ title: "ErrorNotificationMethod" }),
3545839308 params: ServerNotification__ErrorNotification,
39309 }).annotate({ title: "ErrorNotification", description: "NEW NOTIFICATIONS" }),
39310 Schema.Struct({
3545939311 emittedAtMs: Schema.optionalKey(
3546039312 Schema.Number.annotate({
3546139313 description:
3546239314 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3546339315 format: "int64",
35464 }).check(Schema.isInt()),
39316 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3546539317 ),
35466 }).annotate({
35467 title: "ServerNotification",
35468 description: "Notification sent from the server to the client.",
35469 }),
35470 Schema.Struct({
3547139318 method: Schema.Literal("thread/started").annotate({
3547239319 title: "Thread/startedNotificationMethod",
3547339320 }),
3547439321 params: ServerNotification__ThreadStartedNotification,
39322 }).annotate({ title: "Thread/startedNotification" }),
39323 Schema.Struct({
3547539324 emittedAtMs: Schema.optionalKey(
3547639325 Schema.Number.annotate({
3547739326 description:
3547839327 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3547939328 format: "int64",
35480 }).check(Schema.isInt()),
39329 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3548139330 ),
35482 }).annotate({
35483 title: "ServerNotification",
35484 description: "Notification sent from the server to the client.",
35485 }),
35486 Schema.Struct({
3548739331 method: Schema.Literal("thread/status/changed").annotate({
3548839332 title: "Thread/status/changedNotificationMethod",
3548939333 }),
3549039334 params: ServerNotification__ThreadStatusChangedNotification,
39335 }).annotate({ title: "Thread/status/changedNotification" }),
39336 Schema.Struct({
3549139337 emittedAtMs: Schema.optionalKey(
3549239338 Schema.Number.annotate({
3549339339 description:
3549439340 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3549539341 format: "int64",
35496 }).check(Schema.isInt()),
39342 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3549739343 ),
35498 }).annotate({
35499 title: "ServerNotification",
35500 description: "Notification sent from the server to the client.",
35501 }),
35502 Schema.Struct({
3550339344 method: Schema.Literal("thread/archived").annotate({
3550439345 title: "Thread/archivedNotificationMethod",
3550539346 }),
3550639347 params: ServerNotification__ThreadArchivedNotification,
39348 }).annotate({ title: "Thread/archivedNotification" }),
39349 Schema.Struct({
3550739350 emittedAtMs: Schema.optionalKey(
3550839351 Schema.Number.annotate({
3550939352 description:
3551039353 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3551139354 format: "int64",
35512 }).check(Schema.isInt()),
39355 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3551339356 ),
35514 }).annotate({
35515 title: "ServerNotification",
35516 description: "Notification sent from the server to the client.",
35517 }),
35518 Schema.Struct({
3551939357 method: Schema.Literal("thread/deleted").annotate({
3552039358 title: "Thread/deletedNotificationMethod",
3552139359 }),
3552239360 params: ServerNotification__ThreadDeletedNotification,
39361 }).annotate({ title: "Thread/deletedNotification" }),
39362 Schema.Struct({
3552339363 emittedAtMs: Schema.optionalKey(
3552439364 Schema.Number.annotate({
3552539365 description:
3552639366 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3552739367 format: "int64",
35528 }).check(Schema.isInt()),
39368 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3552939369 ),
35530 }).annotate({
35531 title: "ServerNotification",
35532 description: "Notification sent from the server to the client.",
35533 }),
35534 Schema.Struct({
3553539370 method: Schema.Literal("thread/unarchived").annotate({
3553639371 title: "Thread/unarchivedNotificationMethod",
3553739372 }),
3553839373 params: ServerNotification__ThreadUnarchivedNotification,
39374 }).annotate({ title: "Thread/unarchivedNotification" }),
39375 Schema.Struct({
3553939376 emittedAtMs: Schema.optionalKey(
3554039377 Schema.Number.annotate({
3554139378 description:
3554239379 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3554339380 format: "int64",
35544 }).check(Schema.isInt()),
39381 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3554539382 ),
35546 }).annotate({
35547 title: "ServerNotification",
35548 description: "Notification sent from the server to the client.",
35549 }),
35550 Schema.Struct({
3555139383 method: Schema.Literal("thread/closed").annotate({
3555239384 title: "Thread/closedNotificationMethod",
3555339385 }),
3555439386 params: ServerNotification__ThreadClosedNotification,
39387 }).annotate({ title: "Thread/closedNotification" }),
39388 Schema.Struct({
3555539389 emittedAtMs: Schema.optionalKey(
3555639390 Schema.Number.annotate({
3555739391 description:
3555839392 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3555939393 format: "int64",
35560 }).check(Schema.isInt()),
39394 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3556139395 ),
35562 }).annotate({
35563 title: "ServerNotification",
35564 description: "Notification sent from the server to the client.",
35565 }),
35566 Schema.Struct({
3556739396 method: Schema.Literal("skills/changed").annotate({
3556839397 title: "Skills/changedNotificationMethod",
3556939398 }),
3557039399 params: ServerNotification__SkillsChangedNotification,
39400 }).annotate({ title: "Skills/changedNotification" }),
39401 Schema.Struct({
3557139402 emittedAtMs: Schema.optionalKey(
3557239403 Schema.Number.annotate({
3557339404 description:
3557439405 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3557539406 format: "int64",
35576 }).check(Schema.isInt()),
39407 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3557739408 ),
35578 }).annotate({
35579 title: "ServerNotification",
35580 description: "Notification sent from the server to the client.",
35581 }),
35582 Schema.Struct({
3558339409 method: Schema.Literal("thread/name/updated").annotate({
3558439410 title: "Thread/name/updatedNotificationMethod",
3558539411 }),
3558639412 params: ServerNotification__ThreadNameUpdatedNotification,
39413 }).annotate({ title: "Thread/name/updatedNotification" }),
39414 Schema.Struct({
3558739415 emittedAtMs: Schema.optionalKey(
3558839416 Schema.Number.annotate({
3558939417 description:
3559039418 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3559139419 format: "int64",
35592 }).check(Schema.isInt()),
39420 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3559339421 ),
35594 }).annotate({
35595 title: "ServerNotification",
35596 description: "Notification sent from the server to the client.",
35597 }),
35598 Schema.Struct({
3559939422 method: Schema.Literal("thread/goal/updated").annotate({
3560039423 title: "Thread/goal/updatedNotificationMethod",
3560139424 }),
3560239425 params: ServerNotification__ThreadGoalUpdatedNotification,
39426 }).annotate({ title: "Thread/goal/updatedNotification" }),
39427 Schema.Struct({
3560339428 emittedAtMs: Schema.optionalKey(
3560439429 Schema.Number.annotate({
3560539430 description:
3560639431 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3560739432 format: "int64",
35608 }).check(Schema.isInt()),
39433 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3560939434 ),
35610 }).annotate({
35611 title: "ServerNotification",
35612 description: "Notification sent from the server to the client.",
35613 }),
35614 Schema.Struct({
3561539435 method: Schema.Literal("thread/goal/cleared").annotate({
3561639436 title: "Thread/goal/clearedNotificationMethod",
3561739437 }),
3561839438 params: ServerNotification__ThreadGoalClearedNotification,
39439 }).annotate({ title: "Thread/goal/clearedNotification" }),
39440 Schema.Struct({
3561939441 emittedAtMs: Schema.optionalKey(
3562039442 Schema.Number.annotate({
3562139443 description:
3562239444 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3562339445 format: "int64",
35624 }).check(Schema.isInt()),
39446 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3562539447 ),
35626 }).annotate({
35627 title: "ServerNotification",
35628 description: "Notification sent from the server to the client.",
35629 }),
35630 Schema.Struct({
3563139448 method: Schema.Literal("thread/environment/connected").annotate({
3563239449 title: "Thread/environment/connectedNotificationMethod",
3563339450 }),
3563439451 params: ServerNotification__EnvironmentConnectionNotification,
39452 }).annotate({ title: "Thread/environment/connectedNotification" }),
39453 Schema.Struct({
3563539454 emittedAtMs: Schema.optionalKey(
3563639455 Schema.Number.annotate({
3563739456 description:
3563839457 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3563939458 format: "int64",
35640 }).check(Schema.isInt()),
39459 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3564139460 ),
35642 }).annotate({
35643 title: "ServerNotification",
35644 description: "Notification sent from the server to the client.",
35645 }),
35646 Schema.Struct({
3564739461 method: Schema.Literal("thread/environment/disconnected").annotate({
3564839462 title: "Thread/environment/disconnectedNotificationMethod",
3564939463 }),
3565039464 params: ServerNotification__EnvironmentConnectionNotification,
39465 }).annotate({ title: "Thread/environment/disconnectedNotification" }),
39466 Schema.Struct({
3565139467 emittedAtMs: Schema.optionalKey(
3565239468 Schema.Number.annotate({
3565339469 description:
3565439470 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3565539471 format: "int64",
35656 }).check(Schema.isInt()),
39472 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3565739473 ),
35658 }).annotate({
35659 title: "ServerNotification",
35660 description: "Notification sent from the server to the client.",
35661 }),
35662 Schema.Struct({
3566339474 method: Schema.Literal("thread/settings/updated").annotate({
3566439475 title: "Thread/settings/updatedNotificationMethod",
3566539476 }),
3566639477 params: ServerNotification__ThreadSettingsUpdatedNotification,
39478 }).annotate({ title: "Thread/settings/updatedNotification" }),
39479 Schema.Struct({
3566739480 emittedAtMs: Schema.optionalKey(
3566839481 Schema.Number.annotate({
3566939482 description:
3567039483 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3567139484 format: "int64",
35672 }).check(Schema.isInt()),
39485 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3567339486 ),
35674 }).annotate({
35675 title: "ServerNotification",
35676 description: "Notification sent from the server to the client.",
35677 }),
35678 Schema.Struct({
3567939487 method: Schema.Literal("thread/tokenUsage/updated").annotate({
3568039488 title: "Thread/tokenUsage/updatedNotificationMethod",
3568139489 }),
3568239490 params: ServerNotification__ThreadTokenUsageUpdatedNotification,
39491 }).annotate({ title: "Thread/tokenUsage/updatedNotification" }),
39492 Schema.Struct({
3568339493 emittedAtMs: Schema.optionalKey(
3568439494 Schema.Number.annotate({
3568539495 description:
3568639496 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3568739497 format: "int64",
35688 }).check(Schema.isInt()),
39498 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3568939499 ),
35690 }).annotate({
35691 title: "ServerNotification",
35692 description: "Notification sent from the server to the client.",
35693 }),
35694 Schema.Struct({
3569539500 method: Schema.Literal("turn/started").annotate({ title: "Turn/startedNotificationMethod" }),
3569639501 params: ServerNotification__TurnStartedNotification,
39502 }).annotate({ title: "Turn/startedNotification" }),
39503 Schema.Struct({
3569739504 emittedAtMs: Schema.optionalKey(
3569839505 Schema.Number.annotate({
3569939506 description:
3570039507 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3570139508 format: "int64",
35702 }).check(Schema.isInt()),
39509 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3570339510 ),
35704 }).annotate({
35705 title: "ServerNotification",
35706 description: "Notification sent from the server to the client.",
35707 }),
35708 Schema.Struct({
3570939511 method: Schema.Literal("hook/started").annotate({ title: "Hook/startedNotificationMethod" }),
3571039512 params: ServerNotification__HookStartedNotification,
39513 }).annotate({ title: "Hook/startedNotification" }),
39514 Schema.Struct({
3571139515 emittedAtMs: Schema.optionalKey(
3571239516 Schema.Number.annotate({
3571339517 description:
3571439518 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3571539519 format: "int64",
35716 }).check(Schema.isInt()),
39520 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3571739521 ),
35718 }).annotate({
35719 title: "ServerNotification",
35720 description: "Notification sent from the server to the client.",
35721 }),
35722 Schema.Struct({
3572339522 method: Schema.Literal("turn/completed").annotate({
3572439523 title: "Turn/completedNotificationMethod",
3572539524 }),
3572639525 params: ServerNotification__TurnCompletedNotification,
39526 }).annotate({ title: "Turn/completedNotification" }),
39527 Schema.Struct({
3572739528 emittedAtMs: Schema.optionalKey(
3572839529 Schema.Number.annotate({
3572939530 description:
3573039531 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3573139532 format: "int64",
35732 }).check(Schema.isInt()),
39533 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3573339534 ),
35734 }).annotate({
35735 title: "ServerNotification",
35736 description: "Notification sent from the server to the client.",
35737 }),
35738 Schema.Struct({
3573939535 method: Schema.Literal("hook/completed").annotate({
3574039536 title: "Hook/completedNotificationMethod",
3574139537 }),
3574239538 params: ServerNotification__HookCompletedNotification,
39539 }).annotate({ title: "Hook/completedNotification" }),
39540 Schema.Struct({
3574339541 emittedAtMs: Schema.optionalKey(
3574439542 Schema.Number.annotate({
3574539543 description:
3574639544 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3574739545 format: "int64",
35748 }).check(Schema.isInt()),
39546 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3574939547 ),
35750 }).annotate({
35751 title: "ServerNotification",
35752 description: "Notification sent from the server to the client.",
35753 }),
35754 Schema.Struct({
3575539548 method: Schema.Literal("turn/diff/updated").annotate({
3575639549 title: "Turn/diff/updatedNotificationMethod",
3575739550 }),
3575839551 params: ServerNotification__TurnDiffUpdatedNotification,
39552 }).annotate({ title: "Turn/diff/updatedNotification" }),
39553 Schema.Struct({
3575939554 emittedAtMs: Schema.optionalKey(
3576039555 Schema.Number.annotate({
3576139556 description:
3576239557 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3576339558 format: "int64",
35764 }).check(Schema.isInt()),
39559 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3576539560 ),
35766 }).annotate({
35767 title: "ServerNotification",
35768 description: "Notification sent from the server to the client.",
35769 }),
35770 Schema.Struct({
3577139561 method: Schema.Literal("turn/plan/updated").annotate({
3577239562 title: "Turn/plan/updatedNotificationMethod",
3577339563 }),
3577439564 params: ServerNotification__TurnPlanUpdatedNotification,
39565 }).annotate({ title: "Turn/plan/updatedNotification" }),
39566 Schema.Struct({
3577539567 emittedAtMs: Schema.optionalKey(
3577639568 Schema.Number.annotate({
3577739569 description:
3577839570 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3577939571 format: "int64",
35780 }).check(Schema.isInt()),
39572 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3578139573 ),
35782 }).annotate({
35783 title: "ServerNotification",
35784 description: "Notification sent from the server to the client.",
35785 }),
35786 Schema.Struct({
3578739574 method: Schema.Literal("item/started").annotate({ title: "Item/startedNotificationMethod" }),
3578839575 params: ServerNotification__ItemStartedNotification,
39576 }).annotate({ title: "Item/startedNotification" }),
39577 Schema.Struct({
3578939578 emittedAtMs: Schema.optionalKey(
3579039579 Schema.Number.annotate({
3579139580 description:
3579239581 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3579339582 format: "int64",
35794 }).check(Schema.isInt()),
39583 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3579539584 ),
35796 }).annotate({
35797 title: "ServerNotification",
35798 description: "Notification sent from the server to the client.",
35799 }),
35800 Schema.Struct({
3580139585 method: Schema.Literal("item/autoApprovalReview/started").annotate({
3580239586 title: "Item/autoApprovalReview/startedNotificationMethod",
3580339587 }),
3580439588 params: ServerNotification__ItemGuardianApprovalReviewStartedNotification,
39589 }).annotate({ title: "Item/autoApprovalReview/startedNotification" }),
39590 Schema.Struct({
3580539591 emittedAtMs: Schema.optionalKey(
3580639592 Schema.Number.annotate({
3580739593 description:
3580839594 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3580939595 format: "int64",
35810 }).check(Schema.isInt()),
39596 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3581139597 ),
35812 }).annotate({
35813 title: "ServerNotification",
35814 description: "Notification sent from the server to the client.",
35815 }),
35816 Schema.Struct({
3581739598 method: Schema.Literal("item/autoApprovalReview/completed").annotate({
3581839599 title: "Item/autoApprovalReview/completedNotificationMethod",
3581939600 }),
3582039601 params: ServerNotification__ItemGuardianApprovalReviewCompletedNotification,
39602 }).annotate({ title: "Item/autoApprovalReview/completedNotification" }),
39603 Schema.Struct({
3582139604 emittedAtMs: Schema.optionalKey(
3582239605 Schema.Number.annotate({
3582339606 description:
3582439607 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3582539608 format: "int64",
35826 }).check(Schema.isInt()),
39609 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3582739610 ),
35828 }).annotate({
35829 title: "ServerNotification",
35830 description: "Notification sent from the server to the client.",
35831 }),
35832 Schema.Struct({
3583339611 method: Schema.Literal("item/completed").annotate({
3583439612 title: "Item/completedNotificationMethod",
3583539613 }),
3583639614 params: ServerNotification__ItemCompletedNotification,
39615 }).annotate({ title: "Item/completedNotification" }),
39616 Schema.Struct({
3583739617 emittedAtMs: Schema.optionalKey(
3583839618 Schema.Number.annotate({
3583939619 description:
3584039620 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3584139621 format: "int64",
35842 }).check(Schema.isInt()),
39622 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3584339623 ),
35844 }).annotate({
35845 title: "ServerNotification",
35846 description: "Notification sent from the server to the client.",
35847 }),
35848 Schema.Struct({
3584939624 method: Schema.Literal("item/agentMessage/delta").annotate({
3585039625 title: "Item/agentMessage/deltaNotificationMethod",
3585139626 }),
3585239627 params: ServerNotification__AgentMessageDeltaNotification,
39628 }).annotate({ title: "Item/agentMessage/deltaNotification" }),
39629 Schema.Struct({
3585339630 emittedAtMs: Schema.optionalKey(
3585439631 Schema.Number.annotate({
3585539632 description:
3585639633 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3585739634 format: "int64",
35858 }).check(Schema.isInt()),
39635 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3585939636 ),
35860 }).annotate({
35861 title: "ServerNotification",
35862 description: "Notification sent from the server to the client.",
35863 }),
35864 Schema.Struct({
3586539637 method: Schema.Literal("item/plan/delta").annotate({
3586639638 title: "Item/plan/deltaNotificationMethod",
3586739639 }),
3586839640 params: ServerNotification__PlanDeltaNotification,
39641 }).annotate({
39642 title: "Item/plan/deltaNotification",
39643 description: "EXPERIMENTAL - proposed plan streaming deltas for plan items.",
39644 }),
39645 Schema.Struct({
3586939646 emittedAtMs: Schema.optionalKey(
3587039647 Schema.Number.annotate({
3587139648 description:
3587239649 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3587339650 format: "int64",
35874 }).check(Schema.isInt()),
39651 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3587539652 ),
35876 }).annotate({
35877 title: "ServerNotification",
35878 description: "Notification sent from the server to the client.",
35879 }),
35880 Schema.Struct({
3588139653 method: Schema.Literal("command/exec/outputDelta").annotate({
3588239654 title: "Command/exec/outputDeltaNotificationMethod",
3588339655 }),
3588439656 params: ServerNotification__CommandExecOutputDeltaNotification,
39657 }).annotate({
39658 title: "Command/exec/outputDeltaNotification",
39659 description:
39660 "Stream base64-encoded stdout/stderr chunks for a running `command/exec` session.",
39661 }),
39662 Schema.Struct({
3588539663 emittedAtMs: Schema.optionalKey(
3588639664 Schema.Number.annotate({
3588739665 description:
3588839666 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3588939667 format: "int64",
35890 }).check(Schema.isInt()),
39668 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3589139669 ),
35892 }).annotate({
35893 title: "ServerNotification",
35894 description: "Notification sent from the server to the client.",
35895 }),
35896 Schema.Struct({
3589739670 method: Schema.Literal("process/outputDelta").annotate({
3589839671 title: "Process/outputDeltaNotificationMethod",
3589939672 }),
3590039673 params: ServerNotification__ProcessOutputDeltaNotification,
39674 }).annotate({
39675 title: "Process/outputDeltaNotification",
39676 description:
39677 "Stream base64-encoded stdout/stderr chunks for a running `process/spawn` session.",
39678 }),
39679 Schema.Struct({
3590139680 emittedAtMs: Schema.optionalKey(
3590239681 Schema.Number.annotate({
3590339682 description:
3590439683 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3590539684 format: "int64",
35906 }).check(Schema.isInt()),
39685 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3590739686 ),
35908 }).annotate({
35909 title: "ServerNotification",
35910 description: "Notification sent from the server to the client.",
35911 }),
35912 Schema.Struct({
3591339687 method: Schema.Literal("process/exited").annotate({
3591439688 title: "Process/exitedNotificationMethod",
3591539689 }),
3591639690 params: ServerNotification__ProcessExitedNotification,
39691 }).annotate({
39692 title: "Process/exitedNotification",
39693 description: "Final exit notification for a `process/spawn` session.",
39694 }),
39695 Schema.Struct({
3591739696 emittedAtMs: Schema.optionalKey(
3591839697 Schema.Number.annotate({
3591939698 description:
3592039699 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3592139700 format: "int64",
35922 }).check(Schema.isInt()),
39701 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3592339702 ),
35924 }).annotate({
35925 title: "ServerNotification",
35926 description: "Notification sent from the server to the client.",
35927 }),
35928 Schema.Struct({
3592939703 method: Schema.Literal("item/commandExecution/outputDelta").annotate({
3593039704 title: "Item/commandExecution/outputDeltaNotificationMethod",
3593139705 }),
3593239706 params: ServerNotification__CommandExecutionOutputDeltaNotification,
39707 }).annotate({ title: "Item/commandExecution/outputDeltaNotification" }),
39708 Schema.Struct({
3593339709 emittedAtMs: Schema.optionalKey(
3593439710 Schema.Number.annotate({
3593539711 description:
3593639712 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3593739713 format: "int64",
35938 }).check(Schema.isInt()),
39714 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3593939715 ),
35940 }).annotate({
35941 title: "ServerNotification",
35942 description: "Notification sent from the server to the client.",
35943 }),
35944 Schema.Struct({
3594539716 method: Schema.Literal("item/commandExecution/terminalInteraction").annotate({
3594639717 title: "Item/commandExecution/terminalInteractionNotificationMethod",
3594739718 }),
3594839719 params: ServerNotification__TerminalInteractionNotification,
39720 }).annotate({ title: "Item/commandExecution/terminalInteractionNotification" }),
39721 Schema.Struct({
3594939722 emittedAtMs: Schema.optionalKey(
3595039723 Schema.Number.annotate({
3595139724 description:
3595239725 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3595339726 format: "int64",
35954 }).check(Schema.isInt()),
39727 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3595539728 ),
35956 }).annotate({
35957 title: "ServerNotification",
35958 description: "Notification sent from the server to the client.",
35959 }),
35960 Schema.Struct({
3596139729 method: Schema.Literal("item/fileChange/outputDelta").annotate({
3596239730 title: "Item/fileChange/outputDeltaNotificationMethod",
3596339731 }),
3596439732 params: ServerNotification__FileChangeOutputDeltaNotification,
39733 }).annotate({
39734 title: "Item/fileChange/outputDeltaNotification",
39735 description: "Deprecated legacy apply_patch output stream notification.",
39736 }),
39737 Schema.Struct({
3596539738 emittedAtMs: Schema.optionalKey(
3596639739 Schema.Number.annotate({
3596739740 description:
3596839741 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3596939742 format: "int64",
35970 }).check(Schema.isInt()),
39743 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3597139744 ),
35972 }).annotate({
35973 title: "ServerNotification",
35974 description: "Notification sent from the server to the client.",
35975 }),
35976 Schema.Struct({
3597739745 method: Schema.Literal("item/fileChange/patchUpdated").annotate({
3597839746 title: "Item/fileChange/patchUpdatedNotificationMethod",
3597939747 }),
3598039748 params: ServerNotification__FileChangePatchUpdatedNotification,
39749 }).annotate({ title: "Item/fileChange/patchUpdatedNotification" }),
39750 Schema.Struct({
3598139751 emittedAtMs: Schema.optionalKey(
3598239752 Schema.Number.annotate({
3598339753 description:
3598439754 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3598539755 format: "int64",
35986 }).check(Schema.isInt()),
39756 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3598739757 ),
35988 }).annotate({
35989 title: "ServerNotification",
35990 description: "Notification sent from the server to the client.",
35991 }),
35992 Schema.Struct({
3599339758 method: Schema.Literal("serverRequest/resolved").annotate({
3599439759 title: "ServerRequest/resolvedNotificationMethod",
3599539760 }),
3599639761 params: ServerNotification__ServerRequestResolvedNotification,
39762 }).annotate({ title: "ServerRequest/resolvedNotification" }),
39763 Schema.Struct({
3599739764 emittedAtMs: Schema.optionalKey(
3599839765 Schema.Number.annotate({
3599939766 description:
3600039767 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3600139768 format: "int64",
36002 }).check(Schema.isInt()),
39769 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3600339770 ),
36004 }).annotate({
36005 title: "ServerNotification",
36006 description: "Notification sent from the server to the client.",
36007 }),
36008 Schema.Struct({
3600939771 method: Schema.Literal("item/mcpToolCall/progress").annotate({
3601039772 title: "Item/mcpToolCall/progressNotificationMethod",
3601139773 }),
3601239774 params: ServerNotification__McpToolCallProgressNotification,
39775 }).annotate({ title: "Item/mcpToolCall/progressNotification" }),
39776 Schema.Struct({
3601339777 emittedAtMs: Schema.optionalKey(
3601439778 Schema.Number.annotate({
3601539779 description:
3601639780 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3601739781 format: "int64",
36018 }).check(Schema.isInt()),
39782 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3601939783 ),
36020 }).annotate({
36021 title: "ServerNotification",
36022 description: "Notification sent from the server to the client.",
36023 }),
36024 Schema.Struct({
3602539784 method: Schema.Literal("mcpServer/oauthLogin/completed").annotate({
3602639785 title: "McpServer/oauthLogin/completedNotificationMethod",
3602739786 }),
3602839787 params: ServerNotification__McpServerOauthLoginCompletedNotification,
39788 }).annotate({ title: "McpServer/oauthLogin/completedNotification" }),
39789 Schema.Struct({
3602939790 emittedAtMs: Schema.optionalKey(
3603039791 Schema.Number.annotate({
3603139792 description:
3603239793 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3603339794 format: "int64",
36034 }).check(Schema.isInt()),
39795 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3603539796 ),
36036 }).annotate({
36037 title: "ServerNotification",
36038 description: "Notification sent from the server to the client.",
36039 }),
36040 Schema.Struct({
3604139797 method: Schema.Literal("mcpServer/startupStatus/updated").annotate({
3604239798 title: "McpServer/startupStatus/updatedNotificationMethod",
3604339799 }),
3604439800 params: ServerNotification__McpServerStatusUpdatedNotification,
39801 }).annotate({ title: "McpServer/startupStatus/updatedNotification" }),
39802 Schema.Struct({
3604539803 emittedAtMs: Schema.optionalKey(
3604639804 Schema.Number.annotate({
3604739805 description:
3604839806 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3604939807 format: "int64",
36050 }).check(Schema.isInt()),
39808 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3605139809 ),
36052 }).annotate({
36053 title: "ServerNotification",
36054 description: "Notification sent from the server to the client.",
36055 }),
36056 Schema.Struct({
3605739810 method: Schema.Literal("account/updated").annotate({
3605839811 title: "Account/updatedNotificationMethod",
3605939812 }),
3606039813 params: ServerNotification__AccountUpdatedNotification,
39814 }).annotate({ title: "Account/updatedNotification" }),
39815 Schema.Struct({
3606139816 emittedAtMs: Schema.optionalKey(
3606239817 Schema.Number.annotate({
3606339818 description:
3606439819 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3606539820 format: "int64",
36066 }).check(Schema.isInt()),
39821 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3606739822 ),
36068 }).annotate({
36069 title: "ServerNotification",
36070 description: "Notification sent from the server to the client.",
36071 }),
36072 Schema.Struct({
3607339823 method: Schema.Literal("account/rateLimits/updated").annotate({
3607439824 title: "Account/rateLimits/updatedNotificationMethod",
3607539825 }),
3607639826 params: ServerNotification__AccountRateLimitsUpdatedNotification,
39827 }).annotate({ title: "Account/rateLimits/updatedNotification" }),
39828 Schema.Struct({
3607739829 emittedAtMs: Schema.optionalKey(
3607839830 Schema.Number.annotate({
3607939831 description:
3608039832 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3608139833 format: "int64",
36082 }).check(Schema.isInt()),
39834 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3608339835 ),
36084 }).annotate({
36085 title: "ServerNotification",
36086 description: "Notification sent from the server to the client.",
36087 }),
36088 Schema.Struct({
3608939836 method: Schema.Literal("app/list/updated").annotate({
3609039837 title: "App/list/updatedNotificationMethod",
3609139838 }),
3609239839 params: ServerNotification__AppListUpdatedNotification,
39840 }).annotate({ title: "App/list/updatedNotification" }),
39841 Schema.Struct({
3609339842 emittedAtMs: Schema.optionalKey(
3609439843 Schema.Number.annotate({
3609539844 description:
3609639845 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3609739846 format: "int64",
36098 }).check(Schema.isInt()),
39847 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3609939848 ),
36100 }).annotate({
36101 title: "ServerNotification",
36102 description: "Notification sent from the server to the client.",
36103 }),
36104 Schema.Struct({
3610539849 method: Schema.Literal("remoteControl/status/changed").annotate({
3610639850 title: "RemoteControl/status/changedNotificationMethod",
3610739851 }),
3610839852 params: ServerNotification__RemoteControlStatusChangedNotification,
39853 }).annotate({ title: "RemoteControl/status/changedNotification" }),
39854 Schema.Struct({
3610939855 emittedAtMs: Schema.optionalKey(
3611039856 Schema.Number.annotate({
3611139857 description:
3611239858 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3611339859 format: "int64",
36114 }).check(Schema.isInt()),
39860 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3611539861 ),
36116 }).annotate({
36117 title: "ServerNotification",
36118 description: "Notification sent from the server to the client.",
36119 }),
36120 Schema.Struct({
3612139862 method: Schema.Literal("externalAgentConfig/import/progress").annotate({
3612239863 title: "ExternalAgentConfig/import/progressNotificationMethod",
3612339864 }),
3612439865 params: ServerNotification__ExternalAgentConfigImportProgressNotification,
39866 }).annotate({ title: "ExternalAgentConfig/import/progressNotification" }),
39867 Schema.Struct({
3612539868 emittedAtMs: Schema.optionalKey(
3612639869 Schema.Number.annotate({
3612739870 description:
3612839871 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3612939872 format: "int64",
36130 }).check(Schema.isInt()),
39873 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3613139874 ),
36132 }).annotate({
36133 title: "ServerNotification",
36134 description: "Notification sent from the server to the client.",
36135 }),
36136 Schema.Struct({
3613739875 method: Schema.Literal("externalAgentConfig/import/completed").annotate({
3613839876 title: "ExternalAgentConfig/import/completedNotificationMethod",
3613939877 }),
3614039878 params: ServerNotification__ExternalAgentConfigImportCompletedNotification,
39879 }).annotate({ title: "ExternalAgentConfig/import/completedNotification" }),
39880 Schema.Struct({
3614139881 emittedAtMs: Schema.optionalKey(
3614239882 Schema.Number.annotate({
3614339883 description:
3614439884 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3614539885 format: "int64",
36146 }).check(Schema.isInt()),
39886 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3614739887 ),
36148 }).annotate({
36149 title: "ServerNotification",
36150 description: "Notification sent from the server to the client.",
36151 }),
36152 Schema.Struct({
3615339888 method: Schema.Literal("fs/changed").annotate({ title: "Fs/changedNotificationMethod" }),
3615439889 params: ServerNotification__FsChangedNotification,
39890 }).annotate({ title: "Fs/changedNotification" }),
39891 Schema.Struct({
3615539892 emittedAtMs: Schema.optionalKey(
3615639893 Schema.Number.annotate({
3615739894 description:
3615839895 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3615939896 format: "int64",
36160 }).check(Schema.isInt()),
39897 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3616139898 ),
36162 }).annotate({
36163 title: "ServerNotification",
36164 description: "Notification sent from the server to the client.",
36165 }),
36166 Schema.Struct({
3616739899 method: Schema.Literal("item/reasoning/summaryTextDelta").annotate({
3616839900 title: "Item/reasoning/summaryTextDeltaNotificationMethod",
3616939901 }),
3617039902 params: ServerNotification__ReasoningSummaryTextDeltaNotification,
39903 }).annotate({ title: "Item/reasoning/summaryTextDeltaNotification" }),
39904 Schema.Struct({
3617139905 emittedAtMs: Schema.optionalKey(
3617239906 Schema.Number.annotate({
3617339907 description:
3617439908 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3617539909 format: "int64",
36176 }).check(Schema.isInt()),
39910 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3617739911 ),
36178 }).annotate({
36179 title: "ServerNotification",
36180 description: "Notification sent from the server to the client.",
36181 }),
36182 Schema.Struct({
3618339912 method: Schema.Literal("item/reasoning/summaryPartAdded").annotate({
3618439913 title: "Item/reasoning/summaryPartAddedNotificationMethod",
3618539914 }),
3618639915 params: ServerNotification__ReasoningSummaryPartAddedNotification,
39916 }).annotate({ title: "Item/reasoning/summaryPartAddedNotification" }),
39917 Schema.Struct({
3618739918 emittedAtMs: Schema.optionalKey(
3618839919 Schema.Number.annotate({
3618939920 description:
3619039921 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3619139922 format: "int64",
36192 }).check(Schema.isInt()),
39923 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3619339924 ),
36194 }).annotate({
36195 title: "ServerNotification",
36196 description: "Notification sent from the server to the client.",
36197 }),
36198 Schema.Struct({
3619939925 method: Schema.Literal("item/reasoning/textDelta").annotate({
3620039926 title: "Item/reasoning/textDeltaNotificationMethod",
3620139927 }),
3620239928 params: ServerNotification__ReasoningTextDeltaNotification,
39929 }).annotate({ title: "Item/reasoning/textDeltaNotification" }),
39930 Schema.Struct({
3620339931 emittedAtMs: Schema.optionalKey(
3620439932 Schema.Number.annotate({
3620539933 description:
3620639934 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3620739935 format: "int64",
36208 }).check(Schema.isInt()),
39936 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3620939937 ),
36210 }).annotate({
36211 title: "ServerNotification",
36212 description: "Notification sent from the server to the client.",
36213 }),
36214 Schema.Struct({
3621539938 method: Schema.Literal("thread/compacted").annotate({
3621639939 title: "Thread/compactedNotificationMethod",
3621739940 }),
3621839941 params: ServerNotification__ContextCompactedNotification,
39942 }).annotate({
39943 title: "Thread/compactedNotification",
39944 description: "Deprecated: Use `ContextCompaction` item type instead.",
39945 }),
39946 Schema.Struct({
3621939947 emittedAtMs: Schema.optionalKey(
3622039948 Schema.Number.annotate({
3622139949 description:
3622239950 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3622339951 format: "int64",
36224 }).check(Schema.isInt()),
39952 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3622539953 ),
36226 }).annotate({
36227 title: "ServerNotification",
36228 description: "Notification sent from the server to the client.",
36229 }),
36230 Schema.Struct({
3623139954 method: Schema.Literal("model/rerouted").annotate({
3623239955 title: "Model/reroutedNotificationMethod",
3623339956 }),
3623439957 params: ServerNotification__ModelReroutedNotification,
39958 }).annotate({ title: "Model/reroutedNotification" }),
39959 Schema.Struct({
3623539960 emittedAtMs: Schema.optionalKey(
3623639961 Schema.Number.annotate({
3623739962 description:
3623839963 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3623939964 format: "int64",
36240 }).check(Schema.isInt()),
39965 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3624139966 ),
36242 }).annotate({
36243 title: "ServerNotification",
36244 description: "Notification sent from the server to the client.",
36245 }),
36246 Schema.Struct({
3624739967 method: Schema.Literal("model/verification").annotate({
3624839968 title: "Model/verificationNotificationMethod",
3624939969 }),
3625039970 params: ServerNotification__ModelVerificationNotification,
39971 }).annotate({ title: "Model/verificationNotification" }),
39972 Schema.Struct({
3625139973 emittedAtMs: Schema.optionalKey(
3625239974 Schema.Number.annotate({
3625339975 description:
3625439976 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3625539977 format: "int64",
36256 }).check(Schema.isInt()),
39978 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3625739979 ),
36258 }).annotate({
36259 title: "ServerNotification",
36260 description: "Notification sent from the server to the client.",
36261 }),
36262 Schema.Struct({
3626339980 method: Schema.Literal("turn/moderationMetadata").annotate({
3626439981 title: "Turn/moderationMetadataNotificationMethod",
3626539982 }),
3626639983 params: ServerNotification__TurnModerationMetadataNotification,
39984 }).annotate({ title: "Turn/moderationMetadataNotification" }),
39985 Schema.Struct({
3626739986 emittedAtMs: Schema.optionalKey(
3626839987 Schema.Number.annotate({
3626939988 description:
3627039989 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3627139990 format: "int64",
36272 }).check(Schema.isInt()),
39991 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3627339992 ),
36274 }).annotate({
36275 title: "ServerNotification",
36276 description: "Notification sent from the server to the client.",
36277 }),
36278 Schema.Struct({
3627939993 method: Schema.Literal("model/safetyBuffering/updated").annotate({
3628039994 title: "Model/safetyBuffering/updatedNotificationMethod",
3628139995 }),
3628239996 params: ServerNotification__ModelSafetyBufferingUpdatedNotification,
39997 }).annotate({ title: "Model/safetyBuffering/updatedNotification" }),
39998 Schema.Struct({
3628339999 emittedAtMs: Schema.optionalKey(
3628440000 Schema.Number.annotate({
3628540001 description:
3628640002 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3628740003 format: "int64",
36288 }).check(Schema.isInt()),
40004 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3628940005 ),
36290 }).annotate({
36291 title: "ServerNotification",
36292 description: "Notification sent from the server to the client.",
36293 }),
36294 Schema.Struct({
3629540006 method: Schema.Literal("warning").annotate({ title: "WarningNotificationMethod" }),
3629640007 params: ServerNotification__WarningNotification,
40008 }).annotate({ title: "WarningNotification" }),
40009 Schema.Struct({
3629740010 emittedAtMs: Schema.optionalKey(
3629840011 Schema.Number.annotate({
3629940012 description:
3630040013 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3630140014 format: "int64",
36302 }).check(Schema.isInt()),
40015 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3630340016 ),
36304 }).annotate({
36305 title: "ServerNotification",
36306 description: "Notification sent from the server to the client.",
36307 }),
36308 Schema.Struct({
3630940017 method: Schema.Literal("guardianWarning").annotate({
3631040018 title: "GuardianWarningNotificationMethod",
3631140019 }),
3631240020 params: ServerNotification__GuardianWarningNotification,
40021 }).annotate({ title: "GuardianWarningNotification" }),
40022 Schema.Struct({
3631340023 emittedAtMs: Schema.optionalKey(
3631440024 Schema.Number.annotate({
3631540025 description:
3631640026 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3631740027 format: "int64",
36318 }).check(Schema.isInt()),
40028 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3631940029 ),
36320 }).annotate({
36321 title: "ServerNotification",
36322 description: "Notification sent from the server to the client.",
36323 }),
36324 Schema.Struct({
3632540030 method: Schema.Literal("deprecationNotice").annotate({
3632640031 title: "DeprecationNoticeNotificationMethod",
3632740032 }),
3632840033 params: ServerNotification__DeprecationNoticeNotification,
40034 }).annotate({ title: "DeprecationNoticeNotification" }),
40035 Schema.Struct({
3632940036 emittedAtMs: Schema.optionalKey(
3633040037 Schema.Number.annotate({
3633140038 description:
3633240039 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3633340040 format: "int64",
36334 }).check(Schema.isInt()),
40041 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3633540042 ),
36336 }).annotate({
36337 title: "ServerNotification",
36338 description: "Notification sent from the server to the client.",
36339 }),
36340 Schema.Struct({
3634140043 method: Schema.Literal("configWarning").annotate({
3634240044 title: "ConfigWarningNotificationMethod",
3634340045 }),
3634440046 params: ServerNotification__ConfigWarningNotification,
40047 }).annotate({ title: "ConfigWarningNotification" }),
40048 Schema.Struct({
3634540049 emittedAtMs: Schema.optionalKey(
3634640050 Schema.Number.annotate({
3634740051 description:
3634840052 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3634940053 format: "int64",
36350 }).check(Schema.isInt()),
40054 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3635140055 ),
36352 }).annotate({
36353 title: "ServerNotification",
36354 description: "Notification sent from the server to the client.",
36355 }),
36356 Schema.Struct({
3635740056 method: Schema.Literal("fuzzyFileSearch/sessionUpdated").annotate({
3635840057 title: "FuzzyFileSearch/sessionUpdatedNotificationMethod",
3635940058 }),
3636040059 params: ServerNotification__FuzzyFileSearchSessionUpdatedNotification,
40060 }).annotate({ title: "FuzzyFileSearch/sessionUpdatedNotification" }),
40061 Schema.Struct({
3636140062 emittedAtMs: Schema.optionalKey(
3636240063 Schema.Number.annotate({
3636340064 description:
3636440065 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3636540066 format: "int64",
36366 }).check(Schema.isInt()),
40067 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3636740068 ),
36368 }).annotate({
36369 title: "ServerNotification",
36370 description: "Notification sent from the server to the client.",
36371 }),
36372 Schema.Struct({
3637340069 method: Schema.Literal("fuzzyFileSearch/sessionCompleted").annotate({
3637440070 title: "FuzzyFileSearch/sessionCompletedNotificationMethod",
3637540071 }),
3637640072 params: ServerNotification__FuzzyFileSearchSessionCompletedNotification,
40073 }).annotate({ title: "FuzzyFileSearch/sessionCompletedNotification" }),
40074 Schema.Struct({
3637740075 emittedAtMs: Schema.optionalKey(
3637840076 Schema.Number.annotate({
3637940077 description:
3638040078 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3638140079 format: "int64",
36382 }).check(Schema.isInt()),
40080 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3638340081 ),
36384 }).annotate({
36385 title: "ServerNotification",
36386 description: "Notification sent from the server to the client.",
36387 }),
36388 Schema.Struct({
3638940082 method: Schema.Literal("thread/realtime/started").annotate({
3639040083 title: "Thread/realtime/startedNotificationMethod",
3639140084 }),
3639240085 params: ServerNotification__ThreadRealtimeStartedNotification,
40086 }).annotate({ title: "Thread/realtime/startedNotification" }),
40087 Schema.Struct({
3639340088 emittedAtMs: Schema.optionalKey(
3639440089 Schema.Number.annotate({
3639540090 description:
3639640091 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3639740092 format: "int64",
36398 }).check(Schema.isInt()),
40093 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3639940094 ),
36400 }).annotate({
36401 title: "ServerNotification",
36402 description: "Notification sent from the server to the client.",
36403 }),
36404 Schema.Struct({
3640540095 method: Schema.Literal("thread/realtime/itemAdded").annotate({
3640640096 title: "Thread/realtime/itemAddedNotificationMethod",
3640740097 }),
3640840098 params: ServerNotification__ThreadRealtimeItemAddedNotification,
40099 }).annotate({ title: "Thread/realtime/itemAddedNotification" }),
40100 Schema.Struct({
3640940101 emittedAtMs: Schema.optionalKey(
3641040102 Schema.Number.annotate({
3641140103 description:
3641240104 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3641340105 format: "int64",
36414 }).check(Schema.isInt()),
40106 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3641540107 ),
36416 }).annotate({
36417 title: "ServerNotification",
36418 description: "Notification sent from the server to the client.",
36419 }),
36420 Schema.Struct({
3642140108 method: Schema.Literal("thread/realtime/transcript/delta").annotate({
3642240109 title: "Thread/realtime/transcript/deltaNotificationMethod",
3642340110 }),
3642440111 params: ServerNotification__ThreadRealtimeTranscriptDeltaNotification,
40112 }).annotate({ title: "Thread/realtime/transcript/deltaNotification" }),
40113 Schema.Struct({
3642540114 emittedAtMs: Schema.optionalKey(
3642640115 Schema.Number.annotate({
3642740116 description:
3642840117 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3642940118 format: "int64",
36430 }).check(Schema.isInt()),
40119 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3643140120 ),
36432 }).annotate({
36433 title: "ServerNotification",
36434 description: "Notification sent from the server to the client.",
36435 }),
36436 Schema.Struct({
3643740121 method: Schema.Literal("thread/realtime/transcript/done").annotate({
3643840122 title: "Thread/realtime/transcript/doneNotificationMethod",
3643940123 }),
3644040124 params: ServerNotification__ThreadRealtimeTranscriptDoneNotification,
40125 }).annotate({ title: "Thread/realtime/transcript/doneNotification" }),
40126 Schema.Struct({
3644140127 emittedAtMs: Schema.optionalKey(
3644240128 Schema.Number.annotate({
3644340129 description:
3644440130 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3644540131 format: "int64",
36446 }).check(Schema.isInt()),
40132 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3644740133 ),
36448 }).annotate({
36449 title: "ServerNotification",
36450 description: "Notification sent from the server to the client.",
36451 }),
36452 Schema.Struct({
3645340134 method: Schema.Literal("thread/realtime/outputAudio/delta").annotate({
3645440135 title: "Thread/realtime/outputAudio/deltaNotificationMethod",
3645540136 }),
3645640137 params: ServerNotification__ThreadRealtimeOutputAudioDeltaNotification,
40138 }).annotate({ title: "Thread/realtime/outputAudio/deltaNotification" }),
40139 Schema.Struct({
3645740140 emittedAtMs: Schema.optionalKey(
3645840141 Schema.Number.annotate({
3645940142 description:
3646040143 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3646140144 format: "int64",
36462 }).check(Schema.isInt()),
40145 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3646340146 ),
36464 }).annotate({
36465 title: "ServerNotification",
36466 description: "Notification sent from the server to the client.",
36467 }),
36468 Schema.Struct({
3646940147 method: Schema.Literal("thread/realtime/sdp").annotate({
3647040148 title: "Thread/realtime/sdpNotificationMethod",
3647140149 }),
3647240150 params: ServerNotification__ThreadRealtimeSdpNotification,
40151 }).annotate({ title: "Thread/realtime/sdpNotification" }),
40152 Schema.Struct({
3647340153 emittedAtMs: Schema.optionalKey(
3647440154 Schema.Number.annotate({
3647540155 description:
3647640156 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3647740157 format: "int64",
36478 }).check(Schema.isInt()),
40158 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3647940159 ),
36480 }).annotate({
36481 title: "ServerNotification",
36482 description: "Notification sent from the server to the client.",
36483 }),
36484 Schema.Struct({
3648540160 method: Schema.Literal("thread/realtime/error").annotate({
3648640161 title: "Thread/realtime/errorNotificationMethod",
3648740162 }),
3648840163 params: ServerNotification__ThreadRealtimeErrorNotification,
40164 }).annotate({ title: "Thread/realtime/errorNotification" }),
40165 Schema.Struct({
3648940166 emittedAtMs: Schema.optionalKey(
3649040167 Schema.Number.annotate({
3649140168 description:
3649240169 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3649340170 format: "int64",
36494 }).check(Schema.isInt()),
40171 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3649540172 ),
36496 }).annotate({
36497 title: "ServerNotification",
36498 description: "Notification sent from the server to the client.",
36499 }),
36500 Schema.Struct({
3650140173 method: Schema.Literal("thread/realtime/closed").annotate({
3650240174 title: "Thread/realtime/closedNotificationMethod",
3650340175 }),
3650440176 params: ServerNotification__ThreadRealtimeClosedNotification,
40177 }).annotate({ title: "Thread/realtime/closedNotification" }),
40178 Schema.Struct({
3650540179 emittedAtMs: Schema.optionalKey(
3650640180 Schema.Number.annotate({
3650740181 description:
3650840182 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3650940183 format: "int64",
36510 }).check(Schema.isInt()),
40184 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3651140185 ),
36512 }).annotate({
36513 title: "ServerNotification",
36514 description: "Notification sent from the server to the client.",
36515 }),
36516 Schema.Struct({
3651740186 method: Schema.Literal("windows/worldWritableWarning").annotate({
3651840187 title: "Windows/worldWritableWarningNotificationMethod",
3651940188 }),
3652040189 params: ServerNotification__WindowsWorldWritableWarningNotification,
40190 }).annotate({
40191 title: "Windows/worldWritableWarningNotification",
40192 description:
40193 "Notifies the user of world-writable directories on Windows, which cannot be protected by the sandbox.",
40194 }),
40195 Schema.Struct({
3652140196 emittedAtMs: Schema.optionalKey(
3652240197 Schema.Number.annotate({
3652340198 description:
3652440199 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3652540200 format: "int64",
36526 }).check(Schema.isInt()),
40201 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3652740202 ),
36528 }).annotate({
36529 title: "ServerNotification",
36530 description: "Notification sent from the server to the client.",
36531 }),
36532 Schema.Struct({
3653340203 method: Schema.Literal("windowsSandbox/setupCompleted").annotate({
3653440204 title: "WindowsSandbox/setupCompletedNotificationMethod",
3653540205 }),
3653640206 params: ServerNotification__WindowsSandboxSetupCompletedNotification,
40207 }).annotate({ title: "WindowsSandbox/setupCompletedNotification" }),
40208 Schema.Struct({
3653740209 emittedAtMs: Schema.optionalKey(
3653840210 Schema.Number.annotate({
3653940211 description:
3654040212 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
3654140213 format: "int64",
36542 }).check(Schema.isInt()),
40214 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3654340215 ),
36544 }).annotate({
36545 title: "ServerNotification",
36546 description: "Notification sent from the server to the client.",
36547 }),
36548 Schema.Struct({
3654940216 method: Schema.Literal("account/login/completed").annotate({
3655040217 title: "Account/login/completedNotificationMethod",
3655140218 }),
3655240219 params: ServerNotification__AccountLoginCompletedNotification,
36553 emittedAtMs: Schema.optionalKey(
36554 Schema.Number.annotate({
36555 description:
36556 "Unix timestamp (in milliseconds) when app-server emitted this notification.",
36557 format: "int64",
36558 }).check(Schema.isInt()),
36559 ),
36560 }).annotate({
36561 title: "ServerNotification",
36562 description: "Notification sent from the server to the client.",
36563 }),
40220 }).annotate({ title: "Account/login/completedNotification" }),
3656440221 ],
3656540222 { mode: "oneOf" },
36566);
36567
36568export type ServerNotification__ByteRange = { readonly end: number; readonly start: number };
36569export const ServerNotification__ByteRange = Schema.Struct({
36570 end: Schema.Number.annotate({ format: "uint" })
36571 .check(Schema.isInt())
36572 .check(Schema.isGreaterThanOrEqualTo(0)),
36573 start: Schema.Number.annotate({ format: "uint" })
36574 .check(Schema.isInt())
36575 .check(Schema.isGreaterThanOrEqualTo(0)),
40223).annotate({
40224 title: "ServerNotification",
40225 description: "Notification sent from the server to the client.",
3657640226});
3657740227
36578export type ServerNotification__CollabAgentTool =
36579 | "spawnAgent"
36580 | "sendInput"
36581 | "resumeAgent"
36582 | "wait"
36583 | "closeAgent"
36584 | "sendMessage"
36585 | "followupTask"
36586 | "interruptAgent"
36587 | "listAgents";
36588export const ServerNotification__CollabAgentTool = Schema.Literals([
36589 "spawnAgent",
36590 "sendInput",
36591 "resumeAgent",
36592 "wait",
36593 "closeAgent",
36594 "sendMessage",
36595 "followupTask",
36596 "interruptAgent",
36597 "listAgents",
36598]);
36599
36600export type ServerNotification__CollabAgentToolCallStatus =
36601 | "inProgress"
36602 | "completed"
36603 | "failed"
36604 | "interrupted";
36605export const ServerNotification__CollabAgentToolCallStatus = Schema.Literals([
36606 "inProgress",
36607 "completed",
36608 "failed",
36609 "interrupted",
36610]);
36611
36612export type ServerNotification__CommandExecOutputStream = "stdout" | "stderr";
36613export const ServerNotification__CommandExecOutputStream = Schema.Literals([
36614 "stdout",
36615 "stderr",
36616]).annotate({ description: "Stream label for `command/exec/outputDelta` notifications." });
36617
36618export type ServerNotification__CommandExecutionSource =
36619 | "agent"
36620 | "userShell"
36621 | "unifiedExecStartup"
36622 | "unifiedExecInteraction";
36623export const ServerNotification__CommandExecutionSource = Schema.Literals([
36624 "agent",
36625 "userShell",
36626 "unifiedExecStartup",
36627 "unifiedExecInteraction",
36628]);
36629
36630export type ServerNotification__HookSource =
36631 | "system"
36632 | "user"
36633 | "project"
36634 | "mdm"
36635 | "sessionFlags"
36636 | "plugin"
36637 | "cloudRequirements"
36638 | "cloudManagedConfig"
36639 | "legacyManagedConfigFile"
36640 | "legacyManagedConfigMdm"
36641 | "unknown";
36642export const ServerNotification__HookSource = Schema.Literals([
36643 "system",
36644 "user",
36645 "project",
36646 "mdm",
36647 "sessionFlags",
36648 "plugin",
36649 "cloudRequirements",
36650 "cloudManagedConfig",
36651 "legacyManagedConfigFile",
36652 "legacyManagedConfigMdm",
36653 "unknown",
36654]);
36655
3665640228export type ServerNotification__MultiAgentMode =
3665740229 | "explicitRequestOnly"
3665840230 | "proactive"
......@@ -36668,45 +40240,15 @@ export const ServerNotification__MultiAgentMode = Schema.Union(
3666840240 "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.",
3666940241});
3667040242
36671export type ServerNotification__NetworkAccess = "restricted" | "enabled";
36672export const ServerNotification__NetworkAccess = Schema.Literals(["restricted", "enabled"]);
36673
36674export type ServerNotification__ProcessOutputStream = "stdout" | "stderr";
36675export const ServerNotification__ProcessOutputStream = Schema.Literals([
36676 "stdout",
36677 "stderr",
36678]).annotate({ description: "Stream label for `process/outputDelta` notifications." });
36679
36680export type ServerNotification__SessionSource =
36681 | "cli"
36682 | "vscode"
36683 | "exec"
36684 | "appServer"
36685 | "unknown"
36686 | { readonly custom: string }
36687 | { readonly subAgent: ServerNotification__SubAgentSource };
36688export const ServerNotification__SessionSource = Schema.Union(
36689 [
36690 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
36691 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
36692 Schema.Struct({ subAgent: ServerNotification__SubAgentSource }).annotate({
36693 title: "SubAgentSessionSource",
36694 }),
36695 ],
36696 { mode: "oneOf" },
36697);
36698
36699export type ServerNotification__ThreadExtra = {};
36700export const ServerNotification__ThreadExtra = Schema.Struct({}).annotate({
36701 description: "Extra app-server data for a thread.",
36702});
40243export type ServerNotification__ThreadExtra = { readonly [x: string]: Schema.Json };
40244export const ServerNotification__ThreadExtra = Schema.Record(
40245 Schema.String,
40246 Schema.Json.annotate({ expected: "JSON value" }),
40247).annotate({ description: "Extra app-server data for a thread." });
3670340248
3670440249export type ServerNotification__ThreadHistoryMode = "legacy" | "paginated";
3670540250export const ServerNotification__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]);
3670640251
36707export type ServerNotification__TurnItemsView = "notLoaded" | "summary" | "full";
36708export const ServerNotification__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]);
36709
3671040252export type ServerRequest =
3671140253 | {
3671240254 readonly id: ServerRequest__RequestId;
......@@ -36941,8 +40483,12 @@ export const ToolRequestUserInputParams = Schema.Struct({
3694140483 autoResolutionMs: Schema.optionalKey(
3694240484 Schema.Union([
3694340485 Schema.Number.annotate({ format: "uint64" })
36944 .check(Schema.isInt())
36945 .check(Schema.isGreaterThanOrEqualTo(0)),
40486 .check(Schema.isInt().annotate({ expected: "an integer" }))
40487 .check(
40488 Schema.isGreaterThanOrEqualTo(0).annotate({
40489 expected: "a value greater than or equal to 0",
40490 }),
40491 ),
3694640492 Schema.Null,
3694740493 ]),
3694840494 ),
......@@ -36979,16 +40525,16 @@ export const V1InitializeParams = Schema.Struct({
3697940525}).annotate({ title: "InitializeParams" });
3698040526
3698140527export type V1InitializeResponse = {
36982 readonly codexHome: string;
40528 readonly codexHome: V1InitializeResponse__AbsolutePathBuf;
3698340529 readonly platformFamily: string;
3698440530 readonly platformOs: string;
3698540531 readonly userAgent: string;
3698640532};
3698740533export const V1InitializeResponse = Schema.Struct({
36988 codexHome: Schema.String.annotate({
36989 description:
36990 "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.",
36991 }),
40534 codexHome: Schema.suspend(
40535 (): Schema.Codec<V1InitializeResponse__AbsolutePathBuf> =>
40536 V1InitializeResponse__AbsolutePathBuf,
40537 ).annotate({ description: "Absolute path to the server's $CODEX_HOME directory." }),
3699240538 platformFamily: Schema.String.annotate({
3699340539 description:
3699440540 'Platform family for the running app-server target, for example `"unix"` or `"windows"`.',
......@@ -37000,12 +40546,6 @@ export const V1InitializeResponse = Schema.Struct({
3700040546 userAgent: Schema.String,
3700140547}).annotate({ title: "InitializeResponse" });
3700240548
37003export type V1InitializeResponse__AbsolutePathBuf = string;
37004export const V1InitializeResponse__AbsolutePathBuf = Schema.String.annotate({
37005 description:
37006 "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.",
37007});
37008
3700940549export type V2AccountLoginCompletedNotification = {
3701040550 readonly error?: string | null;
3701140551 readonly loginId?: string | null;
......@@ -37120,8 +40660,12 @@ export const V2AppsListParams = Schema.Struct({
3712040660 description: "Optional page size; defaults to a reasonable server-side value.",
3712140661 format: "uint32",
3712240662 })
37123 .check(Schema.isInt())
37124 .check(Schema.isGreaterThanOrEqualTo(0)),
40663 .check(Schema.isInt().annotate({ expected: "an integer" }))
40664 .check(
40665 Schema.isGreaterThanOrEqualTo(0).annotate({
40666 expected: "a value greater than or equal to 0",
40667 }),
40668 ),
3712540669 Schema.Null,
3712640670 ]),
3712740671 ),
......@@ -37201,7 +40745,7 @@ export type V2CommandExecOutputDeltaNotification = {
3720140745 readonly capReached: boolean;
3720240746 readonly deltaBase64: string;
3720340747 readonly processId: string;
37204 readonly stream: "stdout" | "stderr";
40748 readonly stream: V2CommandExecOutputDeltaNotification__CommandExecOutputStream;
3720540749};
3720640750export const V2CommandExecOutputDeltaNotification = Schema.Struct({
3720740751 capReached: Schema.Boolean.annotate({
......@@ -37213,21 +40757,16 @@ export const V2CommandExecOutputDeltaNotification = Schema.Struct({
3721340757 description:
3721440758 "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
3721540759 }),
37216 stream: Schema.Literals(["stdout", "stderr"]).annotate({
37217 description: "Stream label for `command/exec/outputDelta` notifications.",
37218 }),
40760 stream: Schema.suspend(
40761 (): Schema.Codec<V2CommandExecOutputDeltaNotification__CommandExecOutputStream> =>
40762 V2CommandExecOutputDeltaNotification__CommandExecOutputStream,
40763 ).annotate({ description: "Output stream for this chunk." }),
3721940764}).annotate({
3722040765 title: "CommandExecOutputDeltaNotification",
3722140766 description:
3722240767 "Base64-encoded output chunk emitted for a streaming `command/exec` request.\n\nThese notifications are connection-scoped. If the originating connection closes, the server terminates the process.",
3722340768});
3722440769
37225export type V2CommandExecOutputDeltaNotification__CommandExecOutputStream = "stdout" | "stderr";
37226export const V2CommandExecOutputDeltaNotification__CommandExecOutputStream = Schema.Literals([
37227 "stdout",
37228 "stderr",
37229]).annotate({ description: "Stream label for `command/exec/outputDelta` notifications." });
37230
3723140770export type V2CommandExecParams = {
3723240771 readonly command: ReadonlyArray<string>;
3723340772 readonly cwd?: string | null;
......@@ -37283,8 +40822,12 @@ export const V2CommandExecParams = Schema.Struct({
3728340822 "Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Cannot be combined with `disableOutputCap`.",
3728440823 format: "uint",
3728540824 })
37286 .check(Schema.isInt())
37287 .check(Schema.isGreaterThanOrEqualTo(0)),
40825 .check(Schema.isInt().annotate({ expected: "an integer" }))
40826 .check(
40827 Schema.isGreaterThanOrEqualTo(0).annotate({
40828 expected: "a value greater than or equal to 0",
40829 }),
40830 ),
3728840831 Schema.Null,
3728940832 ]),
3729040833 ),
......@@ -37326,7 +40869,7 @@ export const V2CommandExecParams = Schema.Struct({
3732640869 description:
3732740870 "Optional timeout in milliseconds.\n\nWhen omitted, the server default applies. Cannot be combined with `disableTimeout`.",
3732840871 format: "int64",
37329 }).check(Schema.isInt()),
40872 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3733040873 Schema.Null,
3733140874 ]),
3733240875 ),
......@@ -37341,58 +40884,29 @@ export const V2CommandExecParams = Schema.Struct({
3734140884 "Run a standalone command (argv vector) in the server sandbox without creating a thread or turn.\n\nThe final `command/exec` response is deferred until the process exits and is sent only after all `command/exec/outputDelta` notifications for that connection have been emitted.",
3734240885});
3734340886
37344export type V2CommandExecParams__NetworkAccess = "restricted" | "enabled";
37345export const V2CommandExecParams__NetworkAccess = Schema.Literals(["restricted", "enabled"]);
37346
3734740887export type V2CommandExecResizeParams = {
3734840888 readonly processId: string;
37349 readonly size: { readonly cols: number; readonly rows: number };
40889 readonly size: V2CommandExecResizeParams__CommandExecTerminalSize;
3735040890};
3735140891export const V2CommandExecResizeParams = Schema.Struct({
3735240892 processId: Schema.String.annotate({
3735340893 description:
3735440894 "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
3735540895 }),
37356 size: Schema.Struct({
37357 cols: Schema.Number.annotate({
37358 description: "Terminal width in character cells.",
37359 format: "uint16",
37360 })
37361 .check(Schema.isInt())
37362 .check(Schema.isGreaterThanOrEqualTo(0)),
37363 rows: Schema.Number.annotate({
37364 description: "Terminal height in character cells.",
37365 format: "uint16",
37366 })
37367 .check(Schema.isInt())
37368 .check(Schema.isGreaterThanOrEqualTo(0)),
37369 }).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." }),
40896 size: Schema.suspend(
40897 (): Schema.Codec<V2CommandExecResizeParams__CommandExecTerminalSize> =>
40898 V2CommandExecResizeParams__CommandExecTerminalSize,
40899 ).annotate({ description: "New PTY size in character cells." }),
3737040900}).annotate({
3737140901 title: "CommandExecResizeParams",
3737240902 description: "Resize a running PTY-backed `command/exec` session.",
3737340903});
3737440904
37375export type V2CommandExecResizeParams__CommandExecTerminalSize = {
37376 readonly cols: number;
37377 readonly rows: number;
37378};
37379export const V2CommandExecResizeParams__CommandExecTerminalSize = Schema.Struct({
37380 cols: Schema.Number.annotate({
37381 description: "Terminal width in character cells.",
37382 format: "uint16",
37383 })
37384 .check(Schema.isInt())
37385 .check(Schema.isGreaterThanOrEqualTo(0)),
37386 rows: Schema.Number.annotate({
37387 description: "Terminal height in character cells.",
37388 format: "uint16",
37389 })
37390 .check(Schema.isInt())
37391 .check(Schema.isGreaterThanOrEqualTo(0)),
37392}).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." });
37393
37394export type V2CommandExecResizeResponse = {};
37395export const V2CommandExecResizeResponse = Schema.Struct({}).annotate({
40905export type V2CommandExecResizeResponse = { readonly [x: string]: Schema.Json };
40906export const V2CommandExecResizeResponse = Schema.Record(
40907 Schema.String,
40908 Schema.Json.annotate({ expected: "JSON value" }),
40909).annotate({
3739640910 title: "CommandExecResizeResponse",
3739740911 description: "Empty success response for `command/exec/resize`.",
3739840912});
......@@ -37404,7 +40918,7 @@ export type V2CommandExecResponse = {
3740440918};
3740540919export const V2CommandExecResponse = Schema.Struct({
3740640920 exitCode: Schema.Number.annotate({ description: "Process exit code.", format: "int32" }).check(
37407 Schema.isInt(),
40921 Schema.isInt().annotate({ expected: "an integer" }),
3740840922 ),
3740940923 stderr: Schema.String.annotate({
3741040924 description:
......@@ -37430,8 +40944,11 @@ export const V2CommandExecTerminateParams = Schema.Struct({
3743040944 description: "Terminate a running `command/exec` session.",
3743140945});
3743240946
37433export type V2CommandExecTerminateResponse = {};
37434export const V2CommandExecTerminateResponse = Schema.Struct({}).annotate({
40947export type V2CommandExecTerminateResponse = { readonly [x: string]: Schema.Json };
40948export const V2CommandExecTerminateResponse = Schema.Record(
40949 Schema.String,
40950 Schema.Json.annotate({ expected: "JSON value" }),
40951).annotate({
3743540952 title: "CommandExecTerminateResponse",
3743640953 description: "Empty success response for `command/exec/terminate`.",
3743740954});
......@@ -37475,8 +40992,11 @@ export const V2CommandExecWriteParams = Schema.Struct({
3747540992 description: "Write stdin bytes to a running `command/exec` session, close stdin, or both.",
3747640993});
3747740994
37478export type V2CommandExecWriteResponse = {};
37479export const V2CommandExecWriteResponse = Schema.Struct({}).annotate({
40995export type V2CommandExecWriteResponse = { readonly [x: string]: Schema.Json };
40996export const V2CommandExecWriteResponse = Schema.Record(
40997 Schema.String,
40998 Schema.Json.annotate({ expected: "JSON value" }),
40999).annotate({
3748041000 title: "CommandExecWriteResponse",
3748141001 description: "Empty success response for `command/exec/write`.",
3748241002});
......@@ -37698,8 +41218,12 @@ export const V2ConfigRequirementsReadResponse__NetworkRequirements = Schema.Stru
3769841218 httpPort: Schema.optionalKey(
3769941219 Schema.Union([
3770041220 Schema.Number.annotate({ format: "uint16" })
37701 .check(Schema.isInt())
37702 .check(Schema.isGreaterThanOrEqualTo(0)),
41221 .check(Schema.isInt().annotate({ expected: "an integer" }))
41222 .check(
41223 Schema.isGreaterThanOrEqualTo(0).annotate({
41224 expected: "a value greater than or equal to 0",
41225 }),
41226 ),
3770341227 Schema.Null,
3770441228 ]),
3770541229 ),
......@@ -37715,8 +41239,12 @@ export const V2ConfigRequirementsReadResponse__NetworkRequirements = Schema.Stru
3771541239 socksPort: Schema.optionalKey(
3771641240 Schema.Union([
3771741241 Schema.Number.annotate({ format: "uint16" })
37718 .check(Schema.isInt())
37719 .check(Schema.isGreaterThanOrEqualTo(0)),
41242 .check(Schema.isInt().annotate({ expected: "an integer" }))
41243 .check(
41244 Schema.isGreaterThanOrEqualTo(0).annotate({
41245 expected: "a value greater than or equal to 0",
41246 }),
41247 ),
3772041248 Schema.Null,
3772141249 ]),
3772241250 ),
......@@ -37738,7 +41266,7 @@ export type V2ConfigValueWriteParams = {
3773841266 readonly filePath?: string | null;
3773941267 readonly keyPath: string;
3774041268 readonly mergeStrategy: V2ConfigValueWriteParams__MergeStrategy;
37741 readonly value: unknown;
41269 readonly value: Schema.Json;
3774241270};
3774341271export const V2ConfigValueWriteParams = Schema.Struct({
3774441272 expectedVersion: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
......@@ -37753,7 +41281,7 @@ export const V2ConfigValueWriteParams = Schema.Struct({
3775341281 ),
3775441282 keyPath: Schema.String,
3775541283 mergeStrategy: V2ConfigValueWriteParams__MergeStrategy,
37756 value: Schema.Unknown,
41284 value: Schema.Json.annotate({ expected: "JSON value" }),
3775741285}).annotate({ title: "ConfigValueWriteParams" });
3775841286
3775941287export type V2ConfigWarningNotification = {
......@@ -37786,16 +41314,16 @@ export const V2ConfigWarningNotification = Schema.Struct({
3778641314}).annotate({ title: "ConfigWarningNotification" });
3778741315
3778841316export type V2ConfigWriteResponse = {
37789 readonly filePath: string;
41317 readonly filePath: V2ConfigWriteResponse__AbsolutePathBuf;
3779041318 readonly overriddenMetadata?: V2ConfigWriteResponse__OverriddenMetadata | null;
3779141319 readonly status: V2ConfigWriteResponse__WriteStatus;
3779241320 readonly version: string;
3779341321};
3779441322export const V2ConfigWriteResponse = Schema.Struct({
37795 filePath: Schema.String.annotate({
37796 description:
37797 "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.",
37798 }),
41323 filePath: Schema.suspend(
41324 (): Schema.Codec<V2ConfigWriteResponse__AbsolutePathBuf> =>
41325 V2ConfigWriteResponse__AbsolutePathBuf,
41326 ).annotate({ description: "Canonical path to the config file that was written." }),
3779941327 overriddenMetadata: Schema.optionalKey(
3780041328 Schema.Union([V2ConfigWriteResponse__OverriddenMetadata, Schema.Null]),
3780141329 ),
......@@ -37916,8 +41444,12 @@ export const V2ExperimentalFeatureListParams = Schema.Struct({
3791641444 description: "Optional page size; defaults to a reasonable server-side value.",
3791741445 format: "uint32",
3791841446 })
37919 .check(Schema.isInt())
37920 .check(Schema.isGreaterThanOrEqualTo(0)),
41447 .check(Schema.isInt().annotate({ expected: "an integer" }))
41448 .check(
41449 Schema.isGreaterThanOrEqualTo(0).annotate({
41450 expected: "a value greater than or equal to 0",
41451 }),
41452 ),
3792141453 Schema.Null,
3792241454 ]),
3792341455 ),
......@@ -37949,20 +41481,6 @@ export const V2ExperimentalFeatureListResponse = Schema.Struct({
3794941481 ),
3795041482}).annotate({ title: "ExperimentalFeatureListResponse" });
3795141483
37952export type V2ExperimentalFeatureListResponse__ExperimentalFeatureStage =
37953 | "beta"
37954 | "underDevelopment"
37955 | "stable"
37956 | "deprecated"
37957 | "removed";
37958export const V2ExperimentalFeatureListResponse__ExperimentalFeatureStage = Schema.Literals([
37959 "beta",
37960 "underDevelopment",
37961 "stable",
37962 "deprecated",
37963 "removed",
37964]);
37965
3796641484export type V2ExternalAgentConfigDetectParams = {
3796741485 readonly cwds?: ReadonlyArray<string> | null;
3796841486 readonly includeHome?: boolean;
......@@ -38147,50 +41665,42 @@ export const V2FsChangedNotification = Schema.Struct({
3814741665});
3814841666
3814941667export type V2FsCopyParams = {
38150 readonly destinationPath: string;
41668 readonly destinationPath: V2FsCopyParams__AbsolutePathBuf;
3815141669 readonly recursive?: boolean;
38152 readonly sourcePath: string;
41670 readonly sourcePath: V2FsCopyParams__AbsolutePathBuf;
3815341671};
3815441672export const V2FsCopyParams = Schema.Struct({
38155 destinationPath: Schema.String.annotate({
38156 description:
38157 "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.",
38158 }),
41673 destinationPath: Schema.suspend(
41674 (): Schema.Codec<V2FsCopyParams__AbsolutePathBuf> => V2FsCopyParams__AbsolutePathBuf,
41675 ).annotate({ description: "Absolute destination path." }),
3815941676 recursive: Schema.optionalKey(
3816041677 Schema.Boolean.annotate({
3816141678 description: "Required for directory copies; ignored for file copies.",
3816241679 }),
3816341680 ),
38164 sourcePath: Schema.String.annotate({
38165 description:
38166 "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.",
38167 }),
41681 sourcePath: Schema.suspend(
41682 (): Schema.Codec<V2FsCopyParams__AbsolutePathBuf> => V2FsCopyParams__AbsolutePathBuf,
41683 ).annotate({ description: "Absolute source path." }),
3816841684}).annotate({
3816941685 title: "FsCopyParams",
3817041686 description: "Copy a file or directory tree on the host filesystem.",
3817141687});
3817241688
38173export type V2FsCopyParams__AbsolutePathBuf = string;
38174export const V2FsCopyParams__AbsolutePathBuf = Schema.String.annotate({
38175 description:
38176 "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.",
38177});
38178
38179export type V2FsCopyResponse = {};
38180export const V2FsCopyResponse = Schema.Struct({}).annotate({
38181 title: "FsCopyResponse",
38182 description: "Successful response for `fs/copy`.",
38183});
41689export type V2FsCopyResponse = { readonly [x: string]: Schema.Json };
41690export const V2FsCopyResponse = Schema.Record(
41691 Schema.String,
41692 Schema.Json.annotate({ expected: "JSON value" }),
41693).annotate({ title: "FsCopyResponse", description: "Successful response for `fs/copy`." });
3818441694
3818541695export type V2FsCreateDirectoryParams = {
38186 readonly path: string;
41696 readonly path: V2FsCreateDirectoryParams__AbsolutePathBuf;
3818741697 readonly recursive?: boolean | null;
3818841698};
3818941699export const V2FsCreateDirectoryParams = Schema.Struct({
38190 path: Schema.String.annotate({
38191 description:
38192 "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.",
38193 }),
41700 path: Schema.suspend(
41701 (): Schema.Codec<V2FsCreateDirectoryParams__AbsolutePathBuf> =>
41702 V2FsCreateDirectoryParams__AbsolutePathBuf,
41703 ).annotate({ description: "Absolute directory path to create." }),
3819441704 recursive: Schema.optionalKey(
3819541705 Schema.Union([
3819641706 Schema.Boolean.annotate({
......@@ -38204,35 +41714,26 @@ export const V2FsCreateDirectoryParams = Schema.Struct({
3820441714 description: "Create a directory on the host filesystem.",
3820541715});
3820641716
38207export type V2FsCreateDirectoryParams__AbsolutePathBuf = string;
38208export const V2FsCreateDirectoryParams__AbsolutePathBuf = Schema.String.annotate({
38209 description:
38210 "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.",
38211});
38212
38213export type V2FsCreateDirectoryResponse = {};
38214export const V2FsCreateDirectoryResponse = Schema.Struct({}).annotate({
41717export type V2FsCreateDirectoryResponse = { readonly [x: string]: Schema.Json };
41718export const V2FsCreateDirectoryResponse = Schema.Record(
41719 Schema.String,
41720 Schema.Json.annotate({ expected: "JSON value" }),
41721).annotate({
3821541722 title: "FsCreateDirectoryResponse",
3821641723 description: "Successful response for `fs/createDirectory`.",
3821741724});
3821841725
38219export type V2FsGetMetadataParams = { readonly path: string };
41726export type V2FsGetMetadataParams = { readonly path: V2FsGetMetadataParams__AbsolutePathBuf };
3822041727export const V2FsGetMetadataParams = Schema.Struct({
38221 path: Schema.String.annotate({
38222 description:
38223 "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.",
38224 }),
41728 path: Schema.suspend(
41729 (): Schema.Codec<V2FsGetMetadataParams__AbsolutePathBuf> =>
41730 V2FsGetMetadataParams__AbsolutePathBuf,
41731 ).annotate({ description: "Absolute path to inspect." }),
3822541732}).annotate({
3822641733 title: "FsGetMetadataParams",
3822741734 description: "Request metadata for an absolute path.",
3822841735});
3822941736
38230export type V2FsGetMetadataParams__AbsolutePathBuf = string;
38231export const V2FsGetMetadataParams__AbsolutePathBuf = Schema.String.annotate({
38232 description:
38233 "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.",
38234});
38235
3823641737export type V2FsGetMetadataResponse = {
3823741738 readonly createdAtMs: number;
3823841739 readonly isDirectory: boolean;
......@@ -38244,7 +41745,7 @@ export const V2FsGetMetadataResponse = Schema.Struct({
3824441745 createdAtMs: Schema.Number.annotate({
3824541746 description: "File creation time in Unix milliseconds when available, otherwise `0`.",
3824641747 format: "int64",
38247 }).check(Schema.isInt()),
41748 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3824841749 isDirectory: Schema.Boolean.annotate({
3824941750 description: "Whether the path resolves to a directory.",
3825041751 }),
......@@ -38255,29 +41756,23 @@ export const V2FsGetMetadataResponse = Schema.Struct({
3825541756 modifiedAtMs: Schema.Number.annotate({
3825641757 description: "File modification time in Unix milliseconds when available, otherwise `0`.",
3825741758 format: "int64",
38258 }).check(Schema.isInt()),
41759 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3825941760}).annotate({
3826041761 title: "FsGetMetadataResponse",
3826141762 description: "Metadata returned by `fs/getMetadata`.",
3826241763});
3826341764
38264export type V2FsReadDirectoryParams = { readonly path: string };
41765export type V2FsReadDirectoryParams = { readonly path: V2FsReadDirectoryParams__AbsolutePathBuf };
3826541766export const V2FsReadDirectoryParams = Schema.Struct({
38266 path: Schema.String.annotate({
38267 description:
38268 "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.",
38269 }),
41767 path: Schema.suspend(
41768 (): Schema.Codec<V2FsReadDirectoryParams__AbsolutePathBuf> =>
41769 V2FsReadDirectoryParams__AbsolutePathBuf,
41770 ).annotate({ description: "Absolute directory path to read." }),
3827041771}).annotate({
3827141772 title: "FsReadDirectoryParams",
3827241773 description: "List direct child names for a directory.",
3827341774});
3827441775
38275export type V2FsReadDirectoryParams__AbsolutePathBuf = string;
38276export const V2FsReadDirectoryParams__AbsolutePathBuf = Schema.String.annotate({
38277 description:
38278 "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.",
38279});
38280
3828141776export type V2FsReadDirectoryResponse = {
3828241777 readonly entries: ReadonlyArray<V2FsReadDirectoryResponse__FsReadDirectoryEntry>;
3828341778};
......@@ -38290,20 +41785,13 @@ export const V2FsReadDirectoryResponse = Schema.Struct({
3829041785 description: "Directory entries returned by `fs/readDirectory`.",
3829141786});
3829241787
38293export type V2FsReadFileParams = { readonly path: string };
41788export type V2FsReadFileParams = { readonly path: V2FsReadFileParams__AbsolutePathBuf };
3829441789export const V2FsReadFileParams = Schema.Struct({
38295 path: Schema.String.annotate({
38296 description:
38297 "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.",
38298 }),
41790 path: Schema.suspend(
41791 (): Schema.Codec<V2FsReadFileParams__AbsolutePathBuf> => V2FsReadFileParams__AbsolutePathBuf,
41792 ).annotate({ description: "Absolute path to read." }),
3829941793}).annotate({ title: "FsReadFileParams", description: "Read a file from the host filesystem." });
3830041794
38301export type V2FsReadFileParams__AbsolutePathBuf = string;
38302export const V2FsReadFileParams__AbsolutePathBuf = Schema.String.annotate({
38303 description:
38304 "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.",
38305});
38306
3830741795export type V2FsReadFileResponse = { readonly dataBase64: string };
3830841796export const V2FsReadFileResponse = Schema.Struct({
3830941797 dataBase64: Schema.String.annotate({ description: "File contents encoded as base64." }),
......@@ -38314,7 +41802,7 @@ export const V2FsReadFileResponse = Schema.Struct({
3831441802
3831541803export type V2FsRemoveParams = {
3831641804 readonly force?: boolean | null;
38317 readonly path: string;
41805 readonly path: V2FsRemoveParams__AbsolutePathBuf;
3831841806 readonly recursive?: boolean | null;
3831941807};
3832041808export const V2FsRemoveParams = Schema.Struct({
......@@ -38326,10 +41814,9 @@ export const V2FsRemoveParams = Schema.Struct({
3832641814 Schema.Null,
3832741815 ]),
3832841816 ),
38329 path: Schema.String.annotate({
38330 description:
38331 "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.",
38332 }),
41817 path: Schema.suspend(
41818 (): Schema.Codec<V2FsRemoveParams__AbsolutePathBuf> => V2FsRemoveParams__AbsolutePathBuf,
41819 ).annotate({ description: "Absolute path to remove." }),
3833341820 recursive: Schema.optionalKey(
3833441821 Schema.Union([
3833541822 Schema.Boolean.annotate({
......@@ -38343,17 +41830,11 @@ export const V2FsRemoveParams = Schema.Struct({
3834341830 description: "Remove a file or directory tree from the host filesystem.",
3834441831});
3834541832
38346export type V2FsRemoveParams__AbsolutePathBuf = string;
38347export const V2FsRemoveParams__AbsolutePathBuf = Schema.String.annotate({
38348 description:
38349 "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.",
38350});
38351
38352export type V2FsRemoveResponse = {};
38353export const V2FsRemoveResponse = Schema.Struct({}).annotate({
38354 title: "FsRemoveResponse",
38355 description: "Successful response for `fs/remove`.",
38356});
41833export type V2FsRemoveResponse = { readonly [x: string]: Schema.Json };
41834export const V2FsRemoveResponse = Schema.Record(
41835 Schema.String,
41836 Schema.Json.annotate({ expected: "JSON value" }),
41837).annotate({ title: "FsRemoveResponse", description: "Successful response for `fs/remove`." });
3835741838
3835841839export type V2FsUnwatchParams = { readonly watchId: string };
3835941840export const V2FsUnwatchParams = Schema.Struct({
......@@ -38365,18 +41846,20 @@ export const V2FsUnwatchParams = Schema.Struct({
3836541846 description: "Stop filesystem watch notifications for a prior `fs/watch`.",
3836641847});
3836741848
38368export type V2FsUnwatchResponse = {};
38369export const V2FsUnwatchResponse = Schema.Struct({}).annotate({
38370 title: "FsUnwatchResponse",
38371 description: "Successful response for `fs/unwatch`.",
38372});
41849export type V2FsUnwatchResponse = { readonly [x: string]: Schema.Json };
41850export const V2FsUnwatchResponse = Schema.Record(
41851 Schema.String,
41852 Schema.Json.annotate({ expected: "JSON value" }),
41853).annotate({ title: "FsUnwatchResponse", description: "Successful response for `fs/unwatch`." });
3837341854
38374export type V2FsWatchParams = { readonly path: string; readonly watchId: string };
41855export type V2FsWatchParams = {
41856 readonly path: V2FsWatchParams__AbsolutePathBuf;
41857 readonly watchId: string;
41858};
3837541859export const V2FsWatchParams = Schema.Struct({
38376 path: Schema.String.annotate({
38377 description:
38378 "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.",
38379 }),
41860 path: Schema.suspend(
41861 (): Schema.Codec<V2FsWatchParams__AbsolutePathBuf> => V2FsWatchParams__AbsolutePathBuf,
41862 ).annotate({ description: "Absolute file or directory path to watch." }),
3838041863 watchId: Schema.String.annotate({
3838141864 description: "Connection-scoped watch identifier used for `fs/unwatch` and `fs/changed`.",
3838241865 }),
......@@ -38385,43 +41868,29 @@ export const V2FsWatchParams = Schema.Struct({
3838541868 description: "Start filesystem watch notifications for an absolute path.",
3838641869});
3838741870
38388export type V2FsWatchParams__AbsolutePathBuf = string;
38389export const V2FsWatchParams__AbsolutePathBuf = Schema.String.annotate({
38390 description:
38391 "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.",
38392});
38393
38394export type V2FsWatchResponse = { readonly path: string };
41871export type V2FsWatchResponse = { readonly path: V2FsWatchResponse__AbsolutePathBuf };
3839541872export const V2FsWatchResponse = Schema.Struct({
38396 path: Schema.String.annotate({
38397 description:
38398 "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.",
38399 }),
41873 path: Schema.suspend(
41874 (): Schema.Codec<V2FsWatchResponse__AbsolutePathBuf> => V2FsWatchResponse__AbsolutePathBuf,
41875 ).annotate({ description: "Canonicalized path associated with the watch." }),
3840041876}).annotate({ title: "FsWatchResponse", description: "Successful response for `fs/watch`." });
3840141877
38402export type V2FsWatchResponse__AbsolutePathBuf = string;
38403export const V2FsWatchResponse__AbsolutePathBuf = Schema.String.annotate({
38404 description:
38405 "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.",
38406});
38407
38408export type V2FsWriteFileParams = { readonly dataBase64: string; readonly path: string };
41878export type V2FsWriteFileParams = {
41879 readonly dataBase64: string;
41880 readonly path: V2FsWriteFileParams__AbsolutePathBuf;
41881};
3840941882export const V2FsWriteFileParams = Schema.Struct({
3841041883 dataBase64: Schema.String.annotate({ description: "File contents encoded as base64." }),
38411 path: Schema.String.annotate({
38412 description:
38413 "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.",
38414 }),
41884 path: Schema.suspend(
41885 (): Schema.Codec<V2FsWriteFileParams__AbsolutePathBuf> => V2FsWriteFileParams__AbsolutePathBuf,
41886 ).annotate({ description: "Absolute path to write." }),
3841541887}).annotate({ title: "FsWriteFileParams", description: "Write a file on the host filesystem." });
3841641888
38417export type V2FsWriteFileParams__AbsolutePathBuf = string;
38418export const V2FsWriteFileParams__AbsolutePathBuf = Schema.String.annotate({
38419 description:
38420 "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.",
38421});
38422
38423export type V2FsWriteFileResponse = {};
38424export const V2FsWriteFileResponse = Schema.Struct({}).annotate({
41889export type V2FsWriteFileResponse = { readonly [x: string]: Schema.Json };
41890export const V2FsWriteFileResponse = Schema.Record(
41891 Schema.String,
41892 Schema.Json.annotate({ expected: "JSON value" }),
41893).annotate({
3842541894 title: "FsWriteFileResponse",
3842641895 description: "Successful response for `fs/writeFile`.",
3842741896});
......@@ -38438,17 +41907,7 @@ export const V2GetAccountParams = Schema.Struct({
3843841907
3843941908export type V2GetAccountRateLimitsResponse = {
3844041909 readonly rateLimitResetCredits?: V2GetAccountRateLimitsResponse__RateLimitResetCreditsSummary | null;
38441 readonly rateLimits: {
38442 readonly credits?: V2GetAccountRateLimitsResponse__CreditsSnapshot | null;
38443 readonly individualLimit?: V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot | null;
38444 readonly limitId?: string | null;
38445 readonly limitName?: string | null;
38446 readonly planType?: V2GetAccountRateLimitsResponse__PlanType | null;
38447 readonly primary?: V2GetAccountRateLimitsResponse__RateLimitWindow | null;
38448 readonly rateLimitReachedType?: V2GetAccountRateLimitsResponse__RateLimitReachedType | null;
38449 readonly secondary?: V2GetAccountRateLimitsResponse__RateLimitWindow | null;
38450 readonly spendControlReached?: boolean | null;
38451 };
41910 readonly rateLimits: V2GetAccountRateLimitsResponse__RateLimitSnapshot;
3845241911 readonly rateLimitsByLimitId?: {
3845341912 readonly [x: string]: V2GetAccountRateLimitsResponse__RateLimitSnapshot;
3845441913 } | null;
......@@ -38457,37 +41916,10 @@ export const V2GetAccountRateLimitsResponse = Schema.Struct({
3845741916 rateLimitResetCredits: Schema.optionalKey(
3845841917 Schema.Union([V2GetAccountRateLimitsResponse__RateLimitResetCreditsSummary, Schema.Null]),
3845941918 ),
38460 rateLimits: Schema.Struct({
38461 credits: Schema.optionalKey(
38462 Schema.Union([V2GetAccountRateLimitsResponse__CreditsSnapshot, Schema.Null]),
38463 ),
38464 individualLimit: Schema.optionalKey(
38465 Schema.Union([V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot, Schema.Null]),
38466 ),
38467 limitId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
38468 limitName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
38469 planType: Schema.optionalKey(
38470 Schema.Union([V2GetAccountRateLimitsResponse__PlanType, Schema.Null]),
38471 ),
38472 primary: Schema.optionalKey(
38473 Schema.Union([V2GetAccountRateLimitsResponse__RateLimitWindow, Schema.Null]),
38474 ),
38475 rateLimitReachedType: Schema.optionalKey(
38476 Schema.Union([V2GetAccountRateLimitsResponse__RateLimitReachedType, Schema.Null]),
38477 ),
38478 secondary: Schema.optionalKey(
38479 Schema.Union([V2GetAccountRateLimitsResponse__RateLimitWindow, Schema.Null]),
38480 ),
38481 spendControlReached: Schema.optionalKey(
38482 Schema.Union([
38483 Schema.Boolean.annotate({
38484 description:
38485 "Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.",
38486 }),
38487 Schema.Null,
38488 ]),
38489 ),
38490 }).annotate({
41919 rateLimits: Schema.suspend(
41920 (): Schema.Codec<V2GetAccountRateLimitsResponse__RateLimitSnapshot> =>
41921 V2GetAccountRateLimitsResponse__RateLimitSnapshot,
41922 ).annotate({
3849141923 description: "Backward-compatible single-bucket view; mirrors the historical payload.",
3849241924 }),
3849341925 rateLimitsByLimitId: Schema.optionalKey(
......@@ -38555,32 +41987,6 @@ export const V2HookCompletedNotification = Schema.Struct({
3855541987 turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3855641988}).annotate({ title: "HookCompletedNotification" });
3855741989
38558export type V2HookCompletedNotification__HookSource =
38559 | "system"
38560 | "user"
38561 | "project"
38562 | "mdm"
38563 | "sessionFlags"
38564 | "plugin"
38565 | "cloudRequirements"
38566 | "cloudManagedConfig"
38567 | "legacyManagedConfigFile"
38568 | "legacyManagedConfigMdm"
38569 | "unknown";
38570export const V2HookCompletedNotification__HookSource = Schema.Literals([
38571 "system",
38572 "user",
38573 "project",
38574 "mdm",
38575 "sessionFlags",
38576 "plugin",
38577 "cloudRequirements",
38578 "cloudManagedConfig",
38579 "legacyManagedConfigFile",
38580 "legacyManagedConfigMdm",
38581 "unknown",
38582]);
38583
3858441990export type V2HooksListParams = { readonly cwds?: ReadonlyArray<string> };
3858541991export const V2HooksListParams = Schema.Struct({
3858641992 cwds: Schema.optionalKey(
......@@ -38608,32 +42014,6 @@ export const V2HookStartedNotification = Schema.Struct({
3860842014 turnId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3860942015}).annotate({ title: "HookStartedNotification" });
3861042016
38611export type V2HookStartedNotification__HookSource =
38612 | "system"
38613 | "user"
38614 | "project"
38615 | "mdm"
38616 | "sessionFlags"
38617 | "plugin"
38618 | "cloudRequirements"
38619 | "cloudManagedConfig"
38620 | "legacyManagedConfigFile"
38621 | "legacyManagedConfigMdm"
38622 | "unknown";
38623export const V2HookStartedNotification__HookSource = Schema.Literals([
38624 "system",
38625 "user",
38626 "project",
38627 "mdm",
38628 "sessionFlags",
38629 "plugin",
38630 "cloudRequirements",
38631 "cloudManagedConfig",
38632 "legacyManagedConfigFile",
38633 "legacyManagedConfigMdm",
38634 "unknown",
38635]);
38636
3863742017export type V2ItemCompletedNotification = {
3863842018 readonly completedAtMs: number;
3863942019 readonly item: V2ItemCompletedNotification__ThreadItem;
......@@ -38644,71 +42024,12 @@ export const V2ItemCompletedNotification = Schema.Struct({
3864442024 completedAtMs: Schema.Number.annotate({
3864542025 description: "Unix timestamp (in milliseconds) when this item lifecycle completed.",
3864642026 format: "int64",
38647 }).check(Schema.isInt()),
42027 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3864842028 item: V2ItemCompletedNotification__ThreadItem,
3864942029 threadId: Schema.String,
3865042030 turnId: Schema.String,
3865142031}).annotate({ title: "ItemCompletedNotification" });
3865242032
38653export type V2ItemCompletedNotification__ByteRange = {
38654 readonly end: number;
38655 readonly start: number;
38656};
38657export const V2ItemCompletedNotification__ByteRange = Schema.Struct({
38658 end: Schema.Number.annotate({ format: "uint" })
38659 .check(Schema.isInt())
38660 .check(Schema.isGreaterThanOrEqualTo(0)),
38661 start: Schema.Number.annotate({ format: "uint" })
38662 .check(Schema.isInt())
38663 .check(Schema.isGreaterThanOrEqualTo(0)),
38664});
38665
38666export type V2ItemCompletedNotification__CollabAgentTool =
38667 | "spawnAgent"
38668 | "sendInput"
38669 | "resumeAgent"
38670 | "wait"
38671 | "closeAgent"
38672 | "sendMessage"
38673 | "followupTask"
38674 | "interruptAgent"
38675 | "listAgents";
38676export const V2ItemCompletedNotification__CollabAgentTool = Schema.Literals([
38677 "spawnAgent",
38678 "sendInput",
38679 "resumeAgent",
38680 "wait",
38681 "closeAgent",
38682 "sendMessage",
38683 "followupTask",
38684 "interruptAgent",
38685 "listAgents",
38686]);
38687
38688export type V2ItemCompletedNotification__CollabAgentToolCallStatus =
38689 | "inProgress"
38690 | "completed"
38691 | "failed"
38692 | "interrupted";
38693export const V2ItemCompletedNotification__CollabAgentToolCallStatus = Schema.Literals([
38694 "inProgress",
38695 "completed",
38696 "failed",
38697 "interrupted",
38698]);
38699
38700export type V2ItemCompletedNotification__CommandExecutionSource =
38701 | "agent"
38702 | "userShell"
38703 | "unifiedExecStartup"
38704 | "unifiedExecInteraction";
38705export const V2ItemCompletedNotification__CommandExecutionSource = Schema.Literals([
38706 "agent",
38707 "userShell",
38708 "unifiedExecStartup",
38709 "unifiedExecInteraction",
38710]);
38711
3871242033export type V2ItemGuardianApprovalReviewCompletedNotification = {
3871342034 readonly action: V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReviewAction;
3871442035 readonly completedAtMs: number;
......@@ -38725,14 +42046,14 @@ export const V2ItemGuardianApprovalReviewCompletedNotification = Schema.Struct({
3872542046 completedAtMs: Schema.Number.annotate({
3872642047 description: "Unix timestamp (in milliseconds) when this review completed.",
3872742048 format: "int64",
38728 }).check(Schema.isInt()),
42049 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3872942050 decisionSource: V2ItemGuardianApprovalReviewCompletedNotification__AutoReviewDecisionSource,
3873042051 review: V2ItemGuardianApprovalReviewCompletedNotification__GuardianApprovalReview,
3873142052 reviewId: Schema.String.annotate({ description: "Stable identifier for this review." }),
3873242053 startedAtMs: Schema.Number.annotate({
3873342054 description: "Unix timestamp (in milliseconds) when this review started.",
3873442055 format: "int64",
38735 }).check(Schema.isInt()),
42056 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3873642057 targetItemId: Schema.optionalKey(
3873742058 Schema.Union([
3873842059 Schema.String.annotate({
......@@ -38766,7 +42087,7 @@ export const V2ItemGuardianApprovalReviewStartedNotification = Schema.Struct({
3876642087 startedAtMs: Schema.Number.annotate({
3876742088 description: "Unix timestamp (in milliseconds) when this review started.",
3876842089 format: "int64",
38769 }).check(Schema.isInt()),
42090 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3877042091 targetItemId: Schema.optionalKey(
3877142092 Schema.Union([
3877242093 Schema.String.annotate({
......@@ -38795,67 +42116,11 @@ export const V2ItemStartedNotification = Schema.Struct({
3879542116 startedAtMs: Schema.Number.annotate({
3879642117 description: "Unix timestamp (in milliseconds) when this item lifecycle started.",
3879742118 format: "int64",
38798 }).check(Schema.isInt()),
42119 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3879942120 threadId: Schema.String,
3880042121 turnId: Schema.String,
3880142122}).annotate({ title: "ItemStartedNotification" });
3880242123
38803export type V2ItemStartedNotification__ByteRange = { readonly end: number; readonly start: number };
38804export const V2ItemStartedNotification__ByteRange = Schema.Struct({
38805 end: Schema.Number.annotate({ format: "uint" })
38806 .check(Schema.isInt())
38807 .check(Schema.isGreaterThanOrEqualTo(0)),
38808 start: Schema.Number.annotate({ format: "uint" })
38809 .check(Schema.isInt())
38810 .check(Schema.isGreaterThanOrEqualTo(0)),
38811});
38812
38813export type V2ItemStartedNotification__CollabAgentTool =
38814 | "spawnAgent"
38815 | "sendInput"
38816 | "resumeAgent"
38817 | "wait"
38818 | "closeAgent"
38819 | "sendMessage"
38820 | "followupTask"
38821 | "interruptAgent"
38822 | "listAgents";
38823export const V2ItemStartedNotification__CollabAgentTool = Schema.Literals([
38824 "spawnAgent",
38825 "sendInput",
38826 "resumeAgent",
38827 "wait",
38828 "closeAgent",
38829 "sendMessage",
38830 "followupTask",
38831 "interruptAgent",
38832 "listAgents",
38833]);
38834
38835export type V2ItemStartedNotification__CollabAgentToolCallStatus =
38836 | "inProgress"
38837 | "completed"
38838 | "failed"
38839 | "interrupted";
38840export const V2ItemStartedNotification__CollabAgentToolCallStatus = Schema.Literals([
38841 "inProgress",
38842 "completed",
38843 "failed",
38844 "interrupted",
38845]);
38846
38847export type V2ItemStartedNotification__CommandExecutionSource =
38848 | "agent"
38849 | "userShell"
38850 | "unifiedExecStartup"
38851 | "unifiedExecInteraction";
38852export const V2ItemStartedNotification__CommandExecutionSource = Schema.Literals([
38853 "agent",
38854 "userShell",
38855 "unifiedExecStartup",
38856 "unifiedExecInteraction",
38857]);
38858
3885942124export type V2ListMcpServerStatusParams = {
3886042125 readonly cursor?: string | null;
3886142126 readonly detail?: V2ListMcpServerStatusParams__McpServerStatusDetail | null;
......@@ -38883,8 +42148,12 @@ export const V2ListMcpServerStatusParams = Schema.Struct({
3888342148 description: "Optional page size; defaults to a server-defined value.",
3888442149 format: "uint32",
3888542150 })
38886 .check(Schema.isInt())
38887 .check(Schema.isGreaterThanOrEqualTo(0)),
42151 .check(Schema.isInt().annotate({ expected: "an integer" }))
42152 .check(
42153 Schema.isGreaterThanOrEqualTo(0).annotate({
42154 expected: "a value greater than or equal to 0",
42155 }),
42156 ),
3888842157 Schema.Null,
3888942158 ]),
3889042159 ),
......@@ -39032,10 +42301,11 @@ export const V2LoginAccountResponse = Schema.Union(
3903242301 { mode: "oneOf" },
3903342302).annotate({ title: "LoginAccountResponse" });
3903442303
39035export type V2LogoutAccountResponse = {};
39036export const V2LogoutAccountResponse = Schema.Struct({}).annotate({
39037 title: "LogoutAccountResponse",
39038});
42304export type V2LogoutAccountResponse = { readonly [x: string]: Schema.Json };
42305export const V2LogoutAccountResponse = Schema.Record(
42306 Schema.String,
42307 Schema.Json.annotate({ expected: "JSON value" }),
42308).annotate({ title: "LogoutAccountResponse" });
3903942309
3904042310export type V2MarketplaceAddParams = {
3904142311 readonly refName?: string | null;
......@@ -39133,7 +42403,12 @@ export const V2McpServerOauthLoginParams = Schema.Struct({
3913342403 scopes: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
3913442404 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3913542405 timeoutSecs: Schema.optionalKey(
39136 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
42406 Schema.Union([
42407 Schema.Number.annotate({ format: "int64" }).check(
42408 Schema.isInt().annotate({ expected: "an integer" }),
42409 ),
42410 Schema.Null,
42411 ]),
3913742412 ),
3913842413}).annotate({ title: "McpServerOauthLoginParams" });
3913942414
......@@ -39142,10 +42417,11 @@ export const V2McpServerOauthLoginResponse = Schema.Struct({
3914242417 authorizationUrl: Schema.String,
3914342418}).annotate({ title: "McpServerOauthLoginResponse" });
3914442419
39145export type V2McpServerRefreshResponse = {};
39146export const V2McpServerRefreshResponse = Schema.Struct({}).annotate({
39147 title: "McpServerRefreshResponse",
39148});
42420export type V2McpServerRefreshResponse = { readonly [x: string]: Schema.Json };
42421export const V2McpServerRefreshResponse = Schema.Record(
42422 Schema.String,
42423 Schema.Json.annotate({ expected: "JSON value" }),
42424).annotate({ title: "McpServerRefreshResponse" });
3914942425
3915042426export type V2McpServerStatusUpdatedNotification = {
3915142427 readonly error?: string | null;
......@@ -39168,31 +42444,31 @@ export const V2McpServerStatusUpdatedNotification = Schema.Struct({
3916842444}).annotate({ title: "McpServerStatusUpdatedNotification" });
3916942445
3917042446export type V2McpServerToolCallParams = {
39171 readonly _meta?: unknown;
39172 readonly arguments?: unknown;
42447 readonly _meta?: Schema.Json;
42448 readonly arguments?: Schema.Json;
3917342449 readonly server: string;
3917442450 readonly threadId: string;
3917542451 readonly tool: string;
3917642452};
3917742453export const V2McpServerToolCallParams = Schema.Struct({
39178 _meta: Schema.optionalKey(Schema.Unknown),
39179 arguments: Schema.optionalKey(Schema.Unknown),
42454 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
42455 arguments: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
3918042456 server: Schema.String,
3918142457 threadId: Schema.String,
3918242458 tool: Schema.String,
3918342459}).annotate({ title: "McpServerToolCallParams" });
3918442460
3918542461export type V2McpServerToolCallResponse = {
39186 readonly _meta?: unknown;
39187 readonly content: ReadonlyArray<unknown>;
42462 readonly _meta?: Schema.Json;
42463 readonly content: ReadonlyArray<Schema.Json>;
3918842464 readonly isError?: boolean | null;
39189 readonly structuredContent?: unknown;
42465 readonly structuredContent?: Schema.Json;
3919042466};
3919142467export const V2McpServerToolCallResponse = Schema.Struct({
39192 _meta: Schema.optionalKey(Schema.Unknown),
39193 content: Schema.Array(Schema.Unknown),
42468 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
42469 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
3919442470 isError: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
39195 structuredContent: Schema.optionalKey(Schema.Unknown),
42471 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
3919642472}).annotate({ title: "McpServerToolCallResponse" });
3919742473
3919842474export type V2McpToolCallProgressNotification = {
......@@ -39236,8 +42512,12 @@ export const V2ModelListParams = Schema.Struct({
3923642512 description: "Optional page size; defaults to a reasonable server-side value.",
3923742513 format: "uint32",
3923842514 })
39239 .check(Schema.isInt())
39240 .check(Schema.isGreaterThanOrEqualTo(0)),
42515 .check(Schema.isInt().annotate({ expected: "an integer" }))
42516 .check(
42517 Schema.isGreaterThanOrEqualTo(0).annotate({
42518 expected: "a value greater than or equal to 0",
42519 }),
42520 ),
3924142521 Schema.Null,
3924242522 ]),
3924342523 ),
......@@ -39260,10 +42540,11 @@ export const V2ModelListResponse = Schema.Struct({
3926042540 ),
3926142541}).annotate({ title: "ModelListResponse" });
3926242542
39263export type V2ModelProviderCapabilitiesReadParams = {};
39264export const V2ModelProviderCapabilitiesReadParams = Schema.Struct({}).annotate({
39265 title: "ModelProviderCapabilitiesReadParams",
39266});
42543export type V2ModelProviderCapabilitiesReadParams = { readonly [x: string]: Schema.Json };
42544export const V2ModelProviderCapabilitiesReadParams = Schema.Record(
42545 Schema.String,
42546 Schema.Json.annotate({ expected: "JSON value" }),
42547).annotate({ title: "ModelProviderCapabilitiesReadParams" });
3926742548
3926842549export type V2ModelProviderCapabilitiesReadResponse = {
3926942550 readonly imageGeneration: boolean;
......@@ -39349,8 +42630,12 @@ export const V2PermissionProfileListParams = Schema.Struct({
3934942630 description: "Optional page size; defaults to the full result set.",
3935042631 format: "uint32",
3935142632 })
39352 .check(Schema.isInt())
39353 .check(Schema.isGreaterThanOrEqualTo(0)),
42633 .check(Schema.isInt().annotate({ expected: "an integer" }))
42634 .check(
42635 Schema.isGreaterThanOrEqualTo(0).annotate({
42636 expected: "a value greater than or equal to 0",
42637 }),
42638 ),
3935442639 Schema.Null,
3935542640 ]),
3935642641 ),
......@@ -39425,12 +42710,6 @@ export const V2PluginInstalledResponse = Schema.Struct({
3942542710 marketplaces: Schema.Array(V2PluginInstalledResponse__PluginMarketplaceEntry),
3942642711}).annotate({ title: "PluginInstalledResponse" });
3942742712
39428export type V2PluginInstalledResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE";
39429export const V2PluginInstalledResponse__PluginAvailability = Schema.Literals([
39430 "DISABLED_BY_ADMIN",
39431 "AVAILABLE",
39432]);
39433
3943442713export type V2PluginInstallParams = {
3943542714 readonly marketplacePath?: V2PluginInstallParams__AbsolutePathBuf | null;
3943642715 readonly pluginName: string;
......@@ -39491,12 +42770,6 @@ export const V2PluginListResponse = Schema.Struct({
3949142770 marketplaces: Schema.Array(V2PluginListResponse__PluginMarketplaceEntry),
3949242771}).annotate({ title: "PluginListResponse" });
3949342772
39494export type V2PluginListResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE";
39495export const V2PluginListResponse__PluginAvailability = Schema.Literals([
39496 "DISABLED_BY_ADMIN",
39497 "AVAILABLE",
39498]);
39499
3950042773export type V2PluginReadParams = {
3950142774 readonly marketplacePath?: V2PluginReadParams__AbsolutePathBuf | null;
3950242775 readonly pluginName: string;
......@@ -39515,12 +42788,6 @@ export const V2PluginReadResponse = Schema.Struct({
3951542788 plugin: V2PluginReadResponse__PluginDetail,
3951642789}).annotate({ title: "PluginReadResponse" });
3951742790
39518export type V2PluginReadResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE";
39519export const V2PluginReadResponse__PluginAvailability = Schema.Literals([
39520 "DISABLED_BY_ADMIN",
39521 "AVAILABLE",
39522]);
39523
3952442791export type V2PluginShareCheckoutParams = { readonly remotePluginId: string };
3952542792export const V2PluginShareCheckoutParams = Schema.Struct({
3952642793 remotePluginId: Schema.String,
......@@ -39550,15 +42817,17 @@ export const V2PluginShareDeleteParams = Schema.Struct({ remotePluginId: Schema.
3955042817 title: "PluginShareDeleteParams",
3955142818});
3955242819
39553export type V2PluginShareDeleteResponse = {};
39554export const V2PluginShareDeleteResponse = Schema.Struct({}).annotate({
39555 title: "PluginShareDeleteResponse",
39556});
42820export type V2PluginShareDeleteResponse = { readonly [x: string]: Schema.Json };
42821export const V2PluginShareDeleteResponse = Schema.Record(
42822 Schema.String,
42823 Schema.Json.annotate({ expected: "JSON value" }),
42824).annotate({ title: "PluginShareDeleteResponse" });
3955742825
39558export type V2PluginShareListParams = {};
39559export const V2PluginShareListParams = Schema.Struct({}).annotate({
39560 title: "PluginShareListParams",
39561});
42826export type V2PluginShareListParams = { readonly [x: string]: Schema.Json };
42827export const V2PluginShareListParams = Schema.Record(
42828 Schema.String,
42829 Schema.Json.annotate({ expected: "JSON value" }),
42830).annotate({ title: "PluginShareListParams" });
3956242831
3956342832export type V2PluginShareListResponse = {
3956442833 readonly data: ReadonlyArray<V2PluginShareListResponse__PluginShareListItem>;
......@@ -39567,12 +42836,6 @@ export const V2PluginShareListResponse = Schema.Struct({
3956742836 data: Schema.Array(V2PluginShareListResponse__PluginShareListItem),
3956842837}).annotate({ title: "PluginShareListResponse" });
3956942838
39570export type V2PluginShareListResponse__PluginAvailability = "DISABLED_BY_ADMIN" | "AVAILABLE";
39571export const V2PluginShareListResponse__PluginAvailability = Schema.Literals([
39572 "DISABLED_BY_ADMIN",
39573 "AVAILABLE",
39574]);
39575
3957642839export type V2PluginShareSaveParams = {
3957742840 readonly discoverability?: V2PluginShareSaveParams__PluginShareDiscoverability | null;
3957842841 readonly pluginPath: V2PluginShareSaveParams__AbsolutePathBuf;
......@@ -39640,10 +42903,11 @@ export const V2PluginUninstallParams = Schema.Struct({ pluginId: Schema.String }
3964042903 title: "PluginUninstallParams",
3964142904});
3964242905
39643export type V2PluginUninstallResponse = {};
39644export const V2PluginUninstallResponse = Schema.Struct({}).annotate({
39645 title: "PluginUninstallResponse",
39646});
42906export type V2PluginUninstallResponse = { readonly [x: string]: Schema.Json };
42907export const V2PluginUninstallResponse = Schema.Record(
42908 Schema.String,
42909 Schema.Json.annotate({ expected: "JSON value" }),
42910).annotate({ title: "PluginUninstallResponse" });
3964742911
3964842912export type V2ProcessExitedNotification = {
3964942913 readonly exitCode: number;
......@@ -39655,7 +42919,7 @@ export type V2ProcessExitedNotification = {
3965542919};
3965642920export const V2ProcessExitedNotification = Schema.Struct({
3965742921 exitCode: Schema.Number.annotate({ description: "Process exit code.", format: "int32" }).check(
39658 Schema.isInt(),
42922 Schema.isInt().annotate({ expected: "an integer" }),
3965942923 ),
3966042924 processHandle: Schema.String.annotate({
3966142925 description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.",
......@@ -39685,7 +42949,7 @@ export type V2ProcessOutputDeltaNotification = {
3968542949 readonly capReached: boolean;
3968642950 readonly deltaBase64: string;
3968742951 readonly processHandle: string;
39688 readonly stream: "stdout" | "stderr";
42952 readonly stream: V2ProcessOutputDeltaNotification__ProcessOutputStream;
3968942953};
3969042954export const V2ProcessOutputDeltaNotification = Schema.Struct({
3969142955 capReached: Schema.Boolean.annotate({
......@@ -39696,20 +42960,15 @@ export const V2ProcessOutputDeltaNotification = Schema.Struct({
3969642960 processHandle: Schema.String.annotate({
3969742961 description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.",
3969842962 }),
39699 stream: Schema.Literals(["stdout", "stderr"]).annotate({
39700 description: "Stream label for `process/outputDelta` notifications.",
39701 }),
42963 stream: Schema.suspend(
42964 (): Schema.Codec<V2ProcessOutputDeltaNotification__ProcessOutputStream> =>
42965 V2ProcessOutputDeltaNotification__ProcessOutputStream,
42966 ).annotate({ description: "Output stream this chunk belongs to." }),
3970242967}).annotate({
3970342968 title: "ProcessOutputDeltaNotification",
3970442969 description: "Base64-encoded output chunk emitted for a streaming `process/spawn` request.",
3970542970});
3970642971
39707export type V2ProcessOutputDeltaNotification__ProcessOutputStream = "stdout" | "stderr";
39708export const V2ProcessOutputDeltaNotification__ProcessOutputStream = Schema.Literals([
39709 "stdout",
39710 "stderr",
39711]).annotate({ description: "Stream label for `process/outputDelta` notifications." });
39712
3971342972export type V2RawResponseCompletedNotification = {
3971442973 readonly responseId: string;
3971542974 readonly threadId: string;
......@@ -39748,7 +43007,9 @@ export type V2ReasoningSummaryPartAddedNotification = {
3974843007};
3974943008export const V2ReasoningSummaryPartAddedNotification = Schema.Struct({
3975043009 itemId: Schema.String,
39751 summaryIndex: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
43010 summaryIndex: Schema.Number.annotate({ format: "int64" }).check(
43011 Schema.isInt().annotate({ expected: "an integer" }),
43012 ),
3975243013 threadId: Schema.String,
3975343014 turnId: Schema.String,
3975443015}).annotate({ title: "ReasoningSummaryPartAddedNotification" });
......@@ -39763,7 +43024,9 @@ export type V2ReasoningSummaryTextDeltaNotification = {
3976343024export const V2ReasoningSummaryTextDeltaNotification = Schema.Struct({
3976443025 delta: Schema.String,
3976543026 itemId: Schema.String,
39766 summaryIndex: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
43027 summaryIndex: Schema.Number.annotate({ format: "int64" }).check(
43028 Schema.isInt().annotate({ expected: "an integer" }),
43029 ),
3976743030 threadId: Schema.String,
3976843031 turnId: Schema.String,
3976943032}).annotate({ title: "ReasoningSummaryTextDeltaNotification" });
......@@ -39776,7 +43039,9 @@ export type V2ReasoningTextDeltaNotification = {
3977643039 readonly turnId: string;
3977743040};
3977843041export const V2ReasoningTextDeltaNotification = Schema.Struct({
39779 contentIndex: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
43042 contentIndex: Schema.Number.annotate({ format: "int64" }).check(
43043 Schema.isInt().annotate({ expected: "an integer" }),
43044 ),
3978043045 delta: Schema.String,
3978143046 itemId: Schema.String,
3978243047 threadId: Schema.String,
......@@ -39827,69 +43092,6 @@ export const V2ReviewStartResponse = Schema.Struct({
3982743092 turn: V2ReviewStartResponse__Turn,
3982843093}).annotate({ title: "ReviewStartResponse" });
3982943094
39830export type V2ReviewStartResponse__ByteRange = { readonly end: number; readonly start: number };
39831export const V2ReviewStartResponse__ByteRange = Schema.Struct({
39832 end: Schema.Number.annotate({ format: "uint" })
39833 .check(Schema.isInt())
39834 .check(Schema.isGreaterThanOrEqualTo(0)),
39835 start: Schema.Number.annotate({ format: "uint" })
39836 .check(Schema.isInt())
39837 .check(Schema.isGreaterThanOrEqualTo(0)),
39838});
39839
39840export type V2ReviewStartResponse__CollabAgentTool =
39841 | "spawnAgent"
39842 | "sendInput"
39843 | "resumeAgent"
39844 | "wait"
39845 | "closeAgent"
39846 | "sendMessage"
39847 | "followupTask"
39848 | "interruptAgent"
39849 | "listAgents";
39850export const V2ReviewStartResponse__CollabAgentTool = Schema.Literals([
39851 "spawnAgent",
39852 "sendInput",
39853 "resumeAgent",
39854 "wait",
39855 "closeAgent",
39856 "sendMessage",
39857 "followupTask",
39858 "interruptAgent",
39859 "listAgents",
39860]);
39861
39862export type V2ReviewStartResponse__CollabAgentToolCallStatus =
39863 | "inProgress"
39864 | "completed"
39865 | "failed"
39866 | "interrupted";
39867export const V2ReviewStartResponse__CollabAgentToolCallStatus = Schema.Literals([
39868 "inProgress",
39869 "completed",
39870 "failed",
39871 "interrupted",
39872]);
39873
39874export type V2ReviewStartResponse__CommandExecutionSource =
39875 | "agent"
39876 | "userShell"
39877 | "unifiedExecStartup"
39878 | "unifiedExecInteraction";
39879export const V2ReviewStartResponse__CommandExecutionSource = Schema.Literals([
39880 "agent",
39881 "userShell",
39882 "unifiedExecStartup",
39883 "unifiedExecInteraction",
39884]);
39885
39886export type V2ReviewStartResponse__TurnItemsView = "notLoaded" | "summary" | "full";
39887export const V2ReviewStartResponse__TurnItemsView = Schema.Literals([
39888 "notLoaded",
39889 "summary",
39890 "full",
39891]);
39892
3989343095export type V2SendAddCreditsNudgeEmailParams = {
3989443096 readonly creditType: V2SendAddCreditsNudgeEmailParams__AddCreditsNudgeCreditType;
3989543097};
......@@ -39913,8 +43115,11 @@ export const V2ServerRequestResolvedNotification = Schema.Struct({
3991343115 threadId: Schema.String,
3991443116}).annotate({ title: "ServerRequestResolvedNotification" });
3991543117
39916export type V2SkillsChangedNotification = {};
39917export const V2SkillsChangedNotification = Schema.Struct({}).annotate({
43118export type V2SkillsChangedNotification = { readonly [x: string]: Schema.Json };
43119export const V2SkillsChangedNotification = Schema.Record(
43120 Schema.String,
43121 Schema.Json.annotate({ expected: "JSON value" }),
43122).annotate({
3991843123 title: "SkillsChangedNotification",
3991943124 description:
3992043125 "Notification emitted when watched local skill files change.\n\nTreat this as an invalidation signal and re-run `skills/list` with the client's current parameters when refreshed skill metadata is needed.",
......@@ -39949,10 +43154,11 @@ export const V2SkillsExtraRootsSetParams = Schema.Struct({
3994943154 extraRoots: Schema.Array(V2SkillsExtraRootsSetParams__AbsolutePathBuf),
3995043155}).annotate({ title: "SkillsExtraRootsSetParams" });
3995143156
39952export type V2SkillsExtraRootsSetResponse = {};
39953export const V2SkillsExtraRootsSetResponse = Schema.Struct({}).annotate({
39954 title: "SkillsExtraRootsSetResponse",
39955});
43157export type V2SkillsExtraRootsSetResponse = { readonly [x: string]: Schema.Json };
43158export const V2SkillsExtraRootsSetResponse = Schema.Record(
43159 Schema.String,
43160 Schema.Json.annotate({ expected: "JSON value" }),
43161).annotate({ title: "SkillsExtraRootsSetResponse" });
3995643162
3995743163export type V2SkillsListParams = {
3995843164 readonly cwds?: ReadonlyArray<string>;
......@@ -39994,20 +43200,22 @@ export const V2TerminalInteractionNotification = Schema.Struct({
3999443200}).annotate({ title: "TerminalInteractionNotification" });
3999543201
3999643202export type V2ThreadApproveGuardianDeniedActionParams = {
39997 readonly event: unknown;
43203 readonly event: Schema.Json;
3999843204 readonly threadId: string;
3999943205};
4000043206export const V2ThreadApproveGuardianDeniedActionParams = Schema.Struct({
40001 event: Schema.Unknown.annotate({
43207 event: Schema.Json.annotate({
43208 expected: "JSON value",
4000243209 description: "Serialized `codex_protocol::protocol::GuardianAssessmentEvent`.",
4000343210 }),
4000443211 threadId: Schema.String,
4000543212}).annotate({ title: "ThreadApproveGuardianDeniedActionParams" });
4000643213
40007export type V2ThreadApproveGuardianDeniedActionResponse = {};
40008export const V2ThreadApproveGuardianDeniedActionResponse = Schema.Struct({}).annotate({
40009 title: "ThreadApproveGuardianDeniedActionResponse",
40010});
43214export type V2ThreadApproveGuardianDeniedActionResponse = { readonly [x: string]: Schema.Json };
43215export const V2ThreadApproveGuardianDeniedActionResponse = Schema.Record(
43216 Schema.String,
43217 Schema.Json.annotate({ expected: "JSON value" }),
43218).annotate({ title: "ThreadApproveGuardianDeniedActionResponse" });
4001143219
4001243220export type V2ThreadArchivedNotification = { readonly threadId: string };
4001343221export const V2ThreadArchivedNotification = Schema.Struct({ threadId: Schema.String }).annotate({
......@@ -40019,10 +43227,11 @@ export const V2ThreadArchiveParams = Schema.Struct({ threadId: Schema.String }).
4001943227 title: "ThreadArchiveParams",
4002043228});
4002143229
40022export type V2ThreadArchiveResponse = {};
40023export const V2ThreadArchiveResponse = Schema.Struct({}).annotate({
40024 title: "ThreadArchiveResponse",
40025});
43230export type V2ThreadArchiveResponse = { readonly [x: string]: Schema.Json };
43231export const V2ThreadArchiveResponse = Schema.Record(
43232 Schema.String,
43233 Schema.Json.annotate({ expected: "JSON value" }),
43234).annotate({ title: "ThreadArchiveResponse" });
4002643235
4002743236export type V2ThreadClosedNotification = { readonly threadId: string };
4002843237export const V2ThreadClosedNotification = Schema.Struct({ threadId: Schema.String }).annotate({
......@@ -40034,10 +43243,11 @@ export const V2ThreadCompactStartParams = Schema.Struct({ threadId: Schema.Strin
4003443243 title: "ThreadCompactStartParams",
4003543244});
4003643245
40037export type V2ThreadCompactStartResponse = {};
40038export const V2ThreadCompactStartResponse = Schema.Struct({}).annotate({
40039 title: "ThreadCompactStartResponse",
40040});
43246export type V2ThreadCompactStartResponse = { readonly [x: string]: Schema.Json };
43247export const V2ThreadCompactStartResponse = Schema.Record(
43248 Schema.String,
43249 Schema.Json.annotate({ expected: "JSON value" }),
43250).annotate({ title: "ThreadCompactStartResponse" });
4004143251
4004243252export type V2ThreadDeletedNotification = { readonly threadId: string };
4004343253export const V2ThreadDeletedNotification = Schema.Struct({ threadId: Schema.String }).annotate({
......@@ -40049,14 +43259,17 @@ export const V2ThreadDeleteParams = Schema.Struct({ threadId: Schema.String }).a
4004943259 title: "ThreadDeleteParams",
4005043260});
4005143261
40052export type V2ThreadDeleteResponse = {};
40053export const V2ThreadDeleteResponse = Schema.Struct({}).annotate({ title: "ThreadDeleteResponse" });
43262export type V2ThreadDeleteResponse = { readonly [x: string]: Schema.Json };
43263export const V2ThreadDeleteResponse = Schema.Record(
43264 Schema.String,
43265 Schema.Json.annotate({ expected: "JSON value" }),
43266).annotate({ title: "ThreadDeleteResponse" });
4005443267
4005543268export type V2ThreadForkParams = {
4005643269 readonly approvalPolicy?: V2ThreadForkParams__AskForApproval | null;
4005743270 readonly approvalsReviewer?: V2ThreadForkParams__ApprovalsReviewer | null;
4005843271 readonly baseInstructions?: string | null;
40059 readonly config?: { readonly [x: string]: unknown } | null;
43272 readonly config?: { readonly [x: string]: Schema.Json } | null;
4006043273 readonly cwd?: string | null;
4006143274 readonly developerInstructions?: string | null;
4006243275 readonly ephemeral?: boolean;
......@@ -40080,7 +43293,10 @@ export const V2ThreadForkParams = Schema.Struct({
4008043293 ),
4008143294 baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4008243295 config: Schema.optionalKey(
40083 Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]),
43296 Schema.Union([
43297 Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
43298 Schema.Null,
43299 ]),
4008443300 ),
4008543301 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4008643302 developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
......@@ -40126,32 +43342,22 @@ export const V2ThreadForkParams__AbsolutePathBuf = Schema.String.annotate({
4012643342
4012743343export type V2ThreadForkResponse = {
4012843344 readonly approvalPolicy: V2ThreadForkResponse__AskForApproval;
40129 readonly approvalsReviewer: "user" | "auto_review" | "guardian_subagent";
43345 readonly approvalsReviewer: V2ThreadForkResponse__ApprovalsReviewer;
4013043346 readonly cwd: V2ThreadForkResponse__AbsolutePathBuf;
4013143347 readonly instructionSources?: ReadonlyArray<V2ThreadForkResponse__LegacyAppPathString>;
4013243348 readonly model: string;
4013343349 readonly modelProvider: string;
4013443350 readonly reasoningEffort?: V2ThreadForkResponse__ReasoningEffort | null;
40135 readonly sandbox:
40136 | { readonly type: "dangerFullAccess" }
40137 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
40138 | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
40139 | {
40140 readonly excludeSlashTmp?: boolean;
40141 readonly excludeTmpdirEnvVar?: boolean;
40142 readonly networkAccess?: boolean;
40143 readonly type: "workspaceWrite";
40144 readonly writableRoots?: ReadonlyArray<V2ThreadForkResponse__AbsolutePathBuf>;
40145 };
43351 readonly sandbox: V2ThreadForkResponse__SandboxPolicy;
4014643352 readonly serviceTier?: string | null;
4014743353 readonly thread: V2ThreadForkResponse__Thread;
4014843354};
4014943355export const V2ThreadForkResponse = Schema.Struct({
4015043356 approvalPolicy: V2ThreadForkResponse__AskForApproval,
40151 approvalsReviewer: Schema.Literals(["user", "auto_review", "guardian_subagent"]).annotate({
40152 description:
40153 "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.",
40154 }),
43357 approvalsReviewer: Schema.suspend(
43358 (): Schema.Codec<V2ThreadForkResponse__ApprovalsReviewer> =>
43359 V2ThreadForkResponse__ApprovalsReviewer,
43360 ).annotate({ description: "Reviewer currently used for approval requests on this thread." }),
4015543361 cwd: V2ThreadForkResponse__AbsolutePathBuf,
4015643362 instructionSources: Schema.optionalKey(
4015743363 Schema.Array(V2ThreadForkResponse__LegacyAppPathString).annotate({
......@@ -40165,38 +43371,8 @@ export const V2ThreadForkResponse = Schema.Struct({
4016543371 reasoningEffort: Schema.optionalKey(
4016643372 Schema.Union([V2ThreadForkResponse__ReasoningEffort, Schema.Null]),
4016743373 ),
40168 sandbox: Schema.Union(
40169 [
40170 Schema.Struct({
40171 type: Schema.Literal("dangerFullAccess").annotate({
40172 title: "DangerFullAccessSandboxPolicyType",
40173 }),
40174 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
40175 Schema.Struct({
40176 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
40177 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
40178 }).annotate({ title: "ReadOnlySandboxPolicy" }),
40179 Schema.Struct({
40180 networkAccess: Schema.optionalKey(
40181 Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
40182 ),
40183 type: Schema.Literal("externalSandbox").annotate({
40184 title: "ExternalSandboxSandboxPolicyType",
40185 }),
40186 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
40187 Schema.Struct({
40188 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
40189 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
40190 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
40191 type: Schema.Literal("workspaceWrite").annotate({
40192 title: "WorkspaceWriteSandboxPolicyType",
40193 }),
40194 writableRoots: Schema.optionalKey(
40195 Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }),
40196 ),
40197 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
40198 ],
40199 { mode: "oneOf" },
43374 sandbox: Schema.suspend(
43375 (): Schema.Codec<V2ThreadForkResponse__SandboxPolicy> => V2ThreadForkResponse__SandboxPolicy,
4020043376 ).annotate({
4020143377 description:
4020243378 "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.",
......@@ -40225,72 +43401,6 @@ export const V2ThreadForkResponse__ActivePermissionProfile = Schema.Struct({
4022543401 }),
4022643402});
4022743403
40228export type V2ThreadForkResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
40229export const V2ThreadForkResponse__ApprovalsReviewer = Schema.Literals([
40230 "user",
40231 "auto_review",
40232 "guardian_subagent",
40233]).annotate({
40234 description:
40235 "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.",
40236});
40237
40238export type V2ThreadForkResponse__ByteRange = { readonly end: number; readonly start: number };
40239export const V2ThreadForkResponse__ByteRange = Schema.Struct({
40240 end: Schema.Number.annotate({ format: "uint" })
40241 .check(Schema.isInt())
40242 .check(Schema.isGreaterThanOrEqualTo(0)),
40243 start: Schema.Number.annotate({ format: "uint" })
40244 .check(Schema.isInt())
40245 .check(Schema.isGreaterThanOrEqualTo(0)),
40246});
40247
40248export type V2ThreadForkResponse__CollabAgentTool =
40249 | "spawnAgent"
40250 | "sendInput"
40251 | "resumeAgent"
40252 | "wait"
40253 | "closeAgent"
40254 | "sendMessage"
40255 | "followupTask"
40256 | "interruptAgent"
40257 | "listAgents";
40258export const V2ThreadForkResponse__CollabAgentTool = Schema.Literals([
40259 "spawnAgent",
40260 "sendInput",
40261 "resumeAgent",
40262 "wait",
40263 "closeAgent",
40264 "sendMessage",
40265 "followupTask",
40266 "interruptAgent",
40267 "listAgents",
40268]);
40269
40270export type V2ThreadForkResponse__CollabAgentToolCallStatus =
40271 | "inProgress"
40272 | "completed"
40273 | "failed"
40274 | "interrupted";
40275export const V2ThreadForkResponse__CollabAgentToolCallStatus = Schema.Literals([
40276 "inProgress",
40277 "completed",
40278 "failed",
40279 "interrupted",
40280]);
40281
40282export type V2ThreadForkResponse__CommandExecutionSource =
40283 | "agent"
40284 | "userShell"
40285 | "unifiedExecStartup"
40286 | "unifiedExecInteraction";
40287export const V2ThreadForkResponse__CommandExecutionSource = Schema.Literals([
40288 "agent",
40289 "userShell",
40290 "unifiedExecStartup",
40291 "unifiedExecInteraction",
40292]);
40293
4029443404export type V2ThreadForkResponse__MultiAgentMode =
4029543405 | "explicitRequestOnly"
4029643406 | "proactive"
......@@ -40306,113 +43416,15 @@ export const V2ThreadForkResponse__MultiAgentMode = Schema.Union(
4030643416 "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.",
4030743417});
4030843418
40309export type V2ThreadForkResponse__NetworkAccess = "restricted" | "enabled";
40310export const V2ThreadForkResponse__NetworkAccess = Schema.Literals(["restricted", "enabled"]);
40311
40312export type V2ThreadForkResponse__SandboxPolicy =
40313 | { readonly type: "dangerFullAccess" }
40314 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
40315 | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
40316 | {
40317 readonly excludeSlashTmp?: boolean;
40318 readonly excludeTmpdirEnvVar?: boolean;
40319 readonly networkAccess?: boolean;
40320 readonly type: "workspaceWrite";
40321 readonly writableRoots?: ReadonlyArray<V2ThreadForkResponse__AbsolutePathBuf>;
40322 };
40323export const V2ThreadForkResponse__SandboxPolicy = Schema.Union(
40324 [
40325 Schema.Struct({
40326 type: Schema.Literal("dangerFullAccess").annotate({
40327 title: "DangerFullAccessSandboxPolicyType",
40328 }),
40329 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
40330 Schema.Struct({
40331 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
40332 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
40333 }).annotate({ title: "ReadOnlySandboxPolicy" }),
40334 Schema.Struct({
40335 networkAccess: Schema.optionalKey(
40336 Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
40337 ),
40338 type: Schema.Literal("externalSandbox").annotate({
40339 title: "ExternalSandboxSandboxPolicyType",
40340 }),
40341 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
40342 Schema.Struct({
40343 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
40344 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
40345 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
40346 type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
40347 writableRoots: Schema.optionalKey(
40348 Schema.Array(V2ThreadForkResponse__AbsolutePathBuf).annotate({ default: [] }),
40349 ),
40350 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
40351 ],
40352 { mode: "oneOf" },
40353);
40354
40355export type V2ThreadForkResponse__SessionSource =
40356 | "cli"
40357 | "vscode"
40358 | "exec"
40359 | "appServer"
40360 | "unknown"
40361 | { readonly custom: string }
40362 | { readonly subAgent: V2ThreadForkResponse__SubAgentSource };
40363export const V2ThreadForkResponse__SessionSource = Schema.Union(
40364 [
40365 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
40366 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
40367 Schema.Struct({ subAgent: V2ThreadForkResponse__SubAgentSource }).annotate({
40368 title: "SubAgentSessionSource",
40369 }),
40370 ],
40371 { mode: "oneOf" },
40372);
40373
40374export type V2ThreadForkResponse__ThreadExtra = {};
40375export const V2ThreadForkResponse__ThreadExtra = Schema.Struct({}).annotate({
40376 description: "Extra app-server data for a thread.",
40377});
43419export type V2ThreadForkResponse__ThreadExtra = { readonly [x: string]: Schema.Json };
43420export const V2ThreadForkResponse__ThreadExtra = Schema.Record(
43421 Schema.String,
43422 Schema.Json.annotate({ expected: "JSON value" }),
43423).annotate({ description: "Extra app-server data for a thread." });
4037843424
4037943425export type V2ThreadForkResponse__ThreadHistoryMode = "legacy" | "paginated";
4038043426export const V2ThreadForkResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]);
4038143427
40382export type V2ThreadForkResponse__ThreadStatus =
40383 | { readonly type: "notLoaded" }
40384 | { readonly type: "idle" }
40385 | { readonly type: "systemError" }
40386 | {
40387 readonly activeFlags: ReadonlyArray<V2ThreadForkResponse__ThreadActiveFlag>;
40388 readonly type: "active";
40389 };
40390export const V2ThreadForkResponse__ThreadStatus = Schema.Union(
40391 [
40392 Schema.Struct({
40393 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
40394 }).annotate({ title: "NotLoadedThreadStatus" }),
40395 Schema.Struct({
40396 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
40397 }).annotate({ title: "IdleThreadStatus" }),
40398 Schema.Struct({
40399 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
40400 }).annotate({ title: "SystemErrorThreadStatus" }),
40401 Schema.Struct({
40402 activeFlags: Schema.Array(V2ThreadForkResponse__ThreadActiveFlag),
40403 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
40404 }).annotate({ title: "ActiveThreadStatus" }),
40405 ],
40406 { mode: "oneOf" },
40407);
40408
40409export type V2ThreadForkResponse__TurnItemsView = "notLoaded" | "summary" | "full";
40410export const V2ThreadForkResponse__TurnItemsView = Schema.Literals([
40411 "notLoaded",
40412 "summary",
40413 "full",
40414]);
40415
4041643428export type V2ThreadGoalClearedNotification = { readonly threadId: string };
4041743429export const V2ThreadGoalClearedNotification = Schema.Struct({ threadId: Schema.String }).annotate({
4041843430 title: "ThreadGoalClearedNotification",
......@@ -40451,7 +43463,12 @@ export const V2ThreadGoalSetParams = Schema.Struct({
4045143463 status: Schema.optionalKey(Schema.Union([V2ThreadGoalSetParams__ThreadGoalStatus, Schema.Null])),
4045243464 threadId: Schema.String,
4045343465 tokenBudget: Schema.optionalKey(
40454 Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
43466 Schema.Union([
43467 Schema.Number.annotate({ format: "int64" }).check(
43468 Schema.isInt().annotate({ expected: "an integer" }),
43469 ),
43470 Schema.Null,
43471 ]),
4045543472 ),
4045643473}).annotate({ title: "ThreadGoalSetParams" });
4045743474
......@@ -40472,20 +43489,21 @@ export const V2ThreadGoalUpdatedNotification = Schema.Struct({
4047243489}).annotate({ title: "ThreadGoalUpdatedNotification" });
4047343490
4047443491export type V2ThreadInjectItemsParams = {
40475 readonly items: ReadonlyArray<unknown>;
43492 readonly items: ReadonlyArray<Schema.Json>;
4047643493 readonly threadId: string;
4047743494};
4047843495export const V2ThreadInjectItemsParams = Schema.Struct({
40479 items: Schema.Array(Schema.Unknown).annotate({
43496 items: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
4048043497 description: "Raw Responses API items to append to the thread's model-visible history.",
4048143498 }),
4048243499 threadId: Schema.String,
4048343500}).annotate({ title: "ThreadInjectItemsParams" });
4048443501
40485export type V2ThreadInjectItemsResponse = {};
40486export const V2ThreadInjectItemsResponse = Schema.Struct({}).annotate({
40487 title: "ThreadInjectItemsResponse",
40488});
43502export type V2ThreadInjectItemsResponse = { readonly [x: string]: Schema.Json };
43503export const V2ThreadInjectItemsResponse = Schema.Record(
43504 Schema.String,
43505 Schema.Json.annotate({ expected: "JSON value" }),
43506).annotate({ title: "ThreadInjectItemsResponse" });
4048943507
4049043508export type V2ThreadListParams = {
4049143509 readonly archived?: boolean | null;
......@@ -40529,8 +43547,12 @@ export const V2ThreadListParams = Schema.Struct({
4052943547 description: "Optional page size; defaults to a reasonable server-side value.",
4053043548 format: "uint32",
4053143549 })
40532 .check(Schema.isInt())
40533 .check(Schema.isGreaterThanOrEqualTo(0)),
43550 .check(Schema.isInt().annotate({ expected: "an integer" }))
43551 .check(
43552 Schema.isGreaterThanOrEqualTo(0).annotate({
43553 expected: "a value greater than or equal to 0",
43554 }),
43555 ),
4053443556 Schema.Null,
4053543557 ]),
4053643558 ),
......@@ -40605,123 +43627,15 @@ export const V2ThreadListResponse = Schema.Struct({
4060543627 ),
4060643628}).annotate({ title: "ThreadListResponse" });
4060743629
40608export type V2ThreadListResponse__ByteRange = { readonly end: number; readonly start: number };
40609export const V2ThreadListResponse__ByteRange = Schema.Struct({
40610 end: Schema.Number.annotate({ format: "uint" })
40611 .check(Schema.isInt())
40612 .check(Schema.isGreaterThanOrEqualTo(0)),
40613 start: Schema.Number.annotate({ format: "uint" })
40614 .check(Schema.isInt())
40615 .check(Schema.isGreaterThanOrEqualTo(0)),
40616});
40617
40618export type V2ThreadListResponse__CollabAgentTool =
40619 | "spawnAgent"
40620 | "sendInput"
40621 | "resumeAgent"
40622 | "wait"
40623 | "closeAgent"
40624 | "sendMessage"
40625 | "followupTask"
40626 | "interruptAgent"
40627 | "listAgents";
40628export const V2ThreadListResponse__CollabAgentTool = Schema.Literals([
40629 "spawnAgent",
40630 "sendInput",
40631 "resumeAgent",
40632 "wait",
40633 "closeAgent",
40634 "sendMessage",
40635 "followupTask",
40636 "interruptAgent",
40637 "listAgents",
40638]);
40639
40640export type V2ThreadListResponse__CollabAgentToolCallStatus =
40641 | "inProgress"
40642 | "completed"
40643 | "failed"
40644 | "interrupted";
40645export const V2ThreadListResponse__CollabAgentToolCallStatus = Schema.Literals([
40646 "inProgress",
40647 "completed",
40648 "failed",
40649 "interrupted",
40650]);
40651
40652export type V2ThreadListResponse__CommandExecutionSource =
40653 | "agent"
40654 | "userShell"
40655 | "unifiedExecStartup"
40656 | "unifiedExecInteraction";
40657export const V2ThreadListResponse__CommandExecutionSource = Schema.Literals([
40658 "agent",
40659 "userShell",
40660 "unifiedExecStartup",
40661 "unifiedExecInteraction",
40662]);
40663
40664export type V2ThreadListResponse__SessionSource =
40665 | "cli"
40666 | "vscode"
40667 | "exec"
40668 | "appServer"
40669 | "unknown"
40670 | { readonly custom: string }
40671 | { readonly subAgent: V2ThreadListResponse__SubAgentSource };
40672export const V2ThreadListResponse__SessionSource = Schema.Union(
40673 [
40674 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
40675 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
40676 Schema.Struct({ subAgent: V2ThreadListResponse__SubAgentSource }).annotate({
40677 title: "SubAgentSessionSource",
40678 }),
40679 ],
40680 { mode: "oneOf" },
40681);
40682
40683export type V2ThreadListResponse__ThreadExtra = {};
40684export const V2ThreadListResponse__ThreadExtra = Schema.Struct({}).annotate({
40685 description: "Extra app-server data for a thread.",
40686});
43630export type V2ThreadListResponse__ThreadExtra = { readonly [x: string]: Schema.Json };
43631export const V2ThreadListResponse__ThreadExtra = Schema.Record(
43632 Schema.String,
43633 Schema.Json.annotate({ expected: "JSON value" }),
43634).annotate({ description: "Extra app-server data for a thread." });
4068743635
4068843636export type V2ThreadListResponse__ThreadHistoryMode = "legacy" | "paginated";
4068943637export const V2ThreadListResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]);
4069043638
40691export type V2ThreadListResponse__ThreadStatus =
40692 | { readonly type: "notLoaded" }
40693 | { readonly type: "idle" }
40694 | { readonly type: "systemError" }
40695 | {
40696 readonly activeFlags: ReadonlyArray<V2ThreadListResponse__ThreadActiveFlag>;
40697 readonly type: "active";
40698 };
40699export const V2ThreadListResponse__ThreadStatus = Schema.Union(
40700 [
40701 Schema.Struct({
40702 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
40703 }).annotate({ title: "NotLoadedThreadStatus" }),
40704 Schema.Struct({
40705 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
40706 }).annotate({ title: "IdleThreadStatus" }),
40707 Schema.Struct({
40708 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
40709 }).annotate({ title: "SystemErrorThreadStatus" }),
40710 Schema.Struct({
40711 activeFlags: Schema.Array(V2ThreadListResponse__ThreadActiveFlag),
40712 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
40713 }).annotate({ title: "ActiveThreadStatus" }),
40714 ],
40715 { mode: "oneOf" },
40716);
40717
40718export type V2ThreadListResponse__TurnItemsView = "notLoaded" | "summary" | "full";
40719export const V2ThreadListResponse__TurnItemsView = Schema.Literals([
40720 "notLoaded",
40721 "summary",
40722 "full",
40723]);
40724
4072543639export type V2ThreadLoadedListParams = {
4072643640 readonly cursor?: string | null;
4072743641 readonly limit?: number | null;
......@@ -40741,8 +43655,12 @@ export const V2ThreadLoadedListParams = Schema.Struct({
4074143655 description: "Optional page size; defaults to no limit.",
4074243656 format: "uint32",
4074343657 })
40744 .check(Schema.isInt())
40745 .check(Schema.isGreaterThanOrEqualTo(0)),
43658 .check(Schema.isInt().annotate({ expected: "an integer" }))
43659 .check(
43660 Schema.isGreaterThanOrEqualTo(0).annotate({
43661 expected: "a value greater than or equal to 0",
43662 }),
43663 ),
4074643664 Schema.Null,
4074743665 ]),
4074843666 ),
......@@ -40791,88 +43709,11 @@ export const V2ThreadMetadataUpdateResponse = Schema.Struct({
4079143709 thread: V2ThreadMetadataUpdateResponse__Thread,
4079243710}).annotate({ title: "ThreadMetadataUpdateResponse" });
4079343711
40794export type V2ThreadMetadataUpdateResponse__ByteRange = {
40795 readonly end: number;
40796 readonly start: number;
40797};
40798export const V2ThreadMetadataUpdateResponse__ByteRange = Schema.Struct({
40799 end: Schema.Number.annotate({ format: "uint" })
40800 .check(Schema.isInt())
40801 .check(Schema.isGreaterThanOrEqualTo(0)),
40802 start: Schema.Number.annotate({ format: "uint" })
40803 .check(Schema.isInt())
40804 .check(Schema.isGreaterThanOrEqualTo(0)),
40805});
40806
40807export type V2ThreadMetadataUpdateResponse__CollabAgentTool =
40808 | "spawnAgent"
40809 | "sendInput"
40810 | "resumeAgent"
40811 | "wait"
40812 | "closeAgent"
40813 | "sendMessage"
40814 | "followupTask"
40815 | "interruptAgent"
40816 | "listAgents";
40817export const V2ThreadMetadataUpdateResponse__CollabAgentTool = Schema.Literals([
40818 "spawnAgent",
40819 "sendInput",
40820 "resumeAgent",
40821 "wait",
40822 "closeAgent",
40823 "sendMessage",
40824 "followupTask",
40825 "interruptAgent",
40826 "listAgents",
40827]);
40828
40829export type V2ThreadMetadataUpdateResponse__CollabAgentToolCallStatus =
40830 | "inProgress"
40831 | "completed"
40832 | "failed"
40833 | "interrupted";
40834export const V2ThreadMetadataUpdateResponse__CollabAgentToolCallStatus = Schema.Literals([
40835 "inProgress",
40836 "completed",
40837 "failed",
40838 "interrupted",
40839]);
40840
40841export type V2ThreadMetadataUpdateResponse__CommandExecutionSource =
40842 | "agent"
40843 | "userShell"
40844 | "unifiedExecStartup"
40845 | "unifiedExecInteraction";
40846export const V2ThreadMetadataUpdateResponse__CommandExecutionSource = Schema.Literals([
40847 "agent",
40848 "userShell",
40849 "unifiedExecStartup",
40850 "unifiedExecInteraction",
40851]);
40852
40853export type V2ThreadMetadataUpdateResponse__SessionSource =
40854 | "cli"
40855 | "vscode"
40856 | "exec"
40857 | "appServer"
40858 | "unknown"
40859 | { readonly custom: string }
40860 | { readonly subAgent: V2ThreadMetadataUpdateResponse__SubAgentSource };
40861export const V2ThreadMetadataUpdateResponse__SessionSource = Schema.Union(
40862 [
40863 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
40864 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
40865 Schema.Struct({ subAgent: V2ThreadMetadataUpdateResponse__SubAgentSource }).annotate({
40866 title: "SubAgentSessionSource",
40867 }),
40868 ],
40869 { mode: "oneOf" },
40870);
40871
40872export type V2ThreadMetadataUpdateResponse__ThreadExtra = {};
40873export const V2ThreadMetadataUpdateResponse__ThreadExtra = Schema.Struct({}).annotate({
40874 description: "Extra app-server data for a thread.",
40875});
43712export type V2ThreadMetadataUpdateResponse__ThreadExtra = { readonly [x: string]: Schema.Json };
43713export const V2ThreadMetadataUpdateResponse__ThreadExtra = Schema.Record(
43714 Schema.String,
43715 Schema.Json.annotate({ expected: "JSON value" }),
43716).annotate({ description: "Extra app-server data for a thread." });
4087643717
4087743718export type V2ThreadMetadataUpdateResponse__ThreadHistoryMode = "legacy" | "paginated";
4087843719export const V2ThreadMetadataUpdateResponse__ThreadHistoryMode = Schema.Literals([
......@@ -40880,40 +43721,6 @@ export const V2ThreadMetadataUpdateResponse__ThreadHistoryMode = Schema.Literals
4088043721 "paginated",
4088143722]);
4088243723
40883export type V2ThreadMetadataUpdateResponse__ThreadStatus =
40884 | { readonly type: "notLoaded" }
40885 | { readonly type: "idle" }
40886 | { readonly type: "systemError" }
40887 | {
40888 readonly activeFlags: ReadonlyArray<V2ThreadMetadataUpdateResponse__ThreadActiveFlag>;
40889 readonly type: "active";
40890 };
40891export const V2ThreadMetadataUpdateResponse__ThreadStatus = Schema.Union(
40892 [
40893 Schema.Struct({
40894 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
40895 }).annotate({ title: "NotLoadedThreadStatus" }),
40896 Schema.Struct({
40897 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
40898 }).annotate({ title: "IdleThreadStatus" }),
40899 Schema.Struct({
40900 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
40901 }).annotate({ title: "SystemErrorThreadStatus" }),
40902 Schema.Struct({
40903 activeFlags: Schema.Array(V2ThreadMetadataUpdateResponse__ThreadActiveFlag),
40904 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
40905 }).annotate({ title: "ActiveThreadStatus" }),
40906 ],
40907 { mode: "oneOf" },
40908);
40909
40910export type V2ThreadMetadataUpdateResponse__TurnItemsView = "notLoaded" | "summary" | "full";
40911export const V2ThreadMetadataUpdateResponse__TurnItemsView = Schema.Literals([
40912 "notLoaded",
40913 "summary",
40914 "full",
40915]);
40916
4091743724export type V2ThreadNameUpdatedNotification = {
4091843725 readonly threadId: string;
4091943726 readonly threadName?: string | null;
......@@ -40938,123 +43745,15 @@ export const V2ThreadReadResponse = Schema.Struct({
4093843745 thread: V2ThreadReadResponse__Thread,
4093943746}).annotate({ title: "ThreadReadResponse" });
4094043747
40941export type V2ThreadReadResponse__ByteRange = { readonly end: number; readonly start: number };
40942export const V2ThreadReadResponse__ByteRange = Schema.Struct({
40943 end: Schema.Number.annotate({ format: "uint" })
40944 .check(Schema.isInt())
40945 .check(Schema.isGreaterThanOrEqualTo(0)),
40946 start: Schema.Number.annotate({ format: "uint" })
40947 .check(Schema.isInt())
40948 .check(Schema.isGreaterThanOrEqualTo(0)),
40949});
40950
40951export type V2ThreadReadResponse__CollabAgentTool =
40952 | "spawnAgent"
40953 | "sendInput"
40954 | "resumeAgent"
40955 | "wait"
40956 | "closeAgent"
40957 | "sendMessage"
40958 | "followupTask"
40959 | "interruptAgent"
40960 | "listAgents";
40961export const V2ThreadReadResponse__CollabAgentTool = Schema.Literals([
40962 "spawnAgent",
40963 "sendInput",
40964 "resumeAgent",
40965 "wait",
40966 "closeAgent",
40967 "sendMessage",
40968 "followupTask",
40969 "interruptAgent",
40970 "listAgents",
40971]);
40972
40973export type V2ThreadReadResponse__CollabAgentToolCallStatus =
40974 | "inProgress"
40975 | "completed"
40976 | "failed"
40977 | "interrupted";
40978export const V2ThreadReadResponse__CollabAgentToolCallStatus = Schema.Literals([
40979 "inProgress",
40980 "completed",
40981 "failed",
40982 "interrupted",
40983]);
40984
40985export type V2ThreadReadResponse__CommandExecutionSource =
40986 | "agent"
40987 | "userShell"
40988 | "unifiedExecStartup"
40989 | "unifiedExecInteraction";
40990export const V2ThreadReadResponse__CommandExecutionSource = Schema.Literals([
40991 "agent",
40992 "userShell",
40993 "unifiedExecStartup",
40994 "unifiedExecInteraction",
40995]);
40996
40997export type V2ThreadReadResponse__SessionSource =
40998 | "cli"
40999 | "vscode"
41000 | "exec"
41001 | "appServer"
41002 | "unknown"
41003 | { readonly custom: string }
41004 | { readonly subAgent: V2ThreadReadResponse__SubAgentSource };
41005export const V2ThreadReadResponse__SessionSource = Schema.Union(
41006 [
41007 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
41008 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
41009 Schema.Struct({ subAgent: V2ThreadReadResponse__SubAgentSource }).annotate({
41010 title: "SubAgentSessionSource",
41011 }),
41012 ],
41013 { mode: "oneOf" },
41014);
41015
41016export type V2ThreadReadResponse__ThreadExtra = {};
41017export const V2ThreadReadResponse__ThreadExtra = Schema.Struct({}).annotate({
41018 description: "Extra app-server data for a thread.",
41019});
43748export type V2ThreadReadResponse__ThreadExtra = { readonly [x: string]: Schema.Json };
43749export const V2ThreadReadResponse__ThreadExtra = Schema.Record(
43750 Schema.String,
43751 Schema.Json.annotate({ expected: "JSON value" }),
43752).annotate({ description: "Extra app-server data for a thread." });
4102043753
4102143754export type V2ThreadReadResponse__ThreadHistoryMode = "legacy" | "paginated";
4102243755export const V2ThreadReadResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]);
4102343756
41024export type V2ThreadReadResponse__ThreadStatus =
41025 | { readonly type: "notLoaded" }
41026 | { readonly type: "idle" }
41027 | { readonly type: "systemError" }
41028 | {
41029 readonly activeFlags: ReadonlyArray<V2ThreadReadResponse__ThreadActiveFlag>;
41030 readonly type: "active";
41031 };
41032export const V2ThreadReadResponse__ThreadStatus = Schema.Union(
41033 [
41034 Schema.Struct({
41035 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
41036 }).annotate({ title: "NotLoadedThreadStatus" }),
41037 Schema.Struct({
41038 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
41039 }).annotate({ title: "IdleThreadStatus" }),
41040 Schema.Struct({
41041 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
41042 }).annotate({ title: "SystemErrorThreadStatus" }),
41043 Schema.Struct({
41044 activeFlags: Schema.Array(V2ThreadReadResponse__ThreadActiveFlag),
41045 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
41046 }).annotate({ title: "ActiveThreadStatus" }),
41047 ],
41048 { mode: "oneOf" },
41049);
41050
41051export type V2ThreadReadResponse__TurnItemsView = "notLoaded" | "summary" | "full";
41052export const V2ThreadReadResponse__TurnItemsView = Schema.Literals([
41053 "notLoaded",
41054 "summary",
41055 "full",
41056]);
41057
4105843757export type V2ThreadRealtimeClosedNotification = {
4105943758 readonly reason?: string | null;
4106043759 readonly threadId: string;
......@@ -41080,11 +43779,11 @@ export const V2ThreadRealtimeErrorNotification = Schema.Struct({
4108043779});
4108143780
4108243781export type V2ThreadRealtimeItemAddedNotification = {
41083 readonly item: unknown;
43782 readonly item: Schema.Json;
4108443783 readonly threadId: string;
4108543784};
4108643785export const V2ThreadRealtimeItemAddedNotification = Schema.Struct({
41087 item: Schema.Unknown,
43786 item: Schema.Json.annotate({ expected: "JSON value" }),
4108843787 threadId: Schema.String,
4108943788}).annotate({
4109043789 title: "ThreadRealtimeItemAddedNotification",
......@@ -41160,7 +43859,7 @@ export type V2ThreadResumeParams = {
4116043859 readonly approvalPolicy?: V2ThreadResumeParams__AskForApproval | null;
4116143860 readonly approvalsReviewer?: V2ThreadResumeParams__ApprovalsReviewer | null;
4116243861 readonly baseInstructions?: string | null;
41163 readonly config?: { readonly [x: string]: unknown } | null;
43862 readonly config?: { readonly [x: string]: Schema.Json } | null;
4116443863 readonly cwd?: string | null;
4116543864 readonly developerInstructions?: string | null;
4116643865 readonly model?: string | null;
......@@ -41182,7 +43881,10 @@ export const V2ThreadResumeParams = Schema.Struct({
4118243881 ),
4118343882 baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4118443883 config: Schema.optionalKey(
41185 Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]),
43884 Schema.Union([
43885 Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
43886 Schema.Null,
43887 ]),
4118643888 ),
4118743889 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4118843890 developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
......@@ -41254,7 +43956,7 @@ export type V2ThreadResumeParams__ResponseItem =
4125443956 readonly type: "function_call";
4125543957 }
4125643958 | {
41257 readonly arguments: unknown;
43959 readonly arguments: Schema.Json;
4125843960 readonly call_id?: string | null;
4125943961 readonly execution: string;
4126043962 readonly id?: string | null;
......@@ -41293,7 +43995,7 @@ export type V2ThreadResumeParams__ResponseItem =
4129343995 readonly id?: string | null;
4129443996 readonly internal_chat_message_metadata_passthrough?: V2ThreadResumeParams__InternalChatMessageMetadataPassthrough | null;
4129543997 readonly status: string;
41296 readonly tools: ReadonlyArray<unknown>;
43998 readonly tools: ReadonlyArray<Schema.Json>;
4129743999 readonly type: "tool_search_output";
4129844000 }
4129944001 | {
......@@ -41395,7 +44097,7 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union(
4139544097 type: Schema.Literal("function_call").annotate({ title: "FunctionCallResponseItemType" }),
4139644098 }).annotate({ title: "FunctionCallResponseItem" }),
4139744099 Schema.Struct({
41398 arguments: Schema.Unknown,
44100 arguments: Schema.Json.annotate({ expected: "JSON value" }),
4139944101 call_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4140044102 execution: Schema.String,
4140144103 id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
......@@ -41452,7 +44154,7 @@ export const V2ThreadResumeParams__ResponseItem = Schema.Union(
4145244154 Schema.Union([V2ThreadResumeParams__InternalChatMessageMetadataPassthrough, Schema.Null]),
4145344155 ),
4145444156 status: Schema.String,
41455 tools: Schema.Array(Schema.Unknown),
44157 tools: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
4145644158 type: Schema.Literal("tool_search_output").annotate({
4145744159 title: "ToolSearchOutputResponseItemType",
4145844160 }),
......@@ -41524,8 +44226,12 @@ export const V2ThreadResumeParams__ThreadResumeInitialTurnsPageParams = Schema.S
4152444226 limit: Schema.optionalKey(
4152544227 Schema.Union([
4152644228 Schema.Number.annotate({ description: "Optional turn page size.", format: "uint32" })
41527 .check(Schema.isInt())
41528 .check(Schema.isGreaterThanOrEqualTo(0)),
44229 .check(Schema.isInt().annotate({ expected: "an integer" }))
44230 .check(
44231 Schema.isGreaterThanOrEqualTo(0).annotate({
44232 expected: "a value greater than or equal to 0",
44233 }),
44234 ),
4152944235 Schema.Null,
4153044236 ]),
4153144237 ),
......@@ -41538,32 +44244,22 @@ export const V2ThreadResumeParams__ThreadResumeInitialTurnsPageParams = Schema.S
4153844244
4153944245export type V2ThreadResumeResponse = {
4154044246 readonly approvalPolicy: V2ThreadResumeResponse__AskForApproval;
41541 readonly approvalsReviewer: "user" | "auto_review" | "guardian_subagent";
44247 readonly approvalsReviewer: V2ThreadResumeResponse__ApprovalsReviewer;
4154244248 readonly cwd: V2ThreadResumeResponse__AbsolutePathBuf;
4154344249 readonly instructionSources?: ReadonlyArray<V2ThreadResumeResponse__LegacyAppPathString>;
4154444250 readonly model: string;
4154544251 readonly modelProvider: string;
4154644252 readonly reasoningEffort?: V2ThreadResumeResponse__ReasoningEffort | null;
41547 readonly sandbox:
41548 | { readonly type: "dangerFullAccess" }
41549 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
41550 | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
41551 | {
41552 readonly excludeSlashTmp?: boolean;
41553 readonly excludeTmpdirEnvVar?: boolean;
41554 readonly networkAccess?: boolean;
41555 readonly type: "workspaceWrite";
41556 readonly writableRoots?: ReadonlyArray<V2ThreadResumeResponse__AbsolutePathBuf>;
41557 };
44253 readonly sandbox: V2ThreadResumeResponse__SandboxPolicy;
4155844254 readonly serviceTier?: string | null;
4155944255 readonly thread: V2ThreadResumeResponse__Thread;
4156044256};
4156144257export const V2ThreadResumeResponse = Schema.Struct({
4156244258 approvalPolicy: V2ThreadResumeResponse__AskForApproval,
41563 approvalsReviewer: Schema.Literals(["user", "auto_review", "guardian_subagent"]).annotate({
41564 description:
41565 "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.",
41566 }),
44259 approvalsReviewer: Schema.suspend(
44260 (): Schema.Codec<V2ThreadResumeResponse__ApprovalsReviewer> =>
44261 V2ThreadResumeResponse__ApprovalsReviewer,
44262 ).annotate({ description: "Reviewer currently used for approval requests on this thread." }),
4156744263 cwd: V2ThreadResumeResponse__AbsolutePathBuf,
4156844264 instructionSources: Schema.optionalKey(
4156944265 Schema.Array(V2ThreadResumeResponse__LegacyAppPathString).annotate({
......@@ -41577,257 +44273,61 @@ export const V2ThreadResumeResponse = Schema.Struct({
4157744273 reasoningEffort: Schema.optionalKey(
4157844274 Schema.Union([V2ThreadResumeResponse__ReasoningEffort, Schema.Null]),
4157944275 ),
41580 sandbox: Schema.Union(
41581 [
41582 Schema.Struct({
41583 type: Schema.Literal("dangerFullAccess").annotate({
41584 title: "DangerFullAccessSandboxPolicyType",
41585 }),
41586 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
41587 Schema.Struct({
41588 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
41589 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
41590 }).annotate({ title: "ReadOnlySandboxPolicy" }),
41591 Schema.Struct({
41592 networkAccess: Schema.optionalKey(
41593 Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
41594 ),
41595 type: Schema.Literal("externalSandbox").annotate({
41596 title: "ExternalSandboxSandboxPolicyType",
41597 }),
41598 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
41599 Schema.Struct({
41600 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
41601 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
41602 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
41603 type: Schema.Literal("workspaceWrite").annotate({
41604 title: "WorkspaceWriteSandboxPolicyType",
41605 }),
41606 writableRoots: Schema.optionalKey(
41607 Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }),
41608 ),
41609 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
41610 ],
41611 { mode: "oneOf" },
44276 sandbox: Schema.suspend(
44277 (): Schema.Codec<V2ThreadResumeResponse__SandboxPolicy> =>
44278 V2ThreadResumeResponse__SandboxPolicy,
4161244279 ).annotate({
4161344280 description:
4161444281 "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.",
4161544282 }),
41616 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
41617 thread: V2ThreadResumeResponse__Thread,
41618}).annotate({ title: "ThreadResumeResponse" });
41619
41620export type V2ThreadResumeResponse__ActivePermissionProfile = {
41621 readonly extends?: string | null;
41622 readonly id: string;
41623};
41624export const V2ThreadResumeResponse__ActivePermissionProfile = Schema.Struct({
41625 extends: Schema.optionalKey(
41626 Schema.Union([
41627 Schema.String.annotate({
41628 description:
41629 "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
41630 }),
41631 Schema.Null,
41632 ]),
41633 ),
41634 id: Schema.String.annotate({
41635 description:
41636 "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
41637 }),
41638});
41639
41640export type V2ThreadResumeResponse__ApprovalsReviewer =
41641 | "user"
41642 | "auto_review"
41643 | "guardian_subagent";
41644export const V2ThreadResumeResponse__ApprovalsReviewer = Schema.Literals([
41645 "user",
41646 "auto_review",
41647 "guardian_subagent",
41648]).annotate({
41649 description:
41650 "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.",
41651});
41652
41653export type V2ThreadResumeResponse__ByteRange = { readonly end: number; readonly start: number };
41654export const V2ThreadResumeResponse__ByteRange = Schema.Struct({
41655 end: Schema.Number.annotate({ format: "uint" })
41656 .check(Schema.isInt())
41657 .check(Schema.isGreaterThanOrEqualTo(0)),
41658 start: Schema.Number.annotate({ format: "uint" })
41659 .check(Schema.isInt())
41660 .check(Schema.isGreaterThanOrEqualTo(0)),
41661});
41662
41663export type V2ThreadResumeResponse__CollabAgentTool =
41664 | "spawnAgent"
41665 | "sendInput"
41666 | "resumeAgent"
41667 | "wait"
41668 | "closeAgent"
41669 | "sendMessage"
41670 | "followupTask"
41671 | "interruptAgent"
41672 | "listAgents";
41673export const V2ThreadResumeResponse__CollabAgentTool = Schema.Literals([
41674 "spawnAgent",
41675 "sendInput",
41676 "resumeAgent",
41677 "wait",
41678 "closeAgent",
41679 "sendMessage",
41680 "followupTask",
41681 "interruptAgent",
41682 "listAgents",
41683]);
41684
41685export type V2ThreadResumeResponse__CollabAgentToolCallStatus =
41686 | "inProgress"
41687 | "completed"
41688 | "failed"
41689 | "interrupted";
41690export const V2ThreadResumeResponse__CollabAgentToolCallStatus = Schema.Literals([
41691 "inProgress",
41692 "completed",
41693 "failed",
41694 "interrupted",
41695]);
41696
41697export type V2ThreadResumeResponse__CommandExecutionSource =
41698 | "agent"
41699 | "userShell"
41700 | "unifiedExecStartup"
41701 | "unifiedExecInteraction";
41702export const V2ThreadResumeResponse__CommandExecutionSource = Schema.Literals([
41703 "agent",
41704 "userShell",
41705 "unifiedExecStartup",
41706 "unifiedExecInteraction",
41707]);
41708
41709export type V2ThreadResumeResponse__MultiAgentMode =
41710 | "explicitRequestOnly"
41711 | "proactive"
41712 | { readonly custom: string };
41713export const V2ThreadResumeResponse__MultiAgentMode = Schema.Union(
41714 [
41715 Schema.Literals(["explicitRequestOnly", "proactive"]),
41716 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomMultiAgentMode" }),
41717 ],
41718 { mode: "oneOf" },
41719).annotate({
41720 description:
41721 "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.",
41722});
41723
41724export type V2ThreadResumeResponse__NetworkAccess = "restricted" | "enabled";
41725export const V2ThreadResumeResponse__NetworkAccess = Schema.Literals(["restricted", "enabled"]);
41726
41727export type V2ThreadResumeResponse__SandboxPolicy =
41728 | { readonly type: "dangerFullAccess" }
41729 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
41730 | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
41731 | {
41732 readonly excludeSlashTmp?: boolean;
41733 readonly excludeTmpdirEnvVar?: boolean;
41734 readonly networkAccess?: boolean;
41735 readonly type: "workspaceWrite";
41736 readonly writableRoots?: ReadonlyArray<V2ThreadResumeResponse__AbsolutePathBuf>;
41737 };
41738export const V2ThreadResumeResponse__SandboxPolicy = Schema.Union(
41739 [
41740 Schema.Struct({
41741 type: Schema.Literal("dangerFullAccess").annotate({
41742 title: "DangerFullAccessSandboxPolicyType",
41743 }),
41744 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
41745 Schema.Struct({
41746 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
41747 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
41748 }).annotate({ title: "ReadOnlySandboxPolicy" }),
41749 Schema.Struct({
41750 networkAccess: Schema.optionalKey(
41751 Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
41752 ),
41753 type: Schema.Literal("externalSandbox").annotate({
41754 title: "ExternalSandboxSandboxPolicyType",
44283 serviceTier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
44284 thread: V2ThreadResumeResponse__Thread,
44285}).annotate({ title: "ThreadResumeResponse" });
44286
44287export type V2ThreadResumeResponse__ActivePermissionProfile = {
44288 readonly extends?: string | null;
44289 readonly id: string;
44290};
44291export const V2ThreadResumeResponse__ActivePermissionProfile = Schema.Struct({
44292 extends: Schema.optionalKey(
44293 Schema.Union([
44294 Schema.String.annotate({
44295 description:
44296 "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
4175544297 }),
41756 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
41757 Schema.Struct({
41758 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
41759 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
41760 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
41761 type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
41762 writableRoots: Schema.optionalKey(
41763 Schema.Array(V2ThreadResumeResponse__AbsolutePathBuf).annotate({ default: [] }),
41764 ),
41765 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
41766 ],
41767 { mode: "oneOf" },
41768);
44298 Schema.Null,
44299 ]),
44300 ),
44301 id: Schema.String.annotate({
44302 description:
44303 "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
44304 }),
44305});
4176944306
41770export type V2ThreadResumeResponse__SessionSource =
41771 | "cli"
41772 | "vscode"
41773 | "exec"
41774 | "appServer"
41775 | "unknown"
41776 | { readonly custom: string }
41777 | { readonly subAgent: V2ThreadResumeResponse__SubAgentSource };
41778export const V2ThreadResumeResponse__SessionSource = Schema.Union(
44307export type V2ThreadResumeResponse__MultiAgentMode =
44308 | "explicitRequestOnly"
44309 | "proactive"
44310 | { readonly custom: string };
44311export const V2ThreadResumeResponse__MultiAgentMode = Schema.Union(
4177944312 [
41780 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
41781 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
41782 Schema.Struct({ subAgent: V2ThreadResumeResponse__SubAgentSource }).annotate({
41783 title: "SubAgentSessionSource",
41784 }),
44313 Schema.Literals(["explicitRequestOnly", "proactive"]),
44314 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomMultiAgentMode" }),
4178544315 ],
4178644316 { mode: "oneOf" },
41787);
41788
41789export type V2ThreadResumeResponse__ThreadExtra = {};
41790export const V2ThreadResumeResponse__ThreadExtra = Schema.Struct({}).annotate({
41791 description: "Extra app-server data for a thread.",
44317).annotate({
44318 description:
44319 "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.",
4179244320});
4179344321
44322export type V2ThreadResumeResponse__ThreadExtra = { readonly [x: string]: Schema.Json };
44323export const V2ThreadResumeResponse__ThreadExtra = Schema.Record(
44324 Schema.String,
44325 Schema.Json.annotate({ expected: "JSON value" }),
44326).annotate({ description: "Extra app-server data for a thread." });
44327
4179444328export type V2ThreadResumeResponse__ThreadHistoryMode = "legacy" | "paginated";
4179544329export const V2ThreadResumeResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]);
4179644330
41797export type V2ThreadResumeResponse__ThreadStatus =
41798 | { readonly type: "notLoaded" }
41799 | { readonly type: "idle" }
41800 | { readonly type: "systemError" }
41801 | {
41802 readonly activeFlags: ReadonlyArray<V2ThreadResumeResponse__ThreadActiveFlag>;
41803 readonly type: "active";
41804 };
41805export const V2ThreadResumeResponse__ThreadStatus = Schema.Union(
41806 [
41807 Schema.Struct({
41808 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
41809 }).annotate({ title: "NotLoadedThreadStatus" }),
41810 Schema.Struct({
41811 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
41812 }).annotate({ title: "IdleThreadStatus" }),
41813 Schema.Struct({
41814 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
41815 }).annotate({ title: "SystemErrorThreadStatus" }),
41816 Schema.Struct({
41817 activeFlags: Schema.Array(V2ThreadResumeResponse__ThreadActiveFlag),
41818 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
41819 }).annotate({ title: "ActiveThreadStatus" }),
41820 ],
41821 { mode: "oneOf" },
41822);
41823
41824export type V2ThreadResumeResponse__TurnItemsView = "notLoaded" | "summary" | "full";
41825export const V2ThreadResumeResponse__TurnItemsView = Schema.Literals([
41826 "notLoaded",
41827 "summary",
41828 "full",
41829]);
41830
4183144331export type V2ThreadResumeResponse__TurnsPage = {
4183244332 readonly backwardsCursor?: string | null;
4183344333 readonly data: ReadonlyArray<V2ThreadResumeResponse__Turn>;
......@@ -41846,486 +44346,46 @@ export const V2ThreadRollbackParams = Schema.Struct({
4184644346 "The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.",
4184744347 format: "uint32",
4184844348 })
41849 .check(Schema.isInt())
41850 .check(Schema.isGreaterThanOrEqualTo(0)),
44349 .check(Schema.isInt().annotate({ expected: "an integer" }))
44350 .check(
44351 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
44352 ),
4185144353 threadId: Schema.String,
4185244354}).annotate({
4185344355 title: "ThreadRollbackParams",
4185444356 description: "DEPRECATED: `thread/rollback` will be removed soon.",
4185544357});
4185644358
41857export type V2ThreadRollbackResponse = {
41858 readonly thread: {
41859 readonly agentNickname?: string | null;
41860 readonly agentRole?: string | null;
41861 readonly cliVersion: string;
41862 readonly createdAt: number;
41863 readonly cwd: string;
41864 readonly ephemeral: boolean;
41865 readonly forkedFromId?: string | null;
41866 readonly gitInfo?: V2ThreadRollbackResponse__GitInfo | null;
41867 readonly id: string;
41868 readonly modelProvider: string;
41869 readonly name?: string | null;
41870 readonly parentThreadId?: string | null;
41871 readonly path?: string | null;
41872 readonly preview: string;
41873 readonly recencyAt?: number | null;
41874 readonly sessionId: string;
41875 readonly source:
41876 | "cli"
41877 | "vscode"
41878 | "exec"
41879 | "appServer"
41880 | "unknown"
41881 | { readonly custom: string }
41882 | { readonly subAgent: V2ThreadRollbackResponse__SubAgentSource };
41883 readonly status:
41884 | { readonly type: "notLoaded" }
41885 | { readonly type: "idle" }
41886 | { readonly type: "systemError" }
41887 | {
41888 readonly activeFlags: ReadonlyArray<V2ThreadRollbackResponse__ThreadActiveFlag>;
41889 readonly type: "active";
41890 };
41891 readonly threadSource?: V2ThreadRollbackResponse__ThreadSource | null;
41892 readonly turns: ReadonlyArray<V2ThreadRollbackResponse__Turn>;
41893 readonly updatedAt: number;
41894 };
41895};
44359export type V2ThreadRollbackResponse = { readonly thread: V2ThreadRollbackResponse__Thread };
4189644360export const V2ThreadRollbackResponse = Schema.Struct({
41897 thread: Schema.Struct({
41898 agentNickname: Schema.optionalKey(
41899 Schema.Union([
41900 Schema.String.annotate({
41901 description:
41902 "Optional random unique nickname assigned to an AgentControl-spawned sub-agent.",
41903 }),
41904 Schema.Null,
41905 ]),
41906 ),
41907 agentRole: Schema.optionalKey(
41908 Schema.Union([
41909 Schema.String.annotate({
41910 description: "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.",
41911 }),
41912 Schema.Null,
41913 ]),
41914 ),
41915 cliVersion: Schema.String.annotate({
41916 description: "Version of the CLI that created the thread.",
41917 }),
41918 createdAt: Schema.Number.annotate({
41919 description: "Unix timestamp (in seconds) when the thread was created.",
41920 format: "int64",
41921 }).check(Schema.isInt()),
41922 cwd: Schema.String.annotate({
41923 description:
41924 "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.",
41925 }),
41926 ephemeral: Schema.Boolean.annotate({
41927 description: "Whether the thread is ephemeral and should not be materialized on disk.",
41928 }),
41929 forkedFromId: Schema.optionalKey(
41930 Schema.Union([
41931 Schema.String.annotate({
41932 description: "Source thread id when this thread was created by forking another thread.",
41933 }),
41934 Schema.Null,
41935 ]),
41936 ),
41937 gitInfo: Schema.optionalKey(
41938 Schema.Union([V2ThreadRollbackResponse__GitInfo, Schema.Null]).annotate({
41939 description: "Optional Git metadata captured when the thread was created.",
41940 }),
41941 ),
41942 id: Schema.String.annotate({
41943 description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
41944 }),
41945 modelProvider: Schema.String.annotate({
41946 description: "Model provider used for this thread (for example, 'openai').",
41947 }),
41948 name: Schema.optionalKey(
41949 Schema.Union([
41950 Schema.String.annotate({ description: "Optional user-facing thread title." }),
41951 Schema.Null,
41952 ]),
41953 ),
41954 parentThreadId: Schema.optionalKey(
41955 Schema.Union([
41956 Schema.String.annotate({
41957 description:
41958 "The ID of the parent thread. This will only be set if this thread is a subagent.",
41959 }),
41960 Schema.Null,
41961 ]),
41962 ),
41963 path: Schema.optionalKey(
41964 Schema.Union([
41965 Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }),
41966 Schema.Null,
41967 ]),
41968 ),
41969 preview: Schema.String.annotate({
41970 description: "Usually the first user message in the thread, if available.",
41971 }),
41972 recencyAt: Schema.optionalKey(
41973 Schema.Union([
41974 Schema.Number.annotate({
41975 description: "Unix timestamp (in seconds) used for thread recency ordering.",
41976 format: "int64",
41977 }).check(Schema.isInt()),
41978 Schema.Null,
41979 ]),
41980 ),
41981 sessionId: Schema.String.annotate({
41982 description: "Session id shared by threads that belong to the same session tree.",
41983 }),
41984 source: Schema.Union(
41985 [
41986 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
41987 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
41988 Schema.Struct({ subAgent: V2ThreadRollbackResponse__SubAgentSource }).annotate({
41989 title: "SubAgentSessionSource",
41990 }),
41991 ],
41992 { mode: "oneOf" },
41993 ).annotate({
41994 description: "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).",
41995 }),
41996 status: Schema.Union(
41997 [
41998 Schema.Struct({
41999 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
42000 }).annotate({ title: "NotLoadedThreadStatus" }),
42001 Schema.Struct({
42002 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
42003 }).annotate({ title: "IdleThreadStatus" }),
42004 Schema.Struct({
42005 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
42006 }).annotate({ title: "SystemErrorThreadStatus" }),
42007 Schema.Struct({
42008 activeFlags: Schema.Array(V2ThreadRollbackResponse__ThreadActiveFlag),
42009 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
42010 }).annotate({ title: "ActiveThreadStatus" }),
42011 ],
42012 { mode: "oneOf" },
42013 ).annotate({ description: "Current runtime status for the thread." }),
42014 threadSource: Schema.optionalKey(
42015 Schema.Union([V2ThreadRollbackResponse__ThreadSource, Schema.Null]).annotate({
42016 description: "Optional analytics source classification for this thread.",
42017 }),
42018 ),
42019 turns: Schema.Array(V2ThreadRollbackResponse__Turn).annotate({
42020 description:
42021 "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.",
42022 }),
42023 updatedAt: Schema.Number.annotate({
42024 description: "Unix timestamp (in seconds) when the thread was last updated.",
42025 format: "int64",
42026 }).check(Schema.isInt()),
42027 }).annotate({
44361 thread: Schema.suspend(
44362 (): Schema.Codec<V2ThreadRollbackResponse__Thread> => V2ThreadRollbackResponse__Thread,
44363 ).annotate({
4202844364 description:
4202944365 "The updated thread after applying the rollback, with `turns` populated.\n\nThe ThreadItems stored in each Turn are lossy since we explicitly do not persist all agent interactions, such as command executions. This is the same behavior as `thread/resume`.",
4203044366 }),
4203144367}).annotate({ title: "ThreadRollbackResponse" });
4203244368
42033export type V2ThreadRollbackResponse__ByteRange = { readonly end: number; readonly start: number };
42034export const V2ThreadRollbackResponse__ByteRange = Schema.Struct({
42035 end: Schema.Number.annotate({ format: "uint" })
42036 .check(Schema.isInt())
42037 .check(Schema.isGreaterThanOrEqualTo(0)),
42038 start: Schema.Number.annotate({ format: "uint" })
42039 .check(Schema.isInt())
42040 .check(Schema.isGreaterThanOrEqualTo(0)),
42041});
42042
42043export type V2ThreadRollbackResponse__CollabAgentTool =
42044 | "spawnAgent"
42045 | "sendInput"
42046 | "resumeAgent"
42047 | "wait"
42048 | "closeAgent"
42049 | "sendMessage"
42050 | "followupTask"
42051 | "interruptAgent"
42052 | "listAgents";
42053export const V2ThreadRollbackResponse__CollabAgentTool = Schema.Literals([
42054 "spawnAgent",
42055 "sendInput",
42056 "resumeAgent",
42057 "wait",
42058 "closeAgent",
42059 "sendMessage",
42060 "followupTask",
42061 "interruptAgent",
42062 "listAgents",
42063]);
42064
42065export type V2ThreadRollbackResponse__CollabAgentToolCallStatus =
42066 | "inProgress"
42067 | "completed"
42068 | "failed"
42069 | "interrupted";
42070export const V2ThreadRollbackResponse__CollabAgentToolCallStatus = Schema.Literals([
42071 "inProgress",
42072 "completed",
42073 "failed",
42074 "interrupted",
42075]);
42076
42077export type V2ThreadRollbackResponse__CommandExecutionSource =
42078 | "agent"
42079 | "userShell"
42080 | "unifiedExecStartup"
42081 | "unifiedExecInteraction";
42082export const V2ThreadRollbackResponse__CommandExecutionSource = Schema.Literals([
42083 "agent",
42084 "userShell",
42085 "unifiedExecStartup",
42086 "unifiedExecInteraction",
42087]);
42088
42089export type V2ThreadRollbackResponse__SessionSource =
42090 | "cli"
42091 | "vscode"
42092 | "exec"
42093 | "appServer"
42094 | "unknown"
42095 | { readonly custom: string }
42096 | { readonly subAgent: V2ThreadRollbackResponse__SubAgentSource };
42097export const V2ThreadRollbackResponse__SessionSource = Schema.Union(
42098 [
42099 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
42100 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
42101 Schema.Struct({ subAgent: V2ThreadRollbackResponse__SubAgentSource }).annotate({
42102 title: "SubAgentSessionSource",
42103 }),
42104 ],
42105 { mode: "oneOf" },
42106);
42107
42108export type V2ThreadRollbackResponse__Thread = {
42109 readonly agentNickname?: string | null;
42110 readonly agentRole?: string | null;
42111 readonly cliVersion: string;
42112 readonly createdAt: number;
42113 readonly cwd: string;
42114 readonly ephemeral: boolean;
42115 readonly forkedFromId?: string | null;
42116 readonly gitInfo?: V2ThreadRollbackResponse__GitInfo | null;
42117 readonly id: string;
42118 readonly modelProvider: string;
42119 readonly name?: string | null;
42120 readonly parentThreadId?: string | null;
42121 readonly path?: string | null;
42122 readonly preview: string;
42123 readonly recencyAt?: number | null;
42124 readonly sessionId: string;
42125 readonly source:
42126 | "cli"
42127 | "vscode"
42128 | "exec"
42129 | "appServer"
42130 | "unknown"
42131 | { readonly custom: string }
42132 | { readonly subAgent: V2ThreadRollbackResponse__SubAgentSource };
42133 readonly status:
42134 | { readonly type: "notLoaded" }
42135 | { readonly type: "idle" }
42136 | { readonly type: "systemError" }
42137 | {
42138 readonly activeFlags: ReadonlyArray<V2ThreadRollbackResponse__ThreadActiveFlag>;
42139 readonly type: "active";
42140 };
42141 readonly threadSource?: V2ThreadRollbackResponse__ThreadSource | null;
42142 readonly turns: ReadonlyArray<V2ThreadRollbackResponse__Turn>;
42143 readonly updatedAt: number;
42144};
42145export const V2ThreadRollbackResponse__Thread = Schema.Struct({
42146 agentNickname: Schema.optionalKey(
42147 Schema.Union([
42148 Schema.String.annotate({
42149 description:
42150 "Optional random unique nickname assigned to an AgentControl-spawned sub-agent.",
42151 }),
42152 Schema.Null,
42153 ]),
42154 ),
42155 agentRole: Schema.optionalKey(
42156 Schema.Union([
42157 Schema.String.annotate({
42158 description: "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.",
42159 }),
42160 Schema.Null,
42161 ]),
42162 ),
42163 cliVersion: Schema.String.annotate({
42164 description: "Version of the CLI that created the thread.",
42165 }),
42166 createdAt: Schema.Number.annotate({
42167 description: "Unix timestamp (in seconds) when the thread was created.",
42168 format: "int64",
42169 }).check(Schema.isInt()),
42170 cwd: Schema.String.annotate({
42171 description:
42172 "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.",
42173 }),
42174 ephemeral: Schema.Boolean.annotate({
42175 description: "Whether the thread is ephemeral and should not be materialized on disk.",
42176 }),
42177 forkedFromId: Schema.optionalKey(
42178 Schema.Union([
42179 Schema.String.annotate({
42180 description: "Source thread id when this thread was created by forking another thread.",
42181 }),
42182 Schema.Null,
42183 ]),
42184 ),
42185 gitInfo: Schema.optionalKey(
42186 Schema.Union([V2ThreadRollbackResponse__GitInfo, Schema.Null]).annotate({
42187 description: "Optional Git metadata captured when the thread was created.",
42188 }),
42189 ),
42190 id: Schema.String.annotate({
42191 description: "Identifier for this thread. Codex-generated thread IDs are UUIDv7.",
42192 }),
42193 modelProvider: Schema.String.annotate({
42194 description: "Model provider used for this thread (for example, 'openai').",
42195 }),
42196 name: Schema.optionalKey(
42197 Schema.Union([
42198 Schema.String.annotate({ description: "Optional user-facing thread title." }),
42199 Schema.Null,
42200 ]),
42201 ),
42202 parentThreadId: Schema.optionalKey(
42203 Schema.Union([
42204 Schema.String.annotate({
42205 description:
42206 "The ID of the parent thread. This will only be set if this thread is a subagent.",
42207 }),
42208 Schema.Null,
42209 ]),
42210 ),
42211 path: Schema.optionalKey(
42212 Schema.Union([
42213 Schema.String.annotate({ description: "[UNSTABLE] Path to the thread on disk." }),
42214 Schema.Null,
42215 ]),
42216 ),
42217 preview: Schema.String.annotate({
42218 description: "Usually the first user message in the thread, if available.",
42219 }),
42220 recencyAt: Schema.optionalKey(
42221 Schema.Union([
42222 Schema.Number.annotate({
42223 description: "Unix timestamp (in seconds) used for thread recency ordering.",
42224 format: "int64",
42225 }).check(Schema.isInt()),
42226 Schema.Null,
42227 ]),
42228 ),
42229 sessionId: Schema.String.annotate({
42230 description: "Session id shared by threads that belong to the same session tree.",
42231 }),
42232 source: Schema.Union(
42233 [
42234 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
42235 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
42236 Schema.Struct({ subAgent: V2ThreadRollbackResponse__SubAgentSource }).annotate({
42237 title: "SubAgentSessionSource",
42238 }),
42239 ],
42240 { mode: "oneOf" },
42241 ).annotate({
42242 description: "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).",
42243 }),
42244 status: Schema.Union(
42245 [
42246 Schema.Struct({
42247 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
42248 }).annotate({ title: "NotLoadedThreadStatus" }),
42249 Schema.Struct({
42250 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
42251 }).annotate({ title: "IdleThreadStatus" }),
42252 Schema.Struct({
42253 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
42254 }).annotate({ title: "SystemErrorThreadStatus" }),
42255 Schema.Struct({
42256 activeFlags: Schema.Array(V2ThreadRollbackResponse__ThreadActiveFlag),
42257 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
42258 }).annotate({ title: "ActiveThreadStatus" }),
42259 ],
42260 { mode: "oneOf" },
42261 ).annotate({ description: "Current runtime status for the thread." }),
42262 threadSource: Schema.optionalKey(
42263 Schema.Union([V2ThreadRollbackResponse__ThreadSource, Schema.Null]).annotate({
42264 description: "Optional analytics source classification for this thread.",
42265 }),
42266 ),
42267 turns: Schema.Array(V2ThreadRollbackResponse__Turn).annotate({
42268 description:
42269 "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.",
42270 }),
42271 updatedAt: Schema.Number.annotate({
42272 description: "Unix timestamp (in seconds) when the thread was last updated.",
42273 format: "int64",
42274 }).check(Schema.isInt()),
42275});
42276
42277export type V2ThreadRollbackResponse__ThreadExtra = {};
42278export const V2ThreadRollbackResponse__ThreadExtra = Schema.Struct({}).annotate({
42279 description: "Extra app-server data for a thread.",
42280});
44369export type V2ThreadRollbackResponse__ThreadExtra = { readonly [x: string]: Schema.Json };
44370export const V2ThreadRollbackResponse__ThreadExtra = Schema.Record(
44371 Schema.String,
44372 Schema.Json.annotate({ expected: "JSON value" }),
44373).annotate({ description: "Extra app-server data for a thread." });
4228144374
4228244375export type V2ThreadRollbackResponse__ThreadHistoryMode = "legacy" | "paginated";
4228344376export const V2ThreadRollbackResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]);
4228444377
42285export type V2ThreadRollbackResponse__ThreadStatus =
42286 | { readonly type: "notLoaded" }
42287 | { readonly type: "idle" }
42288 | { readonly type: "systemError" }
42289 | {
42290 readonly activeFlags: ReadonlyArray<V2ThreadRollbackResponse__ThreadActiveFlag>;
42291 readonly type: "active";
42292 };
42293export const V2ThreadRollbackResponse__ThreadStatus = Schema.Union(
42294 [
42295 Schema.Struct({
42296 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
42297 }).annotate({ title: "NotLoadedThreadStatus" }),
42298 Schema.Struct({
42299 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
42300 }).annotate({ title: "IdleThreadStatus" }),
42301 Schema.Struct({
42302 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
42303 }).annotate({ title: "SystemErrorThreadStatus" }),
42304 Schema.Struct({
42305 activeFlags: Schema.Array(V2ThreadRollbackResponse__ThreadActiveFlag),
42306 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
42307 }).annotate({ title: "ActiveThreadStatus" }),
42308 ],
42309 { mode: "oneOf" },
42310);
42311
42312export type V2ThreadRollbackResponse__TurnItemsView = "notLoaded" | "summary" | "full";
42313export const V2ThreadRollbackResponse__TurnItemsView = Schema.Literals([
42314 "notLoaded",
42315 "summary",
42316 "full",
42317]);
42318
4231944378export type V2ThreadSetNameParams = { readonly name: string; readonly threadId: string };
4232044379export const V2ThreadSetNameParams = Schema.Struct({
4232144380 name: Schema.String,
4232244381 threadId: Schema.String,
4232344382}).annotate({ title: "ThreadSetNameParams" });
4232444383
42325export type V2ThreadSetNameResponse = {};
42326export const V2ThreadSetNameResponse = Schema.Struct({}).annotate({
42327 title: "ThreadSetNameResponse",
42328});
44384export type V2ThreadSetNameResponse = { readonly [x: string]: Schema.Json };
44385export const V2ThreadSetNameResponse = Schema.Record(
44386 Schema.String,
44387 Schema.Json.annotate({ expected: "JSON value" }),
44388).annotate({ title: "ThreadSetNameResponse" });
4232944389
4233044390export type V2ThreadSettingsUpdatedNotification = {
4233144391 readonly threadId: string;
......@@ -42351,12 +44411,6 @@ export const V2ThreadSettingsUpdatedNotification__MultiAgentMode = Schema.Union(
4235144411 "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.",
4235244412});
4235344413
42354export type V2ThreadSettingsUpdatedNotification__NetworkAccess = "restricted" | "enabled";
42355export const V2ThreadSettingsUpdatedNotification__NetworkAccess = Schema.Literals([
42356 "restricted",
42357 "enabled",
42358]);
42359
4236044414export type V2ThreadShellCommandParams = { readonly command: string; readonly threadId: string };
4236144415export const V2ThreadShellCommandParams = Schema.Struct({
4236244416 command: Schema.String.annotate({
......@@ -42366,144 +44420,34 @@ export const V2ThreadShellCommandParams = Schema.Struct({
4236644420 threadId: Schema.String,
4236744421}).annotate({ title: "ThreadShellCommandParams" });
4236844422
42369export type V2ThreadShellCommandResponse = {};
42370export const V2ThreadShellCommandResponse = Schema.Struct({}).annotate({
42371 title: "ThreadShellCommandResponse",
42372});
44423export type V2ThreadShellCommandResponse = { readonly [x: string]: Schema.Json };
44424export const V2ThreadShellCommandResponse = Schema.Record(
44425 Schema.String,
44426 Schema.Json.annotate({ expected: "JSON value" }),
44427).annotate({ title: "ThreadShellCommandResponse" });
4237344428
4237444429export type V2ThreadStartedNotification = { readonly thread: V2ThreadStartedNotification__Thread };
42375export const V2ThreadStartedNotification = Schema.Struct({
42376 thread: V2ThreadStartedNotification__Thread,
42377}).annotate({ title: "ThreadStartedNotification" });
42378
42379export type V2ThreadStartedNotification__ByteRange = {
42380 readonly end: number;
42381 readonly start: number;
42382};
42383export const V2ThreadStartedNotification__ByteRange = Schema.Struct({
42384 end: Schema.Number.annotate({ format: "uint" })
42385 .check(Schema.isInt())
42386 .check(Schema.isGreaterThanOrEqualTo(0)),
42387 start: Schema.Number.annotate({ format: "uint" })
42388 .check(Schema.isInt())
42389 .check(Schema.isGreaterThanOrEqualTo(0)),
42390});
42391
42392export type V2ThreadStartedNotification__CollabAgentTool =
42393 | "spawnAgent"
42394 | "sendInput"
42395 | "resumeAgent"
42396 | "wait"
42397 | "closeAgent"
42398 | "sendMessage"
42399 | "followupTask"
42400 | "interruptAgent"
42401 | "listAgents";
42402export const V2ThreadStartedNotification__CollabAgentTool = Schema.Literals([
42403 "spawnAgent",
42404 "sendInput",
42405 "resumeAgent",
42406 "wait",
42407 "closeAgent",
42408 "sendMessage",
42409 "followupTask",
42410 "interruptAgent",
42411 "listAgents",
42412]);
42413
42414export type V2ThreadStartedNotification__CollabAgentToolCallStatus =
42415 | "inProgress"
42416 | "completed"
42417 | "failed"
42418 | "interrupted";
42419export const V2ThreadStartedNotification__CollabAgentToolCallStatus = Schema.Literals([
42420 "inProgress",
42421 "completed",
42422 "failed",
42423 "interrupted",
42424]);
42425
42426export type V2ThreadStartedNotification__CommandExecutionSource =
42427 | "agent"
42428 | "userShell"
42429 | "unifiedExecStartup"
42430 | "unifiedExecInteraction";
42431export const V2ThreadStartedNotification__CommandExecutionSource = Schema.Literals([
42432 "agent",
42433 "userShell",
42434 "unifiedExecStartup",
42435 "unifiedExecInteraction",
42436]);
42437
42438export type V2ThreadStartedNotification__SessionSource =
42439 | "cli"
42440 | "vscode"
42441 | "exec"
42442 | "appServer"
42443 | "unknown"
42444 | { readonly custom: string }
42445 | { readonly subAgent: V2ThreadStartedNotification__SubAgentSource };
42446export const V2ThreadStartedNotification__SessionSource = Schema.Union(
42447 [
42448 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
42449 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
42450 Schema.Struct({ subAgent: V2ThreadStartedNotification__SubAgentSource }).annotate({
42451 title: "SubAgentSessionSource",
42452 }),
42453 ],
42454 { mode: "oneOf" },
42455);
42456
42457export type V2ThreadStartedNotification__ThreadExtra = {};
42458export const V2ThreadStartedNotification__ThreadExtra = Schema.Struct({}).annotate({
42459 description: "Extra app-server data for a thread.",
42460});
42461
42462export type V2ThreadStartedNotification__ThreadHistoryMode = "legacy" | "paginated";
42463export const V2ThreadStartedNotification__ThreadHistoryMode = Schema.Literals([
42464 "legacy",
42465 "paginated",
42466]);
42467
42468export type V2ThreadStartedNotification__ThreadStatus =
42469 | { readonly type: "notLoaded" }
42470 | { readonly type: "idle" }
42471 | { readonly type: "systemError" }
42472 | {
42473 readonly activeFlags: ReadonlyArray<V2ThreadStartedNotification__ThreadActiveFlag>;
42474 readonly type: "active";
42475 };
42476export const V2ThreadStartedNotification__ThreadStatus = Schema.Union(
42477 [
42478 Schema.Struct({
42479 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
42480 }).annotate({ title: "NotLoadedThreadStatus" }),
42481 Schema.Struct({
42482 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
42483 }).annotate({ title: "IdleThreadStatus" }),
42484 Schema.Struct({
42485 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
42486 }).annotate({ title: "SystemErrorThreadStatus" }),
42487 Schema.Struct({
42488 activeFlags: Schema.Array(V2ThreadStartedNotification__ThreadActiveFlag),
42489 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
42490 }).annotate({ title: "ActiveThreadStatus" }),
42491 ],
42492 { mode: "oneOf" },
42493);
44430export const V2ThreadStartedNotification = Schema.Struct({
44431 thread: V2ThreadStartedNotification__Thread,
44432}).annotate({ title: "ThreadStartedNotification" });
4249444433
42495export type V2ThreadStartedNotification__TurnItemsView = "notLoaded" | "summary" | "full";
42496export const V2ThreadStartedNotification__TurnItemsView = Schema.Literals([
42497 "notLoaded",
42498 "summary",
42499 "full",
44434export type V2ThreadStartedNotification__ThreadExtra = { readonly [x: string]: Schema.Json };
44435export const V2ThreadStartedNotification__ThreadExtra = Schema.Record(
44436 Schema.String,
44437 Schema.Json.annotate({ expected: "JSON value" }),
44438).annotate({ description: "Extra app-server data for a thread." });
44439
44440export type V2ThreadStartedNotification__ThreadHistoryMode = "legacy" | "paginated";
44441export const V2ThreadStartedNotification__ThreadHistoryMode = Schema.Literals([
44442 "legacy",
44443 "paginated",
4250044444]);
4250144445
4250244446export type V2ThreadStartParams = {
4250344447 readonly approvalPolicy?: V2ThreadStartParams__AskForApproval | null;
4250444448 readonly approvalsReviewer?: V2ThreadStartParams__ApprovalsReviewer | null;
4250544449 readonly baseInstructions?: string | null;
42506 readonly config?: { readonly [x: string]: unknown } | null;
44450 readonly config?: { readonly [x: string]: Schema.Json } | null;
4250744451 readonly cwd?: string | null;
4250844452 readonly developerInstructions?: string | null;
4250944453 readonly ephemeral?: boolean | null;
......@@ -42528,7 +44472,10 @@ export const V2ThreadStartParams = Schema.Struct({
4252844472 ),
4252944473 baseInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4253044474 config: Schema.optionalKey(
42531 Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]),
44475 Schema.Union([
44476 Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
44477 Schema.Null,
44478 ]),
4253244479 ),
4253344480 cwd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4253444481 developerInstructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
......@@ -42555,34 +44502,11 @@ export const V2ThreadStartParams__AbsolutePathBuf = Schema.String.annotate({
4255544502 "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.",
4255644503});
4255744504
42558export type V2ThreadStartParams__CapabilityRootLocation = {
42559 readonly environmentId: string;
42560 readonly path: string;
42561 readonly type: "environment";
42562};
42563export const V2ThreadStartParams__CapabilityRootLocation = Schema.Union(
42564 [
42565 Schema.Struct({
42566 environmentId: Schema.String,
42567 path: Schema.String.annotate({
42568 description: "Absolute path for the root in the selected environment.",
42569 }),
42570 type: Schema.Literal("environment").annotate({
42571 title: "EnvironmentCapabilityRootLocationType",
42572 }),
42573 }).annotate({
42574 title: "EnvironmentCapabilityRootLocation",
42575 description: "A path owned by an execution environment.",
42576 }),
42577 ],
42578 { mode: "oneOf" },
42579).annotate({ description: "Location used to resolve a selected capability root." });
42580
4258144505export type V2ThreadStartParams__DynamicToolSpec =
4258244506 | {
4258344507 readonly deferLoading?: boolean;
4258444508 readonly description: string;
42585 readonly inputSchema: unknown;
44509 readonly inputSchema: Schema.Json;
4258644510 readonly name: string;
4258744511 readonly type: "function";
4258844512 }
......@@ -42597,7 +44521,7 @@ export const V2ThreadStartParams__DynamicToolSpec = Schema.Union(
4259744521 Schema.Struct({
4259844522 deferLoading: Schema.optionalKey(Schema.Boolean),
4259944523 description: Schema.String,
42600 inputSchema: Schema.Unknown,
44524 inputSchema: Schema.Json.annotate({ expected: "JSON value" }),
4260144525 name: Schema.String,
4260244526 type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolSpecType" }),
4260344527 }).annotate({ title: "FunctionDynamicToolSpec" }),
......@@ -42628,33 +44552,16 @@ export const V2ThreadStartParams__MultiAgentMode = Schema.Union(
4262844552
4262944553export type V2ThreadStartParams__SelectedCapabilityRoot = {
4263044554 readonly id: string;
42631 readonly location: {
42632 readonly environmentId: string;
42633 readonly path: string;
42634 readonly type: "environment";
42635 };
44555 readonly location: V2ThreadStartParams__CapabilityRootLocation;
4263644556};
4263744557export const V2ThreadStartParams__SelectedCapabilityRoot = Schema.Struct({
4263844558 id: Schema.String.annotate({
4263944559 description: "Stable identifier supplied by the capability selection platform.",
4264044560 }),
42641 location: Schema.Union(
42642 [
42643 Schema.Struct({
42644 environmentId: Schema.String,
42645 path: Schema.String.annotate({
42646 description: "Absolute path for the root in the selected environment.",
42647 }),
42648 type: Schema.Literal("environment").annotate({
42649 title: "EnvironmentCapabilityRootLocationType",
42650 }),
42651 }).annotate({
42652 title: "EnvironmentCapabilityRootLocation",
42653 description: "A path owned by an execution environment.",
42654 }),
42655 ],
42656 { mode: "oneOf" },
42657 ).annotate({ description: "Location used to resolve a selected capability root." }),
44561 location: Schema.suspend(
44562 (): Schema.Codec<V2ThreadStartParams__CapabilityRootLocation> =>
44563 V2ThreadStartParams__CapabilityRootLocation,
44564 ).annotate({ description: "Where the selected root can be resolved." }),
4265844565}).annotate({
4265944566 description: "A user-selected root that can expose one or more runtime capabilities.",
4266044567});
......@@ -42682,32 +44589,22 @@ export const V2ThreadStartParams__TurnEnvironmentParams = Schema.Struct({
4268244589
4268344590export type V2ThreadStartResponse = {
4268444591 readonly approvalPolicy: V2ThreadStartResponse__AskForApproval;
42685 readonly approvalsReviewer: "user" | "auto_review" | "guardian_subagent";
44592 readonly approvalsReviewer: V2ThreadStartResponse__ApprovalsReviewer;
4268644593 readonly cwd: V2ThreadStartResponse__AbsolutePathBuf;
4268744594 readonly instructionSources?: ReadonlyArray<V2ThreadStartResponse__LegacyAppPathString>;
4268844595 readonly model: string;
4268944596 readonly modelProvider: string;
4269044597 readonly reasoningEffort?: V2ThreadStartResponse__ReasoningEffort | null;
42691 readonly sandbox:
42692 | { readonly type: "dangerFullAccess" }
42693 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
42694 | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
42695 | {
42696 readonly excludeSlashTmp?: boolean;
42697 readonly excludeTmpdirEnvVar?: boolean;
42698 readonly networkAccess?: boolean;
42699 readonly type: "workspaceWrite";
42700 readonly writableRoots?: ReadonlyArray<V2ThreadStartResponse__AbsolutePathBuf>;
42701 };
44598 readonly sandbox: V2ThreadStartResponse__SandboxPolicy;
4270244599 readonly serviceTier?: string | null;
4270344600 readonly thread: V2ThreadStartResponse__Thread;
4270444601};
4270544602export const V2ThreadStartResponse = Schema.Struct({
4270644603 approvalPolicy: V2ThreadStartResponse__AskForApproval,
42707 approvalsReviewer: Schema.Literals(["user", "auto_review", "guardian_subagent"]).annotate({
42708 description:
42709 "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.",
42710 }),
44604 approvalsReviewer: Schema.suspend(
44605 (): Schema.Codec<V2ThreadStartResponse__ApprovalsReviewer> =>
44606 V2ThreadStartResponse__ApprovalsReviewer,
44607 ).annotate({ description: "Reviewer currently used for approval requests on this thread." }),
4271144608 cwd: V2ThreadStartResponse__AbsolutePathBuf,
4271244609 instructionSources: Schema.optionalKey(
4271344610 Schema.Array(V2ThreadStartResponse__LegacyAppPathString).annotate({
......@@ -42721,38 +44618,8 @@ export const V2ThreadStartResponse = Schema.Struct({
4272144618 reasoningEffort: Schema.optionalKey(
4272244619 Schema.Union([V2ThreadStartResponse__ReasoningEffort, Schema.Null]),
4272344620 ),
42724 sandbox: Schema.Union(
42725 [
42726 Schema.Struct({
42727 type: Schema.Literal("dangerFullAccess").annotate({
42728 title: "DangerFullAccessSandboxPolicyType",
42729 }),
42730 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
42731 Schema.Struct({
42732 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
42733 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
42734 }).annotate({ title: "ReadOnlySandboxPolicy" }),
42735 Schema.Struct({
42736 networkAccess: Schema.optionalKey(
42737 Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
42738 ),
42739 type: Schema.Literal("externalSandbox").annotate({
42740 title: "ExternalSandboxSandboxPolicyType",
42741 }),
42742 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
42743 Schema.Struct({
42744 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
42745 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
42746 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
42747 type: Schema.Literal("workspaceWrite").annotate({
42748 title: "WorkspaceWriteSandboxPolicyType",
42749 }),
42750 writableRoots: Schema.optionalKey(
42751 Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }),
42752 ),
42753 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
42754 ],
42755 { mode: "oneOf" },
44621 sandbox: Schema.suspend(
44622 (): Schema.Codec<V2ThreadStartResponse__SandboxPolicy> => V2ThreadStartResponse__SandboxPolicy,
4275644623 ).annotate({
4275744624 description:
4275844625 "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.",
......@@ -42781,72 +44648,6 @@ export const V2ThreadStartResponse__ActivePermissionProfile = Schema.Struct({
4278144648 }),
4278244649});
4278344650
42784export type V2ThreadStartResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
42785export const V2ThreadStartResponse__ApprovalsReviewer = Schema.Literals([
42786 "user",
42787 "auto_review",
42788 "guardian_subagent",
42789]).annotate({
42790 description:
42791 "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.",
42792});
42793
42794export type V2ThreadStartResponse__ByteRange = { readonly end: number; readonly start: number };
42795export const V2ThreadStartResponse__ByteRange = Schema.Struct({
42796 end: Schema.Number.annotate({ format: "uint" })
42797 .check(Schema.isInt())
42798 .check(Schema.isGreaterThanOrEqualTo(0)),
42799 start: Schema.Number.annotate({ format: "uint" })
42800 .check(Schema.isInt())
42801 .check(Schema.isGreaterThanOrEqualTo(0)),
42802});
42803
42804export type V2ThreadStartResponse__CollabAgentTool =
42805 | "spawnAgent"
42806 | "sendInput"
42807 | "resumeAgent"
42808 | "wait"
42809 | "closeAgent"
42810 | "sendMessage"
42811 | "followupTask"
42812 | "interruptAgent"
42813 | "listAgents";
42814export const V2ThreadStartResponse__CollabAgentTool = Schema.Literals([
42815 "spawnAgent",
42816 "sendInput",
42817 "resumeAgent",
42818 "wait",
42819 "closeAgent",
42820 "sendMessage",
42821 "followupTask",
42822 "interruptAgent",
42823 "listAgents",
42824]);
42825
42826export type V2ThreadStartResponse__CollabAgentToolCallStatus =
42827 | "inProgress"
42828 | "completed"
42829 | "failed"
42830 | "interrupted";
42831export const V2ThreadStartResponse__CollabAgentToolCallStatus = Schema.Literals([
42832 "inProgress",
42833 "completed",
42834 "failed",
42835 "interrupted",
42836]);
42837
42838export type V2ThreadStartResponse__CommandExecutionSource =
42839 | "agent"
42840 | "userShell"
42841 | "unifiedExecStartup"
42842 | "unifiedExecInteraction";
42843export const V2ThreadStartResponse__CommandExecutionSource = Schema.Literals([
42844 "agent",
42845 "userShell",
42846 "unifiedExecStartup",
42847 "unifiedExecInteraction",
42848]);
42849
4285044651export type V2ThreadStartResponse__MultiAgentMode =
4285144652 | "explicitRequestOnly"
4285244653 | "proactive"
......@@ -42862,113 +44663,15 @@ export const V2ThreadStartResponse__MultiAgentMode = Schema.Union(
4286244663 "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.",
4286344664});
4286444665
42865export type V2ThreadStartResponse__NetworkAccess = "restricted" | "enabled";
42866export const V2ThreadStartResponse__NetworkAccess = Schema.Literals(["restricted", "enabled"]);
42867
42868export type V2ThreadStartResponse__SandboxPolicy =
42869 | { readonly type: "dangerFullAccess" }
42870 | { readonly networkAccess?: boolean; readonly type: "readOnly" }
42871 | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
42872 | {
42873 readonly excludeSlashTmp?: boolean;
42874 readonly excludeTmpdirEnvVar?: boolean;
42875 readonly networkAccess?: boolean;
42876 readonly type: "workspaceWrite";
42877 readonly writableRoots?: ReadonlyArray<V2ThreadStartResponse__AbsolutePathBuf>;
42878 };
42879export const V2ThreadStartResponse__SandboxPolicy = Schema.Union(
42880 [
42881 Schema.Struct({
42882 type: Schema.Literal("dangerFullAccess").annotate({
42883 title: "DangerFullAccessSandboxPolicyType",
42884 }),
42885 }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
42886 Schema.Struct({
42887 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
42888 type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
42889 }).annotate({ title: "ReadOnlySandboxPolicy" }),
42890 Schema.Struct({
42891 networkAccess: Schema.optionalKey(
42892 Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
42893 ),
42894 type: Schema.Literal("externalSandbox").annotate({
42895 title: "ExternalSandboxSandboxPolicyType",
42896 }),
42897 }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
42898 Schema.Struct({
42899 excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
42900 excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
42901 networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
42902 type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
42903 writableRoots: Schema.optionalKey(
42904 Schema.Array(V2ThreadStartResponse__AbsolutePathBuf).annotate({ default: [] }),
42905 ),
42906 }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
42907 ],
42908 { mode: "oneOf" },
42909);
42910
42911export type V2ThreadStartResponse__SessionSource =
42912 | "cli"
42913 | "vscode"
42914 | "exec"
42915 | "appServer"
42916 | "unknown"
42917 | { readonly custom: string }
42918 | { readonly subAgent: V2ThreadStartResponse__SubAgentSource };
42919export const V2ThreadStartResponse__SessionSource = Schema.Union(
42920 [
42921 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
42922 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
42923 Schema.Struct({ subAgent: V2ThreadStartResponse__SubAgentSource }).annotate({
42924 title: "SubAgentSessionSource",
42925 }),
42926 ],
42927 { mode: "oneOf" },
42928);
42929
42930export type V2ThreadStartResponse__ThreadExtra = {};
42931export const V2ThreadStartResponse__ThreadExtra = Schema.Struct({}).annotate({
42932 description: "Extra app-server data for a thread.",
42933});
44666export type V2ThreadStartResponse__ThreadExtra = { readonly [x: string]: Schema.Json };
44667export const V2ThreadStartResponse__ThreadExtra = Schema.Record(
44668 Schema.String,
44669 Schema.Json.annotate({ expected: "JSON value" }),
44670).annotate({ description: "Extra app-server data for a thread." });
4293444671
4293544672export type V2ThreadStartResponse__ThreadHistoryMode = "legacy" | "paginated";
4293644673export const V2ThreadStartResponse__ThreadHistoryMode = Schema.Literals(["legacy", "paginated"]);
4293744674
42938export type V2ThreadStartResponse__ThreadStatus =
42939 | { readonly type: "notLoaded" }
42940 | { readonly type: "idle" }
42941 | { readonly type: "systemError" }
42942 | {
42943 readonly activeFlags: ReadonlyArray<V2ThreadStartResponse__ThreadActiveFlag>;
42944 readonly type: "active";
42945 };
42946export const V2ThreadStartResponse__ThreadStatus = Schema.Union(
42947 [
42948 Schema.Struct({
42949 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
42950 }).annotate({ title: "NotLoadedThreadStatus" }),
42951 Schema.Struct({
42952 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
42953 }).annotate({ title: "IdleThreadStatus" }),
42954 Schema.Struct({
42955 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
42956 }).annotate({ title: "SystemErrorThreadStatus" }),
42957 Schema.Struct({
42958 activeFlags: Schema.Array(V2ThreadStartResponse__ThreadActiveFlag),
42959 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
42960 }).annotate({ title: "ActiveThreadStatus" }),
42961 ],
42962 { mode: "oneOf" },
42963);
42964
42965export type V2ThreadStartResponse__TurnItemsView = "notLoaded" | "summary" | "full";
42966export const V2ThreadStartResponse__TurnItemsView = Schema.Literals([
42967 "notLoaded",
42968 "summary",
42969 "full",
42970]);
42971
4297244675export type V2ThreadStatusChangedNotification = {
4297344676 readonly status: V2ThreadStatusChangedNotification__ThreadStatus;
4297444677 readonly threadId: string;
......@@ -43004,85 +44707,11 @@ export const V2ThreadUnarchiveResponse = Schema.Struct({
4300444707 thread: V2ThreadUnarchiveResponse__Thread,
4300544708}).annotate({ title: "ThreadUnarchiveResponse" });
4300644709
43007export type V2ThreadUnarchiveResponse__ByteRange = { readonly end: number; readonly start: number };
43008export const V2ThreadUnarchiveResponse__ByteRange = Schema.Struct({
43009 end: Schema.Number.annotate({ format: "uint" })
43010 .check(Schema.isInt())
43011 .check(Schema.isGreaterThanOrEqualTo(0)),
43012 start: Schema.Number.annotate({ format: "uint" })
43013 .check(Schema.isInt())
43014 .check(Schema.isGreaterThanOrEqualTo(0)),
43015});
43016
43017export type V2ThreadUnarchiveResponse__CollabAgentTool =
43018 | "spawnAgent"
43019 | "sendInput"
43020 | "resumeAgent"
43021 | "wait"
43022 | "closeAgent"
43023 | "sendMessage"
43024 | "followupTask"
43025 | "interruptAgent"
43026 | "listAgents";
43027export const V2ThreadUnarchiveResponse__CollabAgentTool = Schema.Literals([
43028 "spawnAgent",
43029 "sendInput",
43030 "resumeAgent",
43031 "wait",
43032 "closeAgent",
43033 "sendMessage",
43034 "followupTask",
43035 "interruptAgent",
43036 "listAgents",
43037]);
43038
43039export type V2ThreadUnarchiveResponse__CollabAgentToolCallStatus =
43040 | "inProgress"
43041 | "completed"
43042 | "failed"
43043 | "interrupted";
43044export const V2ThreadUnarchiveResponse__CollabAgentToolCallStatus = Schema.Literals([
43045 "inProgress",
43046 "completed",
43047 "failed",
43048 "interrupted",
43049]);
43050
43051export type V2ThreadUnarchiveResponse__CommandExecutionSource =
43052 | "agent"
43053 | "userShell"
43054 | "unifiedExecStartup"
43055 | "unifiedExecInteraction";
43056export const V2ThreadUnarchiveResponse__CommandExecutionSource = Schema.Literals([
43057 "agent",
43058 "userShell",
43059 "unifiedExecStartup",
43060 "unifiedExecInteraction",
43061]);
43062
43063export type V2ThreadUnarchiveResponse__SessionSource =
43064 | "cli"
43065 | "vscode"
43066 | "exec"
43067 | "appServer"
43068 | "unknown"
43069 | { readonly custom: string }
43070 | { readonly subAgent: V2ThreadUnarchiveResponse__SubAgentSource };
43071export const V2ThreadUnarchiveResponse__SessionSource = Schema.Union(
43072 [
43073 Schema.Literals(["cli", "vscode", "exec", "appServer", "unknown"]),
43074 Schema.Struct({ custom: Schema.String }).annotate({ title: "CustomSessionSource" }),
43075 Schema.Struct({ subAgent: V2ThreadUnarchiveResponse__SubAgentSource }).annotate({
43076 title: "SubAgentSessionSource",
43077 }),
43078 ],
43079 { mode: "oneOf" },
43080);
43081
43082export type V2ThreadUnarchiveResponse__ThreadExtra = {};
43083export const V2ThreadUnarchiveResponse__ThreadExtra = Schema.Struct({}).annotate({
43084 description: "Extra app-server data for a thread.",
43085});
44710export type V2ThreadUnarchiveResponse__ThreadExtra = { readonly [x: string]: Schema.Json };
44711export const V2ThreadUnarchiveResponse__ThreadExtra = Schema.Record(
44712 Schema.String,
44713 Schema.Json.annotate({ expected: "JSON value" }),
44714).annotate({ description: "Extra app-server data for a thread." });
4308644715
4308744716export type V2ThreadUnarchiveResponse__ThreadHistoryMode = "legacy" | "paginated";
4308844717export const V2ThreadUnarchiveResponse__ThreadHistoryMode = Schema.Literals([
......@@ -43090,40 +44719,6 @@ export const V2ThreadUnarchiveResponse__ThreadHistoryMode = Schema.Literals([
4309044719 "paginated",
4309144720]);
4309244721
43093export type V2ThreadUnarchiveResponse__ThreadStatus =
43094 | { readonly type: "notLoaded" }
43095 | { readonly type: "idle" }
43096 | { readonly type: "systemError" }
43097 | {
43098 readonly activeFlags: ReadonlyArray<V2ThreadUnarchiveResponse__ThreadActiveFlag>;
43099 readonly type: "active";
43100 };
43101export const V2ThreadUnarchiveResponse__ThreadStatus = Schema.Union(
43102 [
43103 Schema.Struct({
43104 type: Schema.Literal("notLoaded").annotate({ title: "NotLoadedThreadStatusType" }),
43105 }).annotate({ title: "NotLoadedThreadStatus" }),
43106 Schema.Struct({
43107 type: Schema.Literal("idle").annotate({ title: "IdleThreadStatusType" }),
43108 }).annotate({ title: "IdleThreadStatus" }),
43109 Schema.Struct({
43110 type: Schema.Literal("systemError").annotate({ title: "SystemErrorThreadStatusType" }),
43111 }).annotate({ title: "SystemErrorThreadStatus" }),
43112 Schema.Struct({
43113 activeFlags: Schema.Array(V2ThreadUnarchiveResponse__ThreadActiveFlag),
43114 type: Schema.Literal("active").annotate({ title: "ActiveThreadStatusType" }),
43115 }).annotate({ title: "ActiveThreadStatus" }),
43116 ],
43117 { mode: "oneOf" },
43118);
43119
43120export type V2ThreadUnarchiveResponse__TurnItemsView = "notLoaded" | "summary" | "full";
43121export const V2ThreadUnarchiveResponse__TurnItemsView = Schema.Literals([
43122 "notLoaded",
43123 "summary",
43124 "full",
43125]);
43126
4312744722export type V2ThreadUnsubscribeParams = { readonly threadId: string };
4312844723export const V2ThreadUnsubscribeParams = Schema.Struct({ threadId: Schema.String }).annotate({
4312944724 title: "ThreadUnsubscribeParams",
......@@ -43145,72 +44740,6 @@ export const V2TurnCompletedNotification = Schema.Struct({
4314544740 turn: V2TurnCompletedNotification__Turn,
4314644741}).annotate({ title: "TurnCompletedNotification" });
4314744742
43148export type V2TurnCompletedNotification__ByteRange = {
43149 readonly end: number;
43150 readonly start: number;
43151};
43152export const V2TurnCompletedNotification__ByteRange = Schema.Struct({
43153 end: Schema.Number.annotate({ format: "uint" })
43154 .check(Schema.isInt())
43155 .check(Schema.isGreaterThanOrEqualTo(0)),
43156 start: Schema.Number.annotate({ format: "uint" })
43157 .check(Schema.isInt())
43158 .check(Schema.isGreaterThanOrEqualTo(0)),
43159});
43160
43161export type V2TurnCompletedNotification__CollabAgentTool =
43162 | "spawnAgent"
43163 | "sendInput"
43164 | "resumeAgent"
43165 | "wait"
43166 | "closeAgent"
43167 | "sendMessage"
43168 | "followupTask"
43169 | "interruptAgent"
43170 | "listAgents";
43171export const V2TurnCompletedNotification__CollabAgentTool = Schema.Literals([
43172 "spawnAgent",
43173 "sendInput",
43174 "resumeAgent",
43175 "wait",
43176 "closeAgent",
43177 "sendMessage",
43178 "followupTask",
43179 "interruptAgent",
43180 "listAgents",
43181]);
43182
43183export type V2TurnCompletedNotification__CollabAgentToolCallStatus =
43184 | "inProgress"
43185 | "completed"
43186 | "failed"
43187 | "interrupted";
43188export const V2TurnCompletedNotification__CollabAgentToolCallStatus = Schema.Literals([
43189 "inProgress",
43190 "completed",
43191 "failed",
43192 "interrupted",
43193]);
43194
43195export type V2TurnCompletedNotification__CommandExecutionSource =
43196 | "agent"
43197 | "userShell"
43198 | "unifiedExecStartup"
43199 | "unifiedExecInteraction";
43200export const V2TurnCompletedNotification__CommandExecutionSource = Schema.Literals([
43201 "agent",
43202 "userShell",
43203 "unifiedExecStartup",
43204 "unifiedExecInteraction",
43205]);
43206
43207export type V2TurnCompletedNotification__TurnItemsView = "notLoaded" | "summary" | "full";
43208export const V2TurnCompletedNotification__TurnItemsView = Schema.Literals([
43209 "notLoaded",
43210 "summary",
43211 "full",
43212]);
43213
4321444743export type V2TurnDiffUpdatedNotification = {
4321544744 readonly diff: string;
4321644745 readonly threadId: string;
......@@ -43232,18 +44761,19 @@ export const V2TurnInterruptParams = Schema.Struct({
4323244761 turnId: Schema.String,
4323344762}).annotate({ title: "TurnInterruptParams" });
4323444763
43235export type V2TurnInterruptResponse = {};
43236export const V2TurnInterruptResponse = Schema.Struct({}).annotate({
43237 title: "TurnInterruptResponse",
43238});
44764export type V2TurnInterruptResponse = { readonly [x: string]: Schema.Json };
44765export const V2TurnInterruptResponse = Schema.Record(
44766 Schema.String,
44767 Schema.Json.annotate({ expected: "JSON value" }),
44768).annotate({ title: "TurnInterruptResponse" });
4323944769
4324044770export type V2TurnModerationMetadataNotification = {
43241 readonly metadata: unknown;
44771 readonly metadata: Schema.Json;
4324244772 readonly threadId: string;
4324344773 readonly turnId: string;
4324444774};
4324544775export const V2TurnModerationMetadataNotification = Schema.Struct({
43246 metadata: Schema.Unknown,
44776 metadata: Schema.Json.annotate({ expected: "JSON value" }),
4324744777 threadId: Schema.String,
4324844778 turnId: Schema.String,
4324944779}).annotate({ title: "TurnModerationMetadataNotification" });
......@@ -43270,69 +44800,6 @@ export const V2TurnStartedNotification = Schema.Struct({
4327044800 turn: V2TurnStartedNotification__Turn,
4327144801}).annotate({ title: "TurnStartedNotification" });
4327244802
43273export type V2TurnStartedNotification__ByteRange = { readonly end: number; readonly start: number };
43274export const V2TurnStartedNotification__ByteRange = Schema.Struct({
43275 end: Schema.Number.annotate({ format: "uint" })
43276 .check(Schema.isInt())
43277 .check(Schema.isGreaterThanOrEqualTo(0)),
43278 start: Schema.Number.annotate({ format: "uint" })
43279 .check(Schema.isInt())
43280 .check(Schema.isGreaterThanOrEqualTo(0)),
43281});
43282
43283export type V2TurnStartedNotification__CollabAgentTool =
43284 | "spawnAgent"
43285 | "sendInput"
43286 | "resumeAgent"
43287 | "wait"
43288 | "closeAgent"
43289 | "sendMessage"
43290 | "followupTask"
43291 | "interruptAgent"
43292 | "listAgents";
43293export const V2TurnStartedNotification__CollabAgentTool = Schema.Literals([
43294 "spawnAgent",
43295 "sendInput",
43296 "resumeAgent",
43297 "wait",
43298 "closeAgent",
43299 "sendMessage",
43300 "followupTask",
43301 "interruptAgent",
43302 "listAgents",
43303]);
43304
43305export type V2TurnStartedNotification__CollabAgentToolCallStatus =
43306 | "inProgress"
43307 | "completed"
43308 | "failed"
43309 | "interrupted";
43310export const V2TurnStartedNotification__CollabAgentToolCallStatus = Schema.Literals([
43311 "inProgress",
43312 "completed",
43313 "failed",
43314 "interrupted",
43315]);
43316
43317export type V2TurnStartedNotification__CommandExecutionSource =
43318 | "agent"
43319 | "userShell"
43320 | "unifiedExecStartup"
43321 | "unifiedExecInteraction";
43322export const V2TurnStartedNotification__CommandExecutionSource = Schema.Literals([
43323 "agent",
43324 "userShell",
43325 "unifiedExecStartup",
43326 "unifiedExecInteraction",
43327]);
43328
43329export type V2TurnStartedNotification__TurnItemsView = "notLoaded" | "summary" | "full";
43330export const V2TurnStartedNotification__TurnItemsView = Schema.Literals([
43331 "notLoaded",
43332 "summary",
43333 "full",
43334]);
43335
4333644803export type V2TurnStartParams = {
4333744804 readonly approvalPolicy?: V2TurnStartParams__AskForApproval | null;
4333844805 readonly approvalsReviewer?: V2TurnStartParams__ApprovalsReviewer | null;
......@@ -43341,7 +44808,7 @@ export type V2TurnStartParams = {
4334144808 readonly effort?: V2TurnStartParams__ReasoningEffort | null;
4334244809 readonly input: ReadonlyArray<V2TurnStartParams__UserInput>;
4334344810 readonly model?: string | null;
43344 readonly outputSchema?: unknown;
44811 readonly outputSchema?: Schema.Json;
4334544812 readonly personality?: V2TurnStartParams__Personality | null;
4334644813 readonly sandboxPolicy?: V2TurnStartParams__SandboxPolicy | null;
4334744814 readonly serviceTier?: string | null;
......@@ -43384,7 +44851,8 @@ export const V2TurnStartParams = Schema.Struct({
4338444851 ]),
4338544852 ),
4338644853 outputSchema: Schema.optionalKey(
43387 Schema.Unknown.annotate({
44854 Schema.Json.annotate({
44855 expected: "JSON value",
4338844856 description:
4338944857 "Optional JSON Schema used to constrain the final assistant message for this turn.",
4339044858 }),
......@@ -43424,16 +44892,6 @@ export const V2TurnStartParams__AdditionalContextEntry = Schema.Struct({
4342444892 value: Schema.String,
4342544893});
4342644894
43427export type V2TurnStartParams__ByteRange = { readonly end: number; readonly start: number };
43428export const V2TurnStartParams__ByteRange = Schema.Struct({
43429 end: Schema.Number.annotate({ format: "uint" })
43430 .check(Schema.isInt())
43431 .check(Schema.isGreaterThanOrEqualTo(0)),
43432 start: Schema.Number.annotate({ format: "uint" })
43433 .check(Schema.isInt())
43434 .check(Schema.isGreaterThanOrEqualTo(0)),
43435});
43436
4343744895export type V2TurnStartParams__CollaborationMode = {
4343844896 readonly mode: V2TurnStartParams__ModeKind;
4343944897 readonly settings: V2TurnStartParams__Settings;
......@@ -43458,9 +44916,6 @@ export const V2TurnStartParams__MultiAgentMode = Schema.Union(
4345844916 "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.",
4345944917});
4346044918
43461export type V2TurnStartParams__NetworkAccess = "restricted" | "enabled";
43462export const V2TurnStartParams__NetworkAccess = Schema.Literals(["restricted", "enabled"]);
43463
4346444919export type V2TurnStartParams__TurnEnvironmentParams = {
4346544920 readonly cwd: V2TurnStartParams__LegacyAppPathString;
4346644921 readonly environmentId: string;
......@@ -43484,65 +44939,6 @@ export const V2TurnStartResponse = Schema.Struct({ turn: V2TurnStartResponse__Tu
4348444939 title: "TurnStartResponse",
4348544940});
4348644941
43487export type V2TurnStartResponse__ByteRange = { readonly end: number; readonly start: number };
43488export const V2TurnStartResponse__ByteRange = Schema.Struct({
43489 end: Schema.Number.annotate({ format: "uint" })
43490 .check(Schema.isInt())
43491 .check(Schema.isGreaterThanOrEqualTo(0)),
43492 start: Schema.Number.annotate({ format: "uint" })
43493 .check(Schema.isInt())
43494 .check(Schema.isGreaterThanOrEqualTo(0)),
43495});
43496
43497export type V2TurnStartResponse__CollabAgentTool =
43498 | "spawnAgent"
43499 | "sendInput"
43500 | "resumeAgent"
43501 | "wait"
43502 | "closeAgent"
43503 | "sendMessage"
43504 | "followupTask"
43505 | "interruptAgent"
43506 | "listAgents";
43507export const V2TurnStartResponse__CollabAgentTool = Schema.Literals([
43508 "spawnAgent",
43509 "sendInput",
43510 "resumeAgent",
43511 "wait",
43512 "closeAgent",
43513 "sendMessage",
43514 "followupTask",
43515 "interruptAgent",
43516 "listAgents",
43517]);
43518
43519export type V2TurnStartResponse__CollabAgentToolCallStatus =
43520 | "inProgress"
43521 | "completed"
43522 | "failed"
43523 | "interrupted";
43524export const V2TurnStartResponse__CollabAgentToolCallStatus = Schema.Literals([
43525 "inProgress",
43526 "completed",
43527 "failed",
43528 "interrupted",
43529]);
43530
43531export type V2TurnStartResponse__CommandExecutionSource =
43532 | "agent"
43533 | "userShell"
43534 | "unifiedExecStartup"
43535 | "unifiedExecInteraction";
43536export const V2TurnStartResponse__CommandExecutionSource = Schema.Literals([
43537 "agent",
43538 "userShell",
43539 "unifiedExecStartup",
43540 "unifiedExecInteraction",
43541]);
43542
43543export type V2TurnStartResponse__TurnItemsView = "notLoaded" | "summary" | "full";
43544export const V2TurnStartResponse__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]);
43545
4354644942export type V2TurnSteerParams = {
4354744943 readonly clientUserMessageId?: string | null;
4354844944 readonly expectedTurnId: string;
......@@ -43568,16 +44964,6 @@ export const V2TurnSteerParams__AdditionalContextEntry = Schema.Struct({
4356844964 value: Schema.String,
4356944965});
4357044966
43571export type V2TurnSteerParams__ByteRange = { readonly end: number; readonly start: number };
43572export const V2TurnSteerParams__ByteRange = Schema.Struct({
43573 end: Schema.Number.annotate({ format: "uint" })
43574 .check(Schema.isInt())
43575 .check(Schema.isGreaterThanOrEqualTo(0)),
43576 start: Schema.Number.annotate({ format: "uint" })
43577 .check(Schema.isInt())
43578 .check(Schema.isGreaterThanOrEqualTo(0)),
43579});
43580
4358144967export type V2TurnSteerResponse = { readonly turnId: string };
4358244968export const V2TurnSteerResponse = Schema.Struct({ turnId: Schema.String }).annotate({
4358344969 title: "TurnSteerResponse",
......@@ -43637,8 +45023,10 @@ export type V2WindowsWorldWritableWarningNotification = {
4363745023};
4363845024export const V2WindowsWorldWritableWarningNotification = Schema.Struct({
4363945025 extraCount: Schema.Number.annotate({ format: "uint" })
43640 .check(Schema.isInt())
43641 .check(Schema.isGreaterThanOrEqualTo(0)),
45026 .check(Schema.isInt().annotate({ expected: "an integer" }))
45027 .check(
45028 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
45029 ),
4364245030 failedScan: Schema.Boolean,
4364345031 samplePaths: Schema.Array(Schema.String),
4364445032}).annotate({ title: "WindowsWorldWritableWarningNotification" });