The best way to control Claude Code, Codex and more from any computer or phone

main
ts 56,588 lines 2.23 MB
Raw
Large file — syntax highlighting disabled.
1 import * as Schema from "effect/Schema";
2
3 export type ApplyPatchApprovalParams__ThreadId = string;
4 export const ApplyPatchApprovalParams__ThreadId = Schema.String.annotate({
5 identifier: "ApplyPatchApprovalParams__ThreadId",
6 });
7
8 export type ApplyPatchApprovalParams__FileChange =
9 | { readonly content: string; readonly type: "add" }
10 | { readonly content: string; readonly type: "delete" }
11 | { readonly move_path?: string | null; readonly type: "update"; readonly unified_diff: string };
12 export const ApplyPatchApprovalParams__FileChange = Schema.Union(
13 [
14 Schema.Struct({
15 content: Schema.String,
16 type: Schema.Literal("add").annotate({ title: "AddFileChangeType" }),
17 }).annotate({ title: "AddFileChange" }),
18 Schema.Struct({
19 content: Schema.String,
20 type: Schema.Literal("delete").annotate({ title: "DeleteFileChangeType" }),
21 }).annotate({ title: "DeleteFileChange" }),
22 Schema.Struct({
23 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
24 type: Schema.Literal("update").annotate({ title: "UpdateFileChangeType" }),
25 unified_diff: Schema.String,
26 }).annotate({ title: "UpdateFileChange" }),
27 ],
28 { mode: "oneOf" },
29 ).annotate({ identifier: "ApplyPatchApprovalParams__FileChange" });
30
31 export type ApplyPatchApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";
32 export const ApplyPatchApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([
33 "allow",
34 "deny",
35 ]).annotate({ identifier: "ApplyPatchApprovalResponse__NetworkPolicyRuleAction" });
36
37 export type ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason = "unauthorized";
38 export const ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason = Schema.Union(
39 [
40 Schema.Literal("unauthorized").annotate({
41 description: "Codex attempted a backend request and received `401 Unauthorized`.",
42 }),
43 ],
44 { mode: "oneOf" },
45 ).annotate({ identifier: "ChatgptAuthTokensRefreshParams__ChatgptAuthTokensRefreshReason" });
46
47 export type ClientRequest__RequestId = string | number;
48 export const ClientRequest__RequestId = Schema.Union([
49 Schema.String,
50 Schema.Number.annotate({ format: "int64" }).check(
51 Schema.isInt().annotate({ expected: "an integer" }),
52 ),
53 ]).annotate({ identifier: "ClientRequest__RequestId" });
54
55 export type ClientRequest__InitializeCapabilities = {
56 readonly experimentalApi?: boolean;
57 readonly explicitGatewayOauth?: boolean;
58 readonly extensions?: { readonly [x: string]: Schema.Json } | null;
59 readonly mcpServerOpenaiFormElicitation?: boolean;
60 readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
61 readonly requestAttestation?: boolean;
62 };
63 export const ClientRequest__InitializeCapabilities = Schema.Struct({
64 experimentalApi: Schema.optionalKey(
65 Schema.Boolean.annotate({
66 description: "Opt into receiving experimental API methods and fields.",
67 default: false,
68 }),
69 ),
70 explicitGatewayOauth: Schema.optionalKey(
71 Schema.Boolean.annotate({
72 description:
73 "Use explicit gateway OAuth login instead of automatic browser authorization. Applies to this app-server's gateway runtime; later connections cannot undo it.",
74 }),
75 ),
76 extensions: Schema.optionalKey(
77 Schema.Union([
78 Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })).annotate({
79 description: "MCP extension settings declared by the app-server client.",
80 }),
81 Schema.Null,
82 ]),
83 ),
84 mcpServerOpenaiFormElicitation: Schema.optionalKey(
85 Schema.Boolean.annotate({
86 description:
87 "Legacy opt-in for the `openai/form` MCP extension.\n\nNew clients should declare `openai/form` in [`Self::extensions`].",
88 }),
89 ),
90 optOutNotificationMethods: Schema.optionalKey(
91 Schema.Union([
92 Schema.Array(Schema.String).annotate({
93 description:
94 "Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
95 }),
96 Schema.Null,
97 ]),
98 ),
99 requestAttestation: Schema.optionalKey(
100 Schema.Boolean.annotate({
101 description: "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.",
102 default: false,
103 }),
104 ),
105 }).annotate({
106 description: "Client-declared capabilities negotiated during initialize.",
107 identifier: "ClientRequest__InitializeCapabilities",
108 });
109
110 export type ClientRequest__ClientInfo = {
111 readonly name: string;
112 readonly title?: string | null;
113 readonly version: string;
114 };
115 export const ClientRequest__ClientInfo = Schema.Struct({
116 name: Schema.String,
117 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
118 version: Schema.String,
119 }).annotate({ identifier: "ClientRequest__ClientInfo" });
120
121 export type ClientRequest__AskForApproval =
122 | "untrusted"
123 | "on-request"
124 | "never"
125 | {
126 readonly granular: {
127 readonly mcp_elicitations: boolean;
128 readonly request_permissions?: boolean;
129 readonly rules: boolean;
130 readonly sandbox_approval: boolean;
131 readonly skill_approval?: boolean;
132 };
133 };
134 export const ClientRequest__AskForApproval = Schema.Union(
135 [
136 Schema.Literals(["untrusted", "on-request", "never"]),
137 Schema.Struct({
138 granular: Schema.Struct({
139 mcp_elicitations: Schema.Boolean,
140 request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
141 rules: Schema.Boolean,
142 sandbox_approval: Schema.Boolean,
143 skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
144 }),
145 }).annotate({ title: "GranularAskForApproval" }),
146 ],
147 { mode: "oneOf" },
148 ).annotate({ identifier: "ClientRequest__AskForApproval" });
149
150 export type ClientRequest__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
151 export const ClientRequest__ApprovalsReviewer = Schema.Literals([
152 "user",
153 "auto_review",
154 "guardian_subagent",
155 ]).annotate({
156 description:
157 "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.",
158 identifier: "ClientRequest__ApprovalsReviewer",
159 });
160
161 export type ClientRequest__Personality = "none" | "friendly" | "pragmatic";
162 export const ClientRequest__Personality = Schema.Literals([
163 "none",
164 "friendly",
165 "pragmatic",
166 ]).annotate({
167 description: "Deprecated: `friendly` and `pragmatic` no longer select a style.",
168 identifier: "ClientRequest__Personality",
169 });
170
171 export type ClientRequest__SandboxMode = "read-only" | "workspace-write" | "danger-full-access";
172 export const ClientRequest__SandboxMode = Schema.Literals([
173 "read-only",
174 "workspace-write",
175 "danger-full-access",
176 ]).annotate({ identifier: "ClientRequest__SandboxMode" });
177
178 export type ClientRequest__ThreadStartSource = "startup" | "clear";
179 export const ClientRequest__ThreadStartSource = Schema.Literals(["startup", "clear"]).annotate({
180 identifier: "ClientRequest__ThreadStartSource",
181 });
182
183 export type ClientRequest__ThreadSource = string;
184 export const ClientRequest__ThreadSource = Schema.String.annotate({
185 identifier: "ClientRequest__ThreadSource",
186 });
187
188 export type ClientRequest__ThreadArchiveParams = { readonly threadId: string };
189 export const ClientRequest__ThreadArchiveParams = Schema.Struct({
190 threadId: Schema.String,
191 }).annotate({ identifier: "ClientRequest__ThreadArchiveParams" });
192
193 export type ClientRequest__ThreadDeleteParams = { readonly threadId: string };
194 export const ClientRequest__ThreadDeleteParams = Schema.Struct({
195 threadId: Schema.String,
196 }).annotate({ identifier: "ClientRequest__ThreadDeleteParams" });
197
198 export type ClientRequest__ThreadUnsubscribeParams = { readonly threadId: string };
199 export const ClientRequest__ThreadUnsubscribeParams = Schema.Struct({
200 threadId: Schema.String,
201 }).annotate({ identifier: "ClientRequest__ThreadUnsubscribeParams" });
202
203 export type ClientRequest__ThreadSetNameParams = {
204 readonly name: string;
205 readonly threadId: string;
206 };
207 export const ClientRequest__ThreadSetNameParams = Schema.Struct({
208 name: Schema.String,
209 threadId: Schema.String,
210 }).annotate({ identifier: "ClientRequest__ThreadSetNameParams" });
211
212 export type ClientRequest__ThreadGoalStatus =
213 | "active"
214 | "paused"
215 | "blocked"
216 | "usageLimited"
217 | "budgetLimited"
218 | "complete";
219 export const ClientRequest__ThreadGoalStatus = Schema.Literals([
220 "active",
221 "paused",
222 "blocked",
223 "usageLimited",
224 "budgetLimited",
225 "complete",
226 ]).annotate({ identifier: "ClientRequest__ThreadGoalStatus" });
227
228 export type ClientRequest__ThreadGoalGetParams = { readonly threadId: string };
229 export const ClientRequest__ThreadGoalGetParams = Schema.Struct({
230 threadId: Schema.String,
231 }).annotate({ identifier: "ClientRequest__ThreadGoalGetParams" });
232
233 export type ClientRequest__ThreadGoalClearParams = { readonly threadId: string };
234 export const ClientRequest__ThreadGoalClearParams = Schema.Struct({
235 threadId: Schema.String,
236 }).annotate({ identifier: "ClientRequest__ThreadGoalClearParams" });
237
238 export type ClientRequest__ThreadMetadataGitInfoUpdateParams = {
239 readonly branch?: string | null;
240 readonly originUrl?: string | null;
241 readonly sha?: string | null;
242 };
243 export const ClientRequest__ThreadMetadataGitInfoUpdateParams = Schema.Struct({
244 branch: Schema.optionalKey(
245 Schema.Union([
246 Schema.String.annotate({
247 description:
248 "Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
249 }),
250 Schema.Null,
251 ]),
252 ),
253 originUrl: Schema.optionalKey(
254 Schema.Union([
255 Schema.String.annotate({
256 description:
257 "Omit to leave the stored origin URL unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
258 }),
259 Schema.Null,
260 ]),
261 ),
262 sha: Schema.optionalKey(
263 Schema.Union([
264 Schema.String.annotate({
265 description:
266 "Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it.",
267 }),
268 Schema.Null,
269 ]),
270 ),
271 }).annotate({ identifier: "ClientRequest__ThreadMetadataGitInfoUpdateParams" });
272
273 export type ClientRequest__ThreadAttachmentAddParams = {
274 readonly attachmentType: string;
275 readonly identityKey: string;
276 readonly payload: Schema.Json;
277 readonly threadId: string;
278 };
279 export const ClientRequest__ThreadAttachmentAddParams = Schema.Struct({
280 attachmentType: Schema.String,
281 identityKey: Schema.String,
282 payload: Schema.Json.annotate({ expected: "JSON value" }),
283 threadId: Schema.String,
284 }).annotate({
285 description: "Parameters for creating or locating an attachment on its owning thread.",
286 identifier: "ClientRequest__ThreadAttachmentAddParams",
287 });
288
289 export type ClientRequest__ThreadAttachmentListParams = {
290 readonly cursor?: string | null;
291 readonly limit?: number | null;
292 readonly threadId: string;
293 };
294 export const ClientRequest__ThreadAttachmentListParams = Schema.Struct({
295 cursor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
296 limit: Schema.optionalKey(
297 Schema.Union([
298 Schema.Number.annotate({ format: "uint32" })
299 .check(Schema.isInt().annotate({ expected: "an integer" }))
300 .check(
301 Schema.isGreaterThanOrEqualTo(0).annotate({
302 expected: "a value greater than or equal to 0",
303 }),
304 ),
305 Schema.Null,
306 ]),
307 ),
308 threadId: Schema.String,
309 }).annotate({
310 description: "Parameters for listing attachments from one thread.",
311 identifier: "ClientRequest__ThreadAttachmentListParams",
312 });
313
314 export type ClientRequest__ThreadAttachmentRemoveParams = {
315 readonly attachmentType: string;
316 readonly identityKey: string;
317 readonly threadId: string;
318 };
319 export const ClientRequest__ThreadAttachmentRemoveParams = Schema.Struct({
320 attachmentType: Schema.String,
321 identityKey: Schema.String,
322 threadId: Schema.String,
323 }).annotate({
324 description: "Parameters for deleting an attachment by its stable thread-local identity.",
325 identifier: "ClientRequest__ThreadAttachmentRemoveParams",
326 });
327
328 export type ClientRequest__ThreadSectionMoveParams = {
329 readonly beforeThreadId?: string | null;
330 readonly sectionId: string | null;
331 readonly threadId: string;
332 };
333 export const ClientRequest__ThreadSectionMoveParams = Schema.Struct({
334 beforeThreadId: Schema.optionalKey(
335 Schema.Union([
336 Schema.String.annotate({
337 description: "Existing thread to insert before; omission or null appends to the section.",
338 }),
339 Schema.Null,
340 ]),
341 ),
342 sectionId: Schema.Union([
343 Schema.String.annotate({
344 description: "Destination section, or `null` to remove the thread from its section.",
345 }),
346 Schema.Null,
347 ]),
348 threadId: Schema.String.annotate({
349 description: "Thread to move into, within, or out of a section.",
350 }),
351 }).annotate({
352 description: "Parameters for moving a thread within a server-owned section ordering.",
353 identifier: "ClientRequest__ThreadSectionMoveParams",
354 });
355
356 export type ClientRequest__ThreadUnarchiveParams = { readonly threadId: string };
357 export const ClientRequest__ThreadUnarchiveParams = Schema.Struct({
358 threadId: Schema.String,
359 }).annotate({ identifier: "ClientRequest__ThreadUnarchiveParams" });
360
361 export type ClientRequest__ThreadCompactStartParams = { readonly threadId: string };
362 export const ClientRequest__ThreadCompactStartParams = Schema.Struct({
363 threadId: Schema.String,
364 }).annotate({ identifier: "ClientRequest__ThreadCompactStartParams" });
365
366 export type ClientRequest__ThreadShellCommandParams = {
367 readonly command: string;
368 readonly threadId: string;
369 readonly timeoutMs?: number | null;
370 };
371 export const ClientRequest__ThreadShellCommandParams = Schema.Struct({
372 command: Schema.String.annotate({
373 description:
374 "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.",
375 }),
376 threadId: Schema.String,
377 timeoutMs: Schema.optionalKey(
378 Schema.Union([
379 Schema.Number.annotate({
380 description:
381 "Maximum execution time in milliseconds. Defaults to one hour when omitted or null. Must be non-negative; zero requests an immediate timeout, not unlimited execution. Does not affect the immediate RPC acknowledgement.",
382 format: "int64",
383 }).check(Schema.isInt().annotate({ expected: "an integer" })),
384 Schema.Null,
385 ]),
386 ),
387 }).annotate({ identifier: "ClientRequest__ThreadShellCommandParams" });
388
389 export type ClientRequest__ThreadApproveGuardianDeniedActionParams = {
390 readonly event: Schema.Json;
391 readonly threadId: string;
392 };
393 export const ClientRequest__ThreadApproveGuardianDeniedActionParams = Schema.Struct({
394 event: Schema.Json.annotate({
395 expected: "JSON value",
396 description: "Serialized `codex_protocol::protocol::GuardianAssessmentEvent`.",
397 }),
398 threadId: Schema.String,
399 }).annotate({ identifier: "ClientRequest__ThreadApproveGuardianDeniedActionParams" });
400
401 export type ClientRequest__ThreadRevertParams = {
402 readonly beforeTurnId: string;
403 readonly threadId: string;
404 };
405 export const ClientRequest__ThreadRevertParams = Schema.Struct({
406 beforeTurnId: Schema.String.annotate({
407 description: "Turn excluded from the replacement history, together with every later turn.",
408 }),
409 threadId: Schema.String,
410 }).annotate({
411 description:
412 "Replace a paginated thread's durable history with the prefix before one turn.\n\nThis only changes persisted conversation history. It does not revert local file changes.",
413 identifier: "ClientRequest__ThreadRevertParams",
414 });
415
416 export type ClientRequest__ThreadListCwdFilter = string | ReadonlyArray<string>;
417 export const ClientRequest__ThreadListCwdFilter = Schema.Union([
418 Schema.String,
419 Schema.Array(Schema.String),
420 ]).annotate({ identifier: "ClientRequest__ThreadListCwdFilter" });
421
422 export type ClientRequest__SortDirection = "asc" | "desc";
423 export const ClientRequest__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
424 identifier: "ClientRequest__SortDirection",
425 });
426
427 export type ClientRequest__ThreadSortKey =
428 | "created_at"
429 | "updated_at"
430 | "recency_at"
431 | "section_position";
432 export const ClientRequest__ThreadSortKey = Schema.Literals([
433 "created_at",
434 "updated_at",
435 "recency_at",
436 "section_position",
437 ]).annotate({ identifier: "ClientRequest__ThreadSortKey" });
438
439 export type ClientRequest__ThreadSourceKind =
440 | "cli"
441 | "vscode"
442 | "exec"
443 | "appServer"
444 | "subAgent"
445 | "subAgentReview"
446 | "subAgentCompact"
447 | "subAgentThreadSpawn"
448 | "subAgentOther"
449 | "unknown";
450 export const ClientRequest__ThreadSourceKind = Schema.Literals([
451 "cli",
452 "vscode",
453 "exec",
454 "appServer",
455 "subAgent",
456 "subAgentReview",
457 "subAgentCompact",
458 "subAgentThreadSpawn",
459 "subAgentOther",
460 "unknown",
461 ]).annotate({ identifier: "ClientRequest__ThreadSourceKind" });
462
463 export type ClientRequest__ThreadSectionListParams = {
464 readonly cursor?: string | null;
465 readonly limit?: number | null;
466 };
467 export const ClientRequest__ThreadSectionListParams = Schema.Struct({
468 cursor: Schema.optionalKey(
469 Schema.Union([
470 Schema.String.annotate({
471 description: "Opaque pagination cursor returned by a previous call.",
472 }),
473 Schema.Null,
474 ]),
475 ),
476 limit: Schema.optionalKey(
477 Schema.Union([
478 Schema.Number.annotate({
479 description: "Maximum number of sections to return.",
480 format: "uint32",
481 })
482 .check(Schema.isInt().annotate({ expected: "an integer" }))
483 .check(
484 Schema.isGreaterThanOrEqualTo(0).annotate({
485 expected: "a value greater than or equal to 0",
486 }),
487 ),
488 Schema.Null,
489 ]),
490 ),
491 }).annotate({
492 description: "Parameters for listing independently persisted thread sections.",
493 identifier: "ClientRequest__ThreadSectionListParams",
494 });
495
496 export type ClientRequest__ThreadSectionAppearance = {
497 readonly color?: string | null;
498 readonly icon?: string | null;
499 };
500 export const ClientRequest__ThreadSectionAppearance = Schema.Struct({
501 color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
502 icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
503 }).annotate({
504 description: "Extensible visual presentation for a custom thread section.",
505 identifier: "ClientRequest__ThreadSectionAppearance",
506 });
507
508 export type ClientRequest__ThreadSectionDeleteParams = { readonly sectionId: string };
509 export const ClientRequest__ThreadSectionDeleteParams = Schema.Struct({
510 sectionId: Schema.String.annotate({
511 description: "The stable, server-generated identity of the section to delete.",
512 }),
513 }).annotate({
514 description: "Parameters for deleting an independently persisted thread section.",
515 identifier: "ClientRequest__ThreadSectionDeleteParams",
516 });
517
518 export type ClientRequest__ThreadLoadedListParams = {
519 readonly cursor?: string | null;
520 readonly limit?: number | null;
521 };
522 export const ClientRequest__ThreadLoadedListParams = Schema.Struct({
523 cursor: Schema.optionalKey(
524 Schema.Union([
525 Schema.String.annotate({
526 description: "Opaque pagination cursor returned by a previous call.",
527 }),
528 Schema.Null,
529 ]),
530 ),
531 limit: Schema.optionalKey(
532 Schema.Union([
533 Schema.Number.annotate({
534 description: "Optional page size; defaults to no limit.",
535 format: "uint32",
536 })
537 .check(Schema.isInt().annotate({ expected: "an integer" }))
538 .check(
539 Schema.isGreaterThanOrEqualTo(0).annotate({
540 expected: "a value greater than or equal to 0",
541 }),
542 ),
543 Schema.Null,
544 ]),
545 ),
546 }).annotate({ identifier: "ClientRequest__ThreadLoadedListParams" });
547
548 export type ClientRequest__ThreadReadParams = {
549 readonly includeTurns?: boolean;
550 readonly threadId: string;
551 };
552 export const ClientRequest__ThreadReadParams = Schema.Struct({
553 includeTurns: Schema.optionalKey(
554 Schema.Boolean.annotate({
555 description:
556 "When true, include turns and their items from rollout history. Full-history hydration is deprecated for paginated threads; prefer a metadata-only read and page with `thread/turns/list` and `thread/items/list`.",
557 }),
558 ),
559 threadId: Schema.String,
560 }).annotate({ identifier: "ClientRequest__ThreadReadParams" });
561
562 export type ClientRequest__TurnItemsView = "notLoaded" | "summary" | "full";
563 export const ClientRequest__TurnItemsView = Schema.Union(
564 [
565 Schema.Literal("notLoaded").annotate({
566 description: "`items` was not loaded for this turn. The field is intentionally empty.",
567 }),
568 Schema.Literal("summary").annotate({
569 description: "`items` contains only a display summary for this turn.",
570 }),
571 Schema.Literal("full").annotate({
572 description:
573 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
574 }),
575 ],
576 { mode: "oneOf" },
577 ).annotate({ identifier: "ClientRequest__TurnItemsView" });
578
579 export type ClientRequest__ThreadItemsListAnchor = {
580 readonly itemId: string;
581 readonly type: "item";
582 };
583 export const ClientRequest__ThreadItemsListAnchor = Schema.Union(
584 [
585 Schema.Struct({
586 itemId: Schema.String,
587 type: Schema.Literal("item").annotate({ title: "ItemThreadItemsListAnchorType" }),
588 }).annotate({ title: "ItemThreadItemsListAnchor" }),
589 ],
590 { mode: "oneOf" },
591 ).annotate({
592 description: "An exclusive item position within the requested visible turn.",
593 identifier: "ClientRequest__ThreadItemsListAnchor",
594 });
595
596 export type ClientRequest__ThreadInjectItemsParams = {
597 readonly items: ReadonlyArray<Schema.Json>;
598 readonly threadId: string;
599 };
600 export const ClientRequest__ThreadInjectItemsParams = Schema.Struct({
601 items: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })).annotate({
602 description: "Raw Responses API items to append to the thread's model-visible history.",
603 }),
604 threadId: Schema.String,
605 }).annotate({ identifier: "ClientRequest__ThreadInjectItemsParams" });
606
607 export type ClientRequest__SkillsListParams = {
608 readonly cwds?: ReadonlyArray<string>;
609 readonly forceReload?: boolean;
610 };
611 export const ClientRequest__SkillsListParams = Schema.Struct({
612 cwds: Schema.optionalKey(
613 Schema.Array(Schema.String).annotate({
614 description: "When empty, defaults to the current session working directory.",
615 }),
616 ),
617 forceReload: Schema.optionalKey(
618 Schema.Boolean.annotate({
619 description: "When true, bypass the skills cache and re-scan skills from disk.",
620 }),
621 ),
622 }).annotate({ identifier: "ClientRequest__SkillsListParams" });
623
624 export type ClientRequest__AbsolutePathBuf = string;
625 export const ClientRequest__AbsolutePathBuf = Schema.String.annotate({
626 description:
627 "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.",
628 identifier: "ClientRequest__AbsolutePathBuf",
629 });
630
631 export type ClientRequest__HooksListParams = { readonly cwds?: ReadonlyArray<string> };
632 export const ClientRequest__HooksListParams = Schema.Struct({
633 cwds: Schema.optionalKey(
634 Schema.Array(Schema.String).annotate({
635 description: "When empty, defaults to the current session working directory.",
636 }),
637 ),
638 }).annotate({ identifier: "ClientRequest__HooksListParams" });
639
640 export type ClientRequest__MarketplaceAddParams = {
641 readonly refName?: string | null;
642 readonly source: string;
643 readonly sparsePaths?: ReadonlyArray<string> | null;
644 };
645 export const ClientRequest__MarketplaceAddParams = Schema.Struct({
646 refName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
647 source: Schema.String,
648 sparsePaths: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
649 }).annotate({ identifier: "ClientRequest__MarketplaceAddParams" });
650
651 export type ClientRequest__MarketplaceRemoveParams = { readonly marketplaceName: string };
652 export const ClientRequest__MarketplaceRemoveParams = Schema.Struct({
653 marketplaceName: Schema.String,
654 }).annotate({ identifier: "ClientRequest__MarketplaceRemoveParams" });
655
656 export type ClientRequest__MarketplaceUpgradeParams = { readonly marketplaceName?: string | null };
657 export const ClientRequest__MarketplaceUpgradeParams = Schema.Struct({
658 marketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
659 }).annotate({ identifier: "ClientRequest__MarketplaceUpgradeParams" });
660
661 export type ClientRequest__PluginListMarketplaceKind =
662 | "local"
663 | "vertical"
664 | "workspace-directory"
665 | "shared-with-me"
666 | "created-by-me-remote";
667 export const ClientRequest__PluginListMarketplaceKind = Schema.Literals([
668 "local",
669 "vertical",
670 "workspace-directory",
671 "shared-with-me",
672 "created-by-me-remote",
673 ]).annotate({ identifier: "ClientRequest__PluginListMarketplaceKind" });
674
675 export type ClientRequest__PluginReconcileParams = { readonly reason?: string | null };
676 export const ClientRequest__PluginReconcileParams = Schema.Struct({
677 reason: Schema.optionalKey(
678 Schema.Union([
679 Schema.String.annotate({
680 description: "Optional client-provided reason recorded with the reconciliation attempt.",
681 }),
682 Schema.Null,
683 ]),
684 ),
685 }).annotate({ identifier: "ClientRequest__PluginReconcileParams" });
686
687 export type ClientRequest__PluginSkillReadParams = {
688 readonly remoteMarketplaceName: string;
689 readonly remotePluginId: string;
690 readonly skillName: string;
691 };
692 export const ClientRequest__PluginSkillReadParams = Schema.Struct({
693 remoteMarketplaceName: Schema.String,
694 remotePluginId: Schema.String,
695 skillName: Schema.String,
696 }).annotate({ identifier: "ClientRequest__PluginSkillReadParams" });
697
698 export type ClientRequest__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
699 export const ClientRequest__PluginShareDiscoverability = Schema.Literals([
700 "LISTED",
701 "UNLISTED",
702 "PRIVATE",
703 ]).annotate({ identifier: "ClientRequest__PluginShareDiscoverability" });
704
705 export type ClientRequest__PluginSharePrincipalType = "user" | "group" | "workspace";
706 export const ClientRequest__PluginSharePrincipalType = Schema.Literals([
707 "user",
708 "group",
709 "workspace",
710 ]).annotate({ identifier: "ClientRequest__PluginSharePrincipalType" });
711
712 export type ClientRequest__PluginShareTargetRole = "reader" | "editor";
713 export const ClientRequest__PluginShareTargetRole = Schema.Literals(["reader", "editor"]).annotate({
714 identifier: "ClientRequest__PluginShareTargetRole",
715 });
716
717 export type ClientRequest__PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE" | "LISTED";
718 export const ClientRequest__PluginShareUpdateDiscoverability = Schema.Literals([
719 "UNLISTED",
720 "PRIVATE",
721 "LISTED",
722 ]).annotate({ identifier: "ClientRequest__PluginShareUpdateDiscoverability" });
723
724 export type ClientRequest__PluginShareListParams = { readonly [x: string]: Schema.Json };
725 export const ClientRequest__PluginShareListParams = Schema.Record(
726 Schema.String,
727 Schema.Json.annotate({ expected: "JSON value" }),
728 ).annotate({ identifier: "ClientRequest__PluginShareListParams" });
729
730 export type ClientRequest__PluginShareCheckoutParams = { readonly remotePluginId: string };
731 export const ClientRequest__PluginShareCheckoutParams = Schema.Struct({
732 remotePluginId: Schema.String,
733 }).annotate({ identifier: "ClientRequest__PluginShareCheckoutParams" });
734
735 export type ClientRequest__PluginShareDeleteParams = { readonly remotePluginId: string };
736 export const ClientRequest__PluginShareDeleteParams = Schema.Struct({
737 remotePluginId: Schema.String,
738 }).annotate({ identifier: "ClientRequest__PluginShareDeleteParams" });
739
740 export type ClientRequest__AppsReadParams = {
741 readonly appIds: ReadonlyArray<string>;
742 readonly includeTools?: boolean;
743 readonly threadId?: string | null;
744 };
745 export const ClientRequest__AppsReadParams = Schema.Struct({
746 appIds: Schema.Array(Schema.String).annotate({
747 description:
748 "App ids to read. The server accepts at most 100 ids and deduplicates repeated ids while preserving their first-request order.",
749 }),
750 includeTools: Schema.optionalKey(
751 Schema.Boolean.annotate({
752 description:
753 "When true, include display-only public tool summaries in the returned metadata.",
754 }),
755 ),
756 threadId: Schema.optionalKey(
757 Schema.Union([
758 Schema.String.annotate({
759 description: "Optional loaded thread id used to evaluate effective app configuration.",
760 }),
761 Schema.Null,
762 ]),
763 ),
764 }).annotate({
765 description: "EXPERIMENTAL - read metadata for specific apps/connectors.",
766 identifier: "ClientRequest__AppsReadParams",
767 });
768
769 export type ClientRequest__AppsListParams = {
770 readonly cursor?: string | null;
771 readonly forceRefetch?: boolean;
772 readonly limit?: number | null;
773 readonly threadId?: string | null;
774 };
775 export const ClientRequest__AppsListParams = Schema.Struct({
776 cursor: Schema.optionalKey(
777 Schema.Union([
778 Schema.String.annotate({
779 description: "Opaque pagination cursor returned by a previous call.",
780 }),
781 Schema.Null,
782 ]),
783 ),
784 forceRefetch: Schema.optionalKey(
785 Schema.Boolean.annotate({
786 description: "When true, bypass app caches and fetch the latest data from sources.",
787 }),
788 ),
789 limit: Schema.optionalKey(
790 Schema.Union([
791 Schema.Number.annotate({
792 description: "Optional page size; defaults to a reasonable server-side value.",
793 format: "uint32",
794 })
795 .check(Schema.isInt().annotate({ expected: "an integer" }))
796 .check(
797 Schema.isGreaterThanOrEqualTo(0).annotate({
798 expected: "a value greater than or equal to 0",
799 }),
800 ),
801 Schema.Null,
802 ]),
803 ),
804 threadId: Schema.optionalKey(
805 Schema.Union([
806 Schema.String.annotate({
807 description:
808 "Optional thread id used to evaluate app feature gating from that thread's config.",
809 }),
810 Schema.Null,
811 ]),
812 ),
813 }).annotate({
814 description: "EXPERIMENTAL - list available apps/connectors.",
815 identifier: "ClientRequest__AppsListParams",
816 });
817
818 export type ClientRequest__AppsInstalledParams = {
819 readonly forceRefresh?: boolean;
820 readonly threadId?: string | null;
821 };
822 export const ClientRequest__AppsInstalledParams = Schema.Struct({
823 forceRefresh: Schema.optionalKey(
824 Schema.Boolean.annotate({
825 description:
826 "When true and Apps are permitted, refresh and publish the hosted connector runtime tool snapshot first.",
827 }),
828 ),
829 threadId: Schema.optionalKey(
830 Schema.Union([
831 Schema.String.annotate({
832 description: "Optional loaded thread id used to evaluate effective app configuration.",
833 }),
834 Schema.Null,
835 ]),
836 ),
837 }).annotate({
838 description: "Read the committed installed connector runtime snapshot.",
839 identifier: "ClientRequest__AppsInstalledParams",
840 });
841
842 export type ClientRequest__FsUnwatchParams = { readonly watchId: string };
843 export const ClientRequest__FsUnwatchParams = Schema.Struct({
844 watchId: Schema.String.annotate({
845 description: "Watch identifier previously provided to `fs/watch`.",
846 }),
847 }).annotate({
848 description: "Stop filesystem watch notifications for a prior `fs/watch`.",
849 identifier: "ClientRequest__FsUnwatchParams",
850 });
851
852 export type ClientRequest__PluginUninstallParams = { readonly pluginId: string };
853 export const ClientRequest__PluginUninstallParams = Schema.Struct({
854 pluginId: Schema.String,
855 }).annotate({ identifier: "ClientRequest__PluginUninstallParams" });
856
857 export type ClientRequest__ReasoningEffort = string;
858 export const ClientRequest__ReasoningEffort = Schema.String.annotate({
859 description: "A non-empty reasoning effort value advertised by the model.",
860 }).check(
861 Schema.isMinLength(1).annotate({
862 expected: "a value with a length of at least 1",
863 identifier: "ClientRequest__ReasoningEffort",
864 }),
865 );
866
867 export type ClientRequest__ByteRange = { readonly end: number; readonly start: number };
868 export const ClientRequest__ByteRange = Schema.Struct({
869 end: Schema.Number.annotate({ format: "uint" })
870 .check(Schema.isInt().annotate({ expected: "an integer" }))
871 .check(
872 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
873 ),
874 start: Schema.Number.annotate({ format: "uint" })
875 .check(Schema.isInt().annotate({ expected: "an integer" }))
876 .check(
877 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
878 ),
879 }).annotate({ identifier: "ClientRequest__ByteRange" });
880
881 export type ClientRequest__ImageDetail = "auto" | "low" | "high" | "original";
882 export const ClientRequest__ImageDetail = Schema.Literals([
883 "auto",
884 "low",
885 "high",
886 "original",
887 ]).annotate({ identifier: "ClientRequest__ImageDetail" });
888
889 export type ClientRequest__NetworkAccess = "restricted" | "enabled";
890 export const ClientRequest__NetworkAccess = Schema.Literals(["restricted", "enabled"]).annotate({
891 identifier: "ClientRequest__NetworkAccess",
892 });
893
894 export type ClientRequest__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
895 export const ClientRequest__ReasoningSummary = Schema.Union(
896 [
897 Schema.Literals(["auto", "concise", "detailed"]),
898 Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
899 ],
900 { mode: "oneOf" },
901 ).annotate({
902 description:
903 "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",
904 identifier: "ClientRequest__ReasoningSummary",
905 });
906
907 export type ClientRequest__TurnInterruptParams = {
908 readonly threadId: string;
909 readonly turnId: string;
910 };
911 export const ClientRequest__TurnInterruptParams = Schema.Struct({
912 threadId: Schema.String,
913 turnId: Schema.String,
914 }).annotate({ identifier: "ClientRequest__TurnInterruptParams" });
915
916 export type ClientRequest__ReviewDelivery = "inline" | "detached";
917 export const ClientRequest__ReviewDelivery = Schema.Literals(["inline", "detached"]).annotate({
918 identifier: "ClientRequest__ReviewDelivery",
919 });
920
921 export type ClientRequest__ReviewTarget =
922 | { readonly type: "uncommittedChanges" }
923 | { readonly branch: string; readonly type: "baseBranch" }
924 | { readonly sha: string; readonly title?: string | null; readonly type: "commit" }
925 | { readonly instructions: string; readonly type: "custom" };
926 export const ClientRequest__ReviewTarget = Schema.Union(
927 [
928 Schema.Struct({
929 type: Schema.Literal("uncommittedChanges").annotate({
930 title: "UncommittedChangesReviewTargetType",
931 }),
932 }).annotate({
933 title: "UncommittedChangesReviewTarget",
934 description: "Review the working tree: staged, unstaged, and untracked files.",
935 }),
936 Schema.Struct({
937 branch: Schema.String,
938 type: Schema.Literal("baseBranch").annotate({ title: "BaseBranchReviewTargetType" }),
939 }).annotate({
940 title: "BaseBranchReviewTarget",
941 description: "Review changes between the current branch and the given base branch.",
942 }),
943 Schema.Struct({
944 sha: Schema.String,
945 title: Schema.optionalKey(
946 Schema.Union([
947 Schema.String.annotate({
948 description: "Optional human-readable label (e.g., commit subject) for UIs.",
949 }),
950 Schema.Null,
951 ]),
952 ),
953 type: Schema.Literal("commit").annotate({ title: "CommitReviewTargetType" }),
954 }).annotate({
955 title: "CommitReviewTarget",
956 description: "Review the changes introduced by a specific commit.",
957 }),
958 Schema.Struct({
959 instructions: Schema.String,
960 type: Schema.Literal("custom").annotate({ title: "CustomReviewTargetType" }),
961 }).annotate({
962 title: "CustomReviewTarget",
963 description: "Arbitrary instructions, equivalent to the old free-form prompt.",
964 }),
965 ],
966 { mode: "oneOf" },
967 ).annotate({ identifier: "ClientRequest__ReviewTarget" });
968
969 export type ClientRequest__ModelListParams = {
970 readonly cursor?: string | null;
971 readonly includeHidden?: boolean | null;
972 readonly limit?: number | null;
973 };
974 export const ClientRequest__ModelListParams = Schema.Struct({
975 cursor: Schema.optionalKey(
976 Schema.Union([
977 Schema.String.annotate({
978 description: "Opaque pagination cursor returned by a previous call.",
979 }),
980 Schema.Null,
981 ]),
982 ),
983 includeHidden: Schema.optionalKey(
984 Schema.Union([
985 Schema.Boolean.annotate({
986 description: "When true, include models that are hidden from the default picker list.",
987 }),
988 Schema.Null,
989 ]),
990 ),
991 limit: Schema.optionalKey(
992 Schema.Union([
993 Schema.Number.annotate({
994 description: "Optional page size; defaults to a reasonable server-side value.",
995 format: "uint32",
996 })
997 .check(Schema.isInt().annotate({ expected: "an integer" }))
998 .check(
999 Schema.isGreaterThanOrEqualTo(0).annotate({
1000 expected: "a value greater than or equal to 0",
1001 }),
1002 ),
1003 Schema.Null,
1004 ]),
1005 ),
1006 }).annotate({ identifier: "ClientRequest__ModelListParams" });
1007
1008 export type ClientRequest__ModelProviderCapabilitiesReadParams = {
1009 readonly [x: string]: Schema.Json;
1010 };
1011 export const ClientRequest__ModelProviderCapabilitiesReadParams = Schema.Record(
1012 Schema.String,
1013 Schema.Json.annotate({ expected: "JSON value" }),
1014 ).annotate({ identifier: "ClientRequest__ModelProviderCapabilitiesReadParams" });
1015
1016 export type ClientRequest__ExperimentalFeatureListParams = {
1017 readonly cursor?: string | null;
1018 readonly limit?: number | null;
1019 readonly threadId?: string | null;
1020 };
1021 export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({
1022 cursor: Schema.optionalKey(
1023 Schema.Union([
1024 Schema.String.annotate({
1025 description: "Opaque pagination cursor returned by a previous call.",
1026 }),
1027 Schema.Null,
1028 ]),
1029 ),
1030 limit: Schema.optionalKey(
1031 Schema.Union([
1032 Schema.Number.annotate({
1033 description: "Optional page size; defaults to a reasonable server-side value.",
1034 format: "uint32",
1035 })
1036 .check(Schema.isInt().annotate({ expected: "an integer" }))
1037 .check(
1038 Schema.isGreaterThanOrEqualTo(0).annotate({
1039 expected: "a value greater than or equal to 0",
1040 }),
1041 ),
1042 Schema.Null,
1043 ]),
1044 ),
1045 threadId: Schema.optionalKey(
1046 Schema.Union([
1047 Schema.String.annotate({
1048 description:
1049 "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.",
1050 }),
1051 Schema.Null,
1052 ]),
1053 ),
1054 }).annotate({ identifier: "ClientRequest__ExperimentalFeatureListParams" });
1055
1056 export type ClientRequest__PermissionProfileListParams = {
1057 readonly cursor?: string | null;
1058 readonly cwd?: string | null;
1059 readonly limit?: number | null;
1060 };
1061 export const ClientRequest__PermissionProfileListParams = Schema.Struct({
1062 cursor: Schema.optionalKey(
1063 Schema.Union([
1064 Schema.String.annotate({
1065 description: "Opaque pagination cursor returned by a previous call.",
1066 }),
1067 Schema.Null,
1068 ]),
1069 ),
1070 cwd: Schema.optionalKey(
1071 Schema.Union([
1072 Schema.String.annotate({
1073 description: "Optional working directory to resolve project config layers.",
1074 }),
1075 Schema.Null,
1076 ]),
1077 ),
1078 limit: Schema.optionalKey(
1079 Schema.Union([
1080 Schema.Number.annotate({
1081 description: "Optional page size; defaults to the full result set.",
1082 format: "uint32",
1083 })
1084 .check(Schema.isInt().annotate({ expected: "an integer" }))
1085 .check(
1086 Schema.isGreaterThanOrEqualTo(0).annotate({
1087 expected: "a value greater than or equal to 0",
1088 }),
1089 ),
1090 Schema.Null,
1091 ]),
1092 ),
1093 }).annotate({ identifier: "ClientRequest__PermissionProfileListParams" });
1094
1095 export type ClientRequest__ExperimentalFeatureEnablementSetParams = {
1096 readonly enablement: { readonly [x: string]: boolean };
1097 };
1098 export const ClientRequest__ExperimentalFeatureEnablementSetParams = Schema.Struct({
1099 enablement: Schema.Record(Schema.String, Schema.Boolean).annotate({
1100 description:
1101 "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.",
1102 }),
1103 }).annotate({ identifier: "ClientRequest__ExperimentalFeatureEnablementSetParams" });
1104
1105 export type ClientRequest__McpServerOauthClientRegistration = "auto" | "cimd" | "dcr";
1106 export const ClientRequest__McpServerOauthClientRegistration = Schema.Literals([
1107 "auto",
1108 "cimd",
1109 "dcr",
1110 ]).annotate({ identifier: "ClientRequest__McpServerOauthClientRegistration" });
1111
1112 export type ClientRequest__McpServerStatusDetail = "full" | "toolsAndAuthOnly";
1113 export const ClientRequest__McpServerStatusDetail = Schema.Literals([
1114 "full",
1115 "toolsAndAuthOnly",
1116 ]).annotate({ identifier: "ClientRequest__McpServerStatusDetail" });
1117
1118 export type ClientRequest__McpResourceReadTarget = {
1119 readonly connectorId: string;
1120 readonly linkId: string | null;
1121 };
1122 export const ClientRequest__McpResourceReadTarget = Schema.Struct({
1123 connectorId: Schema.String,
1124 linkId: Schema.Union([
1125 Schema.String.annotate({
1126 description: "Null explicitly requests no-auth access, subject to the app's resource policy.",
1127 }),
1128 Schema.Null,
1129 ]),
1130 }).annotate({ identifier: "ClientRequest__McpResourceReadTarget" });
1131
1132 export type ClientRequest__McpServerToolCallParams = {
1133 readonly _meta?: Schema.Json;
1134 readonly arguments?: Schema.Json;
1135 readonly server: string;
1136 readonly threadId: string;
1137 readonly tool: string;
1138 };
1139 export const ClientRequest__McpServerToolCallParams = Schema.Struct({
1140 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
1141 arguments: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
1142 server: Schema.String,
1143 threadId: Schema.String,
1144 tool: Schema.String,
1145 }).annotate({ identifier: "ClientRequest__McpServerToolCallParams" });
1146
1147 export type ClientRequest__WindowsSandboxSetupMode = "elevated" | "unelevated";
1148 export const ClientRequest__WindowsSandboxSetupMode = Schema.Literals([
1149 "elevated",
1150 "unelevated",
1151 ]).annotate({ identifier: "ClientRequest__WindowsSandboxSetupMode" });
1152
1153 export type ClientRequest__LoginAppBrand = "codex" | "chatgpt";
1154 export const ClientRequest__LoginAppBrand = Schema.Literals(["codex", "chatgpt"]).annotate({
1155 identifier: "ClientRequest__LoginAppBrand",
1156 });
1157
1158 export type ClientRequest__CancelLoginAccountParams = { readonly loginId: string };
1159 export const ClientRequest__CancelLoginAccountParams = Schema.Struct({
1160 loginId: Schema.String,
1161 }).annotate({ identifier: "ClientRequest__CancelLoginAccountParams" });
1162
1163 export type ClientRequest__GetAccountRateLimitsParams = {
1164 readonly excludeResetCreditDetails?: boolean;
1165 readonly supportsLunaReserve?: boolean;
1166 };
1167 export const ClientRequest__GetAccountRateLimitsParams = Schema.Struct({
1168 excludeResetCreditDetails: Schema.optionalKey(
1169 Schema.Boolean.annotate({
1170 description:
1171 "Skip the separate reset-credit detail lookup for background usage polls. The usage response still includes the available count; omitted/false preserves detailed reads.",
1172 }),
1173 ),
1174 supportsLunaReserve: Schema.optionalKey(
1175 Schema.Boolean.annotate({
1176 description:
1177 "The client supports automatic Luna Reserve fallback. For eligible ChatGPT CLI users, allow the backend to record experiment exposure after ordinary usage is blocked.",
1178 }),
1179 ),
1180 }).annotate({
1181 description:
1182 "Usage-read capabilities of the requesting client, never inferred from its experiment arm.",
1183 identifier: "ClientRequest__GetAccountRateLimitsParams",
1184 });
1185
1186 export type ClientRequest__ConsumeAccountRateLimitResetCreditParams = {
1187 readonly creditId?: string | null;
1188 readonly idempotencyKey: string;
1189 };
1190 export const ClientRequest__ConsumeAccountRateLimitResetCreditParams = Schema.Struct({
1191 creditId: Schema.optionalKey(
1192 Schema.Union([
1193 Schema.String.annotate({
1194 description:
1195 "Opaque reset-credit identifier to redeem. When omitted, the backend selects the next available credit.",
1196 }),
1197 Schema.Null,
1198 ]),
1199 ),
1200 idempotencyKey: Schema.String.annotate({
1201 description:
1202 "Identifies one logical reset attempt. A UUID is recommended; reuse the same value when retrying that attempt.",
1203 }),
1204 }).annotate({ identifier: "ClientRequest__ConsumeAccountRateLimitResetCreditParams" });
1205
1206 export type ClientRequest__GetAccountTokenUsageParams = { readonly threadId?: string | null };
1207 export const ClientRequest__GetAccountTokenUsageParams = Schema.Struct({
1208 threadId: Schema.optionalKey(
1209 Schema.Union([
1210 Schema.String.annotate({
1211 description:
1212 "When present, read estimated usage for this thread instead of account-wide token activity.",
1213 }),
1214 Schema.Null,
1215 ]),
1216 ),
1217 }).annotate({ identifier: "ClientRequest__GetAccountTokenUsageParams" });
1218
1219 export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit";
1220 export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals([
1221 "credits",
1222 "usage_limit",
1223 ]).annotate({ identifier: "ClientRequest__AddCreditsNudgeCreditType" });
1224
1225 export type ClientRequest__FeedbackUploadParams = {
1226 readonly classification: string;
1227 readonly extraLogFiles?: ReadonlyArray<string> | null;
1228 readonly includeLogs?: boolean;
1229 readonly reason?: string | null;
1230 readonly tags?: { readonly [x: string]: string } | null;
1231 readonly threadId?: string | null;
1232 };
1233 export const ClientRequest__FeedbackUploadParams = Schema.Struct({
1234 classification: Schema.String,
1235 extraLogFiles: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1236 includeLogs: Schema.optionalKey(Schema.Boolean),
1237 reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1238 tags: Schema.optionalKey(
1239 Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
1240 ),
1241 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1242 }).annotate({ identifier: "ClientRequest__FeedbackUploadParams" });
1243
1244 export type ClientRequest__CommandExecTerminalSize = {
1245 readonly cols: number;
1246 readonly rows: number;
1247 };
1248 export const ClientRequest__CommandExecTerminalSize = Schema.Struct({
1249 cols: Schema.Number.annotate({
1250 description: "Terminal width in character cells.",
1251 format: "uint16",
1252 })
1253 .check(Schema.isInt().annotate({ expected: "an integer" }))
1254 .check(
1255 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
1256 ),
1257 rows: Schema.Number.annotate({
1258 description: "Terminal height in character cells.",
1259 format: "uint16",
1260 })
1261 .check(Schema.isInt().annotate({ expected: "an integer" }))
1262 .check(
1263 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
1264 ),
1265 }).annotate({
1266 description: "PTY size in character cells for `command/exec` PTY sessions.",
1267 identifier: "ClientRequest__CommandExecTerminalSize",
1268 });
1269
1270 export type ClientRequest__CommandExecWriteParams = {
1271 readonly closeStdin?: boolean;
1272 readonly deltaBase64?: string | null;
1273 readonly processId: string;
1274 };
1275 export const ClientRequest__CommandExecWriteParams = Schema.Struct({
1276 closeStdin: Schema.optionalKey(
1277 Schema.Boolean.annotate({
1278 description: "Close stdin after writing `deltaBase64`, if present.",
1279 }),
1280 ),
1281 deltaBase64: Schema.optionalKey(
1282 Schema.Union([
1283 Schema.String.annotate({ description: "Optional base64-encoded stdin bytes to write." }),
1284 Schema.Null,
1285 ]),
1286 ),
1287 processId: Schema.String.annotate({
1288 description:
1289 "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
1290 }),
1291 }).annotate({
1292 description: "Write stdin bytes to a running `command/exec` session, close stdin, or both.",
1293 identifier: "ClientRequest__CommandExecWriteParams",
1294 });
1295
1296 export type ClientRequest__CommandExecTerminateParams = { readonly processId: string };
1297 export const ClientRequest__CommandExecTerminateParams = Schema.Struct({
1298 processId: Schema.String.annotate({
1299 description:
1300 "Client-supplied, connection-scoped `processId` from the original `command/exec` request.",
1301 }),
1302 }).annotate({
1303 description: "Terminate a running `command/exec` session.",
1304 identifier: "ClientRequest__CommandExecTerminateParams",
1305 });
1306
1307 export type ClientRequest__ConfigReadParams = {
1308 readonly cwd?: string | null;
1309 readonly includeLayers?: boolean;
1310 };
1311 export const ClientRequest__ConfigReadParams = Schema.Struct({
1312 cwd: Schema.optionalKey(
1313 Schema.Union([
1314 Schema.String.annotate({
1315 description:
1316 "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).",
1317 }),
1318 Schema.Null,
1319 ]),
1320 ),
1321 includeLayers: Schema.optionalKey(Schema.Boolean),
1322 }).annotate({ identifier: "ClientRequest__ConfigReadParams" });
1323
1324 export type ClientRequest__ExternalAgentConfigDetectParams = {
1325 readonly cwds?: ReadonlyArray<string> | null;
1326 readonly includeHome?: boolean;
1327 readonly maxSessionAgeDays?: number | null;
1328 readonly maxSessions?: number | null;
1329 readonly migrationSource?: string | null;
1330 readonly source?: string | null;
1331 };
1332 export const ClientRequest__ExternalAgentConfigDetectParams = Schema.Struct({
1333 cwds: Schema.optionalKey(
1334 Schema.Union([
1335 Schema.Array(Schema.String).annotate({
1336 description: "Zero or more working directories to include for repo-scoped detection.",
1337 }),
1338 Schema.Null,
1339 ]),
1340 ),
1341 includeHome: Schema.optionalKey(
1342 Schema.Boolean.annotate({
1343 description: "If true, include detection under the user's home directory.",
1344 }),
1345 ),
1346 maxSessionAgeDays: Schema.optionalKey(
1347 Schema.Union([
1348 Schema.Number.annotate({
1349 description:
1350 "Maximum age in days for detected sessions. Missing values use the default limit.",
1351 format: "uint32",
1352 })
1353 .check(Schema.isInt().annotate({ expected: "an integer" }))
1354 .check(
1355 Schema.isGreaterThanOrEqualTo(0).annotate({
1356 expected: "a value greater than or equal to 0",
1357 }),
1358 ),
1359 Schema.Null,
1360 ]),
1361 ),
1362 maxSessions: Schema.optionalKey(
1363 Schema.Union([
1364 Schema.Number.annotate({
1365 description: "Maximum number of sessions to detect. Missing values use the default limit.",
1366 format: "uint32",
1367 })
1368 .check(Schema.isInt().annotate({ expected: "an integer" }))
1369 .check(
1370 Schema.isGreaterThanOrEqualTo(0).annotate({
1371 expected: "a value greater than or equal to 0",
1372 }),
1373 ),
1374 Schema.Null,
1375 ]),
1376 ),
1377 migrationSource: Schema.optionalKey(
1378 Schema.Union([
1379 Schema.String.annotate({
1380 description:
1381 "Optional migration-source selector. Missing or unrecognized values use the default source.",
1382 }),
1383 Schema.Null,
1384 ]),
1385 ),
1386 source: Schema.optionalKey(
1387 Schema.Union([
1388 Schema.String.annotate({
1389 description:
1390 "Deprecated field retained for compatibility. This field is ignored; use `migrationSource` to select the migration source.",
1391 }),
1392 Schema.Null,
1393 ]),
1394 ),
1395 }).annotate({ identifier: "ClientRequest__ExternalAgentConfigDetectParams" });
1396
1397 export type ClientRequest__CommandMigration = { readonly name: string };
1398 export const ClientRequest__CommandMigration = Schema.Struct({ name: Schema.String }).annotate({
1399 identifier: "ClientRequest__CommandMigration",
1400 });
1401
1402 export type ClientRequest__HookMigration = { readonly name: string };
1403 export const ClientRequest__HookMigration = Schema.Struct({ name: Schema.String }).annotate({
1404 identifier: "ClientRequest__HookMigration",
1405 });
1406
1407 export type ClientRequest__McpServerMigration = { readonly name: string };
1408 export const ClientRequest__McpServerMigration = Schema.Struct({ name: Schema.String }).annotate({
1409 identifier: "ClientRequest__McpServerMigration",
1410 });
1411
1412 export type ClientRequest__PluginsMigration = {
1413 readonly marketplaceName: string;
1414 readonly pluginNames: ReadonlyArray<string>;
1415 };
1416 export const ClientRequest__PluginsMigration = Schema.Struct({
1417 marketplaceName: Schema.String,
1418 pluginNames: Schema.Array(Schema.String),
1419 }).annotate({ identifier: "ClientRequest__PluginsMigration" });
1420
1421 export type ClientRequest__SessionMigration = {
1422 readonly cwd: string;
1423 readonly path: string;
1424 readonly title?: string | null;
1425 };
1426 export const ClientRequest__SessionMigration = Schema.Struct({
1427 cwd: Schema.String,
1428 path: Schema.String,
1429 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1430 }).annotate({ identifier: "ClientRequest__SessionMigration" });
1431
1432 export type ClientRequest__SkillMigration = { readonly name: string };
1433 export const ClientRequest__SkillMigration = Schema.Struct({ name: Schema.String }).annotate({
1434 identifier: "ClientRequest__SkillMigration",
1435 });
1436
1437 export type ClientRequest__SubagentMigration = { readonly name: string };
1438 export const ClientRequest__SubagentMigration = Schema.Struct({ name: Schema.String }).annotate({
1439 identifier: "ClientRequest__SubagentMigration",
1440 });
1441
1442 export type ClientRequest__ExternalAgentConfigMigrationItemType =
1443 | "AGENTS_MD"
1444 | "CONFIG"
1445 | "SKILLS"
1446 | "PLUGINS"
1447 | "MCP_SERVER_CONFIG"
1448 | "SUBAGENTS"
1449 | "HOOKS"
1450 | "COMMANDS"
1451 | "MEMORY"
1452 | "SESSIONS";
1453 export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Literals([
1454 "AGENTS_MD",
1455 "CONFIG",
1456 "SKILLS",
1457 "PLUGINS",
1458 "MCP_SERVER_CONFIG",
1459 "SUBAGENTS",
1460 "HOOKS",
1461 "COMMANDS",
1462 "MEMORY",
1463 "SESSIONS",
1464 ]).annotate({ identifier: "ClientRequest__ExternalAgentConfigMigrationItemType" });
1465
1466 export type ClientRequest__MergeStrategy = "replace" | "upsert";
1467 export const ClientRequest__MergeStrategy = Schema.Literals(["replace", "upsert"]).annotate({
1468 identifier: "ClientRequest__MergeStrategy",
1469 });
1470
1471 export type ClientRequest__GetAccountParams = { readonly refreshToken?: boolean };
1472 export const ClientRequest__GetAccountParams = Schema.Struct({
1473 refreshToken: Schema.optionalKey(
1474 Schema.Boolean.annotate({
1475 description:
1476 "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`.",
1477 }),
1478 ),
1479 }).annotate({ identifier: "ClientRequest__GetAccountParams" });
1480
1481 export type ClientRequest__FuzzyFileSearchParams = {
1482 readonly cancellationToken?: string | null;
1483 readonly query: string;
1484 readonly roots: ReadonlyArray<string>;
1485 };
1486 export const ClientRequest__FuzzyFileSearchParams = Schema.Struct({
1487 cancellationToken: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1488 query: Schema.String,
1489 roots: Schema.Array(Schema.String),
1490 }).annotate({ identifier: "ClientRequest__FuzzyFileSearchParams" });
1491
1492 export type ClientRequest__AdditionalContextKind = "untrusted" | "application";
1493 export const ClientRequest__AdditionalContextKind = Schema.Literals([
1494 "untrusted",
1495 "application",
1496 ]).annotate({ identifier: "ClientRequest__AdditionalContextKind" });
1497
1498 export type ClientRequest__ModeKind = "plan" | "default";
1499 export const ClientRequest__ModeKind = Schema.Literals(["plan", "default"]).annotate({
1500 description: "Initial collaboration mode to use when the TUI starts.",
1501 identifier: "ClientRequest__ModeKind",
1502 });
1503
1504 export type ClientRequest__DynamicToolNamespaceTool = {
1505 readonly deferLoading?: boolean;
1506 readonly description: string;
1507 readonly inputSchema: Schema.Json;
1508 readonly name: string;
1509 readonly type: "function";
1510 };
1511 export const ClientRequest__DynamicToolNamespaceTool = Schema.Union(
1512 [
1513 Schema.Struct({
1514 deferLoading: Schema.optionalKey(Schema.Boolean),
1515 description: Schema.String,
1516 inputSchema: Schema.Json.annotate({ expected: "JSON value" }),
1517 name: Schema.String,
1518 type: Schema.Literal("function").annotate({ title: "FunctionDynamicToolNamespaceToolType" }),
1519 }).annotate({ title: "FunctionDynamicToolNamespaceTool" }),
1520 ],
1521 { mode: "oneOf" },
1522 ).annotate({ identifier: "ClientRequest__DynamicToolNamespaceTool" });
1523
1524 export type ClientRequest__InternalChatMessageMetadataPassthrough = {
1525 readonly turn_id?: string | null;
1526 };
1527 export const ClientRequest__InternalChatMessageMetadataPassthrough = Schema.Struct({
1528 turn_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1529 }).annotate({
1530 description:
1531 "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.",
1532 identifier: "ClientRequest__InternalChatMessageMetadataPassthrough",
1533 });
1534
1535 export type ClientRequest__MessagePhase = "commentary" | "partial_answer" | "final_answer";
1536 export const ClientRequest__MessagePhase = Schema.Union(
1537 [
1538 Schema.Literal("commentary").annotate({
1539 description:
1540 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
1541 }),
1542 Schema.Literal("partial_answer").annotate({
1543 description: "Stable answer text that may be followed by more assistant output or tools.",
1544 }),
1545 Schema.Literal("final_answer").annotate({
1546 description: "The assistant's terminal answer text for the current turn.",
1547 }),
1548 ],
1549 { mode: "oneOf" },
1550 ).annotate({
1551 description:
1552 '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.',
1553 identifier: "ClientRequest__MessagePhase",
1554 });
1555
1556 export type ClientRequest__AgentMessageInputContent =
1557 | { readonly text: string; readonly type: "input_text" }
1558 | { readonly encrypted_content: string; readonly type: "encrypted_content" };
1559 export const ClientRequest__AgentMessageInputContent = Schema.Union(
1560 [
1561 Schema.Struct({
1562 text: Schema.String,
1563 type: Schema.Literal("input_text").annotate({
1564 title: "InputTextAgentMessageInputContentType",
1565 }),
1566 }).annotate({ title: "InputTextAgentMessageInputContent" }),
1567 Schema.Struct({
1568 encrypted_content: Schema.String,
1569 type: Schema.Literal("encrypted_content").annotate({
1570 title: "EncryptedContentAgentMessageInputContentType",
1571 }),
1572 }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
1573 ],
1574 { mode: "oneOf" },
1575 ).annotate({ identifier: "ClientRequest__AgentMessageInputContent" });
1576
1577 export type ClientRequest__ReasoningItemContent =
1578 | { readonly text: string; readonly type: "reasoning_text" }
1579 | { readonly text: string; readonly type: "text" };
1580 export const ClientRequest__ReasoningItemContent = Schema.Union(
1581 [
1582 Schema.Struct({
1583 text: Schema.String,
1584 type: Schema.Literal("reasoning_text").annotate({
1585 title: "ReasoningTextReasoningItemContentType",
1586 }),
1587 }).annotate({ title: "ReasoningTextReasoningItemContent" }),
1588 Schema.Struct({
1589 text: Schema.String,
1590 type: Schema.Literal("text").annotate({ title: "TextReasoningItemContentType" }),
1591 }).annotate({ title: "TextReasoningItemContent" }),
1592 ],
1593 { mode: "oneOf" },
1594 ).annotate({ identifier: "ClientRequest__ReasoningItemContent" });
1595
1596 export type ClientRequest__ReasoningItemReasoningSummary = {
1597 readonly text: string;
1598 readonly type: "summary_text";
1599 };
1600 export const ClientRequest__ReasoningItemReasoningSummary = Schema.Union(
1601 [
1602 Schema.Struct({
1603 text: Schema.String,
1604 type: Schema.Literal("summary_text").annotate({
1605 title: "SummaryTextReasoningItemReasoningSummaryType",
1606 }),
1607 }).annotate({ title: "SummaryTextReasoningItemReasoningSummary" }),
1608 ],
1609 { mode: "oneOf" },
1610 ).annotate({ identifier: "ClientRequest__ReasoningItemReasoningSummary" });
1611
1612 export type ClientRequest__LocalShellAction = {
1613 readonly command: ReadonlyArray<string>;
1614 readonly env?: { readonly [x: string]: string } | null;
1615 readonly timeout_ms?: number | null;
1616 readonly type: "exec";
1617 readonly user?: string | null;
1618 readonly working_directory?: string | null;
1619 };
1620 export const ClientRequest__LocalShellAction = Schema.Union(
1621 [
1622 Schema.Struct({
1623 command: Schema.Array(Schema.String),
1624 env: Schema.optionalKey(
1625 Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
1626 ),
1627 timeout_ms: Schema.optionalKey(
1628 Schema.Union([
1629 Schema.Number.annotate({ format: "uint64" })
1630 .check(Schema.isInt().annotate({ expected: "an integer" }))
1631 .check(
1632 Schema.isGreaterThanOrEqualTo(0).annotate({
1633 expected: "a value greater than or equal to 0",
1634 }),
1635 ),
1636 Schema.Null,
1637 ]),
1638 ),
1639 type: Schema.Literal("exec").annotate({ title: "ExecLocalShellActionType" }),
1640 user: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1641 working_directory: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1642 }).annotate({ title: "ExecLocalShellAction" }),
1643 ],
1644 { mode: "oneOf" },
1645 ).annotate({ identifier: "ClientRequest__LocalShellAction" });
1646
1647 export type ClientRequest__LocalShellStatus = "completed" | "in_progress" | "incomplete";
1648 export const ClientRequest__LocalShellStatus = Schema.Literals([
1649 "completed",
1650 "in_progress",
1651 "incomplete",
1652 ]).annotate({ identifier: "ClientRequest__LocalShellStatus" });
1653
1654 export type ClientRequest__ResponsesApiWebSearchAction =
1655 | {
1656 readonly queries?: ReadonlyArray<string> | null;
1657 readonly query?: string | null;
1658 readonly type: "search";
1659 }
1660 | { readonly type: "open_page"; readonly url?: string | null }
1661 | {
1662 readonly pattern?: string | null;
1663 readonly type: "find_in_page";
1664 readonly url?: string | null;
1665 }
1666 | { readonly type: "other" };
1667 export const ClientRequest__ResponsesApiWebSearchAction = Schema.Union(
1668 [
1669 Schema.Struct({
1670 queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1671 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1672 type: Schema.Literal("search").annotate({ title: "SearchResponsesApiWebSearchActionType" }),
1673 }).annotate({ title: "SearchResponsesApiWebSearchAction" }),
1674 Schema.Struct({
1675 type: Schema.Literal("open_page").annotate({
1676 title: "OpenPageResponsesApiWebSearchActionType",
1677 }),
1678 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1679 }).annotate({ title: "OpenPageResponsesApiWebSearchAction" }),
1680 Schema.Struct({
1681 pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1682 type: Schema.Literal("find_in_page").annotate({
1683 title: "FindInPageResponsesApiWebSearchActionType",
1684 }),
1685 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1686 }).annotate({ title: "FindInPageResponsesApiWebSearchAction" }),
1687 Schema.Struct({
1688 type: Schema.Literal("other").annotate({ title: "OtherResponsesApiWebSearchActionType" }),
1689 }).annotate({ title: "OtherResponsesApiWebSearchAction" }),
1690 ],
1691 { mode: "oneOf" },
1692 ).annotate({ identifier: "ClientRequest__ResponsesApiWebSearchAction" });
1693
1694 export type ClientRequest__CapabilityRootLocation = {
1695 readonly environmentId: string;
1696 readonly path: string;
1697 readonly type: "environment";
1698 };
1699 export const ClientRequest__CapabilityRootLocation = Schema.Union(
1700 [
1701 Schema.Struct({
1702 environmentId: Schema.String,
1703 path: Schema.String.annotate({
1704 description: "Absolute path for the root in the selected environment.",
1705 }),
1706 type: Schema.Literal("environment").annotate({
1707 title: "EnvironmentCapabilityRootLocationType",
1708 }),
1709 }).annotate({
1710 title: "EnvironmentCapabilityRootLocation",
1711 description: "A path owned by an execution environment.",
1712 }),
1713 ],
1714 { mode: "oneOf" },
1715 ).annotate({
1716 description: "Location used to resolve a selected capability root.",
1717 identifier: "ClientRequest__CapabilityRootLocation",
1718 });
1719
1720 export type ClientRequest__ConversationTextRole = "user" | "developer" | "assistant";
1721 export const ClientRequest__ConversationTextRole = Schema.Literals([
1722 "user",
1723 "developer",
1724 "assistant",
1725 ]).annotate({ identifier: "ClientRequest__ConversationTextRole" });
1726
1727 export type ClientRequest__LegacyAppPathString = string;
1728 export const ClientRequest__LegacyAppPathString = Schema.String.annotate({
1729 identifier: "ClientRequest__LegacyAppPathString",
1730 });
1731
1732 export type CommandExecutionRequestApprovalParams__LegacyAppPathString = string;
1733 export const CommandExecutionRequestApprovalParams__LegacyAppPathString = Schema.String.annotate({
1734 identifier: "CommandExecutionRequestApprovalParams__LegacyAppPathString",
1735 });
1736
1737 export type CommandExecutionRequestApprovalParams__CommandExecutionApprovalKind =
1738 | "command"
1739 | "writeStdin";
1740 export const CommandExecutionRequestApprovalParams__CommandExecutionApprovalKind = Schema.Literals([
1741 "command",
1742 "writeStdin",
1743 ]).annotate({
1744 description: "Distinguishes a command approval from input sent to an existing terminal.",
1745 identifier: "CommandExecutionRequestApprovalParams__CommandExecutionApprovalKind",
1746 });
1747
1748 export type CommandExecutionRequestApprovalParams__NetworkApprovalProtocol =
1749 | "http"
1750 | "https"
1751 | "socks5Tcp"
1752 | "socks5Udp";
1753 export const CommandExecutionRequestApprovalParams__NetworkApprovalProtocol = Schema.Literals([
1754 "http",
1755 "https",
1756 "socks5Tcp",
1757 "socks5Udp",
1758 ]).annotate({ identifier: "CommandExecutionRequestApprovalParams__NetworkApprovalProtocol" });
1759
1760 export type CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction = "allow" | "deny";
1761 export const CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction = Schema.Literals([
1762 "allow",
1763 "deny",
1764 ]).annotate({ identifier: "CommandExecutionRequestApprovalParams__NetworkPolicyRuleAction" });
1765
1766 export type CommandExecutionRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
1767 export const CommandExecutionRequestApprovalParams__FileSystemAccessMode = Schema.Literals([
1768 "read",
1769 "write",
1770 "deny",
1771 ]).annotate({ identifier: "CommandExecutionRequestApprovalParams__FileSystemAccessMode" });
1772
1773 export type CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = {
1774 readonly enabled?: boolean | null;
1775 };
1776 export const CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
1777 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1778 }).annotate({ identifier: "CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions" });
1779
1780 export type CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";
1781 export const CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([
1782 "allow",
1783 "deny",
1784 ]).annotate({ identifier: "CommandExecutionRequestApprovalResponse__NetworkPolicyRuleAction" });
1785
1786 export type DynamicToolCallResponse__DynamicToolCallOutputContentItem =
1787 | { readonly text: string; readonly type: "inputText" }
1788 | { readonly imageUrl: string; readonly type: "inputImage" }
1789 | { readonly audioUrl: string; readonly type: "inputAudio" };
1790 export const DynamicToolCallResponse__DynamicToolCallOutputContentItem = Schema.Union(
1791 [
1792 Schema.Struct({
1793 text: Schema.String,
1794 type: Schema.Literal("inputText").annotate({
1795 title: "InputTextDynamicToolCallOutputContentItemType",
1796 }),
1797 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
1798 Schema.Struct({
1799 imageUrl: Schema.String,
1800 type: Schema.Literal("inputImage").annotate({
1801 title: "InputImageDynamicToolCallOutputContentItemType",
1802 }),
1803 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
1804 Schema.Struct({
1805 audioUrl: Schema.String,
1806 type: Schema.Literal("inputAudio").annotate({
1807 title: "InputAudioDynamicToolCallOutputContentItemType",
1808 }),
1809 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
1810 ],
1811 { mode: "oneOf" },
1812 ).annotate({ identifier: "DynamicToolCallResponse__DynamicToolCallOutputContentItem" });
1813
1814 export type ExecCommandApprovalParams__ThreadId = string;
1815 export const ExecCommandApprovalParams__ThreadId = Schema.String.annotate({
1816 identifier: "ExecCommandApprovalParams__ThreadId",
1817 });
1818
1819 export type ExecCommandApprovalParams__ParsedCommand =
1820 | { readonly cmd: string; readonly name: string; readonly path: string; readonly type: "read" }
1821 | { readonly cmd: string; readonly path?: string | null; readonly type: "list_files" }
1822 | {
1823 readonly cmd: string;
1824 readonly path?: string | null;
1825 readonly query?: string | null;
1826 readonly type: "search";
1827 }
1828 | { readonly cmd: string; readonly type: "unknown" };
1829 export const ExecCommandApprovalParams__ParsedCommand = Schema.Union(
1830 [
1831 Schema.Struct({
1832 cmd: Schema.String,
1833 name: Schema.String,
1834 path: Schema.String.annotate({
1835 description:
1836 "(Best effort) Path to the file being read by the command. When possible, this is an absolute path, though when relative, it should be resolved against the `cwd`` that will be used to run the command to derive the absolute path.",
1837 }),
1838 type: Schema.Literal("read").annotate({ title: "ReadParsedCommandType" }),
1839 }).annotate({ title: "ReadParsedCommand" }),
1840 Schema.Struct({
1841 cmd: Schema.String,
1842 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1843 type: Schema.Literal("list_files").annotate({ title: "ListFilesParsedCommandType" }),
1844 }).annotate({ title: "ListFilesParsedCommand" }),
1845 Schema.Struct({
1846 cmd: Schema.String,
1847 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1848 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1849 type: Schema.Literal("search").annotate({ title: "SearchParsedCommandType" }),
1850 }).annotate({ title: "SearchParsedCommand" }),
1851 Schema.Struct({
1852 cmd: Schema.String,
1853 type: Schema.Literal("unknown").annotate({ title: "UnknownParsedCommandType" }),
1854 }).annotate({ title: "UnknownParsedCommand" }),
1855 ],
1856 { mode: "oneOf" },
1857 ).annotate({ identifier: "ExecCommandApprovalParams__ParsedCommand" });
1858
1859 export type ExecCommandApprovalResponse__NetworkPolicyRuleAction = "allow" | "deny";
1860 export const ExecCommandApprovalResponse__NetworkPolicyRuleAction = Schema.Literals([
1861 "allow",
1862 "deny",
1863 ]).annotate({ identifier: "ExecCommandApprovalResponse__NetworkPolicyRuleAction" });
1864
1865 export type FileChangeRequestApprovalResponse__FileChangeApprovalDecision =
1866 | "accept"
1867 | "acceptForSession"
1868 | "decline"
1869 | "cancel";
1870 export const FileChangeRequestApprovalResponse__FileChangeApprovalDecision = Schema.Union(
1871 [
1872 Schema.Literal("accept").annotate({ description: "User approved the file changes." }),
1873 Schema.Literal("acceptForSession").annotate({
1874 description:
1875 "User approved the file changes and future changes to the same files should run without prompting.",
1876 }),
1877 Schema.Literal("decline").annotate({
1878 description: "User denied the file changes. The agent will continue the turn.",
1879 }),
1880 Schema.Literal("cancel").annotate({
1881 description: "User denied the file changes. The turn will also be immediately interrupted.",
1882 }),
1883 ],
1884 { mode: "oneOf" },
1885 ).annotate({ identifier: "FileChangeRequestApprovalResponse__FileChangeApprovalDecision" });
1886
1887 export type FuzzyFileSearchResponse__FuzzyFileSearchMatchType = "file" | "directory";
1888 export const FuzzyFileSearchResponse__FuzzyFileSearchMatchType = Schema.Literals([
1889 "file",
1890 "directory",
1891 ]).annotate({ identifier: "FuzzyFileSearchResponse__FuzzyFileSearchMatchType" });
1892
1893 export type FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType =
1894 | "file"
1895 | "directory";
1896 export const FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType = Schema.Literals([
1897 "file",
1898 "directory",
1899 ]).annotate({ identifier: "FuzzyFileSearchSessionUpdatedNotification__FuzzyFileSearchMatchType" });
1900
1901 export type JSONRPCError__JSONRPCErrorError = {
1902 readonly code: number;
1903 readonly data?: Schema.Json;
1904 readonly message: string;
1905 };
1906 export const JSONRPCError__JSONRPCErrorError = Schema.Struct({
1907 code: Schema.Number.annotate({ format: "int64" }).check(
1908 Schema.isInt().annotate({ expected: "an integer" }),
1909 ),
1910 data: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
1911 message: Schema.String,
1912 }).annotate({ identifier: "JSONRPCError__JSONRPCErrorError" });
1913
1914 export type JSONRPCError__RequestId = string | number;
1915 export const JSONRPCError__RequestId = Schema.Union([
1916 Schema.String,
1917 Schema.Number.annotate({ format: "int64" }).check(
1918 Schema.isInt().annotate({ expected: "an integer" }),
1919 ),
1920 ]).annotate({ identifier: "JSONRPCError__RequestId" });
1921
1922 export type JSONRPCMessage__RequestId = string | number;
1923 export const JSONRPCMessage__RequestId = Schema.Union([
1924 Schema.String,
1925 Schema.Number.annotate({ format: "int64" }).check(
1926 Schema.isInt().annotate({ expected: "an integer" }),
1927 ),
1928 ]).annotate({ identifier: "JSONRPCMessage__RequestId" });
1929
1930 export type JSONRPCMessage__W3cTraceContext = {
1931 readonly traceparent?: string | null;
1932 readonly tracestate?: string | null;
1933 };
1934 export const JSONRPCMessage__W3cTraceContext = Schema.Struct({
1935 traceparent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1936 tracestate: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1937 }).annotate({ identifier: "JSONRPCMessage__W3cTraceContext" });
1938
1939 export type JSONRPCMessage__JSONRPCNotification = {
1940 readonly method: string;
1941 readonly params?: Schema.Json;
1942 };
1943 export const JSONRPCMessage__JSONRPCNotification = Schema.Struct({
1944 method: Schema.String,
1945 params: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
1946 }).annotate({
1947 description: "A notification which does not expect a response.",
1948 identifier: "JSONRPCMessage__JSONRPCNotification",
1949 });
1950
1951 export type JSONRPCMessage__JSONRPCErrorError = {
1952 readonly code: number;
1953 readonly data?: Schema.Json;
1954 readonly message: string;
1955 };
1956 export const JSONRPCMessage__JSONRPCErrorError = Schema.Struct({
1957 code: Schema.Number.annotate({ format: "int64" }).check(
1958 Schema.isInt().annotate({ expected: "an integer" }),
1959 ),
1960 data: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
1961 message: Schema.String,
1962 }).annotate({ identifier: "JSONRPCMessage__JSONRPCErrorError" });
1963
1964 export type JSONRPCRequest__RequestId = string | number;
1965 export const JSONRPCRequest__RequestId = Schema.Union([
1966 Schema.String,
1967 Schema.Number.annotate({ format: "int64" }).check(
1968 Schema.isInt().annotate({ expected: "an integer" }),
1969 ),
1970 ]).annotate({ identifier: "JSONRPCRequest__RequestId" });
1971
1972 export type JSONRPCRequest__W3cTraceContext = {
1973 readonly traceparent?: string | null;
1974 readonly tracestate?: string | null;
1975 };
1976 export const JSONRPCRequest__W3cTraceContext = Schema.Struct({
1977 traceparent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1978 tracestate: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1979 }).annotate({ identifier: "JSONRPCRequest__W3cTraceContext" });
1980
1981 export type JSONRPCResponse__RequestId = string | number;
1982 export const JSONRPCResponse__RequestId = Schema.Union([
1983 Schema.String,
1984 Schema.Number.annotate({ format: "int64" }).check(
1985 Schema.isInt().annotate({ expected: "an integer" }),
1986 ),
1987 ]).annotate({ identifier: "JSONRPCResponse__RequestId" });
1988
1989 export type McpServerElicitationRequestParams__McpElicitationStringType = "string";
1990 export const McpServerElicitationRequestParams__McpElicitationStringType = Schema.Literal(
1991 "string",
1992 ).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationStringType" });
1993
1994 export type McpServerElicitationRequestParams__McpElicitationConstOption = {
1995 readonly const: string;
1996 readonly title: string;
1997 };
1998 export const McpServerElicitationRequestParams__McpElicitationConstOption = Schema.Struct({
1999 const: Schema.String,
2000 title: Schema.String,
2001 }).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationConstOption" });
2002
2003 export type McpServerElicitationRequestParams__McpElicitationArrayType = "array";
2004 export const McpServerElicitationRequestParams__McpElicitationArrayType = Schema.Literal(
2005 "array",
2006 ).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationArrayType" });
2007
2008 export type McpServerElicitationRequestParams__McpElicitationStringFormat =
2009 | "email"
2010 | "uri"
2011 | "date"
2012 | "date-time";
2013 export const McpServerElicitationRequestParams__McpElicitationStringFormat = Schema.Literals([
2014 "email",
2015 "uri",
2016 "date",
2017 "date-time",
2018 ]).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationStringFormat" });
2019
2020 export type McpServerElicitationRequestParams__McpElicitationNumberType = "number" | "integer";
2021 export const McpServerElicitationRequestParams__McpElicitationNumberType = Schema.Literals([
2022 "number",
2023 "integer",
2024 ]).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationNumberType" });
2025
2026 export type McpServerElicitationRequestParams__McpElicitationBooleanType = "boolean";
2027 export const McpServerElicitationRequestParams__McpElicitationBooleanType = Schema.Literal(
2028 "boolean",
2029 ).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationBooleanType" });
2030
2031 export type McpServerElicitationRequestParams__McpElicitationObjectType = "object";
2032 export const McpServerElicitationRequestParams__McpElicitationObjectType = Schema.Literal(
2033 "object",
2034 ).annotate({ identifier: "McpServerElicitationRequestParams__McpElicitationObjectType" });
2035
2036 export type McpServerElicitationRequestResponse__McpServerElicitationAction =
2037 | "accept"
2038 | "decline"
2039 | "cancel";
2040 export const McpServerElicitationRequestResponse__McpServerElicitationAction = Schema.Literals([
2041 "accept",
2042 "decline",
2043 "cancel",
2044 ]).annotate({ identifier: "McpServerElicitationRequestResponse__McpServerElicitationAction" });
2045
2046 export type PermissionsRequestApprovalParams__LegacyAppPathString = string;
2047 export const PermissionsRequestApprovalParams__LegacyAppPathString = Schema.String.annotate({
2048 identifier: "PermissionsRequestApprovalParams__LegacyAppPathString",
2049 });
2050
2051 export type PermissionsRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
2052 export const PermissionsRequestApprovalParams__FileSystemAccessMode = Schema.Literals([
2053 "read",
2054 "write",
2055 "deny",
2056 ]).annotate({ identifier: "PermissionsRequestApprovalParams__FileSystemAccessMode" });
2057
2058 export type PermissionsRequestApprovalParams__AdditionalNetworkPermissions = {
2059 readonly enabled?: boolean | null;
2060 };
2061 export const PermissionsRequestApprovalParams__AdditionalNetworkPermissions = Schema.Struct({
2062 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2063 }).annotate({ identifier: "PermissionsRequestApprovalParams__AdditionalNetworkPermissions" });
2064
2065 export type PermissionsRequestApprovalResponse__FileSystemAccessMode = "read" | "write" | "deny";
2066 export const PermissionsRequestApprovalResponse__FileSystemAccessMode = Schema.Literals([
2067 "read",
2068 "write",
2069 "deny",
2070 ]).annotate({ identifier: "PermissionsRequestApprovalResponse__FileSystemAccessMode" });
2071
2072 export type PermissionsRequestApprovalResponse__LegacyAppPathString = string;
2073 export const PermissionsRequestApprovalResponse__LegacyAppPathString = Schema.String.annotate({
2074 identifier: "PermissionsRequestApprovalResponse__LegacyAppPathString",
2075 });
2076
2077 export type PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = {
2078 readonly enabled?: boolean | null;
2079 };
2080 export const PermissionsRequestApprovalResponse__AdditionalNetworkPermissions = Schema.Struct({
2081 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2082 }).annotate({ identifier: "PermissionsRequestApprovalResponse__AdditionalNetworkPermissions" });
2083
2084 export type PermissionsRequestApprovalResponse__PermissionGrantScope = "turn" | "session";
2085 export const PermissionsRequestApprovalResponse__PermissionGrantScope = Schema.Literals([
2086 "turn",
2087 "session",
2088 ]).annotate({ identifier: "PermissionsRequestApprovalResponse__PermissionGrantScope" });
2089
2090 export type ServerNotification__NonSteerableTurnKind = "review" | "compact";
2091 export const ServerNotification__NonSteerableTurnKind = Schema.Literals([
2092 "review",
2093 "compact",
2094 ]).annotate({ identifier: "ServerNotification__NonSteerableTurnKind" });
2095
2096 export type ServerNotification__MisalignmentSteer = { readonly message: string };
2097 export const ServerNotification__MisalignmentSteer = Schema.Struct({
2098 message: Schema.String,
2099 }).annotate({ identifier: "ServerNotification__MisalignmentSteer" });
2100
2101 export type ServerNotification__AbsolutePathBuf = string;
2102 export const ServerNotification__AbsolutePathBuf = Schema.String.annotate({
2103 description:
2104 "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.",
2105 identifier: "ServerNotification__AbsolutePathBuf",
2106 });
2107
2108 export type ServerNotification__GitInfo = {
2109 readonly branch?: string | null;
2110 readonly originUrl?: string | null;
2111 readonly sha?: string | null;
2112 };
2113 export const ServerNotification__GitInfo = Schema.Struct({
2114 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2115 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2116 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2117 }).annotate({ identifier: "ServerNotification__GitInfo" });
2118
2119 export type ServerNotification__ThreadHistoryMode = "legacy" | "paginated";
2120 export const ServerNotification__ThreadHistoryMode = Schema.Literals([
2121 "legacy",
2122 "paginated",
2123 ]).annotate({ identifier: "ServerNotification__ThreadHistoryMode" });
2124
2125 export type ServerNotification__ReasoningEffort = string;
2126 export const ServerNotification__ReasoningEffort = Schema.String.annotate({
2127 description: "A non-empty reasoning effort value advertised by the model.",
2128 }).check(
2129 Schema.isMinLength(1).annotate({
2130 expected: "a value with a length of at least 1",
2131 identifier: "ServerNotification__ReasoningEffort",
2132 }),
2133 );
2134
2135 export type ServerNotification__ThreadSectionAppearance = {
2136 readonly color?: string | null;
2137 readonly icon?: string | null;
2138 };
2139 export const ServerNotification__ThreadSectionAppearance = Schema.Struct({
2140 color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2141 icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2142 }).annotate({
2143 description: "Extensible visual presentation for a custom thread section.",
2144 identifier: "ServerNotification__ThreadSectionAppearance",
2145 });
2146
2147 export type ServerNotification__AgentPath = string;
2148 export const ServerNotification__AgentPath = Schema.String.annotate({
2149 identifier: "ServerNotification__AgentPath",
2150 });
2151
2152 export type ServerNotification__ThreadId = string;
2153 export const ServerNotification__ThreadId = Schema.String.annotate({
2154 identifier: "ServerNotification__ThreadId",
2155 });
2156
2157 export type ServerNotification__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
2158 export const ServerNotification__ThreadActiveFlag = Schema.Literals([
2159 "waitingOnApproval",
2160 "waitingOnUserInput",
2161 ]).annotate({ identifier: "ServerNotification__ThreadActiveFlag" });
2162
2163 export type ServerNotification__ThreadSource = string;
2164 export const ServerNotification__ThreadSource = Schema.String.annotate({
2165 identifier: "ServerNotification__ThreadSource",
2166 });
2167
2168 export type ServerNotification__ByteRange = { readonly end: number; readonly start: number };
2169 export const ServerNotification__ByteRange = Schema.Struct({
2170 end: Schema.Number.annotate({ format: "uint" })
2171 .check(Schema.isInt().annotate({ expected: "an integer" }))
2172 .check(
2173 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
2174 ),
2175 start: Schema.Number.annotate({ format: "uint" })
2176 .check(Schema.isInt().annotate({ expected: "an integer" }))
2177 .check(
2178 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
2179 ),
2180 }).annotate({ identifier: "ServerNotification__ByteRange" });
2181
2182 export type ServerNotification__ImageDetail = "auto" | "low" | "high" | "original";
2183 export const ServerNotification__ImageDetail = Schema.Literals([
2184 "auto",
2185 "low",
2186 "high",
2187 "original",
2188 ]).annotate({ identifier: "ServerNotification__ImageDetail" });
2189
2190 export type ServerNotification__HookPromptFragment = {
2191 readonly hookRunId: string;
2192 readonly text: string;
2193 };
2194 export const ServerNotification__HookPromptFragment = Schema.Struct({
2195 hookRunId: Schema.String,
2196 text: Schema.String,
2197 }).annotate({ identifier: "ServerNotification__HookPromptFragment" });
2198
2199 export type ServerNotification__AgentMessageDelivery = "async";
2200 export const ServerNotification__AgentMessageDelivery = Schema.Literal("async").annotate({
2201 identifier: "ServerNotification__AgentMessageDelivery",
2202 });
2203
2204 export type ServerNotification__MemoryCitationEntry = {
2205 readonly lineEnd: number;
2206 readonly lineStart: number;
2207 readonly note: string;
2208 readonly path: string;
2209 };
2210 export const ServerNotification__MemoryCitationEntry = Schema.Struct({
2211 lineEnd: Schema.Number.annotate({ format: "uint32" })
2212 .check(Schema.isInt().annotate({ expected: "an integer" }))
2213 .check(
2214 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
2215 ),
2216 lineStart: Schema.Number.annotate({ format: "uint32" })
2217 .check(Schema.isInt().annotate({ expected: "an integer" }))
2218 .check(
2219 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
2220 ),
2221 note: Schema.String,
2222 path: Schema.String,
2223 }).annotate({ identifier: "ServerNotification__MemoryCitationEntry" });
2224
2225 export type ServerNotification__MessagePhase = "commentary" | "partial_answer" | "final_answer";
2226 export const ServerNotification__MessagePhase = Schema.Union(
2227 [
2228 Schema.Literal("commentary").annotate({
2229 description:
2230 "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
2231 }),
2232 Schema.Literal("partial_answer").annotate({
2233 description: "Stable answer text that may be followed by more assistant output or tools.",
2234 }),
2235 Schema.Literal("final_answer").annotate({
2236 description: "The assistant's terminal answer text for the current turn.",
2237 }),
2238 ],
2239 { mode: "oneOf" },
2240 ).annotate({
2241 description:
2242 '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.',
2243 identifier: "ServerNotification__MessagePhase",
2244 });
2245
2246 export type ServerNotification__AsyncUserInputQuestion = {
2247 readonly options?: ReadonlyArray<string> | null;
2248 readonly title: string;
2249 };
2250 export const ServerNotification__AsyncUserInputQuestion = Schema.Struct({
2251 options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
2252 title: Schema.String,
2253 }).annotate({ identifier: "ServerNotification__AsyncUserInputQuestion" });
2254
2255 export type ServerNotification__LegacyAppPathString = string;
2256 export const ServerNotification__LegacyAppPathString = Schema.String.annotate({
2257 identifier: "ServerNotification__LegacyAppPathString",
2258 });
2259
2260 export type ServerNotification__CommandExecutionSource =
2261 | "agent"
2262 | "userShell"
2263 | "unifiedExecStartup"
2264 | "unifiedExecInteraction";
2265 export const ServerNotification__CommandExecutionSource = Schema.Literals([
2266 "agent",
2267 "userShell",
2268 "unifiedExecStartup",
2269 "unifiedExecInteraction",
2270 ]).annotate({ identifier: "ServerNotification__CommandExecutionSource" });
2271
2272 export type ServerNotification__CommandExecutionStatus =
2273 | "inProgress"
2274 | "completed"
2275 | "failed"
2276 | "declined";
2277 export const ServerNotification__CommandExecutionStatus = Schema.Literals([
2278 "inProgress",
2279 "completed",
2280 "failed",
2281 "declined",
2282 ]).annotate({ identifier: "ServerNotification__CommandExecutionStatus" });
2283
2284 export type ServerNotification__PatchChangeKind =
2285 | { readonly type: "add" }
2286 | { readonly type: "delete" }
2287 | { readonly move_path?: string | null; readonly type: "update" };
2288 export const ServerNotification__PatchChangeKind = Schema.Union(
2289 [
2290 Schema.Struct({
2291 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
2292 }).annotate({ title: "AddPatchChangeKind" }),
2293 Schema.Struct({
2294 type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
2295 }).annotate({ title: "DeletePatchChangeKind" }),
2296 Schema.Struct({
2297 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2298 type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
2299 }).annotate({ title: "UpdatePatchChangeKind" }),
2300 ],
2301 { mode: "oneOf" },
2302 ).annotate({ identifier: "ServerNotification__PatchChangeKind" });
2303
2304 export type ServerNotification__PatchApplyStatus =
2305 | "inProgress"
2306 | "completed"
2307 | "failed"
2308 | "declined";
2309 export const ServerNotification__PatchApplyStatus = Schema.Literals([
2310 "inProgress",
2311 "completed",
2312 "failed",
2313 "declined",
2314 ]).annotate({ identifier: "ServerNotification__PatchApplyStatus" });
2315
2316 export type ServerNotification__McpToolCallAppContext = {
2317 readonly actionName?: string | null;
2318 readonly appName?: string | null;
2319 readonly connectorId: string;
2320 readonly linkId?: string | null;
2321 readonly resourceUri?: string | null;
2322 };
2323 export const ServerNotification__McpToolCallAppContext = Schema.Struct({
2324 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2325 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2326 connectorId: Schema.String,
2327 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2328 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2329 }).annotate({ identifier: "ServerNotification__McpToolCallAppContext" });
2330
2331 export type ServerNotification__McpToolCallError = { readonly message: string };
2332 export const ServerNotification__McpToolCallError = Schema.Struct({
2333 message: Schema.String,
2334 }).annotate({ identifier: "ServerNotification__McpToolCallError" });
2335
2336 export type ServerNotification__McpAppDisplayMode = "inline" | "fullscreen";
2337 export const ServerNotification__McpAppDisplayMode = Schema.Literals([
2338 "inline",
2339 "fullscreen",
2340 ]).annotate({ identifier: "ServerNotification__McpAppDisplayMode" });
2341
2342 export type ServerNotification__McpToolCallResult = {
2343 readonly _meta?: Schema.Json;
2344 readonly content: ReadonlyArray<Schema.Json>;
2345 readonly structuredContent?: Schema.Json;
2346 };
2347 export const ServerNotification__McpToolCallResult = Schema.Struct({
2348 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
2349 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
2350 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
2351 }).annotate({ identifier: "ServerNotification__McpToolCallResult" });
2352
2353 export type ServerNotification__McpToolCallStatus = "inProgress" | "completed" | "failed";
2354 export const ServerNotification__McpToolCallStatus = Schema.Literals([
2355 "inProgress",
2356 "completed",
2357 "failed",
2358 ]).annotate({ identifier: "ServerNotification__McpToolCallStatus" });
2359
2360 export type ServerNotification__DynamicToolCallOutputContentItem =
2361 | { readonly text: string; readonly type: "inputText" }
2362 | { readonly imageUrl: string; readonly type: "inputImage" }
2363 | { readonly audioUrl: string; readonly type: "inputAudio" };
2364 export const ServerNotification__DynamicToolCallOutputContentItem = Schema.Union(
2365 [
2366 Schema.Struct({
2367 text: Schema.String,
2368 type: Schema.Literal("inputText").annotate({
2369 title: "InputTextDynamicToolCallOutputContentItemType",
2370 }),
2371 }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
2372 Schema.Struct({
2373 imageUrl: Schema.String,
2374 type: Schema.Literal("inputImage").annotate({
2375 title: "InputImageDynamicToolCallOutputContentItemType",
2376 }),
2377 }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
2378 Schema.Struct({
2379 audioUrl: Schema.String,
2380 type: Schema.Literal("inputAudio").annotate({
2381 title: "InputAudioDynamicToolCallOutputContentItemType",
2382 }),
2383 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
2384 ],
2385 { mode: "oneOf" },
2386 ).annotate({ identifier: "ServerNotification__DynamicToolCallOutputContentItem" });
2387
2388 export type ServerNotification__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
2389 export const ServerNotification__DynamicToolCallStatus = Schema.Literals([
2390 "inProgress",
2391 "completed",
2392 "failed",
2393 ]).annotate({ identifier: "ServerNotification__DynamicToolCallStatus" });
2394
2395 export type ServerNotification__CollabAgentStatus =
2396 | "pendingInit"
2397 | "running"
2398 | "interrupted"
2399 | "completed"
2400 | "errored"
2401 | "shutdown"
2402 | "notFound";
2403 export const ServerNotification__CollabAgentStatus = Schema.Literals([
2404 "pendingInit",
2405 "running",
2406 "interrupted",
2407 "completed",
2408 "errored",
2409 "shutdown",
2410 "notFound",
2411 ]).annotate({ identifier: "ServerNotification__CollabAgentStatus" });
2412
2413 export type ServerNotification__CollabAgentToolCallStatus =
2414 | "inProgress"
2415 | "completed"
2416 | "failed"
2417 | "interrupted";
2418 export const ServerNotification__CollabAgentToolCallStatus = Schema.Literals([
2419 "inProgress",
2420 "completed",
2421 "failed",
2422 "interrupted",
2423 ]).annotate({ identifier: "ServerNotification__CollabAgentToolCallStatus" });
2424
2425 export type ServerNotification__CollabAgentTool =
2426 | "spawnAgent"
2427 | "sendInput"
2428 | "resumeAgent"
2429 | "wait"
2430 | "closeAgent"
2431 | "sendMessage"
2432 | "followupTask"
2433 | "interruptAgent"
2434 | "listAgents";
2435 export const ServerNotification__CollabAgentTool = Schema.Literals([
2436 "spawnAgent",
2437 "sendInput",
2438 "resumeAgent",
2439 "wait",
2440 "closeAgent",
2441 "sendMessage",
2442 "followupTask",
2443 "interruptAgent",
2444 "listAgents",
2445 ]).annotate({ identifier: "ServerNotification__CollabAgentTool" });
2446
2447 export type ServerNotification__SubAgentActivityKind =
2448 | "started"
2449 | "interacted"
2450 | "interrupted"
2451 | "completed";
2452 export const ServerNotification__SubAgentActivityKind = Schema.Literals([
2453 "started",
2454 "interacted",
2455 "interrupted",
2456 "completed",
2457 ]).annotate({ identifier: "ServerNotification__SubAgentActivityKind" });
2458
2459 export type ServerNotification__WebSearchAction =
2460 | {
2461 readonly queries?: ReadonlyArray<string> | null;
2462 readonly query?: string | null;
2463 readonly type: "search";
2464 }
2465 | { readonly type: "openPage"; readonly url?: string | null }
2466 | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
2467 | { readonly type: "other" };
2468 export const ServerNotification__WebSearchAction = Schema.Union(
2469 [
2470 Schema.Struct({
2471 queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
2472 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2473 type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
2474 }).annotate({ title: "SearchWebSearchAction" }),
2475 Schema.Struct({
2476 type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
2477 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2478 }).annotate({ title: "OpenPageWebSearchAction" }),
2479 Schema.Struct({
2480 pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2481 type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
2482 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2483 }).annotate({ title: "FindInPageWebSearchAction" }),
2484 Schema.Struct({
2485 type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
2486 }).annotate({ title: "OtherWebSearchAction" }),
2487 ],
2488 { mode: "oneOf" },
2489 ).annotate({ identifier: "ServerNotification__WebSearchAction" });
2490
2491 export type ServerNotification__ImageGenerationFailure = {
2492 readonly limitId: string;
2493 readonly resetsAt?: number | null;
2494 readonly type: "usageLimitExceeded";
2495 };
2496 export const ServerNotification__ImageGenerationFailure = Schema.Union(
2497 [
2498 Schema.Struct({
2499 limitId: Schema.String,
2500 resetsAt: Schema.optionalKey(
2501 Schema.Union([
2502 Schema.Number.annotate({ format: "int64" }).check(
2503 Schema.isInt().annotate({ expected: "an integer" }),
2504 ),
2505 Schema.Null,
2506 ]),
2507 ),
2508 type: Schema.Literal("usageLimitExceeded").annotate({
2509 title: "UsageLimitExceededImageGenerationFailureType",
2510 }),
2511 }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
2512 ],
2513 { mode: "oneOf" },
2514 ).annotate({ identifier: "ServerNotification__ImageGenerationFailure" });
2515
2516 export type ServerNotification__TurnItemsView = "notLoaded" | "summary" | "full";
2517 export const ServerNotification__TurnItemsView = Schema.Union(
2518 [
2519 Schema.Literal("notLoaded").annotate({
2520 description: "`items` was not loaded for this turn. The field is intentionally empty.",
2521 }),
2522 Schema.Literal("summary").annotate({
2523 description: "`items` contains only a display summary for this turn.",
2524 }),
2525 Schema.Literal("full").annotate({
2526 description:
2527 "`items` contains every ThreadItem available from persisted app-server history for this turn.",
2528 }),
2529 ],
2530 { mode: "oneOf" },
2531 ).annotate({ identifier: "ServerNotification__TurnItemsView" });
2532
2533 export type ServerNotification__TurnStatus = "completed" | "interrupted" | "failed" | "inProgress";
2534 export const ServerNotification__TurnStatus = Schema.Literals([
2535 "completed",
2536 "interrupted",
2537 "failed",
2538 "inProgress",
2539 ]).annotate({ identifier: "ServerNotification__TurnStatus" });
2540
2541 export type ServerNotification__ThreadArchivedNotification = { readonly threadId: string };
2542 export const ServerNotification__ThreadArchivedNotification = Schema.Struct({
2543 threadId: Schema.String,
2544 }).annotate({ identifier: "ServerNotification__ThreadArchivedNotification" });
2545
2546 export type ServerNotification__ThreadDeletedNotification = { readonly threadId: string };
2547 export const ServerNotification__ThreadDeletedNotification = Schema.Struct({
2548 threadId: Schema.String,
2549 }).annotate({ identifier: "ServerNotification__ThreadDeletedNotification" });
2550
2551 export type ServerNotification__ThreadUnarchivedNotification = { readonly threadId: string };
2552 export const ServerNotification__ThreadUnarchivedNotification = Schema.Struct({
2553 threadId: Schema.String,
2554 }).annotate({ identifier: "ServerNotification__ThreadUnarchivedNotification" });
2555
2556 export type ServerNotification__ThreadClosedNotification = { readonly threadId: string };
2557 export const ServerNotification__ThreadClosedNotification = Schema.Struct({
2558 threadId: Schema.String,
2559 }).annotate({ identifier: "ServerNotification__ThreadClosedNotification" });
2560
2561 export type ServerNotification__ThreadRevertedNotification = { readonly threadId: string };
2562 export const ServerNotification__ThreadRevertedNotification = Schema.Struct({
2563 threadId: Schema.String,
2564 }).annotate({ identifier: "ServerNotification__ThreadRevertedNotification" });
2565
2566 export type ServerNotification__SkillsChangedNotification = { readonly [x: string]: Schema.Json };
2567 export const ServerNotification__SkillsChangedNotification = Schema.Record(
2568 Schema.String,
2569 Schema.Json.annotate({ expected: "JSON value" }),
2570 ).annotate({
2571 description:
2572 "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.",
2573 identifier: "ServerNotification__SkillsChangedNotification",
2574 });
2575
2576 export type ServerNotification__ThreadNameUpdatedNotification = {
2577 readonly threadId: string;
2578 readonly threadName?: string | null;
2579 };
2580 export const ServerNotification__ThreadNameUpdatedNotification = Schema.Struct({
2581 threadId: Schema.String,
2582 threadName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2583 }).annotate({ identifier: "ServerNotification__ThreadNameUpdatedNotification" });
2584
2585 export type ServerNotification__ThreadAttachmentOperation = "created" | "deleted";
2586 export const ServerNotification__ThreadAttachmentOperation = Schema.Literals([
2587 "created",
2588 "deleted",
2589 ]).annotate({
2590 description: "The persisted attachment change represented by a notification.",
2591 identifier: "ServerNotification__ThreadAttachmentOperation",
2592 });
2593
2594 export type ServerNotification__ThreadGoalStatus =
2595 | "active"
2596 | "paused"
2597 | "blocked"
2598 | "usageLimited"
2599 | "budgetLimited"
2600 | "complete";
2601 export const ServerNotification__ThreadGoalStatus = Schema.Literals([
2602 "active",
2603 "paused",
2604 "blocked",
2605 "usageLimited",
2606 "budgetLimited",
2607 "complete",
2608 ]).annotate({ identifier: "ServerNotification__ThreadGoalStatus" });
2609
2610 export type ServerNotification__ThreadGoalClearedNotification = { readonly threadId: string };
2611 export const ServerNotification__ThreadGoalClearedNotification = Schema.Struct({
2612 threadId: Schema.String,
2613 }).annotate({ identifier: "ServerNotification__ThreadGoalClearedNotification" });
2614
2615 export type ServerNotification__ThreadQueueChangedNotification = { readonly threadId: string };
2616 export const ServerNotification__ThreadQueueChangedNotification = Schema.Struct({
2617 threadId: Schema.String,
2618 }).annotate({ identifier: "ServerNotification__ThreadQueueChangedNotification" });
2619
2620 export type ServerNotification__ProjectChangeType = "created" | "updated" | "deleted";
2621 export const ServerNotification__ProjectChangeType = Schema.Literals([
2622 "created",
2623 "updated",
2624 "deleted",
2625 ]).annotate({ identifier: "ServerNotification__ProjectChangeType" });
2626
2627 export type ServerNotification__ThreadProjectUpdatedNotification = {
2628 readonly projectId: string | null;
2629 readonly threadId: string;
2630 };
2631 export const ServerNotification__ThreadProjectUpdatedNotification = Schema.Struct({
2632 projectId: Schema.Union([Schema.String, Schema.Null]),
2633 threadId: Schema.String,
2634 }).annotate({ identifier: "ServerNotification__ThreadProjectUpdatedNotification" });
2635
2636 export type ServerNotification__EnvironmentConnectionNotification = {
2637 readonly environmentId: string;
2638 readonly threadId: string;
2639 };
2640 export const ServerNotification__EnvironmentConnectionNotification = Schema.Struct({
2641 environmentId: Schema.String,
2642 threadId: Schema.String,
2643 }).annotate({ identifier: "ServerNotification__EnvironmentConnectionNotification" });
2644
2645 export type ServerNotification__ActivePermissionProfile = {
2646 readonly extends?: string | null;
2647 readonly id: string;
2648 };
2649 export const ServerNotification__ActivePermissionProfile = Schema.Struct({
2650 extends: Schema.optionalKey(
2651 Schema.Union([
2652 Schema.String.annotate({
2653 description:
2654 "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
2655 }),
2656 Schema.Null,
2657 ]),
2658 ),
2659 id: Schema.String.annotate({
2660 description:
2661 "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
2662 }),
2663 }).annotate({ identifier: "ServerNotification__ActivePermissionProfile" });
2664
2665 export type ServerNotification__AskForApproval =
2666 | "untrusted"
2667 | "on-request"
2668 | "never"
2669 | {
2670 readonly granular: {
2671 readonly mcp_elicitations: boolean;
2672 readonly request_permissions?: boolean;
2673 readonly rules: boolean;
2674 readonly sandbox_approval: boolean;
2675 readonly skill_approval?: boolean;
2676 };
2677 };
2678 export const ServerNotification__AskForApproval = Schema.Union(
2679 [
2680 Schema.Literals(["untrusted", "on-request", "never"]),
2681 Schema.Struct({
2682 granular: Schema.Struct({
2683 mcp_elicitations: Schema.Boolean,
2684 request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
2685 rules: Schema.Boolean,
2686 sandbox_approval: Schema.Boolean,
2687 skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
2688 }),
2689 }).annotate({ title: "GranularAskForApproval" }),
2690 ],
2691 { mode: "oneOf" },
2692 ).annotate({ identifier: "ServerNotification__AskForApproval" });
2693
2694 export type ServerNotification__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
2695 export const ServerNotification__ApprovalsReviewer = Schema.Literals([
2696 "user",
2697 "auto_review",
2698 "guardian_subagent",
2699 ]).annotate({
2700 description:
2701 "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.",
2702 identifier: "ServerNotification__ApprovalsReviewer",
2703 });
2704
2705 export type ServerNotification__ModeKind = "plan" | "default";
2706 export const ServerNotification__ModeKind = Schema.Literals(["plan", "default"]).annotate({
2707 description: "Initial collaboration mode to use when the TUI starts.",
2708 identifier: "ServerNotification__ModeKind",
2709 });
2710
2711 export type ServerNotification__Personality = "none" | "friendly" | "pragmatic";
2712 export const ServerNotification__Personality = Schema.Literals([
2713 "none",
2714 "friendly",
2715 "pragmatic",
2716 ]).annotate({
2717 description: "Deprecated: `friendly` and `pragmatic` no longer select a style.",
2718 identifier: "ServerNotification__Personality",
2719 });
2720
2721 export type ServerNotification__NetworkAccess = "restricted" | "enabled";
2722 export const ServerNotification__NetworkAccess = Schema.Literals([
2723 "restricted",
2724 "enabled",
2725 ]).annotate({ identifier: "ServerNotification__NetworkAccess" });
2726
2727 export type ServerNotification__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
2728 export const ServerNotification__ReasoningSummary = Schema.Union(
2729 [
2730 Schema.Literals(["auto", "concise", "detailed"]),
2731 Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
2732 ],
2733 { mode: "oneOf" },
2734 ).annotate({
2735 description:
2736 "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",
2737 identifier: "ServerNotification__ReasoningSummary",
2738 });
2739
2740 export type ServerNotification__TokenUsageBreakdown = {
2741 readonly cacheWriteInputTokens?: number;
2742 readonly cachedInputTokens: number;
2743 readonly inputTokens: number;
2744 readonly outputTokens: number;
2745 readonly reasoningOutputTokens: number;
2746 readonly totalTokens: number;
2747 };
2748 export const ServerNotification__TokenUsageBreakdown = Schema.Struct({
2749 cacheWriteInputTokens: Schema.optionalKey(
2750 Schema.Number.annotate({ default: 0, format: "int64" }).check(
2751 Schema.isInt().annotate({ expected: "an integer" }),
2752 ),
2753 ),
2754 cachedInputTokens: Schema.Number.annotate({ format: "int64" }).check(
2755 Schema.isInt().annotate({ expected: "an integer" }),
2756 ),
2757 inputTokens: Schema.Number.annotate({ format: "int64" }).check(
2758 Schema.isInt().annotate({ expected: "an integer" }),
2759 ),
2760 outputTokens: Schema.Number.annotate({ format: "int64" }).check(
2761 Schema.isInt().annotate({ expected: "an integer" }),
2762 ),
2763 reasoningOutputTokens: Schema.Number.annotate({ format: "int64" }).check(
2764 Schema.isInt().annotate({ expected: "an integer" }),
2765 ),
2766 totalTokens: Schema.Number.annotate({ format: "int64" }).check(
2767 Schema.isInt().annotate({ expected: "an integer" }),
2768 ),
2769 }).annotate({ identifier: "ServerNotification__TokenUsageBreakdown" });
2770
2771 export type ServerNotification__HookOutputEntryKind =
2772 | "warning"
2773 | "stop"
2774 | "feedback"
2775 | "context"
2776 | "error";
2777 export const ServerNotification__HookOutputEntryKind = Schema.Literals([
2778 "warning",
2779 "stop",
2780 "feedback",
2781 "context",
2782 "error",
2783 ]).annotate({ identifier: "ServerNotification__HookOutputEntryKind" });
2784
2785 export type ServerNotification__HookEventName = string;
2786 export const ServerNotification__HookEventName = Schema.String.annotate({
2787 identifier: "ServerNotification__HookEventName",
2788 });
2789
2790 export type ServerNotification__HookExecutionMode = "sync" | "async";
2791 export const ServerNotification__HookExecutionMode = Schema.Literals(["sync", "async"]).annotate({
2792 identifier: "ServerNotification__HookExecutionMode",
2793 });
2794
2795 export type ServerNotification__HookHandlerType = "command" | "mcpTool" | "prompt" | "agent";
2796 export const ServerNotification__HookHandlerType = Schema.Literals([
2797 "command",
2798 "mcpTool",
2799 "prompt",
2800 "agent",
2801 ]).annotate({ identifier: "ServerNotification__HookHandlerType" });
2802
2803 export type ServerNotification__HookScope = "thread" | "turn";
2804 export const ServerNotification__HookScope = Schema.Literals(["thread", "turn"]).annotate({
2805 identifier: "ServerNotification__HookScope",
2806 });
2807
2808 export type ServerNotification__HookSource =
2809 | "system"
2810 | "user"
2811 | "project"
2812 | "mdm"
2813 | "sessionFlags"
2814 | "plugin"
2815 | "cloudRequirements"
2816 | "cloudManagedConfig"
2817 | "legacyManagedConfigFile"
2818 | "legacyManagedConfigMdm"
2819 | "unknown";
2820 export const ServerNotification__HookSource = Schema.Literals([
2821 "system",
2822 "user",
2823 "project",
2824 "mdm",
2825 "sessionFlags",
2826 "plugin",
2827 "cloudRequirements",
2828 "cloudManagedConfig",
2829 "legacyManagedConfigFile",
2830 "legacyManagedConfigMdm",
2831 "unknown",
2832 ]).annotate({ identifier: "ServerNotification__HookSource" });
2833
2834 export type ServerNotification__HookRunStatus =
2835 | "running"
2836 | "completed"
2837 | "failed"
2838 | "blocked"
2839 | "stopped";
2840 export const ServerNotification__HookRunStatus = Schema.Literals([
2841 "running",
2842 "completed",
2843 "failed",
2844 "blocked",
2845 "stopped",
2846 ]).annotate({ identifier: "ServerNotification__HookRunStatus" });
2847
2848 export type ServerNotification__TurnDiffUpdatedNotification = {
2849 readonly diff: string;
2850 readonly threadId: string;
2851 readonly turnId: string;
2852 };
2853 export const ServerNotification__TurnDiffUpdatedNotification = Schema.Struct({
2854 diff: Schema.String,
2855 threadId: Schema.String,
2856 turnId: Schema.String,
2857 }).annotate({
2858 description:
2859 "Notification that the turn-level unified diff has changed. Contains the latest aggregated diff across all file changes in the turn.",
2860 identifier: "ServerNotification__TurnDiffUpdatedNotification",
2861 });
2862
2863 export type ServerNotification__TurnPlanStepStatus = "pending" | "inProgress" | "completed";
2864 export const ServerNotification__TurnPlanStepStatus = Schema.Literals([
2865 "pending",
2866 "inProgress",
2867 "completed",
2868 ]).annotate({ identifier: "ServerNotification__TurnPlanStepStatus" });
2869
2870 export type ServerNotification__GuardianCommandSource = "shell" | "unifiedExec";
2871 export const ServerNotification__GuardianCommandSource = Schema.Literals([
2872 "shell",
2873 "unifiedExec",
2874 ]).annotate({ identifier: "ServerNotification__GuardianCommandSource" });
2875
2876 export type ServerNotification__NetworkApprovalProtocol =
2877 | "http"
2878 | "https"
2879 | "socks5Tcp"
2880 | "socks5Udp";
2881 export const ServerNotification__NetworkApprovalProtocol = Schema.Literals([
2882 "http",
2883 "https",
2884 "socks5Tcp",
2885 "socks5Udp",
2886 ]).annotate({ identifier: "ServerNotification__NetworkApprovalProtocol" });
2887
2888 export type ServerNotification__FileSystemAccessMode = "read" | "write" | "deny";
2889 export const ServerNotification__FileSystemAccessMode = Schema.Literals([
2890 "read",
2891 "write",
2892 "deny",
2893 ]).annotate({ identifier: "ServerNotification__FileSystemAccessMode" });
2894
2895 export type ServerNotification__AdditionalNetworkPermissions = {
2896 readonly enabled?: boolean | null;
2897 };
2898 export const ServerNotification__AdditionalNetworkPermissions = Schema.Struct({
2899 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2900 }).annotate({ identifier: "ServerNotification__AdditionalNetworkPermissions" });
2901
2902 export type ServerNotification__GuardianRiskLevel = "low" | "medium" | "high" | "critical";
2903 export const ServerNotification__GuardianRiskLevel = Schema.Literals([
2904 "low",
2905 "medium",
2906 "high",
2907 "critical",
2908 ]).annotate({
2909 description: "[UNSTABLE] Risk level assigned by approval auto-review.",
2910 identifier: "ServerNotification__GuardianRiskLevel",
2911 });
2912
2913 export type ServerNotification__GuardianApprovalReviewStatus =
2914 | "inProgress"
2915 | "approved"
2916 | "denied"
2917 | "timedOut"
2918 | "aborted";
2919 export const ServerNotification__GuardianApprovalReviewStatus = Schema.Literals([
2920 "inProgress",
2921 "approved",
2922 "denied",
2923 "timedOut",
2924 "aborted",
2925 ]).annotate({
2926 description: "[UNSTABLE] Lifecycle state for an approval auto-review.",
2927 identifier: "ServerNotification__GuardianApprovalReviewStatus",
2928 });
2929
2930 export type ServerNotification__GuardianUserAuthorization = "unknown" | "low" | "medium" | "high";
2931 export const ServerNotification__GuardianUserAuthorization = Schema.Literals([
2932 "unknown",
2933 "low",
2934 "medium",
2935 "high",
2936 ]).annotate({
2937 description: "[UNSTABLE] Authorization level assigned by approval auto-review.",
2938 identifier: "ServerNotification__GuardianUserAuthorization",
2939 });
2940
2941 export type ServerNotification__AutoReviewDecisionSource = "agent";
2942 export const ServerNotification__AutoReviewDecisionSource = Schema.Literal("agent").annotate({
2943 description: "[UNSTABLE] Source that produced a terminal approval auto-review decision.",
2944 identifier: "ServerNotification__AutoReviewDecisionSource",
2945 });
2946
2947 export type ServerNotification__StrictReviewRequiredNotification = {
2948 readonly startedAtMs: number;
2949 readonly threadId: string;
2950 readonly turnId: string;
2951 };
2952 export const ServerNotification__StrictReviewRequiredNotification = Schema.Struct({
2953 startedAtMs: Schema.Number.annotate({
2954 description: "Unix timestamp (in milliseconds) when this review started.",
2955 format: "int64",
2956 }).check(Schema.isInt().annotate({ expected: "an integer" })),
2957 threadId: Schema.String,
2958 turnId: Schema.String,
2959 }).annotate({ identifier: "ServerNotification__StrictReviewRequiredNotification" });
2960
2961 export type ServerNotification__AgentMessageDeltaNotification = {
2962 readonly delta: string;
2963 readonly itemId: string;
2964 readonly threadId: string;
2965 readonly turnId: string;
2966 };
2967 export const ServerNotification__AgentMessageDeltaNotification = Schema.Struct({
2968 delta: Schema.String,
2969 itemId: Schema.String,
2970 threadId: Schema.String,
2971 turnId: Schema.String,
2972 }).annotate({ identifier: "ServerNotification__AgentMessageDeltaNotification" });
2973
2974 export type ServerNotification__PlanDeltaNotification = {
2975 readonly delta: string;
2976 readonly itemId: string;
2977 readonly threadId: string;
2978 readonly turnId: string;
2979 };
2980 export const ServerNotification__PlanDeltaNotification = Schema.Struct({
2981 delta: Schema.String,
2982 itemId: Schema.String,
2983 threadId: Schema.String,
2984 turnId: Schema.String,
2985 }).annotate({
2986 description:
2987 "EXPERIMENTAL - proposed plan streaming deltas for plan items. Clients should not assume concatenated deltas match the completed plan item content.",
2988 identifier: "ServerNotification__PlanDeltaNotification",
2989 });
2990
2991 export type ServerNotification__CommandExecOutputStream = "stdout" | "stderr";
2992 export const ServerNotification__CommandExecOutputStream = Schema.Union(
2993 [
2994 Schema.Literal("stdout").annotate({
2995 description: "stdout stream. PTY mode multiplexes terminal output here.",
2996 }),
2997 Schema.Literal("stderr").annotate({ description: "stderr stream." }),
2998 ],
2999 { mode: "oneOf" },
3000 ).annotate({
3001 description: "Stream label for `command/exec/outputDelta` notifications.",
3002 identifier: "ServerNotification__CommandExecOutputStream",
3003 });
3004
3005 export type ServerNotification__ProcessOutputStream = "stdout" | "stderr";
3006 export const ServerNotification__ProcessOutputStream = Schema.Union(
3007 [
3008 Schema.Literal("stdout").annotate({
3009 description: "stdout stream. PTY mode multiplexes terminal output here.",
3010 }),
3011 Schema.Literal("stderr").annotate({ description: "stderr stream." }),
3012 ],
3013 { mode: "oneOf" },
3014 ).annotate({
3015 description: "Stream label for `process/outputDelta` notifications.",
3016 identifier: "ServerNotification__ProcessOutputStream",
3017 });
3018
3019 export type ServerNotification__ProcessExitedNotification = {
3020 readonly exitCode: number;
3021 readonly processHandle: string;
3022 readonly stderr: string;
3023 readonly stderrCapReached: boolean;
3024 readonly stdout: string;
3025 readonly stdoutCapReached: boolean;
3026 };
3027 export const ServerNotification__ProcessExitedNotification = Schema.Struct({
3028 exitCode: Schema.Number.annotate({ description: "Process exit code.", format: "int32" }).check(
3029 Schema.isInt().annotate({ expected: "an integer" }),
3030 ),
3031 processHandle: Schema.String.annotate({
3032 description: "Client-supplied, connection-scoped `processHandle` from `process/spawn`.",
3033 }),
3034 stderr: Schema.String.annotate({
3035 description:
3036 "Buffered stderr capture.\n\nEmpty when stderr was streamed via `process/outputDelta`.",
3037 }),
3038 stderrCapReached: Schema.Boolean.annotate({
3039 description:
3040 "Whether stderr reached `outputBytesCap`.\n\nIn streaming mode, stderr is empty and cap state is also reported on the final stderr `process/outputDelta` notification.",
3041 }),
3042 stdout: Schema.String.annotate({
3043 description:
3044 "Buffered stdout capture.\n\nEmpty when stdout was streamed via `process/outputDelta`.",
3045 }),
3046 stdoutCapReached: Schema.Boolean.annotate({
3047 description:
3048 "Whether stdout reached `outputBytesCap`.\n\nIn streaming mode, stdout is empty and cap state is also reported on the final stdout `process/outputDelta` notification.",
3049 }),
3050 }).annotate({
3051 description: "Final process exit notification for `process/spawn`.",
3052 identifier: "ServerNotification__ProcessExitedNotification",
3053 });
3054
3055 export type ServerNotification__CommandExecutionOutputDeltaNotification = {
3056 readonly delta: string;
3057 readonly itemId: string;
3058 readonly threadId: string;
3059 readonly turnId: string;
3060 };
3061 export const ServerNotification__CommandExecutionOutputDeltaNotification = Schema.Struct({
3062 delta: Schema.String,
3063 itemId: Schema.String,
3064 threadId: Schema.String,
3065 turnId: Schema.String,
3066 }).annotate({ identifier: "ServerNotification__CommandExecutionOutputDeltaNotification" });
3067
3068 export type ServerNotification__TerminalInteractionNotification = {
3069 readonly itemId: string;
3070 readonly processId: string;
3071 readonly stdin: string;
3072 readonly threadId: string;
3073 readonly turnId: string;
3074 };
3075 export const ServerNotification__TerminalInteractionNotification = Schema.Struct({
3076 itemId: Schema.String,
3077 processId: Schema.String,
3078 stdin: Schema.String,
3079 threadId: Schema.String,
3080 turnId: Schema.String,
3081 }).annotate({ identifier: "ServerNotification__TerminalInteractionNotification" });
3082
3083 export type ServerNotification__FileChangeOutputDeltaNotification = {
3084 readonly delta: string;
3085 readonly itemId: string;
3086 readonly threadId: string;
3087 readonly turnId: string;
3088 };
3089 export const ServerNotification__FileChangeOutputDeltaNotification = Schema.Struct({
3090 delta: Schema.String,
3091 itemId: Schema.String,
3092 threadId: Schema.String,
3093 turnId: Schema.String,
3094 }).annotate({
3095 description:
3096 "Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.",
3097 identifier: "ServerNotification__FileChangeOutputDeltaNotification",
3098 });
3099
3100 export type ServerNotification__RequestId = string | number;
3101 export const ServerNotification__RequestId = Schema.Union([
3102 Schema.String,
3103 Schema.Number.annotate({ format: "int64" }).check(
3104 Schema.isInt().annotate({ expected: "an integer" }),
3105 ),
3106 ]).annotate({ identifier: "ServerNotification__RequestId" });
3107
3108 export type ServerNotification__McpToolCallProgressNotification = {
3109 readonly itemId: string;
3110 readonly message: string;
3111 readonly threadId: string;
3112 readonly turnId: string;
3113 };
3114 export const ServerNotification__McpToolCallProgressNotification = Schema.Struct({
3115 itemId: Schema.String,
3116 message: Schema.String,
3117 threadId: Schema.String,
3118 turnId: Schema.String,
3119 }).annotate({ identifier: "ServerNotification__McpToolCallProgressNotification" });
3120
3121 export type ServerNotification__McpServerOauthLoginCompletedNotification = {
3122 readonly error?: string | null;
3123 readonly name: string;
3124 readonly success: boolean;
3125 readonly threadId?: string | null;
3126 };
3127 export const ServerNotification__McpServerOauthLoginCompletedNotification = Schema.Struct({
3128 error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3129 name: Schema.String,
3130 success: Schema.Boolean,
3131 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3132 }).annotate({ identifier: "ServerNotification__McpServerOauthLoginCompletedNotification" });
3133
3134 export type ServerNotification__McpServerStartupFailureReason = "reauthenticationRequired";
3135 export const ServerNotification__McpServerStartupFailureReason = Schema.Literal(
3136 "reauthenticationRequired",
3137 ).annotate({ identifier: "ServerNotification__McpServerStartupFailureReason" });
3138
3139 export type ServerNotification__McpServerStartupState =
3140 | "starting"
3141 | "ready"
3142 | "failed"
3143 | "cancelled";
3144 export const ServerNotification__McpServerStartupState = Schema.Literals([
3145 "starting",
3146 "ready",
3147 "failed",
3148 "cancelled",
3149 ]).annotate({ identifier: "ServerNotification__McpServerStartupState" });
3150
3151 export type ServerNotification__McpServerEventNotification = {
3152 readonly method: string;
3153 readonly params: Schema.Json;
3154 };
3155 export const ServerNotification__McpServerEventNotification = Schema.Struct({
3156 method: Schema.String,
3157 params: Schema.Json.annotate({ expected: "JSON value" }),
3158 }).annotate({ identifier: "ServerNotification__McpServerEventNotification" });
3159
3160 export type ServerNotification__AuthMode =
3161 | "apikey"
3162 | "chatgpt"
3163 | "chatgptAuthTokens"
3164 | "headers"
3165 | "agentIdentity"
3166 | "personalAccessToken"
3167 | "bedrockApiKey"
3168 | "bedrockAccessKeys";
3169 export const ServerNotification__AuthMode = Schema.Union(
3170 [
3171 Schema.Literal("apikey").annotate({
3172 description: "OpenAI API key provided by the caller and stored by Codex.",
3173 }),
3174 Schema.Literal("chatgpt").annotate({
3175 description: "ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).",
3176 }),
3177 Schema.Literal("chatgptAuthTokens").annotate({
3178 description:
3179 "[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.",
3180 }),
3181 Schema.Literal("headers").annotate({
3182 description: "Backend auth supplied as request headers.",
3183 }),
3184 Schema.Literal("agentIdentity").annotate({
3185 description: "Programmatic Codex auth backed by a registered Agent Identity.",
3186 }),
3187 Schema.Literal("personalAccessToken").annotate({
3188 description: "Programmatic Codex auth backed by a personal access token.",
3189 }),
3190 Schema.Literal("bedrockApiKey").annotate({
3191 description: "Amazon Bedrock bearer token managed by Codex.",
3192 }),
3193 Schema.Literal("bedrockAccessKeys").annotate({
3194 description: "Amazon Bedrock AWS access keys managed by Codex.",
3195 }),
3196 ],
3197 { mode: "oneOf" },
3198 ).annotate({
3199 description: "Authentication mode for OpenAI-backed providers.",
3200 identifier: "ServerNotification__AuthMode",
3201 });
3202
3203 export type ServerNotification__PlanType = string;
3204 export const ServerNotification__PlanType = Schema.String.annotate({
3205 identifier: "ServerNotification__PlanType",
3206 });
3207
3208 export type ServerNotification__GatewayOAuthStatus =
3209 | "notReady"
3210 | "started"
3211 | "succeeded"
3212 | "failed";
3213 export const ServerNotification__GatewayOAuthStatus = Schema.Literals([
3214 "notReady",
3215 "started",
3216 "succeeded",
3217 "failed",
3218 ]).annotate({ identifier: "ServerNotification__GatewayOAuthStatus" });
3219
3220 export type ServerNotification__CreditsSnapshot = {
3221 readonly balance?: string | null;
3222 readonly hasCredits: boolean;
3223 readonly unlimited: boolean;
3224 };
3225 export const ServerNotification__CreditsSnapshot = Schema.Struct({
3226 balance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3227 hasCredits: Schema.Boolean,
3228 unlimited: Schema.Boolean,
3229 }).annotate({ identifier: "ServerNotification__CreditsSnapshot" });
3230
3231 export type ServerNotification__SpendControlLimitSnapshot = {
3232 readonly limit: string;
3233 readonly remainingPercent: number;
3234 readonly resetsAt: number;
3235 readonly used: string;
3236 };
3237 export const ServerNotification__SpendControlLimitSnapshot = Schema.Struct({
3238 limit: Schema.String,
3239 remainingPercent: Schema.Number.annotate({ format: "int32" }).check(
3240 Schema.isInt().annotate({ expected: "an integer" }),
3241 ),
3242 resetsAt: Schema.Number.annotate({ format: "int64" }).check(
3243 Schema.isInt().annotate({ expected: "an integer" }),
3244 ),
3245 used: Schema.String,
3246 }).annotate({ identifier: "ServerNotification__SpendControlLimitSnapshot" });
3247
3248 export type ServerNotification__RateLimitWindow = {
3249 readonly resetsAt?: number | null;
3250 readonly usedPercent: number;
3251 readonly windowDurationMins?: number | null;
3252 };
3253 export const ServerNotification__RateLimitWindow = Schema.Struct({
3254 resetsAt: Schema.optionalKey(
3255 Schema.Union([
3256 Schema.Number.annotate({ format: "int64" }).check(
3257 Schema.isInt().annotate({ expected: "an integer" }),
3258 ),
3259 Schema.Null,
3260 ]),
3261 ),
3262 usedPercent: Schema.Number.annotate({ format: "int32" }).check(
3263 Schema.isInt().annotate({ expected: "an integer" }),
3264 ),
3265 windowDurationMins: Schema.optionalKey(
3266 Schema.Union([
3267 Schema.Number.annotate({ format: "int64" }).check(
3268 Schema.isInt().annotate({ expected: "an integer" }),
3269 ),
3270 Schema.Null,
3271 ]),
3272 ),
3273 }).annotate({ identifier: "ServerNotification__RateLimitWindow" });
3274
3275 export type ServerNotification__RateLimitReachedType =
3276 | "rate_limit_reached"
3277 | "workspace_owner_credits_depleted"
3278 | "workspace_member_credits_depleted"
3279 | "workspace_owner_usage_limit_reached"
3280 | "workspace_member_usage_limit_reached";
3281 export const ServerNotification__RateLimitReachedType = Schema.Literals([
3282 "rate_limit_reached",
3283 "workspace_owner_credits_depleted",
3284 "workspace_member_credits_depleted",
3285 "workspace_owner_usage_limit_reached",
3286 "workspace_member_usage_limit_reached",
3287 ]).annotate({ identifier: "ServerNotification__RateLimitReachedType" });
3288
3289 export type ServerNotification__AppReview = { readonly status: string };
3290 export const ServerNotification__AppReview = Schema.Struct({ status: Schema.String }).annotate({
3291 identifier: "ServerNotification__AppReview",
3292 });
3293
3294 export type ServerNotification__AppScreenshot = {
3295 readonly fileId?: string | null;
3296 readonly url?: string | null;
3297 readonly userPrompt: string;
3298 };
3299 export const ServerNotification__AppScreenshot = Schema.Struct({
3300 fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3301 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3302 userPrompt: Schema.String,
3303 }).annotate({ identifier: "ServerNotification__AppScreenshot" });
3304
3305 export type ServerNotification__AppBranding = {
3306 readonly category?: string | null;
3307 readonly developer?: string | null;
3308 readonly isDiscoverableApp: boolean;
3309 readonly privacyPolicy?: string | null;
3310 readonly termsOfService?: string | null;
3311 readonly website?: string | null;
3312 };
3313 export const ServerNotification__AppBranding = Schema.Struct({
3314 category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3315 developer: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3316 isDiscoverableApp: Schema.Boolean,
3317 privacyPolicy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3318 termsOfService: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3319 website: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3320 }).annotate({
3321 description: "EXPERIMENTAL - app metadata returned by app-list APIs.",
3322 identifier: "ServerNotification__AppBranding",
3323 });
3324
3325 export type ServerNotification__RemoteControlConnectionStatus =
3326 | "disabled"
3327 | "connecting"
3328 | "connected"
3329 | "errored";
3330 export const ServerNotification__RemoteControlConnectionStatus = Schema.Literals([
3331 "disabled",
3332 "connecting",
3333 "connected",
3334 "errored",
3335 ]).annotate({ identifier: "ServerNotification__RemoteControlConnectionStatus" });
3336
3337 export type ServerNotification__ExternalAgentConfigMigrationItemType =
3338 | "AGENTS_MD"
3339 | "CONFIG"
3340 | "SKILLS"
3341 | "PLUGINS"
3342 | "MCP_SERVER_CONFIG"
3343 | "SUBAGENTS"
3344 | "HOOKS"
3345 | "COMMANDS"
3346 | "MEMORY"
3347 | "SESSIONS";
3348 export const ServerNotification__ExternalAgentConfigMigrationItemType = Schema.Literals([
3349 "AGENTS_MD",
3350 "CONFIG",
3351 "SKILLS",
3352 "PLUGINS",
3353 "MCP_SERVER_CONFIG",
3354 "SUBAGENTS",
3355 "HOOKS",
3356 "COMMANDS",
3357 "MEMORY",
3358 "SESSIONS",
3359 ]).annotate({ identifier: "ServerNotification__ExternalAgentConfigMigrationItemType" });
3360
3361 export type ServerNotification__ReasoningSummaryTextDeltaNotification = {
3362 readonly delta: string;
3363 readonly itemId: string;
3364 readonly summaryIndex: number;
3365 readonly threadId: string;
3366 readonly turnId: string;
3367 };
3368 export const ServerNotification__ReasoningSummaryTextDeltaNotification = Schema.Struct({
3369 delta: Schema.String,
3370 itemId: Schema.String,
3371 summaryIndex: Schema.Number.annotate({ format: "int64" }).check(
3372 Schema.isInt().annotate({ expected: "an integer" }),
3373 ),
3374 threadId: Schema.String,
3375 turnId: Schema.String,
3376 }).annotate({ identifier: "ServerNotification__ReasoningSummaryTextDeltaNotification" });
3377
3378 export type ServerNotification__ReasoningSummaryPartAddedNotification = {
3379 readonly itemId: string;
3380 readonly summaryIndex: number;
3381 readonly threadId: string;
3382 readonly turnId: string;
3383 };
3384 export const ServerNotification__ReasoningSummaryPartAddedNotification = Schema.Struct({
3385 itemId: Schema.String,
3386 summaryIndex: Schema.Number.annotate({ format: "int64" }).check(
3387 Schema.isInt().annotate({ expected: "an integer" }),
3388 ),
3389 threadId: Schema.String,
3390 turnId: Schema.String,
3391 }).annotate({ identifier: "ServerNotification__ReasoningSummaryPartAddedNotification" });
3392
3393 export type ServerNotification__ReasoningTextDeltaNotification = {
3394 readonly contentIndex: number;
3395 readonly delta: string;
3396 readonly itemId: string;
3397 readonly threadId: string;
3398 readonly turnId: string;
3399 };
3400 export const ServerNotification__ReasoningTextDeltaNotification = Schema.Struct({
3401 contentIndex: Schema.Number.annotate({ format: "int64" }).check(
3402 Schema.isInt().annotate({ expected: "an integer" }),
3403 ),
3404 delta: Schema.String,
3405 itemId: Schema.String,
3406 threadId: Schema.String,
3407 turnId: Schema.String,
3408 }).annotate({ identifier: "ServerNotification__ReasoningTextDeltaNotification" });
3409
3410 export type ServerNotification__ContextCompactedNotification = {
3411 readonly threadId: string;
3412 readonly turnId: string;
3413 };
3414 export const ServerNotification__ContextCompactedNotification = Schema.Struct({
3415 threadId: Schema.String,
3416 turnId: Schema.String,
3417 }).annotate({
3418 description: "Deprecated: Use `ContextCompaction` item type instead.",
3419 identifier: "ServerNotification__ContextCompactedNotification",
3420 });
3421
3422 export type ServerNotification__ModelRerouteReason = "highRiskCyberActivity";
3423 export const ServerNotification__ModelRerouteReason = Schema.Literal(
3424 "highRiskCyberActivity",
3425 ).annotate({ identifier: "ServerNotification__ModelRerouteReason" });
3426
3427 export type ServerNotification__ModelVerification = "trustedAccessForCyber";
3428 export const ServerNotification__ModelVerification = Schema.Literal(
3429 "trustedAccessForCyber",
3430 ).annotate({ identifier: "ServerNotification__ModelVerification" });
3431
3432 export type ServerNotification__AuthRecoveryNotification = {
3433 readonly message: string;
3434 readonly provider: string;
3435 readonly threadId: string;
3436 readonly turnId: string;
3437 };
3438 export const ServerNotification__AuthRecoveryNotification = Schema.Struct({
3439 message: Schema.String,
3440 provider: Schema.String,
3441 threadId: Schema.String,
3442 turnId: Schema.String,
3443 }).annotate({ identifier: "ServerNotification__AuthRecoveryNotification" });
3444
3445 export type ServerNotification__TurnModerationMetadataNotification = {
3446 readonly metadata: Schema.Json;
3447 readonly threadId: string;
3448 readonly turnId: string;
3449 };
3450 export const ServerNotification__TurnModerationMetadataNotification = Schema.Struct({
3451 metadata: Schema.Json.annotate({ expected: "JSON value" }),
3452 threadId: Schema.String,
3453 turnId: Schema.String,
3454 }).annotate({ identifier: "ServerNotification__TurnModerationMetadataNotification" });
3455
3456 export type ServerNotification__ModelSafetyBufferingUpdatedNotification = {
3457 readonly fasterModel?: string | null;
3458 readonly model: string;
3459 readonly reasons: ReadonlyArray<string>;
3460 readonly showBufferingUi: boolean;
3461 readonly threadId: string;
3462 readonly turnId: string;
3463 readonly useCases: ReadonlyArray<string>;
3464 };
3465 export const ServerNotification__ModelSafetyBufferingUpdatedNotification = Schema.Struct({
3466 fasterModel: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3467 model: Schema.String,
3468 reasons: Schema.Array(Schema.String),
3469 showBufferingUi: Schema.Boolean,
3470 threadId: Schema.String,
3471 turnId: Schema.String,
3472 useCases: Schema.Array(Schema.String),
3473 }).annotate({ identifier: "ServerNotification__ModelSafetyBufferingUpdatedNotification" });
3474
3475 export type ServerNotification__WarningNotification = {
3476 readonly message: string;
3477 readonly threadId?: string | null;
3478 };
3479 export const ServerNotification__WarningNotification = Schema.Struct({
3480 message: Schema.String.annotate({ description: "Concise warning message for the user." }),
3481 threadId: Schema.optionalKey(
3482 Schema.Union([
3483 Schema.String.annotate({
3484 description: "Optional thread target when the warning applies to a specific thread.",
3485 }),
3486 Schema.Null,
3487 ]),
3488 ),
3489 }).annotate({ identifier: "ServerNotification__WarningNotification" });
3490
3491 export type ServerNotification__GuardianWarningNotification = {
3492 readonly message: string;
3493 readonly threadId: string;
3494 };
3495 export const ServerNotification__GuardianWarningNotification = Schema.Struct({
3496 message: Schema.String.annotate({
3497 description: "Concise guardian warning message for the user.",
3498 }),
3499 threadId: Schema.String.annotate({ description: "Thread target for the guardian warning." }),
3500 }).annotate({ identifier: "ServerNotification__GuardianWarningNotification" });
3501
3502 export type ServerNotification__DeprecationNoticeNotification = {
3503 readonly details?: string | null;
3504 readonly summary: string;
3505 };
3506 export const ServerNotification__DeprecationNoticeNotification = Schema.Struct({
3507 details: Schema.optionalKey(
3508 Schema.Union([
3509 Schema.String.annotate({
3510 description: "Optional extra guidance, such as migration steps or rationale.",
3511 }),
3512 Schema.Null,
3513 ]),
3514 ),
3515 summary: Schema.String.annotate({ description: "Concise summary of what is deprecated." }),
3516 }).annotate({ identifier: "ServerNotification__DeprecationNoticeNotification" });
3517
3518 export type ServerNotification__TextPosition = { readonly column: number; readonly line: number };
3519 export const ServerNotification__TextPosition = Schema.Struct({
3520 column: Schema.Number.annotate({
3521 description: "1-based column number (in Unicode scalar values).",
3522 format: "uint",
3523 })
3524 .check(Schema.isInt().annotate({ expected: "an integer" }))
3525 .check(
3526 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
3527 ),
3528 line: Schema.Number.annotate({ description: "1-based line number.", format: "uint" })
3529 .check(Schema.isInt().annotate({ expected: "an integer" }))
3530 .check(
3531 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
3532 ),
3533 }).annotate({ identifier: "ServerNotification__TextPosition" });
3534
3535 export type ServerNotification__FuzzyFileSearchMatchType = "file" | "directory";
3536 export const ServerNotification__FuzzyFileSearchMatchType = Schema.Literals([
3537 "file",
3538 "directory",
3539 ]).annotate({ identifier: "ServerNotification__FuzzyFileSearchMatchType" });
3540
3541 export type ServerNotification__FuzzyFileSearchSessionCompletedNotification = {
3542 readonly sessionId: string;
3543 };
3544 export const ServerNotification__FuzzyFileSearchSessionCompletedNotification = Schema.Struct({
3545 sessionId: Schema.String,
3546 }).annotate({ identifier: "ServerNotification__FuzzyFileSearchSessionCompletedNotification" });
3547
3548 export type ServerNotification__RealtimeConversationVersion = "v1" | "v2" | "v3";
3549 export const ServerNotification__RealtimeConversationVersion = Schema.Literals([
3550 "v1",
3551 "v2",
3552 "v3",
3553 ]).annotate({ identifier: "ServerNotification__RealtimeConversationVersion" });
3554
3555 export type ServerNotification__ThreadRealtimeItemAddedNotification = {
3556 readonly item: Schema.Json;
3557 readonly threadId: string;
3558 };
3559 export const ServerNotification__ThreadRealtimeItemAddedNotification = Schema.Struct({
3560 item: Schema.Json.annotate({ expected: "JSON value" }),
3561 threadId: Schema.String,
3562 }).annotate({
3563 description: "EXPERIMENTAL - raw non-audio thread realtime item emitted by the backend.",
3564 identifier: "ServerNotification__ThreadRealtimeItemAddedNotification",
3565 });
3566
3567 export type ServerNotification__ThreadRealtimeTranscriptRole = "user" | "assistant";
3568 export const ServerNotification__ThreadRealtimeTranscriptRole = Schema.Literals([
3569 "user",
3570 "assistant",
3571 ]).annotate({ identifier: "ServerNotification__ThreadRealtimeTranscriptRole" });
3572
3573 export type ServerNotification__ThreadRealtimeBemItemPresentation =
3574 | { readonly type: "wholeItem" }
3575 | { readonly type: "inlineMarkdown" }
3576 | { readonly index: number; readonly type: "inlineVisualization" };
3577 export const ServerNotification__ThreadRealtimeBemItemPresentation = Schema.Union(
3578 [
3579 Schema.Struct({
3580 type: Schema.Literal("wholeItem").annotate({
3581 title: "WholeItemThreadRealtimeBemItemPresentationType",
3582 }),
3583 }).annotate({ title: "WholeItemThreadRealtimeBemItemPresentation" }),
3584 Schema.Struct({
3585 type: Schema.Literal("inlineMarkdown").annotate({
3586 title: "InlineMarkdownThreadRealtimeBemItemPresentationType",
3587 }),
3588 }).annotate({ title: "InlineMarkdownThreadRealtimeBemItemPresentation" }),
3589 Schema.Struct({
3590 index: Schema.Number.annotate({ format: "uint32" })
3591 .check(Schema.isInt().annotate({ expected: "an integer" }))
3592 .check(
3593 Schema.isGreaterThanOrEqualTo(0).annotate({
3594 expected: "a value greater than or equal to 0",
3595 }),
3596 ),
3597 type: Schema.Literal("inlineVisualization").annotate({
3598 title: "InlineVisualizationThreadRealtimeBemItemPresentationType",
3599 }),
3600 }).annotate({ title: "InlineVisualizationThreadRealtimeBemItemPresentation" }),
3601 ],
3602 { mode: "oneOf" },
3603 ).annotate({
3604 description: "EXPERIMENTAL - how an existing agent item appears in a realtime conversation.",
3605 identifier: "ServerNotification__ThreadRealtimeBemItemPresentation",
3606 });
3607
3608 export type ServerNotification__ThreadRealtimeSessionOutcome = "ended" | "failed";
3609 export const ServerNotification__ThreadRealtimeSessionOutcome = Schema.Literals([
3610 "ended",
3611 "failed",
3612 ]).annotate({ identifier: "ServerNotification__ThreadRealtimeSessionOutcome" });
3613
3614 export type ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification = {
3615 readonly delta: string;
3616 readonly itemId: string;
3617 readonly threadId: string;
3618 };
3619 export const ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification = Schema.Struct({
3620 delta: Schema.String,
3621 itemId: Schema.String,
3622 threadId: Schema.String,
3623 }).annotate({
3624 description: "EXPERIMENTAL - text appended to an active realtime transcript item.",
3625 identifier: "ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification",
3626 });
3627
3628 export type ServerNotification__ThreadRealtimeTranscriptDeltaNotification = {
3629 readonly delta: string;
3630 readonly role: string;
3631 readonly threadId: string;
3632 };
3633 export const ServerNotification__ThreadRealtimeTranscriptDeltaNotification = Schema.Struct({
3634 delta: Schema.String.annotate({ description: "Live transcript delta from the realtime event." }),
3635 role: Schema.String,
3636 threadId: Schema.String,
3637 }).annotate({
3638 description:
3639 "EXPERIMENTAL - flat transcript delta emitted whenever realtime transcript text changes.",
3640 identifier: "ServerNotification__ThreadRealtimeTranscriptDeltaNotification",
3641 });
3642
3643 export type ServerNotification__ThreadRealtimeTranscriptDoneNotification = {
3644 readonly role: string;
3645 readonly text: string;
3646 readonly threadId: string;
3647 };
3648 export const ServerNotification__ThreadRealtimeTranscriptDoneNotification = Schema.Struct({
3649 role: Schema.String,
3650 text: Schema.String.annotate({ description: "Final complete text for the transcript part." }),
3651 threadId: Schema.String,
3652 }).annotate({
3653 description:
3654 "EXPERIMENTAL - final transcript text emitted when realtime completes a transcript part.",
3655 identifier: "ServerNotification__ThreadRealtimeTranscriptDoneNotification",
3656 });
3657
3658 export type ServerNotification__ThreadRealtimeAudioChunk = {
3659 readonly data: string;
3660 readonly itemId?: string | null;
3661 readonly numChannels: number;
3662 readonly sampleRate: number;
3663 readonly samplesPerChannel?: number | null;
3664 };
3665 export const ServerNotification__ThreadRealtimeAudioChunk = Schema.Struct({
3666 data: Schema.String,
3667 itemId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3668 numChannels: Schema.Number.annotate({ format: "uint16" })
3669 .check(Schema.isInt().annotate({ expected: "an integer" }))
3670 .check(
3671 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
3672 ),
3673 sampleRate: Schema.Number.annotate({ format: "uint32" })
3674 .check(Schema.isInt().annotate({ expected: "an integer" }))
3675 .check(
3676 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
3677 ),
3678 samplesPerChannel: Schema.optionalKey(
3679 Schema.Union([
3680 Schema.Number.annotate({ format: "uint32" })
3681 .check(Schema.isInt().annotate({ expected: "an integer" }))
3682 .check(
3683 Schema.isGreaterThanOrEqualTo(0).annotate({
3684 expected: "a value greater than or equal to 0",
3685 }),
3686 ),
3687 Schema.Null,
3688 ]),
3689 ),
3690 }).annotate({
3691 description: "EXPERIMENTAL - thread realtime audio chunk.",
3692 identifier: "ServerNotification__ThreadRealtimeAudioChunk",
3693 });
3694
3695 export type ServerNotification__ThreadRealtimeSdpNotification = {
3696 readonly sdp: string;
3697 readonly threadId: string;
3698 };
3699 export const ServerNotification__ThreadRealtimeSdpNotification = Schema.Struct({
3700 sdp: Schema.String,
3701 threadId: Schema.String,
3702 }).annotate({
3703 description: "EXPERIMENTAL - emitted with the remote SDP for a WebRTC realtime session.",
3704 identifier: "ServerNotification__ThreadRealtimeSdpNotification",
3705 });
3706
3707 export type ServerNotification__ThreadRealtimeErrorNotification = {
3708 readonly message: string;
3709 readonly threadId: string;
3710 };
3711 export const ServerNotification__ThreadRealtimeErrorNotification = Schema.Struct({
3712 message: Schema.String,
3713 threadId: Schema.String,
3714 }).annotate({
3715 description: "EXPERIMENTAL - emitted when thread realtime encounters an error.",
3716 identifier: "ServerNotification__ThreadRealtimeErrorNotification",
3717 });
3718
3719 export type ServerNotification__ThreadRealtimeClosedNotification = {
3720 readonly reason?: string | null;
3721 readonly threadId: string;
3722 };
3723 export const ServerNotification__ThreadRealtimeClosedNotification = Schema.Struct({
3724 reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3725 threadId: Schema.String,
3726 }).annotate({
3727 description: "EXPERIMENTAL - emitted when thread realtime transport closes.",
3728 identifier: "ServerNotification__ThreadRealtimeClosedNotification",
3729 });
3730
3731 export type ServerNotification__WindowsWorldWritableWarningNotification = {
3732 readonly extraCount: number;
3733 readonly failedScan: boolean;
3734 readonly samplePaths: ReadonlyArray<string>;
3735 };
3736 export const ServerNotification__WindowsWorldWritableWarningNotification = Schema.Struct({
3737 extraCount: Schema.Number.annotate({ format: "uint" })
3738 .check(Schema.isInt().annotate({ expected: "an integer" }))
3739 .check(
3740 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
3741 ),
3742 failedScan: Schema.Boolean,
3743 samplePaths: Schema.Array(Schema.String),
3744 }).annotate({ identifier: "ServerNotification__WindowsWorldWritableWarningNotification" });
3745
3746 export type ServerNotification__WindowsSandboxSetupMode = "elevated" | "unelevated";
3747 export const ServerNotification__WindowsSandboxSetupMode = Schema.Literals([
3748 "elevated",
3749 "unelevated",
3750 ]).annotate({ identifier: "ServerNotification__WindowsSandboxSetupMode" });
3751
3752 export type ServerNotification__DesktopOnboardingEntrypoint = "life_sciences";
3753 export const ServerNotification__DesktopOnboardingEntrypoint = Schema.Literal(
3754 "life_sciences",
3755 ).annotate({ identifier: "ServerNotification__DesktopOnboardingEntrypoint" });
3756
3757 export type ServerRequest__RequestId = string | number;
3758 export const ServerRequest__RequestId = Schema.Union([
3759 Schema.String,
3760 Schema.Number.annotate({ format: "int64" }).check(
3761 Schema.isInt().annotate({ expected: "an integer" }),
3762 ),
3763 ]).annotate({ identifier: "ServerRequest__RequestId" });
3764
3765 export type ServerRequest__LegacyAppPathString = string;
3766 export const ServerRequest__LegacyAppPathString = Schema.String.annotate({
3767 identifier: "ServerRequest__LegacyAppPathString",
3768 });
3769
3770 export type ServerRequest__CommandExecutionApprovalKind = "command" | "writeStdin";
3771 export const ServerRequest__CommandExecutionApprovalKind = Schema.Literals([
3772 "command",
3773 "writeStdin",
3774 ]).annotate({
3775 description: "Distinguishes a command approval from input sent to an existing terminal.",
3776 identifier: "ServerRequest__CommandExecutionApprovalKind",
3777 });
3778
3779 export type ServerRequest__NetworkApprovalProtocol = "http" | "https" | "socks5Tcp" | "socks5Udp";
3780 export const ServerRequest__NetworkApprovalProtocol = Schema.Literals([
3781 "http",
3782 "https",
3783 "socks5Tcp",
3784 "socks5Udp",
3785 ]).annotate({ identifier: "ServerRequest__NetworkApprovalProtocol" });
3786
3787 export type ServerRequest__NetworkPolicyRuleAction = "allow" | "deny";
3788 export const ServerRequest__NetworkPolicyRuleAction = Schema.Literals(["allow", "deny"]).annotate({
3789 identifier: "ServerRequest__NetworkPolicyRuleAction",
3790 });
3791
3792 export type ServerRequest__FileChangeRequestApprovalParams = {
3793 readonly grantRoot?: string | null;
3794 readonly itemId: string;
3795 readonly reason?: string | null;
3796 readonly startedAtMs: number;
3797 readonly threadId: string;
3798 readonly turnId: string;
3799 };
3800 export const ServerRequest__FileChangeRequestApprovalParams = Schema.Struct({
3801 grantRoot: Schema.optionalKey(
3802 Schema.Union([
3803 Schema.String.annotate({
3804 description:
3805 "[UNSTABLE] When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).",
3806 }),
3807 Schema.Null,
3808 ]),
3809 ),
3810 itemId: Schema.String,
3811 reason: Schema.optionalKey(
3812 Schema.Union([
3813 Schema.String.annotate({
3814 description: "Optional explanatory reason (e.g. request for extra write access).",
3815 }),
3816 Schema.Null,
3817 ]),
3818 ),
3819 startedAtMs: Schema.Number.annotate({
3820 description: "Unix timestamp (in milliseconds) when this approval request started.",
3821 format: "int64",
3822 }).check(Schema.isInt().annotate({ expected: "an integer" })),
3823 threadId: Schema.String,
3824 turnId: Schema.String,
3825 }).annotate({ identifier: "ServerRequest__FileChangeRequestApprovalParams" });
3826
3827 export type ServerRequest__ToolRequestUserInputOption = {
3828 readonly description: string;
3829 readonly label: string;
3830 };
3831 export const ServerRequest__ToolRequestUserInputOption = Schema.Struct({
3832 description: Schema.String,
3833 label: Schema.String,
3834 }).annotate({
3835 description: "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
3836 identifier: "ServerRequest__ToolRequestUserInputOption",
3837 });
3838
3839 export type ServerRequest__McpElicitationStringType = "string";
3840 export const ServerRequest__McpElicitationStringType = Schema.Literal("string").annotate({
3841 identifier: "ServerRequest__McpElicitationStringType",
3842 });
3843
3844 export type ServerRequest__McpElicitationConstOption = {
3845 readonly const: string;
3846 readonly title: string;
3847 };
3848 export const ServerRequest__McpElicitationConstOption = Schema.Struct({
3849 const: Schema.String,
3850 title: Schema.String,
3851 }).annotate({ identifier: "ServerRequest__McpElicitationConstOption" });
3852
3853 export type ServerRequest__McpElicitationArrayType = "array";
3854 export const ServerRequest__McpElicitationArrayType = Schema.Literal("array").annotate({
3855 identifier: "ServerRequest__McpElicitationArrayType",
3856 });
3857
3858 export type ServerRequest__McpElicitationStringFormat = "email" | "uri" | "date" | "date-time";
3859 export const ServerRequest__McpElicitationStringFormat = Schema.Literals([
3860 "email",
3861 "uri",
3862 "date",
3863 "date-time",
3864 ]).annotate({ identifier: "ServerRequest__McpElicitationStringFormat" });
3865
3866 export type ServerRequest__McpElicitationNumberType = "number" | "integer";
3867 export const ServerRequest__McpElicitationNumberType = Schema.Literals([
3868 "number",
3869 "integer",
3870 ]).annotate({ identifier: "ServerRequest__McpElicitationNumberType" });
3871
3872 export type ServerRequest__McpElicitationBooleanType = "boolean";
3873 export const ServerRequest__McpElicitationBooleanType = Schema.Literal("boolean").annotate({
3874 identifier: "ServerRequest__McpElicitationBooleanType",
3875 });
3876
3877 export type ServerRequest__McpElicitationObjectType = "object";
3878 export const ServerRequest__McpElicitationObjectType = Schema.Literal("object").annotate({
3879 identifier: "ServerRequest__McpElicitationObjectType",
3880 });
3881
3882 export type ServerRequest__FileSystemAccessMode = "read" | "write" | "deny";
3883 export const ServerRequest__FileSystemAccessMode = Schema.Literals([
3884 "read",
3885 "write",
3886 "deny",
3887 ]).annotate({ identifier: "ServerRequest__FileSystemAccessMode" });
3888
3889 export type ServerRequest__AdditionalNetworkPermissions = { readonly enabled?: boolean | null };
3890 export const ServerRequest__AdditionalNetworkPermissions = Schema.Struct({
3891 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
3892 }).annotate({ identifier: "ServerRequest__AdditionalNetworkPermissions" });
3893
3894 export type ServerRequest__DynamicToolCallParams = {
3895 readonly arguments: Schema.Json;
3896 readonly callId: string;
3897 readonly namespace?: string | null;
3898 readonly threadId: string;
3899 readonly tool: string;
3900 readonly turnId: string;
3901 };
3902 export const ServerRequest__DynamicToolCallParams = Schema.Struct({
3903 arguments: Schema.Json.annotate({ expected: "JSON value" }),
3904 callId: Schema.String,
3905 namespace: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3906 threadId: Schema.String,
3907 tool: Schema.String,
3908 turnId: Schema.String,
3909 }).annotate({ identifier: "ServerRequest__DynamicToolCallParams" });
3910
3911 export type ServerRequest__ChatgptAuthTokensRefreshReason = "unauthorized";
3912 export const ServerRequest__ChatgptAuthTokensRefreshReason = Schema.Union(
3913 [
3914 Schema.Literal("unauthorized").annotate({
3915 description: "Codex attempted a backend request and received `401 Unauthorized`.",
3916 }),
3917 ],
3918 { mode: "oneOf" },
3919 ).annotate({ identifier: "ServerRequest__ChatgptAuthTokensRefreshReason" });
3920
3921 export type ServerRequest__AttestationGenerateParams = { readonly [x: string]: Schema.Json };
3922 export const ServerRequest__AttestationGenerateParams = Schema.Record(
3923 Schema.String,
3924 Schema.Json.annotate({ expected: "JSON value" }),
3925 ).annotate({ identifier: "ServerRequest__AttestationGenerateParams" });
3926
3927 export type ServerRequest__ThreadId = string;
3928 export const ServerRequest__ThreadId = Schema.String.annotate({
3929 identifier: "ServerRequest__ThreadId",
3930 });
3931
3932 export type ServerRequest__FileChange =
3933 | { readonly content: string; readonly type: "add" }
3934 | { readonly content: string; readonly type: "delete" }
3935 | { readonly move_path?: string | null; readonly type: "update"; readonly unified_diff: string };
3936 export const ServerRequest__FileChange = Schema.Union(
3937 [
3938 Schema.Struct({
3939 content: Schema.String,
3940 type: Schema.Literal("add").annotate({ title: "AddFileChangeType" }),
3941 }).annotate({ title: "AddFileChange" }),
3942 Schema.Struct({
3943 content: Schema.String,
3944 type: Schema.Literal("delete").annotate({ title: "DeleteFileChangeType" }),
3945 }).annotate({ title: "DeleteFileChange" }),
3946 Schema.Struct({
3947 move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3948 type: Schema.Literal("update").annotate({ title: "UpdateFileChangeType" }),
3949 unified_diff: Schema.String,
3950 }).annotate({ title: "UpdateFileChange" }),
3951 ],
3952 { mode: "oneOf" },
3953 ).annotate({ identifier: "ServerRequest__FileChange" });
3954
3955 export type ServerRequest__ParsedCommand =
3956 | { readonly cmd: string; readonly name: string; readonly path: string; readonly type: "read" }
3957 | { readonly cmd: string; readonly path?: string | null; readonly type: "list_files" }
3958 | {
3959 readonly cmd: string;
3960 readonly path?: string | null;
3961 readonly query?: string | null;
3962 readonly type: "search";
3963 }
3964 | { readonly cmd: string; readonly type: "unknown" };
3965 export const ServerRequest__ParsedCommand = Schema.Union(
3966 [
3967 Schema.Struct({
3968 cmd: Schema.String,
3969 name: Schema.String,
3970 path: Schema.String.annotate({
3971 description:
3972 "(Best effort) Path to the file being read by the command. When possible, this is an absolute path, though when relative, it should be resolved against the `cwd`` that will be used to run the command to derive the absolute path.",
3973 }),
3974 type: Schema.Literal("read").annotate({ title: "ReadParsedCommandType" }),
3975 }).annotate({ title: "ReadParsedCommand" }),
3976 Schema.Struct({
3977 cmd: Schema.String,
3978 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3979 type: Schema.Literal("list_files").annotate({ title: "ListFilesParsedCommandType" }),
3980 }).annotate({ title: "ListFilesParsedCommand" }),
3981 Schema.Struct({
3982 cmd: Schema.String,
3983 path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3984 query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3985 type: Schema.Literal("search").annotate({ title: "SearchParsedCommandType" }),
3986 }).annotate({ title: "SearchParsedCommand" }),
3987 Schema.Struct({
3988 cmd: Schema.String,
3989 type: Schema.Literal("unknown").annotate({ title: "UnknownParsedCommandType" }),
3990 }).annotate({ title: "UnknownParsedCommand" }),
3991 ],
3992 { mode: "oneOf" },
3993 ).annotate({ identifier: "ServerRequest__ParsedCommand" });
3994
3995 export type ToolRequestUserInputParams__ToolRequestUserInputOption = {
3996 readonly description: string;
3997 readonly label: string;
3998 };
3999 export const ToolRequestUserInputParams__ToolRequestUserInputOption = Schema.Struct({
4000 description: Schema.String,
4001 label: Schema.String,
4002 }).annotate({
4003 description: "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
4004 identifier: "ToolRequestUserInputParams__ToolRequestUserInputOption",
4005 });
4006
4007 export type ToolRequestUserInputResponse__ToolRequestUserInputAnswer = {
4008 readonly answers: ReadonlyArray<string>;
4009 };
4010 export const ToolRequestUserInputResponse__ToolRequestUserInputAnswer = Schema.Struct({
4011 answers: Schema.Array(Schema.String),
4012 }).annotate({
4013 description: "EXPERIMENTAL. Captures a user's answer to a request_user_input question.",
4014 identifier: "ToolRequestUserInputResponse__ToolRequestUserInputAnswer",
4015 });
4016
4017 export type V1InitializeParams__InitializeCapabilities = {
4018 readonly experimentalApi?: boolean;
4019 readonly explicitGatewayOauth?: boolean;
4020 readonly extensions?: { readonly [x: string]: Schema.Json } | null;
4021 readonly mcpServerOpenaiFormElicitation?: boolean;
4022 readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
4023 readonly requestAttestation?: boolean;
4024 };
4025 export const V1InitializeParams__InitializeCapabilities = Schema.Struct({
4026 experimentalApi: Schema.optionalKey(
4027 Schema.Boolean.annotate({
4028 description: "Opt into receiving experimental API methods and fields.",
4029 default: false,
4030 }),
4031 ),
4032 explicitGatewayOauth: Schema.optionalKey(
4033 Schema.Boolean.annotate({
4034 description:
4035 "Use explicit gateway OAuth login instead of automatic browser authorization. Applies to this app-server's gateway runtime; later connections cannot undo it.",
4036 }),
4037 ),
4038 extensions: Schema.optionalKey(
4039 Schema.Union([
4040 Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })).annotate({
4041 description: "MCP extension settings declared by the app-server client.",
4042 }),
4043 Schema.Null,
4044 ]),
4045 ),
4046 mcpServerOpenaiFormElicitation: Schema.optionalKey(
4047 Schema.Boolean.annotate({
4048 description:
4049 "Legacy opt-in for the `openai/form` MCP extension.\n\nNew clients should declare `openai/form` in [`Self::extensions`].",
4050 }),
4051 ),
4052 optOutNotificationMethods: Schema.optionalKey(
4053 Schema.Union([
4054 Schema.Array(Schema.String).annotate({
4055 description:
4056 "Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
4057 }),
4058 Schema.Null,
4059 ]),
4060 ),
4061 requestAttestation: Schema.optionalKey(
4062 Schema.Boolean.annotate({
4063 description: "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.",
4064 default: false,
4065 }),
4066 ),
4067 }).annotate({
4068 description: "Client-declared capabilities negotiated during initialize.",
4069 identifier: "V1InitializeParams__InitializeCapabilities",
4070 });
4071
4072 export type V1InitializeParams__ClientInfo = {
4073 readonly name: string;
4074 readonly title?: string | null;
4075 readonly version: string;
4076 };
4077 export const V1InitializeParams__ClientInfo = Schema.Struct({
4078 name: Schema.String,
4079 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4080 version: Schema.String,
4081 }).annotate({ identifier: "V1InitializeParams__ClientInfo" });
4082
4083 export type V1InitializeResponse__AbsolutePathBuf = string;
4084 export const V1InitializeResponse__AbsolutePathBuf = Schema.String.annotate({
4085 description:
4086 "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.",
4087 identifier: "V1InitializeResponse__AbsolutePathBuf",
4088 });
4089
4090 export type V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint = "life_sciences";
4091 export const V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint = Schema.Literal(
4092 "life_sciences",
4093 ).annotate({ identifier: "V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint" });
4094
4095 export type V2AccountRateLimitsUpdatedNotification__CreditsSnapshot = {
4096 readonly balance?: string | null;
4097 readonly hasCredits: boolean;
4098 readonly unlimited: boolean;
4099 };
4100 export const V2AccountRateLimitsUpdatedNotification__CreditsSnapshot = Schema.Struct({
4101 balance: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4102 hasCredits: Schema.Boolean,
4103 unlimited: Schema.Boolean,
4104 }).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__CreditsSnapshot" });
4105
4106 export type V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = {
4107 readonly limit: string;
4108 readonly remainingPercent: number;
4109 readonly resetsAt: number;
4110 readonly used: string;
4111 };
4112 export const V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = Schema.Struct({
4113 limit: Schema.String,
4114 remainingPercent: Schema.Number.annotate({ format: "int32" }).check(
4115 Schema.isInt().annotate({ expected: "an integer" }),
4116 ),
4117 resetsAt: Schema.Number.annotate({ format: "int64" }).check(
4118 Schema.isInt().annotate({ expected: "an integer" }),
4119 ),
4120 used: Schema.String,
4121 }).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot" });
4122
4123 export type V2AccountRateLimitsUpdatedNotification__PlanType = string;
4124 export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.String.annotate({
4125 identifier: "V2AccountRateLimitsUpdatedNotification__PlanType",
4126 });
4127
4128 export type V2AccountRateLimitsUpdatedNotification__RateLimitWindow = {
4129 readonly resetsAt?: number | null;
4130 readonly usedPercent: number;
4131 readonly windowDurationMins?: number | null;
4132 };
4133 export const V2AccountRateLimitsUpdatedNotification__RateLimitWindow = Schema.Struct({
4134 resetsAt: Schema.optionalKey(
4135 Schema.Union([
4136 Schema.Number.annotate({ format: "int64" }).check(
4137 Schema.isInt().annotate({ expected: "an integer" }),
4138 ),
4139 Schema.Null,
4140 ]),
4141 ),
4142 usedPercent: Schema.Number.annotate({ format: "int32" }).check(
4143 Schema.isInt().annotate({ expected: "an integer" }),
4144 ),
4145 windowDurationMins: Schema.optionalKey(
4146 Schema.Union([
4147 Schema.Number.annotate({ format: "int64" }).check(
4148 Schema.isInt().annotate({ expected: "an integer" }),
4149 ),
4150 Schema.Null,
4151 ]),
4152 ),
4153 }).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__RateLimitWindow" });
4154
4155 export type V2AccountRateLimitsUpdatedNotification__RateLimitReachedType =
4156 | "rate_limit_reached"
4157 | "workspace_owner_credits_depleted"
4158 | "workspace_member_credits_depleted"
4159 | "workspace_owner_usage_limit_reached"
4160 | "workspace_member_usage_limit_reached";
4161 export const V2AccountRateLimitsUpdatedNotification__RateLimitReachedType = Schema.Literals([
4162 "rate_limit_reached",
4163 "workspace_owner_credits_depleted",
4164 "workspace_member_credits_depleted",
4165 "workspace_owner_usage_limit_reached",
4166 "workspace_member_usage_limit_reached",
4167 ]).annotate({ identifier: "V2AccountRateLimitsUpdatedNotification__RateLimitReachedType" });
4168
4169 export type V2AccountUpdatedNotification__AuthMode =
4170 | "apikey"
4171 | "chatgpt"
4172 | "chatgptAuthTokens"
4173 | "headers"
4174 | "agentIdentity"
4175 | "personalAccessToken"
4176 | "bedrockApiKey"
4177 | "bedrockAccessKeys";
4178 export const V2AccountUpdatedNotification__AuthMode = Schema.Union(
4179 [
4180 Schema.Literal("apikey").annotate({
4181 description: "OpenAI API key provided by the caller and stored by Codex.",
4182 }),
4183 Schema.Literal("chatgpt").annotate({
4184 description: "ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).",
4185 }),
4186 Schema.Literal("chatgptAuthTokens").annotate({
4187 description:
4188 "[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.",
4189 }),
4190 Schema.Literal("headers").annotate({
4191 description: "Backend auth supplied as request headers.",
4192 }),
4193 Schema.Literal("agentIdentity").annotate({
4194 description: "Programmatic Codex auth backed by a registered Agent Identity.",
4195 }),
4196 Schema.Literal("personalAccessToken").annotate({
4197 description: "Programmatic Codex auth backed by a personal access token.",
4198 }),
4199 Schema.Literal("bedrockApiKey").annotate({
4200 description: "Amazon Bedrock bearer token managed by Codex.",
4201 }),
4202 Schema.Literal("bedrockAccessKeys").annotate({
4203 description: "Amazon Bedrock AWS access keys managed by Codex.",
4204 }),
4205 ],
4206 { mode: "oneOf" },
4207 ).annotate({
4208 description: "Authentication mode for OpenAI-backed providers.",
4209 identifier: "V2AccountUpdatedNotification__AuthMode",
4210 });
4211
4212 export type V2AccountUpdatedNotification__PlanType = string;
4213 export const V2AccountUpdatedNotification__PlanType = Schema.String.annotate({
4214 identifier: "V2AccountUpdatedNotification__PlanType",
4215 });
4216
4217 export type V2AppListUpdatedNotification__AppReview = { readonly status: string };
4218 export const V2AppListUpdatedNotification__AppReview = Schema.Struct({
4219 status: Schema.String,
4220 }).annotate({ identifier: "V2AppListUpdatedNotification__AppReview" });
4221
4222 export type V2AppListUpdatedNotification__AppScreenshot = {
4223 readonly fileId?: string | null;
4224 readonly url?: string | null;
4225 readonly userPrompt: string;
4226 };
4227 export const V2AppListUpdatedNotification__AppScreenshot = Schema.Struct({
4228 fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4229 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4230 userPrompt: Schema.String,
4231 }).annotate({ identifier: "V2AppListUpdatedNotification__AppScreenshot" });
4232
4233 export type V2AppListUpdatedNotification__AppBranding = {
4234 readonly category?: string | null;
4235 readonly developer?: string | null;
4236 readonly isDiscoverableApp: boolean;
4237 readonly privacyPolicy?: string | null;
4238 readonly termsOfService?: string | null;
4239 readonly website?: string | null;
4240 };
4241 export const V2AppListUpdatedNotification__AppBranding = Schema.Struct({
4242 category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4243 developer: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4244 isDiscoverableApp: Schema.Boolean,
4245 privacyPolicy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4246 termsOfService: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4247 website: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4248 }).annotate({
4249 description: "EXPERIMENTAL - app metadata returned by app-list APIs.",
4250 identifier: "V2AppListUpdatedNotification__AppBranding",
4251 });
4252
4253 export type V2AppsInstalledResponse__InstalledApp = {
4254 readonly callable: boolean;
4255 readonly enabled: boolean;
4256 readonly id: string;
4257 readonly runtimeName?: string | null;
4258 };
4259 export const V2AppsInstalledResponse__InstalledApp = Schema.Struct({
4260 callable: Schema.Boolean.annotate({
4261 description:
4262 "Whether the connector is enabled and has a non-synthetic, model-visible tool allowed by effective MCP and app/tool policy in the committed runtime snapshot.",
4263 }),
4264 enabled: Schema.Boolean.annotate({
4265 description:
4266 "Effective enabled state after applying global, workspace, local, and managed configuration at read time.",
4267 }),
4268 id: Schema.String,
4269 runtimeName: Schema.optionalKey(
4270 Schema.Union([
4271 Schema.String.annotate({
4272 description:
4273 "Best-effort name carried by the runtime tool catalog. Canonical app metadata remains owned by `app/read`.",
4274 }),
4275 Schema.Null,
4276 ]),
4277 ),
4278 }).annotate({
4279 description: "Installed connector runtime state.",
4280 identifier: "V2AppsInstalledResponse__InstalledApp",
4281 });
4282
4283 export type V2AppsListResponse__AppReview = { readonly status: string };
4284 export const V2AppsListResponse__AppReview = Schema.Struct({ status: Schema.String }).annotate({
4285 identifier: "V2AppsListResponse__AppReview",
4286 });
4287
4288 export type V2AppsListResponse__AppScreenshot = {
4289 readonly fileId?: string | null;
4290 readonly url?: string | null;
4291 readonly userPrompt: string;
4292 };
4293 export const V2AppsListResponse__AppScreenshot = Schema.Struct({
4294 fileId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4295 url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4296 userPrompt: Schema.String,
4297 }).annotate({ identifier: "V2AppsListResponse__AppScreenshot" });
4298
4299 export type V2AppsListResponse__AppBranding = {
4300 readonly category?: string | null;
4301 readonly developer?: string | null;
4302 readonly isDiscoverableApp: boolean;
4303 readonly privacyPolicy?: string | null;
4304 readonly termsOfService?: string | null;
4305 readonly website?: string | null;
4306 };
4307 export const V2AppsListResponse__AppBranding = Schema.Struct({
4308 category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4309 developer: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4310 isDiscoverableApp: Schema.Boolean,
4311 privacyPolicy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4312 termsOfService: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4313 website: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4314 }).annotate({
4315 description: "EXPERIMENTAL - app metadata returned by app-list APIs.",
4316 identifier: "V2AppsListResponse__AppBranding",
4317 });
4318
4319 export type V2AppsReadResponse__AppToolSummary = {
4320 readonly description: string;
4321 readonly disabledReason?: string | null;
4322 readonly isEnabled?: boolean;
4323 readonly isReadOnly?: boolean;
4324 readonly name: string;
4325 readonly title?: string | null;
4326 };
4327 export const V2AppsReadResponse__AppToolSummary = Schema.Struct({
4328 description: Schema.String,
4329 disabledReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4330 isEnabled: Schema.optionalKey(Schema.Boolean.annotate({ default: true })),
4331 isReadOnly: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
4332 name: Schema.String,
4333 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4334 }).annotate({
4335 description: "EXPERIMENTAL - metadata returned by app/read.",
4336 identifier: "V2AppsReadResponse__AppToolSummary",
4337 });
4338
4339 export type V2CancelLoginAccountResponse__CancelLoginAccountStatus = "canceled" | "notFound";
4340 export const V2CancelLoginAccountResponse__CancelLoginAccountStatus = Schema.Literals([
4341 "canceled",
4342 "notFound",
4343 ]).annotate({ identifier: "V2CancelLoginAccountResponse__CancelLoginAccountStatus" });
4344
4345 export type V2CommandExecOutputDeltaNotification__CommandExecOutputStream = "stdout" | "stderr";
4346 export const V2CommandExecOutputDeltaNotification__CommandExecOutputStream = Schema.Union(
4347 [
4348 Schema.Literal("stdout").annotate({
4349 description: "stdout stream. PTY mode multiplexes terminal output here.",
4350 }),
4351 Schema.Literal("stderr").annotate({ description: "stderr stream." }),
4352 ],
4353 { mode: "oneOf" },
4354 ).annotate({
4355 description: "Stream label for `command/exec/outputDelta` notifications.",
4356 identifier: "V2CommandExecOutputDeltaNotification__CommandExecOutputStream",
4357 });
4358
4359 export type V2CommandExecParams__NetworkAccess = "restricted" | "enabled";
4360 export const V2CommandExecParams__NetworkAccess = Schema.Literals([
4361 "restricted",
4362 "enabled",
4363 ]).annotate({ identifier: "V2CommandExecParams__NetworkAccess" });
4364
4365 export type V2CommandExecParams__AbsolutePathBuf = string;
4366 export const V2CommandExecParams__AbsolutePathBuf = Schema.String.annotate({
4367 description:
4368 "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.",
4369 identifier: "V2CommandExecParams__AbsolutePathBuf",
4370 });
4371
4372 export type V2CommandExecParams__CommandExecTerminalSize = {
4373 readonly cols: number;
4374 readonly rows: number;
4375 };
4376 export const V2CommandExecParams__CommandExecTerminalSize = Schema.Struct({
4377 cols: Schema.Number.annotate({
4378 description: "Terminal width in character cells.",
4379 format: "uint16",
4380 })
4381 .check(Schema.isInt().annotate({ expected: "an integer" }))
4382 .check(
4383 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
4384 ),
4385 rows: Schema.Number.annotate({
4386 description: "Terminal height in character cells.",
4387 format: "uint16",
4388 })
4389 .check(Schema.isInt().annotate({ expected: "an integer" }))
4390 .check(
4391 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
4392 ),
4393 }).annotate({
4394 description: "PTY size in character cells for `command/exec` PTY sessions.",
4395 identifier: "V2CommandExecParams__CommandExecTerminalSize",
4396 });
4397
4398 export type V2CommandExecResizeParams__CommandExecTerminalSize = {
4399 readonly cols: number;
4400 readonly rows: number;
4401 };
4402 export const V2CommandExecResizeParams__CommandExecTerminalSize = Schema.Struct({
4403 cols: Schema.Number.annotate({
4404 description: "Terminal width in character cells.",
4405 format: "uint16",
4406 })
4407 .check(Schema.isInt().annotate({ expected: "an integer" }))
4408 .check(
4409 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
4410 ),
4411 rows: Schema.Number.annotate({
4412 description: "Terminal height in character cells.",
4413 format: "uint16",
4414 })
4415 .check(Schema.isInt().annotate({ expected: "an integer" }))
4416 .check(
4417 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
4418 ),
4419 }).annotate({
4420 description: "PTY size in character cells for `command/exec` PTY sessions.",
4421 identifier: "V2CommandExecResizeParams__CommandExecTerminalSize",
4422 });
4423
4424 export type V2ConfigBatchWriteParams__MergeStrategy = "replace" | "upsert";
4425 export const V2ConfigBatchWriteParams__MergeStrategy = Schema.Literals([
4426 "replace",
4427 "upsert",
4428 ]).annotate({ identifier: "V2ConfigBatchWriteParams__MergeStrategy" });
4429
4430 export type V2ConfigReadResponse__AnalyticsConfig = { readonly enabled?: boolean | null } & {
4431 readonly [x: string]: Schema.Json;
4432 };
4433 export const V2ConfigReadResponse__AnalyticsConfig = Schema.StructWithRest(
4434 Schema.Struct({ enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])) }),
4435 [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))],
4436 ).annotate({ identifier: "V2ConfigReadResponse__AnalyticsConfig" });
4437
4438 export type V2ConfigReadResponse__AskForApproval =
4439 | "untrusted"
4440 | "on-request"
4441 | "never"
4442 | {
4443 readonly granular: {
4444 readonly mcp_elicitations: boolean;
4445 readonly request_permissions?: boolean;
4446 readonly rules: boolean;
4447 readonly sandbox_approval: boolean;
4448 readonly skill_approval?: boolean;
4449 };
4450 };
4451 export const V2ConfigReadResponse__AskForApproval = Schema.Union(
4452 [
4453 Schema.Literals(["untrusted", "on-request", "never"]),
4454 Schema.Struct({
4455 granular: Schema.Struct({
4456 mcp_elicitations: Schema.Boolean,
4457 request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
4458 rules: Schema.Boolean,
4459 sandbox_approval: Schema.Boolean,
4460 skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
4461 }),
4462 }).annotate({ title: "GranularAskForApproval" }),
4463 ],
4464 { mode: "oneOf" },
4465 ).annotate({ identifier: "V2ConfigReadResponse__AskForApproval" });
4466
4467 export type V2ConfigReadResponse__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
4468 export const V2ConfigReadResponse__ApprovalsReviewer = Schema.Literals([
4469 "user",
4470 "auto_review",
4471 "guardian_subagent",
4472 ]).annotate({
4473 description:
4474 "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.",
4475 identifier: "V2ConfigReadResponse__ApprovalsReviewer",
4476 });
4477
4478 export type V2ConfigReadResponse__AllowDenyRequirement = "allow" | "deny";
4479 export const V2ConfigReadResponse__AllowDenyRequirement = Schema.Literals([
4480 "allow",
4481 "deny",
4482 ]).annotate({ identifier: "V2ConfigReadResponse__AllowDenyRequirement" });
4483
4484 export type V2ConfigReadResponse__ForcedChatgptWorkspaceIds = string | ReadonlyArray<string>;
4485 export const V2ConfigReadResponse__ForcedChatgptWorkspaceIds = Schema.Union([
4486 Schema.String,
4487 Schema.Array(Schema.String),
4488 ]).annotate({
4489 description: "Backward-compatible API shape for ChatGPT workspace login restrictions.",
4490 identifier: "V2ConfigReadResponse__ForcedChatgptWorkspaceIds",
4491 });
4492
4493 export type V2ConfigReadResponse__ForcedLoginMethod = "chatgpt" | "api";
4494 export const V2ConfigReadResponse__ForcedLoginMethod = Schema.Literals(["chatgpt", "api"]).annotate(
4495 { identifier: "V2ConfigReadResponse__ForcedLoginMethod" },
4496 );
4497
4498 export type V2ConfigReadResponse__AutoCompactTokenLimitScope = "total" | "body_after_prefix";
4499 export const V2ConfigReadResponse__AutoCompactTokenLimitScope = Schema.Union(
4500 [
4501 Schema.Literal("total").annotate({
4502 description: "Count the full active context against the limit.",
4503 }),
4504 Schema.Literal("body_after_prefix").annotate({
4505 description: "Count sampled output and later growth after the carried window prefix.",
4506 }),
4507 ],
4508 { mode: "oneOf" },
4509 ).annotate({
4510 description:
4511 "Selects which part of the active context is charged against `model_auto_compact_token_limit`.",
4512 identifier: "V2ConfigReadResponse__AutoCompactTokenLimitScope",
4513 });
4514
4515 export type V2ConfigReadResponse__ReasoningEffort = string;
4516 export const V2ConfigReadResponse__ReasoningEffort = Schema.String.annotate({
4517 description: "A non-empty reasoning effort value advertised by the model.",
4518 }).check(
4519 Schema.isMinLength(1).annotate({
4520 expected: "a value with a length of at least 1",
4521 identifier: "V2ConfigReadResponse__ReasoningEffort",
4522 }),
4523 );
4524
4525 export type V2ConfigReadResponse__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
4526 export const V2ConfigReadResponse__ReasoningSummary = Schema.Union(
4527 [
4528 Schema.Literals(["auto", "concise", "detailed"]),
4529 Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
4530 ],
4531 { mode: "oneOf" },
4532 ).annotate({
4533 description:
4534 "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",
4535 identifier: "V2ConfigReadResponse__ReasoningSummary",
4536 });
4537
4538 export type V2ConfigReadResponse__Verbosity = "low" | "medium" | "high";
4539 export const V2ConfigReadResponse__Verbosity = Schema.Literals(["low", "medium", "high"]).annotate({
4540 description:
4541 "Controls output length/detail on GPT-5 models via the Responses API. Serialized with lowercase values to match the OpenAI API.",
4542 identifier: "V2ConfigReadResponse__Verbosity",
4543 });
4544
4545 export type V2ConfigReadResponse__SandboxMode =
4546 | "read-only"
4547 | "workspace-write"
4548 | "danger-full-access";
4549 export const V2ConfigReadResponse__SandboxMode = Schema.Literals([
4550 "read-only",
4551 "workspace-write",
4552 "danger-full-access",
4553 ]).annotate({ identifier: "V2ConfigReadResponse__SandboxMode" });
4554
4555 export type V2ConfigReadResponse__SandboxWorkspaceWrite = {
4556 readonly exclude_slash_tmp?: boolean;
4557 readonly exclude_tmpdir_env_var?: boolean;
4558 readonly network_access?: boolean;
4559 readonly writable_roots?: ReadonlyArray<string>;
4560 };
4561 export const V2ConfigReadResponse__SandboxWorkspaceWrite = Schema.Struct({
4562 exclude_slash_tmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
4563 exclude_tmpdir_env_var: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
4564 network_access: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
4565 writable_roots: Schema.optionalKey(Schema.Array(Schema.String).annotate({ default: [] })),
4566 }).annotate({ identifier: "V2ConfigReadResponse__SandboxWorkspaceWrite" });
4567
4568 export type V2ConfigReadResponse__WebSearchContextSize = "low" | "medium" | "high";
4569 export const V2ConfigReadResponse__WebSearchContextSize = Schema.Literals([
4570 "low",
4571 "medium",
4572 "high",
4573 ]).annotate({ identifier: "V2ConfigReadResponse__WebSearchContextSize" });
4574
4575 export type V2ConfigReadResponse__WebSearchLocation = {
4576 readonly city?: string | null;
4577 readonly country?: string | null;
4578 readonly region?: string | null;
4579 readonly timezone?: string | null;
4580 };
4581 export const V2ConfigReadResponse__WebSearchLocation = Schema.Struct({
4582 city: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4583 country: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4584 region: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4585 timezone: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4586 }).annotate({ identifier: "V2ConfigReadResponse__WebSearchLocation" });
4587
4588 export type V2ConfigReadResponse__WebSearchMode = "disabled" | "cached" | "indexed" | "live";
4589 export const V2ConfigReadResponse__WebSearchMode = Schema.Literals([
4590 "disabled",
4591 "cached",
4592 "indexed",
4593 "live",
4594 ]).annotate({ identifier: "V2ConfigReadResponse__WebSearchMode" });
4595
4596 export type V2ConfigReadResponse__AbsolutePathBuf = string;
4597 export const V2ConfigReadResponse__AbsolutePathBuf = Schema.String.annotate({
4598 description:
4599 "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.",
4600 identifier: "V2ConfigReadResponse__AbsolutePathBuf",
4601 });
4602
4603 export type V2ConfigReadResponse__AppToolApproval = "auto" | "prompt" | "writes" | "approve";
4604 export const V2ConfigReadResponse__AppToolApproval = Schema.Literals([
4605 "auto",
4606 "prompt",
4607 "writes",
4608 "approve",
4609 ]).annotate({ identifier: "V2ConfigReadResponse__AppToolApproval" });
4610
4611 export type V2ConfigReadResponse__AppLinksConfig = { readonly [x: string]: Schema.Json };
4612 export const V2ConfigReadResponse__AppLinksConfig = Schema.Record(
4613 Schema.String,
4614 Schema.Json.annotate({ expected: "JSON value" }),
4615 ).annotate({
4616 description: "Account settings for a single app.",
4617 identifier: "V2ConfigReadResponse__AppLinksConfig",
4618 });
4619
4620 export type V2ConfigReadResponse__ToolExposureSurface = "code_mode" | "deferred" | "direct";
4621 export const V2ConfigReadResponse__ToolExposureSurface = Schema.Union(
4622 [
4623 Schema.Literal("code_mode").annotate({
4624 description: "Nested tools available to Code Mode scripts.",
4625 }),
4626 Schema.Literal("deferred").annotate({
4627 description: "Tools discovered later through tool search.",
4628 }),
4629 Schema.Literal("direct").annotate({
4630 description: "Tools present in the model's initial tool list.",
4631 }),
4632 ],
4633 { mode: "oneOf" },
4634 ).annotate({
4635 description: "A model-facing surface on which a tool can be exposed.",
4636 identifier: "V2ConfigReadResponse__ToolExposureSurface",
4637 });
4638
4639 export type V2ConfigReadResponse__AppToolsConfig = { readonly [x: string]: Schema.Json };
4640 export const V2ConfigReadResponse__AppToolsConfig = Schema.Record(
4641 Schema.String,
4642 Schema.Json.annotate({ expected: "JSON value" }),
4643 ).annotate({ identifier: "V2ConfigReadResponse__AppToolsConfig" });
4644
4645 export type V2ConfigRequirementsReadResponse__AskForApproval =
4646 | "untrusted"
4647 | "on-request"
4648 | "never"
4649 | {
4650 readonly granular: {
4651 readonly mcp_elicitations: boolean;
4652 readonly request_permissions?: boolean;
4653 readonly rules: boolean;
4654 readonly sandbox_approval: boolean;
4655 readonly skill_approval?: boolean;
4656 };
4657 };
4658 export const V2ConfigRequirementsReadResponse__AskForApproval = Schema.Union(
4659 [
4660 Schema.Literals(["untrusted", "on-request", "never"]),
4661 Schema.Struct({
4662 granular: Schema.Struct({
4663 mcp_elicitations: Schema.Boolean,
4664 request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
4665 rules: Schema.Boolean,
4666 sandbox_approval: Schema.Boolean,
4667 skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
4668 }),
4669 }).annotate({ title: "GranularAskForApproval" }),
4670 ],
4671 { mode: "oneOf" },
4672 ).annotate({ identifier: "V2ConfigRequirementsReadResponse__AskForApproval" });
4673
4674 export type V2ConfigRequirementsReadResponse__ForcedLoginMethod = "chatgpt" | "api";
4675 export const V2ConfigRequirementsReadResponse__ForcedLoginMethod = Schema.Literals([
4676 "chatgpt",
4677 "api",
4678 ]).annotate({ identifier: "V2ConfigRequirementsReadResponse__ForcedLoginMethod" });
4679
4680 export type V2ConfigRequirementsReadResponse__SandboxMode =
4681 | "read-only"
4682 | "workspace-write"
4683 | "danger-full-access";
4684 export const V2ConfigRequirementsReadResponse__SandboxMode = Schema.Literals([
4685 "read-only",
4686 "workspace-write",
4687 "danger-full-access",
4688 ]).annotate({ identifier: "V2ConfigRequirementsReadResponse__SandboxMode" });
4689
4690 export type V2ConfigRequirementsReadResponse__WebSearchMode =
4691 | "disabled"
4692 | "cached"
4693 | "indexed"
4694 | "live";
4695 export const V2ConfigRequirementsReadResponse__WebSearchMode = Schema.Literals([
4696 "disabled",
4697 "cached",
4698 "indexed",
4699 "live",
4700 ]).annotate({ identifier: "V2ConfigRequirementsReadResponse__WebSearchMode" });
4701
4702 export type V2ConfigRequirementsReadResponse__WindowsSandboxImplementation =
4703 | "elevated"
4704 | "unelevated"
4705 | "mxc";
4706 export const V2ConfigRequirementsReadResponse__WindowsSandboxImplementation = Schema.Literals([
4707 "elevated",
4708 "unelevated",
4709 "mxc",
4710 ]).annotate({ identifier: "V2ConfigRequirementsReadResponse__WindowsSandboxImplementation" });
4711
4712 export type V2ConfigRequirementsReadResponse__AutoReviewRequirements = {
4713 readonly ignoreRules?: ReadonlyArray<string> | null;
4714 readonly requiredOnModels?: ReadonlyArray<string> | null;
4715 };
4716 export const V2ConfigRequirementsReadResponse__AutoReviewRequirements = Schema.Struct({
4717 ignoreRules: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
4718 requiredOnModels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
4719 }).annotate({ identifier: "V2ConfigRequirementsReadResponse__AutoReviewRequirements" });
4720
4721 export type V2ConfigRequirementsReadResponse__AllowDenyRequirement = "allow" | "deny";
4722 export const V2ConfigRequirementsReadResponse__AllowDenyRequirement = Schema.Literals([
4723 "allow",
4724 "deny",
4725 ]).annotate({ identifier: "V2ConfigRequirementsReadResponse__AllowDenyRequirement" });
4726
4727 export type V2ConfigRequirementsReadResponse__BrowserUseAccessApprovalLifetime = "turn" | "thread";
4728 export const V2ConfigRequirementsReadResponse__BrowserUseAccessApprovalLifetime = Schema.Literals([
4729 "turn",
4730 "thread",
4731 ]).annotate({ identifier: "V2ConfigRequirementsReadResponse__BrowserUseAccessApprovalLifetime" });
4732
4733 export type V2ConfigRequirementsReadResponse__CliAuthCredentialsStoreMode =
4734 | "file"
4735 | "keyring"
4736 | "auto"
4737 | "ephemeral";
4738 export const V2ConfigRequirementsReadResponse__CliAuthCredentialsStoreMode = Schema.Literals([
4739 "file",
4740 "keyring",
4741 "auto",
4742 "ephemeral",
4743 ]).annotate({ identifier: "V2ConfigRequirementsReadResponse__CliAuthCredentialsStoreMode" });
4744
4745 export type V2ConfigRequirementsReadResponse__ResidencyRequirement = "us";
4746 export const V2ConfigRequirementsReadResponse__ResidencyRequirement = Schema.Literal("us").annotate(
4747 { identifier: "V2ConfigRequirementsReadResponse__ResidencyRequirement" },
4748 );
4749
4750 export type V2ConfigRequirementsReadResponse__FeedbackRequirements = {
4751 readonly enabled?: boolean | null;
4752 };
4753 export const V2ConfigRequirementsReadResponse__FeedbackRequirements = Schema.Struct({
4754 enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
4755 }).annotate({ identifier: "V2ConfigRequirementsReadResponse__FeedbackRequirements" });
4756
4757 export type V2ConfigRequirementsReadResponse__InAppBrowserRequirements = {
4758 readonly allowExternalBrowserSettingsImport?: boolean | null;
4759 };
4760 export const V2ConfigRequirementsReadResponse__InAppBrowserRequirements = Schema.Struct({
4761 allowExternalBrowserSettingsImport: Schema.optionalKey(
4762 Schema.Union([Schema.Boolean, Schema.Null]),
4763 ),
4764 }).annotate({ identifier: "V2ConfigRequirementsReadResponse__InAppBrowserRequirements" });
4765
4766 export type V2ConfigRequirementsReadResponse__ReasoningEffort = string;
4767 export const V2ConfigRequirementsReadResponse__ReasoningEffort = Schema.String.annotate({
4768 description: "A non-empty reasoning effort value advertised by the model.",
4769 }).check(
4770 Schema.isMinLength(1).annotate({
4771 expected: "a value with a length of at least 1",
4772 identifier: "V2ConfigRequirementsReadResponse__ReasoningEffort",
4773 }),
4774 );
4775
4776 export type V2ConfigRequirementsReadResponse__NetworkDomainPermission = "allow" | "deny";
4777 export const V2ConfigRequirementsReadResponse__NetworkDomainPermission = Schema.Literals([
4778 "allow",
4779 "deny",
4780 ]).annotate({ identifier: "V2ConfigRequirementsReadResponse__NetworkDomainPermission" });
4781
4782 export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler =
4783 | {
4784 readonly additionalContextLimit?: number | null;
4785 readonly async: boolean;
4786 readonly command: string;
4787 readonly commandWindows?: string | null;
4788 readonly statusMessage?: string | null;
4789 readonly timeoutSec?: number | null;
4790 readonly type: "command";
4791 }
4792 | {
4793 readonly input: { readonly [x: string]: Schema.Json };
4794 readonly server: string;
4795 readonly statusMessage?: string | null;
4796 readonly timeoutSec?: number | null;
4797 readonly tool: string;
4798 readonly type: "mcp_tool";
4799 }
4800 | { readonly type: "prompt" }
4801 | { readonly type: "agent" };
4802 export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Union(
4803 [
4804 Schema.Struct({
4805 additionalContextLimit: Schema.optionalKey(
4806 Schema.Union([
4807 Schema.Number.annotate({
4808 description:
4809 "Approximate token threshold for spilling this hook's `additionalContext` to disk. `null` uses 2,500 tokens; `0` disables spilling for this hook. The threshold is evaluated against the original context; a spilled preview also includes recovery metadata.",
4810 format: "uint",
4811 })
4812 .check(Schema.isInt().annotate({ expected: "an integer" }))
4813 .check(
4814 Schema.isGreaterThanOrEqualTo(0).annotate({
4815 expected: "a value greater than or equal to 0",
4816 }),
4817 ),
4818 Schema.Null,
4819 ]),
4820 ),
4821 async: Schema.Boolean,
4822 command: Schema.String,
4823 commandWindows: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4824 statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4825 timeoutSec: Schema.optionalKey(
4826 Schema.Union([
4827 Schema.Number.annotate({ format: "uint64" })
4828 .check(Schema.isInt().annotate({ expected: "an integer" }))
4829 .check(
4830 Schema.isGreaterThanOrEqualTo(0).annotate({
4831 expected: "a value greater than or equal to 0",
4832 }),
4833 ),
4834 Schema.Null,
4835 ]),
4836 ),
4837 type: Schema.Literal("command").annotate({ title: "CommandConfiguredHookHandlerType" }),
4838 }).annotate({ title: "CommandConfiguredHookHandler" }),
4839 Schema.Struct({
4840 input: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
4841 server: Schema.String,
4842 statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4843 timeoutSec: Schema.optionalKey(
4844 Schema.Union([
4845 Schema.Number.annotate({ format: "uint64" })
4846 .check(Schema.isInt().annotate({ expected: "an integer" }))
4847 .check(
4848 Schema.isGreaterThanOrEqualTo(0).annotate({
4849 expected: "a value greater than or equal to 0",
4850 }),
4851 ),
4852 Schema.Null,
4853 ]),
4854 ),
4855 tool: Schema.String,
4856 type: Schema.Literal("mcp_tool").annotate({ title: "McpToolConfiguredHookHandlerType" }),
4857 }).annotate({ title: "McpToolConfiguredHookHandler" }),
4858 Schema.Struct({
4859 type: Schema.Literal("prompt").annotate({ title: "PromptConfiguredHookHandlerType" }),
4860 }).annotate({ title: "PromptConfiguredHookHandler" }),
4861 Schema.Struct({
4862 type: Schema.Literal("agent").annotate({ title: "AgentConfiguredHookHandlerType" }),
4863 }).annotate({ title: "AgentConfiguredHookHandler" }),
4864 ],
4865 { mode: "oneOf" },
4866 ).annotate({ identifier: "V2ConfigRequirementsReadResponse__ConfiguredHookHandler" });
4867
4868 export type V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = "allow" | "deny";
4869 export const V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = Schema.Literals([
4870 "allow",
4871 "deny",
4872 ]).annotate({ identifier: "V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission" });
4873
4874 export type V2ConfigValueWriteParams__MergeStrategy = "replace" | "upsert";
4875 export const V2ConfigValueWriteParams__MergeStrategy = Schema.Literals([
4876 "replace",
4877 "upsert",
4878 ]).annotate({ identifier: "V2ConfigValueWriteParams__MergeStrategy" });
4879
4880 export type V2ConfigWarningNotification__TextPosition = {
4881 readonly column: number;
4882 readonly line: number;
4883 };
4884 export const V2ConfigWarningNotification__TextPosition = Schema.Struct({
4885 column: Schema.Number.annotate({
4886 description: "1-based column number (in Unicode scalar values).",
4887 format: "uint",
4888 })
4889 .check(Schema.isInt().annotate({ expected: "an integer" }))
4890 .check(
4891 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
4892 ),
4893 line: Schema.Number.annotate({ description: "1-based line number.", format: "uint" })
4894 .check(Schema.isInt().annotate({ expected: "an integer" }))
4895 .check(
4896 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
4897 ),
4898 }).annotate({ identifier: "V2ConfigWarningNotification__TextPosition" });
4899
4900 export type V2ConfigWriteResponse__AbsolutePathBuf = string;
4901 export const V2ConfigWriteResponse__AbsolutePathBuf = Schema.String.annotate({
4902 description:
4903 "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.",
4904 identifier: "V2ConfigWriteResponse__AbsolutePathBuf",
4905 });
4906
4907 export type V2ConfigWriteResponse__WriteStatus = "ok" | "okOverridden";
4908 export const V2ConfigWriteResponse__WriteStatus = Schema.Literals(["ok", "okOverridden"]).annotate({
4909 identifier: "V2ConfigWriteResponse__WriteStatus",
4910 });
4911
4912 export type V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome =
4913 | "reset"
4914 | "nothingToReset"
4915 | "noCredit"
4916 | "alreadyRedeemed";
4917 export const V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome =
4918 Schema.Union(
4919 [
4920 Schema.Literal("reset").annotate({
4921 description: "A reset credit was consumed and the eligible rate-limit windows were reset.",
4922 }),
4923 Schema.Literal("nothingToReset").annotate({
4924 description: "No current rate-limit window is eligible for a reset.",
4925 }),
4926 Schema.Literal("noCredit").annotate({
4927 description: "The account has no earned reset credits available.",
4928 }),
4929 Schema.Literal("alreadyRedeemed").annotate({
4930 description: "The same idempotency key already completed a reset successfully.",
4931 }),
4932 ],
4933 { mode: "oneOf" },
4934 ).annotate({
4935 identifier:
4936 "V2ConsumeAccountRateLimitResetCreditResponse__ConsumeAccountRateLimitResetCreditOutcome",
4937 });
4938
4939 export type V2ErrorNotification__NonSteerableTurnKind = "review" | "compact";
4940 export const V2ErrorNotification__NonSteerableTurnKind = Schema.Literals([
4941 "review",
4942 "compact",
4943 ]).annotate({ identifier: "V2ErrorNotification__NonSteerableTurnKind" });
4944
4945 export type V2ErrorNotification__MisalignmentSteer = { readonly message: string };
4946 export const V2ErrorNotification__MisalignmentSteer = Schema.Struct({
4947 message: Schema.String,
4948 }).annotate({ identifier: "V2ErrorNotification__MisalignmentSteer" });
4949
4950 export type V2ExperimentalFeatureListResponse__ExperimentalFeatureStage =
4951 | "beta"
4952 | "underDevelopment"
4953 | "stable"
4954 | "deprecated"
4955 | "removed";
4956 export const V2ExperimentalFeatureListResponse__ExperimentalFeatureStage = Schema.Union(
4957 [
4958 Schema.Literal("beta").annotate({
4959 description: "Feature is available for user testing and feedback.",
4960 }),
4961 Schema.Literal("underDevelopment").annotate({
4962 description: "Feature is still being built and not ready for broad use.",
4963 }),
4964 Schema.Literal("stable").annotate({ description: "Feature is production-ready." }),
4965 Schema.Literal("deprecated").annotate({
4966 description: "Feature is deprecated and should be avoided.",
4967 }),
4968 Schema.Literal("removed").annotate({
4969 description: "Feature flag is retained only for backwards compatibility.",
4970 }),
4971 ],
4972 { mode: "oneOf" },
4973 ).annotate({ identifier: "V2ExperimentalFeatureListResponse__ExperimentalFeatureStage" });
4974
4975 export type V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource =
4976 | "remoteMcpServersConfig"
4977 | "sessionToolUse";
4978 export const V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource =
4979 Schema.Literals(["remoteMcpServersConfig", "sessionToolUse"]).annotate({
4980 identifier: "V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource",
4981 });
4982
4983 export type V2ExternalAgentConfigDetectResponse__CommandMigration = { readonly name: string };
4984 export const V2ExternalAgentConfigDetectResponse__CommandMigration = Schema.Struct({
4985 name: Schema.String,
4986 }).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__CommandMigration" });
4987
4988 export type V2ExternalAgentConfigDetectResponse__HookMigration = { readonly name: string };
4989 export const V2ExternalAgentConfigDetectResponse__HookMigration = Schema.Struct({
4990 name: Schema.String,
4991 }).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__HookMigration" });
4992
4993 export type V2ExternalAgentConfigDetectResponse__McpServerMigration = { readonly name: string };
4994 export const V2ExternalAgentConfigDetectResponse__McpServerMigration = Schema.Struct({
4995 name: Schema.String,
4996 }).annotate({ identifier: "V2ExternalAgentConfigDetectResponse__McpServerMigration" });
4997
4998 export type V2ExternalAgentConfigDetectResponse__PluginsMigration = {
4999 readonly marketplaceName: string;
5000 readonly pluginNames: ReadonlyArray<string>;
Showing first 5,000 of 56,588 lines. View raw