@archboard/codex-realtime-voice 0.4.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -41
- package/dist/browser.d.mts +1 -3
- package/dist/browser.mjs +67 -66
- package/dist/{contract-DTEwX7x-.d.mts → contract-B2ILifH5.d.mts} +3 -3
- package/dist/{contract-qg6q9-vH.d.mts → contract-CkitFygd.d.mts} +97 -3054
- package/dist/{contract-Cupd2jDS.d.mts → contract-D9_WuSxD.d.mts} +3 -3
- package/dist/contract.d.mts +1 -1
- package/dist/controllers.d.mts +221 -6
- package/dist/controllers.mjs +6 -4
- package/dist/{gateway-envelope-Ch4BsYcK.d.mts → gateway-envelope-O67wCRD7.d.mts} +4 -3
- package/dist/{realtime-state-CTBmCjt1.mjs → gateway-envelope-jUP82Pq1.mjs} +71 -3
- package/dist/identity-capabilities-3Q_2tJiT.d.mts +147 -0
- package/dist/instructions-B-6HVmoD.mjs +1024 -0
- package/dist/{contract-CZDUvuVt.d.mts → instructions-C6TkBWcp.d.mts} +14 -984
- package/dist/{model-YHUwnXnC.mjs → model-MSyAviwx.mjs} +1658 -78
- package/dist/react.d.mts +1 -1
- package/dist/{realtime-contract-wHmSyUIe.d.mts → realtime-contract-C-1bMn-F.d.mts} +1 -22
- package/dist/realtime.d.mts +2 -3
- package/dist/realtime.mjs +1 -3
- package/dist/runtime.d.mts +3 -18
- package/dist/runtime.mjs +2 -2
- package/dist/schemas.d.mts +3 -13
- package/dist/schemas.mjs +1 -1
- package/dist/server.d.mts +1082 -252
- package/dist/server.mjs +18278 -9849
- package/dist/{snapshot-BCrCORmt.d.mts → snapshot-DCl2vsJl.d.mts} +9 -154
- package/dist/{transport-CqOvXrAE.mjs → transport-DVUz3EK0.mjs} +17 -13
- package/package.json +2 -2
- package/dist/app-server-contract-D4E5bibD.mjs +0 -177
- package/dist/gateway-envelope-CODkg5rz.mjs +0 -43
- package/dist/instructions-CmBJHqpa.mjs +0 -8980
- package/dist/media-state-CakgDCk4.d.mts +0 -215
- package/dist/realtime-contract-DwkCluo2.mjs +0 -1167
- package/dist/realtime-state-DT4uvrIV.d.mts +0 -16
package/dist/server.d.mts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { i as
|
|
4
|
-
import { f as
|
|
5
|
-
import { a as
|
|
1
|
+
import { S as SessionThreadSource, _ as TransportServerNotification, a as ApprovalSettlement, b as SessionResponse, d as CodexSession, f as SessionNotificationHandler, g as DynamicServerRequest, h as CodexTransport, i as VoiceAgentIdentity, l as ThreadLinkReason$1, m as codexSessionThreadSource, n as WorkbenchInstructions, o as CodexApprovalBroker, p as SessionParams, t as WorkbenchDynamicTools, v as TransportServerRequest, x as SessionThread, y as SessionQueuedSubmission } from "./instructions-C6TkBWcp.mjs";
|
|
2
|
+
import { _ as RealtimeSessionId, c as BrowserCommandId, d as DynamicToolCallId, g as QueuedSubmissionId, h as OperationId, i as LogicalToolCallCorrelation, l as ChildEpoch, p as JsonRpcRequestId, s as ApprovalId, t as IdentityAuthorities, u as ChildId, v as ThreadId, y as TurnId } from "./identity-capabilities-3Q_2tJiT.mjs";
|
|
3
|
+
import { i as CodexThreadStatusType } from "./contract-CkitFygd.mjs";
|
|
4
|
+
import { f as DeliveryOutcome, g as BrowserDynamicApprovalResponse, m as BrowserDynamicApproval, n as BrowserCommand, p as VoiceNarrative, r as BrowserCommandLease, s as BrowserSnapshot } from "./snapshot-DCl2vsJl.mjs";
|
|
5
|
+
import { a as RealtimeCorrelationId, c as RealtimeSemanticEvent, f as RealtimeTranscriptRecord, i as RealtimeCorrelation, l as RealtimeServer, o as RealtimeItemId, r as CreateOfferSdp, t as AnswerSdp, u as RealtimeSessionId$1 } from "./realtime-contract-C-1bMn-F.mjs";
|
|
6
|
+
import { a as BrowserGatewaySnapshotMessage, i as BrowserGatewayMessage, n as BrowserGatewayCommandResult, t as BrowserGatewayAccountReadResult } from "./gateway-envelope-O67wCRD7.mjs";
|
|
6
7
|
import { z } from "zod";
|
|
7
8
|
import fs from "node:fs";
|
|
8
|
-
import { Server } from "node:http";
|
|
9
9
|
import { execFileSync } from "node:child_process";
|
|
10
|
+
import { Server } from "node:http";
|
|
10
11
|
type CodexAmbientEnvironment = Readonly<Record<string, string | undefined>>;
|
|
11
12
|
type CodexChildEnvironment = Readonly<Record<string, string>>;
|
|
12
13
|
interface CodexChildEnvironmentInput {
|
|
@@ -21,7 +22,7 @@ interface CodexChildEnvironmentInput {
|
|
|
21
22
|
/** Absolute directories that lead the resulting PATH, in the supplied order. */
|
|
22
23
|
readonly pathPrefixes?: readonly string[] | undefined;
|
|
23
24
|
}
|
|
24
|
-
/** Which Codex executable
|
|
25
|
+
/** Which Codex executable to find and prove. */
|
|
25
26
|
interface CodexExecutableOptions {
|
|
26
27
|
/** An absolute path to prove in place of the installed `@openai/codex` package. */
|
|
27
28
|
readonly executablePath?: string;
|
|
@@ -79,221 +80,983 @@ interface CodexProcessOptions extends Pick<CodexChildEnvironmentInput, "hostEnvi
|
|
|
79
80
|
/** Secrets supplied by a caller are redacted before process diagnostics are retained. */
|
|
80
81
|
readonly diagnosticSecrets?: readonly string[];
|
|
81
82
|
}
|
|
82
|
-
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
readonly
|
|
86
|
-
readonly response: CodexResponseByMethod["account/read"];
|
|
83
|
+
/** Domain snapshots arrive as complete replacements. The host owns their wording and meaning. */
|
|
84
|
+
interface WorkbenchContextSource {
|
|
85
|
+
readonly read: () => string;
|
|
86
|
+
readonly subscribe: (onChange: () => void, onError: (error: Error) => void) => () => void;
|
|
87
87
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
readonly
|
|
88
|
+
/** Speakable input is distinct from quiet application context. Neither grants execution authority. */
|
|
89
|
+
interface WorkbenchVoiceInput {
|
|
90
|
+
readonly text: string;
|
|
91
|
+
readonly channel: "speech" | "context";
|
|
92
|
+
}
|
|
93
|
+
/** How voice starts for a narrative, or for an ordinary session with null. */
|
|
94
|
+
interface WorkbenchVoicePolicy<Narrative = unknown> {
|
|
95
|
+
readonly start: (narrative: Narrative | null) => {
|
|
96
|
+
readonly prompt: string;
|
|
97
|
+
readonly suppressCoordinatorSpeech: boolean;
|
|
98
|
+
readonly delegationAckFiller: boolean;
|
|
99
|
+
};
|
|
100
|
+
readonly subscribe?: (narrative: Narrative | null, listener: (input: WorkbenchVoiceInput) => void) => () => void;
|
|
101
|
+
}
|
|
102
|
+
declare const CODEX_EPOCH_MANIFEST_SCHEMA: 1;
|
|
103
|
+
declare const EPOCH_OPERATION_STATUSES: readonly ["staged", "committed", "rolled_back", "inspect_only"];
|
|
104
|
+
declare const EPOCH_OPERATION_OUTCOMES: readonly ["pending", "delivered", "not_delivered", "outcome_unknown"];
|
|
105
|
+
type EpochOperationStatus = (typeof EPOCH_OPERATION_STATUSES)[number];
|
|
106
|
+
type EpochOperationOutcome = (typeof EPOCH_OPERATION_OUTCOMES)[number];
|
|
107
|
+
interface EpochOperationCorrelation {
|
|
108
|
+
readonly childId: ChildId;
|
|
109
|
+
readonly epoch: ChildEpoch;
|
|
110
|
+
readonly operationId: string;
|
|
96
111
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
* The queue port sets a submission's `clientUserMessageId` to the serialized
|
|
102
|
-
* OperationId on every add it makes, so the composition root can recover the
|
|
103
|
-
* operation from the authoritative list and hand it over here. A null operation
|
|
104
|
-
* is a submission this workbench did not queue, and this chat has no authority to
|
|
105
|
-
* reorder it.
|
|
106
|
-
*/
|
|
107
|
-
interface CodexQueuedSubmissionProjectionInput extends Pick<SessionQueuedSubmission, "id" | "input"> {
|
|
108
|
-
readonly operationId: OperationId | null;
|
|
112
|
+
interface EpochOperationDescriptor {
|
|
113
|
+
readonly id: string;
|
|
114
|
+
readonly kind: string;
|
|
115
|
+
readonly rpc: string | null;
|
|
109
116
|
}
|
|
110
|
-
interface
|
|
111
|
-
readonly
|
|
112
|
-
readonly
|
|
117
|
+
interface EpochProvenance {
|
|
118
|
+
readonly childId: ChildId;
|
|
119
|
+
readonly epoch: ChildEpoch;
|
|
120
|
+
readonly threadId: ThreadId | null;
|
|
121
|
+
readonly turnId: TurnId | null;
|
|
122
|
+
readonly threadSource: string | null;
|
|
123
|
+
readonly workspaceRoot: string;
|
|
124
|
+
readonly instructionHash: string;
|
|
125
|
+
readonly manifestHash: string;
|
|
126
|
+
readonly confirmedAtMs: number | null;
|
|
127
|
+
}
|
|
128
|
+
interface EpochOperationRecord {
|
|
129
|
+
readonly correlation: EpochOperationCorrelation;
|
|
130
|
+
readonly operation: EpochOperationDescriptor;
|
|
131
|
+
readonly status: EpochOperationStatus;
|
|
132
|
+
readonly outcome: EpochOperationOutcome;
|
|
133
|
+
readonly provenance: EpochProvenance;
|
|
134
|
+
readonly reason: string | null;
|
|
135
|
+
readonly createdAtMs: number;
|
|
136
|
+
readonly updatedAtMs: number;
|
|
113
137
|
}
|
|
114
|
-
|
|
115
|
-
readonly
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
interface CodexTimelineUserMessageProjectionInput extends Readonly<Record<string, unknown>> {
|
|
119
|
-
readonly kind: "user_message";
|
|
120
|
-
readonly item: TimelineSessionItem<"userMessage", "type" | "id">;
|
|
121
|
-
/** What the person said, bounded, with each non-text input named in brackets. */
|
|
122
|
-
readonly text: string;
|
|
138
|
+
interface ActiveEpoch {
|
|
139
|
+
readonly childId: ChildId;
|
|
140
|
+
readonly epoch: ChildEpoch;
|
|
141
|
+
readonly operationId: string;
|
|
123
142
|
}
|
|
124
|
-
interface
|
|
125
|
-
readonly
|
|
126
|
-
readonly
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
readonly arguments: string | null;
|
|
135
|
-
/** Why the call failed, when it reported a failure. */
|
|
136
|
-
readonly error: string | null;
|
|
137
|
-
}
|
|
138
|
-
interface CodexTimelineCommandProjectionInput extends Readonly<Record<string, unknown>> {
|
|
139
|
-
readonly kind: "command_execution";
|
|
140
|
-
readonly item: TimelineSessionItem<"commandExecution", "type" | "id" | "command" | "status" | "exitCode" | "durationMs">;
|
|
141
|
-
/** The working directory, bounded; null when Codex reported none. */
|
|
142
|
-
readonly cwd: string | null;
|
|
143
|
-
/** The bounded tail of the aggregated output, and whether anything before it was cut. */
|
|
144
|
-
readonly output: {
|
|
145
|
-
readonly tail: string | null;
|
|
146
|
-
readonly truncated: boolean;
|
|
143
|
+
interface EpochManifestPayload {
|
|
144
|
+
readonly schema: typeof CODEX_EPOCH_MANIFEST_SCHEMA;
|
|
145
|
+
readonly revision: number;
|
|
146
|
+
readonly activeEpoch: ActiveEpoch | null;
|
|
147
|
+
readonly records: readonly EpochOperationRecord[];
|
|
148
|
+
}
|
|
149
|
+
interface EpochManifest extends EpochManifestPayload {
|
|
150
|
+
readonly integrity: {
|
|
151
|
+
readonly algorithm: "sha256";
|
|
152
|
+
readonly digest: string;
|
|
147
153
|
};
|
|
148
154
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
readonly path: string;
|
|
153
|
-
readonly kind: CodexPatchChangeKind;
|
|
154
|
-
readonly movePath: string | null;
|
|
155
|
-
readonly added: number;
|
|
156
|
-
readonly removed: number;
|
|
157
|
-
}
|
|
158
|
-
interface CodexTimelineFileChangeProjectionInput extends Readonly<Record<string, unknown>> {
|
|
159
|
-
readonly kind: "file_change";
|
|
160
|
-
readonly item: TimelineSessionItem<"fileChange", "type" | "id" | "status">;
|
|
161
|
-
readonly changes: readonly CodexTimelineFileChangeEntry[];
|
|
162
|
-
readonly changesTruncated: boolean;
|
|
163
|
-
}
|
|
164
|
-
interface CodexTimelineWebSearchProjectionInput extends Readonly<Record<string, unknown>> {
|
|
165
|
-
readonly kind: "web_search";
|
|
166
|
-
readonly item: TimelineSessionItem<"webSearch", "type" | "id">;
|
|
167
|
-
/** The bounded query, or null while Codex has not said what it searched for. */
|
|
168
|
-
readonly query: string | null;
|
|
169
|
-
}
|
|
170
|
-
interface CodexTimelineCompactionProjectionInput extends Readonly<Record<string, unknown>> {
|
|
171
|
-
readonly kind: "context_compaction";
|
|
172
|
-
readonly item: TimelineSessionItem<"contextCompaction", "type" | "id">;
|
|
173
|
-
}
|
|
174
|
-
interface CodexTimelineReasoningProjectionInput extends Readonly<Record<string, unknown>> {
|
|
175
|
-
readonly kind: "reasoning_summary";
|
|
176
|
-
readonly item: TimelineSessionItem<"reasoning", "type" | "id">;
|
|
177
|
-
/** The future owner chooses the bounded reasoning presentation from generated arrays. */
|
|
178
|
-
readonly text: string;
|
|
155
|
+
interface EpochCasToken {
|
|
156
|
+
readonly revision: number;
|
|
157
|
+
readonly bytesHash: string | null;
|
|
179
158
|
}
|
|
180
|
-
interface
|
|
181
|
-
readonly
|
|
182
|
-
readonly
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
readonly
|
|
189
|
-
readonly
|
|
190
|
-
readonly
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
159
|
+
interface EpochSnapshot {
|
|
160
|
+
readonly manifest: EpochManifest;
|
|
161
|
+
readonly cas: EpochCasToken;
|
|
162
|
+
readonly manifestPath: string;
|
|
163
|
+
}
|
|
164
|
+
interface EpochStageInput {
|
|
165
|
+
readonly childId: ChildId;
|
|
166
|
+
readonly epoch: ChildEpoch;
|
|
167
|
+
readonly operationId: string;
|
|
168
|
+
readonly kind: string;
|
|
169
|
+
readonly rpc?: string | null;
|
|
170
|
+
readonly workspaceRoot: string;
|
|
171
|
+
readonly instructionHash: string;
|
|
172
|
+
readonly manifestHash: string;
|
|
173
|
+
readonly expected?: EpochCasToken;
|
|
174
|
+
}
|
|
175
|
+
interface EpochConfirmation {
|
|
176
|
+
readonly threadId?: ThreadId | null;
|
|
177
|
+
readonly turnId?: TurnId | null;
|
|
178
|
+
readonly threadSource?: string | null;
|
|
179
|
+
readonly confirmedAtMs?: number;
|
|
180
|
+
}
|
|
181
|
+
interface EpochTransaction {
|
|
182
|
+
readonly record: EpochOperationRecord;
|
|
183
|
+
readonly cas: EpochCasToken;
|
|
184
|
+
}
|
|
185
|
+
interface EpochExecutionRequest {
|
|
186
|
+
readonly childId: ChildId;
|
|
187
|
+
readonly epoch: ChildEpoch;
|
|
188
|
+
readonly operationId: string;
|
|
189
|
+
readonly threadId?: ThreadId | null;
|
|
190
|
+
}
|
|
191
|
+
interface EpochExecutionProof {
|
|
192
|
+
readonly record: EpochOperationRecord;
|
|
193
|
+
readonly manifestRevision: number;
|
|
194
|
+
}
|
|
195
|
+
interface CodexEpochStore {
|
|
196
|
+
readonly rootDirectory: string;
|
|
197
|
+
readonly manifestPath: string;
|
|
198
|
+
readonly snapshot: () => EpochSnapshot;
|
|
199
|
+
readonly stageEpoch: (input: EpochStageInput) => EpochTransaction;
|
|
200
|
+
readonly startEpoch: (input: EpochStageInput) => EpochOperationRecord;
|
|
201
|
+
readonly commitEpoch: (transaction: EpochTransaction, confirmation?: EpochConfirmation) => EpochOperationRecord;
|
|
202
|
+
readonly stageOperation: (input: EpochStageInput) => EpochTransaction;
|
|
203
|
+
readonly commitOperation: (transaction: EpochTransaction, confirmation?: EpochConfirmation) => EpochOperationRecord;
|
|
204
|
+
readonly rollbackOperation: (transaction: EpochTransaction, reason: string) => EpochOperationRecord;
|
|
205
|
+
readonly markOutcomeUnknown: (transaction: EpochTransaction, reason: string, confirmation?: EpochConfirmation) => EpochOperationRecord;
|
|
206
|
+
readonly confirmOutcome: (transaction: EpochTransaction, confirmation: EpochConfirmation) => EpochOperationRecord;
|
|
207
|
+
readonly assertCurrent: (request: EpochExecutionRequest) => EpochExecutionProof;
|
|
208
|
+
readonly canExecute: (request: EpochExecutionRequest) => boolean;
|
|
209
|
+
readonly close: () => void;
|
|
210
|
+
}
|
|
211
|
+
type ThreadLinkReason = ThreadLinkReason$1;
|
|
212
|
+
type ThreadLinkReasonCode = ThreadLinkReason;
|
|
213
|
+
type ThreadLinkStatus = SessionThread["status"]["type"];
|
|
214
|
+
type ThreadLinkSource = SessionThreadSource;
|
|
215
|
+
type ThreadLinkAllowedSource = Extract<ThreadLinkSource, "cli" | "vscode" | "exec" | "appServer">;
|
|
216
|
+
type ThreadLinkExecutableStatus = Exclude<ThreadLinkStatus, "notLoaded" | "systemError">;
|
|
217
|
+
type ThreadLinkCurrentEpoch = Pick<ActiveEpoch, "childId" | "epoch">;
|
|
218
|
+
/** A committed epoch record or a proof returned by `assertCurrent`. */
|
|
219
|
+
type ThreadLinkEpochProof = EpochOperationRecord | EpochExecutionProof;
|
|
220
|
+
/** The identity and durable ownership evidence captured by a thread link. */
|
|
221
|
+
interface ThreadLinkTarget {
|
|
222
|
+
readonly threadId: ThreadId;
|
|
223
|
+
readonly childId: ChildId | null;
|
|
224
|
+
readonly epoch: ChildEpoch | null;
|
|
225
|
+
readonly operationId?: string;
|
|
226
|
+
readonly provenance?: ThreadLinkEpochProof | null;
|
|
227
|
+
}
|
|
228
|
+
interface ThreadLinkObservation {
|
|
229
|
+
readonly persisted: boolean;
|
|
230
|
+
readonly persistedRows: number;
|
|
231
|
+
readonly loaded: boolean;
|
|
232
|
+
readonly loadedOccurrences: number;
|
|
233
|
+
readonly source: ThreadLinkSource;
|
|
234
|
+
readonly status: ThreadLinkStatus;
|
|
235
|
+
readonly canAcceptDirectInput: boolean | null;
|
|
236
|
+
}
|
|
237
|
+
interface ExecutableThreadLink {
|
|
238
|
+
readonly kind: "thread_link";
|
|
239
|
+
readonly state: "executable";
|
|
240
|
+
readonly childId: ChildId;
|
|
241
|
+
readonly epoch: ChildEpoch;
|
|
242
|
+
readonly threadId: ThreadId;
|
|
243
|
+
readonly source: ThreadLinkAllowedSource;
|
|
244
|
+
readonly status: ThreadLinkExecutableStatus;
|
|
245
|
+
readonly loaded: true;
|
|
246
|
+
readonly canAcceptDirectInput: true;
|
|
247
|
+
readonly reason: null;
|
|
248
|
+
}
|
|
249
|
+
interface InspectOnlyThreadLink {
|
|
250
|
+
readonly kind: "thread_link";
|
|
251
|
+
readonly state: "inspect_only";
|
|
252
|
+
readonly childId: null;
|
|
253
|
+
readonly epoch: null;
|
|
254
|
+
readonly threadId: ThreadId;
|
|
255
|
+
readonly source: ThreadLinkSource;
|
|
256
|
+
readonly status: ThreadLinkStatus;
|
|
257
|
+
readonly loaded: boolean;
|
|
258
|
+
/** False for every inspect-only link, including an observed null capability. */
|
|
259
|
+
readonly canAcceptDirectInput: false;
|
|
260
|
+
readonly reason: ThreadLinkReason;
|
|
261
|
+
}
|
|
262
|
+
type ThreadLink = ExecutableThreadLink | InspectOnlyThreadLink;
|
|
263
|
+
interface UnboundThreadLink {
|
|
264
|
+
readonly kind: "thread_link";
|
|
265
|
+
readonly state: "unbound";
|
|
266
|
+
readonly childId: null;
|
|
267
|
+
readonly epoch: null;
|
|
268
|
+
readonly threadId: null;
|
|
269
|
+
readonly source: null;
|
|
270
|
+
readonly status: "notLoaded";
|
|
271
|
+
readonly loaded: false;
|
|
272
|
+
readonly canAcceptDirectInput: false;
|
|
273
|
+
readonly reason: null;
|
|
274
|
+
}
|
|
275
|
+
type ThreadLinkSnapshot = ThreadLink | UnboundThreadLink;
|
|
276
|
+
interface ThreadLinkClassification {
|
|
277
|
+
readonly link: ThreadLink;
|
|
278
|
+
readonly thread: SessionThread | null;
|
|
279
|
+
readonly observation: ThreadLinkObservation;
|
|
280
|
+
readonly currentEpoch: ThreadLinkCurrentEpoch | null;
|
|
281
|
+
/** The matching proof read from the live durable epoch authority, if any. */
|
|
282
|
+
readonly proof: EpochExecutionProof | null;
|
|
283
|
+
}
|
|
284
|
+
interface ThreadLinkCasToken {
|
|
285
|
+
readonly revision: number;
|
|
286
|
+
readonly linkKey: string;
|
|
287
|
+
readonly childId: ChildId | null;
|
|
288
|
+
readonly epoch: ChildEpoch | null;
|
|
289
|
+
readonly threadId: ThreadId | null;
|
|
290
|
+
}
|
|
291
|
+
interface ThreadLinkBindingSnapshot {
|
|
292
|
+
readonly linkKey: string;
|
|
293
|
+
readonly revision: number;
|
|
294
|
+
readonly link: ThreadLinkSnapshot;
|
|
295
|
+
readonly cas: ThreadLinkCasToken;
|
|
296
|
+
}
|
|
297
|
+
/** Public CAS accepts only unbound or explicitly inspect-only links. */
|
|
298
|
+
type ThreadLinkNonExecutableSnapshot = InspectOnlyThreadLink | UnboundThreadLink;
|
|
299
|
+
interface ThreadLinkCompareAndSwapInput {
|
|
300
|
+
readonly linkKey: string;
|
|
301
|
+
readonly expected: ThreadLinkCasToken | null;
|
|
302
|
+
readonly next: ThreadLinkNonExecutableSnapshot;
|
|
303
|
+
}
|
|
304
|
+
interface ThreadLinkBindingStore {
|
|
305
|
+
readonly snapshot: (linkKey: string) => ThreadLinkBindingSnapshot;
|
|
306
|
+
readonly read: (linkKey: string) => ThreadLinkBindingSnapshot;
|
|
307
|
+
readonly compareAndSwap: (input: ThreadLinkCompareAndSwapInput) => ThreadLinkBindingSnapshot;
|
|
308
|
+
readonly clear: (linkKey: string, expected: ThreadLinkCasToken | null) => ThreadLinkBindingSnapshot;
|
|
309
|
+
}
|
|
310
|
+
interface CodexThreadLinkClassifier {
|
|
311
|
+
readonly classify: (target: ThreadLinkTarget) => Promise<ThreadLinkClassification>;
|
|
200
312
|
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
313
|
+
interface CodexThreadLinkPort extends CodexThreadLinkClassifier, ThreadLinkBindingStore {
|
|
314
|
+
/** Classify twice through the live authorities, then adopt the fresh result by CAS. */
|
|
315
|
+
readonly classifyAndBind: (linkKey: string, expected: ThreadLinkCasToken | null, target: ThreadLinkTarget) => Promise<ThreadLinkBindingSnapshot>;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* What became of a thread given up: Codex's answer to its unsubscribe, or why the thread could not
|
|
319
|
+
* be read or unsubscribed. The thread keeps its rollout either way.
|
|
320
|
+
*/
|
|
321
|
+
type ThreadUnload = {
|
|
322
|
+
readonly threadId: ThreadId;
|
|
323
|
+
readonly outcome: SessionResponse<"thread/unsubscribe">["status"];
|
|
324
|
+
} | {
|
|
325
|
+
readonly threadId: ThreadId;
|
|
326
|
+
readonly outcome: "failed";
|
|
206
327
|
readonly message: string;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
readonly
|
|
215
|
-
readonly
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
readonly
|
|
328
|
+
};
|
|
329
|
+
type CoordinatorStartResponse = SessionResponse<"thread/start">;
|
|
330
|
+
type CoordinatorApprovalPolicy = CoordinatorStartResponse["approvalPolicy"];
|
|
331
|
+
type CoordinatorApprovalsReviewer = CoordinatorStartResponse["approvalsReviewer"];
|
|
332
|
+
type CoordinatorSandboxPolicy = CoordinatorStartResponse["sandbox"];
|
|
333
|
+
type CoordinatorPermissionProfile = CoordinatorStartResponse["activePermissionProfile"];
|
|
334
|
+
interface CoordinatorConfiguredSettings {
|
|
335
|
+
readonly model: string;
|
|
336
|
+
readonly effort: string;
|
|
337
|
+
readonly serviceTier: "priority" | null;
|
|
338
|
+
}
|
|
339
|
+
interface CoordinatorEffectiveSettings {
|
|
340
|
+
readonly model: string;
|
|
341
|
+
readonly effort: CoordinatorStartResponse["reasoningEffort"];
|
|
342
|
+
readonly serviceTier: string | null;
|
|
343
|
+
}
|
|
344
|
+
/** Settings are server facts, not a second mutable settings authority. */
|
|
345
|
+
interface CoordinatorSettings {
|
|
346
|
+
readonly configured: CoordinatorConfiguredSettings;
|
|
347
|
+
readonly effective: CoordinatorEffectiveSettings;
|
|
348
|
+
readonly approvalPolicy: CoordinatorApprovalPolicy;
|
|
349
|
+
readonly approvalsReviewer: CoordinatorApprovalsReviewer;
|
|
350
|
+
readonly sandboxPolicy: CoordinatorSandboxPolicy;
|
|
351
|
+
readonly activePermissionProfile: CoordinatorPermissionProfile;
|
|
352
|
+
}
|
|
353
|
+
interface CoordinatorReviewHashes {
|
|
354
|
+
readonly instructionHash: string;
|
|
355
|
+
/** A stable digest over both reviewed dynamic-tool manifest digests. */
|
|
356
|
+
readonly catalogueHash: string;
|
|
357
|
+
readonly workhorseCatalogueHash: string;
|
|
358
|
+
readonly voiceCatalogueHash: string;
|
|
359
|
+
readonly settingsHash: string;
|
|
360
|
+
}
|
|
361
|
+
/** The serializable evidence the composition root may retain across reload. */
|
|
362
|
+
interface CoordinatorPersistedState {
|
|
363
|
+
readonly childId: ChildId;
|
|
364
|
+
readonly epoch: ChildEpoch;
|
|
222
365
|
readonly threadId: ThreadId;
|
|
223
|
-
readonly
|
|
224
|
-
readonly
|
|
225
|
-
readonly
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
readonly
|
|
230
|
-
|
|
231
|
-
|
|
366
|
+
readonly operationId: string;
|
|
367
|
+
readonly review: CoordinatorReviewHashes;
|
|
368
|
+
readonly settings: CoordinatorSettings;
|
|
369
|
+
}
|
|
370
|
+
type CoordinatorLifecycleState = "unbound" | "starting" | "ready" | "inspect_only" | "failed";
|
|
371
|
+
interface CoordinatorCapabilityPolicy {
|
|
372
|
+
readonly web: true;
|
|
373
|
+
readonly shell: true;
|
|
374
|
+
readonly repository: true;
|
|
375
|
+
readonly approvals: true;
|
|
376
|
+
readonly sustainedWork: "instruction_policy";
|
|
377
|
+
}
|
|
378
|
+
interface CoordinatorSnapshot {
|
|
379
|
+
readonly state: CoordinatorLifecycleState;
|
|
380
|
+
readonly threadId: ThreadId | null;
|
|
381
|
+
readonly childId: ChildId | null;
|
|
382
|
+
readonly epoch: ChildEpoch | null;
|
|
383
|
+
readonly operationId: string | null;
|
|
384
|
+
readonly configured: CoordinatorConfiguredSettings | null;
|
|
385
|
+
readonly effective: CoordinatorEffectiveSettings | null;
|
|
386
|
+
readonly approvalPolicy: CoordinatorApprovalPolicy | null;
|
|
387
|
+
readonly approvalsReviewer: CoordinatorApprovalsReviewer | null;
|
|
388
|
+
readonly sandboxPolicy: CoordinatorSandboxPolicy | null;
|
|
389
|
+
readonly activePermissionProfile: CoordinatorPermissionProfile | null;
|
|
390
|
+
readonly review: CoordinatorReviewHashes | null;
|
|
391
|
+
readonly capabilities: CoordinatorCapabilityPolicy;
|
|
392
|
+
readonly persistence: CoordinatorPersistedState | null;
|
|
393
|
+
readonly reason: string | null;
|
|
394
|
+
}
|
|
395
|
+
interface CoordinatorEnsureInput {
|
|
396
|
+
/** A fresh server-issued operation id is required for a new or replacement start. */
|
|
397
|
+
readonly operationId?: string;
|
|
398
|
+
/** Undefined uses the coordinator's current retained evidence; null clears it. */
|
|
399
|
+
readonly persisted?: CoordinatorPersistedState | null;
|
|
400
|
+
}
|
|
401
|
+
/** What became of the thread a replacement retired, once it was unsubscribed or could not be. */
|
|
402
|
+
type CoordinatorRetirement = ThreadUnload;
|
|
403
|
+
interface CoordinatorReplaceInput {
|
|
404
|
+
/** The fresh server-issued operation id the replacement start runs under. */
|
|
405
|
+
readonly operationId: string;
|
|
406
|
+
/**
|
|
407
|
+
* Told once what became of the retired thread, after its voice session closed and no turn runs
|
|
408
|
+
* on it. Never told when the replacement failed, because nothing was retired.
|
|
409
|
+
*/
|
|
410
|
+
readonly onRetired: (retirement: CoordinatorRetirement) => void;
|
|
411
|
+
}
|
|
412
|
+
interface CodexCoordinator {
|
|
413
|
+
readonly ensure: (input?: CoordinatorEnsureInput) => Promise<CoordinatorSnapshot>;
|
|
414
|
+
/** Start a fresh coordinator in place of the current one, which stays until it is ready. */
|
|
415
|
+
readonly replace: (input: CoordinatorReplaceInput) => Promise<CoordinatorSnapshot>;
|
|
416
|
+
readonly snapshot: () => CoordinatorSnapshot;
|
|
417
|
+
readonly persisted: () => CoordinatorPersistedState | null;
|
|
418
|
+
readonly onNotification: (event: TransportServerNotification) => void;
|
|
419
|
+
}
|
|
420
|
+
/** The execution facts a thread reads; any other key is the host's own data, which these never are. */
|
|
421
|
+
declare const WorkbenchExecutionContextSchema: z.ZodObject<{
|
|
422
|
+
threadLink: z.ZodObject<{
|
|
423
|
+
state: z.ZodEnum<{
|
|
424
|
+
executable: "executable";
|
|
425
|
+
inspect_only: "inspect_only";
|
|
426
|
+
unbound: "unbound";
|
|
427
|
+
}>;
|
|
428
|
+
reason: z.ZodNullable<z.ZodEnum<{
|
|
429
|
+
direct_input_false: "direct_input_false";
|
|
430
|
+
direct_input_unknown: "direct_input_unknown";
|
|
431
|
+
prior_epoch: "prior_epoch";
|
|
432
|
+
stale_child: "stale_child";
|
|
433
|
+
thread_list_ambiguous: "thread_list_ambiguous";
|
|
434
|
+
thread_list_missing: "thread_list_missing";
|
|
435
|
+
thread_loaded_list_ambiguous: "thread_loaded_list_ambiguous";
|
|
436
|
+
thread_loaded_list_missing: "thread_loaded_list_missing";
|
|
437
|
+
thread_source_custom: "thread_source_custom";
|
|
438
|
+
thread_source_subagent: "thread_source_subagent";
|
|
439
|
+
thread_source_unknown: "thread_source_unknown";
|
|
440
|
+
thread_start_outcome_unknown: "thread_start_outcome_unknown";
|
|
441
|
+
thread_status_not_loaded: "thread_status_not_loaded";
|
|
442
|
+
thread_status_system_error: "thread_status_system_error";
|
|
443
|
+
unknown_provenance: "unknown_provenance";
|
|
444
|
+
}>>;
|
|
445
|
+
}, z.core.$strict>;
|
|
446
|
+
child: z.ZodObject<{
|
|
447
|
+
id: z.ZodString;
|
|
448
|
+
epoch: z.ZodString;
|
|
449
|
+
}, z.core.$strict>;
|
|
450
|
+
workhorse: z.ZodObject<{
|
|
451
|
+
threadId: z.ZodNullable<z.ZodString>;
|
|
452
|
+
turnId: z.ZodNullable<z.ZodString>;
|
|
453
|
+
}, z.core.$strict>;
|
|
454
|
+
coordinator: z.ZodObject<{
|
|
455
|
+
threadId: z.ZodNullable<z.ZodString>;
|
|
456
|
+
realtimeSessionId: z.ZodNullable<z.ZodString>;
|
|
457
|
+
}, z.core.$strict>;
|
|
458
|
+
brief: z.ZodObject<{
|
|
459
|
+
text: z.ZodString;
|
|
460
|
+
capturedAtMs: z.ZodNumber;
|
|
461
|
+
freshUntilMs: z.ZodNumber;
|
|
462
|
+
}, z.core.$strict>;
|
|
463
|
+
operation: z.ZodUnion<readonly [z.ZodObject<{
|
|
464
|
+
id: z.ZodNull;
|
|
465
|
+
kind: z.ZodNull;
|
|
466
|
+
rpc: z.ZodNull;
|
|
467
|
+
outcome: z.ZodNull;
|
|
468
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
469
|
+
id: z.ZodString;
|
|
470
|
+
kind: z.ZodEnum<{
|
|
471
|
+
composer_message: "composer_message";
|
|
472
|
+
create_thread_initial_turn: "create_thread_initial_turn";
|
|
473
|
+
delegate_to_workhorse: "delegate_to_workhorse";
|
|
474
|
+
fork_thread_initial_turn: "fork_thread_initial_turn";
|
|
475
|
+
send_message_to_thread: "send_message_to_thread";
|
|
476
|
+
spoken_approval_classifier: "spoken_approval_classifier";
|
|
477
|
+
steer_workhorse: "steer_workhorse";
|
|
478
|
+
workhorse_outcome_report: "workhorse_outcome_report";
|
|
479
|
+
}>;
|
|
480
|
+
rpc: z.ZodEnum<{
|
|
481
|
+
"turn/start": "turn/start";
|
|
482
|
+
"turn/steer": "turn/steer";
|
|
483
|
+
}>;
|
|
484
|
+
outcome: z.ZodNullable<z.ZodEnum<{
|
|
485
|
+
delivered: "delivered";
|
|
486
|
+
not_delivered: "not_delivered";
|
|
487
|
+
outcome_unknown: "outcome_unknown";
|
|
488
|
+
}>>;
|
|
489
|
+
}, z.core.$strict>]>;
|
|
490
|
+
}, z.core.$strip>;
|
|
491
|
+
type WorkbenchExecutionContext = z.infer<typeof WorkbenchExecutionContextSchema>;
|
|
492
|
+
type WorkbenchOperation = WorkbenchExecutionContext["operation"];
|
|
493
|
+
/** The host owns wire conversion. Its payload never changes execution facts. */
|
|
494
|
+
interface WorkbenchContextCodec {
|
|
495
|
+
readonly key: string;
|
|
496
|
+
readonly turnTrigger: string;
|
|
497
|
+
readonly encode: (context: WorkbenchExecutionContext) => string;
|
|
498
|
+
}
|
|
499
|
+
/** The only queue operations exposed to workbench callers. */
|
|
500
|
+
declare const WORKHORSE_QUEUE_OPERATIONS: readonly ["list", "add", "update", "delete", "reorder", "start"];
|
|
501
|
+
type WorkhorseQueueOperation = (typeof WORKHORSE_QUEUE_OPERATIONS)[number];
|
|
502
|
+
type WorkhorseQueueMutation = Exclude<WorkhorseQueueOperation, "list">;
|
|
503
|
+
interface QueueListResult {
|
|
504
|
+
readonly operation: "list";
|
|
505
|
+
readonly queue: QueueSnapshot;
|
|
506
|
+
}
|
|
507
|
+
interface QueueEffectContext {
|
|
508
|
+
readonly operation: WorkhorseQueueMutation;
|
|
509
|
+
readonly target: SessionQueuedSubmission | null;
|
|
510
|
+
}
|
|
511
|
+
type QueueBeforeEffect = (context: QueueEffectContext) => void | Promise<void>;
|
|
512
|
+
interface QueueAddRequest<OperationIdValue extends string> {
|
|
513
|
+
readonly operationId: OperationIdValue;
|
|
514
|
+
readonly prompt: string;
|
|
515
|
+
readonly beforeEffect?: QueueBeforeEffect;
|
|
516
|
+
}
|
|
517
|
+
interface QueueUpdateRequest<OperationIdValue extends string> {
|
|
518
|
+
readonly operationId: OperationIdValue;
|
|
519
|
+
readonly submissionId: QueuedSubmissionId;
|
|
520
|
+
readonly prompt: string;
|
|
521
|
+
readonly beforeEffect?: QueueBeforeEffect;
|
|
522
|
+
}
|
|
523
|
+
interface QueueDeleteRequest<OperationIdValue extends string> {
|
|
524
|
+
readonly operationId: OperationIdValue;
|
|
525
|
+
readonly submissionId: QueuedSubmissionId;
|
|
526
|
+
readonly beforeEffect?: QueueBeforeEffect;
|
|
527
|
+
}
|
|
528
|
+
interface QueueReorderRequest<OperationIdValue extends string> {
|
|
529
|
+
readonly operationId: OperationIdValue;
|
|
530
|
+
readonly orderedSubmissionIds: readonly QueuedSubmissionId[];
|
|
531
|
+
readonly beforeEffect?: QueueBeforeEffect;
|
|
532
|
+
}
|
|
533
|
+
interface QueueStartRequest<OperationIdValue extends string> {
|
|
534
|
+
readonly operationId: OperationIdValue;
|
|
535
|
+
readonly submissionId: QueuedSubmissionId;
|
|
536
|
+
readonly beforeEffect?: QueueBeforeEffect;
|
|
537
|
+
}
|
|
538
|
+
type QueueSnapshot = readonly SessionQueuedSubmission[];
|
|
539
|
+
type QueueMutationOutcome = "delivered" | "not_delivered" | "outcome_unknown";
|
|
540
|
+
interface QueueMutationResult<Operation extends WorkhorseQueueMutation, OperationIdValue extends string> {
|
|
541
|
+
readonly operation: Operation;
|
|
542
|
+
readonly operationId: OperationIdValue;
|
|
543
|
+
readonly outcome: QueueMutationOutcome;
|
|
544
|
+
readonly queue: QueueSnapshot;
|
|
545
|
+
}
|
|
546
|
+
type QueueAddResult<OperationIdValue extends string> = QueueMutationResult<"add", OperationIdValue>;
|
|
547
|
+
type QueueUpdateResult<OperationIdValue extends string> = QueueMutationResult<"update", OperationIdValue>;
|
|
548
|
+
type QueueDeleteResult<OperationIdValue extends string> = QueueMutationResult<"delete", OperationIdValue>;
|
|
549
|
+
type QueueReorderResult<OperationIdValue extends string> = QueueMutationResult<"reorder", OperationIdValue>;
|
|
550
|
+
type QueueStartResult<OperationIdValue extends string> = QueueMutationResult<"start", OperationIdValue> & {
|
|
551
|
+
readonly clientUserMessageId: string;
|
|
552
|
+
readonly turnId: TurnId | null;
|
|
553
|
+
};
|
|
554
|
+
interface CodexWorkhorseQueue<OperationIdValue extends string> {
|
|
555
|
+
readonly list: () => Promise<QueueListResult>;
|
|
556
|
+
readonly add: (request: QueueAddRequest<OperationIdValue>) => Promise<QueueAddResult<OperationIdValue>>;
|
|
557
|
+
readonly update: (request: QueueUpdateRequest<OperationIdValue>) => Promise<QueueUpdateResult<OperationIdValue>>;
|
|
558
|
+
readonly delete: (request: QueueDeleteRequest<OperationIdValue>) => Promise<QueueDeleteResult<OperationIdValue>>;
|
|
559
|
+
readonly reorder: (request: QueueReorderRequest<OperationIdValue>) => Promise<QueueReorderResult<OperationIdValue>>;
|
|
560
|
+
readonly start: (request: QueueStartRequest<OperationIdValue>) => Promise<QueueStartResult<OperationIdValue>>;
|
|
561
|
+
/** Close admission and wait for every operation accepted before this call. */
|
|
562
|
+
readonly shutdown: () => Promise<void>;
|
|
563
|
+
}
|
|
564
|
+
/** The only four operations the coordinator may dispatch to its workhorse. */
|
|
565
|
+
declare const WORKHORSE_OPERATION_NAMES: readonly ["inspect_workhorse", "delegate_to_workhorse", "manage_workhorse_queue", "steer_workhorse"];
|
|
566
|
+
type WorkhorseOperationName = (typeof WORKHORSE_OPERATION_NAMES)[number];
|
|
567
|
+
type WorkhorseOperationRpc = "turn/start" | "turn/steer" | `thread/queue/${WorkhorseQueueMutation}`;
|
|
568
|
+
type WorkhorseOperationDelivery = "pending" | "delivered" | "not_delivered" | "outcome_unknown";
|
|
569
|
+
/** The coordinator call remains an exact, server-validated logical correlation. */
|
|
570
|
+
type WorkhorseCoordinatorCall = LogicalToolCallCorrelation;
|
|
571
|
+
interface InspectWorkhorseRequest {
|
|
572
|
+
readonly call: WorkhorseCoordinatorCall;
|
|
573
|
+
}
|
|
574
|
+
interface DelegateToWorkhorseRequest {
|
|
575
|
+
readonly call: WorkhorseCoordinatorCall;
|
|
576
|
+
/** Reuse this server-issued identity when the dispatcher already owns the effect. */
|
|
577
|
+
readonly operationId?: OperationId;
|
|
578
|
+
readonly input: string;
|
|
579
|
+
readonly transcriptDelta: string;
|
|
580
|
+
}
|
|
581
|
+
type ManageWorkhorseQueueMutationRequest = {
|
|
582
|
+
readonly operation: "add";
|
|
583
|
+
readonly prompt: string;
|
|
584
|
+
} | {
|
|
585
|
+
readonly operation: "update";
|
|
586
|
+
readonly submissionId: QueuedSubmissionId;
|
|
587
|
+
readonly prompt: string;
|
|
588
|
+
} | {
|
|
589
|
+
readonly operation: "delete";
|
|
590
|
+
readonly submissionId: QueuedSubmissionId;
|
|
591
|
+
} | {
|
|
592
|
+
readonly operation: "reorder";
|
|
593
|
+
readonly orderedSubmissionIds: readonly QueuedSubmissionId[];
|
|
594
|
+
} | {
|
|
595
|
+
readonly operation: "start";
|
|
596
|
+
readonly submissionId: QueuedSubmissionId;
|
|
597
|
+
};
|
|
598
|
+
type ManageWorkhorseQueueRequest = {
|
|
599
|
+
readonly call: WorkhorseCoordinatorCall;
|
|
600
|
+
readonly operation: "list";
|
|
601
|
+
} | (ManageWorkhorseQueueMutationRequest & {
|
|
602
|
+
readonly call: WorkhorseCoordinatorCall;
|
|
603
|
+
/** Reuse this server-issued identity when the dispatcher already owns the effect. */
|
|
604
|
+
readonly operationId?: OperationId;
|
|
605
|
+
});
|
|
606
|
+
interface SteerWorkhorseRequest {
|
|
607
|
+
readonly call: WorkhorseCoordinatorCall;
|
|
608
|
+
/** Reuse this server-issued identity when the dispatcher already owns the effect. */
|
|
609
|
+
readonly operationId?: OperationId;
|
|
610
|
+
readonly input: string;
|
|
611
|
+
}
|
|
612
|
+
/** What inspection read about a workhorse. An empty field means Codex reported nothing there. */
|
|
613
|
+
interface InspectWorkhorseResult {
|
|
614
|
+
readonly threadId: ThreadId;
|
|
615
|
+
readonly status: CodexThreadStatusType;
|
|
616
|
+
/** The turn that runs now, as thread/turns/list names it, or null when none runs. */
|
|
617
|
+
readonly activeTurnId: TurnId | null;
|
|
618
|
+
/** The request that started the newest turn, or null when it carried no text. */
|
|
619
|
+
readonly request: string | null;
|
|
620
|
+
/** What the newest turn did last, oldest first. */
|
|
621
|
+
readonly recentProgress: readonly string[];
|
|
622
|
+
/** Every sub-agent the workhorse spawned, at any depth, with its status. */
|
|
623
|
+
readonly subAgents: readonly {
|
|
624
|
+
readonly threadId: ThreadId;
|
|
625
|
+
readonly status: CodexThreadStatusType;
|
|
626
|
+
}[];
|
|
627
|
+
readonly queuedSubmissionIds: readonly QueuedSubmissionId[];
|
|
628
|
+
/**
|
|
629
|
+
* Each read that failed, or that ownership did not allow, so its field above is empty for that
|
|
630
|
+
* reason and not because Codex reported nothing.
|
|
631
|
+
*/
|
|
632
|
+
readonly unavailable: readonly ("turns" | "subAgents" | "queue")[];
|
|
633
|
+
}
|
|
634
|
+
interface DelegateToWorkhorseResult {
|
|
635
|
+
readonly mode: "started" | "queued";
|
|
636
|
+
readonly clientUserMessageId: string;
|
|
637
|
+
readonly queuedSubmissionId: QueuedSubmissionId | null;
|
|
638
|
+
readonly turnId: TurnId | null;
|
|
639
|
+
}
|
|
640
|
+
interface ManageWorkhorseQueueResult {
|
|
641
|
+
readonly operation: WorkhorseQueueOperation;
|
|
642
|
+
readonly queuedSubmissionIds: readonly QueuedSubmissionId[];
|
|
643
|
+
}
|
|
644
|
+
interface SteerWorkhorseResult {
|
|
645
|
+
readonly turnId: TurnId;
|
|
646
|
+
readonly delivery: Exclude<WorkhorseOperationDelivery, "pending">;
|
|
647
|
+
}
|
|
648
|
+
interface WorkhorseOperationCorrelation {
|
|
649
|
+
readonly operationId: OperationId;
|
|
650
|
+
readonly childId: ChildId;
|
|
651
|
+
readonly epoch: ChildEpoch;
|
|
652
|
+
readonly coordinatorThreadId: ThreadId;
|
|
653
|
+
readonly coordinatorTurnId: TurnId;
|
|
654
|
+
readonly workhorseThreadId: ThreadId;
|
|
655
|
+
readonly coordinatorCall: WorkhorseCoordinatorCall;
|
|
656
|
+
readonly clientUserMessageId: string | null;
|
|
657
|
+
readonly queuedSubmissionId: QueuedSubmissionId | null;
|
|
658
|
+
readonly turnId: TurnId | null;
|
|
659
|
+
}
|
|
660
|
+
interface WorkhorseOperationEventBase {
|
|
661
|
+
readonly operation: Exclude<WorkhorseOperationName, "inspect_workhorse">;
|
|
662
|
+
readonly queueOperation: WorkhorseQueueMutation | null;
|
|
663
|
+
readonly rpc: WorkhorseOperationRpc;
|
|
664
|
+
readonly correlation: WorkhorseOperationCorrelation;
|
|
665
|
+
readonly queuedSubmissionIds: readonly QueuedSubmissionId[];
|
|
666
|
+
readonly detail: string | null;
|
|
667
|
+
}
|
|
668
|
+
type WorkhorseOperationEvent = (WorkhorseOperationEventBase & {
|
|
669
|
+
readonly type: "accepted";
|
|
670
|
+
readonly outcome: "pending";
|
|
671
|
+
}) | (WorkhorseOperationEventBase & {
|
|
672
|
+
readonly type: "queued";
|
|
673
|
+
readonly outcome: "delivered";
|
|
674
|
+
}) | (WorkhorseOperationEventBase & {
|
|
675
|
+
readonly type: "started";
|
|
676
|
+
readonly outcome: "delivered";
|
|
677
|
+
}) | (WorkhorseOperationEventBase & {
|
|
678
|
+
readonly type: "progress";
|
|
679
|
+
readonly outcome: "delivered";
|
|
680
|
+
}) | (WorkhorseOperationEventBase & {
|
|
681
|
+
readonly type: "attention";
|
|
682
|
+
readonly outcome: "delivered";
|
|
683
|
+
}) | (WorkhorseOperationEventBase & {
|
|
684
|
+
readonly type: "completed";
|
|
685
|
+
readonly outcome: "delivered";
|
|
686
|
+
}) | (WorkhorseOperationEventBase & {
|
|
687
|
+
readonly type: "failed";
|
|
688
|
+
readonly outcome: "delivered" | "not_delivered";
|
|
689
|
+
}) | (WorkhorseOperationEventBase & {
|
|
690
|
+
readonly type: "outcome_unknown";
|
|
691
|
+
readonly outcome: "outcome_unknown";
|
|
692
|
+
});
|
|
693
|
+
type WorkhorseOperationEventListener = (event: WorkhorseOperationEvent) => void;
|
|
694
|
+
interface CodexWorkhorseOperations {
|
|
695
|
+
readonly inspect: (request: InspectWorkhorseRequest) => Promise<InspectWorkhorseResult>;
|
|
696
|
+
readonly delegate: (request: DelegateToWorkhorseRequest) => Promise<DelegateToWorkhorseResult>;
|
|
697
|
+
readonly manageQueue: (request: ManageWorkhorseQueueRequest) => Promise<ManageWorkhorseQueueResult>;
|
|
698
|
+
readonly steer: (request: SteerWorkhorseRequest) => Promise<SteerWorkhorseResult>;
|
|
699
|
+
/** Raw notifications are an input boundary only; no raw event leaves this port. */
|
|
700
|
+
readonly onNotification: (event: TransportServerNotification) => void;
|
|
701
|
+
readonly subscribe: (listener: WorkhorseOperationEventListener) => () => void;
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* One announced change for the coordinator or the voice of one tab session, under the execution
|
|
705
|
+
* identities the agent read when it was announced. The callbacks capture their own correlation;
|
|
706
|
+
* these identities only scope the change.
|
|
707
|
+
*/
|
|
708
|
+
interface ContextAnnouncementSource {
|
|
709
|
+
readonly kind: "context";
|
|
710
|
+
readonly audience: "coordinator" | "voice";
|
|
711
|
+
readonly child: {
|
|
712
|
+
readonly id: ChildId | null;
|
|
713
|
+
readonly epoch: ChildEpoch | null;
|
|
714
|
+
};
|
|
715
|
+
readonly coordinator: {
|
|
716
|
+
readonly threadId: ThreadId | null;
|
|
717
|
+
readonly realtimeSessionId: RealtimeSessionId | null;
|
|
718
|
+
};
|
|
719
|
+
readonly workhorse: {
|
|
720
|
+
readonly threadId: ThreadId | null;
|
|
721
|
+
readonly turnId: TurnId | null;
|
|
722
|
+
};
|
|
723
|
+
readonly threadLink: {
|
|
724
|
+
readonly state: "executable" | "inspect_only" | "unbound";
|
|
232
725
|
readonly reason: string | null;
|
|
233
|
-
}
|
|
726
|
+
};
|
|
727
|
+
readonly context: AnnouncedContext;
|
|
728
|
+
/**
|
|
729
|
+
* The thread that made the change, or null. A change this session's own workhorse or
|
|
730
|
+
* coordinator made is refused as `own_change` before delivery.
|
|
731
|
+
*/
|
|
732
|
+
readonly author: string | null;
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* One event of the linked workhorse thread itself, whoever started the turn: a turn
|
|
736
|
+
* that ended, one that began waiting on the user, or a message the workhorse sent the coordinator.
|
|
737
|
+
*/
|
|
738
|
+
interface WorkhorseNewsSource {
|
|
739
|
+
readonly kind: "workhorse_news";
|
|
740
|
+
readonly type: "completed" | "failed" | "stopped" | "waiting" | "message";
|
|
741
|
+
/** Counts news from one observer, so two waits in one turn are two pieces of news. */
|
|
742
|
+
readonly sequence: number;
|
|
743
|
+
readonly childId: ChildId;
|
|
744
|
+
readonly epoch: ChildEpoch;
|
|
745
|
+
readonly coordinatorThreadId: ThreadId;
|
|
746
|
+
readonly workhorseThreadId: ThreadId;
|
|
747
|
+
readonly turnId: TurnId | null;
|
|
748
|
+
/** What a failed turn's error said, or what the workhorse's message said; null otherwise. */
|
|
749
|
+
readonly detail: string | null;
|
|
750
|
+
}
|
|
751
|
+
type CoordinatorCallbackSource = WorkhorseOperationEvent | ContextAnnouncementSource | WorkhorseNewsSource;
|
|
752
|
+
interface CoordinatorCallbackLinkCorrelation {
|
|
753
|
+
readonly binding: ThreadLinkBindingSnapshot;
|
|
754
|
+
readonly target: ThreadLinkTarget;
|
|
755
|
+
/** The checkout the workhorse works in, which news of it names. */
|
|
756
|
+
readonly checkout: string;
|
|
757
|
+
}
|
|
758
|
+
interface CoordinatorCallbackCorrelation {
|
|
759
|
+
readonly operationId: OperationId | null;
|
|
760
|
+
readonly childId: ChildId | null;
|
|
761
|
+
readonly epoch: ChildEpoch | null;
|
|
762
|
+
readonly coordinatorThreadId: ThreadId | null;
|
|
763
|
+
readonly coordinatorTurnId: TurnId | null;
|
|
764
|
+
readonly workhorseThreadId: ThreadId | null;
|
|
765
|
+
readonly turnId: TurnId | null;
|
|
766
|
+
readonly queuedSubmissionId: QueuedSubmissionId | null;
|
|
767
|
+
readonly clientUserMessageId: string | null;
|
|
768
|
+
readonly realtimeSessionId: RealtimeSessionId | null;
|
|
769
|
+
readonly coordinatorCall: LogicalToolCallCorrelation | null;
|
|
770
|
+
readonly workhorseLink: CoordinatorCallbackLinkCorrelation;
|
|
771
|
+
readonly realtimeGeneration: CoordinatorCallbackRealtimeGeneration | null;
|
|
772
|
+
}
|
|
773
|
+
interface CoordinatorOperationCallbackBase {
|
|
774
|
+
readonly kind: "operation";
|
|
775
|
+
readonly operation: Exclude<WorkhorseOperationEvent["operation"], "inspect_workhorse">;
|
|
776
|
+
readonly queueOperation: WorkhorseOperationEvent["queueOperation"];
|
|
777
|
+
readonly rpc: WorkhorseOperationEvent["rpc"];
|
|
778
|
+
readonly correlation: CoordinatorCallbackCorrelation;
|
|
779
|
+
readonly queuedSubmissionIds: readonly QueuedSubmissionId[];
|
|
780
|
+
readonly detail: string | null;
|
|
781
|
+
}
|
|
782
|
+
type CoordinatorOperationCallback = (CoordinatorOperationCallbackBase & {
|
|
783
|
+
readonly type: "accepted";
|
|
784
|
+
readonly outcome: "pending";
|
|
785
|
+
}) | (CoordinatorOperationCallbackBase & {
|
|
786
|
+
readonly type: "queued";
|
|
787
|
+
readonly outcome: "delivered";
|
|
788
|
+
}) | (CoordinatorOperationCallbackBase & {
|
|
789
|
+
readonly type: "started";
|
|
790
|
+
readonly outcome: "delivered";
|
|
791
|
+
}) | (CoordinatorOperationCallbackBase & {
|
|
792
|
+
readonly type: "progress";
|
|
793
|
+
readonly outcome: "delivered";
|
|
794
|
+
}) | (CoordinatorOperationCallbackBase & {
|
|
795
|
+
readonly type: "attention";
|
|
796
|
+
readonly outcome: "delivered";
|
|
797
|
+
}) | (CoordinatorOperationCallbackBase & {
|
|
798
|
+
readonly type: "completed";
|
|
799
|
+
readonly outcome: "delivered";
|
|
800
|
+
}) | (CoordinatorOperationCallbackBase & {
|
|
801
|
+
readonly type: "failed";
|
|
802
|
+
readonly outcome: "delivered" | "not_delivered";
|
|
803
|
+
}) | (CoordinatorOperationCallbackBase & {
|
|
804
|
+
readonly type: "outcome_unknown";
|
|
805
|
+
readonly outcome: "outcome_unknown";
|
|
806
|
+
});
|
|
807
|
+
/**
|
|
808
|
+
* What a callback carries of one announced change: its identity, its freshness and the host's
|
|
809
|
+
* words. A change is identified by its feed and sequence; two with the same identity share one
|
|
810
|
+
* delivery.
|
|
811
|
+
*/
|
|
812
|
+
interface AnnouncedContext {
|
|
813
|
+
/** The host feed the change belongs to. Changes of two feeds never coalesce. */
|
|
814
|
+
readonly feedId: string;
|
|
815
|
+
readonly sequence: number;
|
|
816
|
+
/** When the host captured the change; the delivery record's freshness starts here. */
|
|
817
|
+
readonly capturedAtMs: number;
|
|
818
|
+
/** Until when the change is fresh; the delivery record's freshness ends here. */
|
|
819
|
+
readonly freshUntilMs: number;
|
|
820
|
+
/** What the change is about: a later one of the same feed and topic replaces it while it waits. */
|
|
821
|
+
readonly topic: string | null;
|
|
822
|
+
/** The words to tell, or null when the host withheld them. */
|
|
823
|
+
readonly text: string | null;
|
|
824
|
+
/** Why the host told nothing, or null. */
|
|
825
|
+
readonly withheld: string | null;
|
|
826
|
+
/** Whether the voice answers the words now, rather than keeping them as quiet context. */
|
|
827
|
+
readonly speech: boolean;
|
|
828
|
+
}
|
|
829
|
+
/** One normalized announced change, delivered to the coordinator or to the voice. */
|
|
830
|
+
interface CoordinatorContextCallback {
|
|
831
|
+
readonly kind: "context";
|
|
832
|
+
readonly audience: ContextAnnouncementSource["audience"];
|
|
833
|
+
readonly correlation: CoordinatorCallbackCorrelation;
|
|
834
|
+
readonly threadLinkState: "executable" | "inspect_only" | "unbound";
|
|
835
|
+
readonly threadLinkReason: string | null;
|
|
836
|
+
readonly context: AnnouncedContext;
|
|
837
|
+
}
|
|
838
|
+
/** Workhorse news about the linked workhorse thread, as the coordinator is given it. */
|
|
839
|
+
interface CoordinatorWorkhorseNewsCallback {
|
|
840
|
+
readonly kind: "workhorse_news";
|
|
841
|
+
readonly type: WorkhorseNewsSource["type"];
|
|
842
|
+
readonly sequence: number;
|
|
843
|
+
readonly correlation: CoordinatorCallbackCorrelation;
|
|
844
|
+
readonly detail: string | null;
|
|
845
|
+
}
|
|
846
|
+
type CoordinatorCallback = CoordinatorOperationCallback | CoordinatorContextCallback | CoordinatorWorkhorseNewsCallback;
|
|
847
|
+
interface CoordinatorCallbackRealtimeGeneration {
|
|
848
|
+
readonly childId: ChildId;
|
|
849
|
+
readonly epoch: ChildEpoch;
|
|
850
|
+
readonly coordinatorThreadId: ThreadId;
|
|
851
|
+
readonly wireSessionId: RealtimeSessionId;
|
|
852
|
+
readonly browserSessionId: RealtimeSessionId$1;
|
|
853
|
+
readonly browserCorrelationId: RealtimeCorrelationId;
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* One append to the live voice session: quiet context the voice model may use, or speech it
|
|
857
|
+
* answers now. In a full-duplex session appended text is quiet whatever role it carries; only
|
|
858
|
+
* speakable text is something the voice model says.
|
|
859
|
+
*/
|
|
860
|
+
type CoordinatorCallbackRealtimeRequest = {
|
|
861
|
+
readonly generation: CoordinatorCallbackRealtimeGeneration;
|
|
862
|
+
readonly channel: "context";
|
|
863
|
+
readonly params: SessionParams<"thread/realtime/appendText">;
|
|
864
|
+
} | {
|
|
865
|
+
readonly generation: CoordinatorCallbackRealtimeGeneration;
|
|
866
|
+
readonly channel: "speech";
|
|
867
|
+
readonly params: SessionParams<"thread/realtime/appendSpeech">;
|
|
868
|
+
};
|
|
869
|
+
type CoordinatorCallbackDeliveryOutcome = "delivered" | "not_delivered" | "outcome_unknown";
|
|
870
|
+
type CoordinatorCallbackDeliveryPath = "none" | "silent" | "realtime_appendText" |
|
|
871
|
+
/** Speech the voice model answers now, on the host's choice. */
|
|
872
|
+
"realtime_appendSpeech" |
|
|
873
|
+
/** A developer message in the coordinator's thread, which starts no turn. */
|
|
874
|
+
"coordinator_context" |
|
|
875
|
+
/** The coordinator's running turn or a new one, for a workhorse outcome while voice is live. */
|
|
876
|
+
"coordinator_turn";
|
|
877
|
+
type CallbackBufferOverflowReason = "buffer_overflow" | "coalesced";
|
|
878
|
+
type CoordinatorCallbackDeliveryReason = CallbackBufferOverflowReason | "child_exit" | "disposed" | "invalid_callback" | "not_ready" | "own_change" | "prior_epoch" | "stale_child" | "stale_coordinator" | "stale_link" | "stale_session" | "voice_inactive" |
|
|
879
|
+
/** The host told this audience nothing of the change. */
|
|
880
|
+
"withheld" | "recorded_only" | "session_rejected" | "response_lost" | "transport_failure";
|
|
881
|
+
interface CoordinatorCallbackDeliveryBase {
|
|
882
|
+
readonly kind: "coordinator_callback_delivery";
|
|
883
|
+
readonly callback: CoordinatorCallback | null;
|
|
884
|
+
/** Monotonic first-seen order assigned by this callback owner. */
|
|
885
|
+
readonly sourceOrder: number;
|
|
234
886
|
readonly freshness: {
|
|
235
887
|
readonly capturedAtMs: number;
|
|
236
888
|
readonly freshUntilMs: number;
|
|
237
|
-
}
|
|
889
|
+
};
|
|
890
|
+
readonly path: CoordinatorCallbackDeliveryPath;
|
|
891
|
+
readonly reason: CoordinatorCallbackDeliveryReason | null;
|
|
892
|
+
readonly text: string | null;
|
|
893
|
+
readonly realtimeRequest: CoordinatorCallbackRealtimeRequest | null;
|
|
238
894
|
}
|
|
239
|
-
|
|
240
|
-
readonly
|
|
241
|
-
readonly
|
|
242
|
-
readonly
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
895
|
+
type CoordinatorCallbackDelivery = CoordinatorCallbackDeliveryBase & ({
|
|
896
|
+
readonly attempted: false;
|
|
897
|
+
readonly attemptedAtMs: null;
|
|
898
|
+
readonly outcome: "not_delivered";
|
|
899
|
+
} | {
|
|
900
|
+
readonly attempted: true;
|
|
901
|
+
readonly attemptedAtMs: number;
|
|
902
|
+
readonly outcome: CoordinatorCallbackDeliveryOutcome;
|
|
903
|
+
});
|
|
904
|
+
interface CoordinatorCallbackHistory {
|
|
905
|
+
readonly deliveries: readonly CoordinatorCallbackDelivery[];
|
|
906
|
+
/** Records evicted before the retained suffix for this exact realtime generation. */
|
|
907
|
+
readonly omittedPrefixCount: number;
|
|
908
|
+
}
|
|
909
|
+
interface CoordinatorCallbacks {
|
|
910
|
+
readonly enqueue: (event: CoordinatorCallbackSource) => Promise<CoordinatorCallbackDelivery>;
|
|
911
|
+
/** Takes every Codex notification, and queues the workhorse news among them. */
|
|
912
|
+
readonly onNotification: (event: TransportServerNotification) => void;
|
|
913
|
+
/** Answers the workhorse's tell_coordinator call, queueing its message as workhorse news. */
|
|
914
|
+
readonly onServerRequest: (request: DynamicServerRequest) => void;
|
|
915
|
+
readonly flush: () => Promise<void>;
|
|
916
|
+
readonly inspect: () => readonly CoordinatorCallbackDelivery[];
|
|
917
|
+
readonly inspectHistory: (generation: CoordinatorCallbackRealtimeGeneration) => CoordinatorCallbackHistory;
|
|
918
|
+
readonly get: (event: CoordinatorCallbackSource) => CoordinatorCallbackDelivery | undefined;
|
|
919
|
+
readonly pendingCount: () => number;
|
|
920
|
+
readonly dispose: () => void;
|
|
253
921
|
}
|
|
254
|
-
interface
|
|
255
|
-
readonly
|
|
256
|
-
readonly
|
|
257
|
-
readonly
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
readonly
|
|
262
|
-
readonly
|
|
263
|
-
readonly
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
readonly
|
|
275
|
-
readonly
|
|
276
|
-
readonly
|
|
277
|
-
|
|
278
|
-
readonly
|
|
279
|
-
readonly
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
922
|
+
interface CodexRealtimeBinding {
|
|
923
|
+
readonly child: ChildId;
|
|
924
|
+
readonly epoch: ChildEpoch;
|
|
925
|
+
readonly linkedThreadId: ThreadId;
|
|
926
|
+
readonly coordinatorThreadId: ThreadId;
|
|
927
|
+
}
|
|
928
|
+
interface CodexRealtimeGeneration extends CodexRealtimeBinding {
|
|
929
|
+
readonly browserSessionId: RealtimeSessionId$1;
|
|
930
|
+
readonly browserCorrelationId: RealtimeCorrelationId;
|
|
931
|
+
readonly wireSessionId: RealtimeSessionId;
|
|
932
|
+
/** What the coordinator context read at this realtime start, byte for byte. */
|
|
933
|
+
readonly startBrief: string;
|
|
934
|
+
}
|
|
935
|
+
/** Server-owned protocol half; remote MediaStream attachment remains browser-local. */
|
|
936
|
+
interface CodexRealtimeAdapter extends Omit<RealtimeServer, "attachRemoteMedia" | "createOffer"> {
|
|
937
|
+
/**
|
|
938
|
+
* Accept the browser's offer and start the session, as an ordinary voice session or, given a
|
|
939
|
+
* narrative, one started to present it.
|
|
940
|
+
*/
|
|
941
|
+
readonly createOffer: (offer: CreateOfferSdp, narrative?: VoiceNarrative | null) => Promise<AnswerSdp>;
|
|
942
|
+
readonly onNotification: SessionNotificationHandler;
|
|
943
|
+
readonly transcript: () => readonly RealtimeTranscriptRecord[];
|
|
944
|
+
readonly generation: () => CodexRealtimeGeneration | null;
|
|
945
|
+
/** The narrative the live session presents, or null with none or an ordinary one. */
|
|
946
|
+
readonly narrative: () => VoiceNarrative | null;
|
|
947
|
+
readonly dispose: () => void;
|
|
948
|
+
}
|
|
949
|
+
declare const DYNAMIC_TOOL_REFUSAL_REASONS: readonly ["invalid_call", "not_ready", "not_loaded", "not_controllable", "system_error", "stale_child", "prior_epoch", "unknown_provenance", "approval_declined", "cycle", "busy", "expired", "unsupported"];
|
|
950
|
+
type DynamicToolRefusalReason = (typeof DYNAMIC_TOOL_REFUSAL_REASONS)[number];
|
|
951
|
+
/** Responses for calls that passed the coordinator's identity/manifest checks. */
|
|
952
|
+
declare const ValidDynamicToolResponseSchema: z.ZodObject<{
|
|
953
|
+
contentItems: z.ZodTuple<[z.ZodObject<{
|
|
954
|
+
type: z.ZodLiteral<"inputText">;
|
|
955
|
+
text: z.ZodString;
|
|
956
|
+
}, z.core.$strict>], null>;
|
|
957
|
+
success: z.ZodLiteral<true>;
|
|
958
|
+
}, z.core.$strict>;
|
|
959
|
+
/** Responses for calls rejected before a tool call could be established. */
|
|
960
|
+
declare const UnknownDynamicToolResponseSchema: z.ZodObject<{
|
|
961
|
+
contentItems: z.ZodTuple<[z.ZodObject<{
|
|
962
|
+
type: z.ZodLiteral<"inputText">;
|
|
963
|
+
text: z.ZodString;
|
|
964
|
+
}, z.core.$strict>], null>;
|
|
965
|
+
success: z.ZodLiteral<false>;
|
|
966
|
+
}, z.core.$strict>;
|
|
967
|
+
type ToolResponse = z.infer<typeof ValidDynamicToolResponseSchema> | z.infer<typeof UnknownDynamicToolResponseSchema>;
|
|
968
|
+
declare const ResolveSpokenApprovalInputSchema: z.ZodObject<{
|
|
969
|
+
verdict: z.ZodEnum<{
|
|
970
|
+
accept: "accept";
|
|
971
|
+
decline: "decline";
|
|
972
|
+
}>;
|
|
973
|
+
}, z.core.$strict>;
|
|
974
|
+
type ResolveSpokenApprovalInput = z.infer<typeof ResolveSpokenApprovalInputSchema>;
|
|
975
|
+
type SpokenApprovalGateState = "idle" | "awaiting_user" | "classifying" | "awaiting_resolver" | "resolving" | "settled" | "visual_fallback";
|
|
976
|
+
type SpokenApprovalFallbackReason = "approval_unavailable" | "not_eligible" | "coordinator_unavailable" | "realtime_unavailable" | "invalid_context" | "invalid_effect_prompt" | "user_already_spoke" | "missing_user_final" | "assistant_only" | "ambiguous" | "changed_effect" | "stale_realtime_session" | "stale_state" | "timeout" | "classifier_lost" | "resolver_lost" | "child_exit" | "disposed";
|
|
977
|
+
interface SpokenApprovalEffectPrompt {
|
|
978
|
+
readonly itemId: RealtimeItemId;
|
|
979
|
+
readonly sequence: number;
|
|
980
|
+
}
|
|
981
|
+
interface SpokenApprovalClassifierInput {
|
|
982
|
+
/** A server-issued operation identity; this module never mints one. */
|
|
983
|
+
readonly operationId: string;
|
|
984
|
+
/** A server-issued client message identity for the ordinary turn. */
|
|
985
|
+
readonly clientUserMessageId: string;
|
|
986
|
+
readonly context: WorkbenchExecutionContext;
|
|
987
|
+
readonly contextCodec: WorkbenchContextCodec;
|
|
988
|
+
}
|
|
989
|
+
interface SpokenApprovalArmInput {
|
|
990
|
+
readonly requestId: JsonRpcRequestId;
|
|
991
|
+
/** Must equal the broker-derived presentation for this request. */
|
|
992
|
+
readonly effectSummary: string;
|
|
993
|
+
readonly realtime: RealtimeCorrelation;
|
|
994
|
+
readonly effectPrompt: SpokenApprovalEffectPrompt;
|
|
995
|
+
readonly classifier: SpokenApprovalClassifierInput;
|
|
996
|
+
}
|
|
997
|
+
interface SpokenApprovalSnapshot {
|
|
998
|
+
readonly state: SpokenApprovalGateState;
|
|
999
|
+
readonly requestId: JsonRpcRequestId | null;
|
|
1000
|
+
readonly approvalId: ApprovalId | null;
|
|
1001
|
+
readonly child: ChildId | null;
|
|
1002
|
+
readonly epoch: ChildEpoch | null;
|
|
1003
|
+
readonly coordinatorThreadId: ThreadId | null;
|
|
1004
|
+
readonly realtimeSessionId: RealtimeCorrelation["sessionId"] | null;
|
|
1005
|
+
readonly realtimeCorrelationId: RealtimeCorrelation["correlationId"] | null;
|
|
1006
|
+
readonly effectSummary: string | null;
|
|
1007
|
+
readonly effectFingerprint: string | null;
|
|
1008
|
+
readonly effectPromptItemId: RealtimeItemId | null;
|
|
1009
|
+
readonly effectPromptSequence: number | null;
|
|
1010
|
+
readonly finalUserItemId: RealtimeItemId | null;
|
|
1011
|
+
readonly finalUserSequence: number | null;
|
|
1012
|
+
readonly finalUserText: string | null;
|
|
1013
|
+
readonly operationId: string | null;
|
|
1014
|
+
readonly classifierTurnId: TurnId | null;
|
|
1015
|
+
readonly resolverCallId: DynamicToolCallId | null;
|
|
1016
|
+
readonly expiresAtMs: number | null;
|
|
1017
|
+
readonly settlement: ApprovalSettlement | null;
|
|
1018
|
+
readonly reason: SpokenApprovalFallbackReason | null;
|
|
1019
|
+
}
|
|
1020
|
+
type SpokenApprovalToolResult = {
|
|
1021
|
+
readonly tag: "ok";
|
|
1022
|
+
readonly value: {
|
|
1023
|
+
readonly verdict: ResolveSpokenApprovalInput["verdict"];
|
|
1024
|
+
readonly settlement: ApprovalSettlement["outcome"];
|
|
1025
|
+
};
|
|
292
1026
|
} | {
|
|
293
1027
|
readonly tag: "refused";
|
|
294
|
-
readonly reason:
|
|
1028
|
+
readonly reason: DynamicToolRefusalReason;
|
|
295
1029
|
readonly message: string;
|
|
296
1030
|
};
|
|
1031
|
+
interface CodexSpokenApprovalGate {
|
|
1032
|
+
readonly arm: (input: SpokenApprovalArmInput) => SpokenApprovalSnapshot;
|
|
1033
|
+
readonly snapshot: () => SpokenApprovalSnapshot;
|
|
1034
|
+
readonly onSemanticEvent: (event: RealtimeSemanticEvent) => void;
|
|
1035
|
+
readonly onNotification: (event: TransportServerNotification) => void;
|
|
1036
|
+
readonly resolve: (request: DynamicServerRequest) => Promise<SpokenApprovalToolResult>;
|
|
1037
|
+
readonly onChildExit: (exit: {
|
|
1038
|
+
readonly child: ChildId;
|
|
1039
|
+
readonly epoch: ChildEpoch;
|
|
1040
|
+
}) => void;
|
|
1041
|
+
readonly dispose: () => void;
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* One authoritative queued submission, with the operation that queued
|
|
1045
|
+
* it when this workbench queued it.
|
|
1046
|
+
*
|
|
1047
|
+
* The queue port sets a submission's `clientUserMessageId` to the serialized
|
|
1048
|
+
* OperationId on every add it makes, so the composition root can recover the
|
|
1049
|
+
* operation from the authoritative list and hand it over here. A null operation
|
|
1050
|
+
* is a submission this workbench did not queue, and this chat has no authority to
|
|
1051
|
+
* reorder it.
|
|
1052
|
+
*/
|
|
1053
|
+
interface CodexQueuedSubmissionProjectionInput extends Pick<SessionQueuedSubmission, "id" | "input"> {
|
|
1054
|
+
readonly operationId: OperationId | null;
|
|
1055
|
+
}
|
|
1056
|
+
interface CodexQueueProjectionInput {
|
|
1057
|
+
readonly kind: "codex_queue";
|
|
1058
|
+
readonly submissions: readonly CodexQueuedSubmissionProjectionInput[] | null;
|
|
1059
|
+
}
|
|
297
1060
|
/**
|
|
298
1061
|
* The tab session a browser tab names on every chat socket: minted by the tab, kept
|
|
299
1062
|
* in its sessionStorage, shared by every chat of the tab. Opaque to the server beyond its bounds.
|
|
@@ -689,6 +1452,69 @@ interface WorkbenchDomainApprovals {
|
|
|
689
1452
|
readonly pending: (tabSessionId: TabSessionId) => readonly BrowserDynamicApproval[];
|
|
690
1453
|
readonly bindLease: (tabSessionId: TabSessionId, chatId: string, commandId: BrowserCommandId) => void;
|
|
691
1454
|
}
|
|
1455
|
+
declare const StopWorkhorsesResultSchema: z.ZodObject<{
|
|
1456
|
+
stopped: z.ZodArray<z.ZodObject<{
|
|
1457
|
+
checkout: z.ZodString;
|
|
1458
|
+
outcome: z.ZodEnum<{
|
|
1459
|
+
idle: "idle";
|
|
1460
|
+
partial: "partial";
|
|
1461
|
+
stopped: "stopped";
|
|
1462
|
+
unconfirmed: "unconfirmed";
|
|
1463
|
+
}>;
|
|
1464
|
+
remaining: z.ZodArray<z.ZodObject<{
|
|
1465
|
+
threadId: z.ZodString;
|
|
1466
|
+
state: z.ZodEnum<{
|
|
1467
|
+
queued: "queued";
|
|
1468
|
+
running: "running";
|
|
1469
|
+
unread: "unread";
|
|
1470
|
+
}>;
|
|
1471
|
+
}, z.core.$strict>>;
|
|
1472
|
+
recovery: z.ZodArray<z.ZodEnum<{
|
|
1473
|
+
inspect_workhorse: "inspect_workhorse";
|
|
1474
|
+
stop_workhorses: "stop_workhorses";
|
|
1475
|
+
}>>;
|
|
1476
|
+
}, z.core.$strict>>;
|
|
1477
|
+
}, z.core.$strip>;
|
|
1478
|
+
type StopWorkhorsesResult = z.infer<typeof StopWorkhorsesResultSchema>;
|
|
1479
|
+
declare const COORDINATOR_TOOLS_OWNER: "codex-coordinator-tools";
|
|
1480
|
+
type StopEntry = StopWorkhorsesResult["stopped"][number];
|
|
1481
|
+
/** What one stop observed of one workhorse's work tree, as the stop tool reports it. */
|
|
1482
|
+
interface CoordinatorToolStop {
|
|
1483
|
+
readonly checkout: string;
|
|
1484
|
+
readonly outcome: StopEntry["outcome"];
|
|
1485
|
+
readonly remaining: readonly StopEntry["remaining"][number][];
|
|
1486
|
+
}
|
|
1487
|
+
type CoordinatorToolsServerRequest = DynamicServerRequest & {
|
|
1488
|
+
readonly owner: typeof COORDINATOR_TOOLS_OWNER;
|
|
1489
|
+
};
|
|
1490
|
+
type DynamicToolResponse = ToolResponse;
|
|
1491
|
+
interface CoordinatorToolDispatchResult {
|
|
1492
|
+
readonly response: DynamicToolResponse;
|
|
1493
|
+
readonly attempted: boolean;
|
|
1494
|
+
}
|
|
1495
|
+
interface CoordinatorReplayStateSnapshot {
|
|
1496
|
+
readonly liveWireCount: number;
|
|
1497
|
+
readonly retainedWireCount: number;
|
|
1498
|
+
readonly liveLogicalCount: number;
|
|
1499
|
+
readonly retainedLogicalCount: number;
|
|
1500
|
+
readonly retainedFingerprintBytes: number;
|
|
1501
|
+
}
|
|
1502
|
+
type CoordinatorToolLifecycleCause = "call_cancelled" | "caller_turn_interrupted" | "server_shutdown" | "browser_disconnect" | "child_disconnect";
|
|
1503
|
+
interface CoordinatorToolDispatcher {
|
|
1504
|
+
readonly dispatch: (request: CoordinatorToolsServerRequest) => Promise<CoordinatorToolDispatchResult>;
|
|
1505
|
+
/** Listener-compatible entry point for the transport's exhaustive request stream. */
|
|
1506
|
+
readonly onServerRequest: (request: TransportServerRequest) => void;
|
|
1507
|
+
/** Stop a not-yet-attempted call without starting a replacement operation. */
|
|
1508
|
+
readonly cancel: (requestId: JsonRpcRequestId, cause: CoordinatorToolLifecycleCause) => void;
|
|
1509
|
+
/** Child disconnect prevents any later wire response and any retry. */
|
|
1510
|
+
readonly onChildExit: (exit: {
|
|
1511
|
+
readonly child: ChildId;
|
|
1512
|
+
readonly epoch: ChildEpoch;
|
|
1513
|
+
}) => void;
|
|
1514
|
+
/** Count-only replay ownership inspection. It never exposes calls, inputs, or responses. */
|
|
1515
|
+
readonly replayState: () => CoordinatorReplayStateSnapshot;
|
|
1516
|
+
readonly dispose: () => void;
|
|
1517
|
+
}
|
|
692
1518
|
type WorkhorseStartResponse = SessionResponse<"thread/start">;
|
|
693
1519
|
type WorkhorseApprovalPolicy = WorkhorseStartResponse["approvalPolicy"];
|
|
694
1520
|
type WorkhorseApprovalsReviewer = WorkhorseStartResponse["approvalsReviewer"];
|
|
@@ -707,7 +1533,7 @@ interface WorkhorseStartFacts {
|
|
|
707
1533
|
readonly cwd: string;
|
|
708
1534
|
readonly runtimeWorkspaceRoots: readonly string[];
|
|
709
1535
|
readonly historyMode: "paginated";
|
|
710
|
-
readonly source: typeof
|
|
1536
|
+
readonly source: ReturnType<typeof codexSessionThreadSource>;
|
|
711
1537
|
readonly threadSource: string;
|
|
712
1538
|
readonly model: string;
|
|
713
1539
|
readonly modelProvider: string;
|
|
@@ -768,6 +1594,15 @@ interface CodexWorkbenchWorkhorseState {
|
|
|
768
1594
|
readonly threadId: ThreadId;
|
|
769
1595
|
readonly turnId: TurnId;
|
|
770
1596
|
} | null;
|
|
1597
|
+
/** Where its last work tree stop stands, or null before any stop. */
|
|
1598
|
+
stop: WorkhorseStopPhase | null;
|
|
1599
|
+
/**
|
|
1600
|
+
* Every coordinator turn that asked for a stop; none of them starts work again. The workhorses
|
|
1601
|
+
* of one tab session share it, so a workhorse built after the stop refuses those turns too.
|
|
1602
|
+
*/
|
|
1603
|
+
readonly stopAskers: Set<TurnId>;
|
|
1604
|
+
/** Work it admitted that has not settled yet; a stop waits for it before it reads the tree. */
|
|
1605
|
+
readonly admitted: Set<Promise<void>>;
|
|
771
1606
|
}
|
|
772
1607
|
/** One workhorse of a tab session: the one for one checkout. */
|
|
773
1608
|
interface CodexWorkbenchWorkhorse {
|
|
@@ -779,44 +1614,39 @@ interface CodexWorkbenchWorkhorse {
|
|
|
779
1614
|
readonly actions: CodexWorkbenchWorkhorseActions;
|
|
780
1615
|
readonly state: CodexWorkbenchWorkhorseState;
|
|
781
1616
|
}
|
|
782
|
-
/**
|
|
1617
|
+
/** One thread of a work tree that a stop could not show ended. */
|
|
1618
|
+
interface RemainingWork {
|
|
1619
|
+
readonly threadId: ThreadId;
|
|
1620
|
+
/** Running: a turn still runs. Queued: a request still waits. Unread: Codex did not answer. */
|
|
1621
|
+
readonly state: CoordinatorToolStop["remaining"][number]["state"];
|
|
1622
|
+
}
|
|
1623
|
+
/**
|
|
1624
|
+
* What one stop observed of one workhorse's work tree: the workhorse thread and every sub-agent
|
|
1625
|
+
* it spawned. Stopped: all work that ran ended and no request waits. Idle: nothing ran or waited.
|
|
1626
|
+
* Partial: some work still runs or waits. Unconfirmed: nothing was seen running, but some thread
|
|
1627
|
+
* could not be read. Only stopped and idle prove that the work ended.
|
|
1628
|
+
*/
|
|
783
1629
|
interface WorkhorseStop {
|
|
784
1630
|
readonly checkout: string;
|
|
785
|
-
|
|
786
|
-
|
|
1631
|
+
readonly outcome: CoordinatorToolStop["outcome"];
|
|
1632
|
+
/** Each thread that still runs, waits or could not be read; empty when the stop ended all. */
|
|
1633
|
+
readonly remaining: readonly RemainingWork[];
|
|
787
1634
|
}
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
1635
|
+
/**
|
|
1636
|
+
* Where a workhorse's last stop stands. While it stops, and after a partial or unconfirmed stop,
|
|
1637
|
+
* it takes no new work. After a stop that ended everything, no coordinator turn that asked for a
|
|
1638
|
+
* stop starts work, so only a fresh request does.
|
|
1639
|
+
*/
|
|
1640
|
+
type WorkhorseStopPhase = {
|
|
1641
|
+
readonly kind: "stopping";
|
|
1642
|
+
readonly done: Promise<WorkhorseStop>;
|
|
1643
|
+
} | {
|
|
1644
|
+
readonly kind: "stopped";
|
|
1645
|
+
readonly stop: WorkhorseStop;
|
|
1646
|
+
} | {
|
|
1647
|
+
readonly kind: "unresolved";
|
|
1648
|
+
readonly stop: WorkhorseStop;
|
|
791
1649
|
};
|
|
792
|
-
type DynamicToolResponse = z.infer<typeof ValidDynamicToolResponseSchema> | z.infer<typeof UnknownDynamicToolResponseSchema>;
|
|
793
|
-
interface CoordinatorToolDispatchResult {
|
|
794
|
-
readonly response: DynamicToolResponse;
|
|
795
|
-
readonly attempted: boolean;
|
|
796
|
-
}
|
|
797
|
-
interface CoordinatorReplayStateSnapshot {
|
|
798
|
-
readonly liveWireCount: number;
|
|
799
|
-
readonly retainedWireCount: number;
|
|
800
|
-
readonly liveLogicalCount: number;
|
|
801
|
-
readonly retainedLogicalCount: number;
|
|
802
|
-
readonly retainedFingerprintBytes: number;
|
|
803
|
-
}
|
|
804
|
-
type CoordinatorToolLifecycleCause = "call_cancelled" | "caller_turn_interrupted" | "server_shutdown" | "browser_disconnect" | "child_disconnect";
|
|
805
|
-
interface CoordinatorToolDispatcher {
|
|
806
|
-
readonly dispatch: (request: CoordinatorToolsServerRequest) => Promise<CoordinatorToolDispatchResult>;
|
|
807
|
-
/** Listener-compatible entry point for the transport's exhaustive request stream. */
|
|
808
|
-
readonly onServerRequest: (request: TransportServerRequest) => void;
|
|
809
|
-
/** Stop a not-yet-attempted call without starting a replacement operation. */
|
|
810
|
-
readonly cancel: (requestId: JsonRpcRequestId, cause: CoordinatorToolLifecycleCause) => void;
|
|
811
|
-
/** Child disconnect prevents any later wire response and any retry. */
|
|
812
|
-
readonly onChildExit: (exit: {
|
|
813
|
-
readonly child: ChildId;
|
|
814
|
-
readonly epoch: ChildEpoch;
|
|
815
|
-
}) => void;
|
|
816
|
-
/** Count-only replay ownership inspection. It never exposes calls, inputs, or responses. */
|
|
817
|
-
readonly replayState: () => CoordinatorReplayStateSnapshot;
|
|
818
|
-
readonly dispose: () => void;
|
|
819
|
-
}
|
|
820
1650
|
/**
|
|
821
1651
|
* Where one coordinator turn shows: the conversation the tab showed when it started, and
|
|
822
1652
|
* the checkouts whose workhorses it gave work to.
|
|
@@ -896,6 +1726,8 @@ interface CodexWorkbenchTabSessionState {
|
|
|
896
1726
|
voiceCheckout: string | null;
|
|
897
1727
|
/** Live while its tab may still use it; ending once the tab has gone, until its threads unload. */
|
|
898
1728
|
phase: "live" | "ending";
|
|
1729
|
+
/** Every coordinator turn that asked this tab for a stop; it starts work on no workhorse again. */
|
|
1730
|
+
readonly stopAskers: Set<TurnId>;
|
|
899
1731
|
}
|
|
900
1732
|
/** One browser tab's conversation: its coordinator and voice, and a workhorse per checkout. */
|
|
901
1733
|
interface CodexWorkbenchTabSession {
|
|
@@ -910,10 +1742,11 @@ interface CodexWorkbenchTabSession {
|
|
|
910
1742
|
/** The workhorse voice is bound to: the one of the checkout voice last started from. */
|
|
911
1743
|
readonly voiceWorkhorse: () => CodexWorkbenchWorkhorse | null;
|
|
912
1744
|
/**
|
|
913
|
-
* Stop the workhorse of one checkout, or every workhorse of the tab when the
|
|
914
|
-
*
|
|
1745
|
+
* Stop the work tree of the workhorse of one checkout, or of every workhorse of the tab when the
|
|
1746
|
+
* checkout is null: its turn, every sub-agent it spawned and every queued request. Each answer
|
|
1747
|
+
* says what the stop observed. The coordinator turn that asked, if one did, starts no work after.
|
|
915
1748
|
*/
|
|
916
|
-
readonly stopWork: (checkout: string | null) => Promise<readonly WorkhorseStop[]>;
|
|
1749
|
+
readonly stopWork: (checkout: string | null, askedBy?: TurnId | null) => Promise<readonly WorkhorseStop[]>;
|
|
917
1750
|
}
|
|
918
1751
|
interface CodexWorkbenchSessions {
|
|
919
1752
|
/** The live session with this id, built the first time it is asked for or after it ended. */
|
|
@@ -1245,11 +2078,14 @@ interface VoiceAgentOptions {
|
|
|
1245
2078
|
readonly ownerDirectory?: string;
|
|
1246
2079
|
};
|
|
1247
2080
|
/**
|
|
1248
|
-
* How to run Codex:
|
|
1249
|
-
*
|
|
1250
|
-
*
|
|
2081
|
+
* How to run Codex: which executable, extra environment, PATH prefixes, secrets to redact from
|
|
2082
|
+
* diagnostics, and an optional callback that receives the process group. Read once, when the
|
|
2083
|
+
* agent is created. Without `executablePath`, the agent finds the installed `@openai/codex`
|
|
2084
|
+
* (under `installedIn`, or in the platform package of `releasedIn`) and proves it then, and
|
|
2085
|
+
* throws a `CodexExecutableError` when it cannot. Every start proves the executable again.
|
|
2086
|
+
* Default: the installed `@openai/codex`, anywhere Node resolution finds it.
|
|
1251
2087
|
*/
|
|
1252
|
-
readonly codex
|
|
2088
|
+
readonly codex?: VoiceAgentCodex;
|
|
1253
2089
|
/**
|
|
1254
2090
|
* The checkouts a workhorse may work in: absolute paths, or a function that returns the
|
|
1255
2091
|
* admitted path for a named checkout and null for a refused one.
|
|
@@ -1275,6 +2111,8 @@ interface VoiceAgentOptions {
|
|
|
1275
2111
|
/** Domain extensions; see {@link VoiceAgentExtensions}. */
|
|
1276
2112
|
readonly extensions?: VoiceAgentExtensions;
|
|
1277
2113
|
}
|
|
2114
|
+
/** The Codex process inputs, with the executable optional and where to find it when left out. */
|
|
2115
|
+
type VoiceAgentCodex = Omit<CreateCodexWorkbenchOptions["process"], "executablePath"> & NonNullable<Parameters<typeof resolveCodexExecutable>[0]>;
|
|
1278
2116
|
type Workbench = ReturnType<typeof createCodexWorkbench>;
|
|
1279
2117
|
/** The agent's private Codex process: idle, starting, ready, or failed, with its failure. */
|
|
1280
2118
|
type VoiceAgentStatus = ReturnType<Workbench["snapshot"]>;
|
|
@@ -1352,14 +2190,6 @@ interface VoiceAgent {
|
|
|
1352
2190
|
* @returns The agent's lifecycle and browser operations.
|
|
1353
2191
|
*/
|
|
1354
2192
|
export declare function createVoiceAgent(options: VoiceAgentOptions): VoiceAgent;
|
|
1355
|
-
/**
|
|
1356
|
-
* Project the owners' state into one validated browser snapshot, refusing
|
|
1357
|
-
* input that carries a secret or that the browser contract cannot represent.
|
|
1358
|
-
* @param model The browser schema owner.
|
|
1359
|
-
* @param input The owners' state for one chat.
|
|
1360
|
-
* @returns The projected snapshot, or the refusal.
|
|
1361
|
-
*/
|
|
1362
|
-
export declare function projectCodexBrowserState(model: BrowserProjectionModel, input: BrowserProjectionInput): BrowserProjectionResult;
|
|
1363
2193
|
/**
|
|
1364
2194
|
* The checkouts of a tab session's live workhorses: those that have a thread.
|
|
1365
2195
|
* @param session The tab session.
|
|
@@ -1371,4 +2201,4 @@ declare function liveWorkhorseCheckouts(session: Pick<CodexWorkbenchTabSession,
|
|
|
1371
2201
|
* @returns The ledger.
|
|
1372
2202
|
*/
|
|
1373
2203
|
declare function createBrowserLeaseLedger(): BrowserLeaseLedger;
|
|
1374
|
-
export { type
|
|
2204
|
+
export { type ContextChange, type TabSessionId, type VoiceAgent, type VoiceAgentBrowserPort, type VoiceAgentExtensions, type VoiceAgentOptions, createBrowserLeaseLedger, createServerCodexBrowserSocketOwner, createServerCodexBrowserSocketSend, liveWorkhorseCheckouts, mountVoiceStartTraceRoute };
|