@devries-cameron20 / t3code-1 / commits / d5d48742c9
Fork 0

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

feat(codex): require Codex 0.156 and regenerate its protocol (#13481)

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

Julius Marminge committed Sep 24, 2026 at 14:10 UTC d5d48742c9ab00dff82fe8bcbc8da0ba68748959
14 files changed +14830 -3042
apps/server/src/provider/Layers/CodexAdapter.test.ts
+1
@@ -2383,6 +2383,7 @@ lifecycleLayer("CodexAdapterLive lifecycle", (it) => {
2383 method: "item/tool/requestUserInput",
2384 requestId: ApprovalRequestId.make("req-user-input-1"),
2385 payload: {
2386 + isBlocking: true,
2387 itemId: "item-user-input-1",
2388 threadId: "thread-1",
2389 turnId: "turn-1",
apps/server/src/provider/Layers/CodexProvider.ts
+1 -1
@@ -441,7 +441,7 @@ const probeCodexAppServerProvider = Effect.fn("probeCodexAppServerProvider")(fun
441 requestAllCodexModels(client),
442 // Usage is an enrichment: a failure or a slow answer degrades to "no
443 // usage this probe" rather than costing the account and models.
444 - client.request("account/rateLimits/read", undefined).pipe(
444 + client.request("account/rateLimits/read", null).pipe(
445 Effect.map((response): CodexRateLimitsProbe => ({
446 snapshot: response.rateLimits,
447 rateLimitsByLimitId: response.rateLimitsByLimitId,
apps/server/src/provider/Layers/CodexSessionRuntime.test.ts
+17 -13
@@ -90,25 +90,28 @@ describe("Codex thread history", () => {
90 );
91 }
92
93 - it.effect("keeps the count-based rollback API for older threads", () =>
93 + it.effect("surfaces Codex rejecting a revert of a legacy thread", () =>
94 Effect.gen(function* () {
95 + const rejection = CodexErrors.CodexAppServerRequestError.invalidRequest(
96 + "thread/revert only supports paginated threads",
97 + );
98 const client: Parameters<typeof rollbackCodexThread>[0] = {
96 - raw: { request: () => Effect.succeed({ thread: {} }) },
97 - request: <M extends CodexRpc.ClientRequestMethod>(
98 - method: M,
99 - params: CodexRpc.ClientRequestParamsByMethod[M],
100 - ) => {
101 - NodeAssert.equal(method, "thread/rollback");
102 - NodeAssert.deepEqual(params, { threadId: "legacy-thread", numTurns: 2 });
99 + raw: {
100 + request: (method) => {
101 + if (method === "thread/read") return Effect.succeed({ thread: {} });
102 + if (method === "thread/revert") return Effect.fail(rejection);
103 + return Effect.die(`Unexpected raw request: ${method}`);
104 + },
105 + },
106 + request: <M extends CodexRpc.ClientRequestMethod>(method: M) => {
107 + NodeAssert.equal(method, "thread/read");
108 return Effect.succeed({
104 - thread: { id: "legacy-thread", turns: [] },
109 + thread: { id: "legacy-thread", turns: [{ id: "turn-1", items: [] }] },
110 } as unknown as CodexRpc.ClientRequestResponsesByMethod[M]);
111 },
112 };
108 - NodeAssert.deepEqual(yield* rollbackCodexThread(client, "legacy-thread", 2), {
109 - threadId: "legacy-thread",
110 - turns: [],
111 - });
113 + const error = yield* Effect.flip(rollbackCodexThread(client, "legacy-thread", 1));
114 + NodeAssert.strictEqual(error, rejection);
115 }),
116 );
117 });
@@ -680,6 +683,7 @@ function makeThreadStartedNotification(
683 id: threadId,
684 modelProvider: "openai",
685 preview: "",
686 + projectId: null,
687 sessionId: threadId,
688 source,
689 status: { type: "idle" as const },
apps/server/src/provider/Layers/CodexSessionRuntime.ts
+4 -8
@@ -163,8 +163,7 @@ export type CodexTurnStartParamsWithCollaborationMode =
163 export type CodexResumeCursor = typeof CodexResumeCursorSchema.Type;
164 type CodexServiceTier = NonNullable<EffectCodexSchema.V2ThreadStartParams["serviceTier"]>;
165 type CodexThreadItem =
166 - | EffectCodexSchema.V2ThreadReadResponse["thread"]["turns"][number]["items"][number]
167 - | EffectCodexSchema.V2ThreadRollbackResponse["thread"]["turns"][number]["items"][number];
166 + EffectCodexSchema.V2ThreadReadResponse["thread"]["turns"][number]["items"][number];
167
168 export interface CodexSessionRuntimeOptions {
169 readonly threadId: ThreadId;
@@ -1185,7 +1184,7 @@ function updateSession(
1184 }
1185
1186 function parseThreadSnapshot(
1188 - response: EffectCodexSchema.V2ThreadReadResponse | EffectCodexSchema.V2ThreadRollbackResponse,
1187 + response: EffectCodexSchema.V2ThreadReadResponse,
1188 ): CodexThreadSnapshot {
1189 return {
1190 threadId: response.thread.id,
@@ -1273,11 +1272,8 @@ export const rollbackCodexThread = Effect.fn("rollbackCodexThread")(function* (
1272 threadId: string,
1273 numTurns: number,
1274 ): Effect.fn.Return<CodexThreadSnapshot, CodexErrors.CodexAppServerError> {
1276 - if ((yield* readCodexHistoryMode(client, threadId)) !== "paginated") {
1277 - return parseThreadSnapshot(yield* client.request("thread/rollback", { threadId, numTurns }));
1278 - }
1279 - // Paginated threads replace history at a turn boundary instead of supporting
1280 - // the legacy count-based rollback endpoint.
1275 + // Codex replaces history at a turn boundary. It rejects threads that still
1276 + // use legacy history, which have no rollback API since Codex 0.156.
1277 const snapshot = yield* readCodexThread(client, threadId);
1278 const retainedCount = Math.max(0, snapshot.turns.length - numTurns);
1279 const firstRemoved = snapshot.turns[retainedCount];
apps/server/src/provider/model-manifest.json
+5 -4
@@ -1,14 +1,15 @@
1 {
2 "version": 1,
3 - "updatedAt": "2026-09-24T00:11:29Z",
3 + "updatedAt": "2026-09-24T18:40:00Z",
4 "compatibility": [
5 {
6 "driver": "codex",
7 "t3CodeRange": ">=0.0.42",
8 - "recommendedRange": ">=0.129.0",
8 + "recommendedRange": ">=0.156.0",
9 "ranges": [
10 - { "range": ">=0.129.0", "status": "supported" },
11 - { "range": "<0.129.0", "status": "broken" }
10 + { "range": ">=0.156.0", "status": "supported" },
11 + { "range": ">=0.149.0 <0.156.0", "status": "unsupported" },
12 + { "range": "<0.149.0", "status": "broken" }
13 ]
14 },
15 {
apps/server/src/provider/providerCompatibility.test.ts
+18
@@ -65,6 +65,24 @@ describe("provider compatibility", () => {
65 }
66 });
67
68 + it("supports Codex 0.156 and marks Codex without Thread.projectId broken", () => {
69 + const bundled = ModelManifest.BUNDLED_MODEL_MANIFEST.compatibility;
70 + for (const [t3CodeVersion, codexVersion, expected] of [
71 + ["0.0.42", "0.148.0", "broken"],
72 + ["0.0.42", "0.149.0", "unsupported"],
73 + ["0.0.42", "0.155.0", "unsupported"],
74 + ["0.0.42", "0.156.0", "supported"],
75 + ["0.0.43-nightly.20260924.2200", "0.153.3", "unsupported"],
76 + ["0.0.43-nightly.20260924.2200", "0.156.1", "supported"],
77 + ] as const) {
78 + assert.strictEqual(
79 + resolveProviderCompatibility(bundled, driver, codexVersion, t3CodeVersion)?.status,
80 + expected,
81 + `T3 Code ${t3CodeVersion} with Codex ${codexVersion}`,
82 + );
83 + }
84 + });
85 +
86 it("compares Cursor build dates without treating semver prereleases as stable", () => {
87 const cursor = ProviderDriverKind.make("cursor");
88 const cursorPolicy: ProviderCompatibilityPolicy = {
apps/server/src/provider/testFixtures/codexMultiAgentWire.json
+2
@@ -20,6 +20,7 @@
20 "forkedFromId": null,
21 "parentThreadId": null,
22 "preview": "",
23 + "projectId": null,
24 "ephemeral": false,
25 "historyMode": "legacy",
26 "modelProvider": "openai",
@@ -389,6 +390,7 @@
390 "forkedFromId": null,
391 "parentThreadId": null,
392 "preview": "",
393 + "projectId": null,
394 "ephemeral": false,
395 "historyMode": "legacy",
396 "modelProvider": "openai",
packages/effect-codex-app-server/scripts/generate.ts
+6 -169
@@ -17,7 +17,7 @@ import {
17 } from "effect/unstable/http";
18 import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
19
20 -const UPSTREAM_REF = "678157acaa819d5510adfe359abb5d0392cfe461";
20 +const UPSTREAM_REF = "fe74a774532af67b5a4a3dec03ce9469e17f89af";
21 const USER_AGENT = "effect-codex-app-server-generator";
22 const GITHUB_API_BASE =
23 "https://api.github.com/repos/openai/codex/contents/codex-rs/app-server-protocol";
@@ -145,112 +145,6 @@ const ManualSchemas: Record<string, Schema.Json> = {
145 },
146 };
147
148 -// Codex 0.150 added these multi-agent values before our next full protocol
149 -// refresh. Keep every generated response namespace compatible with them.
150 -const Codex0150DefinitionSchemas: Record<string, Schema.Json> = {
151 - CollabAgentTool: {
152 - type: "string",
153 - enum: [
154 - "spawnAgent",
155 - "sendInput",
156 - "resumeAgent",
157 - "wait",
158 - "closeAgent",
159 - "sendMessage",
160 - "followupTask",
161 - "interruptAgent",
162 - "listAgents",
163 - ],
164 - },
165 - CollabAgentToolCallStatus: {
166 - type: "string",
167 - enum: ["inProgress", "completed", "failed", "interrupted"],
168 - },
169 - PlanType: {
170 - type: "string",
171 - enum: [
172 - "free",
173 - "go",
174 - "plus",
175 - "pro",
176 - "prolite",
177 - "team",
178 - "self_serve_business_prolite",
179 - "self_serve_business_usage_based",
180 - "business",
181 - "ent26",
182 - "enterprise_cbp_automation",
183 - "enterprise_cbp_usage_based",
184 - "enterprise",
185 - "edu",
186 - "edu_plus",
187 - "edu_pro",
188 - "unknown",
189 - ],
190 - },
191 - SubAgentActivityKind: {
192 - type: "string",
193 - enum: ["started", "interacted", "interrupted", "completed"],
194 - },
195 -};
196 -
197 -// Pinned protocol JSON omits later CodexErrorInfo variants. Keep historical
198 -// thread payloads decodable; do not fold unknown values into "other".
199 -const CodexErrorInfoCompatibilityValues = [
200 - "rateLimitExceeded",
201 - "misalignmentPolicyViolation",
202 -] as const;
203 -
204 -const CodexErrorInfoCompatibilityExports = new Set([
205 - "V2ThreadReadResponse",
206 - "V2ThreadResumeResponse",
207 - "V2ThreadRollbackResponse",
208 - "V2ThreadForkResponse",
209 - "V2TurnCompletedNotification",
210 -]);
211 -
212 -function applyCodex0151DefinitionCompatibility(
213 - exportName: string,
214 - definitionName: string,
215 - definitionSchema: Schema.Json,
216 -): Schema.Json {
217 - if (
218 - !CodexErrorInfoCompatibilityExports.has(exportName) ||
219 - definitionName !== "CodexErrorInfo" ||
220 - typeof definitionSchema !== "object"
221 - ) {
222 - return definitionSchema;
223 - }
224 -
225 - const schema = definitionSchema as {
226 - readonly oneOf?: ReadonlyArray<{ readonly enum?: ReadonlyArray<string> }>;
227 - };
228 - const [firstVariant, ...remainingVariants] = schema.oneOf ?? [];
229 - const currentEnum = firstVariant?.enum;
230 - if (!currentEnum) {
231 - return definitionSchema;
232 - }
233 -
234 - const missingValues = CodexErrorInfoCompatibilityValues.filter(
235 - (value) => !currentEnum.includes(value),
236 - );
237 - if (missingValues.length === 0) {
238 - return definitionSchema;
239 - }
240 -
241 - const enumValues = [...currentEnum];
242 - const otherIndex = enumValues.indexOf("other");
243 - const nextEnum =
244 - otherIndex === -1
245 - ? [...enumValues, ...missingValues]
246 - : [...enumValues.slice(0, otherIndex), ...missingValues, ...enumValues.slice(otherIndex)];
247 -
248 - return {
249 - ...definitionSchema,
250 - oneOf: [{ ...firstVariant, enum: nextEnum }, ...remainingVariants],
251 - };
252 -}
253 -
148 const getGeneratedPaths = Effect.fn("getGeneratedPaths")(function* () {
149 const path = yield* Path.Path;
150 const generatedDir = path.join(import.meta.dirname, "..", "src", "_generated");
@@ -470,61 +364,6 @@ function adaptSchemaForEffect(value: Schema.Json): Schema.Json {
364 };
365 }
366
473 -// Codex 0.153 adds async questions to agent messages. Keep older protocol
474 -// fields until the next full refresh, including every thread history namespace.
475 -function addAsyncQuestionFields(value: Schema.Json): Schema.Json {
476 - if (Array.isArray(value)) {
477 - return value.map(addAsyncQuestionFields);
478 - }
479 - if (value === null || typeof value !== "object") {
480 - return value;
481 - }
482 - const properties = "properties" in value ? value.properties : undefined;
483 - const itemType =
484 - properties && typeof properties === "object" && "type" in properties
485 - ? properties.type
486 - : undefined;
487 - if (
488 - properties &&
489 - typeof properties === "object" &&
490 - itemType &&
491 - typeof itemType === "object" &&
492 - "enum" in itemType &&
493 - Array.isArray(itemType.enum) &&
494 - itemType.enum.includes("agentMessage")
495 - ) {
496 - return {
497 - ...value,
498 - properties: {
499 - ...Object.fromEntries(Object.entries(properties).filter(([key]) => key !== "type")),
500 - delivery: { anyOf: [{ type: "string", enum: ["async"] }, { type: "null" }] },
501 - questions: {
502 - anyOf: [
503 - {
504 - type: "array",
505 - items: {
506 - type: "object",
507 - properties: {
508 - title: { type: "string" },
509 - options: {
510 - anyOf: [{ type: "array", items: { type: "string" } }, { type: "null" }],
511 - },
512 - },
513 - required: ["title"],
514 - },
515 - },
516 - { type: "null" },
517 - ],
518 - },
519 - type: itemType,
520 - },
521 - };
522 - }
523 - return Object.fromEntries(
524 - Object.entries(value).map(([key, child]) => [key, addAsyncQuestionFields(child)]),
525 - );
526 -}
527 -
367 function toPascalCaseMethod(method: string) {
368 return method
369 .split("/")
@@ -536,13 +375,14 @@ function toPascalCaseMethod(method: string) {
375 }
376
377 function parseRequestEntries(fileContents: string): ReadonlyArray<MethodEntry> {
539 - const entryPattern = /\{\s*"method":\s*"([^"]+)",\s*id:\s*RequestId,\s*params:\s*([^,}]+)/g;
378 + // Optional params render as `params?: Foo | undefined`; their JSON schema is `NullableFoo`.
379 + const entryPattern = /\{\s*"method":\s*"([^"]+)",\s*id:\s*RequestId,\s*params(\??):\s*([^,}|]+)/g;
380 const entries: Array<MethodEntry> = [];
381 let match: RegExpExecArray | null;
382 while ((match = entryPattern.exec(fileContents)) !== null) {
383 entries.push({
384 method: match[1]!,
545 - paramsType: match[2]!.trim(),
385 + paramsType: `${match[2] ? "Nullable" : ""}${match[3]!.trim()}`,
386 });
387 }
388 return entries;
@@ -800,13 +640,10 @@ const generateFiles = Effect.fn("generateFiles")(function* () {
640 );
641
642 for (const [definitionName, definitionSchema] of Object.entries(parsed.definitions ?? {})) {
803 - const compatibleDefinitionSchema =
804 - Codex0150DefinitionSchemas[definitionName] ??
805 - applyCodex0151DefinitionCompatibility(file.exportName, definitionName, definitionSchema);
643 aggregateSchemas[localDefinitionNames.get(definitionName)!] = stripNullDefaults(
644 normalizeNullableTypes(
645 rewriteExternalRefs(
809 - compatibleDefinitionSchema,
646 + definitionSchema,
647 localDefinitionNames,
648 file.namespace,
649 exportNameByQualifiedName,
@@ -844,7 +681,7 @@ const generateFiles = Effect.fn("generateFiles")(function* () {
681 for (const [name, schema] of Object.entries(aggregateSchemas).toSorted(([left], [right]) =>
682 left.localeCompare(right),
683 )) {
847 - aggregateSchemas[name] = adaptSchemaForEffect(addAsyncQuestionFields(schema));
684 + aggregateSchemas[name] = adaptSchemaForEffect(schema);
685 generator.addSchema(name, aggregateSchemas[name] as never);
686 }
687
packages/effect-codex-app-server/src/_generated/meta.gen.ts
+109 -10
@@ -1,5 +1,5 @@
1 // This file is generated by the effect-codex-app-server package. Do not edit manually.
2 -// Upstream protocol ref: 678157acaa819d5510adfe359abb5d0392cfe461
2 +// Upstream protocol ref: fe74a774532af67b5a4a3dec03ce9469e17f89af
3
4 import * as CodexSchema from "./schema.gen.ts";
5
@@ -16,14 +16,24 @@ export const CLIENT_REQUEST_METHODS = {
16 "thread/goal/get": "thread/goal/get",
17 "thread/goal/clear": "thread/goal/clear",
18 "thread/metadata/update": "thread/metadata/update",
19 + "thread/attachment/add": "thread/attachment/add",
20 + "thread/attachment/list": "thread/attachment/list",
21 + "thread/attachment/remove": "thread/attachment/remove",
22 + "thread/section/move": "thread/section/move",
23 "thread/unarchive": "thread/unarchive",
24 "thread/compact/start": "thread/compact/start",
25 "thread/shellCommand": "thread/shellCommand",
26 "thread/approveGuardianDeniedAction": "thread/approveGuardianDeniedAction",
23 - "thread/rollback": "thread/rollback",
27 + "thread/revert": "thread/revert",
28 "thread/list": "thread/list",
29 + "threadSection/list": "threadSection/list",
30 + "threadSection/create": "threadSection/create",
31 + "threadSection/update": "threadSection/update",
32 + "threadSection/delete": "threadSection/delete",
33 "thread/loaded/list": "thread/loaded/list",
34 "thread/read": "thread/read",
35 + "thread/turns/list": "thread/turns/list",
36 + "thread/items/list": "thread/items/list",
37 "thread/inject_items": "thread/inject_items",
38 "skills/list": "skills/list",
39 "skills/extraRoots/set": "skills/extraRoots/set",
@@ -33,6 +43,7 @@ export const CLIENT_REQUEST_METHODS = {
43 "marketplace/upgrade": "marketplace/upgrade",
44 "plugin/list": "plugin/list",
45 "plugin/installed": "plugin/installed",
46 + "plugin/reconcile": "plugin/reconcile",
47 "plugin/read": "plugin/read",
48 "plugin/skill/read": "plugin/skill/read",
49 "plugin/share/save": "plugin/share/save",
@@ -87,6 +98,7 @@ export const CLIENT_REQUEST_METHODS = {
98 "config/read": "config/read",
99 "externalAgentConfig/detect": "externalAgentConfig/detect",
100 "externalAgentConfig/import": "externalAgentConfig/import",
101 + "externalAgentConfig/import/recordHistory": "externalAgentConfig/import/recordHistory",
102 "externalAgentConfig/import/readHistories": "externalAgentConfig/import/readHistories",
103 "config/value/write": "config/value/write",
104 "config/batchWrite": "config/batchWrite",
@@ -123,10 +135,15 @@ export const SERVER_NOTIFICATION_METHODS = {
135 "thread/deleted": "thread/deleted",
136 "thread/unarchived": "thread/unarchived",
137 "thread/closed": "thread/closed",
138 + "thread/reverted": "thread/reverted",
139 "skills/changed": "skills/changed",
140 "thread/name/updated": "thread/name/updated",
141 + "thread/attachment/updated": "thread/attachment/updated",
142 "thread/goal/updated": "thread/goal/updated",
143 "thread/goal/cleared": "thread/goal/cleared",
144 + "thread/queue/changed": "thread/queue/changed",
145 + "project/changed": "project/changed",
146 + "thread/project/updated": "thread/project/updated",
147 "thread/environment/connected": "thread/environment/connected",
148 "thread/environment/disconnected": "thread/environment/disconnected",
149 "thread/settings/updated": "thread/settings/updated",
@@ -140,6 +157,7 @@ export const SERVER_NOTIFICATION_METHODS = {
157 "item/started": "item/started",
158 "item/autoApprovalReview/started": "item/autoApprovalReview/started",
159 "item/autoApprovalReview/completed": "item/autoApprovalReview/completed",
160 + "autoApprovalReview/strictReviewRequired": "autoApprovalReview/strictReviewRequired",
161 "item/completed": "item/completed",
162 "rawResponseItem/completed": "rawResponseItem/completed",
163 "rawResponse/completed": "rawResponse/completed",
@@ -156,6 +174,7 @@ export const SERVER_NOTIFICATION_METHODS = {
174 "item/mcpToolCall/progress": "item/mcpToolCall/progress",
175 "mcpServer/oauthLogin/completed": "mcpServer/oauthLogin/completed",
176 "mcpServer/startupStatus/updated": "mcpServer/startupStatus/updated",
177 + "mcpServer/event/stream/notification": "mcpServer/event/stream/notification",
178 "account/updated": "account/updated",
179 "account/rateLimits/updated": "account/rateLimits/updated",
180 "app/list/updated": "app/list/updated",
@@ -169,6 +188,8 @@ export const SERVER_NOTIFICATION_METHODS = {
188 "thread/compacted": "thread/compacted",
189 "model/rerouted": "model/rerouted",
190 "model/verification": "model/verification",
191 + "modelProvider/authRecoveryStarted": "modelProvider/authRecoveryStarted",
192 + "modelProvider/authRecoveryCompleted": "modelProvider/authRecoveryCompleted",
193 "turn/moderationMetadata": "turn/moderationMetadata",
194 "model/safetyBuffering/updated": "model/safetyBuffering/updated",
195 warning: "warning",
@@ -179,6 +200,9 @@ export const SERVER_NOTIFICATION_METHODS = {
200 "fuzzyFileSearch/sessionCompleted": "fuzzyFileSearch/sessionCompleted",
201 "thread/realtime/started": "thread/realtime/started",
202 "thread/realtime/itemAdded": "thread/realtime/itemAdded",
203 + "thread/realtime/item/started": "thread/realtime/item/started",
204 + "thread/realtime/item/transcript/delta": "thread/realtime/item/transcript/delta",
205 + "thread/realtime/item/completed": "thread/realtime/item/completed",
206 "thread/realtime/transcript/delta": "thread/realtime/transcript/delta",
207 "thread/realtime/transcript/done": "thread/realtime/transcript/done",
208 "thread/realtime/outputAudio/delta": "thread/realtime/outputAudio/delta",
@@ -208,14 +232,24 @@ export interface ClientRequestParamsByMethod {
232 readonly "thread/goal/get": CodexSchema.V2ThreadGoalGetParams;
233 readonly "thread/goal/clear": CodexSchema.V2ThreadGoalClearParams;
234 readonly "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams;
235 + readonly "thread/attachment/add": CodexSchema.V2ThreadAttachmentAddParams;
236 + readonly "thread/attachment/list": CodexSchema.V2ThreadAttachmentListParams;
237 + readonly "thread/attachment/remove": CodexSchema.V2ThreadAttachmentRemoveParams;
238 + readonly "thread/section/move": CodexSchema.V2ThreadSectionMoveParams;
239 readonly "thread/unarchive": CodexSchema.V2ThreadUnarchiveParams;
240 readonly "thread/compact/start": CodexSchema.V2ThreadCompactStartParams;
241 readonly "thread/shellCommand": CodexSchema.V2ThreadShellCommandParams;
242 readonly "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionParams;
215 - readonly "thread/rollback": CodexSchema.V2ThreadRollbackParams;
243 + readonly "thread/revert": CodexSchema.V2ThreadRevertParams;
244 readonly "thread/list": CodexSchema.V2ThreadListParams;
245 + readonly "threadSection/list": CodexSchema.V2ThreadSectionListParams;
246 + readonly "threadSection/create": CodexSchema.V2ThreadSectionCreateParams;
247 + readonly "threadSection/update": CodexSchema.V2ThreadSectionUpdateParams;
248 + readonly "threadSection/delete": CodexSchema.V2ThreadSectionDeleteParams;
249 readonly "thread/loaded/list": CodexSchema.V2ThreadLoadedListParams;
250 readonly "thread/read": CodexSchema.V2ThreadReadParams;
251 + readonly "thread/turns/list": CodexSchema.V2ThreadTurnsListParams;
252 + readonly "thread/items/list": CodexSchema.V2ThreadItemsListParams;
253 readonly "thread/inject_items": CodexSchema.V2ThreadInjectItemsParams;
254 readonly "skills/list": CodexSchema.V2SkillsListParams;
255 readonly "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetParams;
@@ -225,6 +259,7 @@ export interface ClientRequestParamsByMethod {
259 readonly "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams;
260 readonly "plugin/list": CodexSchema.V2PluginListParams;
261 readonly "plugin/installed": CodexSchema.V2PluginInstalledParams;
262 + readonly "plugin/reconcile": CodexSchema.V2PluginReconcileParams;
263 readonly "plugin/read": CodexSchema.V2PluginReadParams;
264 readonly "plugin/skill/read": CodexSchema.V2PluginSkillReadParams;
265 readonly "plugin/share/save": CodexSchema.V2PluginShareSaveParams;
@@ -266,9 +301,9 @@ export interface ClientRequestParamsByMethod {
301 readonly "account/login/start": CodexSchema.V2LoginAccountParams;
302 readonly "account/login/cancel": CodexSchema.V2CancelLoginAccountParams;
303 readonly "account/logout": undefined;
269 - readonly "account/rateLimits/read": undefined;
304 + readonly "account/rateLimits/read": CodexSchema.V2NullableGetAccountRateLimitsParams;
305 readonly "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditParams;
271 - readonly "account/usage/read": undefined;
306 + readonly "account/usage/read": CodexSchema.V2NullableGetAccountTokenUsageParams;
307 readonly "account/workspaceMessages/read": undefined;
308 readonly "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams;
309 readonly "feedback/upload": CodexSchema.V2FeedbackUploadParams;
@@ -279,6 +314,7 @@ export interface ClientRequestParamsByMethod {
314 readonly "config/read": CodexSchema.V2ConfigReadParams;
315 readonly "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectParams;
316 readonly "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportParams;
317 + readonly "externalAgentConfig/import/recordHistory": CodexSchema.V2ExternalAgentConfigImportHistoryRecordParams;
318 readonly "externalAgentConfig/import/readHistories": undefined;
319 readonly "config/value/write": CodexSchema.V2ConfigValueWriteParams;
320 readonly "config/batchWrite": CodexSchema.V2ConfigBatchWriteParams;
@@ -303,14 +339,24 @@ export interface ClientRequestResponsesByMethod {
339 readonly "thread/goal/get": CodexSchema.V2ThreadGoalGetResponse;
340 readonly "thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse;
341 readonly "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse;
342 + readonly "thread/attachment/add": CodexSchema.V2ThreadAttachmentAddResponse;
343 + readonly "thread/attachment/list": CodexSchema.V2ThreadAttachmentListResponse;
344 + readonly "thread/attachment/remove": CodexSchema.V2ThreadAttachmentRemoveResponse;
345 + readonly "thread/section/move": CodexSchema.V2ThreadSectionMoveResponse;
346 readonly "thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse;
347 readonly "thread/compact/start": CodexSchema.V2ThreadCompactStartResponse;
348 readonly "thread/shellCommand": CodexSchema.V2ThreadShellCommandResponse;
349 readonly "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionResponse;
310 - readonly "thread/rollback": CodexSchema.V2ThreadRollbackResponse;
350 + readonly "thread/revert": CodexSchema.V2ThreadRevertResponse;
351 readonly "thread/list": CodexSchema.V2ThreadListResponse;
352 + readonly "threadSection/list": CodexSchema.V2ThreadSectionListResponse;
353 + readonly "threadSection/create": CodexSchema.V2ThreadSectionCreateResponse;
354 + readonly "threadSection/update": CodexSchema.V2ThreadSectionUpdateResponse;
355 + readonly "threadSection/delete": CodexSchema.V2ThreadSectionDeleteResponse;
356 readonly "thread/loaded/list": CodexSchema.V2ThreadLoadedListResponse;
357 readonly "thread/read": CodexSchema.V2ThreadReadResponse;
358 + readonly "thread/turns/list": CodexSchema.V2ThreadTurnsListResponse;
359 + readonly "thread/items/list": CodexSchema.V2ThreadItemsListResponse;
360 readonly "thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse;
361 readonly "skills/list": CodexSchema.V2SkillsListResponse;
362 readonly "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetResponse;
@@ -320,6 +366,7 @@ export interface ClientRequestResponsesByMethod {
366 readonly "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse;
367 readonly "plugin/list": CodexSchema.V2PluginListResponse;
368 readonly "plugin/installed": CodexSchema.V2PluginInstalledResponse;
369 + readonly "plugin/reconcile": CodexSchema.V2PluginReconcileResponse;
370 readonly "plugin/read": CodexSchema.V2PluginReadResponse;
371 readonly "plugin/skill/read": CodexSchema.V2PluginSkillReadResponse;
372 readonly "plugin/share/save": CodexSchema.V2PluginShareSaveResponse;
@@ -374,6 +421,7 @@ export interface ClientRequestResponsesByMethod {
421 readonly "config/read": CodexSchema.V2ConfigReadResponse;
422 readonly "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectResponse;
423 readonly "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportResponse;
424 + readonly "externalAgentConfig/import/recordHistory": CodexSchema.V2ExternalAgentConfigImportHistoryRecordResponse;
425 readonly "externalAgentConfig/import/readHistories": CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse;
426 readonly "config/value/write": CodexSchema.V2ConfigWriteResponse;
427 readonly "config/batchWrite": CodexSchema.V2ConfigWriteResponse;
@@ -423,10 +471,15 @@ export interface ServerNotificationParamsByMethod {
471 readonly "thread/deleted": CodexSchema.V2ThreadDeletedNotification;
472 readonly "thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification;
473 readonly "thread/closed": CodexSchema.V2ThreadClosedNotification;
474 + readonly "thread/reverted": CodexSchema.V2ThreadRevertedNotification;
475 readonly "skills/changed": CodexSchema.V2SkillsChangedNotification;
476 readonly "thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification;
477 + readonly "thread/attachment/updated": CodexSchema.V2ThreadAttachmentUpdatedNotification;
478 readonly "thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification;
479 readonly "thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification;
480 + readonly "thread/queue/changed": CodexSchema.V2ThreadQueueChangedNotification;
481 + readonly "project/changed": CodexSchema.V2ProjectChangedNotification;
482 + readonly "thread/project/updated": CodexSchema.V2ThreadProjectUpdatedNotification;
483 readonly "thread/environment/connected": CodexSchema.V2EnvironmentConnectionNotification;
484 readonly "thread/environment/disconnected": CodexSchema.V2EnvironmentConnectionNotification;
485 readonly "thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification;
@@ -440,6 +493,7 @@ export interface ServerNotificationParamsByMethod {
493 readonly "item/started": CodexSchema.V2ItemStartedNotification;
494 readonly "item/autoApprovalReview/started": CodexSchema.V2ItemGuardianApprovalReviewStartedNotification;
495 readonly "item/autoApprovalReview/completed": CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification;
496 + readonly "autoApprovalReview/strictReviewRequired": CodexSchema.V2StrictReviewRequiredNotification;
497 readonly "item/completed": CodexSchema.V2ItemCompletedNotification;
498 readonly "rawResponseItem/completed": CodexSchema.V2RawResponseItemCompletedNotification;
499 readonly "rawResponse/completed": CodexSchema.V2RawResponseCompletedNotification;
@@ -456,6 +510,7 @@ export interface ServerNotificationParamsByMethod {
510 readonly "item/mcpToolCall/progress": CodexSchema.V2McpToolCallProgressNotification;
511 readonly "mcpServer/oauthLogin/completed": CodexSchema.V2McpServerOauthLoginCompletedNotification;
512 readonly "mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification;
513 + readonly "mcpServer/event/stream/notification": CodexSchema.V2McpServerEventStreamNotification;
514 readonly "account/updated": CodexSchema.V2AccountUpdatedNotification;
515 readonly "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification;
516 readonly "app/list/updated": CodexSchema.V2AppListUpdatedNotification;
@@ -469,6 +524,8 @@ export interface ServerNotificationParamsByMethod {
524 readonly "thread/compacted": CodexSchema.V2ContextCompactedNotification;
525 readonly "model/rerouted": CodexSchema.V2ModelReroutedNotification;
526 readonly "model/verification": CodexSchema.V2ModelVerificationNotification;
527 + readonly "modelProvider/authRecoveryStarted": CodexSchema.V2AuthRecoveryNotification;
528 + readonly "modelProvider/authRecoveryCompleted": CodexSchema.V2AuthRecoveryNotification;
529 readonly "turn/moderationMetadata": CodexSchema.V2TurnModerationMetadataNotification;
530 readonly "model/safetyBuffering/updated": CodexSchema.V2ModelSafetyBufferingUpdatedNotification;
531 readonly warning: CodexSchema.V2WarningNotification;
@@ -479,6 +536,9 @@ export interface ServerNotificationParamsByMethod {
536 readonly "fuzzyFileSearch/sessionCompleted": CodexSchema.FuzzyFileSearchSessionCompletedNotification;
537 readonly "thread/realtime/started": CodexSchema.V2ThreadRealtimeStartedNotification;
538 readonly "thread/realtime/itemAdded": CodexSchema.V2ThreadRealtimeItemAddedNotification;
539 + readonly "thread/realtime/item/started": CodexSchema.V2ThreadRealtimeItemStartedNotification;
540 + readonly "thread/realtime/item/transcript/delta": CodexSchema.V2ThreadRealtimeItemTranscriptDeltaNotification;
541 + readonly "thread/realtime/item/completed": CodexSchema.V2ThreadRealtimeItemCompletedNotification;
542 readonly "thread/realtime/transcript/delta": CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification;
543 readonly "thread/realtime/transcript/done": CodexSchema.V2ThreadRealtimeTranscriptDoneNotification;
544 readonly "thread/realtime/outputAudio/delta": CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification;
@@ -503,14 +563,24 @@ export const CLIENT_REQUEST_PARAMS = {
563 "thread/goal/get": CodexSchema.V2ThreadGoalGetParams,
564 "thread/goal/clear": CodexSchema.V2ThreadGoalClearParams,
565 "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams,
566 + "thread/attachment/add": CodexSchema.V2ThreadAttachmentAddParams,
567 + "thread/attachment/list": CodexSchema.V2ThreadAttachmentListParams,
568 + "thread/attachment/remove": CodexSchema.V2ThreadAttachmentRemoveParams,
569 + "thread/section/move": CodexSchema.V2ThreadSectionMoveParams,
570 "thread/unarchive": CodexSchema.V2ThreadUnarchiveParams,
571 "thread/compact/start": CodexSchema.V2ThreadCompactStartParams,
572 "thread/shellCommand": CodexSchema.V2ThreadShellCommandParams,
573 "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionParams,
510 - "thread/rollback": CodexSchema.V2ThreadRollbackParams,
574 + "thread/revert": CodexSchema.V2ThreadRevertParams,
575 "thread/list": CodexSchema.V2ThreadListParams,
576 + "threadSection/list": CodexSchema.V2ThreadSectionListParams,
577 + "threadSection/create": CodexSchema.V2ThreadSectionCreateParams,
578 + "threadSection/update": CodexSchema.V2ThreadSectionUpdateParams,
579 + "threadSection/delete": CodexSchema.V2ThreadSectionDeleteParams,
580 "thread/loaded/list": CodexSchema.V2ThreadLoadedListParams,
581 "thread/read": CodexSchema.V2ThreadReadParams,
582 + "thread/turns/list": CodexSchema.V2ThreadTurnsListParams,
583 + "thread/items/list": CodexSchema.V2ThreadItemsListParams,
584 "thread/inject_items": CodexSchema.V2ThreadInjectItemsParams,
585 "skills/list": CodexSchema.V2SkillsListParams,
586 "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetParams,
@@ -520,6 +590,7 @@ export const CLIENT_REQUEST_PARAMS = {
590 "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams,
591 "plugin/list": CodexSchema.V2PluginListParams,
592 "plugin/installed": CodexSchema.V2PluginInstalledParams,
593 + "plugin/reconcile": CodexSchema.V2PluginReconcileParams,
594 "plugin/read": CodexSchema.V2PluginReadParams,
595 "plugin/skill/read": CodexSchema.V2PluginSkillReadParams,
596 "plugin/share/save": CodexSchema.V2PluginShareSaveParams,
@@ -561,9 +632,9 @@ export const CLIENT_REQUEST_PARAMS = {
632 "account/login/start": CodexSchema.V2LoginAccountParams,
633 "account/login/cancel": CodexSchema.V2CancelLoginAccountParams,
634 "account/logout": undefined,
564 - "account/rateLimits/read": undefined,
635 + "account/rateLimits/read": CodexSchema.V2NullableGetAccountRateLimitsParams,
636 "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditParams,
566 - "account/usage/read": undefined,
637 + "account/usage/read": CodexSchema.V2NullableGetAccountTokenUsageParams,
638 "account/workspaceMessages/read": undefined,
639 "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams,
640 "feedback/upload": CodexSchema.V2FeedbackUploadParams,
@@ -574,6 +645,8 @@ export const CLIENT_REQUEST_PARAMS = {
645 "config/read": CodexSchema.V2ConfigReadParams,
646 "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectParams,
647 "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportParams,
648 + "externalAgentConfig/import/recordHistory":
649 + CodexSchema.V2ExternalAgentConfigImportHistoryRecordParams,
650 "externalAgentConfig/import/readHistories": undefined,
651 "config/value/write": CodexSchema.V2ConfigValueWriteParams,
652 "config/batchWrite": CodexSchema.V2ConfigBatchWriteParams,
@@ -598,14 +671,24 @@ export const CLIENT_REQUEST_RESPONSES = {
671 "thread/goal/get": CodexSchema.V2ThreadGoalGetResponse,
672 "thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse,
673 "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse,
674 + "thread/attachment/add": CodexSchema.V2ThreadAttachmentAddResponse,
675 + "thread/attachment/list": CodexSchema.V2ThreadAttachmentListResponse,
676 + "thread/attachment/remove": CodexSchema.V2ThreadAttachmentRemoveResponse,
677 + "thread/section/move": CodexSchema.V2ThreadSectionMoveResponse,
678 "thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse,
679 "thread/compact/start": CodexSchema.V2ThreadCompactStartResponse,
680 "thread/shellCommand": CodexSchema.V2ThreadShellCommandResponse,
681 "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionResponse,
605 - "thread/rollback": CodexSchema.V2ThreadRollbackResponse,
682 + "thread/revert": CodexSchema.V2ThreadRevertResponse,
683 "thread/list": CodexSchema.V2ThreadListResponse,
684 + "threadSection/list": CodexSchema.V2ThreadSectionListResponse,
685 + "threadSection/create": CodexSchema.V2ThreadSectionCreateResponse,
686 + "threadSection/update": CodexSchema.V2ThreadSectionUpdateResponse,
687 + "threadSection/delete": CodexSchema.V2ThreadSectionDeleteResponse,
688 "thread/loaded/list": CodexSchema.V2ThreadLoadedListResponse,
689 "thread/read": CodexSchema.V2ThreadReadResponse,
690 + "thread/turns/list": CodexSchema.V2ThreadTurnsListResponse,
691 + "thread/items/list": CodexSchema.V2ThreadItemsListResponse,
692 "thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse,
693 "skills/list": CodexSchema.V2SkillsListResponse,
694 "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetResponse,
@@ -615,6 +698,7 @@ export const CLIENT_REQUEST_RESPONSES = {
698 "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse,
699 "plugin/list": CodexSchema.V2PluginListResponse,
700 "plugin/installed": CodexSchema.V2PluginInstalledResponse,
701 + "plugin/reconcile": CodexSchema.V2PluginReconcileResponse,
702 "plugin/read": CodexSchema.V2PluginReadResponse,
703 "plugin/skill/read": CodexSchema.V2PluginSkillReadResponse,
704 "plugin/share/save": CodexSchema.V2PluginShareSaveResponse,
@@ -669,6 +753,8 @@ export const CLIENT_REQUEST_RESPONSES = {
753 "config/read": CodexSchema.V2ConfigReadResponse,
754 "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectResponse,
755 "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportResponse,
756 + "externalAgentConfig/import/recordHistory":
757 + CodexSchema.V2ExternalAgentConfigImportHistoryRecordResponse,
758 "externalAgentConfig/import/readHistories":
759 CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse,
760 "config/value/write": CodexSchema.V2ConfigWriteResponse,
@@ -719,10 +805,15 @@ export const SERVER_NOTIFICATION_PARAMS = {
805 "thread/deleted": CodexSchema.V2ThreadDeletedNotification,
806 "thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification,
807 "thread/closed": CodexSchema.V2ThreadClosedNotification,
808 + "thread/reverted": CodexSchema.V2ThreadRevertedNotification,
809 "skills/changed": CodexSchema.V2SkillsChangedNotification,
810 "thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification,
811 + "thread/attachment/updated": CodexSchema.V2ThreadAttachmentUpdatedNotification,
812 "thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification,
813 "thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification,
814 + "thread/queue/changed": CodexSchema.V2ThreadQueueChangedNotification,
815 + "project/changed": CodexSchema.V2ProjectChangedNotification,
816 + "thread/project/updated": CodexSchema.V2ThreadProjectUpdatedNotification,
817 "thread/environment/connected": CodexSchema.V2EnvironmentConnectionNotification,
818 "thread/environment/disconnected": CodexSchema.V2EnvironmentConnectionNotification,
819 "thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification,
@@ -737,6 +828,7 @@ export const SERVER_NOTIFICATION_PARAMS = {
828 "item/autoApprovalReview/started": CodexSchema.V2ItemGuardianApprovalReviewStartedNotification,
829 "item/autoApprovalReview/completed":
830 CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification,
831 + "autoApprovalReview/strictReviewRequired": CodexSchema.V2StrictReviewRequiredNotification,
832 "item/completed": CodexSchema.V2ItemCompletedNotification,
833 "rawResponseItem/completed": CodexSchema.V2RawResponseItemCompletedNotification,
834 "rawResponse/completed": CodexSchema.V2RawResponseCompletedNotification,
@@ -753,6 +845,7 @@ export const SERVER_NOTIFICATION_PARAMS = {
845 "item/mcpToolCall/progress": CodexSchema.V2McpToolCallProgressNotification,
846 "mcpServer/oauthLogin/completed": CodexSchema.V2McpServerOauthLoginCompletedNotification,
847 "mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification,
848 + "mcpServer/event/stream/notification": CodexSchema.V2McpServerEventStreamNotification,
849 "account/updated": CodexSchema.V2AccountUpdatedNotification,
850 "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification,
851 "app/list/updated": CodexSchema.V2AppListUpdatedNotification,
@@ -768,6 +861,8 @@ export const SERVER_NOTIFICATION_PARAMS = {
861 "thread/compacted": CodexSchema.V2ContextCompactedNotification,
862 "model/rerouted": CodexSchema.V2ModelReroutedNotification,
863 "model/verification": CodexSchema.V2ModelVerificationNotification,
864 + "modelProvider/authRecoveryStarted": CodexSchema.V2AuthRecoveryNotification,
865 + "modelProvider/authRecoveryCompleted": CodexSchema.V2AuthRecoveryNotification,
866 "turn/moderationMetadata": CodexSchema.V2TurnModerationMetadataNotification,
867 "model/safetyBuffering/updated": CodexSchema.V2ModelSafetyBufferingUpdatedNotification,
868 warning: CodexSchema.V2WarningNotification,
@@ -778,6 +873,10 @@ export const SERVER_NOTIFICATION_PARAMS = {
873 "fuzzyFileSearch/sessionCompleted": CodexSchema.FuzzyFileSearchSessionCompletedNotification,
874 "thread/realtime/started": CodexSchema.V2ThreadRealtimeStartedNotification,
875 "thread/realtime/itemAdded": CodexSchema.V2ThreadRealtimeItemAddedNotification,
876 + "thread/realtime/item/started": CodexSchema.V2ThreadRealtimeItemStartedNotification,
877 + "thread/realtime/item/transcript/delta":
878 + CodexSchema.V2ThreadRealtimeItemTranscriptDeltaNotification,
879 + "thread/realtime/item/completed": CodexSchema.V2ThreadRealtimeItemCompletedNotification,
880 "thread/realtime/transcript/delta": CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification,
881 "thread/realtime/transcript/done": CodexSchema.V2ThreadRealtimeTranscriptDoneNotification,
882 "thread/realtime/outputAudio/delta": CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification,
packages/effect-codex-app-server/src/_generated/namespaces.gen.ts
+43 -3
@@ -1,5 +1,5 @@
1 // This file is generated by the effect-codex-app-server package. Do not edit manually.
2 -// Upstream protocol ref: 678157acaa819d5510adfe359abb5d0392cfe461
2 +// Upstream protocol ref: fe74a774532af67b5a4a3dec03ce9469e17f89af
3
4 import * as CodexSchema from "./schema.gen.ts";
5
@@ -20,6 +20,7 @@ export const v2 = {
20 AppsListResponse: CodexSchema.V2AppsListResponse,
21 AppsReadParams: CodexSchema.V2AppsReadParams,
22 AppsReadResponse: CodexSchema.V2AppsReadResponse,
23 + AuthRecoveryNotification: CodexSchema.V2AuthRecoveryNotification,
24 CancelLoginAccountParams: CodexSchema.V2CancelLoginAccountParams,
25 CancelLoginAccountResponse: CodexSchema.V2CancelLoginAccountResponse,
26 CommandExecOutputDeltaNotification: CodexSchema.V2CommandExecOutputDeltaNotification,
@@ -56,6 +57,10 @@ export const v2 = {
57 CodexSchema.V2ExternalAgentConfigImportCompletedNotification,
58 ExternalAgentConfigImportHistoriesReadResponse:
59 CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse,
60 + ExternalAgentConfigImportHistoryRecordParams:
61 + CodexSchema.V2ExternalAgentConfigImportHistoryRecordParams,
62 + ExternalAgentConfigImportHistoryRecordResponse:
63 + CodexSchema.V2ExternalAgentConfigImportHistoryRecordResponse,
64 ExternalAgentConfigImportParams: CodexSchema.V2ExternalAgentConfigImportParams,
65 ExternalAgentConfigImportProgressNotification:
66 CodexSchema.V2ExternalAgentConfigImportProgressNotification,
@@ -112,6 +117,7 @@ export const v2 = {
117 MarketplaceUpgradeResponse: CodexSchema.V2MarketplaceUpgradeResponse,
118 McpResourceReadParams: CodexSchema.V2McpResourceReadParams,
119 McpResourceReadResponse: CodexSchema.V2McpResourceReadResponse,
120 + McpServerEventStreamNotification: CodexSchema.V2McpServerEventStreamNotification,
121 McpServerOauthLoginCompletedNotification: CodexSchema.V2McpServerOauthLoginCompletedNotification,
122 McpServerOauthLoginParams: CodexSchema.V2McpServerOauthLoginParams,
123 McpServerOauthLoginResponse: CodexSchema.V2McpServerOauthLoginResponse,
@@ -127,6 +133,8 @@ export const v2 = {
133 ModelReroutedNotification: CodexSchema.V2ModelReroutedNotification,
134 ModelSafetyBufferingUpdatedNotification: CodexSchema.V2ModelSafetyBufferingUpdatedNotification,
135 ModelVerificationNotification: CodexSchema.V2ModelVerificationNotification,
136 + NullableGetAccountRateLimitsParams: CodexSchema.V2NullableGetAccountRateLimitsParams,
137 + NullableGetAccountTokenUsageParams: CodexSchema.V2NullableGetAccountTokenUsageParams,
138 PermissionProfileListParams: CodexSchema.V2PermissionProfileListParams,
139 PermissionProfileListResponse: CodexSchema.V2PermissionProfileListResponse,
140 PlanDeltaNotification: CodexSchema.V2PlanDeltaNotification,
@@ -138,6 +146,8 @@ export const v2 = {
146 PluginListResponse: CodexSchema.V2PluginListResponse,
147 PluginReadParams: CodexSchema.V2PluginReadParams,
148 PluginReadResponse: CodexSchema.V2PluginReadResponse,
149 + PluginReconcileParams: CodexSchema.V2PluginReconcileParams,
150 + PluginReconcileResponse: CodexSchema.V2PluginReconcileResponse,
151 PluginShareCheckoutParams: CodexSchema.V2PluginShareCheckoutParams,
152 PluginShareCheckoutResponse: CodexSchema.V2PluginShareCheckoutResponse,
153 PluginShareDeleteParams: CodexSchema.V2PluginShareDeleteParams,
@@ -154,6 +164,7 @@ export const v2 = {
164 PluginUninstallResponse: CodexSchema.V2PluginUninstallResponse,
165 ProcessExitedNotification: CodexSchema.V2ProcessExitedNotification,
166 ProcessOutputDeltaNotification: CodexSchema.V2ProcessOutputDeltaNotification,
167 + ProjectChangedNotification: CodexSchema.V2ProjectChangedNotification,
168 RawResponseCompletedNotification: CodexSchema.V2RawResponseCompletedNotification,
169 RawResponseItemCompletedNotification: CodexSchema.V2RawResponseItemCompletedNotification,
170 ReasoningSummaryPartAddedNotification: CodexSchema.V2ReasoningSummaryPartAddedNotification,
@@ -172,6 +183,7 @@ export const v2 = {
183 SkillsExtraRootsSetResponse: CodexSchema.V2SkillsExtraRootsSetResponse,
184 SkillsListParams: CodexSchema.V2SkillsListParams,
185 SkillsListResponse: CodexSchema.V2SkillsListResponse,
186 + StrictReviewRequiredNotification: CodexSchema.V2StrictReviewRequiredNotification,
187 TerminalInteractionNotification: CodexSchema.V2TerminalInteractionNotification,
188 ThreadApproveGuardianDeniedActionParams: CodexSchema.V2ThreadApproveGuardianDeniedActionParams,
189 ThreadApproveGuardianDeniedActionResponse:
@@ -179,6 +191,13 @@ export const v2 = {
191 ThreadArchivedNotification: CodexSchema.V2ThreadArchivedNotification,
192 ThreadArchiveParams: CodexSchema.V2ThreadArchiveParams,
193 ThreadArchiveResponse: CodexSchema.V2ThreadArchiveResponse,
194 + ThreadAttachmentAddParams: CodexSchema.V2ThreadAttachmentAddParams,
195 + ThreadAttachmentAddResponse: CodexSchema.V2ThreadAttachmentAddResponse,
196 + ThreadAttachmentListParams: CodexSchema.V2ThreadAttachmentListParams,
197 + ThreadAttachmentListResponse: CodexSchema.V2ThreadAttachmentListResponse,
198 + ThreadAttachmentRemoveParams: CodexSchema.V2ThreadAttachmentRemoveParams,
199 + ThreadAttachmentRemoveResponse: CodexSchema.V2ThreadAttachmentRemoveResponse,
200 + ThreadAttachmentUpdatedNotification: CodexSchema.V2ThreadAttachmentUpdatedNotification,
201 ThreadClosedNotification: CodexSchema.V2ThreadClosedNotification,
202 ThreadCompactStartParams: CodexSchema.V2ThreadCompactStartParams,
203 ThreadCompactStartResponse: CodexSchema.V2ThreadCompactStartResponse,
@@ -197,6 +216,8 @@ export const v2 = {
216 ThreadGoalUpdatedNotification: CodexSchema.V2ThreadGoalUpdatedNotification,
217 ThreadInjectItemsParams: CodexSchema.V2ThreadInjectItemsParams,
218 ThreadInjectItemsResponse: CodexSchema.V2ThreadInjectItemsResponse,
219 + ThreadItemsListParams: CodexSchema.V2ThreadItemsListParams,
220 + ThreadItemsListResponse: CodexSchema.V2ThreadItemsListResponse,
221 ThreadListParams: CodexSchema.V2ThreadListParams,
222 ThreadListResponse: CodexSchema.V2ThreadListResponse,
223 ThreadLoadedListParams: CodexSchema.V2ThreadLoadedListParams,
@@ -204,11 +225,17 @@ export const v2 = {
225 ThreadMetadataUpdateParams: CodexSchema.V2ThreadMetadataUpdateParams,
226 ThreadMetadataUpdateResponse: CodexSchema.V2ThreadMetadataUpdateResponse,
227 ThreadNameUpdatedNotification: CodexSchema.V2ThreadNameUpdatedNotification,
228 + ThreadProjectUpdatedNotification: CodexSchema.V2ThreadProjectUpdatedNotification,
229 + ThreadQueueChangedNotification: CodexSchema.V2ThreadQueueChangedNotification,
230 ThreadReadParams: CodexSchema.V2ThreadReadParams,
231 ThreadReadResponse: CodexSchema.V2ThreadReadResponse,
232 ThreadRealtimeClosedNotification: CodexSchema.V2ThreadRealtimeClosedNotification,
233 ThreadRealtimeErrorNotification: CodexSchema.V2ThreadRealtimeErrorNotification,
234 ThreadRealtimeItemAddedNotification: CodexSchema.V2ThreadRealtimeItemAddedNotification,
235 + ThreadRealtimeItemCompletedNotification: CodexSchema.V2ThreadRealtimeItemCompletedNotification,
236 + ThreadRealtimeItemStartedNotification: CodexSchema.V2ThreadRealtimeItemStartedNotification,
237 + ThreadRealtimeItemTranscriptDeltaNotification:
238 + CodexSchema.V2ThreadRealtimeItemTranscriptDeltaNotification,
239 ThreadRealtimeOutputAudioDeltaNotification:
240 CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification,
241 ThreadRealtimeSdpNotification: CodexSchema.V2ThreadRealtimeSdpNotification,
@@ -218,8 +245,19 @@ export const v2 = {
245 ThreadRealtimeTranscriptDoneNotification: CodexSchema.V2ThreadRealtimeTranscriptDoneNotification,
246 ThreadResumeParams: CodexSchema.V2ThreadResumeParams,
247 ThreadResumeResponse: CodexSchema.V2ThreadResumeResponse,
221 - ThreadRollbackParams: CodexSchema.V2ThreadRollbackParams,
222 - ThreadRollbackResponse: CodexSchema.V2ThreadRollbackResponse,
248 + ThreadRevertedNotification: CodexSchema.V2ThreadRevertedNotification,
249 + ThreadRevertParams: CodexSchema.V2ThreadRevertParams,
250 + ThreadRevertResponse: CodexSchema.V2ThreadRevertResponse,
251 + ThreadSectionCreateParams: CodexSchema.V2ThreadSectionCreateParams,
252 + ThreadSectionCreateResponse: CodexSchema.V2ThreadSectionCreateResponse,
253 + ThreadSectionDeleteParams: CodexSchema.V2ThreadSectionDeleteParams,
254 + ThreadSectionDeleteResponse: CodexSchema.V2ThreadSectionDeleteResponse,
255 + ThreadSectionListParams: CodexSchema.V2ThreadSectionListParams,
256 + ThreadSectionListResponse: CodexSchema.V2ThreadSectionListResponse,
257 + ThreadSectionMoveParams: CodexSchema.V2ThreadSectionMoveParams,
258 + ThreadSectionMoveResponse: CodexSchema.V2ThreadSectionMoveResponse,
259 + ThreadSectionUpdateParams: CodexSchema.V2ThreadSectionUpdateParams,
260 + ThreadSectionUpdateResponse: CodexSchema.V2ThreadSectionUpdateResponse,
261 ThreadSetNameParams: CodexSchema.V2ThreadSetNameParams,
262 ThreadSetNameResponse: CodexSchema.V2ThreadSetNameResponse,
263 ThreadSettingsUpdatedNotification: CodexSchema.V2ThreadSettingsUpdatedNotification,
@@ -230,6 +268,8 @@ export const v2 = {
268 ThreadStartResponse: CodexSchema.V2ThreadStartResponse,
269 ThreadStatusChangedNotification: CodexSchema.V2ThreadStatusChangedNotification,
270 ThreadTokenUsageUpdatedNotification: CodexSchema.V2ThreadTokenUsageUpdatedNotification,
271 + ThreadTurnsListParams: CodexSchema.V2ThreadTurnsListParams,
272 + ThreadTurnsListResponse: CodexSchema.V2ThreadTurnsListResponse,
273 ThreadUnarchivedNotification: CodexSchema.V2ThreadUnarchivedNotification,
274 ThreadUnarchiveParams: CodexSchema.V2ThreadUnarchiveParams,
275 ThreadUnarchiveResponse: CodexSchema.V2ThreadUnarchiveResponse,
packages/effect-codex-app-server/src/_generated/schema.gen.ts
+14619 -2831
@@ -1,5 +1,5 @@
1 // This file is generated by the effect-codex-app-server package. Do not edit manually.
2 -// Upstream protocol ref: 678157acaa819d5510adfe359abb5d0392cfe461
2 +// Upstream protocol ref: fe74a774532af67b5a4a3dec03ce9469e17f89af
3
4 import * as Schema from "effect/Schema";
5
@@ -57,6 +57,7 @@ export const ClientRequest__RequestId = Schema.Union([
57
58 export type ClientRequest__InitializeCapabilities = {
59 readonly experimentalApi?: boolean;
60 + readonly extensions?: { readonly [x: string]: Schema.Json } | null;
61 readonly mcpServerOpenaiFormElicitation?: boolean;
62 readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
63 readonly requestAttestation?: boolean;
@@ -68,9 +69,18 @@ export const ClientRequest__InitializeCapabilities = Schema.Struct({
69 default: false,
70 }),
71 ),
72 + extensions: Schema.optionalKey(
73 + Schema.Union([
74 + Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })).annotate({
75 + description: "MCP extension settings declared by the app-server client.",
76 + }),
77 + Schema.Null,
78 + ]),
79 + ),
80 mcpServerOpenaiFormElicitation: Schema.optionalKey(
81 Schema.Boolean.annotate({
73 - description: "Allow downstream MCP servers to request OpenAI extended form elicitations.",
82 + description:
83 + "Legacy opt-in for the `openai/form` MCP extension.\n\nNew clients should declare `openai/form` in [`Self::extensions`].",
84 }),
85 ),
86 optOutNotificationMethods: Schema.optionalKey(
@@ -149,7 +159,10 @@ export const ClientRequest__Personality = Schema.Literals([
159 "none",
160 "friendly",
161 "pragmatic",
152 -]).annotate({ identifier: "ClientRequest__Personality" });
162 +]).annotate({
163 + description: "Deprecated: `friendly` and `pragmatic` no longer select a style.",
164 + identifier: "ClientRequest__Personality",
165 +});
166
167 export type ClientRequest__SandboxMode = "read-only" | "workspace-write" | "danger-full-access";
168 export const ClientRequest__SandboxMode = Schema.Literals([
@@ -253,6 +266,89 @@ export const ClientRequest__ThreadMetadataGitInfoUpdateParams = Schema.Struct({
266 ),
267 }).annotate({ identifier: "ClientRequest__ThreadMetadataGitInfoUpdateParams" });
268
269 +export type ClientRequest__ThreadAttachmentAddParams = {
270 + readonly attachmentType: string;
271 + readonly identityKey: string;
272 + readonly payload: Schema.Json;
273 + readonly threadId: string;
274 +};
275 +export const ClientRequest__ThreadAttachmentAddParams = Schema.Struct({
276 + attachmentType: Schema.String,
277 + identityKey: Schema.String,
278 + payload: Schema.Json.annotate({ expected: "JSON value" }),
279 + threadId: Schema.String,
280 +}).annotate({
281 + description: "Parameters for creating or locating an attachment on its owning thread.",
282 + identifier: "ClientRequest__ThreadAttachmentAddParams",
283 +});
284 +
285 +export type ClientRequest__ThreadAttachmentListParams = {
286 + readonly cursor?: string | null;
287 + readonly limit?: number | null;
288 + readonly threadId: string;
289 +};
290 +export const ClientRequest__ThreadAttachmentListParams = Schema.Struct({
291 + cursor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
292 + limit: Schema.optionalKey(
293 + Schema.Union([
294 + Schema.Number.annotate({ format: "uint32" })
295 + .check(Schema.isInt().annotate({ expected: "an integer" }))
296 + .check(
297 + Schema.isGreaterThanOrEqualTo(0).annotate({
298 + expected: "a value greater than or equal to 0",
299 + }),
300 + ),
301 + Schema.Null,
302 + ]),
303 + ),
304 + threadId: Schema.String,
305 +}).annotate({
306 + description: "Parameters for listing attachments from one thread.",
307 + identifier: "ClientRequest__ThreadAttachmentListParams",
308 +});
309 +
310 +export type ClientRequest__ThreadAttachmentRemoveParams = {
311 + readonly attachmentType: string;
312 + readonly identityKey: string;
313 + readonly threadId: string;
314 +};
315 +export const ClientRequest__ThreadAttachmentRemoveParams = Schema.Struct({
316 + attachmentType: Schema.String,
317 + identityKey: Schema.String,
318 + threadId: Schema.String,
319 +}).annotate({
320 + description: "Parameters for deleting an attachment by its stable thread-local identity.",
321 + identifier: "ClientRequest__ThreadAttachmentRemoveParams",
322 +});
323 +
324 +export type ClientRequest__ThreadSectionMoveParams = {
325 + readonly beforeThreadId?: string | null;
326 + readonly sectionId: string | null;
327 + readonly threadId: string;
328 +};
329 +export const ClientRequest__ThreadSectionMoveParams = Schema.Struct({
330 + beforeThreadId: Schema.optionalKey(
331 + Schema.Union([
332 + Schema.String.annotate({
333 + description: "Existing thread to insert before; omission or null appends to the section.",
334 + }),
335 + Schema.Null,
336 + ]),
337 + ),
338 + sectionId: Schema.Union([
339 + Schema.String.annotate({
340 + description: "Destination section, or `null` to remove the thread from its section.",
341 + }),
342 + Schema.Null,
343 + ]),
344 + threadId: Schema.String.annotate({
345 + description: "Thread to move into, within, or out of a section.",
346 + }),
347 +}).annotate({
348 + description: "Parameters for moving a thread within a server-owned section ordering.",
349 + identifier: "ClientRequest__ThreadSectionMoveParams",
350 +});
351 +
352 export type ClientRequest__ThreadUnarchiveParams = { readonly threadId: string };
353 export const ClientRequest__ThreadUnarchiveParams = Schema.Struct({
354 threadId: Schema.String,
@@ -266,6 +362,7 @@ export const ClientRequest__ThreadCompactStartParams = Schema.Struct({
362 export type ClientRequest__ThreadShellCommandParams = {
363 readonly command: string;
364 readonly threadId: string;
365 + readonly timeoutMs?: number | null;
366 };
367 export const ClientRequest__ThreadShellCommandParams = Schema.Struct({
368 command: Schema.String.annotate({
@@ -273,6 +370,16 @@ export const ClientRequest__ThreadShellCommandParams = Schema.Struct({
370 "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.",
371 }),
372 threadId: Schema.String,
373 + timeoutMs: Schema.optionalKey(
374 + Schema.Union([
375 + Schema.Number.annotate({
376 + description:
377 + "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.",
378 + format: "int64",
379 + }).check(Schema.isInt().annotate({ expected: "an integer" })),
380 + Schema.Null,
381 + ]),
382 + ),
383 }).annotate({ identifier: "ClientRequest__ThreadShellCommandParams" });
384
385 export type ClientRequest__ThreadApproveGuardianDeniedActionParams = {
@@ -287,24 +394,19 @@ export const ClientRequest__ThreadApproveGuardianDeniedActionParams = Schema.Str
394 threadId: Schema.String,
395 }).annotate({ identifier: "ClientRequest__ThreadApproveGuardianDeniedActionParams" });
396
290 -export type ClientRequest__ThreadRollbackParams = {
291 - readonly numTurns: number;
397 +export type ClientRequest__ThreadRevertParams = {
398 + readonly beforeTurnId: string;
399 readonly threadId: string;
400 };
294 -export const ClientRequest__ThreadRollbackParams = Schema.Struct({
295 - numTurns: Schema.Number.annotate({
296 - description:
297 - "The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.",
298 - format: "uint32",
299 - })
300 - .check(Schema.isInt().annotate({ expected: "an integer" }))
301 - .check(
302 - Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
303 - ),
401 +export const ClientRequest__ThreadRevertParams = Schema.Struct({
402 + beforeTurnId: Schema.String.annotate({
403 + description: "Turn excluded from the replacement history, together with every later turn.",
404 + }),
405 threadId: Schema.String,
406 }).annotate({
306 - description: "DEPRECATED: `thread/rollback` will be removed soon.",
307 - identifier: "ClientRequest__ThreadRollbackParams",
407 + description:
408 + "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.",
409 + identifier: "ClientRequest__ThreadRevertParams",
410 });
411
412 export type ClientRequest__ThreadListCwdFilter = string | ReadonlyArray<string>;
@@ -318,11 +420,16 @@ export const ClientRequest__SortDirection = Schema.Literals(["asc", "desc"]).ann
420 identifier: "ClientRequest__SortDirection",
421 });
422
321 -export type ClientRequest__ThreadSortKey = "created_at" | "updated_at" | "recency_at";
423 +export type ClientRequest__ThreadSortKey =
424 + | "created_at"
425 + | "updated_at"
426 + | "recency_at"
427 + | "section_position";
428 export const ClientRequest__ThreadSortKey = Schema.Literals([
429 "created_at",
430 "updated_at",
431 "recency_at",
432 + "section_position",
433 ]).annotate({ identifier: "ClientRequest__ThreadSortKey" });
434
435 export type ClientRequest__ThreadSourceKind =
@@ -349,6 +456,61 @@ export const ClientRequest__ThreadSourceKind = Schema.Literals([
456 "unknown",
457 ]).annotate({ identifier: "ClientRequest__ThreadSourceKind" });
458
459 +export type ClientRequest__ThreadSectionListParams = {
460 + readonly cursor?: string | null;
461 + readonly limit?: number | null;
462 +};
463 +export const ClientRequest__ThreadSectionListParams = Schema.Struct({
464 + cursor: Schema.optionalKey(
465 + Schema.Union([
466 + Schema.String.annotate({
467 + description: "Opaque pagination cursor returned by a previous call.",
468 + }),
469 + Schema.Null,
470 + ]),
471 + ),
472 + limit: Schema.optionalKey(
473 + Schema.Union([
474 + Schema.Number.annotate({
475 + description: "Maximum number of sections to return.",
476 + format: "uint32",
477 + })
478 + .check(Schema.isInt().annotate({ expected: "an integer" }))
479 + .check(
480 + Schema.isGreaterThanOrEqualTo(0).annotate({
481 + expected: "a value greater than or equal to 0",
482 + }),
483 + ),
484 + Schema.Null,
485 + ]),
486 + ),
487 +}).annotate({
488 + description: "Parameters for listing independently persisted thread sections.",
489 + identifier: "ClientRequest__ThreadSectionListParams",
490 +});
491 +
492 +export type ClientRequest__ThreadSectionAppearance = {
493 + readonly color?: string | null;
494 + readonly icon?: string | null;
495 +};
496 +export const ClientRequest__ThreadSectionAppearance = Schema.Struct({
497 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
498 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
499 +}).annotate({
500 + description: "Extensible visual presentation for a custom thread section.",
501 + identifier: "ClientRequest__ThreadSectionAppearance",
502 +});
503 +
504 +export type ClientRequest__ThreadSectionDeleteParams = { readonly sectionId: string };
505 +export const ClientRequest__ThreadSectionDeleteParams = Schema.Struct({
506 + sectionId: Schema.String.annotate({
507 + description: "The stable, server-generated identity of the section to delete.",
508 + }),
509 +}).annotate({
510 + description: "Parameters for deleting an independently persisted thread section.",
511 + identifier: "ClientRequest__ThreadSectionDeleteParams",
512 +});
513 +
514 export type ClientRequest__ThreadLoadedListParams = {
515 readonly cursor?: string | null;
516 readonly limit?: number | null;
@@ -386,12 +548,30 @@ export type ClientRequest__ThreadReadParams = {
548 export const ClientRequest__ThreadReadParams = Schema.Struct({
549 includeTurns: Schema.optionalKey(
550 Schema.Boolean.annotate({
389 - description: "When true, include turns and their items from rollout history.",
551 + description:
552 + "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`.",
553 }),
554 ),
555 threadId: Schema.String,
556 }).annotate({ identifier: "ClientRequest__ThreadReadParams" });
557
558 +export type ClientRequest__TurnItemsView = "notLoaded" | "summary" | "full";
559 +export const ClientRequest__TurnItemsView = Schema.Union(
560 + [
561 + Schema.Literal("notLoaded").annotate({
562 + description: "`items` was not loaded for this turn. The field is intentionally empty.",
563 + }),
564 + Schema.Literal("summary").annotate({
565 + description: "`items` contains only a display summary for this turn.",
566 + }),
567 + Schema.Literal("full").annotate({
568 + description:
569 + "`items` contains every ThreadItem available from persisted app-server history for this turn.",
570 + }),
571 + ],
572 + { mode: "oneOf" },
573 +).annotate({ identifier: "ClientRequest__TurnItemsView" });
574 +
575 export type ClientRequest__ThreadInjectItemsParams = {
576 readonly items: ReadonlyArray<Schema.Json>;
577 readonly threadId: string;
@@ -471,6 +651,18 @@ export const ClientRequest__PluginListMarketplaceKind = Schema.Literals([
651 "created-by-me-remote",
652 ]).annotate({ identifier: "ClientRequest__PluginListMarketplaceKind" });
653
654 +export type ClientRequest__PluginReconcileParams = { readonly reason?: string | null };
655 +export const ClientRequest__PluginReconcileParams = Schema.Struct({
656 + reason: Schema.optionalKey(
657 + Schema.Union([
658 + Schema.String.annotate({
659 + description: "Optional client-provided reason recorded with the reconciliation attempt.",
660 + }),
661 + Schema.Null,
662 + ]),
663 + ),
664 +}).annotate({ identifier: "ClientRequest__PluginReconcileParams" });
665 +
666 export type ClientRequest__PluginSkillReadParams = {
667 readonly remoteMarketplaceName: string;
668 readonly remotePluginId: string;
@@ -527,6 +719,7 @@ export const ClientRequest__PluginShareDeleteParams = Schema.Struct({
719 export type ClientRequest__AppsReadParams = {
720 readonly appIds: ReadonlyArray<string>;
721 readonly includeTools?: boolean;
722 + readonly threadId?: string | null;
723 };
724 export const ClientRequest__AppsReadParams = Schema.Struct({
725 appIds: Schema.Array(Schema.String).annotate({
@@ -539,6 +732,14 @@ export const ClientRequest__AppsReadParams = Schema.Struct({
732 "When true, include display-only public tool summaries in the returned metadata.",
733 }),
734 ),
735 + threadId: Schema.optionalKey(
736 + Schema.Union([
737 + Schema.String.annotate({
738 + description: "Optional loaded thread id used to evaluate effective app configuration.",
739 + }),
740 + Schema.Null,
741 + ]),
742 + ),
743 }).annotate({
744 description: "EXPERIMENTAL - read metadata for specific apps/connectors.",
745 identifier: "ClientRequest__AppsReadParams",
@@ -880,25 +1081,12 @@ export const ClientRequest__ExperimentalFeatureEnablementSetParams = Schema.Stru
1081 }),
1082 }).annotate({ identifier: "ClientRequest__ExperimentalFeatureEnablementSetParams" });
1083
883 -export type ClientRequest__McpServerOauthLoginParams = {
884 - readonly name: string;
885 - readonly scopes?: ReadonlyArray<string> | null;
886 - readonly threadId?: string | null;
887 - readonly timeoutSecs?: number | null;
888 -};
889 -export const ClientRequest__McpServerOauthLoginParams = Schema.Struct({
890 - name: Schema.String,
891 - scopes: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
892 - threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
893 - timeoutSecs: Schema.optionalKey(
894 - Schema.Union([
895 - Schema.Number.annotate({ format: "int64" }).check(
896 - Schema.isInt().annotate({ expected: "an integer" }),
897 - ),
898 - Schema.Null,
899 - ]),
900 - ),
901 -}).annotate({ identifier: "ClientRequest__McpServerOauthLoginParams" });
1084 +export type ClientRequest__McpServerOauthClientRegistration = "auto" | "cimd" | "dcr";
1085 +export const ClientRequest__McpServerOauthClientRegistration = Schema.Literals([
1086 + "auto",
1087 + "cimd",
1088 + "dcr",
1089 +]).annotate({ identifier: "ClientRequest__McpServerOauthClientRegistration" });
1090
1091 export type ClientRequest__McpServerStatusDetail = "full" | "toolsAndAuthOnly";
1092 export const ClientRequest__McpServerStatusDetail = Schema.Literals([
@@ -907,11 +1095,22 @@ export const ClientRequest__McpServerStatusDetail = Schema.Literals([
1095 ]).annotate({ identifier: "ClientRequest__McpServerStatusDetail" });
1096
1097 export type ClientRequest__McpResourceReadParams = {
1098 + readonly connectorId?: string | null;
1099 + readonly originCallId?: string | null;
1100 readonly server: string;
1101 readonly threadId?: string | null;
1102 readonly uri: string;
1103 };
1104 export const ClientRequest__McpResourceReadParams = Schema.Struct({
1105 + connectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1106 + originCallId: Schema.optionalKey(
1107 + Schema.Union([
1108 + Schema.String.annotate({
1109 + description: "Originating MCP tool call used to select the resource's app.",
1110 + }),
1111 + Schema.Null,
1112 + ]),
1113 + ),
1114 server: Schema.String,
1115 threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1116 uri: Schema.String,
@@ -948,6 +1147,29 @@ export const ClientRequest__CancelLoginAccountParams = Schema.Struct({
1147 loginId: Schema.String,
1148 }).annotate({ identifier: "ClientRequest__CancelLoginAccountParams" });
1149
1150 +export type ClientRequest__GetAccountRateLimitsParams = {
1151 + readonly excludeResetCreditDetails?: boolean;
1152 + readonly supportsLunaReserve?: boolean;
1153 +};
1154 +export const ClientRequest__GetAccountRateLimitsParams = Schema.Struct({
1155 + excludeResetCreditDetails: Schema.optionalKey(
1156 + Schema.Boolean.annotate({
1157 + description:
1158 + "Skip the separate reset-credit detail lookup for background usage polls. The usage response still includes the available count; omitted/false preserves detailed reads.",
1159 + }),
1160 + ),
1161 + supportsLunaReserve: Schema.optionalKey(
1162 + Schema.Boolean.annotate({
1163 + description:
1164 + "The client supports automatic Luna Reserve fallback. For eligible ChatGPT CLI users, allow the backend to record experiment exposure after ordinary usage is blocked.",
1165 + }),
1166 + ),
1167 +}).annotate({
1168 + description:
1169 + "Usage-read capabilities of the requesting client, never inferred from its experiment arm.",
1170 + identifier: "ClientRequest__GetAccountRateLimitsParams",
1171 +});
1172 +
1173 export type ClientRequest__ConsumeAccountRateLimitResetCreditParams = {
1174 readonly creditId?: string | null;
1175 readonly idempotencyKey: string;
@@ -968,6 +1190,19 @@ export const ClientRequest__ConsumeAccountRateLimitResetCreditParams = Schema.St
1190 }),
1191 }).annotate({ identifier: "ClientRequest__ConsumeAccountRateLimitResetCreditParams" });
1192
1193 +export type ClientRequest__GetAccountTokenUsageParams = { readonly threadId?: string | null };
1194 +export const ClientRequest__GetAccountTokenUsageParams = Schema.Struct({
1195 + threadId: Schema.optionalKey(
1196 + Schema.Union([
1197 + Schema.String.annotate({
1198 + description:
1199 + "When present, read estimated usage for this thread instead of account-wide token activity.",
1200 + }),
1201 + Schema.Null,
1202 + ]),
1203 + ),
1204 +}).annotate({ identifier: "ClientRequest__GetAccountTokenUsageParams" });
1205 +
1206 export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit";
1207 export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals([
1208 "credits",
@@ -1076,6 +1311,8 @@ export const ClientRequest__ConfigReadParams = Schema.Struct({
1311 export type ClientRequest__ExternalAgentConfigDetectParams = {
1312 readonly cwds?: ReadonlyArray<string> | null;
1313 readonly includeHome?: boolean;
1314 + readonly maxSessionAgeDays?: number | null;
1315 + readonly maxSessions?: number | null;
1316 readonly migrationSource?: string | null;
1317 readonly source?: string | null;
1318 };
@@ -1093,6 +1330,37 @@ export const ClientRequest__ExternalAgentConfigDetectParams = Schema.Struct({
1330 description: "If true, include detection under the user's home directory.",
1331 }),
1332 ),
1333 + maxSessionAgeDays: Schema.optionalKey(
1334 + Schema.Union([
1335 + Schema.Number.annotate({
1336 + description:
1337 + "Maximum age in days for detected sessions. Missing values use the default limit.",
1338 + format: "uint32",
1339 + })
1340 + .check(Schema.isInt().annotate({ expected: "an integer" }))
1341 + .check(
1342 + Schema.isGreaterThanOrEqualTo(0).annotate({
1343 + expected: "a value greater than or equal to 0",
1344 + }),
1345 + ),
1346 + Schema.Null,
1347 + ]),
1348 + ),
1349 + maxSessions: Schema.optionalKey(
1350 + Schema.Union([
1351 + Schema.Number.annotate({
1352 + description: "Maximum number of sessions to detect. Missing values use the default limit.",
1353 + format: "uint32",
1354 + })
1355 + .check(Schema.isInt().annotate({ expected: "an integer" }))
1356 + .check(
1357 + Schema.isGreaterThanOrEqualTo(0).annotate({
1358 + expected: "a value greater than or equal to 0",
1359 + }),
1360 + ),
1361 + Schema.Null,
1362 + ]),
1363 + ),
1364 migrationSource: Schema.optionalKey(
1365 Schema.Union([
1366 Schema.String.annotate({
@@ -1440,40 +1708,27 @@ export const ClientRequest__ConversationTextRole = Schema.Literals([
1708 "assistant",
1709 ]).annotate({ identifier: "ClientRequest__ConversationTextRole" });
1710
1443 -export type ClientRequest__TurnItemsView = "notLoaded" | "summary" | "full";
1444 -export const ClientRequest__TurnItemsView = Schema.Union(
1445 - [
1446 - Schema.Literal("notLoaded").annotate({
1447 - description: "`items` was not loaded for this turn. The field is intentionally empty.",
1448 - }),
1449 - Schema.Literal("summary").annotate({
1450 - description: "`items` contains only a display summary for this turn.",
1451 - }),
1452 - Schema.Literal("full").annotate({
1453 - description:
1454 - "`items` contains every ThreadItem available from persisted app-server history for this turn.",
1455 - }),
1456 - ],
1457 - { mode: "oneOf" },
1458 -).annotate({ identifier: "ClientRequest__TurnItemsView" });
1459 -
1711 export type ClientRequest__LegacyAppPathString = string;
1712 export const ClientRequest__LegacyAppPathString = Schema.String.annotate({
1713 identifier: "ClientRequest__LegacyAppPathString",
1714 });
1715
1465 -export type CommandExecutionRequestApprovalParams__AbsolutePathBuf = string;
1466 -export const CommandExecutionRequestApprovalParams__AbsolutePathBuf = Schema.String.annotate({
1467 - description:
1468 - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
1469 - identifier: "CommandExecutionRequestApprovalParams__AbsolutePathBuf",
1470 -});
1471 -
1716 export type CommandExecutionRequestApprovalParams__LegacyAppPathString = string;
1717 export const CommandExecutionRequestApprovalParams__LegacyAppPathString = Schema.String.annotate({
1718 identifier: "CommandExecutionRequestApprovalParams__LegacyAppPathString",
1719 });
1720
1721 +export type CommandExecutionRequestApprovalParams__CommandExecutionApprovalKind =
1722 + | "command"
1723 + | "writeStdin";
1724 +export const CommandExecutionRequestApprovalParams__CommandExecutionApprovalKind = Schema.Literals([
1725 + "command",
1726 + "writeStdin",
1727 +]).annotate({
1728 + description: "Distinguishes a command approval from input sent to an existing terminal.",
1729 + identifier: "CommandExecutionRequestApprovalParams__CommandExecutionApprovalKind",
1730 +});
1731 +
1732 export type CommandExecutionRequestApprovalParams__NetworkApprovalProtocol =
1733 | "http"
1734 | "https"
@@ -1772,11 +2027,9 @@ export const McpServerElicitationRequestResponse__McpServerElicitationAction = S
2027 "cancel",
2028 ]).annotate({ identifier: "McpServerElicitationRequestResponse__McpServerElicitationAction" });
2029
1775 -export type PermissionsRequestApprovalParams__AbsolutePathBuf = string;
1776 -export const PermissionsRequestApprovalParams__AbsolutePathBuf = Schema.String.annotate({
1777 - description:
1778 - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
1779 - identifier: "PermissionsRequestApprovalParams__AbsolutePathBuf",
2030 +export type PermissionsRequestApprovalParams__LegacyAppPathString = string;
2031 +export const PermissionsRequestApprovalParams__LegacyAppPathString = Schema.String.annotate({
2032 + identifier: "PermissionsRequestApprovalParams__LegacyAppPathString",
2033 });
2034
2035 export type PermissionsRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
@@ -1786,11 +2039,6 @@ export const PermissionsRequestApprovalParams__FileSystemAccessMode = Schema.Lit
2039 "deny",
2040 ]).annotate({ identifier: "PermissionsRequestApprovalParams__FileSystemAccessMode" });
2041
1789 -export type PermissionsRequestApprovalParams__LegacyAppPathString = string;
1790 -export const PermissionsRequestApprovalParams__LegacyAppPathString = Schema.String.annotate({
1791 - identifier: "PermissionsRequestApprovalParams__LegacyAppPathString",
1792 -});
1793 -
2042 export type PermissionsRequestApprovalParams__AdditionalNetworkPermissions = {
2043 readonly enabled?: boolean | null;
2044 };
@@ -1829,6 +2077,11 @@ export const ServerNotification__NonSteerableTurnKind = Schema.Literals([
2077 "compact",
2078 ]).annotate({ identifier: "ServerNotification__NonSteerableTurnKind" });
2079
2080 +export type ServerNotification__MisalignmentSteer = { readonly message: string };
2081 +export const ServerNotification__MisalignmentSteer = Schema.Struct({
2082 + message: Schema.String,
2083 +}).annotate({ identifier: "ServerNotification__MisalignmentSteer" });
2084 +
2085 export type ServerNotification__AbsolutePathBuf = string;
2086 export const ServerNotification__AbsolutePathBuf = Schema.String.annotate({
2087 description:
@@ -1847,6 +2100,34 @@ export const ServerNotification__GitInfo = Schema.Struct({
2100 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2101 }).annotate({ identifier: "ServerNotification__GitInfo" });
2102
2103 +export type ServerNotification__ThreadHistoryMode = "legacy" | "paginated";
2104 +export const ServerNotification__ThreadHistoryMode = Schema.Literals([
2105 + "legacy",
2106 + "paginated",
2107 +]).annotate({ identifier: "ServerNotification__ThreadHistoryMode" });
2108 +
2109 +export type ServerNotification__ReasoningEffort = string;
2110 +export const ServerNotification__ReasoningEffort = Schema.String.annotate({
2111 + description: "A non-empty reasoning effort value advertised by the model.",
2112 +}).check(
2113 + Schema.isMinLength(1).annotate({
2114 + expected: "a value with a length of at least 1",
2115 + identifier: "ServerNotification__ReasoningEffort",
2116 + }),
2117 +);
2118 +
2119 +export type ServerNotification__ThreadSectionAppearance = {
2120 + readonly color?: string | null;
2121 + readonly icon?: string | null;
2122 +};
2123 +export const ServerNotification__ThreadSectionAppearance = Schema.Struct({
2124 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2125 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2126 +}).annotate({
2127 + description: "Extensible visual presentation for a custom thread section.",
2128 + identifier: "ServerNotification__ThreadSectionAppearance",
2129 +});
2130 +
2131 export type ServerNotification__AgentPath = string;
2132 export const ServerNotification__AgentPath = Schema.String.annotate({
2133 identifier: "ServerNotification__AgentPath",
@@ -1899,6 +2180,11 @@ export const ServerNotification__HookPromptFragment = Schema.Struct({
2180 text: Schema.String,
2181 }).annotate({ identifier: "ServerNotification__HookPromptFragment" });
2182
2183 +export type ServerNotification__AgentMessageDelivery = "async";
2184 +export const ServerNotification__AgentMessageDelivery = Schema.Literal("async").annotate({
2185 + identifier: "ServerNotification__AgentMessageDelivery",
2186 +});
2187 +
2188 export type ServerNotification__MemoryCitationEntry = {
2189 readonly lineEnd: number;
2190 readonly lineStart: number;
@@ -1938,6 +2224,15 @@ export const ServerNotification__MessagePhase = Schema.Union(
2224 identifier: "ServerNotification__MessagePhase",
2225 });
2226
2227 +export type ServerNotification__AsyncUserInputQuestion = {
2228 + readonly options?: ReadonlyArray<string> | null;
2229 + readonly title: string;
2230 +};
2231 +export const ServerNotification__AsyncUserInputQuestion = Schema.Struct({
2232 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
2233 + title: Schema.String,
2234 +}).annotate({ identifier: "ServerNotification__AsyncUserInputQuestion" });
2235 +
2236 export type ServerNotification__LegacyAppPathString = string;
2237 export const ServerNotification__LegacyAppPathString = Schema.String.annotate({
2238 identifier: "ServerNotification__LegacyAppPathString",
@@ -2019,6 +2314,12 @@ export const ServerNotification__McpToolCallError = Schema.Struct({
2314 message: Schema.String,
2315 }).annotate({ identifier: "ServerNotification__McpToolCallError" });
2316
2317 +export type ServerNotification__McpAppDisplayMode = "inline" | "fullscreen";
2318 +export const ServerNotification__McpAppDisplayMode = Schema.Literals([
2319 + "inline",
2320 + "fullscreen",
2321 +]).annotate({ identifier: "ServerNotification__McpAppDisplayMode" });
2322 +
2323 export type ServerNotification__McpToolCallResult = {
2324 readonly _meta?: Schema.Json;
2325 readonly content: ReadonlyArray<Schema.Json>;
@@ -2090,16 +2391,6 @@ export const ServerNotification__CollabAgentStatus = Schema.Literals([
2391 "notFound",
2392 ]).annotate({ identifier: "ServerNotification__CollabAgentStatus" });
2393
2093 -export type ServerNotification__ReasoningEffort = string;
2094 -export const ServerNotification__ReasoningEffort = Schema.String.annotate({
2095 - description: "A non-empty reasoning effort value advertised by the model.",
2096 -}).check(
2097 - Schema.isMinLength(1).annotate({
2098 - expected: "a value with a length of at least 1",
2099 - identifier: "ServerNotification__ReasoningEffort",
2100 - }),
2101 -);
2102 -
2394 export type ServerNotification__CollabAgentToolCallStatus =
2395 | "inProgress"
2396 | "completed"
@@ -2178,6 +2469,31 @@ export const ServerNotification__WebSearchAction = Schema.Union(
2469 { mode: "oneOf" },
2470 ).annotate({ identifier: "ServerNotification__WebSearchAction" });
2471
2472 +export type ServerNotification__ImageGenerationFailure = {
2473 + readonly limitId: string;
2474 + readonly resetsAt?: number | null;
2475 + readonly type: "usageLimitExceeded";
2476 +};
2477 +export const ServerNotification__ImageGenerationFailure = Schema.Union(
2478 + [
2479 + Schema.Struct({
2480 + limitId: Schema.String,
2481 + resetsAt: Schema.optionalKey(
2482 + Schema.Union([
2483 + Schema.Number.annotate({ format: "int64" }).check(
2484 + Schema.isInt().annotate({ expected: "an integer" }),
2485 + ),
2486 + Schema.Null,
2487 + ]),
2488 + ),
2489 + type: Schema.Literal("usageLimitExceeded").annotate({
2490 + title: "UsageLimitExceededImageGenerationFailureType",
2491 + }),
2492 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
2493 + ],
2494 + { mode: "oneOf" },
2495 +).annotate({ identifier: "ServerNotification__ImageGenerationFailure" });
2496 +
2497 export type ServerNotification__TurnItemsView = "notLoaded" | "summary" | "full";
2498 export const ServerNotification__TurnItemsView = Schema.Union(
2499 [
@@ -2223,6 +2539,11 @@ export const ServerNotification__ThreadClosedNotification = Schema.Struct({
2539 threadId: Schema.String,
2540 }).annotate({ identifier: "ServerNotification__ThreadClosedNotification" });
2541
2542 +export type ServerNotification__ThreadRevertedNotification = { readonly threadId: string };
2543 +export const ServerNotification__ThreadRevertedNotification = Schema.Struct({
2544 + threadId: Schema.String,
2545 +}).annotate({ identifier: "ServerNotification__ThreadRevertedNotification" });
2546 +
2547 export type ServerNotification__SkillsChangedNotification = { readonly [x: string]: Schema.Json };
2548 export const ServerNotification__SkillsChangedNotification = Schema.Record(
2549 Schema.String,
@@ -2242,6 +2563,15 @@ export const ServerNotification__ThreadNameUpdatedNotification = Schema.Struct({
2563 threadName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
2564 }).annotate({ identifier: "ServerNotification__ThreadNameUpdatedNotification" });
2565
2566 +export type ServerNotification__ThreadAttachmentOperation = "created" | "deleted";
2567 +export const ServerNotification__ThreadAttachmentOperation = Schema.Literals([
2568 + "created",
2569 + "deleted",
2570 +]).annotate({
2571 + description: "The persisted attachment change represented by a notification.",
2572 + identifier: "ServerNotification__ThreadAttachmentOperation",
2573 +});
2574 +
2575 export type ServerNotification__ThreadGoalStatus =
2576 | "active"
2577 | "paused"
@@ -2263,6 +2593,27 @@ export const ServerNotification__ThreadGoalClearedNotification = Schema.Struct({
2593 threadId: Schema.String,
2594 }).annotate({ identifier: "ServerNotification__ThreadGoalClearedNotification" });
2595
2596 +export type ServerNotification__ThreadQueueChangedNotification = { readonly threadId: string };
2597 +export const ServerNotification__ThreadQueueChangedNotification = Schema.Struct({
2598 + threadId: Schema.String,
2599 +}).annotate({ identifier: "ServerNotification__ThreadQueueChangedNotification" });
2600 +
2601 +export type ServerNotification__ProjectChangeType = "created" | "updated" | "deleted";
2602 +export const ServerNotification__ProjectChangeType = Schema.Literals([
2603 + "created",
2604 + "updated",
2605 + "deleted",
2606 +]).annotate({ identifier: "ServerNotification__ProjectChangeType" });
2607 +
2608 +export type ServerNotification__ThreadProjectUpdatedNotification = {
2609 + readonly projectId: string | null;
2610 + readonly threadId: string;
2611 +};
2612 +export const ServerNotification__ThreadProjectUpdatedNotification = Schema.Struct({
2613 + projectId: Schema.Union([Schema.String, Schema.Null]),
2614 + threadId: Schema.String,
2615 +}).annotate({ identifier: "ServerNotification__ThreadProjectUpdatedNotification" });
2616 +
2617 export type ServerNotification__EnvironmentConnectionNotification = {
2618 readonly environmentId: string;
2619 readonly threadId: string;
@@ -2343,7 +2694,10 @@ export const ServerNotification__Personality = Schema.Literals([
2694 "none",
2695 "friendly",
2696 "pragmatic",
2346 -]).annotate({ identifier: "ServerNotification__Personality" });
2697 +]).annotate({
2698 + description: "Deprecated: `friendly` and `pragmatic` no longer select a style.",
2699 + identifier: "ServerNotification__Personality",
2700 +});
2701
2702 export type ServerNotification__NetworkAccess = "restricted" | "enabled";
2703 export const ServerNotification__NetworkAccess = Schema.Literals([
@@ -2420,7 +2774,8 @@ export type ServerNotification__HookEventName =
2774 | "userPromptSubmit"
2775 | "subagentStart"
2776 | "subagentStop"
2423 - | "stop";
2777 + | "stop"
2778 + | "interrupt";
2779 export const ServerNotification__HookEventName = Schema.Literals([
2780 "preToolUse",
2781 "permissionRequest",
@@ -2433,6 +2788,7 @@ export const ServerNotification__HookEventName = Schema.Literals([
2788 "subagentStart",
2789 "subagentStop",
2790 "stop",
2791 + "interrupt",
2792 ]).annotate({ identifier: "ServerNotification__HookEventName" });
2793
2794 export type ServerNotification__HookExecutionMode = "sync" | "async";
@@ -2440,9 +2796,10 @@ export const ServerNotification__HookExecutionMode = Schema.Literals(["sync", "a
2796 identifier: "ServerNotification__HookExecutionMode",
2797 });
2798
2443 -export type ServerNotification__HookHandlerType = "command" | "prompt" | "agent";
2799 +export type ServerNotification__HookHandlerType = "command" | "mcpTool" | "prompt" | "agent";
2800 export const ServerNotification__HookHandlerType = Schema.Literals([
2801 "command",
2802 + "mcpTool",
2803 "prompt",
2804 "agent",
2805 ]).annotate({ identifier: "ServerNotification__HookHandlerType" });
@@ -2591,6 +2948,20 @@ export const ServerNotification__AutoReviewDecisionSource = Schema.Literal("agen
2948 identifier: "ServerNotification__AutoReviewDecisionSource",
2949 });
2950
2951 +export type ServerNotification__StrictReviewRequiredNotification = {
2952 + readonly startedAtMs: number;
2953 + readonly threadId: string;
2954 + readonly turnId: string;
2955 +};
2956 +export const ServerNotification__StrictReviewRequiredNotification = Schema.Struct({
2957 + startedAtMs: Schema.Number.annotate({
2958 + description: "Unix timestamp (in milliseconds) when this review started.",
2959 + format: "int64",
2960 + }).check(Schema.isInt().annotate({ expected: "an integer" })),
2961 + threadId: Schema.String,
2962 + turnId: Schema.String,
2963 +}).annotate({ identifier: "ServerNotification__StrictReviewRequiredNotification" });
2964 +
2965 export type ServerNotification__AgentMessageDeltaNotification = {
2966 readonly delta: string;
2967 readonly itemId: string;
@@ -2781,6 +3152,15 @@ export const ServerNotification__McpServerStartupState = Schema.Literals([
3152 "cancelled",
3153 ]).annotate({ identifier: "ServerNotification__McpServerStartupState" });
3154
3155 +export type ServerNotification__McpServerEventNotification = {
3156 + readonly method: string;
3157 + readonly params: Schema.Json;
3158 +};
3159 +export const ServerNotification__McpServerEventNotification = Schema.Struct({
3160 + method: Schema.String,
3161 + params: Schema.Json.annotate({ expected: "JSON value" }),
3162 +}).annotate({ identifier: "ServerNotification__McpServerEventNotification" });
3163 +
3164 export type ServerNotification__AuthMode =
3165 | "apikey"
3166 | "chatgpt"
@@ -2788,7 +3168,8 @@ export type ServerNotification__AuthMode =
3168 | "headers"
3169 | "agentIdentity"
3170 | "personalAccessToken"
2791 - | "bedrockApiKey";
3171 + | "bedrockApiKey"
3172 + | "bedrockAccessKeys";
3173 export const ServerNotification__AuthMode = Schema.Union(
3174 [
3175 Schema.Literal("apikey").annotate({
@@ -2813,6 +3194,9 @@ export const ServerNotification__AuthMode = Schema.Union(
3194 Schema.Literal("bedrockApiKey").annotate({
3195 description: "Amazon Bedrock bearer token managed by Codex.",
3196 }),
3197 + Schema.Literal("bedrockAccessKeys").annotate({
3198 + description: "Amazon Bedrock AWS access keys managed by Codex.",
3199 + }),
3200 ],
3201 { mode: "oneOf" },
3202 ).annotate({
@@ -3070,6 +3454,19 @@ export const ServerNotification__ModelVerification = Schema.Literal(
3454 "trustedAccessForCyber",
3455 ).annotate({ identifier: "ServerNotification__ModelVerification" });
3456
3457 +export type ServerNotification__AuthRecoveryNotification = {
3458 + readonly message: string;
3459 + readonly provider: string;
3460 + readonly threadId: string;
3461 + readonly turnId: string;
3462 +};
3463 +export const ServerNotification__AuthRecoveryNotification = Schema.Struct({
3464 + message: Schema.String,
3465 + provider: Schema.String,
3466 + threadId: Schema.String,
3467 + turnId: Schema.String,
3468 +}).annotate({ identifier: "ServerNotification__AuthRecoveryNotification" });
3469 +
3470 export type ServerNotification__TurnModerationMetadataNotification = {
3471 readonly metadata: Schema.Json;
3472 readonly threadId: string;
@@ -3192,6 +3589,67 @@ export const ServerNotification__ThreadRealtimeItemAddedNotification = Schema.St
3589 identifier: "ServerNotification__ThreadRealtimeItemAddedNotification",
3590 });
3591
3592 +export type ServerNotification__ThreadRealtimeTranscriptRole = "user" | "assistant";
3593 +export const ServerNotification__ThreadRealtimeTranscriptRole = Schema.Literals([
3594 + "user",
3595 + "assistant",
3596 +]).annotate({ identifier: "ServerNotification__ThreadRealtimeTranscriptRole" });
3597 +
3598 +export type ServerNotification__ThreadRealtimeBemItemPresentation =
3599 + | { readonly type: "wholeItem" }
3600 + | { readonly type: "inlineMarkdown" }
3601 + | { readonly index: number; readonly type: "inlineVisualization" };
3602 +export const ServerNotification__ThreadRealtimeBemItemPresentation = Schema.Union(
3603 + [
3604 + Schema.Struct({
3605 + type: Schema.Literal("wholeItem").annotate({
3606 + title: "WholeItemThreadRealtimeBemItemPresentationType",
3607 + }),
3608 + }).annotate({ title: "WholeItemThreadRealtimeBemItemPresentation" }),
3609 + Schema.Struct({
3610 + type: Schema.Literal("inlineMarkdown").annotate({
3611 + title: "InlineMarkdownThreadRealtimeBemItemPresentationType",
3612 + }),
3613 + }).annotate({ title: "InlineMarkdownThreadRealtimeBemItemPresentation" }),
3614 + Schema.Struct({
3615 + index: Schema.Number.annotate({ format: "uint32" })
3616 + .check(Schema.isInt().annotate({ expected: "an integer" }))
3617 + .check(
3618 + Schema.isGreaterThanOrEqualTo(0).annotate({
3619 + expected: "a value greater than or equal to 0",
3620 + }),
3621 + ),
3622 + type: Schema.Literal("inlineVisualization").annotate({
3623 + title: "InlineVisualizationThreadRealtimeBemItemPresentationType",
3624 + }),
3625 + }).annotate({ title: "InlineVisualizationThreadRealtimeBemItemPresentation" }),
3626 + ],
3627 + { mode: "oneOf" },
3628 +).annotate({
3629 + description: "EXPERIMENTAL - how an existing agent item appears in a realtime conversation.",
3630 + identifier: "ServerNotification__ThreadRealtimeBemItemPresentation",
3631 +});
3632 +
3633 +export type ServerNotification__ThreadRealtimeSessionOutcome = "ended" | "failed";
3634 +export const ServerNotification__ThreadRealtimeSessionOutcome = Schema.Literals([
3635 + "ended",
3636 + "failed",
3637 +]).annotate({ identifier: "ServerNotification__ThreadRealtimeSessionOutcome" });
3638 +
3639 +export type ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification = {
3640 + readonly delta: string;
3641 + readonly itemId: string;
3642 + readonly threadId: string;
3643 +};
3644 +export const ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification = Schema.Struct({
3645 + delta: Schema.String,
3646 + itemId: Schema.String,
3647 + threadId: Schema.String,
3648 +}).annotate({
3649 + description: "EXPERIMENTAL - text appended to an active realtime transcript item.",
3650 + identifier: "ServerNotification__ThreadRealtimeItemTranscriptDeltaNotification",
3651 +});
3652 +
3653 export type ServerNotification__ThreadRealtimeTranscriptDeltaNotification = {
3654 readonly delta: string;
3655 readonly role: string;
@@ -3316,16 +3774,10 @@ export const ServerNotification__WindowsSandboxSetupMode = Schema.Literals([
3774 "unelevated",
3775 ]).annotate({ identifier: "ServerNotification__WindowsSandboxSetupMode" });
3776
3319 -export type ServerNotification__AccountLoginCompletedNotification = {
3320 - readonly error?: string | null;
3321 - readonly loginId?: string | null;
3322 - readonly success: boolean;
3323 -};
3324 -export const ServerNotification__AccountLoginCompletedNotification = Schema.Struct({
3325 - error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3326 - loginId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3327 - success: Schema.Boolean,
3328 -}).annotate({ identifier: "ServerNotification__AccountLoginCompletedNotification" });
3777 +export type ServerNotification__DesktopOnboardingEntrypoint = "life_sciences";
3778 +export const ServerNotification__DesktopOnboardingEntrypoint = Schema.Literal(
3779 + "life_sciences",
3780 +).annotate({ identifier: "ServerNotification__DesktopOnboardingEntrypoint" });
3781
3782 export type ServerRequest__RequestId = string | number;
3783 export const ServerRequest__RequestId = Schema.Union([
@@ -3335,18 +3787,20 @@ export const ServerRequest__RequestId = Schema.Union([
3787 ),
3788 ]).annotate({ identifier: "ServerRequest__RequestId" });
3789
3338 -export type ServerRequest__AbsolutePathBuf = string;
3339 -export const ServerRequest__AbsolutePathBuf = Schema.String.annotate({
3340 - description:
3341 - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
3342 - identifier: "ServerRequest__AbsolutePathBuf",
3343 -});
3344 -
3790 export type ServerRequest__LegacyAppPathString = string;
3791 export const ServerRequest__LegacyAppPathString = Schema.String.annotate({
3792 identifier: "ServerRequest__LegacyAppPathString",
3793 });
3794
3795 +export type ServerRequest__CommandExecutionApprovalKind = "command" | "writeStdin";
3796 +export const ServerRequest__CommandExecutionApprovalKind = Schema.Literals([
3797 + "command",
3798 + "writeStdin",
3799 +]).annotate({
3800 + description: "Distinguishes a command approval from input sent to an existing terminal.",
3801 + identifier: "ServerRequest__CommandExecutionApprovalKind",
3802 +});
3803 +
3804 export type ServerRequest__NetworkApprovalProtocol = "http" | "https" | "socks5Tcp" | "socks5Udp";
3805 export const ServerRequest__NetworkApprovalProtocol = Schema.Literals([
3806 "http",
@@ -3587,6 +4041,7 @@ export const ToolRequestUserInputResponse__ToolRequestUserInputAnswer = Schema.S
4041
4042 export type V1InitializeParams__InitializeCapabilities = {
4043 readonly experimentalApi?: boolean;
4044 + readonly extensions?: { readonly [x: string]: Schema.Json } | null;
4045 readonly mcpServerOpenaiFormElicitation?: boolean;
4046 readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
4047 readonly requestAttestation?: boolean;
@@ -3598,9 +4053,18 @@ export const V1InitializeParams__InitializeCapabilities = Schema.Struct({
4053 default: false,
4054 }),
4055 ),
4056 + extensions: Schema.optionalKey(
4057 + Schema.Union([
4058 + Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })).annotate({
4059 + description: "MCP extension settings declared by the app-server client.",
4060 + }),
4061 + Schema.Null,
4062 + ]),
4063 + ),
4064 mcpServerOpenaiFormElicitation: Schema.optionalKey(
4065 Schema.Boolean.annotate({
3603 - description: "Allow downstream MCP servers to request OpenAI extended form elicitations.",
4066 + description:
4067 + "Legacy opt-in for the `openai/form` MCP extension.\n\nNew clients should declare `openai/form` in [`Self::extensions`].",
4068 }),
4069 ),
4070 optOutNotificationMethods: Schema.optionalKey(
@@ -3641,6 +4105,11 @@ export const V1InitializeResponse__AbsolutePathBuf = Schema.String.annotate({
4105 identifier: "V1InitializeResponse__AbsolutePathBuf",
4106 });
4107
4108 +export type V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint = "life_sciences";
4109 +export const V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint = Schema.Literal(
4110 + "life_sciences",
4111 +).annotate({ identifier: "V2AccountLoginCompletedNotification__DesktopOnboardingEntrypoint" });
4112 +
4113 export type V2AccountRateLimitsUpdatedNotification__CreditsSnapshot = {
4114 readonly balance?: string | null;
4115 readonly hasCredits: boolean;
@@ -3755,7 +4224,8 @@ export type V2AccountUpdatedNotification__AuthMode =
4224 | "headers"
4225 | "agentIdentity"
4226 | "personalAccessToken"
3758 - | "bedrockApiKey";
4227 + | "bedrockApiKey"
4228 + | "bedrockAccessKeys";
4229 export const V2AccountUpdatedNotification__AuthMode = Schema.Union(
4230 [
4231 Schema.Literal("apikey").annotate({
@@ -3780,6 +4250,9 @@ export const V2AccountUpdatedNotification__AuthMode = Schema.Union(
4250 Schema.Literal("bedrockApiKey").annotate({
4251 description: "Amazon Bedrock bearer token managed by Codex.",
4252 }),
4253 + Schema.Literal("bedrockAccessKeys").annotate({
4254 + description: "Amazon Bedrock AWS access keys managed by Codex.",
4255 + }),
4256 ],
4257 { mode: "oneOf" },
4258 ).annotate({
@@ -3929,11 +4402,17 @@ export const V2AppsListResponse__AppBranding = Schema.Struct({
4402
4403 export type V2AppsReadResponse__AppToolSummary = {
4404 readonly description: string;
4405 + readonly disabledReason?: string | null;
4406 + readonly isEnabled?: boolean;
4407 + readonly isReadOnly?: boolean;
4408 readonly name: string;
4409 readonly title?: string | null;
4410 };
4411 export const V2AppsReadResponse__AppToolSummary = Schema.Struct({
4412 description: Schema.String,
4413 + disabledReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4414 + isEnabled: Schema.optionalKey(Schema.Boolean.annotate({ default: true })),
4415 + isReadOnly: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
4416 name: Schema.String,
4417 title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4418 }).annotate({
@@ -4080,6 +4559,12 @@ export const V2ConfigReadResponse__ApprovalsReviewer = Schema.Literals([
4559 identifier: "V2ConfigReadResponse__ApprovalsReviewer",
4560 });
4561
4562 +export type V2ConfigReadResponse__AllowDenyRequirement = "allow" | "deny";
4563 +export const V2ConfigReadResponse__AllowDenyRequirement = Schema.Literals([
4564 + "allow",
4565 + "deny",
4566 +]).annotate({ identifier: "V2ConfigReadResponse__AllowDenyRequirement" });
4567 +
4568 export type V2ConfigReadResponse__ForcedChatgptWorkspaceIds = string | ReadonlyArray<string>;
4569 export const V2ConfigReadResponse__ForcedChatgptWorkspaceIds = Schema.Union([
4570 Schema.String,
@@ -4207,6 +4692,34 @@ export const V2ConfigReadResponse__AppToolApproval = Schema.Literals([
4692 "approve",
4693 ]).annotate({ identifier: "V2ConfigReadResponse__AppToolApproval" });
4694
4695 +export type V2ConfigReadResponse__AppLinksConfig = { readonly [x: string]: Schema.Json };
4696 +export const V2ConfigReadResponse__AppLinksConfig = Schema.Record(
4697 + Schema.String,
4698 + Schema.Json.annotate({ expected: "JSON value" }),
4699 +).annotate({
4700 + description: "Account settings for a single app.",
4701 + identifier: "V2ConfigReadResponse__AppLinksConfig",
4702 +});
4703 +
4704 +export type V2ConfigReadResponse__ToolExposureSurface = "code_mode" | "deferred" | "direct";
4705 +export const V2ConfigReadResponse__ToolExposureSurface = Schema.Union(
4706 + [
4707 + Schema.Literal("code_mode").annotate({
4708 + description: "Nested tools available to Code Mode scripts.",
4709 + }),
4710 + Schema.Literal("deferred").annotate({
4711 + description: "Tools discovered later through tool search.",
4712 + }),
4713 + Schema.Literal("direct").annotate({
4714 + description: "Tools present in the model's initial tool list.",
4715 + }),
4716 + ],
4717 + { mode: "oneOf" },
4718 +).annotate({
4719 + description: "A model-facing surface on which a tool can be exposed.",
4720 + identifier: "V2ConfigReadResponse__ToolExposureSurface",
4721 +});
4722 +
4723 export type V2ConfigReadResponse__AppToolsConfig = { readonly [x: string]: Schema.Json };
4724 export const V2ConfigReadResponse__AppToolsConfig = Schema.Record(
4725 Schema.String,
@@ -4242,6 +4755,12 @@ export const V2ConfigRequirementsReadResponse__AskForApproval = Schema.Union(
4755 { mode: "oneOf" },
4756 ).annotate({ identifier: "V2ConfigRequirementsReadResponse__AskForApproval" });
4757
4758 +export type V2ConfigRequirementsReadResponse__ForcedLoginMethod = "chatgpt" | "api";
4759 +export const V2ConfigRequirementsReadResponse__ForcedLoginMethod = Schema.Literals([
4760 + "chatgpt",
4761 + "api",
4762 +]).annotate({ identifier: "V2ConfigRequirementsReadResponse__ForcedLoginMethod" });
4763 +
4764 export type V2ConfigRequirementsReadResponse__SandboxMode =
4765 | "read-only"
4766 | "workspace-write"
@@ -4264,24 +4783,70 @@ export const V2ConfigRequirementsReadResponse__WebSearchMode = Schema.Literals([
4783 "live",
4784 ]).annotate({ identifier: "V2ConfigRequirementsReadResponse__WebSearchMode" });
4785
4267 -export type V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode = "elevated" | "unelevated";
4268 -export const V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode = Schema.Literals([
4786 +export type V2ConfigRequirementsReadResponse__WindowsSandboxImplementation =
4787 + | "elevated"
4788 + | "unelevated"
4789 + | "mxc";
4790 +export const V2ConfigRequirementsReadResponse__WindowsSandboxImplementation = Schema.Literals([
4791 "elevated",
4792 "unelevated",
4271 -]).annotate({ identifier: "V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode" });
4793 + "mxc",
4794 +]).annotate({ identifier: "V2ConfigRequirementsReadResponse__WindowsSandboxImplementation" });
4795
4273 -export type V2ConfigRequirementsReadResponse__ComputerUseRequirements = {
4274 - readonly allowLockedComputerUse?: boolean | null;
4796 +export type V2ConfigRequirementsReadResponse__AutoReviewRequirements = {
4797 + readonly ignoreRules?: ReadonlyArray<string> | null;
4798 + readonly requiredOnModels?: ReadonlyArray<string> | null;
4799 };
4276 -export const V2ConfigRequirementsReadResponse__ComputerUseRequirements = Schema.Struct({
4277 - allowLockedComputerUse: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
4278 -}).annotate({ identifier: "V2ConfigRequirementsReadResponse__ComputerUseRequirements" });
4800 +export const V2ConfigRequirementsReadResponse__AutoReviewRequirements = Schema.Struct({
4801 + ignoreRules: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
4802 + requiredOnModels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
4803 +}).annotate({ identifier: "V2ConfigRequirementsReadResponse__AutoReviewRequirements" });
4804 +
4805 +export type V2ConfigRequirementsReadResponse__AllowDenyRequirement = "allow" | "deny";
4806 +export const V2ConfigRequirementsReadResponse__AllowDenyRequirement = Schema.Literals([
4807 + "allow",
4808 + "deny",
4809 +]).annotate({ identifier: "V2ConfigRequirementsReadResponse__AllowDenyRequirement" });
4810 +
4811 +export type V2ConfigRequirementsReadResponse__BrowserUseAccessApprovalLifetime = "turn" | "thread";
4812 +export const V2ConfigRequirementsReadResponse__BrowserUseAccessApprovalLifetime = Schema.Literals([
4813 + "turn",
4814 + "thread",
4815 +]).annotate({ identifier: "V2ConfigRequirementsReadResponse__BrowserUseAccessApprovalLifetime" });
4816 +
4817 +export type V2ConfigRequirementsReadResponse__CliAuthCredentialsStoreMode =
4818 + | "file"
4819 + | "keyring"
4820 + | "auto"
4821 + | "ephemeral";
4822 +export const V2ConfigRequirementsReadResponse__CliAuthCredentialsStoreMode = Schema.Literals([
4823 + "file",
4824 + "keyring",
4825 + "auto",
4826 + "ephemeral",
4827 +]).annotate({ identifier: "V2ConfigRequirementsReadResponse__CliAuthCredentialsStoreMode" });
4828
4829 export type V2ConfigRequirementsReadResponse__ResidencyRequirement = "us";
4830 export const V2ConfigRequirementsReadResponse__ResidencyRequirement = Schema.Literal("us").annotate(
4831 { identifier: "V2ConfigRequirementsReadResponse__ResidencyRequirement" },
4832 );
4833
4834 +export type V2ConfigRequirementsReadResponse__FeedbackRequirements = {
4835 + readonly enabled?: boolean | null;
4836 +};
4837 +export const V2ConfigRequirementsReadResponse__FeedbackRequirements = Schema.Struct({
4838 + enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
4839 +}).annotate({ identifier: "V2ConfigRequirementsReadResponse__FeedbackRequirements" });
4840 +
4841 +export type V2ConfigRequirementsReadResponse__InAppBrowserRequirements = {
4842 + readonly allowExternalBrowserSettingsImport?: boolean | null;
4843 +};
4844 +export const V2ConfigRequirementsReadResponse__InAppBrowserRequirements = Schema.Struct({
4845 + allowExternalBrowserSettingsImport: Schema.optionalKey(
4846 + Schema.Union([Schema.Boolean, Schema.Null]),
4847 + ),
4848 +}).annotate({ identifier: "V2ConfigRequirementsReadResponse__InAppBrowserRequirements" });
4849 +
4850 export type V2ConfigRequirementsReadResponse__ReasoningEffort = string;
4851 export const V2ConfigRequirementsReadResponse__ReasoningEffort = Schema.String.annotate({
4852 description: "A non-empty reasoning effort value advertised by the model.",
@@ -4292,8 +4857,15 @@ export const V2ConfigRequirementsReadResponse__ReasoningEffort = Schema.String.a
4857 }),
4858 );
4859
4860 +export type V2ConfigRequirementsReadResponse__NetworkDomainPermission = "allow" | "deny";
4861 +export const V2ConfigRequirementsReadResponse__NetworkDomainPermission = Schema.Literals([
4862 + "allow",
4863 + "deny",
4864 +]).annotate({ identifier: "V2ConfigRequirementsReadResponse__NetworkDomainPermission" });
4865 +
4866 export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler =
4867 | {
4868 + readonly additionalContextLimit?: number | null;
4869 readonly async: boolean;
4870 readonly command: string;
4871 readonly commandWindows?: string | null;
@@ -4301,11 +4873,35 @@ export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler =
4873 readonly timeoutSec?: number | null;
4874 readonly type: "command";
4875 }
4876 + | {
4877 + readonly input: { readonly [x: string]: Schema.Json };
4878 + readonly server: string;
4879 + readonly statusMessage?: string | null;
4880 + readonly timeoutSec?: number | null;
4881 + readonly tool: string;
4882 + readonly type: "mcp_tool";
4883 + }
4884 | { readonly type: "prompt" }
4885 | { readonly type: "agent" };
4886 export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Union(
4887 [
4888 Schema.Struct({
4889 + additionalContextLimit: Schema.optionalKey(
4890 + Schema.Union([
4891 + Schema.Number.annotate({
4892 + description:
4893 + "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.",
4894 + format: "uint",
4895 + })
4896 + .check(Schema.isInt().annotate({ expected: "an integer" }))
4897 + .check(
4898 + Schema.isGreaterThanOrEqualTo(0).annotate({
4899 + expected: "a value greater than or equal to 0",
4900 + }),
4901 + ),
4902 + Schema.Null,
4903 + ]),
4904 + ),
4905 async: Schema.Boolean,
4906 command: Schema.String,
4907 commandWindows: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
@@ -4324,6 +4920,25 @@ export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Un
4920 ),
4921 type: Schema.Literal("command").annotate({ title: "CommandConfiguredHookHandlerType" }),
4922 }).annotate({ title: "CommandConfiguredHookHandler" }),
4923 + Schema.Struct({
4924 + input: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
4925 + server: Schema.String,
4926 + statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
4927 + timeoutSec: Schema.optionalKey(
4928 + Schema.Union([
4929 + Schema.Number.annotate({ format: "uint64" })
4930 + .check(Schema.isInt().annotate({ expected: "an integer" }))
4931 + .check(
4932 + Schema.isGreaterThanOrEqualTo(0).annotate({
4933 + expected: "a value greater than or equal to 0",
4934 + }),
4935 + ),
4936 + Schema.Null,
4937 + ]),
4938 + ),
4939 + tool: Schema.String,
4940 + type: Schema.Literal("mcp_tool").annotate({ title: "McpToolConfiguredHookHandlerType" }),
4941 + }).annotate({ title: "McpToolConfiguredHookHandler" }),
4942 Schema.Struct({
4943 type: Schema.Literal("prompt").annotate({ title: "PromptConfiguredHookHandlerType" }),
4944 }).annotate({ title: "PromptConfiguredHookHandler" }),
@@ -4334,12 +4949,6 @@ export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Un
4949 { mode: "oneOf" },
4950 ).annotate({ identifier: "V2ConfigRequirementsReadResponse__ConfiguredHookHandler" });
4951
4337 -export type V2ConfigRequirementsReadResponse__NetworkDomainPermission = "allow" | "deny";
4338 -export const V2ConfigRequirementsReadResponse__NetworkDomainPermission = Schema.Literals([
4339 - "allow",
4340 - "deny",
4341 -]).annotate({ identifier: "V2ConfigRequirementsReadResponse__NetworkDomainPermission" });
4342 -
4952 export type V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = "allow" | "deny";
4953 export const V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = Schema.Literals([
4954 "allow",
@@ -4417,6 +5026,11 @@ export const V2ErrorNotification__NonSteerableTurnKind = Schema.Literals([
5026 "compact",
5027 ]).annotate({ identifier: "V2ErrorNotification__NonSteerableTurnKind" });
5028
5029 +export type V2ErrorNotification__MisalignmentSteer = { readonly message: string };
5030 +export const V2ErrorNotification__MisalignmentSteer = Schema.Struct({
5031 + message: Schema.String,
5032 +}).annotate({ identifier: "V2ErrorNotification__MisalignmentSteer" });
5033 +
5034 export type V2ExperimentalFeatureListResponse__ExperimentalFeatureStage =
5035 | "beta"
5036 | "underDevelopment"
@@ -4442,6 +5056,14 @@ export const V2ExperimentalFeatureListResponse__ExperimentalFeatureStage = Schem
5056 { mode: "oneOf" },
5057 ).annotate({ identifier: "V2ExperimentalFeatureListResponse__ExperimentalFeatureStage" });
5058
5059 +export type V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource =
5060 + | "remoteMcpServersConfig"
5061 + | "sessionToolUse";
5062 +export const V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource =
5063 + Schema.Literals(["remoteMcpServersConfig", "sessionToolUse"]).annotate({
5064 + identifier: "V2ExternalAgentConfigDetectResponse__ExternalAgentDetectedConnectorSource",
5065 + });
5066 +
5067 export type V2ExternalAgentConfigDetectResponse__CommandMigration = { readonly name: string };
5068 export const V2ExternalAgentConfigDetectResponse__CommandMigration = Schema.Struct({
5069 name: Schema.String,
@@ -4578,6 +5200,34 @@ export const V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConf
5200 "V2ExternalAgentConfigImportHistoriesReadResponse__ExternalAgentConfigMigrationItemType",
5201 });
5202
5203 +export type V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType =
5204 + | "AGENTS_MD"
5205 + | "CONFIG"
5206 + | "SKILLS"
5207 + | "PLUGINS"
5208 + | "MCP_SERVER_CONFIG"
5209 + | "SUBAGENTS"
5210 + | "HOOKS"
5211 + | "COMMANDS"
5212 + | "MEMORY"
5213 + | "SESSIONS";
5214 +export const V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType =
5215 + Schema.Literals([
5216 + "AGENTS_MD",
5217 + "CONFIG",
5218 + "SKILLS",
5219 + "PLUGINS",
5220 + "MCP_SERVER_CONFIG",
5221 + "SUBAGENTS",
5222 + "HOOKS",
5223 + "COMMANDS",
5224 + "MEMORY",
5225 + "SESSIONS",
5226 + ]).annotate({
5227 + identifier:
5228 + "V2ExternalAgentConfigImportHistoryRecordParams__ExternalAgentConfigMigrationItemType",
5229 + });
5230 +
5231 export type V2ExternalAgentConfigImportParams__CommandMigration = { readonly name: string };
5232 export const V2ExternalAgentConfigImportParams__CommandMigration = Schema.Struct({
5233 name: Schema.String,
@@ -4951,6 +5601,16 @@ export const V2GetAccountResponse__PlanType = Schema.Literals([
5601 "unknown",
5602 ]).annotate({ identifier: "V2GetAccountResponse__PlanType" });
5603
5604 +export type V2GetAccountResponse__AccountRoutingOverride = "NO_CONSTRAINT" | "us" | "us_cr";
5605 +export const V2GetAccountResponse__AccountRoutingOverride = Schema.Literals([
5606 + "NO_CONSTRAINT",
5607 + "us",
5608 + "us_cr",
5609 +]).annotate({
5610 + description: "Backend routing policy. Wire values match the accounts/check contract.",
5611 + identifier: "V2GetAccountResponse__AccountRoutingOverride",
5612 +});
5613 +
5614 export type V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket = {
5615 readonly startDate: string;
5616 readonly tokens: number;
@@ -5012,6 +5672,66 @@ export const V2GetAccountTokenUsageResponse__AccountTokenUsageSummary = Schema.S
5672 ),
5673 }).annotate({ identifier: "V2GetAccountTokenUsageResponse__AccountTokenUsageSummary" });
5674
5675 +export type V2GetAccountTokenUsageResponse__ThreadUsageBreakdownGroup = {
5676 + readonly cachedInputTokens?: number | null;
5677 + readonly estimatedUsageCreditsMicros: number;
5678 + readonly inputTokens?: number | null;
5679 + readonly model?: string | null;
5680 + readonly netNewInputTokens?: number | null;
5681 + readonly outputTokens?: number | null;
5682 + readonly reasoningEffort?: string | null;
5683 + readonly speed?: string | null;
5684 + readonly totalTokens?: number | null;
5685 +};
5686 +export const V2GetAccountTokenUsageResponse__ThreadUsageBreakdownGroup = Schema.Struct({
5687 + cachedInputTokens: Schema.optionalKey(
5688 + Schema.Union([
5689 + Schema.Number.annotate({ format: "int64" }).check(
5690 + Schema.isInt().annotate({ expected: "an integer" }),
5691 + ),
5692 + Schema.Null,
5693 + ]),
5694 + ),
5695 + estimatedUsageCreditsMicros: Schema.Number.annotate({ format: "int64" }).check(
5696 + Schema.isInt().annotate({ expected: "an integer" }),
5697 + ),
5698 + inputTokens: Schema.optionalKey(
5699 + Schema.Union([
5700 + Schema.Number.annotate({ format: "int64" }).check(
5701 + Schema.isInt().annotate({ expected: "an integer" }),
5702 + ),
5703 + Schema.Null,
5704 + ]),
5705 + ),
5706 + model: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5707 + netNewInputTokens: Schema.optionalKey(
5708 + Schema.Union([
5709 + Schema.Number.annotate({ format: "int64" }).check(
5710 + Schema.isInt().annotate({ expected: "an integer" }),
5711 + ),
5712 + Schema.Null,
5713 + ]),
5714 + ),
5715 + outputTokens: Schema.optionalKey(
5716 + Schema.Union([
5717 + Schema.Number.annotate({ format: "int64" }).check(
5718 + Schema.isInt().annotate({ expected: "an integer" }),
5719 + ),
5720 + Schema.Null,
5721 + ]),
5722 + ),
5723 + reasoningEffort: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5724 + speed: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5725 + totalTokens: Schema.optionalKey(
5726 + Schema.Union([
5727 + Schema.Number.annotate({ format: "int64" }).check(
5728 + Schema.isInt().annotate({ expected: "an integer" }),
5729 + ),
5730 + Schema.Null,
5731 + ]),
5732 + ),
5733 +}).annotate({ identifier: "V2GetAccountTokenUsageResponse__ThreadUsageBreakdownGroup" });
5734 +
5735 export type V2GetWorkspaceMessagesResponse__WorkspaceMessageType =
5736 | "headline"
5737 | "announcement"
@@ -5047,7 +5767,8 @@ export type V2HookCompletedNotification__HookEventName =
5767 | "userPromptSubmit"
5768 | "subagentStart"
5769 | "subagentStop"
5050 - | "stop";
5770 + | "stop"
5771 + | "interrupt";
5772 export const V2HookCompletedNotification__HookEventName = Schema.Literals([
5773 "preToolUse",
5774 "permissionRequest",
@@ -5060,6 +5781,7 @@ export const V2HookCompletedNotification__HookEventName = Schema.Literals([
5781 "subagentStart",
5782 "subagentStop",
5783 "stop",
5784 + "interrupt",
5785 ]).annotate({ identifier: "V2HookCompletedNotification__HookEventName" });
5786
5787 export type V2HookCompletedNotification__HookExecutionMode = "sync" | "async";
@@ -5068,9 +5790,14 @@ export const V2HookCompletedNotification__HookExecutionMode = Schema.Literals([
5790 "async",
5791 ]).annotate({ identifier: "V2HookCompletedNotification__HookExecutionMode" });
5792
5071 -export type V2HookCompletedNotification__HookHandlerType = "command" | "prompt" | "agent";
5793 +export type V2HookCompletedNotification__HookHandlerType =
5794 + | "command"
5795 + | "mcpTool"
5796 + | "prompt"
5797 + | "agent";
5798 export const V2HookCompletedNotification__HookHandlerType = Schema.Literals([
5799 "command",
5800 + "mcpTool",
5801 "prompt",
5802 "agent",
5803 ]).annotate({ identifier: "V2HookCompletedNotification__HookHandlerType" });
@@ -5147,7 +5874,8 @@ export type V2HooksListResponse__HookEventName =
5874 | "userPromptSubmit"
5875 | "subagentStart"
5876 | "subagentStop"
5150 - | "stop";
5877 + | "stop"
5878 + | "interrupt";
5879 export const V2HooksListResponse__HookEventName = Schema.Literals([
5880 "preToolUse",
5881 "permissionRequest",
@@ -5160,15 +5888,9 @@ export const V2HooksListResponse__HookEventName = Schema.Literals([
5888 "subagentStart",
5889 "subagentStop",
5890 "stop",
5891 + "interrupt",
5892 ]).annotate({ identifier: "V2HooksListResponse__HookEventName" });
5893
5165 -export type V2HooksListResponse__HookHandlerType = "command" | "prompt" | "agent";
5166 -export const V2HooksListResponse__HookHandlerType = Schema.Literals([
5167 - "command",
5168 - "prompt",
5169 - "agent",
5170 -]).annotate({ identifier: "V2HooksListResponse__HookHandlerType" });
5171 -
5894 export type V2HooksListResponse__HookSource =
5895 | "system"
5896 | "user"
@@ -5235,7 +5957,8 @@ export type V2HookStartedNotification__HookEventName =
5957 | "userPromptSubmit"
5958 | "subagentStart"
5959 | "subagentStop"
5238 - | "stop";
5960 + | "stop"
5961 + | "interrupt";
5962 export const V2HookStartedNotification__HookEventName = Schema.Literals([
5963 "preToolUse",
5964 "permissionRequest",
@@ -5248,6 +5971,7 @@ export const V2HookStartedNotification__HookEventName = Schema.Literals([
5971 "subagentStart",
5972 "subagentStop",
5973 "stop",
5974 + "interrupt",
5975 ]).annotate({ identifier: "V2HookStartedNotification__HookEventName" });
5976
5977 export type V2HookStartedNotification__HookExecutionMode = "sync" | "async";
@@ -5256,9 +5980,10 @@ export const V2HookStartedNotification__HookExecutionMode = Schema.Literals([
5980 "async",
5981 ]).annotate({ identifier: "V2HookStartedNotification__HookExecutionMode" });
5982
5259 -export type V2HookStartedNotification__HookHandlerType = "command" | "prompt" | "agent";
5983 +export type V2HookStartedNotification__HookHandlerType = "command" | "mcpTool" | "prompt" | "agent";
5984 export const V2HookStartedNotification__HookHandlerType = Schema.Literals([
5985 "command",
5986 + "mcpTool",
5987 "prompt",
5988 "agent",
5989 ]).annotate({ identifier: "V2HookStartedNotification__HookHandlerType" });
@@ -5349,6 +6074,11 @@ export const V2ItemCompletedNotification__HookPromptFragment = Schema.Struct({
6074 text: Schema.String,
6075 }).annotate({ identifier: "V2ItemCompletedNotification__HookPromptFragment" });
6076
6077 +export type V2ItemCompletedNotification__AgentMessageDelivery = "async";
6078 +export const V2ItemCompletedNotification__AgentMessageDelivery = Schema.Literal("async").annotate({
6079 + identifier: "V2ItemCompletedNotification__AgentMessageDelivery",
6080 +});
6081 +
6082 export type V2ItemCompletedNotification__MemoryCitationEntry = {
6083 readonly lineEnd: number;
6084 readonly lineStart: number;
@@ -5388,12 +6118,14 @@ export const V2ItemCompletedNotification__MessagePhase = Schema.Union(
6118 identifier: "V2ItemCompletedNotification__MessagePhase",
6119 });
6120
5391 -export type V2ItemCompletedNotification__AbsolutePathBuf = string;
5392 -export const V2ItemCompletedNotification__AbsolutePathBuf = Schema.String.annotate({
5393 - description:
5394 - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
5395 - identifier: "V2ItemCompletedNotification__AbsolutePathBuf",
5396 -});
6121 +export type V2ItemCompletedNotification__AsyncUserInputQuestion = {
6122 + readonly options?: ReadonlyArray<string> | null;
6123 + readonly title: string;
6124 +};
6125 +export const V2ItemCompletedNotification__AsyncUserInputQuestion = Schema.Struct({
6126 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
6127 + title: Schema.String,
6128 +}).annotate({ identifier: "V2ItemCompletedNotification__AsyncUserInputQuestion" });
6129
6130 export type V2ItemCompletedNotification__LegacyAppPathString = string;
6131 export const V2ItemCompletedNotification__LegacyAppPathString = Schema.String.annotate({
@@ -5476,6 +6208,12 @@ export const V2ItemCompletedNotification__McpToolCallError = Schema.Struct({
6208 message: Schema.String,
6209 }).annotate({ identifier: "V2ItemCompletedNotification__McpToolCallError" });
6210
6211 +export type V2ItemCompletedNotification__McpAppDisplayMode = "inline" | "fullscreen";
6212 +export const V2ItemCompletedNotification__McpAppDisplayMode = Schema.Literals([
6213 + "inline",
6214 + "fullscreen",
6215 +]).annotate({ identifier: "V2ItemCompletedNotification__McpAppDisplayMode" });
6216 +
6217 export type V2ItemCompletedNotification__McpToolCallResult = {
6218 readonly _meta?: Schema.Json;
6219 readonly content: ReadonlyArray<Schema.Json>;
@@ -5638,12 +6376,42 @@ export const V2ItemCompletedNotification__WebSearchAction = Schema.Union(
6376 { mode: "oneOf" },
6377 ).annotate({ identifier: "V2ItemCompletedNotification__WebSearchAction" });
6378
5641 -export type V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf = string;
5642 -export const V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf =
6379 +export type V2ItemCompletedNotification__ImageGenerationFailure = {
6380 + readonly limitId: string;
6381 + readonly resetsAt?: number | null;
6382 + readonly type: "usageLimitExceeded";
6383 +};
6384 +export const V2ItemCompletedNotification__ImageGenerationFailure = Schema.Union(
6385 + [
6386 + Schema.Struct({
6387 + limitId: Schema.String,
6388 + resetsAt: Schema.optionalKey(
6389 + Schema.Union([
6390 + Schema.Number.annotate({ format: "int64" }).check(
6391 + Schema.isInt().annotate({ expected: "an integer" }),
6392 + ),
6393 + Schema.Null,
6394 + ]),
6395 + ),
6396 + type: Schema.Literal("usageLimitExceeded").annotate({
6397 + title: "UsageLimitExceededImageGenerationFailureType",
6398 + }),
6399 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
6400 + ],
6401 + { mode: "oneOf" },
6402 +).annotate({ identifier: "V2ItemCompletedNotification__ImageGenerationFailure" });
6403 +
6404 +export type V2ItemCompletedNotification__AbsolutePathBuf = string;
6405 +export const V2ItemCompletedNotification__AbsolutePathBuf = Schema.String.annotate({
6406 + description:
6407 + "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.",
6408 + identifier: "V2ItemCompletedNotification__AbsolutePathBuf",
6409 +});
6410 +
6411 +export type V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString = string;
6412 +export const V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString =
6413 Schema.String.annotate({
5644 - description:
5645 - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
5646 - identifier: "V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf",
6414 + identifier: "V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString",
6415 });
6416
6417 export type V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource =
@@ -5654,6 +6422,14 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandS
6422 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__GuardianCommandSource",
6423 });
6424
6425 +export type V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf = string;
6426 +export const V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf =
6427 + Schema.String.annotate({
6428 + description:
6429 + "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.",
6430 + identifier: "V2ItemGuardianApprovalReviewCompletedNotification__AbsolutePathBuf",
6431 + });
6432 +
6433 export type V2ItemGuardianApprovalReviewCompletedNotification__NetworkApprovalProtocol =
6434 | "http"
6435 | "https"
@@ -5673,12 +6449,6 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccess
6449 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode",
6450 });
6451
5676 -export type V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString = string;
5677 -export const V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString =
5678 - Schema.String.annotate({
5679 - identifier: "V2ItemGuardianApprovalReviewCompletedNotification__LegacyAppPathString",
5680 - });
5681 -
6452 export type V2ItemGuardianApprovalReviewCompletedNotification__AdditionalNetworkPermissions = {
6453 readonly enabled?: boolean | null;
6454 };
@@ -5731,12 +6501,10 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuth
6501 identifier: "V2ItemGuardianApprovalReviewCompletedNotification__GuardianUserAuthorization",
6502 });
6503
5734 -export type V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf = string;
5735 -export const V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf =
6504 +export type V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString = string;
6505 +export const V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString =
6506 Schema.String.annotate({
5737 - description:
5738 - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
5739 - identifier: "V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf",
6507 + identifier: "V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString",
6508 });
6509
6510 export type V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource =
@@ -5747,6 +6515,14 @@ export const V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSou
6515 identifier: "V2ItemGuardianApprovalReviewStartedNotification__GuardianCommandSource",
6516 });
6517
6518 +export type V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf = string;
6519 +export const V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf =
6520 + Schema.String.annotate({
6521 + description:
6522 + "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.",
6523 + identifier: "V2ItemGuardianApprovalReviewStartedNotification__AbsolutePathBuf",
6524 + });
6525 +
6526 export type V2ItemGuardianApprovalReviewStartedNotification__NetworkApprovalProtocol =
6527 | "http"
6528 | "https"
@@ -5766,12 +6542,6 @@ export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMo
6542 identifier: "V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode",
6543 });
6544
5769 -export type V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString = string;
5770 -export const V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString =
5771 - Schema.String.annotate({
5772 - identifier: "V2ItemGuardianApprovalReviewStartedNotification__LegacyAppPathString",
5773 - });
5774 -
6545 export type V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkPermissions = {
6546 readonly enabled?: boolean | null;
6547 };
@@ -5851,6 +6621,11 @@ export const V2ItemStartedNotification__HookPromptFragment = Schema.Struct({
6621 text: Schema.String,
6622 }).annotate({ identifier: "V2ItemStartedNotification__HookPromptFragment" });
6623
6624 +export type V2ItemStartedNotification__AgentMessageDelivery = "async";
6625 +export const V2ItemStartedNotification__AgentMessageDelivery = Schema.Literal("async").annotate({
6626 + identifier: "V2ItemStartedNotification__AgentMessageDelivery",
6627 +});
6628 +
6629 export type V2ItemStartedNotification__MemoryCitationEntry = {
6630 readonly lineEnd: number;
6631 readonly lineStart: number;
@@ -5890,12 +6665,14 @@ export const V2ItemStartedNotification__MessagePhase = Schema.Union(
6665 identifier: "V2ItemStartedNotification__MessagePhase",
6666 });
6667
5893 -export type V2ItemStartedNotification__AbsolutePathBuf = string;
5894 -export const V2ItemStartedNotification__AbsolutePathBuf = Schema.String.annotate({
5895 - description:
5896 - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
5897 - identifier: "V2ItemStartedNotification__AbsolutePathBuf",
5898 -});
6668 +export type V2ItemStartedNotification__AsyncUserInputQuestion = {
6669 + readonly options?: ReadonlyArray<string> | null;
6670 + readonly title: string;
6671 +};
6672 +export const V2ItemStartedNotification__AsyncUserInputQuestion = Schema.Struct({
6673 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
6674 + title: Schema.String,
6675 +}).annotate({ identifier: "V2ItemStartedNotification__AsyncUserInputQuestion" });
6676
6677 export type V2ItemStartedNotification__LegacyAppPathString = string;
6678 export const V2ItemStartedNotification__LegacyAppPathString = Schema.String.annotate({
@@ -5978,6 +6755,12 @@ export const V2ItemStartedNotification__McpToolCallError = Schema.Struct({
6755 message: Schema.String,
6756 }).annotate({ identifier: "V2ItemStartedNotification__McpToolCallError" });
6757
6758 +export type V2ItemStartedNotification__McpAppDisplayMode = "inline" | "fullscreen";
6759 +export const V2ItemStartedNotification__McpAppDisplayMode = Schema.Literals([
6760 + "inline",
6761 + "fullscreen",
6762 +]).annotate({ identifier: "V2ItemStartedNotification__McpAppDisplayMode" });
6763 +
6764 export type V2ItemStartedNotification__McpToolCallResult = {
6765 readonly _meta?: Schema.Json;
6766 readonly content: ReadonlyArray<Schema.Json>;
@@ -6140,6 +6923,38 @@ export const V2ItemStartedNotification__WebSearchAction = Schema.Union(
6923 { mode: "oneOf" },
6924 ).annotate({ identifier: "V2ItemStartedNotification__WebSearchAction" });
6925
6926 +export type V2ItemStartedNotification__ImageGenerationFailure = {
6927 + readonly limitId: string;
6928 + readonly resetsAt?: number | null;
6929 + readonly type: "usageLimitExceeded";
6930 +};
6931 +export const V2ItemStartedNotification__ImageGenerationFailure = Schema.Union(
6932 + [
6933 + Schema.Struct({
6934 + limitId: Schema.String,
6935 + resetsAt: Schema.optionalKey(
6936 + Schema.Union([
6937 + Schema.Number.annotate({ format: "int64" }).check(
6938 + Schema.isInt().annotate({ expected: "an integer" }),
6939 + ),
6940 + Schema.Null,
6941 + ]),
6942 + ),
6943 + type: Schema.Literal("usageLimitExceeded").annotate({
6944 + title: "UsageLimitExceededImageGenerationFailureType",
6945 + }),
6946 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
6947 + ],
6948 + { mode: "oneOf" },
6949 +).annotate({ identifier: "V2ItemStartedNotification__ImageGenerationFailure" });
6950 +
6951 +export type V2ItemStartedNotification__AbsolutePathBuf = string;
6952 +export const V2ItemStartedNotification__AbsolutePathBuf = Schema.String.annotate({
6953 + description:
6954 + "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.",
6955 + identifier: "V2ItemStartedNotification__AbsolutePathBuf",
6956 +});
6957 +
6958 export type V2ListMcpServerStatusParams__McpServerStatusDetail = "full" | "toolsAndAuthOnly";
6959 export const V2ListMcpServerStatusParams__McpServerStatusDetail = Schema.Literals([
6960 "full",
@@ -6147,11 +6962,13 @@ export const V2ListMcpServerStatusParams__McpServerStatusDetail = Schema.Literal
6962 ]).annotate({ identifier: "V2ListMcpServerStatusParams__McpServerStatusDetail" });
6963
6964 export type V2ListMcpServerStatusResponse__McpAuthStatus =
6965 + | "unknown"
6966 | "unsupported"
6967 | "notLoggedIn"
6968 | "bearerToken"
6969 | "oAuth";
6970 export const V2ListMcpServerStatusResponse__McpAuthStatus = Schema.Literals([
6971 + "unknown",
6972 "unsupported",
6973 "notLoggedIn",
6974 "bearerToken",
@@ -6213,6 +7030,24 @@ export const V2ListMcpServerStatusResponse__Resource = Schema.Struct({
7030 identifier: "V2ListMcpServerStatusResponse__Resource",
7031 });
7032
7033 +export type V2ListMcpServerStatusResponse__McpServerConnectionStatus =
7034 + | "notStarted"
7035 + | "starting"
7036 + | "connected"
7037 + | "authenticationRequired"
7038 + | "failed"
7039 + | "cancelled"
7040 + | "disabled";
7041 +export const V2ListMcpServerStatusResponse__McpServerConnectionStatus = Schema.Literals([
7042 + "notStarted",
7043 + "starting",
7044 + "connected",
7045 + "authenticationRequired",
7046 + "failed",
7047 + "cancelled",
7048 + "disabled",
7049 +]).annotate({ identifier: "V2ListMcpServerStatusResponse__McpServerConnectionStatus" });
7050 +
7051 export type V2ListMcpServerStatusResponse__McpServerInfo = {
7052 readonly description?: string | null;
7053 readonly icons?: ReadonlyArray<Schema.Json> | null;
@@ -6327,6 +7162,22 @@ export const V2McpResourceReadResponse__ResourceContent = Schema.Union([
7162 identifier: "V2McpResourceReadResponse__ResourceContent",
7163 });
7164
7165 +export type V2McpServerEventStreamNotification__McpServerEventNotification = {
7166 + readonly method: string;
7167 + readonly params: Schema.Json;
7168 +};
7169 +export const V2McpServerEventStreamNotification__McpServerEventNotification = Schema.Struct({
7170 + method: Schema.String,
7171 + params: Schema.Json.annotate({ expected: "JSON value" }),
7172 +}).annotate({ identifier: "V2McpServerEventStreamNotification__McpServerEventNotification" });
7173 +
7174 +export type V2McpServerOauthLoginParams__McpServerOauthClientRegistration = "auto" | "cimd" | "dcr";
7175 +export const V2McpServerOauthLoginParams__McpServerOauthClientRegistration = Schema.Literals([
7176 + "auto",
7177 + "cimd",
7178 + "dcr",
7179 +]).annotate({ identifier: "V2McpServerOauthLoginParams__McpServerOauthClientRegistration" });
7180 +
7181 export type V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason =
7182 "reauthenticationRequired";
7183 export const V2McpServerStatusUpdatedNotification__McpServerStartupFailureReason = Schema.Literal(
@@ -6350,6 +7201,17 @@ export const V2ModelListResponse__ModelAvailabilityNux = Schema.Struct({
7201 message: Schema.String,
7202 }).annotate({ identifier: "V2ModelListResponse__ModelAvailabilityNux" });
7203
7204 +export type V2ModelListResponse__CyberAccessProgram = "standard" | "daybreakBlue" | "daybreakRed";
7205 +export const V2ModelListResponse__CyberAccessProgram = Schema.Literals([
7206 + "standard",
7207 + "daybreakBlue",
7208 + "daybreakRed",
7209 +]).annotate({
7210 + description:
7211 + "Requested cyber treatment for a ChatGPT-authenticated Codex turn. Authorization and model-tier restrictions remain server-owned.",
7212 + identifier: "V2ModelListResponse__CyberAccessProgram",
7213 +});
7214 +
7215 export type V2ModelListResponse__ReasoningEffort = string;
7216 export const V2ModelListResponse__ReasoningEffort = Schema.String.annotate({
7217 description: "A non-empty reasoning effort value advertised by the model.",
@@ -6373,6 +7235,16 @@ export const V2ModelListResponse__InputModality = Schema.Union(
7235 identifier: "V2ModelListResponse__InputModality",
7236 });
7237
7238 +export type V2ModelListResponse__MultiAgentVersion = "disabled" | "v1" | "v2";
7239 +export const V2ModelListResponse__MultiAgentVersion = Schema.Literals([
7240 + "disabled",
7241 + "v1",
7242 + "v2",
7243 +]).annotate({
7244 + description: "Multi-agent runtime supported by a model.",
7245 + identifier: "V2ModelListResponse__MultiAgentVersion",
7246 +});
7247 +
7248 export type V2ModelListResponse__ModelServiceTier = {
7249 readonly description: string;
7250 readonly id: string;
@@ -6388,12 +7260,23 @@ export type V2ModelListResponse__ModelUpgradeInfo = {
7260 readonly migrationMarkdown?: string | null;
7261 readonly model: string;
7262 readonly modelLink?: string | null;
7263 + readonly retirementAt?: number | null;
7264 readonly upgradeCopy?: string | null;
7265 };
7266 export const V2ModelListResponse__ModelUpgradeInfo = Schema.Struct({
7267 migrationMarkdown: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7268 model: Schema.String,
7269 modelLink: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7270 + retirementAt: Schema.optionalKey(
7271 + Schema.Union([
7272 + Schema.Number.annotate({
7273 + description:
7274 + "Informational Unix timestamp for this upgrade's scheduled retirement, if known.",
7275 + format: "int64",
7276 + }).check(Schema.isInt().annotate({ expected: "an integer" })),
7277 + Schema.Null,
7278 + ]),
7279 + ),
7280 upgradeCopy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7281 }).annotate({ identifier: "V2ModelListResponse__ModelUpgradeInfo" });
7282
@@ -6407,6 +7290,44 @@ export const V2ModelVerificationNotification__ModelVerification = Schema.Literal
7290 "trustedAccessForCyber",
7291 ).annotate({ identifier: "V2ModelVerificationNotification__ModelVerification" });
7292
7293 +export type V2NullableGetAccountRateLimitsParams__GetAccountRateLimitsParams = {
7294 + readonly excludeResetCreditDetails?: boolean;
7295 + readonly supportsLunaReserve?: boolean;
7296 +};
7297 +export const V2NullableGetAccountRateLimitsParams__GetAccountRateLimitsParams = Schema.Struct({
7298 + excludeResetCreditDetails: Schema.optionalKey(
7299 + Schema.Boolean.annotate({
7300 + description:
7301 + "Skip the separate reset-credit detail lookup for background usage polls. The usage response still includes the available count; omitted/false preserves detailed reads.",
7302 + }),
7303 + ),
7304 + supportsLunaReserve: Schema.optionalKey(
7305 + Schema.Boolean.annotate({
7306 + description:
7307 + "The client supports automatic Luna Reserve fallback. For eligible ChatGPT CLI users, allow the backend to record experiment exposure after ordinary usage is blocked.",
7308 + }),
7309 + ),
7310 +}).annotate({
7311 + description:
7312 + "Usage-read capabilities of the requesting client, never inferred from its experiment arm.",
7313 + identifier: "V2NullableGetAccountRateLimitsParams__GetAccountRateLimitsParams",
7314 +});
7315 +
7316 +export type V2NullableGetAccountTokenUsageParams__GetAccountTokenUsageParams = {
7317 + readonly threadId?: string | null;
7318 +};
7319 +export const V2NullableGetAccountTokenUsageParams__GetAccountTokenUsageParams = Schema.Struct({
7320 + threadId: Schema.optionalKey(
7321 + Schema.Union([
7322 + Schema.String.annotate({
7323 + description:
7324 + "When present, read estimated usage for this thread instead of account-wide token activity.",
7325 + }),
7326 + Schema.Null,
7327 + ]),
7328 + ),
7329 +}).annotate({ identifier: "V2NullableGetAccountTokenUsageParams__GetAccountTokenUsageParams" });
7330 +
7331 export type V2PermissionProfileListResponse__PermissionProfileSummary = {
7332 readonly allowed: boolean;
7333 readonly description?: string | null;
@@ -6466,6 +7387,18 @@ export const V2PluginInstalledResponse__PluginAvailability = Schema.Union(
7387 { mode: "oneOf" },
7388 ).annotate({ identifier: "V2PluginInstalledResponse__PluginAvailability" });
7389
7390 +export type V2PluginInstalledResponse__PluginDisabledReason =
7391 + | "disabled_by_admin"
7392 + | "plan_not_eligible"
7393 + | "required_app_unavailable"
7394 + | "unknown";
7395 +export const V2PluginInstalledResponse__PluginDisabledReason = Schema.Literals([
7396 + "disabled_by_admin",
7397 + "plan_not_eligible",
7398 + "required_app_unavailable",
7399 + "unknown",
7400 +]).annotate({ identifier: "V2PluginInstalledResponse__PluginDisabledReason" });
7401 +
7402 export type V2PluginInstalledResponse__PluginInstallPolicy =
7403 | "NOT_AVAILABLE"
7404 | "AVAILABLE"
@@ -6590,6 +7523,18 @@ export const V2PluginListResponse__PluginAvailability = Schema.Union(
7523 { mode: "oneOf" },
7524 ).annotate({ identifier: "V2PluginListResponse__PluginAvailability" });
7525
7526 +export type V2PluginListResponse__PluginDisabledReason =
7527 + | "disabled_by_admin"
7528 + | "plan_not_eligible"
7529 + | "required_app_unavailable"
7530 + | "unknown";
7531 +export const V2PluginListResponse__PluginDisabledReason = Schema.Literals([
7532 + "disabled_by_admin",
7533 + "plan_not_eligible",
7534 + "required_app_unavailable",
7535 + "unknown",
7536 +]).annotate({ identifier: "V2PluginListResponse__PluginDisabledReason" });
7537 +
7538 export type V2PluginListResponse__PluginInstallPolicy =
7539 | "NOT_AVAILABLE"
7540 | "AVAILABLE"
@@ -6673,7 +7618,8 @@ export type V2PluginReadResponse__HookEventName =
7618 | "userPromptSubmit"
7619 | "subagentStart"
7620 | "subagentStop"
6676 - | "stop";
7621 + | "stop"
7622 + | "interrupt";
7623 export const V2PluginReadResponse__HookEventName = Schema.Literals([
7624 "preToolUse",
7625 "permissionRequest",
@@ -6686,6 +7632,7 @@ export const V2PluginReadResponse__HookEventName = Schema.Literals([
7632 "subagentStart",
7633 "subagentStop",
7634 "stop",
7635 + "interrupt",
7636 ]).annotate({ identifier: "V2PluginReadResponse__HookEventName" });
7637
7638 export type V2PluginReadResponse__AbsolutePathBuf = string;
@@ -6731,6 +7678,18 @@ export const V2PluginReadResponse__PluginAvailability = Schema.Union(
7678 { mode: "oneOf" },
7679 ).annotate({ identifier: "V2PluginReadResponse__PluginAvailability" });
7680
7681 +export type V2PluginReadResponse__PluginDisabledReason =
7682 + | "disabled_by_admin"
7683 + | "plan_not_eligible"
7684 + | "required_app_unavailable"
7685 + | "unknown";
7686 +export const V2PluginReadResponse__PluginDisabledReason = Schema.Literals([
7687 + "disabled_by_admin",
7688 + "plan_not_eligible",
7689 + "required_app_unavailable",
7690 + "unknown",
7691 +]).annotate({ identifier: "V2PluginReadResponse__PluginDisabledReason" });
7692 +
7693 export type V2PluginReadResponse__PluginInstallPolicy =
7694 | "NOT_AVAILABLE"
7695 | "AVAILABLE"
@@ -6770,6 +7729,30 @@ export const V2PluginReadResponse__PluginSharePrincipalRole = Schema.Literals([
7729 "owner",
7730 ]).annotate({ identifier: "V2PluginReadResponse__PluginSharePrincipalRole" });
7731
7732 +export type V2PluginReconcileResponse__PluginReconcileChangedPlugin = {
7733 + readonly hasApps: boolean;
7734 + readonly hasHooks: boolean;
7735 + readonly hasMcps: boolean;
7736 + readonly hasSkills: boolean;
7737 + readonly id: string;
7738 +};
7739 +export const V2PluginReconcileResponse__PluginReconcileChangedPlugin = Schema.Struct({
7740 + hasApps: Schema.Boolean,
7741 + hasHooks: Schema.Boolean,
7742 + hasMcps: Schema.Boolean,
7743 + hasSkills: Schema.Boolean.annotate({
7744 + description:
7745 + "Whether either bundle declares skill roots; not a validated inventory of enabled skills.",
7746 + }),
7747 + id: Schema.String.annotate({
7748 + description: "Local plugin ID (`name@marketplace`), matching `PluginSummary.id`.",
7749 + }),
7750 +}).annotate({
7751 + description:
7752 + "Runtime categories affected by this change, not just capabilities currently present. Flags describe declarations before runtime policy filtering. Updates OR the old and new bundle flags; enablement changes and cached reinstalls use the cached bundle; removals retain the old bundle's flags.",
7753 + identifier: "V2PluginReconcileResponse__PluginReconcileChangedPlugin",
7754 +});
7755 +
7756 export type V2PluginShareCheckoutResponse__AbsolutePathBuf = string;
7757 export const V2PluginShareCheckoutResponse__AbsolutePathBuf = Schema.String.annotate({
7758 description:
@@ -6802,6 +7785,18 @@ export const V2PluginShareListResponse__PluginAvailability = Schema.Union(
7785 { mode: "oneOf" },
7786 ).annotate({ identifier: "V2PluginShareListResponse__PluginAvailability" });
7787
7788 +export type V2PluginShareListResponse__PluginDisabledReason =
7789 + | "disabled_by_admin"
7790 + | "plan_not_eligible"
7791 + | "required_app_unavailable"
7792 + | "unknown";
7793 +export const V2PluginShareListResponse__PluginDisabledReason = Schema.Literals([
7794 + "disabled_by_admin",
7795 + "plan_not_eligible",
7796 + "required_app_unavailable",
7797 + "unknown",
7798 +]).annotate({ identifier: "V2PluginShareListResponse__PluginDisabledReason" });
7799 +
7800 export type V2PluginShareListResponse__PluginInstallPolicy =
7801 | "NOT_AVAILABLE"
7802 | "AVAILABLE"
@@ -6941,6 +7936,13 @@ export const V2ProcessOutputDeltaNotification__ProcessOutputStream = Schema.Unio
7936 identifier: "V2ProcessOutputDeltaNotification__ProcessOutputStream",
7937 });
7938
7939 +export type V2ProjectChangedNotification__ProjectChangeType = "created" | "updated" | "deleted";
7940 +export const V2ProjectChangedNotification__ProjectChangeType = Schema.Literals([
7941 + "created",
7942 + "updated",
7943 + "deleted",
7944 +]).annotate({ identifier: "V2ProjectChangedNotification__ProjectChangeType" });
7945 +
7946 export type V2RawResponseCompletedNotification__TokenUsageBreakdown = {
7947 readonly cacheWriteInputTokens?: number;
7948 readonly cachedInputTokens: number;
@@ -6972,6 +7974,18 @@ export const V2RawResponseCompletedNotification__TokenUsageBreakdown = Schema.St
7974 ),
7975 }).annotate({ identifier: "V2RawResponseCompletedNotification__TokenUsageBreakdown" });
7976
7977 +export type V2RawResponseCompletedNotification__ResponseUsageMetadata = {
7978 + readonly amount?: string | null;
7979 + readonly metadata?: Schema.Json;
7980 +};
7981 +export const V2RawResponseCompletedNotification__ResponseUsageMetadata = Schema.Struct({
7982 + amount: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7983 + metadata: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
7984 +}).annotate({
7985 + description: "Usage metadata reported for one upstream response.",
7986 + identifier: "V2RawResponseCompletedNotification__ResponseUsageMetadata",
7987 +});
7988 +
7989 export type V2RawResponseItemCompletedNotification__ImageDetail =
7990 | "auto"
7991 | "low"
@@ -7155,6 +8169,16 @@ export const V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction
8169 { mode: "oneOf" },
8170 ).annotate({ identifier: "V2RawResponseItemCompletedNotification__ResponsesApiWebSearchAction" });
8171
8172 +export type V2RawResponseItemCompletedNotification__ReasoningEffort = string;
8173 +export const V2RawResponseItemCompletedNotification__ReasoningEffort = Schema.String.annotate({
8174 + description: "A non-empty reasoning effort value advertised by the model.",
8175 +}).check(
8176 + Schema.isMinLength(1).annotate({
8177 + expected: "a value with a length of at least 1",
8178 + identifier: "V2RawResponseItemCompletedNotification__ReasoningEffort",
8179 + }),
8180 +);
8181 +
8182 export type V2RemoteControlStatusChangedNotification__RemoteControlConnectionStatus =
8183 | "disabled"
8184 | "connecting"
@@ -7224,6 +8248,11 @@ export const V2ReviewStartResponse__NonSteerableTurnKind = Schema.Literals([
8248 "compact",
8249 ]).annotate({ identifier: "V2ReviewStartResponse__NonSteerableTurnKind" });
8250
8251 +export type V2ReviewStartResponse__MisalignmentSteer = { readonly message: string };
8252 +export const V2ReviewStartResponse__MisalignmentSteer = Schema.Struct({
8253 + message: Schema.String,
8254 +}).annotate({ identifier: "V2ReviewStartResponse__MisalignmentSteer" });
8255 +
8256 export type V2ReviewStartResponse__ByteRange = { readonly end: number; readonly start: number };
8257 export const V2ReviewStartResponse__ByteRange = Schema.Struct({
8258 end: Schema.Number.annotate({ format: "uint" })
@@ -7255,6 +8284,11 @@ export const V2ReviewStartResponse__HookPromptFragment = Schema.Struct({
8284 text: Schema.String,
8285 }).annotate({ identifier: "V2ReviewStartResponse__HookPromptFragment" });
8286
8287 +export type V2ReviewStartResponse__AgentMessageDelivery = "async";
8288 +export const V2ReviewStartResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
8289 + identifier: "V2ReviewStartResponse__AgentMessageDelivery",
8290 +});
8291 +
8292 export type V2ReviewStartResponse__MemoryCitationEntry = {
8293 readonly lineEnd: number;
8294 readonly lineStart: number;
@@ -7294,12 +8328,14 @@ export const V2ReviewStartResponse__MessagePhase = Schema.Union(
8328 identifier: "V2ReviewStartResponse__MessagePhase",
8329 });
8330
7297 -export type V2ReviewStartResponse__AbsolutePathBuf = string;
7298 -export const V2ReviewStartResponse__AbsolutePathBuf = Schema.String.annotate({
7299 - description:
7300 - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
7301 - identifier: "V2ReviewStartResponse__AbsolutePathBuf",
7302 -});
8331 +export type V2ReviewStartResponse__AsyncUserInputQuestion = {
8332 + readonly options?: ReadonlyArray<string> | null;
8333 + readonly title: string;
8334 +};
8335 +export const V2ReviewStartResponse__AsyncUserInputQuestion = Schema.Struct({
8336 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
8337 + title: Schema.String,
8338 +}).annotate({ identifier: "V2ReviewStartResponse__AsyncUserInputQuestion" });
8339
8340 export type V2ReviewStartResponse__LegacyAppPathString = string;
8341 export const V2ReviewStartResponse__LegacyAppPathString = Schema.String.annotate({
@@ -7382,6 +8418,12 @@ export const V2ReviewStartResponse__McpToolCallError = Schema.Struct({
8418 message: Schema.String,
8419 }).annotate({ identifier: "V2ReviewStartResponse__McpToolCallError" });
8420
8421 +export type V2ReviewStartResponse__McpAppDisplayMode = "inline" | "fullscreen";
8422 +export const V2ReviewStartResponse__McpAppDisplayMode = Schema.Literals([
8423 + "inline",
8424 + "fullscreen",
8425 +]).annotate({ identifier: "V2ReviewStartResponse__McpAppDisplayMode" });
8426 +
8427 export type V2ReviewStartResponse__McpToolCallResult = {
8428 readonly _meta?: Schema.Json;
8429 readonly content: ReadonlyArray<Schema.Json>;
@@ -7541,6 +8583,38 @@ export const V2ReviewStartResponse__WebSearchAction = Schema.Union(
8583 { mode: "oneOf" },
8584 ).annotate({ identifier: "V2ReviewStartResponse__WebSearchAction" });
8585
8586 +export type V2ReviewStartResponse__ImageGenerationFailure = {
8587 + readonly limitId: string;
8588 + readonly resetsAt?: number | null;
8589 + readonly type: "usageLimitExceeded";
8590 +};
8591 +export const V2ReviewStartResponse__ImageGenerationFailure = Schema.Union(
8592 + [
8593 + Schema.Struct({
8594 + limitId: Schema.String,
8595 + resetsAt: Schema.optionalKey(
8596 + Schema.Union([
8597 + Schema.Number.annotate({ format: "int64" }).check(
8598 + Schema.isInt().annotate({ expected: "an integer" }),
8599 + ),
8600 + Schema.Null,
8601 + ]),
8602 + ),
8603 + type: Schema.Literal("usageLimitExceeded").annotate({
8604 + title: "UsageLimitExceededImageGenerationFailureType",
8605 + }),
8606 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
8607 + ],
8608 + { mode: "oneOf" },
8609 +).annotate({ identifier: "V2ReviewStartResponse__ImageGenerationFailure" });
8610 +
8611 +export type V2ReviewStartResponse__AbsolutePathBuf = string;
8612 +export const V2ReviewStartResponse__AbsolutePathBuf = Schema.String.annotate({
8613 + description:
8614 + "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.",
8615 + identifier: "V2ReviewStartResponse__AbsolutePathBuf",
8616 +});
8617 +
8618 export type V2ReviewStartResponse__TurnItemsView = "notLoaded" | "summary" | "full";
8619 export const V2ReviewStartResponse__TurnItemsView = Schema.Union(
8620 [
@@ -7647,6 +8721,66 @@ export const V2SkillsListResponse__SkillScope = Schema.Literals([
8721 "admin",
8722 ]).annotate({ identifier: "V2SkillsListResponse__SkillScope" });
8723
8724 +export type V2ThreadAttachmentAddResponse__ThreadAttachment = {
8725 + readonly attachmentType: string;
8726 + readonly createdAt: number;
8727 + readonly id: string;
8728 + readonly identityKey: string;
8729 + readonly payload: Schema.Json;
8730 +};
8731 +export const V2ThreadAttachmentAddResponse__ThreadAttachment = Schema.Struct({
8732 + attachmentType: Schema.String,
8733 + createdAt: Schema.Number.annotate({ format: "int64" }).check(
8734 + Schema.isInt().annotate({ expected: "an integer" }),
8735 + ),
8736 + id: Schema.String,
8737 + identityKey: Schema.String,
8738 + payload: Schema.Json.annotate({ expected: "JSON value" }),
8739 +}).annotate({
8740 + description: "An independently persisted attachment associated with a thread.",
8741 + identifier: "V2ThreadAttachmentAddResponse__ThreadAttachment",
8742 +});
8743 +
8744 +export type V2ThreadAttachmentAddResponse__ThreadAttachmentAddOutcome = "created" | "existing";
8745 +export const V2ThreadAttachmentAddResponse__ThreadAttachmentAddOutcome = Schema.Literals([
8746 + "created",
8747 + "existing",
8748 +]).annotate({
8749 + description: "Result of attempting to associate an attachment with a thread.",
8750 + identifier: "V2ThreadAttachmentAddResponse__ThreadAttachmentAddOutcome",
8751 +});
8752 +
8753 +export type V2ThreadAttachmentListResponse__ThreadAttachment = {
8754 + readonly attachmentType: string;
8755 + readonly createdAt: number;
8756 + readonly id: string;
8757 + readonly identityKey: string;
8758 + readonly payload: Schema.Json;
8759 +};
8760 +export const V2ThreadAttachmentListResponse__ThreadAttachment = Schema.Struct({
8761 + attachmentType: Schema.String,
8762 + createdAt: Schema.Number.annotate({ format: "int64" }).check(
8763 + Schema.isInt().annotate({ expected: "an integer" }),
8764 + ),
8765 + id: Schema.String,
8766 + identityKey: Schema.String,
8767 + payload: Schema.Json.annotate({ expected: "JSON value" }),
8768 +}).annotate({
8769 + description: "An independently persisted attachment associated with a thread.",
8770 + identifier: "V2ThreadAttachmentListResponse__ThreadAttachment",
8771 +});
8772 +
8773 +export type V2ThreadAttachmentUpdatedNotification__ThreadAttachmentOperation =
8774 + | "created"
8775 + | "deleted";
8776 +export const V2ThreadAttachmentUpdatedNotification__ThreadAttachmentOperation = Schema.Literals([
8777 + "created",
8778 + "deleted",
8779 +]).annotate({
8780 + description: "The persisted attachment change represented by a notification.",
8781 + identifier: "V2ThreadAttachmentUpdatedNotification__ThreadAttachmentOperation",
8782 +});
8783 +
8784 export type V2ThreadForkParams__AskForApproval =
8785 | "untrusted"
8786 | "on-request"
@@ -7781,6 +8915,24 @@ export const V2ThreadForkResponse__GitInfo = Schema.Struct({
8915 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8916 }).annotate({ identifier: "V2ThreadForkResponse__GitInfo" });
8917
8918 +export type V2ThreadForkResponse__ThreadHistoryMode = "legacy" | "paginated";
8919 +export const V2ThreadForkResponse__ThreadHistoryMode = Schema.Literals([
8920 + "legacy",
8921 + "paginated",
8922 +]).annotate({ identifier: "V2ThreadForkResponse__ThreadHistoryMode" });
8923 +
8924 +export type V2ThreadForkResponse__ThreadSectionAppearance = {
8925 + readonly color?: string | null;
8926 + readonly icon?: string | null;
8927 +};
8928 +export const V2ThreadForkResponse__ThreadSectionAppearance = Schema.Struct({
8929 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8930 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8931 +}).annotate({
8932 + description: "Extensible visual presentation for a custom thread section.",
8933 + identifier: "V2ThreadForkResponse__ThreadSectionAppearance",
8934 +});
8935 +
8936 export type V2ThreadForkResponse__AgentPath = string;
8937 export const V2ThreadForkResponse__AgentPath = Schema.String.annotate({
8938 identifier: "V2ThreadForkResponse__AgentPath",
@@ -7808,6 +8960,11 @@ export const V2ThreadForkResponse__NonSteerableTurnKind = Schema.Literals([
8960 "compact",
8961 ]).annotate({ identifier: "V2ThreadForkResponse__NonSteerableTurnKind" });
8962
8963 +export type V2ThreadForkResponse__MisalignmentSteer = { readonly message: string };
8964 +export const V2ThreadForkResponse__MisalignmentSteer = Schema.Struct({
8965 + message: Schema.String,
8966 +}).annotate({ identifier: "V2ThreadForkResponse__MisalignmentSteer" });
8967 +
8968 export type V2ThreadForkResponse__ByteRange = { readonly end: number; readonly start: number };
8969 export const V2ThreadForkResponse__ByteRange = Schema.Struct({
8970 end: Schema.Number.annotate({ format: "uint" })
@@ -7839,6 +8996,11 @@ export const V2ThreadForkResponse__HookPromptFragment = Schema.Struct({
8996 text: Schema.String,
8997 }).annotate({ identifier: "V2ThreadForkResponse__HookPromptFragment" });
8998
8999 +export type V2ThreadForkResponse__AgentMessageDelivery = "async";
9000 +export const V2ThreadForkResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
9001 + identifier: "V2ThreadForkResponse__AgentMessageDelivery",
9002 +});
9003 +
9004 export type V2ThreadForkResponse__MemoryCitationEntry = {
9005 readonly lineEnd: number;
9006 readonly lineStart: number;
@@ -7878,6 +9040,15 @@ export const V2ThreadForkResponse__MessagePhase = Schema.Union(
9040 identifier: "V2ThreadForkResponse__MessagePhase",
9041 });
9042
9043 +export type V2ThreadForkResponse__AsyncUserInputQuestion = {
9044 + readonly options?: ReadonlyArray<string> | null;
9045 + readonly title: string;
9046 +};
9047 +export const V2ThreadForkResponse__AsyncUserInputQuestion = Schema.Struct({
9048 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
9049 + title: Schema.String,
9050 +}).annotate({ identifier: "V2ThreadForkResponse__AsyncUserInputQuestion" });
9051 +
9052 export type V2ThreadForkResponse__CommandExecutionSource =
9053 | "agent"
9054 | "userShell"
@@ -7954,6 +9125,12 @@ export const V2ThreadForkResponse__McpToolCallError = Schema.Struct({
9125 message: Schema.String,
9126 }).annotate({ identifier: "V2ThreadForkResponse__McpToolCallError" });
9127
9128 +export type V2ThreadForkResponse__McpAppDisplayMode = "inline" | "fullscreen";
9129 +export const V2ThreadForkResponse__McpAppDisplayMode = Schema.Literals([
9130 + "inline",
9131 + "fullscreen",
9132 +]).annotate({ identifier: "V2ThreadForkResponse__McpAppDisplayMode" });
9133 +
9134 export type V2ThreadForkResponse__McpToolCallResult = {
9135 readonly _meta?: Schema.Json;
9136 readonly content: ReadonlyArray<Schema.Json>;
@@ -8103,6 +9280,31 @@ export const V2ThreadForkResponse__WebSearchAction = Schema.Union(
9280 { mode: "oneOf" },
9281 ).annotate({ identifier: "V2ThreadForkResponse__WebSearchAction" });
9282
9283 +export type V2ThreadForkResponse__ImageGenerationFailure = {
9284 + readonly limitId: string;
9285 + readonly resetsAt?: number | null;
9286 + readonly type: "usageLimitExceeded";
9287 +};
9288 +export const V2ThreadForkResponse__ImageGenerationFailure = Schema.Union(
9289 + [
9290 + Schema.Struct({
9291 + limitId: Schema.String,
9292 + resetsAt: Schema.optionalKey(
9293 + Schema.Union([
9294 + Schema.Number.annotate({ format: "int64" }).check(
9295 + Schema.isInt().annotate({ expected: "an integer" }),
9296 + ),
9297 + Schema.Null,
9298 + ]),
9299 + ),
9300 + type: Schema.Literal("usageLimitExceeded").annotate({
9301 + title: "UsageLimitExceededImageGenerationFailureType",
9302 + }),
9303 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
9304 + ],
9305 + { mode: "oneOf" },
9306 +).annotate({ identifier: "V2ThreadForkResponse__ImageGenerationFailure" });
9307 +
9308 export type V2ThreadForkResponse__TurnItemsView = "notLoaded" | "summary" | "full";
9309 export const V2ThreadForkResponse__TurnItemsView = Schema.Union(
9310 [
@@ -8196,6 +9398,376 @@ export const V2ThreadGoalUpdatedNotification__ThreadGoalStatus = Schema.Literals
9398 "complete",
9399 ]).annotate({ identifier: "V2ThreadGoalUpdatedNotification__ThreadGoalStatus" });
9400
9401 +export type V2ThreadItemsListParams__SortDirection = "asc" | "desc";
9402 +export const V2ThreadItemsListParams__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
9403 + identifier: "V2ThreadItemsListParams__SortDirection",
9404 +});
9405 +
9406 +export type V2ThreadItemsListResponse__ByteRange = { readonly end: number; readonly start: number };
9407 +export const V2ThreadItemsListResponse__ByteRange = Schema.Struct({
9408 + end: Schema.Number.annotate({ format: "uint" })
9409 + .check(Schema.isInt().annotate({ expected: "an integer" }))
9410 + .check(
9411 + Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
9412 + ),
9413 + start: Schema.Number.annotate({ format: "uint" })
9414 + .check(Schema.isInt().annotate({ expected: "an integer" }))
9415 + .check(
9416 + Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
9417 + ),
9418 +}).annotate({ identifier: "V2ThreadItemsListResponse__ByteRange" });
9419 +
9420 +export type V2ThreadItemsListResponse__ImageDetail = "auto" | "low" | "high" | "original";
9421 +export const V2ThreadItemsListResponse__ImageDetail = Schema.Literals([
9422 + "auto",
9423 + "low",
9424 + "high",
9425 + "original",
9426 +]).annotate({ identifier: "V2ThreadItemsListResponse__ImageDetail" });
9427 +
9428 +export type V2ThreadItemsListResponse__HookPromptFragment = {
9429 + readonly hookRunId: string;
9430 + readonly text: string;
9431 +};
9432 +export const V2ThreadItemsListResponse__HookPromptFragment = Schema.Struct({
9433 + hookRunId: Schema.String,
9434 + text: Schema.String,
9435 +}).annotate({ identifier: "V2ThreadItemsListResponse__HookPromptFragment" });
9436 +
9437 +export type V2ThreadItemsListResponse__AgentMessageDelivery = "async";
9438 +export const V2ThreadItemsListResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
9439 + identifier: "V2ThreadItemsListResponse__AgentMessageDelivery",
9440 +});
9441 +
9442 +export type V2ThreadItemsListResponse__MemoryCitationEntry = {
9443 + readonly lineEnd: number;
9444 + readonly lineStart: number;
9445 + readonly note: string;
9446 + readonly path: string;
9447 +};
9448 +export const V2ThreadItemsListResponse__MemoryCitationEntry = Schema.Struct({
9449 + lineEnd: Schema.Number.annotate({ format: "uint32" })
9450 + .check(Schema.isInt().annotate({ expected: "an integer" }))
9451 + .check(
9452 + Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
9453 + ),
9454 + lineStart: Schema.Number.annotate({ format: "uint32" })
9455 + .check(Schema.isInt().annotate({ expected: "an integer" }))
9456 + .check(
9457 + Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
9458 + ),
9459 + note: Schema.String,
9460 + path: Schema.String,
9461 +}).annotate({ identifier: "V2ThreadItemsListResponse__MemoryCitationEntry" });
9462 +
9463 +export type V2ThreadItemsListResponse__MessagePhase = "commentary" | "final_answer";
9464 +export const V2ThreadItemsListResponse__MessagePhase = Schema.Union(
9465 + [
9466 + Schema.Literal("commentary").annotate({
9467 + description:
9468 + "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
9469 + }),
9470 + Schema.Literal("final_answer").annotate({
9471 + description: "The assistant's terminal answer text for the current turn.",
9472 + }),
9473 + ],
9474 + { mode: "oneOf" },
9475 +).annotate({
9476 + description:
9477 + '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.',
9478 + identifier: "V2ThreadItemsListResponse__MessagePhase",
9479 +});
9480 +
9481 +export type V2ThreadItemsListResponse__AsyncUserInputQuestion = {
9482 + readonly options?: ReadonlyArray<string> | null;
9483 + readonly title: string;
9484 +};
9485 +export const V2ThreadItemsListResponse__AsyncUserInputQuestion = Schema.Struct({
9486 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
9487 + title: Schema.String,
9488 +}).annotate({ identifier: "V2ThreadItemsListResponse__AsyncUserInputQuestion" });
9489 +
9490 +export type V2ThreadItemsListResponse__LegacyAppPathString = string;
9491 +export const V2ThreadItemsListResponse__LegacyAppPathString = Schema.String.annotate({
9492 + identifier: "V2ThreadItemsListResponse__LegacyAppPathString",
9493 +});
9494 +
9495 +export type V2ThreadItemsListResponse__CommandExecutionSource =
9496 + | "agent"
9497 + | "userShell"
9498 + | "unifiedExecStartup"
9499 + | "unifiedExecInteraction";
9500 +export const V2ThreadItemsListResponse__CommandExecutionSource = Schema.Literals([
9501 + "agent",
9502 + "userShell",
9503 + "unifiedExecStartup",
9504 + "unifiedExecInteraction",
9505 +]).annotate({ identifier: "V2ThreadItemsListResponse__CommandExecutionSource" });
9506 +
9507 +export type V2ThreadItemsListResponse__CommandExecutionStatus =
9508 + | "inProgress"
9509 + | "completed"
9510 + | "failed"
9511 + | "declined";
9512 +export const V2ThreadItemsListResponse__CommandExecutionStatus = Schema.Literals([
9513 + "inProgress",
9514 + "completed",
9515 + "failed",
9516 + "declined",
9517 +]).annotate({ identifier: "V2ThreadItemsListResponse__CommandExecutionStatus" });
9518 +
9519 +export type V2ThreadItemsListResponse__PatchChangeKind =
9520 + | { readonly type: "add" }
9521 + | { readonly type: "delete" }
9522 + | { readonly move_path?: string | null; readonly type: "update" };
9523 +export const V2ThreadItemsListResponse__PatchChangeKind = Schema.Union(
9524 + [
9525 + Schema.Struct({
9526 + type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
9527 + }).annotate({ title: "AddPatchChangeKind" }),
9528 + Schema.Struct({
9529 + type: Schema.Literal("delete").annotate({ title: "DeletePatchChangeKindType" }),
9530 + }).annotate({ title: "DeletePatchChangeKind" }),
9531 + Schema.Struct({
9532 + move_path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9533 + type: Schema.Literal("update").annotate({ title: "UpdatePatchChangeKindType" }),
9534 + }).annotate({ title: "UpdatePatchChangeKind" }),
9535 + ],
9536 + { mode: "oneOf" },
9537 +).annotate({ identifier: "V2ThreadItemsListResponse__PatchChangeKind" });
9538 +
9539 +export type V2ThreadItemsListResponse__PatchApplyStatus =
9540 + | "inProgress"
9541 + | "completed"
9542 + | "failed"
9543 + | "declined";
9544 +export const V2ThreadItemsListResponse__PatchApplyStatus = Schema.Literals([
9545 + "inProgress",
9546 + "completed",
9547 + "failed",
9548 + "declined",
9549 +]).annotate({ identifier: "V2ThreadItemsListResponse__PatchApplyStatus" });
9550 +
9551 +export type V2ThreadItemsListResponse__McpToolCallAppContext = {
9552 + readonly actionName?: string | null;
9553 + readonly appName?: string | null;
9554 + readonly connectorId: string;
9555 + readonly linkId?: string | null;
9556 + readonly resourceUri?: string | null;
9557 +};
9558 +export const V2ThreadItemsListResponse__McpToolCallAppContext = Schema.Struct({
9559 + actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9560 + appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9561 + connectorId: Schema.String,
9562 + linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9563 + resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9564 +}).annotate({ identifier: "V2ThreadItemsListResponse__McpToolCallAppContext" });
9565 +
9566 +export type V2ThreadItemsListResponse__McpToolCallError = { readonly message: string };
9567 +export const V2ThreadItemsListResponse__McpToolCallError = Schema.Struct({
9568 + message: Schema.String,
9569 +}).annotate({ identifier: "V2ThreadItemsListResponse__McpToolCallError" });
9570 +
9571 +export type V2ThreadItemsListResponse__McpAppDisplayMode = "inline" | "fullscreen";
9572 +export const V2ThreadItemsListResponse__McpAppDisplayMode = Schema.Literals([
9573 + "inline",
9574 + "fullscreen",
9575 +]).annotate({ identifier: "V2ThreadItemsListResponse__McpAppDisplayMode" });
9576 +
9577 +export type V2ThreadItemsListResponse__McpToolCallResult = {
9578 + readonly _meta?: Schema.Json;
9579 + readonly content: ReadonlyArray<Schema.Json>;
9580 + readonly structuredContent?: Schema.Json;
9581 +};
9582 +export const V2ThreadItemsListResponse__McpToolCallResult = Schema.Struct({
9583 + _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
9584 + content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
9585 + structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
9586 +}).annotate({ identifier: "V2ThreadItemsListResponse__McpToolCallResult" });
9587 +
9588 +export type V2ThreadItemsListResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
9589 +export const V2ThreadItemsListResponse__McpToolCallStatus = Schema.Literals([
9590 + "inProgress",
9591 + "completed",
9592 + "failed",
9593 +]).annotate({ identifier: "V2ThreadItemsListResponse__McpToolCallStatus" });
9594 +
9595 +export type V2ThreadItemsListResponse__DynamicToolCallOutputContentItem =
9596 + | { readonly text: string; readonly type: "inputText" }
9597 + | { readonly imageUrl: string; readonly type: "inputImage" }
9598 + | { readonly audioUrl: string; readonly type: "inputAudio" };
9599 +export const V2ThreadItemsListResponse__DynamicToolCallOutputContentItem = Schema.Union(
9600 + [
9601 + Schema.Struct({
9602 + text: Schema.String,
9603 + type: Schema.Literal("inputText").annotate({
9604 + title: "InputTextDynamicToolCallOutputContentItemType",
9605 + }),
9606 + }).annotate({ title: "InputTextDynamicToolCallOutputContentItem" }),
9607 + Schema.Struct({
9608 + imageUrl: Schema.String,
9609 + type: Schema.Literal("inputImage").annotate({
9610 + title: "InputImageDynamicToolCallOutputContentItemType",
9611 + }),
9612 + }).annotate({ title: "InputImageDynamicToolCallOutputContentItem" }),
9613 + Schema.Struct({
9614 + audioUrl: Schema.String,
9615 + type: Schema.Literal("inputAudio").annotate({
9616 + title: "InputAudioDynamicToolCallOutputContentItemType",
9617 + }),
9618 + }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
9619 + ],
9620 + { mode: "oneOf" },
9621 +).annotate({ identifier: "V2ThreadItemsListResponse__DynamicToolCallOutputContentItem" });
9622 +
9623 +export type V2ThreadItemsListResponse__DynamicToolCallStatus =
9624 + | "inProgress"
9625 + | "completed"
9626 + | "failed";
9627 +export const V2ThreadItemsListResponse__DynamicToolCallStatus = Schema.Literals([
9628 + "inProgress",
9629 + "completed",
9630 + "failed",
9631 +]).annotate({ identifier: "V2ThreadItemsListResponse__DynamicToolCallStatus" });
9632 +
9633 +export type V2ThreadItemsListResponse__CollabAgentStatus =
9634 + | "pendingInit"
9635 + | "running"
9636 + | "interrupted"
9637 + | "completed"
9638 + | "errored"
9639 + | "shutdown"
9640 + | "notFound";
9641 +export const V2ThreadItemsListResponse__CollabAgentStatus = Schema.Literals([
9642 + "pendingInit",
9643 + "running",
9644 + "interrupted",
9645 + "completed",
9646 + "errored",
9647 + "shutdown",
9648 + "notFound",
9649 +]).annotate({ identifier: "V2ThreadItemsListResponse__CollabAgentStatus" });
9650 +
9651 +export type V2ThreadItemsListResponse__ReasoningEffort = string;
9652 +export const V2ThreadItemsListResponse__ReasoningEffort = Schema.String.annotate({
9653 + description: "A non-empty reasoning effort value advertised by the model.",
9654 +}).check(
9655 + Schema.isMinLength(1).annotate({
9656 + expected: "a value with a length of at least 1",
9657 + identifier: "V2ThreadItemsListResponse__ReasoningEffort",
9658 + }),
9659 +);
9660 +
9661 +export type V2ThreadItemsListResponse__CollabAgentToolCallStatus =
9662 + | "inProgress"
9663 + | "completed"
9664 + | "failed"
9665 + | "interrupted";
9666 +export const V2ThreadItemsListResponse__CollabAgentToolCallStatus = Schema.Literals([
9667 + "inProgress",
9668 + "completed",
9669 + "failed",
9670 + "interrupted",
9671 +]).annotate({ identifier: "V2ThreadItemsListResponse__CollabAgentToolCallStatus" });
9672 +
9673 +export type V2ThreadItemsListResponse__CollabAgentTool =
9674 + | "spawnAgent"
9675 + | "sendInput"
9676 + | "resumeAgent"
9677 + | "wait"
9678 + | "closeAgent"
9679 + | "sendMessage"
9680 + | "followupTask"
9681 + | "interruptAgent"
9682 + | "listAgents";
9683 +export const V2ThreadItemsListResponse__CollabAgentTool = Schema.Literals([
9684 + "spawnAgent",
9685 + "sendInput",
9686 + "resumeAgent",
9687 + "wait",
9688 + "closeAgent",
9689 + "sendMessage",
9690 + "followupTask",
9691 + "interruptAgent",
9692 + "listAgents",
9693 +]).annotate({ identifier: "V2ThreadItemsListResponse__CollabAgentTool" });
9694 +
9695 +export type V2ThreadItemsListResponse__SubAgentActivityKind =
9696 + | "started"
9697 + | "interacted"
9698 + | "interrupted"
9699 + | "completed";
9700 +export const V2ThreadItemsListResponse__SubAgentActivityKind = Schema.Literals([
9701 + "started",
9702 + "interacted",
9703 + "interrupted",
9704 + "completed",
9705 +]).annotate({ identifier: "V2ThreadItemsListResponse__SubAgentActivityKind" });
9706 +
9707 +export type V2ThreadItemsListResponse__WebSearchAction =
9708 + | {
9709 + readonly queries?: ReadonlyArray<string> | null;
9710 + readonly query?: string | null;
9711 + readonly type: "search";
9712 + }
9713 + | { readonly type: "openPage"; readonly url?: string | null }
9714 + | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
9715 + | { readonly type: "other" };
9716 +export const V2ThreadItemsListResponse__WebSearchAction = Schema.Union(
9717 + [
9718 + Schema.Struct({
9719 + queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
9720 + query: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9721 + type: Schema.Literal("search").annotate({ title: "SearchWebSearchActionType" }),
9722 + }).annotate({ title: "SearchWebSearchAction" }),
9723 + Schema.Struct({
9724 + type: Schema.Literal("openPage").annotate({ title: "OpenPageWebSearchActionType" }),
9725 + url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9726 + }).annotate({ title: "OpenPageWebSearchAction" }),
9727 + Schema.Struct({
9728 + pattern: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9729 + type: Schema.Literal("findInPage").annotate({ title: "FindInPageWebSearchActionType" }),
9730 + url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9731 + }).annotate({ title: "FindInPageWebSearchAction" }),
9732 + Schema.Struct({
9733 + type: Schema.Literal("other").annotate({ title: "OtherWebSearchActionType" }),
9734 + }).annotate({ title: "OtherWebSearchAction" }),
9735 + ],
9736 + { mode: "oneOf" },
9737 +).annotate({ identifier: "V2ThreadItemsListResponse__WebSearchAction" });
9738 +
9739 +export type V2ThreadItemsListResponse__ImageGenerationFailure = {
9740 + readonly limitId: string;
9741 + readonly resetsAt?: number | null;
9742 + readonly type: "usageLimitExceeded";
9743 +};
9744 +export const V2ThreadItemsListResponse__ImageGenerationFailure = Schema.Union(
9745 + [
9746 + Schema.Struct({
9747 + limitId: Schema.String,
9748 + resetsAt: Schema.optionalKey(
9749 + Schema.Union([
9750 + Schema.Number.annotate({ format: "int64" }).check(
9751 + Schema.isInt().annotate({ expected: "an integer" }),
9752 + ),
9753 + Schema.Null,
9754 + ]),
9755 + ),
9756 + type: Schema.Literal("usageLimitExceeded").annotate({
9757 + title: "UsageLimitExceededImageGenerationFailureType",
9758 + }),
9759 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
9760 + ],
9761 + { mode: "oneOf" },
9762 +).annotate({ identifier: "V2ThreadItemsListResponse__ImageGenerationFailure" });
9763 +
9764 +export type V2ThreadItemsListResponse__AbsolutePathBuf = string;
9765 +export const V2ThreadItemsListResponse__AbsolutePathBuf = Schema.String.annotate({
9766 + description:
9767 + "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.",
9768 + identifier: "V2ThreadItemsListResponse__AbsolutePathBuf",
9769 +});
9770 +
9771 export type V2ThreadListParams__ThreadListCwdFilter = string | ReadonlyArray<string>;
9772 export const V2ThreadListParams__ThreadListCwdFilter = Schema.Union([
9773 Schema.String,
@@ -8207,11 +9779,16 @@ export const V2ThreadListParams__SortDirection = Schema.Literals(["asc", "desc"]
9779 identifier: "V2ThreadListParams__SortDirection",
9780 });
9781
8210 -export type V2ThreadListParams__ThreadSortKey = "created_at" | "updated_at" | "recency_at";
9782 +export type V2ThreadListParams__ThreadSortKey =
9783 + | "created_at"
9784 + | "updated_at"
9785 + | "recency_at"
9786 + | "section_position";
9787 export const V2ThreadListParams__ThreadSortKey = Schema.Literals([
9788 "created_at",
9789 "updated_at",
9790 "recency_at",
9791 + "section_position",
9792 ]).annotate({ identifier: "V2ThreadListParams__ThreadSortKey" });
9793
9794 export type V2ThreadListParams__ThreadSourceKind =
@@ -8256,6 +9833,34 @@ export const V2ThreadListResponse__GitInfo = Schema.Struct({
9833 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9834 }).annotate({ identifier: "V2ThreadListResponse__GitInfo" });
9835
9836 +export type V2ThreadListResponse__ThreadHistoryMode = "legacy" | "paginated";
9837 +export const V2ThreadListResponse__ThreadHistoryMode = Schema.Literals([
9838 + "legacy",
9839 + "paginated",
9840 +]).annotate({ identifier: "V2ThreadListResponse__ThreadHistoryMode" });
9841 +
9842 +export type V2ThreadListResponse__ReasoningEffort = string;
9843 +export const V2ThreadListResponse__ReasoningEffort = Schema.String.annotate({
9844 + description: "A non-empty reasoning effort value advertised by the model.",
9845 +}).check(
9846 + Schema.isMinLength(1).annotate({
9847 + expected: "a value with a length of at least 1",
9848 + identifier: "V2ThreadListResponse__ReasoningEffort",
9849 + }),
9850 +);
9851 +
9852 +export type V2ThreadListResponse__ThreadSectionAppearance = {
9853 + readonly color?: string | null;
9854 + readonly icon?: string | null;
9855 +};
9856 +export const V2ThreadListResponse__ThreadSectionAppearance = Schema.Struct({
9857 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9858 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
9859 +}).annotate({
9860 + description: "Extensible visual presentation for a custom thread section.",
9861 + identifier: "V2ThreadListResponse__ThreadSectionAppearance",
9862 +});
9863 +
9864 export type V2ThreadListResponse__AgentPath = string;
9865 export const V2ThreadListResponse__AgentPath = Schema.String.annotate({
9866 identifier: "V2ThreadListResponse__AgentPath",
@@ -8283,6 +9888,11 @@ export const V2ThreadListResponse__NonSteerableTurnKind = Schema.Literals([
9888 "compact",
9889 ]).annotate({ identifier: "V2ThreadListResponse__NonSteerableTurnKind" });
9890
9891 +export type V2ThreadListResponse__MisalignmentSteer = { readonly message: string };
9892 +export const V2ThreadListResponse__MisalignmentSteer = Schema.Struct({
9893 + message: Schema.String,
9894 +}).annotate({ identifier: "V2ThreadListResponse__MisalignmentSteer" });
9895 +
9896 export type V2ThreadListResponse__ByteRange = { readonly end: number; readonly start: number };
9897 export const V2ThreadListResponse__ByteRange = Schema.Struct({
9898 end: Schema.Number.annotate({ format: "uint" })
@@ -8314,6 +9924,11 @@ export const V2ThreadListResponse__HookPromptFragment = Schema.Struct({
9924 text: Schema.String,
9925 }).annotate({ identifier: "V2ThreadListResponse__HookPromptFragment" });
9926
9927 +export type V2ThreadListResponse__AgentMessageDelivery = "async";
9928 +export const V2ThreadListResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
9929 + identifier: "V2ThreadListResponse__AgentMessageDelivery",
9930 +});
9931 +
9932 export type V2ThreadListResponse__MemoryCitationEntry = {
9933 readonly lineEnd: number;
9934 readonly lineStart: number;
@@ -8353,6 +9968,15 @@ export const V2ThreadListResponse__MessagePhase = Schema.Union(
9968 identifier: "V2ThreadListResponse__MessagePhase",
9969 });
9970
9971 +export type V2ThreadListResponse__AsyncUserInputQuestion = {
9972 + readonly options?: ReadonlyArray<string> | null;
9973 + readonly title: string;
9974 +};
9975 +export const V2ThreadListResponse__AsyncUserInputQuestion = Schema.Struct({
9976 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
9977 + title: Schema.String,
9978 +}).annotate({ identifier: "V2ThreadListResponse__AsyncUserInputQuestion" });
9979 +
9980 export type V2ThreadListResponse__LegacyAppPathString = string;
9981 export const V2ThreadListResponse__LegacyAppPathString = Schema.String.annotate({
9982 identifier: "V2ThreadListResponse__LegacyAppPathString",
@@ -8434,6 +10058,12 @@ export const V2ThreadListResponse__McpToolCallError = Schema.Struct({
10058 message: Schema.String,
10059 }).annotate({ identifier: "V2ThreadListResponse__McpToolCallError" });
10060
10061 +export type V2ThreadListResponse__McpAppDisplayMode = "inline" | "fullscreen";
10062 +export const V2ThreadListResponse__McpAppDisplayMode = Schema.Literals([
10063 + "inline",
10064 + "fullscreen",
10065 +]).annotate({ identifier: "V2ThreadListResponse__McpAppDisplayMode" });
10066 +
10067 export type V2ThreadListResponse__McpToolCallResult = {
10068 readonly _meta?: Schema.Json;
10069 readonly content: ReadonlyArray<Schema.Json>;
@@ -8505,16 +10135,6 @@ export const V2ThreadListResponse__CollabAgentStatus = Schema.Literals([
10135 "notFound",
10136 ]).annotate({ identifier: "V2ThreadListResponse__CollabAgentStatus" });
10137
8508 -export type V2ThreadListResponse__ReasoningEffort = string;
8509 -export const V2ThreadListResponse__ReasoningEffort = Schema.String.annotate({
8510 - description: "A non-empty reasoning effort value advertised by the model.",
8511 -}).check(
8512 - Schema.isMinLength(1).annotate({
8513 - expected: "a value with a length of at least 1",
8514 - identifier: "V2ThreadListResponse__ReasoningEffort",
8515 - }),
8516 -);
8517 -
10138 export type V2ThreadListResponse__CollabAgentToolCallStatus =
10139 | "inProgress"
10140 | "completed"
@@ -8593,6 +10213,31 @@ export const V2ThreadListResponse__WebSearchAction = Schema.Union(
10213 { mode: "oneOf" },
10214 ).annotate({ identifier: "V2ThreadListResponse__WebSearchAction" });
10215
10216 +export type V2ThreadListResponse__ImageGenerationFailure = {
10217 + readonly limitId: string;
10218 + readonly resetsAt?: number | null;
10219 + readonly type: "usageLimitExceeded";
10220 +};
10221 +export const V2ThreadListResponse__ImageGenerationFailure = Schema.Union(
10222 + [
10223 + Schema.Struct({
10224 + limitId: Schema.String,
10225 + resetsAt: Schema.optionalKey(
10226 + Schema.Union([
10227 + Schema.Number.annotate({ format: "int64" }).check(
10228 + Schema.isInt().annotate({ expected: "an integer" }),
10229 + ),
10230 + Schema.Null,
10231 + ]),
10232 + ),
10233 + type: Schema.Literal("usageLimitExceeded").annotate({
10234 + title: "UsageLimitExceededImageGenerationFailureType",
10235 + }),
10236 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
10237 + ],
10238 + { mode: "oneOf" },
10239 +).annotate({ identifier: "V2ThreadListResponse__ImageGenerationFailure" });
10240 +
10241 export type V2ThreadListResponse__TurnItemsView = "notLoaded" | "summary" | "full";
10242 export const V2ThreadListResponse__TurnItemsView = Schema.Union(
10243 [
@@ -8675,6 +10320,34 @@ export const V2ThreadMetadataUpdateResponse__GitInfo = Schema.Struct({
10320 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10321 }).annotate({ identifier: "V2ThreadMetadataUpdateResponse__GitInfo" });
10322
10323 +export type V2ThreadMetadataUpdateResponse__ThreadHistoryMode = "legacy" | "paginated";
10324 +export const V2ThreadMetadataUpdateResponse__ThreadHistoryMode = Schema.Literals([
10325 + "legacy",
10326 + "paginated",
10327 +]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__ThreadHistoryMode" });
10328 +
10329 +export type V2ThreadMetadataUpdateResponse__ReasoningEffort = string;
10330 +export const V2ThreadMetadataUpdateResponse__ReasoningEffort = Schema.String.annotate({
10331 + description: "A non-empty reasoning effort value advertised by the model.",
10332 +}).check(
10333 + Schema.isMinLength(1).annotate({
10334 + expected: "a value with a length of at least 1",
10335 + identifier: "V2ThreadMetadataUpdateResponse__ReasoningEffort",
10336 + }),
10337 +);
10338 +
10339 +export type V2ThreadMetadataUpdateResponse__ThreadSectionAppearance = {
10340 + readonly color?: string | null;
10341 + readonly icon?: string | null;
10342 +};
10343 +export const V2ThreadMetadataUpdateResponse__ThreadSectionAppearance = Schema.Struct({
10344 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10345 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10346 +}).annotate({
10347 + description: "Extensible visual presentation for a custom thread section.",
10348 + identifier: "V2ThreadMetadataUpdateResponse__ThreadSectionAppearance",
10349 +});
10350 +
10351 export type V2ThreadMetadataUpdateResponse__AgentPath = string;
10352 export const V2ThreadMetadataUpdateResponse__AgentPath = Schema.String.annotate({
10353 identifier: "V2ThreadMetadataUpdateResponse__AgentPath",
@@ -8704,6 +10377,11 @@ export const V2ThreadMetadataUpdateResponse__NonSteerableTurnKind = Schema.Liter
10377 "compact",
10378 ]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__NonSteerableTurnKind" });
10379
10380 +export type V2ThreadMetadataUpdateResponse__MisalignmentSteer = { readonly message: string };
10381 +export const V2ThreadMetadataUpdateResponse__MisalignmentSteer = Schema.Struct({
10382 + message: Schema.String,
10383 +}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__MisalignmentSteer" });
10384 +
10385 export type V2ThreadMetadataUpdateResponse__ByteRange = {
10386 readonly end: number;
10387 readonly start: number;
@@ -8738,6 +10416,11 @@ export const V2ThreadMetadataUpdateResponse__HookPromptFragment = Schema.Struct(
10416 text: Schema.String,
10417 }).annotate({ identifier: "V2ThreadMetadataUpdateResponse__HookPromptFragment" });
10418
10419 +export type V2ThreadMetadataUpdateResponse__AgentMessageDelivery = "async";
10420 +export const V2ThreadMetadataUpdateResponse__AgentMessageDelivery = Schema.Literal(
10421 + "async",
10422 +).annotate({ identifier: "V2ThreadMetadataUpdateResponse__AgentMessageDelivery" });
10423 +
10424 export type V2ThreadMetadataUpdateResponse__MemoryCitationEntry = {
10425 readonly lineEnd: number;
10426 readonly lineStart: number;
@@ -8777,6 +10460,15 @@ export const V2ThreadMetadataUpdateResponse__MessagePhase = Schema.Union(
10460 identifier: "V2ThreadMetadataUpdateResponse__MessagePhase",
10461 });
10462
10463 +export type V2ThreadMetadataUpdateResponse__AsyncUserInputQuestion = {
10464 + readonly options?: ReadonlyArray<string> | null;
10465 + readonly title: string;
10466 +};
10467 +export const V2ThreadMetadataUpdateResponse__AsyncUserInputQuestion = Schema.Struct({
10468 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
10469 + title: Schema.String,
10470 +}).annotate({ identifier: "V2ThreadMetadataUpdateResponse__AsyncUserInputQuestion" });
10471 +
10472 export type V2ThreadMetadataUpdateResponse__LegacyAppPathString = string;
10473 export const V2ThreadMetadataUpdateResponse__LegacyAppPathString = Schema.String.annotate({
10474 identifier: "V2ThreadMetadataUpdateResponse__LegacyAppPathString",
@@ -8858,6 +10550,12 @@ export const V2ThreadMetadataUpdateResponse__McpToolCallError = Schema.Struct({
10550 message: Schema.String,
10551 }).annotate({ identifier: "V2ThreadMetadataUpdateResponse__McpToolCallError" });
10552
10553 +export type V2ThreadMetadataUpdateResponse__McpAppDisplayMode = "inline" | "fullscreen";
10554 +export const V2ThreadMetadataUpdateResponse__McpAppDisplayMode = Schema.Literals([
10555 + "inline",
10556 + "fullscreen",
10557 +]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__McpAppDisplayMode" });
10558 +
10559 export type V2ThreadMetadataUpdateResponse__McpToolCallResult = {
10560 readonly _meta?: Schema.Json;
10561 readonly content: ReadonlyArray<Schema.Json>;
@@ -8935,16 +10633,6 @@ export const V2ThreadMetadataUpdateResponse__CollabAgentStatus = Schema.Literals
10633 "notFound",
10634 ]).annotate({ identifier: "V2ThreadMetadataUpdateResponse__CollabAgentStatus" });
10635
8938 -export type V2ThreadMetadataUpdateResponse__ReasoningEffort = string;
8939 -export const V2ThreadMetadataUpdateResponse__ReasoningEffort = Schema.String.annotate({
8940 - description: "A non-empty reasoning effort value advertised by the model.",
8941 -}).check(
8942 - Schema.isMinLength(1).annotate({
8943 - expected: "a value with a length of at least 1",
8944 - identifier: "V2ThreadMetadataUpdateResponse__ReasoningEffort",
8945 - }),
8946 -);
8947 -
10636 export type V2ThreadMetadataUpdateResponse__CollabAgentToolCallStatus =
10637 | "inProgress"
10638 | "completed"
@@ -9023,6 +10711,31 @@ export const V2ThreadMetadataUpdateResponse__WebSearchAction = Schema.Union(
10711 { mode: "oneOf" },
10712 ).annotate({ identifier: "V2ThreadMetadataUpdateResponse__WebSearchAction" });
10713
10714 +export type V2ThreadMetadataUpdateResponse__ImageGenerationFailure = {
10715 + readonly limitId: string;
10716 + readonly resetsAt?: number | null;
10717 + readonly type: "usageLimitExceeded";
10718 +};
10719 +export const V2ThreadMetadataUpdateResponse__ImageGenerationFailure = Schema.Union(
10720 + [
10721 + Schema.Struct({
10722 + limitId: Schema.String,
10723 + resetsAt: Schema.optionalKey(
10724 + Schema.Union([
10725 + Schema.Number.annotate({ format: "int64" }).check(
10726 + Schema.isInt().annotate({ expected: "an integer" }),
10727 + ),
10728 + Schema.Null,
10729 + ]),
10730 + ),
10731 + type: Schema.Literal("usageLimitExceeded").annotate({
10732 + title: "UsageLimitExceededImageGenerationFailureType",
10733 + }),
10734 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
10735 + ],
10736 + { mode: "oneOf" },
10737 +).annotate({ identifier: "V2ThreadMetadataUpdateResponse__ImageGenerationFailure" });
10738 +
10739 export type V2ThreadMetadataUpdateResponse__TurnItemsView = "notLoaded" | "summary" | "full";
10740 export const V2ThreadMetadataUpdateResponse__TurnItemsView = Schema.Union(
10741 [
@@ -9070,6 +10783,34 @@ export const V2ThreadReadResponse__GitInfo = Schema.Struct({
10783 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10784 }).annotate({ identifier: "V2ThreadReadResponse__GitInfo" });
10785
10786 +export type V2ThreadReadResponse__ThreadHistoryMode = "legacy" | "paginated";
10787 +export const V2ThreadReadResponse__ThreadHistoryMode = Schema.Literals([
10788 + "legacy",
10789 + "paginated",
10790 +]).annotate({ identifier: "V2ThreadReadResponse__ThreadHistoryMode" });
10791 +
10792 +export type V2ThreadReadResponse__ReasoningEffort = string;
10793 +export const V2ThreadReadResponse__ReasoningEffort = Schema.String.annotate({
10794 + description: "A non-empty reasoning effort value advertised by the model.",
10795 +}).check(
10796 + Schema.isMinLength(1).annotate({
10797 + expected: "a value with a length of at least 1",
10798 + identifier: "V2ThreadReadResponse__ReasoningEffort",
10799 + }),
10800 +);
10801 +
10802 +export type V2ThreadReadResponse__ThreadSectionAppearance = {
10803 + readonly color?: string | null;
10804 + readonly icon?: string | null;
10805 +};
10806 +export const V2ThreadReadResponse__ThreadSectionAppearance = Schema.Struct({
10807 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10808 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10809 +}).annotate({
10810 + description: "Extensible visual presentation for a custom thread section.",
10811 + identifier: "V2ThreadReadResponse__ThreadSectionAppearance",
10812 +});
10813 +
10814 export type V2ThreadReadResponse__AgentPath = string;
10815 export const V2ThreadReadResponse__AgentPath = Schema.String.annotate({
10816 identifier: "V2ThreadReadResponse__AgentPath",
@@ -9097,6 +10838,11 @@ export const V2ThreadReadResponse__NonSteerableTurnKind = Schema.Literals([
10838 "compact",
10839 ]).annotate({ identifier: "V2ThreadReadResponse__NonSteerableTurnKind" });
10840
10841 +export type V2ThreadReadResponse__MisalignmentSteer = { readonly message: string };
10842 +export const V2ThreadReadResponse__MisalignmentSteer = Schema.Struct({
10843 + message: Schema.String,
10844 +}).annotate({ identifier: "V2ThreadReadResponse__MisalignmentSteer" });
10845 +
10846 export type V2ThreadReadResponse__ByteRange = { readonly end: number; readonly start: number };
10847 export const V2ThreadReadResponse__ByteRange = Schema.Struct({
10848 end: Schema.Number.annotate({ format: "uint" })
@@ -9128,6 +10874,11 @@ export const V2ThreadReadResponse__HookPromptFragment = Schema.Struct({
10874 text: Schema.String,
10875 }).annotate({ identifier: "V2ThreadReadResponse__HookPromptFragment" });
10876
10877 +export type V2ThreadReadResponse__AgentMessageDelivery = "async";
10878 +export const V2ThreadReadResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
10879 + identifier: "V2ThreadReadResponse__AgentMessageDelivery",
10880 +});
10881 +
10882 export type V2ThreadReadResponse__MemoryCitationEntry = {
10883 readonly lineEnd: number;
10884 readonly lineStart: number;
@@ -9167,6 +10918,15 @@ export const V2ThreadReadResponse__MessagePhase = Schema.Union(
10918 identifier: "V2ThreadReadResponse__MessagePhase",
10919 });
10920
10921 +export type V2ThreadReadResponse__AsyncUserInputQuestion = {
10922 + readonly options?: ReadonlyArray<string> | null;
10923 + readonly title: string;
10924 +};
10925 +export const V2ThreadReadResponse__AsyncUserInputQuestion = Schema.Struct({
10926 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
10927 + title: Schema.String,
10928 +}).annotate({ identifier: "V2ThreadReadResponse__AsyncUserInputQuestion" });
10929 +
10930 export type V2ThreadReadResponse__LegacyAppPathString = string;
10931 export const V2ThreadReadResponse__LegacyAppPathString = Schema.String.annotate({
10932 identifier: "V2ThreadReadResponse__LegacyAppPathString",
@@ -9248,6 +11008,12 @@ export const V2ThreadReadResponse__McpToolCallError = Schema.Struct({
11008 message: Schema.String,
11009 }).annotate({ identifier: "V2ThreadReadResponse__McpToolCallError" });
11010
11011 +export type V2ThreadReadResponse__McpAppDisplayMode = "inline" | "fullscreen";
11012 +export const V2ThreadReadResponse__McpAppDisplayMode = Schema.Literals([
11013 + "inline",
11014 + "fullscreen",
11015 +]).annotate({ identifier: "V2ThreadReadResponse__McpAppDisplayMode" });
11016 +
11017 export type V2ThreadReadResponse__McpToolCallResult = {
11018 readonly _meta?: Schema.Json;
11019 readonly content: ReadonlyArray<Schema.Json>;
@@ -9319,16 +11085,6 @@ export const V2ThreadReadResponse__CollabAgentStatus = Schema.Literals([
11085 "notFound",
11086 ]).annotate({ identifier: "V2ThreadReadResponse__CollabAgentStatus" });
11087
9322 -export type V2ThreadReadResponse__ReasoningEffort = string;
9323 -export const V2ThreadReadResponse__ReasoningEffort = Schema.String.annotate({
9324 - description: "A non-empty reasoning effort value advertised by the model.",
9325 -}).check(
9326 - Schema.isMinLength(1).annotate({
9327 - expected: "a value with a length of at least 1",
9328 - identifier: "V2ThreadReadResponse__ReasoningEffort",
9329 - }),
9330 -);
9331 -
11088 export type V2ThreadReadResponse__CollabAgentToolCallStatus =
11089 | "inProgress"
11090 | "completed"
@@ -9407,6 +11163,31 @@ export const V2ThreadReadResponse__WebSearchAction = Schema.Union(
11163 { mode: "oneOf" },
11164 ).annotate({ identifier: "V2ThreadReadResponse__WebSearchAction" });
11165
11166 +export type V2ThreadReadResponse__ImageGenerationFailure = {
11167 + readonly limitId: string;
11168 + readonly resetsAt?: number | null;
11169 + readonly type: "usageLimitExceeded";
11170 +};
11171 +export const V2ThreadReadResponse__ImageGenerationFailure = Schema.Union(
11172 + [
11173 + Schema.Struct({
11174 + limitId: Schema.String,
11175 + resetsAt: Schema.optionalKey(
11176 + Schema.Union([
11177 + Schema.Number.annotate({ format: "int64" }).check(
11178 + Schema.isInt().annotate({ expected: "an integer" }),
11179 + ),
11180 + Schema.Null,
11181 + ]),
11182 + ),
11183 + type: Schema.Literal("usageLimitExceeded").annotate({
11184 + title: "UsageLimitExceededImageGenerationFailureType",
11185 + }),
11186 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
11187 + ],
11188 + { mode: "oneOf" },
11189 +).annotate({ identifier: "V2ThreadReadResponse__ImageGenerationFailure" });
11190 +
11191 export type V2ThreadReadResponse__TurnItemsView = "notLoaded" | "summary" | "full";
11192 export const V2ThreadReadResponse__TurnItemsView = Schema.Union(
11193 [
@@ -9436,6 +11217,110 @@ export const V2ThreadReadResponse__TurnStatus = Schema.Literals([
11217 "inProgress",
11218 ]).annotate({ identifier: "V2ThreadReadResponse__TurnStatus" });
11219
11220 +export type V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeTranscriptRole =
11221 + | "user"
11222 + | "assistant";
11223 +export const V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeTranscriptRole =
11224 + Schema.Literals(["user", "assistant"]).annotate({
11225 + identifier: "V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeTranscriptRole",
11226 + });
11227 +
11228 +export type V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeBemItemPresentation =
11229 + | { readonly type: "wholeItem" }
11230 + | { readonly type: "inlineMarkdown" }
11231 + | { readonly index: number; readonly type: "inlineVisualization" };
11232 +export const V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeBemItemPresentation =
11233 + Schema.Union(
11234 + [
11235 + Schema.Struct({
11236 + type: Schema.Literal("wholeItem").annotate({
11237 + title: "WholeItemThreadRealtimeBemItemPresentationType",
11238 + }),
11239 + }).annotate({ title: "WholeItemThreadRealtimeBemItemPresentation" }),
11240 + Schema.Struct({
11241 + type: Schema.Literal("inlineMarkdown").annotate({
11242 + title: "InlineMarkdownThreadRealtimeBemItemPresentationType",
11243 + }),
11244 + }).annotate({ title: "InlineMarkdownThreadRealtimeBemItemPresentation" }),
11245 + Schema.Struct({
11246 + index: Schema.Number.annotate({ format: "uint32" })
11247 + .check(Schema.isInt().annotate({ expected: "an integer" }))
11248 + .check(
11249 + Schema.isGreaterThanOrEqualTo(0).annotate({
11250 + expected: "a value greater than or equal to 0",
11251 + }),
11252 + ),
11253 + type: Schema.Literal("inlineVisualization").annotate({
11254 + title: "InlineVisualizationThreadRealtimeBemItemPresentationType",
11255 + }),
11256 + }).annotate({ title: "InlineVisualizationThreadRealtimeBemItemPresentation" }),
11257 + ],
11258 + { mode: "oneOf" },
11259 + ).annotate({
11260 + description: "EXPERIMENTAL - how an existing agent item appears in a realtime conversation.",
11261 + identifier: "V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeBemItemPresentation",
11262 + });
11263 +
11264 +export type V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeSessionOutcome =
11265 + | "ended"
11266 + | "failed";
11267 +export const V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeSessionOutcome =
11268 + Schema.Literals(["ended", "failed"]).annotate({
11269 + identifier: "V2ThreadRealtimeItemCompletedNotification__ThreadRealtimeSessionOutcome",
11270 + });
11271 +
11272 +export type V2ThreadRealtimeItemStartedNotification__ThreadRealtimeTranscriptRole =
11273 + | "user"
11274 + | "assistant";
11275 +export const V2ThreadRealtimeItemStartedNotification__ThreadRealtimeTranscriptRole =
11276 + Schema.Literals(["user", "assistant"]).annotate({
11277 + identifier: "V2ThreadRealtimeItemStartedNotification__ThreadRealtimeTranscriptRole",
11278 + });
11279 +
11280 +export type V2ThreadRealtimeItemStartedNotification__ThreadRealtimeBemItemPresentation =
11281 + | { readonly type: "wholeItem" }
11282 + | { readonly type: "inlineMarkdown" }
11283 + | { readonly index: number; readonly type: "inlineVisualization" };
11284 +export const V2ThreadRealtimeItemStartedNotification__ThreadRealtimeBemItemPresentation =
11285 + Schema.Union(
11286 + [
11287 + Schema.Struct({
11288 + type: Schema.Literal("wholeItem").annotate({
11289 + title: "WholeItemThreadRealtimeBemItemPresentationType",
11290 + }),
11291 + }).annotate({ title: "WholeItemThreadRealtimeBemItemPresentation" }),
11292 + Schema.Struct({
11293 + type: Schema.Literal("inlineMarkdown").annotate({
11294 + title: "InlineMarkdownThreadRealtimeBemItemPresentationType",
11295 + }),
11296 + }).annotate({ title: "InlineMarkdownThreadRealtimeBemItemPresentation" }),
11297 + Schema.Struct({
11298 + index: Schema.Number.annotate({ format: "uint32" })
11299 + .check(Schema.isInt().annotate({ expected: "an integer" }))
11300 + .check(
11301 + Schema.isGreaterThanOrEqualTo(0).annotate({
11302 + expected: "a value greater than or equal to 0",
11303 + }),
11304 + ),
11305 + type: Schema.Literal("inlineVisualization").annotate({
11306 + title: "InlineVisualizationThreadRealtimeBemItemPresentationType",
11307 + }),
11308 + }).annotate({ title: "InlineVisualizationThreadRealtimeBemItemPresentation" }),
11309 + ],
11310 + { mode: "oneOf" },
11311 + ).annotate({
11312 + description: "EXPERIMENTAL - how an existing agent item appears in a realtime conversation.",
11313 + identifier: "V2ThreadRealtimeItemStartedNotification__ThreadRealtimeBemItemPresentation",
11314 + });
11315 +
11316 +export type V2ThreadRealtimeItemStartedNotification__ThreadRealtimeSessionOutcome =
11317 + | "ended"
11318 + | "failed";
11319 +export const V2ThreadRealtimeItemStartedNotification__ThreadRealtimeSessionOutcome =
11320 + Schema.Literals(["ended", "failed"]).annotate({
11321 + identifier: "V2ThreadRealtimeItemStartedNotification__ThreadRealtimeSessionOutcome",
11322 + });
11323 +
11324 export type V2ThreadRealtimeOutputAudioDeltaNotification__ThreadRealtimeAudioChunk = {
11325 readonly data: string;
11326 readonly itemId?: string | null;
@@ -9531,7 +11416,10 @@ export const V2ThreadResumeParams__Personality = Schema.Literals([
11416 "none",
11417 "friendly",
11418 "pragmatic",
9534 -]).annotate({ identifier: "V2ThreadResumeParams__Personality" });
11419 +]).annotate({
11420 + description: "Deprecated: `friendly` and `pragmatic` no longer select a style.",
11421 + identifier: "V2ThreadResumeParams__Personality",
11422 +});
11423
11424 export type V2ThreadResumeParams__SandboxMode =
11425 | "read-only"
@@ -9543,6 +11431,16 @@ export const V2ThreadResumeParams__SandboxMode = Schema.Literals([
11431 "danger-full-access",
11432 ]).annotate({ identifier: "V2ThreadResumeParams__SandboxMode" });
11433
11434 +export type V2ThreadResumeParams__ReasoningEffort = string;
11435 +export const V2ThreadResumeParams__ReasoningEffort = Schema.String.annotate({
11436 + description: "A non-empty reasoning effort value advertised by the model.",
11437 +}).check(
11438 + Schema.isMinLength(1).annotate({
11439 + expected: "a value with a length of at least 1",
11440 + identifier: "V2ThreadResumeParams__ReasoningEffort",
11441 + }),
11442 +);
11443 +
11444 export type V2ThreadResumeParams__ImageDetail = "auto" | "low" | "high" | "original";
11445 export const V2ThreadResumeParams__ImageDetail = Schema.Literals([
11446 "auto",
@@ -9783,16 +11681,10 @@ export const V2ThreadResumeResponse__ApprovalsReviewer = Schema.Literals([
11681 identifier: "V2ThreadResumeResponse__ApprovalsReviewer",
11682 });
11683
9786 -export type V2ThreadResumeResponse__AbsolutePathBuf = string;
9787 -export const V2ThreadResumeResponse__AbsolutePathBuf = Schema.String.annotate({
9788 - description:
9789 - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
9790 - identifier: "V2ThreadResumeResponse__AbsolutePathBuf",
9791 -});
9792 -
9793 -export type V2ThreadResumeResponse__LegacyAppPathString = string;
9794 -export const V2ThreadResumeResponse__LegacyAppPathString = Schema.String.annotate({
9795 - identifier: "V2ThreadResumeResponse__LegacyAppPathString",
11684 +export type V2ThreadResumeResponse__ModeKind = "plan" | "default";
11685 +export const V2ThreadResumeResponse__ModeKind = Schema.Literals(["plan", "default"]).annotate({
11686 + description: "Initial collaboration mode to use when the TUI starts.",
11687 + identifier: "V2ThreadResumeResponse__ModeKind",
11688 });
11689
11690 export type V2ThreadResumeResponse__ReasoningEffort = string;
@@ -9805,6 +11697,18 @@ export const V2ThreadResumeResponse__ReasoningEffort = Schema.String.annotate({
11697 }),
11698 );
11699
11700 +export type V2ThreadResumeResponse__AbsolutePathBuf = string;
11701 +export const V2ThreadResumeResponse__AbsolutePathBuf = Schema.String.annotate({
11702 + description:
11703 + "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.",
11704 + identifier: "V2ThreadResumeResponse__AbsolutePathBuf",
11705 +});
11706 +
11707 +export type V2ThreadResumeResponse__LegacyAppPathString = string;
11708 +export const V2ThreadResumeResponse__LegacyAppPathString = Schema.String.annotate({
11709 + identifier: "V2ThreadResumeResponse__LegacyAppPathString",
11710 +});
11711 +
11712 export type V2ThreadResumeResponse__NetworkAccess = "restricted" | "enabled";
11713 export const V2ThreadResumeResponse__NetworkAccess = Schema.Literals([
11714 "restricted",
@@ -9822,6 +11726,24 @@ export const V2ThreadResumeResponse__GitInfo = Schema.Struct({
11726 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11727 }).annotate({ identifier: "V2ThreadResumeResponse__GitInfo" });
11728
11729 +export type V2ThreadResumeResponse__ThreadHistoryMode = "legacy" | "paginated";
11730 +export const V2ThreadResumeResponse__ThreadHistoryMode = Schema.Literals([
11731 + "legacy",
11732 + "paginated",
11733 +]).annotate({ identifier: "V2ThreadResumeResponse__ThreadHistoryMode" });
11734 +
11735 +export type V2ThreadResumeResponse__ThreadSectionAppearance = {
11736 + readonly color?: string | null;
11737 + readonly icon?: string | null;
11738 +};
11739 +export const V2ThreadResumeResponse__ThreadSectionAppearance = Schema.Struct({
11740 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11741 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11742 +}).annotate({
11743 + description: "Extensible visual presentation for a custom thread section.",
11744 + identifier: "V2ThreadResumeResponse__ThreadSectionAppearance",
11745 +});
11746 +
11747 export type V2ThreadResumeResponse__AgentPath = string;
11748 export const V2ThreadResumeResponse__AgentPath = Schema.String.annotate({
11749 identifier: "V2ThreadResumeResponse__AgentPath",
@@ -9849,6 +11771,11 @@ export const V2ThreadResumeResponse__NonSteerableTurnKind = Schema.Literals([
11771 "compact",
11772 ]).annotate({ identifier: "V2ThreadResumeResponse__NonSteerableTurnKind" });
11773
11774 +export type V2ThreadResumeResponse__MisalignmentSteer = { readonly message: string };
11775 +export const V2ThreadResumeResponse__MisalignmentSteer = Schema.Struct({
11776 + message: Schema.String,
11777 +}).annotate({ identifier: "V2ThreadResumeResponse__MisalignmentSteer" });
11778 +
11779 export type V2ThreadResumeResponse__ByteRange = { readonly end: number; readonly start: number };
11780 export const V2ThreadResumeResponse__ByteRange = Schema.Struct({
11781 end: Schema.Number.annotate({ format: "uint" })
@@ -9880,6 +11807,11 @@ export const V2ThreadResumeResponse__HookPromptFragment = Schema.Struct({
11807 text: Schema.String,
11808 }).annotate({ identifier: "V2ThreadResumeResponse__HookPromptFragment" });
11809
11810 +export type V2ThreadResumeResponse__AgentMessageDelivery = "async";
11811 +export const V2ThreadResumeResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
11812 + identifier: "V2ThreadResumeResponse__AgentMessageDelivery",
11813 +});
11814 +
11815 export type V2ThreadResumeResponse__MemoryCitationEntry = {
11816 readonly lineEnd: number;
11817 readonly lineStart: number;
@@ -9919,6 +11851,15 @@ export const V2ThreadResumeResponse__MessagePhase = Schema.Union(
11851 identifier: "V2ThreadResumeResponse__MessagePhase",
11852 });
11853
11854 +export type V2ThreadResumeResponse__AsyncUserInputQuestion = {
11855 + readonly options?: ReadonlyArray<string> | null;
11856 + readonly title: string;
11857 +};
11858 +export const V2ThreadResumeResponse__AsyncUserInputQuestion = Schema.Struct({
11859 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
11860 + title: Schema.String,
11861 +}).annotate({ identifier: "V2ThreadResumeResponse__AsyncUserInputQuestion" });
11862 +
11863 export type V2ThreadResumeResponse__CommandExecutionSource =
11864 | "agent"
11865 | "userShell"
@@ -9995,6 +11936,12 @@ export const V2ThreadResumeResponse__McpToolCallError = Schema.Struct({
11936 message: Schema.String,
11937 }).annotate({ identifier: "V2ThreadResumeResponse__McpToolCallError" });
11938
11939 +export type V2ThreadResumeResponse__McpAppDisplayMode = "inline" | "fullscreen";
11940 +export const V2ThreadResumeResponse__McpAppDisplayMode = Schema.Literals([
11941 + "inline",
11942 + "fullscreen",
11943 +]).annotate({ identifier: "V2ThreadResumeResponse__McpAppDisplayMode" });
11944 +
11945 export type V2ThreadResumeResponse__McpToolCallResult = {
11946 readonly _meta?: Schema.Json;
11947 readonly content: ReadonlyArray<Schema.Json>;
@@ -10144,6 +12091,31 @@ export const V2ThreadResumeResponse__WebSearchAction = Schema.Union(
12091 { mode: "oneOf" },
12092 ).annotate({ identifier: "V2ThreadResumeResponse__WebSearchAction" });
12093
12094 +export type V2ThreadResumeResponse__ImageGenerationFailure = {
12095 + readonly limitId: string;
12096 + readonly resetsAt?: number | null;
12097 + readonly type: "usageLimitExceeded";
12098 +};
12099 +export const V2ThreadResumeResponse__ImageGenerationFailure = Schema.Union(
12100 + [
12101 + Schema.Struct({
12102 + limitId: Schema.String,
12103 + resetsAt: Schema.optionalKey(
12104 + Schema.Union([
12105 + Schema.Number.annotate({ format: "int64" }).check(
12106 + Schema.isInt().annotate({ expected: "an integer" }),
12107 + ),
12108 + Schema.Null,
12109 + ]),
12110 + ),
12111 + type: Schema.Literal("usageLimitExceeded").annotate({
12112 + title: "UsageLimitExceededImageGenerationFailureType",
12113 + }),
12114 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
12115 + ],
12116 + { mode: "oneOf" },
12117 +).annotate({ identifier: "V2ThreadResumeResponse__ImageGenerationFailure" });
12118 +
12119 export type V2ThreadResumeResponse__TurnItemsView = "notLoaded" | "summary" | "full";
12120 export const V2ThreadResumeResponse__TurnItemsView = Schema.Union(
12121 [
@@ -10173,53 +12145,86 @@ export const V2ThreadResumeResponse__TurnStatus = Schema.Literals([
12145 "inProgress",
12146 ]).annotate({ identifier: "V2ThreadResumeResponse__TurnStatus" });
12147
10176 -export type V2ThreadRollbackResponse__AbsolutePathBuf = string;
10177 -export const V2ThreadRollbackResponse__AbsolutePathBuf = Schema.String.annotate({
12148 +export type V2ThreadRevertResponse__AbsolutePathBuf = string;
12149 +export const V2ThreadRevertResponse__AbsolutePathBuf = Schema.String.annotate({
12150 description:
12151 "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
10180 - identifier: "V2ThreadRollbackResponse__AbsolutePathBuf",
12152 + identifier: "V2ThreadRevertResponse__AbsolutePathBuf",
12153 });
12154
10183 -export type V2ThreadRollbackResponse__GitInfo = {
12155 +export type V2ThreadRevertResponse__GitInfo = {
12156 readonly branch?: string | null;
12157 readonly originUrl?: string | null;
12158 readonly sha?: string | null;
12159 };
10188 -export const V2ThreadRollbackResponse__GitInfo = Schema.Struct({
12160 +export const V2ThreadRevertResponse__GitInfo = Schema.Struct({
12161 branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12162 originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12163 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10192 -}).annotate({ identifier: "V2ThreadRollbackResponse__GitInfo" });
12164 +}).annotate({ identifier: "V2ThreadRevertResponse__GitInfo" });
12165 +
12166 +export type V2ThreadRevertResponse__ThreadHistoryMode = "legacy" | "paginated";
12167 +export const V2ThreadRevertResponse__ThreadHistoryMode = Schema.Literals([
12168 + "legacy",
12169 + "paginated",
12170 +]).annotate({ identifier: "V2ThreadRevertResponse__ThreadHistoryMode" });
12171 +
12172 +export type V2ThreadRevertResponse__ReasoningEffort = string;
12173 +export const V2ThreadRevertResponse__ReasoningEffort = Schema.String.annotate({
12174 + description: "A non-empty reasoning effort value advertised by the model.",
12175 +}).check(
12176 + Schema.isMinLength(1).annotate({
12177 + expected: "a value with a length of at least 1",
12178 + identifier: "V2ThreadRevertResponse__ReasoningEffort",
12179 + }),
12180 +);
12181 +
12182 +export type V2ThreadRevertResponse__ThreadSectionAppearance = {
12183 + readonly color?: string | null;
12184 + readonly icon?: string | null;
12185 +};
12186 +export const V2ThreadRevertResponse__ThreadSectionAppearance = Schema.Struct({
12187 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12188 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12189 +}).annotate({
12190 + description: "Extensible visual presentation for a custom thread section.",
12191 + identifier: "V2ThreadRevertResponse__ThreadSectionAppearance",
12192 +});
12193
10194 -export type V2ThreadRollbackResponse__AgentPath = string;
10195 -export const V2ThreadRollbackResponse__AgentPath = Schema.String.annotate({
10196 - identifier: "V2ThreadRollbackResponse__AgentPath",
12194 +export type V2ThreadRevertResponse__AgentPath = string;
12195 +export const V2ThreadRevertResponse__AgentPath = Schema.String.annotate({
12196 + identifier: "V2ThreadRevertResponse__AgentPath",
12197 });
12198
10199 -export type V2ThreadRollbackResponse__ThreadId = string;
10200 -export const V2ThreadRollbackResponse__ThreadId = Schema.String.annotate({
10201 - identifier: "V2ThreadRollbackResponse__ThreadId",
12199 +export type V2ThreadRevertResponse__ThreadId = string;
12200 +export const V2ThreadRevertResponse__ThreadId = Schema.String.annotate({
12201 + identifier: "V2ThreadRevertResponse__ThreadId",
12202 });
12203
10204 -export type V2ThreadRollbackResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
10205 -export const V2ThreadRollbackResponse__ThreadActiveFlag = Schema.Literals([
12204 +export type V2ThreadRevertResponse__ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput";
12205 +export const V2ThreadRevertResponse__ThreadActiveFlag = Schema.Literals([
12206 "waitingOnApproval",
12207 "waitingOnUserInput",
10208 -]).annotate({ identifier: "V2ThreadRollbackResponse__ThreadActiveFlag" });
12208 +]).annotate({ identifier: "V2ThreadRevertResponse__ThreadActiveFlag" });
12209
10210 -export type V2ThreadRollbackResponse__ThreadSource = string;
10211 -export const V2ThreadRollbackResponse__ThreadSource = Schema.String.annotate({
10212 - identifier: "V2ThreadRollbackResponse__ThreadSource",
12210 +export type V2ThreadRevertResponse__ThreadSource = string;
12211 +export const V2ThreadRevertResponse__ThreadSource = Schema.String.annotate({
12212 + identifier: "V2ThreadRevertResponse__ThreadSource",
12213 });
12214
10215 -export type V2ThreadRollbackResponse__NonSteerableTurnKind = "review" | "compact";
10216 -export const V2ThreadRollbackResponse__NonSteerableTurnKind = Schema.Literals([
12215 +export type V2ThreadRevertResponse__NonSteerableTurnKind = "review" | "compact";
12216 +export const V2ThreadRevertResponse__NonSteerableTurnKind = Schema.Literals([
12217 "review",
12218 "compact",
10219 -]).annotate({ identifier: "V2ThreadRollbackResponse__NonSteerableTurnKind" });
12219 +]).annotate({ identifier: "V2ThreadRevertResponse__NonSteerableTurnKind" });
12220
10221 -export type V2ThreadRollbackResponse__ByteRange = { readonly end: number; readonly start: number };
10222 -export const V2ThreadRollbackResponse__ByteRange = Schema.Struct({
12221 +export type V2ThreadRevertResponse__MisalignmentSteer = { readonly message: string };
12222 +export const V2ThreadRevertResponse__MisalignmentSteer = Schema.Struct({
12223 + message: Schema.String,
12224 +}).annotate({ identifier: "V2ThreadRevertResponse__MisalignmentSteer" });
12225 +
12226 +export type V2ThreadRevertResponse__ByteRange = { readonly end: number; readonly start: number };
12227 +export const V2ThreadRevertResponse__ByteRange = Schema.Struct({
12228 end: Schema.Number.annotate({ format: "uint" })
12229 .check(Schema.isInt().annotate({ expected: "an integer" }))
12230 .check(
@@ -10230,32 +12235,37 @@ export const V2ThreadRollbackResponse__ByteRange = Schema.Struct({
12235 .check(
12236 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
12237 ),
10233 -}).annotate({ identifier: "V2ThreadRollbackResponse__ByteRange" });
12238 +}).annotate({ identifier: "V2ThreadRevertResponse__ByteRange" });
12239
10235 -export type V2ThreadRollbackResponse__ImageDetail = "auto" | "low" | "high" | "original";
10236 -export const V2ThreadRollbackResponse__ImageDetail = Schema.Literals([
12240 +export type V2ThreadRevertResponse__ImageDetail = "auto" | "low" | "high" | "original";
12241 +export const V2ThreadRevertResponse__ImageDetail = Schema.Literals([
12242 "auto",
12243 "low",
12244 "high",
12245 "original",
10241 -]).annotate({ identifier: "V2ThreadRollbackResponse__ImageDetail" });
12246 +]).annotate({ identifier: "V2ThreadRevertResponse__ImageDetail" });
12247
10243 -export type V2ThreadRollbackResponse__HookPromptFragment = {
12248 +export type V2ThreadRevertResponse__HookPromptFragment = {
12249 readonly hookRunId: string;
12250 readonly text: string;
12251 };
10247 -export const V2ThreadRollbackResponse__HookPromptFragment = Schema.Struct({
12252 +export const V2ThreadRevertResponse__HookPromptFragment = Schema.Struct({
12253 hookRunId: Schema.String,
12254 text: Schema.String,
10250 -}).annotate({ identifier: "V2ThreadRollbackResponse__HookPromptFragment" });
12255 +}).annotate({ identifier: "V2ThreadRevertResponse__HookPromptFragment" });
12256 +
12257 +export type V2ThreadRevertResponse__AgentMessageDelivery = "async";
12258 +export const V2ThreadRevertResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
12259 + identifier: "V2ThreadRevertResponse__AgentMessageDelivery",
12260 +});
12261
10252 -export type V2ThreadRollbackResponse__MemoryCitationEntry = {
12262 +export type V2ThreadRevertResponse__MemoryCitationEntry = {
12263 readonly lineEnd: number;
12264 readonly lineStart: number;
12265 readonly note: string;
12266 readonly path: string;
12267 };
10258 -export const V2ThreadRollbackResponse__MemoryCitationEntry = Schema.Struct({
12268 +export const V2ThreadRevertResponse__MemoryCitationEntry = Schema.Struct({
12269 lineEnd: Schema.Number.annotate({ format: "uint32" })
12270 .check(Schema.isInt().annotate({ expected: "an integer" }))
12271 .check(
@@ -10268,10 +12278,10 @@ export const V2ThreadRollbackResponse__MemoryCitationEntry = Schema.Struct({
12278 ),
12279 note: Schema.String,
12280 path: Schema.String,
10271 -}).annotate({ identifier: "V2ThreadRollbackResponse__MemoryCitationEntry" });
12281 +}).annotate({ identifier: "V2ThreadRevertResponse__MemoryCitationEntry" });
12282
10273 -export type V2ThreadRollbackResponse__MessagePhase = "commentary" | "final_answer";
10274 -export const V2ThreadRollbackResponse__MessagePhase = Schema.Union(
12283 +export type V2ThreadRevertResponse__MessagePhase = "commentary" | "final_answer";
12284 +export const V2ThreadRevertResponse__MessagePhase = Schema.Union(
12285 [
12286 Schema.Literal("commentary").annotate({
12287 description:
@@ -10285,43 +12295,52 @@ export const V2ThreadRollbackResponse__MessagePhase = Schema.Union(
12295 ).annotate({
12296 description:
12297 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
10288 - identifier: "V2ThreadRollbackResponse__MessagePhase",
12298 + identifier: "V2ThreadRevertResponse__MessagePhase",
12299 });
12300
10291 -export type V2ThreadRollbackResponse__LegacyAppPathString = string;
10292 -export const V2ThreadRollbackResponse__LegacyAppPathString = Schema.String.annotate({
10293 - identifier: "V2ThreadRollbackResponse__LegacyAppPathString",
12301 +export type V2ThreadRevertResponse__AsyncUserInputQuestion = {
12302 + readonly options?: ReadonlyArray<string> | null;
12303 + readonly title: string;
12304 +};
12305 +export const V2ThreadRevertResponse__AsyncUserInputQuestion = Schema.Struct({
12306 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
12307 + title: Schema.String,
12308 +}).annotate({ identifier: "V2ThreadRevertResponse__AsyncUserInputQuestion" });
12309 +
12310 +export type V2ThreadRevertResponse__LegacyAppPathString = string;
12311 +export const V2ThreadRevertResponse__LegacyAppPathString = Schema.String.annotate({
12312 + identifier: "V2ThreadRevertResponse__LegacyAppPathString",
12313 });
12314
10296 -export type V2ThreadRollbackResponse__CommandExecutionSource =
12315 +export type V2ThreadRevertResponse__CommandExecutionSource =
12316 | "agent"
12317 | "userShell"
12318 | "unifiedExecStartup"
12319 | "unifiedExecInteraction";
10301 -export const V2ThreadRollbackResponse__CommandExecutionSource = Schema.Literals([
12320 +export const V2ThreadRevertResponse__CommandExecutionSource = Schema.Literals([
12321 "agent",
12322 "userShell",
12323 "unifiedExecStartup",
12324 "unifiedExecInteraction",
10306 -]).annotate({ identifier: "V2ThreadRollbackResponse__CommandExecutionSource" });
12325 +]).annotate({ identifier: "V2ThreadRevertResponse__CommandExecutionSource" });
12326
10308 -export type V2ThreadRollbackResponse__CommandExecutionStatus =
12327 +export type V2ThreadRevertResponse__CommandExecutionStatus =
12328 | "inProgress"
12329 | "completed"
12330 | "failed"
12331 | "declined";
10313 -export const V2ThreadRollbackResponse__CommandExecutionStatus = Schema.Literals([
12332 +export const V2ThreadRevertResponse__CommandExecutionStatus = Schema.Literals([
12333 "inProgress",
12334 "completed",
12335 "failed",
12336 "declined",
10318 -]).annotate({ identifier: "V2ThreadRollbackResponse__CommandExecutionStatus" });
12337 +]).annotate({ identifier: "V2ThreadRevertResponse__CommandExecutionStatus" });
12338
10320 -export type V2ThreadRollbackResponse__PatchChangeKind =
12339 +export type V2ThreadRevertResponse__PatchChangeKind =
12340 | { readonly type: "add" }
12341 | { readonly type: "delete" }
12342 | { readonly move_path?: string | null; readonly type: "update" };
10324 -export const V2ThreadRollbackResponse__PatchChangeKind = Schema.Union(
12343 +export const V2ThreadRevertResponse__PatchChangeKind = Schema.Union(
12344 [
12345 Schema.Struct({
12346 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
@@ -10335,63 +12354,69 @@ export const V2ThreadRollbackResponse__PatchChangeKind = Schema.Union(
12354 }).annotate({ title: "UpdatePatchChangeKind" }),
12355 ],
12356 { mode: "oneOf" },
10338 -).annotate({ identifier: "V2ThreadRollbackResponse__PatchChangeKind" });
12357 +).annotate({ identifier: "V2ThreadRevertResponse__PatchChangeKind" });
12358
10340 -export type V2ThreadRollbackResponse__PatchApplyStatus =
12359 +export type V2ThreadRevertResponse__PatchApplyStatus =
12360 | "inProgress"
12361 | "completed"
12362 | "failed"
12363 | "declined";
10345 -export const V2ThreadRollbackResponse__PatchApplyStatus = Schema.Literals([
12364 +export const V2ThreadRevertResponse__PatchApplyStatus = Schema.Literals([
12365 "inProgress",
12366 "completed",
12367 "failed",
12368 "declined",
10350 -]).annotate({ identifier: "V2ThreadRollbackResponse__PatchApplyStatus" });
12369 +]).annotate({ identifier: "V2ThreadRevertResponse__PatchApplyStatus" });
12370
10352 -export type V2ThreadRollbackResponse__McpToolCallAppContext = {
12371 +export type V2ThreadRevertResponse__McpToolCallAppContext = {
12372 readonly actionName?: string | null;
12373 readonly appName?: string | null;
12374 readonly connectorId: string;
12375 readonly linkId?: string | null;
12376 readonly resourceUri?: string | null;
12377 };
10359 -export const V2ThreadRollbackResponse__McpToolCallAppContext = Schema.Struct({
12378 +export const V2ThreadRevertResponse__McpToolCallAppContext = Schema.Struct({
12379 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12380 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12381 connectorId: Schema.String,
12382 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12383 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10365 -}).annotate({ identifier: "V2ThreadRollbackResponse__McpToolCallAppContext" });
12384 +}).annotate({ identifier: "V2ThreadRevertResponse__McpToolCallAppContext" });
12385
10367 -export type V2ThreadRollbackResponse__McpToolCallError = { readonly message: string };
10368 -export const V2ThreadRollbackResponse__McpToolCallError = Schema.Struct({
12386 +export type V2ThreadRevertResponse__McpToolCallError = { readonly message: string };
12387 +export const V2ThreadRevertResponse__McpToolCallError = Schema.Struct({
12388 message: Schema.String,
10370 -}).annotate({ identifier: "V2ThreadRollbackResponse__McpToolCallError" });
12389 +}).annotate({ identifier: "V2ThreadRevertResponse__McpToolCallError" });
12390
10372 -export type V2ThreadRollbackResponse__McpToolCallResult = {
12391 +export type V2ThreadRevertResponse__McpAppDisplayMode = "inline" | "fullscreen";
12392 +export const V2ThreadRevertResponse__McpAppDisplayMode = Schema.Literals([
12393 + "inline",
12394 + "fullscreen",
12395 +]).annotate({ identifier: "V2ThreadRevertResponse__McpAppDisplayMode" });
12396 +
12397 +export type V2ThreadRevertResponse__McpToolCallResult = {
12398 readonly _meta?: Schema.Json;
12399 readonly content: ReadonlyArray<Schema.Json>;
12400 readonly structuredContent?: Schema.Json;
12401 };
10377 -export const V2ThreadRollbackResponse__McpToolCallResult = Schema.Struct({
12402 +export const V2ThreadRevertResponse__McpToolCallResult = Schema.Struct({
12403 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
12404 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
12405 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
10381 -}).annotate({ identifier: "V2ThreadRollbackResponse__McpToolCallResult" });
12406 +}).annotate({ identifier: "V2ThreadRevertResponse__McpToolCallResult" });
12407
10383 -export type V2ThreadRollbackResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
10384 -export const V2ThreadRollbackResponse__McpToolCallStatus = Schema.Literals([
12408 +export type V2ThreadRevertResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
12409 +export const V2ThreadRevertResponse__McpToolCallStatus = Schema.Literals([
12410 "inProgress",
12411 "completed",
12412 "failed",
10388 -]).annotate({ identifier: "V2ThreadRollbackResponse__McpToolCallStatus" });
12413 +]).annotate({ identifier: "V2ThreadRevertResponse__McpToolCallStatus" });
12414
10390 -export type V2ThreadRollbackResponse__DynamicToolCallOutputContentItem =
12415 +export type V2ThreadRevertResponse__DynamicToolCallOutputContentItem =
12416 | { readonly text: string; readonly type: "inputText" }
12417 | { readonly imageUrl: string; readonly type: "inputImage" }
12418 | { readonly audioUrl: string; readonly type: "inputAudio" };
10394 -export const V2ThreadRollbackResponse__DynamicToolCallOutputContentItem = Schema.Union(
12419 +export const V2ThreadRevertResponse__DynamicToolCallOutputContentItem = Schema.Union(
12420 [
12421 Schema.Struct({
12422 text: Schema.String,
@@ -10413,16 +12438,16 @@ export const V2ThreadRollbackResponse__DynamicToolCallOutputContentItem = Schema
12438 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
12439 ],
12440 { mode: "oneOf" },
10416 -).annotate({ identifier: "V2ThreadRollbackResponse__DynamicToolCallOutputContentItem" });
12441 +).annotate({ identifier: "V2ThreadRevertResponse__DynamicToolCallOutputContentItem" });
12442
10418 -export type V2ThreadRollbackResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
10419 -export const V2ThreadRollbackResponse__DynamicToolCallStatus = Schema.Literals([
12443 +export type V2ThreadRevertResponse__DynamicToolCallStatus = "inProgress" | "completed" | "failed";
12444 +export const V2ThreadRevertResponse__DynamicToolCallStatus = Schema.Literals([
12445 "inProgress",
12446 "completed",
12447 "failed",
10423 -]).annotate({ identifier: "V2ThreadRollbackResponse__DynamicToolCallStatus" });
12448 +]).annotate({ identifier: "V2ThreadRevertResponse__DynamicToolCallStatus" });
12449
10425 -export type V2ThreadRollbackResponse__CollabAgentStatus =
12450 +export type V2ThreadRevertResponse__CollabAgentStatus =
12451 | "pendingInit"
12452 | "running"
12453 | "interrupted"
@@ -10430,7 +12455,7 @@ export type V2ThreadRollbackResponse__CollabAgentStatus =
12455 | "errored"
12456 | "shutdown"
12457 | "notFound";
10433 -export const V2ThreadRollbackResponse__CollabAgentStatus = Schema.Literals([
12458 +export const V2ThreadRevertResponse__CollabAgentStatus = Schema.Literals([
12459 "pendingInit",
12460 "running",
12461 "interrupted",
@@ -10438,31 +12463,21 @@ export const V2ThreadRollbackResponse__CollabAgentStatus = Schema.Literals([
12463 "errored",
12464 "shutdown",
12465 "notFound",
10441 -]).annotate({ identifier: "V2ThreadRollbackResponse__CollabAgentStatus" });
10442 -
10443 -export type V2ThreadRollbackResponse__ReasoningEffort = string;
10444 -export const V2ThreadRollbackResponse__ReasoningEffort = Schema.String.annotate({
10445 - description: "A non-empty reasoning effort value advertised by the model.",
10446 -}).check(
10447 - Schema.isMinLength(1).annotate({
10448 - expected: "a value with a length of at least 1",
10449 - identifier: "V2ThreadRollbackResponse__ReasoningEffort",
10450 - }),
10451 -);
12466 +]).annotate({ identifier: "V2ThreadRevertResponse__CollabAgentStatus" });
12467
10453 -export type V2ThreadRollbackResponse__CollabAgentToolCallStatus =
12468 +export type V2ThreadRevertResponse__CollabAgentToolCallStatus =
12469 | "inProgress"
12470 | "completed"
12471 | "failed"
12472 | "interrupted";
10458 -export const V2ThreadRollbackResponse__CollabAgentToolCallStatus = Schema.Literals([
12473 +export const V2ThreadRevertResponse__CollabAgentToolCallStatus = Schema.Literals([
12474 "inProgress",
12475 "completed",
12476 "failed",
12477 "interrupted",
10463 -]).annotate({ identifier: "V2ThreadRollbackResponse__CollabAgentToolCallStatus" });
12478 +]).annotate({ identifier: "V2ThreadRevertResponse__CollabAgentToolCallStatus" });
12479
10465 -export type V2ThreadRollbackResponse__CollabAgentTool =
12480 +export type V2ThreadRevertResponse__CollabAgentTool =
12481 | "spawnAgent"
12482 | "sendInput"
12483 | "resumeAgent"
@@ -10472,7 +12487,7 @@ export type V2ThreadRollbackResponse__CollabAgentTool =
12487 | "followupTask"
12488 | "interruptAgent"
12489 | "listAgents";
10475 -export const V2ThreadRollbackResponse__CollabAgentTool = Schema.Literals([
12490 +export const V2ThreadRevertResponse__CollabAgentTool = Schema.Literals([
12491 "spawnAgent",
12492 "sendInput",
12493 "resumeAgent",
@@ -10482,21 +12497,21 @@ export const V2ThreadRollbackResponse__CollabAgentTool = Schema.Literals([
12497 "followupTask",
12498 "interruptAgent",
12499 "listAgents",
10485 -]).annotate({ identifier: "V2ThreadRollbackResponse__CollabAgentTool" });
12500 +]).annotate({ identifier: "V2ThreadRevertResponse__CollabAgentTool" });
12501
10487 -export type V2ThreadRollbackResponse__SubAgentActivityKind =
12502 +export type V2ThreadRevertResponse__SubAgentActivityKind =
12503 | "started"
12504 | "interacted"
12505 | "interrupted"
12506 | "completed";
10492 -export const V2ThreadRollbackResponse__SubAgentActivityKind = Schema.Literals([
12507 +export const V2ThreadRevertResponse__SubAgentActivityKind = Schema.Literals([
12508 "started",
12509 "interacted",
12510 "interrupted",
12511 "completed",
10497 -]).annotate({ identifier: "V2ThreadRollbackResponse__SubAgentActivityKind" });
12512 +]).annotate({ identifier: "V2ThreadRevertResponse__SubAgentActivityKind" });
12513
10499 -export type V2ThreadRollbackResponse__WebSearchAction =
12514 +export type V2ThreadRevertResponse__WebSearchAction =
12515 | {
12516 readonly queries?: ReadonlyArray<string> | null;
12517 readonly query?: string | null;
@@ -10505,7 +12520,7 @@ export type V2ThreadRollbackResponse__WebSearchAction =
12520 | { readonly type: "openPage"; readonly url?: string | null }
12521 | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
12522 | { readonly type: "other" };
10508 -export const V2ThreadRollbackResponse__WebSearchAction = Schema.Union(
12523 +export const V2ThreadRevertResponse__WebSearchAction = Schema.Union(
12524 [
12525 Schema.Struct({
12526 queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
@@ -10526,10 +12541,35 @@ export const V2ThreadRollbackResponse__WebSearchAction = Schema.Union(
12541 }).annotate({ title: "OtherWebSearchAction" }),
12542 ],
12543 { mode: "oneOf" },
10529 -).annotate({ identifier: "V2ThreadRollbackResponse__WebSearchAction" });
12544 +).annotate({ identifier: "V2ThreadRevertResponse__WebSearchAction" });
12545
10531 -export type V2ThreadRollbackResponse__TurnItemsView = "notLoaded" | "summary" | "full";
10532 -export const V2ThreadRollbackResponse__TurnItemsView = Schema.Union(
12546 +export type V2ThreadRevertResponse__ImageGenerationFailure = {
12547 + readonly limitId: string;
12548 + readonly resetsAt?: number | null;
12549 + readonly type: "usageLimitExceeded";
12550 +};
12551 +export const V2ThreadRevertResponse__ImageGenerationFailure = Schema.Union(
12552 + [
12553 + Schema.Struct({
12554 + limitId: Schema.String,
12555 + resetsAt: Schema.optionalKey(
12556 + Schema.Union([
12557 + Schema.Number.annotate({ format: "int64" }).check(
12558 + Schema.isInt().annotate({ expected: "an integer" }),
12559 + ),
12560 + Schema.Null,
12561 + ]),
12562 + ),
12563 + type: Schema.Literal("usageLimitExceeded").annotate({
12564 + title: "UsageLimitExceededImageGenerationFailureType",
12565 + }),
12566 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
12567 + ],
12568 + { mode: "oneOf" },
12569 +).annotate({ identifier: "V2ThreadRevertResponse__ImageGenerationFailure" });
12570 +
12571 +export type V2ThreadRevertResponse__TurnItemsView = "notLoaded" | "summary" | "full";
12572 +export const V2ThreadRevertResponse__TurnItemsView = Schema.Union(
12573 [
12574 Schema.Literal("notLoaded").annotate({
12575 description: "`items` was not loaded for this turn. The field is intentionally empty.",
@@ -10543,19 +12583,79 @@ export const V2ThreadRollbackResponse__TurnItemsView = Schema.Union(
12583 }),
12584 ],
12585 { mode: "oneOf" },
10546 -).annotate({ identifier: "V2ThreadRollbackResponse__TurnItemsView" });
12586 +).annotate({ identifier: "V2ThreadRevertResponse__TurnItemsView" });
12587
10548 -export type V2ThreadRollbackResponse__TurnStatus =
12588 +export type V2ThreadRevertResponse__TurnStatus =
12589 | "completed"
12590 | "interrupted"
12591 | "failed"
12592 | "inProgress";
10553 -export const V2ThreadRollbackResponse__TurnStatus = Schema.Literals([
12593 +export const V2ThreadRevertResponse__TurnStatus = Schema.Literals([
12594 "completed",
12595 "interrupted",
12596 "failed",
12597 "inProgress",
10558 -]).annotate({ identifier: "V2ThreadRollbackResponse__TurnStatus" });
12598 +]).annotate({ identifier: "V2ThreadRevertResponse__TurnStatus" });
12599 +
12600 +export type V2ThreadSectionCreateParams__ThreadSectionAppearance = {
12601 + readonly color?: string | null;
12602 + readonly icon?: string | null;
12603 +};
12604 +export const V2ThreadSectionCreateParams__ThreadSectionAppearance = Schema.Struct({
12605 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12606 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12607 +}).annotate({
12608 + description: "Extensible visual presentation for a custom thread section.",
12609 + identifier: "V2ThreadSectionCreateParams__ThreadSectionAppearance",
12610 +});
12611 +
12612 +export type V2ThreadSectionCreateResponse__ThreadSectionAppearance = {
12613 + readonly color?: string | null;
12614 + readonly icon?: string | null;
12615 +};
12616 +export const V2ThreadSectionCreateResponse__ThreadSectionAppearance = Schema.Struct({
12617 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12618 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12619 +}).annotate({
12620 + description: "Extensible visual presentation for a custom thread section.",
12621 + identifier: "V2ThreadSectionCreateResponse__ThreadSectionAppearance",
12622 +});
12623 +
12624 +export type V2ThreadSectionListResponse__ThreadSectionAppearance = {
12625 + readonly color?: string | null;
12626 + readonly icon?: string | null;
12627 +};
12628 +export const V2ThreadSectionListResponse__ThreadSectionAppearance = Schema.Struct({
12629 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12630 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12631 +}).annotate({
12632 + description: "Extensible visual presentation for a custom thread section.",
12633 + identifier: "V2ThreadSectionListResponse__ThreadSectionAppearance",
12634 +});
12635 +
12636 +export type V2ThreadSectionUpdateParams__ThreadSectionAppearance = {
12637 + readonly color?: string | null;
12638 + readonly icon?: string | null;
12639 +};
12640 +export const V2ThreadSectionUpdateParams__ThreadSectionAppearance = Schema.Struct({
12641 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12642 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12643 +}).annotate({
12644 + description: "Extensible visual presentation for a custom thread section.",
12645 + identifier: "V2ThreadSectionUpdateParams__ThreadSectionAppearance",
12646 +});
12647 +
12648 +export type V2ThreadSectionUpdateResponse__ThreadSectionAppearance = {
12649 + readonly color?: string | null;
12650 + readonly icon?: string | null;
12651 +};
12652 +export const V2ThreadSectionUpdateResponse__ThreadSectionAppearance = Schema.Struct({
12653 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12654 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12655 +}).annotate({
12656 + description: "Extensible visual presentation for a custom thread section.",
12657 + identifier: "V2ThreadSectionUpdateResponse__ThreadSectionAppearance",
12658 +});
12659
12660 export type V2ThreadSettingsUpdatedNotification__ActivePermissionProfile = {
12661 readonly extends?: string | null;
@@ -10651,7 +12751,10 @@ export const V2ThreadSettingsUpdatedNotification__Personality = Schema.Literals(
12751 "none",
12752 "friendly",
12753 "pragmatic",
10654 -]).annotate({ identifier: "V2ThreadSettingsUpdatedNotification__Personality" });
12754 +]).annotate({
12755 + description: "Deprecated: `friendly` and `pragmatic` no longer select a style.",
12756 + identifier: "V2ThreadSettingsUpdatedNotification__Personality",
12757 +});
12758
12759 export type V2ThreadSettingsUpdatedNotification__NetworkAccess = "restricted" | "enabled";
12760 export const V2ThreadSettingsUpdatedNotification__NetworkAccess = Schema.Literals([
@@ -10694,6 +12797,34 @@ export const V2ThreadStartedNotification__GitInfo = Schema.Struct({
12797 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12798 }).annotate({ identifier: "V2ThreadStartedNotification__GitInfo" });
12799
12800 +export type V2ThreadStartedNotification__ThreadHistoryMode = "legacy" | "paginated";
12801 +export const V2ThreadStartedNotification__ThreadHistoryMode = Schema.Literals([
12802 + "legacy",
12803 + "paginated",
12804 +]).annotate({ identifier: "V2ThreadStartedNotification__ThreadHistoryMode" });
12805 +
12806 +export type V2ThreadStartedNotification__ReasoningEffort = string;
12807 +export const V2ThreadStartedNotification__ReasoningEffort = Schema.String.annotate({
12808 + description: "A non-empty reasoning effort value advertised by the model.",
12809 +}).check(
12810 + Schema.isMinLength(1).annotate({
12811 + expected: "a value with a length of at least 1",
12812 + identifier: "V2ThreadStartedNotification__ReasoningEffort",
12813 + }),
12814 +);
12815 +
12816 +export type V2ThreadStartedNotification__ThreadSectionAppearance = {
12817 + readonly color?: string | null;
12818 + readonly icon?: string | null;
12819 +};
12820 +export const V2ThreadStartedNotification__ThreadSectionAppearance = Schema.Struct({
12821 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12822 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12823 +}).annotate({
12824 + description: "Extensible visual presentation for a custom thread section.",
12825 + identifier: "V2ThreadStartedNotification__ThreadSectionAppearance",
12826 +});
12827 +
12828 export type V2ThreadStartedNotification__AgentPath = string;
12829 export const V2ThreadStartedNotification__AgentPath = Schema.String.annotate({
12830 identifier: "V2ThreadStartedNotification__AgentPath",
@@ -10723,6 +12854,11 @@ export const V2ThreadStartedNotification__NonSteerableTurnKind = Schema.Literals
12854 "compact",
12855 ]).annotate({ identifier: "V2ThreadStartedNotification__NonSteerableTurnKind" });
12856
12857 +export type V2ThreadStartedNotification__MisalignmentSteer = { readonly message: string };
12858 +export const V2ThreadStartedNotification__MisalignmentSteer = Schema.Struct({
12859 + message: Schema.String,
12860 +}).annotate({ identifier: "V2ThreadStartedNotification__MisalignmentSteer" });
12861 +
12862 export type V2ThreadStartedNotification__ByteRange = {
12863 readonly end: number;
12864 readonly start: number;
@@ -10757,6 +12893,11 @@ export const V2ThreadStartedNotification__HookPromptFragment = Schema.Struct({
12893 text: Schema.String,
12894 }).annotate({ identifier: "V2ThreadStartedNotification__HookPromptFragment" });
12895
12896 +export type V2ThreadStartedNotification__AgentMessageDelivery = "async";
12897 +export const V2ThreadStartedNotification__AgentMessageDelivery = Schema.Literal("async").annotate({
12898 + identifier: "V2ThreadStartedNotification__AgentMessageDelivery",
12899 +});
12900 +
12901 export type V2ThreadStartedNotification__MemoryCitationEntry = {
12902 readonly lineEnd: number;
12903 readonly lineStart: number;
@@ -10796,6 +12937,15 @@ export const V2ThreadStartedNotification__MessagePhase = Schema.Union(
12937 identifier: "V2ThreadStartedNotification__MessagePhase",
12938 });
12939
12940 +export type V2ThreadStartedNotification__AsyncUserInputQuestion = {
12941 + readonly options?: ReadonlyArray<string> | null;
12942 + readonly title: string;
12943 +};
12944 +export const V2ThreadStartedNotification__AsyncUserInputQuestion = Schema.Struct({
12945 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
12946 + title: Schema.String,
12947 +}).annotate({ identifier: "V2ThreadStartedNotification__AsyncUserInputQuestion" });
12948 +
12949 export type V2ThreadStartedNotification__LegacyAppPathString = string;
12950 export const V2ThreadStartedNotification__LegacyAppPathString = Schema.String.annotate({
12951 identifier: "V2ThreadStartedNotification__LegacyAppPathString",
@@ -10877,6 +13027,12 @@ export const V2ThreadStartedNotification__McpToolCallError = Schema.Struct({
13027 message: Schema.String,
13028 }).annotate({ identifier: "V2ThreadStartedNotification__McpToolCallError" });
13029
13030 +export type V2ThreadStartedNotification__McpAppDisplayMode = "inline" | "fullscreen";
13031 +export const V2ThreadStartedNotification__McpAppDisplayMode = Schema.Literals([
13032 + "inline",
13033 + "fullscreen",
13034 +]).annotate({ identifier: "V2ThreadStartedNotification__McpAppDisplayMode" });
13035 +
13036 export type V2ThreadStartedNotification__McpToolCallResult = {
13037 readonly _meta?: Schema.Json;
13038 readonly content: ReadonlyArray<Schema.Json>;
@@ -10951,16 +13107,6 @@ export const V2ThreadStartedNotification__CollabAgentStatus = Schema.Literals([
13107 "notFound",
13108 ]).annotate({ identifier: "V2ThreadStartedNotification__CollabAgentStatus" });
13109
10954 -export type V2ThreadStartedNotification__ReasoningEffort = string;
10955 -export const V2ThreadStartedNotification__ReasoningEffort = Schema.String.annotate({
10956 - description: "A non-empty reasoning effort value advertised by the model.",
10957 -}).check(
10958 - Schema.isMinLength(1).annotate({
10959 - expected: "a value with a length of at least 1",
10960 - identifier: "V2ThreadStartedNotification__ReasoningEffort",
10961 - }),
10962 -);
10963 -
13110 export type V2ThreadStartedNotification__CollabAgentToolCallStatus =
13111 | "inProgress"
13112 | "completed"
@@ -11039,6 +13185,31 @@ export const V2ThreadStartedNotification__WebSearchAction = Schema.Union(
13185 { mode: "oneOf" },
13186 ).annotate({ identifier: "V2ThreadStartedNotification__WebSearchAction" });
13187
13188 +export type V2ThreadStartedNotification__ImageGenerationFailure = {
13189 + readonly limitId: string;
13190 + readonly resetsAt?: number | null;
13191 + readonly type: "usageLimitExceeded";
13192 +};
13193 +export const V2ThreadStartedNotification__ImageGenerationFailure = Schema.Union(
13194 + [
13195 + Schema.Struct({
13196 + limitId: Schema.String,
13197 + resetsAt: Schema.optionalKey(
13198 + Schema.Union([
13199 + Schema.Number.annotate({ format: "int64" }).check(
13200 + Schema.isInt().annotate({ expected: "an integer" }),
13201 + ),
13202 + Schema.Null,
13203 + ]),
13204 + ),
13205 + type: Schema.Literal("usageLimitExceeded").annotate({
13206 + title: "UsageLimitExceededImageGenerationFailureType",
13207 + }),
13208 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
13209 + ],
13210 + { mode: "oneOf" },
13211 +).annotate({ identifier: "V2ThreadStartedNotification__ImageGenerationFailure" });
13212 +
13213 export type V2ThreadStartedNotification__TurnItemsView = "notLoaded" | "summary" | "full";
13214 export const V2ThreadStartedNotification__TurnItemsView = Schema.Union(
13215 [
@@ -11113,7 +13284,10 @@ export const V2ThreadStartParams__Personality = Schema.Literals([
13284 "none",
13285 "friendly",
13286 "pragmatic",
11116 -]).annotate({ identifier: "V2ThreadStartParams__Personality" });
13287 +]).annotate({
13288 + description: "Deprecated: `friendly` and `pragmatic` no longer select a style.",
13289 + identifier: "V2ThreadStartParams__Personality",
13290 +});
13291
13292 export type V2ThreadStartParams__SandboxMode =
13293 | "read-only"
@@ -11266,6 +13440,24 @@ export const V2ThreadStartResponse__GitInfo = Schema.Struct({
13440 sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13441 }).annotate({ identifier: "V2ThreadStartResponse__GitInfo" });
13442
13443 +export type V2ThreadStartResponse__ThreadHistoryMode = "legacy" | "paginated";
13444 +export const V2ThreadStartResponse__ThreadHistoryMode = Schema.Literals([
13445 + "legacy",
13446 + "paginated",
13447 +]).annotate({ identifier: "V2ThreadStartResponse__ThreadHistoryMode" });
13448 +
13449 +export type V2ThreadStartResponse__ThreadSectionAppearance = {
13450 + readonly color?: string | null;
13451 + readonly icon?: string | null;
13452 +};
13453 +export const V2ThreadStartResponse__ThreadSectionAppearance = Schema.Struct({
13454 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13455 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13456 +}).annotate({
13457 + description: "Extensible visual presentation for a custom thread section.",
13458 + identifier: "V2ThreadStartResponse__ThreadSectionAppearance",
13459 +});
13460 +
13461 export type V2ThreadStartResponse__AgentPath = string;
13462 export const V2ThreadStartResponse__AgentPath = Schema.String.annotate({
13463 identifier: "V2ThreadStartResponse__AgentPath",
@@ -11293,6 +13485,11 @@ export const V2ThreadStartResponse__NonSteerableTurnKind = Schema.Literals([
13485 "compact",
13486 ]).annotate({ identifier: "V2ThreadStartResponse__NonSteerableTurnKind" });
13487
13488 +export type V2ThreadStartResponse__MisalignmentSteer = { readonly message: string };
13489 +export const V2ThreadStartResponse__MisalignmentSteer = Schema.Struct({
13490 + message: Schema.String,
13491 +}).annotate({ identifier: "V2ThreadStartResponse__MisalignmentSteer" });
13492 +
13493 export type V2ThreadStartResponse__ByteRange = { readonly end: number; readonly start: number };
13494 export const V2ThreadStartResponse__ByteRange = Schema.Struct({
13495 end: Schema.Number.annotate({ format: "uint" })
@@ -11324,6 +13521,11 @@ export const V2ThreadStartResponse__HookPromptFragment = Schema.Struct({
13521 text: Schema.String,
13522 }).annotate({ identifier: "V2ThreadStartResponse__HookPromptFragment" });
13523
13524 +export type V2ThreadStartResponse__AgentMessageDelivery = "async";
13525 +export const V2ThreadStartResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
13526 + identifier: "V2ThreadStartResponse__AgentMessageDelivery",
13527 +});
13528 +
13529 export type V2ThreadStartResponse__MemoryCitationEntry = {
13530 readonly lineEnd: number;
13531 readonly lineStart: number;
@@ -11363,6 +13565,15 @@ export const V2ThreadStartResponse__MessagePhase = Schema.Union(
13565 identifier: "V2ThreadStartResponse__MessagePhase",
13566 });
13567
13568 +export type V2ThreadStartResponse__AsyncUserInputQuestion = {
13569 + readonly options?: ReadonlyArray<string> | null;
13570 + readonly title: string;
13571 +};
13572 +export const V2ThreadStartResponse__AsyncUserInputQuestion = Schema.Struct({
13573 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
13574 + title: Schema.String,
13575 +}).annotate({ identifier: "V2ThreadStartResponse__AsyncUserInputQuestion" });
13576 +
13577 export type V2ThreadStartResponse__CommandExecutionSource =
13578 | "agent"
13579 | "userShell"
@@ -11439,6 +13650,12 @@ export const V2ThreadStartResponse__McpToolCallError = Schema.Struct({
13650 message: Schema.String,
13651 }).annotate({ identifier: "V2ThreadStartResponse__McpToolCallError" });
13652
13653 +export type V2ThreadStartResponse__McpAppDisplayMode = "inline" | "fullscreen";
13654 +export const V2ThreadStartResponse__McpAppDisplayMode = Schema.Literals([
13655 + "inline",
13656 + "fullscreen",
13657 +]).annotate({ identifier: "V2ThreadStartResponse__McpAppDisplayMode" });
13658 +
13659 export type V2ThreadStartResponse__McpToolCallResult = {
13660 readonly _meta?: Schema.Json;
13661 readonly content: ReadonlyArray<Schema.Json>;
@@ -11588,6 +13805,31 @@ export const V2ThreadStartResponse__WebSearchAction = Schema.Union(
13805 { mode: "oneOf" },
13806 ).annotate({ identifier: "V2ThreadStartResponse__WebSearchAction" });
13807
13808 +export type V2ThreadStartResponse__ImageGenerationFailure = {
13809 + readonly limitId: string;
13810 + readonly resetsAt?: number | null;
13811 + readonly type: "usageLimitExceeded";
13812 +};
13813 +export const V2ThreadStartResponse__ImageGenerationFailure = Schema.Union(
13814 + [
13815 + Schema.Struct({
13816 + limitId: Schema.String,
13817 + resetsAt: Schema.optionalKey(
13818 + Schema.Union([
13819 + Schema.Number.annotate({ format: "int64" }).check(
13820 + Schema.isInt().annotate({ expected: "an integer" }),
13821 + ),
13822 + Schema.Null,
13823 + ]),
13824 + ),
13825 + type: Schema.Literal("usageLimitExceeded").annotate({
13826 + title: "UsageLimitExceededImageGenerationFailureType",
13827 + }),
13828 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
13829 + ],
13830 + { mode: "oneOf" },
13831 +).annotate({ identifier: "V2ThreadStartResponse__ImageGenerationFailure" });
13832 +
13833 export type V2ThreadStartResponse__TurnItemsView = "notLoaded" | "summary" | "full";
13834 export const V2ThreadStartResponse__TurnItemsView = Schema.Union(
13835 [
@@ -11656,55 +13898,41 @@ export const V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown = Schema
13898 ),
13899 }).annotate({ identifier: "V2ThreadTokenUsageUpdatedNotification__TokenUsageBreakdown" });
13900
11659 -export type V2ThreadUnarchiveResponse__AbsolutePathBuf = string;
11660 -export const V2ThreadUnarchiveResponse__AbsolutePathBuf = Schema.String.annotate({
11661 - description:
11662 - "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
11663 - identifier: "V2ThreadUnarchiveResponse__AbsolutePathBuf",
11664 -});
11665 -
11666 -export type V2ThreadUnarchiveResponse__GitInfo = {
11667 - readonly branch?: string | null;
11668 - readonly originUrl?: string | null;
11669 - readonly sha?: string | null;
11670 -};
11671 -export const V2ThreadUnarchiveResponse__GitInfo = Schema.Struct({
11672 - branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11673 - originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11674 - sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11675 -}).annotate({ identifier: "V2ThreadUnarchiveResponse__GitInfo" });
11676 -
11677 -export type V2ThreadUnarchiveResponse__AgentPath = string;
11678 -export const V2ThreadUnarchiveResponse__AgentPath = Schema.String.annotate({
11679 - identifier: "V2ThreadUnarchiveResponse__AgentPath",
11680 -});
11681 -
11682 -export type V2ThreadUnarchiveResponse__ThreadId = string;
11683 -export const V2ThreadUnarchiveResponse__ThreadId = Schema.String.annotate({
11684 - identifier: "V2ThreadUnarchiveResponse__ThreadId",
11685 -});
11686 -
11687 -export type V2ThreadUnarchiveResponse__ThreadActiveFlag =
11688 - | "waitingOnApproval"
11689 - | "waitingOnUserInput";
11690 -export const V2ThreadUnarchiveResponse__ThreadActiveFlag = Schema.Literals([
11691 - "waitingOnApproval",
11692 - "waitingOnUserInput",
11693 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__ThreadActiveFlag" });
13901 +export type V2ThreadTurnsListParams__TurnItemsView = "notLoaded" | "summary" | "full";
13902 +export const V2ThreadTurnsListParams__TurnItemsView = Schema.Union(
13903 + [
13904 + Schema.Literal("notLoaded").annotate({
13905 + description: "`items` was not loaded for this turn. The field is intentionally empty.",
13906 + }),
13907 + Schema.Literal("summary").annotate({
13908 + description: "`items` contains only a display summary for this turn.",
13909 + }),
13910 + Schema.Literal("full").annotate({
13911 + description:
13912 + "`items` contains every ThreadItem available from persisted app-server history for this turn.",
13913 + }),
13914 + ],
13915 + { mode: "oneOf" },
13916 +).annotate({ identifier: "V2ThreadTurnsListParams__TurnItemsView" });
13917
11695 -export type V2ThreadUnarchiveResponse__ThreadSource = string;
11696 -export const V2ThreadUnarchiveResponse__ThreadSource = Schema.String.annotate({
11697 - identifier: "V2ThreadUnarchiveResponse__ThreadSource",
13918 +export type V2ThreadTurnsListParams__SortDirection = "asc" | "desc";
13919 +export const V2ThreadTurnsListParams__SortDirection = Schema.Literals(["asc", "desc"]).annotate({
13920 + identifier: "V2ThreadTurnsListParams__SortDirection",
13921 });
13922
11700 -export type V2ThreadUnarchiveResponse__NonSteerableTurnKind = "review" | "compact";
11701 -export const V2ThreadUnarchiveResponse__NonSteerableTurnKind = Schema.Literals([
13923 +export type V2ThreadTurnsListResponse__NonSteerableTurnKind = "review" | "compact";
13924 +export const V2ThreadTurnsListResponse__NonSteerableTurnKind = Schema.Literals([
13925 "review",
13926 "compact",
11704 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__NonSteerableTurnKind" });
13927 +]).annotate({ identifier: "V2ThreadTurnsListResponse__NonSteerableTurnKind" });
13928
11706 -export type V2ThreadUnarchiveResponse__ByteRange = { readonly end: number; readonly start: number };
11707 -export const V2ThreadUnarchiveResponse__ByteRange = Schema.Struct({
13929 +export type V2ThreadTurnsListResponse__MisalignmentSteer = { readonly message: string };
13930 +export const V2ThreadTurnsListResponse__MisalignmentSteer = Schema.Struct({
13931 + message: Schema.String,
13932 +}).annotate({ identifier: "V2ThreadTurnsListResponse__MisalignmentSteer" });
13933 +
13934 +export type V2ThreadTurnsListResponse__ByteRange = { readonly end: number; readonly start: number };
13935 +export const V2ThreadTurnsListResponse__ByteRange = Schema.Struct({
13936 end: Schema.Number.annotate({ format: "uint" })
13937 .check(Schema.isInt().annotate({ expected: "an integer" }))
13938 .check(
@@ -11715,32 +13943,37 @@ export const V2ThreadUnarchiveResponse__ByteRange = Schema.Struct({
13943 .check(
13944 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
13945 ),
11718 -}).annotate({ identifier: "V2ThreadUnarchiveResponse__ByteRange" });
13946 +}).annotate({ identifier: "V2ThreadTurnsListResponse__ByteRange" });
13947
11720 -export type V2ThreadUnarchiveResponse__ImageDetail = "auto" | "low" | "high" | "original";
11721 -export const V2ThreadUnarchiveResponse__ImageDetail = Schema.Literals([
13948 +export type V2ThreadTurnsListResponse__ImageDetail = "auto" | "low" | "high" | "original";
13949 +export const V2ThreadTurnsListResponse__ImageDetail = Schema.Literals([
13950 "auto",
13951 "low",
13952 "high",
13953 "original",
11726 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__ImageDetail" });
13954 +]).annotate({ identifier: "V2ThreadTurnsListResponse__ImageDetail" });
13955
11728 -export type V2ThreadUnarchiveResponse__HookPromptFragment = {
13956 +export type V2ThreadTurnsListResponse__HookPromptFragment = {
13957 readonly hookRunId: string;
13958 readonly text: string;
13959 };
11732 -export const V2ThreadUnarchiveResponse__HookPromptFragment = Schema.Struct({
13960 +export const V2ThreadTurnsListResponse__HookPromptFragment = Schema.Struct({
13961 hookRunId: Schema.String,
13962 text: Schema.String,
11735 -}).annotate({ identifier: "V2ThreadUnarchiveResponse__HookPromptFragment" });
13963 +}).annotate({ identifier: "V2ThreadTurnsListResponse__HookPromptFragment" });
13964
11737 -export type V2ThreadUnarchiveResponse__MemoryCitationEntry = {
13965 +export type V2ThreadTurnsListResponse__AgentMessageDelivery = "async";
13966 +export const V2ThreadTurnsListResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
13967 + identifier: "V2ThreadTurnsListResponse__AgentMessageDelivery",
13968 +});
13969 +
13970 +export type V2ThreadTurnsListResponse__MemoryCitationEntry = {
13971 readonly lineEnd: number;
13972 readonly lineStart: number;
13973 readonly note: string;
13974 readonly path: string;
13975 };
11743 -export const V2ThreadUnarchiveResponse__MemoryCitationEntry = Schema.Struct({
13976 +export const V2ThreadTurnsListResponse__MemoryCitationEntry = Schema.Struct({
13977 lineEnd: Schema.Number.annotate({ format: "uint32" })
13978 .check(Schema.isInt().annotate({ expected: "an integer" }))
13979 .check(
@@ -11753,10 +13986,10 @@ export const V2ThreadUnarchiveResponse__MemoryCitationEntry = Schema.Struct({
13986 ),
13987 note: Schema.String,
13988 path: Schema.String,
11756 -}).annotate({ identifier: "V2ThreadUnarchiveResponse__MemoryCitationEntry" });
13989 +}).annotate({ identifier: "V2ThreadTurnsListResponse__MemoryCitationEntry" });
13990
11758 -export type V2ThreadUnarchiveResponse__MessagePhase = "commentary" | "final_answer";
11759 -export const V2ThreadUnarchiveResponse__MessagePhase = Schema.Union(
13991 +export type V2ThreadTurnsListResponse__MessagePhase = "commentary" | "final_answer";
13992 +export const V2ThreadTurnsListResponse__MessagePhase = Schema.Union(
13993 [
13994 Schema.Literal("commentary").annotate({
13995 description:
@@ -11770,43 +14003,52 @@ export const V2ThreadUnarchiveResponse__MessagePhase = Schema.Union(
14003 ).annotate({
14004 description:
14005 'Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as "phase unknown" and keep compatibility behavior for legacy models.',
11773 - identifier: "V2ThreadUnarchiveResponse__MessagePhase",
14006 + identifier: "V2ThreadTurnsListResponse__MessagePhase",
14007 });
14008
11776 -export type V2ThreadUnarchiveResponse__LegacyAppPathString = string;
11777 -export const V2ThreadUnarchiveResponse__LegacyAppPathString = Schema.String.annotate({
11778 - identifier: "V2ThreadUnarchiveResponse__LegacyAppPathString",
14009 +export type V2ThreadTurnsListResponse__AsyncUserInputQuestion = {
14010 + readonly options?: ReadonlyArray<string> | null;
14011 + readonly title: string;
14012 +};
14013 +export const V2ThreadTurnsListResponse__AsyncUserInputQuestion = Schema.Struct({
14014 + options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
14015 + title: Schema.String,
14016 +}).annotate({ identifier: "V2ThreadTurnsListResponse__AsyncUserInputQuestion" });
14017 +
14018 +export type V2ThreadTurnsListResponse__LegacyAppPathString = string;
14019 +export const V2ThreadTurnsListResponse__LegacyAppPathString = Schema.String.annotate({
14020 + identifier: "V2ThreadTurnsListResponse__LegacyAppPathString",
14021 });
14022
11781 -export type V2ThreadUnarchiveResponse__CommandExecutionSource =
14023 +export type V2ThreadTurnsListResponse__CommandExecutionSource =
14024 | "agent"
14025 | "userShell"
14026 | "unifiedExecStartup"
14027 | "unifiedExecInteraction";
11786 -export const V2ThreadUnarchiveResponse__CommandExecutionSource = Schema.Literals([
14028 +export const V2ThreadTurnsListResponse__CommandExecutionSource = Schema.Literals([
14029 "agent",
14030 "userShell",
14031 "unifiedExecStartup",
14032 "unifiedExecInteraction",
11791 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__CommandExecutionSource" });
14033 +]).annotate({ identifier: "V2ThreadTurnsListResponse__CommandExecutionSource" });
14034
11793 -export type V2ThreadUnarchiveResponse__CommandExecutionStatus =
14035 +export type V2ThreadTurnsListResponse__CommandExecutionStatus =
14036 | "inProgress"
14037 | "completed"
14038 | "failed"
14039 | "declined";
11798 -export const V2ThreadUnarchiveResponse__CommandExecutionStatus = Schema.Literals([
14040 +export const V2ThreadTurnsListResponse__CommandExecutionStatus = Schema.Literals([
14041 "inProgress",
14042 "completed",
14043 "failed",
14044 "declined",
11803 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__CommandExecutionStatus" });
14045 +]).annotate({ identifier: "V2ThreadTurnsListResponse__CommandExecutionStatus" });
14046
11805 -export type V2ThreadUnarchiveResponse__PatchChangeKind =
14047 +export type V2ThreadTurnsListResponse__PatchChangeKind =
14048 | { readonly type: "add" }
14049 | { readonly type: "delete" }
14050 | { readonly move_path?: string | null; readonly type: "update" };
11809 -export const V2ThreadUnarchiveResponse__PatchChangeKind = Schema.Union(
14051 +export const V2ThreadTurnsListResponse__PatchChangeKind = Schema.Union(
14052 [
14053 Schema.Struct({
14054 type: Schema.Literal("add").annotate({ title: "AddPatchChangeKindType" }),
@@ -11820,63 +14062,69 @@ export const V2ThreadUnarchiveResponse__PatchChangeKind = Schema.Union(
14062 }).annotate({ title: "UpdatePatchChangeKind" }),
14063 ],
14064 { mode: "oneOf" },
11823 -).annotate({ identifier: "V2ThreadUnarchiveResponse__PatchChangeKind" });
14065 +).annotate({ identifier: "V2ThreadTurnsListResponse__PatchChangeKind" });
14066
11825 -export type V2ThreadUnarchiveResponse__PatchApplyStatus =
14067 +export type V2ThreadTurnsListResponse__PatchApplyStatus =
14068 | "inProgress"
14069 | "completed"
14070 | "failed"
14071 | "declined";
11830 -export const V2ThreadUnarchiveResponse__PatchApplyStatus = Schema.Literals([
14072 +export const V2ThreadTurnsListResponse__PatchApplyStatus = Schema.Literals([
14073 "inProgress",
14074 "completed",
14075 "failed",
14076 "declined",
11835 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__PatchApplyStatus" });
14077 +]).annotate({ identifier: "V2ThreadTurnsListResponse__PatchApplyStatus" });
14078
11837 -export type V2ThreadUnarchiveResponse__McpToolCallAppContext = {
14079 +export type V2ThreadTurnsListResponse__McpToolCallAppContext = {
14080 readonly actionName?: string | null;
14081 readonly appName?: string | null;
14082 readonly connectorId: string;
14083 readonly linkId?: string | null;
14084 readonly resourceUri?: string | null;
14085 };
11844 -export const V2ThreadUnarchiveResponse__McpToolCallAppContext = Schema.Struct({
14086 +export const V2ThreadTurnsListResponse__McpToolCallAppContext = Schema.Struct({
14087 actionName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14088 appName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14089 connectorId: Schema.String,
14090 linkId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14091 resourceUri: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11850 -}).annotate({ identifier: "V2ThreadUnarchiveResponse__McpToolCallAppContext" });
14092 +}).annotate({ identifier: "V2ThreadTurnsListResponse__McpToolCallAppContext" });
14093
11852 -export type V2ThreadUnarchiveResponse__McpToolCallError = { readonly message: string };
11853 -export const V2ThreadUnarchiveResponse__McpToolCallError = Schema.Struct({
14094 +export type V2ThreadTurnsListResponse__McpToolCallError = { readonly message: string };
14095 +export const V2ThreadTurnsListResponse__McpToolCallError = Schema.Struct({
14096 message: Schema.String,
11855 -}).annotate({ identifier: "V2ThreadUnarchiveResponse__McpToolCallError" });
14097 +}).annotate({ identifier: "V2ThreadTurnsListResponse__McpToolCallError" });
14098
11857 -export type V2ThreadUnarchiveResponse__McpToolCallResult = {
14099 +export type V2ThreadTurnsListResponse__McpAppDisplayMode = "inline" | "fullscreen";
14100 +export const V2ThreadTurnsListResponse__McpAppDisplayMode = Schema.Literals([
14101 + "inline",
14102 + "fullscreen",
14103 +]).annotate({ identifier: "V2ThreadTurnsListResponse__McpAppDisplayMode" });
14104 +
14105 +export type V2ThreadTurnsListResponse__McpToolCallResult = {
14106 readonly _meta?: Schema.Json;
14107 readonly content: ReadonlyArray<Schema.Json>;
14108 readonly structuredContent?: Schema.Json;
14109 };
11862 -export const V2ThreadUnarchiveResponse__McpToolCallResult = Schema.Struct({
14110 +export const V2ThreadTurnsListResponse__McpToolCallResult = Schema.Struct({
14111 _meta: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
14112 content: Schema.Array(Schema.Json.annotate({ expected: "JSON value" })),
14113 structuredContent: Schema.optionalKey(Schema.Json.annotate({ expected: "JSON value" })),
11866 -}).annotate({ identifier: "V2ThreadUnarchiveResponse__McpToolCallResult" });
14114 +}).annotate({ identifier: "V2ThreadTurnsListResponse__McpToolCallResult" });
14115
11868 -export type V2ThreadUnarchiveResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
11869 -export const V2ThreadUnarchiveResponse__McpToolCallStatus = Schema.Literals([
14116 +export type V2ThreadTurnsListResponse__McpToolCallStatus = "inProgress" | "completed" | "failed";
14117 +export const V2ThreadTurnsListResponse__McpToolCallStatus = Schema.Literals([
14118 "inProgress",
14119 "completed",
14120 "failed",
11873 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__McpToolCallStatus" });
14121 +]).annotate({ identifier: "V2ThreadTurnsListResponse__McpToolCallStatus" });
14122
11875 -export type V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem =
14123 +export type V2ThreadTurnsListResponse__DynamicToolCallOutputContentItem =
14124 | { readonly text: string; readonly type: "inputText" }
14125 | { readonly imageUrl: string; readonly type: "inputImage" }
14126 | { readonly audioUrl: string; readonly type: "inputAudio" };
11879 -export const V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem = Schema.Union(
14127 +export const V2ThreadTurnsListResponse__DynamicToolCallOutputContentItem = Schema.Union(
14128 [
14129 Schema.Struct({
14130 text: Schema.String,
@@ -11898,19 +14146,19 @@ export const V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem = Schem
14146 }).annotate({ title: "InputAudioDynamicToolCallOutputContentItem" }),
14147 ],
14148 { mode: "oneOf" },
11901 -).annotate({ identifier: "V2ThreadUnarchiveResponse__DynamicToolCallOutputContentItem" });
14149 +).annotate({ identifier: "V2ThreadTurnsListResponse__DynamicToolCallOutputContentItem" });
14150
11903 -export type V2ThreadUnarchiveResponse__DynamicToolCallStatus =
14151 +export type V2ThreadTurnsListResponse__DynamicToolCallStatus =
14152 | "inProgress"
14153 | "completed"
14154 | "failed";
11907 -export const V2ThreadUnarchiveResponse__DynamicToolCallStatus = Schema.Literals([
14155 +export const V2ThreadTurnsListResponse__DynamicToolCallStatus = Schema.Literals([
14156 "inProgress",
14157 "completed",
14158 "failed",
11911 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__DynamicToolCallStatus" });
14159 +]).annotate({ identifier: "V2ThreadTurnsListResponse__DynamicToolCallStatus" });
14160
11913 -export type V2ThreadUnarchiveResponse__CollabAgentStatus =
14161 +export type V2ThreadTurnsListResponse__CollabAgentStatus =
14162 | "pendingInit"
14163 | "running"
14164 | "interrupted"
@@ -11918,7 +14166,7 @@ export type V2ThreadUnarchiveResponse__CollabAgentStatus =
14166 | "errored"
14167 | "shutdown"
14168 | "notFound";
11921 -export const V2ThreadUnarchiveResponse__CollabAgentStatus = Schema.Literals([
14169 +export const V2ThreadTurnsListResponse__CollabAgentStatus = Schema.Literals([
14170 "pendingInit",
14171 "running",
14172 "interrupted",
@@ -11926,31 +14174,31 @@ export const V2ThreadUnarchiveResponse__CollabAgentStatus = Schema.Literals([
14174 "errored",
14175 "shutdown",
14176 "notFound",
11929 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__CollabAgentStatus" });
14177 +]).annotate({ identifier: "V2ThreadTurnsListResponse__CollabAgentStatus" });
14178
11931 -export type V2ThreadUnarchiveResponse__ReasoningEffort = string;
11932 -export const V2ThreadUnarchiveResponse__ReasoningEffort = Schema.String.annotate({
14179 +export type V2ThreadTurnsListResponse__ReasoningEffort = string;
14180 +export const V2ThreadTurnsListResponse__ReasoningEffort = Schema.String.annotate({
14181 description: "A non-empty reasoning effort value advertised by the model.",
14182 }).check(
14183 Schema.isMinLength(1).annotate({
14184 expected: "a value with a length of at least 1",
11937 - identifier: "V2ThreadUnarchiveResponse__ReasoningEffort",
14185 + identifier: "V2ThreadTurnsListResponse__ReasoningEffort",
14186 }),
14187 );
14188
11941 -export type V2ThreadUnarchiveResponse__CollabAgentToolCallStatus =
14189 +export type V2ThreadTurnsListResponse__CollabAgentToolCallStatus =
14190 | "inProgress"
14191 | "completed"
14192 | "failed"
14193 | "interrupted";
11946 -export const V2ThreadUnarchiveResponse__CollabAgentToolCallStatus = Schema.Literals([
14194 +export const V2ThreadTurnsListResponse__CollabAgentToolCallStatus = Schema.Literals([
14195 "inProgress",
14196 "completed",
14197 "failed",
14198 "interrupted",
11951 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__CollabAgentToolCallStatus" });
14199 +]).annotate({ identifier: "V2ThreadTurnsListResponse__CollabAgentToolCallStatus" });
14200
11953 -export type V2ThreadUnarchiveResponse__CollabAgentTool =
14201 +export type V2ThreadTurnsListResponse__CollabAgentTool =
14202 | "spawnAgent"
14203 | "sendInput"
14204 | "resumeAgent"
@@ -11960,7 +14208,7 @@ export type V2ThreadUnarchiveResponse__CollabAgentTool =
14208 | "followupTask"
14209 | "interruptAgent"
14210 | "listAgents";
11963 -export const V2ThreadUnarchiveResponse__CollabAgentTool = Schema.Literals([
14211 +export const V2ThreadTurnsListResponse__CollabAgentTool = Schema.Literals([
14212 "spawnAgent",
14213 "sendInput",
14214 "resumeAgent",
@@ -11970,21 +14218,21 @@ export const V2ThreadUnarchiveResponse__CollabAgentTool = Schema.Literals([
14218 "followupTask",
14219 "interruptAgent",
14220 "listAgents",
11973 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__CollabAgentTool" });
14221 +]).annotate({ identifier: "V2ThreadTurnsListResponse__CollabAgentTool" });
14222
11975 -export type V2ThreadUnarchiveResponse__SubAgentActivityKind =
14223 +export type V2ThreadTurnsListResponse__SubAgentActivityKind =
14224 | "started"
14225 | "interacted"
14226 | "interrupted"
14227 | "completed";
11980 -export const V2ThreadUnarchiveResponse__SubAgentActivityKind = Schema.Literals([
14228 +export const V2ThreadTurnsListResponse__SubAgentActivityKind = Schema.Literals([
14229 "started",
14230 "interacted",
14231 "interrupted",
14232 "completed",
11985 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__SubAgentActivityKind" });
14233 +]).annotate({ identifier: "V2ThreadTurnsListResponse__SubAgentActivityKind" });
14234
11987 -export type V2ThreadUnarchiveResponse__WebSearchAction =
14235 +export type V2ThreadTurnsListResponse__WebSearchAction =
14236 | {
14237 readonly queries?: ReadonlyArray<string> | null;
14238 readonly query?: string | null;
@@ -11993,7 +14241,7 @@ export type V2ThreadUnarchiveResponse__WebSearchAction =
14241 | { readonly type: "openPage"; readonly url?: string | null }
14242 | { readonly pattern?: string | null; readonly type: "findInPage"; readonly url?: string | null }
14243 | { readonly type: "other" };
11996 -export const V2ThreadUnarchiveResponse__WebSearchAction = Schema.Union(
14244 +export const V2ThreadTurnsListResponse__WebSearchAction = Schema.Union(
14245 [
14246 Schema.Struct({
14247 queries: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
@@ -12014,10 +14262,42 @@ export const V2ThreadUnarchiveResponse__WebSearchAction = Schema.Union(
14262 }).annotate({ title: "OtherWebSearchAction" }),
14263 ],
14264 { mode: "oneOf" },
12017 -).annotate({ identifier: "V2ThreadUnarchiveResponse__WebSearchAction" });
14265 +).annotate({ identifier: "V2ThreadTurnsListResponse__WebSearchAction" });
14266
12019 -export type V2ThreadUnarchiveResponse__TurnItemsView = "notLoaded" | "summary" | "full";
12020 -export const V2ThreadUnarchiveResponse__TurnItemsView = Schema.Union(
14267 +export type V2ThreadTurnsListResponse__ImageGenerationFailure = {
14268 + readonly limitId: string;
14269 + readonly resetsAt?: number | null;
14270 + readonly type: "usageLimitExceeded";
14271 +};
14272 +export const V2ThreadTurnsListResponse__ImageGenerationFailure = Schema.Union(
14273 + [
14274 + Schema.Struct({
14275 + limitId: Schema.String,
14276 + resetsAt: Schema.optionalKey(
14277 + Schema.Union([
14278 + Schema.Number.annotate({ format: "int64" }).check(
14279 + Schema.isInt().annotate({ expected: "an integer" }),
14280 + ),
14281 + Schema.Null,
14282 + ]),
14283 + ),
14284 + type: Schema.Literal("usageLimitExceeded").annotate({
14285 + title: "UsageLimitExceededImageGenerationFailureType",
14286 + }),
14287 + }).annotate({ title: "UsageLimitExceededImageGenerationFailure" }),
14288 + ],
14289 + { mode: "oneOf" },
14290 +).annotate({ identifier: "V2ThreadTurnsListResponse__ImageGenerationFailure" });
14291 +
14292 +export type V2ThreadTurnsListResponse__AbsolutePathBuf = string;
14293 +export const V2ThreadTurnsListResponse__AbsolutePathBuf = Schema.String.annotate({
14294 + description:
14295 + "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.",
14296 + identifier: "V2ThreadTurnsListResponse__AbsolutePathBuf",
14297 +});
14298 +
14299 +export type V2ThreadTurnsListResponse__TurnItemsView = "notLoaded" | "summary" | "full";
14300 +export const V2ThreadTurnsListResponse__TurnItemsView = Schema.Union(
14301 [
14302 Schema.Literal("notLoaded").annotate({
14303 description: "`items` was not loaded for this turn. The field is intentionally empty.",
@@ -12031,41 +14311,102 @@ export const V2ThreadUnarchiveResponse__TurnItemsView = Schema.Union(
14311 }),
14312 ],
14313 { mode: "oneOf" },
12034 -).annotate({ identifier: "V2ThreadUnarchiveResponse__TurnItemsView" });
14314 +).annotate({ identifier: "V2ThreadTurnsListResponse__TurnItemsView" });
14315
12036 -export type V2ThreadUnarchiveResponse__TurnStatus =
14316 +export type V2ThreadTurnsListResponse__TurnStatus =
14317 | "completed"
14318 | "interrupted"
14319 | "failed"
14320 | "inProgress";
12041 -export const V2ThreadUnarchiveResponse__TurnStatus = Schema.Literals([
14321 +export const V2ThreadTurnsListResponse__TurnStatus = Schema.Literals([
14322 "completed",
14323 "interrupted",
14324 "failed",
14325 "inProgress",
12046 -]).annotate({ identifier: "V2ThreadUnarchiveResponse__TurnStatus" });
14326 +]).annotate({ identifier: "V2ThreadTurnsListResponse__TurnStatus" });
14327
12048 -export type V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus =
12049 - | "notLoaded"
12050 - | "notSubscribed"
12051 - | "unsubscribed";
12052 -export const V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus = Schema.Literals([
12053 - "notLoaded",
12054 - "notSubscribed",
12055 - "unsubscribed",
12056 -]).annotate({ identifier: "V2ThreadUnsubscribeResponse__ThreadUnsubscribeStatus" });
14328 +export type V2ThreadUnarchiveResponse__AbsolutePathBuf = string;
14329 +export const V2ThreadUnarchiveResponse__AbsolutePathBuf = Schema.String.annotate({
14330 + description:
14331 + "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.",
14332 + identifier: "V2ThreadUnarchiveResponse__AbsolutePathBuf",
14333 +});
14334
12058 -export type V2TurnCompletedNotification__NonSteerableTurnKind = "review" | "compact";
12059 -export const V2TurnCompletedNotification__NonSteerableTurnKind = Schema.Literals([
14335 +export type V2ThreadUnarchiveResponse__GitInfo = {
14336 + readonly branch?: string | null;
14337 + readonly originUrl?: string | null;
14338 + readonly sha?: string | null;
14339 +};
14340 +export const V2ThreadUnarchiveResponse__GitInfo = Schema.Struct({
14341 + branch: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14342 + originUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14343 + sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14344 +}).annotate({ identifier: "V2ThreadUnarchiveResponse__GitInfo" });
14345 +
14346 +export type V2ThreadUnarchiveResponse__ThreadHistoryMode = "legacy" | "paginated";
14347 +export const V2ThreadUnarchiveResponse__ThreadHistoryMode = Schema.Literals([
14348 + "legacy",
14349 + "paginated",
14350 +]).annotate({ identifier: "V2ThreadUnarchiveResponse__ThreadHistoryMode" });
14351 +
14352 +export type V2ThreadUnarchiveResponse__ReasoningEffort = string;
14353 +export const V2ThreadUnarchiveResponse__ReasoningEffort = Schema.String.annotate({
14354 + description: "A non-empty reasoning effort value advertised by the model.",
14355 +}).check(
14356 + Schema.isMinLength(1).annotate({
14357 + expected: "a value with a length of at least 1",
14358 + identifier: "V2ThreadUnarchiveResponse__ReasoningEffort",
14359 + }),
14360 +);
14361 +
14362 +export type V2ThreadUnarchiveResponse__ThreadSectionAppearance = {
14363 + readonly color?: string | null;
14364 + readonly icon?: string | null;
14365 +};
14366 +export const V2ThreadUnarchiveResponse__ThreadSectionAppearance = Schema.Struct({
14367 + color: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14368 + icon: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
14369 +}).annotate({
14370 + description: "Extensible visual presentation for a custom thread section.",
14371 + identifier: "V2ThreadUnarchiveResponse__ThreadSectionAppearance",
14372 +});
14373 +
14374 +export type V2ThreadUnarchiveResponse__AgentPath = string;
14375 +export const V2ThreadUnarchiveResponse__AgentPath = Schema.String.annotate({
14376 + identifier: "V2ThreadUnarchiveResponse__AgentPath",
14377 +});
14378 +
14379 +export type V2ThreadUnarchiveResponse__ThreadId = string;
14380 +export const V2ThreadUnarchiveResponse__ThreadId = Schema.String.annotate({
14381 + identifier: "V2ThreadUnarchiveResponse__ThreadId",
14382 +});
14383 +
14384 +export type V2ThreadUnarchiveResponse__ThreadActiveFlag =
14385 + | "waitingOnApproval"
14386 + | "waitingOnUserInput";
14387 +export const V2ThreadUnarchiveResponse__ThreadActiveFlag = Schema.Literals([
14388 + "waitingOnApproval",
14389 + "waitingOnUserInput",
14390 +]).annotate({ identifier: "V2ThreadUnarchiveResponse__ThreadActiveFlag" });
14391 +
14392 +export type V2ThreadUnarchiveResponse__ThreadSource = string;
14393 +export const V2ThreadUnarchiveResponse__ThreadSource = Schema.String.annotate({
14394 + identifier: "V2ThreadUnarchiveResponse__ThreadSource",
14395 +});
14396 +
14397 +export type V2ThreadUnarchiveResponse__NonSteerableTurnKind = "review" | "compact";
14398 +export const V2ThreadUnarchiveResponse__NonSteerableTurnKind = Schema.Literals([
14399 "review",
14400 "compact",
12062 -]).annotate({ identifier: "V2TurnCompletedNotification__NonSteerableTurnKind" });
14401 +]).annotate({ identifier: "V2ThreadUnarchiveResponse__NonSteerableTurnKind" });
14402
12064 -export type V2TurnCompletedNotification__ByteRange = {
12065 - readonly end: number;
12066 - readonly start: number;
12067 -};
12068 -export const V2TurnCompletedNotification__ByteRange = Schema.Struct({
14403 +export type V2ThreadUnarchiveResponse__MisalignmentSteer = { readonly message: string };
14404 +export const V2ThreadUnarchiveResponse__MisalignmentSteer = Schema.Struct({
14405 + message: Schema.String,
14406 +}).annotate({ identifier: "V2ThreadUnarchiveResponse__MisalignmentSteer" });
14407 +
14408 +export type V2ThreadUnarchiveResponse__ByteRange = { readonly end: number; readonly start: number };
14409 +export const V2ThreadUnarchiveResponse__ByteRange = Schema.Struct({
14410 end: Schema.Number.annotate({ format: "uint" })
14411 .check(Schema.isInt().annotate({ expected: "an integer" }))
14412 .check(
@@ -12076,32 +14417,37 @@ export const V2TurnCompletedNotification__ByteRange = Schema.Struct({
14417 .check(
14418 Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }),
14419 ),
12079 -}).annotate({ identifier: "V2TurnCompletedNotification__ByteRange" });
14420 +}).annotate({ identifier: "V2ThreadUnarchiveResponse__ByteRange" });
14421
12081 -export type V2TurnCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original";
12082 -export const V2TurnCompletedNotification__ImageDetail = Schema.Literals([
14422 +export type V2ThreadUnarchiveResponse__ImageDetail = "auto" | "low" | "high" | "original";
14423 +export const V2ThreadUnarchiveResponse__ImageDetail = Schema.Literals([
14424 "auto",
14425 "low",
14426 "high",
14427 "original",
12087 -]).annotate({ identifier: "V2TurnCompletedNotification__ImageDetail" });
14428 +]).annotate({ identifier: "V2ThreadUnarchiveResponse__ImageDetail" });
14429
12089 -export type V2TurnCompletedNotification__HookPromptFragment = {
14430 +export type V2ThreadUnarchiveResponse__HookPromptFragment = {
14431 readonly hookRunId: string;
14432 readonly text: string;
14433 };
12093 -export const V2TurnCompletedNotification__HookPromptFragment = Schema.Struct({
14434 +export const V2ThreadUnarchiveResponse__HookPromptFragment = Schema.Struct({
14435 hookRunId: Schema.String,
14436 text: Schema.String,
12096 -}).annotate({ identifier: "V2TurnCompletedNotification__HookPromptFragment" });
14437 +}).annotate({ identifier: "V2ThreadUnarchiveResponse__HookPromptFragment" });
14438
12098 -export type V2TurnCompletedNotification__MemoryCitationEntry = {
14439 +export type V2ThreadUnarchiveResponse__AgentMessageDelivery = "async";
14440 +export const V2ThreadUnarchiveResponse__AgentMessageDelivery = Schema.Literal("async").annotate({
14441 + identifier: "V2ThreadUnarchiveResponse__AgentMessageDelivery",
14442 +});
14443 +
14444 +export type V2ThreadUnarchiveResponse__MemoryCitationEntry = {
14445 readonly lineEnd: number;
14446 readonly lineStart: number;
14447 readonly note: string;
14448 readonly path: string;
14449 };
12104 -export const V2TurnCompletedNotification__MemoryCitationEntry = Schema.Struct({
14450 +export const V2ThreadUnarchiveResponse__MemoryCitationEntry = Schema.Struct({
14451 lineEnd: Schema.Number.annotate({ format: "uint32" })
14452 .check(Schema.isInt().annotate({ expected: "an integer" }))
14453 .check(
@@ -12114,10 +14460,10 @@ export const V2TurnCompletedNotification__MemoryCitationEntry = Schema.Struct({
14460 ),
14461 note: Schema.String,
14462 path: Schema.String,
12117 -}).annotate({ identifier: "V2TurnCompletedNotification__MemoryCitationEntry" });
14463 +}).annotate({ identifier: "V2ThreadUnarchiveResponse__MemoryCitationEntry" });
14464
12119 -export type V2TurnCompletedNotification__MessagePhase = "commentary" | "final_answer";
12120 -export const V2TurnCompletedNotification__MessagePhase = Schema.Union(
14465 +export type V2ThreadUnarchiveResponse__MessagePhase = "commentary" | "final_answer";
14466 +export const V2ThreadUnarchiveResponse__MessagePhase = Schema.Union(
14467 [
14468 Schema.Literal("commentary").annotate({
14469 description:
@@ -12131,50 +14477,52 @@ export const V2TurnCompletedNotification__MessagePhase = Schema.Union(
14477 ).annotate({

This file is too large to show in full.

packages/effect-codex-app-server/src/client.test.ts
+1
@@ -95,6 +95,7 @@ it.layer(NodeServices.layer)("effect-codex-app-server client", (it) => {
95 assert.equal(result.skills.data[0]?.skills.length, 0);
96 assert.deepEqual(yield* Ref.get(userInputRequests), [
97 {
98 + isBlocking: true,
99 itemId: "item-approval-1",
100 threadId: "thread-1",
101 turnId: "turn-1",
packages/effect-codex-app-server/src/schema.test.ts
+3 -3
@@ -6,7 +6,6 @@ import * as CodexSchema from "./schema.ts";
6 const isGetAccountResponse = Schema.is(CodexSchema.V2GetAccountResponse);
7 const isThreadReadResponse = Schema.is(CodexSchema.V2ThreadReadResponse);
8 const isThreadResumeResponse = Schema.is(CodexSchema.V2ThreadResumeResponse);
9 -const isThreadRollbackResponse = Schema.is(CodexSchema.V2ThreadRollbackResponse);
9 const isThreadForkResponse = Schema.is(CodexSchema.V2ThreadForkResponse);
10 const isTurnCompletedNotification = Schema.is(CodexSchema.V2TurnCompletedNotification);
11 const decodeThreadResumeResponse = Schema.decodeUnknownSync(CodexSchema.V2ThreadResumeResponse);
@@ -76,6 +75,7 @@ it("accepts Codex 0.150 multi-agent values", () => {
75 id: "root-thread",
76 modelProvider: "openai",
77 preview: "",
78 + projectId: null,
79 sessionId: "session-1",
80 source: "cli",
81 status: { type: "idle" },
@@ -112,6 +112,7 @@ it("accepts Codex rate limit errors for thread responses", () => {
112 id: "thread-1",
113 modelProvider: "openai",
114 preview: "",
115 + projectId: null,
116 sessionId: "session-1",
117 source: "cli",
118 status: { type: "idle" },
@@ -141,7 +142,6 @@ it("accepts Codex rate limit errors for thread responses", () => {
142 }),
143 true,
144 );
144 - assert.equal(isThreadRollbackResponse({ thread: failedThread }), true);
145 });
146
147 it("accepts Codex misalignment policy errors for thread responses", () => {
@@ -153,6 +153,7 @@ it("accepts Codex misalignment policy errors for thread responses", () => {
153 id: "thread-1",
154 modelProvider: "openai",
155 preview: "",
156 + projectId: null,
157 sessionId: "session-1",
158 source: "cli",
159 status: { type: "idle" },
@@ -180,7 +181,6 @@ it("accepts Codex misalignment policy errors for thread responses", () => {
181 };
182 assert.equal(isThreadReadResponse({ thread: failedThread }), true);
183 assert.equal(isThreadResumeResponse(resumeLikeResponse), true);
183 - assert.equal(isThreadRollbackResponse({ thread: failedThread }), true);
184 assert.equal(isThreadForkResponse(resumeLikeResponse), true);
185 const decodedResume = decodeThreadResumeResponse(resumeLikeResponse);
186 assert.equal(decodedResume.thread.turns[0]?.error?.codexErrorInfo, "misalignmentPolicyViolation");
packages/effect-codex-app-server/test/fixtures/codex-app-server-mock-peer.ts
+1
@@ -84,6 +84,7 @@ const handleMethod = (message: Record<string, unknown>) => {
84 case "skills/list": {
85 pendingSkillsListRequestId = message.id as number | string;
86 pendingUserInputRequestId = sendRequest("item/tool/requestUserInput", {
87 + isBlocking: true,
88 itemId: "item-approval-1",
89 threadId: "thread-1",
90 turnId: "turn-1",