@opengeni/sdk 0.29.0 → 0.32.1
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 +12 -4
- package/dist/client.d.ts +643 -0
- package/dist/desktop.d.ts +71 -0
- package/dist/errors.d.ts +39 -0
- package/dist/index.d.ts +25 -4211
- package/dist/index.js +195 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp-output.d.ts +15 -0
- package/dist/preference-registry.d.ts +169 -0
- package/dist/proxy.d.ts +64 -0
- package/dist/sse.d.ts +14 -0
- package/dist/stream.d.ts +48 -0
- package/dist/terminal.d.ts +49 -0
- package/dist/transcription.d.ts +189 -0
- package/dist/types.d.ts +3221 -0
- package/dist/workspace-control-stream.d.ts +12 -0
- package/dist/workspace-instruction-policies.d.ts +98 -0
- package/dist/workspace-state.d.ts +122 -0
- package/package.json +3 -3
- package/src/client.ts +279 -2
- package/src/index.ts +65 -0
- package/src/preference-registry.ts +210 -0
- package/src/transcription.ts +16 -0
- package/src/types.ts +254 -1
- package/src/workspace-state.ts +134 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,4211 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/** Whether the accepted adapter may identify distinct speakers. */
|
|
27
|
-
diarization: {
|
|
28
|
-
enabled: boolean;
|
|
29
|
-
maxSpeakers: number | null;
|
|
30
|
-
};
|
|
31
|
-
retention: {
|
|
32
|
-
mode: "none" | "provider-policy";
|
|
33
|
-
maxDays: number | null;
|
|
34
|
-
};
|
|
35
|
-
privacy: {
|
|
36
|
-
allowProviderLogging: boolean;
|
|
37
|
-
allowProviderTraining: boolean;
|
|
38
|
-
};
|
|
39
|
-
fallback: {
|
|
40
|
-
mode: "disabled" | "explicit";
|
|
41
|
-
targets: WorkspaceTranscriptionTarget[];
|
|
42
|
-
};
|
|
43
|
-
cost: {
|
|
44
|
-
currency: "USD";
|
|
45
|
-
maxPerHour: number | null;
|
|
46
|
-
maxPerMonth: number | null;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
declare const DEFAULT_WORKSPACE_TRANSCRIPTION_POLICY: WorkspaceTranscriptionPolicy;
|
|
50
|
-
type TranscriptionAdapterDescriptor = {
|
|
51
|
-
provider: string;
|
|
52
|
-
model: string | null;
|
|
53
|
-
credentialMode: TranscriptionCredentialMode;
|
|
54
|
-
region: string | null;
|
|
55
|
-
};
|
|
56
|
-
type TranscriptionTargetSelection = {
|
|
57
|
-
kind: "primary";
|
|
58
|
-
} | {
|
|
59
|
-
kind: "fallback";
|
|
60
|
-
index: number;
|
|
61
|
-
};
|
|
62
|
-
type TranscriptionPolicyBlockReason = "disabled" | "unaccepted" | "target_missing" | "fallback_disabled" | "fallback_unaccepted" | "provider_mismatch" | "model_mismatch" | "credential_mode_mismatch" | "region_mismatch";
|
|
63
|
-
type TranscriptionAuthorization = {
|
|
64
|
-
authorized: true;
|
|
65
|
-
acceptanceId: string;
|
|
66
|
-
target: WorkspaceTranscriptionTarget;
|
|
67
|
-
selection: TranscriptionTargetSelection;
|
|
68
|
-
} | {
|
|
69
|
-
authorized: false;
|
|
70
|
-
reason: TranscriptionPolicyBlockReason;
|
|
71
|
-
};
|
|
72
|
-
type TranscriptionLifecycleStatus = "idle" | "requesting-permission" | "listening" | "reconnecting" | "cancelling" | "closed" | "error";
|
|
73
|
-
type TranscriptionErrorCode = "permission_denied" | "not_supported" | "network" | "provider" | "policy_blocked" | "timeout" | "cancelled" | "unknown";
|
|
74
|
-
type TranscriptionTimeSpan = {
|
|
75
|
-
startMilliseconds: number;
|
|
76
|
-
endMilliseconds: number;
|
|
77
|
-
};
|
|
78
|
-
type TranscriptionSpeaker = {
|
|
79
|
-
/** Provider-neutral identity stable within the local transcription session. */
|
|
80
|
-
id: string;
|
|
81
|
-
label?: string | undefined;
|
|
82
|
-
};
|
|
83
|
-
type TranscriptionWord = {
|
|
84
|
-
text: string;
|
|
85
|
-
span: TranscriptionTimeSpan;
|
|
86
|
-
confidence?: number | undefined;
|
|
87
|
-
speaker?: TranscriptionSpeaker | undefined;
|
|
88
|
-
};
|
|
89
|
-
/** Optional result detail; adapters omit fields their provider cannot supply. */
|
|
90
|
-
type TranscriptionResultMetadata = {
|
|
91
|
-
detectedLanguage?: string | undefined;
|
|
92
|
-
span?: TranscriptionTimeSpan | undefined;
|
|
93
|
-
confidence?: number | undefined;
|
|
94
|
-
speaker?: TranscriptionSpeaker | undefined;
|
|
95
|
-
words?: TranscriptionWord[] | undefined;
|
|
96
|
-
};
|
|
97
|
-
type TranscriptionDiagnostic = {
|
|
98
|
-
operation: "start" | "session" | "cancel" | "close";
|
|
99
|
-
code: TranscriptionErrorCode;
|
|
100
|
-
/** Diagnostic-only detail. React sanitizes and bounds this before forwarding it. */
|
|
101
|
-
detail: string;
|
|
102
|
-
};
|
|
103
|
-
type TranscriptionEventBase = {
|
|
104
|
-
/** Stable across reconnects and explicitly accepted fallback attempts. */
|
|
105
|
-
localSessionId: string;
|
|
106
|
-
/** Adapter-monotonic across the entire local session, including replay. */
|
|
107
|
-
sequence: number;
|
|
108
|
-
occurredAt: string;
|
|
109
|
-
};
|
|
110
|
-
type TranscriptionEvent = (TranscriptionEventBase & {
|
|
111
|
-
type: "permission.requested";
|
|
112
|
-
}) | (TranscriptionEventBase & {
|
|
113
|
-
type: "session.opened";
|
|
114
|
-
providerSessionId: string;
|
|
115
|
-
}) | (TranscriptionEventBase & {
|
|
116
|
-
type: "transcript.partial";
|
|
117
|
-
segmentId: string;
|
|
118
|
-
text: string;
|
|
119
|
-
metadata?: TranscriptionResultMetadata | undefined;
|
|
120
|
-
}) | (TranscriptionEventBase & {
|
|
121
|
-
type: "transcript.final";
|
|
122
|
-
segmentId: string;
|
|
123
|
-
text: string;
|
|
124
|
-
/** Stable provider/coordinator acceptance identity used for dedupe. */
|
|
125
|
-
providerAcceptanceId: string;
|
|
126
|
-
metadata?: TranscriptionResultMetadata | undefined;
|
|
127
|
-
}) | (TranscriptionEventBase & {
|
|
128
|
-
type: "usage";
|
|
129
|
-
audioMilliseconds: number;
|
|
130
|
-
costUsd: number | null;
|
|
131
|
-
}) | (TranscriptionEventBase & {
|
|
132
|
-
type: "session.reconnecting";
|
|
133
|
-
attempt: number;
|
|
134
|
-
reason: string;
|
|
135
|
-
}) | (TranscriptionEventBase & {
|
|
136
|
-
type: "session.error";
|
|
137
|
-
code: TranscriptionErrorCode;
|
|
138
|
-
recoverable: boolean;
|
|
139
|
-
}) | (TranscriptionEventBase & {
|
|
140
|
-
type: "session.closed";
|
|
141
|
-
reason: "completed" | "cancelled" | "error" | "replaced";
|
|
142
|
-
});
|
|
143
|
-
type TranscriptionSessionRequest = {
|
|
144
|
-
localSessionId: string;
|
|
145
|
-
policyAcceptanceId: string;
|
|
146
|
-
selection: TranscriptionTargetSelection;
|
|
147
|
-
target: WorkspaceTranscriptionTarget;
|
|
148
|
-
language: string | null;
|
|
149
|
-
autoDetectLanguage: boolean;
|
|
150
|
-
diarization: WorkspaceTranscriptionPolicy["diarization"];
|
|
151
|
-
retention: WorkspaceTranscriptionPolicy["retention"];
|
|
152
|
-
privacy: WorkspaceTranscriptionPolicy["privacy"];
|
|
153
|
-
cost: WorkspaceTranscriptionPolicy["cost"];
|
|
154
|
-
/** A replacement/reconnect adapter must emit events above this floor. */
|
|
155
|
-
sequenceFloor: number;
|
|
156
|
-
};
|
|
157
|
-
type TranscriptionEventListener = (event: TranscriptionEvent) => void;
|
|
158
|
-
type TranscriptionAdapterStartContext = {
|
|
159
|
-
/** Aborted on local cancellation, policy replacement, timeout, or unmount. */
|
|
160
|
-
signal: AbortSignal;
|
|
161
|
-
/** Non-UI observability seam; callers receive only bounded, redacted detail. */
|
|
162
|
-
reportDiagnostic: (diagnostic: TranscriptionDiagnostic) => void;
|
|
163
|
-
};
|
|
164
|
-
type TranscriptionSession = {
|
|
165
|
-
readonly localSessionId: string;
|
|
166
|
-
cancel(reason?: string): Promise<void>;
|
|
167
|
-
close(): Promise<void>;
|
|
168
|
-
};
|
|
169
|
-
type TranscriptionAdapter = {
|
|
170
|
-
readonly descriptor: TranscriptionAdapterDescriptor;
|
|
171
|
-
start(request: TranscriptionSessionRequest, listener: TranscriptionEventListener, context: TranscriptionAdapterStartContext): Promise<TranscriptionSession>;
|
|
172
|
-
};
|
|
173
|
-
/** Invalid or absent settings always resolve to the fail-closed default. */
|
|
174
|
-
declare function resolveWorkspaceTranscriptionPolicy(settings: unknown): WorkspaceTranscriptionPolicy;
|
|
175
|
-
/**
|
|
176
|
-
* Speech authorization is intentionally independent from turn model policy.
|
|
177
|
-
* Every selected adapter must match one exact admin-accepted target.
|
|
178
|
-
*/
|
|
179
|
-
declare function authorizeTranscriptionAdapter(policy: WorkspaceTranscriptionPolicy, descriptor: TranscriptionAdapterDescriptor, selection?: TranscriptionTargetSelection): TranscriptionAuthorization;
|
|
180
|
-
declare function createTranscriptionSessionRequest(input: {
|
|
181
|
-
policy: WorkspaceTranscriptionPolicy;
|
|
182
|
-
adapter: TranscriptionAdapter;
|
|
183
|
-
localSessionId: string;
|
|
184
|
-
selection?: TranscriptionTargetSelection | undefined;
|
|
185
|
-
sequenceFloor?: number | undefined;
|
|
186
|
-
}): TranscriptionSessionRequest | null;
|
|
187
|
-
|
|
188
|
-
type SessionStatus = "queued" | "running" | "idle" | "requires_action" | "recovering" | "waiting_capacity" | "failed" | "cancelled";
|
|
189
|
-
type SandboxBackend = "docker" | "modal" | "local" | "none" | "daytona" | "runloop" | "e2b" | "blaxel" | "cloudflare" | "vercel" | "selfhosted";
|
|
190
|
-
type SandboxOs = "linux" | "macos" | "windows";
|
|
191
|
-
type SandboxCapabilityName = "FileSystem" | "Terminal" | "Git" | "DesktopStream" | "Recording";
|
|
192
|
-
type CapabilityUnavailableReason = "backend_unsupported" | "os_unsupported" | "not_provisioned" | "disabled_by_policy" | "lease_cold" | "tier_headless" | "agent_offline" | "agent_reconnecting" | "consent_required" | "display_unavailable";
|
|
193
|
-
type SessionCapabilities = {
|
|
194
|
-
sessionId: string;
|
|
195
|
-
backend: SandboxBackend;
|
|
196
|
-
os: SandboxOs;
|
|
197
|
-
liveness: "cold" | "warming" | "warm" | "draining";
|
|
198
|
-
leaseEpoch: number;
|
|
199
|
-
workspaceGeneration: number | null;
|
|
200
|
-
archiveGeneration: number | null;
|
|
201
|
-
archiveComplete: boolean;
|
|
202
|
-
viewerHeartbeatIntervalMs: number;
|
|
203
|
-
FileSystem: {
|
|
204
|
-
available: boolean;
|
|
205
|
-
readOnly: boolean;
|
|
206
|
-
root: string;
|
|
207
|
-
pathSep: "/" | "\\";
|
|
208
|
-
treeMode: "lazy" | "snapshot";
|
|
209
|
-
reason: CapabilityUnavailableReason | null;
|
|
210
|
-
};
|
|
211
|
-
Terminal: {
|
|
212
|
-
transport: "sse-events" | "pty-ws" | null;
|
|
213
|
-
ptyCapable: boolean;
|
|
214
|
-
shell: string;
|
|
215
|
-
url: string | null;
|
|
216
|
-
token: string | null;
|
|
217
|
-
reason: CapabilityUnavailableReason | null;
|
|
218
|
-
};
|
|
219
|
-
Git: {
|
|
220
|
-
available: boolean;
|
|
221
|
-
repos: string[];
|
|
222
|
-
reason: CapabilityUnavailableReason | null;
|
|
223
|
-
};
|
|
224
|
-
DesktopStream: {
|
|
225
|
-
transport: "vnc-ws" | "rdp-ws" | "webrtc" | "relay-frames" | null;
|
|
226
|
-
client: "novnc" | "web-rdp" | "frames" | null;
|
|
227
|
-
mode: "read-only" | "interactive";
|
|
228
|
-
url: string | null;
|
|
229
|
-
token: string | null;
|
|
230
|
-
expiresAt: string | null;
|
|
231
|
-
resolution: [number, number];
|
|
232
|
-
unredacted: boolean;
|
|
233
|
-
requiresAcknowledgment: boolean;
|
|
234
|
-
acknowledged: boolean;
|
|
235
|
-
shared: boolean;
|
|
236
|
-
sharedSessionIds: string[];
|
|
237
|
-
reason: CapabilityUnavailableReason | null;
|
|
238
|
-
};
|
|
239
|
-
Recording: {
|
|
240
|
-
available: boolean;
|
|
241
|
-
modes: ("manual" | "on-turn" | "on-verify")[];
|
|
242
|
-
codecs: ("h264-mp4" | "vp9-webm")[];
|
|
243
|
-
reason: CapabilityUnavailableReason | null;
|
|
244
|
-
};
|
|
245
|
-
ComputerUse: {
|
|
246
|
-
available: boolean;
|
|
247
|
-
readOnly: boolean;
|
|
248
|
-
reason: CapabilityUnavailableReason | null;
|
|
249
|
-
};
|
|
250
|
-
negotiatedAt: string;
|
|
251
|
-
};
|
|
252
|
-
type FileSystemCapability = SessionCapabilities["FileSystem"];
|
|
253
|
-
type TerminalCapability = SessionCapabilities["Terminal"];
|
|
254
|
-
type GitCapability = SessionCapabilities["Git"];
|
|
255
|
-
type DesktopStreamCapability = SessionCapabilities["DesktopStream"];
|
|
256
|
-
type RecordingCapability = SessionCapabilities["Recording"];
|
|
257
|
-
type ComputerUseCapability = SessionCapabilities["ComputerUse"];
|
|
258
|
-
type StreamUrlRotatedPayload = {
|
|
259
|
-
url: string;
|
|
260
|
-
token: string | null;
|
|
261
|
-
expiresAt: string | null;
|
|
262
|
-
leaseEpoch: number;
|
|
263
|
-
transport: "vnc-ws";
|
|
264
|
-
viewerId: string | null;
|
|
265
|
-
};
|
|
266
|
-
type StreamOpenedPayload = {
|
|
267
|
-
viewerId: string;
|
|
268
|
-
shared: boolean;
|
|
269
|
-
viewerCount: number;
|
|
270
|
-
};
|
|
271
|
-
type StreamClosedPayload = {
|
|
272
|
-
viewerId: string;
|
|
273
|
-
reason: "client-disconnect" | "reaped" | "revoked" | "box-rollover";
|
|
274
|
-
viewerCount: number;
|
|
275
|
-
};
|
|
276
|
-
type StreamRevokedPayload = {
|
|
277
|
-
viewerId: string | null;
|
|
278
|
-
reason: "grant-revoked" | "session-failed" | "admin";
|
|
279
|
-
};
|
|
280
|
-
type AttachViewerRequest = {
|
|
281
|
-
viewerId?: string | undefined;
|
|
282
|
-
desktop?: boolean | undefined;
|
|
283
|
-
};
|
|
284
|
-
type ViewerHolder = {
|
|
285
|
-
viewerId: string;
|
|
286
|
-
sandboxGroupId: string;
|
|
287
|
-
liveness: "cold" | "warming" | "warm" | "draining";
|
|
288
|
-
leaseEpoch: number;
|
|
289
|
-
workspaceGeneration: number | null;
|
|
290
|
-
archiveGeneration: number | null;
|
|
291
|
-
archiveComplete: boolean;
|
|
292
|
-
viewerHeartbeatIntervalMs: number;
|
|
293
|
-
dataPlaneUrl: string | null;
|
|
294
|
-
};
|
|
295
|
-
type AttachViewerResponse = ViewerHolder & {
|
|
296
|
-
streamToken: string | null;
|
|
297
|
-
streamExpiresAt: string | null;
|
|
298
|
-
resolution: [number, number] | null;
|
|
299
|
-
transport: "vnc-ws" | null;
|
|
300
|
-
client: "novnc" | null;
|
|
301
|
-
terminalUrl: string | null;
|
|
302
|
-
terminalToken: string | null;
|
|
303
|
-
terminalTransport: "pty-ws" | null;
|
|
304
|
-
};
|
|
305
|
-
type AcknowledgeStreamRequest = {
|
|
306
|
-
acknowledgeUnredacted?: boolean | undefined;
|
|
307
|
-
acknowledgeShared?: boolean | undefined;
|
|
308
|
-
};
|
|
309
|
-
type AcknowledgeStreamResponse = {
|
|
310
|
-
acknowledged: boolean;
|
|
311
|
-
acknowledgedShared: boolean;
|
|
312
|
-
};
|
|
313
|
-
type ViewerHeartbeatRequest = {
|
|
314
|
-
leaseEpoch: number;
|
|
315
|
-
};
|
|
316
|
-
type ViewerHeartbeatResponse = {
|
|
317
|
-
alive: boolean;
|
|
318
|
-
};
|
|
319
|
-
type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
320
|
-
type GitCredentialProvider = "github" | "gitlab" | "azure_devops";
|
|
321
|
-
type GitCredentialBindingId = string;
|
|
322
|
-
type GitRepositoryAccess = "read" | "write";
|
|
323
|
-
type RepositoryResourceRef = {
|
|
324
|
-
kind: "repository";
|
|
325
|
-
uri: string;
|
|
326
|
-
ref: string;
|
|
327
|
-
/**
|
|
328
|
-
* Optional workspace-relative override. When omitted, OpenGeni persists
|
|
329
|
-
* `repos/<encoded-host>/<owner>/<repo>` so equal names on different Git
|
|
330
|
-
* providers do not collide. Explicit paths are portable, traversal-free, and
|
|
331
|
-
* collision-checked case-insensitively before sandbox execution.
|
|
332
|
-
*/
|
|
333
|
-
mountPath?: string | undefined;
|
|
334
|
-
subpath?: string | undefined;
|
|
335
|
-
provider?: GitCredentialProvider | undefined;
|
|
336
|
-
credentialBindingId?: GitCredentialBindingId | undefined;
|
|
337
|
-
access?: GitRepositoryAccess | undefined;
|
|
338
|
-
repositoryId?: number | string | undefined;
|
|
339
|
-
installationId?: number | string | undefined;
|
|
340
|
-
projectId?: number | string | undefined;
|
|
341
|
-
connectionId?: string | undefined;
|
|
342
|
-
githubInstallationId?: number | undefined;
|
|
343
|
-
githubRepositoryId?: number | undefined;
|
|
344
|
-
};
|
|
345
|
-
type FileResourceRef = {
|
|
346
|
-
kind: "file";
|
|
347
|
-
fileId: string;
|
|
348
|
-
/** Optional workspace-relative override; defaults to `files/<file-id>`. */
|
|
349
|
-
mountPath?: string | undefined;
|
|
350
|
-
};
|
|
351
|
-
type ResourceRef = RepositoryResourceRef | FileResourceRef;
|
|
352
|
-
type ToolRef = {
|
|
353
|
-
kind: "mcp";
|
|
354
|
-
id: string;
|
|
355
|
-
optional?: boolean | undefined;
|
|
356
|
-
};
|
|
357
|
-
type SessionToolPolicy = {
|
|
358
|
-
mode: "workspace_default" | "explicit" | "inherited";
|
|
359
|
-
inheritedFromSessionId: string | null;
|
|
360
|
-
};
|
|
361
|
-
type UpdateSessionToolPolicyRequest = {
|
|
362
|
-
mode: "workspace_default";
|
|
363
|
-
expectedVersion: number;
|
|
364
|
-
} | {
|
|
365
|
-
mode: "explicit";
|
|
366
|
-
tools: ToolRef[];
|
|
367
|
-
firstPartyMcpTools: FirstPartyMcpToolName[];
|
|
368
|
-
expectedVersion: number;
|
|
369
|
-
};
|
|
370
|
-
type SessionEffectiveToolPolicy = {
|
|
371
|
-
mode: SessionToolPolicy["mode"];
|
|
372
|
-
inheritedFromSessionId: string | null;
|
|
373
|
-
selectedIds: string[];
|
|
374
|
-
effectiveIds: string[];
|
|
375
|
-
mandatoryIds: string[];
|
|
376
|
-
lazyRouter: {
|
|
377
|
-
state: "required" | "disabled";
|
|
378
|
-
deferredIds: string[];
|
|
379
|
-
};
|
|
380
|
-
configuredIds: string[];
|
|
381
|
-
droppedIds: string[];
|
|
382
|
-
counts: {
|
|
383
|
-
selected: number;
|
|
384
|
-
effective: number;
|
|
385
|
-
mandatory: number;
|
|
386
|
-
deferred: number;
|
|
387
|
-
configured: number;
|
|
388
|
-
dropped: number;
|
|
389
|
-
};
|
|
390
|
-
idsTruncated: boolean;
|
|
391
|
-
};
|
|
392
|
-
type GoalSpec = {
|
|
393
|
-
text: string;
|
|
394
|
-
successCriteria?: string | undefined;
|
|
395
|
-
maxAutoContinuations?: number | undefined;
|
|
396
|
-
};
|
|
397
|
-
type SessionMcpServerInput = {
|
|
398
|
-
id: string;
|
|
399
|
-
name?: string | undefined;
|
|
400
|
-
url: string;
|
|
401
|
-
allowedTools?: string[] | undefined;
|
|
402
|
-
timeoutMs?: number | undefined;
|
|
403
|
-
cacheToolsList?: boolean | undefined;
|
|
404
|
-
/** Require human approval for every tool, or only the listed unprefixed tool names. */
|
|
405
|
-
requireApproval?: boolean | string[] | undefined;
|
|
406
|
-
headers?: Record<string, string> | undefined;
|
|
407
|
-
connectionRef?: McpServerConnectionRef | undefined;
|
|
408
|
-
};
|
|
409
|
-
type SessionMcpCredentialUpdateInput = {
|
|
410
|
-
id: string;
|
|
411
|
-
headers: Record<string, string>;
|
|
412
|
-
};
|
|
413
|
-
type SessionMcpApprovalPolicy = boolean | string[];
|
|
414
|
-
type SessionMcpServerMetadata = {
|
|
415
|
-
id: string;
|
|
416
|
-
name: string | null;
|
|
417
|
-
url: string;
|
|
418
|
-
headerNames: string[];
|
|
419
|
-
credentialVersion: number;
|
|
420
|
-
requireApproval: SessionMcpApprovalPolicy;
|
|
421
|
-
connectionRef: McpServerConnectionRef | null;
|
|
422
|
-
};
|
|
423
|
-
type UpdateSessionMcpApprovalPolicyRequest = {
|
|
424
|
-
requireApproval: SessionMcpApprovalPolicy;
|
|
425
|
-
};
|
|
426
|
-
type UpdateSessionMcpApprovalPolicyResponse = {
|
|
427
|
-
server: SessionMcpServerMetadata;
|
|
428
|
-
effectiveFrom: "next_attempt";
|
|
429
|
-
};
|
|
430
|
-
type ConnectionKind = "oauth2" | "api_key" | "app_install" | "delegated";
|
|
431
|
-
type ConnectionStatus = "active" | "needs_reauth" | "revoked" | "error";
|
|
432
|
-
type McpServerConnectionRef = {
|
|
433
|
-
connectionId?: string | undefined;
|
|
434
|
-
provider?: string | undefined;
|
|
435
|
-
providerDomain: string;
|
|
436
|
-
kind?: ConnectionKind | undefined;
|
|
437
|
-
scopes?: string[] | undefined;
|
|
438
|
-
resource?: string | undefined;
|
|
439
|
-
selectedResources?: Array<{
|
|
440
|
-
id: string;
|
|
441
|
-
kind: "repository";
|
|
442
|
-
}> | undefined;
|
|
443
|
-
subjectScope?: "workspace" | "subject" | undefined;
|
|
444
|
-
};
|
|
445
|
-
type ConnectionMetadata = {
|
|
446
|
-
id: string;
|
|
447
|
-
accountId: string;
|
|
448
|
-
workspaceId: string;
|
|
449
|
-
subjectId: string | null;
|
|
450
|
-
providerDomain: string;
|
|
451
|
-
kind: ConnectionKind;
|
|
452
|
-
status: ConnectionStatus;
|
|
453
|
-
grantedScopes: string[];
|
|
454
|
-
expiresAt: string | null;
|
|
455
|
-
lastRefreshAt: string | null;
|
|
456
|
-
lastUsedAt: string | null;
|
|
457
|
-
lastError: string | null;
|
|
458
|
-
version: number;
|
|
459
|
-
verifiedInstallAt?: string | null;
|
|
460
|
-
verifiedInstallVersion?: number | null;
|
|
461
|
-
metadata: Record<string, unknown>;
|
|
462
|
-
createdBySubjectId: string | null;
|
|
463
|
-
updatedBySubjectId: string | null;
|
|
464
|
-
createdAt: string;
|
|
465
|
-
updatedAt: string;
|
|
466
|
-
};
|
|
467
|
-
type CreateConnectionRequest = {
|
|
468
|
-
providerDomain: string;
|
|
469
|
-
kind: ConnectionKind;
|
|
470
|
-
subjectId?: string | null | undefined;
|
|
471
|
-
credential: Record<string, unknown>;
|
|
472
|
-
grantedScopes?: string[] | undefined;
|
|
473
|
-
expiresAt?: string | null | undefined;
|
|
474
|
-
metadata?: Record<string, unknown> | undefined;
|
|
475
|
-
};
|
|
476
|
-
type OpenGeniSlackBotInstallRequest = {
|
|
477
|
-
/** Existing OpenGeni Slack bot connection to reinstall in place. */
|
|
478
|
-
connectionId?: string | undefined;
|
|
479
|
-
};
|
|
480
|
-
type OpenGeniSlackBotInstallStart = {
|
|
481
|
-
authorizationUrl: string;
|
|
482
|
-
expiresAt: string;
|
|
483
|
-
};
|
|
484
|
-
type UpdateConnectionRequest = {
|
|
485
|
-
providerDomain?: string | undefined;
|
|
486
|
-
subjectId?: string | null | undefined;
|
|
487
|
-
kind?: ConnectionKind | undefined;
|
|
488
|
-
status?: ConnectionStatus | undefined;
|
|
489
|
-
credential?: Record<string, unknown> | undefined;
|
|
490
|
-
grantedScopes?: string[] | undefined;
|
|
491
|
-
expiresAt?: string | null | undefined;
|
|
492
|
-
metadata?: Record<string, unknown> | undefined;
|
|
493
|
-
};
|
|
494
|
-
type ConnectionResponse = {
|
|
495
|
-
connection: ConnectionMetadata;
|
|
496
|
-
};
|
|
497
|
-
type ListConnectionsResponse = {
|
|
498
|
-
connections: ConnectionMetadata[];
|
|
499
|
-
};
|
|
500
|
-
type OAuthStartRequest = {
|
|
501
|
-
providerDomain?: string | undefined;
|
|
502
|
-
mcpUrl?: string | undefined;
|
|
503
|
-
resource?: string | undefined;
|
|
504
|
-
requestedScopes?: string[] | undefined;
|
|
505
|
-
returnPath?: string | undefined;
|
|
506
|
-
connectionId?: string | undefined;
|
|
507
|
-
oauthClient?: {
|
|
508
|
-
clientId: string;
|
|
509
|
-
clientSecret?: string | undefined;
|
|
510
|
-
tokenEndpointAuthMethod?: "none" | "client_secret_post" | "client_secret_basic" | undefined;
|
|
511
|
-
} | undefined;
|
|
512
|
-
};
|
|
513
|
-
type OAuthStartResponse = {
|
|
514
|
-
state: string;
|
|
515
|
-
authorizationUrl: string | null;
|
|
516
|
-
expiresAt: string;
|
|
517
|
-
};
|
|
518
|
-
/** The immutable principal whose authority accepted a session or turn. */
|
|
519
|
-
type TurnInitiator = {
|
|
520
|
-
kind: "subject" | "service";
|
|
521
|
-
subjectId: string;
|
|
522
|
-
/** Display-only snapshot; never an authorization input. */
|
|
523
|
-
label?: string | undefined;
|
|
524
|
-
};
|
|
525
|
-
/** A trusted embedding host's causal machine/service principal. */
|
|
526
|
-
type ServiceTurnInitiator = TurnInitiator & {
|
|
527
|
-
kind: "service";
|
|
528
|
-
};
|
|
529
|
-
/** Bounded host provenance; OpenGeni-owned lineage keys are reserved. */
|
|
530
|
-
type ServiceTurnInitiatorContext = Record<string, unknown>;
|
|
531
|
-
type IntegrationClientMetadata = {
|
|
532
|
-
client_id: string;
|
|
533
|
-
client_name: "OpenGeni";
|
|
534
|
-
redirect_uris: string[];
|
|
535
|
-
token_endpoint_auth_method: "none";
|
|
536
|
-
grant_types: Array<"authorization_code" | "refresh_token">;
|
|
537
|
-
response_types: ["code"];
|
|
538
|
-
};
|
|
539
|
-
type Session = {
|
|
540
|
-
id: string;
|
|
541
|
-
workspaceId: string;
|
|
542
|
-
accountId: string;
|
|
543
|
-
status: SessionStatus;
|
|
544
|
-
initialMessage: string;
|
|
545
|
-
title: string | null;
|
|
546
|
-
titleSource: "user" | "agent" | null;
|
|
547
|
-
instructions: string | null;
|
|
548
|
-
resources: ResourceRef[];
|
|
549
|
-
skills: SessionSkill[];
|
|
550
|
-
tools: ToolRef[];
|
|
551
|
-
toolPolicy: SessionToolPolicy;
|
|
552
|
-
toolPolicyVersion: number;
|
|
553
|
-
effectiveToolPolicy?: SessionEffectiveToolPolicy | undefined;
|
|
554
|
-
metadata: Record<string, unknown>;
|
|
555
|
-
/** Frozen creator fact; later turns carry their own independent initiator. */
|
|
556
|
-
createdBy: TurnInitiator;
|
|
557
|
-
createdByContext: Record<string, unknown>;
|
|
558
|
-
model: string;
|
|
559
|
-
sandboxBackend: SandboxBackend;
|
|
560
|
-
sandboxOs: SandboxOs;
|
|
561
|
-
sandboxGroupId: string;
|
|
562
|
-
activeSandboxId: string | null;
|
|
563
|
-
activeEpoch: number;
|
|
564
|
-
variableSetId: string | null;
|
|
565
|
-
/** @deprecated use variableSetId */
|
|
566
|
-
environmentId: string | null;
|
|
567
|
-
rigId: string | null;
|
|
568
|
-
rigVersionId: string | null;
|
|
569
|
-
firstPartyMcpPermissions: string[] | null;
|
|
570
|
-
firstPartyMcpTools: FirstPartyMcpToolName[];
|
|
571
|
-
mcpServers: SessionMcpServerMetadata[];
|
|
572
|
-
parentSessionId: string | null;
|
|
573
|
-
/** Immutable server-authored nested-agent lineage and policy snapshot. */
|
|
574
|
-
rootSessionId: string;
|
|
575
|
-
nestedAgentDepth: number;
|
|
576
|
-
maxNestedAgentDepthOverride: number | null;
|
|
577
|
-
effectiveMaxNestedAgentDepth: number;
|
|
578
|
-
nestedAgentDepthPolicySource: "session" | "workspace" | "deployment" | "default";
|
|
579
|
-
nestedAgentDepthPolicySessionId: string | null;
|
|
580
|
-
createIdempotencyKey: string | null;
|
|
581
|
-
temporalWorkflowId: string | null;
|
|
582
|
-
activeTurnId: string | null;
|
|
583
|
-
queueVersion: number;
|
|
584
|
-
queueHeadPosition: number;
|
|
585
|
-
queueTailPosition: number;
|
|
586
|
-
effectiveControl: EffectiveSessionControl;
|
|
587
|
-
lastSequence: number;
|
|
588
|
-
/** Multi-account Codex (P1): the account this session is pinned to (null ⇒ follow workspace active). */
|
|
589
|
-
codexPinnedCredentialId?: string | null;
|
|
590
|
-
/** Multi-account Codex (P1): the account the most recent turn ran on (the "Running on:" indicator). */
|
|
591
|
-
codexLastCredentialId?: string | null;
|
|
592
|
-
/** Personal (authenticated subject) workspace pin state, never workspace-global. */
|
|
593
|
-
pinned?: boolean;
|
|
594
|
-
/** Stable pin ordering key; null when this subject has not pinned the session. */
|
|
595
|
-
pinnedAt?: string | null;
|
|
596
|
-
/** Optimistic pin-state revision; zero represents an absent pin relation. */
|
|
597
|
-
pinVersion?: number;
|
|
598
|
-
/** Server-authoritative descendant counts populated by session-list reads. */
|
|
599
|
-
treeStats?: {
|
|
600
|
-
directChildren: number;
|
|
601
|
-
totalDescendants: number;
|
|
602
|
-
runningDescendants: number;
|
|
603
|
-
queuedDescendants: number;
|
|
604
|
-
attentionDescendants: number;
|
|
605
|
-
pausedDescendants: number;
|
|
606
|
-
failedDescendants: number;
|
|
607
|
-
/** Counts are lower bounds rather than exact totals when true. */
|
|
608
|
-
truncated: boolean;
|
|
609
|
-
} | undefined;
|
|
610
|
-
createdAt: string;
|
|
611
|
-
updatedAt: string;
|
|
612
|
-
};
|
|
613
|
-
/** Additive receipt returned by POST /sessions. */
|
|
614
|
-
type CreateSessionResponse = Session & {
|
|
615
|
-
initialTurnId: string | null;
|
|
616
|
-
};
|
|
617
|
-
type SessionSummary = Session;
|
|
618
|
-
/** Canonical session-list page; pinned rows are excluded from ordinary pages. */
|
|
619
|
-
type SessionListResponse = {
|
|
620
|
-
pinned: Session[];
|
|
621
|
-
/** True when the server omitted older pins from its bounded pinned section. */
|
|
622
|
-
pinnedTruncated?: boolean;
|
|
623
|
-
sessions: Session[];
|
|
624
|
-
nextCursor: string | null;
|
|
625
|
-
};
|
|
626
|
-
type UpdateSessionPinRequest = {
|
|
627
|
-
pinned: boolean;
|
|
628
|
-
expectedVersion?: number;
|
|
629
|
-
};
|
|
630
|
-
type LineageNode = {
|
|
631
|
-
session: SessionSummary;
|
|
632
|
-
children: LineageNode[];
|
|
633
|
-
};
|
|
634
|
-
type SessionLineageResponse = {
|
|
635
|
-
ancestors: SessionSummary[];
|
|
636
|
-
children: LineageNode[];
|
|
637
|
-
truncated: boolean;
|
|
638
|
-
};
|
|
639
|
-
type SessionTurnStatus = "queued" | "running" | "requires_action" | "recovering" | "waiting_capacity" | "completed" | "failed" | "cancelled" | "superseded" | "withdrawn_for_edit";
|
|
640
|
-
type SessionTurnSource = "user" | "scheduled_task" | "api" | "goal" | "system" | "compaction";
|
|
641
|
-
type SessionTurn = {
|
|
642
|
-
id: string;
|
|
643
|
-
workspaceId: string;
|
|
644
|
-
sessionId: string;
|
|
645
|
-
triggerEventId: string;
|
|
646
|
-
temporalWorkflowId: string;
|
|
647
|
-
status: SessionTurnStatus;
|
|
648
|
-
source: SessionTurnSource;
|
|
649
|
-
position: number;
|
|
650
|
-
prompt: string;
|
|
651
|
-
resources: ResourceRef[];
|
|
652
|
-
tools: ToolRef[];
|
|
653
|
-
toolsProvided?: boolean | undefined;
|
|
654
|
-
model: string;
|
|
655
|
-
reasoningEffort: ReasoningEffort;
|
|
656
|
-
sandboxBackend: SandboxBackend;
|
|
657
|
-
sandboxOs: SandboxOs | null;
|
|
658
|
-
metadata: Record<string, unknown>;
|
|
659
|
-
version: number;
|
|
660
|
-
executionGeneration: number;
|
|
661
|
-
activeAttemptId: string | null;
|
|
662
|
-
lineage: Record<string, unknown>;
|
|
663
|
-
initiator: TurnInitiator;
|
|
664
|
-
initiatorContext: Record<string, unknown>;
|
|
665
|
-
cancelledBy?: string | null;
|
|
666
|
-
cancelReason?: string | null;
|
|
667
|
-
startedAt: string | null;
|
|
668
|
-
finishedAt: string | null;
|
|
669
|
-
createdAt: string;
|
|
670
|
-
updatedAt: string;
|
|
671
|
-
};
|
|
672
|
-
type HumanInputQuestionKind = "text" | "single_select" | "multi_select";
|
|
673
|
-
type HumanInputOption = {
|
|
674
|
-
id: string;
|
|
675
|
-
label: string;
|
|
676
|
-
description?: string | null | undefined;
|
|
677
|
-
};
|
|
678
|
-
type HumanInputQuestion = {
|
|
679
|
-
id: string;
|
|
680
|
-
kind: HumanInputQuestionKind;
|
|
681
|
-
prompt: string;
|
|
682
|
-
label?: string | null | undefined;
|
|
683
|
-
helpText?: string | null | undefined;
|
|
684
|
-
options: HumanInputOption[];
|
|
685
|
-
required: boolean;
|
|
686
|
-
allowOther: boolean;
|
|
687
|
-
validation?: {
|
|
688
|
-
minLength?: number | null | undefined;
|
|
689
|
-
maxLength?: number | null | undefined;
|
|
690
|
-
minSelections?: number | null | undefined;
|
|
691
|
-
maxSelections?: number | null | undefined;
|
|
692
|
-
} | null | undefined;
|
|
693
|
-
};
|
|
694
|
-
type HumanInputAnswer = {
|
|
695
|
-
questionId: string;
|
|
696
|
-
values: string[];
|
|
697
|
-
other?: string | null | undefined;
|
|
698
|
-
};
|
|
699
|
-
type HumanInputResponse = {
|
|
700
|
-
outcome: "answered";
|
|
701
|
-
answers: HumanInputAnswer[];
|
|
702
|
-
} | {
|
|
703
|
-
outcome: "skipped" | "expired" | "cancelled";
|
|
704
|
-
};
|
|
705
|
-
type SubmitHumanInputResponseRequest = {
|
|
706
|
-
outcome: "answered";
|
|
707
|
-
answers: HumanInputAnswer[];
|
|
708
|
-
} | {
|
|
709
|
-
outcome: "skipped";
|
|
710
|
-
};
|
|
711
|
-
type SessionHumanInputRequest = {
|
|
712
|
-
id: string;
|
|
713
|
-
workspaceId: string;
|
|
714
|
-
sessionId: string;
|
|
715
|
-
turnId: string;
|
|
716
|
-
turnGeneration: number;
|
|
717
|
-
creationAttemptId: string;
|
|
718
|
-
toolCallId: string;
|
|
719
|
-
status: "pending" | "answered" | "skipped" | "expired" | "cancelled";
|
|
720
|
-
questions: HumanInputQuestion[];
|
|
721
|
-
allowSkip: boolean;
|
|
722
|
-
response: HumanInputResponse | null;
|
|
723
|
-
respondedBy: string | null;
|
|
724
|
-
respondedAt: string | null;
|
|
725
|
-
expiresAt: string | null;
|
|
726
|
-
createdAt: string;
|
|
727
|
-
updatedAt: string;
|
|
728
|
-
};
|
|
729
|
-
declare const SESSION_EVENT_TYPES: readonly ["session.created", "session.event.envelope_omitted", "session.status.changed", "session.requiresAction", "session.humanInput.requested", "session.context.compaction.requested", "session.context.compacted", "session.context.compaction.skipped", "session.context.cleared", "user.message", "user.pause", "user.approvalDecision", "user.humanInputResponse", "turn.queued", "turn.started", "turn.completed", "turn.failed", "turn.cancelled", "turn.superseded", "turn.recovery.requested", "turn.capacity_waiting", "agent.message.delta", "agent.message.completed", "agent.reasoning.delta", "agent.toolCall.created", "agent.toolCall.output", "agent.model.request", "agent.model.usage", "tool.auth_needed", "credential.auth_needed", "agent.updated", "rig.setup.started", "rig.setup.completed", "rig.setup.skipped", "rig.setup.failed", "sandbox.operation.started", "sandbox.operation.completed", "sandbox.operation.failed", "sandbox.command.output.delta", "artifact.created", "goal.set", "goal.updated", "goal.completed", "goal.paused", "goal.resumed", "goal.cleared", "goal.continuation", "system.update.pending", "system.update.delivered", "system.update.superseded", "system.update.cancelled", "system.update.settled", "session.control.paused", "session.control.resumed", "session.control.steer_requested", "workspace.inference.paused", "workspace.inference.resumed", "session.queue.changed", "session.queue.prompt.cancelled", "session.queue.history", "turn.event.rejected_late", "memory.saved", "memory.corrected", "stream.url.rotated", "stream.opened", "stream.closed", "stream.revoked", "recording.started", "recording.available", "recording.failed", "fs.changed", "git.changed", "terminal.pty.started", "terminal.pty.output.delta", "terminal.pty.exited", "session.title_set", "session.mcp.approval_policy.updated", "session.tool_policy.updated", "codex.account.switched", "codex.credential.selected", "codex.fleet.decision", "codex.capacity.waiting", "codex.capacity.resumed", "codex.capacity.superseded", "sandbox.box.created", "sandbox.box.lost", "sandbox.box.terminated", "sandbox.box.snapshot", "sandbox.env.drift", "session.route.reconciled", "workspace.revision.captured", "workspace.revision.degraded", "machine.op.failed", "machine.op.recovered", "machine.link.lost", "machine.link.restored", "machine.runner.restarted"];
|
|
730
|
-
type KnownSessionEventType = (typeof SESSION_EVENT_TYPES)[number];
|
|
731
|
-
/**
|
|
732
|
-
* Event types the SDK knows about today, kept open so a newer OpenGeni server
|
|
733
|
-
* can introduce event types without breaking older SDK consumers.
|
|
734
|
-
*/
|
|
735
|
-
type SessionEventType = KnownSessionEventType | (string & {});
|
|
736
|
-
type SessionEvent = {
|
|
737
|
-
id: string;
|
|
738
|
-
workspaceId: string;
|
|
739
|
-
sessionId: string;
|
|
740
|
-
/** Per-session sequence number: positive, contiguous, strictly increasing. */
|
|
741
|
-
sequence: number;
|
|
742
|
-
type: SessionEventType;
|
|
743
|
-
payload: unknown;
|
|
744
|
-
occurredAt: string;
|
|
745
|
-
clientEventId?: string | null | undefined;
|
|
746
|
-
turnId?: string | null | undefined;
|
|
747
|
-
turnGeneration?: number | null | undefined;
|
|
748
|
-
turnAttemptId?: string | null | undefined;
|
|
749
|
-
turnAssociation?: "current" | "late_rejected" | "duplicate" | null | undefined;
|
|
750
|
-
duplicateOfEventId?: string | null | undefined;
|
|
751
|
-
duplicateReason?: string | null | undefined;
|
|
752
|
-
};
|
|
753
|
-
type SessionEventSemanticClass = "control" | "terminal" | "failure" | "checkpoint" | "tool_receipt" | "provider_account";
|
|
754
|
-
type SessionEventLatestClass = SessionEventSemanticClass | "receipt";
|
|
755
|
-
type SessionEventPayloadMode = "none" | "summary" | "full";
|
|
756
|
-
type SessionEventReadMode = "monitoring" | "forensic";
|
|
757
|
-
type SessionEventReadDirection = "after" | "before";
|
|
758
|
-
type SessionEventResultMode = "events" | "compact";
|
|
759
|
-
type SessionEventListCommonOptions = {
|
|
760
|
-
after?: number;
|
|
761
|
-
before?: number;
|
|
762
|
-
limit?: number;
|
|
763
|
-
compact?: boolean;
|
|
764
|
-
mode?: SessionEventReadMode;
|
|
765
|
-
direction?: SessionEventReadDirection;
|
|
766
|
-
payloadMode?: SessionEventPayloadMode;
|
|
767
|
-
resultMode?: "events";
|
|
768
|
-
};
|
|
769
|
-
type SessionEventListOptions = SessionEventListCommonOptions & ({
|
|
770
|
-
latest?: never;
|
|
771
|
-
includeTypes?: SessionEventType[];
|
|
772
|
-
excludeTypes?: SessionEventType[];
|
|
773
|
-
includeClasses?: SessionEventSemanticClass[];
|
|
774
|
-
excludeClasses?: SessionEventSemanticClass[];
|
|
775
|
-
} | {
|
|
776
|
-
/** Exclusive lookup for the newest event in exactly this semantic class. */
|
|
777
|
-
latest: SessionEventLatestClass;
|
|
778
|
-
includeTypes?: never;
|
|
779
|
-
excludeTypes?: never;
|
|
780
|
-
includeClasses?: never;
|
|
781
|
-
excludeClasses?: never;
|
|
782
|
-
});
|
|
783
|
-
type SessionEventCompactResult = {
|
|
784
|
-
version: 1;
|
|
785
|
-
semanticClass: SessionEventSemanticClass;
|
|
786
|
-
source: {
|
|
787
|
-
id: string;
|
|
788
|
-
type: SessionEventType;
|
|
789
|
-
sequence: number;
|
|
790
|
-
occurredAt: string;
|
|
791
|
-
turnId: string | null;
|
|
792
|
-
turnGeneration: number | null;
|
|
793
|
-
turnAttemptId: string | null;
|
|
794
|
-
turnAssociation: SessionEvent["turnAssociation"];
|
|
795
|
-
};
|
|
796
|
-
id: string;
|
|
797
|
-
type: SessionEventType;
|
|
798
|
-
sequence: number;
|
|
799
|
-
occurredAt: string;
|
|
800
|
-
turnId: string | null;
|
|
801
|
-
turnGeneration: number | null;
|
|
802
|
-
turnAttemptId: string | null;
|
|
803
|
-
turnAssociation: SessionEvent["turnAssociation"];
|
|
804
|
-
coveredSequence: {
|
|
805
|
-
first: number;
|
|
806
|
-
last: number;
|
|
807
|
-
};
|
|
808
|
-
status: "completed" | "failed" | "cancelled" | "superseded" | "checkpoint" | "receipt" | "unknown";
|
|
809
|
-
text: string | null;
|
|
810
|
-
output: unknown;
|
|
811
|
-
result: unknown;
|
|
812
|
-
failure: {
|
|
813
|
-
error: string | null;
|
|
814
|
-
code: string | null;
|
|
815
|
-
retryable: boolean | null;
|
|
816
|
-
recovery: string | null;
|
|
817
|
-
} | null;
|
|
818
|
-
checkpoint: unknown;
|
|
819
|
-
receipt: unknown;
|
|
820
|
-
truncation: {
|
|
821
|
-
truncated: boolean;
|
|
822
|
-
fields: string[];
|
|
823
|
-
originalBytes: number | null;
|
|
824
|
-
deliveredBytes: number;
|
|
825
|
-
};
|
|
826
|
-
};
|
|
827
|
-
type SessionEventCompactResultOptions = {
|
|
828
|
-
latest: SessionEventLatestClass;
|
|
829
|
-
resultMode: "compact";
|
|
830
|
-
mode?: SessionEventReadMode;
|
|
831
|
-
payloadMode?: SessionEventPayloadMode;
|
|
832
|
-
};
|
|
833
|
-
type SessionEventPage = {
|
|
834
|
-
events: SessionEvent[];
|
|
835
|
-
mode: SessionEventReadMode;
|
|
836
|
-
payloadMode: SessionEventPayloadMode;
|
|
837
|
-
direction: SessionEventReadDirection;
|
|
838
|
-
bytes: number;
|
|
839
|
-
maxBytes: number;
|
|
840
|
-
truncated: boolean;
|
|
841
|
-
hasMore: boolean;
|
|
842
|
-
truncatedBy: "count" | "bytes" | "http_bytes" | null;
|
|
843
|
-
coveredSequence: {
|
|
844
|
-
first: number;
|
|
845
|
-
last: number;
|
|
846
|
-
} | null;
|
|
847
|
-
nextAfter: number | null;
|
|
848
|
-
nextBefore: number | null;
|
|
849
|
-
forensicExact: boolean;
|
|
850
|
-
};
|
|
851
|
-
type ToolAuthNeededPayload = {
|
|
852
|
-
serverId: string;
|
|
853
|
-
toolName?: string | null | undefined;
|
|
854
|
-
providerDomain: string;
|
|
855
|
-
provider?: string | undefined;
|
|
856
|
-
connectionId?: string | null | undefined;
|
|
857
|
-
reason: "missing_connection" | "expired" | "insufficient_scope" | "refresh_failed" | "unsupported_auth" | "resource_scope_unavailable";
|
|
858
|
-
scopes?: string[] | undefined;
|
|
859
|
-
resource?: string | undefined;
|
|
860
|
-
selectedResources?: Array<{
|
|
861
|
-
id: string;
|
|
862
|
-
kind: "repository";
|
|
863
|
-
}> | undefined;
|
|
864
|
-
authorizationUrl?: string | undefined;
|
|
865
|
-
subjectId?: string | null | undefined;
|
|
866
|
-
};
|
|
867
|
-
type AgentTextDeltaPayload = {
|
|
868
|
-
text: string;
|
|
869
|
-
};
|
|
870
|
-
type AgentMessageCompletedPayload = {
|
|
871
|
-
text: string;
|
|
872
|
-
};
|
|
873
|
-
type AgentToolCallCreatedPayload = {
|
|
874
|
-
id: string | null;
|
|
875
|
-
name: string;
|
|
876
|
-
arguments: unknown;
|
|
877
|
-
raw?: unknown | undefined;
|
|
878
|
-
};
|
|
879
|
-
type AgentToolCallOutputPayload = {
|
|
880
|
-
id: string | null;
|
|
881
|
-
output: unknown;
|
|
882
|
-
};
|
|
883
|
-
type SessionStatusChangedPayload = {
|
|
884
|
-
status: SessionStatus;
|
|
885
|
-
};
|
|
886
|
-
type CodexFleetConfidence = "unknown" | "low" | "medium" | "high";
|
|
887
|
-
type CodexFleetCacheState = "unknown" | "healthy" | "collapsed";
|
|
888
|
-
type CodexFleetShadowComparison = "match" | "different_candidate" | "different_outcome" | "not_comparable_truncated";
|
|
889
|
-
type CodexFleetDecisionScore = {
|
|
890
|
-
candidateKey: string;
|
|
891
|
-
eligible: boolean;
|
|
892
|
-
rejectionReason: "allocator_disabled" | "unavailable" | "cooling" | "quota_ceiling" | "overlay_isolation" | null;
|
|
893
|
-
quotaPressure: number;
|
|
894
|
-
leasePressure: number;
|
|
895
|
-
observedBurnPressure: number;
|
|
896
|
-
inferredBurnPressure: number;
|
|
897
|
-
runwayPressure: number;
|
|
898
|
-
uncertaintyPressure: number;
|
|
899
|
-
cacheAffinityBenefit: number;
|
|
900
|
-
cacheState: CodexFleetCacheState;
|
|
901
|
-
overlayPreferenceBenefit: number;
|
|
902
|
-
total: number;
|
|
903
|
-
confidence: CodexFleetConfidence;
|
|
904
|
-
};
|
|
905
|
-
type CodexFleetDecisionEventPayload = {
|
|
906
|
-
schemaVersion: 1;
|
|
907
|
-
mode: "shadow";
|
|
908
|
-
actual: {
|
|
909
|
-
outcome: "selected" | "waiting" | "none";
|
|
910
|
-
candidateKey: string | null;
|
|
911
|
-
reason: "lease_reused" | "pin" | "rotation" | "active" | "all_capped" | "none";
|
|
912
|
-
};
|
|
913
|
-
comparison: CodexFleetShadowComparison;
|
|
914
|
-
replay: {
|
|
915
|
-
schemaVersion: 1;
|
|
916
|
-
policyVersion: "adaptive-shadow-v1";
|
|
917
|
-
mode: "shadow";
|
|
918
|
-
input: {
|
|
919
|
-
candidates: Array<{
|
|
920
|
-
key: string;
|
|
921
|
-
}>;
|
|
922
|
-
} & Record<string, unknown>;
|
|
923
|
-
truncatedCandidateCount: number;
|
|
924
|
-
inputFingerprint: string;
|
|
925
|
-
decisionFingerprint: string;
|
|
926
|
-
decision: {
|
|
927
|
-
outcome: "selected" | "paced" | "none";
|
|
928
|
-
selectedCandidateKey: string | null;
|
|
929
|
-
reason: "fenced_in_flight" | "fenced_candidate_missing" | "admission_paced" | "no_eligible_candidate" | "overlay_isolated_empty" | "best_score" | "affinity_best" | "hysteresis_hold";
|
|
930
|
-
admission: {
|
|
931
|
-
outcome: "admit" | "pace";
|
|
932
|
-
reason: "fenced_in_flight" | "pacing_disabled" | "capacity_unknown" | "capacity_available" | "work_conserving_borrow" | "manager_priority" | "standard_starvation_bound" | "capacity_saturated" | "emergency_fuse";
|
|
933
|
-
borrowedIdleCapacity: boolean;
|
|
934
|
-
};
|
|
935
|
-
borrowedOverlayCapacity: boolean;
|
|
936
|
-
strandedEligibleCount: number;
|
|
937
|
-
confidence: CodexFleetConfidence;
|
|
938
|
-
scores: CodexFleetDecisionScore[];
|
|
939
|
-
};
|
|
940
|
-
} & Record<string, unknown>;
|
|
941
|
-
};
|
|
942
|
-
type RecordingMode = "manual" | "on-turn" | "on-verify";
|
|
943
|
-
type RecordingCodec = "h264-mp4" | "vp9-webm";
|
|
944
|
-
type RecordingContentType = "video/mp4" | "video/webm";
|
|
945
|
-
type RecordingFailedReason = "ffmpeg-error" | "box-death" | "box-rollover" | "upload-failed" | "max-bytes-exceeded" | "display-unavailable";
|
|
946
|
-
type RecordingStartedPayload = {
|
|
947
|
-
recordingId: string;
|
|
948
|
-
turnId: string | null;
|
|
949
|
-
mode: RecordingMode;
|
|
950
|
-
codec: RecordingCodec;
|
|
951
|
-
dimensions: [number, number];
|
|
952
|
-
framerate: number;
|
|
953
|
-
startedAt: string;
|
|
954
|
-
reason?: string | null | undefined;
|
|
955
|
-
};
|
|
956
|
-
type RecordingAvailablePayload = {
|
|
957
|
-
recordingId: string;
|
|
958
|
-
turnId: string | null;
|
|
959
|
-
codec: RecordingCodec;
|
|
960
|
-
contentType: RecordingContentType;
|
|
961
|
-
storageKey: string;
|
|
962
|
-
durationSeconds: number | null;
|
|
963
|
-
sizeBytes: number;
|
|
964
|
-
dimensions: [number, number];
|
|
965
|
-
};
|
|
966
|
-
type RecordingFailedPayload = {
|
|
967
|
-
recordingId: string;
|
|
968
|
-
turnId: string | null;
|
|
969
|
-
reason: RecordingFailedReason;
|
|
970
|
-
detail?: string | null | undefined;
|
|
971
|
-
};
|
|
972
|
-
type SandboxCommandOutputDeltaPayload = {
|
|
973
|
-
stream: "stdout" | "stderr";
|
|
974
|
-
chunk: string;
|
|
975
|
-
commandId?: string | undefined;
|
|
976
|
-
seq?: number | undefined;
|
|
977
|
-
};
|
|
978
|
-
type FsChangeKind = "created" | "modified" | "deleted" | "renamed";
|
|
979
|
-
type FsChangedPayload = {
|
|
980
|
-
changes: {
|
|
981
|
-
path: string;
|
|
982
|
-
kind: FsChangeKind;
|
|
983
|
-
isDir: boolean;
|
|
984
|
-
sizeBytes: number | null;
|
|
985
|
-
oldPath?: string | undefined;
|
|
986
|
-
}[];
|
|
987
|
-
source: "write" | "watch" | "agent";
|
|
988
|
-
revision: number;
|
|
989
|
-
leaseEpoch: number;
|
|
990
|
-
};
|
|
991
|
-
type GitChangedPayload = {
|
|
992
|
-
head: string | null;
|
|
993
|
-
dirty: boolean;
|
|
994
|
-
ahead: number;
|
|
995
|
-
behind: number;
|
|
996
|
-
changedFileCount: number;
|
|
997
|
-
reason: "commit" | "checkout" | "stage" | "worktree" | "fetch" | "unknown";
|
|
998
|
-
revision: number;
|
|
999
|
-
leaseEpoch: number;
|
|
1000
|
-
};
|
|
1001
|
-
type TerminalPtyStartedPayload = {
|
|
1002
|
-
ptyId: string;
|
|
1003
|
-
cols: number;
|
|
1004
|
-
rows: number;
|
|
1005
|
-
shell: string;
|
|
1006
|
-
cwd: string;
|
|
1007
|
-
};
|
|
1008
|
-
type TerminalPtyOutputDeltaPayload = {
|
|
1009
|
-
ptyId: string;
|
|
1010
|
-
stream: "stdout" | "stderr";
|
|
1011
|
-
chunk: string;
|
|
1012
|
-
seq: number;
|
|
1013
|
-
};
|
|
1014
|
-
type TerminalPtyExitedPayload = {
|
|
1015
|
-
ptyId: string;
|
|
1016
|
-
exitCode: number | null;
|
|
1017
|
-
reason: "exit" | "killed" | "owner_gone" | "timeout" | "lost";
|
|
1018
|
-
};
|
|
1019
|
-
type FsNodeType = "file" | "dir" | "symlink" | "other";
|
|
1020
|
-
type FsTreeNode = {
|
|
1021
|
-
name: string;
|
|
1022
|
-
path: string;
|
|
1023
|
-
type: FsNodeType;
|
|
1024
|
-
sizeBytes: number | null;
|
|
1025
|
-
mtimeMs: number | null;
|
|
1026
|
-
mode: number | null;
|
|
1027
|
-
children?: FsTreeNode[] | undefined;
|
|
1028
|
-
truncated: boolean;
|
|
1029
|
-
};
|
|
1030
|
-
type FsEncoding = "utf8" | "base64";
|
|
1031
|
-
type FsListRequest = {
|
|
1032
|
-
path?: string;
|
|
1033
|
-
depth?: number;
|
|
1034
|
-
maxEntries?: number;
|
|
1035
|
-
includeHidden?: boolean;
|
|
1036
|
-
};
|
|
1037
|
-
type FsListResponse = {
|
|
1038
|
-
root: FsTreeNode;
|
|
1039
|
-
revision: number;
|
|
1040
|
-
truncated: boolean;
|
|
1041
|
-
};
|
|
1042
|
-
type FsReadRequest = {
|
|
1043
|
-
path: string;
|
|
1044
|
-
encoding?: FsEncoding;
|
|
1045
|
-
maxBytes?: number;
|
|
1046
|
-
};
|
|
1047
|
-
type FsReadResponse = {
|
|
1048
|
-
path: string;
|
|
1049
|
-
encoding: FsEncoding;
|
|
1050
|
-
content: string;
|
|
1051
|
-
sizeBytes: number;
|
|
1052
|
-
truncated: boolean;
|
|
1053
|
-
isBinary: boolean;
|
|
1054
|
-
revision: number;
|
|
1055
|
-
};
|
|
1056
|
-
type FsWriteRequest = {
|
|
1057
|
-
path: string;
|
|
1058
|
-
encoding?: FsEncoding;
|
|
1059
|
-
content: string;
|
|
1060
|
-
overwrite?: boolean;
|
|
1061
|
-
createParents?: boolean;
|
|
1062
|
-
};
|
|
1063
|
-
type FsWriteResponse = {
|
|
1064
|
-
path: string;
|
|
1065
|
-
sizeBytes: number;
|
|
1066
|
-
revision: number;
|
|
1067
|
-
};
|
|
1068
|
-
type FsDeleteRequest = {
|
|
1069
|
-
path: string;
|
|
1070
|
-
recursive?: boolean;
|
|
1071
|
-
};
|
|
1072
|
-
type FsDeleteResponse = {
|
|
1073
|
-
revision: number;
|
|
1074
|
-
};
|
|
1075
|
-
type FsMoveRequest = {
|
|
1076
|
-
path: string;
|
|
1077
|
-
newPath: string;
|
|
1078
|
-
overwrite?: boolean;
|
|
1079
|
-
createParents?: boolean;
|
|
1080
|
-
};
|
|
1081
|
-
type FsMoveResponse = {
|
|
1082
|
-
path: string;
|
|
1083
|
-
newPath: string;
|
|
1084
|
-
revision: number;
|
|
1085
|
-
};
|
|
1086
|
-
type FsMkdirRequest = {
|
|
1087
|
-
path: string;
|
|
1088
|
-
recursive?: boolean;
|
|
1089
|
-
};
|
|
1090
|
-
type FsMkdirResponse = {
|
|
1091
|
-
path: string;
|
|
1092
|
-
revision: number;
|
|
1093
|
-
};
|
|
1094
|
-
type GitFileStatusCode = "added" | "modified" | "deleted" | "renamed" | "copied" | "untracked" | "ignored" | "conflicted" | "typechange";
|
|
1095
|
-
type GitFileStatus = {
|
|
1096
|
-
path: string;
|
|
1097
|
-
oldPath: string | null;
|
|
1098
|
-
index: GitFileStatusCode | null;
|
|
1099
|
-
worktree: GitFileStatusCode | null;
|
|
1100
|
-
isConflicted: boolean;
|
|
1101
|
-
};
|
|
1102
|
-
type GitStatusRequest = {
|
|
1103
|
-
path?: string;
|
|
1104
|
-
};
|
|
1105
|
-
type GitStatusResponse = {
|
|
1106
|
-
isRepo: boolean;
|
|
1107
|
-
head: string | null;
|
|
1108
|
-
detached: boolean;
|
|
1109
|
-
upstream: string | null;
|
|
1110
|
-
ahead: number;
|
|
1111
|
-
behind: number;
|
|
1112
|
-
files: GitFileStatus[];
|
|
1113
|
-
revision: number;
|
|
1114
|
-
};
|
|
1115
|
-
type GitDiffLineType = "context" | "add" | "del" | "meta";
|
|
1116
|
-
type GitDiffLine = {
|
|
1117
|
-
type: GitDiffLineType;
|
|
1118
|
-
oldNo: number | null;
|
|
1119
|
-
newNo: number | null;
|
|
1120
|
-
text: string;
|
|
1121
|
-
};
|
|
1122
|
-
type GitDiffHunk = {
|
|
1123
|
-
oldStart: number;
|
|
1124
|
-
oldLines: number;
|
|
1125
|
-
newStart: number;
|
|
1126
|
-
newLines: number;
|
|
1127
|
-
header: string;
|
|
1128
|
-
lines: GitDiffLine[];
|
|
1129
|
-
};
|
|
1130
|
-
type GitFileDiff = {
|
|
1131
|
-
path: string;
|
|
1132
|
-
oldPath: string | null;
|
|
1133
|
-
status: GitFileStatusCode;
|
|
1134
|
-
isBinary: boolean;
|
|
1135
|
-
isImage: boolean;
|
|
1136
|
-
additions: number;
|
|
1137
|
-
deletions: number;
|
|
1138
|
-
hunks: GitDiffHunk[];
|
|
1139
|
-
truncated: boolean;
|
|
1140
|
-
};
|
|
1141
|
-
type GitDiffRequest = {
|
|
1142
|
-
path?: string;
|
|
1143
|
-
staged?: boolean;
|
|
1144
|
-
includeUntracked?: boolean;
|
|
1145
|
-
fromRef?: string;
|
|
1146
|
-
toRef?: string;
|
|
1147
|
-
pathspec?: string[];
|
|
1148
|
-
contextLines?: number;
|
|
1149
|
-
maxBytesPerFile?: number;
|
|
1150
|
-
};
|
|
1151
|
-
type GitDiffResponse = {
|
|
1152
|
-
files: GitFileDiff[];
|
|
1153
|
-
revision: number;
|
|
1154
|
-
};
|
|
1155
|
-
type GitLogRequest = {
|
|
1156
|
-
path?: string;
|
|
1157
|
-
ref?: string;
|
|
1158
|
-
maxCount?: number;
|
|
1159
|
-
skip?: number;
|
|
1160
|
-
pathspec?: string[];
|
|
1161
|
-
};
|
|
1162
|
-
type GitCommit = {
|
|
1163
|
-
sha: string;
|
|
1164
|
-
shortSha: string;
|
|
1165
|
-
parents: string[];
|
|
1166
|
-
author: {
|
|
1167
|
-
name: string;
|
|
1168
|
-
email: string;
|
|
1169
|
-
timestamp: number;
|
|
1170
|
-
};
|
|
1171
|
-
committer: {
|
|
1172
|
-
name: string;
|
|
1173
|
-
email: string;
|
|
1174
|
-
timestamp: number;
|
|
1175
|
-
};
|
|
1176
|
-
subject: string;
|
|
1177
|
-
body: string;
|
|
1178
|
-
refs: string[];
|
|
1179
|
-
};
|
|
1180
|
-
type GitLogResponse = {
|
|
1181
|
-
commits: GitCommit[];
|
|
1182
|
-
hasMore: boolean;
|
|
1183
|
-
};
|
|
1184
|
-
type GitShowRequest = {
|
|
1185
|
-
path?: string;
|
|
1186
|
-
ref: string;
|
|
1187
|
-
filePath?: string;
|
|
1188
|
-
encoding?: FsEncoding;
|
|
1189
|
-
maxBytesPerFile?: number;
|
|
1190
|
-
};
|
|
1191
|
-
type GitShowResponse = {
|
|
1192
|
-
commit: GitCommit | null;
|
|
1193
|
-
files: GitFileDiff[];
|
|
1194
|
-
blob: {
|
|
1195
|
-
content: string;
|
|
1196
|
-
encoding: FsEncoding;
|
|
1197
|
-
sizeBytes: number;
|
|
1198
|
-
truncated: boolean;
|
|
1199
|
-
} | null;
|
|
1200
|
-
revision: number;
|
|
1201
|
-
};
|
|
1202
|
-
type WorkspaceCaptureFile = {
|
|
1203
|
-
path: string;
|
|
1204
|
-
status: GitFileStatusCode;
|
|
1205
|
-
hash: string | null;
|
|
1206
|
-
baseHash: string | null;
|
|
1207
|
-
contentRef: string | null;
|
|
1208
|
-
sizeBytes: number;
|
|
1209
|
-
isBinary: boolean;
|
|
1210
|
-
tooLarge: boolean;
|
|
1211
|
-
deleted: boolean;
|
|
1212
|
-
};
|
|
1213
|
-
type WorkspaceCaptureRepo = {
|
|
1214
|
-
root: string;
|
|
1215
|
-
head: string | null;
|
|
1216
|
-
detached: boolean;
|
|
1217
|
-
upstream: string | null;
|
|
1218
|
-
ahead: number;
|
|
1219
|
-
behind: number;
|
|
1220
|
-
status: GitFileStatus[];
|
|
1221
|
-
diff: GitFileDiff[];
|
|
1222
|
-
};
|
|
1223
|
-
type WorkspaceCaptureDegradedReason = "repository_discovery_command_failed" | "repository_discovery_timed_out" | "repository_discovery_result_limit_exceeded" | "repository_read_unavailable";
|
|
1224
|
-
type WorkspaceCaptureStats = {
|
|
1225
|
-
repoCount: number;
|
|
1226
|
-
fileCount: number;
|
|
1227
|
-
additions: number;
|
|
1228
|
-
deletions: number;
|
|
1229
|
-
totalBytes: number;
|
|
1230
|
-
tooLargeCount: number;
|
|
1231
|
-
binaryCount: number;
|
|
1232
|
-
treeEntryCount: number;
|
|
1233
|
-
treeTruncated: boolean;
|
|
1234
|
-
durationMs: number;
|
|
1235
|
-
fingerprint?: string;
|
|
1236
|
-
};
|
|
1237
|
-
type WorkspaceCaptureManifest = {
|
|
1238
|
-
version: 1;
|
|
1239
|
-
revision: number;
|
|
1240
|
-
capturedAt: string;
|
|
1241
|
-
turnId: string | null;
|
|
1242
|
-
leaseEpoch: number;
|
|
1243
|
-
treeIndex: FsTreeNode;
|
|
1244
|
-
treeTruncated: boolean;
|
|
1245
|
-
repos: WorkspaceCaptureRepo[];
|
|
1246
|
-
files: WorkspaceCaptureFile[];
|
|
1247
|
-
stats: WorkspaceCaptureStats;
|
|
1248
|
-
};
|
|
1249
|
-
type WorkspaceRevisionCapturedPayload = {
|
|
1250
|
-
revision: number;
|
|
1251
|
-
turnId: string | null;
|
|
1252
|
-
capturedAt: string;
|
|
1253
|
-
leaseEpoch: number;
|
|
1254
|
-
stats: WorkspaceCaptureStats;
|
|
1255
|
-
};
|
|
1256
|
-
type WorkspaceRevisionDegradedPayload = {
|
|
1257
|
-
revision: number;
|
|
1258
|
-
turnId: string | null;
|
|
1259
|
-
capturedAt: string;
|
|
1260
|
-
leaseEpoch: number;
|
|
1261
|
-
reason: WorkspaceCaptureDegradedReason;
|
|
1262
|
-
};
|
|
1263
|
-
type WorkspaceCaptureSignedUrl = {
|
|
1264
|
-
url: string;
|
|
1265
|
-
expiresAt: string;
|
|
1266
|
-
};
|
|
1267
|
-
type GetWorkspaceCaptureResponse = {
|
|
1268
|
-
available: false;
|
|
1269
|
-
degradedReason?: WorkspaceCaptureDegradedReason | null;
|
|
1270
|
-
revision?: number | null;
|
|
1271
|
-
capturedAt?: string | null;
|
|
1272
|
-
turnId?: string | null;
|
|
1273
|
-
leaseEpoch?: number | null;
|
|
1274
|
-
} | {
|
|
1275
|
-
available: true;
|
|
1276
|
-
revision: number;
|
|
1277
|
-
capturedAt: string;
|
|
1278
|
-
turnId: string | null;
|
|
1279
|
-
leaseEpoch: number;
|
|
1280
|
-
sizeBytes: number;
|
|
1281
|
-
stats: WorkspaceCaptureStats;
|
|
1282
|
-
manifest: WorkspaceCaptureManifest | null;
|
|
1283
|
-
manifestUrl: WorkspaceCaptureSignedUrl | null;
|
|
1284
|
-
};
|
|
1285
|
-
type GetWorkspaceCaptureFileResponse = {
|
|
1286
|
-
path: string;
|
|
1287
|
-
revision: number;
|
|
1288
|
-
status: GitFileStatusCode;
|
|
1289
|
-
hash: string | null;
|
|
1290
|
-
baseHash: string | null;
|
|
1291
|
-
sizeBytes: number;
|
|
1292
|
-
isBinary: boolean;
|
|
1293
|
-
tooLarge: boolean;
|
|
1294
|
-
encoding: FsEncoding | null;
|
|
1295
|
-
content: string | null;
|
|
1296
|
-
contentUrl: WorkspaceCaptureSignedUrl | null;
|
|
1297
|
-
};
|
|
1298
|
-
type TerminalExecRequest = {
|
|
1299
|
-
command: string;
|
|
1300
|
-
cwd?: string;
|
|
1301
|
-
timeoutMs?: number;
|
|
1302
|
-
emitStream?: boolean;
|
|
1303
|
-
};
|
|
1304
|
-
type TerminalExecResponse = {
|
|
1305
|
-
stdout: string;
|
|
1306
|
-
stderr: string;
|
|
1307
|
-
exitCode: number;
|
|
1308
|
-
running: false;
|
|
1309
|
-
wallTimeSeconds: number;
|
|
1310
|
-
};
|
|
1311
|
-
type PtyOpenRequest = {
|
|
1312
|
-
cols?: number;
|
|
1313
|
-
rows?: number;
|
|
1314
|
-
cwd?: string;
|
|
1315
|
-
shell?: string;
|
|
1316
|
-
};
|
|
1317
|
-
type PtyOpenResponse = {
|
|
1318
|
-
ptyId: string;
|
|
1319
|
-
streamVia: "sse-events";
|
|
1320
|
-
supportsInput: boolean;
|
|
1321
|
-
};
|
|
1322
|
-
type PtyWriteRequest = {
|
|
1323
|
-
ptyId: string;
|
|
1324
|
-
data: string;
|
|
1325
|
-
};
|
|
1326
|
-
type PtyResizeRequest = {
|
|
1327
|
-
ptyId: string;
|
|
1328
|
-
cols: number;
|
|
1329
|
-
rows: number;
|
|
1330
|
-
};
|
|
1331
|
-
type PtyCloseRequest = {
|
|
1332
|
-
ptyId: string;
|
|
1333
|
-
};
|
|
1334
|
-
type SessionStructuredCapabilities = {
|
|
1335
|
-
FileSystem: {
|
|
1336
|
-
available: boolean;
|
|
1337
|
-
readOnly: boolean;
|
|
1338
|
-
root: string;
|
|
1339
|
-
};
|
|
1340
|
-
Terminal: {
|
|
1341
|
-
events: boolean;
|
|
1342
|
-
exec: boolean;
|
|
1343
|
-
pty: {
|
|
1344
|
-
available: boolean;
|
|
1345
|
-
};
|
|
1346
|
-
};
|
|
1347
|
-
Git: {
|
|
1348
|
-
available: boolean;
|
|
1349
|
-
repos: string[];
|
|
1350
|
-
};
|
|
1351
|
-
};
|
|
1352
|
-
type ScheduledTaskStatus = "active" | "paused";
|
|
1353
|
-
type ScheduledTaskRunMode = "new_session_per_run" | "reusable_session";
|
|
1354
|
-
type ScheduledTaskOverlapPolicy = "allow_concurrent" | "skip" | "buffer_one";
|
|
1355
|
-
type ScheduledTaskDayOfWeek = "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY";
|
|
1356
|
-
type ScheduledTaskScheduleSpec = {
|
|
1357
|
-
type: "once";
|
|
1358
|
-
runAt: string;
|
|
1359
|
-
timeZone: string;
|
|
1360
|
-
} | {
|
|
1361
|
-
type: "interval";
|
|
1362
|
-
everySeconds: number;
|
|
1363
|
-
startAt?: string | undefined;
|
|
1364
|
-
endAt?: string | undefined;
|
|
1365
|
-
} | {
|
|
1366
|
-
type: "calendar";
|
|
1367
|
-
timeZone: string;
|
|
1368
|
-
hour: number;
|
|
1369
|
-
minute: number;
|
|
1370
|
-
daysOfWeek?: ScheduledTaskDayOfWeek[] | undefined;
|
|
1371
|
-
};
|
|
1372
|
-
type ScheduledTaskAgentConfig = {
|
|
1373
|
-
prompt: string;
|
|
1374
|
-
resources: ResourceRef[];
|
|
1375
|
-
tools: ToolRef[];
|
|
1376
|
-
metadata: Record<string, unknown>;
|
|
1377
|
-
slackBotConnectionId?: string | undefined;
|
|
1378
|
-
model?: string | undefined;
|
|
1379
|
-
reasoningEffort?: ReasoningEffort | undefined;
|
|
1380
|
-
sandboxBackend?: SandboxBackend | undefined;
|
|
1381
|
-
goal?: GoalSpec | undefined;
|
|
1382
|
-
maxNestedAgentDepth?: number | undefined;
|
|
1383
|
-
};
|
|
1384
|
-
type ScheduledTask = {
|
|
1385
|
-
id: string;
|
|
1386
|
-
accountId: string;
|
|
1387
|
-
workspaceId: string;
|
|
1388
|
-
name: string;
|
|
1389
|
-
status: ScheduledTaskStatus;
|
|
1390
|
-
schedule: ScheduledTaskScheduleSpec;
|
|
1391
|
-
temporalScheduleId: string;
|
|
1392
|
-
runMode: ScheduledTaskRunMode;
|
|
1393
|
-
overlapPolicy: ScheduledTaskOverlapPolicy;
|
|
1394
|
-
agentConfig: ScheduledTaskAgentConfig;
|
|
1395
|
-
reusableSessionId: string | null;
|
|
1396
|
-
variableSetId: string | null;
|
|
1397
|
-
/** @deprecated use variableSetId */
|
|
1398
|
-
environmentId: string | null;
|
|
1399
|
-
rigId: string | null;
|
|
1400
|
-
metadata: Record<string, unknown>;
|
|
1401
|
-
createdAt: string;
|
|
1402
|
-
updatedAt: string;
|
|
1403
|
-
};
|
|
1404
|
-
type CreateSessionRequest = {
|
|
1405
|
-
requestedSessionId?: string | undefined;
|
|
1406
|
-
initialMessage: string;
|
|
1407
|
-
/** System instructions scoped to the initial turn; never visible timeline text. */
|
|
1408
|
-
turnInstructions?: string | undefined;
|
|
1409
|
-
instructions?: string | undefined;
|
|
1410
|
-
resources?: ResourceRef[] | undefined;
|
|
1411
|
-
/** Inline skills fixed onto this session; omitted children inherit them. */
|
|
1412
|
-
skills?: SessionSkill[] | undefined;
|
|
1413
|
-
tools?: ToolRef[] | undefined;
|
|
1414
|
-
metadata?: Record<string, unknown> | undefined;
|
|
1415
|
-
model?: string | undefined;
|
|
1416
|
-
reasoningEffort?: ReasoningEffort | undefined;
|
|
1417
|
-
sandboxBackend?: SandboxBackend | undefined;
|
|
1418
|
-
targetSandboxId?: string | undefined;
|
|
1419
|
-
workingDir?: string | undefined;
|
|
1420
|
-
variableSetId?: string | undefined;
|
|
1421
|
-
/** @deprecated use variableSetId */
|
|
1422
|
-
environmentId?: string | undefined;
|
|
1423
|
-
rigId?: string | undefined;
|
|
1424
|
-
goal?: GoalSpec | undefined;
|
|
1425
|
-
clientEventId?: string | undefined;
|
|
1426
|
-
idempotencyKey?: string | undefined;
|
|
1427
|
-
expectedNewSessionDraftRevision?: number | undefined;
|
|
1428
|
-
maxNestedAgentDepth?: number | undefined;
|
|
1429
|
-
firstPartyMcpPermissions?: string[] | undefined;
|
|
1430
|
-
firstPartyMcpTools?: FirstPartyMcpToolName[] | undefined;
|
|
1431
|
-
mcpServers?: SessionMcpServerInput[] | undefined;
|
|
1432
|
-
sandbox?: "shared" | "new" | {
|
|
1433
|
-
groupId: string;
|
|
1434
|
-
} | undefined;
|
|
1435
|
-
};
|
|
1436
|
-
declare const KNOWN_PERMISSIONS: readonly ["account:read", "account:admin", "members:manage", "workspace:create", "billing:read", "billing:manage", "workspace:read", "workspace:admin", "sessions:create", "sessions:read", "sessions:control", "stream:view", "stream:control", "stream:acknowledge", "files:upload", "files:read", "files:write", "terminal:attach", "documents:manage", "documents:search", "scheduled_tasks:manage", "scheduled_tasks:run", "github:manage", "github:use", "api_keys:manage", "connections:read", "connections:write", "environments:manage", "environments:use", "variable-sets:manage", "variable-sets:use", "mcp_servers:attach", "toolspace:call", "goals:manage", "enrollments:read", "enrollments:manage", "rigs:use", "rigs:manage"];
|
|
1437
|
-
type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
|
|
1438
|
-
/**
|
|
1439
|
-
* Permissions the SDK knows about today, kept open so a newer OpenGeni server
|
|
1440
|
-
* can introduce permissions without breaking older SDK consumers.
|
|
1441
|
-
*/
|
|
1442
|
-
type Permission = KnownPermission | (string & {});
|
|
1443
|
-
type FirstPartyMcpToolName = "set_session_title" | "goal_set" | "goal_update" | "goal_complete" | "goal_pause" | "memory_search" | "memory_save" | "memory_correct" | "sandboxes_list" | "sandbox_attach" | "sandbox_swap" | "run_on" | "sandbox_provision" | "rig_list" | "rig_get" | "rig_propose_change" | "rig_verify" | "rig_promote" | "sessions_list" | "session_get" | "session_events" | "session_create" | "session_send_message" | "session_pause" | "session_resume" | "session_steer" | "set_other_session_title" | "variable_set_list" | "environment_list" | "variable_set_set_variable" | "environment_set_variable" | "github_connect_link" | "github_token" | "github_repositories_list" | "social_connections_list" | "social_posts_recent" | "social_daily_analysis_context" | "scheduled_tasks_list" | "scheduled_tasks_get" | "scheduled_tasks_create" | "scheduled_tasks_update" | "scheduled_tasks_pause" | "scheduled_tasks_resume" | "scheduled_tasks_trigger" | "scheduled_tasks_delete" | "scheduled_task_runs_list" | "slack_bot_list_channels" | "slack_bot_channel_history" | "slack_bot_list_users" | "slack_bot_post_message";
|
|
1444
|
-
type ProductAccessMode = "local" | "configured" | "managed";
|
|
1445
|
-
type ModelCapabilitySupportV1 = "supported" | "unsupported" | "unknown";
|
|
1446
|
-
type ModelCapabilityStateV1 = {
|
|
1447
|
-
upstream: ModelCapabilitySupportV1;
|
|
1448
|
-
runnable: boolean;
|
|
1449
|
-
};
|
|
1450
|
-
type ModelCapabilitiesV1 = {
|
|
1451
|
-
reasoning: ModelCapabilityStateV1 & {
|
|
1452
|
-
efforts: ReasoningEffort[];
|
|
1453
|
-
defaultEffort: ReasoningEffort | null;
|
|
1454
|
-
required: boolean;
|
|
1455
|
-
};
|
|
1456
|
-
functionCalling: ModelCapabilityStateV1;
|
|
1457
|
-
structuredOutput: ModelCapabilityStateV1;
|
|
1458
|
-
hostedTools: {
|
|
1459
|
-
webSearch: ModelCapabilityStateV1;
|
|
1460
|
-
xSearch: ModelCapabilityStateV1;
|
|
1461
|
-
codeExecution: ModelCapabilityStateV1;
|
|
1462
|
-
};
|
|
1463
|
-
inputModalities: Array<"text" | "image" | "audio">;
|
|
1464
|
-
outputModalities: Array<"text" | "image" | "audio">;
|
|
1465
|
-
transports: {
|
|
1466
|
-
sse: ModelCapabilityStateV1;
|
|
1467
|
-
responsesWebSocket: ModelCapabilityStateV1;
|
|
1468
|
-
realtimeAudio: ModelCapabilityStateV1;
|
|
1469
|
-
};
|
|
1470
|
-
latencyModes: Array<{
|
|
1471
|
-
id: "standard" | "priority" | "fast";
|
|
1472
|
-
upstream: ModelCapabilitySupportV1;
|
|
1473
|
-
runnable: boolean;
|
|
1474
|
-
billingMultiplierBps?: number | undefined;
|
|
1475
|
-
}>;
|
|
1476
|
-
};
|
|
1477
|
-
type ModelCredentialSourceV1 = {
|
|
1478
|
-
kind: "deployment";
|
|
1479
|
-
mechanism: "api_key" | "azure_ad_bearer";
|
|
1480
|
-
} | {
|
|
1481
|
-
kind: "connected_subscription";
|
|
1482
|
-
provider: "codex";
|
|
1483
|
-
} | {
|
|
1484
|
-
kind: "workspace_connection";
|
|
1485
|
-
mechanism: "api_key";
|
|
1486
|
-
};
|
|
1487
|
-
type ModelBillingAttributionV1 = {
|
|
1488
|
-
upstreamPayer: "deployment" | "workspace" | "connected_subscription";
|
|
1489
|
-
metering: "opengeni_credits" | "external";
|
|
1490
|
-
};
|
|
1491
|
-
type ModelPricingV1 = {
|
|
1492
|
-
inputMicrosPerMillionTokens: number;
|
|
1493
|
-
cachedInputMicrosPerMillionTokens?: number | undefined;
|
|
1494
|
-
outputMicrosPerMillionTokens: number;
|
|
1495
|
-
marginBps?: number | undefined;
|
|
1496
|
-
};
|
|
1497
|
-
type ModelPricingScheduleV1 = {
|
|
1498
|
-
default: ModelPricingV1;
|
|
1499
|
-
inputTokenTiers?: Array<{
|
|
1500
|
-
minimumInputTokens: number;
|
|
1501
|
-
pricing: ModelPricingV1;
|
|
1502
|
-
}> | undefined;
|
|
1503
|
-
};
|
|
1504
|
-
/**
|
|
1505
|
-
* One model a client may select at send time, plus the provider that serves it.
|
|
1506
|
-
* The wire API (`responses` | `chat`) lets a client reason about provider
|
|
1507
|
-
* capabilities; the provider id/label drive a picker's grouping. Mirrors the
|
|
1508
|
-
* `ClientModel` shape projected into `ClientConfig` by the server.
|
|
1509
|
-
*/
|
|
1510
|
-
type ClientModel = {
|
|
1511
|
-
id: string;
|
|
1512
|
-
label: string;
|
|
1513
|
-
/** Provider id (e.g. `openai`, `azure`, or a registry provider id). */
|
|
1514
|
-
provider: string;
|
|
1515
|
-
providerLabel: string;
|
|
1516
|
-
api: "responses" | "chat";
|
|
1517
|
-
contextWindowTokens?: number | undefined;
|
|
1518
|
-
schemaVersion?: 1 | undefined;
|
|
1519
|
-
aliases?: string[] | undefined;
|
|
1520
|
-
deployment?: {
|
|
1521
|
-
upstreamModelId: string;
|
|
1522
|
-
wireApi: "responses" | "chat";
|
|
1523
|
-
} | undefined;
|
|
1524
|
-
executionLimits?: {
|
|
1525
|
-
contextWindowTokens: number | null;
|
|
1526
|
-
effectiveContextWindowTokens: number | null;
|
|
1527
|
-
autoCompactTokenLimit: number | null;
|
|
1528
|
-
toolOutputTruncationTokens: number | null;
|
|
1529
|
-
} | undefined;
|
|
1530
|
-
credentialSource?: ModelCredentialSourceV1 | undefined;
|
|
1531
|
-
billing?: ModelBillingAttributionV1 | undefined;
|
|
1532
|
-
capabilities?: ModelCapabilitiesV1 | undefined;
|
|
1533
|
-
pricing?: ModelPricingScheduleV1 | undefined;
|
|
1534
|
-
definitionVersion?: string | undefined;
|
|
1535
|
-
};
|
|
1536
|
-
type ModelAvailabilityV1 = {
|
|
1537
|
-
status: "available" | "unavailable" | "degraded" | "unknown";
|
|
1538
|
-
selectable: boolean;
|
|
1539
|
-
reason: "missing_credential" | "needs_reauth" | "credential_not_ready" | "not_entitled" | "provider_unhealthy" | "policy_blocked" | "unsupported" | null;
|
|
1540
|
-
checkedAt: string | null;
|
|
1541
|
-
};
|
|
1542
|
-
type ModelCredentialReadinessV1 = {
|
|
1543
|
-
status: "ready" | "not_ready" | "error";
|
|
1544
|
-
reason: "missing_credential" | "needs_reauth" | "prerequisites_missing" | "resolver_error" | "observation_stale" | null;
|
|
1545
|
-
basis: "configuration" | "connection" | "resolver";
|
|
1546
|
-
checkedAt: string | null;
|
|
1547
|
-
};
|
|
1548
|
-
type WorkspaceModelCatalogModel = ClientModel & {
|
|
1549
|
-
credentialReadiness: ModelCredentialReadinessV1;
|
|
1550
|
-
availability: ModelAvailabilityV1;
|
|
1551
|
-
};
|
|
1552
|
-
type WorkspaceModelCatalogResponse = {
|
|
1553
|
-
models: WorkspaceModelCatalogModel[];
|
|
1554
|
-
};
|
|
1555
|
-
/**
|
|
1556
|
-
* Connection state of a workspace's Codex (ChatGPT) subscription, returned by
|
|
1557
|
-
* `GET /v1/workspaces/:id/codex/status`. `models` are the codex models the
|
|
1558
|
-
* workspace can select (projected as ClientModel under their own "no credits"
|
|
1559
|
-
* provider group), present only while connected.
|
|
1560
|
-
*/
|
|
1561
|
-
type CodexConnectionStatus = {
|
|
1562
|
-
connected: boolean;
|
|
1563
|
-
plan?: string | null;
|
|
1564
|
-
valid?: boolean;
|
|
1565
|
-
expiresAt?: string | null;
|
|
1566
|
-
lastError?: string | null;
|
|
1567
|
-
models?: ClientModel[];
|
|
1568
|
-
/** The account a session runs on when unpinned (label for the in-session indicator). */
|
|
1569
|
-
activeAccount?: {
|
|
1570
|
-
id: string;
|
|
1571
|
-
label?: string | null;
|
|
1572
|
-
chatgptAccountId?: string | null;
|
|
1573
|
-
} | null;
|
|
1574
|
-
/** How many Codex accounts the workspace has connected. */
|
|
1575
|
-
accountCount?: number;
|
|
1576
|
-
};
|
|
1577
|
-
/**
|
|
1578
|
-
* One normalized Codex usage window (5h or weekly), camelCase end-to-end (the
|
|
1579
|
-
* route normalizes server-side; the web layer never re-hand-types snake_case).
|
|
1580
|
-
* `percent` is authoritative; used/limit/remaining are a synthesized 0–100 scale
|
|
1581
|
-
* (limit = 100) because the provider gives only a percentage. `remaining =
|
|
1582
|
-
* 100 - percent` is the P3 rotation key. Identify the window by `limitWindowSeconds`
|
|
1583
|
-
* (18000 ⇒ 5h, 604800 ⇒ weekly), never by position.
|
|
1584
|
-
*/
|
|
1585
|
-
type CodexUsageWindow = {
|
|
1586
|
-
used: number;
|
|
1587
|
-
limit: number;
|
|
1588
|
-
remaining: number;
|
|
1589
|
-
percent: number;
|
|
1590
|
-
resetAt: string | null;
|
|
1591
|
-
resetAfterSeconds: number | null;
|
|
1592
|
-
limitWindowSeconds: number;
|
|
1593
|
-
};
|
|
1594
|
-
/** The normalized usage payload for one account — the P2/P3 contract. */
|
|
1595
|
-
type CodexUsagePayload = {
|
|
1596
|
-
status: "ok" | "limit_reached" | "error" | "no-data";
|
|
1597
|
-
planType: string | null;
|
|
1598
|
-
fiveHour: CodexUsageWindow | null;
|
|
1599
|
-
weekly: CodexUsageWindow | null;
|
|
1600
|
-
limitReached: boolean;
|
|
1601
|
-
fetchedAt: string;
|
|
1602
|
-
/** Authoritative count-only summary from /wham/usage; never synthesized rows. */
|
|
1603
|
-
rateLimitResetCredits?: {
|
|
1604
|
-
availableCount: number;
|
|
1605
|
-
credits: null;
|
|
1606
|
-
} | null;
|
|
1607
|
-
/** Present only on an auth/refresh failure path. */
|
|
1608
|
-
reason?: "needs_relogin";
|
|
1609
|
-
additionalLimits?: Array<{
|
|
1610
|
-
limitName: string;
|
|
1611
|
-
meteredFeature: string;
|
|
1612
|
-
fiveHour: CodexUsageWindow | null;
|
|
1613
|
-
weekly: CodexUsageWindow | null;
|
|
1614
|
-
}>;
|
|
1615
|
-
credits?: {
|
|
1616
|
-
hasCredits: boolean;
|
|
1617
|
-
unlimited: boolean;
|
|
1618
|
-
overageLimitReached: boolean;
|
|
1619
|
-
balance: string;
|
|
1620
|
-
};
|
|
1621
|
-
};
|
|
1622
|
-
/** One connected Codex (ChatGPT) account in a workspace (multi-account P1). Metadata only. */
|
|
1623
|
-
type CodexAccount = {
|
|
1624
|
-
id: string;
|
|
1625
|
-
chatgptAccountId?: string | null;
|
|
1626
|
-
label?: string | null;
|
|
1627
|
-
email?: string | null;
|
|
1628
|
-
plan?: string | null;
|
|
1629
|
-
status: "active" | "needs_relogin" | "error";
|
|
1630
|
-
active: boolean;
|
|
1631
|
-
expiresAt?: string | null;
|
|
1632
|
-
lastRefreshAt?: string | null;
|
|
1633
|
-
lastError?: string | null;
|
|
1634
|
-
fiveHour?: CodexUsageWindow | null;
|
|
1635
|
-
weekly?: CodexUsageWindow | null;
|
|
1636
|
-
usageCheckedAt?: string | null;
|
|
1637
|
-
exhaustedUntil?: string | null;
|
|
1638
|
-
/** Controls only NEW automatic allocations. */
|
|
1639
|
-
allocatorEnabled: boolean;
|
|
1640
|
-
/** Independent OCC sequence; credential/token `version` is never exposed. */
|
|
1641
|
-
allocatorVersion: number;
|
|
1642
|
-
allocatorUpdatedAt?: string | null;
|
|
1643
|
-
/** Cached authoritative summary count, never detailed redemption authority. */
|
|
1644
|
-
resetCreditAvailableCount?: number | null;
|
|
1645
|
-
resetCreditsCheckedAt?: string | null;
|
|
1646
|
-
};
|
|
1647
|
-
type CodexResetCredit = {
|
|
1648
|
-
id: string;
|
|
1649
|
-
resetType: "codexRateLimits" | "unknown";
|
|
1650
|
-
status: "available" | "redeeming" | "redeemed" | "unknown";
|
|
1651
|
-
/** Unix seconds from the provider contract. */
|
|
1652
|
-
grantedAt: number;
|
|
1653
|
-
/** Unix seconds, or null when the provider reports no expiry. */
|
|
1654
|
-
expiresAt: number | null;
|
|
1655
|
-
title: string | null;
|
|
1656
|
-
description: string | null;
|
|
1657
|
-
/** True only for fresh, complete, owning-human provider detail. */
|
|
1658
|
-
actionable: boolean;
|
|
1659
|
-
};
|
|
1660
|
-
/** Owning-human recovery metadata. It contains no token, browser-session hash, or provider key. */
|
|
1661
|
-
type CodexResetRedemptionRecovery = {
|
|
1662
|
-
attemptId: string;
|
|
1663
|
-
creditId: string;
|
|
1664
|
-
status: "provider_started" | "completed";
|
|
1665
|
-
outcome: "reset" | "nothingToReset" | "noCredit" | "alreadyRedeemed" | null;
|
|
1666
|
-
providerStartedAt: string | null;
|
|
1667
|
-
completedAt: string | null;
|
|
1668
|
-
createdAt: string;
|
|
1669
|
-
updatedAt: string;
|
|
1670
|
-
};
|
|
1671
|
-
type CodexAccountOverview = {
|
|
1672
|
-
accountId: string;
|
|
1673
|
-
usage: {
|
|
1674
|
-
source: "provider" | "cache" | "none";
|
|
1675
|
-
fetchedAt: string | null;
|
|
1676
|
-
stale: boolean;
|
|
1677
|
-
error: string | null;
|
|
1678
|
-
value: CodexUsagePayload | null;
|
|
1679
|
-
};
|
|
1680
|
-
resetCredits: {
|
|
1681
|
-
source: "provider" | "cache" | "none";
|
|
1682
|
-
fetchedAt: string | null;
|
|
1683
|
-
stale: boolean;
|
|
1684
|
-
error: string | null;
|
|
1685
|
-
detailState: "detailed" | "count_only" | "capped" | "unsupported" | "unknown" | "error";
|
|
1686
|
-
detailsComplete: boolean;
|
|
1687
|
-
availableCount: number | null;
|
|
1688
|
-
credits: CodexResetCredit[];
|
|
1689
|
-
};
|
|
1690
|
-
canRedeem: boolean;
|
|
1691
|
-
/** Owning managed-cookie human may replay durable completion without a healthy provider token. */
|
|
1692
|
-
canResumeRedemption: boolean;
|
|
1693
|
-
/** Durable owner-scoped ambiguity/completion discovery; never redemption authority for agents. */
|
|
1694
|
-
redemptions: CodexResetRedemptionRecovery[];
|
|
1695
|
-
};
|
|
1696
|
-
/** Independently settled live overview keyed by workspace credential id. */
|
|
1697
|
-
type CodexOverviewResponse = {
|
|
1698
|
-
accounts: Record<string, CodexAccountOverview>;
|
|
1699
|
-
};
|
|
1700
|
-
type CodexAllocatorUpdate = {
|
|
1701
|
-
allocatorEnabled: boolean;
|
|
1702
|
-
allocatorVersion: number;
|
|
1703
|
-
allocatorUpdatedAt: string | null;
|
|
1704
|
-
changed: boolean;
|
|
1705
|
-
};
|
|
1706
|
-
/** Per-workspace Codex rotation/active settings. P1: rotation inert, only activeCredentialId loads. */
|
|
1707
|
-
type CodexRotationSettings = {
|
|
1708
|
-
rotationEnabled: boolean;
|
|
1709
|
-
rotationStrategy: "most_remaining" | "round_robin" | "drain_then_next";
|
|
1710
|
-
activeCredentialId: string | null;
|
|
1711
|
-
};
|
|
1712
|
-
/** GET /codex/accounts — the accounts list + the workspace active pointer + settings. */
|
|
1713
|
-
type CodexAccountsResponse = {
|
|
1714
|
-
accounts: CodexAccount[];
|
|
1715
|
-
activeAccountId: string | null;
|
|
1716
|
-
settings: CodexRotationSettings;
|
|
1717
|
-
};
|
|
1718
|
-
/** Payload of a `codex.account.switched` session event. */
|
|
1719
|
-
type CodexAccountSwitchedPayload = {
|
|
1720
|
-
fromAccountId: string | null;
|
|
1721
|
-
toAccountId: string;
|
|
1722
|
-
reason: "manual" | "exhausted" | "rotation";
|
|
1723
|
-
droppedConnectors?: string[];
|
|
1724
|
-
};
|
|
1725
|
-
/** Device-code start: show `userCode` at `verificationUri`, then poll with `state`. */
|
|
1726
|
-
type CodexConnectStart = {
|
|
1727
|
-
userCode: string;
|
|
1728
|
-
verificationUri: string;
|
|
1729
|
-
intervalSeconds: number;
|
|
1730
|
-
state: string;
|
|
1731
|
-
};
|
|
1732
|
-
/** Poll result: keep polling on `pending`, restart on `expired`, done on `connected`. */
|
|
1733
|
-
type CodexConnectPoll = {
|
|
1734
|
-
status: "pending";
|
|
1735
|
-
} | {
|
|
1736
|
-
status: "expired";
|
|
1737
|
-
} | {
|
|
1738
|
-
status: "connected";
|
|
1739
|
-
plan?: string | null;
|
|
1740
|
-
accountId?: string;
|
|
1741
|
-
isActive?: boolean;
|
|
1742
|
-
};
|
|
1743
|
-
/** Remaining usage/limits for one account. `usage` is the normalized P2 payload. */
|
|
1744
|
-
type CodexUsage = {
|
|
1745
|
-
status: "ok" | "limit_reached" | "error" | "no-data";
|
|
1746
|
-
usage: CodexUsagePayload | null;
|
|
1747
|
-
};
|
|
1748
|
-
/** Batched live-refresh response, keyed by credential id; each entry independently statused. */
|
|
1749
|
-
type CodexUsageMap = Record<string, CodexUsage>;
|
|
1750
|
-
/**
|
|
1751
|
-
* How a deployment expects clients to authenticate to it, surfaced so a UI can
|
|
1752
|
-
* wire up the right header/cookie without prior knowledge of the host setup.
|
|
1753
|
-
* Discriminated on `mode`; `none` is the back-compat default.
|
|
1754
|
-
*/
|
|
1755
|
-
type ClientAuthConfig = {
|
|
1756
|
-
mode: "none";
|
|
1757
|
-
} | {
|
|
1758
|
-
mode: "deploymentKey";
|
|
1759
|
-
headerName: "x-opengeni-access-key";
|
|
1760
|
-
} | {
|
|
1761
|
-
mode: "configuredToken";
|
|
1762
|
-
headerName: "authorization";
|
|
1763
|
-
scheme: "bearer";
|
|
1764
|
-
} | {
|
|
1765
|
-
mode: "managedSession";
|
|
1766
|
-
session: "cookie";
|
|
1767
|
-
};
|
|
1768
|
-
declare const OPENGENI_API_CONTRACT_REVISION: "2026-07-turn-instructions-v1";
|
|
1769
|
-
declare const OPENGENI_API_CONTRACT_HEADER: "x-opengeni-api-contract";
|
|
1770
|
-
/** Bounded request/response identifier shared by browser, ingress, and API diagnostics. */
|
|
1771
|
-
declare const OPENGENI_CORRELATION_HEADER: "x-opengeni-correlation-id";
|
|
1772
|
-
/**
|
|
1773
|
-
* Public, unauthenticated-by-default client bootstrap config returned by
|
|
1774
|
-
* `GET /v1/config/client`: which models + reasoning efforts are exposed, the
|
|
1775
|
-
* MCP servers and file-upload limits a composer should offer, and how the
|
|
1776
|
-
* deployment expects the client to authenticate. `allowedModels` is kept for
|
|
1777
|
-
* back-compat; `models` carries the richer provider-grouped list for a picker.
|
|
1778
|
-
*/
|
|
1779
|
-
type ClientConfig = {
|
|
1780
|
-
deploymentRevision: string;
|
|
1781
|
-
apiContractRevision: typeof OPENGENI_API_CONTRACT_REVISION;
|
|
1782
|
-
serverVersion?: string | undefined;
|
|
1783
|
-
defaultModel: string;
|
|
1784
|
-
allowedModels: string[];
|
|
1785
|
-
models: ClientModel[];
|
|
1786
|
-
defaultReasoningEffort: ReasoningEffort;
|
|
1787
|
-
allowedReasoningEfforts: ReasoningEffort[];
|
|
1788
|
-
mcpServers: {
|
|
1789
|
-
id: string;
|
|
1790
|
-
name: string;
|
|
1791
|
-
}[];
|
|
1792
|
-
fileUploads: {
|
|
1793
|
-
enabled: boolean;
|
|
1794
|
-
maxSizeBytes: number;
|
|
1795
|
-
};
|
|
1796
|
-
productAccessMode: ProductAccessMode;
|
|
1797
|
-
auth: ClientAuthConfig;
|
|
1798
|
-
structuredServices: {
|
|
1799
|
-
fileSystem: boolean;
|
|
1800
|
-
git: boolean;
|
|
1801
|
-
terminalEvents: boolean;
|
|
1802
|
-
};
|
|
1803
|
-
};
|
|
1804
|
-
type AccountRole = "owner" | "admin" | "member";
|
|
1805
|
-
type AccountGrant = {
|
|
1806
|
-
accountId: string;
|
|
1807
|
-
subjectId: string;
|
|
1808
|
-
subjectLabel?: string | undefined;
|
|
1809
|
-
role?: AccountRole | undefined;
|
|
1810
|
-
permissions: Permission[];
|
|
1811
|
-
metadata?: Record<string, unknown> | undefined;
|
|
1812
|
-
};
|
|
1813
|
-
type AccessGrant = {
|
|
1814
|
-
workspaceId: string;
|
|
1815
|
-
accountId: string;
|
|
1816
|
-
subjectId: string;
|
|
1817
|
-
subjectLabel?: string | undefined;
|
|
1818
|
-
permissions: Permission[];
|
|
1819
|
-
metadata?: Record<string, unknown> | undefined;
|
|
1820
|
-
serviceInitiator?: ServiceTurnInitiator | undefined;
|
|
1821
|
-
serviceInitiatorContext?: ServiceTurnInitiatorContext | undefined;
|
|
1822
|
-
};
|
|
1823
|
-
type AccessContext = {
|
|
1824
|
-
mode: ProductAccessMode;
|
|
1825
|
-
subjectId: string;
|
|
1826
|
-
subjectLabel?: string | undefined;
|
|
1827
|
-
accountGrants: AccountGrant[];
|
|
1828
|
-
workspaceGrants: AccessGrant[];
|
|
1829
|
-
defaultAccountId: string | null;
|
|
1830
|
-
defaultWorkspaceId: string | null;
|
|
1831
|
-
};
|
|
1832
|
-
type Workspace = {
|
|
1833
|
-
id: string;
|
|
1834
|
-
accountId: string;
|
|
1835
|
-
name: string;
|
|
1836
|
-
slug: string | null;
|
|
1837
|
-
externalSource: string | null;
|
|
1838
|
-
externalId: string | null;
|
|
1839
|
-
agentInstructions: string | null;
|
|
1840
|
-
settings: Record<string, unknown>;
|
|
1841
|
-
inferenceControl: {
|
|
1842
|
-
state: "active" | "paused";
|
|
1843
|
-
revision: number;
|
|
1844
|
-
reason: string | null;
|
|
1845
|
-
changedBy: string | null;
|
|
1846
|
-
changedAt: string | null;
|
|
1847
|
-
};
|
|
1848
|
-
defaultRigId?: string | null;
|
|
1849
|
-
createdAt: string;
|
|
1850
|
-
updatedAt: string;
|
|
1851
|
-
};
|
|
1852
|
-
type WorkspaceSettings = {
|
|
1853
|
-
memoryEnabled?: boolean | undefined;
|
|
1854
|
-
transcription?: WorkspaceTranscriptionPolicy | undefined;
|
|
1855
|
-
maxNestedAgentDepth?: number | null | undefined;
|
|
1856
|
-
[key: string]: unknown;
|
|
1857
|
-
};
|
|
1858
|
-
type UpdateWorkspaceSettingsRequest = {
|
|
1859
|
-
memoryEnabled?: boolean | undefined;
|
|
1860
|
-
transcription?: WorkspaceTranscriptionPolicy | undefined;
|
|
1861
|
-
maxNestedAgentDepth?: number | null | undefined;
|
|
1862
|
-
[key: string]: unknown;
|
|
1863
|
-
};
|
|
1864
|
-
type SetWorkspaceDefaultRigRequest = {
|
|
1865
|
-
rigId: string | null;
|
|
1866
|
-
};
|
|
1867
|
-
type CreateWorkspaceRequest = {
|
|
1868
|
-
accountId?: string | undefined;
|
|
1869
|
-
name: string;
|
|
1870
|
-
slug?: string | undefined;
|
|
1871
|
-
externalSource?: string | undefined;
|
|
1872
|
-
externalId?: string | undefined;
|
|
1873
|
-
agentInstructions?: string | null | undefined;
|
|
1874
|
-
};
|
|
1875
|
-
type UpdateWorkspaceRequest = {
|
|
1876
|
-
name?: string | undefined;
|
|
1877
|
-
slug?: string | null | undefined;
|
|
1878
|
-
agentInstructions?: string | null | undefined;
|
|
1879
|
-
};
|
|
1880
|
-
type ApiKey = {
|
|
1881
|
-
id: string;
|
|
1882
|
-
accountId: string;
|
|
1883
|
-
workspaceId: string | null;
|
|
1884
|
-
name: string;
|
|
1885
|
-
prefix: string;
|
|
1886
|
-
permissions: Permission[];
|
|
1887
|
-
expiresAt: string | null;
|
|
1888
|
-
revokedAt: string | null;
|
|
1889
|
-
lastUsedAt: string | null;
|
|
1890
|
-
createdAt: string;
|
|
1891
|
-
updatedAt: string;
|
|
1892
|
-
};
|
|
1893
|
-
type CreateApiKeyRequest = {
|
|
1894
|
-
name: string;
|
|
1895
|
-
permissions: Permission[];
|
|
1896
|
-
expiresAt?: string | undefined;
|
|
1897
|
-
};
|
|
1898
|
-
type CreateApiKeyResponse = {
|
|
1899
|
-
apiKey: ApiKey;
|
|
1900
|
-
/** The full secret token — shown once at creation, never returned again. */
|
|
1901
|
-
token: string;
|
|
1902
|
-
};
|
|
1903
|
-
type ListApiKeysResponse = {
|
|
1904
|
-
apiKeys: ApiKey[];
|
|
1905
|
-
};
|
|
1906
|
-
type WorkspaceMember = {
|
|
1907
|
-
subjectId: string;
|
|
1908
|
-
subjectLabel: string | null;
|
|
1909
|
-
role: string;
|
|
1910
|
-
permissions: Permission[];
|
|
1911
|
-
createdAt: string;
|
|
1912
|
-
};
|
|
1913
|
-
type ListWorkspaceMembersResponse = {
|
|
1914
|
-
members: WorkspaceMember[];
|
|
1915
|
-
};
|
|
1916
|
-
type AddWorkspaceMemberRequest = {
|
|
1917
|
-
email: string;
|
|
1918
|
-
role?: string | undefined;
|
|
1919
|
-
permissions: Permission[];
|
|
1920
|
-
};
|
|
1921
|
-
type UpdateWorkspaceMemberRequest = {
|
|
1922
|
-
role?: string | undefined;
|
|
1923
|
-
permissions: Permission[];
|
|
1924
|
-
};
|
|
1925
|
-
type SessionGoalStatus = "active" | "paused" | "completed";
|
|
1926
|
-
type SessionGoalCreatedBy = "api" | "agent" | "scheduled_task";
|
|
1927
|
-
type SessionGoalContinuationState = "inactive" | "scheduled" | "running" | "blocked" | "invariant_broken";
|
|
1928
|
-
type SessionGoalContinuationReason = "goal_inactive" | "wake_pending" | "continuation_pending" | "human_work_pending" | "goal_turn_running" | "human_turn_running" | "workstream_paused" | "approval_required" | "provider_backpressure" | "session_cancelled" | "system_work_pending" | "missing_obligation";
|
|
1929
|
-
type SessionGoalContinuation = {
|
|
1930
|
-
state: SessionGoalContinuationState;
|
|
1931
|
-
reason: SessionGoalContinuationReason;
|
|
1932
|
-
wakeRevision: number;
|
|
1933
|
-
observedRevision: number;
|
|
1934
|
-
nextAttemptAt: string | null;
|
|
1935
|
-
lastError: string | null;
|
|
1936
|
-
};
|
|
1937
|
-
type SessionGoal = {
|
|
1938
|
-
id: string;
|
|
1939
|
-
accountId: string;
|
|
1940
|
-
workspaceId: string;
|
|
1941
|
-
sessionId: string;
|
|
1942
|
-
status: SessionGoalStatus;
|
|
1943
|
-
text: string;
|
|
1944
|
-
successCriteria: string | null;
|
|
1945
|
-
evidence: string | null;
|
|
1946
|
-
rationale: string | null;
|
|
1947
|
-
pausedReason: string | null;
|
|
1948
|
-
createdBy: SessionGoalCreatedBy;
|
|
1949
|
-
version: number;
|
|
1950
|
-
autoContinuations: number;
|
|
1951
|
-
noProgressStreak: number;
|
|
1952
|
-
maxAutoContinuations: number | null;
|
|
1953
|
-
metadata: Record<string, unknown>;
|
|
1954
|
-
/** Optional for source compatibility; the API always supplies this projection. */
|
|
1955
|
-
continuation?: SessionGoalContinuation | undefined;
|
|
1956
|
-
createdAt: string;
|
|
1957
|
-
updatedAt: string;
|
|
1958
|
-
};
|
|
1959
|
-
type UpdateSessionGoalRequest = {
|
|
1960
|
-
status: "paused" | "active";
|
|
1961
|
-
rationale?: string | undefined;
|
|
1962
|
-
};
|
|
1963
|
-
type UpdateSessionRequest = {
|
|
1964
|
-
title: string;
|
|
1965
|
-
};
|
|
1966
|
-
/** Outcome of a manual /compact trigger. */
|
|
1967
|
-
type CompactSessionContextResult = {
|
|
1968
|
-
/** pending waits for the current safe boundary; completed ran while idle. */
|
|
1969
|
-
status: "pending" | "completed" | "noop";
|
|
1970
|
-
message: string;
|
|
1971
|
-
};
|
|
1972
|
-
type EffectiveControlBlocker = {
|
|
1973
|
-
kind: "session" | "workspace";
|
|
1974
|
-
sessionId?: string | undefined;
|
|
1975
|
-
displayName: string;
|
|
1976
|
-
actor: string | null;
|
|
1977
|
-
reason: string | null;
|
|
1978
|
-
changedAt: string | null;
|
|
1979
|
-
revision: number;
|
|
1980
|
-
};
|
|
1981
|
-
type EffectiveControlResumeOption = {
|
|
1982
|
-
scope: "selected" | "session" | "workspace";
|
|
1983
|
-
targetId?: string | undefined;
|
|
1984
|
-
selectedStateAfter: "active" | "paused";
|
|
1985
|
-
remainingPrimaryBlocker?: EffectiveControlBlocker | undefined;
|
|
1986
|
-
impactCopy: string;
|
|
1987
|
-
};
|
|
1988
|
-
type EffectiveSessionControl = {
|
|
1989
|
-
state: "active" | "paused";
|
|
1990
|
-
controlVersion: number;
|
|
1991
|
-
controlEtag: string;
|
|
1992
|
-
directState: "active" | "paused";
|
|
1993
|
-
primaryBlocker: EffectiveControlBlocker | null;
|
|
1994
|
-
additionalBlockerCount: number;
|
|
1995
|
-
blockers: EffectiveControlBlocker[];
|
|
1996
|
-
resumeOptions: EffectiveControlResumeOption[];
|
|
1997
|
-
override: {
|
|
1998
|
-
rootSessionId: string;
|
|
1999
|
-
revision: number;
|
|
2000
|
-
} | null;
|
|
2001
|
-
settlement: {
|
|
2002
|
-
state: "stopping";
|
|
2003
|
-
attemptCount: number;
|
|
2004
|
-
interruptionPendingCount: number;
|
|
2005
|
-
quiescencePendingCount: number;
|
|
2006
|
-
} | null;
|
|
2007
|
-
};
|
|
2008
|
-
type SessionCommandReceipt = {
|
|
2009
|
-
id: string;
|
|
2010
|
-
action: string;
|
|
2011
|
-
operationKey: string;
|
|
2012
|
-
targetSessionId: string | null;
|
|
2013
|
-
targetTurnId: string | null;
|
|
2014
|
-
appliedControlRevision: number | null;
|
|
2015
|
-
appliedQueueVersion: number | null;
|
|
2016
|
-
appliedTurnVersion: number | null;
|
|
2017
|
-
appliedDraftRevision: number | null;
|
|
2018
|
-
createdAt: string;
|
|
2019
|
-
};
|
|
2020
|
-
type ComposerDraft = {
|
|
2021
|
-
revision: number;
|
|
2022
|
-
text: string;
|
|
2023
|
-
resources: ResourceRef[];
|
|
2024
|
-
model: string;
|
|
2025
|
-
reasoningEffort: ReasoningEffort;
|
|
2026
|
-
sourceTurnId: string | null;
|
|
2027
|
-
sourceTurnVersion: number | null;
|
|
2028
|
-
updatedAt: string | null;
|
|
2029
|
-
};
|
|
2030
|
-
type NewSessionDraftOptions = {
|
|
2031
|
-
sandboxBackend?: SandboxBackend | undefined;
|
|
2032
|
-
targetSandboxId?: string | undefined;
|
|
2033
|
-
workingDir?: string | undefined;
|
|
2034
|
-
variableSetId?: string | undefined;
|
|
2035
|
-
rigId?: string | undefined;
|
|
2036
|
-
goal?: GoalSpec | undefined;
|
|
2037
|
-
firstPartyMcpPermissions?: Permission[] | undefined;
|
|
2038
|
-
firstPartyMcpTools?: FirstPartyMcpToolName[] | undefined;
|
|
2039
|
-
};
|
|
2040
|
-
type NewSessionDraft = {
|
|
2041
|
-
revision: number;
|
|
2042
|
-
text: string;
|
|
2043
|
-
resources: ResourceRef[];
|
|
2044
|
-
tools: ToolRef[];
|
|
2045
|
-
/** False inherits the workspace-default MCP policy; true preserves an explicit array. */
|
|
2046
|
-
toolsProvided: boolean;
|
|
2047
|
-
model: string;
|
|
2048
|
-
reasoningEffort: ReasoningEffort;
|
|
2049
|
-
options: NewSessionDraftOptions;
|
|
2050
|
-
updatedAt: string | null;
|
|
2051
|
-
};
|
|
2052
|
-
type SessionQueueSnapshot = {
|
|
2053
|
-
version: number;
|
|
2054
|
-
effectiveControl: EffectiveSessionControl;
|
|
2055
|
-
/** The latest interrupted attempt has not yet durably proved physical quiescence. */
|
|
2056
|
-
stoppingPreviousAttempt: boolean;
|
|
2057
|
-
items: SessionTurn[];
|
|
2058
|
-
/** Canonical pending machine inputs. Events only invalidate this snapshot. */
|
|
2059
|
-
pendingInputs: SessionPendingInputPreview[];
|
|
2060
|
-
/** Exact next bounded input batch that will join an already-waiting prompt. */
|
|
2061
|
-
pendingInputAttachment: {
|
|
2062
|
-
turnId: string;
|
|
2063
|
-
inputIds: string[];
|
|
2064
|
-
} | null;
|
|
2065
|
-
};
|
|
2066
|
-
type SessionPendingInputPreview = Pick<SessionSystemUpdate, "id" | "sessionId" | "kind" | "classification" | "sourceId" | "summary" | "createdAt">;
|
|
2067
|
-
type SystemUpdateClassification = "success" | "failure" | "action_required" | "info";
|
|
2068
|
-
type SessionSystemUpdateKind = "scheduled_occurrence" | "goal_continuation" | "agent_message" | "agent_steer_instruction" | "child_terminal_result";
|
|
2069
|
-
type SessionSystemUpdateState = "pending" | "delivered" | "cancelled" | "superseded" | "failed";
|
|
2070
|
-
type SessionSystemUpdate = {
|
|
2071
|
-
id: string;
|
|
2072
|
-
sessionId: string;
|
|
2073
|
-
kind: SessionSystemUpdateKind;
|
|
2074
|
-
classification: SystemUpdateClassification;
|
|
2075
|
-
sourceId: string;
|
|
2076
|
-
dedupeKey: string;
|
|
2077
|
-
summary: string;
|
|
2078
|
-
payload: Record<string, unknown>;
|
|
2079
|
-
lineage: Record<string, unknown>;
|
|
2080
|
-
state: SessionSystemUpdateState;
|
|
2081
|
-
deliveredTurnId: string | null;
|
|
2082
|
-
deliveredHistoryItemId: string | null;
|
|
2083
|
-
deliveredAt: string | null;
|
|
2084
|
-
createdAt: string;
|
|
2085
|
-
};
|
|
2086
|
-
type SessionControlResponse = {
|
|
2087
|
-
receipt: SessionCommandReceipt;
|
|
2088
|
-
effectiveControl: EffectiveSessionControl;
|
|
2089
|
-
interruptionCount: number;
|
|
2090
|
-
wakeCount: number;
|
|
2091
|
-
};
|
|
2092
|
-
type WorkspaceInferenceControlResponse = {
|
|
2093
|
-
receipt: SessionCommandReceipt;
|
|
2094
|
-
state: "active" | "paused";
|
|
2095
|
-
revision: number;
|
|
2096
|
-
interruptionCount: number;
|
|
2097
|
-
wakeCount: number;
|
|
2098
|
-
};
|
|
2099
|
-
type WorkspaceControlEvent = {
|
|
2100
|
-
id: string;
|
|
2101
|
-
workspaceId: string;
|
|
2102
|
-
/** Same monotonic value as revision; named sequence for SSE resume cursors. */
|
|
2103
|
-
sequence: number;
|
|
2104
|
-
revision: number;
|
|
2105
|
-
type: "workspace.control.changed";
|
|
2106
|
-
scope: "workspace" | "session";
|
|
2107
|
-
rootSessionId: string | null;
|
|
2108
|
-
action: "pause" | "resume";
|
|
2109
|
-
automatic: boolean;
|
|
2110
|
-
reason: string | null;
|
|
2111
|
-
actor: string;
|
|
2112
|
-
occurredAt: string;
|
|
2113
|
-
truncation?: {
|
|
2114
|
-
truncated: true;
|
|
2115
|
-
surface: "durable_control" | "database_guard" | "http_projection" | "nats_legacy_guard" | "sse_legacy_guard";
|
|
2116
|
-
deliveredBytes: number;
|
|
2117
|
-
fields: Array<{
|
|
2118
|
-
field: "reason" | "actor";
|
|
2119
|
-
originalBytes: number;
|
|
2120
|
-
deliveredBytes: number;
|
|
2121
|
-
omittedBytes: number;
|
|
2122
|
-
}>;
|
|
2123
|
-
fullEvidence: {
|
|
2124
|
-
available: false;
|
|
2125
|
-
reason: "not_retained";
|
|
2126
|
-
};
|
|
2127
|
-
} | null;
|
|
2128
|
-
};
|
|
2129
|
-
type SessionQueueMutationResponse = {
|
|
2130
|
-
receipt: SessionCommandReceipt;
|
|
2131
|
-
snapshot: SessionQueueSnapshot;
|
|
2132
|
-
draft?: ComposerDraft;
|
|
2133
|
-
};
|
|
2134
|
-
type MoveSessionQueueItemRequest = {
|
|
2135
|
-
clientEventId: string;
|
|
2136
|
-
expectedQueueVersion: number;
|
|
2137
|
-
beforeTurnId: string | null;
|
|
2138
|
-
};
|
|
2139
|
-
type EditSessionQueueItemRequest = {
|
|
2140
|
-
clientEventId: string;
|
|
2141
|
-
expectedTurnVersion: number;
|
|
2142
|
-
expectedDraftRevision: number;
|
|
2143
|
-
replaceDraft: boolean;
|
|
2144
|
-
};
|
|
2145
|
-
type SteerSessionQueueItemRequest = {
|
|
2146
|
-
clientEventId: string;
|
|
2147
|
-
expectedTurnVersion: number;
|
|
2148
|
-
controlEtag?: string;
|
|
2149
|
-
};
|
|
2150
|
-
type DeleteSessionQueueItemRequest = {
|
|
2151
|
-
clientEventId: string;
|
|
2152
|
-
expectedTurnVersion: number;
|
|
2153
|
-
reason?: string;
|
|
2154
|
-
};
|
|
2155
|
-
type SaveComposerDraftRequest = Omit<ComposerDraft, "revision" | "sourceTurnId" | "sourceTurnVersion" | "updatedAt"> & {
|
|
2156
|
-
expectedRevision: number;
|
|
2157
|
-
};
|
|
2158
|
-
type SaveNewSessionDraftRequest = Omit<NewSessionDraft, "revision" | "updatedAt"> & {
|
|
2159
|
-
expectedRevision: number;
|
|
2160
|
-
};
|
|
2161
|
-
/** Input shape for agent config on create/update (server applies defaults). */
|
|
2162
|
-
type ScheduledTaskAgentConfigInput = {
|
|
2163
|
-
prompt: string;
|
|
2164
|
-
resources?: ResourceRef[] | undefined;
|
|
2165
|
-
tools?: ToolRef[] | undefined;
|
|
2166
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2167
|
-
slackBotConnectionId?: string | undefined;
|
|
2168
|
-
model?: string | undefined;
|
|
2169
|
-
reasoningEffort?: ReasoningEffort | undefined;
|
|
2170
|
-
sandboxBackend?: SandboxBackend | undefined;
|
|
2171
|
-
goal?: GoalSpec | undefined;
|
|
2172
|
-
maxNestedAgentDepth?: number | undefined;
|
|
2173
|
-
};
|
|
2174
|
-
type CreateScheduledTaskRequest = {
|
|
2175
|
-
name: string;
|
|
2176
|
-
schedule: ScheduledTaskScheduleSpec;
|
|
2177
|
-
runMode?: ScheduledTaskRunMode | undefined;
|
|
2178
|
-
overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
|
|
2179
|
-
agentConfig: ScheduledTaskAgentConfigInput;
|
|
2180
|
-
status?: ScheduledTaskStatus | undefined;
|
|
2181
|
-
variableSetId?: string | null | undefined;
|
|
2182
|
-
/** @deprecated use variableSetId */
|
|
2183
|
-
environmentId?: string | null | undefined;
|
|
2184
|
-
rigId?: string | null | undefined;
|
|
2185
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2186
|
-
};
|
|
2187
|
-
type UpdateScheduledTaskRequest = {
|
|
2188
|
-
name?: string | undefined;
|
|
2189
|
-
schedule?: ScheduledTaskScheduleSpec | undefined;
|
|
2190
|
-
runMode?: ScheduledTaskRunMode | undefined;
|
|
2191
|
-
overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
|
|
2192
|
-
agentConfig?: ScheduledTaskAgentConfigInput | undefined;
|
|
2193
|
-
status?: ScheduledTaskStatus | undefined;
|
|
2194
|
-
variableSetId?: string | null | undefined;
|
|
2195
|
-
/** @deprecated use variableSetId */
|
|
2196
|
-
environmentId?: string | null | undefined;
|
|
2197
|
-
rigId?: string | null | undefined;
|
|
2198
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2199
|
-
};
|
|
2200
|
-
type ScheduledTaskRunStatus = "queued" | "dispatched" | "failed";
|
|
2201
|
-
type ScheduledTaskTriggerType = "scheduled" | "manual";
|
|
2202
|
-
type ScheduledTaskRun = {
|
|
2203
|
-
id: string;
|
|
2204
|
-
accountId: string;
|
|
2205
|
-
workspaceId: string;
|
|
2206
|
-
taskId: string;
|
|
2207
|
-
status: ScheduledTaskRunStatus;
|
|
2208
|
-
triggerType: ScheduledTaskTriggerType;
|
|
2209
|
-
scheduledAt: string | null;
|
|
2210
|
-
firedAt: string;
|
|
2211
|
-
sessionId: string | null;
|
|
2212
|
-
triggerEventId: string | null;
|
|
2213
|
-
error: string | null;
|
|
2214
|
-
createdAt: string;
|
|
2215
|
-
updatedAt: string;
|
|
2216
|
-
};
|
|
2217
|
-
/**
|
|
2218
|
-
* Variable values are write-only by design: the API never returns a value, so
|
|
2219
|
-
* reads expose name + version metadata only. Values are decrypted exclusively
|
|
2220
|
-
* inside the worker at sandbox materialization time.
|
|
2221
|
-
*/
|
|
2222
|
-
type VariableSetVariableMetadata = {
|
|
2223
|
-
name: string;
|
|
2224
|
-
version: number;
|
|
2225
|
-
createdAt: string;
|
|
2226
|
-
updatedAt: string;
|
|
2227
|
-
};
|
|
2228
|
-
type VariableSet = {
|
|
2229
|
-
id: string;
|
|
2230
|
-
accountId: string;
|
|
2231
|
-
workspaceId: string;
|
|
2232
|
-
name: string;
|
|
2233
|
-
description: string | null;
|
|
2234
|
-
variables: VariableSetVariableMetadata[];
|
|
2235
|
-
createdAt: string;
|
|
2236
|
-
updatedAt: string;
|
|
2237
|
-
};
|
|
2238
|
-
/** @deprecated use VariableSetVariableMetadata */
|
|
2239
|
-
type WorkspaceEnvironmentVariableMetadata = VariableSetVariableMetadata;
|
|
2240
|
-
/** @deprecated use VariableSet */
|
|
2241
|
-
type WorkspaceEnvironment = VariableSet;
|
|
2242
|
-
type CreateVariableSetRequest = {
|
|
2243
|
-
name: string;
|
|
2244
|
-
description?: string | undefined;
|
|
2245
|
-
/** Initial variables. Values are write-only: they never come back on reads. */
|
|
2246
|
-
variables?: {
|
|
2247
|
-
name: string;
|
|
2248
|
-
value: string;
|
|
2249
|
-
}[] | undefined;
|
|
2250
|
-
};
|
|
2251
|
-
/** @deprecated use CreateVariableSetRequest */
|
|
2252
|
-
type CreateWorkspaceEnvironmentRequest = CreateVariableSetRequest;
|
|
2253
|
-
type UpdateVariableSetRequest = {
|
|
2254
|
-
name?: string | undefined;
|
|
2255
|
-
description?: string | null | undefined;
|
|
2256
|
-
};
|
|
2257
|
-
/** @deprecated use UpdateVariableSetRequest */
|
|
2258
|
-
type UpdateWorkspaceEnvironmentRequest = UpdateVariableSetRequest;
|
|
2259
|
-
type SetVariableSetVariableRequest = {
|
|
2260
|
-
value: string;
|
|
2261
|
-
};
|
|
2262
|
-
/** @deprecated use SetVariableSetVariableRequest */
|
|
2263
|
-
type SetWorkspaceEnvironmentVariableRequest = SetVariableSetVariableRequest;
|
|
2264
|
-
type RigCheck = {
|
|
2265
|
-
name: string;
|
|
2266
|
-
command: string;
|
|
2267
|
-
};
|
|
2268
|
-
type RigVersion = {
|
|
2269
|
-
id: string;
|
|
2270
|
-
rigId: string;
|
|
2271
|
-
version: number;
|
|
2272
|
-
image: string | null;
|
|
2273
|
-
setupScript: string | null;
|
|
2274
|
-
checks: RigCheck[];
|
|
2275
|
-
credentialHooks: string[];
|
|
2276
|
-
defaultVariableSetIds: string[];
|
|
2277
|
-
changelog: string | null;
|
|
2278
|
-
createdBy: string | null;
|
|
2279
|
-
active: boolean;
|
|
2280
|
-
createdAt: string;
|
|
2281
|
-
};
|
|
2282
|
-
type RigVerificationHealth = {
|
|
2283
|
-
checkHealth: "passing" | "failing" | "unknown";
|
|
2284
|
-
lastVerifiedAt: string | null;
|
|
2285
|
-
};
|
|
2286
|
-
type Rig = {
|
|
2287
|
-
id: string;
|
|
2288
|
-
accountId: string;
|
|
2289
|
-
workspaceId: string;
|
|
2290
|
-
name: string;
|
|
2291
|
-
description: string | null;
|
|
2292
|
-
createdBy: string | null;
|
|
2293
|
-
activeVersion: RigVersion | null;
|
|
2294
|
-
activeVersionHealth?: RigVerificationHealth | null;
|
|
2295
|
-
versionCount: number;
|
|
2296
|
-
createdAt: string;
|
|
2297
|
-
updatedAt: string;
|
|
2298
|
-
};
|
|
2299
|
-
type RigChangeKind = "setup_append" | "definition_edit";
|
|
2300
|
-
type RigChangeStatus = "proposed" | "verifying" | "merged" | "rejected" | "failed";
|
|
2301
|
-
type RigCheckResult = {
|
|
2302
|
-
name: string;
|
|
2303
|
-
command: string;
|
|
2304
|
-
exitCode: number | null;
|
|
2305
|
-
output?: string | undefined;
|
|
2306
|
-
};
|
|
2307
|
-
type RigChangeVerification = {
|
|
2308
|
-
startedAt?: string | undefined;
|
|
2309
|
-
finishedAt?: string | undefined;
|
|
2310
|
-
log?: string | undefined;
|
|
2311
|
-
checkResults?: RigCheckResult[] | undefined;
|
|
2312
|
-
[key: string]: unknown;
|
|
2313
|
-
};
|
|
2314
|
-
type RigChange = {
|
|
2315
|
-
id: string;
|
|
2316
|
-
rigId: string;
|
|
2317
|
-
baseVersionId: string | null;
|
|
2318
|
-
kind: RigChangeKind;
|
|
2319
|
-
payload: Record<string, unknown>;
|
|
2320
|
-
status: RigChangeStatus;
|
|
2321
|
-
proposedBy: string | null;
|
|
2322
|
-
verification: RigChangeVerification | null;
|
|
2323
|
-
resultVersionId: string | null;
|
|
2324
|
-
createdAt: string;
|
|
2325
|
-
updatedAt: string;
|
|
2326
|
-
};
|
|
2327
|
-
type CreateRigRequest = {
|
|
2328
|
-
name: string;
|
|
2329
|
-
description?: string | undefined;
|
|
2330
|
-
image?: string | undefined;
|
|
2331
|
-
setupScript?: string | undefined;
|
|
2332
|
-
checks?: RigCheck[] | undefined;
|
|
2333
|
-
credentialHooks?: string[] | undefined;
|
|
2334
|
-
defaultVariableSetIds?: string[] | undefined;
|
|
2335
|
-
};
|
|
2336
|
-
type UpdateRigRequest = {
|
|
2337
|
-
name?: string | undefined;
|
|
2338
|
-
description?: string | null | undefined;
|
|
2339
|
-
};
|
|
2340
|
-
type RigSetupAppendPayload = {
|
|
2341
|
-
command: string;
|
|
2342
|
-
note?: string | undefined;
|
|
2343
|
-
};
|
|
2344
|
-
type RigDefinitionEditPayload = {
|
|
2345
|
-
image?: string | null | undefined;
|
|
2346
|
-
setupScript?: string | null | undefined;
|
|
2347
|
-
checks?: RigCheck[] | undefined;
|
|
2348
|
-
credentialHooks?: string[] | undefined;
|
|
2349
|
-
defaultVariableSetIds?: string[] | undefined;
|
|
2350
|
-
changelog?: string | null | undefined;
|
|
2351
|
-
};
|
|
2352
|
-
type ProposeRigChangeRequest = {
|
|
2353
|
-
kind: "setup_append";
|
|
2354
|
-
payload: RigSetupAppendPayload;
|
|
2355
|
-
} | {
|
|
2356
|
-
kind: "definition_edit";
|
|
2357
|
-
payload: RigDefinitionEditPayload;
|
|
2358
|
-
};
|
|
2359
|
-
type FileStatus = "pending_upload" | "ready" | "failed" | "expired" | "deleted";
|
|
2360
|
-
type FileAsset = {
|
|
2361
|
-
id: string;
|
|
2362
|
-
workspaceId: string;
|
|
2363
|
-
status: FileStatus;
|
|
2364
|
-
filename: string;
|
|
2365
|
-
safeFilename: string;
|
|
2366
|
-
contentType: string;
|
|
2367
|
-
sizeBytes: number;
|
|
2368
|
-
sha256: string | null;
|
|
2369
|
-
bucket: string;
|
|
2370
|
-
objectKey: string;
|
|
2371
|
-
createdAt: string;
|
|
2372
|
-
updatedAt: string;
|
|
2373
|
-
};
|
|
2374
|
-
/** Mirrors the closed, provider-neutral retained-output contract. */
|
|
2375
|
-
declare const RETAINED_OUTPUT_DEFAULT_PAGE_BYTES: number;
|
|
2376
|
-
declare const RETAINED_OUTPUT_MAX_PAGE_BYTES: number;
|
|
2377
|
-
type RetainedOutputKind = "tool_result" | "assistant_completion" | "internal_update" | "event_media" | "file";
|
|
2378
|
-
type RetainedOutputUnavailableReason = "not_retained" | "pending" | "failed" | "expired" | "deleted" | "missing_storage" | "storage_write_failed" | "unsupported";
|
|
2379
|
-
type RetainedArtifactReference = {
|
|
2380
|
-
available: true;
|
|
2381
|
-
artifactId: string;
|
|
2382
|
-
kind: RetainedOutputKind;
|
|
2383
|
-
contentType: string;
|
|
2384
|
-
originalBytes: number;
|
|
2385
|
-
sha256: string;
|
|
2386
|
-
retainedAt: string;
|
|
2387
|
-
retention: {
|
|
2388
|
-
policy: "workspace_file";
|
|
2389
|
-
expiresAt: null;
|
|
2390
|
-
};
|
|
2391
|
-
retrieval: {
|
|
2392
|
-
method: "GET";
|
|
2393
|
-
path: string;
|
|
2394
|
-
acceptRanges: "bytes";
|
|
2395
|
-
maxRangeBytes: number;
|
|
2396
|
-
};
|
|
2397
|
-
};
|
|
2398
|
-
type RetainedArtifactUnavailable = {
|
|
2399
|
-
available: false;
|
|
2400
|
-
artifactId: string;
|
|
2401
|
-
reason: RetainedOutputUnavailableReason;
|
|
2402
|
-
};
|
|
2403
|
-
type RetainedArtifactMetadata = RetainedArtifactReference | RetainedArtifactUnavailable;
|
|
2404
|
-
type RetainedArtifactContentOptions = {
|
|
2405
|
-
/** One RFC-style bytes range, for example `bytes=1048576-2097151`. */
|
|
2406
|
-
range?: string | undefined;
|
|
2407
|
-
signal?: AbortSignal | undefined;
|
|
2408
|
-
};
|
|
2409
|
-
type RetainedArtifactContent = {
|
|
2410
|
-
bytes: Uint8Array;
|
|
2411
|
-
status: 200 | 206;
|
|
2412
|
-
contentType: string;
|
|
2413
|
-
contentLength: number;
|
|
2414
|
-
contentRange: string | null;
|
|
2415
|
-
acceptRanges: "bytes";
|
|
2416
|
-
};
|
|
2417
|
-
type CreateFileUploadRequest = {
|
|
2418
|
-
filename: string;
|
|
2419
|
-
contentType: string;
|
|
2420
|
-
sizeBytes: number;
|
|
2421
|
-
sha256?: string | undefined;
|
|
2422
|
-
};
|
|
2423
|
-
type CreateFileUploadResponse = {
|
|
2424
|
-
fileId: string;
|
|
2425
|
-
uploadId: string;
|
|
2426
|
-
/** Pre-signed PUT URL for the file bytes (direct to object storage). */
|
|
2427
|
-
putUrl: string;
|
|
2428
|
-
/** Headers that MUST be sent with the PUT for the signature to validate. */
|
|
2429
|
-
requiredHeaders: Record<string, string>;
|
|
2430
|
-
expiresAt: string;
|
|
2431
|
-
maxSizeBytes: number;
|
|
2432
|
-
};
|
|
2433
|
-
type CompleteFileUploadResponse = {
|
|
2434
|
-
file: FileAsset;
|
|
2435
|
-
};
|
|
2436
|
-
type FileDownloadUrlResponse = {
|
|
2437
|
-
url: string;
|
|
2438
|
-
expiresAt: string;
|
|
2439
|
-
};
|
|
2440
|
-
/** Bytes accepted by the `uploadFile` helper. */
|
|
2441
|
-
type FileUploadData = Blob | ArrayBuffer | Uint8Array | string;
|
|
2442
|
-
type UploadFileInput = {
|
|
2443
|
-
filename: string;
|
|
2444
|
-
contentType: string;
|
|
2445
|
-
data: FileUploadData;
|
|
2446
|
-
sha256?: string | undefined;
|
|
2447
|
-
};
|
|
2448
|
-
type DocumentStatus = "queued" | "indexing" | "ready" | "failed";
|
|
2449
|
-
type KnowledgeSourceKind = "manual_upload" | "meeting_transcript" | "repository" | "email" | "chat" | "document" | "web" | "other";
|
|
2450
|
-
type DocumentSearchMode = "hybrid" | "vector" | "keyword";
|
|
2451
|
-
type DocumentVisibility = "workspace" | "private";
|
|
2452
|
-
type DocumentCurationStatus = "none" | "pending" | "suggested" | "auto_filed" | "failed";
|
|
2453
|
-
type DocumentCuration = {
|
|
2454
|
-
suggestedBaseId: string | null;
|
|
2455
|
-
suggestedBaseName: string | null;
|
|
2456
|
-
confidence: number;
|
|
2457
|
-
reason: string | null;
|
|
2458
|
-
originalTitle: string | null;
|
|
2459
|
-
model: string | null;
|
|
2460
|
-
};
|
|
2461
|
-
type DocumentBase = {
|
|
2462
|
-
id: string;
|
|
2463
|
-
workspaceId: string;
|
|
2464
|
-
name: string;
|
|
2465
|
-
description: string | null;
|
|
2466
|
-
createdAt: string;
|
|
2467
|
-
updatedAt: string;
|
|
2468
|
-
};
|
|
2469
|
-
type Document = {
|
|
2470
|
-
id: string;
|
|
2471
|
-
workspaceId: string;
|
|
2472
|
-
baseId: string;
|
|
2473
|
-
fileId: string;
|
|
2474
|
-
status: DocumentStatus;
|
|
2475
|
-
title: string;
|
|
2476
|
-
parser: string;
|
|
2477
|
-
chunkCount: number;
|
|
2478
|
-
error: string | null;
|
|
2479
|
-
sourceKind: KnowledgeSourceKind;
|
|
2480
|
-
sourceUri: string | null;
|
|
2481
|
-
sourceExternalId: string | null;
|
|
2482
|
-
sourceTitle: string | null;
|
|
2483
|
-
sourceAuthor: string | null;
|
|
2484
|
-
sourceCreatedAt: string | null;
|
|
2485
|
-
sourceUpdatedAt: string | null;
|
|
2486
|
-
sourceVersion: string | null;
|
|
2487
|
-
aclTags: string[];
|
|
2488
|
-
visibility: DocumentVisibility;
|
|
2489
|
-
createdBy: string | null;
|
|
2490
|
-
agentAccess: boolean;
|
|
2491
|
-
summary: string | null;
|
|
2492
|
-
topics: string[];
|
|
2493
|
-
curationStatus: DocumentCurationStatus;
|
|
2494
|
-
curation: DocumentCuration | null;
|
|
2495
|
-
createdAt: string;
|
|
2496
|
-
updatedAt: string;
|
|
2497
|
-
};
|
|
2498
|
-
type DocumentSearchResult = {
|
|
2499
|
-
chunkId: string;
|
|
2500
|
-
workspaceId: string;
|
|
2501
|
-
documentId: string;
|
|
2502
|
-
baseId: string;
|
|
2503
|
-
fileId: string;
|
|
2504
|
-
title: string;
|
|
2505
|
-
text: string;
|
|
2506
|
-
score: number;
|
|
2507
|
-
matchType: DocumentSearchMode;
|
|
2508
|
-
vectorScore: number | null;
|
|
2509
|
-
keywordScore: number | null;
|
|
2510
|
-
chunkIndex: number;
|
|
2511
|
-
metadata: Record<string, unknown>;
|
|
2512
|
-
sourceKind: KnowledgeSourceKind;
|
|
2513
|
-
sourceUri: string | null;
|
|
2514
|
-
sourceExternalId: string | null;
|
|
2515
|
-
sourceTitle: string | null;
|
|
2516
|
-
sourceAuthor: string | null;
|
|
2517
|
-
sourceCreatedAt: string | null;
|
|
2518
|
-
sourceUpdatedAt: string | null;
|
|
2519
|
-
sourceVersion: string | null;
|
|
2520
|
-
aclTags: string[];
|
|
2521
|
-
};
|
|
2522
|
-
type CreateDocumentBaseRequest = {
|
|
2523
|
-
name: string;
|
|
2524
|
-
description?: string | undefined;
|
|
2525
|
-
};
|
|
2526
|
-
type AddDocumentRequest = {
|
|
2527
|
-
fileId: string;
|
|
2528
|
-
title?: string | undefined;
|
|
2529
|
-
sourceKind?: KnowledgeSourceKind | undefined;
|
|
2530
|
-
sourceUri?: string | undefined;
|
|
2531
|
-
sourceExternalId?: string | undefined;
|
|
2532
|
-
sourceTitle?: string | undefined;
|
|
2533
|
-
sourceAuthor?: string | undefined;
|
|
2534
|
-
sourceCreatedAt?: string | undefined;
|
|
2535
|
-
sourceUpdatedAt?: string | undefined;
|
|
2536
|
-
sourceVersion?: string | undefined;
|
|
2537
|
-
aclTags?: string[] | undefined;
|
|
2538
|
-
visibility?: DocumentVisibility | undefined;
|
|
2539
|
-
agentAccess?: boolean | undefined;
|
|
2540
|
-
};
|
|
2541
|
-
type CreateKnowledgeDropRequest = {
|
|
2542
|
-
text?: string | undefined;
|
|
2543
|
-
fileId?: string | undefined;
|
|
2544
|
-
filename?: string | undefined;
|
|
2545
|
-
title?: string | undefined;
|
|
2546
|
-
visibility?: DocumentVisibility | undefined;
|
|
2547
|
-
agentAccess?: boolean | undefined;
|
|
2548
|
-
};
|
|
2549
|
-
type MoveDocumentRequest = {
|
|
2550
|
-
targetBaseId?: string | undefined;
|
|
2551
|
-
};
|
|
2552
|
-
type DocumentSearchRequest = {
|
|
2553
|
-
query: string;
|
|
2554
|
-
baseIds?: string[] | undefined;
|
|
2555
|
-
mode?: DocumentSearchMode | undefined;
|
|
2556
|
-
sourceKinds?: KnowledgeSourceKind[] | undefined;
|
|
2557
|
-
aclTags?: string[] | undefined;
|
|
2558
|
-
limit?: number | undefined;
|
|
2559
|
-
};
|
|
2560
|
-
type DocumentSearchResponse = {
|
|
2561
|
-
results: DocumentSearchResult[];
|
|
2562
|
-
};
|
|
2563
|
-
type KnowledgeMemoryStatus = "proposed" | "approved" | "rejected" | "active" | "superseded" | "archived";
|
|
2564
|
-
type KnowledgeMemoryKind = "semantic" | "episodic" | "procedural" | "decision" | "preference";
|
|
2565
|
-
type KnowledgeSourceRef = {
|
|
2566
|
-
kind: "document_chunk" | "document" | "session_event" | "memory" | "external";
|
|
2567
|
-
id: string;
|
|
2568
|
-
uri?: string | undefined;
|
|
2569
|
-
title?: string | undefined;
|
|
2570
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2571
|
-
};
|
|
2572
|
-
type KnowledgeMemory = {
|
|
2573
|
-
id: string;
|
|
2574
|
-
workspaceId: string;
|
|
2575
|
-
status: KnowledgeMemoryStatus;
|
|
2576
|
-
kind: KnowledgeMemoryKind;
|
|
2577
|
-
scope: string;
|
|
2578
|
-
text: string;
|
|
2579
|
-
sourceRefs: KnowledgeSourceRef[];
|
|
2580
|
-
confidence: number;
|
|
2581
|
-
metadata: Record<string, unknown>;
|
|
2582
|
-
createdBySessionId: string | null;
|
|
2583
|
-
reviewedBy: string | null;
|
|
2584
|
-
reviewedAt: string | null;
|
|
2585
|
-
pinned: boolean;
|
|
2586
|
-
usageCount: number;
|
|
2587
|
-
lastUsedAt: string | null;
|
|
2588
|
-
supersedesId: string | null;
|
|
2589
|
-
supersededById: string | null;
|
|
2590
|
-
validFrom: string;
|
|
2591
|
-
validUntil: string | null;
|
|
2592
|
-
createdAt: string;
|
|
2593
|
-
updatedAt: string;
|
|
2594
|
-
};
|
|
2595
|
-
type CreateKnowledgeMemoryRequest = {
|
|
2596
|
-
status?: KnowledgeMemoryStatus | undefined;
|
|
2597
|
-
kind?: KnowledgeMemoryKind | undefined;
|
|
2598
|
-
scope?: string | undefined;
|
|
2599
|
-
text: string;
|
|
2600
|
-
sourceRefs?: KnowledgeSourceRef[] | undefined;
|
|
2601
|
-
confidence?: number | undefined;
|
|
2602
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2603
|
-
createdBySessionId?: string | undefined;
|
|
2604
|
-
pinned?: boolean | undefined;
|
|
2605
|
-
replacesId?: string | undefined;
|
|
2606
|
-
};
|
|
2607
|
-
type UpdateKnowledgeMemoryRequest = {
|
|
2608
|
-
status?: KnowledgeMemoryStatus | undefined;
|
|
2609
|
-
kind?: KnowledgeMemoryKind | undefined;
|
|
2610
|
-
scope?: string | undefined;
|
|
2611
|
-
text?: string | undefined;
|
|
2612
|
-
sourceRefs?: KnowledgeSourceRef[] | undefined;
|
|
2613
|
-
confidence?: number | undefined;
|
|
2614
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2615
|
-
reviewedBy?: string | undefined;
|
|
2616
|
-
pinned?: boolean | undefined;
|
|
2617
|
-
};
|
|
2618
|
-
type KnowledgeMemorySearchRequest = {
|
|
2619
|
-
query?: string | undefined;
|
|
2620
|
-
status?: KnowledgeMemoryStatus | undefined;
|
|
2621
|
-
kind?: KnowledgeMemoryKind | undefined;
|
|
2622
|
-
scope?: string | undefined;
|
|
2623
|
-
limit?: number | undefined;
|
|
2624
|
-
};
|
|
2625
|
-
type WorkspaceMemorySearchMode = "hybrid" | "vector" | "keyword";
|
|
2626
|
-
type WorkspaceMemorySearchRequest = {
|
|
2627
|
-
query: string;
|
|
2628
|
-
kind?: KnowledgeMemoryKind | undefined;
|
|
2629
|
-
limit?: number | undefined;
|
|
2630
|
-
mode?: WorkspaceMemorySearchMode | undefined;
|
|
2631
|
-
};
|
|
2632
|
-
type WorkspaceMemorySearchResult = {
|
|
2633
|
-
memory: KnowledgeMemory;
|
|
2634
|
-
score: number;
|
|
2635
|
-
matchType: WorkspaceMemorySearchMode;
|
|
2636
|
-
vectorScore: number | null;
|
|
2637
|
-
keywordScore: number | null;
|
|
2638
|
-
};
|
|
2639
|
-
type WorkspaceMemorySearchResponse = {
|
|
2640
|
-
results: WorkspaceMemorySearchResult[];
|
|
2641
|
-
};
|
|
2642
|
-
type CapabilityPackConnectorAuthModel = "oauth2_authorization_code_pkce" | "oauth2_authorization_code" | "api_key" | "credential_ref";
|
|
2643
|
-
type CapabilityPackConnector = {
|
|
2644
|
-
id: string;
|
|
2645
|
-
name: string;
|
|
2646
|
-
category: string;
|
|
2647
|
-
authModel: CapabilityPackConnectorAuthModel;
|
|
2648
|
-
providers: string[];
|
|
2649
|
-
scopes: string[];
|
|
2650
|
-
required: boolean;
|
|
2651
|
-
metadata: Record<string, unknown>;
|
|
2652
|
-
};
|
|
2653
|
-
type CapabilityPackKnowledge = {
|
|
2654
|
-
type: "document_base";
|
|
2655
|
-
id: string;
|
|
2656
|
-
name: string;
|
|
2657
|
-
description: string | null;
|
|
2658
|
-
required: boolean;
|
|
2659
|
-
};
|
|
2660
|
-
type CapabilityPackScheduledTaskTemplate = {
|
|
2661
|
-
id: string;
|
|
2662
|
-
name: string;
|
|
2663
|
-
description: string;
|
|
2664
|
-
defaultSchedule: ScheduledTaskScheduleSpec;
|
|
2665
|
-
defaultRunMode: ScheduledTaskRunMode;
|
|
2666
|
-
defaultOverlapPolicy: ScheduledTaskOverlapPolicy;
|
|
2667
|
-
prompt?: string | undefined;
|
|
2668
|
-
};
|
|
2669
|
-
type CapabilityPackSkillFile = {
|
|
2670
|
-
path: string;
|
|
2671
|
-
content: string;
|
|
2672
|
-
};
|
|
2673
|
-
type CapabilityPackSkill = {
|
|
2674
|
-
name: string;
|
|
2675
|
-
description?: string | undefined;
|
|
2676
|
-
files: CapabilityPackSkillFile[];
|
|
2677
|
-
};
|
|
2678
|
-
type SessionSkill = CapabilityPackSkill;
|
|
2679
|
-
type CapabilityPackVariableSetSpec = {
|
|
2680
|
-
description: string;
|
|
2681
|
-
requiredVariables: string[];
|
|
2682
|
-
required: boolean;
|
|
2683
|
-
};
|
|
2684
|
-
type CapabilityPack = {
|
|
2685
|
-
id: string;
|
|
2686
|
-
name: string;
|
|
2687
|
-
description: string;
|
|
2688
|
-
role: string;
|
|
2689
|
-
category: string;
|
|
2690
|
-
version: string;
|
|
2691
|
-
sandboxImage?: string | undefined;
|
|
2692
|
-
skills: CapabilityPackSkill[];
|
|
2693
|
-
tools: ToolRef[];
|
|
2694
|
-
connectors: CapabilityPackConnector[];
|
|
2695
|
-
knowledge: CapabilityPackKnowledge[];
|
|
2696
|
-
scheduledTaskTemplates: CapabilityPackScheduledTaskTemplate[];
|
|
2697
|
-
variableSet?: CapabilityPackVariableSetSpec | undefined;
|
|
2698
|
-
metadata: Record<string, unknown>;
|
|
2699
|
-
};
|
|
2700
|
-
/** Input shape for registering a pack manifest (server applies defaults). */
|
|
2701
|
-
type RegisterCapabilityPackRequest = {
|
|
2702
|
-
id: string;
|
|
2703
|
-
name: string;
|
|
2704
|
-
description: string;
|
|
2705
|
-
role: string;
|
|
2706
|
-
category: string;
|
|
2707
|
-
version: string;
|
|
2708
|
-
sandboxImage?: string | undefined;
|
|
2709
|
-
skills?: {
|
|
2710
|
-
name: string;
|
|
2711
|
-
description?: string | undefined;
|
|
2712
|
-
files: CapabilityPackSkillFile[];
|
|
2713
|
-
}[] | undefined;
|
|
2714
|
-
tools?: ToolRef[] | undefined;
|
|
2715
|
-
connectors?: {
|
|
2716
|
-
id: string;
|
|
2717
|
-
name: string;
|
|
2718
|
-
category: string;
|
|
2719
|
-
authModel: CapabilityPackConnectorAuthModel;
|
|
2720
|
-
providers?: string[] | undefined;
|
|
2721
|
-
scopes?: string[] | undefined;
|
|
2722
|
-
required?: boolean | undefined;
|
|
2723
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2724
|
-
}[] | undefined;
|
|
2725
|
-
knowledge?: {
|
|
2726
|
-
type: "document_base";
|
|
2727
|
-
id: string;
|
|
2728
|
-
name: string;
|
|
2729
|
-
description?: string | null | undefined;
|
|
2730
|
-
required?: boolean | undefined;
|
|
2731
|
-
}[] | undefined;
|
|
2732
|
-
scheduledTaskTemplates?: {
|
|
2733
|
-
id: string;
|
|
2734
|
-
name: string;
|
|
2735
|
-
description: string;
|
|
2736
|
-
defaultSchedule: ScheduledTaskScheduleSpec;
|
|
2737
|
-
defaultRunMode?: ScheduledTaskRunMode | undefined;
|
|
2738
|
-
defaultOverlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
|
|
2739
|
-
prompt?: string | undefined;
|
|
2740
|
-
}[] | undefined;
|
|
2741
|
-
variableSet?: {
|
|
2742
|
-
description: string;
|
|
2743
|
-
requiredVariables?: string[] | undefined;
|
|
2744
|
-
required?: boolean | undefined;
|
|
2745
|
-
} | undefined;
|
|
2746
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2747
|
-
};
|
|
2748
|
-
type WorkspaceRegisteredPack = {
|
|
2749
|
-
accountId: string;
|
|
2750
|
-
workspaceId: string;
|
|
2751
|
-
pack: CapabilityPack;
|
|
2752
|
-
createdAt: string;
|
|
2753
|
-
updatedAt: string;
|
|
2754
|
-
};
|
|
2755
|
-
type PackInstallationStatus = "active" | "disabled";
|
|
2756
|
-
type PackInstallation = {
|
|
2757
|
-
id: string;
|
|
2758
|
-
accountId: string;
|
|
2759
|
-
workspaceId: string;
|
|
2760
|
-
packId: string;
|
|
2761
|
-
status: PackInstallationStatus;
|
|
2762
|
-
metadata: Record<string, unknown>;
|
|
2763
|
-
enabledAt: string;
|
|
2764
|
-
updatedAt: string;
|
|
2765
|
-
};
|
|
2766
|
-
type EnablePackRequest = {
|
|
2767
|
-
variableSetId?: string | undefined;
|
|
2768
|
-
/** @deprecated use variableSetId */
|
|
2769
|
-
environmentId?: string | undefined;
|
|
2770
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2771
|
-
};
|
|
2772
|
-
type ListPacksResponse = {
|
|
2773
|
-
packs: CapabilityPack[];
|
|
2774
|
-
installations: PackInstallation[];
|
|
2775
|
-
};
|
|
2776
|
-
type GetPackResponse = {
|
|
2777
|
-
pack: CapabilityPack;
|
|
2778
|
-
installation: PackInstallation | null;
|
|
2779
|
-
};
|
|
2780
|
-
type CapabilityKind = "pack" | "mcp" | "api" | "skill" | "plugin";
|
|
2781
|
-
type CapabilitySource = "built_in" | "library" | "configured" | "public_registry" | "registry" | "manual";
|
|
2782
|
-
type CapabilityInstallationStatus = "active" | "disabled";
|
|
2783
|
-
type CapabilityCatalogAuthKind = "oauth2" | "api_key" | "none" | "unknown";
|
|
2784
|
-
type CapabilityCatalogTier = "verified" | "community";
|
|
2785
|
-
type CapabilityRuntime = {
|
|
2786
|
-
available: boolean;
|
|
2787
|
-
mcpServerId?: string | undefined;
|
|
2788
|
-
transport?: string | undefined;
|
|
2789
|
-
notes: string | null;
|
|
2790
|
-
/** Secret-safe server-derived registry exposure state. */
|
|
2791
|
-
catalogTrust?: {
|
|
2792
|
-
state: "trusted" | "legacy_active" | "unverified";
|
|
2793
|
-
reason: "trusted_source" | "verified_probe" | "active_installation_compatibility" | "missing_verification";
|
|
2794
|
-
} | undefined;
|
|
2795
|
-
};
|
|
2796
|
-
type CapabilityCatalogItem = {
|
|
2797
|
-
id: string;
|
|
2798
|
-
accountId?: string | undefined;
|
|
2799
|
-
workspaceId?: string | undefined;
|
|
2800
|
-
kind: CapabilityKind;
|
|
2801
|
-
source: CapabilitySource;
|
|
2802
|
-
name: string;
|
|
2803
|
-
description: string | null;
|
|
2804
|
-
category: string;
|
|
2805
|
-
tags: string[];
|
|
2806
|
-
homepageUrl: string | null;
|
|
2807
|
-
endpointUrl: string | null;
|
|
2808
|
-
installUrl: string | null;
|
|
2809
|
-
authModel: string | null;
|
|
2810
|
-
providerDomain: string | null;
|
|
2811
|
-
surfaceType: string | null;
|
|
2812
|
-
transport: string | null;
|
|
2813
|
-
mcpUrl: string | null;
|
|
2814
|
-
authKind: CapabilityCatalogAuthKind | null;
|
|
2815
|
-
credentialFacts: Record<string, unknown>[];
|
|
2816
|
-
tier: CapabilityCatalogTier | null;
|
|
2817
|
-
provenance: string | null;
|
|
2818
|
-
logoAssetPath: string | null;
|
|
2819
|
-
importBatchId: string | null;
|
|
2820
|
-
stale: boolean;
|
|
2821
|
-
staleAt: string | null;
|
|
2822
|
-
tools: ToolRef[];
|
|
2823
|
-
runtime: CapabilityRuntime;
|
|
2824
|
-
enabled: boolean;
|
|
2825
|
-
enabledReason: string | null;
|
|
2826
|
-
/** The connection backing this enabled installation, or null when none is involved. */
|
|
2827
|
-
connectionRef: {
|
|
2828
|
-
connectionId?: string | undefined;
|
|
2829
|
-
providerDomain: string;
|
|
2830
|
-
kind: string;
|
|
2831
|
-
subjectScope?: "subject" | "workspace" | undefined;
|
|
2832
|
-
} | null;
|
|
2833
|
-
metadata: Record<string, unknown>;
|
|
2834
|
-
createdAt?: string | undefined;
|
|
2835
|
-
updatedAt?: string | undefined;
|
|
2836
|
-
};
|
|
2837
|
-
type CapabilityInstallation = {
|
|
2838
|
-
id: string;
|
|
2839
|
-
accountId: string;
|
|
2840
|
-
workspaceId: string;
|
|
2841
|
-
capabilityId: string;
|
|
2842
|
-
kind: CapabilityKind;
|
|
2843
|
-
status: CapabilityInstallationStatus;
|
|
2844
|
-
config: Record<string, unknown>;
|
|
2845
|
-
metadata: Record<string, unknown>;
|
|
2846
|
-
enabledAt: string;
|
|
2847
|
-
updatedAt: string;
|
|
2848
|
-
};
|
|
2849
|
-
type CapabilityCatalogResponse = {
|
|
2850
|
-
items: CapabilityCatalogItem[];
|
|
2851
|
-
installations: CapabilityInstallation[];
|
|
2852
|
-
};
|
|
2853
|
-
type CreateCapabilityCatalogItemRequest = {
|
|
2854
|
-
id?: string | undefined;
|
|
2855
|
-
kind: Exclude<CapabilityKind, "pack">;
|
|
2856
|
-
source?: CapabilitySource | undefined;
|
|
2857
|
-
name: string;
|
|
2858
|
-
description?: string | undefined;
|
|
2859
|
-
category?: string | undefined;
|
|
2860
|
-
tags?: string[] | undefined;
|
|
2861
|
-
homepageUrl?: string | undefined;
|
|
2862
|
-
endpointUrl?: string | undefined;
|
|
2863
|
-
installUrl?: string | undefined;
|
|
2864
|
-
authModel?: string | undefined;
|
|
2865
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2866
|
-
};
|
|
2867
|
-
type EnableCapabilityRequest = {
|
|
2868
|
-
config?: Record<string, unknown> | undefined;
|
|
2869
|
-
metadata?: Record<string, unknown> | undefined;
|
|
2870
|
-
connectionRef?: McpServerConnectionRef | undefined;
|
|
2871
|
-
/**
|
|
2872
|
-
* Credential headers for remote MCP capabilities. Write-only: encrypted at
|
|
2873
|
-
* rest, injected only into the runtime MCP client, never returned by the
|
|
2874
|
-
* API (responses expose header names only).
|
|
2875
|
-
*/
|
|
2876
|
-
headers?: Record<string, string> | undefined;
|
|
2877
|
-
/**
|
|
2878
|
-
* Initial variableSet attachment for kind=pack capabilities — mirrors the
|
|
2879
|
-
* dedicated POST /packs/:id/enable body. Required to enable an
|
|
2880
|
-
* variableSet.required pack through this unified path; ignored otherwise.
|
|
2881
|
-
*/
|
|
2882
|
-
variableSetId?: string | undefined;
|
|
2883
|
-
/** @deprecated use variableSetId */
|
|
2884
|
-
environmentId?: string | undefined;
|
|
2885
|
-
};
|
|
2886
|
-
type DiscoverMcpCapabilitiesResponse = {
|
|
2887
|
-
items: CapabilityCatalogItem[];
|
|
2888
|
-
source: "official_mcp_registry";
|
|
2889
|
-
sourceUrl: string;
|
|
2890
|
-
};
|
|
2891
|
-
type GitHubRepository = {
|
|
2892
|
-
id: number;
|
|
2893
|
-
installationId: number;
|
|
2894
|
-
fullName: string;
|
|
2895
|
-
name: string;
|
|
2896
|
-
private: boolean;
|
|
2897
|
-
htmlUrl: string;
|
|
2898
|
-
cloneUrl: string;
|
|
2899
|
-
defaultBranch: string;
|
|
2900
|
-
accountLogin: string;
|
|
2901
|
-
accountType: string | null;
|
|
2902
|
-
};
|
|
2903
|
-
type GitHubRepositoryScope = "all" | "selected";
|
|
2904
|
-
type GitHubBindingStatus = "disabled" | "unbound" | "bound";
|
|
2905
|
-
type GitHubAppSetupMode = "platform" | "operator";
|
|
2906
|
-
type GitHubInstallationLifecycle = "active" | "suspended" | "deleted" | "unverified";
|
|
2907
|
-
type GitHubInstallationBinding = {
|
|
2908
|
-
installationId: number;
|
|
2909
|
-
githubAccountId: number | null;
|
|
2910
|
-
accountLogin: string | null;
|
|
2911
|
-
accountType: string | null;
|
|
2912
|
-
lifecycle: GitHubInstallationLifecycle;
|
|
2913
|
-
repositoryScope: GitHubRepositoryScope;
|
|
2914
|
-
repositoryCount: number;
|
|
2915
|
-
/** OpenGeni-owned entry point for changing the installation's repository allowlist. */
|
|
2916
|
-
configureUrl: string | null;
|
|
2917
|
-
createdAt: string;
|
|
2918
|
-
updatedAt: string;
|
|
2919
|
-
};
|
|
2920
|
-
type GitHubAppInfo = {
|
|
2921
|
-
configured: boolean;
|
|
2922
|
-
/** Truthful workspace binding state; server App credentials alone are not a binding. */
|
|
2923
|
-
status: GitHubBindingStatus;
|
|
2924
|
-
/** Platform deployments expose installation only; operator deployments may create an App. */
|
|
2925
|
-
setupMode: GitHubAppSetupMode;
|
|
2926
|
-
appId: string | null;
|
|
2927
|
-
clientId: string | null;
|
|
2928
|
-
appSlug: string | null;
|
|
2929
|
-
/** Fresh OAuth-first existing-installation discovery and install entry point. */
|
|
2930
|
-
installUrl: string | null;
|
|
2931
|
-
/** Compatibility alias for installUrl. */
|
|
2932
|
-
linkUrl: string | null;
|
|
2933
|
-
/** Installation bindings owned independently by this workspace. */
|
|
2934
|
-
installations: GitHubInstallationBinding[];
|
|
2935
|
-
/** Setting names still missing when `configured` is false. */
|
|
2936
|
-
missing: string[];
|
|
2937
|
-
};
|
|
2938
|
-
type GitHubRepositoriesResponse = {
|
|
2939
|
-
repositories: GitHubRepository[];
|
|
2940
|
-
};
|
|
2941
|
-
type CreateGitHubAppManifestRequest = {
|
|
2942
|
-
appName?: string | undefined;
|
|
2943
|
-
organization?: string | undefined;
|
|
2944
|
-
public?: boolean | undefined;
|
|
2945
|
-
includeCiPermissions?: boolean | undefined;
|
|
2946
|
-
};
|
|
2947
|
-
type CreateGitHubAppManifestResponse = {
|
|
2948
|
-
/** GitHub URL to POST the manifest to (personal or organization flow). */
|
|
2949
|
-
actionUrl: string;
|
|
2950
|
-
state: string;
|
|
2951
|
-
manifest: Record<string, unknown>;
|
|
2952
|
-
};
|
|
2953
|
-
type BillingMode = "disabled" | "stripe";
|
|
2954
|
-
type EntitlementsMode = "none" | "static" | "managed";
|
|
2955
|
-
type BillingBalance = {
|
|
2956
|
-
accountId: string;
|
|
2957
|
-
balanceMicros: number;
|
|
2958
|
-
currency: "usd";
|
|
2959
|
-
updatedAt: string;
|
|
2960
|
-
};
|
|
2961
|
-
declare const KNOWN_USAGE_EVENT_TYPES: readonly ["agent_run.created", "agent_run.completed", "model.tokens", "model.cost", "file.uploaded", "file.deleted", "document.indexed", "scheduled_task.fired", "api_key.request", "sandbox.warm_seconds", "sandbox.warm_cost"];
|
|
2962
|
-
type KnownUsageEventType = (typeof KNOWN_USAGE_EVENT_TYPES)[number];
|
|
2963
|
-
type UsageEventType = KnownUsageEventType | (string & {});
|
|
2964
|
-
type UsageEvent = {
|
|
2965
|
-
id: string;
|
|
2966
|
-
workspaceId: string;
|
|
2967
|
-
accountId: string;
|
|
2968
|
-
subjectId: string | null;
|
|
2969
|
-
eventType: UsageEventType;
|
|
2970
|
-
quantity: number;
|
|
2971
|
-
unit: string;
|
|
2972
|
-
sourceResourceType: string | null;
|
|
2973
|
-
sourceResourceId: string | null;
|
|
2974
|
-
idempotencyKey: string;
|
|
2975
|
-
occurredAt: string;
|
|
2976
|
-
recordedAt: string;
|
|
2977
|
-
exportedToBillingAt: string | null;
|
|
2978
|
-
billingProviderEventId: string | null;
|
|
2979
|
-
};
|
|
2980
|
-
type EntitlementValue = boolean | string | number | string[];
|
|
2981
|
-
type Entitlements = Record<string, EntitlementValue>;
|
|
2982
|
-
type BillingSummary = {
|
|
2983
|
-
mode: BillingMode;
|
|
2984
|
-
balance: BillingBalance;
|
|
2985
|
-
};
|
|
2986
|
-
type BillingUsageResponse = {
|
|
2987
|
-
balance: BillingBalance;
|
|
2988
|
-
usage: UsageEvent[];
|
|
2989
|
-
};
|
|
2990
|
-
type BillingEntitlementsResponse = {
|
|
2991
|
-
accountId: string;
|
|
2992
|
-
mode: EntitlementsMode;
|
|
2993
|
-
entitlements: Entitlements;
|
|
2994
|
-
};
|
|
2995
|
-
type CreateCheckoutRequest = {
|
|
2996
|
-
accountId?: string | undefined;
|
|
2997
|
-
/** USD amount with cent precision (server enforces min/max). */
|
|
2998
|
-
amountUsd: number;
|
|
2999
|
-
successUrl?: string | undefined;
|
|
3000
|
-
cancelUrl?: string | undefined;
|
|
3001
|
-
};
|
|
3002
|
-
type CreateCheckoutResponse = {
|
|
3003
|
-
checkoutSessionId: string;
|
|
3004
|
-
url: string;
|
|
3005
|
-
};
|
|
3006
|
-
type UserMessageEventInput = {
|
|
3007
|
-
type: "user.message";
|
|
3008
|
-
clientEventId?: string | undefined;
|
|
3009
|
-
payload: {
|
|
3010
|
-
text: string;
|
|
3011
|
-
turnInstructions?: string | undefined;
|
|
3012
|
-
resources?: ResourceRef[] | undefined;
|
|
3013
|
-
model?: string | undefined;
|
|
3014
|
-
reasoningEffort?: ReasoningEffort | undefined;
|
|
3015
|
-
mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[] | undefined;
|
|
3016
|
-
};
|
|
3017
|
-
};
|
|
3018
|
-
type UserApprovalDecisionEventInput = {
|
|
3019
|
-
type: "user.approvalDecision";
|
|
3020
|
-
clientEventId?: string | undefined;
|
|
3021
|
-
payload: {
|
|
3022
|
-
approvalId: string;
|
|
3023
|
-
decision: "approve" | "reject";
|
|
3024
|
-
message?: string | undefined;
|
|
3025
|
-
};
|
|
3026
|
-
};
|
|
3027
|
-
type UserHumanInputResponseEventInput = {
|
|
3028
|
-
type: "user.humanInputResponse";
|
|
3029
|
-
clientEventId?: string | undefined;
|
|
3030
|
-
payload: {
|
|
3031
|
-
requestId: string;
|
|
3032
|
-
response: SubmitHumanInputResponseRequest;
|
|
3033
|
-
};
|
|
3034
|
-
};
|
|
3035
|
-
/** Control/user events a client may POST to a session's event log. */
|
|
3036
|
-
type ClientSessionEventInput = UserMessageEventInput | UserApprovalDecisionEventInput | UserHumanInputResponseEventInput;
|
|
3037
|
-
/** A point-in-time machine metrics sample. `gpuUtilPct`/`gpuMemBytes` are null
|
|
3038
|
-
* when no GPU was present (not-reported, never a real zero); the bytes/load are
|
|
3039
|
-
* numbers; `sampledAt` is an ISO-8601 instant. */
|
|
3040
|
-
type MetricSample = {
|
|
3041
|
-
cpuPct: number;
|
|
3042
|
-
load1: number;
|
|
3043
|
-
load5: number;
|
|
3044
|
-
load15: number;
|
|
3045
|
-
memUsedBytes: number;
|
|
3046
|
-
memTotalBytes: number;
|
|
3047
|
-
diskUsedBytes: number;
|
|
3048
|
-
diskTotalBytes: number;
|
|
3049
|
-
gpuUtilPct: number | null;
|
|
3050
|
-
gpuMemBytes: number | null;
|
|
3051
|
-
runQueue: number;
|
|
3052
|
-
sampledAt: string;
|
|
3053
|
-
};
|
|
3054
|
-
/** The derived dashboard state of a machine (M3 liveness + consent/display
|
|
3055
|
-
* reasons + the in-flight device-flow). */
|
|
3056
|
-
type MachineState = "online" | "reconnecting" | "offline" | "consent_required" | "display_unavailable" | "enrolling";
|
|
3057
|
-
type MachineKind = "modal" | "selfhosted";
|
|
3058
|
-
/** A machine as the Machines dashboard renders it (an enrolled selfhosted machine
|
|
3059
|
-
* or the session's synthetic Modal group box, `isSessionGroup: true`). */
|
|
3060
|
-
type MachineView = {
|
|
3061
|
-
sandboxId: string;
|
|
3062
|
-
enrollmentId: string | null;
|
|
3063
|
-
name: string;
|
|
3064
|
-
kind: MachineKind;
|
|
3065
|
-
state: MachineState;
|
|
3066
|
-
active: boolean;
|
|
3067
|
-
isSessionGroup: boolean;
|
|
3068
|
-
workspaceGeneration: number | null;
|
|
3069
|
-
archiveGeneration: number | null;
|
|
3070
|
-
archiveComplete: boolean;
|
|
3071
|
-
os: string;
|
|
3072
|
-
arch: string;
|
|
3073
|
-
hasDisplay: boolean;
|
|
3074
|
-
/** Non-null only when a display exists but capture is blocked (macOS Screen
|
|
3075
|
-
* Recording / TCC not granted) — the UI can surface "display: capture not
|
|
3076
|
-
* granted". null == capture permitted OR headless. */
|
|
3077
|
-
desktopUnavailableReason?: string | null | undefined;
|
|
3078
|
-
allowScreenControl: boolean;
|
|
3079
|
-
sharedSessionCount: number;
|
|
3080
|
-
lastSeenAt: string | null;
|
|
3081
|
-
metrics: MetricSample | null;
|
|
3082
|
-
};
|
|
3083
|
-
/** GET /v1/workspaces/:ws/machines — the dashboard list + the active-sandbox
|
|
3084
|
-
* pointer (null activeSandboxId == the session's own group box is active). */
|
|
3085
|
-
type MachinesResponse = {
|
|
3086
|
-
activeSandboxId: string | null;
|
|
3087
|
-
activeEpoch: number;
|
|
3088
|
-
machines: MachineView[];
|
|
3089
|
-
};
|
|
3090
|
-
/** GET /v1/workspaces/:ws/machines/:enrollmentId/metrics/series — the downsampled
|
|
3091
|
-
* (~1/min) history the dashboard time-range reads. */
|
|
3092
|
-
type MachineMetricsSeriesResponse = {
|
|
3093
|
-
samples: MetricSample[];
|
|
3094
|
-
};
|
|
3095
|
-
/** POST /v1/workspaces/:ws/sessions/:sessionId/active-sandbox — swap a session's
|
|
3096
|
-
* active sandbox. `target` is a `MachineView.sandboxId`, or "session"/"default"
|
|
3097
|
-
* to swap back to the session's own group box. */
|
|
3098
|
-
type SwapActiveSandboxRequest = {
|
|
3099
|
-
target: string;
|
|
3100
|
-
};
|
|
3101
|
-
/** The swap outcome (mirrors the server `FleetSwapResult`). `swapped` is true on a
|
|
3102
|
-
* successful repoint OR a no-op (already there); `reason` carries the failure
|
|
3103
|
-
* detail (unowned/offline target, or a lost epoch fence) when false. */
|
|
3104
|
-
type SwapActiveSandboxResponse = {
|
|
3105
|
-
swapped: boolean;
|
|
3106
|
-
activeSandboxId: string | null;
|
|
3107
|
-
activeEpoch: number;
|
|
3108
|
-
reason?: string;
|
|
3109
|
-
code?: "stale_pointer" | "offline_enrollment" | "unsupported_backend_context" | "transient_establishment" | "concurrent_swap" | "recovery_in_progress" | "recovery_degraded" | "recovery_unrecoverable";
|
|
3110
|
-
};
|
|
3111
|
-
/** Mirror of `@opengeni/contracts` EnrollmentOs. */
|
|
3112
|
-
type EnrollmentOs = "linux" | "macos" | "windows";
|
|
3113
|
-
/** POST /v1/enrollments/device/lookup body. */
|
|
3114
|
-
type DeviceEnrollmentLookupRequest = {
|
|
3115
|
-
userCode: string;
|
|
3116
|
-
};
|
|
3117
|
-
/** The presentational machine details the consent screen renders. */
|
|
3118
|
-
type DeviceEnrollmentLookupMachine = {
|
|
3119
|
-
machineName: string | null;
|
|
3120
|
-
os: EnrollmentOs;
|
|
3121
|
-
arch: string;
|
|
3122
|
-
canOfferDisplay: boolean;
|
|
3123
|
-
requestsScreenControl: boolean;
|
|
3124
|
-
};
|
|
3125
|
-
/** POST /v1/enrollments/device/lookup response (no secrets, no device_code). */
|
|
3126
|
-
type DeviceEnrollmentLookupResponse = {
|
|
3127
|
-
workspaceId: string;
|
|
3128
|
-
userCode: string;
|
|
3129
|
-
machine: DeviceEnrollmentLookupMachine;
|
|
3130
|
-
expiresAt: string;
|
|
3131
|
-
};
|
|
3132
|
-
/** POST /v1/workspaces/:ws/enrollments/device/approve body. */
|
|
3133
|
-
type DeviceEnrollmentApproveRequest = {
|
|
3134
|
-
userCode: string;
|
|
3135
|
-
allowScreenControl?: boolean;
|
|
3136
|
-
};
|
|
3137
|
-
/** POST /v1/workspaces/:ws/enrollments/device/approve response. */
|
|
3138
|
-
type DeviceEnrollmentApproveResponse = {
|
|
3139
|
-
approved: boolean;
|
|
3140
|
-
enrollmentId: string;
|
|
3141
|
-
sandboxId: string;
|
|
3142
|
-
allowScreenControl: boolean;
|
|
3143
|
-
};
|
|
3144
|
-
/** POST /v1/workspaces/:ws/enrollments/device/deny body. */
|
|
3145
|
-
type DeviceEnrollmentDenyRequest = {
|
|
3146
|
-
userCode: string;
|
|
3147
|
-
};
|
|
3148
|
-
/** POST /v1/workspaces/:ws/enrollments/device/deny response. */
|
|
3149
|
-
type DeviceEnrollmentDenyResponse = {
|
|
3150
|
-
denied: boolean;
|
|
3151
|
-
};
|
|
3152
|
-
/** POST /v1/workspaces/:ws/enrollments/token body. */
|
|
3153
|
-
type MintEnrollTokenRequest = {
|
|
3154
|
-
allowScreenControl?: boolean;
|
|
3155
|
-
};
|
|
3156
|
-
/** POST /v1/workspaces/:ws/enrollments/token response. The `token` is SECRET. */
|
|
3157
|
-
type MintEnrollTokenResponse = {
|
|
3158
|
-
token: string;
|
|
3159
|
-
expiresAt: string;
|
|
3160
|
-
expiresInSeconds: number;
|
|
3161
|
-
};
|
|
3162
|
-
/** The credential payload the headless exchange returns (a subset of the agent's
|
|
3163
|
-
* EnrollmentCredentials — IDENTICAL to the device-flow poll authorized branch). */
|
|
3164
|
-
type EnrollmentCredentials = {
|
|
3165
|
-
agentId: string;
|
|
3166
|
-
workspaceId: string;
|
|
3167
|
-
bearer: string;
|
|
3168
|
-
subjectPrefix: string;
|
|
3169
|
-
natsUrls: string[];
|
|
3170
|
-
relayUrl: string;
|
|
3171
|
-
relayToken: string;
|
|
3172
|
-
natsAccountCreds: string;
|
|
3173
|
-
updatePublicKey: string;
|
|
3174
|
-
consentedWholeMachine: boolean;
|
|
3175
|
-
consentedScreenControl: boolean;
|
|
3176
|
-
};
|
|
3177
|
-
/** POST /v1/enrollments/token/exchange body (the headless / fleet enroll path). */
|
|
3178
|
-
type EnrollTokenExchangeRequest = {
|
|
3179
|
-
token: string;
|
|
3180
|
-
publicKey: string;
|
|
3181
|
-
os?: EnrollmentOs;
|
|
3182
|
-
arch?: string;
|
|
3183
|
-
machineName?: string;
|
|
3184
|
-
exposure?: "whole-machine";
|
|
3185
|
-
canOfferDisplay?: boolean;
|
|
3186
|
-
requestsScreenControl?: boolean;
|
|
3187
|
-
};
|
|
3188
|
-
/** POST /v1/enrollments/token/exchange response (wraps the credential shape). */
|
|
3189
|
-
type EnrollTokenExchangeResponse = {
|
|
3190
|
-
credentials: EnrollmentCredentials;
|
|
3191
|
-
};
|
|
3192
|
-
|
|
3193
|
-
/**
|
|
3194
|
-
* Transport boundary for the streaming core. The client implements it with
|
|
3195
|
-
* `fetch`; unit tests script it directly.
|
|
3196
|
-
*/
|
|
3197
|
-
type SessionEventStreamTransport = {
|
|
3198
|
-
/** Open the SSE stream, replaying durable events after `after` first. */
|
|
3199
|
-
openStream: (after: number, signal: AbortSignal | undefined) => Promise<ReadableStream<Uint8Array>>;
|
|
3200
|
-
/** Replay durable events by sequence (`GET .../events?after=&limit=`). */
|
|
3201
|
-
listEvents: (after: number, limit: number) => Promise<SessionEvent[]>;
|
|
3202
|
-
};
|
|
3203
|
-
type StreamConnectionState = "connecting" | "live" | "reconnecting";
|
|
3204
|
-
type StreamSessionEventsOptions = {
|
|
3205
|
-
/** Resume after this sequence number (exclusive). Defaults to 0 (full replay). */
|
|
3206
|
-
after?: number;
|
|
3207
|
-
/** Aborting ends the stream gracefully (the generator returns). */
|
|
3208
|
-
signal?: AbortSignal;
|
|
3209
|
-
/** Reconnect on transient drops. Defaults to true. */
|
|
3210
|
-
reconnect?: boolean;
|
|
3211
|
-
/** Initial reconnect backoff. Defaults to 500ms. */
|
|
3212
|
-
reconnectDelayMs?: number;
|
|
3213
|
-
/** Backoff ceiling. Defaults to 10s. */
|
|
3214
|
-
maxReconnectDelayMs?: number;
|
|
3215
|
-
/**
|
|
3216
|
-
* Give up after this many consecutive failed reconnect attempts (i.e. N
|
|
3217
|
-
* reconnects = N+1 total open-stream calls). Defaults to unlimited.
|
|
3218
|
-
*/
|
|
3219
|
-
maxReconnectAttempts?: number;
|
|
3220
|
-
/** Await authoritative client reconciliation before exposing `live`. */
|
|
3221
|
-
beforeLive?: (() => void | Promise<void>) | undefined;
|
|
3222
|
-
onStateChange?: (state: StreamConnectionState) => void;
|
|
3223
|
-
};
|
|
3224
|
-
/**
|
|
3225
|
-
* Stream a session's events with exactly-once, in-order delivery.
|
|
3226
|
-
*
|
|
3227
|
-
* Guarantees, anchored on the per-session contiguous `sequence`:
|
|
3228
|
-
* - **No duplicates**: events at or below the cursor are dropped, so server
|
|
3229
|
-
* replay overlap and reconnect overlap never re-yield.
|
|
3230
|
-
* - **No gaps**: each reconnect resumes from the last seen sequence, and a
|
|
3231
|
-
* gap observed inside one connection is backfilled from the durable replay
|
|
3232
|
-
* endpoint before the newer event is yielded (events are durable before
|
|
3233
|
-
* they are published live, so the backfill always finds them).
|
|
3234
|
-
* - **Ordered**: sequences are yielded strictly ascending.
|
|
3235
|
-
*
|
|
3236
|
-
* The generator ends when `signal` aborts, when the server closes and
|
|
3237
|
-
* `reconnect` is false, or with an error for non-retryable failures.
|
|
3238
|
-
*/
|
|
3239
|
-
declare function streamSessionEvents(transport: SessionEventStreamTransport, options?: StreamSessionEventsOptions): AsyncGenerator<SessionEvent, void, void>;
|
|
3240
|
-
|
|
3241
|
-
type WorkspaceControlStreamTransport = {
|
|
3242
|
-
/** The server replays every durable event after the cursor before going live. */
|
|
3243
|
-
openStream: (after: number, signal: AbortSignal | undefined) => Promise<ReadableStream<Uint8Array>>;
|
|
3244
|
-
};
|
|
3245
|
-
/**
|
|
3246
|
-
* Reconnecting workspace invalidation stream. Control revisions are monotonic
|
|
3247
|
-
* but can begin above one after the one-way migration, so unlike conversation
|
|
3248
|
-
* events this stream intentionally permits sparse sequence values.
|
|
3249
|
-
*/
|
|
3250
|
-
declare function streamWorkspaceControlEvents(transport: WorkspaceControlStreamTransport, options?: StreamSessionEventsOptions): AsyncGenerator<WorkspaceControlEvent, void, void>;
|
|
3251
|
-
|
|
3252
|
-
type WorkspaceInstructionPolicyKind = "charter" | "policy";
|
|
3253
|
-
type WorkspaceInstructionPolicyScope = "global" | "role";
|
|
3254
|
-
type WorkspaceInstructionPolicyProvenanceSource = "human" | "onboarding" | "knowledge_proposal" | "legacy_import";
|
|
3255
|
-
type WorkspaceInstructionPolicyDraftProvenanceSource = Exclude<WorkspaceInstructionPolicyProvenanceSource, "legacy_import">;
|
|
3256
|
-
type WorkspaceInstructionPolicyActivationType = "activate" | "rollback";
|
|
3257
|
-
declare function normalizeWorkspaceInstructionPolicyRoleKey(value: string): string;
|
|
3258
|
-
type WorkspaceInstructionPolicyTarget = {
|
|
3259
|
-
kind: WorkspaceInstructionPolicyKind;
|
|
3260
|
-
scope: WorkspaceInstructionPolicyScope;
|
|
3261
|
-
roleKey: string | null;
|
|
3262
|
-
};
|
|
3263
|
-
type WorkspaceInstructionPolicyRevisionIdentity = {
|
|
3264
|
-
id: string;
|
|
3265
|
-
revision: number;
|
|
3266
|
-
contentHash: string;
|
|
3267
|
-
};
|
|
3268
|
-
type WorkspaceInstructionPolicyRevision = WorkspaceInstructionPolicyRevisionIdentity & WorkspaceInstructionPolicyTarget & {
|
|
3269
|
-
accountId: string;
|
|
3270
|
-
workspaceId: string;
|
|
3271
|
-
content: string;
|
|
3272
|
-
provenance: {
|
|
3273
|
-
source: WorkspaceInstructionPolicyProvenanceSource;
|
|
3274
|
-
sourceId: string | null;
|
|
3275
|
-
};
|
|
3276
|
-
supersedesRevisionId: string | null;
|
|
3277
|
-
createdBySubjectId: string;
|
|
3278
|
-
createdAt: string;
|
|
3279
|
-
};
|
|
3280
|
-
type WorkspaceInstructionPolicyHead = WorkspaceInstructionPolicyTarget & {
|
|
3281
|
-
workspaceId: string;
|
|
3282
|
-
revisionId: string;
|
|
3283
|
-
revision: number;
|
|
3284
|
-
contentHash: string;
|
|
3285
|
-
activationVersion: number;
|
|
3286
|
-
activatedAt: string;
|
|
3287
|
-
};
|
|
3288
|
-
type WorkspaceInstructionPolicyActivationEvent = WorkspaceInstructionPolicyTarget & {
|
|
3289
|
-
id: string;
|
|
3290
|
-
accountId: string;
|
|
3291
|
-
workspaceId: string;
|
|
3292
|
-
type: WorkspaceInstructionPolicyActivationType;
|
|
3293
|
-
activationVersion: number;
|
|
3294
|
-
oldRevision: WorkspaceInstructionPolicyRevisionIdentity | null;
|
|
3295
|
-
newRevision: WorkspaceInstructionPolicyRevisionIdentity;
|
|
3296
|
-
actorSubjectId: string;
|
|
3297
|
-
reason: string;
|
|
3298
|
-
createdAt: string;
|
|
3299
|
-
};
|
|
3300
|
-
type CreateWorkspaceInstructionPolicyDraftRequest = WorkspaceInstructionPolicyTarget & {
|
|
3301
|
-
content: string;
|
|
3302
|
-
provenanceSource?: WorkspaceInstructionPolicyDraftProvenanceSource;
|
|
3303
|
-
provenanceSourceId?: string | null;
|
|
3304
|
-
supersedesRevisionId?: string | null;
|
|
3305
|
-
};
|
|
3306
|
-
type ImportLegacyWorkspaceInstructionPolicyDraftRequest = {
|
|
3307
|
-
supersedesRevisionId?: string | null;
|
|
3308
|
-
};
|
|
3309
|
-
type WorkspaceInstructionPolicyListOptions = {
|
|
3310
|
-
kind?: WorkspaceInstructionPolicyKind;
|
|
3311
|
-
scope?: WorkspaceInstructionPolicyScope;
|
|
3312
|
-
roleKey?: string;
|
|
3313
|
-
afterRevision?: number;
|
|
3314
|
-
limit?: number;
|
|
3315
|
-
};
|
|
3316
|
-
type WorkspaceInstructionPolicyListResponse = {
|
|
3317
|
-
revisions: WorkspaceInstructionPolicyRevision[];
|
|
3318
|
-
activeHeads: WorkspaceInstructionPolicyHead[];
|
|
3319
|
-
activationEvents: WorkspaceInstructionPolicyActivationEvent[];
|
|
3320
|
-
nextAfterRevision: number | null;
|
|
3321
|
-
};
|
|
3322
|
-
type WorkspaceInstructionPolicyDiffRequest = {
|
|
3323
|
-
fromRevisionId: string;
|
|
3324
|
-
toRevisionId: string;
|
|
3325
|
-
};
|
|
3326
|
-
type WorkspaceInstructionPolicyDiffResponse = {
|
|
3327
|
-
from: WorkspaceInstructionPolicyRevision;
|
|
3328
|
-
to: WorkspaceInstructionPolicyRevision;
|
|
3329
|
-
format: "unified";
|
|
3330
|
-
diff: string;
|
|
3331
|
-
};
|
|
3332
|
-
type ActivateWorkspaceInstructionPolicyRequest = {
|
|
3333
|
-
expectedCurrentRevisionId: string | null;
|
|
3334
|
-
reason: string;
|
|
3335
|
-
};
|
|
3336
|
-
type RollbackWorkspaceInstructionPolicyRequest = {
|
|
3337
|
-
targetRevisionId: string;
|
|
3338
|
-
expectedCurrentRevisionId: string;
|
|
3339
|
-
reason: string;
|
|
3340
|
-
};
|
|
3341
|
-
type WorkspaceInstructionPolicyActivationResponse = {
|
|
3342
|
-
head: WorkspaceInstructionPolicyHead;
|
|
3343
|
-
event: WorkspaceInstructionPolicyActivationEvent;
|
|
3344
|
-
};
|
|
3345
|
-
type WorkspaceInstructionPolicyConflictResponse = {
|
|
3346
|
-
code: "WORKSPACE_INSTRUCTION_POLICY_CONFLICT";
|
|
3347
|
-
message: string;
|
|
3348
|
-
currentHead: WorkspaceInstructionPolicyHead | null;
|
|
3349
|
-
};
|
|
3350
|
-
|
|
3351
|
-
type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
3352
|
-
type WorkspaceControlEventPage = {
|
|
3353
|
-
events: WorkspaceControlEvent[];
|
|
3354
|
-
bytes: number;
|
|
3355
|
-
truncated: boolean;
|
|
3356
|
-
nextAfter: number | null;
|
|
3357
|
-
};
|
|
3358
|
-
type OpenGeniClientOptions = {
|
|
3359
|
-
/** Base URL of the OpenGeni API, e.g. `https://api.example.com`. */
|
|
3360
|
-
baseUrl: string;
|
|
3361
|
-
/** OpenGeni API key, sent as `Authorization: Bearer <apiKey>`. */
|
|
3362
|
-
apiKey?: string;
|
|
3363
|
-
/** Extra headers (static or computed per request) merged into every call. */
|
|
3364
|
-
headers?: Record<string, string> | (() => Record<string, string>);
|
|
3365
|
-
/** Custom fetch implementation. Defaults to the global `fetch`. */
|
|
3366
|
-
fetch?: FetchLike;
|
|
3367
|
-
};
|
|
3368
|
-
/** Per-request cancellation for identity-scoped, side-effect-free reads. */
|
|
3369
|
-
type OpenGeniRequestOptions = {
|
|
3370
|
-
signal?: AbortSignal | undefined;
|
|
3371
|
-
};
|
|
3372
|
-
type SendMessageInput = {
|
|
3373
|
-
text: string;
|
|
3374
|
-
/** System instructions scoped to this exact turn; never visible timeline text. */
|
|
3375
|
-
turnInstructions?: string;
|
|
3376
|
-
resources?: ResourceRef[];
|
|
3377
|
-
tools?: ToolRef[];
|
|
3378
|
-
model?: string;
|
|
3379
|
-
reasoningEffort?: ReasoningEffort;
|
|
3380
|
-
clientEventId?: string;
|
|
3381
|
-
controlEtag?: string;
|
|
3382
|
-
expectedDraftRevision?: number;
|
|
3383
|
-
mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[];
|
|
3384
|
-
};
|
|
3385
|
-
type SteerMessageResult = {
|
|
3386
|
-
/** The accepted `user.message` event. */
|
|
3387
|
-
accepted: SessionEvent;
|
|
3388
|
-
/** The exact turn created for this message in the same server transaction. */
|
|
3389
|
-
turn: SessionTurn;
|
|
3390
|
-
};
|
|
3391
|
-
/**
|
|
3392
|
-
* Typed client for the OpenGeni public API. Framework-agnostic: only needs
|
|
3393
|
-
* WHATWG `fetch` + streams, so it runs in Node 18+, Bun, Deno, browsers, and
|
|
3394
|
-
* edge runtimes.
|
|
3395
|
-
*/
|
|
3396
|
-
declare class OpenGeniClient {
|
|
3397
|
-
private readonly baseUrl;
|
|
3398
|
-
private readonly options;
|
|
3399
|
-
private readonly fetchImpl;
|
|
3400
|
-
constructor(options: OpenGeniClientOptions);
|
|
3401
|
-
createSession(workspaceId: string, request: CreateSessionRequest): Promise<CreateSessionResponse>;
|
|
3402
|
-
getNewSessionDraft(workspaceId: string): Promise<NewSessionDraft>;
|
|
3403
|
-
saveNewSessionDraft(workspaceId: string, request: SaveNewSessionDraftRequest): Promise<NewSessionDraft>;
|
|
3404
|
-
getSession(workspaceId: string, sessionId: string): Promise<Session>;
|
|
3405
|
-
updateSession(workspaceId: string, sessionId: string, request: UpdateSessionRequest): Promise<Session>;
|
|
3406
|
-
/** Replace the durable tool policy or explicitly adopt workspace defaults. */
|
|
3407
|
-
updateSessionToolPolicy(workspaceId: string, sessionId: string, request: UpdateSessionToolPolicyRequest): Promise<Session>;
|
|
3408
|
-
/**
|
|
3409
|
-
* Replace one attached MCP server's approval policy. The change is captured
|
|
3410
|
-
* by the next claimed attempt; already-claimed work keeps its immutable
|
|
3411
|
-
* policy snapshot.
|
|
3412
|
-
*/
|
|
3413
|
-
updateSessionMcpApprovalPolicy(workspaceId: string, sessionId: string, serverId: string, request: UpdateSessionMcpApprovalPolicyRequest): Promise<UpdateSessionMcpApprovalPolicyResponse>;
|
|
3414
|
-
listSessions(workspaceId: string, options?: {
|
|
3415
|
-
limit?: number;
|
|
3416
|
-
parentSessionId?: string | null;
|
|
3417
|
-
search?: string;
|
|
3418
|
-
}): Promise<Session[]>;
|
|
3419
|
-
/** Pin-aware ordinary-session page with a stable keyset cursor. */
|
|
3420
|
-
listSessionPage(workspaceId: string, options?: {
|
|
3421
|
-
limit?: number;
|
|
3422
|
-
parentSessionId?: string | null;
|
|
3423
|
-
cursor?: string;
|
|
3424
|
-
search?: string;
|
|
3425
|
-
/** Return only the complete personal pinned projection. */
|
|
3426
|
-
pinsOnly?: boolean;
|
|
3427
|
-
}): Promise<SessionListResponse>;
|
|
3428
|
-
/** Set this authenticated member's personal workspace pin for a session. */
|
|
3429
|
-
updateSessionPin(workspaceId: string, sessionId: string, request: UpdateSessionPinRequest): Promise<Session>;
|
|
3430
|
-
getSessionLineage(workspaceId: string, sessionId: string): Promise<SessionLineageResponse>;
|
|
3431
|
-
listTurns(workspaceId: string, sessionId: string, options?: {
|
|
3432
|
-
limit?: number;
|
|
3433
|
-
}): Promise<SessionTurn[]>;
|
|
3434
|
-
/**
|
|
3435
|
-
* List the workspace's machines (the Machines dashboard). Each enrolled
|
|
3436
|
-
* selfhosted machine carries its derived state + latest metrics +
|
|
3437
|
-
* sharedSessionCount. Pass `sessionId` for an in-session view, which adds the
|
|
3438
|
-
* session's synthetic Modal group box + the active-sandbox pointer.
|
|
3439
|
-
*/
|
|
3440
|
-
listMachines(workspaceId: string, options?: {
|
|
3441
|
-
sessionId?: string;
|
|
3442
|
-
signal?: AbortSignal;
|
|
3443
|
-
}): Promise<MachinesResponse>;
|
|
3444
|
-
/**
|
|
3445
|
-
* Read the downsampled (~1/min) metrics series for ONE machine over a time
|
|
3446
|
-
* window (default 1h). The samples are oldest-first (a left-to-right chart).
|
|
3447
|
-
*/
|
|
3448
|
-
machineMetricsSeries(workspaceId: string, enrollmentId: string, options?: {
|
|
3449
|
-
window?: "15m" | "1h" | "6h" | "24h";
|
|
3450
|
-
}): Promise<MetricSample[]>;
|
|
3451
|
-
/**
|
|
3452
|
-
* Resolve a pending device-enrollment flow by its user_code for the click-Grant
|
|
3453
|
-
* approve page (EnrollmentConsent). NO workspace in the path — the server
|
|
3454
|
-
* resolves the workspace from the (globally-unique-among-pending) code, then
|
|
3455
|
-
* authorizes the caller against it (enrollments:read). Rejects (404) when the
|
|
3456
|
-
* code is unknown/expired OR the caller lacks the grant — the two are
|
|
3457
|
-
* indistinguishable by design (no cross-workspace disclosure). Does not consume
|
|
3458
|
-
* the request.
|
|
3459
|
-
*/
|
|
3460
|
-
lookupDeviceEnrollment(userCode: string): Promise<DeviceEnrollmentLookupResponse>;
|
|
3461
|
-
/**
|
|
3462
|
-
* Approve a pending device-enrollment flow (the LOUD consent step). `allowScreenControl`
|
|
3463
|
-
* is the authoritative screen-control consent (whole-machine is mandatory/implicit).
|
|
3464
|
-
* Lands an enrollment + a selfhosted sandbox and unblocks the agent's poll.
|
|
3465
|
-
*/
|
|
3466
|
-
approveDeviceEnrollment(workspaceId: string, request: {
|
|
3467
|
-
userCode: string;
|
|
3468
|
-
allowScreenControl?: boolean;
|
|
3469
|
-
}): Promise<DeviceEnrollmentApproveResponse>;
|
|
3470
|
-
/** Deny a pending device-enrollment flow (the explicit "no" at the approve page). */
|
|
3471
|
-
denyDeviceEnrollment(workspaceId: string, request: {
|
|
3472
|
-
userCode: string;
|
|
3473
|
-
}): Promise<DeviceEnrollmentDenyResponse>;
|
|
3474
|
-
/**
|
|
3475
|
-
* Mint a short-TTL headless enroll token (the `oget_` token) for the fleet /
|
|
3476
|
-
* non-interactive enroll path. The returned `token` is SECRET — surface it once
|
|
3477
|
-
* with a copy-now warning; it cannot be re-read. `allowScreenControl` bakes the
|
|
3478
|
-
* screen-control consent into the token.
|
|
3479
|
-
*/
|
|
3480
|
-
mintEnrollToken(workspaceId: string, request?: {
|
|
3481
|
-
allowScreenControl?: boolean;
|
|
3482
|
-
}): Promise<MintEnrollTokenResponse>;
|
|
3483
|
-
/**
|
|
3484
|
-
* Swap a session's active sandbox (the user-authenticated equivalent of the
|
|
3485
|
-
* M7 `sandbox_swap` MCP tool). `target` is a `MachineView.sandboxId` from
|
|
3486
|
-
* `listMachines`, or "session"/"default" to swap back to the session's own
|
|
3487
|
-
* group box. Validation (ownership/liveness/epoch fence) is server-side; the
|
|
3488
|
-
* result echoes the resulting pointer (`swapped: false` + `reason` on a
|
|
3489
|
-
* rejected target or a lost epoch fence).
|
|
3490
|
-
*/
|
|
3491
|
-
swapActiveSandbox(workspaceId: string, sessionId: string, request: SwapActiveSandboxRequest): Promise<SwapActiveSandboxResponse>;
|
|
3492
|
-
listScheduledTasks(workspaceId: string, options?: {
|
|
3493
|
-
limit?: number;
|
|
3494
|
-
}): Promise<ScheduledTask[]>;
|
|
3495
|
-
getScheduledTask(workspaceId: string, taskId: string): Promise<ScheduledTask>;
|
|
3496
|
-
/**
|
|
3497
|
-
* Return the events from one bounded page. With no cursor, this uses the safe
|
|
3498
|
-
* semantic monitoring tail; pass explicit forensic options and a cursor for
|
|
3499
|
-
* retained audit replay. Use `listEventPage` when projection, coverage, or
|
|
3500
|
-
* resume-cursor facts are required.
|
|
3501
|
-
*/
|
|
3502
|
-
listEvents(workspaceId: string, sessionId: string, options?: SessionEventListOptions): Promise<SessionEvent[]>;
|
|
3503
|
-
/** Bounded durable/monitoring page plus exact projection and cursor facts. */
|
|
3504
|
-
listEventPage(workspaceId: string, sessionId: string, options: SessionEventCompactResultOptions): Promise<SessionEventCompactResult | null>;
|
|
3505
|
-
listEventPage(workspaceId: string, sessionId: string, options?: SessionEventListOptions): Promise<SessionEventPage>;
|
|
3506
|
-
/**
|
|
3507
|
-
* Fetch the authoritative newest-sequence semantic result directly. This is
|
|
3508
|
-
* the callback-loss recovery path: it reads one compact durable result and
|
|
3509
|
-
* never creates a model turn. `latest: "receipt"` aliases `tool_receipt`;
|
|
3510
|
-
* turn generation remains scoped retry metadata.
|
|
3511
|
-
*/
|
|
3512
|
-
getLatestEventResult(workspaceId: string, sessionId: string, options?: Omit<SessionEventCompactResultOptions, "resultMode">): Promise<SessionEventCompactResult | null>;
|
|
3513
|
-
/** POST a user/control event to the session. Returns the accepted event. */
|
|
3514
|
-
sendEvent(workspaceId: string, sessionId: string, event: ClientSessionEventInput): Promise<SessionEvent>;
|
|
3515
|
-
sendMessage(workspaceId: string, sessionId: string, message: string | SendMessageInput): Promise<SessionEvent>;
|
|
3516
|
-
pauseSession(workspaceId: string, sessionId: string, options?: {
|
|
3517
|
-
reason?: string;
|
|
3518
|
-
clientEventId?: string;
|
|
3519
|
-
expectedControlEtag?: string;
|
|
3520
|
-
}): Promise<SessionControlResponse>;
|
|
3521
|
-
sendApprovalDecision(workspaceId: string, sessionId: string, decision: {
|
|
3522
|
-
approvalId: string;
|
|
3523
|
-
decision: "approve" | "reject";
|
|
3524
|
-
message?: string;
|
|
3525
|
-
clientEventId?: string;
|
|
3526
|
-
}): Promise<SessionEvent>;
|
|
3527
|
-
listHumanInputRequests(workspaceId: string, sessionId: string, options?: {
|
|
3528
|
-
status?: SessionHumanInputRequest["status"];
|
|
3529
|
-
}): Promise<SessionHumanInputRequest[]>;
|
|
3530
|
-
getHumanInputRequest(workspaceId: string, sessionId: string, requestId: string): Promise<SessionHumanInputRequest>;
|
|
3531
|
-
submitHumanInputResponse(workspaceId: string, sessionId: string, requestId: string, response: SubmitHumanInputResponseRequest, options?: {
|
|
3532
|
-
clientEventId?: string;
|
|
3533
|
-
}): Promise<SessionEvent>;
|
|
3534
|
-
/**
|
|
3535
|
-
* Live-stream a session's events with automatic reconnect, resume from the
|
|
3536
|
-
* last seen sequence, gap backfill, and duplicate suppression. See
|
|
3537
|
-
* {@link streamSessionEvents} for the delivery guarantees.
|
|
3538
|
-
*/
|
|
3539
|
-
streamEvents(workspaceId: string, sessionId: string, options?: StreamSessionEventsOptions): AsyncGenerator<SessionEvent, void, void>;
|
|
3540
|
-
/** The transport `streamEvents` runs on; useful for custom streaming layers. */
|
|
3541
|
-
eventStreamTransport(workspaceId: string, sessionId: string): SessionEventStreamTransport;
|
|
3542
|
-
/** Open one raw SSE connection (no reconnect). Most callers want `streamEvents`. */
|
|
3543
|
-
openEventStream(workspaceId: string, sessionId: string, options?: {
|
|
3544
|
-
after?: number;
|
|
3545
|
-
signal?: AbortSignal;
|
|
3546
|
-
}): Promise<ReadableStream<Uint8Array>>;
|
|
3547
|
-
getQueue(workspaceId: string, sessionId: string): Promise<SessionQueueSnapshot>;
|
|
3548
|
-
moveQueueItem(workspaceId: string, sessionId: string, turnId: string, request: MoveSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
|
|
3549
|
-
editQueueItem(workspaceId: string, sessionId: string, turnId: string, request: EditSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
|
|
3550
|
-
steerQueueItem(workspaceId: string, sessionId: string, turnId: string, request: SteerSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
|
|
3551
|
-
deleteQueueItem(workspaceId: string, sessionId: string, turnId: string, request: DeleteSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
|
|
3552
|
-
getComposerDraft(workspaceId: string, sessionId: string): Promise<ComposerDraft>;
|
|
3553
|
-
saveComposerDraft(workspaceId: string, sessionId: string, request: SaveComposerDraftRequest): Promise<ComposerDraft>;
|
|
3554
|
-
controlSession(workspaceId: string, sessionId: string, request: {
|
|
3555
|
-
action: "pause" | "resume";
|
|
3556
|
-
reason?: string;
|
|
3557
|
-
clientEventId: string;
|
|
3558
|
-
expectedControlEtag?: string;
|
|
3559
|
-
}): Promise<SessionControlResponse>;
|
|
3560
|
-
resumeSession(workspaceId: string, sessionId: string, options?: {
|
|
3561
|
-
reason?: string;
|
|
3562
|
-
clientEventId?: string;
|
|
3563
|
-
expectedControlEtag?: string;
|
|
3564
|
-
}): Promise<SessionControlResponse>;
|
|
3565
|
-
setWorkspaceInferenceState(workspaceId: string, request: {
|
|
3566
|
-
action: "pause" | "resume";
|
|
3567
|
-
reason?: string;
|
|
3568
|
-
clientEventId: string;
|
|
3569
|
-
expectedRevision?: number;
|
|
3570
|
-
}): Promise<WorkspaceInferenceControlResponse>;
|
|
3571
|
-
listWorkspaceControlEvents(workspaceId: string, options?: {
|
|
3572
|
-
after?: number;
|
|
3573
|
-
limit?: number;
|
|
3574
|
-
}): Promise<WorkspaceControlEvent[]>;
|
|
3575
|
-
/** Count/byte-bounded page plus an explicit continuation cursor. */
|
|
3576
|
-
listWorkspaceControlEventPage(workspaceId: string, options?: {
|
|
3577
|
-
after?: number;
|
|
3578
|
-
limit?: number;
|
|
3579
|
-
}): Promise<WorkspaceControlEventPage>;
|
|
3580
|
-
streamWorkspaceControlEvents(workspaceId: string, options?: StreamSessionEventsOptions): AsyncGenerator<WorkspaceControlEvent, void, void>;
|
|
3581
|
-
workspaceControlStreamTransport(workspaceId: string): WorkspaceControlStreamTransport;
|
|
3582
|
-
openWorkspaceControlEventStream(workspaceId: string, options?: {
|
|
3583
|
-
after?: number;
|
|
3584
|
-
signal?: AbortSignal;
|
|
3585
|
-
}): Promise<ReadableStream<Uint8Array>>;
|
|
3586
|
-
/**
|
|
3587
|
-
* Steer: atomically put this prompt at the head and supersede the current
|
|
3588
|
-
* inference. The client performs one request and renders server order.
|
|
3589
|
-
*/
|
|
3590
|
-
steerMessage(workspaceId: string, sessionId: string, message: string | SendMessageInput): Promise<SteerMessageResult>;
|
|
3591
|
-
/** The session's goal. 404s when the session never had one. */
|
|
3592
|
-
getGoal(workspaceId: string, sessionId: string): Promise<SessionGoal>;
|
|
3593
|
-
updateGoal(workspaceId: string, sessionId: string, request: UpdateSessionGoalRequest): Promise<SessionGoal>;
|
|
3594
|
-
deleteGoal(workspaceId: string, sessionId: string): Promise<void>;
|
|
3595
|
-
/** Pause the goal loop: the session stops self-continuing until resumed. */
|
|
3596
|
-
pauseGoal(workspaceId: string, sessionId: string, options?: {
|
|
3597
|
-
rationale?: string;
|
|
3598
|
-
}): Promise<SessionGoal>;
|
|
3599
|
-
/** Resume a paused goal: resets counters and re-arms the continuation loop. */
|
|
3600
|
-
resumeGoal(workspaceId: string, sessionId: string): Promise<SessionGoal>;
|
|
3601
|
-
/**
|
|
3602
|
-
* Clear the session's conversation context. Destructive and audit-preserving:
|
|
3603
|
-
* the server supersedes (never deletes) the live history and emits a
|
|
3604
|
-
* `session.context.cleared` event. Refused (409) while a turn is in flight or
|
|
3605
|
-
* awaiting action. `confirm:true` is sent so an accidental call cannot wipe
|
|
3606
|
-
* context — the destructive intent is explicit on the wire.
|
|
3607
|
-
*/
|
|
3608
|
-
clearSessionContext(workspaceId: string, sessionId: string): Promise<void>;
|
|
3609
|
-
/** Request one durable portable compaction at the next safe model boundary. */
|
|
3610
|
-
compactSessionContext(workspaceId: string, sessionId: string): Promise<CompactSessionContextResult>;
|
|
3611
|
-
/** FileSystem: list a directory tree (feeds the Pierre file tree). */
|
|
3612
|
-
fsList(workspaceId: string, sessionId: string, request?: FsListRequest, options?: OpenGeniRequestOptions): Promise<FsListResponse>;
|
|
3613
|
-
/** FileSystem: read a file (text or base64; binary-safe, size-capped). */
|
|
3614
|
-
fsRead(workspaceId: string, sessionId: string, request: FsReadRequest, options?: OpenGeniRequestOptions): Promise<FsReadResponse>;
|
|
3615
|
-
/** FileSystem: write a file (last-writer-wins; emits fs.changed). */
|
|
3616
|
-
fsWrite(workspaceId: string, sessionId: string, request: FsWriteRequest): Promise<FsWriteResponse>;
|
|
3617
|
-
/** FileSystem: delete a path (emits fs.changed). */
|
|
3618
|
-
fsDelete(workspaceId: string, sessionId: string, request: FsDeleteRequest): Promise<FsDeleteResponse>;
|
|
3619
|
-
/** FileSystem: move/rename a path (emits fs.changed; 409 if destination exists and overwrite is false). */
|
|
3620
|
-
fsMove(workspaceId: string, sessionId: string, request: FsMoveRequest): Promise<FsMoveResponse>;
|
|
3621
|
-
/** FileSystem: create a directory (emits fs.changed; recursive defaults to true). */
|
|
3622
|
-
fsMkdir(workspaceId: string, sessionId: string, request: FsMkdirRequest): Promise<FsMkdirResponse>;
|
|
3623
|
-
/** Git: working-tree/index status (the Pierre file-status feed). */
|
|
3624
|
-
gitStatus(workspaceId: string, sessionId: string, request?: GitStatusRequest, options?: OpenGeniRequestOptions): Promise<GitStatusResponse>;
|
|
3625
|
-
/** Git: structured diff hunks (the Pierre diff feed). */
|
|
3626
|
-
gitDiff(workspaceId: string, sessionId: string, request?: GitDiffRequest, options?: OpenGeniRequestOptions): Promise<GitDiffResponse>;
|
|
3627
|
-
/** Git: commit log. */
|
|
3628
|
-
gitLog(workspaceId: string, sessionId: string, request?: GitLogRequest): Promise<GitLogResponse>;
|
|
3629
|
-
/** Git: show a commit (diff vs first parent) or fetch a raw blob at a ref. */
|
|
3630
|
-
gitShow(workspaceId: string, sessionId: string, request: GitShowRequest): Promise<GitShowResponse>;
|
|
3631
|
-
/** Workspace capture: the latest turn-end snapshot of the session's workspace
|
|
3632
|
-
* (tree + per-repo diff + file after-image refs), served from durable storage
|
|
3633
|
-
* WITHOUT warming a machine — the workbench cold-paint source. Returns
|
|
3634
|
-
* `{available:false}` when no capture exists yet (fall back to the live path). */
|
|
3635
|
-
getWorkspaceCapture(workspaceId: string, sessionId: string, options?: OpenGeniRequestOptions): Promise<GetWorkspaceCaptureResponse>;
|
|
3636
|
-
/** Workspace capture: a single file's after-image from the capture (revision
|
|
3637
|
-
* pins a specific one; omitted → latest). Content is inline for small files,
|
|
3638
|
-
* else a short-TTL signed URL; a tooLarge file returns metadata only. */
|
|
3639
|
-
getWorkspaceCaptureFile(workspaceId: string, sessionId: string, path: string, revision?: number, options?: OpenGeniRequestOptions): Promise<GetWorkspaceCaptureFileResponse>;
|
|
3640
|
-
/** Terminal: run a bounded command, returning buffered stdout/stderr inline. */
|
|
3641
|
-
terminalExec(workspaceId: string, sessionId: string, request: TerminalExecRequest): Promise<TerminalExecResponse>;
|
|
3642
|
-
/** Terminal: open an interactive PTY. Output streams on the event SSE as
|
|
3643
|
-
* terminal.pty.output.delta; drive it with terminalPtyWrite. */
|
|
3644
|
-
terminalPtyOpen(workspaceId: string, sessionId: string, request?: PtyOpenRequest): Promise<PtyOpenResponse>;
|
|
3645
|
-
/** Terminal: send stdin to an open PTY (output rides A1). */
|
|
3646
|
-
terminalPtyWrite(workspaceId: string, sessionId: string, request: PtyWriteRequest): Promise<void>;
|
|
3647
|
-
/** Terminal: resize an open PTY. */
|
|
3648
|
-
terminalPtyResize(workspaceId: string, sessionId: string, request: PtyResizeRequest): Promise<void>;
|
|
3649
|
-
/** Terminal: close an open PTY (idempotent). */
|
|
3650
|
-
terminalPtyClose(workspaceId: string, sessionId: string, request: PtyCloseRequest): Promise<void>;
|
|
3651
|
-
/** Read the negotiated capability doc for a session WITHOUT acquiring a viewer
|
|
3652
|
-
* holder (no warm, no spawn). Drives capability-gated rendering: which
|
|
3653
|
-
* surfaces mount, the per-surface unavailability reasons, and the lease
|
|
3654
|
-
* liveness the client polls on while `cold`/`warming`. The desktop URL/token
|
|
3655
|
-
* are minted in-process only when the box is warm AND the principal has
|
|
3656
|
-
* acknowledged the un-redacted plane. */
|
|
3657
|
-
getStreamCapabilities(workspaceId: string, sessionId: string, options?: OpenGeniRequestOptions): Promise<SessionCapabilities>;
|
|
3658
|
-
/** Record the calling principal's acknowledgment of the un-redacted desktop
|
|
3659
|
-
* pixel plane (and, when the box is shared, the shared-exposure disclosure).
|
|
3660
|
-
* The desktop viewer-attach path returns 409 until this is recorded. */
|
|
3661
|
-
acknowledgeStream(workspaceId: string, sessionId: string, request?: AcknowledgeStreamRequest): Promise<AcknowledgeStreamResponse>;
|
|
3662
|
-
/** Attach a viewer holder (refcounted liveness — keeps the box warm while
|
|
3663
|
-
* watched/used), spinning the box up in-process when cold, and mint the scoped
|
|
3664
|
-
* direct-to-provider URLs for the requested plane(s). `request.desktop:true`
|
|
3665
|
-
* opts into the un-redacted pixel plane and mints the noVNC URL — that plane
|
|
3666
|
-
* alone throws `OpenGeniApiError(409)` when the un-redacted/shared
|
|
3667
|
-
* acknowledgment is missing (the consent gate). A terminal-only attach
|
|
3668
|
-
* (`desktop` omitted/false) warms the box + mints the pty-ws terminal cell with
|
|
3669
|
-
* NO consent gate. An omitted `viewerId` mints a fresh one. */
|
|
3670
|
-
attachViewer(workspaceId: string, sessionId: string, request?: AttachViewerRequest): Promise<AttachViewerResponse>;
|
|
3671
|
-
/** Heartbeat a viewer holder (Channel-A app-level liveness). A closed laptop
|
|
3672
|
-
* stops sending these → the reaper drops the holder within ~90s. Echoes
|
|
3673
|
-
* `leaseEpoch` so a superseded epoch is rejected (`alive:false` → re-attach). */
|
|
3674
|
-
heartbeatViewer(workspaceId: string, sessionId: string, viewerId: string, request: ViewerHeartbeatRequest): Promise<ViewerHeartbeatResponse>;
|
|
3675
|
-
/** Detach a viewer (delete this holder; idempotent delete-my-row). */
|
|
3676
|
-
detachViewer(workspaceId: string, sessionId: string, viewerId: string): Promise<void>;
|
|
3677
|
-
/**
|
|
3678
|
-
* The deployment's public client bootstrap config: the host-exposed models
|
|
3679
|
-
* (provider-grouped in `models`, flat in `allowedModels` for back-compat),
|
|
3680
|
-
* reasoning efforts, MCP servers, file-upload limits, and how the client is
|
|
3681
|
-
* expected to authenticate. Drives a composer's model picker without prior
|
|
3682
|
-
* knowledge of the host setup; safe to call before any auth is established.
|
|
3683
|
-
*/
|
|
3684
|
-
getClientConfig(): Promise<ClientConfig>;
|
|
3685
|
-
/** Authenticated model definitions plus workspace-specific selectability. */
|
|
3686
|
-
getWorkspaceModelCatalog(workspaceId: string): Promise<WorkspaceModelCatalogResponse>;
|
|
3687
|
-
/** The caller's access context: subject, account + workspace grants, defaults. */
|
|
3688
|
-
getAccessContext(): Promise<AccessContext>;
|
|
3689
|
-
listWorkspaces(): Promise<Workspace[]>;
|
|
3690
|
-
createWorkspace(request: CreateWorkspaceRequest): Promise<Workspace>;
|
|
3691
|
-
getWorkspace(workspaceId: string): Promise<Workspace>;
|
|
3692
|
-
updateWorkspace(workspaceId: string, request: UpdateWorkspaceRequest): Promise<Workspace>;
|
|
3693
|
-
/** Inspect immutable instruction-policy history, active heads, and activation audit evidence. */
|
|
3694
|
-
listWorkspaceInstructionPolicies(workspaceId: string, options?: WorkspaceInstructionPolicyListOptions): Promise<WorkspaceInstructionPolicyListResponse>;
|
|
3695
|
-
getWorkspaceInstructionPolicyRevision(workspaceId: string, revisionId: string): Promise<WorkspaceInstructionPolicyRevision>;
|
|
3696
|
-
createWorkspaceInstructionPolicyDraft(workspaceId: string, request: CreateWorkspaceInstructionPolicyDraftRequest): Promise<WorkspaceInstructionPolicyRevision>;
|
|
3697
|
-
/** Import the stored legacy workspace override as an inactive charter draft. */
|
|
3698
|
-
importLegacyWorkspaceInstructionPolicyDraft(workspaceId: string, request?: ImportLegacyWorkspaceInstructionPolicyDraftRequest): Promise<WorkspaceInstructionPolicyRevision>;
|
|
3699
|
-
diffWorkspaceInstructionPolicyRevisions(workspaceId: string, request: WorkspaceInstructionPolicyDiffRequest): Promise<WorkspaceInstructionPolicyDiffResponse>;
|
|
3700
|
-
activateWorkspaceInstructionPolicyRevision(workspaceId: string, revisionId: string, request: ActivateWorkspaceInstructionPolicyRequest): Promise<WorkspaceInstructionPolicyActivationResponse>;
|
|
3701
|
-
rollbackWorkspaceInstructionPolicyRevision(workspaceId: string, request: RollbackWorkspaceInstructionPolicyRequest): Promise<WorkspaceInstructionPolicyActivationResponse>;
|
|
3702
|
-
/**
|
|
3703
|
-
* Delete a workspace and everything in it. Refused (409) for the account's
|
|
3704
|
-
* only workspace and while it still has a running session. Irreversible.
|
|
3705
|
-
*/
|
|
3706
|
-
deleteWorkspace(workspaceId: string): Promise<void>;
|
|
3707
|
-
/** The workspace's members (user + api_key subjects). */
|
|
3708
|
-
listWorkspaceMembers(workspaceId: string): Promise<WorkspaceMember[]>;
|
|
3709
|
-
/**
|
|
3710
|
-
* Add an already-registered user by email. 404s when no user with that email
|
|
3711
|
-
* exists (email invites for unknown users are deferred).
|
|
3712
|
-
*/
|
|
3713
|
-
addWorkspaceMember(workspaceId: string, request: AddWorkspaceMemberRequest): Promise<WorkspaceMember>;
|
|
3714
|
-
updateWorkspaceMember(workspaceId: string, subjectId: string, request: UpdateWorkspaceMemberRequest): Promise<WorkspaceMember>;
|
|
3715
|
-
/**
|
|
3716
|
-
* Remove a member. Refused (409) for your own membership and for the last
|
|
3717
|
-
* member who can still manage the workspace.
|
|
3718
|
-
*/
|
|
3719
|
-
removeWorkspaceMember(workspaceId: string, subjectId: string): Promise<void>;
|
|
3720
|
-
createScheduledTask(workspaceId: string, request: CreateScheduledTaskRequest): Promise<ScheduledTask>;
|
|
3721
|
-
updateScheduledTask(workspaceId: string, taskId: string, request: UpdateScheduledTaskRequest): Promise<ScheduledTask>;
|
|
3722
|
-
pauseScheduledTask(workspaceId: string, taskId: string): Promise<ScheduledTask>;
|
|
3723
|
-
resumeScheduledTask(workspaceId: string, taskId: string): Promise<ScheduledTask>;
|
|
3724
|
-
/**
|
|
3725
|
-
* Fire the task immediately (manual trigger), independent of its schedule.
|
|
3726
|
-
* Pass a stable `triggerId` to make a retried trigger idempotent — the same
|
|
3727
|
-
* token charges once and starts one run. Omit it and each call is distinct.
|
|
3728
|
-
*/
|
|
3729
|
-
triggerScheduledTask(workspaceId: string, taskId: string, options?: {
|
|
3730
|
-
triggerId?: string;
|
|
3731
|
-
}): Promise<ScheduledTask>;
|
|
3732
|
-
deleteScheduledTask(workspaceId: string, taskId: string): Promise<void>;
|
|
3733
|
-
listScheduledTaskRuns(workspaceId: string, taskId: string, options?: {
|
|
3734
|
-
limit?: number;
|
|
3735
|
-
}): Promise<ScheduledTaskRun[]>;
|
|
3736
|
-
listVariableSets(workspaceId: string): Promise<VariableSet[]>;
|
|
3737
|
-
createVariableSet(workspaceId: string, request: CreateVariableSetRequest): Promise<VariableSet>;
|
|
3738
|
-
getVariableSet(workspaceId: string, variableSetId: string): Promise<VariableSet>;
|
|
3739
|
-
updateVariableSet(workspaceId: string, variableSetId: string, request: UpdateVariableSetRequest): Promise<VariableSet>;
|
|
3740
|
-
deleteVariableSet(workspaceId: string, variableSetId: string): Promise<void>;
|
|
3741
|
-
/** Create or rotate a variable. The value never comes back on any read. */
|
|
3742
|
-
setVariableSetVariable(workspaceId: string, variableSetId: string, name: string, value: string): Promise<VariableSetVariableMetadata>;
|
|
3743
|
-
deleteVariableSetVariable(workspaceId: string, variableSetId: string, name: string): Promise<void>;
|
|
3744
|
-
listRigs(workspaceId: string): Promise<Rig[]>;
|
|
3745
|
-
createRig(workspaceId: string, request: CreateRigRequest): Promise<Rig>;
|
|
3746
|
-
getRig(workspaceId: string, rigId: string): Promise<Rig>;
|
|
3747
|
-
updateRig(workspaceId: string, rigId: string, request: UpdateRigRequest): Promise<Rig>;
|
|
3748
|
-
deleteRig(workspaceId: string, rigId: string): Promise<void>;
|
|
3749
|
-
listRigVersions(workspaceId: string, rigId: string): Promise<RigVersion[]>;
|
|
3750
|
-
/** Roll the active version to an existing one (rollback / promote-activate). */
|
|
3751
|
-
activateRigVersion(workspaceId: string, rigId: string, versionId: string): Promise<RigVersion>;
|
|
3752
|
-
listRigChanges(workspaceId: string, rigId: string): Promise<RigChange[]>;
|
|
3753
|
-
/** Propose a change against the rig's active version (rigs:use). */
|
|
3754
|
-
proposeRigChange(workspaceId: string, rigId: string, request: ProposeRigChangeRequest): Promise<RigChange>;
|
|
3755
|
-
getRigChange(workspaceId: string, rigId: string, changeId: string): Promise<RigChange>;
|
|
3756
|
-
/**
|
|
3757
|
-
* Re-run verification for a change (rigs:use). Verification is asynchronous:
|
|
3758
|
-
* this returns the change immediately with status `verifying`; poll
|
|
3759
|
-
* `getRigChange`/`listRigChanges` for the terminal outcome + logs.
|
|
3760
|
-
*/
|
|
3761
|
-
verifyRigChange(workspaceId: string, rigId: string, changeId: string): Promise<RigChange>;
|
|
3762
|
-
/**
|
|
3763
|
-
* Promote a verified `definition_edit` change into a new active rig version
|
|
3764
|
-
* (rigs:manage). Only valid once the change's verification passed; returns the
|
|
3765
|
-
* newly minted version.
|
|
3766
|
-
*/
|
|
3767
|
-
promoteRigChange(workspaceId: string, rigId: string, changeId: string): Promise<RigVersion>;
|
|
3768
|
-
/**
|
|
3769
|
-
* Re-run the active version's checks in a clean throwaway sandbox (rigs:use).
|
|
3770
|
-
* Asynchronous — returns the version id being verified; the outcome lands on
|
|
3771
|
-
* the version's audit trail.
|
|
3772
|
-
*/
|
|
3773
|
-
verifyRig(workspaceId: string, rigId: string): Promise<{
|
|
3774
|
-
ok: boolean;
|
|
3775
|
-
versionId: string;
|
|
3776
|
-
}>;
|
|
3777
|
-
/** @deprecated use listVariableSets */
|
|
3778
|
-
listEnvironments(workspaceId: string): Promise<VariableSet[]>;
|
|
3779
|
-
/** @deprecated use createVariableSet */
|
|
3780
|
-
createEnvironment(workspaceId: string, request: CreateVariableSetRequest): Promise<VariableSet>;
|
|
3781
|
-
/** @deprecated use getVariableSet */
|
|
3782
|
-
getEnvironment(workspaceId: string, environmentId: string): Promise<VariableSet>;
|
|
3783
|
-
/** @deprecated use updateVariableSet */
|
|
3784
|
-
updateEnvironment(workspaceId: string, environmentId: string, request: UpdateVariableSetRequest): Promise<VariableSet>;
|
|
3785
|
-
/** @deprecated use deleteVariableSet */
|
|
3786
|
-
deleteEnvironment(workspaceId: string, environmentId: string): Promise<void>;
|
|
3787
|
-
/** @deprecated use setVariableSetVariable */
|
|
3788
|
-
setEnvironmentVariable(workspaceId: string, environmentId: string, name: string, value: string): Promise<VariableSetVariableMetadata>;
|
|
3789
|
-
/** @deprecated use deleteVariableSetVariable */
|
|
3790
|
-
deleteEnvironmentVariable(workspaceId: string, environmentId: string, name: string): Promise<void>;
|
|
3791
|
-
/** Step 1 of the upload flow: returns the pre-signed PUT target. */
|
|
3792
|
-
beginFileUpload(workspaceId: string, request: CreateFileUploadRequest): Promise<CreateFileUploadResponse>;
|
|
3793
|
-
/** Step 3 of the upload flow: server verifies the object and marks it ready. */
|
|
3794
|
-
completeFileUpload(workspaceId: string, uploadId: string): Promise<FileAsset>;
|
|
3795
|
-
/**
|
|
3796
|
-
* The whole upload flow as one call: begin -> PUT the bytes to the signed
|
|
3797
|
-
* URL (with its required headers; no API auth is sent to object storage)
|
|
3798
|
-
* -> complete. Returns the ready `FileAsset`.
|
|
3799
|
-
*/
|
|
3800
|
-
uploadFile(workspaceId: string, input: UploadFileInput): Promise<FileAsset>;
|
|
3801
|
-
getFile(workspaceId: string, fileId: string): Promise<FileAsset>;
|
|
3802
|
-
/** Read provider-neutral retained evidence metadata; never returns a storage location. */
|
|
3803
|
-
getRetainedArtifact(workspaceId: string, artifactId: string): Promise<RetainedArtifactMetadata>;
|
|
3804
|
-
/**
|
|
3805
|
-
* Read at most one authenticated retained-evidence range from the API. This
|
|
3806
|
-
* deliberately does not use the ordinary signed file-download URL.
|
|
3807
|
-
*/
|
|
3808
|
-
getRetainedArtifactContent(workspaceId: string, artifactId: string, options?: RetainedArtifactContentOptions): Promise<RetainedArtifactContent>;
|
|
3809
|
-
/** Mint a short-lived signed download URL for a ready file. */
|
|
3810
|
-
createFileDownloadUrl(workspaceId: string, fileId: string): Promise<FileDownloadUrlResponse>;
|
|
3811
|
-
createDocumentBase(workspaceId: string, request: CreateDocumentBaseRequest): Promise<DocumentBase>;
|
|
3812
|
-
listDocumentBases(workspaceId: string): Promise<DocumentBase[]>;
|
|
3813
|
-
getDocumentBase(workspaceId: string, baseId: string): Promise<DocumentBase>;
|
|
3814
|
-
/** Index an uploaded file into the base. The file must be `ready`. */
|
|
3815
|
-
addDocument(workspaceId: string, baseId: string, request: AddDocumentRequest): Promise<Document>;
|
|
3816
|
-
listDocuments(workspaceId: string, baseId: string): Promise<Document[]>;
|
|
3817
|
-
/**
|
|
3818
|
-
* Drop raw text or an already-uploaded file into the workspace's Default
|
|
3819
|
-
* base. When curation is enabled, it may name, summarize, categorize, and
|
|
3820
|
-
* (confidence permitting) file the document into the best-matching base;
|
|
3821
|
-
* provider=none leaves caller metadata and Default placement unchanged.
|
|
3822
|
-
*/
|
|
3823
|
-
createKnowledgeDrop(workspaceId: string, request: CreateKnowledgeDropRequest): Promise<Document>;
|
|
3824
|
-
/**
|
|
3825
|
-
* Move a document (and its indexed chunks) to another base. With no
|
|
3826
|
-
* targetBaseId, applies the document's stored curation suggestion.
|
|
3827
|
-
*/
|
|
3828
|
-
moveDocument(workspaceId: string, documentId: string, request?: MoveDocumentRequest): Promise<Document>;
|
|
3829
|
-
/** Retry indexing for a failed document. */
|
|
3830
|
-
reindexDocument(workspaceId: string, baseId: string, documentId: string): Promise<Document>;
|
|
3831
|
-
/**
|
|
3832
|
-
* Delete a document from a base. Removes the document row and its indexed
|
|
3833
|
-
* chunks while leaving the uploaded file asset available for other uses.
|
|
3834
|
-
*/
|
|
3835
|
-
deleteDocument(workspaceId: string, baseId: string, documentId: string): Promise<void>;
|
|
3836
|
-
searchDocuments(workspaceId: string, baseId: string, request: Omit<DocumentSearchRequest, "baseIds">): Promise<DocumentSearchResponse>;
|
|
3837
|
-
searchKnowledge(workspaceId: string, request: DocumentSearchRequest): Promise<DocumentSearchResponse>;
|
|
3838
|
-
listKnowledgeMemories(workspaceId: string, request?: KnowledgeMemorySearchRequest): Promise<KnowledgeMemory[]>;
|
|
3839
|
-
getKnowledgeMemory(workspaceId: string, memoryId: string): Promise<KnowledgeMemory>;
|
|
3840
|
-
createKnowledgeMemory(workspaceId: string, request: CreateKnowledgeMemoryRequest): Promise<KnowledgeMemory>;
|
|
3841
|
-
updateKnowledgeMemory(workspaceId: string, memoryId: string, request: UpdateKnowledgeMemoryRequest): Promise<KnowledgeMemory>;
|
|
3842
|
-
/** Hybrid (semantic + keyword) search over the workspace's agent-visible memory. */
|
|
3843
|
-
searchWorkspaceMemories(workspaceId: string, request: WorkspaceMemorySearchRequest): Promise<WorkspaceMemorySearchResponse>;
|
|
3844
|
-
/** Deep-merge a settings patch into the workspace (preserves unknown keys). */
|
|
3845
|
-
updateWorkspaceSettings(workspaceId: string, request: UpdateWorkspaceSettingsRequest): Promise<Workspace>;
|
|
3846
|
-
setWorkspaceDefaultRig(workspaceId: string, request: SetWorkspaceDefaultRigRequest): Promise<Workspace>;
|
|
3847
|
-
/** Built-in + registered packs, with the workspace's installations. */
|
|
3848
|
-
listPacks(workspaceId: string): Promise<ListPacksResponse>;
|
|
3849
|
-
/** Register (or replace) a workspace-scoped pack from a manifest. */
|
|
3850
|
-
registerPack(workspaceId: string, manifest: RegisterCapabilityPackRequest): Promise<WorkspaceRegisteredPack>;
|
|
3851
|
-
getPack(workspaceId: string, packId: string): Promise<GetPackResponse>;
|
|
3852
|
-
enablePack(workspaceId: string, packId: string, request?: EnablePackRequest): Promise<PackInstallation>;
|
|
3853
|
-
/** Unregister a workspace-scoped pack (built-in packs cannot be deleted). */
|
|
3854
|
-
deletePack(workspaceId: string, packId: string): Promise<void>;
|
|
3855
|
-
listPackInstallations(workspaceId: string): Promise<PackInstallation[]>;
|
|
3856
|
-
listCapabilities(workspaceId: string): Promise<CapabilityCatalogResponse>;
|
|
3857
|
-
/** Add a manual capability catalog item (e.g. a remote MCP server). */
|
|
3858
|
-
createCapability(workspaceId: string, request: CreateCapabilityCatalogItemRequest): Promise<CapabilityCatalogItem>;
|
|
3859
|
-
enableCapability(workspaceId: string, capabilityId: string, request?: EnableCapabilityRequest): Promise<CapabilityInstallation>;
|
|
3860
|
-
disableCapability(workspaceId: string, capabilityId: string): Promise<CapabilityInstallation>;
|
|
3861
|
-
/** Search the official MCP registry for installable capabilities. */
|
|
3862
|
-
discoverMcpCapabilities(workspaceId: string, options?: {
|
|
3863
|
-
query?: string;
|
|
3864
|
-
limit?: number;
|
|
3865
|
-
}): Promise<DiscoverMcpCapabilitiesResponse>;
|
|
3866
|
-
listConnections(workspaceId: string): Promise<ConnectionMetadata[]>;
|
|
3867
|
-
createConnection(workspaceId: string, request: CreateConnectionRequest): Promise<ConnectionMetadata>;
|
|
3868
|
-
/** Start the public Slack installation flow for the workspace-shared OpenGeni bot. */
|
|
3869
|
-
startOpenGeniSlackBotInstall(workspaceId: string, request?: OpenGeniSlackBotInstallRequest): Promise<OpenGeniSlackBotInstallStart>;
|
|
3870
|
-
updateConnection(workspaceId: string, connectionId: string, request: UpdateConnectionRequest): Promise<ConnectionMetadata>;
|
|
3871
|
-
deleteConnection(workspaceId: string, connectionId: string): Promise<ConnectionMetadata>;
|
|
3872
|
-
/** Start an OAuth connection flow; redirect the user to the returned `authorizationUrl`. */
|
|
3873
|
-
startConnectionOAuth(workspaceId: string, request: OAuthStartRequest): Promise<OAuthStartResponse>;
|
|
3874
|
-
/** Public, immutably-cached URL for a catalog item's logo, or null when the item has none. */
|
|
3875
|
-
catalogAssetUrl(logoAssetPath: string | null): string | null;
|
|
3876
|
-
/** GitHub App server configuration plus truthful workspace binding status. */
|
|
3877
|
-
getGitHubApp(workspaceId: string): Promise<GitHubAppInfo>;
|
|
3878
|
-
/** Build the GitHub owner-consent entry URL for fresh workspace-bound state. */
|
|
3879
|
-
githubConnectUrl(workspaceId: string, state: string): string;
|
|
3880
|
-
listGitHubRepositories(workspaceId: string): Promise<GitHubRepositoriesResponse>;
|
|
3881
|
-
/** Re-sync the installation's repository list from GitHub. */
|
|
3882
|
-
syncGitHubRepositories(workspaceId: string): Promise<GitHubRepositoriesResponse>;
|
|
3883
|
-
/** Remove one workspace binding without uninstalling the GitHub App itself. */
|
|
3884
|
-
unlinkGitHubInstallation(workspaceId: string, installationId: number): Promise<void>;
|
|
3885
|
-
/** Build a GitHub App manifest + the GitHub URL to submit it to. */
|
|
3886
|
-
createGitHubAppManifest(workspaceId: string, request?: CreateGitHubAppManifestRequest): Promise<CreateGitHubAppManifestResponse>;
|
|
3887
|
-
listApiKeys(workspaceId: string): Promise<ApiKey[]>;
|
|
3888
|
-
/** The returned `token` is shown once; only its prefix is stored. */
|
|
3889
|
-
createApiKey(workspaceId: string, request: CreateApiKeyRequest): Promise<CreateApiKeyResponse>;
|
|
3890
|
-
/** Revoke an API key. Returns the revoked key. */
|
|
3891
|
-
deleteApiKey(workspaceId: string, apiKeyId: string): Promise<ApiKey>;
|
|
3892
|
-
getBilling(options?: {
|
|
3893
|
-
accountId?: string;
|
|
3894
|
-
}): Promise<BillingSummary>;
|
|
3895
|
-
getBillingUsage(options?: {
|
|
3896
|
-
accountId?: string;
|
|
3897
|
-
workspaceId?: string;
|
|
3898
|
-
}): Promise<BillingUsageResponse>;
|
|
3899
|
-
getBillingEntitlements(options?: {
|
|
3900
|
-
accountId?: string;
|
|
3901
|
-
}): Promise<BillingEntitlementsResponse>;
|
|
3902
|
-
/** Start a Stripe checkout for prepaid credits. */
|
|
3903
|
-
createBillingCheckout(request: CreateCheckoutRequest): Promise<CreateCheckoutResponse>;
|
|
3904
|
-
private headers;
|
|
3905
|
-
private url;
|
|
3906
|
-
/** Connection state + the codex models the workspace may select (empty until connected). */
|
|
3907
|
-
codexStatus(workspaceId: string): Promise<CodexConnectionStatus>;
|
|
3908
|
-
/** Begin device-code login: show `userCode` at `verificationUri`, then poll with `state`. */
|
|
3909
|
-
codexConnectStart(workspaceId: string): Promise<CodexConnectStart>;
|
|
3910
|
-
/** Poll device-code authorization with the `state` from {@link codexConnectStart}. */
|
|
3911
|
-
codexConnectPoll(workspaceId: string, state: string): Promise<CodexConnectPoll>;
|
|
3912
|
-
/** Remaining usage / limits for the connected (ACTIVE) subscription. Back-compat. */
|
|
3913
|
-
codexUsage(workspaceId: string): Promise<CodexUsage>;
|
|
3914
|
-
/** Live per-account usage read (refreshes THIS account's bearer; writes the cache). */
|
|
3915
|
-
codexAccountUsage(workspaceId: string, accountId: string): Promise<CodexUsage>;
|
|
3916
|
-
/** Batched live refresh across every connected account, keyed by credential id. */
|
|
3917
|
-
refreshCodexUsage(workspaceId: string): Promise<{
|
|
3918
|
-
usage: CodexUsageMap;
|
|
3919
|
-
}>;
|
|
3920
|
-
/** Live independently-settled quota + reset-credit overview for every account. */
|
|
3921
|
-
codexOverview(workspaceId: string): Promise<CodexOverviewResponse>;
|
|
3922
|
-
/** Disconnect ALL accounts (legacy workspace-wide). Prefer `disconnectCodexAccount`. */
|
|
3923
|
-
codexDisconnect(workspaceId: string): Promise<{
|
|
3924
|
-
disconnected: boolean;
|
|
3925
|
-
}>;
|
|
3926
|
-
/** List every connected Codex account + the workspace active pointer + settings. */
|
|
3927
|
-
listCodexAccounts(workspaceId: string): Promise<CodexAccountsResponse>;
|
|
3928
|
-
/** Switch the workspace ACTIVE Codex account (the one unpinned sessions use). */
|
|
3929
|
-
activateCodexAccount(workspaceId: string, accountId: string): Promise<{
|
|
3930
|
-
activated: boolean;
|
|
3931
|
-
accountId: string;
|
|
3932
|
-
}>;
|
|
3933
|
-
/** P3: enable/disable Codex auto-rotation and/or pick the strategy. Returns the effective settings. */
|
|
3934
|
-
setCodexRotationSettings(workspaceId: string, patch: {
|
|
3935
|
-
rotationEnabled?: boolean;
|
|
3936
|
-
rotationStrategy?: CodexRotationSettings["rotationStrategy"];
|
|
3937
|
-
}): Promise<CodexRotationSettings>;
|
|
3938
|
-
/** Toggle only NEW automatic allocations under independent allocator OCC. */
|
|
3939
|
-
setCodexAccountAllocator(workspaceId: string, accountId: string, input: {
|
|
3940
|
-
enabled: boolean;
|
|
3941
|
-
expectedVersion: number;
|
|
3942
|
-
}): Promise<CodexAllocatorUpdate>;
|
|
3943
|
-
/** Disconnect ONE Codex account by id (re-picks active when the removed one was active). */
|
|
3944
|
-
disconnectCodexAccount(workspaceId: string, accountId: string): Promise<{
|
|
3945
|
-
disconnected: boolean;
|
|
3946
|
-
newActiveId: string | null;
|
|
3947
|
-
}>;
|
|
3948
|
-
/** Rename a Codex account (label only in P1). */
|
|
3949
|
-
renameCodexAccount(workspaceId: string, accountId: string, label: string | null): Promise<CodexAccount>;
|
|
3950
|
-
/** Pin (or unpin via "auto") a session's Codex account. Applies on the next turn. */
|
|
3951
|
-
pinSessionCodexAccount(workspaceId: string, sessionId: string, target: string): Promise<{
|
|
3952
|
-
pinned: string;
|
|
3953
|
-
}>;
|
|
3954
|
-
private requestJson;
|
|
3955
|
-
/** Like `requestJson` for endpoints that respond with no body (204). */
|
|
3956
|
-
private requestVoid;
|
|
3957
|
-
}
|
|
3958
|
-
|
|
3959
|
-
/** Error for a non-2xx OpenGeni API response. */
|
|
3960
|
-
declare class OpenGeniApiError extends Error {
|
|
3961
|
-
readonly status: number;
|
|
3962
|
-
readonly code: string | undefined;
|
|
3963
|
-
readonly retryable: boolean;
|
|
3964
|
-
readonly correlationId: string | undefined;
|
|
3965
|
-
/** True only when an uncontrolled transport failed after a mutation may have been accepted. */
|
|
3966
|
-
readonly outcomeUnknown: boolean;
|
|
3967
|
-
readonly body: string;
|
|
3968
|
-
constructor(status: number, body: string, options?: {
|
|
3969
|
-
code?: string | undefined;
|
|
3970
|
-
retryable?: boolean | undefined;
|
|
3971
|
-
correlationId?: string | undefined;
|
|
3972
|
-
outcomeUnknown?: boolean | undefined;
|
|
3973
|
-
displayMessage?: string | undefined;
|
|
3974
|
-
mutation?: boolean | undefined;
|
|
3975
|
-
});
|
|
3976
|
-
}
|
|
3977
|
-
/** A short-lived session-list snapshot cursor can no longer be continued. */
|
|
3978
|
-
declare class OpenGeniSessionListCursorError extends OpenGeniApiError {
|
|
3979
|
-
}
|
|
3980
|
-
/** The browser bundle and API disagree about their state-changing wire contract. */
|
|
3981
|
-
declare class OpenGeniApiContractMismatchError extends Error {
|
|
3982
|
-
readonly expected: string;
|
|
3983
|
-
readonly actual: string;
|
|
3984
|
-
constructor(expected: string, actual: string);
|
|
3985
|
-
}
|
|
3986
|
-
/** Error for an unrecoverable event-stream condition (not a transient drop). */
|
|
3987
|
-
declare class OpenGeniStreamError extends Error {
|
|
3988
|
-
constructor(message: string);
|
|
3989
|
-
}
|
|
3990
|
-
/**
|
|
3991
|
-
* Transient conditions worth a reconnect: network-level failures (`fetch`
|
|
3992
|
-
* rejects with `TypeError`) and HTTP statuses that signal a temporary server
|
|
3993
|
-
* or contention condition. Auth/validation failures (401/403/404/...) are
|
|
3994
|
-
* permanent and surface to the caller instead.
|
|
3995
|
-
*/
|
|
3996
|
-
declare function isRetryableStreamError(error: unknown): boolean;
|
|
3997
|
-
|
|
3998
|
-
/**
|
|
3999
|
-
* Proxy-through-your-own-API helpers.
|
|
4000
|
-
*
|
|
4001
|
-
* The intended pattern: a customer's server consumes the OpenGeni event
|
|
4002
|
-
* stream with its own API key (`client.streamEvents(...)`) and re-emits it to
|
|
4003
|
-
* its browser clients over its own authenticated endpoint — the OpenGeni key
|
|
4004
|
-
* never reaches the browser. The re-emitted wire format is identical to
|
|
4005
|
-
* OpenGeni's own SSE stream (`id: <sequence>`, `event: <type>`,
|
|
4006
|
-
* `data: <event JSON>`), so the browser side can consume it with this same
|
|
4007
|
-
* SDK's streaming core (or a plain `EventSource`), including resume via
|
|
4008
|
-
* `?after=` / `Last-Event-ID`.
|
|
4009
|
-
*/
|
|
4010
|
-
/** Format one event exactly as OpenGeni's API emits it over SSE. */
|
|
4011
|
-
declare function formatSseEvent(event: SessionEvent): string;
|
|
4012
|
-
type SseReStreamOptions = {
|
|
4013
|
-
/**
|
|
4014
|
-
* Emit `: ping` comment lines at this interval, keeping intermediaries from
|
|
4015
|
-
* idling the connection out. Disabled when omitted.
|
|
4016
|
-
*/
|
|
4017
|
-
heartbeatMs?: number;
|
|
4018
|
-
/**
|
|
4019
|
-
* Called when the downstream consumer cancels (e.g. the browser
|
|
4020
|
-
* disconnected). Use it to abort the upstream OpenGeni stream — an async
|
|
4021
|
-
* iterator that is mid-`await` cannot be interrupted by `return()` alone.
|
|
4022
|
-
*/
|
|
4023
|
-
onCancel?: () => void;
|
|
4024
|
-
};
|
|
4025
|
-
/**
|
|
4026
|
-
* Re-emit a stream of session events as an SSE byte stream. Pull-based, so
|
|
4027
|
-
* upstream consumption follows downstream demand; cancelling the returned
|
|
4028
|
-
* stream fires `onCancel` and ends the upstream iterator.
|
|
4029
|
-
*/
|
|
4030
|
-
declare function sessionEventsToSseStream(events: AsyncIterable<SessionEvent>, options?: SseReStreamOptions): ReadableStream<Uint8Array>;
|
|
4031
|
-
/** Wrap an event stream in a ready-to-return SSE `Response`. */
|
|
4032
|
-
declare function sessionEventsToSseResponse(events: AsyncIterable<SessionEvent>, options?: SseReStreamOptions): Response;
|
|
4033
|
-
/**
|
|
4034
|
-
* Read the resume cursor a reconnecting SSE client sent: the `after` query
|
|
4035
|
-
* parameter, or the standard `Last-Event-ID` header (the re-emitted stream
|
|
4036
|
-
* sets `id:` to the sequence). Returns 0 (full replay) when absent.
|
|
4037
|
-
*/
|
|
4038
|
-
declare function resumeSequenceFromRequest(request: Request): number;
|
|
4039
|
-
type ProxySessionEventStreamOptions = Omit<StreamSessionEventsOptions, "after"> & {
|
|
4040
|
-
/**
|
|
4041
|
-
* Resume cursor. Pass a number, or the incoming browser `Request` to
|
|
4042
|
-
* honor its `?after=` / `Last-Event-ID` automatically.
|
|
4043
|
-
*/
|
|
4044
|
-
after?: number | Request;
|
|
4045
|
-
/** See {@link SseReStreamOptions.heartbeatMs}. */
|
|
4046
|
-
heartbeatMs?: number;
|
|
4047
|
-
};
|
|
4048
|
-
/**
|
|
4049
|
-
* One-call proxy: consume the OpenGeni stream server-side and return an SSE
|
|
4050
|
-
* `Response` for your own browser clients. Works anywhere WHATWG `Response`
|
|
4051
|
-
* is the handler return type (Hono, Next.js route handlers, Bun.serve,
|
|
4052
|
-
* Cloudflare Workers, ...).
|
|
4053
|
-
*
|
|
4054
|
-
* The upstream OpenGeni connection is torn down when the downstream client
|
|
4055
|
-
* disconnects, and also when `options.signal` (e.g. the incoming request's
|
|
4056
|
-
* signal) aborts.
|
|
4057
|
-
*/
|
|
4058
|
-
declare function proxySessionEventStream(client: OpenGeniClient, workspaceId: string, sessionId: string, options?: ProxySessionEventStreamOptions): Response;
|
|
4059
|
-
|
|
4060
|
-
/**
|
|
4061
|
-
* Minimal incremental Server-Sent Events parser over a byte stream.
|
|
4062
|
-
*
|
|
4063
|
-
* Implements the parts of the SSE wire format OpenGeni uses: `id`, `event`,
|
|
4064
|
-
* and `data` fields, multi-line data, comment lines, and both LF and CRLF
|
|
4065
|
-
* line endings. Messages without any `data` (comments, id-only blocks) are
|
|
4066
|
-
* not emitted.
|
|
4067
|
-
*/
|
|
4068
|
-
type SseMessage = {
|
|
4069
|
-
id?: string;
|
|
4070
|
-
event?: string;
|
|
4071
|
-
data: string;
|
|
4072
|
-
};
|
|
4073
|
-
declare function parseSseStream(stream: ReadableStream<Uint8Array>): AsyncGenerator<SseMessage, void, void>;
|
|
4074
|
-
|
|
4075
|
-
/**
|
|
4076
|
-
* A transport-tolerant MCP tool result.
|
|
4077
|
-
*
|
|
4078
|
-
* `value` is the canonical machine-readable payload after recognized MCP/JSON
|
|
4079
|
-
* envelopes are removed. `text` is the best presentation string without
|
|
4080
|
-
* discarding structured data. `raw` always retains the original evidence.
|
|
4081
|
-
*/
|
|
4082
|
-
type NormalizedMcpOutput = Readonly<{
|
|
4083
|
-
raw: unknown;
|
|
4084
|
-
value: unknown;
|
|
4085
|
-
text: string;
|
|
4086
|
-
isError: boolean;
|
|
4087
|
-
}>;
|
|
4088
|
-
/** Normalize common direct, JSON, and standard MCP result envelopes without throwing. */
|
|
4089
|
-
declare function normalizeMcpOutput(output: unknown): NormalizedMcpOutput;
|
|
4090
|
-
|
|
4091
|
-
/**
|
|
4092
|
-
* Translate the negotiated desktop capability into the WebSocket URL the noVNC
|
|
4093
|
-
* RFB client connects to. The scoped provider token is ALREADY embedded in the
|
|
4094
|
-
* minted `url` (Modal tunnel host, Blaxel `bl_preview_token`, Daytona signed
|
|
4095
|
-
* preview) by `session.resolveExposedPort(6080)` — we do NOT append `cap.token`
|
|
4096
|
-
* as a query param (that double-auth was an adversarial-review bug: the box runs
|
|
4097
|
-
* `-nopw` in v1, so the RFB password is meaningless and the real auth is the
|
|
4098
|
-
* tunnel token in the host). We only normalize the scheme to `ws`/`wss` and, when
|
|
4099
|
-
* the minted URL points at a `vnc.html` viewer page, rewrite it to the
|
|
4100
|
-
* websockify socket path noVNC actually dials.
|
|
4101
|
-
*/
|
|
4102
|
-
declare function desktopSocketUrl(cap: Pick<DesktopStreamCapability, "url">): string;
|
|
4103
|
-
/**
|
|
4104
|
-
* The minimal RFB surface the React component drives. Lets tests (and 3rd
|
|
4105
|
-
* parties swapping noVNC for a WebRTC client in v3) provide a fake without the
|
|
4106
|
-
* DOM. Matches `@novnc/novnc`'s RFB constructor + lifecycle.
|
|
4107
|
-
*/
|
|
4108
|
-
interface DesktopRfbLike {
|
|
4109
|
-
viewOnly: boolean;
|
|
4110
|
-
scaleViewport: boolean;
|
|
4111
|
-
/**
|
|
4112
|
-
* 1:1 viewport clipping. We always drive this FALSE: with clipping on, noVNC
|
|
4113
|
-
* paints the framebuffer pixel-for-pixel and scrolls/crops to the container
|
|
4114
|
-
* (the "zoomed in" look). FALSE lets `scaleViewport` shrink the 1280x800 frame
|
|
4115
|
-
* to fit the panel (aspect-preserved). Declared so the hook can pin it instead
|
|
4116
|
-
* of relying on noVNC's default — `scaleViewport=true` forces clip off
|
|
4117
|
-
* internally, but a stale/partial state on reconnect could leave it on.
|
|
4118
|
-
*/
|
|
4119
|
-
clipViewport: boolean;
|
|
4120
|
-
addEventListener(type: "connect" | "disconnect" | "securityfailure", cb: (e?: unknown) => void): void;
|
|
4121
|
-
removeEventListener?: (type: "connect" | "disconnect" | "securityfailure", cb: (e?: unknown) => void) => void;
|
|
4122
|
-
disconnect(): void;
|
|
4123
|
-
}
|
|
4124
|
-
type DesktopRfbFactory = (target: HTMLElement, url: string, opts: {
|
|
4125
|
-
credentials?: {
|
|
4126
|
-
password?: string | undefined;
|
|
4127
|
-
} | undefined;
|
|
4128
|
-
}) => DesktopRfbLike;
|
|
4129
|
-
type DesktopConnectionState = "idle" | "negotiating" | "connecting" | "connected" | "rotating" | "reconnecting" | "error" | "ended";
|
|
4130
|
-
type DesktopStreamEvent = {
|
|
4131
|
-
type: "negotiated";
|
|
4132
|
-
} | {
|
|
4133
|
-
type: "connected";
|
|
4134
|
-
} | {
|
|
4135
|
-
type: "disconnected";
|
|
4136
|
-
} | {
|
|
4137
|
-
type: "rotate";
|
|
4138
|
-
} | {
|
|
4139
|
-
type: "fail";
|
|
4140
|
-
} | {
|
|
4141
|
-
type: "abort";
|
|
4142
|
-
};
|
|
4143
|
-
/**
|
|
4144
|
-
* Pure reducer for the desktop connection lifecycle. The component owns the RFB
|
|
4145
|
-
* object + DOM; this owns the transitions so they are unit-testable. Mirrors the
|
|
4146
|
-
* Channel-A stream reducer discipline.
|
|
4147
|
-
*/
|
|
4148
|
-
declare function nextDesktopState(current: DesktopConnectionState, ev: DesktopStreamEvent): DesktopConnectionState;
|
|
4149
|
-
type DesktopStreamCapabilityLike = {
|
|
4150
|
-
url: string | null;
|
|
4151
|
-
token: string | null;
|
|
4152
|
-
expiresAt: string | null;
|
|
4153
|
-
};
|
|
4154
|
-
/**
|
|
4155
|
-
* Apply a `stream.url.rotated` event onto a desktop capability, fencing on
|
|
4156
|
-
* leaseEpoch (split-brain). A rotation minted under an epoch the client has
|
|
4157
|
-
* already advanced PAST is from a superseded owner and is dropped (returns
|
|
4158
|
-
* null); otherwise the fresh url/token/expiresAt are folded in.
|
|
4159
|
-
*/
|
|
4160
|
-
declare function applyUrlRotation<T extends DesktopStreamCapabilityLike>(cap: T, payload: StreamUrlRotatedPayload, knownEpoch: number): T | null;
|
|
4161
|
-
|
|
4162
|
-
/**
|
|
4163
|
-
* Translate the negotiated `pty-ws` Terminal capability into the WebSocket URL
|
|
4164
|
-
* the ttyd client dials. The scoped provider token is ALREADY embedded in the
|
|
4165
|
-
* minted `url` (the Modal tunnel host) by `session.resolveExposedPort(7681)` —
|
|
4166
|
-
* we do NOT append `cap.token` (identical posture to the desktop: the gate is the
|
|
4167
|
-
* unguessable short-TTL tunnel URL + the server-recorded scoped stream token; ttyd
|
|
4168
|
-
* runs `--writable` with no `-c` credential in v1). We only normalize the scheme
|
|
4169
|
-
* to `ws`/`wss`; a bare host is already the ttyd websocket endpoint.
|
|
4170
|
-
*/
|
|
4171
|
-
declare function terminalSocketUrl(cap: Pick<TerminalCapability, "url">): string;
|
|
4172
|
-
/** ttyd subprotocol — REQUIRED on the WebSocket handshake or ttyd refuses it. */
|
|
4173
|
-
declare const TTYD_SUBPROTOCOL = "tty";
|
|
4174
|
-
/** Client→server command bytes (the first char of each outbound text frame). */
|
|
4175
|
-
declare const TtydClientCommand: {
|
|
4176
|
-
/** stdin: "0" + raw input bytes. */
|
|
4177
|
-
readonly INPUT: "0";
|
|
4178
|
-
/** window resize: "1" + JSON.stringify({ columns, rows }). */
|
|
4179
|
-
readonly RESIZE: "1";
|
|
4180
|
-
/** flow-control pause (back-pressure): "2". */
|
|
4181
|
-
readonly PAUSE: "2";
|
|
4182
|
-
/** flow-control resume: "3". */
|
|
4183
|
-
readonly RESUME: "3";
|
|
4184
|
-
};
|
|
4185
|
-
/** Server→client command bytes (the first char of each inbound frame). */
|
|
4186
|
-
declare const TtydServerCommand: {
|
|
4187
|
-
/** stdout/stderr: "0" + raw output bytes (write the rest into xterm). */
|
|
4188
|
-
readonly OUTPUT: "0";
|
|
4189
|
-
/** set the window title: "1" + title string. */
|
|
4190
|
-
readonly SET_WINDOW_TITLE: "1";
|
|
4191
|
-
/** ttyd client preferences JSON: "2" + json (ignored by us). */
|
|
4192
|
-
readonly SET_PREFERENCES: "2";
|
|
4193
|
-
};
|
|
4194
|
-
/**
|
|
4195
|
-
* The ttyd handshake's first frame: an auth message. ttyd expects
|
|
4196
|
-
* `JSON.stringify({ AuthToken })` as the FIRST text frame on the socket. We send
|
|
4197
|
-
* an empty token — our gate is the tunnel URL + scoped stream token, NOT a ttyd
|
|
4198
|
-
* `-c` basic-auth credential (which the box does not set in v1). Optional ttyd
|
|
4199
|
-
* `columns`/`rows` can ride this frame to seed the PTY size before the first
|
|
4200
|
-
* resize. Pure (string-building only) so it stays unit-testable in the SDK.
|
|
4201
|
-
*/
|
|
4202
|
-
declare function ttydAuthFrame(opts?: {
|
|
4203
|
-
columns?: number;
|
|
4204
|
-
rows?: number;
|
|
4205
|
-
}): string;
|
|
4206
|
-
/** Build a client→server INPUT (stdin) frame: "0" + data. */
|
|
4207
|
-
declare function ttydInputFrame(data: string): string;
|
|
4208
|
-
/** Build a client→server RESIZE frame: "1" + JSON.stringify({ columns, rows }). */
|
|
4209
|
-
declare function ttydResizeFrame(columns: number, rows: number): string;
|
|
4210
|
-
|
|
4211
|
-
export { type AccessContext, type AccessGrant, type AccountGrant, type AccountRole, type AcknowledgeStreamRequest, type AcknowledgeStreamResponse, type ActivateWorkspaceInstructionPolicyRequest, type AddDocumentRequest, type AddWorkspaceMemberRequest, type AgentMessageCompletedPayload, type AgentTextDeltaPayload, type AgentToolCallCreatedPayload, type AgentToolCallOutputPayload, type ApiKey, type AttachViewerRequest, type AttachViewerResponse, type BillingBalance, type BillingEntitlementsResponse, type BillingMode, type BillingSummary, type BillingUsageResponse, type CapabilityCatalogItem, type CapabilityCatalogResponse, type CapabilityInstallation, type CapabilityInstallationStatus, type CapabilityKind, type CapabilityPack, type CapabilityPackConnector, type CapabilityPackConnectorAuthModel, type CapabilityPackKnowledge, type CapabilityPackScheduledTaskTemplate, type CapabilityPackSkill, type CapabilityPackSkillFile, type CapabilityPackVariableSetSpec, type CapabilityRuntime, type CapabilitySource, type CapabilityUnavailableReason, type ClientAuthConfig, type ClientConfig, type ClientModel, type ClientSessionEventInput, type CodexAccount, type CodexAccountOverview, type CodexAccountSwitchedPayload, type CodexAccountsResponse, type CodexAllocatorUpdate, type CodexConnectPoll, type CodexConnectStart, type CodexConnectionStatus, type CodexFleetCacheState, type CodexFleetConfidence, type CodexFleetDecisionEventPayload, type CodexFleetDecisionScore, type CodexFleetShadowComparison, type CodexOverviewResponse, type CodexResetCredit, type CodexResetRedemptionRecovery, type CodexRotationSettings, type CodexUsage, type CodexUsageMap, type CodexUsagePayload, type CodexUsageWindow, type CompactSessionContextResult, type CompleteFileUploadResponse, type ComposerDraft, type ComputerUseCapability, type ConnectionKind, type ConnectionMetadata, type ConnectionResponse, type ConnectionStatus, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateCapabilityCatalogItemRequest, type CreateCheckoutRequest, type CreateCheckoutResponse, type CreateConnectionRequest, type CreateDocumentBaseRequest, type CreateFileUploadRequest, type CreateFileUploadResponse, type CreateGitHubAppManifestRequest, type CreateGitHubAppManifestResponse, type CreateKnowledgeDropRequest, type CreateKnowledgeMemoryRequest, type CreateRigRequest, type CreateScheduledTaskRequest, type CreateSessionRequest, type CreateVariableSetRequest, type CreateWorkspaceEnvironmentRequest, type CreateWorkspaceInstructionPolicyDraftRequest, type CreateWorkspaceRequest, DEFAULT_WORKSPACE_TRANSCRIPTION_POLICY, type DeleteSessionQueueItemRequest, type DesktopConnectionState, type DesktopRfbFactory, type DesktopRfbLike, type DesktopStreamCapability, type DesktopStreamEvent, type DeviceEnrollmentApproveRequest, type DeviceEnrollmentApproveResponse, type DeviceEnrollmentDenyRequest, type DeviceEnrollmentDenyResponse, type DeviceEnrollmentLookupMachine, type DeviceEnrollmentLookupRequest, type DeviceEnrollmentLookupResponse, type DiscoverMcpCapabilitiesResponse, type Document, type DocumentBase, type DocumentCuration, type DocumentCurationStatus, type DocumentSearchMode, type DocumentSearchRequest, type DocumentSearchResponse, type DocumentSearchResult, type DocumentStatus, type DocumentVisibility, type EditSessionQueueItemRequest, type EffectiveControlBlocker, type EffectiveControlResumeOption, type EffectiveSessionControl, type EnableCapabilityRequest, type EnablePackRequest, type EnrollTokenExchangeRequest, type EnrollTokenExchangeResponse, type EnrollmentCredentials, type EnrollmentOs, type EntitlementValue, type Entitlements, type EntitlementsMode, type FetchLike, type FileAsset, type FileDownloadUrlResponse, type FileResourceRef, type FileStatus, type FileSystemCapability, type FileUploadData, type FirstPartyMcpToolName, type FsChangeKind, type FsChangedPayload, type FsDeleteRequest, type FsDeleteResponse, type FsEncoding, type FsListRequest, type FsListResponse, type FsMkdirRequest, type FsMkdirResponse, type FsMoveRequest, type FsMoveResponse, type FsNodeType, type FsReadRequest, type FsReadResponse, type FsTreeNode, type FsWriteRequest, type FsWriteResponse, type GetPackResponse, type GetWorkspaceCaptureFileResponse, type GetWorkspaceCaptureResponse, type GitCapability, type GitChangedPayload, type GitCommit, type GitCredentialBindingId, type GitCredentialProvider, type GitDiffHunk, type GitDiffLine, type GitDiffLineType, type GitDiffRequest, type GitDiffResponse, type GitFileDiff, type GitFileStatus, type GitFileStatusCode, type GitHubAppInfo, type GitHubAppSetupMode, type GitHubBindingStatus, type GitHubInstallationBinding, type GitHubInstallationLifecycle, type GitHubRepositoriesResponse, type GitHubRepository, type GitHubRepositoryScope, type GitLogRequest, type GitLogResponse, type GitRepositoryAccess, type GitShowRequest, type GitShowResponse, type GitStatusRequest, type GitStatusResponse, type GoalSpec, type HumanInputAnswer, type HumanInputOption, type HumanInputQuestion, type HumanInputQuestionKind, type HumanInputResponse, type ImportLegacyWorkspaceInstructionPolicyDraftRequest, type IntegrationClientMetadata, KNOWN_PERMISSIONS, KNOWN_USAGE_EVENT_TYPES, type KnowledgeMemory, type KnowledgeMemoryKind, type KnowledgeMemorySearchRequest, type KnowledgeMemoryStatus, type KnowledgeSourceKind, type KnowledgeSourceRef, type KnownPermission, type KnownSessionEventType, type KnownUsageEventType, type LineageNode, type ListApiKeysResponse, type ListConnectionsResponse, type ListPacksResponse, type ListWorkspaceMembersResponse, type MachineKind, type MachineMetricsSeriesResponse, type MachineState, type MachineView, type MachinesResponse, type McpServerConnectionRef, type MetricSample, type MintEnrollTokenRequest, type MintEnrollTokenResponse, type ModelAvailabilityV1, type ModelBillingAttributionV1, type ModelCapabilitiesV1, type ModelCapabilityStateV1, type ModelCapabilitySupportV1, type ModelCredentialReadinessV1, type ModelCredentialSourceV1, type ModelPricingScheduleV1, type ModelPricingV1, type MoveDocumentRequest, type MoveSessionQueueItemRequest, type NewSessionDraft, type NewSessionDraftOptions, type NormalizedMcpOutput, type OAuthStartRequest, type OAuthStartResponse, OPENGENI_API_CONTRACT_HEADER, OPENGENI_API_CONTRACT_REVISION, OPENGENI_CORRELATION_HEADER, OpenGeniApiContractMismatchError, OpenGeniApiError, OpenGeniClient, type OpenGeniClientOptions, type OpenGeniRequestOptions, OpenGeniSessionListCursorError, type OpenGeniSlackBotInstallRequest, type OpenGeniSlackBotInstallStart, OpenGeniStreamError, type PackInstallation, type PackInstallationStatus, type Permission, type ProductAccessMode, type ProposeRigChangeRequest, type ProxySessionEventStreamOptions, type PtyCloseRequest, type PtyOpenRequest, type PtyOpenResponse, type PtyResizeRequest, type PtyWriteRequest, RETAINED_OUTPUT_DEFAULT_PAGE_BYTES, RETAINED_OUTPUT_MAX_PAGE_BYTES, type ReasoningEffort, type RecordingAvailablePayload, type RecordingCapability, type RecordingCodec, type RecordingContentType, type RecordingFailedPayload, type RecordingFailedReason, type RecordingMode, type RecordingStartedPayload, type RegisterCapabilityPackRequest, type RepositoryResourceRef, type ResourceRef, type RetainedArtifactContent, type RetainedArtifactContentOptions, type RetainedArtifactMetadata, type RetainedArtifactReference, type RetainedArtifactUnavailable, type RetainedOutputKind, type RetainedOutputUnavailableReason, type Rig, type RigChange, type RigChangeKind, type RigChangeStatus, type RigChangeVerification, type RigCheck, type RigCheckResult, type RigDefinitionEditPayload, type RigSetupAppendPayload, type RigVersion, type RollbackWorkspaceInstructionPolicyRequest, SESSION_EVENT_TYPES, type SandboxBackend, type SandboxCapabilityName, type SandboxCommandOutputDeltaPayload, type SandboxOs, type SaveComposerDraftRequest, type SaveNewSessionDraftRequest, type ScheduledTask, type ScheduledTaskAgentConfig, type ScheduledTaskAgentConfigInput, type ScheduledTaskDayOfWeek, type ScheduledTaskOverlapPolicy, type ScheduledTaskRun, type ScheduledTaskRunMode, type ScheduledTaskRunStatus, type ScheduledTaskScheduleSpec, type ScheduledTaskStatus, type ScheduledTaskTriggerType, type SendMessageInput, type ServiceTurnInitiator, type ServiceTurnInitiatorContext, type Session, type SessionCapabilities, type SessionCommandReceipt, type SessionControlResponse, type SessionEffectiveToolPolicy, type SessionEvent, type SessionEventCompactResult, type SessionEventCompactResultOptions, type SessionEventLatestClass, type SessionEventListOptions, type SessionEventPage, type SessionEventPayloadMode, type SessionEventReadDirection, type SessionEventReadMode, type SessionEventResultMode, type SessionEventSemanticClass, type SessionEventStreamTransport, type SessionEventType, type SessionGoal, type SessionGoalCreatedBy, type SessionGoalStatus, type SessionHumanInputRequest, type SessionLineageResponse, type SessionListResponse, type SessionMcpApprovalPolicy, type SessionMcpCredentialUpdateInput, type SessionMcpServerInput, type SessionMcpServerMetadata, type SessionPendingInputPreview, type SessionQueueMutationResponse, type SessionQueueSnapshot, type SessionStatus, type SessionStatusChangedPayload, type SessionStructuredCapabilities, type SessionSummary, type SessionSystemUpdate, type SessionSystemUpdateKind, type SessionSystemUpdateState, type SessionToolPolicy, type SessionTurn, type SessionTurnSource, type SessionTurnStatus, type SetWorkspaceEnvironmentVariableRequest, type SseMessage, type SseReStreamOptions, type SteerMessageResult, type SteerSessionQueueItemRequest, type StreamClosedPayload, type StreamConnectionState, type StreamOpenedPayload, type StreamRevokedPayload, type StreamSessionEventsOptions, type StreamUrlRotatedPayload, type SubmitHumanInputResponseRequest, type SwapActiveSandboxRequest, type SwapActiveSandboxResponse, TTYD_SUBPROTOCOL, type TerminalCapability, type TerminalExecRequest, type TerminalExecResponse, type TerminalPtyExitedPayload, type TerminalPtyOutputDeltaPayload, type TerminalPtyStartedPayload, type ToolAuthNeededPayload, type ToolRef, type TranscriptionAdapter, type TranscriptionAdapterDescriptor, type TranscriptionAdapterStartContext, type TranscriptionAuthorization, type TranscriptionCredentialMode, type TranscriptionDiagnostic, type TranscriptionErrorCode, type TranscriptionEvent, type TranscriptionEventListener, type TranscriptionLifecycleStatus, type TranscriptionPolicyBlockReason, type TranscriptionResultMetadata, type TranscriptionSession, type TranscriptionSessionRequest, type TranscriptionSpeaker, type TranscriptionTargetSelection, type TranscriptionTimeSpan, type TranscriptionWord, TtydClientCommand, TtydServerCommand, type TurnInitiator, type UpdateConnectionRequest, type UpdateKnowledgeMemoryRequest, type UpdateRigRequest, type UpdateScheduledTaskRequest, type UpdateSessionGoalRequest, type UpdateSessionMcpApprovalPolicyRequest, type UpdateSessionMcpApprovalPolicyResponse, type UpdateSessionPinRequest, type UpdateSessionRequest, type UpdateSessionToolPolicyRequest, type UpdateVariableSetRequest, type UpdateWorkspaceEnvironmentRequest, type UpdateWorkspaceMemberRequest, type UpdateWorkspaceRequest, type UpdateWorkspaceSettingsRequest, type UploadFileInput, type UsageEvent, type UsageEventType, type UserApprovalDecisionEventInput, type UserHumanInputResponseEventInput, type UserMessageEventInput, type VariableSet, type VariableSetVariableMetadata, type ViewerHeartbeatRequest, type ViewerHeartbeatResponse, type ViewerHolder, type Workspace, type WorkspaceCaptureDegradedReason, type WorkspaceCaptureFile, type WorkspaceCaptureManifest, type WorkspaceCaptureRepo, type WorkspaceCaptureSignedUrl, type WorkspaceCaptureStats, type WorkspaceControlEvent, type WorkspaceControlEventPage, type WorkspaceControlStreamTransport, type WorkspaceEnvironment, type WorkspaceEnvironmentVariableMetadata, type WorkspaceInferenceControlResponse, type WorkspaceInstructionPolicyActivationEvent, type WorkspaceInstructionPolicyActivationResponse, type WorkspaceInstructionPolicyActivationType, type WorkspaceInstructionPolicyConflictResponse, type WorkspaceInstructionPolicyDiffRequest, type WorkspaceInstructionPolicyDiffResponse, type WorkspaceInstructionPolicyDraftProvenanceSource, type WorkspaceInstructionPolicyHead, type WorkspaceInstructionPolicyKind, type WorkspaceInstructionPolicyListOptions, type WorkspaceInstructionPolicyListResponse, type WorkspaceInstructionPolicyProvenanceSource, type WorkspaceInstructionPolicyRevision, type WorkspaceInstructionPolicyRevisionIdentity, type WorkspaceInstructionPolicyScope, type WorkspaceInstructionPolicyTarget, type WorkspaceMember, type WorkspaceMemorySearchMode, type WorkspaceMemorySearchRequest, type WorkspaceMemorySearchResponse, type WorkspaceMemorySearchResult, type WorkspaceModelCatalogModel, type WorkspaceModelCatalogResponse, type WorkspaceRegisteredPack, type WorkspaceRevisionCapturedPayload, type WorkspaceRevisionDegradedPayload, type WorkspaceSettings, type WorkspaceTranscriptionPolicy, type WorkspaceTranscriptionTarget, applyUrlRotation, authorizeTranscriptionAdapter, createTranscriptionSessionRequest, desktopSocketUrl, formatSseEvent, isRetryableStreamError, nextDesktopState, normalizeMcpOutput, normalizeWorkspaceInstructionPolicyRoleKey, parseSseStream, proxySessionEventStream, resolveWorkspaceTranscriptionPolicy, resumeSequenceFromRequest, sessionEventsToSseResponse, sessionEventsToSseStream, streamSessionEvents, streamWorkspaceControlEvents, terminalSocketUrl, ttydAuthFrame, ttydInputFrame, ttydResizeFrame };
|
|
1
|
+
export { OpenGeniClient } from "./client";
|
|
2
|
+
export type { FetchLike, OpenGeniClientOptions, OpenGeniRequestOptions, SendMessageInput, SteerMessageResult, TranscribeAudioInput, WorkspaceControlEventPage, } from "./client";
|
|
3
|
+
export { OpenGeniApiContractMismatchError, OpenGeniApiError, OpenGeniSessionListCursorError, OpenGeniStreamError, isRetryableStreamError, } from "./errors";
|
|
4
|
+
export { formatSseEvent, proxySessionEventStream, resumeSequenceFromRequest, sessionEventsToSseResponse, sessionEventsToSseStream, } from "./proxy";
|
|
5
|
+
export type { ProxySessionEventStreamOptions, SseReStreamOptions } from "./proxy";
|
|
6
|
+
export { parseSseStream } from "./sse";
|
|
7
|
+
export type { SseMessage } from "./sse";
|
|
8
|
+
export { normalizeMcpOutput } from "./mcp-output";
|
|
9
|
+
export type { NormalizedMcpOutput } from "./mcp-output";
|
|
10
|
+
export { desktopSocketUrl, nextDesktopState, applyUrlRotation } from "./desktop";
|
|
11
|
+
export type { DesktopRfbLike, DesktopRfbFactory, DesktopConnectionState, DesktopStreamEvent, } from "./desktop";
|
|
12
|
+
export { terminalSocketUrl, ttydAuthFrame, ttydInputFrame, ttydResizeFrame, TTYD_SUBPROTOCOL, TtydClientCommand, TtydServerCommand, } from "./terminal";
|
|
13
|
+
export { streamSessionEvents } from "./stream";
|
|
14
|
+
export type { SessionEventStreamTransport, StreamConnectionState, StreamSessionEventsOptions, } from "./stream";
|
|
15
|
+
export { streamWorkspaceControlEvents } from "./workspace-control-stream";
|
|
16
|
+
export type { WorkspaceControlStreamTransport } from "./workspace-control-stream";
|
|
17
|
+
export { normalizeWorkspaceInstructionPolicyRoleKey } from "./workspace-instruction-policies";
|
|
18
|
+
export type { ActivateWorkspaceInstructionPolicyRequest, CreateWorkspaceInstructionPolicyDraftRequest, ImportLegacyWorkspaceInstructionPolicyDraftRequest, RollbackWorkspaceInstructionPolicyRequest, WorkspaceInstructionPolicyActivationEvent, WorkspaceInstructionPolicyActivationResponse, WorkspaceInstructionPolicyActivationType, WorkspaceInstructionPolicyConflictResponse, WorkspaceInstructionPolicyDiffRequest, WorkspaceInstructionPolicyDiffResponse, WorkspaceInstructionPolicyDraftProvenanceSource, WorkspaceInstructionPolicyHead, WorkspaceInstructionPolicyKind, WorkspaceInstructionPolicyListOptions, WorkspaceInstructionPolicyListResponse, WorkspaceInstructionPolicyProvenanceSource, WorkspaceInstructionPolicyRevision, WorkspaceInstructionPolicyRevisionIdentity, WorkspaceInstructionPolicyScope, WorkspaceInstructionPolicyTarget, } from "./workspace-instruction-policies";
|
|
19
|
+
export type { WorkspaceStateDocumentStatusCounts, WorkspaceStateGapCode, WorkspaceStateMemoryKindCounts, WorkspaceStateMemoryStatusCounts, WorkspaceStateResponse, WorkspaceStateSourceKindCounts, } from "./workspace-state";
|
|
20
|
+
export { normalizePreferenceRegistryStableKey } from "./preference-registry";
|
|
21
|
+
export type { ActivatePreferenceRegistryRevisionRequest, ChangePreferenceRegistryScopeRequest, CorrectPreferenceRegistryRequest, CreatePreferenceRegistryProposalRequest, DeactivatePreferenceRegistryRequest, PreferenceRegistryConflictStrategy, PreferenceRegistryDescriptor, PreferenceRegistryDescriptorProvenance, PreferenceRegistryDetailResponse, PreferenceRegistryEvent, PreferenceRegistryFullContent, PreferenceRegistryListOptions, PreferenceRegistryListResponse, PreferenceRegistryMutationResponse, PreferenceRegistryPrecedence, PreferenceRegistryProvenanceSource, PreferenceRegistryRecord, PreferenceRegistryRevisionSummary, PreferenceRegistryScope, PreferenceRegistryScopeTarget, PreferenceRegistrySnapshot, PreferenceRegistryStatus, PreferenceRegistryTrust, RejectPreferenceRegistryProposalRequest, SupersedePreferenceRegistryRequest, } from "./preference-registry";
|
|
22
|
+
export { DEFAULT_WORKSPACE_TRANSCRIPTION_POLICY, authorizeTranscriptionAdapter, createTranscriptionSessionRequest, resolveWorkspaceVoiceInputEnabled, resolveWorkspaceTranscriptionPolicy, } from "./transcription";
|
|
23
|
+
export type { TranscriptionAdapter, TranscriptionAdapterDescriptor, TranscriptionAdapterStartContext, TranscriptionAuthorization, TranscriptionCredentialMode, TranscriptionDiagnostic, TranscriptionErrorCode, TranscriptionEvent, TranscriptionEventListener, TranscriptionLifecycleStatus, TranscriptionPolicyBlockReason, TranscriptionResultMetadata, TranscriptionSession, TranscriptionSessionRequest, TranscriptionSpeaker, TranscriptionTargetSelection, TranscriptionTimeSpan, TranscriptionWord, WorkspaceTranscriptionPolicy, WorkspaceTranscriptionTarget, } from "./transcription";
|
|
24
|
+
export { KNOWN_PERMISSIONS, KNOWN_USAGE_EVENT_TYPES, OPENGENI_API_CONTRACT_HEADER, OPENGENI_API_CONTRACT_REVISION, OPENGENI_CORRELATION_HEADER, RETAINED_OUTPUT_DEFAULT_PAGE_BYTES, RETAINED_OUTPUT_MAX_PAGE_BYTES, SESSION_EVENT_TYPES, } from "./types";
|
|
25
|
+
export type { AccessContext, AccessGrant, AccountGrant, AccountRole, AddWorkspaceMemberRequest, AgentMessageCompletedPayload, AgentTextDeltaPayload, AgentToolCallCreatedPayload, AgentToolCallOutputPayload, ApiKey, BillingBalance, BillingEntitlementsResponse, BillingMode, BillingSummary, BillingUsageResponse, InsightsRange, InsightsBillingPath, InsightsModelUsageRow, InsightsSeriesPoint, InsightsDepthBucket, InsightsModelFacet, InsightsSpendDriver, InsightsWarmGroupRow, InsightsLiveWarmLease, InsightsFloorSession, InsightsScheduleRow, WorkspaceInsightsSnapshot, WorkspaceInsightsResponse, CapabilityCatalogItem, CapabilityCatalogResponse, CapabilityInstallation, CapabilityInstallationStatus, CapabilityKind, CapabilityPack, CapabilityPackConnector, CapabilityPackConnectorAuthModel, CapabilityPackVariableSetSpec, CapabilityPackKnowledge, CapabilityPackScheduledTaskTemplate, CapabilityPackSkill, CapabilityPackSkillFile, CapabilityRuntime, CapabilitySource, CapabilityUnavailableReason, ClientConfig, ClientVoiceInputConfig, ClientModel, ModelAvailabilityV1, ModelBillingAttributionV1, ModelCapabilitiesV1, ModelCapabilityStateV1, ModelCapabilitySupportV1, ModelCredentialReadinessV1, ModelCredentialSourceV1, ModelPricingScheduleV1, ModelPricingV1, WorkspaceModelCatalogModel, WorkspaceModelCatalogResponse, CodexAccount, CodexAccountOverview, CodexAccountsResponse, CodexAllocatorUpdate, CodexAccountSwitchedPayload, CodexConnectionStatus, CodexConnectStart, CodexConnectPoll, CodexFleetConfidence, CodexFleetCacheState, CodexFleetDecisionEventPayload, CodexFleetDecisionScore, CodexFleetShadowComparison, CodexOverviewResponse, CodexResetCredit, CodexResetRedemptionRecovery, CodexRotationSettings, CodexUsage, CodexUsageMap, CodexUsagePayload, CodexUsageWindow, CompactSessionContextResult, ClientSessionEventInput, CompleteFileUploadResponse, ConnectionKind, ConnectionMetadata, ConnectionResponse, ConnectionStatus, AddDocumentRequest, CreateApiKeyRequest, CreateApiKeyResponse, CreateCapabilityCatalogItemRequest, OpenGeniSlackBotInstallRequest, OpenGeniSlackBotInstallStart, CreateConnectionRequest, CreateCheckoutRequest, CreateCheckoutResponse, CreateDocumentBaseRequest, CreateFileUploadRequest, CreateFileUploadResponse, CreateGitHubAppManifestRequest, CreateGitHubAppManifestResponse, CreateKnowledgeDropRequest, CreateKnowledgeMemoryRequest, CreateScheduledTaskRequest, CreateSessionRequest, CreateVariableSetRequest, CreateWorkspaceEnvironmentRequest, CreateWorkspaceRequest, DiscoverMcpCapabilitiesResponse, Document, DocumentBase, DocumentCuration, DocumentCurationStatus, DocumentSearchMode, DocumentSearchRequest, DocumentSearchResponse, DocumentSearchResult, DocumentStatus, DocumentVisibility, MoveDocumentRequest, EnableCapabilityRequest, EnablePackRequest, Entitlements, EntitlementValue, EntitlementsMode, FileAsset, HumanInputAnswer, HumanInputOption, HumanInputQuestion, HumanInputQuestionKind, HumanInputResponse, FileDownloadUrlResponse, FileResourceRef, FileStatus, FileUploadData, FirstPartyMcpToolName, GetPackResponse, GitHubAppInfo, GitHubAppSetupMode, GitHubBindingStatus, GitHubInstallationBinding, GitHubInstallationLifecycle, GitHubRepositoriesResponse, GoogleDriveBrowseItem, GoogleDriveBrowseResponse, GoogleDriveConnectionMetadata, GoogleDriveOAuthStartRequest, GoogleDriveOAuthStartResponse, GoogleDriveReadPolicy, GoogleDriveSelectedSource, GoogleDriveSyncCadence, GoogleDriveTargetScope, GitHubRepository, GitHubRepositoryScope, GoalSpec, IntegrationClientMetadata, KnownPermission, KnownSessionEventType, KnownUsageEventType, KnowledgeMemory, KnowledgeMemoryKind, KnowledgeMemorySearchRequest, KnowledgeMemoryStatus, KnowledgeSourceKind, KnowledgeSourceRef, GitCredentialProvider, GitCredentialBindingId, GitRepositoryAccess, ListApiKeysResponse, ListConnectionsResponse, ListPacksResponse, ListWorkspaceMembersResponse, McpServerConnectionRef, OAuthStartRequest, OAuthStartResponse, PackInstallation, PackInstallationStatus, Permission, ProductAccessMode, LatencyMode, ReasoningEffort, RetainedArtifactContent, RetainedArtifactContentOptions, RetainedArtifactMetadata, RetainedArtifactReference, RetainedArtifactUnavailable, RetainedOutputKind, RetainedOutputUnavailableReason, RecordingAvailablePayload, RecordingCodec, RecordingContentType, RecordingFailedPayload, RecordingFailedReason, RecordingMode, RecordingStartedPayload, RegisterCapabilityPackRequest, RepositoryResourceRef, ResourceRef, SaveGoogleDriveSourceRequest, SandboxBackend, SandboxCapabilityName, SandboxOs, ScheduledTask, ScheduledTaskAgentConfig, ScheduledTaskAgentConfigInput, ScheduledTaskDayOfWeek, ScheduledTaskOverlapPolicy, ScheduledTaskRun, ScheduledTaskRunMode, ScheduledTaskRunStatus, ScheduledTaskScheduleSpec, ScheduledTaskStatus, ScheduledTaskTriggerType, Session, SessionCapabilities, SessionListResponse, SessionLineageResponse, SessionEffectiveToolPolicy, SessionQueueMutationResponse, SessionQueueSnapshot, SessionControlResponse, ComposerDraft, DeleteSessionQueueItemRequest, EditSessionQueueItemRequest, EffectiveControlBlocker, EffectiveControlResumeOption, EffectiveSessionControl, MoveSessionQueueItemRequest, NewSessionDraft, NewSessionDraftOptions, SaveComposerDraftRequest, SaveNewSessionDraftRequest, SessionCommandReceipt, SteerSessionQueueItemRequest, WorkspaceInferenceControlResponse, SessionPendingInputPreview, SessionSystemUpdate, SessionSystemUpdateKind, SessionSystemUpdateState, SessionSummary, LineageNode, SessionMcpCredentialUpdateInput, SessionMcpApprovalPolicy, SessionMcpServerInput, SessionMcpServerMetadata, SessionToolPolicy, FileSystemCapability, TerminalCapability, GitCapability, DesktopStreamCapability, RecordingCapability, ComputerUseCapability, ClientAuthConfig, StreamUrlRotatedPayload, StreamOpenedPayload, StreamClosedPayload, StreamRevokedPayload, AttachViewerRequest, AttachViewerResponse, ViewerHolder, AcknowledgeStreamRequest, AcknowledgeStreamResponse, ViewerHeartbeatRequest, ViewerHeartbeatResponse, SessionEvent, SessionEventCompactResult, SessionEventCompactResultOptions, SessionEventListOptions, SessionEventLatestClass, SessionEventPage, SessionEventPayloadMode, SessionEventReadDirection, SessionEventReadMode, SessionEventResultMode, SessionEventSemanticClass, SessionEventType, SessionGoal, SessionGoalCreatedBy, SessionGoalStatus, SessionHumanInputRequest, SessionStatus, SessionStatusChangedPayload, SessionStructuredCapabilities, SessionTurn, ServiceTurnInitiator, ServiceTurnInitiatorContext, SessionTurnSource, SessionTurnStatus, SubmitHumanInputResponseRequest, TurnInitiator, ToolAuthNeededPayload, UpdateConnectionRequest, SandboxCommandOutputDeltaPayload, FsChangeKind, FsChangedPayload, GitChangedPayload, TerminalPtyStartedPayload, TerminalPtyOutputDeltaPayload, TerminalPtyExitedPayload, FsNodeType, FsTreeNode, FsEncoding, FsListRequest, FsListResponse, FsReadRequest, FsReadResponse, FsWriteRequest, FsWriteResponse, FsDeleteRequest, FsDeleteResponse, FsMoveRequest, FsMoveResponse, FsMkdirRequest, FsMkdirResponse, GitFileStatusCode, GitFileStatus, GitStatusRequest, GitStatusResponse, GitDiffLineType, GitDiffLine, GitDiffHunk, GitFileDiff, GitDiffRequest, GitDiffResponse, GitLogRequest, GitCommit, GitLogResponse, GitShowRequest, GitShowResponse, SetWorkspaceEnvironmentVariableRequest, WorkspaceCaptureFile, WorkspaceCaptureRepo, WorkspaceCaptureDegradedReason, WorkspaceCaptureStats, WorkspaceCaptureManifest, WorkspaceRevisionCapturedPayload, WorkspaceRevisionDegradedPayload, WorkspaceCaptureSignedUrl, GetWorkspaceCaptureResponse, GetWorkspaceCaptureFileResponse, TerminalExecRequest, TerminalExecResponse, PtyOpenRequest, PtyOpenResponse, PtyWriteRequest, PtyResizeRequest, PtyCloseRequest, ToolRef, UpdateKnowledgeMemoryRequest, UpdateScheduledTaskRequest, UpdateSessionGoalRequest, UpdateSessionMcpApprovalPolicyRequest, UpdateSessionMcpApprovalPolicyResponse, UpdateSessionPinRequest, UpdateSessionRequest, UpdateSessionToolPolicyRequest, UpdateVariableSetRequest, UpdateWorkspaceEnvironmentRequest, UpdateWorkspaceMemberRequest, UpdateWorkspaceRequest, UpdateWorkspaceSettingsRequest, TranscribeAudioResponse, UploadFileInput, UsageEvent, UsageEventType, UserApprovalDecisionEventInput, UserHumanInputResponseEventInput, UserMessageEventInput, Workspace, WorkspaceControlEvent, VariableSet, VariableSetVariableMetadata, Rig, RigVersion, RigCheck, RigChange, RigChangeKind, RigChangeStatus, RigCheckResult, RigChangeVerification, CreateRigRequest, UpdateRigRequest, RigSetupAppendPayload, RigDefinitionEditPayload, ProposeRigChangeRequest, WorkspaceEnvironment, WorkspaceEnvironmentVariableMetadata, WorkspaceMember, WorkspaceMemorySearchMode, WorkspaceMemorySearchRequest, WorkspaceMemorySearchResult, WorkspaceMemorySearchResponse, WorkspaceSettings, WorkspaceVoiceInputSettings, WorkspaceRegisteredPack, MetricSample, MachineState, MachineKind, MachineView, MachinesResponse, MachineMetricsSeriesResponse, SwapActiveSandboxRequest, SwapActiveSandboxResponse, EnrollmentOs, DeviceEnrollmentLookupRequest, DeviceEnrollmentLookupResponse, DeviceEnrollmentLookupMachine, DeviceEnrollmentApproveRequest, DeviceEnrollmentApproveResponse, DeviceEnrollmentDenyRequest, DeviceEnrollmentDenyResponse, MintEnrollTokenRequest, MintEnrollTokenResponse, EnrollmentCredentials, EnrollTokenExchangeRequest, EnrollTokenExchangeResponse, } from "./types";
|