The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 03:45 UTC
[codex] Sync app-server protocol, service tiers, and provider startup (#3036)
Co-authored-by: codex <codex@users.noreply.github.com>
Julius Marminge committed
Jun 10, 2026 at 16:24 UTC
ae7e88b0e0bc4acac33bec4f6e798a7ad96500a1
20 files changed
+4233
-2079
apps/server/src/codexModelOptions.test.ts
new
+22
@@ -0,0 +1,22 @@
1
+import { assert, it } from "@effect/vitest";
2
+
3
+import { ProviderInstanceId } from "@t3tools/contracts";
4
+import { createModelSelection } from "@t3tools/shared/model";
5
+
6
+import { getCodexServiceTierOptionValue } from "./codexModelOptions.ts";
7
+
8
+it("returns the selected Codex service tier id", () => {
9
+ const selection = createModelSelection(ProviderInstanceId.make("codex"), "gpt-5.5", [
10
+ { id: "serviceTier", value: "flex" },
11
+ ]);
12
+
13
+ assert.equal(getCodexServiceTierOptionValue(selection), "flex");
14
+});
15
+
16
+it("keeps legacy persisted fast mode selections working", () => {
17
+ const selection = createModelSelection(ProviderInstanceId.make("codex"), "gpt-5.4", [
18
+ { id: "fastMode", value: true },
19
+ ]);
20
+
21
+ assert.equal(getCodexServiceTierOptionValue(selection), "fast");
22
+});
apps/server/src/codexModelOptions.ts
new
+14
@@ -0,0 +1,14 @@
1
+import type { ModelSelection } from "@t3tools/contracts";
2
+import {
3
+ getModelSelectionBooleanOptionValue,
4
+ getModelSelectionStringOptionValue,
5
+} from "@t3tools/shared/model";
6
+
7
+export function getCodexServiceTierOptionValue(
8
+ modelSelection: ModelSelection | null | undefined,
9
+): string | undefined {
10
+ return (
11
+ getModelSelectionStringOptionValue(modelSelection, "serviceTier") ??
12
+ (getModelSelectionBooleanOptionValue(modelSelection, "fastMode") === true ? "fast" : undefined)
13
+ );
14
+}
apps/server/src/provider/Layers/CodexAdapter.test.ts
+6
-6
@@ -271,7 +271,7 @@ validationLayer("CodexAdapterLive validation", (it) => {
271
provider: ProviderDriverKind.make("codex"),
272
threadId: asThreadId("thread-1"),
273
modelSelection: createModelSelection(ProviderInstanceId.make("codex"), "gpt-5.3-codex", [
274
- { id: "fastMode", value: true },
274
+ { id: "serviceTier", value: "priority" },
275
]),
276
runtimeMode: "full-access",
277
});
@@ -281,7 +281,7 @@ validationLayer("CodexAdapterLive validation", (it) => {
281
cwd: process.cwd(),
282
model: "gpt-5.3-codex",
283
providerInstanceId: ProviderInstanceId.make("codex"),
284
- serviceTier: "fast",
284
+ serviceTier: "priority",
285
threadId: asThreadId("thread-1"),
286
runtimeMode: "full-access",
287
});
@@ -344,7 +344,7 @@ sessionErrorLayer("CodexAdapterLive session errors", (it) => {
344
input: "hello",
345
modelSelection: createModelSelection(ProviderInstanceId.make("codex"), "gpt-5.3-codex", [
346
{ id: "reasoningEffort", value: "high" },
347
- { id: "fastMode", value: true },
347
+ { id: "serviceTier", value: "priority" },
348
]),
349
attachments: [],
350
}),
@@ -354,7 +354,7 @@ sessionErrorLayer("CodexAdapterLive session errors", (it) => {
354
input: "hello",
355
model: "gpt-5.3-codex",
356
effort: "high",
357
- serviceTier: "fast",
357
+ serviceTier: "priority",
358
});
359
}),
360
);
@@ -398,7 +398,7 @@ sessionErrorLayer("CodexAdapterLive session errors", (it) => {
398
"gpt-5.3-codex",
399
[
400
{ id: "reasoningEffort", value: "high" },
401
- { id: "fastMode", value: true },
401
+ { id: "serviceTier", value: "flex" },
402
],
403
),
404
attachments: [],
@@ -409,7 +409,7 @@ sessionErrorLayer("CodexAdapterLive session errors", (it) => {
409
input: "hello",
410
model: "gpt-5.3-codex",
411
effort: "high",
412
- serviceTier: "fast",
412
+ serviceTier: "flex",
413
});
414
}).pipe(Effect.provide(customLayer));
415
});
apps/server/src/provider/Layers/CodexAdapter.ts
+10
-11
@@ -37,10 +37,8 @@ import { ChildProcessSpawner } from "effect/unstable/process";
37
import * as CodexErrors from "effect-codex-app-server/errors";
38
import * as EffectCodexSchema from "effect-codex-app-server/schema";
39
40
-import {
41
- getModelSelectionBooleanOptionValue,
42
- getModelSelectionStringOptionValue,
43
-} from "@t3tools/shared/model";
40
+import { getModelSelectionStringOptionValue } from "@t3tools/shared/model";
41
+import { getCodexServiceTierOptionValue } from "../../codexModelOptions.ts";
42
43
import {
44
ProviderAdapterRequestError,
@@ -1380,6 +1378,10 @@ export const makeCodexAdapter = Effect.fn("makeCodexAdapter")(function* (
1378
yield* Effect.suspend(() => stopSessionInternal(existing));
1379
}
1380
1381
+ const serviceTier =
1382
+ input.modelSelection?.instanceId === boundInstanceId
1383
+ ? getCodexServiceTierOptionValue(input.modelSelection)
1384
+ : undefined;
1385
const runtimeInput: CodexSessionRuntimeOptions = {
1386
threadId: input.threadId,
1387
providerInstanceId: boundInstanceId,
@@ -1394,10 +1396,7 @@ export const makeCodexAdapter = Effect.fn("makeCodexAdapter")(function* (
1396
...(input.modelSelection?.instanceId === boundInstanceId
1397
? { model: input.modelSelection.model }
1398
: {}),
1397
- ...(input.modelSelection?.instanceId === boundInstanceId &&
1398
- getModelSelectionBooleanOptionValue(input.modelSelection, "fastMode") === true
1399
- ? { serviceTier: "fast" }
1400
- : {}),
1399
+ ...(serviceTier ? { serviceTier } : {}),
1400
};
1401
const sessionScope = yield* Scope.make("sequential");
1402
let sessionScopeTransferred = false;
@@ -1513,9 +1512,9 @@ export const makeCodexAdapter = Effect.fn("makeCodexAdapter")(function* (
1512
input.modelSelection?.instanceId === boundInstanceId
1513
? getModelSelectionStringOptionValue(input.modelSelection, "reasoningEffort")
1514
: undefined;
1516
- const fastMode =
1515
+ const serviceTier =
1516
input.modelSelection?.instanceId === boundInstanceId
1518
- ? getModelSelectionBooleanOptionValue(input.modelSelection, "fastMode")
1517
+ ? getCodexServiceTierOptionValue(input.modelSelection)
1518
: undefined;
1519
return yield* session.runtime
1520
.sendTurn({
@@ -1528,7 +1527,7 @@ export const makeCodexAdapter = Effect.fn("makeCodexAdapter")(function* (
1527
effort: reasoningEffort as EffectCodexSchema.V2TurnStartParams__ReasoningEffort,
1528
}
1529
: {}),
1531
- ...(fastMode === true ? { serviceTier: "fast" } : {}),
1530
+ ...(serviceTier ? { serviceTier } : {}),
1531
...(input.interactionMode !== undefined ? { interactionMode: input.interactionMode } : {}),
1532
...(codexAttachments.length > 0 ? { attachments: codexAttachments } : {}),
1533
})
apps/server/src/provider/Layers/CodexProvider.test.ts
new
+104
@@ -0,0 +1,104 @@
1
+import { assert, it } from "@effect/vitest";
2
+
3
+import { mapCodexModelCapabilities } from "./CodexProvider.ts";
4
+
5
+it("maps current Codex model capability fields", () => {
6
+ const capabilities = mapCodexModelCapabilities({
7
+ additionalSpeedTiers: [],
8
+ defaultReasoningEffort: "super-high",
9
+ description: "Test model",
10
+ displayName: "GPT Test",
11
+ hidden: false,
12
+ id: "gpt-test",
13
+ isDefault: true,
14
+ model: "gpt-test",
15
+ defaultServiceTier: "flex",
16
+ serviceTiers: [
17
+ {
18
+ id: "priority",
19
+ name: "Fast",
20
+ description: "Lower latency responses.",
21
+ },
22
+ {
23
+ id: "flex",
24
+ name: "Flex",
25
+ description: "Lower-cost asynchronous routing.",
26
+ },
27
+ ],
28
+ supportedReasoningEfforts: [
29
+ {
30
+ description: "Maximum reasoning",
31
+ reasoningEffort: "super-high",
32
+ },
33
+ ],
34
+ });
35
+
36
+ assert.deepStrictEqual(capabilities.optionDescriptors, [
37
+ {
38
+ id: "reasoningEffort",
39
+ label: "Reasoning",
40
+ type: "select",
41
+ options: [{ id: "super-high", label: "super-high", isDefault: true }],
42
+ currentValue: "super-high",
43
+ },
44
+ {
45
+ id: "serviceTier",
46
+ label: "Service Tier",
47
+ type: "select",
48
+ options: [
49
+ { id: "default", label: "Standard" },
50
+ {
51
+ id: "priority",
52
+ label: "Fast",
53
+ description: "Lower latency responses.",
54
+ },
55
+ {
56
+ id: "flex",
57
+ label: "Flex",
58
+ description: "Lower-cost asynchronous routing.",
59
+ isDefault: true,
60
+ },
61
+ ],
62
+ currentValue: "flex",
63
+ },
64
+ ]);
65
+});
66
+
67
+it("uses standard routing when the catalog has no default service tier", () => {
68
+ const capabilities = mapCodexModelCapabilities({
69
+ additionalSpeedTiers: ["fast"],
70
+ defaultReasoningEffort: "medium",
71
+ defaultServiceTier: null,
72
+ description: "Test model",
73
+ displayName: "GPT Test",
74
+ hidden: false,
75
+ id: "gpt-test",
76
+ isDefault: true,
77
+ model: "gpt-test",
78
+ serviceTiers: [
79
+ {
80
+ id: "priority",
81
+ name: "Fast",
82
+ description: "1.5x speed, increased usage",
83
+ },
84
+ ],
85
+ supportedReasoningEfforts: [],
86
+ });
87
+
88
+ assert.deepStrictEqual(capabilities.optionDescriptors, [
89
+ {
90
+ id: "serviceTier",
91
+ label: "Service Tier",
92
+ type: "select",
93
+ options: [
94
+ { id: "default", label: "Standard", isDefault: true },
95
+ {
96
+ id: "priority",
97
+ label: "Fast",
98
+ description: "1.5x speed, increased usage",
99
+ },
100
+ ],
101
+ currentValue: "default",
102
+ },
103
+ ]);
104
+});
apps/server/src/provider/Layers/CodexProvider.ts
+59
-27
@@ -17,6 +17,7 @@ import type {
17
ServerProvider,
18
ServerProviderState,
19
ModelCapabilities,
20
+ ProviderOptionDescriptor,
21
ServerProviderModel,
22
ServerProviderSkill,
23
} from "@t3tools/contracts";
@@ -44,7 +45,7 @@ export interface CodexAppServerProviderSnapshot {
45
readonly skills: ReadonlyArray<ServerProviderSkill>;
46
}
47
47
-const REASONING_EFFORT_LABELS: Record<CodexSchema.V2ModelListResponse__ReasoningEffort, string> = {
48
+const REASONING_EFFORT_LABELS: Readonly<Record<string, string>> = {
49
none: "None",
50
minimal: "Minimal",
51
low: "Low",
@@ -53,6 +54,12 @@ const REASONING_EFFORT_LABELS: Record<CodexSchema.V2ModelListResponse__Reasoning
54
xhigh: "Extra High",
55
};
56
57
+const DEFAULT_SERVICE_TIER_ID = "default";
58
+
59
+function reasoningEffortLabel(reasoningEffort: string): string {
60
+ return REASONING_EFFORT_LABELS[reasoningEffort] ?? reasoningEffort;
61
+}
62
+
63
function codexAccountAuthLabel(account: CodexSchema.V2GetAccountResponse["account"]) {
64
if (!account) return undefined;
65
if (account.type === "apiKey") return "OpenAI API Key";
@@ -93,46 +100,71 @@ function codexAccountEmail(account: CodexSchema.V2GetAccountResponse["account"])
100
return account.email;
101
}
102
96
-function mapCodexModelCapabilities(
103
+export function mapCodexModelCapabilities(
104
model: CodexSchema.V2ModelListResponse__Model,
105
): ModelCapabilities {
106
const reasoningOptions = model.supportedReasoningEfforts.map(({ reasoningEffort }) =>
107
reasoningEffort === model.defaultReasoningEffort
108
? {
109
id: reasoningEffort,
103
- label: REASONING_EFFORT_LABELS[reasoningEffort],
110
+ label: reasoningEffortLabel(reasoningEffort),
111
isDefault: true,
112
}
113
: {
114
id: reasoningEffort,
108
- label: REASONING_EFFORT_LABELS[reasoningEffort],
115
+ label: reasoningEffortLabel(reasoningEffort),
116
},
117
);
118
const defaultReasoning = reasoningOptions.find((option) => option.isDefault)?.id;
112
- const supportsFastMode = (model.additionalSpeedTiers ?? []).includes("fast");
119
+ const serviceTiers =
120
+ model.serviceTiers && model.serviceTiers.length > 0
121
+ ? model.serviceTiers
122
+ : (model.additionalSpeedTiers ?? []).map((id) => ({
123
+ id,
124
+ name: id === "fast" ? "Fast" : id,
125
+ description: "",
126
+ }));
127
+ const catalogDefaultServiceTier = serviceTiers.some(
128
+ (tier) => tier.id === model.defaultServiceTier,
129
+ )
130
+ ? model.defaultServiceTier
131
+ : null;
132
+ const defaultServiceTier = catalogDefaultServiceTier ?? DEFAULT_SERVICE_TIER_ID;
133
+ const optionDescriptors: ProviderOptionDescriptor[] = [];
134
+
135
+ if (reasoningOptions.length > 0) {
136
+ optionDescriptors.push({
137
+ id: "reasoningEffort",
138
+ label: "Reasoning",
139
+ type: "select",
140
+ options: reasoningOptions,
141
+ ...(defaultReasoning ? { currentValue: defaultReasoning } : {}),
142
+ });
143
+ }
144
+ if (serviceTiers.length > 0) {
145
+ optionDescriptors.push({
146
+ id: "serviceTier",
147
+ label: "Service Tier",
148
+ type: "select",
149
+ options: [
150
+ {
151
+ id: DEFAULT_SERVICE_TIER_ID,
152
+ label: "Standard",
153
+ ...(defaultServiceTier === DEFAULT_SERVICE_TIER_ID ? { isDefault: true } : {}),
154
+ },
155
+ ...serviceTiers.map((tier) => ({
156
+ id: tier.id,
157
+ label: tier.name,
158
+ ...(tier.description ? { description: tier.description } : {}),
159
+ ...(defaultServiceTier === tier.id ? { isDefault: true } : {}),
160
+ })),
161
+ ],
162
+ currentValue: defaultServiceTier,
163
+ });
164
+ }
165
+
166
return createModelCapabilities({
114
- optionDescriptors: [
115
- ...(reasoningOptions.length > 0
116
- ? [
117
- {
118
- id: "reasoningEffort",
119
- label: "Reasoning",
120
- type: "select" as const,
121
- options: reasoningOptions,
122
- ...(defaultReasoning ? { currentValue: defaultReasoning } : {}),
123
- },
124
- ]
125
- : []),
126
- ...(supportsFastMode
127
- ? [
128
- {
129
- id: "fastMode",
130
- label: "Fast Mode",
131
- type: "boolean" as const,
132
- },
133
- ]
134
- : []),
135
- ],
167
+ optionDescriptors,
168
});
169
}
170
apps/server/src/provider/Layers/ProviderRegistry.test.ts
+102
-8
@@ -594,6 +594,77 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsService.layerTest(), T
594
]);
595
});
596
597
+ it.effect("does not run provider probes during layer construction", () =>
598
+ Effect.gen(function* () {
599
+ const codexDriver = ProviderDriverKind.make("codex");
600
+ const codexInstanceId = ProviderInstanceId.make("codex");
601
+ const initialProvider = {
602
+ instanceId: codexInstanceId,
603
+ driver: codexDriver,
604
+ status: "warning",
605
+ enabled: true,
606
+ installed: false,
607
+ auth: { status: "unknown" },
608
+ checkedAt: "2026-06-10T00:00:00.000Z",
609
+ version: null,
610
+ message: "Checking Codex provider status.",
611
+ models: [],
612
+ slashCommands: [],
613
+ skills: [],
614
+ } as const satisfies ServerProvider;
615
+ const refreshCalls = yield* Ref.make(0);
616
+ const instance = {
617
+ instanceId: codexInstanceId,
618
+ driverKind: codexDriver,
619
+ continuationIdentity: {
620
+ driverKind: codexDriver,
621
+ continuationKey: "codex:instance:codex",
622
+ },
623
+ displayName: undefined,
624
+ enabled: true,
625
+ snapshot: {
626
+ maintenanceCapabilities: makeManualOnlyProviderMaintenanceCapabilities({
627
+ provider: codexDriver,
628
+ packageName: null,
629
+ }),
630
+ getSnapshot: Effect.succeed(initialProvider),
631
+ refresh: Ref.update(refreshCalls, (count) => count + 1).pipe(
632
+ Effect.andThen(Effect.never),
633
+ ),
634
+ streamChanges: Stream.empty,
635
+ },
636
+ adapter: {} as ProviderInstance["adapter"],
637
+ textGeneration: {} as ProviderInstance["textGeneration"],
638
+ } satisfies ProviderInstance;
639
+ const instanceRegistryLayer = Layer.succeed(ProviderInstanceRegistry, {
640
+ getInstance: (instanceId) =>
641
+ Effect.succeed(instanceId === codexInstanceId ? instance : undefined),
642
+ listInstances: Effect.succeed([instance]),
643
+ listUnavailable: Effect.succeed([]),
644
+ streamChanges: Stream.empty,
645
+ subscribeChanges: Effect.flatMap(PubSub.unbounded<void>(), PubSub.subscribe),
646
+ });
647
+ const scope = yield* Scope.make();
648
+ yield* Effect.addFinalizer(() => Scope.close(scope, Exit.void));
649
+ const runtimeServices = yield* Layer.build(
650
+ ProviderRegistryLive.pipe(
651
+ Layer.provideMerge(instanceRegistryLayer),
652
+ Layer.provideMerge(
653
+ ServerConfig.layerTest(process.cwd(), {
654
+ prefix: "t3-provider-registry-background-refresh-",
655
+ }),
656
+ ),
657
+ Layer.provideMerge(NodeServices.layer),
658
+ ),
659
+ ).pipe(Scope.provide(scope));
660
+ yield* Effect.gen(function* () {
661
+ const registry = yield* ProviderRegistry;
662
+ assert.deepStrictEqual(yield* registry.getProviders, [initialProvider]);
663
+ assert.strictEqual(yield* Ref.get(refreshCalls), 0);
664
+ }).pipe(Effect.provide(runtimeServices));
665
+ }),
666
+ );
667
+
668
it("persists merged provider snapshots for the providers that were refreshed", () => {
669
const previousProviders = [
670
{
@@ -1042,7 +1113,17 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsService.layerTest(), T
1113
1114
yield* Effect.gen(function* () {
1115
const registry = yield* ProviderRegistry;
1045
- const providers = yield* registry.getProviders;
1116
+ let providers = yield* registry.getProviders;
1117
+ for (
1118
+ let attempts = 0;
1119
+ attempts < 50 &&
1120
+ providers.find((provider) => provider.instanceId === "codex_personal")?.status !==
1121
+ "error";
1122
+ attempts += 1
1123
+ ) {
1124
+ yield* Effect.yieldNow;
1125
+ providers = yield* registry.getProviders;
1126
+ }
1127
const codexPersonal = providers.find(
1128
(provider) => provider.instanceId === "codex_personal",
1129
);
@@ -1072,9 +1153,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsService.layerTest(), T
1153
// instance and rebuild it so a fresh probe runs with the new binary.
1154
// This test drives the real settings stream → registry reconcile →
1155
// aggregator sync pipeline and asserts that `getProviders` reflects
1075
- // the new probe's outcome. If `syncLiveSources` stops awaiting the
1076
- // rebuilt instance's refresh (previous bug mode), the aggregator
1077
- // keeps the old snapshot and this test fails.
1156
+ // the new background probe's outcome.
1157
//
1158
it.effect("re-probes when settings change the codex binaryPath", () =>
1159
Effect.gen(function* () {
@@ -1124,7 +1203,18 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsService.layerTest(), T
1203
// the two probe runs is `checkedAt` — each probe stamps a
1204
// fresh DateTime, so we capture it and assert it advances
1205
// after the settings mutation.
1127
- const initialProviders = yield* registry.getProviders;
1206
+ let initialProviders = yield* registry.getProviders;
1207
+ for (
1208
+ let attempts = 0;
1209
+ attempts < 50 &&
1210
+ initialProviders.find((provider) => provider.instanceId === "codex")?.status !==
1211
+ "error";
1212
+ attempts += 1
1213
+ ) {
1214
+ yield* TestClock.adjust("10 millis");
1215
+ yield* Effect.yieldNow;
1216
+ initialProviders = yield* registry.getProviders;
1217
+ }
1218
const initialCodex = initialProviders.find(
1219
(provider) => provider.instanceId === "codex",
1220
);
@@ -1144,8 +1234,8 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsService.layerTest(), T
1234
// envelope changed because `binaryPath` differs → `entryEqual`
1235
// is false). The registry's `Stream.runForEach(
1236
// instanceRegistry.streamChanges, () => syncLiveSources)`
1147
- // fires `syncLiveSources`, which subscribes + awaits a fresh
1148
- // refresh on the rebuilt instance.
1237
+ // fires `syncLiveSources`, which subscribes and launches a fresh
1238
+ // background refresh on the rebuilt instance.
1239
yield* serverSettings.updateSettings({
1240
providers: {
1241
codex: { enabled: true, binaryPath: secondMissing },
@@ -1158,7 +1248,11 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsService.layerTest(), T
1248
for (let attempts = 0; attempts < 60; attempts += 1) {
1249
const providers = yield* registry.getProviders;
1250
const codex = providers.find((provider) => provider.instanceId === "codex");
1161
- if (codex !== undefined && codex.checkedAt !== initialCheckedAt) {
1251
+ if (
1252
+ codex !== undefined &&
1253
+ codex.status === "error" &&
1254
+ codex.checkedAt !== initialCheckedAt
1255
+ ) {
1256
return providers;
1257
}
1258
yield* TestClock.adjust("50 millis");
apps/server/src/provider/Layers/ProviderRegistry.ts
+25
-22
@@ -492,16 +492,15 @@ export const ProviderRegistryLive = Layer.effect(
492
* - subscribe to each newly-added or rebuilt instance's
493
* `streamChanges` (so periodic + enrichment refreshes land in
494
* `providersRef`);
495
- * - force-refresh each newly-added/rebuilt instance and feed the
496
- * result directly into `providersRef`, bypassing the PubSub
497
- * attachment race that otherwise drops the initial probe;
495
+ * - read each newly-added/rebuilt instance's current snapshot after
496
+ * subscribing, closing the race with its independently-running
497
+ * background startup probe;
498
* - prune `providersRef` of instances that no longer exist.
499
*
500
- * Initial refreshes are awaited in parallel rather than forked, so
501
- * callers (layer build; `streamChanges` watcher) see fully-probed
502
- * state on return. This matters for layer build in particular:
503
- * consumers reading `getProviders` immediately after layer build
504
- * expect the probe to have already landed.
500
+ * Provider refreshes are owned by each managed provider and never run
501
+ * on this layer's construction path. Consumers see cached or pending
502
+ * snapshots immediately, then receive live probe results through the
503
+ * already-attached change stream.
504
*
505
* Per-instance subscription fibers are not tracked explicitly. When
506
* a rebuilt instance's old child scope closes, its PubSub shuts
@@ -543,27 +542,31 @@ export const ProviderRegistryLive = Layer.effect(
542
}
543
544
// Fork long-lived subscriptions to each new/rebuilt instance's
546
- // change stream BEFORE kicking off refreshes — if the driver's
547
- // own initial probe (line 140 in `makeManagedServerProvider`)
548
- // wins the refreshSemaphore race, its PubSub publish must land
549
- // in an active subscriber or the result is dropped.
545
+ // change stream before reading its current snapshot. If the
546
+ // driver's own initial probe finishes during this sync, either
547
+ // the current read or the active subscriber observes the result.
548
for (const [, instance] of newlyAdded) {
549
const source = buildSnapshotSource(instance);
550
yield* Stream.runForEach(source.streamChanges, (provider) =>
551
correlateSnapshotWithSource(source, provider).pipe(Effect.flatMap(syncProvider)),
552
).pipe(Effect.forkScoped);
553
}
554
+ yield* Effect.yieldNow;
555
557
- // Force-refresh every new/rebuilt instance in parallel and wait
558
- // for them all to complete. The refresh's result is piped
559
- // directly into `syncProvider`, so `providersRef` is populated
560
- // deterministically by the time this block returns — regardless
561
- // of PubSub subscription timing. Failures are logged and
562
- // swallowed so one bad driver can't wedge the whole registry.
556
+ // Snapshot current state without starting a probe. Managed providers
557
+ // launch their startup refresh independently, so this closes the
558
+ // subscription race without putting external work on the registry
559
+ // or HTTP server construction path.
560
yield* Effect.forEach(
561
newlyAdded,
562
([, instance]) =>
566
- refreshOneSource(buildSnapshotSource(instance)).pipe(Effect.ignoreCause({ log: true })),
563
+ Effect.gen(function* () {
564
+ const source = buildSnapshotSource(instance);
565
+ const provider = yield* source.getSnapshot;
566
+ yield* correlateSnapshotWithSource(source, provider).pipe(
567
+ Effect.flatMap(syncProvider),
568
+ );
569
+ }).pipe(Effect.ignoreCause({ log: true })),
570
{ concurrency: "unbounded", discard: true },
571
);
572
yield* upsertProviders(unavailableProviders, {
@@ -654,9 +657,9 @@ export const ProviderRegistryLive = Layer.effect(
657
// was dropped, which made any settings change that replaced an
658
// instance never propagate to the aggregator's `providersRef`.)
659
const instanceChanges = yield* instanceRegistry.subscribeChanges;
657
- // Initial sync: subscribe + kick off refreshes for every instance
658
- // present at boot. Run synchronously so consumers pulling immediately
659
- // after the layer build see the correct aggregator state.
660
+ // Initial sync attaches subscriptions and snapshots current state for
661
+ // every instance present at boot. Provider probes are already running in
662
+ // their managed background fibers and never block this layer.
663
yield* syncLiveSources;
664
// React to registry mutations — instance added / removed / rebuilt.
665
// `Stream.fromSubscription` builds a stream over the pre-acquired
apps/server/src/provider/makeManagedServerProvider.test.ts
+1
@@ -129,6 +129,7 @@ describe("makeManagedServerProvider", () => {
129
Effect.forkChild,
130
);
131
yield* Effect.yieldNow;
132
+ assert.strictEqual(yield* Ref.get(checkCalls), 1);
133
134
yield* Deferred.succeed(releaseCheck, undefined);
135
apps/server/src/provider/makeManagedServerProvider.ts
+1
-5
@@ -152,11 +152,7 @@ export const makeManagedServerProvider = Effect.fn("makeManagedServerProvider")(
152
153
return {
154
maintenanceCapabilities: input.maintenanceCapabilities,
155
- getSnapshot: input.getSettings.pipe(
156
- Effect.flatMap(applySnapshot),
157
- Effect.tapError(Effect.logError),
158
- Effect.orDie,
159
- ),
155
+ getSnapshot: Ref.get(snapshotStateRef).pipe(Effect.map((state) => state.snapshot)),
156
refresh: refreshSnapshot().pipe(Effect.tapError(Effect.logError), Effect.orDie),
157
get streamChanges() {
158
return Stream.fromPubSub(changesPubSub);
apps/server/src/textGeneration/CodexTextGeneration.test.ts
+14
-12
@@ -32,7 +32,7 @@ function makeFakeCodexBinary(
32
exitCode?: number;
33
stderr?: string;
34
requireImage?: boolean;
35
- requireFastServiceTier?: boolean;
35
+ requireServiceTier?: string;
36
requireReasoningEffort?: string;
37
forbidReasoningEffort?: boolean;
38
stdinMustContain?: string;
@@ -52,7 +52,7 @@ function makeFakeCodexBinary(
52
"#!/bin/sh",
53
'output_path=""',
54
'seen_image="0"',
55
- 'seen_fast_service_tier="0"',
55
+ 'seen_service_tier=""',
56
'seen_reasoning_effort=""',
57
"while [ $# -gt 0 ]; do",
58
' if [ "$1" = "--image" ]; then',
@@ -65,9 +65,11 @@ function makeFakeCodexBinary(
65
" fi",
66
' if [ "$1" = "--config" ]; then',
67
" shift",
68
- ' if [ "$1" = "service_tier=\\"fast\\"" ]; then',
69
- ' seen_fast_service_tier="1"',
70
- " fi",
68
+ ' case "$1" in',
69
+ " service_tier=*)",
70
+ ' seen_service_tier="$1"',
71
+ " ;;",
72
+ " esac",
73
' case "$1" in',
74
" model_reasoning_effort=*)",
75
' seen_reasoning_effort="$1"',
@@ -93,10 +95,10 @@ function makeFakeCodexBinary(
95
"fi",
96
]
97
: []),
96
- ...(input.requireFastServiceTier
98
+ ...(input.requireServiceTier
99
? [
98
- 'if [ "$seen_fast_service_tier" != "1" ]; then',
99
- ' printf "%s\\n" "missing fast service tier config" >&2',
100
+ `if [ "$seen_service_tier" != "service_tier=\\"${input.requireServiceTier}\\"" ]; then`,
101
+ ' printf "%s\\n" "unexpected service tier config: $seen_service_tier" >&2',
102
` exit 5`,
103
"fi",
104
]
@@ -161,7 +163,7 @@ function withFakeCodexEnv<A, E, R>(
163
exitCode?: number;
164
stderr?: string;
165
requireImage?: boolean;
164
- requireFastServiceTier?: boolean;
166
+ requireServiceTier?: string;
167
requireReasoningEffort?: string;
168
forbidReasoningEffort?: boolean;
169
stdinMustContain?: string;
@@ -209,7 +211,7 @@ it.layer(CodexTextGenerationTestLayer)("CodexTextGeneration", (it) => {
211
);
212
213
it.effect(
212
- "forwards codex fast mode and non-default reasoning effort into codex exec config",
214
+ "forwards codex service tier and non-default reasoning effort into codex exec config",
215
() =>
216
withFakeCodexEnv(
217
{
@@ -217,7 +219,7 @@ it.layer(CodexTextGenerationTestLayer)("CodexTextGeneration", (it) => {
219
subject: "Add important change",
220
body: "",
221
}),
220
- requireFastServiceTier: true,
222
+ requireServiceTier: "priority",
223
requireReasoningEffort: "xhigh",
224
stdinMustNotContain: "branch must be a short semantic git branch fragment",
225
},
@@ -229,7 +231,7 @@ it.layer(CodexTextGenerationTestLayer)("CodexTextGeneration", (it) => {
231
stagedPatch: "diff --git a/README.md b/README.md",
232
modelSelection: createModelSelection(ProviderInstanceId.make("codex"), "gpt-5.4", [
233
{ id: "reasoningEffort", value: "xhigh" },
232
- { id: "fastMode", value: true },
234
+ { id: "serviceTier", value: "priority" },
235
]),
236
}),
237
),
apps/server/src/textGeneration/CodexTextGeneration.ts
+4
-7
@@ -32,10 +32,8 @@ import {
32
sanitizeThreadTitle,
33
toJsonSchemaObject,
34
} from "./TextGenerationUtils.ts";
35
-import {
36
- getModelSelectionBooleanOptionValue,
37
- getModelSelectionStringOptionValue,
38
-} from "@t3tools/shared/model";
35
+import { getModelSelectionStringOptionValue } from "@t3tools/shared/model";
36
+import { getCodexServiceTierOptionValue } from "../codexModelOptions.ts";
37
38
const CODEX_GIT_TEXT_GENERATION_REASONING_EFFORT = "low";
39
const CODEX_TIMEOUT_MS = 180_000;
@@ -181,6 +179,7 @@ export const makeCodexTextGeneration = Effect.fn("makeCodexTextGeneration")(func
179
const reasoningEffort =
180
getModelSelectionStringOptionValue(modelSelection, "reasoningEffort") ??
181
CODEX_GIT_TEXT_GENERATION_REASONING_EFFORT;
182
+ const serviceTier = getCodexServiceTierOptionValue(modelSelection);
183
const command = ChildProcess.make(
184
codexConfig.binaryPath || "codex",
185
[
@@ -193,9 +192,7 @@ export const makeCodexTextGeneration = Effect.fn("makeCodexTextGeneration")(func
192
modelSelection.model,
193
"--config",
194
`model_reasoning_effort="${reasoningEffort}"`,
196
- ...(getModelSelectionBooleanOptionValue(modelSelection, "fastMode") === true
197
- ? ["--config", `service_tier="fast"`]
198
- : []),
195
+ ...(serviceTier ? ["--config", `service_tier="${serviceTier}"`] : []),
196
"--output-schema",
197
schemaPath,
198
"--output-last-message",
packages/effect-codex-app-server/scripts/generate.ts
+6
-3
@@ -17,7 +17,7 @@ import {
17
} from "effect/unstable/http";
18
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
19
20
-const UPSTREAM_REF = "07b695190f30a450e4921f71f77473e564395c59";
20
+const UPSTREAM_REF = "b39f943a634a6e7ba86c3d6e8cf6d5f35e612566";
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";
@@ -348,6 +348,7 @@ function resolveResponseTypeName(
348
const overrides: Record<string, string> = {
349
"account/logout": "LogoutAccountResponse",
350
"account/rateLimits/read": "GetAccountRateLimitsResponse",
351
+ "account/usage/read": "GetAccountTokenUsageResponse",
352
"config/batchWrite": "ConfigWriteResponse",
353
"config/mcpServer/reload": "McpServerRefreshResponse",
354
"config/value/write": "ConfigWriteResponse",
@@ -745,14 +746,16 @@ const generateFiles = Effect.fn("generateFiles")(function* () {
746
yield* Effect.log(`Generated Codex App Server schemas from ${UPSTREAM_REF}`);
747
748
yield* Effect.service(ChildProcessSpawner.ChildProcessSpawner).pipe(
748
- Effect.flatMap((spawner) => spawner.spawn(ChildProcess.make("bun", ["oxfmt", generatedDir]))),
749
+ Effect.flatMap((spawner) =>
750
+ spawner.spawn(ChildProcess.make("vp", ["fmt", generatedDir, "--write"])),
751
+ ),
752
Effect.flatMap((child) => child.exitCode),
753
Effect.tap((code) =>
754
code === 0
755
? Effect.void
756
: Effect.fail(
757
new GeneratorError({
755
- detail: `oxfmt failed with exit code ${code}`,
758
+ detail: `vp fmt failed with exit code ${code}`,
759
}),
760
),
761
),
packages/effect-codex-app-server/src/_generated/meta.gen.ts
+60
-1
@@ -1,5 +1,5 @@
1
// This file is generated by the effect-codex-app-server package. Do not edit manually.
2
-// Upstream protocol ref: 07b695190f30a450e4921f71f77473e564395c59
2
+// Upstream protocol ref: b39f943a634a6e7ba86c3d6e8cf6d5f35e612566
3
4
import * as CodexSchema from "./schema.gen.ts";
5
@@ -9,8 +9,12 @@ export const CLIENT_REQUEST_METHODS = {
9
"thread/resume": "thread/resume",
10
"thread/fork": "thread/fork",
11
"thread/archive": "thread/archive",
12
+ "thread/delete": "thread/delete",
13
"thread/unsubscribe": "thread/unsubscribe",
14
"thread/name/set": "thread/name/set",
15
+ "thread/goal/set": "thread/goal/set",
16
+ "thread/goal/get": "thread/goal/get",
17
+ "thread/goal/clear": "thread/goal/clear",
18
"thread/metadata/update": "thread/metadata/update",
19
"thread/unarchive": "thread/unarchive",
20
"thread/compact/start": "thread/compact/start",
@@ -22,16 +26,19 @@ export const CLIENT_REQUEST_METHODS = {
26
"thread/read": "thread/read",
27
"thread/inject_items": "thread/inject_items",
28
"skills/list": "skills/list",
29
+ "skills/extraRoots/set": "skills/extraRoots/set",
30
"hooks/list": "hooks/list",
31
"marketplace/add": "marketplace/add",
32
"marketplace/remove": "marketplace/remove",
33
"marketplace/upgrade": "marketplace/upgrade",
34
"plugin/list": "plugin/list",
35
+ "plugin/installed": "plugin/installed",
36
"plugin/read": "plugin/read",
37
"plugin/skill/read": "plugin/skill/read",
38
"plugin/share/save": "plugin/share/save",
39
"plugin/share/updateTargets": "plugin/share/updateTargets",
40
"plugin/share/list": "plugin/share/list",
41
+ "plugin/share/checkout": "plugin/share/checkout",
42
"plugin/share/delete": "plugin/share/delete",
43
"app/list": "app/list",
44
"fs/readFile": "fs/readFile",
@@ -53,6 +60,7 @@ export const CLIENT_REQUEST_METHODS = {
60
"model/list": "model/list",
61
"modelProvider/capabilities/read": "modelProvider/capabilities/read",
62
"experimentalFeature/list": "experimentalFeature/list",
63
+ "permissionProfile/list": "permissionProfile/list",
64
"experimentalFeature/enablement/set": "experimentalFeature/enablement/set",
65
"mcpServer/oauth/login": "mcpServer/oauth/login",
66
"config/mcpServer/reload": "config/mcpServer/reload",
@@ -65,6 +73,7 @@ export const CLIENT_REQUEST_METHODS = {
73
"account/login/cancel": "account/login/cancel",
74
"account/logout": "account/logout",
75
"account/rateLimits/read": "account/rateLimits/read",
76
+ "account/usage/read": "account/usage/read",
77
"account/sendAddCreditsNudgeEmail": "account/sendAddCreditsNudgeEmail",
78
"feedback/upload": "feedback/upload",
79
"command/exec": "command/exec",
@@ -96,6 +105,7 @@ export const SERVER_REQUEST_METHODS = {
105
"item/permissions/requestApproval": "item/permissions/requestApproval",
106
"item/tool/call": "item/tool/call",
107
"account/chatgptAuthTokens/refresh": "account/chatgptAuthTokens/refresh",
108
+ "attestation/generate": "attestation/generate",
109
applyPatchApproval: "applyPatchApproval",
110
execCommandApproval: "execCommandApproval",
111
} as const;
@@ -105,12 +115,14 @@ export const SERVER_NOTIFICATION_METHODS = {
115
"thread/started": "thread/started",
116
"thread/status/changed": "thread/status/changed",
117
"thread/archived": "thread/archived",
118
+ "thread/deleted": "thread/deleted",
119
"thread/unarchived": "thread/unarchived",
120
"thread/closed": "thread/closed",
121
"skills/changed": "skills/changed",
122
"thread/name/updated": "thread/name/updated",
123
"thread/goal/updated": "thread/goal/updated",
124
"thread/goal/cleared": "thread/goal/cleared",
125
+ "thread/settings/updated": "thread/settings/updated",
126
"thread/tokenUsage/updated": "thread/tokenUsage/updated",
127
"turn/started": "turn/started",
128
"hook/started": "hook/started",
@@ -148,6 +160,7 @@ export const SERVER_NOTIFICATION_METHODS = {
160
"thread/compacted": "thread/compacted",
161
"model/rerouted": "model/rerouted",
162
"model/verification": "model/verification",
163
+ "turn/moderationMetadata": "turn/moderationMetadata",
164
warning: "warning",
165
guardianWarning: "guardianWarning",
166
deprecationNotice: "deprecationNotice",
@@ -178,8 +191,12 @@ export interface ClientRequestParamsByMethod {
191
readonly "thread/resume": CodexSchema.V2ThreadResumeParams;
192
readonly "thread/fork": CodexSchema.V2ThreadForkParams;
193
readonly "thread/archive": CodexSchema.V2ThreadArchiveParams;
194
+ readonly "thread/delete": CodexSchema.V2ThreadDeleteParams;
195
readonly "thread/unsubscribe": CodexSchema.V2ThreadUnsubscribeParams;
196
readonly "thread/name/set": CodexSchema.V2ThreadSetNameParams;
197
+ readonly "thread/goal/set": CodexSchema.V2ThreadGoalSetParams;
198
+ readonly "thread/goal/get": CodexSchema.V2ThreadGoalGetParams;
199
+ readonly "thread/goal/clear": CodexSchema.V2ThreadGoalClearParams;
200
readonly "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams;
201
readonly "thread/unarchive": CodexSchema.V2ThreadUnarchiveParams;
202
readonly "thread/compact/start": CodexSchema.V2ThreadCompactStartParams;
@@ -191,16 +208,19 @@ export interface ClientRequestParamsByMethod {
208
readonly "thread/read": CodexSchema.V2ThreadReadParams;
209
readonly "thread/inject_items": CodexSchema.V2ThreadInjectItemsParams;
210
readonly "skills/list": CodexSchema.V2SkillsListParams;
211
+ readonly "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetParams;
212
readonly "hooks/list": CodexSchema.V2HooksListParams;
213
readonly "marketplace/add": CodexSchema.V2MarketplaceAddParams;
214
readonly "marketplace/remove": CodexSchema.V2MarketplaceRemoveParams;
215
readonly "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams;
216
readonly "plugin/list": CodexSchema.V2PluginListParams;
217
+ readonly "plugin/installed": CodexSchema.V2PluginInstalledParams;
218
readonly "plugin/read": CodexSchema.V2PluginReadParams;
219
readonly "plugin/skill/read": CodexSchema.V2PluginSkillReadParams;
220
readonly "plugin/share/save": CodexSchema.V2PluginShareSaveParams;
221
readonly "plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsParams;
222
readonly "plugin/share/list": CodexSchema.V2PluginShareListParams;
223
+ readonly "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutParams;
224
readonly "plugin/share/delete": CodexSchema.V2PluginShareDeleteParams;
225
readonly "app/list": CodexSchema.V2AppsListParams;
226
readonly "fs/readFile": CodexSchema.V2FsReadFileParams;
@@ -222,6 +242,7 @@ export interface ClientRequestParamsByMethod {
242
readonly "model/list": CodexSchema.V2ModelListParams;
243
readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams;
244
readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams;
245
+ readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListParams;
246
readonly "experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetParams;
247
readonly "mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginParams;
248
readonly "config/mcpServer/reload": undefined;
@@ -234,6 +255,7 @@ export interface ClientRequestParamsByMethod {
255
readonly "account/login/cancel": CodexSchema.V2CancelLoginAccountParams;
256
readonly "account/logout": undefined;
257
readonly "account/rateLimits/read": undefined;
258
+ readonly "account/usage/read": undefined;
259
readonly "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams;
260
readonly "feedback/upload": CodexSchema.V2FeedbackUploadParams;
261
readonly "command/exec": CodexSchema.V2CommandExecParams;
@@ -259,8 +281,12 @@ export interface ClientRequestResponsesByMethod {
281
readonly "thread/resume": CodexSchema.V2ThreadResumeResponse;
282
readonly "thread/fork": CodexSchema.V2ThreadForkResponse;
283
readonly "thread/archive": CodexSchema.V2ThreadArchiveResponse;
284
+ readonly "thread/delete": CodexSchema.V2ThreadDeleteResponse;
285
readonly "thread/unsubscribe": CodexSchema.V2ThreadUnsubscribeResponse;
286
readonly "thread/name/set": CodexSchema.V2ThreadSetNameResponse;
287
+ readonly "thread/goal/set": CodexSchema.V2ThreadGoalSetResponse;
288
+ readonly "thread/goal/get": CodexSchema.V2ThreadGoalGetResponse;
289
+ readonly "thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse;
290
readonly "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse;
291
readonly "thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse;
292
readonly "thread/compact/start": CodexSchema.V2ThreadCompactStartResponse;
@@ -272,16 +298,19 @@ export interface ClientRequestResponsesByMethod {
298
readonly "thread/read": CodexSchema.V2ThreadReadResponse;
299
readonly "thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse;
300
readonly "skills/list": CodexSchema.V2SkillsListResponse;
301
+ readonly "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetResponse;
302
readonly "hooks/list": CodexSchema.V2HooksListResponse;
303
readonly "marketplace/add": CodexSchema.V2MarketplaceAddResponse;
304
readonly "marketplace/remove": CodexSchema.V2MarketplaceRemoveResponse;
305
readonly "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse;
306
readonly "plugin/list": CodexSchema.V2PluginListResponse;
307
+ readonly "plugin/installed": CodexSchema.V2PluginInstalledResponse;
308
readonly "plugin/read": CodexSchema.V2PluginReadResponse;
309
readonly "plugin/skill/read": CodexSchema.V2PluginSkillReadResponse;
310
readonly "plugin/share/save": CodexSchema.V2PluginShareSaveResponse;
311
readonly "plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsResponse;
312
readonly "plugin/share/list": CodexSchema.V2PluginShareListResponse;
313
+ readonly "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutResponse;
314
readonly "plugin/share/delete": CodexSchema.V2PluginShareDeleteResponse;
315
readonly "app/list": CodexSchema.V2AppsListResponse;
316
readonly "fs/readFile": CodexSchema.V2FsReadFileResponse;
@@ -303,6 +332,7 @@ export interface ClientRequestResponsesByMethod {
332
readonly "model/list": CodexSchema.V2ModelListResponse;
333
readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse;
334
readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse;
335
+ readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListResponse;
336
readonly "experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetResponse;
337
readonly "mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginResponse;
338
readonly "config/mcpServer/reload": CodexSchema.V2McpServerRefreshResponse;
@@ -315,6 +345,7 @@ export interface ClientRequestResponsesByMethod {
345
readonly "account/login/cancel": CodexSchema.V2CancelLoginAccountResponse;
346
readonly "account/logout": CodexSchema.V2LogoutAccountResponse;
347
readonly "account/rateLimits/read": CodexSchema.V2GetAccountRateLimitsResponse;
348
+ readonly "account/usage/read": CodexSchema.V2GetAccountTokenUsageResponse;
349
readonly "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailResponse;
350
readonly "feedback/upload": CodexSchema.V2FeedbackUploadResponse;
351
readonly "command/exec": CodexSchema.V2CommandExecResponse;
@@ -346,6 +377,7 @@ export interface ServerRequestParamsByMethod {
377
readonly "item/permissions/requestApproval": CodexSchema.PermissionsRequestApprovalParams;
378
readonly "item/tool/call": CodexSchema.DynamicToolCallParams;
379
readonly "account/chatgptAuthTokens/refresh": CodexSchema.ChatgptAuthTokensRefreshParams;
380
+ readonly "attestation/generate": CodexSchema.AttestationGenerateParams;
381
readonly applyPatchApproval: CodexSchema.ApplyPatchApprovalParams;
382
readonly execCommandApproval: CodexSchema.ExecCommandApprovalParams;
383
}
@@ -358,6 +390,7 @@ export interface ServerRequestResponsesByMethod {
390
readonly "item/permissions/requestApproval": CodexSchema.PermissionsRequestApprovalResponse;
391
readonly "item/tool/call": CodexSchema.DynamicToolCallResponse;
392
readonly "account/chatgptAuthTokens/refresh": CodexSchema.ChatgptAuthTokensRefreshResponse;
393
+ readonly "attestation/generate": CodexSchema.AttestationGenerateResponse;
394
readonly applyPatchApproval: CodexSchema.ApplyPatchApprovalResponse;
395
readonly execCommandApproval: CodexSchema.ExecCommandApprovalResponse;
396
}
@@ -367,12 +400,14 @@ export interface ServerNotificationParamsByMethod {
400
readonly "thread/started": CodexSchema.V2ThreadStartedNotification;
401
readonly "thread/status/changed": CodexSchema.V2ThreadStatusChangedNotification;
402
readonly "thread/archived": CodexSchema.V2ThreadArchivedNotification;
403
+ readonly "thread/deleted": CodexSchema.V2ThreadDeletedNotification;
404
readonly "thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification;
405
readonly "thread/closed": CodexSchema.V2ThreadClosedNotification;
406
readonly "skills/changed": CodexSchema.V2SkillsChangedNotification;
407
readonly "thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification;
408
readonly "thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification;
409
readonly "thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification;
410
+ readonly "thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification;
411
readonly "thread/tokenUsage/updated": CodexSchema.V2ThreadTokenUsageUpdatedNotification;
412
readonly "turn/started": CodexSchema.V2TurnStartedNotification;
413
readonly "hook/started": CodexSchema.V2HookStartedNotification;
@@ -410,6 +445,7 @@ export interface ServerNotificationParamsByMethod {
445
readonly "thread/compacted": CodexSchema.V2ContextCompactedNotification;
446
readonly "model/rerouted": CodexSchema.V2ModelReroutedNotification;
447
readonly "model/verification": CodexSchema.V2ModelVerificationNotification;
448
+ readonly "turn/moderationMetadata": CodexSchema.V2TurnModerationMetadataNotification;
449
readonly warning: CodexSchema.V2WarningNotification;
450
readonly guardianWarning: CodexSchema.V2GuardianWarningNotification;
451
readonly deprecationNotice: CodexSchema.V2DeprecationNoticeNotification;
@@ -435,8 +471,12 @@ export const CLIENT_REQUEST_PARAMS = {
471
"thread/resume": CodexSchema.V2ThreadResumeParams,
472
"thread/fork": CodexSchema.V2ThreadForkParams,
473
"thread/archive": CodexSchema.V2ThreadArchiveParams,
474
+ "thread/delete": CodexSchema.V2ThreadDeleteParams,
475
"thread/unsubscribe": CodexSchema.V2ThreadUnsubscribeParams,
476
"thread/name/set": CodexSchema.V2ThreadSetNameParams,
477
+ "thread/goal/set": CodexSchema.V2ThreadGoalSetParams,
478
+ "thread/goal/get": CodexSchema.V2ThreadGoalGetParams,
479
+ "thread/goal/clear": CodexSchema.V2ThreadGoalClearParams,
480
"thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams,
481
"thread/unarchive": CodexSchema.V2ThreadUnarchiveParams,
482
"thread/compact/start": CodexSchema.V2ThreadCompactStartParams,
@@ -448,16 +488,19 @@ export const CLIENT_REQUEST_PARAMS = {
488
"thread/read": CodexSchema.V2ThreadReadParams,
489
"thread/inject_items": CodexSchema.V2ThreadInjectItemsParams,
490
"skills/list": CodexSchema.V2SkillsListParams,
491
+ "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetParams,
492
"hooks/list": CodexSchema.V2HooksListParams,
493
"marketplace/add": CodexSchema.V2MarketplaceAddParams,
494
"marketplace/remove": CodexSchema.V2MarketplaceRemoveParams,
495
"marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams,
496
"plugin/list": CodexSchema.V2PluginListParams,
497
+ "plugin/installed": CodexSchema.V2PluginInstalledParams,
498
"plugin/read": CodexSchema.V2PluginReadParams,
499
"plugin/skill/read": CodexSchema.V2PluginSkillReadParams,
500
"plugin/share/save": CodexSchema.V2PluginShareSaveParams,
501
"plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsParams,
502
"plugin/share/list": CodexSchema.V2PluginShareListParams,
503
+ "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutParams,
504
"plugin/share/delete": CodexSchema.V2PluginShareDeleteParams,
505
"app/list": CodexSchema.V2AppsListParams,
506
"fs/readFile": CodexSchema.V2FsReadFileParams,
@@ -479,6 +522,7 @@ export const CLIENT_REQUEST_PARAMS = {
522
"model/list": CodexSchema.V2ModelListParams,
523
"modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams,
524
"experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams,
525
+ "permissionProfile/list": CodexSchema.V2PermissionProfileListParams,
526
"experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetParams,
527
"mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginParams,
528
"config/mcpServer/reload": undefined,
@@ -491,6 +535,7 @@ export const CLIENT_REQUEST_PARAMS = {
535
"account/login/cancel": CodexSchema.V2CancelLoginAccountParams,
536
"account/logout": undefined,
537
"account/rateLimits/read": undefined,
538
+ "account/usage/read": undefined,
539
"account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams,
540
"feedback/upload": CodexSchema.V2FeedbackUploadParams,
541
"command/exec": CodexSchema.V2CommandExecParams,
@@ -516,8 +561,12 @@ export const CLIENT_REQUEST_RESPONSES = {
561
"thread/resume": CodexSchema.V2ThreadResumeResponse,
562
"thread/fork": CodexSchema.V2ThreadForkResponse,
563
"thread/archive": CodexSchema.V2ThreadArchiveResponse,
564
+ "thread/delete": CodexSchema.V2ThreadDeleteResponse,
565
"thread/unsubscribe": CodexSchema.V2ThreadUnsubscribeResponse,
566
"thread/name/set": CodexSchema.V2ThreadSetNameResponse,
567
+ "thread/goal/set": CodexSchema.V2ThreadGoalSetResponse,
568
+ "thread/goal/get": CodexSchema.V2ThreadGoalGetResponse,
569
+ "thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse,
570
"thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse,
571
"thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse,
572
"thread/compact/start": CodexSchema.V2ThreadCompactStartResponse,
@@ -529,16 +578,19 @@ export const CLIENT_REQUEST_RESPONSES = {
578
"thread/read": CodexSchema.V2ThreadReadResponse,
579
"thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse,
580
"skills/list": CodexSchema.V2SkillsListResponse,
581
+ "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetResponse,
582
"hooks/list": CodexSchema.V2HooksListResponse,
583
"marketplace/add": CodexSchema.V2MarketplaceAddResponse,
584
"marketplace/remove": CodexSchema.V2MarketplaceRemoveResponse,
585
"marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse,
586
"plugin/list": CodexSchema.V2PluginListResponse,
587
+ "plugin/installed": CodexSchema.V2PluginInstalledResponse,
588
"plugin/read": CodexSchema.V2PluginReadResponse,
589
"plugin/skill/read": CodexSchema.V2PluginSkillReadResponse,
590
"plugin/share/save": CodexSchema.V2PluginShareSaveResponse,
591
"plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsResponse,
592
"plugin/share/list": CodexSchema.V2PluginShareListResponse,
593
+ "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutResponse,
594
"plugin/share/delete": CodexSchema.V2PluginShareDeleteResponse,
595
"app/list": CodexSchema.V2AppsListResponse,
596
"fs/readFile": CodexSchema.V2FsReadFileResponse,
@@ -560,6 +612,7 @@ export const CLIENT_REQUEST_RESPONSES = {
612
"model/list": CodexSchema.V2ModelListResponse,
613
"modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse,
614
"experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse,
615
+ "permissionProfile/list": CodexSchema.V2PermissionProfileListResponse,
616
"experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetResponse,
617
"mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginResponse,
618
"config/mcpServer/reload": CodexSchema.V2McpServerRefreshResponse,
@@ -572,6 +625,7 @@ export const CLIENT_REQUEST_RESPONSES = {
625
"account/login/cancel": CodexSchema.V2CancelLoginAccountResponse,
626
"account/logout": CodexSchema.V2LogoutAccountResponse,
627
"account/rateLimits/read": CodexSchema.V2GetAccountRateLimitsResponse,
628
+ "account/usage/read": CodexSchema.V2GetAccountTokenUsageResponse,
629
"account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailResponse,
630
"feedback/upload": CodexSchema.V2FeedbackUploadResponse,
631
"command/exec": CodexSchema.V2CommandExecResponse,
@@ -603,6 +657,7 @@ export const SERVER_REQUEST_PARAMS = {
657
"item/permissions/requestApproval": CodexSchema.PermissionsRequestApprovalParams,
658
"item/tool/call": CodexSchema.DynamicToolCallParams,
659
"account/chatgptAuthTokens/refresh": CodexSchema.ChatgptAuthTokensRefreshParams,
660
+ "attestation/generate": CodexSchema.AttestationGenerateParams,
661
applyPatchApproval: CodexSchema.ApplyPatchApprovalParams,
662
execCommandApproval: CodexSchema.ExecCommandApprovalParams,
663
} as const;
@@ -615,6 +670,7 @@ export const SERVER_REQUEST_RESPONSES = {
670
"item/permissions/requestApproval": CodexSchema.PermissionsRequestApprovalResponse,
671
"item/tool/call": CodexSchema.DynamicToolCallResponse,
672
"account/chatgptAuthTokens/refresh": CodexSchema.ChatgptAuthTokensRefreshResponse,
673
+ "attestation/generate": CodexSchema.AttestationGenerateResponse,
674
applyPatchApproval: CodexSchema.ApplyPatchApprovalResponse,
675
execCommandApproval: CodexSchema.ExecCommandApprovalResponse,
676
} as const;
@@ -624,12 +680,14 @@ export const SERVER_NOTIFICATION_PARAMS = {
680
"thread/started": CodexSchema.V2ThreadStartedNotification,
681
"thread/status/changed": CodexSchema.V2ThreadStatusChangedNotification,
682
"thread/archived": CodexSchema.V2ThreadArchivedNotification,
683
+ "thread/deleted": CodexSchema.V2ThreadDeletedNotification,
684
"thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification,
685
"thread/closed": CodexSchema.V2ThreadClosedNotification,
686
"skills/changed": CodexSchema.V2SkillsChangedNotification,
687
"thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification,
688
"thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification,
689
"thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification,
690
+ "thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification,
691
"thread/tokenUsage/updated": CodexSchema.V2ThreadTokenUsageUpdatedNotification,
692
"turn/started": CodexSchema.V2TurnStartedNotification,
693
"hook/started": CodexSchema.V2HookStartedNotification,
@@ -669,6 +727,7 @@ export const SERVER_NOTIFICATION_PARAMS = {
727
"thread/compacted": CodexSchema.V2ContextCompactedNotification,
728
"model/rerouted": CodexSchema.V2ModelReroutedNotification,
729
"model/verification": CodexSchema.V2ModelVerificationNotification,
730
+ "turn/moderationMetadata": CodexSchema.V2TurnModerationMetadataNotification,
731
warning: CodexSchema.V2WarningNotification,
732
guardianWarning: CodexSchema.V2GuardianWarningNotification,
733
deprecationNotice: CodexSchema.V2DeprecationNoticeNotification,
packages/effect-codex-app-server/src/_generated/namespaces.gen.ts
+21
-1
@@ -1,5 +1,5 @@
1
// This file is generated by the effect-codex-app-server package. Do not edit manually.
2
-// Upstream protocol ref: 07b695190f30a450e4921f71f77473e564395c59
2
+// Upstream protocol ref: b39f943a634a6e7ba86c3d6e8cf6d5f35e612566
3
4
import * as CodexSchema from "./schema.gen.ts";
5
@@ -74,6 +74,7 @@ export const v2 = {
74
GetAccountParams: CodexSchema.V2GetAccountParams,
75
GetAccountRateLimitsResponse: CodexSchema.V2GetAccountRateLimitsResponse,
76
GetAccountResponse: CodexSchema.V2GetAccountResponse,
77
+ GetAccountTokenUsageResponse: CodexSchema.V2GetAccountTokenUsageResponse,
78
GuardianWarningNotification: CodexSchema.V2GuardianWarningNotification,
79
HookCompletedNotification: CodexSchema.V2HookCompletedNotification,
80
HooksListParams: CodexSchema.V2HooksListParams,
@@ -112,13 +113,19 @@ export const v2 = {
113
ModelProviderCapabilitiesReadResponse: CodexSchema.V2ModelProviderCapabilitiesReadResponse,
114
ModelReroutedNotification: CodexSchema.V2ModelReroutedNotification,
115
ModelVerificationNotification: CodexSchema.V2ModelVerificationNotification,
116
+ PermissionProfileListParams: CodexSchema.V2PermissionProfileListParams,
117
+ PermissionProfileListResponse: CodexSchema.V2PermissionProfileListResponse,
118
PlanDeltaNotification: CodexSchema.V2PlanDeltaNotification,
119
+ PluginInstalledParams: CodexSchema.V2PluginInstalledParams,
120
+ PluginInstalledResponse: CodexSchema.V2PluginInstalledResponse,
121
PluginInstallParams: CodexSchema.V2PluginInstallParams,
122
PluginInstallResponse: CodexSchema.V2PluginInstallResponse,
123
PluginListParams: CodexSchema.V2PluginListParams,
124
PluginListResponse: CodexSchema.V2PluginListResponse,
125
PluginReadParams: CodexSchema.V2PluginReadParams,
126
PluginReadResponse: CodexSchema.V2PluginReadResponse,
127
+ PluginShareCheckoutParams: CodexSchema.V2PluginShareCheckoutParams,
128
+ PluginShareCheckoutResponse: CodexSchema.V2PluginShareCheckoutResponse,
129
PluginShareDeleteParams: CodexSchema.V2PluginShareDeleteParams,
130
PluginShareDeleteResponse: CodexSchema.V2PluginShareDeleteResponse,
131
PluginShareListParams: CodexSchema.V2PluginShareListParams,
@@ -146,6 +153,8 @@ export const v2 = {
153
SkillsChangedNotification: CodexSchema.V2SkillsChangedNotification,
154
SkillsConfigWriteParams: CodexSchema.V2SkillsConfigWriteParams,
155
SkillsConfigWriteResponse: CodexSchema.V2SkillsConfigWriteResponse,
156
+ SkillsExtraRootsSetParams: CodexSchema.V2SkillsExtraRootsSetParams,
157
+ SkillsExtraRootsSetResponse: CodexSchema.V2SkillsExtraRootsSetResponse,
158
SkillsListParams: CodexSchema.V2SkillsListParams,
159
SkillsListResponse: CodexSchema.V2SkillsListResponse,
160
TerminalInteractionNotification: CodexSchema.V2TerminalInteractionNotification,
@@ -158,9 +167,18 @@ export const v2 = {
167
ThreadClosedNotification: CodexSchema.V2ThreadClosedNotification,
168
ThreadCompactStartParams: CodexSchema.V2ThreadCompactStartParams,
169
ThreadCompactStartResponse: CodexSchema.V2ThreadCompactStartResponse,
170
+ ThreadDeletedNotification: CodexSchema.V2ThreadDeletedNotification,
171
+ ThreadDeleteParams: CodexSchema.V2ThreadDeleteParams,
172
+ ThreadDeleteResponse: CodexSchema.V2ThreadDeleteResponse,
173
ThreadForkParams: CodexSchema.V2ThreadForkParams,
174
ThreadForkResponse: CodexSchema.V2ThreadForkResponse,
175
ThreadGoalClearedNotification: CodexSchema.V2ThreadGoalClearedNotification,
176
+ ThreadGoalClearParams: CodexSchema.V2ThreadGoalClearParams,
177
+ ThreadGoalClearResponse: CodexSchema.V2ThreadGoalClearResponse,
178
+ ThreadGoalGetParams: CodexSchema.V2ThreadGoalGetParams,
179
+ ThreadGoalGetResponse: CodexSchema.V2ThreadGoalGetResponse,
180
+ ThreadGoalSetParams: CodexSchema.V2ThreadGoalSetParams,
181
+ ThreadGoalSetResponse: CodexSchema.V2ThreadGoalSetResponse,
182
ThreadGoalUpdatedNotification: CodexSchema.V2ThreadGoalUpdatedNotification,
183
ThreadInjectItemsParams: CodexSchema.V2ThreadInjectItemsParams,
184
ThreadInjectItemsResponse: CodexSchema.V2ThreadInjectItemsResponse,
@@ -189,6 +207,7 @@ export const v2 = {
207
ThreadRollbackResponse: CodexSchema.V2ThreadRollbackResponse,
208
ThreadSetNameParams: CodexSchema.V2ThreadSetNameParams,
209
ThreadSetNameResponse: CodexSchema.V2ThreadSetNameResponse,
210
+ ThreadSettingsUpdatedNotification: CodexSchema.V2ThreadSettingsUpdatedNotification,
211
ThreadShellCommandParams: CodexSchema.V2ThreadShellCommandParams,
212
ThreadShellCommandResponse: CodexSchema.V2ThreadShellCommandResponse,
213
ThreadStartedNotification: CodexSchema.V2ThreadStartedNotification,
@@ -205,6 +224,7 @@ export const v2 = {
224
TurnDiffUpdatedNotification: CodexSchema.V2TurnDiffUpdatedNotification,
225
TurnInterruptParams: CodexSchema.V2TurnInterruptParams,
226
TurnInterruptResponse: CodexSchema.V2TurnInterruptResponse,
227
+ TurnModerationMetadataNotification: CodexSchema.V2TurnModerationMetadataNotification,
228
TurnPlanUpdatedNotification: CodexSchema.V2TurnPlanUpdatedNotification,
229
TurnStartedNotification: CodexSchema.V2TurnStartedNotification,
230
TurnStartParams: CodexSchema.V2TurnStartParams,
packages/effect-codex-app-server/src/_generated/schema.gen.ts
+3702
-1966
@@ -1,5 +1,5 @@
1
// This file is generated by the effect-codex-app-server package. Do not edit manually.
2
-// Upstream protocol ref: 07b695190f30a450e4921f71f77473e564395c59
2
+// Upstream protocol ref: b39f943a634a6e7ba86c3d6e8cf6d5f35e612566
3
4
import * as Schema from "effect/Schema";
5
@@ -48,6 +48,25 @@ export const ClientRequest__AbsolutePathBuf = Schema.String.annotate({
48
export type ClientRequest__AddCreditsNudgeCreditType = "credits" | "usage_limit";
49
export const ClientRequest__AddCreditsNudgeCreditType = Schema.Literals(["credits", "usage_limit"]);
50
51
+export type ClientRequest__AdditionalContextKind = "untrusted" | "application";
52
+export const ClientRequest__AdditionalContextKind = Schema.Literals(["untrusted", "application"]);
53
+
54
+export type ClientRequest__AgentMessageInputContent = {
55
+ readonly encrypted_content: string;
56
+ readonly type: "encrypted_content";
57
+};
58
+export const ClientRequest__AgentMessageInputContent = Schema.Union(
59
+ [
60
+ Schema.Struct({
61
+ encrypted_content: Schema.String,
62
+ type: Schema.Literal("encrypted_content").annotate({
63
+ title: "EncryptedContentAgentMessageInputContentType",
64
+ }),
65
+ }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
66
+ ],
67
+ { mode: "oneOf" },
68
+);
69
+
70
export type ClientRequest__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
71
export const ClientRequest__ApprovalsReviewer = Schema.Literals([
72
"user",
@@ -238,7 +257,7 @@ export const ClientRequest__ConfigReadParams = Schema.Struct({
257
Schema.Null,
258
]),
259
),
241
- includeLayers: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
260
+ includeLayers: Schema.optionalKey(Schema.Boolean),
261
});
262
263
export type ClientRequest__ExperimentalFeatureEnablementSetParams = {
@@ -254,6 +273,7 @@ export const ClientRequest__ExperimentalFeatureEnablementSetParams = Schema.Stru
273
export type ClientRequest__ExperimentalFeatureListParams = {
274
readonly cursor?: string | null;
275
readonly limit?: number | null;
276
+ readonly threadId?: string | null;
277
};
278
export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({
279
cursor: Schema.optionalKey(
@@ -275,6 +295,15 @@ export const ClientRequest__ExperimentalFeatureListParams = Schema.Struct({
295
Schema.Null,
296
]),
297
),
298
+ threadId: Schema.optionalKey(
299
+ Schema.Union([
300
+ Schema.String.annotate({
301
+ description:
302
+ "Optional loaded thread id. Pass this when showing feature state for an existing thread so enablement is computed from that thread's refreshed config, including project-local config for the thread's cwd.",
303
+ }),
304
+ Schema.Null,
305
+ ]),
306
+ ),
307
});
308
309
export type ClientRequest__ExternalAgentConfigDetectParams = {
@@ -322,7 +351,7 @@ export const ClientRequest__ExternalAgentConfigMigrationItemType = Schema.Litera
351
export type ClientRequest__FeedbackUploadParams = {
352
readonly classification: string;
353
readonly extraLogFiles?: ReadonlyArray<string> | null;
325
- readonly includeLogs: boolean;
354
+ readonly includeLogs?: boolean;
355
readonly reason?: string | null;
356
readonly tags?: { readonly [x: string]: string } | null;
357
readonly threadId?: string | null;
@@ -330,7 +359,7 @@ export type ClientRequest__FeedbackUploadParams = {
359
export const ClientRequest__FeedbackUploadParams = Schema.Struct({
360
classification: Schema.String,
361
extraLogFiles: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
333
- includeLogs: Schema.Boolean,
362
+ includeLogs: Schema.optionalKey(Schema.Boolean),
363
reason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
364
tags: Schema.optionalKey(
365
Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null]),
@@ -338,43 +367,6 @@ export const ClientRequest__FeedbackUploadParams = Schema.Struct({
367
threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
368
});
369
341
-export type ClientRequest__FileSystemAccessMode = "read" | "write" | "none";
342
-export const ClientRequest__FileSystemAccessMode = Schema.Literals(["read", "write", "none"]);
343
-
344
-export type ClientRequest__FileSystemSpecialPath =
345
- | { readonly kind: "root" }
346
- | { readonly kind: "minimal" }
347
- | { readonly kind: "project_roots"; readonly subpath?: string | null }
348
- | { readonly kind: "tmpdir" }
349
- | { readonly kind: "slash_tmp" }
350
- | { readonly kind: "unknown"; readonly path: string; readonly subpath?: string | null };
351
-export const ClientRequest__FileSystemSpecialPath = Schema.Union(
352
- [
353
- Schema.Struct({ kind: Schema.Literal("root") }).annotate({
354
- title: "RootFileSystemSpecialPath",
355
- }),
356
- Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({
357
- title: "MinimalFileSystemSpecialPath",
358
- }),
359
- Schema.Struct({
360
- kind: Schema.Literal("project_roots"),
361
- subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
362
- }).annotate({ title: "KindFileSystemSpecialPath" }),
363
- Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({
364
- title: "TmpdirFileSystemSpecialPath",
365
- }),
366
- Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({
367
- title: "SlashTmpFileSystemSpecialPath",
368
- }),
369
- Schema.Struct({
370
- kind: Schema.Literal("unknown"),
371
- path: Schema.String,
372
- subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
373
- }),
374
- ],
375
- { mode: "oneOf" },
376
-);
377
-
370
export type ClientRequest__FsCopyParams = {
371
readonly destinationPath: string;
372
readonly recursive?: boolean;
@@ -514,7 +506,6 @@ export const ClientRequest__GetAccountParams = Schema.Struct({
506
Schema.Boolean.annotate({
507
description:
508
"When `true`, requests a proactive token refresh before returning.\n\nIn managed auth mode this triggers the normal refresh-token flow. In external auth mode this flag is ignored. Clients should refresh tokens themselves and call `account/login/start` with `chatgptAuthTokens`.",
517
- default: false,
509
}),
510
),
511
});
@@ -537,6 +528,7 @@ export const ClientRequest__ImageDetail = Schema.Literals(["auto", "low", "high"
528
export type ClientRequest__InitializeCapabilities = {
529
readonly experimentalApi?: boolean;
530
readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
531
+ readonly requestAttestation?: boolean;
532
};
533
export const ClientRequest__InitializeCapabilities = Schema.Struct({
534
experimentalApi: Schema.optionalKey(
@@ -554,6 +546,12 @@ export const ClientRequest__InitializeCapabilities = Schema.Struct({
546
Schema.Null,
547
]),
548
),
549
+ requestAttestation: Schema.optionalKey(
550
+ Schema.Boolean.annotate({
551
+ description: "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.",
552
+ default: false,
553
+ }),
554
+ ),
555
}).annotate({ description: "Client-declared capabilities negotiated during initialize." });
556
557
export type ClientRequest__LocalShellAction = {
@@ -768,9 +766,39 @@ export const ClientRequest__ModelListParams = Schema.Struct({
766
export type ClientRequest__ModelProviderCapabilitiesReadParams = {};
767
export const ClientRequest__ModelProviderCapabilitiesReadParams = Schema.Struct({});
768
771
-export type ClientRequest__PermissionProfileNetworkPermissions = { readonly enabled: boolean };
772
-export const ClientRequest__PermissionProfileNetworkPermissions = Schema.Struct({
773
- enabled: Schema.Boolean,
769
+export type ClientRequest__PermissionProfileListParams = {
770
+ readonly cursor?: string | null;
771
+ readonly cwd?: string | null;
772
+ readonly limit?: number | null;
773
+};
774
+export const ClientRequest__PermissionProfileListParams = Schema.Struct({
775
+ cursor: Schema.optionalKey(
776
+ Schema.Union([
777
+ Schema.String.annotate({
778
+ description: "Opaque pagination cursor returned by a previous call.",
779
+ }),
780
+ Schema.Null,
781
+ ]),
782
+ ),
783
+ cwd: Schema.optionalKey(
784
+ Schema.Union([
785
+ Schema.String.annotate({
786
+ description: "Optional working directory to resolve project config layers.",
787
+ }),
788
+ Schema.Null,
789
+ ]),
790
+ ),
791
+ limit: Schema.optionalKey(
792
+ Schema.Union([
793
+ Schema.Number.annotate({
794
+ description: "Optional page size; defaults to the full result set.",
795
+ format: "uint32",
796
+ })
797
+ .check(Schema.isInt())
798
+ .check(Schema.isGreaterThanOrEqualTo(0)),
799
+ Schema.Null,
800
+ ]),
801
+ ),
802
});
803
804
export type ClientRequest__Personality = "none" | "friendly" | "pragmatic";
@@ -778,14 +806,21 @@ export const ClientRequest__Personality = Schema.Literals(["none", "friendly", "
806
807
export type ClientRequest__PluginListMarketplaceKind =
808
| "local"
809
+ | "vertical"
810
| "workspace-directory"
811
| "shared-with-me";
812
export const ClientRequest__PluginListMarketplaceKind = Schema.Literals([
813
"local",
814
+ "vertical",
815
"workspace-directory",
816
"shared-with-me",
817
]);
818
819
+export type ClientRequest__PluginShareCheckoutParams = { readonly remotePluginId: string };
820
+export const ClientRequest__PluginShareCheckoutParams = Schema.Struct({
821
+ remotePluginId: Schema.String,
822
+});
823
+
824
export type ClientRequest__PluginShareDeleteParams = { readonly remotePluginId: string };
825
export const ClientRequest__PluginShareDeleteParams = Schema.Struct({
826
remotePluginId: Schema.String,
@@ -808,6 +843,15 @@ export const ClientRequest__PluginSharePrincipalType = Schema.Literals([
843
"workspace",
844
]);
845
846
+export type ClientRequest__PluginShareTargetRole = "reader" | "editor";
847
+export const ClientRequest__PluginShareTargetRole = Schema.Literals(["reader", "editor"]);
848
+
849
+export type ClientRequest__PluginShareUpdateDiscoverability = "UNLISTED" | "PRIVATE";
850
+export const ClientRequest__PluginShareUpdateDiscoverability = Schema.Literals([
851
+ "UNLISTED",
852
+ "PRIVATE",
853
+]);
854
+
855
export type ClientRequest__PluginSkillReadParams = {
856
readonly remoteMarketplaceName: string;
857
readonly remotePluginId: string;
@@ -831,24 +875,10 @@ export const ClientRequest__PluginsMigration = Schema.Struct({
875
pluginNames: Schema.Array(Schema.String),
876
});
877
834
-export type ClientRequest__ReasoningEffort =
835
- | "none"
836
- | "minimal"
837
- | "low"
838
- | "medium"
839
- | "high"
840
- | "xhigh";
841
-export const ClientRequest__ReasoningEffort = Schema.Literals([
842
- "none",
843
- "minimal",
844
- "low",
845
- "medium",
846
- "high",
847
- "xhigh",
848
-]).annotate({
849
- description:
850
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
851
-});
878
+export type ClientRequest__ReasoningEffort = string;
879
+export const ClientRequest__ReasoningEffort = Schema.String.annotate({
880
+ description: "A non-empty reasoning effort value advertised by the model.",
881
+}).check(Schema.isMinLength(1));
882
883
export type ClientRequest__ReasoningItemContent =
884
| { readonly text: string; readonly type: "reasoning_text" }
@@ -1012,13 +1042,21 @@ export const ClientRequest__SessionMigration = Schema.Struct({
1042
title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1043
});
1044
1015
-export type ClientRequest__SkillsListExtraRootsForCwd = {
1016
- readonly cwd: string;
1017
- readonly extraUserRoots: ReadonlyArray<string>;
1045
+export type ClientRequest__SkillsListParams = {
1046
+ readonly cwds?: ReadonlyArray<string>;
1047
+ readonly forceReload?: boolean;
1048
};
1019
-export const ClientRequest__SkillsListExtraRootsForCwd = Schema.Struct({
1020
- cwd: Schema.String,
1021
- extraUserRoots: Schema.Array(Schema.String),
1049
+export const ClientRequest__SkillsListParams = Schema.Struct({
1050
+ cwds: Schema.optionalKey(
1051
+ Schema.Array(Schema.String).annotate({
1052
+ description: "When empty, defaults to the current session working directory.",
1053
+ }),
1054
+ ),
1055
+ forceReload: Schema.optionalKey(
1056
+ Schema.Boolean.annotate({
1057
+ description: "When true, bypass the skills cache and re-scan skills from disk.",
1058
+ }),
1059
+ ),
1060
});
1061
1062
export type ClientRequest__SortDirection = "asc" | "desc";
@@ -1069,6 +1107,31 @@ export const ClientRequest__ThreadArchiveParams = Schema.Struct({ threadId: Sche
1107
export type ClientRequest__ThreadCompactStartParams = { readonly threadId: string };
1108
export const ClientRequest__ThreadCompactStartParams = Schema.Struct({ threadId: Schema.String });
1109
1110
+export type ClientRequest__ThreadDeleteParams = { readonly threadId: string };
1111
+export const ClientRequest__ThreadDeleteParams = Schema.Struct({ threadId: Schema.String });
1112
+
1113
+export type ClientRequest__ThreadGoalClearParams = { readonly threadId: string };
1114
+export const ClientRequest__ThreadGoalClearParams = Schema.Struct({ threadId: Schema.String });
1115
+
1116
+export type ClientRequest__ThreadGoalGetParams = { readonly threadId: string };
1117
+export const ClientRequest__ThreadGoalGetParams = Schema.Struct({ threadId: Schema.String });
1118
+
1119
+export type ClientRequest__ThreadGoalStatus =
1120
+ | "active"
1121
+ | "paused"
1122
+ | "blocked"
1123
+ | "usageLimited"
1124
+ | "budgetLimited"
1125
+ | "complete";
1126
+export const ClientRequest__ThreadGoalStatus = Schema.Literals([
1127
+ "active",
1128
+ "paused",
1129
+ "blocked",
1130
+ "usageLimited",
1131
+ "budgetLimited",
1132
+ "complete",
1133
+]);
1134
+
1135
export type ClientRequest__ThreadInjectItemsParams = {
1136
readonly items: ReadonlyArray<unknown>;
1137
readonly threadId: string;
@@ -1155,7 +1218,6 @@ export const ClientRequest__ThreadReadParams = Schema.Struct({
1218
includeTurns: Schema.optionalKey(
1219
Schema.Boolean.annotate({
1220
description: "When true, include turns and their items from rollout history.",
1158
- default: false,
1221
}),
1222
),
1223
threadId: Schema.String,
@@ -1200,12 +1262,8 @@ export const ClientRequest__ThreadShellCommandParams = Schema.Struct({
1262
export type ClientRequest__ThreadSortKey = "created_at" | "updated_at";
1263
export const ClientRequest__ThreadSortKey = Schema.Literals(["created_at", "updated_at"]);
1264
1203
-export type ClientRequest__ThreadSource = "user" | "subagent" | "memory_consolidation";
1204
-export const ClientRequest__ThreadSource = Schema.Literals([
1205
- "user",
1206
- "subagent",
1207
- "memory_consolidation",
1208
-]);
1265
+export type ClientRequest__ThreadSource = string;
1266
+export const ClientRequest__ThreadSource = Schema.String;
1267
1268
export type ClientRequest__ThreadSourceKind =
1269
| "cli"
@@ -1249,6 +1307,9 @@ export const ClientRequest__TurnInterruptParams = Schema.Struct({
1307
turnId: Schema.String,
1308
});
1309
1310
+export type ClientRequest__TurnItemsView = "notLoaded" | "summary" | "full";
1311
+export const ClientRequest__TurnItemsView = Schema.Literals(["notLoaded", "summary", "full"]);
1312
+
1313
export type ClientRequest__WindowsSandboxSetupMode = "elevated" | "unelevated";
1314
export const ClientRequest__WindowsSandboxSetupMode = Schema.Literals(["elevated", "unelevated"]);
1315
@@ -1265,11 +1326,11 @@ export const CommandExecutionRequestApprovalParams__AdditionalNetworkPermissions
1326
enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1327
});
1328
1268
-export type CommandExecutionRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "none";
1329
+export type CommandExecutionRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
1330
export const CommandExecutionRequestApprovalParams__FileSystemAccessMode = Schema.Literals([
1331
"read",
1332
"write",
1272
- "none",
1333
+ "deny",
1334
]);
1335
1336
export type CommandExecutionRequestApprovalParams__FileSystemSpecialPath =
@@ -1562,11 +1623,11 @@ export const PermissionsRequestApprovalParams__AdditionalNetworkPermissions = Sc
1623
enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1624
});
1625
1565
-export type PermissionsRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "none";
1626
+export type PermissionsRequestApprovalParams__FileSystemAccessMode = "read" | "write" | "deny";
1627
export const PermissionsRequestApprovalParams__FileSystemAccessMode = Schema.Literals([
1628
"read",
1629
"write",
1569
- "none",
1630
+ "deny",
1631
]);
1632
1633
export type PermissionsRequestApprovalParams__FileSystemSpecialPath =
@@ -1616,11 +1677,11 @@ export const PermissionsRequestApprovalResponse__AdditionalNetworkPermissions =
1677
enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
1678
});
1679
1619
-export type PermissionsRequestApprovalResponse__FileSystemAccessMode = "read" | "write" | "none";
1680
+export type PermissionsRequestApprovalResponse__FileSystemAccessMode = "read" | "write" | "deny";
1681
export const PermissionsRequestApprovalResponse__FileSystemAccessMode = Schema.Literals([
1682
"read",
1683
"write",
1623
- "none",
1684
+ "deny",
1685
]);
1686
1687
export type PermissionsRequestApprovalResponse__FileSystemSpecialPath =
@@ -1674,6 +1735,26 @@ export const ServerNotification__AccountLoginCompletedNotification = Schema.Stru
1735
success: Schema.Boolean,
1736
});
1737
1738
+export type ServerNotification__ActivePermissionProfile = {
1739
+ readonly extends?: string | null;
1740
+ readonly id: string;
1741
+};
1742
+export const ServerNotification__ActivePermissionProfile = Schema.Struct({
1743
+ extends: Schema.optionalKey(
1744
+ Schema.Union([
1745
+ Schema.String.annotate({
1746
+ description:
1747
+ "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
1748
+ }),
1749
+ Schema.Null,
1750
+ ]),
1751
+ ),
1752
+ id: Schema.String.annotate({
1753
+ description:
1754
+ "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
1755
+ }),
1756
+});
1757
+
1758
export type ServerNotification__AdditionalNetworkPermissions = {
1759
readonly enabled?: boolean | null;
1760
};
@@ -1728,16 +1809,58 @@ export const ServerNotification__AppScreenshot = Schema.Struct({
1809
userPrompt: Schema.String,
1810
});
1811
1812
+export type ServerNotification__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
1813
+export const ServerNotification__ApprovalsReviewer = Schema.Literals([
1814
+ "user",
1815
+ "auto_review",
1816
+ "guardian_subagent",
1817
+]).annotate({
1818
+ description:
1819
+ "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
1820
+});
1821
+
1822
+export type ServerNotification__AskForApproval =
1823
+ | "untrusted"
1824
+ | "on-failure"
1825
+ | "on-request"
1826
+ | "never"
1827
+ | {
1828
+ readonly granular: {
1829
+ readonly mcp_elicitations: boolean;
1830
+ readonly request_permissions?: boolean;
1831
+ readonly rules: boolean;
1832
+ readonly sandbox_approval: boolean;
1833
+ readonly skill_approval?: boolean;
1834
+ };
1835
+ };
1836
+export const ServerNotification__AskForApproval = Schema.Union(
1837
+ [
1838
+ Schema.Literals(["untrusted", "on-failure", "on-request", "never"]),
1839
+ Schema.Struct({
1840
+ granular: Schema.Struct({
1841
+ mcp_elicitations: Schema.Boolean,
1842
+ request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
1843
+ rules: Schema.Boolean,
1844
+ sandbox_approval: Schema.Boolean,
1845
+ skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
1846
+ }),
1847
+ }).annotate({ title: "GranularAskForApproval" }),
1848
+ ],
1849
+ { mode: "oneOf" },
1850
+);
1851
+
1852
export type ServerNotification__AuthMode =
1853
| "apikey"
1854
| "chatgpt"
1855
| "chatgptAuthTokens"
1735
- | "agentIdentity";
1856
+ | "agentIdentity"
1857
+ | "personalAccessToken";
1858
export const ServerNotification__AuthMode = Schema.Literals([
1859
"apikey",
1860
"chatgpt",
1861
"chatgptAuthTokens",
1862
"agentIdentity",
1863
+ "personalAccessToken",
1864
]).annotate({ description: "Authentication mode for OpenAI-backed providers." });
1865
1866
export type ServerNotification__AutoReviewDecisionSource = "agent";
@@ -1895,8 +2018,8 @@ export const ServerNotification__FileChangeOutputDeltaNotification = Schema.Stru
2018
"Deprecated legacy notification for `apply_patch` textual output.\n\nThe server no longer emits this notification.",
2019
});
2020
1898
-export type ServerNotification__FileSystemAccessMode = "read" | "write" | "none";
1899
-export const ServerNotification__FileSystemAccessMode = Schema.Literals(["read", "write", "none"]);
2021
+export type ServerNotification__FileSystemAccessMode = "read" | "write" | "deny";
2022
+export const ServerNotification__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]);
2023
2024
export type ServerNotification__FileSystemSpecialPath =
2025
| { readonly kind: "root" }
@@ -2005,6 +2128,8 @@ export type ServerNotification__HookEventName =
2128
| "postCompact"
2129
| "sessionStart"
2130
| "userPromptSubmit"
2131
+ | "subagentStart"
2132
+ | "subagentStop"
2133
| "stop";
2134
export const ServerNotification__HookEventName = Schema.Literals([
2135
"preToolUse",
@@ -2014,6 +2139,8 @@ export const ServerNotification__HookEventName = Schema.Literals([
2139
"postCompact",
2140
"sessionStart",
2141
"userPromptSubmit",
2142
+ "subagentStart",
2143
+ "subagentStop",
2144
"stop",
2145
]);
2146
@@ -2063,6 +2190,9 @@ export const ServerNotification__HookRunStatus = Schema.Literals([
2190
export type ServerNotification__HookScope = "thread" | "turn";
2191
export const ServerNotification__HookScope = Schema.Literals(["thread", "turn"]);
2192
2193
+export type ServerNotification__ImageDetail = "auto" | "low" | "high" | "original";
2194
+export const ServerNotification__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
2195
+
2196
export type ServerNotification__McpServerOauthLoginCompletedNotification = {
2197
readonly error?: string | null;
2198
readonly name: string;
@@ -2146,6 +2276,11 @@ export const ServerNotification__MessagePhase = Schema.Literals([
2276
'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.',
2277
});
2278
2279
+export type ServerNotification__ModeKind = "plan" | "default";
2280
+export const ServerNotification__ModeKind = Schema.Literals(["plan", "default"]).annotate({
2281
+ description: "Initial collaboration mode to use when the TUI starts.",
2282
+});
2283
+
2284
export type ServerNotification__ModelRerouteReason = "highRiskCyberActivity";
2285
export const ServerNotification__ModelRerouteReason = Schema.Literal("highRiskCyberActivity");
2286
@@ -2199,6 +2334,9 @@ export const ServerNotification__PatchChangeKind = Schema.Union(
2334
{ mode: "oneOf" },
2335
);
2336
2337
+export type ServerNotification__Personality = "none" | "friendly" | "pragmatic";
2338
+export const ServerNotification__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
2339
+
2340
export type ServerNotification__PlanDeltaNotification = {
2341
readonly delta: string;
2342
readonly itemId: string;
@@ -2330,23 +2468,21 @@ export const ServerNotification__RateLimitWindow = Schema.Struct({
2468
export type ServerNotification__RealtimeConversationVersion = "v1" | "v2";
2469
export const ServerNotification__RealtimeConversationVersion = Schema.Literals(["v1", "v2"]);
2470
2333
-export type ServerNotification__ReasoningEffort =
2334
- | "none"
2335
- | "minimal"
2336
- | "low"
2337
- | "medium"
2338
- | "high"
2339
- | "xhigh";
2340
-export const ServerNotification__ReasoningEffort = Schema.Literals([
2341
- "none",
2342
- "minimal",
2343
- "low",
2344
- "medium",
2345
- "high",
2346
- "xhigh",
2347
-]).annotate({
2471
+export type ServerNotification__ReasoningEffort = string;
2472
+export const ServerNotification__ReasoningEffort = Schema.String.annotate({
2473
+ description: "A non-empty reasoning effort value advertised by the model.",
2474
+}).check(Schema.isMinLength(1));
2475
+
2476
+export type ServerNotification__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
2477
+export const ServerNotification__ReasoningSummary = Schema.Union(
2478
+ [
2479
+ Schema.Literals(["auto", "concise", "detailed"]),
2480
+ Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
2481
+ ],
2482
+ { mode: "oneOf" },
2483
+).annotate({
2484
description:
2349
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
2485
+ "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
2486
});
2487
2488
export type ServerNotification__ReasoningSummaryPartAddedNotification = {
@@ -2416,6 +2552,26 @@ export const ServerNotification__SkillsChangedNotification = Schema.Struct({}).a
2552
"Notification emitted when watched local skill files change.\n\nTreat this as an invalidation signal and re-run `skills/list` with the client's current parameters when refreshed skill metadata is needed.",
2553
});
2554
2555
+export type ServerNotification__SpendControlLimitSnapshot = {
2556
+ readonly limit: string;
2557
+ readonly remainingPercent: number;
2558
+ readonly resetsAt: number;
2559
+ readonly used: string;
2560
+};
2561
+export const ServerNotification__SpendControlLimitSnapshot = Schema.Struct({
2562
+ limit: Schema.String,
2563
+ remainingPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
2564
+ resetsAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
2565
+ used: Schema.String,
2566
+});
2567
+
2568
+export type ServerNotification__SubAgentActivityKind = "started" | "interacted" | "interrupted";
2569
+export const ServerNotification__SubAgentActivityKind = Schema.Literals([
2570
+ "started",
2571
+ "interacted",
2572
+ "interrupted",
2573
+]);
2574
+
2575
export type ServerNotification__TerminalInteractionNotification = {
2576
readonly itemId: string;
2577
readonly processId: string;
@@ -2485,6 +2641,11 @@ export const ServerNotification__ThreadClosedNotification = Schema.Struct({
2641
threadId: Schema.String,
2642
});
2643
2644
+export type ServerNotification__ThreadDeletedNotification = { readonly threadId: string };
2645
+export const ServerNotification__ThreadDeletedNotification = Schema.Struct({
2646
+ threadId: Schema.String,
2647
+});
2648
+
2649
export type ServerNotification__ThreadGoalClearedNotification = { readonly threadId: string };
2650
export const ServerNotification__ThreadGoalClearedNotification = Schema.Struct({
2651
threadId: Schema.String,
@@ -2493,11 +2654,15 @@ export const ServerNotification__ThreadGoalClearedNotification = Schema.Struct({
2654
export type ServerNotification__ThreadGoalStatus =
2655
| "active"
2656
| "paused"
2657
+ | "blocked"
2658
+ | "usageLimited"
2659
| "budgetLimited"
2660
| "complete";
2661
export const ServerNotification__ThreadGoalStatus = Schema.Literals([
2662
"active",
2663
"paused",
2664
+ "blocked",
2665
+ "usageLimited",
2666
"budgetLimited",
2667
"complete",
2668
]);
@@ -2608,12 +2773,8 @@ export const ServerNotification__ThreadRealtimeTranscriptDoneNotification = Sche
2773
"EXPERIMENTAL - final transcript text emitted when realtime completes a transcript part.",
2774
});
2775
2611
-export type ServerNotification__ThreadSource = "user" | "subagent" | "memory_consolidation";
2612
-export const ServerNotification__ThreadSource = Schema.Literals([
2613
- "user",
2614
- "subagent",
2615
- "memory_consolidation",
2616
-]);
2776
+export type ServerNotification__ThreadSource = string;
2777
+export const ServerNotification__ThreadSource = Schema.String;
2778
2779
export type ServerNotification__ThreadUnarchivedNotification = { readonly threadId: string };
2780
export const ServerNotification__ThreadUnarchivedNotification = Schema.Struct({
@@ -2649,6 +2810,17 @@ export const ServerNotification__TurnDiffUpdatedNotification = Schema.Struct({
2810
"Notification that the turn-level unified diff has changed. Contains the latest aggregated diff across all file changes in the turn.",
2811
});
2812
2813
+export type ServerNotification__TurnModerationMetadataNotification = {
2814
+ readonly metadata: unknown;
2815
+ readonly threadId: string;
2816
+ readonly turnId: string;
2817
+};
2818
+export const ServerNotification__TurnModerationMetadataNotification = Schema.Struct({
2819
+ metadata: Schema.Unknown,
2820
+ threadId: Schema.String,
2821
+ turnId: Schema.String,
2822
+});
2823
+
2824
export type ServerNotification__TurnPlanStepStatus = "pending" | "inProgress" | "completed";
2825
export const ServerNotification__TurnPlanStepStatus = Schema.Literals([
2826
"pending",
@@ -2742,6 +2914,9 @@ export const ServerRequest__AdditionalNetworkPermissions = Schema.Struct({
2914
enabled: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
2915
});
2916
2917
+export type ServerRequest__AttestationGenerateParams = {};
2918
+export const ServerRequest__AttestationGenerateParams = Schema.Struct({});
2919
+
2920
export type ServerRequest__ChatgptAuthTokensRefreshReason = "unauthorized";
2921
export const ServerRequest__ChatgptAuthTokensRefreshReason = Schema.Literal("unauthorized");
2922
@@ -2789,6 +2964,7 @@ export type ServerRequest__FileChangeRequestApprovalParams = {
2964
readonly grantRoot?: string | null;
2965
readonly itemId: string;
2966
readonly reason?: string | null;
2967
+ readonly startedAtMs: number;
2968
readonly threadId: string;
2969
readonly turnId: string;
2970
};
@@ -2811,12 +2987,16 @@ export const ServerRequest__FileChangeRequestApprovalParams = Schema.Struct({
2987
Schema.Null,
2988
]),
2989
),
2990
+ startedAtMs: Schema.Number.annotate({
2991
+ description: "Unix timestamp (in milliseconds) when this approval request started.",
2992
+ format: "int64",
2993
+ }).check(Schema.isInt()),
2994
threadId: Schema.String,
2995
turnId: Schema.String,
2996
});
2997
2818
-export type ServerRequest__FileSystemAccessMode = "read" | "write" | "none";
2819
-export const ServerRequest__FileSystemAccessMode = Schema.Literals(["read", "write", "none"]);
2998
+export type ServerRequest__FileSystemAccessMode = "read" | "write" | "deny";
2999
+export const ServerRequest__FileSystemAccessMode = Schema.Literals(["read", "write", "deny"]);
3000
3001
export type ServerRequest__FileSystemSpecialPath =
3002
| { readonly kind: "root" }
@@ -2989,6 +3169,7 @@ export const V1InitializeParams__ClientInfo = Schema.Struct({
3169
export type V1InitializeParams__InitializeCapabilities = {
3170
readonly experimentalApi?: boolean;
3171
readonly optOutNotificationMethods?: ReadonlyArray<string> | null;
3172
+ readonly requestAttestation?: boolean;
3173
};
3174
export const V1InitializeParams__InitializeCapabilities = Schema.Struct({
3175
experimentalApi: Schema.optionalKey(
@@ -3006,6 +3187,12 @@ export const V1InitializeParams__InitializeCapabilities = Schema.Struct({
3187
Schema.Null,
3188
]),
3189
),
3190
+ requestAttestation: Schema.optionalKey(
3191
+ Schema.Boolean.annotate({
3192
+ description: "Opt into `attestation/generate` requests for upstream `x-oai-attestation`.",
3193
+ default: false,
3194
+ }),
3195
+ ),
3196
}).annotate({ description: "Client-declared capabilities negotiated during initialize." });
3197
3198
export type V2AccountRateLimitsUpdatedNotification__CreditsSnapshot = {
@@ -3076,16 +3263,31 @@ export const V2AccountRateLimitsUpdatedNotification__RateLimitWindow = Schema.St
3263
),
3264
});
3265
3266
+export type V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = {
3267
+ readonly limit: string;
3268
+ readonly remainingPercent: number;
3269
+ readonly resetsAt: number;
3270
+ readonly used: string;
3271
+};
3272
+export const V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot = Schema.Struct({
3273
+ limit: Schema.String,
3274
+ remainingPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
3275
+ resetsAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
3276
+ used: Schema.String,
3277
+});
3278
+
3279
export type V2AccountUpdatedNotification__AuthMode =
3280
| "apikey"
3281
| "chatgpt"
3282
| "chatgptAuthTokens"
3083
- | "agentIdentity";
3283
+ | "agentIdentity"
3284
+ | "personalAccessToken";
3285
export const V2AccountUpdatedNotification__AuthMode = Schema.Literals([
3286
"apikey",
3287
"chatgpt",
3288
"chatgptAuthTokens",
3289
"agentIdentity",
3290
+ "personalAccessToken",
3291
]).annotate({ description: "Authentication mode for OpenAI-backed providers." });
3292
3293
export type V2AccountUpdatedNotification__PlanType =
@@ -3209,50 +3411,6 @@ export const V2CommandExecParams__CommandExecTerminalSize = Schema.Struct({
3411
.check(Schema.isGreaterThanOrEqualTo(0)),
3412
}).annotate({ description: "PTY size in character cells for `command/exec` PTY sessions." });
3413
3212
-export type V2CommandExecParams__FileSystemAccessMode = "read" | "write" | "none";
3213
-export const V2CommandExecParams__FileSystemAccessMode = Schema.Literals(["read", "write", "none"]);
3214
-
3215
-export type V2CommandExecParams__FileSystemSpecialPath =
3216
- | { readonly kind: "root" }
3217
- | { readonly kind: "minimal" }
3218
- | { readonly kind: "project_roots"; readonly subpath?: string | null }
3219
- | { readonly kind: "tmpdir" }
3220
- | { readonly kind: "slash_tmp" }
3221
- | { readonly kind: "unknown"; readonly path: string; readonly subpath?: string | null };
3222
-export const V2CommandExecParams__FileSystemSpecialPath = Schema.Union(
3223
- [
3224
- Schema.Struct({ kind: Schema.Literal("root") }).annotate({
3225
- title: "RootFileSystemSpecialPath",
3226
- }),
3227
- Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({
3228
- title: "MinimalFileSystemSpecialPath",
3229
- }),
3230
- Schema.Struct({
3231
- kind: Schema.Literal("project_roots"),
3232
- subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3233
- }).annotate({ title: "KindFileSystemSpecialPath" }),
3234
- Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({
3235
- title: "TmpdirFileSystemSpecialPath",
3236
- }),
3237
- Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({
3238
- title: "SlashTmpFileSystemSpecialPath",
3239
- }),
3240
- Schema.Struct({
3241
- kind: Schema.Literal("unknown"),
3242
- path: Schema.String,
3243
- subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3244
- }),
3245
- ],
3246
- { mode: "oneOf" },
3247
-);
3248
-
3249
-export type V2CommandExecParams__PermissionProfileNetworkPermissions = {
3250
- readonly enabled: boolean;
3251
-};
3252
-export const V2CommandExecParams__PermissionProfileNetworkPermissions = Schema.Struct({
3253
- enabled: Schema.Boolean,
3254
-});
3255
-
3414
export type V2ConfigBatchWriteParams__MergeStrategy = "replace" | "upsert";
3415
export const V2ConfigBatchWriteParams__MergeStrategy = Schema.Literals(["replace", "upsert"]);
3416
@@ -3328,28 +3486,31 @@ export const V2ConfigReadResponse__AskForApproval = Schema.Union(
3486
{ mode: "oneOf" },
3487
);
3488
3331
-export type V2ConfigReadResponse__ForcedLoginMethod = "chatgpt" | "api";
3332
-export const V2ConfigReadResponse__ForcedLoginMethod = Schema.Literals(["chatgpt", "api"]);
3333
-
3334
-export type V2ConfigReadResponse__ReasoningEffort =
3335
- | "none"
3336
- | "minimal"
3337
- | "low"
3338
- | "medium"
3339
- | "high"
3340
- | "xhigh";
3341
-export const V2ConfigReadResponse__ReasoningEffort = Schema.Literals([
3342
- "none",
3343
- "minimal",
3344
- "low",
3345
- "medium",
3346
- "high",
3347
- "xhigh",
3489
+export type V2ConfigReadResponse__AutoCompactTokenLimitScope = "total" | "body_after_prefix";
3490
+export const V2ConfigReadResponse__AutoCompactTokenLimitScope = Schema.Literals([
3491
+ "total",
3492
+ "body_after_prefix",
3493
]).annotate({
3494
description:
3350
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
3495
+ "Selects which part of the active context is charged against `model_auto_compact_token_limit`.",
3496
});
3497
3498
+export type V2ConfigReadResponse__ForcedChatgptWorkspaceIds = string | ReadonlyArray<string>;
3499
+export const V2ConfigReadResponse__ForcedChatgptWorkspaceIds = Schema.Union([
3500
+ Schema.String,
3501
+ Schema.Array(Schema.String),
3502
+]).annotate({
3503
+ description: "Backward-compatible API shape for ChatGPT workspace login restrictions.",
3504
+});
3505
+
3506
+export type V2ConfigReadResponse__ForcedLoginMethod = "chatgpt" | "api";
3507
+export const V2ConfigReadResponse__ForcedLoginMethod = Schema.Literals(["chatgpt", "api"]);
3508
+
3509
+export type V2ConfigReadResponse__ReasoningEffort = string;
3510
+export const V2ConfigReadResponse__ReasoningEffort = Schema.String.annotate({
3511
+ description: "A non-empty reasoning effort value advertised by the model.",
3512
+}).check(Schema.isMinLength(1));
3513
+
3514
export type V2ConfigReadResponse__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
3515
export const V2ConfigReadResponse__ReasoningSummary = Schema.Union(
3516
[
@@ -3444,10 +3605,18 @@ export const V2ConfigRequirementsReadResponse__AskForApproval = Schema.Union(
3605
{ mode: "oneOf" },
3606
);
3607
3608
+export type V2ConfigRequirementsReadResponse__ComputerUseRequirements = {
3609
+ readonly allowLockedComputerUse?: boolean | null;
3610
+};
3611
+export const V2ConfigRequirementsReadResponse__ComputerUseRequirements = Schema.Struct({
3612
+ allowLockedComputerUse: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
3613
+});
3614
+
3615
export type V2ConfigRequirementsReadResponse__ConfiguredHookHandler =
3616
| {
3617
readonly async: boolean;
3618
readonly command: string;
3619
+ readonly commandWindows?: string | null;
3620
readonly statusMessage?: string | null;
3621
readonly timeoutSec?: number | null;
3622
readonly type: "command";
@@ -3459,6 +3628,7 @@ export const V2ConfigRequirementsReadResponse__ConfiguredHookHandler = Schema.Un
3628
Schema.Struct({
3629
async: Schema.Boolean,
3630
command: Schema.String,
3631
+ commandWindows: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3632
statusMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
3633
timeoutSec: Schema.optionalKey(
3634
Schema.Union([
@@ -3486,10 +3656,10 @@ export const V2ConfigRequirementsReadResponse__NetworkDomainPermission = Schema.
3656
"deny",
3657
]);
3658
3489
-export type V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = "allow" | "none";
3659
+export type V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = "allow" | "deny";
3660
export const V2ConfigRequirementsReadResponse__NetworkUnixSocketPermission = Schema.Literals([
3661
"allow",
3492
- "none",
3662
+ "deny",
3663
]);
3664
3665
export type V2ConfigRequirementsReadResponse__ResidencyRequirement = "us";
@@ -3512,6 +3682,12 @@ export const V2ConfigRequirementsReadResponse__WebSearchMode = Schema.Literals([
3682
"live",
3683
]);
3684
3685
+export type V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode = "elevated" | "unelevated";
3686
+export const V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode = Schema.Literals([
3687
+ "elevated",
3688
+ "unelevated",
3689
+]);
3690
+
3691
export type V2ConfigValueWriteParams__MergeStrategy = "replace" | "upsert";
3692
export const V2ConfigValueWriteParams__MergeStrategy = Schema.Literals(["replace", "upsert"]);
3693
@@ -3831,6 +4007,19 @@ export const V2GetAccountRateLimitsResponse__RateLimitWindow = Schema.Struct({
4007
),
4008
});
4009
4010
+export type V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot = {
4011
+ readonly limit: string;
4012
+ readonly remainingPercent: number;
4013
+ readonly resetsAt: number;
4014
+ readonly used: string;
4015
+};
4016
+export const V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot = Schema.Struct({
4017
+ limit: Schema.String,
4018
+ remainingPercent: Schema.Number.annotate({ format: "int32" }).check(Schema.isInt()),
4019
+ resetsAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
4020
+ used: Schema.String,
4021
+});
4022
+
4023
export type V2GetAccountResponse__PlanType =
4024
| "free"
4025
| "go"
@@ -3859,6 +4048,40 @@ export const V2GetAccountResponse__PlanType = Schema.Literals([
4048
"unknown",
4049
]);
4050
4051
+export type V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket = {
4052
+ readonly startDate: string;
4053
+ readonly tokens: number;
4054
+};
4055
+export const V2GetAccountTokenUsageResponse__AccountTokenUsageDailyBucket = Schema.Struct({
4056
+ startDate: Schema.String,
4057
+ tokens: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
4058
+});
4059
+
4060
+export type V2GetAccountTokenUsageResponse__AccountTokenUsageSummary = {
4061
+ readonly currentStreakDays?: number | null;
4062
+ readonly lifetimeTokens?: number | null;
4063
+ readonly longestRunningTurnSec?: number | null;
4064
+ readonly longestStreakDays?: number | null;
4065
+ readonly peakDailyTokens?: number | null;
4066
+};
4067
+export const V2GetAccountTokenUsageResponse__AccountTokenUsageSummary = Schema.Struct({
4068
+ currentStreakDays: Schema.optionalKey(
4069
+ Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
4070
+ ),
4071
+ lifetimeTokens: Schema.optionalKey(
4072
+ Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
4073
+ ),
4074
+ longestRunningTurnSec: Schema.optionalKey(
4075
+ Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
4076
+ ),
4077
+ longestStreakDays: Schema.optionalKey(
4078
+ Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
4079
+ ),
4080
+ peakDailyTokens: Schema.optionalKey(
4081
+ Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
4082
+ ),
4083
+});
4084
+
4085
export type V2HookCompletedNotification__AbsolutePathBuf = string;
4086
export const V2HookCompletedNotification__AbsolutePathBuf = Schema.String.annotate({
4087
description:
@@ -3873,6 +4096,8 @@ export type V2HookCompletedNotification__HookEventName =
4096
| "postCompact"
4097
| "sessionStart"
4098
| "userPromptSubmit"
4099
+ | "subagentStart"
4100
+ | "subagentStop"
4101
| "stop";
4102
export const V2HookCompletedNotification__HookEventName = Schema.Literals([
4103
"preToolUse",
@@ -3882,6 +4107,8 @@ export const V2HookCompletedNotification__HookEventName = Schema.Literals([
4107
"postCompact",
4108
"sessionStart",
4109
"userPromptSubmit",
4110
+ "subagentStart",
4111
+ "subagentStop",
4112
"stop",
4113
]);
4114
@@ -3949,6 +4176,8 @@ export type V2HooksListResponse__HookEventName =
4176
| "postCompact"
4177
| "sessionStart"
4178
| "userPromptSubmit"
4179
+ | "subagentStart"
4180
+ | "subagentStop"
4181
| "stop";
4182
export const V2HooksListResponse__HookEventName = Schema.Literals([
4183
"preToolUse",
@@ -3958,6 +4187,8 @@ export const V2HooksListResponse__HookEventName = Schema.Literals([
4187
"postCompact",
4188
"sessionStart",
4189
"userPromptSubmit",
4190
+ "subagentStart",
4191
+ "subagentStop",
4192
"stop",
4193
]);
4194
@@ -3972,6 +4203,7 @@ export type V2HooksListResponse__HookSource =
4203
| "sessionFlags"
4204
| "plugin"
4205
| "cloudRequirements"
4206
+ | "cloudManagedConfig"
4207
| "legacyManagedConfigFile"
4208
| "legacyManagedConfigMdm"
4209
| "unknown";
@@ -3983,6 +4215,7 @@ export const V2HooksListResponse__HookSource = Schema.Literals([
4215
"sessionFlags",
4216
"plugin",
4217
"cloudRequirements",
4218
+ "cloudManagedConfig",
4219
"legacyManagedConfigFile",
4220
"legacyManagedConfigMdm",
4221
"unknown",
@@ -4010,6 +4243,8 @@ export type V2HookStartedNotification__HookEventName =
4243
| "postCompact"
4244
| "sessionStart"
4245
| "userPromptSubmit"
4246
+ | "subagentStart"
4247
+ | "subagentStop"
4248
| "stop";
4249
export const V2HookStartedNotification__HookEventName = Schema.Literals([
4250
"preToolUse",
@@ -4019,6 +4254,8 @@ export const V2HookStartedNotification__HookEventName = Schema.Literals([
4254
"postCompact",
4255
"sessionStart",
4256
"userPromptSubmit",
4257
+ "subagentStart",
4258
+ "subagentStop",
4259
"stop",
4260
]);
4261
@@ -4139,6 +4376,14 @@ export const V2ItemCompletedNotification__HookPromptFragment = Schema.Struct({
4376
text: Schema.String,
4377
});
4378
4379
+export type V2ItemCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original";
4380
+export const V2ItemCompletedNotification__ImageDetail = Schema.Literals([
4381
+ "auto",
4382
+ "low",
4383
+ "high",
4384
+ "original",
4385
+]);
4386
+
4387
export type V2ItemCompletedNotification__McpToolCallError = { readonly message: string };
4388
export const V2ItemCompletedNotification__McpToolCallError = Schema.Struct({
4389
message: Schema.String,
@@ -4220,24 +4465,20 @@ export const V2ItemCompletedNotification__PatchChangeKind = Schema.Union(
4465
{ mode: "oneOf" },
4466
);
4467
4223
-export type V2ItemCompletedNotification__ReasoningEffort =
4224
- | "none"
4225
- | "minimal"
4226
- | "low"
4227
- | "medium"
4228
- | "high"
4229
- | "xhigh";
4230
-export const V2ItemCompletedNotification__ReasoningEffort = Schema.Literals([
4231
- "none",
4232
- "minimal",
4233
- "low",
4234
- "medium",
4235
- "high",
4236
- "xhigh",
4237
-]).annotate({
4238
- description:
4239
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
4240
-});
4468
+export type V2ItemCompletedNotification__ReasoningEffort = string;
4469
+export const V2ItemCompletedNotification__ReasoningEffort = Schema.String.annotate({
4470
+ description: "A non-empty reasoning effort value advertised by the model.",
4471
+}).check(Schema.isMinLength(1));
4472
+
4473
+export type V2ItemCompletedNotification__SubAgentActivityKind =
4474
+ | "started"
4475
+ | "interacted"
4476
+ | "interrupted";
4477
+export const V2ItemCompletedNotification__SubAgentActivityKind = Schema.Literals([
4478
+ "started",
4479
+ "interacted",
4480
+ "interrupted",
4481
+]);
4482
4483
export type V2ItemCompletedNotification__TextElement = {
4484
readonly byteRange: { readonly end: number; readonly start: number };
@@ -4318,9 +4559,9 @@ export const V2ItemGuardianApprovalReviewCompletedNotification__AutoReviewDecisi
4559
export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode =
4560
| "read"
4561
| "write"
4321
- | "none";
4562
+ | "deny";
4563
export const V2ItemGuardianApprovalReviewCompletedNotification__FileSystemAccessMode =
4323
- Schema.Literals(["read", "write", "none"]);
4564
+ Schema.Literals(["read", "write", "deny"]);
4565
4566
export type V2ItemGuardianApprovalReviewCompletedNotification__FileSystemSpecialPath =
4567
| { readonly kind: "root" }
@@ -4417,9 +4658,9 @@ export const V2ItemGuardianApprovalReviewStartedNotification__AdditionalNetworkP
4658
export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode =
4659
| "read"
4660
| "write"
4420
- | "none";
4661
+ | "deny";
4662
export const V2ItemGuardianApprovalReviewStartedNotification__FileSystemAccessMode =
4422
- Schema.Literals(["read", "write", "none"]);
4663
+ Schema.Literals(["read", "write", "deny"]);
4664
4665
export type V2ItemGuardianApprovalReviewStartedNotification__FileSystemSpecialPath =
4666
| { readonly kind: "root" }
@@ -4578,6 +4819,14 @@ export const V2ItemStartedNotification__HookPromptFragment = Schema.Struct({
4819
text: Schema.String,
4820
});
4821
4822
+export type V2ItemStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
4823
+export const V2ItemStartedNotification__ImageDetail = Schema.Literals([
4824
+ "auto",
4825
+ "low",
4826
+ "high",
4827
+ "original",
4828
+]);
4829
+
4830
export type V2ItemStartedNotification__McpToolCallError = { readonly message: string };
4831
export const V2ItemStartedNotification__McpToolCallError = Schema.Struct({
4832
message: Schema.String,
@@ -4659,24 +4908,20 @@ export const V2ItemStartedNotification__PatchChangeKind = Schema.Union(
4908
{ mode: "oneOf" },
4909
);
4910
4662
-export type V2ItemStartedNotification__ReasoningEffort =
4663
- | "none"
4664
- | "minimal"
4665
- | "low"
4666
- | "medium"
4667
- | "high"
4668
- | "xhigh";
4669
-export const V2ItemStartedNotification__ReasoningEffort = Schema.Literals([
4670
- "none",
4671
- "minimal",
4672
- "low",
4673
- "medium",
4674
- "high",
4675
- "xhigh",
4676
-]).annotate({
4677
- description:
4678
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
4679
-});
4911
+export type V2ItemStartedNotification__ReasoningEffort = string;
4912
+export const V2ItemStartedNotification__ReasoningEffort = Schema.String.annotate({
4913
+ description: "A non-empty reasoning effort value advertised by the model.",
4914
+}).check(Schema.isMinLength(1));
4915
+
4916
+export type V2ItemStartedNotification__SubAgentActivityKind =
4917
+ | "started"
4918
+ | "interacted"
4919
+ | "interrupted";
4920
+export const V2ItemStartedNotification__SubAgentActivityKind = Schema.Literals([
4921
+ "started",
4922
+ "interacted",
4923
+ "interrupted",
4924
+]);
4925
4926
export type V2ItemStartedNotification__TextElement = {
4927
readonly byteRange: { readonly end: number; readonly start: number };
@@ -4753,6 +4998,23 @@ export const V2ListMcpServerStatusResponse__McpAuthStatus = Schema.Literals([
4998
"oAuth",
4999
]);
5000
5001
+export type V2ListMcpServerStatusResponse__McpServerInfo = {
5002
+ readonly description?: string | null;
5003
+ readonly icons?: ReadonlyArray<unknown> | null;
5004
+ readonly name: string;
5005
+ readonly title?: string | null;
5006
+ readonly version: string;
5007
+ readonly websiteUrl?: string | null;
5008
+};
5009
+export const V2ListMcpServerStatusResponse__McpServerInfo = Schema.Struct({
5010
+ description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5011
+ icons: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
5012
+ name: Schema.String,
5013
+ title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5014
+ version: Schema.String,
5015
+ websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5016
+}).annotate({ description: "Presentation metadata advertised by an initialized MCP server." });
5017
+
5018
export type V2ListMcpServerStatusResponse__Resource = {
5019
readonly _meta?: unknown;
5020
readonly annotations?: unknown;
@@ -4915,24 +5177,10 @@ export const V2ModelListResponse__ModelUpgradeInfo = Schema.Struct({
5177
upgradeCopy: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5178
});
5179
4918
-export type V2ModelListResponse__ReasoningEffort =
4919
- | "none"
4920
- | "minimal"
4921
- | "low"
4922
- | "medium"
4923
- | "high"
4924
- | "xhigh";
4925
-export const V2ModelListResponse__ReasoningEffort = Schema.Literals([
4926
- "none",
4927
- "minimal",
4928
- "low",
4929
- "medium",
4930
- "high",
4931
- "xhigh",
4932
-]).annotate({
4933
- description:
4934
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
4935
-});
5180
+export type V2ModelListResponse__ReasoningEffort = string;
5181
+export const V2ModelListResponse__ReasoningEffort = Schema.String.annotate({
5182
+ description: "A non-empty reasoning effort value advertised by the model.",
5183
+}).check(Schema.isMinLength(1));
5184
5185
export type V2ModelReroutedNotification__ModelRerouteReason = "highRiskCyberActivity";
5186
export const V2ModelReroutedNotification__ModelRerouteReason =
@@ -4942,6 +5190,81 @@ export type V2ModelVerificationNotification__ModelVerification = "trustedAccessF
5190
export const V2ModelVerificationNotification__ModelVerification =
5191
Schema.Literal("trustedAccessForCyber");
5192
5193
+export type V2PermissionProfileListResponse__PermissionProfileSummary = {
5194
+ readonly description?: string | null;
5195
+ readonly id: string;
5196
+};
5197
+export const V2PermissionProfileListResponse__PermissionProfileSummary = Schema.Struct({
5198
+ description: Schema.optionalKey(
5199
+ Schema.Union([
5200
+ Schema.String.annotate({
5201
+ description: "Optional user-facing description for display in clients.",
5202
+ }),
5203
+ Schema.Null,
5204
+ ]),
5205
+ ),
5206
+ id: Schema.String.annotate({ description: "Available permission profile identifier." }),
5207
+});
5208
+
5209
+export type V2PluginInstalledParams__AbsolutePathBuf = string;
5210
+export const V2PluginInstalledParams__AbsolutePathBuf = Schema.String.annotate({
5211
+ description:
5212
+ "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.",
5213
+});
5214
+
5215
+export type V2PluginInstalledResponse__AbsolutePathBuf = string;
5216
+export const V2PluginInstalledResponse__AbsolutePathBuf = Schema.String.annotate({
5217
+ description:
5218
+ "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.",
5219
+});
5220
+
5221
+export type V2PluginInstalledResponse__MarketplaceInterface = {
5222
+ readonly displayName?: string | null;
5223
+};
5224
+export const V2PluginInstalledResponse__MarketplaceInterface = Schema.Struct({
5225
+ displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5226
+});
5227
+
5228
+export type V2PluginInstalledResponse__PluginAuthPolicy = "ON_INSTALL" | "ON_USE";
5229
+export const V2PluginInstalledResponse__PluginAuthPolicy = Schema.Literals([
5230
+ "ON_INSTALL",
5231
+ "ON_USE",
5232
+]);
5233
+
5234
+export type V2PluginInstalledResponse__PluginInstallPolicy =
5235
+ | "NOT_AVAILABLE"
5236
+ | "AVAILABLE"
5237
+ | "INSTALLED_BY_DEFAULT";
5238
+export const V2PluginInstalledResponse__PluginInstallPolicy = Schema.Literals([
5239
+ "NOT_AVAILABLE",
5240
+ "AVAILABLE",
5241
+ "INSTALLED_BY_DEFAULT",
5242
+]);
5243
+
5244
+export type V2PluginInstalledResponse__PluginShareDiscoverability =
5245
+ | "LISTED"
5246
+ | "UNLISTED"
5247
+ | "PRIVATE";
5248
+export const V2PluginInstalledResponse__PluginShareDiscoverability = Schema.Literals([
5249
+ "LISTED",
5250
+ "UNLISTED",
5251
+ "PRIVATE",
5252
+]);
5253
+
5254
+export type V2PluginInstalledResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
5255
+export const V2PluginInstalledResponse__PluginSharePrincipalRole = Schema.Literals([
5256
+ "reader",
5257
+ "editor",
5258
+ "owner",
5259
+]);
5260
+
5261
+export type V2PluginInstalledResponse__PluginSharePrincipalType = "user" | "group" | "workspace";
5262
+export const V2PluginInstalledResponse__PluginSharePrincipalType = Schema.Literals([
5263
+ "user",
5264
+ "group",
5265
+ "workspace",
5266
+]);
5267
+
5268
export type V2PluginInstallParams__AbsolutePathBuf = string;
5269
export const V2PluginInstallParams__AbsolutePathBuf = Schema.String.annotate({
5270
description:
@@ -4974,10 +5297,12 @@ export const V2PluginListParams__AbsolutePathBuf = Schema.String.annotate({
5297
5298
export type V2PluginListParams__PluginListMarketplaceKind =
5299
| "local"
5300
+ | "vertical"
5301
| "workspace-directory"
5302
| "shared-with-me";
5303
export const V2PluginListParams__PluginListMarketplaceKind = Schema.Literals([
5304
"local",
5305
+ "vertical",
5306
"workspace-directory",
5307
"shared-with-me",
5308
]);
@@ -5006,6 +5331,20 @@ export const V2PluginListResponse__PluginInstallPolicy = Schema.Literals([
5331
"INSTALLED_BY_DEFAULT",
5332
]);
5333
5334
+export type V2PluginListResponse__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
5335
+export const V2PluginListResponse__PluginShareDiscoverability = Schema.Literals([
5336
+ "LISTED",
5337
+ "UNLISTED",
5338
+ "PRIVATE",
5339
+]);
5340
+
5341
+export type V2PluginListResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
5342
+export const V2PluginListResponse__PluginSharePrincipalRole = Schema.Literals([
5343
+ "reader",
5344
+ "editor",
5345
+ "owner",
5346
+]);
5347
+
5348
export type V2PluginListResponse__PluginSharePrincipalType = "user" | "group" | "workspace";
5349
export const V2PluginListResponse__PluginSharePrincipalType = Schema.Literals([
5350
"user",
@@ -5040,6 +5379,14 @@ export const V2PluginReadResponse__AppSummary = Schema.Struct({
5379
needsAuth: Schema.Boolean,
5380
}).annotate({ description: "EXPERIMENTAL - app metadata summary for plugin responses." });
5381
5382
+export type V2PluginReadResponse__AppTemplateUnavailableReason =
5383
+ | "NOT_CONFIGURED_FOR_WORKSPACE"
5384
+ | "NO_ACTIVE_WORKSPACE";
5385
+export const V2PluginReadResponse__AppTemplateUnavailableReason = Schema.Literals([
5386
+ "NOT_CONFIGURED_FOR_WORKSPACE",
5387
+ "NO_ACTIVE_WORKSPACE",
5388
+]);
5389
+
5390
export type V2PluginReadResponse__HookEventName =
5391
| "preToolUse"
5392
| "permissionRequest"
@@ -5048,6 +5395,8 @@ export type V2PluginReadResponse__HookEventName =
5395
| "postCompact"
5396
| "sessionStart"
5397
| "userPromptSubmit"
5398
+ | "subagentStart"
5399
+ | "subagentStop"
5400
| "stop";
5401
export const V2PluginReadResponse__HookEventName = Schema.Literals([
5402
"preToolUse",
@@ -5057,6 +5406,8 @@ export const V2PluginReadResponse__HookEventName = Schema.Literals([
5406
"postCompact",
5407
"sessionStart",
5408
"userPromptSubmit",
5409
+ "subagentStart",
5410
+ "subagentStop",
5411
"stop",
5412
]);
5413
@@ -5073,6 +5424,20 @@ export const V2PluginReadResponse__PluginInstallPolicy = Schema.Literals([
5424
"INSTALLED_BY_DEFAULT",
5425
]);
5426
5427
+export type V2PluginReadResponse__PluginShareDiscoverability = "LISTED" | "UNLISTED" | "PRIVATE";
5428
+export const V2PluginReadResponse__PluginShareDiscoverability = Schema.Literals([
5429
+ "LISTED",
5430
+ "UNLISTED",
5431
+ "PRIVATE",
5432
+]);
5433
+
5434
+export type V2PluginReadResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
5435
+export const V2PluginReadResponse__PluginSharePrincipalRole = Schema.Literals([
5436
+ "reader",
5437
+ "editor",
5438
+ "owner",
5439
+]);
5440
+
5441
export type V2PluginReadResponse__PluginSharePrincipalType = "user" | "group" | "workspace";
5442
export const V2PluginReadResponse__PluginSharePrincipalType = Schema.Literals([
5443
"user",
@@ -5080,6 +5445,12 @@ export const V2PluginReadResponse__PluginSharePrincipalType = Schema.Literals([
5445
"workspace",
5446
]);
5447
5448
+export type V2PluginShareCheckoutResponse__AbsolutePathBuf = string;
5449
+export const V2PluginShareCheckoutResponse__AbsolutePathBuf = Schema.String.annotate({
5450
+ description:
5451
+ "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.",
5452
+});
5453
+
5454
export type V2PluginShareListResponse__AbsolutePathBuf = string;
5455
export const V2PluginShareListResponse__AbsolutePathBuf = Schema.String.annotate({
5456
description:
@@ -5102,6 +5473,23 @@ export const V2PluginShareListResponse__PluginInstallPolicy = Schema.Literals([
5473
"INSTALLED_BY_DEFAULT",
5474
]);
5475
5476
+export type V2PluginShareListResponse__PluginShareDiscoverability =
5477
+ | "LISTED"
5478
+ | "UNLISTED"
5479
+ | "PRIVATE";
5480
+export const V2PluginShareListResponse__PluginShareDiscoverability = Schema.Literals([
5481
+ "LISTED",
5482
+ "UNLISTED",
5483
+ "PRIVATE",
5484
+]);
5485
+
5486
+export type V2PluginShareListResponse__PluginSharePrincipalRole = "reader" | "editor" | "owner";
5487
+export const V2PluginShareListResponse__PluginSharePrincipalRole = Schema.Literals([
5488
+ "reader",
5489
+ "editor",
5490
+ "owner",
5491
+]);
5492
+
5493
export type V2PluginShareListResponse__PluginSharePrincipalType = "user" | "group" | "workspace";
5494
export const V2PluginShareListResponse__PluginSharePrincipalType = Schema.Literals([
5495
"user",
@@ -5129,6 +5517,9 @@ export const V2PluginShareSaveParams__PluginSharePrincipalType = Schema.Literals
5517
"workspace",
5518
]);
5519
5520
+export type V2PluginShareSaveParams__PluginShareTargetRole = "reader" | "editor";
5521
+export const V2PluginShareSaveParams__PluginShareTargetRole = Schema.Literals(["reader", "editor"]);
5522
+
5523
export type V2PluginShareUpdateTargetsParams__PluginSharePrincipalType =
5524
| "user"
5525
| "group"
@@ -5139,6 +5530,40 @@ export const V2PluginShareUpdateTargetsParams__PluginSharePrincipalType = Schema
5530
"workspace",
5531
]);
5532
5533
+export type V2PluginShareUpdateTargetsParams__PluginShareTargetRole = "reader" | "editor";
5534
+export const V2PluginShareUpdateTargetsParams__PluginShareTargetRole = Schema.Literals([
5535
+ "reader",
5536
+ "editor",
5537
+]);
5538
+
5539
+export type V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability =
5540
+ | "UNLISTED"
5541
+ | "PRIVATE";
5542
+export const V2PluginShareUpdateTargetsParams__PluginShareUpdateDiscoverability = Schema.Literals([
5543
+ "UNLISTED",
5544
+ "PRIVATE",
5545
+]);
5546
+
5547
+export type V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability =
5548
+ | "LISTED"
5549
+ | "UNLISTED"
5550
+ | "PRIVATE";
5551
+export const V2PluginShareUpdateTargetsResponse__PluginShareDiscoverability = Schema.Literals([
5552
+ "LISTED",
5553
+ "UNLISTED",
5554
+ "PRIVATE",
5555
+]);
5556
+
5557
+export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole =
5558
+ | "reader"
5559
+ | "editor"
5560
+ | "owner";
5561
+export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole = Schema.Literals([
5562
+ "reader",
5563
+ "editor",
5564
+ "owner",
5565
+]);
5566
+
5567
export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType =
5568
| "user"
5569
| "group"
@@ -5149,6 +5574,22 @@ export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType = Sche
5574
"workspace",
5575
]);
5576
5577
+export type V2RawResponseItemCompletedNotification__AgentMessageInputContent = {
5578
+ readonly encrypted_content: string;
5579
+ readonly type: "encrypted_content";
5580
+};
5581
+export const V2RawResponseItemCompletedNotification__AgentMessageInputContent = Schema.Union(
5582
+ [
5583
+ Schema.Struct({
5584
+ encrypted_content: Schema.String,
5585
+ type: Schema.Literal("encrypted_content").annotate({
5586
+ title: "EncryptedContentAgentMessageInputContentType",
5587
+ }),
5588
+ }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
5589
+ ],
5590
+ { mode: "oneOf" },
5591
+);
5592
+
5593
export type V2RawResponseItemCompletedNotification__ImageDetail =
5594
| "auto"
5595
| "low"
@@ -5418,6 +5859,14 @@ export const V2ReviewStartResponse__HookPromptFragment = Schema.Struct({
5859
text: Schema.String,
5860
});
5861
5862
+export type V2ReviewStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
5863
+export const V2ReviewStartResponse__ImageDetail = Schema.Literals([
5864
+ "auto",
5865
+ "low",
5866
+ "high",
5867
+ "original",
5868
+]);
5869
+
5870
export type V2ReviewStartResponse__McpToolCallError = { readonly message: string };
5871
export const V2ReviewStartResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
5872
@@ -5500,24 +5949,17 @@ export const V2ReviewStartResponse__PatchChangeKind = Schema.Union(
5949
{ mode: "oneOf" },
5950
);
5951
5503
-export type V2ReviewStartResponse__ReasoningEffort =
5504
- | "none"
5505
- | "minimal"
5506
- | "low"
5507
- | "medium"
5508
- | "high"
5509
- | "xhigh";
5510
-export const V2ReviewStartResponse__ReasoningEffort = Schema.Literals([
5511
- "none",
5512
- "minimal",
5513
- "low",
5514
- "medium",
5515
- "high",
5516
- "xhigh",
5517
-]).annotate({
5518
- description:
5519
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
5520
-});
5952
+export type V2ReviewStartResponse__ReasoningEffort = string;
5953
+export const V2ReviewStartResponse__ReasoningEffort = Schema.String.annotate({
5954
+ description: "A non-empty reasoning effort value advertised by the model.",
5955
+}).check(Schema.isMinLength(1));
5956
+
5957
+export type V2ReviewStartResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted";
5958
+export const V2ReviewStartResponse__SubAgentActivityKind = Schema.Literals([
5959
+ "started",
5960
+ "interacted",
5961
+ "interrupted",
5962
+]);
5963
5964
export type V2ReviewStartResponse__TextElement = {
5965
readonly byteRange: { readonly end: number; readonly start: number };
@@ -5614,13 +6056,10 @@ export const V2SkillsConfigWriteParams__AbsolutePathBuf = Schema.String.annotate
6056
"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.",
6057
});
6058
5617
-export type V2SkillsListParams__SkillsListExtraRootsForCwd = {
5618
- readonly cwd: string;
5619
- readonly extraUserRoots: ReadonlyArray<string>;
5620
-};
5621
-export const V2SkillsListParams__SkillsListExtraRootsForCwd = Schema.Struct({
5622
- cwd: Schema.String,
5623
- extraUserRoots: Schema.Array(Schema.String),
6059
+export type V2SkillsExtraRootsSetParams__AbsolutePathBuf = string;
6060
+export const V2SkillsExtraRootsSetParams__AbsolutePathBuf = Schema.String.annotate({
6061
+ description:
6062
+ "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.",
6063
});
6064
6065
export type V2SkillsListResponse__AbsolutePathBuf = string;
@@ -5663,12 +6102,6 @@ export const V2SkillsListResponse__SkillToolDependency = Schema.Struct({
6102
value: Schema.String,
6103
});
6104
5666
-export type V2ThreadForkParams__AbsolutePathBuf = string;
5667
-export const V2ThreadForkParams__AbsolutePathBuf = Schema.String.annotate({
5668
- description:
5669
- "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.",
5670
-});
5671
-
6105
export type V2ThreadForkParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
6106
export const V2ThreadForkParams__ApprovalsReviewer = Schema.Literals([
6107
"user",
@@ -5719,12 +6152,8 @@ export const V2ThreadForkParams__SandboxMode = Schema.Literals([
6152
"danger-full-access",
6153
]);
6154
5722
-export type V2ThreadForkParams__ThreadSource = "user" | "subagent" | "memory_consolidation";
5723
-export const V2ThreadForkParams__ThreadSource = Schema.Literals([
5724
- "user",
5725
- "subagent",
5726
- "memory_consolidation",
5727
-]);
6155
+export type V2ThreadForkParams__ThreadSource = string;
6156
+export const V2ThreadForkParams__ThreadSource = Schema.String;
6157
6158
export type V2ThreadForkResponse__AbsolutePathBuf = string;
6159
export const V2ThreadForkResponse__AbsolutePathBuf = Schema.String.annotate({
@@ -5823,47 +6252,6 @@ export const V2ThreadForkResponse__DynamicToolCallStatus = Schema.Literals([
6252
"failed",
6253
]);
6254
5826
-export type V2ThreadForkResponse__FileSystemAccessMode = "read" | "write" | "none";
5827
-export const V2ThreadForkResponse__FileSystemAccessMode = Schema.Literals([
5828
- "read",
5829
- "write",
5830
- "none",
5831
-]);
5832
-
5833
-export type V2ThreadForkResponse__FileSystemSpecialPath =
5834
- | { readonly kind: "root" }
5835
- | { readonly kind: "minimal" }
5836
- | { readonly kind: "project_roots"; readonly subpath?: string | null }
5837
- | { readonly kind: "tmpdir" }
5838
- | { readonly kind: "slash_tmp" }
5839
- | { readonly kind: "unknown"; readonly path: string; readonly subpath?: string | null };
5840
-export const V2ThreadForkResponse__FileSystemSpecialPath = Schema.Union(
5841
- [
5842
- Schema.Struct({ kind: Schema.Literal("root") }).annotate({
5843
- title: "RootFileSystemSpecialPath",
5844
- }),
5845
- Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({
5846
- title: "MinimalFileSystemSpecialPath",
5847
- }),
5848
- Schema.Struct({
5849
- kind: Schema.Literal("project_roots"),
5850
- subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5851
- }).annotate({ title: "KindFileSystemSpecialPath" }),
5852
- Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({
5853
- title: "TmpdirFileSystemSpecialPath",
5854
- }),
5855
- Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({
5856
- title: "SlashTmpFileSystemSpecialPath",
5857
- }),
5858
- Schema.Struct({
5859
- kind: Schema.Literal("unknown"),
5860
- path: Schema.String,
5861
- subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
5862
- }),
5863
- ],
5864
- { mode: "oneOf" },
5865
-);
5866
-
6255
export type V2ThreadForkResponse__GitInfo = {
6256
readonly branch?: string | null;
6257
readonly originUrl?: string | null;
@@ -5884,6 +6272,14 @@ export const V2ThreadForkResponse__HookPromptFragment = Schema.Struct({
6272
text: Schema.String,
6273
});
6274
6275
+export type V2ThreadForkResponse__ImageDetail = "auto" | "low" | "high" | "original";
6276
+export const V2ThreadForkResponse__ImageDetail = Schema.Literals([
6277
+ "auto",
6278
+ "low",
6279
+ "high",
6280
+ "original",
6281
+]);
6282
+
6283
export type V2ThreadForkResponse__McpToolCallError = { readonly message: string };
6284
export const V2ThreadForkResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
6285
@@ -5966,31 +6362,17 @@ export const V2ThreadForkResponse__PatchChangeKind = Schema.Union(
6362
{ mode: "oneOf" },
6363
);
6364
5969
-export type V2ThreadForkResponse__PermissionProfileNetworkPermissions = {
5970
- readonly enabled: boolean;
5971
-};
5972
-export const V2ThreadForkResponse__PermissionProfileNetworkPermissions = Schema.Struct({
5973
- enabled: Schema.Boolean,
5974
-});
6365
+export type V2ThreadForkResponse__ReasoningEffort = string;
6366
+export const V2ThreadForkResponse__ReasoningEffort = Schema.String.annotate({
6367
+ description: "A non-empty reasoning effort value advertised by the model.",
6368
+}).check(Schema.isMinLength(1));
6369
5976
-export type V2ThreadForkResponse__ReasoningEffort =
5977
- | "none"
5978
- | "minimal"
5979
- | "low"
5980
- | "medium"
5981
- | "high"
5982
- | "xhigh";
5983
-export const V2ThreadForkResponse__ReasoningEffort = Schema.Literals([
5984
- "none",
5985
- "minimal",
5986
- "low",
5987
- "medium",
5988
- "high",
5989
- "xhigh",
5990
-]).annotate({
5991
- description:
5992
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
5993
-});
6370
+export type V2ThreadForkResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted";
6371
+export const V2ThreadForkResponse__SubAgentActivityKind = Schema.Literals([
6372
+ "started",
6373
+ "interacted",
6374
+ "interrupted",
6375
+]);
6376
6377
export type V2ThreadForkResponse__TextElement = {
6378
readonly byteRange: { readonly end: number; readonly start: number };
@@ -6026,12 +6408,8 @@ export const V2ThreadForkResponse__ThreadActiveFlag = Schema.Literals([
6408
export type V2ThreadForkResponse__ThreadId = string;
6409
export const V2ThreadForkResponse__ThreadId = Schema.String;
6410
6029
-export type V2ThreadForkResponse__ThreadSource = "user" | "subagent" | "memory_consolidation";
6030
-export const V2ThreadForkResponse__ThreadSource = Schema.Literals([
6031
- "user",
6032
- "subagent",
6033
- "memory_consolidation",
6034
-]);
6411
+export type V2ThreadForkResponse__ThreadSource = string;
6412
+export const V2ThreadForkResponse__ThreadSource = Schema.String;
6413
6414
export type V2ThreadForkResponse__TurnStatus =
6415
| "completed"
@@ -6077,14 +6455,66 @@ export const V2ThreadForkResponse__WebSearchAction = Schema.Union(
6455
{ mode: "oneOf" },
6456
);
6457
6458
+export type V2ThreadGoalGetResponse__ThreadGoalStatus =
6459
+ | "active"
6460
+ | "paused"
6461
+ | "blocked"
6462
+ | "usageLimited"
6463
+ | "budgetLimited"
6464
+ | "complete";
6465
+export const V2ThreadGoalGetResponse__ThreadGoalStatus = Schema.Literals([
6466
+ "active",
6467
+ "paused",
6468
+ "blocked",
6469
+ "usageLimited",
6470
+ "budgetLimited",
6471
+ "complete",
6472
+]);
6473
+
6474
+export type V2ThreadGoalSetParams__ThreadGoalStatus =
6475
+ | "active"
6476
+ | "paused"
6477
+ | "blocked"
6478
+ | "usageLimited"
6479
+ | "budgetLimited"
6480
+ | "complete";
6481
+export const V2ThreadGoalSetParams__ThreadGoalStatus = Schema.Literals([
6482
+ "active",
6483
+ "paused",
6484
+ "blocked",
6485
+ "usageLimited",
6486
+ "budgetLimited",
6487
+ "complete",
6488
+]);
6489
+
6490
+export type V2ThreadGoalSetResponse__ThreadGoalStatus =
6491
+ | "active"
6492
+ | "paused"
6493
+ | "blocked"
6494
+ | "usageLimited"
6495
+ | "budgetLimited"
6496
+ | "complete";
6497
+export const V2ThreadGoalSetResponse__ThreadGoalStatus = Schema.Literals([
6498
+ "active",
6499
+ "paused",
6500
+ "blocked",
6501
+ "usageLimited",
6502
+ "budgetLimited",
6503
+ "complete",
6504
+]);
6505
+
6506
export type V2ThreadGoalUpdatedNotification__ThreadGoalStatus =
6507
| "active"
6508
| "paused"
6509
+ | "blocked"
6510
+ | "usageLimited"
6511
| "budgetLimited"
6512
| "complete";
6513
export const V2ThreadGoalUpdatedNotification__ThreadGoalStatus = Schema.Literals([
6514
"active",
6515
"paused",
6516
+ "blocked",
6517
+ "usageLimited",
6518
"budgetLimited",
6519
"complete",
6520
]);
@@ -6212,6 +6642,14 @@ export const V2ThreadListResponse__HookPromptFragment = Schema.Struct({
6642
text: Schema.String,
6643
});
6644
6645
+export type V2ThreadListResponse__ImageDetail = "auto" | "low" | "high" | "original";
6646
+export const V2ThreadListResponse__ImageDetail = Schema.Literals([
6647
+ "auto",
6648
+ "low",
6649
+ "high",
6650
+ "original",
6651
+]);
6652
+
6653
export type V2ThreadListResponse__McpToolCallError = { readonly message: string };
6654
export const V2ThreadListResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
6655
@@ -6294,24 +6732,17 @@ export const V2ThreadListResponse__PatchChangeKind = Schema.Union(
6732
{ mode: "oneOf" },
6733
);
6734
6297
-export type V2ThreadListResponse__ReasoningEffort =
6298
- | "none"
6299
- | "minimal"
6300
- | "low"
6301
- | "medium"
6302
- | "high"
6303
- | "xhigh";
6304
-export const V2ThreadListResponse__ReasoningEffort = Schema.Literals([
6305
- "none",
6306
- "minimal",
6307
- "low",
6308
- "medium",
6309
- "high",
6310
- "xhigh",
6311
-]).annotate({
6312
- description:
6313
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
6314
-});
6735
+export type V2ThreadListResponse__ReasoningEffort = string;
6736
+export const V2ThreadListResponse__ReasoningEffort = Schema.String.annotate({
6737
+ description: "A non-empty reasoning effort value advertised by the model.",
6738
+}).check(Schema.isMinLength(1));
6739
+
6740
+export type V2ThreadListResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted";
6741
+export const V2ThreadListResponse__SubAgentActivityKind = Schema.Literals([
6742
+ "started",
6743
+ "interacted",
6744
+ "interrupted",
6745
+]);
6746
6747
export type V2ThreadListResponse__TextElement = {
6748
readonly byteRange: { readonly end: number; readonly start: number };
@@ -6347,12 +6778,8 @@ export const V2ThreadListResponse__ThreadActiveFlag = Schema.Literals([
6778
export type V2ThreadListResponse__ThreadId = string;
6779
export const V2ThreadListResponse__ThreadId = Schema.String;
6780
6350
-export type V2ThreadListResponse__ThreadSource = "user" | "subagent" | "memory_consolidation";
6351
-export const V2ThreadListResponse__ThreadSource = Schema.Literals([
6352
- "user",
6353
- "subagent",
6354
- "memory_consolidation",
6355
-]);
6781
+export type V2ThreadListResponse__ThreadSource = string;
6782
+export const V2ThreadListResponse__ThreadSource = Schema.String;
6783
6784
export type V2ThreadListResponse__TurnStatus =
6785
| "completed"
@@ -6523,6 +6950,14 @@ export const V2ThreadMetadataUpdateResponse__HookPromptFragment = Schema.Struct(
6950
text: Schema.String,
6951
});
6952
6953
+export type V2ThreadMetadataUpdateResponse__ImageDetail = "auto" | "low" | "high" | "original";
6954
+export const V2ThreadMetadataUpdateResponse__ImageDetail = Schema.Literals([
6955
+ "auto",
6956
+ "low",
6957
+ "high",
6958
+ "original",
6959
+]);
6960
+
6961
export type V2ThreadMetadataUpdateResponse__McpToolCallError = { readonly message: string };
6962
export const V2ThreadMetadataUpdateResponse__McpToolCallError = Schema.Struct({
6963
message: Schema.String,
@@ -6613,24 +7048,20 @@ export const V2ThreadMetadataUpdateResponse__PatchChangeKind = Schema.Union(
7048
{ mode: "oneOf" },
7049
);
7050
6616
-export type V2ThreadMetadataUpdateResponse__ReasoningEffort =
6617
- | "none"
6618
- | "minimal"
6619
- | "low"
6620
- | "medium"
6621
- | "high"
6622
- | "xhigh";
6623
-export const V2ThreadMetadataUpdateResponse__ReasoningEffort = Schema.Literals([
6624
- "none",
6625
- "minimal",
6626
- "low",
6627
- "medium",
6628
- "high",
6629
- "xhigh",
6630
-]).annotate({
6631
- description:
6632
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
6633
-});
7051
+export type V2ThreadMetadataUpdateResponse__ReasoningEffort = string;
7052
+export const V2ThreadMetadataUpdateResponse__ReasoningEffort = Schema.String.annotate({
7053
+ description: "A non-empty reasoning effort value advertised by the model.",
7054
+}).check(Schema.isMinLength(1));
7055
+
7056
+export type V2ThreadMetadataUpdateResponse__SubAgentActivityKind =
7057
+ | "started"
7058
+ | "interacted"
7059
+ | "interrupted";
7060
+export const V2ThreadMetadataUpdateResponse__SubAgentActivityKind = Schema.Literals([
7061
+ "started",
7062
+ "interacted",
7063
+ "interrupted",
7064
+]);
7065
7066
export type V2ThreadMetadataUpdateResponse__TextElement = {
7067
readonly byteRange: { readonly end: number; readonly start: number };
@@ -6668,15 +7099,8 @@ export const V2ThreadMetadataUpdateResponse__ThreadActiveFlag = Schema.Literals(
7099
export type V2ThreadMetadataUpdateResponse__ThreadId = string;
7100
export const V2ThreadMetadataUpdateResponse__ThreadId = Schema.String;
7101
6671
-export type V2ThreadMetadataUpdateResponse__ThreadSource =
6672
- | "user"
6673
- | "subagent"
6674
- | "memory_consolidation";
6675
-export const V2ThreadMetadataUpdateResponse__ThreadSource = Schema.Literals([
6676
- "user",
6677
- "subagent",
6678
- "memory_consolidation",
6679
-]);
7102
+export type V2ThreadMetadataUpdateResponse__ThreadSource = string;
7103
+export const V2ThreadMetadataUpdateResponse__ThreadSource = Schema.String;
7104
7105
export type V2ThreadMetadataUpdateResponse__TurnStatus =
7106
| "completed"
@@ -6809,6 +7233,14 @@ export const V2ThreadReadResponse__HookPromptFragment = Schema.Struct({
7233
text: Schema.String,
7234
});
7235
7236
+export type V2ThreadReadResponse__ImageDetail = "auto" | "low" | "high" | "original";
7237
+export const V2ThreadReadResponse__ImageDetail = Schema.Literals([
7238
+ "auto",
7239
+ "low",
7240
+ "high",
7241
+ "original",
7242
+]);
7243
+
7244
export type V2ThreadReadResponse__McpToolCallError = { readonly message: string };
7245
export const V2ThreadReadResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
7246
@@ -6891,24 +7323,17 @@ export const V2ThreadReadResponse__PatchChangeKind = Schema.Union(
7323
{ mode: "oneOf" },
7324
);
7325
6894
-export type V2ThreadReadResponse__ReasoningEffort =
6895
- | "none"
6896
- | "minimal"
6897
- | "low"
6898
- | "medium"
6899
- | "high"
6900
- | "xhigh";
6901
-export const V2ThreadReadResponse__ReasoningEffort = Schema.Literals([
6902
- "none",
6903
- "minimal",
6904
- "low",
6905
- "medium",
6906
- "high",
6907
- "xhigh",
6908
-]).annotate({
6909
- description:
6910
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
6911
-});
7326
+export type V2ThreadReadResponse__ReasoningEffort = string;
7327
+export const V2ThreadReadResponse__ReasoningEffort = Schema.String.annotate({
7328
+ description: "A non-empty reasoning effort value advertised by the model.",
7329
+}).check(Schema.isMinLength(1));
7330
+
7331
+export type V2ThreadReadResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted";
7332
+export const V2ThreadReadResponse__SubAgentActivityKind = Schema.Literals([
7333
+ "started",
7334
+ "interacted",
7335
+ "interrupted",
7336
+]);
7337
7338
export type V2ThreadReadResponse__TextElement = {
7339
readonly byteRange: { readonly end: number; readonly start: number };
@@ -6944,12 +7369,8 @@ export const V2ThreadReadResponse__ThreadActiveFlag = Schema.Literals([
7369
export type V2ThreadReadResponse__ThreadId = string;
7370
export const V2ThreadReadResponse__ThreadId = Schema.String;
7371
6947
-export type V2ThreadReadResponse__ThreadSource = "user" | "subagent" | "memory_consolidation";
6948
-export const V2ThreadReadResponse__ThreadSource = Schema.Literals([
6949
- "user",
6950
- "subagent",
6951
- "memory_consolidation",
6952
-]);
7372
+export type V2ThreadReadResponse__ThreadSource = string;
7373
+export const V2ThreadReadResponse__ThreadSource = Schema.String;
7374
7375
export type V2ThreadReadResponse__TurnStatus =
7376
| "completed"
@@ -7029,11 +7450,21 @@ export const V2ThreadRealtimeStartedNotification__RealtimeConversationVersion =
7450
"v2",
7451
]);
7452
7032
-export type V2ThreadResumeParams__AbsolutePathBuf = string;
7033
-export const V2ThreadResumeParams__AbsolutePathBuf = Schema.String.annotate({
7034
- description:
7035
- "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.",
7036
-});
7453
+export type V2ThreadResumeParams__AgentMessageInputContent = {
7454
+ readonly encrypted_content: string;
7455
+ readonly type: "encrypted_content";
7456
+};
7457
+export const V2ThreadResumeParams__AgentMessageInputContent = Schema.Union(
7458
+ [
7459
+ Schema.Struct({
7460
+ encrypted_content: Schema.String,
7461
+ type: Schema.Literal("encrypted_content").annotate({
7462
+ title: "EncryptedContentAgentMessageInputContentType",
7463
+ }),
7464
+ }).annotate({ title: "EncryptedContentAgentMessageInputContent" }),
7465
+ ],
7466
+ { mode: "oneOf" },
7467
+);
7468
7469
export type V2ThreadResumeParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
7470
export const V2ThreadResumeParams__ApprovalsReviewer = Schema.Literals([
@@ -7218,6 +7649,16 @@ export const V2ThreadResumeParams__SandboxMode = Schema.Literals([
7649
"danger-full-access",
7650
]);
7651
7652
+export type V2ThreadResumeParams__SortDirection = "asc" | "desc";
7653
+export const V2ThreadResumeParams__SortDirection = Schema.Literals(["asc", "desc"]);
7654
+
7655
+export type V2ThreadResumeParams__TurnItemsView = "notLoaded" | "summary" | "full";
7656
+export const V2ThreadResumeParams__TurnItemsView = Schema.Literals([
7657
+ "notLoaded",
7658
+ "summary",
7659
+ "full",
7660
+]);
7661
+
7662
export type V2ThreadResumeResponse__AbsolutePathBuf = string;
7663
export const V2ThreadResumeResponse__AbsolutePathBuf = Schema.String.annotate({
7664
description:
@@ -7315,47 +7756,6 @@ export const V2ThreadResumeResponse__DynamicToolCallStatus = Schema.Literals([
7756
"failed",
7757
]);
7758
7318
-export type V2ThreadResumeResponse__FileSystemAccessMode = "read" | "write" | "none";
7319
-export const V2ThreadResumeResponse__FileSystemAccessMode = Schema.Literals([
7320
- "read",
7321
- "write",
7322
- "none",
7323
-]);
7324
-
7325
-export type V2ThreadResumeResponse__FileSystemSpecialPath =
7326
- | { readonly kind: "root" }
7327
- | { readonly kind: "minimal" }
7328
- | { readonly kind: "project_roots"; readonly subpath?: string | null }
7329
- | { readonly kind: "tmpdir" }
7330
- | { readonly kind: "slash_tmp" }
7331
- | { readonly kind: "unknown"; readonly path: string; readonly subpath?: string | null };
7332
-export const V2ThreadResumeResponse__FileSystemSpecialPath = Schema.Union(
7333
- [
7334
- Schema.Struct({ kind: Schema.Literal("root") }).annotate({
7335
- title: "RootFileSystemSpecialPath",
7336
- }),
7337
- Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({
7338
- title: "MinimalFileSystemSpecialPath",
7339
- }),
7340
- Schema.Struct({
7341
- kind: Schema.Literal("project_roots"),
7342
- subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7343
- }).annotate({ title: "KindFileSystemSpecialPath" }),
7344
- Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({
7345
- title: "TmpdirFileSystemSpecialPath",
7346
- }),
7347
- Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({
7348
- title: "SlashTmpFileSystemSpecialPath",
7349
- }),
7350
- Schema.Struct({
7351
- kind: Schema.Literal("unknown"),
7352
- path: Schema.String,
7353
- subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
7354
- }),
7355
- ],
7356
- { mode: "oneOf" },
7357
-);
7358
-
7759
export type V2ThreadResumeResponse__GitInfo = {
7760
readonly branch?: string | null;
7761
readonly originUrl?: string | null;
@@ -7376,6 +7776,14 @@ export const V2ThreadResumeResponse__HookPromptFragment = Schema.Struct({
7776
text: Schema.String,
7777
});
7778
7779
+export type V2ThreadResumeResponse__ImageDetail = "auto" | "low" | "high" | "original";
7780
+export const V2ThreadResumeResponse__ImageDetail = Schema.Literals([
7781
+ "auto",
7782
+ "low",
7783
+ "high",
7784
+ "original",
7785
+]);
7786
+
7787
export type V2ThreadResumeResponse__McpToolCallError = { readonly message: string };
7788
export const V2ThreadResumeResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
7789
@@ -7458,31 +7866,17 @@ export const V2ThreadResumeResponse__PatchChangeKind = Schema.Union(
7866
{ mode: "oneOf" },
7867
);
7868
7461
-export type V2ThreadResumeResponse__PermissionProfileNetworkPermissions = {
7462
- readonly enabled: boolean;
7463
-};
7464
-export const V2ThreadResumeResponse__PermissionProfileNetworkPermissions = Schema.Struct({
7465
- enabled: Schema.Boolean,
7466
-});
7869
+export type V2ThreadResumeResponse__ReasoningEffort = string;
7870
+export const V2ThreadResumeResponse__ReasoningEffort = Schema.String.annotate({
7871
+ description: "A non-empty reasoning effort value advertised by the model.",
7872
+}).check(Schema.isMinLength(1));
7873
7468
-export type V2ThreadResumeResponse__ReasoningEffort =
7469
- | "none"
7470
- | "minimal"
7471
- | "low"
7472
- | "medium"
7473
- | "high"
7474
- | "xhigh";
7475
-export const V2ThreadResumeResponse__ReasoningEffort = Schema.Literals([
7476
- "none",
7477
- "minimal",
7478
- "low",
7479
- "medium",
7480
- "high",
7481
- "xhigh",
7482
-]).annotate({
7483
- description:
7484
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
7485
-});
7874
+export type V2ThreadResumeResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted";
7875
+export const V2ThreadResumeResponse__SubAgentActivityKind = Schema.Literals([
7876
+ "started",
7877
+ "interacted",
7878
+ "interrupted",
7879
+]);
7880
7881
export type V2ThreadResumeResponse__TextElement = {
7882
readonly byteRange: { readonly end: number; readonly start: number };
@@ -7518,12 +7912,8 @@ export const V2ThreadResumeResponse__ThreadActiveFlag = Schema.Literals([
7912
export type V2ThreadResumeResponse__ThreadId = string;
7913
export const V2ThreadResumeResponse__ThreadId = Schema.String;
7914
7521
-export type V2ThreadResumeResponse__ThreadSource = "user" | "subagent" | "memory_consolidation";
7522
-export const V2ThreadResumeResponse__ThreadSource = Schema.Literals([
7523
- "user",
7524
- "subagent",
7525
- "memory_consolidation",
7526
-]);
7915
+export type V2ThreadResumeResponse__ThreadSource = string;
7916
+export const V2ThreadResumeResponse__ThreadSource = Schema.String;
7917
7918
export type V2ThreadResumeResponse__TurnStatus =
7919
| "completed"
@@ -7656,6 +8046,14 @@ export const V2ThreadRollbackResponse__HookPromptFragment = Schema.Struct({
8046
text: Schema.String,
8047
});
8048
8049
+export type V2ThreadRollbackResponse__ImageDetail = "auto" | "low" | "high" | "original";
8050
+export const V2ThreadRollbackResponse__ImageDetail = Schema.Literals([
8051
+ "auto",
8052
+ "low",
8053
+ "high",
8054
+ "original",
8055
+]);
8056
+
8057
export type V2ThreadRollbackResponse__McpToolCallError = { readonly message: string };
8058
export const V2ThreadRollbackResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
8059
@@ -7741,24 +8139,20 @@ export const V2ThreadRollbackResponse__PatchChangeKind = Schema.Union(
8139
{ mode: "oneOf" },
8140
);
8141
7744
-export type V2ThreadRollbackResponse__ReasoningEffort =
7745
- | "none"
7746
- | "minimal"
7747
- | "low"
7748
- | "medium"
7749
- | "high"
7750
- | "xhigh";
7751
-export const V2ThreadRollbackResponse__ReasoningEffort = Schema.Literals([
7752
- "none",
7753
- "minimal",
7754
- "low",
7755
- "medium",
7756
- "high",
7757
- "xhigh",
7758
-]).annotate({
7759
- description:
7760
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
7761
-});
8142
+export type V2ThreadRollbackResponse__ReasoningEffort = string;
8143
+export const V2ThreadRollbackResponse__ReasoningEffort = Schema.String.annotate({
8144
+ description: "A non-empty reasoning effort value advertised by the model.",
8145
+}).check(Schema.isMinLength(1));
8146
+
8147
+export type V2ThreadRollbackResponse__SubAgentActivityKind =
8148
+ | "started"
8149
+ | "interacted"
8150
+ | "interrupted";
8151
+export const V2ThreadRollbackResponse__SubAgentActivityKind = Schema.Literals([
8152
+ "started",
8153
+ "interacted",
8154
+ "interrupted",
8155
+]);
8156
8157
export type V2ThreadRollbackResponse__TextElement = {
8158
readonly byteRange: { readonly end: number; readonly start: number };
@@ -7794,12 +8188,8 @@ export const V2ThreadRollbackResponse__ThreadActiveFlag = Schema.Literals([
8188
export type V2ThreadRollbackResponse__ThreadId = string;
8189
export const V2ThreadRollbackResponse__ThreadId = Schema.String;
8190
7797
-export type V2ThreadRollbackResponse__ThreadSource = "user" | "subagent" | "memory_consolidation";
7798
-export const V2ThreadRollbackResponse__ThreadSource = Schema.Literals([
7799
- "user",
7800
- "subagent",
7801
- "memory_consolidation",
7802
-]);
8191
+export type V2ThreadRollbackResponse__ThreadSource = string;
8192
+export const V2ThreadRollbackResponse__ThreadSource = Schema.String;
8193
8194
export type V2ThreadRollbackResponse__TurnStatus =
8195
| "completed"
@@ -7845,6 +8235,109 @@ export const V2ThreadRollbackResponse__WebSearchAction = Schema.Union(
8235
{ mode: "oneOf" },
8236
);
8237
8238
+export type V2ThreadSettingsUpdatedNotification__AbsolutePathBuf = string;
8239
+export const V2ThreadSettingsUpdatedNotification__AbsolutePathBuf = Schema.String.annotate({
8240
+ description:
8241
+ "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.",
8242
+});
8243
+
8244
+export type V2ThreadSettingsUpdatedNotification__ActivePermissionProfile = {
8245
+ readonly extends?: string | null;
8246
+ readonly id: string;
8247
+};
8248
+export const V2ThreadSettingsUpdatedNotification__ActivePermissionProfile = Schema.Struct({
8249
+ extends: Schema.optionalKey(
8250
+ Schema.Union([
8251
+ Schema.String.annotate({
8252
+ description:
8253
+ "Parent profile identifier from the selected permissions profile's `extends` setting, when present.",
8254
+ }),
8255
+ Schema.Null,
8256
+ ]),
8257
+ ),
8258
+ id: Schema.String.annotate({
8259
+ description:
8260
+ "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.<id>]` profile.",
8261
+ }),
8262
+});
8263
+
8264
+export type V2ThreadSettingsUpdatedNotification__ApprovalsReviewer =
8265
+ | "user"
8266
+ | "auto_review"
8267
+ | "guardian_subagent";
8268
+export const V2ThreadSettingsUpdatedNotification__ApprovalsReviewer = Schema.Literals([
8269
+ "user",
8270
+ "auto_review",
8271
+ "guardian_subagent",
8272
+]).annotate({
8273
+ description:
8274
+ "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.",
8275
+});
8276
+
8277
+export type V2ThreadSettingsUpdatedNotification__AskForApproval =
8278
+ | "untrusted"
8279
+ | "on-failure"
8280
+ | "on-request"
8281
+ | "never"
8282
+ | {
8283
+ readonly granular: {
8284
+ readonly mcp_elicitations: boolean;
8285
+ readonly request_permissions?: boolean;
8286
+ readonly rules: boolean;
8287
+ readonly sandbox_approval: boolean;
8288
+ readonly skill_approval?: boolean;
8289
+ };
8290
+ };
8291
+export const V2ThreadSettingsUpdatedNotification__AskForApproval = Schema.Union(
8292
+ [
8293
+ Schema.Literals(["untrusted", "on-failure", "on-request", "never"]),
8294
+ Schema.Struct({
8295
+ granular: Schema.Struct({
8296
+ mcp_elicitations: Schema.Boolean,
8297
+ request_permissions: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
8298
+ rules: Schema.Boolean,
8299
+ sandbox_approval: Schema.Boolean,
8300
+ skill_approval: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
8301
+ }),
8302
+ }).annotate({ title: "GranularAskForApproval" }),
8303
+ ],
8304
+ { mode: "oneOf" },
8305
+);
8306
+
8307
+export type V2ThreadSettingsUpdatedNotification__ModeKind = "plan" | "default";
8308
+export const V2ThreadSettingsUpdatedNotification__ModeKind = Schema.Literals([
8309
+ "plan",
8310
+ "default",
8311
+]).annotate({ description: "Initial collaboration mode to use when the TUI starts." });
8312
+
8313
+export type V2ThreadSettingsUpdatedNotification__Personality = "none" | "friendly" | "pragmatic";
8314
+export const V2ThreadSettingsUpdatedNotification__Personality = Schema.Literals([
8315
+ "none",
8316
+ "friendly",
8317
+ "pragmatic",
8318
+]);
8319
+
8320
+export type V2ThreadSettingsUpdatedNotification__ReasoningEffort = string;
8321
+export const V2ThreadSettingsUpdatedNotification__ReasoningEffort = Schema.String.annotate({
8322
+ description: "A non-empty reasoning effort value advertised by the model.",
8323
+}).check(Schema.isMinLength(1));
8324
+
8325
+export type V2ThreadSettingsUpdatedNotification__ReasoningSummary =
8326
+ | "auto"
8327
+ | "concise"
8328
+ | "detailed"
8329
+ | "none";
8330
+export const V2ThreadSettingsUpdatedNotification__ReasoningSummary = Schema.Union(
8331
+ [
8332
+ Schema.Literals(["auto", "concise", "detailed"]),
8333
+ Schema.Literal("none").annotate({ description: "Option to disable reasoning summaries." }),
8334
+ ],
8335
+ { mode: "oneOf" },
8336
+).annotate({
8337
+ description:
8338
+ "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
8339
+});
8340
+
8341
export type V2ThreadStartedNotification__AbsolutePathBuf = string;
8342
export const V2ThreadStartedNotification__AbsolutePathBuf = Schema.String.annotate({
8343
description:
@@ -7935,6 +8428,14 @@ export const V2ThreadStartedNotification__HookPromptFragment = Schema.Struct({
8428
text: Schema.String,
8429
});
8430
8431
+export type V2ThreadStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
8432
+export const V2ThreadStartedNotification__ImageDetail = Schema.Literals([
8433
+ "auto",
8434
+ "low",
8435
+ "high",
8436
+ "original",
8437
+]);
8438
+
8439
export type V2ThreadStartedNotification__McpToolCallError = { readonly message: string };
8440
export const V2ThreadStartedNotification__McpToolCallError = Schema.Struct({
8441
message: Schema.String,
@@ -8022,24 +8523,20 @@ export const V2ThreadStartedNotification__PatchChangeKind = Schema.Union(
8523
{ mode: "oneOf" },
8524
);
8525
8025
-export type V2ThreadStartedNotification__ReasoningEffort =
8026
- | "none"
8027
- | "minimal"
8028
- | "low"
8029
- | "medium"
8030
- | "high"
8031
- | "xhigh";
8032
-export const V2ThreadStartedNotification__ReasoningEffort = Schema.Literals([
8033
- "none",
8034
- "minimal",
8035
- "low",
8036
- "medium",
8037
- "high",
8038
- "xhigh",
8039
-]).annotate({
8040
- description:
8041
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
8042
-});
8526
+export type V2ThreadStartedNotification__ReasoningEffort = string;
8527
+export const V2ThreadStartedNotification__ReasoningEffort = Schema.String.annotate({
8528
+ description: "A non-empty reasoning effort value advertised by the model.",
8529
+}).check(Schema.isMinLength(1));
8530
+
8531
+export type V2ThreadStartedNotification__SubAgentActivityKind =
8532
+ | "started"
8533
+ | "interacted"
8534
+ | "interrupted";
8535
+export const V2ThreadStartedNotification__SubAgentActivityKind = Schema.Literals([
8536
+ "started",
8537
+ "interacted",
8538
+ "interrupted",
8539
+]);
8540
8541
export type V2ThreadStartedNotification__TextElement = {
8542
readonly byteRange: { readonly end: number; readonly start: number };
@@ -8077,15 +8574,8 @@ export const V2ThreadStartedNotification__ThreadActiveFlag = Schema.Literals([
8574
export type V2ThreadStartedNotification__ThreadId = string;
8575
export const V2ThreadStartedNotification__ThreadId = Schema.String;
8576
8080
-export type V2ThreadStartedNotification__ThreadSource =
8081
- | "user"
8082
- | "subagent"
8083
- | "memory_consolidation";
8084
-export const V2ThreadStartedNotification__ThreadSource = Schema.Literals([
8085
- "user",
8086
- "subagent",
8087
- "memory_consolidation",
8088
-]);
8577
+export type V2ThreadStartedNotification__ThreadSource = string;
8578
+export const V2ThreadStartedNotification__ThreadSource = Schema.String;
8579
8580
export type V2ThreadStartedNotification__TurnStatus =
8581
| "completed"
@@ -8190,12 +8680,8 @@ export const V2ThreadStartParams__SandboxMode = Schema.Literals([
8680
"danger-full-access",
8681
]);
8682
8193
-export type V2ThreadStartParams__ThreadSource = "user" | "subagent" | "memory_consolidation";
8194
-export const V2ThreadStartParams__ThreadSource = Schema.Literals([
8195
- "user",
8196
- "subagent",
8197
- "memory_consolidation",
8198
-]);
8683
+export type V2ThreadStartParams__ThreadSource = string;
8684
+export const V2ThreadStartParams__ThreadSource = Schema.String;
8685
8686
export type V2ThreadStartParams__ThreadStartSource = "startup" | "clear";
8687
export const V2ThreadStartParams__ThreadStartSource = Schema.Literals(["startup", "clear"]);
@@ -8297,47 +8783,6 @@ export const V2ThreadStartResponse__DynamicToolCallStatus = Schema.Literals([
8783
"failed",
8784
]);
8785
8300
-export type V2ThreadStartResponse__FileSystemAccessMode = "read" | "write" | "none";
8301
-export const V2ThreadStartResponse__FileSystemAccessMode = Schema.Literals([
8302
- "read",
8303
- "write",
8304
- "none",
8305
-]);
8306
-
8307
-export type V2ThreadStartResponse__FileSystemSpecialPath =
8308
- | { readonly kind: "root" }
8309
- | { readonly kind: "minimal" }
8310
- | { readonly kind: "project_roots"; readonly subpath?: string | null }
8311
- | { readonly kind: "tmpdir" }
8312
- | { readonly kind: "slash_tmp" }
8313
- | { readonly kind: "unknown"; readonly path: string; readonly subpath?: string | null };
8314
-export const V2ThreadStartResponse__FileSystemSpecialPath = Schema.Union(
8315
- [
8316
- Schema.Struct({ kind: Schema.Literal("root") }).annotate({
8317
- title: "RootFileSystemSpecialPath",
8318
- }),
8319
- Schema.Struct({ kind: Schema.Literal("minimal") }).annotate({
8320
- title: "MinimalFileSystemSpecialPath",
8321
- }),
8322
- Schema.Struct({
8323
- kind: Schema.Literal("project_roots"),
8324
- subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8325
- }).annotate({ title: "KindFileSystemSpecialPath" }),
8326
- Schema.Struct({ kind: Schema.Literal("tmpdir") }).annotate({
8327
- title: "TmpdirFileSystemSpecialPath",
8328
- }),
8329
- Schema.Struct({ kind: Schema.Literal("slash_tmp") }).annotate({
8330
- title: "SlashTmpFileSystemSpecialPath",
8331
- }),
8332
- Schema.Struct({
8333
- kind: Schema.Literal("unknown"),
8334
- path: Schema.String,
8335
- subpath: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
8336
- }),
8337
- ],
8338
- { mode: "oneOf" },
8339
-);
8340
-
8786
export type V2ThreadStartResponse__GitInfo = {
8787
readonly branch?: string | null;
8788
readonly originUrl?: string | null;
@@ -8358,6 +8803,14 @@ export const V2ThreadStartResponse__HookPromptFragment = Schema.Struct({
8803
text: Schema.String,
8804
});
8805
8806
+export type V2ThreadStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
8807
+export const V2ThreadStartResponse__ImageDetail = Schema.Literals([
8808
+ "auto",
8809
+ "low",
8810
+ "high",
8811
+ "original",
8812
+]);
8813
+
8814
export type V2ThreadStartResponse__McpToolCallError = { readonly message: string };
8815
export const V2ThreadStartResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
8816
@@ -8440,31 +8893,17 @@ export const V2ThreadStartResponse__PatchChangeKind = Schema.Union(
8893
{ mode: "oneOf" },
8894
);
8895
8443
-export type V2ThreadStartResponse__PermissionProfileNetworkPermissions = {
8444
- readonly enabled: boolean;
8445
-};
8446
-export const V2ThreadStartResponse__PermissionProfileNetworkPermissions = Schema.Struct({
8447
- enabled: Schema.Boolean,
8448
-});
8896
+export type V2ThreadStartResponse__ReasoningEffort = string;
8897
+export const V2ThreadStartResponse__ReasoningEffort = Schema.String.annotate({
8898
+ description: "A non-empty reasoning effort value advertised by the model.",
8899
+}).check(Schema.isMinLength(1));
8900
8450
-export type V2ThreadStartResponse__ReasoningEffort =
8451
- | "none"
8452
- | "minimal"
8453
- | "low"
8454
- | "medium"
8455
- | "high"
8456
- | "xhigh";
8457
-export const V2ThreadStartResponse__ReasoningEffort = Schema.Literals([
8458
- "none",
8459
- "minimal",
8460
- "low",
8461
- "medium",
8462
- "high",
8463
- "xhigh",
8464
-]).annotate({
8465
- description:
8466
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
8467
-});
8901
+export type V2ThreadStartResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted";
8902
+export const V2ThreadStartResponse__SubAgentActivityKind = Schema.Literals([
8903
+ "started",
8904
+ "interacted",
8905
+ "interrupted",
8906
+]);
8907
8908
export type V2ThreadStartResponse__TextElement = {
8909
readonly byteRange: { readonly end: number; readonly start: number };
@@ -8500,12 +8939,8 @@ export const V2ThreadStartResponse__ThreadActiveFlag = Schema.Literals([
8939
export type V2ThreadStartResponse__ThreadId = string;
8940
export const V2ThreadStartResponse__ThreadId = Schema.String;
8941
8503
-export type V2ThreadStartResponse__ThreadSource = "user" | "subagent" | "memory_consolidation";
8504
-export const V2ThreadStartResponse__ThreadSource = Schema.Literals([
8505
- "user",
8506
- "subagent",
8507
- "memory_consolidation",
8508
-]);
8942
+export type V2ThreadStartResponse__ThreadSource = string;
8943
+export const V2ThreadStartResponse__ThreadSource = Schema.String;
8944
8945
export type V2ThreadStartResponse__TurnStatus =
8946
| "completed"
@@ -8664,6 +9099,14 @@ export const V2ThreadUnarchiveResponse__HookPromptFragment = Schema.Struct({
9099
text: Schema.String,
9100
});
9101
9102
+export type V2ThreadUnarchiveResponse__ImageDetail = "auto" | "low" | "high" | "original";
9103
+export const V2ThreadUnarchiveResponse__ImageDetail = Schema.Literals([
9104
+ "auto",
9105
+ "low",
9106
+ "high",
9107
+ "original",
9108
+]);
9109
+
9110
export type V2ThreadUnarchiveResponse__McpToolCallError = { readonly message: string };
9111
export const V2ThreadUnarchiveResponse__McpToolCallError = Schema.Struct({
9112
message: Schema.String,
@@ -8751,24 +9194,20 @@ export const V2ThreadUnarchiveResponse__PatchChangeKind = Schema.Union(
9194
{ mode: "oneOf" },
9195
);
9196
8754
-export type V2ThreadUnarchiveResponse__ReasoningEffort =
8755
- | "none"
8756
- | "minimal"
8757
- | "low"
8758
- | "medium"
8759
- | "high"
8760
- | "xhigh";
8761
-export const V2ThreadUnarchiveResponse__ReasoningEffort = Schema.Literals([
8762
- "none",
8763
- "minimal",
8764
- "low",
8765
- "medium",
8766
- "high",
8767
- "xhigh",
8768
-]).annotate({
8769
- description:
8770
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
8771
-});
9197
+export type V2ThreadUnarchiveResponse__ReasoningEffort = string;
9198
+export const V2ThreadUnarchiveResponse__ReasoningEffort = Schema.String.annotate({
9199
+ description: "A non-empty reasoning effort value advertised by the model.",
9200
+}).check(Schema.isMinLength(1));
9201
+
9202
+export type V2ThreadUnarchiveResponse__SubAgentActivityKind =
9203
+ | "started"
9204
+ | "interacted"
9205
+ | "interrupted";
9206
+export const V2ThreadUnarchiveResponse__SubAgentActivityKind = Schema.Literals([
9207
+ "started",
9208
+ "interacted",
9209
+ "interrupted",
9210
+]);
9211
9212
export type V2ThreadUnarchiveResponse__TextElement = {
9213
readonly byteRange: { readonly end: number; readonly start: number };
@@ -8806,12 +9245,8 @@ export const V2ThreadUnarchiveResponse__ThreadActiveFlag = Schema.Literals([
9245
export type V2ThreadUnarchiveResponse__ThreadId = string;
9246
export const V2ThreadUnarchiveResponse__ThreadId = Schema.String;
9247
8809
-export type V2ThreadUnarchiveResponse__ThreadSource = "user" | "subagent" | "memory_consolidation";
8810
-export const V2ThreadUnarchiveResponse__ThreadSource = Schema.Literals([
8811
- "user",
8812
- "subagent",
8813
- "memory_consolidation",
8814
-]);
9248
+export type V2ThreadUnarchiveResponse__ThreadSource = string;
9249
+export const V2ThreadUnarchiveResponse__ThreadSource = Schema.String;
9250
9251
export type V2ThreadUnarchiveResponse__TurnStatus =
9252
| "completed"
@@ -8943,6 +9378,14 @@ export const V2TurnCompletedNotification__HookPromptFragment = Schema.Struct({
9378
text: Schema.String,
9379
});
9380
9381
+export type V2TurnCompletedNotification__ImageDetail = "auto" | "low" | "high" | "original";
9382
+export const V2TurnCompletedNotification__ImageDetail = Schema.Literals([
9383
+ "auto",
9384
+ "low",
9385
+ "high",
9386
+ "original",
9387
+]);
9388
+
9389
export type V2TurnCompletedNotification__McpToolCallError = { readonly message: string };
9390
export const V2TurnCompletedNotification__McpToolCallError = Schema.Struct({
9391
message: Schema.String,
@@ -9030,24 +9473,20 @@ export const V2TurnCompletedNotification__PatchChangeKind = Schema.Union(
9473
{ mode: "oneOf" },
9474
);
9475
9033
-export type V2TurnCompletedNotification__ReasoningEffort =
9034
- | "none"
9035
- | "minimal"
9036
- | "low"
9037
- | "medium"
9038
- | "high"
9039
- | "xhigh";
9040
-export const V2TurnCompletedNotification__ReasoningEffort = Schema.Literals([
9041
- "none",
9042
- "minimal",
9043
- "low",
9044
- "medium",
9045
- "high",
9046
- "xhigh",
9047
-]).annotate({
9048
- description:
9049
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
9050
-});
9476
+export type V2TurnCompletedNotification__ReasoningEffort = string;
9477
+export const V2TurnCompletedNotification__ReasoningEffort = Schema.String.annotate({
9478
+ description: "A non-empty reasoning effort value advertised by the model.",
9479
+}).check(Schema.isMinLength(1));
9480
+
9481
+export type V2TurnCompletedNotification__SubAgentActivityKind =
9482
+ | "started"
9483
+ | "interacted"
9484
+ | "interrupted";
9485
+export const V2TurnCompletedNotification__SubAgentActivityKind = Schema.Literals([
9486
+ "started",
9487
+ "interacted",
9488
+ "interrupted",
9489
+]);
9490
9491
export type V2TurnCompletedNotification__TextElement = {
9492
readonly byteRange: { readonly end: number; readonly start: number };
@@ -9204,6 +9643,14 @@ export const V2TurnStartedNotification__HookPromptFragment = Schema.Struct({
9643
text: Schema.String,
9644
});
9645
9646
+export type V2TurnStartedNotification__ImageDetail = "auto" | "low" | "high" | "original";
9647
+export const V2TurnStartedNotification__ImageDetail = Schema.Literals([
9648
+ "auto",
9649
+ "low",
9650
+ "high",
9651
+ "original",
9652
+]);
9653
+
9654
export type V2TurnStartedNotification__McpToolCallError = { readonly message: string };
9655
export const V2TurnStartedNotification__McpToolCallError = Schema.Struct({
9656
message: Schema.String,
@@ -9291,24 +9738,20 @@ export const V2TurnStartedNotification__PatchChangeKind = Schema.Union(
9738
{ mode: "oneOf" },
9739
);
9740
9294
-export type V2TurnStartedNotification__ReasoningEffort =
9295
- | "none"
9296
- | "minimal"
9297
- | "low"
9298
- | "medium"
9299
- | "high"
9300
- | "xhigh";
9301
-export const V2TurnStartedNotification__ReasoningEffort = Schema.Literals([
9302
- "none",
9303
- "minimal",
9304
- "low",
9305
- "medium",
9306
- "high",
9307
- "xhigh",
9308
-]).annotate({
9309
- description:
9310
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
9311
-});
9741
+export type V2TurnStartedNotification__ReasoningEffort = string;
9742
+export const V2TurnStartedNotification__ReasoningEffort = Schema.String.annotate({
9743
+ description: "A non-empty reasoning effort value advertised by the model.",
9744
+}).check(Schema.isMinLength(1));
9745
+
9746
+export type V2TurnStartedNotification__SubAgentActivityKind =
9747
+ | "started"
9748
+ | "interacted"
9749
+ | "interrupted";
9750
+export const V2TurnStartedNotification__SubAgentActivityKind = Schema.Literals([
9751
+ "started",
9752
+ "interacted",
9753
+ "interrupted",
9754
+]);
9755
9756
export type V2TurnStartedNotification__TextElement = {
9757
readonly byteRange: { readonly end: number; readonly start: number };
@@ -9385,6 +9828,12 @@ export const V2TurnStartParams__AbsolutePathBuf = Schema.String.annotate({
9828
"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.",
9829
});
9830
9831
+export type V2TurnStartParams__AdditionalContextKind = "untrusted" | "application";
9832
+export const V2TurnStartParams__AdditionalContextKind = Schema.Literals([
9833
+ "untrusted",
9834
+ "application",
9835
+]);
9836
+
9837
export type V2TurnStartParams__ApprovalsReviewer = "user" | "auto_review" | "guardian_subagent";
9838
export const V2TurnStartParams__ApprovalsReviewer = Schema.Literals([
9839
"user",
@@ -9425,6 +9874,9 @@ export const V2TurnStartParams__AskForApproval = Schema.Union(
9874
{ mode: "oneOf" },
9875
);
9876
9877
+export type V2TurnStartParams__ImageDetail = "auto" | "low" | "high" | "original";
9878
+export const V2TurnStartParams__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
9879
+
9880
export type V2TurnStartParams__ModeKind = "plan" | "default";
9881
export const V2TurnStartParams__ModeKind = Schema.Literals(["plan", "default"]).annotate({
9882
description: "Initial collaboration mode to use when the TUI starts.",
@@ -9433,24 +9885,10 @@ export const V2TurnStartParams__ModeKind = Schema.Literals(["plan", "default"]).
9885
export type V2TurnStartParams__Personality = "none" | "friendly" | "pragmatic";
9886
export const V2TurnStartParams__Personality = Schema.Literals(["none", "friendly", "pragmatic"]);
9887
9436
-export type V2TurnStartParams__ReasoningEffort =
9437
- | "none"
9438
- | "minimal"
9439
- | "low"
9440
- | "medium"
9441
- | "high"
9442
- | "xhigh";
9443
-export const V2TurnStartParams__ReasoningEffort = Schema.Literals([
9444
- "none",
9445
- "minimal",
9446
- "low",
9447
- "medium",
9448
- "high",
9449
- "xhigh",
9450
-]).annotate({
9451
- description:
9452
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
9453
-});
9888
+export type V2TurnStartParams__ReasoningEffort = string;
9889
+export const V2TurnStartParams__ReasoningEffort = Schema.String.annotate({
9890
+ description: "A non-empty reasoning effort value advertised by the model.",
9891
+}).check(Schema.isMinLength(1));
9892
9893
export type V2TurnStartParams__ReasoningSummary = "auto" | "concise" | "detailed" | "none";
9894
export const V2TurnStartParams__ReasoningSummary = Schema.Union(
@@ -9562,6 +10000,14 @@ export const V2TurnStartResponse__HookPromptFragment = Schema.Struct({
10000
text: Schema.String,
10001
});
10002
10003
+export type V2TurnStartResponse__ImageDetail = "auto" | "low" | "high" | "original";
10004
+export const V2TurnStartResponse__ImageDetail = Schema.Literals([
10005
+ "auto",
10006
+ "low",
10007
+ "high",
10008
+ "original",
10009
+]);
10010
+
10011
export type V2TurnStartResponse__McpToolCallError = { readonly message: string };
10012
export const V2TurnStartResponse__McpToolCallError = Schema.Struct({ message: Schema.String });
10013
@@ -9644,24 +10090,17 @@ export const V2TurnStartResponse__PatchChangeKind = Schema.Union(
10090
{ mode: "oneOf" },
10091
);
10092
9647
-export type V2TurnStartResponse__ReasoningEffort =
9648
- | "none"
9649
- | "minimal"
9650
- | "low"
9651
- | "medium"
9652
- | "high"
9653
- | "xhigh";
9654
-export const V2TurnStartResponse__ReasoningEffort = Schema.Literals([
9655
- "none",
9656
- "minimal",
9657
- "low",
9658
- "medium",
9659
- "high",
9660
- "xhigh",
9661
-]).annotate({
9662
- description:
9663
- "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
9664
-});
10093
+export type V2TurnStartResponse__ReasoningEffort = string;
10094
+export const V2TurnStartResponse__ReasoningEffort = Schema.String.annotate({
10095
+ description: "A non-empty reasoning effort value advertised by the model.",
10096
+}).check(Schema.isMinLength(1));
10097
+
10098
+export type V2TurnStartResponse__SubAgentActivityKind = "started" | "interacted" | "interrupted";
10099
+export const V2TurnStartResponse__SubAgentActivityKind = Schema.Literals([
10100
+ "started",
10101
+ "interacted",
10102
+ "interrupted",
10103
+]);
10104
10105
export type V2TurnStartResponse__TextElement = {
10106
readonly byteRange: { readonly end: number; readonly start: number };
@@ -9728,6 +10167,15 @@ export const V2TurnStartResponse__WebSearchAction = Schema.Union(
10167
{ mode: "oneOf" },
10168
);
10169
10170
+export type V2TurnSteerParams__AdditionalContextKind = "untrusted" | "application";
10171
+export const V2TurnSteerParams__AdditionalContextKind = Schema.Literals([
10172
+ "untrusted",
10173
+ "application",
10174
+]);
10175
+
10176
+export type V2TurnSteerParams__ImageDetail = "auto" | "low" | "high" | "original";
10177
+export const V2TurnSteerParams__ImageDetail = Schema.Literals(["auto", "low", "high", "original"]);
10178
+
10179
export type V2TurnSteerParams__TextElement = {
10180
readonly byteRange: { readonly end: number; readonly start: number };
10181
readonly placeholder?: string | null;
@@ -9792,25 +10240,6 @@ export const ApplyPatchApprovalResponse__NetworkPolicyAmendment = Schema.Struct(
10240
host: Schema.String,
10241
});
10242
9795
-export type ClientRequest__PermissionProfileModificationParams = {
9796
- readonly path: ClientRequest__AbsolutePathBuf;
9797
- readonly type: "additionalWritableRoot";
9798
-};
9799
-export const ClientRequest__PermissionProfileModificationParams = Schema.Union(
9800
- [
9801
- Schema.Struct({
9802
- path: ClientRequest__AbsolutePathBuf,
9803
- type: Schema.Literal("additionalWritableRoot").annotate({
9804
- title: "AdditionalWritableRootPermissionProfileModificationParamsType",
9805
- }),
9806
- }).annotate({
9807
- title: "AdditionalWritableRootPermissionProfileModificationParams",
9808
- description: "Additional concrete directory that should be writable.",
9809
- }),
9810
- ],
9811
- { mode: "oneOf" },
9812
-);
9813
-
10243
export type ClientRequest__PluginInstallParams = {
10244
readonly marketplacePath?: ClientRequest__AbsolutePathBuf | null;
10245
readonly pluginName: string;
@@ -9822,6 +10251,30 @@ export const ClientRequest__PluginInstallParams = Schema.Struct({
10251
remoteMarketplaceName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10252
});
10253
10254
+export type ClientRequest__PluginInstalledParams = {
10255
+ readonly cwds?: ReadonlyArray<ClientRequest__AbsolutePathBuf> | null;
10256
+ readonly installSuggestionPluginNames?: ReadonlyArray<string> | null;
10257
+};
10258
+export const ClientRequest__PluginInstalledParams = Schema.Struct({
10259
+ cwds: Schema.optionalKey(
10260
+ Schema.Union([
10261
+ Schema.Array(ClientRequest__AbsolutePathBuf).annotate({
10262
+ description: "Optional working directories used to discover repo marketplaces.",
10263
+ }),
10264
+ Schema.Null,
10265
+ ]),
10266
+ ),
10267
+ installSuggestionPluginNames: Schema.optionalKey(
10268
+ Schema.Union([
10269
+ Schema.Array(Schema.String).annotate({
10270
+ description:
10271
+ "Additional uninstalled plugin names that should be returned when present locally. This is used by mention surfaces that intentionally expose install entrypoints.",
10272
+ }),
10273
+ Schema.Null,
10274
+ ]),
10275
+ ),
10276
+});
10277
+
10278
export type ClientRequest__PluginReadParams = {
10279
readonly marketplacePath?: ClientRequest__AbsolutePathBuf | null;
10280
readonly pluginName: string;
@@ -9893,6 +10346,13 @@ export const ClientRequest__SkillsConfigWriteParams = Schema.Struct({
10346
),
10347
});
10348
10349
+export type ClientRequest__SkillsExtraRootsSetParams = {
10350
+ readonly extraRoots: ReadonlyArray<ClientRequest__AbsolutePathBuf>;
10351
+};
10352
+export const ClientRequest__SkillsExtraRootsSetParams = Schema.Struct({
10353
+ extraRoots: Schema.Array(ClientRequest__AbsolutePathBuf),
10354
+});
10355
+
10356
export type ClientRequest__SendAddCreditsNudgeEmailParams = {
10357
readonly creditType: ClientRequest__AddCreditsNudgeCreditType;
10358
};
@@ -9900,28 +10360,6 @@ export const ClientRequest__SendAddCreditsNudgeEmailParams = Schema.Struct({
10360
creditType: ClientRequest__AddCreditsNudgeCreditType,
10361
});
10362
9903
-export type ClientRequest__FileSystemPath =
9904
- | { readonly path: ClientRequest__AbsolutePathBuf; readonly type: "path" }
9905
- | { readonly pattern: string; readonly type: "glob_pattern" }
9906
- | { readonly type: "special"; readonly value: ClientRequest__FileSystemSpecialPath };
9907
-export const ClientRequest__FileSystemPath = Schema.Union(
9908
- [
9909
- Schema.Struct({
9910
- path: ClientRequest__AbsolutePathBuf,
9911
- type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }),
9912
- }).annotate({ title: "PathFileSystemPath" }),
9913
- Schema.Struct({
9914
- pattern: Schema.String,
9915
- type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }),
9916
- }).annotate({ title: "GlobPatternFileSystemPath" }),
9917
- Schema.Struct({
9918
- type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }),
9919
- value: ClientRequest__FileSystemSpecialPath,
9920
- }).annotate({ title: "SpecialFileSystemPath" }),
9921
- ],
9922
- { mode: "oneOf" },
9923
-);
9924
-
10363
export type ClientRequest__ContentItem =
10364
| { readonly text: string; readonly type: "input_text" }
10365
| {
@@ -9955,7 +10393,8 @@ export type ClientRequest__FunctionCallOutputContentItem =
10393
readonly detail?: ClientRequest__ImageDetail | null;
10394
readonly image_url: string;
10395
readonly type: "input_image";
9958
- };
10396
+ }
10397
+ | { readonly encrypted_content: string; readonly type: "encrypted_content" };
10398
export const ClientRequest__FunctionCallOutputContentItem = Schema.Union(
10399
[
10400
Schema.Struct({
@@ -9971,6 +10410,12 @@ export const ClientRequest__FunctionCallOutputContentItem = Schema.Union(
10410
title: "InputImageFunctionCallOutputContentItemType",
10411
}),
10412
}).annotate({ title: "InputImageFunctionCallOutputContentItem" }),
10413
+ Schema.Struct({
10414
+ encrypted_content: Schema.String,
10415
+ type: Schema.Literal("encrypted_content").annotate({
10416
+ title: "EncryptedContentFunctionCallOutputContentItemType",
10417
+ }),
10418
+ }).annotate({ title: "EncryptedContentFunctionCallOutputContentItem" }),
10419
],
10420
{ mode: "oneOf" },
10421
).annotate({
@@ -9993,6 +10438,7 @@ export type ClientRequest__ListMcpServerStatusParams = {
10438
readonly cursor?: string | null;
10439
readonly detail?: ClientRequest__McpServerStatusDetail | null;
10440
readonly limit?: number | null;
10441
+ readonly threadId?: string | null;
10442
};
10443
export const ClientRequest__ListMcpServerStatusParams = Schema.Struct({
10444
cursor: Schema.optionalKey(
@@ -10020,6 +10466,7 @@ export const ClientRequest__ListMcpServerStatusParams = Schema.Struct({
10466
Schema.Null,
10467
]),
10468
),
10469
+ threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10470
});
10471
10472
export type ClientRequest__ConfigEdit = {
@@ -10084,10 +10531,12 @@ export const ClientRequest__PluginListParams = Schema.Struct({
10531
export type ClientRequest__PluginShareTarget = {
10532
readonly principalId: string;
10533
readonly principalType: ClientRequest__PluginSharePrincipalType;
10534
+ readonly role: ClientRequest__PluginShareTargetRole;
10535
};
10536
export const ClientRequest__PluginShareTarget = Schema.Struct({
10537
principalId: Schema.String,
10538
principalType: ClientRequest__PluginSharePrincipalType,
10539
+ role: ClientRequest__PluginShareTargetRole,
10540
});
10541
10542
export type ClientRequest__Settings = {
@@ -10160,33 +10609,7 @@ export const ClientRequest__ThreadResumeParams = Schema.Struct({
10609
threadId: Schema.String,
10610
}).annotate({
10611
description:
10163
- "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nThe precedence is: history > path > thread_id. If using history or path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.",
10164
-});
10165
-
10166
-export type ClientRequest__SkillsListParams = {
10167
- readonly cwds?: ReadonlyArray<string>;
10168
- readonly forceReload?: boolean;
10169
- readonly perCwdExtraUserRoots?: ReadonlyArray<ClientRequest__SkillsListExtraRootsForCwd> | null;
10170
-};
10171
-export const ClientRequest__SkillsListParams = Schema.Struct({
10172
- cwds: Schema.optionalKey(
10173
- Schema.Array(Schema.String).annotate({
10174
- description: "When empty, defaults to the current session working directory.",
10175
- }),
10176
- ),
10177
- forceReload: Schema.optionalKey(
10178
- Schema.Boolean.annotate({
10179
- description: "When true, bypass the skills cache and re-scan skills from disk.",
10180
- }),
10181
- ),
10182
- perCwdExtraUserRoots: Schema.optionalKey(
10183
- Schema.Union([
10184
- Schema.Array(ClientRequest__SkillsListExtraRootsForCwd).annotate({
10185
- description: "Optional per-cwd extra roots to scan as user-scoped skills.",
10186
- }),
10187
- Schema.Null,
10188
- ]),
10189
- ),
10612
+ "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nFor non-running threads, the precedence is: history > non-empty path > thread_id. If using history or a non-empty path for a non-running thread, the thread_id param will be ignored.\n\nIf thread_id identifies a running thread, app-server rejoins that thread and treats a non-empty path as a consistency check against the active rollout path. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
10613
});
10614
10615
export type ClientRequest__MigrationDetails = {
@@ -10222,8 +10645,16 @@ export type ClientRequest__UserInput =
10645
readonly text_elements?: ReadonlyArray<ClientRequest__TextElement>;
10646
readonly type: "text";
10647
}
10225
- | { readonly type: "image"; readonly url: string }
10226
- | { readonly path: string; readonly type: "localImage" }
10648
+ | {
10649
+ readonly detail?: ClientRequest__ImageDetail | null;
10650
+ readonly type: "image";
10651
+ readonly url: string;
10652
+ }
10653
+ | {
10654
+ readonly detail?: ClientRequest__ImageDetail | null;
10655
+ readonly path: string;
10656
+ readonly type: "localImage";
10657
+ }
10658
| { readonly name: string; readonly path: string; readonly type: "skill" }
10659
| { readonly name: string; readonly path: string; readonly type: "mention" };
10660
export const ClientRequest__UserInput = Schema.Union(
@@ -10239,10 +10670,12 @@ export const ClientRequest__UserInput = Schema.Union(
10670
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
10671
}).annotate({ title: "TextUserInput" }),
10672
Schema.Struct({
10673
+ detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])),
10674
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
10675
url: Schema.String,
10676
}).annotate({ title: "ImageUserInput" }),
10677
Schema.Struct({
10678
+ detail: Schema.optionalKey(Schema.Union([ClientRequest__ImageDetail, Schema.Null])),
10679
path: Schema.String,
10680
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
10681
}).annotate({ title: "LocalImageUserInput" }),
@@ -10260,6 +10693,21 @@ export const ClientRequest__UserInput = Schema.Union(
10693
{ mode: "oneOf" },
10694
);
10695
10696
+export type ClientRequest__ThreadGoalSetParams = {
10697
+ readonly objective?: string | null;
10698
+ readonly status?: ClientRequest__ThreadGoalStatus | null;
10699
+ readonly threadId: string;
10700
+ readonly tokenBudget?: number | null;
10701
+};
10702
+export const ClientRequest__ThreadGoalSetParams = Schema.Struct({
10703
+ objective: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
10704
+ status: Schema.optionalKey(Schema.Union([ClientRequest__ThreadGoalStatus, Schema.Null])),
10705
+ threadId: Schema.String,
10706
+ tokenBudget: Schema.optionalKey(
10707
+ Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
10708
+ ),
10709
+});
10710
+
10711
export type ClientRequest__ThreadMetadataUpdateParams = {
10712
readonly gitInfo?: ClientRequest__ThreadMetadataGitInfoUpdateParams | null;
10713
readonly threadId: string;
@@ -10324,7 +10772,7 @@ export const ClientRequest__ThreadForkParams = Schema.Struct({
10772
),
10773
}).annotate({
10774
description:
10327
- "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.",
10775
+ "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using a non-empty path, the thread_id param will be ignored. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.",
10776
});
10777
10778
export type ClientRequest__ThreadListParams = {
@@ -10920,6 +11368,49 @@ export const ServerNotification__FsChangedNotification = Schema.Struct({
11368
}),
11369
}).annotate({ description: "Filesystem watch notification emitted for `fs/watch` subscribers." });
11370
11371
+export type ServerNotification__SandboxPolicy =
11372
+ | { readonly type: "dangerFullAccess" }
11373
+ | { readonly networkAccess?: boolean; readonly type: "readOnly" }
11374
+ | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
11375
+ | {
11376
+ readonly excludeSlashTmp?: boolean;
11377
+ readonly excludeTmpdirEnvVar?: boolean;
11378
+ readonly networkAccess?: boolean;
11379
+ readonly type: "workspaceWrite";
11380
+ readonly writableRoots?: ReadonlyArray<ServerNotification__AbsolutePathBuf>;
11381
+ };
11382
+export const ServerNotification__SandboxPolicy = Schema.Union(
11383
+ [
11384
+ Schema.Struct({
11385
+ type: Schema.Literal("dangerFullAccess").annotate({
11386
+ title: "DangerFullAccessSandboxPolicyType",
11387
+ }),
11388
+ }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
11389
+ Schema.Struct({
11390
+ networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
11391
+ type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
11392
+ }).annotate({ title: "ReadOnlySandboxPolicy" }),
11393
+ Schema.Struct({
11394
+ networkAccess: Schema.optionalKey(
11395
+ Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
11396
+ ),
11397
+ type: Schema.Literal("externalSandbox").annotate({
11398
+ title: "ExternalSandboxSandboxPolicyType",
11399
+ }),
11400
+ }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
11401
+ Schema.Struct({
11402
+ excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
11403
+ excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
11404
+ networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
11405
+ type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
11406
+ writableRoots: Schema.optionalKey(
11407
+ Schema.Array(ServerNotification__AbsolutePathBuf).annotate({ default: [] }),
11408
+ ),
11409
+ }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
11410
+ ],
11411
+ { mode: "oneOf" },
11412
+);
11413
+
11414
export type ServerNotification__AppMetadata = {
11415
readonly categories?: ReadonlyArray<string> | null;
11416
readonly developer?: string | null;
@@ -11041,11 +11532,13 @@ export type ServerNotification__McpServerStatusUpdatedNotification = {
11532
readonly error?: string | null;
11533
readonly name: string;
11534
readonly status: ServerNotification__McpServerStartupState;
11535
+ readonly threadId?: string | null;
11536
};
11537
export const ServerNotification__McpServerStatusUpdatedNotification = Schema.Struct({
11538
error: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11539
name: Schema.String,
11540
status: ServerNotification__McpServerStartupState,
11541
+ threadId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11542
});
11543
11544
export type ServerNotification__MemoryCitation = {
@@ -11209,27 +11702,6 @@ export const ServerNotification__AccountUpdatedNotification = Schema.Struct({
11702
planType: Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])),
11703
});
11704
11212
-export type ServerNotification__RateLimitSnapshot = {
11213
- readonly credits?: ServerNotification__CreditsSnapshot | null;
11214
- readonly limitId?: string | null;
11215
- readonly limitName?: string | null;
11216
- readonly planType?: ServerNotification__PlanType | null;
11217
- readonly primary?: ServerNotification__RateLimitWindow | null;
11218
- readonly rateLimitReachedType?: ServerNotification__RateLimitReachedType | null;
11219
- readonly secondary?: ServerNotification__RateLimitWindow | null;
11220
-};
11221
-export const ServerNotification__RateLimitSnapshot = Schema.Struct({
11222
- credits: Schema.optionalKey(Schema.Union([ServerNotification__CreditsSnapshot, Schema.Null])),
11223
- limitId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11224
- limitName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11225
- planType: Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])),
11226
- primary: Schema.optionalKey(Schema.Union([ServerNotification__RateLimitWindow, Schema.Null])),
11227
- rateLimitReachedType: Schema.optionalKey(
11228
- Schema.Union([ServerNotification__RateLimitReachedType, Schema.Null]),
11229
- ),
11230
- secondary: Schema.optionalKey(Schema.Union([ServerNotification__RateLimitWindow, Schema.Null])),
11231
-});
11232
-
11705
export type ServerNotification__ThreadRealtimeStartedNotification = {
11706
readonly realtimeSessionId?: string | null;
11707
readonly threadId: string;
@@ -11241,15 +11713,32 @@ export const ServerNotification__ThreadRealtimeStartedNotification = Schema.Stru
11713
version: ServerNotification__RealtimeConversationVersion,
11714
}).annotate({ description: "EXPERIMENTAL - emitted when thread realtime startup is accepted." });
11715
11716
+export type ServerNotification__Settings = {
11717
+ readonly developer_instructions?: string | null;
11718
+ readonly model: string;
11719
+ readonly reasoning_effort?: ServerNotification__ReasoningEffort | null;
11720
+};
11721
+export const ServerNotification__Settings = Schema.Struct({
11722
+ developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11723
+ model: Schema.String,
11724
+ reasoning_effort: Schema.optionalKey(
11725
+ Schema.Union([ServerNotification__ReasoningEffort, Schema.Null]),
11726
+ ),
11727
+}).annotate({ description: "Settings for a collaboration mode." });
11728
+
11729
export type ServerNotification__RemoteControlStatusChangedNotification = {
11730
readonly environmentId?: string | null;
11731
+ readonly installationId: string;
11732
+ readonly serverName: string;
11733
readonly status: ServerNotification__RemoteControlConnectionStatus;
11734
};
11735
export const ServerNotification__RemoteControlStatusChangedNotification = Schema.Struct({
11736
environmentId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11737
+ installationId: Schema.String,
11738
+ serverName: Schema.String,
11739
status: ServerNotification__RemoteControlConnectionStatus,
11740
}).annotate({
11252
- description: "Current remote-control connection status and environment id exposed to clients.",
11741
+ description: "Current remote-control connection status and remote identity exposed to clients.",
11742
});
11743
11744
export type ServerNotification__ServerRequestResolvedNotification = {
@@ -11261,14 +11750,47 @@ export const ServerNotification__ServerRequestResolvedNotification = Schema.Stru
11750
threadId: Schema.String,
11751
});
11752
11753
+export type ServerNotification__RateLimitSnapshot = {
11754
+ readonly credits?: ServerNotification__CreditsSnapshot | null;
11755
+ readonly individualLimit?: ServerNotification__SpendControlLimitSnapshot | null;
11756
+ readonly limitId?: string | null;
11757
+ readonly limitName?: string | null;
11758
+ readonly planType?: ServerNotification__PlanType | null;
11759
+ readonly primary?: ServerNotification__RateLimitWindow | null;
11760
+ readonly rateLimitReachedType?: ServerNotification__RateLimitReachedType | null;
11761
+ readonly secondary?: ServerNotification__RateLimitWindow | null;
11762
+};
11763
+export const ServerNotification__RateLimitSnapshot = Schema.Struct({
11764
+ credits: Schema.optionalKey(Schema.Union([ServerNotification__CreditsSnapshot, Schema.Null])),
11765
+ individualLimit: Schema.optionalKey(
11766
+ Schema.Union([ServerNotification__SpendControlLimitSnapshot, Schema.Null]),
11767
+ ),
11768
+ limitId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11769
+ limitName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
11770
+ planType: Schema.optionalKey(Schema.Union([ServerNotification__PlanType, Schema.Null])),
11771
+ primary: Schema.optionalKey(Schema.Union([ServerNotification__RateLimitWindow, Schema.Null])),
11772
+ rateLimitReachedType: Schema.optionalKey(
11773
+ Schema.Union([ServerNotification__RateLimitReachedType, Schema.Null]),
11774
+ ),
11775
+ secondary: Schema.optionalKey(Schema.Union([ServerNotification__RateLimitWindow, Schema.Null])),
11776
+});
11777
+
11778
export type ServerNotification__UserInput =
11779
| {
11780
readonly text: string;
11781
readonly text_elements?: ReadonlyArray<ServerNotification__TextElement>;
11782
readonly type: "text";
11783
}
11270
- | { readonly type: "image"; readonly url: string }
11271
- | { readonly path: string; readonly type: "localImage" }
11784
+ | {
11785
+ readonly detail?: ServerNotification__ImageDetail | null;
11786
+ readonly type: "image";
11787
+ readonly url: string;
11788
+ }
11789
+ | {
11790
+ readonly detail?: ServerNotification__ImageDetail | null;
11791
+ readonly path: string;
11792
+ readonly type: "localImage";
11793
+ }
11794
| { readonly name: string; readonly path: string; readonly type: "skill" }
11795
| { readonly name: string; readonly path: string; readonly type: "mention" };
11796
export const ServerNotification__UserInput = Schema.Union(
@@ -11284,10 +11806,12 @@ export const ServerNotification__UserInput = Schema.Union(
11806
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
11807
}).annotate({ title: "TextUserInput" }),
11808
Schema.Struct({
11809
+ detail: Schema.optionalKey(Schema.Union([ServerNotification__ImageDetail, Schema.Null])),
11810
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
11811
url: Schema.String,
11812
}).annotate({ title: "ImageUserInput" }),
11813
Schema.Struct({
11814
+ detail: Schema.optionalKey(Schema.Union([ServerNotification__ImageDetail, Schema.Null])),
11815
path: Schema.String,
11816
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
11817
}).annotate({ title: "LocalImageUserInput" }),
@@ -11786,6 +12310,7 @@ export const ToolRequestUserInputParams__ToolRequestUserInputQuestion = Schema.S
12310
12311
export type V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot = {
12312
readonly credits?: V2AccountRateLimitsUpdatedNotification__CreditsSnapshot | null;
12313
+ readonly individualLimit?: V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot | null;
12314
readonly limitId?: string | null;
12315
readonly limitName?: string | null;
12316
readonly planType?: V2AccountRateLimitsUpdatedNotification__PlanType | null;
@@ -11797,6 +12322,9 @@ export const V2AccountRateLimitsUpdatedNotification__RateLimitSnapshot = Schema.
12322
credits: Schema.optionalKey(
12323
Schema.Union([V2AccountRateLimitsUpdatedNotification__CreditsSnapshot, Schema.Null]),
12324
),
12325
+ individualLimit: Schema.optionalKey(
12326
+ Schema.Union([V2AccountRateLimitsUpdatedNotification__SpendControlLimitSnapshot, Schema.Null]),
12327
+ ),
12328
limitId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12329
limitName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12330
planType: Schema.optionalKey(
@@ -11918,28 +12446,6 @@ export const V2CommandExecParams__SandboxPolicy = Schema.Union(
12446
{ mode: "oneOf" },
12447
);
12448
11921
-export type V2CommandExecParams__FileSystemPath =
11922
- | { readonly path: V2CommandExecParams__AbsolutePathBuf; readonly type: "path" }
11923
- | { readonly pattern: string; readonly type: "glob_pattern" }
11924
- | { readonly type: "special"; readonly value: V2CommandExecParams__FileSystemSpecialPath };
11925
-export const V2CommandExecParams__FileSystemPath = Schema.Union(
11926
- [
11927
- Schema.Struct({
11928
- path: V2CommandExecParams__AbsolutePathBuf,
11929
- type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }),
11930
- }).annotate({ title: "PathFileSystemPath" }),
11931
- Schema.Struct({
11932
- pattern: Schema.String,
11933
- type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }),
11934
- }).annotate({ title: "GlobPatternFileSystemPath" }),
11935
- Schema.Struct({
11936
- type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }),
11937
- value: V2CommandExecParams__FileSystemSpecialPath,
11938
- }).annotate({ title: "SpecialFileSystemPath" }),
11939
- ],
11940
- { mode: "oneOf" },
11941
-);
11942
-
12449
export type V2ConfigBatchWriteParams__ConfigEdit = {
12450
readonly keyPath: string;
12451
readonly mergeStrategy: V2ConfigBatchWriteParams__MergeStrategy;
@@ -11954,7 +12460,8 @@ export const V2ConfigBatchWriteParams__ConfigEdit = Schema.Struct({
12460
export type V2ConfigReadResponse__ConfigLayerSource =
12461
| { readonly domain: string; readonly key: string; readonly type: "mdm" }
12462
| { readonly file: string; readonly type: "system" }
11957
- | { readonly file: string; readonly type: "user" }
12463
+ | { readonly id: string; readonly name: string; readonly type: "enterpriseManaged" }
12464
+ | { readonly file: string; readonly profile?: string | null; readonly type: "user" }
12465
| { readonly dotCodexFolder: V2ConfigReadResponse__AbsolutePathBuf; readonly type: "project" }
12466
| { readonly type: "sessionFlags" }
12467
| {
@@ -11982,11 +12489,33 @@ export const V2ConfigReadResponse__ConfigLayerSource = Schema.Union(
12489
title: "SystemConfigLayerSource",
12490
description: "Managed config layer from a file (usually `managed_config.toml`).",
12491
}),
12492
+ Schema.Struct({
12493
+ id: Schema.String.annotate({ description: "Stable identifier for the delivered layer." }),
12494
+ name: Schema.String.annotate({
12495
+ description:
12496
+ "Admin-facing name for the delivered layer. This is surfaced in diagnostics so users know which cloud layer needs administrator attention.",
12497
+ }),
12498
+ type: Schema.Literal("enterpriseManaged").annotate({
12499
+ title: "EnterpriseManagedConfigLayerSourceType",
12500
+ }),
12501
+ }).annotate({
12502
+ title: "EnterpriseManagedConfigLayerSource",
12503
+ description: "Enterprise-managed config layer delivered by the cloud config bundle.",
12504
+ }),
12505
Schema.Struct({
12506
file: Schema.String.annotate({
12507
description:
12508
"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.",
12509
}),
12510
+ profile: Schema.optionalKey(
12511
+ Schema.Union([
12512
+ Schema.String.annotate({
12513
+ description:
12514
+ "Name of the selected profile-v2 config layered on top of the base user config, when this layer represents one.",
12515
+ }),
12516
+ Schema.Null,
12517
+ ]),
12518
+ ),
12519
type: Schema.Literal("user").annotate({ title: "UserConfigLayerSourceType" }),
12520
}).annotate({
12521
title: "UserConfigLayerSource",
@@ -12051,22 +12580,43 @@ export const V2ConfigRequirementsReadResponse__ConfiguredHookMatcherGroup = Sche
12580
});
12581
12582
export type V2ConfigRequirementsReadResponse__ConfigRequirements = {
12583
+ readonly allowAppshots?: boolean | null;
12584
+ readonly allowManagedHooksOnly?: boolean | null;
12585
readonly allowedApprovalPolicies?: ReadonlyArray<V2ConfigRequirementsReadResponse__AskForApproval> | null;
12586
+ readonly allowedPermissionProfiles?: { readonly [x: string]: boolean } | null;
12587
readonly allowedSandboxModes?: ReadonlyArray<V2ConfigRequirementsReadResponse__SandboxMode> | null;
12588
readonly allowedWebSearchModes?: ReadonlyArray<V2ConfigRequirementsReadResponse__WebSearchMode> | null;
12589
+ readonly allowedWindowsSandboxImplementations?: ReadonlyArray<V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode> | null;
12590
+ readonly computerUse?: V2ConfigRequirementsReadResponse__ComputerUseRequirements | null;
12591
+ readonly defaultPermissions?: string | null;
12592
readonly enforceResidency?: V2ConfigRequirementsReadResponse__ResidencyRequirement | null;
12593
readonly featureRequirements?: { readonly [x: string]: boolean } | null;
12594
};
12595
export const V2ConfigRequirementsReadResponse__ConfigRequirements = Schema.Struct({
12596
+ allowAppshots: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
12597
+ allowManagedHooksOnly: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
12598
allowedApprovalPolicies: Schema.optionalKey(
12599
Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__AskForApproval), Schema.Null]),
12600
),
12601
+ allowedPermissionProfiles: Schema.optionalKey(
12602
+ Schema.Union([Schema.Record(Schema.String, Schema.Boolean), Schema.Null]),
12603
+ ),
12604
allowedSandboxModes: Schema.optionalKey(
12605
Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__SandboxMode), Schema.Null]),
12606
),
12607
allowedWebSearchModes: Schema.optionalKey(
12608
Schema.Union([Schema.Array(V2ConfigRequirementsReadResponse__WebSearchMode), Schema.Null]),
12609
),
12610
+ allowedWindowsSandboxImplementations: Schema.optionalKey(
12611
+ Schema.Union([
12612
+ Schema.Array(V2ConfigRequirementsReadResponse__WindowsSandboxSetupMode),
12613
+ Schema.Null,
12614
+ ]),
12615
+ ),
12616
+ computerUse: Schema.optionalKey(
12617
+ Schema.Union([V2ConfigRequirementsReadResponse__ComputerUseRequirements, Schema.Null]),
12618
+ ),
12619
+ defaultPermissions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12620
enforceResidency: Schema.optionalKey(
12621
Schema.Union([V2ConfigRequirementsReadResponse__ResidencyRequirement, Schema.Null]),
12622
),
@@ -12087,7 +12637,8 @@ export const V2ConfigWarningNotification__TextRange = Schema.Struct({
12637
export type V2ConfigWriteResponse__ConfigLayerSource =
12638
| { readonly domain: string; readonly key: string; readonly type: "mdm" }
12639
| { readonly file: string; readonly type: "system" }
12090
- | { readonly file: string; readonly type: "user" }
12640
+ | { readonly id: string; readonly name: string; readonly type: "enterpriseManaged" }
12641
+ | { readonly file: string; readonly profile?: string | null; readonly type: "user" }
12642
| { readonly dotCodexFolder: V2ConfigWriteResponse__AbsolutePathBuf; readonly type: "project" }
12643
| { readonly type: "sessionFlags" }
12644
| {
@@ -12115,11 +12666,33 @@ export const V2ConfigWriteResponse__ConfigLayerSource = Schema.Union(
12666
title: "SystemConfigLayerSource",
12667
description: "Managed config layer from a file (usually `managed_config.toml`).",
12668
}),
12669
+ Schema.Struct({
12670
+ id: Schema.String.annotate({ description: "Stable identifier for the delivered layer." }),
12671
+ name: Schema.String.annotate({
12672
+ description:
12673
+ "Admin-facing name for the delivered layer. This is surfaced in diagnostics so users know which cloud layer needs administrator attention.",
12674
+ }),
12675
+ type: Schema.Literal("enterpriseManaged").annotate({
12676
+ title: "EnterpriseManagedConfigLayerSourceType",
12677
+ }),
12678
+ }).annotate({
12679
+ title: "EnterpriseManagedConfigLayerSource",
12680
+ description: "Enterprise-managed config layer delivered by the cloud config bundle.",
12681
+ }),
12682
Schema.Struct({
12683
file: Schema.String.annotate({
12684
description:
12685
"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.",
12686
}),
12687
+ profile: Schema.optionalKey(
12688
+ Schema.Union([
12689
+ Schema.String.annotate({
12690
+ description:
12691
+ "Name of the selected profile-v2 config layered on top of the base user config, when this layer represents one.",
12692
+ }),
12693
+ Schema.Null,
12694
+ ]),
12695
+ ),
12696
type: Schema.Literal("user").annotate({ title: "UserConfigLayerSourceType" }),
12697
}).annotate({
12698
title: "UserConfigLayerSource",
@@ -12338,6 +12911,7 @@ export const V2FileChangePatchUpdatedNotification__FileUpdateChange = Schema.Str
12911
12912
export type V2GetAccountRateLimitsResponse__RateLimitSnapshot = {
12913
readonly credits?: V2GetAccountRateLimitsResponse__CreditsSnapshot | null;
12914
+ readonly individualLimit?: V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot | null;
12915
readonly limitId?: string | null;
12916
readonly limitName?: string | null;
12917
readonly planType?: V2GetAccountRateLimitsResponse__PlanType | null;
@@ -12349,6 +12923,9 @@ export const V2GetAccountRateLimitsResponse__RateLimitSnapshot = Schema.Struct({
12923
credits: Schema.optionalKey(
12924
Schema.Union([V2GetAccountRateLimitsResponse__CreditsSnapshot, Schema.Null]),
12925
),
12926
+ individualLimit: Schema.optionalKey(
12927
+ Schema.Union([V2GetAccountRateLimitsResponse__SpendControlLimitSnapshot, Schema.Null]),
12928
+ ),
12929
limitId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12930
limitName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
12931
planType: Schema.optionalKey(
@@ -12522,8 +13099,16 @@ export type V2ItemCompletedNotification__UserInput =
13099
readonly text_elements?: ReadonlyArray<V2ItemCompletedNotification__TextElement>;
13100
readonly type: "text";
13101
}
12525
- | { readonly type: "image"; readonly url: string }
12526
- | { readonly path: string; readonly type: "localImage" }
13102
+ | {
13103
+ readonly detail?: V2ItemCompletedNotification__ImageDetail | null;
13104
+ readonly type: "image";
13105
+ readonly url: string;
13106
+ }
13107
+ | {
13108
+ readonly detail?: V2ItemCompletedNotification__ImageDetail | null;
13109
+ readonly path: string;
13110
+ readonly type: "localImage";
13111
+ }
13112
| { readonly name: string; readonly path: string; readonly type: "skill" }
13113
| { readonly name: string; readonly path: string; readonly type: "mention" };
13114
export const V2ItemCompletedNotification__UserInput = Schema.Union(
@@ -12539,10 +13124,16 @@ export const V2ItemCompletedNotification__UserInput = Schema.Union(
13124
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
13125
}).annotate({ title: "TextUserInput" }),
13126
Schema.Struct({
13127
+ detail: Schema.optionalKey(
13128
+ Schema.Union([V2ItemCompletedNotification__ImageDetail, Schema.Null]),
13129
+ ),
13130
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
13131
url: Schema.String,
13132
}).annotate({ title: "ImageUserInput" }),
13133
Schema.Struct({
13134
+ detail: Schema.optionalKey(
13135
+ Schema.Union([V2ItemCompletedNotification__ImageDetail, Schema.Null]),
13136
+ ),
13137
path: Schema.String,
13138
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
13139
}).annotate({ title: "LocalImageUserInput" }),
@@ -12747,8 +13338,16 @@ export type V2ItemStartedNotification__UserInput =
13338
readonly text_elements?: ReadonlyArray<V2ItemStartedNotification__TextElement>;
13339
readonly type: "text";
13340
}
12750
- | { readonly type: "image"; readonly url: string }
12751
- | { readonly path: string; readonly type: "localImage" }
13341
+ | {
13342
+ readonly detail?: V2ItemStartedNotification__ImageDetail | null;
13343
+ readonly type: "image";
13344
+ readonly url: string;
13345
+ }
13346
+ | {
13347
+ readonly detail?: V2ItemStartedNotification__ImageDetail | null;
13348
+ readonly path: string;
13349
+ readonly type: "localImage";
13350
+ }
13351
| { readonly name: string; readonly path: string; readonly type: "skill" }
13352
| { readonly name: string; readonly path: string; readonly type: "mention" };
13353
export const V2ItemStartedNotification__UserInput = Schema.Union(
@@ -12764,10 +13363,16 @@ export const V2ItemStartedNotification__UserInput = Schema.Union(
13363
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
13364
}).annotate({ title: "TextUserInput" }),
13365
Schema.Struct({
13366
+ detail: Schema.optionalKey(
13367
+ Schema.Union([V2ItemStartedNotification__ImageDetail, Schema.Null]),
13368
+ ),
13369
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
13370
url: Schema.String,
13371
}).annotate({ title: "ImageUserInput" }),
13372
Schema.Struct({
13373
+ detail: Schema.optionalKey(
13374
+ Schema.Union([V2ItemStartedNotification__ImageDetail, Schema.Null]),
13375
+ ),
13376
path: Schema.String,
13377
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
13378
}).annotate({ title: "LocalImageUserInput" }),
@@ -12790,6 +13395,7 @@ export type V2ListMcpServerStatusResponse__McpServerStatus = {
13395
readonly name: string;
13396
readonly resourceTemplates: ReadonlyArray<V2ListMcpServerStatusResponse__ResourceTemplate>;
13397
readonly resources: ReadonlyArray<V2ListMcpServerStatusResponse__Resource>;
13398
+ readonly serverInfo?: V2ListMcpServerStatusResponse__McpServerInfo | null;
13399
readonly tools: { readonly [x: string]: V2ListMcpServerStatusResponse__Tool };
13400
};
13401
export const V2ListMcpServerStatusResponse__McpServerStatus = Schema.Struct({
@@ -12797,6 +13403,9 @@ export const V2ListMcpServerStatusResponse__McpServerStatus = Schema.Struct({
13403
name: Schema.String,
13404
resourceTemplates: Schema.Array(V2ListMcpServerStatusResponse__ResourceTemplate),
13405
resources: Schema.Array(V2ListMcpServerStatusResponse__Resource),
13406
+ serverInfo: Schema.optionalKey(
13407
+ Schema.Union([V2ListMcpServerStatusResponse__McpServerInfo, Schema.Null]),
13408
+ ),
13409
tools: Schema.Record(Schema.String, V2ListMcpServerStatusResponse__Tool),
13410
});
13411
@@ -12809,40 +13418,40 @@ export const V2ModelListResponse__ReasoningEffortOption = Schema.Struct({
13418
reasoningEffort: V2ModelListResponse__ReasoningEffort,
13419
});
13420
12812
-export type V2PluginListResponse__MarketplaceLoadErrorInfo = {
12813
- readonly marketplacePath: V2PluginListResponse__AbsolutePathBuf;
13421
+export type V2PluginInstalledResponse__MarketplaceLoadErrorInfo = {
13422
+ readonly marketplacePath: V2PluginInstalledResponse__AbsolutePathBuf;
13423
readonly message: string;
13424
};
12816
-export const V2PluginListResponse__MarketplaceLoadErrorInfo = Schema.Struct({
12817
- marketplacePath: V2PluginListResponse__AbsolutePathBuf,
13425
+export const V2PluginInstalledResponse__MarketplaceLoadErrorInfo = Schema.Struct({
13426
+ marketplacePath: V2PluginInstalledResponse__AbsolutePathBuf,
13427
message: Schema.String,
13428
});
13429
12821
-export type V2PluginListResponse__PluginInterface = {
13430
+export type V2PluginInstalledResponse__PluginInterface = {
13431
readonly brandColor?: string | null;
13432
readonly capabilities: ReadonlyArray<string>;
13433
readonly category?: string | null;
12825
- readonly composerIcon?: V2PluginListResponse__AbsolutePathBuf | null;
13434
+ readonly composerIcon?: V2PluginInstalledResponse__AbsolutePathBuf | null;
13435
readonly composerIconUrl?: string | null;
13436
readonly defaultPrompt?: ReadonlyArray<string> | null;
13437
readonly developerName?: string | null;
13438
readonly displayName?: string | null;
12830
- readonly logo?: V2PluginListResponse__AbsolutePathBuf | null;
13439
+ readonly logo?: V2PluginInstalledResponse__AbsolutePathBuf | null;
13440
readonly logoUrl?: string | null;
13441
readonly longDescription?: string | null;
13442
readonly privacyPolicyUrl?: string | null;
13443
readonly screenshotUrls: ReadonlyArray<string>;
12835
- readonly screenshots: ReadonlyArray<V2PluginListResponse__AbsolutePathBuf>;
13444
+ readonly screenshots: ReadonlyArray<V2PluginInstalledResponse__AbsolutePathBuf>;
13445
readonly shortDescription?: string | null;
13446
readonly termsOfServiceUrl?: string | null;
13447
readonly websiteUrl?: string | null;
13448
};
12840
-export const V2PluginListResponse__PluginInterface = Schema.Struct({
13449
+export const V2PluginInstalledResponse__PluginInterface = Schema.Struct({
13450
brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13451
capabilities: Schema.Array(Schema.String),
13452
category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13453
composerIcon: Schema.optionalKey(
12845
- Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]).annotate({
13454
+ Schema.Union([V2PluginInstalledResponse__AbsolutePathBuf, Schema.Null]).annotate({
13455
description: "Local composer icon path, resolved from the installed plugin package.",
13456
}),
13457
),
@@ -12864,7 +13473,7 @@ export const V2PluginListResponse__PluginInterface = Schema.Struct({
13473
developerName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13474
displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13475
logo: Schema.optionalKey(
12867
- Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]).annotate({
13476
+ Schema.Union([V2PluginInstalledResponse__AbsolutePathBuf, Schema.Null]).annotate({
13477
description: "Local logo path, resolved from the installed plugin package.",
13478
}),
13479
),
@@ -12879,7 +13488,7 @@ export const V2PluginListResponse__PluginInterface = Schema.Struct({
13488
screenshotUrls: Schema.Array(Schema.String).annotate({
13489
description: "Remote screenshot URLs from the plugin catalog.",
13490
}),
12882
- screenshots: Schema.Array(V2PluginListResponse__AbsolutePathBuf).annotate({
13491
+ screenshots: Schema.Array(V2PluginInstalledResponse__AbsolutePathBuf).annotate({
13492
description: "Local screenshot paths, resolved from the installed plugin package.",
13493
}),
13494
shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
@@ -12887,8 +13496,8 @@ export const V2PluginListResponse__PluginInterface = Schema.Struct({
13496
websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13497
});
13498
12890
-export type V2PluginListResponse__PluginSource =
12891
- | { readonly path: V2PluginListResponse__AbsolutePathBuf; readonly type: "local" }
13499
+export type V2PluginInstalledResponse__PluginSource =
13500
+ | { readonly path: V2PluginInstalledResponse__AbsolutePathBuf; readonly type: "local" }
13501
| {
13502
readonly path?: string | null;
13503
readonly refName?: string | null;
@@ -12897,10 +13506,10 @@ export type V2PluginListResponse__PluginSource =
13506
readonly url: string;
13507
}
13508
| { readonly type: "remote" };
12900
-export const V2PluginListResponse__PluginSource = Schema.Union(
13509
+export const V2PluginInstalledResponse__PluginSource = Schema.Union(
13510
[
13511
Schema.Struct({
12903
- path: V2PluginListResponse__AbsolutePathBuf,
13512
+ path: V2PluginInstalledResponse__AbsolutePathBuf,
13513
type: Schema.Literal("local").annotate({ title: "LocalPluginSourceType" }),
13514
}).annotate({ title: "LocalPluginSource" }),
13515
Schema.Struct({
@@ -12921,42 +13530,53 @@ export const V2PluginListResponse__PluginSource = Schema.Union(
13530
{ mode: "oneOf" },
13531
);
13532
12924
-export type V2PluginListResponse__PluginSharePrincipal = {
13533
+export type V2PluginInstalledResponse__PluginSharePrincipal = {
13534
readonly name: string;
13535
readonly principalId: string;
12927
- readonly principalType: V2PluginListResponse__PluginSharePrincipalType;
13536
+ readonly principalType: V2PluginInstalledResponse__PluginSharePrincipalType;
13537
+ readonly role: V2PluginInstalledResponse__PluginSharePrincipalRole;
13538
};
12929
-export const V2PluginListResponse__PluginSharePrincipal = Schema.Struct({
13539
+export const V2PluginInstalledResponse__PluginSharePrincipal = Schema.Struct({
13540
name: Schema.String,
13541
principalId: Schema.String,
12932
- principalType: V2PluginListResponse__PluginSharePrincipalType,
13542
+ principalType: V2PluginInstalledResponse__PluginSharePrincipalType,
13543
+ role: V2PluginInstalledResponse__PluginSharePrincipalRole,
13544
});
13545
12935
-export type V2PluginReadResponse__PluginInterface = {
13546
+export type V2PluginListResponse__MarketplaceLoadErrorInfo = {
13547
+ readonly marketplacePath: V2PluginListResponse__AbsolutePathBuf;
13548
+ readonly message: string;
13549
+};
13550
+export const V2PluginListResponse__MarketplaceLoadErrorInfo = Schema.Struct({
13551
+ marketplacePath: V2PluginListResponse__AbsolutePathBuf,
13552
+ message: Schema.String,
13553
+});
13554
+
13555
+export type V2PluginListResponse__PluginInterface = {
13556
readonly brandColor?: string | null;
13557
readonly capabilities: ReadonlyArray<string>;
13558
readonly category?: string | null;
12939
- readonly composerIcon?: V2PluginReadResponse__AbsolutePathBuf | null;
13559
+ readonly composerIcon?: V2PluginListResponse__AbsolutePathBuf | null;
13560
readonly composerIconUrl?: string | null;
13561
readonly defaultPrompt?: ReadonlyArray<string> | null;
13562
readonly developerName?: string | null;
13563
readonly displayName?: string | null;
12944
- readonly logo?: V2PluginReadResponse__AbsolutePathBuf | null;
13564
+ readonly logo?: V2PluginListResponse__AbsolutePathBuf | null;
13565
readonly logoUrl?: string | null;
13566
readonly longDescription?: string | null;
13567
readonly privacyPolicyUrl?: string | null;
13568
readonly screenshotUrls: ReadonlyArray<string>;
12949
- readonly screenshots: ReadonlyArray<V2PluginReadResponse__AbsolutePathBuf>;
13569
+ readonly screenshots: ReadonlyArray<V2PluginListResponse__AbsolutePathBuf>;
13570
readonly shortDescription?: string | null;
13571
readonly termsOfServiceUrl?: string | null;
13572
readonly websiteUrl?: string | null;
13573
};
12954
-export const V2PluginReadResponse__PluginInterface = Schema.Struct({
13574
+export const V2PluginListResponse__PluginInterface = Schema.Struct({
13575
brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13576
capabilities: Schema.Array(Schema.String),
13577
category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13578
composerIcon: Schema.optionalKey(
12959
- Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null]).annotate({
13579
+ Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]).annotate({
13580
description: "Local composer icon path, resolved from the installed plugin package.",
13581
}),
13582
),
@@ -12978,7 +13598,7 @@ export const V2PluginReadResponse__PluginInterface = Schema.Struct({
13598
developerName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13599
displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13600
logo: Schema.optionalKey(
12981
- Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null]).annotate({
13601
+ Schema.Union([V2PluginListResponse__AbsolutePathBuf, Schema.Null]).annotate({
13602
description: "Local logo path, resolved from the installed plugin package.",
13603
}),
13604
),
@@ -12993,7 +13613,7 @@ export const V2PluginReadResponse__PluginInterface = Schema.Struct({
13613
screenshotUrls: Schema.Array(Schema.String).annotate({
13614
description: "Remote screenshot URLs from the plugin catalog.",
13615
}),
12996
- screenshots: Schema.Array(V2PluginReadResponse__AbsolutePathBuf).annotate({
13616
+ screenshots: Schema.Array(V2PluginListResponse__AbsolutePathBuf).annotate({
13617
description: "Local screenshot paths, resolved from the installed plugin package.",
13618
}),
13619
shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
@@ -13001,8 +13621,8 @@ export const V2PluginReadResponse__PluginInterface = Schema.Struct({
13621
websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13622
});
13623
13004
-export type V2PluginReadResponse__PluginSource =
13005
- | { readonly path: V2PluginReadResponse__AbsolutePathBuf; readonly type: "local" }
13624
+export type V2PluginListResponse__PluginSource =
13625
+ | { readonly path: V2PluginListResponse__AbsolutePathBuf; readonly type: "local" }
13626
| {
13627
readonly path?: string | null;
13628
readonly refName?: string | null;
@@ -13011,10 +13631,10 @@ export type V2PluginReadResponse__PluginSource =
13631
readonly url: string;
13632
}
13633
| { readonly type: "remote" };
13014
-export const V2PluginReadResponse__PluginSource = Schema.Union(
13634
+export const V2PluginListResponse__PluginSource = Schema.Union(
13635
[
13636
Schema.Struct({
13017
- path: V2PluginReadResponse__AbsolutePathBuf,
13637
+ path: V2PluginListResponse__AbsolutePathBuf,
13638
type: Schema.Literal("local").annotate({ title: "LocalPluginSourceType" }),
13639
}).annotate({ title: "LocalPluginSource" }),
13640
Schema.Struct({
@@ -13035,68 +13655,209 @@ export const V2PluginReadResponse__PluginSource = Schema.Union(
13655
{ mode: "oneOf" },
13656
);
13657
13038
-export type V2PluginReadResponse__SkillInterface = {
13039
- readonly brandColor?: string | null;
13040
- readonly defaultPrompt?: string | null;
13041
- readonly displayName?: string | null;
13042
- readonly iconLarge?: V2PluginReadResponse__AbsolutePathBuf | null;
13043
- readonly iconSmall?: V2PluginReadResponse__AbsolutePathBuf | null;
13044
- readonly shortDescription?: string | null;
13045
-};
13046
-export const V2PluginReadResponse__SkillInterface = Schema.Struct({
13047
- brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13048
- defaultPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13049
- displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13050
- iconLarge: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])),
13051
- iconSmall: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])),
13052
- shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13053
-});
13054
-
13055
-export type V2PluginReadResponse__PluginHookSummary = {
13056
- readonly eventName: V2PluginReadResponse__HookEventName;
13057
- readonly key: string;
13058
-};
13059
-export const V2PluginReadResponse__PluginHookSummary = Schema.Struct({
13060
- eventName: V2PluginReadResponse__HookEventName,
13061
- key: Schema.String,
13062
-});
13063
-
13064
-export type V2PluginReadResponse__PluginSharePrincipal = {
13658
+export type V2PluginListResponse__PluginSharePrincipal = {
13659
readonly name: string;
13660
readonly principalId: string;
13067
- readonly principalType: V2PluginReadResponse__PluginSharePrincipalType;
13661
+ readonly principalType: V2PluginListResponse__PluginSharePrincipalType;
13662
+ readonly role: V2PluginListResponse__PluginSharePrincipalRole;
13663
};
13069
-export const V2PluginReadResponse__PluginSharePrincipal = Schema.Struct({
13664
+export const V2PluginListResponse__PluginSharePrincipal = Schema.Struct({
13665
name: Schema.String,
13666
principalId: Schema.String,
13072
- principalType: V2PluginReadResponse__PluginSharePrincipalType,
13667
+ principalType: V2PluginListResponse__PluginSharePrincipalType,
13668
+ role: V2PluginListResponse__PluginSharePrincipalRole,
13669
});
13670
13075
-export type V2PluginShareListResponse__PluginInterface = {
13671
+export type V2PluginReadResponse__PluginInterface = {
13672
readonly brandColor?: string | null;
13673
readonly capabilities: ReadonlyArray<string>;
13674
readonly category?: string | null;
13079
- readonly composerIcon?: V2PluginShareListResponse__AbsolutePathBuf | null;
13675
+ readonly composerIcon?: V2PluginReadResponse__AbsolutePathBuf | null;
13676
readonly composerIconUrl?: string | null;
13677
readonly defaultPrompt?: ReadonlyArray<string> | null;
13678
readonly developerName?: string | null;
13679
readonly displayName?: string | null;
13084
- readonly logo?: V2PluginShareListResponse__AbsolutePathBuf | null;
13680
+ readonly logo?: V2PluginReadResponse__AbsolutePathBuf | null;
13681
readonly logoUrl?: string | null;
13682
readonly longDescription?: string | null;
13683
readonly privacyPolicyUrl?: string | null;
13684
readonly screenshotUrls: ReadonlyArray<string>;
13089
- readonly screenshots: ReadonlyArray<V2PluginShareListResponse__AbsolutePathBuf>;
13685
+ readonly screenshots: ReadonlyArray<V2PluginReadResponse__AbsolutePathBuf>;
13686
readonly shortDescription?: string | null;
13687
readonly termsOfServiceUrl?: string | null;
13688
readonly websiteUrl?: string | null;
13689
};
13094
-export const V2PluginShareListResponse__PluginInterface = Schema.Struct({
13690
+export const V2PluginReadResponse__PluginInterface = Schema.Struct({
13691
brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13692
capabilities: Schema.Array(Schema.String),
13693
category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13694
composerIcon: Schema.optionalKey(
13099
- Schema.Union([V2PluginShareListResponse__AbsolutePathBuf, Schema.Null]).annotate({
13695
+ Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null]).annotate({
13696
+ description: "Local composer icon path, resolved from the installed plugin package.",
13697
+ }),
13698
+ ),
13699
+ composerIconUrl: Schema.optionalKey(
13700
+ Schema.Union([
13701
+ Schema.String.annotate({ description: "Remote composer icon URL from the plugin catalog." }),
13702
+ Schema.Null,
13703
+ ]),
13704
+ ),
13705
+ defaultPrompt: Schema.optionalKey(
13706
+ Schema.Union([
13707
+ Schema.Array(Schema.String).annotate({
13708
+ description:
13709
+ "Starter prompts for the plugin. Capped at 3 entries with a maximum of 128 characters per entry.",
13710
+ }),
13711
+ Schema.Null,
13712
+ ]),
13713
+ ),
13714
+ developerName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13715
+ displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13716
+ logo: Schema.optionalKey(
13717
+ Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null]).annotate({
13718
+ description: "Local logo path, resolved from the installed plugin package.",
13719
+ }),
13720
+ ),
13721
+ logoUrl: Schema.optionalKey(
13722
+ Schema.Union([
13723
+ Schema.String.annotate({ description: "Remote logo URL from the plugin catalog." }),
13724
+ Schema.Null,
13725
+ ]),
13726
+ ),
13727
+ longDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13728
+ privacyPolicyUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13729
+ screenshotUrls: Schema.Array(Schema.String).annotate({
13730
+ description: "Remote screenshot URLs from the plugin catalog.",
13731
+ }),
13732
+ screenshots: Schema.Array(V2PluginReadResponse__AbsolutePathBuf).annotate({
13733
+ description: "Local screenshot paths, resolved from the installed plugin package.",
13734
+ }),
13735
+ shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13736
+ termsOfServiceUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13737
+ websiteUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13738
+});
13739
+
13740
+export type V2PluginReadResponse__PluginSource =
13741
+ | { readonly path: V2PluginReadResponse__AbsolutePathBuf; readonly type: "local" }
13742
+ | {
13743
+ readonly path?: string | null;
13744
+ readonly refName?: string | null;
13745
+ readonly sha?: string | null;
13746
+ readonly type: "git";
13747
+ readonly url: string;
13748
+ }
13749
+ | { readonly type: "remote" };
13750
+export const V2PluginReadResponse__PluginSource = Schema.Union(
13751
+ [
13752
+ Schema.Struct({
13753
+ path: V2PluginReadResponse__AbsolutePathBuf,
13754
+ type: Schema.Literal("local").annotate({ title: "LocalPluginSourceType" }),
13755
+ }).annotate({ title: "LocalPluginSource" }),
13756
+ Schema.Struct({
13757
+ path: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13758
+ refName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13759
+ sha: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13760
+ type: Schema.Literal("git").annotate({ title: "GitPluginSourceType" }),
13761
+ url: Schema.String,
13762
+ }).annotate({ title: "GitPluginSource" }),
13763
+ Schema.Struct({
13764
+ type: Schema.Literal("remote").annotate({ title: "RemotePluginSourceType" }),
13765
+ }).annotate({
13766
+ title: "RemotePluginSource",
13767
+ description:
13768
+ "The plugin is available in the remote catalog. Download metadata is kept server-side and is not exposed through the app-server API.",
13769
+ }),
13770
+ ],
13771
+ { mode: "oneOf" },
13772
+);
13773
+
13774
+export type V2PluginReadResponse__SkillInterface = {
13775
+ readonly brandColor?: string | null;
13776
+ readonly defaultPrompt?: string | null;
13777
+ readonly displayName?: string | null;
13778
+ readonly iconLarge?: V2PluginReadResponse__AbsolutePathBuf | null;
13779
+ readonly iconSmall?: V2PluginReadResponse__AbsolutePathBuf | null;
13780
+ readonly shortDescription?: string | null;
13781
+};
13782
+export const V2PluginReadResponse__SkillInterface = Schema.Struct({
13783
+ brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13784
+ defaultPrompt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13785
+ displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13786
+ iconLarge: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])),
13787
+ iconSmall: Schema.optionalKey(Schema.Union([V2PluginReadResponse__AbsolutePathBuf, Schema.Null])),
13788
+ shortDescription: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13789
+});
13790
+
13791
+export type V2PluginReadResponse__AppTemplateSummary = {
13792
+ readonly canonicalConnectorId?: string | null;
13793
+ readonly description?: string | null;
13794
+ readonly logoUrl?: string | null;
13795
+ readonly logoUrlDark?: string | null;
13796
+ readonly materializedAppIds: ReadonlyArray<string>;
13797
+ readonly name: string;
13798
+ readonly reason?: V2PluginReadResponse__AppTemplateUnavailableReason | null;
13799
+ readonly templateId: string;
13800
+};
13801
+export const V2PluginReadResponse__AppTemplateSummary = Schema.Struct({
13802
+ canonicalConnectorId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13803
+ description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13804
+ logoUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13805
+ logoUrlDark: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13806
+ materializedAppIds: Schema.Array(Schema.String),
13807
+ name: Schema.String,
13808
+ reason: Schema.optionalKey(
13809
+ Schema.Union([V2PluginReadResponse__AppTemplateUnavailableReason, Schema.Null]),
13810
+ ),
13811
+ templateId: Schema.String,
13812
+});
13813
+
13814
+export type V2PluginReadResponse__PluginHookSummary = {
13815
+ readonly eventName: V2PluginReadResponse__HookEventName;
13816
+ readonly key: string;
13817
+};
13818
+export const V2PluginReadResponse__PluginHookSummary = Schema.Struct({
13819
+ eventName: V2PluginReadResponse__HookEventName,
13820
+ key: Schema.String,
13821
+});
13822
+
13823
+export type V2PluginReadResponse__PluginSharePrincipal = {
13824
+ readonly name: string;
13825
+ readonly principalId: string;
13826
+ readonly principalType: V2PluginReadResponse__PluginSharePrincipalType;
13827
+ readonly role: V2PluginReadResponse__PluginSharePrincipalRole;
13828
+};
13829
+export const V2PluginReadResponse__PluginSharePrincipal = Schema.Struct({
13830
+ name: Schema.String,
13831
+ principalId: Schema.String,
13832
+ principalType: V2PluginReadResponse__PluginSharePrincipalType,
13833
+ role: V2PluginReadResponse__PluginSharePrincipalRole,
13834
+});
13835
+
13836
+export type V2PluginShareListResponse__PluginInterface = {
13837
+ readonly brandColor?: string | null;
13838
+ readonly capabilities: ReadonlyArray<string>;
13839
+ readonly category?: string | null;
13840
+ readonly composerIcon?: V2PluginShareListResponse__AbsolutePathBuf | null;
13841
+ readonly composerIconUrl?: string | null;
13842
+ readonly defaultPrompt?: ReadonlyArray<string> | null;
13843
+ readonly developerName?: string | null;
13844
+ readonly displayName?: string | null;
13845
+ readonly logo?: V2PluginShareListResponse__AbsolutePathBuf | null;
13846
+ readonly logoUrl?: string | null;
13847
+ readonly longDescription?: string | null;
13848
+ readonly privacyPolicyUrl?: string | null;
13849
+ readonly screenshotUrls: ReadonlyArray<string>;
13850
+ readonly screenshots: ReadonlyArray<V2PluginShareListResponse__AbsolutePathBuf>;
13851
+ readonly shortDescription?: string | null;
13852
+ readonly termsOfServiceUrl?: string | null;
13853
+ readonly websiteUrl?: string | null;
13854
+};
13855
+export const V2PluginShareListResponse__PluginInterface = Schema.Struct({
13856
+ brandColor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13857
+ capabilities: Schema.Array(Schema.String),
13858
+ category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
13859
+ composerIcon: Schema.optionalKey(
13860
+ Schema.Union([V2PluginShareListResponse__AbsolutePathBuf, Schema.Null]).annotate({
13861
description: "Local composer icon path, resolved from the installed plugin package.",
13862
}),
13863
),
@@ -13179,40 +13940,48 @@ export type V2PluginShareListResponse__PluginSharePrincipal = {
13940
readonly name: string;
13941
readonly principalId: string;
13942
readonly principalType: V2PluginShareListResponse__PluginSharePrincipalType;
13943
+ readonly role: V2PluginShareListResponse__PluginSharePrincipalRole;
13944
};
13945
export const V2PluginShareListResponse__PluginSharePrincipal = Schema.Struct({
13946
name: Schema.String,
13947
principalId: Schema.String,
13948
principalType: V2PluginShareListResponse__PluginSharePrincipalType,
13949
+ role: V2PluginShareListResponse__PluginSharePrincipalRole,
13950
});
13951
13952
export type V2PluginShareSaveParams__PluginShareTarget = {
13953
readonly principalId: string;
13954
readonly principalType: V2PluginShareSaveParams__PluginSharePrincipalType;
13955
+ readonly role: V2PluginShareSaveParams__PluginShareTargetRole;
13956
};
13957
export const V2PluginShareSaveParams__PluginShareTarget = Schema.Struct({
13958
principalId: Schema.String,
13959
principalType: V2PluginShareSaveParams__PluginSharePrincipalType,
13960
+ role: V2PluginShareSaveParams__PluginShareTargetRole,
13961
});
13962
13963
export type V2PluginShareUpdateTargetsParams__PluginShareTarget = {
13964
readonly principalId: string;
13965
readonly principalType: V2PluginShareUpdateTargetsParams__PluginSharePrincipalType;
13966
+ readonly role: V2PluginShareUpdateTargetsParams__PluginShareTargetRole;
13967
};
13968
export const V2PluginShareUpdateTargetsParams__PluginShareTarget = Schema.Struct({
13969
principalId: Schema.String,
13970
principalType: V2PluginShareUpdateTargetsParams__PluginSharePrincipalType,
13971
+ role: V2PluginShareUpdateTargetsParams__PluginShareTargetRole,
13972
});
13973
13974
export type V2PluginShareUpdateTargetsResponse__PluginSharePrincipal = {
13975
readonly name: string;
13976
readonly principalId: string;
13977
readonly principalType: V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType;
13978
+ readonly role: V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole;
13979
};
13980
export const V2PluginShareUpdateTargetsResponse__PluginSharePrincipal = Schema.Struct({
13981
name: Schema.String,
13982
principalId: Schema.String,
13983
principalType: V2PluginShareUpdateTargetsResponse__PluginSharePrincipalType,
13984
+ role: V2PluginShareUpdateTargetsResponse__PluginSharePrincipalRole,
13985
});
13986
13987
export type V2RawResponseItemCompletedNotification__ContentItem =
@@ -13250,7 +14019,8 @@ export type V2RawResponseItemCompletedNotification__FunctionCallOutputContentIte
14019
readonly detail?: V2RawResponseItemCompletedNotification__ImageDetail | null;
14020
readonly image_url: string;
14021
readonly type: "input_image";
13253
- };
14022
+ }
14023
+ | { readonly encrypted_content: string; readonly type: "encrypted_content" };
14024
export const V2RawResponseItemCompletedNotification__FunctionCallOutputContentItem = Schema.Union(
14025
[
14026
Schema.Struct({
@@ -13268,6 +14038,12 @@ export const V2RawResponseItemCompletedNotification__FunctionCallOutputContentIt
14038
title: "InputImageFunctionCallOutputContentItemType",
14039
}),
14040
}).annotate({ title: "InputImageFunctionCallOutputContentItem" }),
14041
+ Schema.Struct({
14042
+ encrypted_content: Schema.String,
14043
+ type: Schema.Literal("encrypted_content").annotate({
14044
+ title: "EncryptedContentFunctionCallOutputContentItemType",
14045
+ }),
14046
+ }).annotate({ title: "EncryptedContentFunctionCallOutputContentItem" }),
14047
],
14048
{ mode: "oneOf" },
14049
).annotate({
@@ -13460,8 +14236,16 @@ export type V2ReviewStartResponse__UserInput =
14236
readonly text_elements?: ReadonlyArray<V2ReviewStartResponse__TextElement>;
14237
readonly type: "text";
14238
}
13463
- | { readonly type: "image"; readonly url: string }
13464
- | { readonly path: string; readonly type: "localImage" }
14239
+ | {
14240
+ readonly detail?: V2ReviewStartResponse__ImageDetail | null;
14241
+ readonly type: "image";
14242
+ readonly url: string;
14243
+ }
14244
+ | {
14245
+ readonly detail?: V2ReviewStartResponse__ImageDetail | null;
14246
+ readonly path: string;
14247
+ readonly type: "localImage";
14248
+ }
14249
| { readonly name: string; readonly path: string; readonly type: "skill" }
14250
| { readonly name: string; readonly path: string; readonly type: "mention" };
14251
export const V2ReviewStartResponse__UserInput = Schema.Union(
@@ -13477,10 +14261,12 @@ export const V2ReviewStartResponse__UserInput = Schema.Union(
14261
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
14262
}).annotate({ title: "TextUserInput" }),
14263
Schema.Struct({
14264
+ detail: Schema.optionalKey(Schema.Union([V2ReviewStartResponse__ImageDetail, Schema.Null])),
14265
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
14266
url: Schema.String,
14267
}).annotate({ title: "ImageUserInput" }),
14268
Schema.Struct({
14269
+ detail: Schema.optionalKey(Schema.Union([V2ReviewStartResponse__ImageDetail, Schema.Null])),
14270
path: Schema.String,
14271
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
14272
}).annotate({ title: "LocalImageUserInput" }),
@@ -13522,44 +14308,6 @@ export const V2SkillsListResponse__SkillDependencies = Schema.Struct({
14308
tools: Schema.Array(V2SkillsListResponse__SkillToolDependency),
14309
});
14310
13525
-export type V2ThreadForkParams__PermissionProfileModificationParams = {
13526
- readonly path: V2ThreadForkParams__AbsolutePathBuf;
13527
- readonly type: "additionalWritableRoot";
13528
-};
13529
-export const V2ThreadForkParams__PermissionProfileModificationParams = Schema.Union(
13530
- [
13531
- Schema.Struct({
13532
- path: V2ThreadForkParams__AbsolutePathBuf,
13533
- type: Schema.Literal("additionalWritableRoot").annotate({
13534
- title: "AdditionalWritableRootPermissionProfileModificationParamsType",
13535
- }),
13536
- }).annotate({
13537
- title: "AdditionalWritableRootPermissionProfileModificationParams",
13538
- description: "Additional concrete directory that should be writable.",
13539
- }),
13540
- ],
13541
- { mode: "oneOf" },
13542
-);
13543
-
13544
-export type V2ThreadForkResponse__ActivePermissionProfileModification = {
13545
- readonly path: V2ThreadForkResponse__AbsolutePathBuf;
13546
- readonly type: "additionalWritableRoot";
13547
-};
13548
-export const V2ThreadForkResponse__ActivePermissionProfileModification = Schema.Union(
13549
- [
13550
- Schema.Struct({
13551
- path: V2ThreadForkResponse__AbsolutePathBuf,
13552
- type: Schema.Literal("additionalWritableRoot").annotate({
13553
- title: "AdditionalWritableRootActivePermissionProfileModificationType",
13554
- }),
13555
- }).annotate({
13556
- title: "AdditionalWritableRootActivePermissionProfileModification",
13557
- description: "Additional concrete directory that should be writable.",
13558
- }),
13559
- ],
13560
- { mode: "oneOf" },
13561
-);
13562
-
14311
export type V2ThreadForkResponse__CommandAction =
14312
| {
14313
readonly command: string;
@@ -13611,28 +14359,6 @@ export const V2ThreadForkResponse__CollabAgentState = Schema.Struct({
14359
status: V2ThreadForkResponse__CollabAgentStatus,
14360
});
14361
13614
-export type V2ThreadForkResponse__FileSystemPath =
13615
- | { readonly path: V2ThreadForkResponse__AbsolutePathBuf; readonly type: "path" }
13616
- | { readonly pattern: string; readonly type: "glob_pattern" }
13617
- | { readonly type: "special"; readonly value: V2ThreadForkResponse__FileSystemSpecialPath };
13618
-export const V2ThreadForkResponse__FileSystemPath = Schema.Union(
13619
- [
13620
- Schema.Struct({
13621
- path: V2ThreadForkResponse__AbsolutePathBuf,
13622
- type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }),
13623
- }).annotate({ title: "PathFileSystemPath" }),
13624
- Schema.Struct({
13625
- pattern: Schema.String,
13626
- type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }),
13627
- }).annotate({ title: "GlobPatternFileSystemPath" }),
13628
- Schema.Struct({
13629
- type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }),
13630
- value: V2ThreadForkResponse__FileSystemSpecialPath,
13631
- }).annotate({ title: "SpecialFileSystemPath" }),
13632
- ],
13633
- { mode: "oneOf" },
13634
-);
13635
-
14362
export type V2ThreadForkResponse__MemoryCitation = {
14363
readonly entries: ReadonlyArray<V2ThreadForkResponse__MemoryCitationEntry>;
14364
readonly threadIds: ReadonlyArray<string>;
@@ -13767,8 +14493,16 @@ export type V2ThreadForkResponse__UserInput =
14493
readonly text_elements?: ReadonlyArray<V2ThreadForkResponse__TextElement>;
14494
readonly type: "text";
14495
}
13770
- | { readonly type: "image"; readonly url: string }
13771
- | { readonly path: string; readonly type: "localImage" }
14496
+ | {
14497
+ readonly detail?: V2ThreadForkResponse__ImageDetail | null;
14498
+ readonly type: "image";
14499
+ readonly url: string;
14500
+ }
14501
+ | {
14502
+ readonly detail?: V2ThreadForkResponse__ImageDetail | null;
14503
+ readonly path: string;
14504
+ readonly type: "localImage";
14505
+ }
14506
| { readonly name: string; readonly path: string; readonly type: "skill" }
14507
| { readonly name: string; readonly path: string; readonly type: "mention" };
14508
export const V2ThreadForkResponse__UserInput = Schema.Union(
@@ -13784,10 +14518,12 @@ export const V2ThreadForkResponse__UserInput = Schema.Union(
14518
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
14519
}).annotate({ title: "TextUserInput" }),
14520
Schema.Struct({
14521
+ detail: Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ImageDetail, Schema.Null])),
14522
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
14523
url: Schema.String,
14524
}).annotate({ title: "ImageUserInput" }),
14525
Schema.Struct({
14526
+ detail: Schema.optionalKey(Schema.Union([V2ThreadForkResponse__ImageDetail, Schema.Null])),
14527
path: Schema.String,
14528
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
14529
}).annotate({ title: "LocalImageUserInput" }),
@@ -13838,6 +14574,52 @@ export const V2ThreadForkResponse__SubAgentSource = Schema.Union(
14574
{ mode: "oneOf" },
14575
);
14576
14577
+export type V2ThreadGoalGetResponse__ThreadGoal = {
14578
+ readonly createdAt: number;
14579
+ readonly objective: string;
14580
+ readonly status: V2ThreadGoalGetResponse__ThreadGoalStatus;
14581
+ readonly threadId: string;
14582
+ readonly timeUsedSeconds: number;
14583
+ readonly tokenBudget?: number | null;
14584
+ readonly tokensUsed: number;
14585
+ readonly updatedAt: number;
14586
+};
14587
+export const V2ThreadGoalGetResponse__ThreadGoal = Schema.Struct({
14588
+ createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
14589
+ objective: Schema.String,
14590
+ status: V2ThreadGoalGetResponse__ThreadGoalStatus,
14591
+ threadId: Schema.String,
14592
+ timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
14593
+ tokenBudget: Schema.optionalKey(
14594
+ Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
14595
+ ),
14596
+ tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
14597
+ updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
14598
+});
14599
+
14600
+export type V2ThreadGoalSetResponse__ThreadGoal = {
14601
+ readonly createdAt: number;
14602
+ readonly objective: string;
14603
+ readonly status: V2ThreadGoalSetResponse__ThreadGoalStatus;
14604
+ readonly threadId: string;
14605
+ readonly timeUsedSeconds: number;
14606
+ readonly tokenBudget?: number | null;
14607
+ readonly tokensUsed: number;
14608
+ readonly updatedAt: number;
14609
+};
14610
+export const V2ThreadGoalSetResponse__ThreadGoal = Schema.Struct({
14611
+ createdAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
14612
+ objective: Schema.String,
14613
+ status: V2ThreadGoalSetResponse__ThreadGoalStatus,
14614
+ threadId: Schema.String,
14615
+ timeUsedSeconds: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
14616
+ tokenBudget: Schema.optionalKey(
14617
+ Schema.Union([Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()), Schema.Null]),
14618
+ ),
14619
+ tokensUsed: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
14620
+ updatedAt: Schema.Number.annotate({ format: "int64" }).check(Schema.isInt()),
14621
+});
14622
+
14623
export type V2ThreadGoalUpdatedNotification__ThreadGoal = {
14624
readonly createdAt: number;
14625
readonly objective: string;
@@ -14046,8 +14828,16 @@ export type V2ThreadListResponse__UserInput =
14828
readonly text_elements?: ReadonlyArray<V2ThreadListResponse__TextElement>;
14829
readonly type: "text";
14830
}
14049
- | { readonly type: "image"; readonly url: string }
14050
- | { readonly path: string; readonly type: "localImage" }
14831
+ | {
14832
+ readonly detail?: V2ThreadListResponse__ImageDetail | null;
14833
+ readonly type: "image";
14834
+ readonly url: string;
14835
+ }
14836
+ | {
14837
+ readonly detail?: V2ThreadListResponse__ImageDetail | null;
14838
+ readonly path: string;
14839
+ readonly type: "localImage";
14840
+ }
14841
| { readonly name: string; readonly path: string; readonly type: "skill" }
14842
| { readonly name: string; readonly path: string; readonly type: "mention" };
14843
export const V2ThreadListResponse__UserInput = Schema.Union(
@@ -14063,10 +14853,12 @@ export const V2ThreadListResponse__UserInput = Schema.Union(
14853
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
14854
}).annotate({ title: "TextUserInput" }),
14855
Schema.Struct({
14856
+ detail: Schema.optionalKey(Schema.Union([V2ThreadListResponse__ImageDetail, Schema.Null])),
14857
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
14858
url: Schema.String,
14859
}).annotate({ title: "ImageUserInput" }),
14860
Schema.Struct({
14861
+ detail: Schema.optionalKey(Schema.Union([V2ThreadListResponse__ImageDetail, Schema.Null])),
14862
path: Schema.String,
14863
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
14864
}).annotate({ title: "LocalImageUserInput" }),
@@ -14302,8 +15094,16 @@ export type V2ThreadMetadataUpdateResponse__UserInput =
15094
readonly text_elements?: ReadonlyArray<V2ThreadMetadataUpdateResponse__TextElement>;
15095
readonly type: "text";
15096
}
14305
- | { readonly type: "image"; readonly url: string }
14306
- | { readonly path: string; readonly type: "localImage" }
15097
+ | {
15098
+ readonly detail?: V2ThreadMetadataUpdateResponse__ImageDetail | null;
15099
+ readonly type: "image";
15100
+ readonly url: string;
15101
+ }
15102
+ | {
15103
+ readonly detail?: V2ThreadMetadataUpdateResponse__ImageDetail | null;
15104
+ readonly path: string;
15105
+ readonly type: "localImage";
15106
+ }
15107
| { readonly name: string; readonly path: string; readonly type: "skill" }
15108
| { readonly name: string; readonly path: string; readonly type: "mention" };
15109
export const V2ThreadMetadataUpdateResponse__UserInput = Schema.Union(
@@ -14319,10 +15119,16 @@ export const V2ThreadMetadataUpdateResponse__UserInput = Schema.Union(
15119
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
15120
}).annotate({ title: "TextUserInput" }),
15121
Schema.Struct({
15122
+ detail: Schema.optionalKey(
15123
+ Schema.Union([V2ThreadMetadataUpdateResponse__ImageDetail, Schema.Null]),
15124
+ ),
15125
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
15126
url: Schema.String,
15127
}).annotate({ title: "ImageUserInput" }),
15128
Schema.Struct({
15129
+ detail: Schema.optionalKey(
15130
+ Schema.Union([V2ThreadMetadataUpdateResponse__ImageDetail, Schema.Null]),
15131
+ ),
15132
path: Schema.String,
15133
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
15134
}).annotate({ title: "LocalImageUserInput" }),
@@ -14558,8 +15364,16 @@ export type V2ThreadReadResponse__UserInput =
15364
readonly text_elements?: ReadonlyArray<V2ThreadReadResponse__TextElement>;
15365
readonly type: "text";
15366
}
14561
- | { readonly type: "image"; readonly url: string }
14562
- | { readonly path: string; readonly type: "localImage" }
15367
+ | {
15368
+ readonly detail?: V2ThreadReadResponse__ImageDetail | null;
15369
+ readonly type: "image";
15370
+ readonly url: string;
15371
+ }
15372
+ | {
15373
+ readonly detail?: V2ThreadReadResponse__ImageDetail | null;
15374
+ readonly path: string;
15375
+ readonly type: "localImage";
15376
+ }
15377
| { readonly name: string; readonly path: string; readonly type: "skill" }
15378
| { readonly name: string; readonly path: string; readonly type: "mention" };
15379
export const V2ThreadReadResponse__UserInput = Schema.Union(
@@ -14575,10 +15389,12 @@ export const V2ThreadReadResponse__UserInput = Schema.Union(
15389
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
15390
}).annotate({ title: "TextUserInput" }),
15391
Schema.Struct({
15392
+ detail: Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ImageDetail, Schema.Null])),
15393
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
15394
url: Schema.String,
15395
}).annotate({ title: "ImageUserInput" }),
15396
Schema.Struct({
15397
+ detail: Schema.optionalKey(Schema.Union([V2ThreadReadResponse__ImageDetail, Schema.Null])),
15398
path: Schema.String,
15399
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
15400
}).annotate({ title: "LocalImageUserInput" }),
@@ -14629,25 +15445,6 @@ export const V2ThreadReadResponse__SubAgentSource = Schema.Union(
15445
{ mode: "oneOf" },
15446
);
15447
14632
-export type V2ThreadResumeParams__PermissionProfileModificationParams = {
14633
- readonly path: V2ThreadResumeParams__AbsolutePathBuf;
14634
- readonly type: "additionalWritableRoot";
14635
-};
14636
-export const V2ThreadResumeParams__PermissionProfileModificationParams = Schema.Union(
14637
- [
14638
- Schema.Struct({
14639
- path: V2ThreadResumeParams__AbsolutePathBuf,
14640
- type: Schema.Literal("additionalWritableRoot").annotate({
14641
- title: "AdditionalWritableRootPermissionProfileModificationParamsType",
14642
- }),
14643
- }).annotate({
14644
- title: "AdditionalWritableRootPermissionProfileModificationParams",
14645
- description: "Additional concrete directory that should be writable.",
14646
- }),
14647
- ],
14648
- { mode: "oneOf" },
14649
-);
14650
-
15448
export type V2ThreadResumeParams__ContentItem =
15449
| { readonly text: string; readonly type: "input_text" }
15450
| {
@@ -14681,7 +15478,8 @@ export type V2ThreadResumeParams__FunctionCallOutputContentItem =
15478
readonly detail?: V2ThreadResumeParams__ImageDetail | null;
15479
readonly image_url: string;
15480
readonly type: "input_image";
14684
- };
15481
+ }
15482
+ | { readonly encrypted_content: string; readonly type: "encrypted_content" };
15483
export const V2ThreadResumeParams__FunctionCallOutputContentItem = Schema.Union(
15484
[
15485
Schema.Struct({
@@ -14697,6 +15495,12 @@ export const V2ThreadResumeParams__FunctionCallOutputContentItem = Schema.Union(
15495
title: "InputImageFunctionCallOutputContentItemType",
15496
}),
15497
}).annotate({ title: "InputImageFunctionCallOutputContentItem" }),
15498
+ Schema.Struct({
15499
+ encrypted_content: Schema.String,
15500
+ type: Schema.Literal("encrypted_content").annotate({
15501
+ title: "EncryptedContentFunctionCallOutputContentItemType",
15502
+ }),
15503
+ }).annotate({ title: "EncryptedContentFunctionCallOutputContentItem" }),
15504
],
15505
{ mode: "oneOf" },
15506
).annotate({
@@ -14704,25 +15508,6 @@ export const V2ThreadResumeParams__FunctionCallOutputContentItem = Schema.Union(
15508
"Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs.",
15509
});
15510
14707
-export type V2ThreadResumeResponse__ActivePermissionProfileModification = {
14708
- readonly path: V2ThreadResumeResponse__AbsolutePathBuf;
14709
- readonly type: "additionalWritableRoot";
14710
-};
14711
-export const V2ThreadResumeResponse__ActivePermissionProfileModification = Schema.Union(
14712
- [
14713
- Schema.Struct({
14714
- path: V2ThreadResumeResponse__AbsolutePathBuf,
14715
- type: Schema.Literal("additionalWritableRoot").annotate({
14716
- title: "AdditionalWritableRootActivePermissionProfileModificationType",
14717
- }),
14718
- }).annotate({
14719
- title: "AdditionalWritableRootActivePermissionProfileModification",
14720
- description: "Additional concrete directory that should be writable.",
14721
- }),
14722
- ],
14723
- { mode: "oneOf" },
14724
-);
14725
-
15511
export type V2ThreadResumeResponse__CommandAction =
15512
| {
15513
readonly command: string;
@@ -14774,28 +15559,6 @@ export const V2ThreadResumeResponse__CollabAgentState = Schema.Struct({
15559
status: V2ThreadResumeResponse__CollabAgentStatus,
15560
});
15561
14777
-export type V2ThreadResumeResponse__FileSystemPath =
14778
- | { readonly path: V2ThreadResumeResponse__AbsolutePathBuf; readonly type: "path" }
14779
- | { readonly pattern: string; readonly type: "glob_pattern" }
14780
- | { readonly type: "special"; readonly value: V2ThreadResumeResponse__FileSystemSpecialPath };
14781
-export const V2ThreadResumeResponse__FileSystemPath = Schema.Union(
14782
- [
14783
- Schema.Struct({
14784
- path: V2ThreadResumeResponse__AbsolutePathBuf,
14785
- type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }),
14786
- }).annotate({ title: "PathFileSystemPath" }),
14787
- Schema.Struct({
14788
- pattern: Schema.String,
14789
- type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }),
14790
- }).annotate({ title: "GlobPatternFileSystemPath" }),
14791
- Schema.Struct({
14792
- type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }),
14793
- value: V2ThreadResumeResponse__FileSystemSpecialPath,
14794
- }).annotate({ title: "SpecialFileSystemPath" }),
14795
- ],
14796
- { mode: "oneOf" },
14797
-);
14798
-
15562
export type V2ThreadResumeResponse__MemoryCitation = {
15563
readonly entries: ReadonlyArray<V2ThreadResumeResponse__MemoryCitationEntry>;
15564
readonly threadIds: ReadonlyArray<string>;
@@ -14930,8 +15693,16 @@ export type V2ThreadResumeResponse__UserInput =
15693
readonly text_elements?: ReadonlyArray<V2ThreadResumeResponse__TextElement>;
15694
readonly type: "text";
15695
}
14933
- | { readonly type: "image"; readonly url: string }
14934
- | { readonly path: string; readonly type: "localImage" }
15696
+ | {
15697
+ readonly detail?: V2ThreadResumeResponse__ImageDetail | null;
15698
+ readonly type: "image";
15699
+ readonly url: string;
15700
+ }
15701
+ | {
15702
+ readonly detail?: V2ThreadResumeResponse__ImageDetail | null;
15703
+ readonly path: string;
15704
+ readonly type: "localImage";
15705
+ }
15706
| { readonly name: string; readonly path: string; readonly type: "skill" }
15707
| { readonly name: string; readonly path: string; readonly type: "mention" };
15708
export const V2ThreadResumeResponse__UserInput = Schema.Union(
@@ -14947,10 +15718,12 @@ export const V2ThreadResumeResponse__UserInput = Schema.Union(
15718
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
15719
}).annotate({ title: "TextUserInput" }),
15720
Schema.Struct({
15721
+ detail: Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ImageDetail, Schema.Null])),
15722
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
15723
url: Schema.String,
15724
}).annotate({ title: "ImageUserInput" }),
15725
Schema.Struct({
15726
+ detail: Schema.optionalKey(Schema.Union([V2ThreadResumeResponse__ImageDetail, Schema.Null])),
15727
path: Schema.String,
15728
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
15729
}).annotate({ title: "LocalImageUserInput" }),
@@ -15186,8 +15959,16 @@ export type V2ThreadRollbackResponse__UserInput =
15959
readonly text_elements?: ReadonlyArray<V2ThreadRollbackResponse__TextElement>;
15960
readonly type: "text";
15961
}
15189
- | { readonly type: "image"; readonly url: string }
15190
- | { readonly path: string; readonly type: "localImage" }
15962
+ | {
15963
+ readonly detail?: V2ThreadRollbackResponse__ImageDetail | null;
15964
+ readonly type: "image";
15965
+ readonly url: string;
15966
+ }
15967
+ | {
15968
+ readonly detail?: V2ThreadRollbackResponse__ImageDetail | null;
15969
+ readonly path: string;
15970
+ readonly type: "localImage";
15971
+ }
15972
| { readonly name: string; readonly path: string; readonly type: "skill" }
15973
| { readonly name: string; readonly path: string; readonly type: "mention" };
15974
export const V2ThreadRollbackResponse__UserInput = Schema.Union(
@@ -15203,10 +15984,16 @@ export const V2ThreadRollbackResponse__UserInput = Schema.Union(
15984
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
15985
}).annotate({ title: "TextUserInput" }),
15986
Schema.Struct({
15987
+ detail: Schema.optionalKey(
15988
+ Schema.Union([V2ThreadRollbackResponse__ImageDetail, Schema.Null]),
15989
+ ),
15990
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
15991
url: Schema.String,
15992
}).annotate({ title: "ImageUserInput" }),
15993
Schema.Struct({
15994
+ detail: Schema.optionalKey(
15995
+ Schema.Union([V2ThreadRollbackResponse__ImageDetail, Schema.Null]),
15996
+ ),
15997
path: Schema.String,
15998
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
15999
}).annotate({ title: "LocalImageUserInput" }),
@@ -15257,6 +16044,64 @@ export const V2ThreadRollbackResponse__SubAgentSource = Schema.Union(
16044
{ mode: "oneOf" },
16045
);
16046
16047
+export type V2ThreadSettingsUpdatedNotification__SandboxPolicy =
16048
+ | { readonly type: "dangerFullAccess" }
16049
+ | { readonly networkAccess?: boolean; readonly type: "readOnly" }
16050
+ | { readonly networkAccess?: "restricted" | "enabled"; readonly type: "externalSandbox" }
16051
+ | {
16052
+ readonly excludeSlashTmp?: boolean;
16053
+ readonly excludeTmpdirEnvVar?: boolean;
16054
+ readonly networkAccess?: boolean;
16055
+ readonly type: "workspaceWrite";
16056
+ readonly writableRoots?: ReadonlyArray<V2ThreadSettingsUpdatedNotification__AbsolutePathBuf>;
16057
+ };
16058
+export const V2ThreadSettingsUpdatedNotification__SandboxPolicy = Schema.Union(
16059
+ [
16060
+ Schema.Struct({
16061
+ type: Schema.Literal("dangerFullAccess").annotate({
16062
+ title: "DangerFullAccessSandboxPolicyType",
16063
+ }),
16064
+ }).annotate({ title: "DangerFullAccessSandboxPolicy" }),
16065
+ Schema.Struct({
16066
+ networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
16067
+ type: Schema.Literal("readOnly").annotate({ title: "ReadOnlySandboxPolicyType" }),
16068
+ }).annotate({ title: "ReadOnlySandboxPolicy" }),
16069
+ Schema.Struct({
16070
+ networkAccess: Schema.optionalKey(
16071
+ Schema.Literals(["restricted", "enabled"]).annotate({ default: "restricted" }),
16072
+ ),
16073
+ type: Schema.Literal("externalSandbox").annotate({
16074
+ title: "ExternalSandboxSandboxPolicyType",
16075
+ }),
16076
+ }).annotate({ title: "ExternalSandboxSandboxPolicy" }),
16077
+ Schema.Struct({
16078
+ excludeSlashTmp: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
16079
+ excludeTmpdirEnvVar: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
16080
+ networkAccess: Schema.optionalKey(Schema.Boolean.annotate({ default: false })),
16081
+ type: Schema.Literal("workspaceWrite").annotate({ title: "WorkspaceWriteSandboxPolicyType" }),
16082
+ writableRoots: Schema.optionalKey(
16083
+ Schema.Array(V2ThreadSettingsUpdatedNotification__AbsolutePathBuf).annotate({
16084
+ default: [],
16085
+ }),
16086
+ ),
16087
+ }).annotate({ title: "WorkspaceWriteSandboxPolicy" }),
16088
+ ],
16089
+ { mode: "oneOf" },
16090
+);
16091
+
16092
+export type V2ThreadSettingsUpdatedNotification__Settings = {
16093
+ readonly developer_instructions?: string | null;
16094
+ readonly model: string;
16095
+ readonly reasoning_effort?: V2ThreadSettingsUpdatedNotification__ReasoningEffort | null;
16096
+};
16097
+export const V2ThreadSettingsUpdatedNotification__Settings = Schema.Struct({
16098
+ developer_instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
16099
+ model: Schema.String,
16100
+ reasoning_effort: Schema.optionalKey(
16101
+ Schema.Union([V2ThreadSettingsUpdatedNotification__ReasoningEffort, Schema.Null]),
16102
+ ),
16103
+}).annotate({ description: "Settings for a collaboration mode." });
16104
+
16105
export type V2ThreadStartedNotification__CommandAction =
16106
| {
16107
readonly command: string;
@@ -15442,8 +16287,16 @@ export type V2ThreadStartedNotification__UserInput =
16287
readonly text_elements?: ReadonlyArray<V2ThreadStartedNotification__TextElement>;
16288
readonly type: "text";
16289
}
15445
- | { readonly type: "image"; readonly url: string }
15446
- | { readonly path: string; readonly type: "localImage" }
16290
+ | {
16291
+ readonly detail?: V2ThreadStartedNotification__ImageDetail | null;
16292
+ readonly type: "image";
16293
+ readonly url: string;
16294
+ }
16295
+ | {
16296
+ readonly detail?: V2ThreadStartedNotification__ImageDetail | null;
16297
+ readonly path: string;
16298
+ readonly type: "localImage";
16299
+ }
16300
| { readonly name: string; readonly path: string; readonly type: "skill" }
16301
| { readonly name: string; readonly path: string; readonly type: "mention" };
16302
export const V2ThreadStartedNotification__UserInput = Schema.Union(
@@ -15459,10 +16312,16 @@ export const V2ThreadStartedNotification__UserInput = Schema.Union(
16312
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
16313
}).annotate({ title: "TextUserInput" }),
16314
Schema.Struct({
16315
+ detail: Schema.optionalKey(
16316
+ Schema.Union([V2ThreadStartedNotification__ImageDetail, Schema.Null]),
16317
+ ),
16318
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
16319
url: Schema.String,
16320
}).annotate({ title: "ImageUserInput" }),
16321
Schema.Struct({
16322
+ detail: Schema.optionalKey(
16323
+ Schema.Union([V2ThreadStartedNotification__ImageDetail, Schema.Null]),
16324
+ ),
16325
path: Schema.String,
16326
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
16327
}).annotate({ title: "LocalImageUserInput" }),
@@ -15513,44 +16372,6 @@ export const V2ThreadStartedNotification__SubAgentSource = Schema.Union(
16372
{ mode: "oneOf" },
16373
);
16374
15516
-export type V2ThreadStartParams__PermissionProfileModificationParams = {
15517
- readonly path: V2ThreadStartParams__AbsolutePathBuf;
15518
- readonly type: "additionalWritableRoot";
15519
-};
15520
-export const V2ThreadStartParams__PermissionProfileModificationParams = Schema.Union(
15521
- [
15522
- Schema.Struct({
15523
- path: V2ThreadStartParams__AbsolutePathBuf,
15524
- type: Schema.Literal("additionalWritableRoot").annotate({
15525
- title: "AdditionalWritableRootPermissionProfileModificationParamsType",
15526
- }),
15527
- }).annotate({
15528
- title: "AdditionalWritableRootPermissionProfileModificationParams",
15529
- description: "Additional concrete directory that should be writable.",
15530
- }),
15531
- ],
15532
- { mode: "oneOf" },
15533
-);
15534
-
15535
-export type V2ThreadStartResponse__ActivePermissionProfileModification = {
15536
- readonly path: V2ThreadStartResponse__AbsolutePathBuf;
15537
- readonly type: "additionalWritableRoot";
15538
-};
15539
-export const V2ThreadStartResponse__ActivePermissionProfileModification = Schema.Union(
15540
- [
15541
- Schema.Struct({
15542
- path: V2ThreadStartResponse__AbsolutePathBuf,
15543
- type: Schema.Literal("additionalWritableRoot").annotate({
15544
- title: "AdditionalWritableRootActivePermissionProfileModificationType",
15545
- }),
15546
- }).annotate({
15547
- title: "AdditionalWritableRootActivePermissionProfileModification",
15548
- description: "Additional concrete directory that should be writable.",
15549
- }),
15550
- ],
15551
- { mode: "oneOf" },
15552
-);
15553
-
16375
export type V2ThreadStartResponse__CommandAction =
16376
| {
16377
readonly command: string;
@@ -15602,28 +16423,6 @@ export const V2ThreadStartResponse__CollabAgentState = Schema.Struct({
16423
status: V2ThreadStartResponse__CollabAgentStatus,
16424
});
16425
15605
-export type V2ThreadStartResponse__FileSystemPath =
15606
- | { readonly path: V2ThreadStartResponse__AbsolutePathBuf; readonly type: "path" }
15607
- | { readonly pattern: string; readonly type: "glob_pattern" }
15608
- | { readonly type: "special"; readonly value: V2ThreadStartResponse__FileSystemSpecialPath };
15609
-export const V2ThreadStartResponse__FileSystemPath = Schema.Union(
15610
- [
15611
- Schema.Struct({
15612
- path: V2ThreadStartResponse__AbsolutePathBuf,
15613
- type: Schema.Literal("path").annotate({ title: "PathFileSystemPathType" }),
15614
- }).annotate({ title: "PathFileSystemPath" }),
15615
- Schema.Struct({
15616
- pattern: Schema.String,
15617
- type: Schema.Literal("glob_pattern").annotate({ title: "GlobPatternFileSystemPathType" }),
15618
- }).annotate({ title: "GlobPatternFileSystemPath" }),
15619
- Schema.Struct({
15620
- type: Schema.Literal("special").annotate({ title: "SpecialFileSystemPathType" }),
15621
- value: V2ThreadStartResponse__FileSystemSpecialPath,
15622
- }).annotate({ title: "SpecialFileSystemPath" }),
15623
- ],
15624
- { mode: "oneOf" },
15625
-);
15626
-
16426
export type V2ThreadStartResponse__MemoryCitation = {
16427
readonly entries: ReadonlyArray<V2ThreadStartResponse__MemoryCitationEntry>;
16428
readonly threadIds: ReadonlyArray<string>;
@@ -15758,8 +16557,16 @@ export type V2ThreadStartResponse__UserInput =
16557
readonly text_elements?: ReadonlyArray<V2ThreadStartResponse__TextElement>;
16558
readonly type: "text";
16559
}
15761
- | { readonly type: "image"; readonly url: string }
15762
- | { readonly path: string; readonly type: "localImage" }
16560
+ | {
16561
+ readonly detail?: V2ThreadStartResponse__ImageDetail | null;
16562
+ readonly type: "image";
16563
+ readonly url: string;
16564
+ }
16565
+ | {
16566
+ readonly detail?: V2ThreadStartResponse__ImageDetail | null;
16567
+ readonly path: string;
16568
+ readonly type: "localImage";
16569
+ }
16570
| { readonly name: string; readonly path: string; readonly type: "skill" }
16571
| { readonly name: string; readonly path: string; readonly type: "mention" };
16572
export const V2ThreadStartResponse__UserInput = Schema.Union(
@@ -15775,10 +16582,12 @@ export const V2ThreadStartResponse__UserInput = Schema.Union(
16582
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
16583
}).annotate({ title: "TextUserInput" }),
16584
Schema.Struct({
16585
+ detail: Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ImageDetail, Schema.Null])),
16586
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
16587
url: Schema.String,
16588
}).annotate({ title: "ImageUserInput" }),
16589
Schema.Struct({
16590
+ detail: Schema.optionalKey(Schema.Union([V2ThreadStartResponse__ImageDetail, Schema.Null])),
16591
path: Schema.String,
16592
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
16593
}).annotate({ title: "LocalImageUserInput" }),
@@ -16054,8 +16863,16 @@ export type V2ThreadUnarchiveResponse__UserInput =
16863
readonly text_elements?: ReadonlyArray<V2ThreadUnarchiveResponse__TextElement>;
16864
readonly type: "text";
16865
}
16057
- | { readonly type: "image"; readonly url: string }
16058
- | { readonly path: string; readonly type: "localImage" }
16866
+ | {
16867
+ readonly detail?: V2ThreadUnarchiveResponse__ImageDetail | null;
16868
+ readonly type: "image";
16869
+ readonly url: string;
16870
+ }
16871
+ | {
16872
+ readonly detail?: V2ThreadUnarchiveResponse__ImageDetail | null;
16873
+ readonly path: string;
16874
+ readonly type: "localImage";
16875
+ }
16876
| { readonly name: string; readonly path: string; readonly type: "skill" }
16877
| { readonly name: string; readonly path: string; readonly type: "mention" };
16878
export const V2ThreadUnarchiveResponse__UserInput = Schema.Union(
@@ -16071,10 +16888,16 @@ export const V2ThreadUnarchiveResponse__UserInput = Schema.Union(
16888
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
16889
}).annotate({ title: "TextUserInput" }),
16890
Schema.Struct({
16891
+ detail: Schema.optionalKey(
16892
+ Schema.Union([V2ThreadUnarchiveResponse__ImageDetail, Schema.Null]),
16893
+ ),
16894
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
16895
url: Schema.String,
16896
}).annotate({ title: "ImageUserInput" }),
16897
Schema.Struct({
16898
+ detail: Schema.optionalKey(
16899
+ Schema.Union([V2ThreadUnarchiveResponse__ImageDetail, Schema.Null]),
16900
+ ),
16901
path: Schema.String,
16902
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
16903
}).annotate({ title: "LocalImageUserInput" }),
@@ -16310,8 +17133,16 @@ export type V2TurnCompletedNotification__UserInput =
17133
readonly text_elements?: ReadonlyArray<V2TurnCompletedNotification__TextElement>;
17134
readonly type: "text";
17135
}
16313
- | { readonly type: "image"; readonly url: string }
16314
- | { readonly path: string; readonly type: "localImage" }
17136
+ | {
17137
+ readonly detail?: V2TurnCompletedNotification__ImageDetail | null;
17138
+ readonly type: "image";
17139
+ readonly url: string;
17140
+ }
17141
+ | {
17142
+ readonly detail?: V2TurnCompletedNotification__ImageDetail | null;
17143
+ readonly path: string;
17144
+ readonly type: "localImage";
17145
+ }
17146
| { readonly name: string; readonly path: string; readonly type: "skill" }
17147
| { readonly name: string; readonly path: string; readonly type: "mention" };
17148
export const V2TurnCompletedNotification__UserInput = Schema.Union(
@@ -16327,10 +17158,16 @@ export const V2TurnCompletedNotification__UserInput = Schema.Union(
17158
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
17159
}).annotate({ title: "TextUserInput" }),
17160
Schema.Struct({
17161
+ detail: Schema.optionalKey(
17162
+ Schema.Union([V2TurnCompletedNotification__ImageDetail, Schema.Null]),
17163
+ ),
17164
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
17165
url: Schema.String,
17166
}).annotate({ title: "ImageUserInput" }),
17167
Schema.Struct({
17168
+ detail: Schema.optionalKey(
17169
+ Schema.Union([V2TurnCompletedNotification__ImageDetail, Schema.Null]),
17170
+ ),
17171
path: Schema.String,
17172
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
17173
}).annotate({ title: "LocalImageUserInput" }),
@@ -16542,8 +17379,16 @@ export type V2TurnStartedNotification__UserInput =
17379
readonly text_elements?: ReadonlyArray<V2TurnStartedNotification__TextElement>;
17380
readonly type: "text";
17381
}
16545
- | { readonly type: "image"; readonly url: string }
16546
- | { readonly path: string; readonly type: "localImage" }
17382
+ | {
17383
+ readonly detail?: V2TurnStartedNotification__ImageDetail | null;
17384
+ readonly type: "image";
17385
+ readonly url: string;
17386
+ }
17387
+ | {
17388
+ readonly detail?: V2TurnStartedNotification__ImageDetail | null;
17389
+ readonly path: string;
17390
+ readonly type: "localImage";
17391
+ }
17392
| { readonly name: string; readonly path: string; readonly type: "skill" }
17393
| { readonly name: string; readonly path: string; readonly type: "mention" };
17394
export const V2TurnStartedNotification__UserInput = Schema.Union(
@@ -16559,10 +17404,16 @@ export const V2TurnStartedNotification__UserInput = Schema.Union(
17404
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
17405
}).annotate({ title: "TextUserInput" }),
17406
Schema.Struct({
17407
+ detail: Schema.optionalKey(
17408
+ Schema.Union([V2TurnStartedNotification__ImageDetail, Schema.Null]),
17409
+ ),
17410
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
17411
url: Schema.String,
17412
}).annotate({ title: "ImageUserInput" }),
17413
Schema.Struct({
17414
+ detail: Schema.optionalKey(
17415
+ Schema.Union([V2TurnStartedNotification__ImageDetail, Schema.Null]),
17416
+ ),
17417
path: Schema.String,
17418
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
17419
}).annotate({ title: "LocalImageUserInput" }),
@@ -16580,25 +17431,6 @@ export const V2TurnStartedNotification__UserInput = Schema.Union(
17431
{ mode: "oneOf" },
17432
);
17433
16583
-export type V2TurnStartParams__PermissionProfileModificationParams = {
16584
- readonly path: V2TurnStartParams__AbsolutePathBuf;
16585
- readonly type: "additionalWritableRoot";
16586
-};
16587
-export const V2TurnStartParams__PermissionProfileModificationParams = Schema.Union(
16588
- [
16589
- Schema.Struct({
16590
- path: V2TurnStartParams__AbsolutePathBuf,
16591
- type: Schema.Literal("additionalWritableRoot").annotate({
16592
- title: "AdditionalWritableRootPermissionProfileModificationParamsType",
16593
- }),
16594
- }).annotate({
16595
- title: "AdditionalWritableRootPermissionProfileModificationParams",
16596
- description: "Additional concrete directory that should be writable.",
16597
- }),
16598
- ],
16599
- { mode: "oneOf" },
16600
-);
16601
-
17434
export type V2TurnStartParams__SandboxPolicy =
17435
| { readonly type: "dangerFullAccess" }
17436
| { readonly networkAccess?: boolean; readonly type: "readOnly" }
@@ -16661,8 +17493,16 @@ export type V2TurnStartParams__UserInput =
17493
readonly text_elements?: ReadonlyArray<V2TurnStartParams__TextElement>;
17494
readonly type: "text";
17495
}
16664
- | { readonly type: "image"; readonly url: string }
16665
- | { readonly path: string; readonly type: "localImage" }
17496
+ | {
17497
+ readonly detail?: V2TurnStartParams__ImageDetail | null;
17498
+ readonly type: "image";
17499
+ readonly url: string;
17500
+ }
17501
+ | {
17502
+ readonly detail?: V2TurnStartParams__ImageDetail | null;
17503
+ readonly path: string;
17504
+ readonly type: "localImage";
17505
+ }
17506
| { readonly name: string; readonly path: string; readonly type: "skill" }
17507
| { readonly name: string; readonly path: string; readonly type: "mention" };
17508
export const V2TurnStartParams__UserInput = Schema.Union(
@@ -16678,10 +17518,12 @@ export const V2TurnStartParams__UserInput = Schema.Union(
17518
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
17519
}).annotate({ title: "TextUserInput" }),
17520
Schema.Struct({
17521
+ detail: Schema.optionalKey(Schema.Union([V2TurnStartParams__ImageDetail, Schema.Null])),
17522
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
17523
url: Schema.String,
17524
}).annotate({ title: "ImageUserInput" }),
17525
Schema.Struct({
17526
+ detail: Schema.optionalKey(Schema.Union([V2TurnStartParams__ImageDetail, Schema.Null])),
17527
path: Schema.String,
17528
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
17529
}).annotate({ title: "LocalImageUserInput" }),
@@ -16884,8 +17726,16 @@ export type V2TurnStartResponse__UserInput =
17726
readonly text_elements?: ReadonlyArray<V2TurnStartResponse__TextElement>;
17727
readonly type: "text";
17728
}
16887
- | { readonly type: "image"; readonly url: string }
16888
- | { readonly path: string; readonly type: "localImage" }
17729
+ | {
17730
+ readonly detail?: V2TurnStartResponse__ImageDetail | null;
17731
+ readonly type: "image";
17732
+ readonly url: string;
17733
+ }
17734
+ | {
17735
+ readonly detail?: V2TurnStartResponse__ImageDetail | null;
17736
+ readonly path: string;
17737
+ readonly type: "localImage";
17738
+ }
17739
| { readonly name: string; readonly path: string; readonly type: "skill" }
17740
| { readonly name: string; readonly path: string; readonly type: "mention" };
17741
export const V2TurnStartResponse__UserInput = Schema.Union(
@@ -16901,10 +17751,12 @@ export const V2TurnStartResponse__UserInput = Schema.Union(
17751
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
17752
}).annotate({ title: "TextUserInput" }),
17753
Schema.Struct({
17754
+ detail: Schema.optionalKey(Schema.Union([V2TurnStartResponse__ImageDetail, Schema.Null])),
17755
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
17756
url: Schema.String,
17757
}).annotate({ title: "ImageUserInput" }),
17758
Schema.Struct({
17759
+ detail: Schema.optionalKey(Schema.Union([V2TurnStartResponse__ImageDetail, Schema.Null])),
17760
path: Schema.String,
17761
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
17762
}).annotate({ title: "LocalImageUserInput" }),
@@ -16928,8 +17780,16 @@ export type V2TurnSteerParams__UserInput =
17780
readonly text_elements?: ReadonlyArray<V2TurnSteerParams__TextElement>;
17781
readonly type: "text";
17782
}
16931
- | { readonly type: "image"; readonly url: string }
16932
- | { readonly path: string; readonly type: "localImage" }
17783
+ | {
17784
+ readonly detail?: V2TurnSteerParams__ImageDetail | null;
17785
+ readonly type: "image";
17786
+ readonly url: string;
17787
+ }
17788
+ | {
17789
+ readonly detail?: V2TurnSteerParams__ImageDetail | null;
17790
+ readonly path: string;
17791
+ readonly type: "localImage";
17792
+ }
17793
| { readonly name: string; readonly path: string; readonly type: "skill" }
17794
| { readonly name: string; readonly path: string; readonly type: "mention" };
17795
export const V2TurnSteerParams__UserInput = Schema.Union(
@@ -16945,10 +17805,12 @@ export const V2TurnSteerParams__UserInput = Schema.Union(
17805
type: Schema.Literal("text").annotate({ title: "TextUserInputType" }),
17806
}).annotate({ title: "TextUserInput" }),
17807
Schema.Struct({
17808
+ detail: Schema.optionalKey(Schema.Union([V2TurnSteerParams__ImageDetail, Schema.Null])),
17809
type: Schema.Literal("image").annotate({ title: "ImageUserInputType" }),
17810
url: Schema.String,
17811
}).annotate({ title: "ImageUserInput" }),
17812
Schema.Struct({
17813
+ detail: Schema.optionalKey(Schema.Union([V2TurnSteerParams__ImageDetail, Schema.Null])),
17814
path: Schema.String,
17815
type: Schema.Literal("localImage").annotate({ title: "LocalImageUserInputType" }),
17816
}).annotate({ title: "LocalImageUserInput" }),
@@ -17136,15 +17998,6 @@ export const ClientRequest__CommandExecParams = Schema.Struct({
17998
"Run a standalone command (argv vector) in the server sandbox without creating a thread or turn.\n\nThe final `command/exec` response is deferred until the process exits and is sent only after all `command/exec/outputDelta` notifications for that connection have been emitted.",
17999
});
18000
17139
-export type ClientRequest__FileSystemSandboxEntry = {
This file is too large to show in full.
packages/effect-codex-app-server/src/client.test.ts
+37
@@ -152,4 +152,41 @@ it.layer(NodeServices.layer)("effect-codex-app-server client", (it) => {
152
assert.equal(initialized.userAgent, "mock-codex-app-server");
153
}),
154
);
155
+
156
+ it.effect("drains command stderr so large diagnostics cannot block protocol responses", () =>
157
+ Effect.gen(function* () {
158
+ const path = yield* Path.Path;
159
+ const scope = yield* Scope.make();
160
+ const clientLayer = CodexClient.layerCommand({
161
+ command: "node",
162
+ args: mockPeerArgs(yield* mockPeerPath),
163
+ cwd: path.join(import.meta.dirname, ".."),
164
+ env: {
165
+ CODEX_APP_SERVER_TEST_STDERR_BYTES: String(512 * 1024),
166
+ },
167
+ });
168
+ const context = yield* Layer.buildWithScope(clientLayer, scope);
169
+
170
+ const initialized = yield* Effect.gen(function* () {
171
+ const client = yield* CodexClient.CodexAppServerClient;
172
+ return yield* client.request("initialize", {
173
+ clientInfo: {
174
+ name: "effect-codex-app-server-test",
175
+ title: "Effect Codex App Server Test",
176
+ version: "0.0.0",
177
+ },
178
+ capabilities: {
179
+ experimentalApi: true,
180
+ optOutNotificationMethods: null,
181
+ },
182
+ });
183
+ }).pipe(
184
+ Effect.timeout("5 seconds"),
185
+ Effect.provide(context),
186
+ Effect.ensuring(Scope.close(scope, Exit.void)),
187
+ );
188
+
189
+ assert.equal(initialized.userAgent, "mock-codex-app-server");
190
+ }),
191
+ );
192
});
packages/effect-codex-app-server/src/client.ts
+11
-10
@@ -4,6 +4,7 @@ import * as Layer from "effect/Layer";
4
import * as Schema from "effect/Schema";
5
import * as Scope from "effect/Scope";
6
import * as Stdio from "effect/Stdio";
7
+import * as Stream from "effect/Stream";
8
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
9
10
import * as CodexRpc from "./_generated/meta.gen.ts";
@@ -253,11 +254,15 @@ export const make = Effect.fn("effect-codex-app-server/CodexAppServerClient.make
254
export const layerChildProcess = (
255
handle: ChildProcessSpawner.ChildProcessHandle,
256
options: CodexAppServerClientOptions = {},
256
-): Layer.Layer<CodexAppServerClient> => {
257
- const stdio = makeChildStdio(handle);
258
- const terminationError = makeTerminationError(handle);
259
- return Layer.effect(CodexAppServerClient, make(stdio, options, terminationError));
260
-};
257
+): Layer.Layer<CodexAppServerClient> =>
258
+ Layer.effect(CodexAppServerClient, makeChildProcessClient(handle, options));
259
+
260
+const makeChildProcessClient = Effect.fn(
261
+ "effect-codex-app-server/CodexAppServerClient.makeChildProcessClient",
262
+)(function* (handle: ChildProcessSpawner.ChildProcessHandle, options: CodexAppServerClientOptions) {
263
+ yield* Stream.runDrain(handle.stderr).pipe(Effect.ignore, Effect.forkScoped);
264
+ return yield* make(makeChildStdio(handle), options, makeTerminationError(handle));
265
+});
266
267
export interface CodexAppServerCommandLayerOptions extends CodexAppServerClientOptions {
268
readonly command: string;
@@ -292,9 +297,5 @@ export const layerCommand = (
297
}),
298
),
299
);
295
- }).pipe(
296
- Effect.flatMap((handle) =>
297
- make(makeChildStdio(handle), options, makeTerminationError(handle)),
298
- ),
299
- ),
300
+ }).pipe(Effect.flatMap((handle) => makeChildProcessClient(handle, options))),
301
);
packages/effect-codex-app-server/src/protocol.test.ts
+22
@@ -10,6 +10,8 @@ import { assert, it } from "@effect/vitest";
10
11
import * as CodexError from "./errors.ts";
12
import * as CodexProtocol from "./protocol.ts";
13
+import * as CodexRpc from "./rpc.ts";
14
+import * as CodexSchema from "./schema.ts";
15
import { makeInMemoryStdio } from "./_internal/stdio.ts";
16
const encodeUnknownJsonString = Schema.encodeUnknownSync(Schema.UnknownFromJsonString);
17
@@ -18,8 +20,28 @@ const encoder = new TextEncoder();
20
const encodeJsonl = (value: unknown) => encoder.encode(`${encodeUnknownJsonString(value)}\n`);
21
22
const decodeJson = Schema.decodeEffect(Schema.UnknownFromJsonString);
23
+const decodeAccountTokenUsageResponse = Schema.decodeUnknownEffect(
24
+ CodexRpc.CLIENT_REQUEST_RESPONSES["account/usage/read"],
25
+);
26
27
it.layer(NodeServices.layer)("effect-codex-app-server protocol", (it) => {
28
+ it.effect("maps account usage responses to the upstream token usage schema", () =>
29
+ Effect.gen(function* () {
30
+ assert.strictEqual(
31
+ CodexRpc.CLIENT_REQUEST_RESPONSES["account/usage/read"],
32
+ CodexSchema.V2GetAccountTokenUsageResponse,
33
+ );
34
+ const decoded = yield* decodeAccountTokenUsageResponse({
35
+ dailyUsageBuckets: [{ startDate: "2026-06-10", tokens: 42 }],
36
+ summary: { lifetimeTokens: 42 },
37
+ });
38
+ assert.deepEqual(decoded, {
39
+ dailyUsageBuckets: [{ startDate: "2026-06-10", tokens: 42 }],
40
+ summary: { lifetimeTokens: 42 },
41
+ });
42
+ }),
43
+ );
44
+
45
it.effect(
46
"encodes requests without a jsonrpc field and routes inbound requests and notifications",
47
() =>
packages/effect-codex-app-server/test/fixtures/codex-app-server-mock-peer.ts
+12
@@ -34,6 +34,18 @@ const handleMethod = (message: Record<string, unknown>) => {
34
35
switch (method) {
36
case "initialize": {
37
+ const stderrBytes = Number(process.env.CODEX_APP_SERVER_TEST_STDERR_BYTES ?? 0);
38
+ if (Number.isFinite(stderrBytes) && stderrBytes > 0) {
39
+ process.stderr.write("x".repeat(stderrBytes), () => {
40
+ respond(message.id as number | string, {
41
+ userAgent: "mock-codex-app-server",
42
+ codexHome: process.cwd(),
43
+ platformFamily: process.platform === "win32" ? "windows" : "unix",
44
+ platformOs: process.platform === "darwin" ? "macos" : process.platform,
45
+ });
46
+ });
47
+ return;
48
+ }
49
respond(message.id as number | string, {
50
userAgent: "mock-codex-app-server",
51
codexHome: process.cwd(),