The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 23:00 UTC
fix(codex): the protocol generator runs again on Effect rc.115 (#13480)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Julius Marminge committed
Sep 24, 2026 at 14:10 UTC
567783ecdc658c8bf86c4c4980df5df8ebdd9037
3 files changed
+20514
-19043
apps/server/src/provider/Layers/CodexSessionRuntime.ts
+2
-2
@@ -119,7 +119,7 @@ const McpElicitationFormField = Schema.Struct({
119
type: Schema.optionalKey(NullableMcpElicitationString),
120
title: Schema.optionalKey(NullableMcpElicitationString),
121
description: Schema.optionalKey(NullableMcpElicitationString),
122
- default: Schema.optionalKey(Schema.Unknown),
122
+ default: Schema.optionalKey(Schema.Json),
123
enum: Schema.optionalKey(Schema.NullOr(Schema.Array(Schema.String))),
124
enumNames: Schema.optionalKey(Schema.NullOr(Schema.Array(Schema.String))),
125
oneOf: Schema.optionalKey(
@@ -442,7 +442,7 @@ export function toMcpElicitationResponse(
442
? "always"
443
: undefined;
444
const form = mcpElicitationFormFields(payload);
445
- const content: Record<string, unknown> = {};
445
+ const content: Record<string, Schema.Json> = {};
446
447
for (const [key, field] of Object.entries(form?.properties ?? {})) {
448
const options = mcpElicitationFieldOptions(field);
packages/effect-codex-app-server/scripts/generate.ts
+86
-3
@@ -269,8 +269,13 @@ const ensureGeneratedDir = Effect.fn("ensureGeneratedDir")(function* () {
269
});
270
271
const 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;
274
return yield* HttpClientRequest.get(url).pipe(
275
HttpClientRequest.setHeader("user-agent", USER_AGENT),
276
+ token && url.startsWith("https://api.github.com/")
277
+ ? HttpClientRequest.bearerToken(token)
278
+ : (request) => request,
279
HttpClient.execute,
280
Effect.flatMap(HttpClientResponse.filterStatusOk),
281
Effect.flatMap((okResponse) => okResponse.text),
@@ -387,6 +392,84 @@ function stripNullDefaults(value: Schema.Json): Schema.Json {
392
) as Schema.Json;
393
}
394
395
+type JsonSchemaNode = { readonly [key: string]: Schema.Json };
396
+
397
+function 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.
408
+function 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
+
473
// Codex 0.153 adds async questions to agent messages. Keep older protocol
474
// fields until the next full refresh, including every thread history namespace.
475
function addAsyncQuestionFields(value: Schema.Json): Schema.Json {
@@ -649,7 +732,7 @@ function rewriteExternalRefs(
732
const definitionName = child.slice("#/definitions/".length);
733
const localRewrite = localDefinitionNames.get(definitionName);
734
if (localRewrite) {
652
- return [key, `#/definitions/${localRewrite}`];
735
+ return [key, `#/components/schemas/${localRewrite}`];
736
}
737
738
const candidates = [
@@ -670,7 +753,7 @@ function rewriteExternalRefs(
753
throw new Error(`Missing rewritten definition for ref: ${child}`);
754
}
755
673
- return [key, `#/definitions/${rewritten}`];
756
+ return [key, `#/components/schemas/${rewritten}`];
757
}
758
759
return [
@@ -761,7 +844,7 @@ const generateFiles = Effect.fn("generateFiles")(function* () {
844
for (const [name, schema] of Object.entries(aggregateSchemas).toSorted(([left], [right]) =>
845
left.localeCompare(right),
846
)) {
764
- aggregateSchemas[name] = addAsyncQuestionFields(schema);
847
+ aggregateSchemas[name] = adaptSchemaForEffect(addAsyncQuestionFields(schema));
848
generator.addSchema(name, aggregateSchemas[name] as never);
849
}
850
packages/effect-codex-app-server/src/_generated/schema.gen.ts
+20426
-19038
@@ -3,6 +3,11 @@
3
4
import * as Schema from "effect/Schema";
5
6
+export type ApplyPatchApprovalParams__ThreadId = string;
7
+export const ApplyPatchApprovalParams__ThreadId = Schema.String.annotate({
8
+ identifier: "ApplyPatchApprovalParams__ThreadId",
9
+});
10
+
11
export type ApplyPatchApprovalParams__FileChange =
12
| { readonly content: string; readonly type: "add" }
13
| { readonly content: string; readonly type: "delete" }
@@ -24,143 +29,80 @@ export const ApplyPatchApprovalParams__FileChange = Schema.Union(
29
}).annotate({ title: "UpdateFileChange" }),
30
],
31
{ mode: "oneOf" },
27
-);
28
-
29
-export type ApplyPatchApprovalParams__ThreadId = string;
30
-export const ApplyPatchApprovalParams__ThreadId = Schema.String;
32
+).annotate({ identifier: "ApplyPatchApprovalParams__FileChange" });
33
34
export type ApplyPatchApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";
35
export const ApplyPatchApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([
36
"allow",
37
"deny",
36
-]);
38
+]).annotate({ identifier: "ApplyPatchApprovalResponse__NetworkPolicyRuleAction" });
39
40
export type ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason = "unauthorized";
39
-export const ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason =
40
- Schema.Literal("unauthorized");
41
-
42
-export type ClientRequest__AbsolutePathBuf = string;
43
-export 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
-
48
-export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit";
49
-export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals(["credits", "usage_limit"]);
50
-
51
-export type ClientRequest__AdditionalContextKind = "untrusted" | "application";
52
-export const ClientRequest__AdditionalContextKind = Schema.Literals(["untrusted", "application"]);
53
-
54
-export type ClientRequest__AgentMessageInputContent =
55
- | { readonly text: string; readonly type: "input_text" }
56
- | { readonly encrypted_content: string; readonly type: "encrypted_content" };
57
-export const ClientRequest__AgentMessageInputContent = Schema.Union(
41
+export const ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason = Schema.Union(
42
[
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
+ }),
46
],
47
{ mode: "oneOf" },
73
-);
48
+).annotate({ identifier: "ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason" });
49
75
-export type ClientRequest__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
76
-export 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
-});
50
+export type ClientRequest__RequestId = string | number;
51
+export 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" });
57
85
-export type ClientRequest__AppsInstalledParams = {
86
- readonly forceRefresh?: boolean;
87
- readonly threadId?: string | null;
58
+export type ClientRequest__InitializeCapabilities = {
59
+ readonly experimentalApi?: boolean;
60
+ readonly mcpServerOpenaiFormElicitation?: boolean;
61
+ readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
62
+ readonly requestAttestation?: boolean;
63
};
89
-export const ClientRequest__AppsInstalledParams = Schema.Struct({
90
- forceRefresh: Schema.optionalKey(
64
+export const ClientRequest__InitializeCapabilities = Schema.Struct({
65
+ experimentalApi: Schema.optionalKey(
66
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,
69
}),
70
),
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
-
106
-export type ClientRequest__AppsListParams = {
107
- readonly cursor?: string | null;
108
- readonly forceRefetch?: boolean;
109
- readonly limit?: number | null;
110
- readonly threadId?: string | null;
111
-};
112
-export 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(
72
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.",
74
}),
75
),
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(
77
Schema.Union([
139
- Schema.String.annotate({
78
+ Schema.Array(Schema.String).annotate({
79
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`).",
81
}),
82
Schema.Null,
83
]),
84
),
146
-}).annotate({ description: "EXPERIMENTAL - list available apps/connectors." });
147
-
148
-export type ClientRequest__AppsReadParams = {
149
- readonly appIds: ReadonlyArray<string>;
150
- readonly includeTools?: boolean;
151
-};
152
-export 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(
86
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,
89
}),
90
),
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
+
96
+export type ClientRequest__ClientInfo = {
97
+ readonly name: string;
98
+ readonly title?: string | null;
99
+ readonly version: string;
100
+};
101
+export 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" });
106
107
export type ClientRequest__AskForApproval =
108
| "untrusted"
@@ -189,182 +131,229 @@ export const ClientRequest__AskForApproval = Schema.Union(
131
}).annotate({ title: "GranularAskForApproval" }),
132
],
133
{ mode: "oneOf" },
192
-);
134
+).annotate({ identifier: "ClientRequest__AskForApproval" });
135
194
-export type ClientRequest__CancelLoginAccountParams = { readonly loginId: string };
195
-export const ClientRequest__CancelLoginAccountParams = Schema.Struct({ loginId: Schema.String });
136
+export type ClientRequest__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
137
+export 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
+});
146
197
-export type ClientRequest__ClientInfo = {
147
+export type ClientRequest__Personality = "none" | "friendly" | "pragmatic";
148
+export const ClientRequest__Personality = Schema.Literals([
149
+ "none",
150
+ "friendly",
151
+ "pragmatic",
152
+]).annotate({ identifier: "ClientRequest__Personality" });
153
+
154
+export type ClientRequest__SandboxMode = "read-only" | "workspace-write" | "danger-full-access";
155
+export const ClientRequest__SandboxMode = Schema.Literals([
156
+ "read-only",
157
+ "workspace-write",
158
+ "danger-full-access",
159
+]).annotate({ identifier: "ClientRequest__SandboxMode" });
160
+
161
+export type ClientRequest__ThreadStartSource = "startup" | "clear";
162
+export const ClientRequest__ThreadStartSource = Schema.Literals(["startup", "clear"]).annotate({
163
+ identifier: "ClientRequest__ThreadStartSource",
164
+});
165
+
166
+export type ClientRequest__ThreadSource = string;
167
+export const ClientRequest__ThreadSource = Schema.String.annotate({
168
+ identifier: "ClientRequest__ThreadSource",
169
+});
170
+
171
+export type ClientRequest__ThreadArchiveParams = { readonly threadId: string };
172
+export const ClientRequest__ThreadArchiveParams = Schema.Struct({
173
+ threadId: Schema.String,
174
+}).annotate({ identifier: "ClientRequest__ThreadArchiveParams" });
175
+
176
+export type ClientRequest__ThreadDeleteParams = { readonly threadId: string };
177
+export const ClientRequest__ThreadDeleteParams = Schema.Struct({
178
+ threadId: Schema.String,
179
+}).annotate({ identifier: "ClientRequest__ThreadDeleteParams" });
180
+
181
+export type ClientRequest__ThreadUnsubscribeParams = { readonly threadId: string };
182
+export const ClientRequest__ThreadUnsubscribeParams = Schema.Struct({
183
+ threadId: Schema.String,
184
+}).annotate({ identifier: "ClientRequest__ThreadUnsubscribeParams" });
185
+
186
+export type ClientRequest__ThreadSetNameParams = {
187
readonly name: string;
199
- readonly title?: string | null;
200
- readonly version: string;
188
+ readonly threadId: string;
189
};
202
-export const ClientRequest__ClientInfo = Schema.Struct({
190
+export const ClientRequest__ThreadSetNameParams = Schema.Struct({
191
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" });
194
208
-export type ClientRequest__CommandExecResizeParams = {
209
- readonly processId: string;
210
- readonly size: { readonly cols: number; readonly rows: number };
211
-};
212
-export 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." });
195
+export type ClientRequest__ThreadGoalStatus =
196
+ | "active"
197
+ | "paused"
198
+ | "blocked"
199
+ | "usageLimited"
200
+ | "budgetLimited"
201
+ | "complete";
202
+export const ClientRequest__ThreadGoalStatus = Schema.Literals([
203
+ "active",
204
+ "paused",
205
+ "blocked",
206
+ "usageLimited",
207
+ "budgetLimited",
208
+ "complete",
209
+]).annotate({ identifier: "ClientRequest__ThreadGoalStatus" });
210
233
-export type ClientRequest__CommandExecTerminalSize = {
234
- readonly cols: number;
235
- readonly rows: number;
236
-};
237
-export 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." });
211
+export type ClientRequest__ThreadGoalGetParams = { readonly threadId: string };
212
+export const ClientRequest__ThreadGoalGetParams = Schema.Struct({
213
+ threadId: Schema.String,
214
+}).annotate({ identifier: "ClientRequest__ThreadGoalGetParams" });
215
252
-export type ClientRequest__CommandExecTerminateParams = { readonly processId: string };
253
-export 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." });
216
+export type ClientRequest__ThreadGoalClearParams = { readonly threadId: string };
217
+export const ClientRequest__ThreadGoalClearParams = Schema.Struct({
218
+ threadId: Schema.String,
219
+}).annotate({ identifier: "ClientRequest__ThreadGoalClearParams" });
220
260
-export type ClientRequest__CommandExecWriteParams = {
261
- readonly closeStdin?: boolean;
262
- readonly deltaBase64?: string | null;
263
- readonly processId: string;
221
+export type ClientRequest__ThreadMetadataGitInfoUpdateParams = {
222
+ readonly branch?: string | null;
223
+ readonly originUrl?: string | null;
224
+ readonly sha?: string | null;
225
};
265
-export 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(
226
+export const ClientRequest__ThreadMetadataGitInfoUpdateParams = Schema.Struct({
227
+ branch: Schema.optionalKey(
228
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
+ }),
233
Schema.Null,
234
]),
235
),
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
-
285
-export type ClientRequest__CommandMigration = { readonly name: string };
286
-export const ClientRequest__CommandMigration = Schema.Struct({ name: Schema.String });
287
-
288
-export type ClientRequest__ConfigReadParams = {
289
- readonly cwd?: string | null;
290
- readonly includeLayers?: boolean;
291
-};
292
-export const ClientRequest__ConfigReadParams = Schema.Struct({
293
- cwd: Schema.optionalKey(
236
+ originUrl: Schema.optionalKey(
237
Schema.Union([
238
Schema.String.annotate({
239
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.",
241
}),
242
Schema.Null,
243
]),
244
),
302
- includeLayers: Schema.optionalKey(Schema.Boolean),
303
-});
304
-
305
-export type ClientRequest__ConsumeAccountRateLimitResetCreditParams = {
306
- readonly creditId?: string | null;
307
- readonly idempotencyKey: string;
308
-};
309
-export const ClientRequest__ConsumeAccountRateLimitResetCreditParams = Schema.Struct({
310
- creditId: Schema.optionalKey(
245
+ sha: Schema.optionalKey(
246
Schema.Union([
247
Schema.String.annotate({
248
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.",
250
}),
251
Schema.Null,
252
]),
253
),
319
- idempotencyKey: Schema.String.annotate({
254
+}).annotate({ identifier: "ClientRequest__ThreadMetadataGitInfoUpdateParams" });
255
+
256
+export type ClientRequest__ThreadUnarchiveParams = { readonly threadId: string };
257
+export const ClientRequest__ThreadUnarchiveParams = Schema.Struct({
258
+ threadId: Schema.String,
259
+}).annotate({ identifier: "ClientRequest__ThreadUnarchiveParams" });
260
+
261
+export type ClientRequest__ThreadCompactStartParams = { readonly threadId: string };
262
+export const ClientRequest__ThreadCompactStartParams = Schema.Struct({
263
+ threadId: Schema.String,
264
+}).annotate({ identifier: "ClientRequest__ThreadCompactStartParams" });
265
+
266
+export type ClientRequest__ThreadShellCommandParams = {
267
+ readonly command: string;
268
+ readonly threadId: string;
269
+};
270
+export const ClientRequest__ThreadShellCommandParams = Schema.Struct({
271
+ command: Schema.String.annotate({
272
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.",
274
}),
323
-});
324
-
325
-export type ClientRequest__ConversationTextRole = "user" | "developer" | "assistant";
326
-export const ClientRequest__ConversationTextRole = Schema.Literals([
327
- "user",
328
- "developer",
329
- "assistant",
330
-]);
275
+ threadId: Schema.String,
276
+}).annotate({ identifier: "ClientRequest__ThreadShellCommandParams" });
277
332
-export type ClientRequest__DynamicToolNamespaceTool = {
333
- readonly deferLoading?: boolean;
334
- readonly description: string;
335
- readonly inputSchema: unknown;
336
- readonly name: string;
337
- readonly type: "function";
278
+export type ClientRequest__ThreadApproveGuardianDeniedActionParams = {
279
+ readonly event: Schema.Json;
280
+ readonly threadId: string;
281
};
339
-export 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
-);
282
+export 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" });
289
352
-export type ClientRequest__ExperimentalFeatureEnablementSetParams = {
353
- readonly enablement: { readonly [x: string]: boolean };
290
+export type ClientRequest__ThreadRollbackParams = {
291
+ readonly numTurns: number;
292
+ readonly threadId: string;
293
};
355
-export const ClientRequest__ExperimentalFeatureEnablementSetParams = Schema.Struct({
356
- enablement: Schema.Record(Schema.String, Schema.Boolean).annotate({
294
+export const ClientRequest__ThreadRollbackParams = Schema.Struct({
295
+ numTurns: Schema.Number.annotate({
296
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",
308
});
309
362
-export type ClientRequest__ExperimentalFeatureListParams = {
310
+export type ClientRequest__ThreadListCwdFilter = string | ReadonlyArray<string>;
311
+export const ClientRequest__ThreadListCwdFilter = Schema.Union([
312
+ Schema.String,
313
+ Schema.Array(Schema.String),
314
+]).annotate({ identifier: "ClientRequest__ThreadListCwdFilter" });
315
+
316
+export type ClientRequest__SortDirection = "asc" | "desc";
317
+export const ClientRequest__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
318
+ identifier: "ClientRequest__SortDirection",
319
+});
320
+
321
+export type ClientRequest__ThreadSortKey = "created_at" | "updated_at" | "recency_at";
322
+export const ClientRequest__ThreadSortKey = Schema.Literals([
323
+ "created_at",
324
+ "updated_at",
325
+ "recency_at",
326
+]).annotate({ identifier: "ClientRequest__ThreadSortKey" });
327
+
328
+export type ClientRequest__ThreadSourceKind =
329
+ | "cli"
330
+ | "vscode"
331
+ | "exec"
332
+ | "appServer"
333
+ | "subAgent"
334
+ | "subAgentReview"
335
+ | "subAgentCompact"
336
+ | "subAgentThreadSpawn"
337
+ | "subAgentOther"
338
+ | "unknown";
339
+export 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
+
352
+export type ClientRequest__ThreadLoadedListParams = {
353
readonly cursor?: string | null;
354
readonly limit?: number | null;
365
- readonly threadId?: string | null;
355
};
367
-export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({
356
+export const ClientRequest__ThreadLoadedListParams = Schema.Struct({
357
cursor: Schema.optionalKey(
358
Schema.Union([
359
Schema.String.annotate({
@@ -376,439 +365,385 @@ export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({
365
limit: Schema.optionalKey(
366
Schema.Union([
367
Schema.Number.annotate({
379
- description: "Optional page size; defaults to a reasonable server-side value.",
368
+ description: "Optional page size; defaults to no limit.",
369
format: "uint32",
370
})
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
+ ),
377
Schema.Null,
378
]),
379
),
396
-});
380
+}).annotate({ identifier: "ClientRequest__ThreadLoadedListParams" });
381
398
-export type ClientRequest__ExternalAgentConfigDetectParams = {
399
- readonly cwds?: ReadonlyArray<string> | null;
400
- readonly includeHome?: boolean;
401
- readonly migrationSource?: string | null;
402
- readonly source?: string | null;
382
+export type ClientRequest__ThreadReadParams = {
383
+ readonly includeTurns?: boolean;
384
+ readonly threadId: string;
385
};
404
-export 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(
386
+export const ClientRequest__ThreadReadParams = Schema.Struct({
387
+ includeTurns: Schema.optionalKey(
388
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.",
390
}),
391
),
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
-
438
-export 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";
449
-export 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" });
394
462
-export 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;
395
+export type ClientRequest__ThreadInjectItemsParams = {
396
+ readonly items: ReadonlyArray<Schema.Json>;
397
+ readonly threadId: string;
398
};
470
-export 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
-});
399
+export 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" });
405
481
-export type ClientRequest__FsCopyParams = {
482
- readonly destinationPath: string;
483
- readonly recursive?: boolean;
484
- readonly sourcePath: string;
406
+export type ClientRequest__SkillsListParams = {
407
+ readonly cwds?: ReadonlyArray<string>;
408
+ readonly forceReload?: boolean;
409
};
486
-export 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(
410
+export 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(
417
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.",
419
}),
420
),
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" });
422
502
-export type ClientRequest__FsCreateDirectoryParams = {
503
- readonly path: string;
504
- readonly recursive?: boolean | null;
505
-};
506
-export 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
- ]),
423
+export type ClientRequest__AbsolutePathBuf = string;
424
+export 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
+
430
+export type ClientRequest__HooksListParams = { readonly cwds?: ReadonlyArray<string> };
431
+export 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
+ }),
436
),
519
-}).annotate({ description: "Create a directory on the host filesystem." });
437
+}).annotate({ identifier: "ClientRequest__HooksListParams" });
438
521
-export type ClientRequest__FsGetMetadataParams = { readonly path: string };
522
-export 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." });
439
+export type ClientRequest__MarketplaceAddParams = {
440
+ readonly refName?: string | null;
441
+ readonly source: string;
442
+ readonly sparsePaths?: ReadonlyArray<string> | null;
443
+};
444
+export 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" });
449
529
-export type ClientRequest__FsReadDirectoryParams = { readonly path: string };
530
-export 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." });
450
+export type ClientRequest__MarketplaceRemoveParams = { readonly marketplaceName: string };
451
+export const ClientRequest__MarketplaceRemoveParams = Schema.Struct({
452
+ marketplaceName: Schema.String,
453
+}).annotate({ identifier: "ClientRequest__MarketplaceRemoveParams" });
454
537
-export type ClientRequest__FsReadFileParams = { readonly path: string };
538
-export 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." });
455
+export type ClientRequest__MarketplaceUpgradeParams = { readonly marketplaceName?: string | null };
456
+export const ClientRequest__MarketplaceUpgradeParams = Schema.Struct({
457
+ marketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
458
+}).annotate({ identifier: "ClientRequest__MarketplaceUpgradeParams" });
459
545
-export type ClientRequest__FsRemoveParams = {
546
- readonly force?: boolean | null;
547
- readonly path: string;
548
- readonly recursive?: boolean | null;
460
+export type ClientRequest__PluginListMarketplaceKind =
461
+ | "local"
462
+ | "vertical"
463
+ | "workspace-directory"
464
+ | "shared-with-me"
465
+ | "created-by-me-remote";
466
+export 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
+
474
+export type ClientRequest__PluginSkillReadParams = {
475
+ readonly remoteMarketplaceName: string;
476
+ readonly remotePluginId: string;
477
+ readonly skillName: string;
478
};
550
-export 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." });
479
+export const ClientRequest__PluginSkillReadParams = Schema.Struct({
480
+ remoteMarketplaceName: Schema.String,
481
+ remotePluginId: Schema.String,
482
+ skillName: Schema.String,
483
+}).annotate({ identifier: "ClientRequest__PluginSkillReadParams" });
484
573
-export type ClientRequest__FsUnwatchParams = { readonly watchId: string };
574
-export 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`." });
485
+export type ClientRequest__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
486
+export const ClientRequest__PluginShareDiscoverability = Schema.Literals([
487
+ "LISTED",
488
+ "UNLISTED",
489
+ "PRIVATE",
490
+]).annotate({ identifier: "ClientRequest__PluginShareDiscoverability" });
491
580
-export type ClientRequest__FsWatchParams = { readonly path: string; readonly watchId: string };
581
-export 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." });
492
+export type ClientRequest__PluginSharePrincipalType = "user" | "group" | "workspace";
493
+export const ClientRequest__PluginSharePrincipalType = Schema.Literals([
494
+ "user",
495
+ "group",
496
+ "workspace",
497
+]).annotate({ identifier: "ClientRequest__PluginSharePrincipalType" });
498
591
-export type ClientRequest__FsWriteFileParams = {
592
- readonly dataBase64: string;
593
- readonly path: string;
499
+export type ClientRequest__PluginShareTargetRole = "reader" | "editor";
500
+export const ClientRequest__PluginShareTargetRole = Schema.Literals(["reader", "editor"]).annotate({
501
+ identifier: "ClientRequest__PluginShareTargetRole",
502
+});
503
+
504
+export type ClientRequest__PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE" | "LISTED";
505
+export const ClientRequest__PluginShareUpdateDiscoverability = Schema.Literals([
506
+ "UNLISTED",
507
+ "PRIVATE",
508
+ "LISTED",
509
+]).annotate({ identifier: "ClientRequest__PluginShareUpdateDiscoverability" });
510
+
511
+export type ClientRequest__PluginShareListParams = { readonly [x: string]: Schema.Json };
512
+export const ClientRequest__PluginShareListParams = Schema.Record(
513
+ Schema.String,
514
+ Schema.Json.annotate({ expected: "JSON value" }),
515
+).annotate({ identifier: "ClientRequest__PluginShareListParams" });
516
+
517
+export type ClientRequest__PluginShareCheckoutParams = { readonly remotePluginId: string };
518
+export const ClientRequest__PluginShareCheckoutParams = Schema.Struct({
519
+ remotePluginId: Schema.String,
520
+}).annotate({ identifier: "ClientRequest__PluginShareCheckoutParams" });
521
+
522
+export type ClientRequest__PluginShareDeleteParams = { readonly remotePluginId: string };
523
+export const ClientRequest__PluginShareDeleteParams = Schema.Struct({
524
+ remotePluginId: Schema.String,
525
+}).annotate({ identifier: "ClientRequest__PluginShareDeleteParams" });
526
+
527
+export type ClientRequest__AppsReadParams = {
528
+ readonly appIds: ReadonlyArray<string>;
529
+ readonly includeTools?: boolean;
530
};
595
-export const ClientRequest__FsWriteFileParams = Schema.Struct({
596
- dataBase64: Schema.String.annotate({ description: "File contents encoded as base64." }),
597
- path: Schema.String.annotate({
531
+export const ClientRequest__AppsReadParams = Schema.Struct({
532
+ appIds: Schema.Array(Schema.String).annotate({
533
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.",
535
}),
601
-}).annotate({ description: "Write a file on the host filesystem." });
602
-
603
-export type ClientRequest__FuzzyFileSearchParams = {
604
- readonly cancellationToken?: string | null;
605
- readonly query: string;
606
- readonly roots: ReadonlyArray<string>;
607
-};
608
-export 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
-
614
-export type ClientRequest__GetAccountParams = { readonly refreshToken?: boolean };
615
-export const ClientRequest__GetAccountParams = Schema.Struct({
616
- refreshToken: Schema.optionalKey(
536
+ includeTools: Schema.optionalKey(
537
Schema.Boolean.annotate({
538
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
-
624
-export type ClientRequest__HookMigration = { readonly name: string };
625
-export const ClientRequest__HookMigration = Schema.Struct({ name: Schema.String });
626
-
627
-export type ClientRequest__HooksListParams = { readonly cwds?: ReadonlyArray<string> };
628
-export 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.",
540
}),
541
),
542
+}).annotate({
543
+ description: "EXPERIMENTAL - read metadata for specific apps/connectors.",
544
+ identifier: "ClientRequest__AppsReadParams",
545
});
546
636
-export type ClientRequest__ImageDetail = "auto" | "low" | "high" | "original";
637
-export const ClientRequest__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
638
-
639
-export type ClientRequest__InitializeCapabilities = {
640
- readonly experimentalApi?: boolean;
641
- readonly mcpServerOpenaiFormElicitation?: boolean;
642
- readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
643
- readonly requestAttestation?: boolean;
547
+export type ClientRequest__AppsListParams = {
548
+ readonly cursor?: string | null;
549
+ readonly forceRefetch?: boolean;
550
+ readonly limit?: number | null;
551
+ readonly threadId?: string | null;
552
};
645
-export 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
- }),
553
+export 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
+ ]),
561
),
652
- mcpServerOpenaiFormElicitation: Schema.optionalKey(
562
+ forceRefetch: Schema.optionalKey(
563
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.",
565
}),
566
),
657
- optOutNotificationMethods: Schema.optionalKey(
567
+ limit: Schema.optionalKey(
568
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({
585
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.",
587
}),
588
Schema.Null,
589
]),
590
),
666
- requestAttestation: Schema.optionalKey(
591
+}).annotate({
592
+ description: "EXPERIMENTAL - list available apps/connectors.",
593
+ identifier: "ClientRequest__AppsListParams",
594
+});
595
+
596
+export type ClientRequest__AppsInstalledParams = {
597
+ readonly forceRefresh?: boolean;
598
+ readonly threadId?: string | null;
599
+};
600
+export const ClientRequest__AppsInstalledParams = Schema.Struct({
601
+ forceRefresh: Schema.optionalKey(
602
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.",
605
}),
606
),
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
+});
619
674
-export type ClientRequest__InternalChatMessageMetadataPassthrough = {
675
- readonly turn_id?: string | null;
676
-};
677
-export const ClientRequest__InternalChatMessageMetadataPassthrough = Schema.Struct({
678
- turn_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
620
+export type ClientRequest__FsUnwatchParams = { readonly watchId: string };
621
+export const ClientRequest__FsUnwatchParams = Schema.Struct({
622
+ watchId: Schema.String.annotate({
623
+ description: "Watch identifier previously provided to `fs/watch`.",
624
+ }),
625
}).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",
628
});
629
684
-export type ClientRequest__LegacyAppPathString = string;
685
-export const ClientRequest__LegacyAppPathString = Schema.String;
630
+export type ClientRequest__PluginUninstallParams = { readonly pluginId: string };
631
+export const ClientRequest__PluginUninstallParams = Schema.Struct({
632
+ pluginId: Schema.String,
633
+}).annotate({ identifier: "ClientRequest__PluginUninstallParams" });
634
687
-export 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
-};
695
-export 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" },
635
+export type ClientRequest__ReasoningEffort = string;
636
+export 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
+ }),
643
);
644
718
-export type ClientRequest__LocalShellStatus = "completed" | "in_progress" | "incomplete";
719
-export const ClientRequest__LocalShellStatus = Schema.Literals([
720
- "completed",
721
- "in_progress",
722
- "incomplete",
723
-]);
724
-
725
-export type ClientRequest__LoginAppBrand = "codex" | "chatgpt";
726
-export const ClientRequest__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]);
727
-
728
-export type ClientRequest__MarketplaceAddParams = {
729
- readonly refName?: string | null;
730
- readonly source: string;
731
- readonly sparsePaths?: ReadonlyArray<string> | null;
732
-};
733
-export 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
-
739
-export type ClientRequest__MarketplaceRemoveParams = { readonly marketplaceName: string };
740
-export const ClientRequest__MarketplaceRemoveParams = Schema.Struct({
741
- marketplaceName: Schema.String,
742
-});
645
+export type ClientRequest__ByteRange = { readonly end: number; readonly start: number };
646
+export 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" });
658
744
-export type ClientRequest__MarketplaceUpgradeParams = { readonly marketplaceName?: string | null };
745
-export const ClientRequest__MarketplaceUpgradeParams = Schema.Struct({
746
- marketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
747
-});
659
+export type ClientRequest__ImageDetail = "auto" | "low" | "high" | "original";
660
+export const ClientRequest__ImageDetail = Schema.Literals([
661
+ "auto",
662
+ "low",
663
+ "high",
664
+ "original",
665
+]).annotate({ identifier: "ClientRequest__ImageDetail" });
666
749
-export type ClientRequest__McpResourceReadParams = {
750
- readonly server: string;
751
- readonly threadId?: string | null;
752
- readonly uri: string;
753
-};
754
-export const ClientRequest__McpResourceReadParams = Schema.Struct({
755
- server: Schema.String,
756
- threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
757
- uri: Schema.String,
667
+export type ClientRequest__NetworkAccess = "restricted" | "enabled";
668
+export const ClientRequest__NetworkAccess = Schema.Literals(["restricted", "enabled"]).annotate({
669
+ identifier: "ClientRequest__NetworkAccess",
670
});
671
760
-export type ClientRequest__McpServerMigration = { readonly name: string };
761
-export const ClientRequest__McpServerMigration = Schema.Struct({ name: Schema.String });
762
-
763
-export type ClientRequest__McpServerOauthLoginParams = {
764
- readonly name: string;
765
- readonly scopes?: ReadonlyArray<string> | null;
766
- readonly threadId?: string | null;
767
- readonly timeoutSecs?: number | null;
768
-};
769
-export 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
- ),
672
+export type ClientRequest__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
673
+export 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",
683
});
684
778
-export type ClientRequest__McpServerStatusDetail = "full" | "toolsAndAuthOnly";
779
-export const ClientRequest__McpServerStatusDetail = Schema.Literals(["full", "toolsAndAuthOnly"]);
780
-
781
-export type ClientRequest__McpServerToolCallParams = {
782
- readonly _meta?: unknown;
783
- readonly arguments?: unknown;
784
- readonly server: string;
685
+export type ClientRequest__TurnInterruptParams = {
686
readonly threadId: string;
786
- readonly tool: string;
687
+ readonly turnId: string;
688
};
788
-export const ClientRequest__McpServerToolCallParams = Schema.Struct({
789
- _meta: Schema.optionalKey(Schema.Unknown),
790
- arguments: Schema.optionalKey(Schema.Unknown),
791
- server: Schema.String,
689
+export const ClientRequest__TurnInterruptParams = Schema.Struct({
690
threadId: Schema.String,
793
- tool: Schema.String,
794
-});
795
-
796
-export type ClientRequest__MergeStrategy = "replace" | "upsert";
797
-export const ClientRequest__MergeStrategy = Schema.Literals(["replace", "upsert"]);
798
-
799
-export type ClientRequest__MessagePhase = "commentary" | "final_answer";
800
-export 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" });
693
807
-export type ClientRequest__ModeKind = "plan" | "default";
808
-export const ClientRequest__ModeKind = Schema.Literals(["plan", "default"]).annotate({
809
- description: "Initial collaboration mode to use when the TUI starts.",
694
+export type ClientRequest__ReviewDelivery = "inline" | "detached";
695
+export const ClientRequest__ReviewDelivery = Schema.Literals(["inline", "detached"]).annotate({
696
+ identifier: "ClientRequest__ReviewDelivery",
697
});
698
699
+export 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" };
704
+export 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
+
747
export type ClientRequest__ModelListParams = {
748
readonly cursor?: string | null;
749
readonly includeHidden?: boolean | null;
@@ -837,15 +772,64 @@ export const ClientRequest__ModelListParams = Schema.Struct({
772
description: "Optional page size; defaults to a reasonable server-side value.",
773
format: "uint32",
774
})
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
+ ),
781
Schema.Null,
782
]),
783
),
845
-});
784
+}).annotate({ identifier: "ClientRequest__ModelListParams" });
785
+
786
+export type ClientRequest__ModelProviderCapabilitiesReadParams = {
787
+ readonly [x: string]: Schema.Json;
788
+};
789
+export const ClientRequest__ModelProviderCapabilitiesReadParams = Schema.Record(
790
+ Schema.String,
791
+ Schema.Json.annotate({ expected: "JSON value" }),
792
+).annotate({ identifier: "ClientRequest__ModelProviderCapabilitiesReadParams" });
793
847
-export type ClientRequest__ModelProviderCapabilitiesReadParams = {};
848
-export const ClientRequest__ModelProviderCapabilitiesReadParams = Schema.Struct({});
794
+export type ClientRequest__ExperimentalFeatureListParams = {
795
+ readonly cursor?: string | null;
796
+ readonly limit?: number | null;
797
+ readonly threadId?: string | null;
798
+};
799
+export 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" });
833
834
export type ClientRequest__PermissionProfileListParams = {
835
readonly cursor?: string | null;
@@ -875,80 +859,274 @@ export const ClientRequest__PermissionProfileListParams = Schema.Struct({
859
description: "Optional page size; defaults to the full result set.",
860
format: "uint32",
861
})
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
+ ),
868
Schema.Null,
869
]),
870
),
883
-});
871
+}).annotate({ identifier: "ClientRequest__PermissionProfileListParams" });
872
885
-export type ClientRequest__Personality = "none" | "friendly" | "pragmatic";
886
-export const ClientRequest__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
873
+export type ClientRequest__ExperimentalFeatureEnablementSetParams = {
874
+ readonly enablement: { readonly [x: string]: boolean };
875
+};
876
+export 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" });
882
888
-export type ClientRequest__PluginListMarketplaceKind =
889
- | "local"
890
- | "vertical"
891
- | "workspace-directory"
892
- | "shared-with-me"
893
- | "created-by-me-remote";
894
-export const ClientRequest__PluginListMarketplaceKind = Schema.Literals([
895
- "local",
896
- "vertical",
897
- "workspace-directory",
898
- "shared-with-me",
899
- "created-by-me-remote",
900
-]);
883
+export type ClientRequest__McpServerOauthLoginParams = {
884
+ readonly name: string;
885
+ readonly scopes?: ReadonlyArray<string> | null;
886
+ readonly threadId?: string | null;
887
+ readonly timeoutSecs?: number | null;
888
+};
889
+export 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" });
902
902
-export type ClientRequest__PluginShareCheckoutParams = { readonly remotePluginId: string };
903
-export const ClientRequest__PluginShareCheckoutParams = Schema.Struct({
904
- remotePluginId: Schema.String,
905
-});
903
+export type ClientRequest__McpServerStatusDetail = "full" | "toolsAndAuthOnly";
904
+export const ClientRequest__McpServerStatusDetail = Schema.Literals([
905
+ "full",
906
+ "toolsAndAuthOnly",
907
+]).annotate({ identifier: "ClientRequest__McpServerStatusDetail" });
908
907
-export type ClientRequest__PluginShareDeleteParams = { readonly remotePluginId: string };
908
-export const ClientRequest__PluginShareDeleteParams = Schema.Struct({
909
- remotePluginId: Schema.String,
909
+export type ClientRequest__McpResourceReadParams = {
910
+ readonly server: string;
911
+ readonly threadId?: string | null;
912
+ readonly uri: string;
913
+};
914
+export 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
+
920
+export 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
+};
927
+export 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
+
935
+export type ClientRequest__WindowsSandboxSetupMode = "elevated" | "unelevated";
936
+export const ClientRequest__WindowsSandboxSetupMode = Schema.Literals([
937
+ "elevated",
938
+ "unelevated",
939
+]).annotate({ identifier: "ClientRequest__WindowsSandboxSetupMode" });
940
+
941
+export type ClientRequest__LoginAppBrand = "codex" | "chatgpt";
942
+export const ClientRequest__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]).annotate({
943
+ identifier: "ClientRequest__LoginAppBrand",
944
});
945
912
-export type ClientRequest__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
913
-export const ClientRequest__PluginShareDiscoverability = Schema.Literals([
914
- "LISTED",
915
- "UNLISTED",
916
- "PRIVATE",
917
-]);
946
+export type ClientRequest__CancelLoginAccountParams = { readonly loginId: string };
947
+export const ClientRequest__CancelLoginAccountParams = Schema.Struct({
948
+ loginId: Schema.String,
949
+}).annotate({ identifier: "ClientRequest__CancelLoginAccountParams" });
950
919
-export type ClientRequest__PluginShareListParams = {};
920
-export const ClientRequest__PluginShareListParams = Schema.Struct({});
951
+export type ClientRequest__ConsumeAccountRateLimitResetCreditParams = {
952
+ readonly creditId?: string | null;
953
+ readonly idempotencyKey: string;
954
+};
955
+export 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" });
970
922
-export type ClientRequest__PluginSharePrincipalType = "user" | "group" | "workspace";
923
-export const ClientRequest__PluginSharePrincipalType = Schema.Literals([
924
- "user",
925
- "group",
926
- "workspace",
927
-]);
971
+export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit";
972
+export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals([
973
+ "credits",
974
+ "usage_limit",
975
+]).annotate({ identifier: "ClientRequest__AddCreditsNudgeCreditType" });
976
929
-export type ClientRequest__PluginShareTargetRole = "reader" | "editor";
930
-export const ClientRequest__PluginShareTargetRole = Schema.Literals(["reader", "editor"]);
977
+export 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
+};
985
+export 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" });
995
932
-export type ClientRequest__PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE" | "LISTED";
933
-export const ClientRequest__PluginShareUpdateDiscoverability = Schema.Literals([
934
- "UNLISTED",
935
- "PRIVATE",
936
- "LISTED",
937
-]);
996
+export type ClientRequest__CommandExecTerminalSize = {
997
+ readonly cols: number;
998
+ readonly rows: number;
999
+};
1000
+export 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
+});
1021
939
-export type ClientRequest__PluginSkillReadParams = {
940
- readonly remoteMarketplaceName: string;
941
- readonly remotePluginId: string;
942
- readonly skillName: string;
1022
+export type ClientRequest__CommandExecWriteParams = {
1023
+ readonly closeStdin?: boolean;
1024
+ readonly deltaBase64?: string | null;
1025
+ readonly processId: string;
1026
};
944
-export const ClientRequest__PluginSkillReadParams = Schema.Struct({
945
- remoteMarketplaceName: Schema.String,
946
- remotePluginId: Schema.String,
947
- skillName: Schema.String,
1027
+export 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",
1046
});
1047
950
-export type ClientRequest__PluginUninstallParams = { readonly pluginId: string };
951
-export const ClientRequest__PluginUninstallParams = Schema.Struct({ pluginId: Schema.String });
1048
+export type ClientRequest__CommandExecTerminateParams = { readonly processId: string };
1049
+export 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
+
1059
+export type ClientRequest__ConfigReadParams = {
1060
+ readonly cwd?: string | null;
1061
+ readonly includeLayers?: boolean;
1062
+};
1063
+export 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
+
1076
+export type ClientRequest__ExternalAgentConfigDetectParams = {
1077
+ readonly cwds?: ReadonlyArray<string> | null;
1078
+ readonly includeHome?: boolean;
1079
+ readonly migrationSource?: string | null;
1080
+ readonly source?: string | null;
1081
+};
1082
+export 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
+
1116
+export type ClientRequest__CommandMigration = { readonly name: string };
1117
+export const ClientRequest__CommandMigration = Schema.Struct({ name: Schema.String }).annotate({
1118
+ identifier: "ClientRequest__CommandMigration",
1119
+});
1120
+
1121
+export type ClientRequest__HookMigration = { readonly name: string };
1122
+export const ClientRequest__HookMigration = Schema.Struct({ name: Schema.String }).annotate({
1123
+ identifier: "ClientRequest__HookMigration",
1124
+});
1125
+
1126
+export type ClientRequest__McpServerMigration = { readonly name: string };
1127
+export const ClientRequest__McpServerMigration = Schema.Struct({ name: Schema.String }).annotate({
1128
+ identifier: "ClientRequest__McpServerMigration",
1129
+});
1130
1131
export type ClientRequest__PluginsMigration = {
1132
readonly marketplaceName: string;
@@ -957,12 +1135,160 @@ export type ClientRequest__PluginsMigration = {
1135
export const ClientRequest__PluginsMigration = Schema.Struct({
1136
marketplaceName: Schema.String,
1137
pluginNames: Schema.Array(Schema.String),
1138
+}).annotate({ identifier: "ClientRequest__PluginsMigration" });
1139
+
1140
+export type ClientRequest__SessionMigration = {
1141
+ readonly cwd: string;
1142
+ readonly path: string;
1143
+ readonly title?: string | null;
1144
+};
1145
+export 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
+
1151
+export type ClientRequest__SkillMigration = { readonly name: string };
1152
+export const ClientRequest__SkillMigration = Schema.Struct({ name: Schema.String }).annotate({
1153
+ identifier: "ClientRequest__SkillMigration",
1154
});
1155
962
-export type ClientRequest__ReasoningEffort = string;
963
-export const ClientRequest__ReasoningEffort = Schema.String.annotate({
964
- description: "A non-empty reasoning effort value advertised by the model.",
965
-}).check(Schema.isMinLength(1));
1156
+export type ClientRequest__SubagentMigration = { readonly name: string };
1157
+export const ClientRequest__SubagentMigration = Schema.Struct({ name: Schema.String }).annotate({
1158
+ identifier: "ClientRequest__SubagentMigration",
1159
+});
1160
+
1161
+export 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";
1172
+export 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
+
1185
+export type ClientRequest__MergeStrategy = "replace" | "upsert";
1186
+export const ClientRequest__MergeStrategy = Schema.Literals(["replace", "upsert"]).annotate({
1187
+ identifier: "ClientRequest__MergeStrategy",
1188
+});
1189
+
1190
+export type ClientRequest__GetAccountParams = { readonly refreshToken?: boolean };
1191
+export 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
+
1200
+export type ClientRequest__FuzzyFileSearchParams = {
1201
+ readonly cancellationToken?: string | null;
1202
+ readonly query: string;
1203
+ readonly roots: ReadonlyArray<string>;
1204
+};
1205
+export 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
+
1211
+export type ClientRequest__AdditionalContextKind = "untrusted" | "application";
1212
+export const ClientRequest__AdditionalContextKind = Schema.Literals([
1213
+ "untrusted",
1214
+ "application",
1215
+]).annotate({ identifier: "ClientRequest__AdditionalContextKind" });
1216
+
1217
+export type ClientRequest__ModeKind = "plan" | "default";
1218
+export 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
+
1223
+export 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
+};
1230
+export 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
+
1243
+export type ClientRequest__InternalChatMessageMetadataPassthrough = {
1244
+ readonly turn_id?: string | null;
1245
+};
1246
+export 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
+
1254
+export type ClientRequest__MessagePhase = "commentary" | "final_answer";
1255
+export 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
+
1272
+export type ClientRequest__AgentMessageInputContent =
1273
+ | { readonly text: string; readonly type: "input_text" }
1274
+ | { readonly encrypted_content: string; readonly type: "encrypted_content" };
1275
+export 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" });
1292
1293
export type ClientRequest__ReasoningItemContent =
1294
| { readonly text: string; readonly type: "reasoning_text" }
@@ -981,7 +1307,7 @@ export const ClientRequest__ReasoningItemContent = Schema.Union(
1307
}).annotate({ title: "TextReasoningItemContent" }),
1308
],
1309
{ mode: "oneOf" },
984
-);
1310
+).annotate({ identifier: "ClientRequest__ReasoningItemContent" });
1311
1312
export type ClientRequest__ReasoningItemReasoningSummary = {
1313
readonly text: string;
@@ -997,25 +1323,49 @@ export const ClientRequest__ReasoningItemReasoningSummary = Schema.Union(
1323
}).annotate({ title: "SummaryTextReasoningItemReasoningSummary" }),
1324
],
1325
{ mode: "oneOf" },
1000
-);
1326
+).annotate({ identifier: "ClientRequest__ReasoningItemReasoningSummary" });
1327
1002
-export type ClientRequest__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
1003
-export const ClientRequest__ReasoningSummary = Schema.Union(
1328
+export 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
+};
1336
+export const ClientRequest__LocalShellAction = Schema.Union(
1337
[
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" }),
1359
],
1360
{ 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" });
1362
1014
-export type ClientRequest__RequestId = string | number;
1015
-export const ClientRequest__RequestId = Schema.Union([
1016
- Schema.String,
1017
- Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
1018
-]);
1363
+export type ClientRequest__LocalShellStatus = "completed" | "in_progress" | "incomplete";
1364
+export const ClientRequest__LocalShellStatus = Schema.Literals([
1365
+ "completed",
1366
+ "in_progress",
1367
+ "incomplete",
1368
+]).annotate({ identifier: "ClientRequest__LocalShellStatus" });
1369
1370
export type ClientRequest__ResponsesApiWebSearchAction =
1371
| {
@@ -1055,377 +1405,74 @@ export const ClientRequest__ResponsesApiWebSearchAction = Schema.Union(
1405
}).annotate({ title: "OtherResponsesApiWebSearchAction" }),
1406
],
1407
{ mode: "oneOf" },
1058
-);
1059
-
1060
-export type ClientRequest__ReviewDelivery = "inline" | "detached";
1061
-export const ClientRequest__ReviewDelivery = Schema.Literals(["inline", "detached"]);
1408
+).annotate({ identifier: "ClientRequest__ResponsesApiWebSearchAction" });
1409
1063
-export 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" };
1068
-export const ClientRequest__ReviewTarget = Schema.Union(
1410
+export type ClientRequest__CapabilityRootLocation = {
1411
+ readonly environmentId: string;
1412
+ readonly path: string;
1413
+ readonly type: "environment";
1414
+};
1415
+export const ClientRequest__CapabilityRootLocation = Schema.Union(
1416
[
1417
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",
1424
}),
1425
}).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.",
1428
}),
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
+
1436
+export type ClientRequest__ConversationTextRole = "user" | "developer" | "assistant";
1437
+export const ClientRequest__ConversationTextRole = Schema.Literals([
1438
+ "user",
1439
+ "developer",
1440
+ "assistant",
1441
+]).annotate({ identifier: "ClientRequest__ConversationTextRole" });
1442
+
1443
+export type ClientRequest__TurnItemsView = "notLoaded" | "summary" | "full";
1444
+export 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.",
1448
}),
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.",
1451
}),
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.",
1455
}),
1456
],
1457
{ mode: "oneOf" },
1109
-);
1110
-
1111
-export type ClientRequest__SandboxMode = "read-only" | "workspace-write" | "danger-full-access";
1112
-export const ClientRequest__SandboxMode = Schema.Literals([
1113
- "read-only",
1114
- "workspace-write",
1115
- "danger-full-access",
1116
-]);
1458
+).annotate({ identifier: "ClientRequest__TurnItemsView" });
1459
1118
-export type ClientRequest__SessionMigration = {
1119
- readonly cwd: string;
1120
- readonly path: string;
1121
- readonly title?: string | null;
1122
-};
1123
-export const ClientRequest__SessionMigration = Schema.Struct({
1124
- cwd: Schema.String,
1125
- path: Schema.String,
1126
- title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1460
+export type ClientRequest__LegacyAppPathString = string;
1461
+export const ClientRequest__LegacyAppPathString = Schema.String.annotate({
1462
+ identifier: "ClientRequest__LegacyAppPathString",
1463
});
1464
1129
-export type ClientRequest__SkillMigration = { readonly name: string };
1130
-export const ClientRequest__SkillMigration = Schema.Struct({ name: Schema.String });
1131
-
1132
-export type ClientRequest__SkillsListParams = {
1133
- readonly cwds?: ReadonlyArray<string>;
1134
- readonly forceReload?: boolean;
1135
-};
1136
-export 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
- ),
1465
+export type CommandExecutionRequestApprovalParams__AbsolutePathBuf = string;
1466
+export 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",
1470
});
1471
1149
-export type ClientRequest__SortDirection = "asc" | "desc";
1150
-export const ClientRequest__SortDirection = Schema.Literals(["asc", "desc"]);
1151
-
1152
-export type ClientRequest__SubagentMigration = { readonly name: string };
1153
-export const ClientRequest__SubagentMigration = Schema.Struct({ name: Schema.String });
1154
-
1155
-export type ClientRequest__TextElement = {
1156
- readonly byteRange: { readonly end: number; readonly start: number };
1157
- readonly placeholder?: string | null;
1158
-};
1159
-export 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
-
1180
-export type ClientRequest__ThreadApproveGuardianDeniedActionParams = {
1181
- readonly event: unknown;
1182
- readonly threadId: string;
1183
-};
1184
-export const ClientRequest__ThreadApproveGuardianDeniedActionParams = Schema.Struct({
1185
- event: Schema.Unknown.annotate({
1186
- description: "Serialized `codex_protocol::protocol::GuardianAssessmentEvent`.",
1187
- }),
1188
- threadId: Schema.String,
1189
-});
1190
-
1191
-export type ClientRequest__ThreadArchiveParams = { readonly threadId: string };
1192
-export const ClientRequest__ThreadArchiveParams = Schema.Struct({ threadId: Schema.String });
1193
-
1194
-export type ClientRequest__ThreadCompactStartParams = { readonly threadId: string };
1195
-export const ClientRequest__ThreadCompactStartParams = Schema.Struct({ threadId: Schema.String });
1196
-
1197
-export type ClientRequest__ThreadDeleteParams = { readonly threadId: string };
1198
-export const ClientRequest__ThreadDeleteParams = Schema.Struct({ threadId: Schema.String });
1199
-
1200
-export type ClientRequest__ThreadGoalClearParams = { readonly threadId: string };
1201
-export const ClientRequest__ThreadGoalClearParams = Schema.Struct({ threadId: Schema.String });
1202
-
1203
-export type ClientRequest__ThreadGoalGetParams = { readonly threadId: string };
1204
-export const ClientRequest__ThreadGoalGetParams = Schema.Struct({ threadId: Schema.String });
1205
-
1206
-export type ClientRequest__ThreadGoalStatus =
1207
- | "active"
1208
- | "paused"
1209
- | "blocked"
1210
- | "usageLimited"
1211
- | "budgetLimited"
1212
- | "complete";
1213
-export const ClientRequest__ThreadGoalStatus = Schema.Literals([
1214
- "active",
1215
- "paused",
1216
- "blocked",
1217
- "usageLimited",
1218
- "budgetLimited",
1219
- "complete",
1220
-]);
1221
-
1222
-export type ClientRequest__ThreadInjectItemsParams = {
1223
- readonly items: ReadonlyArray<unknown>;
1224
- readonly threadId: string;
1225
-};
1226
-export 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
-
1233
-export type ClientRequest__ThreadListCwdFilter = string | ReadonlyArray<string>;
1234
-export const ClientRequest__ThreadListCwdFilter = Schema.Union([
1235
- Schema.String,
1236
- Schema.Array(Schema.String),
1237
-]);
1238
-
1239
-export type ClientRequest__ThreadLoadedListParams = {
1240
- readonly cursor?: string | null;
1241
- readonly limit?: number | null;
1242
-};
1243
-export 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
-
1265
-export type ClientRequest__ThreadMetadataGitInfoUpdateParams = {
1266
- readonly branch?: string | null;
1267
- readonly originUrl?: string | null;
1268
- readonly sha?: string | null;
1269
-};
1270
-export 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
-
1300
-export type ClientRequest__ThreadReadParams = {
1301
- readonly includeTurns?: boolean;
1302
- readonly threadId: string;
1303
-};
1304
-export 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
-
1313
-export type ClientRequest__ThreadRollbackParams = {
1314
- readonly numTurns: number;
1315
- readonly threadId: string;
1316
-};
1317
-export 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
-
1328
-export type ClientRequest__ThreadSetNameParams = {
1329
- readonly name: string;
1330
- readonly threadId: string;
1331
-};
1332
-export const ClientRequest__ThreadSetNameParams = Schema.Struct({
1333
- name: Schema.String,
1334
- threadId: Schema.String,
1335
-});
1336
-
1337
-export type ClientRequest__ThreadShellCommandParams = {
1338
- readonly command: string;
1339
- readonly threadId: string;
1340
-};
1341
-export 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
-
1349
-export type ClientRequest__ThreadSortKey = "created_at" | "updated_at" | "recency_at";
1350
-export const ClientRequest__ThreadSortKey = Schema.Literals([
1351
- "created_at",
1352
- "updated_at",
1353
- "recency_at",
1354
-]);
1355
-
1356
-export type ClientRequest__ThreadSource = string;
1357
-export const ClientRequest__ThreadSource = Schema.String;
1358
-
1359
-export type ClientRequest__ThreadSourceKind =
1360
- | "cli"
1361
- | "vscode"
1362
- | "exec"
1363
- | "appServer"
1364
- | "subAgent"
1365
- | "subAgentReview"
1366
- | "subAgentCompact"
1367
- | "subAgentThreadSpawn"
1368
- | "subAgentOther"
1369
- | "unknown";
1370
-export 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
-
1383
-export type ClientRequest__ThreadStartSource = "startup" | "clear";
1384
-export const ClientRequest__ThreadStartSource = Schema.Literals(["startup", "clear"]);
1385
-
1386
-export type ClientRequest__ThreadUnarchiveParams = { readonly threadId: string };
1387
-export const ClientRequest__ThreadUnarchiveParams = Schema.Struct({ threadId: Schema.String });
1388
-
1389
-export type ClientRequest__ThreadUnsubscribeParams = { readonly threadId: string };
1390
-export const ClientRequest__ThreadUnsubscribeParams = Schema.Struct({ threadId: Schema.String });
1391
-
1392
-export type ClientRequest__TurnInterruptParams = {
1393
- readonly threadId: string;
1394
- readonly turnId: string;
1395
-};
1396
-export const ClientRequest__TurnInterruptParams = Schema.Struct({
1397
- threadId: Schema.String,
1398
- turnId: Schema.String,
1399
-});
1400
-
1401
-export type ClientRequest__TurnItemsView = "notLoaded" | "summary" | "full";
1402
-export const ClientRequest__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]);
1403
-
1404
-export type ClientRequest__WindowsSandboxSetupMode = "elevated" | "unelevated";
1405
-export const ClientRequest__WindowsSandboxSetupMode = Schema.Literals(["elevated", "unelevated"]);
1406
-
1407
-export type CommandExecutionRequestApprovalParams__AbsolutePathBuf = string;
1408
-export 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
-
1413
-export type CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = {
1414
- readonly enabled?: boolean | null;
1415
-};
1416
-export const CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
1417
- enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1418
-});
1419
-
1420
-export type CommandExecutionRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
1421
-export const CommandExecutionRequestApprovalParams__FileSystemAccessMode = Schema.Literals([
1422
- "read",
1423
- "write",
1424
- "deny",
1425
-]);
1426
-
1472
export type CommandExecutionRequestApprovalParams__LegacyAppPathString = string;
1428
-export const CommandExecutionRequestApprovalParams__LegacyAppPathString = Schema.String;
1473
+export const CommandExecutionRequestApprovalParams__LegacyAppPathString = Schema.String.annotate({
1474
+ identifier: "CommandExecutionRequestApprovalParams__LegacyAppPathString",
1475
+});
1476
1477
export type CommandExecutionRequestApprovalParams__NetworkApprovalProtocol =
1478
| "http"
@@ -1437,19 +1484,33 @@ export const CommandExecutionRequestApprovalParams__NetworkApprovalProtocol = Sc
1484
"https",
1485
"socks5Tcp",
1486
"socks5Udp",
1440
-]);
1487
+]).annotate({ identifier: "CommandExecutionRequestApprovalParams__NetworkApprovalProtocol" });
1488
1489
export type CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction = "allow" | "deny";
1490
export const CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction = Schema.Literals([
1491
"allow",
1492
"deny",
1446
-]);
1493
+]).annotate({ identifier: "CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction" });
1494
+
1495
+export type CommandExecutionRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
1496
+export const CommandExecutionRequestApprovalParams__FileSystemAccessMode = Schema.Literals([
1497
+ "read",
1498
+ "write",
1499
+ "deny",
1500
+]).annotate({ identifier: "CommandExecutionRequestApprovalParams__FileSystemAccessMode" });
1501
+
1502
+export type CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = {
1503
+ readonly enabled?: boolean | null;
1504
+};
1505
+export const CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
1506
+ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1507
+}).annotate({ identifier: "CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions" });
1508
1509
export type CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";
1510
export const CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([
1511
"allow",
1512
"deny",
1452
-]);
1513
+]).annotate({ identifier: "CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction" });
1514
1515
export type DynamicToolCallResponse__DynamicToolCallOutputContentItem =
1516
| { readonly text: string; readonly type: "inputText" }
@@ -1477,7 +1538,12 @@ export const DynamicToolCallResponse__DynamicToolCallOutputContentItem = Schema.
1538
}).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
1539
],
1540
{ mode: "oneOf" },
1480
-);
1541
+).annotate({ identifier: "DynamicToolCallResponse__DynamicToolCallOutputContentItem" });
1542
+
1543
+export type ExecCommandApprovalParams__ThreadId = string;
1544
+export const ExecCommandApprovalParams__ThreadId = Schema.String.annotate({
1545
+ identifier: "ExecCommandApprovalParams__ThreadId",
1546
+});
1547
1548
export type ExecCommandApprovalParams__ParsedCommand =
1549
| { readonly cmd: string; readonly name: string; readonly path: string; readonly type: "read" }
@@ -1517,34 +1583,41 @@ export const ExecCommandApprovalParams__ParsedCommand = Schema.Union(
1583
}).annotate({ title: "UnknownParsedCommand" }),
1584
],
1585
{ mode: "oneOf" },
1520
-);
1521
-
1522
-export type ExecCommandApprovalParams__ThreadId = string;
1523
-export const ExecCommandApprovalParams__ThreadId = Schema.String;
1586
+).annotate({ identifier: "ExecCommandApprovalParams__ParsedCommand" });
1587
1588
export type ExecCommandApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";
1589
export const ExecCommandApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([
1590
"allow",
1591
"deny",
1529
-]);
1592
+]).annotate({ identifier: "ExecCommandApprovalResponse__NetworkPolicyRuleAction" });
1593
1594
export type FileChangeRequestApprovalResponse__FileChangeApprovalDecision =
1595
| "accept"
1596
| "acceptForSession"
1597
| "decline"
1598
| "cancel";
1536
-export const FileChangeRequestApprovalResponse__FileChangeApprovalDecision = Schema.Literals([
1537
- "accept",
1538
- "acceptForSession",
1539
- "decline",
1540
- "cancel",
1541
-]);
1599
+export 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" });
1615
1616
export type FuzzyFileSearchResponse__FuzzyFileSearchMatchType = "file" | "directory";
1617
export const FuzzyFileSearchResponse__FuzzyFileSearchMatchType = Schema.Literals([
1618
"file",
1619
"directory",
1547
-]);
1620
+]).annotate({ identifier: "FuzzyFileSearchResponse__FuzzyFileSearchMatchType" });
1621
1622
export type FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType =
1623
| "file"
@@ -1552,50 +1625,36 @@ export type FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType
1625
export const FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType = Schema.Literals([
1626
"file",
1627
"directory",
1555
-]);
1628
+]).annotate({ identifier: "FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType" });
1629
1630
export type JSONRPCError__JSONRPCErrorError = {
1631
readonly code: number;
1559
- readonly data?: unknown;
1632
+ readonly data?: Schema.Json;
1633
readonly message: string;
1634
};
1635
export 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" })),
1640
message: Schema.String,
1566
-});
1641
+}).annotate({ identifier: "JSONRPCError__JSONRPCErrorError" });
1642
1643
export type JSONRPCError__RequestId = string | number;
1644
export const JSONRPCError__RequestId = Schema.Union([
1645
Schema.String,
1571
- Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
1572
-]);
1573
-
1574
-export type JSONRPCMessage__JSONRPCErrorError = {
1575
- readonly code: number;
1576
- readonly data?: unknown;
1577
- readonly message: string;
1578
-};
1579
-export 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
-
1585
-export type JSONRPCMessage__JSONRPCNotification = {
1586
- readonly method: string;
1587
- readonly params?: unknown;
1588
-};
1589
-export 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" });
1650
1651
export type JSONRPCMessage__RequestId = string | number;
1652
export const JSONRPCMessage__RequestId = Schema.Union([
1653
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" });
1658
1659
export type JSONRPCMessage__W3cTraceContext = {
1660
readonly traceparent?: string | null;
@@ -1604,13 +1663,40 @@ export type JSONRPCMessage__W3cTraceContext = {
1663
export const JSONRPCMessage__W3cTraceContext = Schema.Struct({
1664
traceparent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1665
tracestate: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1666
+}).annotate({ identifier: "JSONRPCMessage__W3cTraceContext" });
1667
+
1668
+export type JSONRPCMessage__JSONRPCNotification = {
1669
+ readonly method: string;
1670
+ readonly params?: Schema.Json;
1671
+};
1672
+export 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",
1678
});
1679
1680
+export type JSONRPCMessage__JSONRPCErrorError = {
1681
+ readonly code: number;
1682
+ readonly data?: Schema.Json;
1683
+ readonly message: string;
1684
+};
1685
+export 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
+
1693
export type JSONRPCRequest__RequestId = string | number;
1694
export const JSONRPCRequest__RequestId = Schema.Union([
1695
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" });
1700
1701
export type JSONRPCRequest__W3cTraceContext = {
1702
readonly traceparent?: string | null;
@@ -1619,20 +1705,20 @@ export type JSONRPCRequest__W3cTraceContext = {
1705
export const JSONRPCRequest__W3cTraceContext = Schema.Struct({
1706
traceparent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1707
tracestate: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1622
-});
1708
+}).annotate({ identifier: "JSONRPCRequest__W3cTraceContext" });
1709
1710
export type JSONRPCResponse__RequestId = string | number;
1711
export const JSONRPCResponse__RequestId = Schema.Union([
1712
Schema.String,
1627
- Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
1628
-]);
1629
-
1630
-export type McpServerElicitationRequestParams__McpElicitationArrayType = "array";
1631
-export 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" });
1717
1633
-export type McpServerElicitationRequestParams__McpElicitationBooleanType = "boolean";
1634
-export const McpServerElicitationRequestParams__McpElicitationBooleanType =
1635
- Schema.Literal("boolean");
1718
+export type McpServerElicitationRequestParams__McpElicitationStringType = "string";
1719
+export const McpServerElicitationRequestParams__McpElicitationStringType = Schema.Literal(
1720
+ "string",
1721
+).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationStringType" });
1722
1723
export type McpServerElicitationRequestParams__McpElicitationConstOption = {
1724
readonly const: string;
@@ -1641,16 +1727,12 @@ export type McpServerElicitationRequestParams__McpElicitationConstOption = {
1727
export const McpServerElicitationRequestParams__McpElicitationConstOption = Schema.Struct({
1728
const: Schema.String,
1729
title: Schema.String,
1644
-});
1645
-
1646
-export type McpServerElicitationRequestParams__McpElicitationNumberType = "number" | "integer";
1647
-export const McpServerElicitationRequestParams__McpElicitationNumberType = Schema.Literals([
1648
- "number",
1649
- "integer",
1650
-]);
1730
+}).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationConstOption" });
1731
1652
-export type McpServerElicitationRequestParams__McpElicitationObjectType = "object";
1653
-export const McpServerElicitationRequestParams__McpElicitationObjectType = Schema.Literal("object");
1732
+export type McpServerElicitationRequestParams__McpElicitationArrayType = "array";
1733
+export const McpServerElicitationRequestParams__McpElicitationArrayType = Schema.Literal(
1734
+ "array",
1735
+).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationArrayType" });
1736
1737
export type McpServerElicitationRequestParams__McpElicitationStringFormat =
1738
| "email"
@@ -1662,10 +1744,23 @@ export const McpServerElicitationRequestParams__McpElicitationStringFormat = Sch
1744
"uri",
1745
"date",
1746
"date-time",
1665
-]);
1747
+]).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationStringFormat" });
1748
1667
-export type McpServerElicitationRequestParams__McpElicitationStringType = "string";
1668
-export const McpServerElicitationRequestParams__McpElicitationStringType = Schema.Literal("string");
1749
+export type McpServerElicitationRequestParams__McpElicitationNumberType = "number" | "integer";
1750
+export const McpServerElicitationRequestParams__McpElicitationNumberType = Schema.Literals([
1751
+ "number",
1752
+ "integer",
1753
+]).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationNumberType" });
1754
+
1755
+export type McpServerElicitationRequestParams__McpElicitationBooleanType = "boolean";
1756
+export const McpServerElicitationRequestParams__McpElicitationBooleanType = Schema.Literal(
1757
+ "boolean",
1758
+).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationBooleanType" });
1759
+
1760
+export type McpServerElicitationRequestParams__McpElicitationObjectType = "object";
1761
+export const McpServerElicitationRequestParams__McpElicitationObjectType = Schema.Literal(
1762
+ "object",
1763
+).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationObjectType" });
1764
1765
export type McpServerElicitationRequestResponse__McpServerElicitationAction =
1766
| "accept"
@@ -1675,19 +1770,13 @@ export const McpServerElicitationRequestResponse__McpServerElicitationAction = S
1770
"accept",
1771
"decline",
1772
"cancel",
1678
-]);
1773
+]).annotate({ identifier: "McpServerElicitationRequestResponse__McpServerElicitationAction" });
1774
1775
export type PermissionsRequestApprovalParams__AbsolutePathBuf = string;
1776
export const PermissionsRequestApprovalParams__AbsolutePathBuf = Schema.String.annotate({
1777
description:
1778
"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
-
1686
-export type PermissionsRequestApprovalParams__AdditionalNetworkPermissions = {
1687
- readonly enabled?: boolean | null;
1688
-};
1689
-export const PermissionsRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
1690
- enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1779
+ identifier: "PermissionsRequestApprovalParams__AbsolutePathBuf",
1780
});
1781
1782
export type PermissionsRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
@@ -1695,283 +1784,258 @@ export const PermissionsRequestApprovalParams__FileSystemAccessMode = Schema.Lit
1784
"read",
1785
"write",
1786
"deny",
1698
-]);
1787
+]).annotate({ identifier: "PermissionsRequestApprovalParams__FileSystemAccessMode" });
1788
1789
export type PermissionsRequestApprovalParams__LegacyAppPathString = string;
1701
-export const PermissionsRequestApprovalParams__LegacyAppPathString = Schema.String;
1790
+export const PermissionsRequestApprovalParams__LegacyAppPathString = Schema.String.annotate({
1791
+ identifier: "PermissionsRequestApprovalParams__LegacyAppPathString",
1792
+});
1793
1703
-export type PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = {
1794
+export type PermissionsRequestApprovalParams__AdditionalNetworkPermissions = {
1795
readonly enabled?: boolean | null;
1796
};
1706
-export const PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = Schema.Struct({
1797
+export const PermissionsRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
1798
enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1708
-});
1799
+}).annotate({ identifier: "PermissionsRequestApprovalParams__AdditionalNetworkPermissions" });
1800
1801
export type PermissionsRequestApprovalResponse__FileSystemAccessMode = "read" | "write" | "deny";
1802
export const PermissionsRequestApprovalResponse__FileSystemAccessMode = Schema.Literals([
1803
"read",
1804
"write",
1805
"deny",
1715
-]);
1806
+]).annotate({ identifier: "PermissionsRequestApprovalResponse__FileSystemAccessMode" });
1807
1808
export type PermissionsRequestApprovalResponse__LegacyAppPathString = string;
1718
-export const PermissionsRequestApprovalResponse__LegacyAppPathString = Schema.String;
1809
+export const PermissionsRequestApprovalResponse__LegacyAppPathString = Schema.String.annotate({
1810
+ identifier: "PermissionsRequestApprovalResponse__LegacyAppPathString",
1811
+});
1812
+
1813
+export type PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = {
1814
+ readonly enabled?: boolean | null;
1815
+};
1816
+export const PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = Schema.Struct({
1817
+ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1818
+}).annotate({ identifier: "PermissionsRequestApprovalResponse__AdditionalNetworkPermissions" });
1819
+
1820
+export type PermissionsRequestApprovalResponse__PermissionGrantScope = "turn" | "session";
1821
+export const PermissionsRequestApprovalResponse__PermissionGrantScope = Schema.Literals([
1822
+ "turn",
1823
+ "session",
1824
+]).annotate({ identifier: "PermissionsRequestApprovalResponse__PermissionGrantScope" });
1825
+
1826
+export type ServerNotification__NonSteerableTurnKind = "review" | "compact";
1827
+export const ServerNotification__NonSteerableTurnKind = Schema.Literals([
1828
+ "review",
1829
+ "compact",
1830
+]).annotate({ identifier: "ServerNotification__NonSteerableTurnKind" });
1831
1832
export type ServerNotification__AbsolutePathBuf = string;
1833
export const ServerNotification__AbsolutePathBuf = Schema.String.annotate({
1834
description:
1835
"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",
1837
});
1838
1726
-export type ServerNotification__AccountLoginCompletedNotification = {
1727
- readonly error?: string | null;
1728
- readonly loginId?: string | null;
1729
- readonly success: boolean;
1839
+export type ServerNotification__GitInfo = {
1840
+ readonly branch?: string | null;
1841
+ readonly originUrl?: string | null;
1842
+ readonly sha?: string | null;
1843
};
1731
-export 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
-});
1844
+export 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" });
1849
1737
-export type ServerNotification__ActivePermissionProfile = {
1738
- readonly extends?: string | null;
1739
- readonly id: string;
1740
-};
1741
-export 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
- }),
1850
+export type ServerNotification__AgentPath = string;
1851
+export const ServerNotification__AgentPath = Schema.String.annotate({
1852
+ identifier: "ServerNotification__AgentPath",
1853
});
1854
1757
-export type ServerNotification__AdditionalNetworkPermissions = {
1758
- readonly enabled?: boolean | null;
1759
-};
1760
-export const ServerNotification__AdditionalNetworkPermissions = Schema.Struct({
1761
- enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1855
+export type ServerNotification__ThreadId = string;
1856
+export const ServerNotification__ThreadId = Schema.String.annotate({
1857
+ identifier: "ServerNotification__ThreadId",
1858
});
1859
1764
-export type ServerNotification__AgentMessageDeltaNotification = {
1765
- readonly delta: string;
1766
- readonly itemId: string;
1767
- readonly threadId: string;
1768
- readonly turnId: string;
1769
-};
1770
-export const ServerNotification__AgentMessageDeltaNotification = Schema.Struct({
1771
- delta: Schema.String,
1772
- itemId: Schema.String,
1773
- threadId: Schema.String,
1774
- turnId: Schema.String,
1860
+export type ServerNotification__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
1861
+export const ServerNotification__ThreadActiveFlag = Schema.Literals([
1862
+ "waitingOnApproval",
1863
+ "waitingOnUserInput",
1864
+]).annotate({ identifier: "ServerNotification__ThreadActiveFlag" });
1865
+
1866
+export type ServerNotification__ThreadSource = string;
1867
+export const ServerNotification__ThreadSource = Schema.String.annotate({
1868
+ identifier: "ServerNotification__ThreadSource",
1869
});
1870
1777
-export type ServerNotification__AgentPath = string;
1778
-export const ServerNotification__AgentPath = Schema.String;
1871
+export type ServerNotification__ByteRange = { readonly end: number; readonly start: number };
1872
+export 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" });
1884
1780
-export 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
-};
1788
-export 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." });
1885
+export type ServerNotification__ImageDetail = "auto" | "low" | "high" | "original";
1886
+export const ServerNotification__ImageDetail = Schema.Literals([
1887
+ "auto",
1888
+ "low",
1889
+ "high",
1890
+ "original",
1891
+]).annotate({ identifier: "ServerNotification__ImageDetail" });
1892
1797
-export type ServerNotification__AppReview = { readonly status: string };
1798
-export const ServerNotification__AppReview = Schema.Struct({ status: Schema.String });
1893
+export type ServerNotification__HookPromptFragment = {
1894
+ readonly hookRunId: string;
1895
+ readonly text: string;
1896
+};
1897
+export const ServerNotification__HookPromptFragment = Schema.Struct({
1898
+ hookRunId: Schema.String,
1899
+ text: Schema.String,
1900
+}).annotate({ identifier: "ServerNotification__HookPromptFragment" });
1901
1800
-export type ServerNotification__AppScreenshot = {
1801
- readonly fileId?: string | null;
1802
- readonly url?: string | null;
1803
- readonly userPrompt: string;
1902
+export type ServerNotification__MemoryCitationEntry = {
1903
+ readonly lineEnd: number;
1904
+ readonly lineStart: number;
1905
+ readonly note: string;
1906
+ readonly path: string;
1907
};
1805
-export 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
-});
1908
+export 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" });
1922
1811
-export type ServerNotification__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
1812
-export const ServerNotification__ApprovalsReviewer = Schema.Literals([
1813
- "user",
1814
- "auto_review",
1815
- "guardian_subagent",
1816
-]).annotate({
1923
+export type ServerNotification__MessagePhase = "commentary" | "final_answer";
1924
+export 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({
1936
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",
1939
});
1940
1821
-export 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
- };
1834
-export 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
-
1850
-export type ServerNotification__AuthMode =
1851
- | "apikey"
1852
- | "chatgpt"
1853
- | "chatgptAuthTokens"
1854
- | "headers"
1855
- | "agentIdentity"
1856
- | "personalAccessToken"
1857
- | "bedrockApiKey";
1858
-export 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
-
1868
-export type ServerNotification__AutoReviewDecisionSource = "agent";
1869
-export const ServerNotification__AutoReviewDecisionSource = Schema.Literal("agent").annotate({
1870
- description: "[UNSTABLE] Source that produced a terminal approval auto-review decision.",
1941
+export type ServerNotification__LegacyAppPathString = string;
1942
+export const ServerNotification__LegacyAppPathString = Schema.String.annotate({
1943
+ identifier: "ServerNotification__LegacyAppPathString",
1944
});
1945
1873
-export type ServerNotification__CollabAgentStatus =
1874
- | "pendingInit"
1875
- | "running"
1876
- | "interrupted"
1946
+export type ServerNotification__CommandExecutionSource =
1947
+ | "agent"
1948
+ | "userShell"
1949
+ | "unifiedExecStartup"
1950
+ | "unifiedExecInteraction";
1951
+export const ServerNotification__CommandExecutionSource = Schema.Literals([
1952
+ "agent",
1953
+ "userShell",
1954
+ "unifiedExecStartup",
1955
+ "unifiedExecInteraction",
1956
+]).annotate({ identifier: "ServerNotification__CommandExecutionSource" });
1957
+
1958
+export type ServerNotification__CommandExecutionStatus =
1959
+ | "inProgress"
1960
| "completed"
1878
- | "errored"
1879
- | "shutdown"
1880
- | "notFound";
1881
-export const ServerNotification__CollabAgentStatus = Schema.Literals([
1882
- "pendingInit",
1883
- "running",
1884
- "interrupted",
1961
+ | "failed"
1962
+ | "declined";
1963
+export const ServerNotification__CommandExecutionStatus = Schema.Literals([
1964
+ "inProgress",
1965
"completed",
1886
- "errored",
1887
- "shutdown",
1888
- "notFound",
1889
-]);
1890
-
1891
-export type ServerNotification__CommandExecOutputDeltaNotification = {
1892
- readonly capReached: boolean;
1893
- readonly deltaBase64: string;
1894
- readonly processId: string;
1895
- readonly stream: "stdout" | "stderr";
1896
-};
1897
-export 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" });
1969
1915
-export type ServerNotification__CommandExecutionOutputDeltaNotification = {
1916
- readonly delta: string;
1917
- readonly itemId: string;
1918
- readonly threadId: string;
1919
- readonly turnId: string;
1920
-};
1921
-export const ServerNotification__CommandExecutionOutputDeltaNotification = Schema.Struct({
1922
- delta: Schema.String,
1923
- itemId: Schema.String,
1924
- threadId: Schema.String,
1925
- turnId: Schema.String,
1926
-});
1970
+export type ServerNotification__PatchChangeKind =
1971
+ | { readonly type: "add" }
1972
+ | { readonly type: "delete" }
1973
+ | { readonly move_path?: string | null; readonly type: "update" };
1974
+export 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" });
1989
1928
-export type ServerNotification__CommandExecutionStatus =
1990
+export type ServerNotification__PatchApplyStatus =
1991
| "inProgress"
1992
| "completed"
1993
| "failed"
1994
| "declined";
1933
-export const ServerNotification__CommandExecutionStatus = Schema.Literals([
1995
+export const ServerNotification__PatchApplyStatus = Schema.Literals([
1996
"inProgress",
1997
"completed",
1998
"failed",
1999
"declined",
1938
-]);
2000
+]).annotate({ identifier: "ServerNotification__PatchApplyStatus" });
2001
1940
-export type ServerNotification__ContextCompactedNotification = {
1941
- readonly threadId: string;
1942
- readonly turnId: string;
2002
+export 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;
2008
};
1944
-export const ServerNotification__ContextCompactedNotification = Schema.Struct({
1945
- threadId: Schema.String,
1946
- turnId: Schema.String,
1947
-}).annotate({ description: "Deprecated: Use `ContextCompaction` item type instead." });
2009
+export 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" });
2016
1949
-export type ServerNotification__CreditsSnapshot = {
1950
- readonly balance?: string | null;
1951
- readonly hasCredits: boolean;
1952
- readonly unlimited: boolean;
1953
-};
1954
-export const ServerNotification__CreditsSnapshot = Schema.Struct({
1955
- balance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1956
- hasCredits: Schema.Boolean,
1957
- unlimited: Schema.Boolean,
1958
-});
2017
+export type ServerNotification__McpToolCallError = { readonly message: string };
2018
+export const ServerNotification__McpToolCallError = Schema.Struct({
2019
+ message: Schema.String,
2020
+}).annotate({ identifier: "ServerNotification__McpToolCallError" });
2021
1960
-export type ServerNotification__DeprecationNoticeNotification = {
1961
- readonly details?: string | null;
1962
- readonly summary: string;
2022
+export type ServerNotification__McpToolCallResult = {
2023
+ readonly _meta?: Schema.Json;
2024
+ readonly content: ReadonlyArray<Schema.Json>;
2025
+ readonly structuredContent?: Schema.Json;
2026
};
1964
-export 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
-});
2027
+export 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
+
2033
+export type ServerNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
2034
+export const ServerNotification__McpToolCallStatus = Schema.Literals([
2035
+ "inProgress",
2036
+ "completed",
2037
+ "failed",
2038
+]).annotate({ identifier: "ServerNotification__McpToolCallStatus" });
2039
2040
export type ServerNotification__DynamicToolCallOutputContentItem =
2041
| { readonly text: string; readonly type: "inputText" }
@@ -1999,344 +2063,462 @@ export const ServerNotification__DynamicToolCallOutputContentItem = Schema.Union
2063
}).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
2064
],
2065
{ mode: "oneOf" },
2002
-);
2066
+).annotate({ identifier: "ServerNotification__DynamicToolCallOutputContentItem" });
2067
2068
export type ServerNotification__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
2069
export const ServerNotification__DynamicToolCallStatus = Schema.Literals([
2070
"inProgress",
2071
"completed",
2072
"failed",
2009
-]);
2073
+]).annotate({ identifier: "ServerNotification__DynamicToolCallStatus" });
2074
2011
-export type ServerNotification__EnvironmentConnectionNotification = {
2012
- readonly environmentId: string;
2013
- readonly threadId: string;
2014
-};
2015
-export const ServerNotification__EnvironmentConnectionNotification = Schema.Struct({
2016
- environmentId: Schema.String,
2017
- threadId: Schema.String,
2018
-});
2075
+export type ServerNotification__CollabAgentStatus =
2076
+ | "pendingInit"
2077
+ | "running"
2078
+ | "interrupted"
2079
+ | "completed"
2080
+ | "errored"
2081
+ | "shutdown"
2082
+ | "notFound";
2083
+export const ServerNotification__CollabAgentStatus = Schema.Literals([
2084
+ "pendingInit",
2085
+ "running",
2086
+ "interrupted",
2087
+ "completed",
2088
+ "errored",
2089
+ "shutdown",
2090
+ "notFound",
2091
+]).annotate({ identifier: "ServerNotification__CollabAgentStatus" });
2092
2020
-export 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";
2031
-export 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
-]);
2093
+export type ServerNotification__ReasoningEffort = string;
2094
+export 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
+);
2102
2044
-export type ServerNotification__FileChangeOutputDeltaNotification = {
2045
- readonly delta: string;
2046
- readonly itemId: string;
2047
- readonly threadId: string;
2048
- readonly turnId: string;
2049
-};
2050
-export 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
-});
2103
+export type ServerNotification__CollabAgentToolCallStatus =
2104
+ | "inProgress"
2105
+ | "completed"
2106
+ | "failed"
2107
+ | "interrupted";
2108
+export const ServerNotification__CollabAgentToolCallStatus = Schema.Literals([
2109
+ "inProgress",
2110
+ "completed",
2111
+ "failed",
2112
+ "interrupted",
2113
+]).annotate({ identifier: "ServerNotification__CollabAgentToolCallStatus" });
2114
2060
-export type ServerNotification__FileSystemAccessMode = "read" | "write" | "deny";
2061
-export const ServerNotification__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]);
2115
+export type ServerNotification__CollabAgentTool =
2116
+ | "spawnAgent"
2117
+ | "sendInput"
2118
+ | "resumeAgent"
2119
+ | "wait"
2120
+ | "closeAgent"
2121
+ | "sendMessage"
2122
+ | "followupTask"
2123
+ | "interruptAgent"
2124
+ | "listAgents";
2125
+export 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" });
2136
2063
-export type ServerNotification__FuzzyFileSearchMatchType = "file" | "directory";
2064
-export const ServerNotification__FuzzyFileSearchMatchType = Schema.Literals(["file", "directory"]);
2137
+export type ServerNotification__SubAgentActivityKind =
2138
+ | "started"
2139
+ | "interacted"
2140
+ | "interrupted"
2141
+ | "completed";
2142
+export const ServerNotification__SubAgentActivityKind = Schema.Literals([
2143
+ "started",
2144
+ "interacted",
2145
+ "interrupted",
2146
+ "completed",
2147
+]).annotate({ identifier: "ServerNotification__SubAgentActivityKind" });
2148
2066
-export type ServerNotification__FuzzyFileSearchSessionCompletedNotification = {
2067
- readonly sessionId: string;
2068
-};
2069
-export const ServerNotification__FuzzyFileSearchSessionCompletedNotification = Schema.Struct({
2070
- sessionId: Schema.String,
2071
-});
2149
+export 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" };
2158
+export 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" });
2180
2073
-export type ServerNotification__GitInfo = {
2074
- readonly branch?: string | null;
2075
- readonly originUrl?: string | null;
2076
- readonly sha?: string | null;
2077
-};
2078
-export 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
-});
2181
+export type ServerNotification__TurnItemsView = "notLoaded" | "summary" | "full";
2182
+export 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" });
2197
2084
-export type ServerNotification__GuardianApprovalReviewStatus =
2085
- | "inProgress"
2086
- | "approved"
2087
- | "denied"
2088
- | "timedOut"
2089
- | "aborted";
2090
-export const ServerNotification__GuardianApprovalReviewStatus = Schema.Literals([
2198
+export type ServerNotification__TurnStatus = "completed" | "interrupted" | "failed" | "inProgress";
2199
+export const ServerNotification__TurnStatus = Schema.Literals([
2200
+ "completed",
2201
+ "interrupted",
2202
+ "failed",
2203
"inProgress",
2092
- "approved",
2093
- "denied",
2094
- "timedOut",
2095
- "aborted",
2096
-]).annotate({ description: "[UNSTABLE] Lifecycle state for an approval auto-review." });
2097
-
2098
-export type ServerNotification__GuardianCommandSource = "shell" | "unifiedExec";
2099
-export const ServerNotification__GuardianCommandSource = Schema.Literals(["shell", "unifiedExec"]);
2100
-
2101
-export type ServerNotification__GuardianRiskLevel = "low" | "medium" | "high" | "critical";
2102
-export 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" });
2205
2109
-export type ServerNotification__GuardianUserAuthorization = "unknown" | "low" | "medium" | "high";
2110
-export 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
-
2117
-export type ServerNotification__GuardianWarningNotification = {
2118
- readonly message: string;
2119
- readonly threadId: string;
2120
-};
2121
-export 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
-});
2206
+export type ServerNotification__ThreadArchivedNotification = { readonly threadId: string };
2207
+export const ServerNotification__ThreadArchivedNotification = Schema.Struct({
2208
+ threadId: Schema.String,
2209
+}).annotate({ identifier: "ServerNotification__ThreadArchivedNotification" });
2210
2128
-export 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";
2140
-export 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
-]);
2211
+export type ServerNotification__ThreadDeletedNotification = { readonly threadId: string };
2212
+export const ServerNotification__ThreadDeletedNotification = Schema.Struct({
2213
+ threadId: Schema.String,
2214
+}).annotate({ identifier: "ServerNotification__ThreadDeletedNotification" });
2215
2154
-export type ServerNotification__HookExecutionMode = "sync" | "async";
2155
-export const ServerNotification__HookExecutionMode = Schema.Literals(["sync", "async"]);
2216
+export type ServerNotification__ThreadUnarchivedNotification = { readonly threadId: string };
2217
+export const ServerNotification__ThreadUnarchivedNotification = Schema.Struct({
2218
+ threadId: Schema.String,
2219
+}).annotate({ identifier: "ServerNotification__ThreadUnarchivedNotification" });
2220
2157
-export type ServerNotification__HookHandlerType = "command" | "prompt" | "agent";
2158
-export const ServerNotification__HookHandlerType = Schema.Literals(["command", "prompt", "agent"]);
2221
+export type ServerNotification__ThreadClosedNotification = { readonly threadId: string };
2222
+export const ServerNotification__ThreadClosedNotification = Schema.Struct({
2223
+ threadId: Schema.String,
2224
+}).annotate({ identifier: "ServerNotification__ThreadClosedNotification" });
2225
2160
-export type ServerNotification__HookOutputEntryKind =
2161
- | "warning"
2162
- | "stop"
2163
- | "feedback"
2164
- | "context"
2165
- | "error";
2166
-export const ServerNotification__HookOutputEntryKind = Schema.Literals([
2167
- "warning",
2168
- "stop",
2169
- "feedback",
2170
- "context",
2171
- "error",
2172
-]);
2226
+export type ServerNotification__SkillsChangedNotification = { readonly [x: string]: Schema.Json };
2227
+export 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
+});
2235
2174
-export type ServerNotification__HookPromptFragment = {
2175
- readonly hookRunId: string;
2176
- readonly text: string;
2236
+export type ServerNotification__ThreadNameUpdatedNotification = {
2237
+ readonly threadId: string;
2238
+ readonly threadName?: string | null;
2239
};
2178
-export const ServerNotification__HookPromptFragment = Schema.Struct({
2179
- hookRunId: Schema.String,
2180
- text: Schema.String,
2181
-});
2240
+export const ServerNotification__ThreadNameUpdatedNotification = Schema.Struct({
2241
+ threadId: Schema.String,
2242
+ threadName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2243
+}).annotate({ identifier: "ServerNotification__ThreadNameUpdatedNotification" });
2244
2183
-export type ServerNotification__HookRunStatus =
2184
- | "running"
2185
- | "completed"
2186
- | "failed"
2245
+export type ServerNotification__ThreadGoalStatus =
2246
+ | "active"
2247
+ | "paused"
2248
| "blocked"
2188
- | "stopped";
2189
-export const ServerNotification__HookRunStatus = Schema.Literals([
2190
- "running",
2191
- "completed",
2192
- "failed",
2249
+ | "usageLimited"
2250
+ | "budgetLimited"
2251
+ | "complete";
2252
+export const ServerNotification__ThreadGoalStatus = Schema.Literals([
2253
+ "active",
2254
+ "paused",
2255
"blocked",
2194
- "stopped",
2195
-]);
2196
-
2197
-export type ServerNotification__HookScope = "thread" | "turn";
2198
-export const ServerNotification__HookScope = Schema.Literals(["thread", "turn"]);
2199
-
2200
-export type ServerNotification__ImageDetail = "auto" | "low" | "high" | "original";
2201
-export const ServerNotification__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
2256
+ "usageLimited",
2257
+ "budgetLimited",
2258
+ "complete",
2259
+]).annotate({ identifier: "ServerNotification__ThreadGoalStatus" });
2260
2203
-export type ServerNotification__LegacyAppPathString = string;
2204
-export const ServerNotification__LegacyAppPathString = Schema.String;
2261
+export type ServerNotification__ThreadGoalClearedNotification = { readonly threadId: string };
2262
+export const ServerNotification__ThreadGoalClearedNotification = Schema.Struct({
2263
+ threadId: Schema.String,
2264
+}).annotate({ identifier: "ServerNotification__ThreadGoalClearedNotification" });
2265
2206
-export type ServerNotification__McpServerOauthLoginCompletedNotification = {
2207
- readonly error?: string | null;
2208
- readonly name: string;
2209
- readonly success: boolean;
2210
- readonly threadId?: string | null;
2266
+export type ServerNotification__EnvironmentConnectionNotification = {
2267
+ readonly environmentId: string;
2268
+ readonly threadId: string;
2269
};
2212
-export 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
-});
2270
+export const ServerNotification__EnvironmentConnectionNotification = Schema.Struct({
2271
+ environmentId: Schema.String,
2272
+ threadId: Schema.String,
2273
+}).annotate({ identifier: "ServerNotification__EnvironmentConnectionNotification" });
2274
2219
-export type ServerNotification__McpServerStartupFailureReason = "reauthenticationRequired";
2220
-export const ServerNotification__McpServerStartupFailureReason = Schema.Literal(
2221
- "reauthenticationRequired",
2222
-);
2275
+export type ServerNotification__ActivePermissionProfile = {
2276
+ readonly extends?: string | null;
2277
+ readonly id: string;
2278
+};
2279
+export 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" });
2294
2224
-export type ServerNotification__McpServerStartupState =
2225
- | "starting"
2226
- | "ready"
2227
- | "failed"
2228
- | "cancelled";
2229
-export const ServerNotification__McpServerStartupState = Schema.Literals([
2230
- "starting",
2231
- "ready",
2232
- "failed",
2233
- "cancelled",
2234
-]);
2295
+export 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
+ };
2308
+export 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" });
2323
2236
-export 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
-};
2243
-export 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])),
2324
+export type ServerNotification__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
2325
+export 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",
2333
});
2334
2251
-export type ServerNotification__McpToolCallError = { readonly message: string };
2252
-export const ServerNotification__McpToolCallError = Schema.Struct({ message: Schema.String });
2335
+export type ServerNotification__ModeKind = "plan" | "default";
2336
+export const ServerNotification__ModeKind = Schema.Literals(["plan", "default"]).annotate({
2337
+ description: "Initial collaboration mode to use when the TUI starts.",
2338
+ identifier: "ServerNotification__ModeKind",
2339
+});
2340
2254
-export type ServerNotification__McpToolCallProgressNotification = {
2255
- readonly itemId: string;
2256
- readonly message: string;
2257
- readonly threadId: string;
2258
- readonly turnId: string;
2259
-};
2260
-export const ServerNotification__McpToolCallProgressNotification = Schema.Struct({
2261
- itemId: Schema.String,
2262
- message: Schema.String,
2263
- threadId: Schema.String,
2264
- turnId: Schema.String,
2341
+export type ServerNotification__Personality = "none" | "friendly" | "pragmatic";
2342
+export const ServerNotification__Personality = Schema.Literals([
2343
+ "none",
2344
+ "friendly",
2345
+ "pragmatic",
2346
+]).annotate({ identifier: "ServerNotification__Personality" });
2347
+
2348
+export type ServerNotification__NetworkAccess = "restricted" | "enabled";
2349
+export const ServerNotification__NetworkAccess = Schema.Literals([
2350
+ "restricted",
2351
+ "enabled",
2352
+]).annotate({ identifier: "ServerNotification__NetworkAccess" });
2353
+
2354
+export type ServerNotification__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
2355
+export 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",
2365
});
2366
2267
-export type ServerNotification__McpToolCallResult = {
2268
- readonly _meta?: unknown;
2269
- readonly content: ReadonlyArray<unknown>;
2270
- readonly structuredContent?: unknown;
2367
+export 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;
2374
};
2272
-export const ServerNotification__McpToolCallResult = Schema.Struct({
2273
- _meta: Schema.optionalKey(Schema.Unknown),
2274
- content: Schema.Array(Schema.Unknown),
2275
- structuredContent: Schema.optionalKey(Schema.Unknown),
2276
-});
2375
+export 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" });
2397
2278
-export type ServerNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
2279
-export const ServerNotification__McpToolCallStatus = Schema.Literals([
2280
- "inProgress",
2281
- "completed",
2282
- "failed",
2283
-]);
2398
+export type ServerNotification__HookOutputEntryKind =
2399
+ | "warning"
2400
+ | "stop"
2401
+ | "feedback"
2402
+ | "context"
2403
+ | "error";
2404
+export const ServerNotification__HookOutputEntryKind = Schema.Literals([
2405
+ "warning",
2406
+ "stop",
2407
+ "feedback",
2408
+ "context",
2409
+ "error",
2410
+]).annotate({ identifier: "ServerNotification__HookOutputEntryKind" });
2411
2285
-export type ServerNotification__MemoryCitationEntry = {
2286
- readonly lineEnd: number;
2287
- readonly lineStart: number;
2288
- readonly note: string;
2289
- readonly path: string;
2290
-};
2291
-export 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
-});
2412
+export 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";
2424
+export 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" });
2437
2302
-export type ServerNotification__MessagePhase = "commentary" | "final_answer";
2303
-export 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.',
2438
+export type ServerNotification__HookExecutionMode = "sync" | "async";
2439
+export const ServerNotification__HookExecutionMode = Schema.Literals(["sync", "async"]).annotate({
2440
+ identifier: "ServerNotification__HookExecutionMode",
2441
});
2442
2311
-export type ServerNotification__ModeKind = "plan" | "default";
2312
-export const ServerNotification__ModeKind = Schema.Literals(["plan", "default"]).annotate({
2313
- description: "Initial collaboration mode to use when the TUI starts.",
2443
+export type ServerNotification__HookHandlerType = "command" | "prompt" | "agent";
2444
+export const ServerNotification__HookHandlerType = Schema.Literals([
2445
+ "command",
2446
+ "prompt",
2447
+ "agent",
2448
+]).annotate({ identifier: "ServerNotification__HookHandlerType" });
2449
+
2450
+export type ServerNotification__HookScope = "thread" | "turn";
2451
+export const ServerNotification__HookScope = Schema.Literals(["thread", "turn"]).annotate({
2452
+ identifier: "ServerNotification__HookScope",
2453
});
2454
2316
-export type ServerNotification__ModelRerouteReason = "highRiskCyberActivity";
2317
-export const ServerNotification__ModelRerouteReason = Schema.Literal("highRiskCyberActivity");
2455
+export 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";
2467
+export 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" });
2480
2319
-export type ServerNotification__ModelSafetyBufferingUpdatedNotification = {
2320
- readonly fasterModel?: string | null;
2321
- readonly model: string;
2322
- readonly reasons: ReadonlyArray<string>;
2323
- readonly showBufferingUi: boolean;
2481
+export type ServerNotification__HookRunStatus =
2482
+ | "running"
2483
+ | "completed"
2484
+ | "failed"
2485
+ | "blocked"
2486
+ | "stopped";
2487
+export const ServerNotification__HookRunStatus = Schema.Literals([
2488
+ "running",
2489
+ "completed",
2490
+ "failed",
2491
+ "blocked",
2492
+ "stopped",
2493
+]).annotate({ identifier: "ServerNotification__HookRunStatus" });
2494
+
2495
+export type ServerNotification__TurnDiffUpdatedNotification = {
2496
+ readonly diff: string;
2497
readonly threadId: string;
2498
readonly turnId: string;
2326
- readonly useCases: ReadonlyArray<string>;
2499
};
2328
-export 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,
2500
+export const ServerNotification__TurnDiffUpdatedNotification = Schema.Struct({
2501
+ diff: Schema.String,
2502
threadId: Schema.String,
2503
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",
2508
});
2509
2338
-export type ServerNotification__ModelVerification = "trustedAccessForCyber";
2339
-export const ServerNotification__ModelVerification = Schema.Literal("trustedAccessForCyber");
2510
+export type ServerNotification__TurnPlanStepStatus = "pending" | "inProgress" | "completed";
2511
+export const ServerNotification__TurnPlanStepStatus = Schema.Literals([
2512
+ "pending",
2513
+ "inProgress",
2514
+ "completed",
2515
+]).annotate({ identifier: "ServerNotification__TurnPlanStepStatus" });
2516
+
2517
+export type ServerNotification__GuardianCommandSource = "shell" | "unifiedExec";
2518
+export const ServerNotification__GuardianCommandSource = Schema.Literals([
2519
+ "shell",
2520
+ "unifiedExec",
2521
+]).annotate({ identifier: "ServerNotification__GuardianCommandSource" });
2522
2523
export type ServerNotification__NetworkApprovalProtocol =
2524
| "http"
@@ -2348,45 +2530,79 @@ export const ServerNotification__NetworkApprovalProtocol = Schema.Literals([
2530
"https",
2531
"socks5Tcp",
2532
"socks5Udp",
2351
-]);
2533
+]).annotate({ identifier: "ServerNotification__NetworkApprovalProtocol" });
2534
2353
-export type ServerNotification__NonSteerableTurnKind = "review" | "compact";
2354
-export const ServerNotification__NonSteerableTurnKind = Schema.Literals(["review", "compact"]);
2535
+export type ServerNotification__FileSystemAccessMode = "read" | "write" | "deny";
2536
+export const ServerNotification__FileSystemAccessMode = Schema.Literals([
2537
+ "read",
2538
+ "write",
2539
+ "deny",
2540
+]).annotate({ identifier: "ServerNotification__FileSystemAccessMode" });
2541
2356
-export type ServerNotification__PatchApplyStatus =
2542
+export type ServerNotification__AdditionalNetworkPermissions = {
2543
+ readonly enabled?: boolean | null;
2544
+};
2545
+export const ServerNotification__AdditionalNetworkPermissions = Schema.Struct({
2546
+ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2547
+}).annotate({ identifier: "ServerNotification__AdditionalNetworkPermissions" });
2548
+
2549
+export type ServerNotification__GuardianRiskLevel = "low" | "medium" | "high" | "critical";
2550
+export 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
+
2560
+export type ServerNotification__GuardianApprovalReviewStatus =
2561
| "inProgress"
2358
- | "completed"
2359
- | "failed"
2360
- | "declined";
2361
-export const ServerNotification__PatchApplyStatus = Schema.Literals([
2562
+ | "approved"
2563
+ | "denied"
2564
+ | "timedOut"
2565
+ | "aborted";
2566
+export const ServerNotification__GuardianApprovalReviewStatus = Schema.Literals([
2567
"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
+});
2576
2368
-export type ServerNotification__PatchChangeKind =
2369
- | { readonly type: "add" }
2370
- | { readonly type: "delete" }
2371
- | { readonly move_path?: string | null; readonly type: "update" };
2372
-export 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
-);
2577
+export type ServerNotification__GuardianUserAuthorization = "unknown" | "low" | "medium" | "high";
2578
+export 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
+});
2587
2388
-export type ServerNotification__Personality = "none" | "friendly" | "pragmatic";
2389
-export const ServerNotification__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
2588
+export type ServerNotification__AutoReviewDecisionSource = "agent";
2589
+export 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
+
2594
+export type ServerNotification__AgentMessageDeltaNotification = {
2595
+ readonly delta: string;
2596
+ readonly itemId: string;
2597
+ readonly threadId: string;
2598
+ readonly turnId: string;
2599
+};
2600
+export 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" });
2606
2607
export type ServerNotification__PlanDeltaNotification = {
2608
readonly delta: string;
@@ -2402,45 +2618,36 @@ export const ServerNotification__PlanDeltaNotification = Schema.Struct({
2618
}).annotate({
2619
description:
2620
"EXPERIMENTAL - proposed plan streaming deltas for plan items. Clients should not assume concatenated deltas match the completed plan item content.",
2621
+ identifier: "ServerNotification__PlanDeltaNotification",
2622
});
2623
2407
-export 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";
2425
-export 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
-]);
2624
+export type ServerNotification__CommandExecOutputStream = "stdout" | "stderr";
2625
+export 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
+
2638
+export type ServerNotification__ProcessOutputStream = "stdout" | "stderr";
2639
+export 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
+});
2651
2652
export type ServerNotification__ProcessExitedNotification = {
2653
readonly exitCode: number;
@@ -2452,7 +2659,7 @@ export type ServerNotification__ProcessExitedNotification = {
2659
};
2660
export const ServerNotification__ProcessExitedNotification = Schema.Struct({
2661
exitCode: Schema.Number.annotate({ description: "Process exit code.", format: "int32" }).check(
2455
- Schema.isInt(),
2662
+ Schema.isInt().annotate({ expected: "an integer" }),
2663
),
2664
processHandle: Schema.String.annotate({
2665
description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.",
@@ -2473,146 +2680,195 @@ export const ServerNotification__ProcessExitedNotification = Schema.Struct({
2680
description:
2681
"Whether stdout reached `outputBytesCap`.\n\nIn streaming mode, stdout is empty and cap state is also reported on the final stdout `process/outputDelta` notification.",
2682
}),
2476
-}).annotate({ description: "Final process exit notification for `process/spawn`." });
2477
-
2478
-export type ServerNotification__ProcessOutputDeltaNotification = {
2479
- readonly capReached: boolean;
2480
- readonly deltaBase64: string;
2481
- readonly processHandle: string;
2482
- readonly stream: "stdout" | "stderr";
2483
-};
2484
-export 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
- }),
2683
}).annotate({
2497
- description: "Base64-encoded output chunk emitted for a streaming `process/spawn` request.",
2498
-});
2499
-
2500
-export 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";
2506
-export 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
-
2514
-export type ServerNotification__RateLimitWindow = {
2515
- readonly resetsAt?: number | null;
2516
- readonly usedPercent: number;
2517
- readonly windowDurationMins?: number | null;
2518
-};
2519
-export 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
-
2529
-export type ServerNotification__RealtimeConversationVersion = "v1" | "v2" | "v3";
2530
-export const ServerNotification__RealtimeConversationVersion = Schema.Literals(["v1", "v2", "v3"]);
2531
-
2532
-export type ServerNotification__ReasoningEffort = string;
2533
-export const ServerNotification__ReasoningEffort = Schema.String.annotate({
2534
- description: "A non-empty reasoning effort value advertised by the model.",
2535
-}).check(Schema.isMinLength(1));
2536
-
2537
-export type ServerNotification__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
2538
-export 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",
2686
});
2687
2549
-export type ServerNotification__ReasoningSummaryPartAddedNotification = {
2688
+export type ServerNotification__CommandExecutionOutputDeltaNotification = {
2689
+ readonly delta: string;
2690
readonly itemId: string;
2551
- readonly summaryIndex: number;
2691
readonly threadId: string;
2692
readonly turnId: string;
2693
};
2555
-export const ServerNotification__ReasoningSummaryPartAddedNotification = Schema.Struct({
2694
+export const ServerNotification__CommandExecutionOutputDeltaNotification = Schema.Struct({
2695
+ delta: Schema.String,
2696
itemId: Schema.String,
2557
- summaryIndex: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2697
threadId: Schema.String,
2698
turnId: Schema.String,
2560
-});
2699
+}).annotate({ identifier: "ServerNotification__CommandExecutionOutputDeltaNotification" });
2700
2562
-export type ServerNotification__ReasoningSummaryTextDeltaNotification = {
2563
- readonly delta: string;
2701
+export type ServerNotification__TerminalInteractionNotification = {
2702
readonly itemId: string;
2565
- readonly summaryIndex: number;
2703
+ readonly processId: string;
2704
+ readonly stdin: string;
2705
readonly threadId: string;
2706
readonly turnId: string;
2707
};
2569
-export const ServerNotification__ReasoningSummaryTextDeltaNotification = Schema.Struct({
2570
- delta: Schema.String,
2708
+export const ServerNotification__TerminalInteractionNotification = Schema.Struct({
2709
itemId: Schema.String,
2572
- summaryIndex: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2710
+ processId: Schema.String,
2711
+ stdin: Schema.String,
2712
threadId: Schema.String,
2713
turnId: Schema.String,
2575
-});
2714
+}).annotate({ identifier: "ServerNotification__TerminalInteractionNotification" });
2715
2577
-export type ServerNotification__ReasoningTextDeltaNotification = {
2578
- readonly contentIndex: number;
2716
+export type ServerNotification__FileChangeOutputDeltaNotification = {
2717
readonly delta: string;
2718
readonly itemId: string;
2719
readonly threadId: string;
2720
readonly turnId: string;
2721
};
2584
-export const ServerNotification__ReasoningTextDeltaNotification = Schema.Struct({
2585
- contentIndex: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2722
+export const ServerNotification__FileChangeOutputDeltaNotification = Schema.Struct({
2723
delta: Schema.String,
2724
itemId: Schema.String,
2725
threadId: Schema.String,
2726
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",
2731
});
2732
2592
-export type ServerNotification__RemoteControlConnectionStatus =
2593
- | "disabled"
2594
- | "connecting"
2595
- | "connected"
2596
- | "errored";
2597
-export const ServerNotification__RemoteControlConnectionStatus = Schema.Literals([
2598
- "disabled",
2599
- "connecting",
2600
- "connected",
2601
- "errored",
2602
-]);
2603
-
2733
export type ServerNotification__RequestId = string | number;
2734
export const ServerNotification__RequestId = Schema.Union([
2735
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" });
2740
2610
-export type ServerNotification__SkillsChangedNotification = {};
2611
-export 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.",
2741
+export type ServerNotification__McpToolCallProgressNotification = {
2742
+ readonly itemId: string;
2743
+ readonly message: string;
2744
+ readonly threadId: string;
2745
+ readonly turnId: string;
2746
+};
2747
+export 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
+
2754
+export type ServerNotification__McpServerOauthLoginCompletedNotification = {
2755
+ readonly error?: string | null;
2756
+ readonly name: string;
2757
+ readonly success: boolean;
2758
+ readonly threadId?: string | null;
2759
+};
2760
+export 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
+
2767
+export type ServerNotification__McpServerStartupFailureReason = "reauthenticationRequired";
2768
+export const ServerNotification__McpServerStartupFailureReason = Schema.Literal(
2769
+ "reauthenticationRequired",
2770
+).annotate({ identifier: "ServerNotification__McpServerStartupFailureReason" });
2771
+
2772
+export type ServerNotification__McpServerStartupState =
2773
+ | "starting"
2774
+ | "ready"
2775
+ | "failed"
2776
+ | "cancelled";
2777
+export const ServerNotification__McpServerStartupState = Schema.Literals([
2778
+ "starting",
2779
+ "ready",
2780
+ "failed",
2781
+ "cancelled",
2782
+]).annotate({ identifier: "ServerNotification__McpServerStartupState" });
2783
+
2784
+export type ServerNotification__AuthMode =
2785
+ | "apikey"
2786
+ | "chatgpt"
2787
+ | "chatgptAuthTokens"
2788
+ | "headers"
2789
+ | "agentIdentity"
2790
+ | "personalAccessToken"
2791
+ | "bedrockApiKey";
2792
+export 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",
2821
});
2822
2823
+export 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";
2841
+export 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
+
2861
+export type ServerNotification__CreditsSnapshot = {
2862
+ readonly balance?: string | null;
2863
+ readonly hasCredits: boolean;
2864
+ readonly unlimited: boolean;
2865
+};
2866
+export 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
+
2872
export type ServerNotification__SpendControlLimitSnapshot = {
2873
readonly limit: string;
2874
readonly remainingPercent: number;
@@ -2621,62 +2877,271 @@ export type ServerNotification__SpendControlLimitSnapshot = {
2877
};
2878
export const ServerNotification__SpendControlLimitSnapshot = Schema.Struct({
2879
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
+ ),
2886
used: Schema.String,
2887
+}).annotate({ identifier: "ServerNotification__SpendControlLimitSnapshot" });
2888
+
2889
+export type ServerNotification__RateLimitWindow = {
2890
+ readonly resetsAt?: number | null;
2891
+ readonly usedPercent: number;
2892
+ readonly windowDurationMins?: number | null;
2893
+};
2894
+export 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
+
2916
+export 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";
2922
+export 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
+
2930
+export type ServerNotification__AppReview = { readonly status: string };
2931
+export const ServerNotification__AppReview = Schema.Struct({ status: Schema.String }).annotate({
2932
+ identifier: "ServerNotification__AppReview",
2933
});
2934
2629
-export type ServerNotification__SubAgentActivityKind =
2630
- | "started"
2631
- | "interacted"
2632
- | "interrupted"
2633
- | "completed";
2634
-export const ServerNotification__SubAgentActivityKind = Schema.Literals([
2635
- "started",
2636
- "interacted",
2637
- "interrupted",
2638
- "completed",
2639
-]);
2935
+export type ServerNotification__AppScreenshot = {
2936
+ readonly fileId?: string | null;
2937
+ readonly url?: string | null;
2938
+ readonly userPrompt: string;
2939
+};
2940
+export 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" });
2945
2641
-export type ServerNotification__TerminalInteractionNotification = {
2946
+export 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
+};
2954
+export 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
+
2966
+export type ServerNotification__RemoteControlConnectionStatus =
2967
+ | "disabled"
2968
+ | "connecting"
2969
+ | "connected"
2970
+ | "errored";
2971
+export const ServerNotification__RemoteControlConnectionStatus = Schema.Literals([
2972
+ "disabled",
2973
+ "connecting",
2974
+ "connected",
2975
+ "errored",
2976
+]).annotate({ identifier: "ServerNotification__RemoteControlConnectionStatus" });
2977
+
2978
+export 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";
2989
+export 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
+
3002
+export type ServerNotification__ReasoningSummaryTextDeltaNotification = {
3003
+ readonly delta: string;
3004
readonly itemId: string;
2643
- readonly processId: string;
2644
- readonly stdin: string;
3005
+ readonly summaryIndex: number;
3006
readonly threadId: string;
3007
readonly turnId: string;
3008
};
2648
-export const ServerNotification__TerminalInteractionNotification = Schema.Struct({
3009
+export const ServerNotification__ReasoningSummaryTextDeltaNotification = Schema.Struct({
3010
+ delta: Schema.String,
3011
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
+
3019
+export type ServerNotification__ReasoningSummaryPartAddedNotification = {
3020
+ readonly itemId: string;
3021
+ readonly summaryIndex: number;
3022
+ readonly threadId: string;
3023
+ readonly turnId: string;
3024
+};
3025
+export 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
+
3034
+export type ServerNotification__ReasoningTextDeltaNotification = {
3035
+ readonly contentIndex: number;
3036
+ readonly delta: string;
3037
+ readonly itemId: string;
3038
+ readonly threadId: string;
3039
+ readonly turnId: string;
3040
+};
3041
+export 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
+
3051
+export type ServerNotification__ContextCompactedNotification = {
3052
+ readonly threadId: string;
3053
+ readonly turnId: string;
3054
+};
3055
+export const ServerNotification__ContextCompactedNotification = Schema.Struct({
3056
threadId: Schema.String,
3057
turnId: Schema.String,
3058
+}).annotate({
3059
+ description: "Deprecated: Use `ContextCompaction` item type instead.",
3060
+ identifier: "ServerNotification__ContextCompactedNotification",
3061
});
3062
2656
-export type ServerNotification__TextElement = {
2657
- readonly byteRange: { readonly end: number; readonly start: number };
2658
- readonly placeholder?: string | null;
3063
+export type ServerNotification__ModelRerouteReason = "highRiskCyberActivity";
3064
+export const ServerNotification__ModelRerouteReason = Schema.Literal(
3065
+ "highRiskCyberActivity",
3066
+).annotate({ identifier: "ServerNotification__ModelRerouteReason" });
3067
+
3068
+export type ServerNotification__ModelVerification = "trustedAccessForCyber";
3069
+export const ServerNotification__ModelVerification = Schema.Literal(
3070
+ "trustedAccessForCyber",
3071
+).annotate({ identifier: "ServerNotification__ModelVerification" });
3072
+
3073
+export type ServerNotification__TurnModerationMetadataNotification = {
3074
+ readonly metadata: Schema.Json;
3075
+ readonly threadId: string;
3076
+ readonly turnId: string;
3077
};
2660
-export 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.",
3078
+export 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
+
3084
+export 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
+};
3093
+export 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
+
3103
+export type ServerNotification__WarningNotification = {
3104
+ readonly message: string;
3105
+ readonly threadId?: string | null;
3106
+};
3107
+export 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
+
3119
+export type ServerNotification__GuardianWarningNotification = {
3120
+ readonly message: string;
3121
+ readonly threadId: string;
3122
+};
3123
+export const ServerNotification__GuardianWarningNotification = Schema.Struct({
3124
+ message: Schema.String.annotate({
3125
+ description: "Concise guardian warning message for the user.",
3126
}),
2671
- placeholder: Schema.optionalKey(
3127
+ threadId: Schema.String.annotate({ description: "Thread target for the guardian warning." }),
3128
+}).annotate({ identifier: "ServerNotification__GuardianWarningNotification" });
3129
+
3130
+export type ServerNotification__DeprecationNoticeNotification = {
3131
+ readonly details?: string | null;
3132
+ readonly summary: string;
3133
+};
3134
+export const ServerNotification__DeprecationNoticeNotification = Schema.Struct({
3135
+ details: Schema.optionalKey(
3136
Schema.Union([
3137
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.",
3139
}),
3140
Schema.Null,
3141
]),
3142
),
2679
-});
3143
+ summary: Schema.String.annotate({ description: "Concise summary of what is deprecated." }),
3144
+}).annotate({ identifier: "ServerNotification__DeprecationNoticeNotification" });
3145
3146
export type ServerNotification__TextPosition = { readonly column: number; readonly line: number };
3147
export const ServerNotification__TextPosition = Schema.Struct({
@@ -2684,65 +3149,77 @@ export const ServerNotification__TextPosition = Schema.Struct({
3149
description: "1-based column number (in Unicode scalar values).",
3150
format: "uint",
3151
})
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
+ ),
3156
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" });
3162
2694
-export type ServerNotification__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
2695
-export const ServerNotification__ThreadActiveFlag = Schema.Literals([
2696
- "waitingOnApproval",
2697
- "waitingOnUserInput",
2698
-]);
3163
+export type ServerNotification__FuzzyFileSearchMatchType = "file" | "directory";
3164
+export const ServerNotification__FuzzyFileSearchMatchType = Schema.Literals([
3165
+ "file",
3166
+ "directory",
3167
+]).annotate({ identifier: "ServerNotification__FuzzyFileSearchMatchType" });
3168
2700
-export type ServerNotification__ThreadArchivedNotification = { readonly threadId: string };
2701
-export const ServerNotification__ThreadArchivedNotification = Schema.Struct({
2702
- threadId: Schema.String,
2703
-});
3169
+export type ServerNotification__FuzzyFileSearchSessionCompletedNotification = {
3170
+ readonly sessionId: string;
3171
+};
3172
+export const ServerNotification__FuzzyFileSearchSessionCompletedNotification = Schema.Struct({
3173
+ sessionId: Schema.String,
3174
+}).annotate({ identifier: "ServerNotification__FuzzyFileSearchSessionCompletedNotification" });
3175
2705
-export type ServerNotification__ThreadClosedNotification = { readonly threadId: string };
2706
-export const ServerNotification__ThreadClosedNotification = Schema.Struct({
2707
- threadId: Schema.String,
2708
-});
3176
+export type ServerNotification__RealtimeConversationVersion = "v1" | "v2" | "v3";
3177
+export const ServerNotification__RealtimeConversationVersion = Schema.Literals([
3178
+ "v1",
3179
+ "v2",
3180
+ "v3",
3181
+]).annotate({ identifier: "ServerNotification__RealtimeConversationVersion" });
3182
2710
-export type ServerNotification__ThreadDeletedNotification = { readonly threadId: string };
2711
-export const ServerNotification__ThreadDeletedNotification = Schema.Struct({
3183
+export type ServerNotification__ThreadRealtimeItemAddedNotification = {
3184
+ readonly item: Schema.Json;
3185
+ readonly threadId: string;
3186
+};
3187
+export const ServerNotification__ThreadRealtimeItemAddedNotification = Schema.Struct({
3188
+ item: Schema.Json.annotate({ expected: "JSON value" }),
3189
threadId: Schema.String,
3190
+}).annotate({
3191
+ description: "EXPERIMENTAL - raw non-audio thread realtime item emitted by the backend.",
3192
+ identifier: "ServerNotification__ThreadRealtimeItemAddedNotification",
3193
});
3194
2715
-export type ServerNotification__ThreadGoalClearedNotification = { readonly threadId: string };
2716
-export const ServerNotification__ThreadGoalClearedNotification = Schema.Struct({
3195
+export type ServerNotification__ThreadRealtimeTranscriptDeltaNotification = {
3196
+ readonly delta: string;
3197
+ readonly role: string;
3198
+ readonly threadId: string;
3199
+};
3200
+export const ServerNotification__ThreadRealtimeTranscriptDeltaNotification = Schema.Struct({
3201
+ delta: Schema.String.annotate({ description: "Live transcript delta from the realtime event." }),
3202
+ role: Schema.String,
3203
threadId: Schema.String,
3204
+}).annotate({
3205
+ description:
3206
+ "EXPERIMENTAL - flat transcript delta emitted whenever realtime transcript text changes.",
3207
+ identifier: "ServerNotification__ThreadRealtimeTranscriptDeltaNotification",
3208
});
3209
2720
-export type ServerNotification__ThreadGoalStatus =
2721
- | "active"
2722
- | "paused"
2723
- | "blocked"
2724
- | "usageLimited"
2725
- | "budgetLimited"
2726
- | "complete";
2727
-export const ServerNotification__ThreadGoalStatus = Schema.Literals([
2728
- "active",
2729
- "paused",
2730
- "blocked",
2731
- "usageLimited",
2732
- "budgetLimited",
2733
- "complete",
2734
-]);
2735
-
2736
-export type ServerNotification__ThreadId = string;
2737
-export const ServerNotification__ThreadId = Schema.String;
2738
-
2739
-export type ServerNotification__ThreadNameUpdatedNotification = {
3210
+export type ServerNotification__ThreadRealtimeTranscriptDoneNotification = {
3211
+ readonly role: string;
3212
+ readonly text: string;
3213
readonly threadId: string;
2741
- readonly threadName?: string | null;
3214
};
2743
-export const ServerNotification__ThreadNameUpdatedNotification = Schema.Struct({
3215
+export const ServerNotification__ThreadRealtimeTranscriptDoneNotification = Schema.Struct({
3216
+ role: Schema.String,
3217
+ text: Schema.String.annotate({ description: "Final complete text for the transcript part." }),
3218
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",
3223
});
3224
3225
export type ServerNotification__ThreadRealtimeAudioChunk = {
@@ -2756,48 +3233,30 @@ export const ServerNotification__ThreadRealtimeAudioChunk = Schema.Struct({
3233
data: Schema.String,
3234
itemId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3235
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
+ ),
3240
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
+ ),
3245
samplesPerChannel: Schema.optionalKey(
3246
Schema.Union([
3247
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
+ ),
3254
Schema.Null,
3255
]),
3256
),
2772
-}).annotate({ description: "EXPERIMENTAL - thread realtime audio chunk." });
2773
-
2774
-export type ServerNotification__ThreadRealtimeClosedNotification = {
2775
- readonly reason?: string | null;
2776
- readonly threadId: string;
2777
-};
2778
-export 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
-
2783
-export type ServerNotification__ThreadRealtimeErrorNotification = {
2784
- readonly message: string;
2785
- readonly threadId: string;
2786
-};
2787
-export 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
-
2792
-export type ServerNotification__ThreadRealtimeItemAddedNotification = {
2793
- readonly item: unknown;
2794
- readonly threadId: string;
2795
-};
2796
-export const ServerNotification__ThreadRealtimeItemAddedNotification = Schema.Struct({
2797
- item: Schema.Unknown,
2798
- threadId: Schema.String,
3257
}).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",
3260
});
3261
3262
export type ServerNotification__ThreadRealtimeSdpNotification = {
@@ -2809,189 +3268,202 @@ export const ServerNotification__ThreadRealtimeSdpNotification = Schema.Struct({
3268
threadId: Schema.String,
3269
}).annotate({
3270
description: "EXPERIMENTAL - emitted with the remote SDP for a WebRTC realtime session.",
3271
+ identifier: "ServerNotification__ThreadRealtimeSdpNotification",
3272
});
3273
2814
-export type ServerNotification__ThreadRealtimeTranscriptDeltaNotification = {
2815
- readonly delta: string;
2816
- readonly role: string;
3274
+export type ServerNotification__ThreadRealtimeErrorNotification = {
3275
+ readonly message: string;
3276
readonly threadId: string;
3277
};
2819
-export const ServerNotification__ThreadRealtimeTranscriptDeltaNotification = Schema.Struct({
2820
- delta: Schema.String.annotate({ description: "Live transcript delta from the realtime event." }),
2821
- role: Schema.String,
3278
+export const ServerNotification__ThreadRealtimeErrorNotification = Schema.Struct({
3279
+ message: Schema.String,
3280
threadId: Schema.String,
3281
}).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",
3284
});
3285
2828
-export type ServerNotification__ThreadRealtimeTranscriptDoneNotification = {
2829
- readonly role: string;
2830
- readonly text: string;
3286
+export type ServerNotification__ThreadRealtimeClosedNotification = {
3287
+ readonly reason?: string | null;
3288
readonly threadId: string;
3289
};
2833
-export const ServerNotification__ThreadRealtimeTranscriptDoneNotification = Schema.Struct({
2834
- role: Schema.String,
2835
- text: Schema.String.annotate({ description: "Final complete text for the transcript part." }),
3290
+export const ServerNotification__ThreadRealtimeClosedNotification = Schema.Struct({
3291
+ reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3292
threadId: Schema.String,
3293
}).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",
3296
});
3297
2842
-export type ServerNotification__ThreadSource = string;
2843
-export const ServerNotification__ThreadSource = Schema.String;
3298
+export type ServerNotification__WindowsWorldWritableWarningNotification = {
3299
+ readonly extraCount: number;
3300
+ readonly failedScan: boolean;
3301
+ readonly samplePaths: ReadonlyArray<string>;
3302
+};
3303
+export 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" });
3312
2845
-export type ServerNotification__ThreadUnarchivedNotification = { readonly threadId: string };
2846
-export const ServerNotification__ThreadUnarchivedNotification = Schema.Struct({
2847
- threadId: Schema.String,
2848
-});
3313
+export type ServerNotification__WindowsSandboxSetupMode = "elevated" | "unelevated";
3314
+export const ServerNotification__WindowsSandboxSetupMode = Schema.Literals([
3315
+ "elevated",
3316
+ "unelevated",
3317
+]).annotate({ identifier: "ServerNotification__WindowsSandboxSetupMode" });
3318
2850
-export type ServerNotification__TokenUsageBreakdown = {
2851
- readonly cacheWriteInputTokens?: number;
2852
- readonly cachedInputTokens: number;
2853
- readonly inputTokens: number;
This file is too large to show in full.