@opengeni/sdk 0.9.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- type SessionStatus = "queued" | "running" | "idle" | "requires_action" | "failed" | "cancelled";
1
+ type SessionStatus = "queued" | "running" | "idle" | "requires_action" | "recovering" | "waiting_capacity" | "paused" | "failed" | "cancelled";
2
2
  type SandboxBackend = "docker" | "modal" | "local" | "none" | "daytona" | "runloop" | "e2b" | "blaxel" | "cloudflare" | "vercel" | "selfhosted";
3
3
  type SandboxOs = "linux" | "macos" | "windows";
4
4
  type SandboxCapabilityName = "FileSystem" | "Terminal" | "Git" | "DesktopStream" | "Recording";
@@ -124,12 +124,18 @@ type ViewerHeartbeatResponse = {
124
124
  alive: boolean;
125
125
  };
126
126
  type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
127
+ type GitCredentialProvider = "github" | "gitlab" | "azure_devops";
127
128
  type RepositoryResourceRef = {
128
129
  kind: "repository";
129
130
  uri: string;
130
131
  ref: string;
131
132
  mountPath?: string | undefined;
132
133
  subpath?: string | undefined;
134
+ provider?: GitCredentialProvider | undefined;
135
+ repositoryId?: number | string | undefined;
136
+ installationId?: number | string | undefined;
137
+ projectId?: number | string | undefined;
138
+ connectionId?: string | undefined;
133
139
  githubInstallationId?: number | undefined;
134
140
  githubRepositoryId?: number | undefined;
135
141
  };
@@ -168,6 +174,87 @@ type SessionMcpServerMetadata = {
168
174
  headerNames: string[];
169
175
  credentialVersion: number;
170
176
  };
177
+ type ConnectionKind = "oauth2" | "api_key" | "app_install" | "delegated";
178
+ type ConnectionStatus = "active" | "needs_reauth" | "revoked" | "error";
179
+ type McpServerConnectionRef = {
180
+ connectionId?: string | undefined;
181
+ providerDomain: string;
182
+ kind?: ConnectionKind | undefined;
183
+ scopes?: string[] | undefined;
184
+ resource?: string | undefined;
185
+ subjectScope?: "workspace" | "subject" | undefined;
186
+ };
187
+ type ConnectionMetadata = {
188
+ id: string;
189
+ accountId: string;
190
+ workspaceId: string;
191
+ subjectId: string | null;
192
+ providerDomain: string;
193
+ kind: ConnectionKind;
194
+ status: ConnectionStatus;
195
+ grantedScopes: string[];
196
+ expiresAt: string | null;
197
+ lastRefreshAt: string | null;
198
+ lastUsedAt: string | null;
199
+ lastError: string | null;
200
+ version: number;
201
+ metadata: Record<string, unknown>;
202
+ createdBySubjectId: string | null;
203
+ updatedBySubjectId: string | null;
204
+ createdAt: string;
205
+ updatedAt: string;
206
+ };
207
+ type CreateConnectionRequest = {
208
+ providerDomain: string;
209
+ kind: ConnectionKind;
210
+ subjectId?: string | null | undefined;
211
+ credential: Record<string, unknown>;
212
+ grantedScopes?: string[] | undefined;
213
+ expiresAt?: string | null | undefined;
214
+ metadata?: Record<string, unknown> | undefined;
215
+ };
216
+ type UpdateConnectionRequest = {
217
+ providerDomain?: string | undefined;
218
+ subjectId?: string | null | undefined;
219
+ kind?: ConnectionKind | undefined;
220
+ status?: ConnectionStatus | undefined;
221
+ credential?: Record<string, unknown> | undefined;
222
+ grantedScopes?: string[] | undefined;
223
+ expiresAt?: string | null | undefined;
224
+ metadata?: Record<string, unknown> | undefined;
225
+ };
226
+ type ConnectionResponse = {
227
+ connection: ConnectionMetadata;
228
+ };
229
+ type ListConnectionsResponse = {
230
+ connections: ConnectionMetadata[];
231
+ };
232
+ type OAuthStartRequest = {
233
+ providerDomain?: string | undefined;
234
+ mcpUrl?: string | undefined;
235
+ resource?: string | undefined;
236
+ requestedScopes?: string[] | undefined;
237
+ returnPath?: string | undefined;
238
+ connectionId?: string | undefined;
239
+ oauthClient?: {
240
+ clientId: string;
241
+ clientSecret?: string | undefined;
242
+ tokenEndpointAuthMethod?: "none" | "client_secret_post" | "client_secret_basic" | undefined;
243
+ } | undefined;
244
+ };
245
+ type OAuthStartResponse = {
246
+ state: string;
247
+ authorizationUrl: string | null;
248
+ expiresAt: string;
249
+ };
250
+ type IntegrationClientMetadata = {
251
+ client_id: string;
252
+ client_name: "OpenGeni";
253
+ redirect_uris: string[];
254
+ token_endpoint_auth_method: "none";
255
+ grant_types: Array<"authorization_code" | "refresh_token">;
256
+ response_types: ["code"];
257
+ };
171
258
  type Session = {
172
259
  id: string;
173
260
  workspaceId: string;
@@ -182,22 +269,76 @@ type Session = {
182
269
  metadata: Record<string, unknown>;
183
270
  model: string;
184
271
  sandboxBackend: SandboxBackend;
272
+ sandboxOs: SandboxOs;
273
+ sandboxGroupId: string;
274
+ activeSandboxId: string | null;
275
+ activeEpoch: number;
276
+ variableSetId: string | null;
277
+ /** @deprecated use variableSetId */
185
278
  environmentId: string | null;
279
+ rigId: string | null;
280
+ rigVersionId: string | null;
186
281
  firstPartyMcpPermissions: string[] | null;
187
282
  mcpServers: SessionMcpServerMetadata[];
283
+ parentSessionId: string | null;
188
284
  createIdempotencyKey: string | null;
189
285
  temporalWorkflowId: string | null;
190
286
  activeTurnId: string | null;
287
+ queueVersion: number;
288
+ queueHeadPosition: number;
289
+ queueTailPosition: number;
290
+ controlState: "active" | "paused";
291
+ controlGeneration: number;
292
+ controlReason: string | null;
293
+ controlChangedBy: string | null;
294
+ controlChangedAt: string | null;
295
+ workspaceRunExceptionGeneration: number | null;
191
296
  lastSequence: number;
192
297
  /** Multi-account Codex (P1): the account this session is pinned to (null ⇒ follow workspace active). */
193
298
  codexPinnedCredentialId?: string | null;
194
299
  /** Multi-account Codex (P1): the account the most recent turn ran on (the "Running on:" indicator). */
195
300
  codexLastCredentialId?: string | null;
301
+ /** Personal (authenticated subject) workspace pin state, never workspace-global. */
302
+ pinned?: boolean;
303
+ /** Stable pin ordering key; null when this subject has not pinned the session. */
304
+ pinnedAt?: string | null;
305
+ /** Optimistic pin-state revision; zero represents an absent pin relation. */
306
+ pinVersion?: number;
307
+ /** Server-authoritative descendant counts populated by session-list reads. */
308
+ treeStats?: {
309
+ directChildren: number;
310
+ totalDescendants: number;
311
+ runningDescendants: number;
312
+ queuedDescendants: number;
313
+ attentionDescendants: number;
314
+ pausedDescendants: number;
315
+ failedDescendants: number;
316
+ } | undefined;
196
317
  createdAt: string;
197
318
  updatedAt: string;
198
319
  };
199
- type SessionTurnStatus = "queued" | "running" | "requires_action" | "completed" | "failed" | "cancelled";
200
- type SessionTurnSource = "user" | "scheduled_task" | "api" | "goal";
320
+ type SessionSummary = Session;
321
+ /** Canonical session-list page; pinned rows are excluded from ordinary pages. */
322
+ type SessionListResponse = {
323
+ pinned: Session[];
324
+ sessions: Session[];
325
+ nextCursor: string | null;
326
+ };
327
+ type UpdateSessionPinRequest = {
328
+ pinned: boolean;
329
+ expectedVersion?: number;
330
+ };
331
+ type LineageNode = {
332
+ session: SessionSummary;
333
+ children: LineageNode[];
334
+ };
335
+ type SessionLineageResponse = {
336
+ ancestors: SessionSummary[];
337
+ children: LineageNode[];
338
+ truncated: boolean;
339
+ };
340
+ type SessionTurnStatus = "queued" | "running" | "requires_action" | "recovering" | "waiting_capacity" | "completed" | "failed" | "cancelled" | "superseded";
341
+ type SessionTurnSource = "user" | "scheduled_task" | "api" | "goal" | "system" | "compaction";
201
342
  type SessionTurn = {
202
343
  id: string;
203
344
  workspaceId: string;
@@ -213,13 +354,20 @@ type SessionTurn = {
213
354
  model: string;
214
355
  reasoningEffort: ReasoningEffort;
215
356
  sandboxBackend: SandboxBackend;
357
+ sandboxOs: SandboxOs | null;
216
358
  metadata: Record<string, unknown>;
359
+ version: number;
360
+ executionGeneration: number;
361
+ activeAttemptId: string | null;
362
+ lineage: Record<string, unknown>;
363
+ cancelledBy?: string | null;
364
+ cancelReason?: string | null;
217
365
  startedAt: string | null;
218
366
  finishedAt: string | null;
219
367
  createdAt: string;
220
368
  updatedAt: string;
221
369
  };
222
- declare const SESSION_EVENT_TYPES: readonly ["session.created", "session.status.changed", "session.requiresAction", "session.context.compacted", "session.context.cleared", "user.message", "user.interrupt", "user.approvalDecision", "turn.queued", "turn.updated", "turn.started", "turn.completed", "turn.failed", "turn.cancelled", "turn.preempted", "agent.message.delta", "agent.message.completed", "agent.reasoning.delta", "agent.toolCall.created", "agent.toolCall.output", "agent.updated", "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.continuation", "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", "codex.account.switched"];
370
+ declare const SESSION_EVENT_TYPES: readonly ["session.created", "session.status.changed", "session.requiresAction", "session.context.compaction.requested", "session.context.compacted", "session.context.compaction.skipped", "session.context.cleared", "user.message", "user.pause", "user.approvalDecision", "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.usage", "tool.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", "session.control.paused", "session.control.resumed", "session.control.steer_requested", "workspace.inference.paused", "workspace.inference.resumed", "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", "codex.account.switched", "codex.credential.selected", "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"];
223
371
  type KnownSessionEventType = (typeof SESSION_EVENT_TYPES)[number];
224
372
  /**
225
373
  * Event types the SDK knows about today, kept open so a newer OpenGeni server
@@ -237,6 +385,22 @@ type SessionEvent = {
237
385
  occurredAt: string;
238
386
  clientEventId?: string | null | undefined;
239
387
  turnId?: string | null | undefined;
388
+ turnGeneration?: number | null | undefined;
389
+ turnAttemptId?: string | null | undefined;
390
+ turnAssociation?: "current" | "late_rejected" | "duplicate" | null | undefined;
391
+ duplicateOfEventId?: string | null | undefined;
392
+ duplicateReason?: string | null | undefined;
393
+ };
394
+ type ToolAuthNeededPayload = {
395
+ serverId: string;
396
+ toolName?: string | null | undefined;
397
+ providerDomain: string;
398
+ connectionId?: string | null | undefined;
399
+ reason: "missing_connection" | "expired" | "insufficient_scope" | "refresh_failed";
400
+ scopes?: string[] | undefined;
401
+ resource?: string | undefined;
402
+ authorizationUrl?: string | undefined;
403
+ subjectId?: string | null | undefined;
240
404
  };
241
405
  type AgentTextDeltaPayload = {
242
406
  text: string;
@@ -516,6 +680,102 @@ type GitShowResponse = {
516
680
  } | null;
517
681
  revision: number;
518
682
  };
683
+ type WorkspaceCaptureFile = {
684
+ path: string;
685
+ status: GitFileStatusCode;
686
+ hash: string | null;
687
+ baseHash: string | null;
688
+ contentRef: string | null;
689
+ sizeBytes: number;
690
+ isBinary: boolean;
691
+ tooLarge: boolean;
692
+ deleted: boolean;
693
+ };
694
+ type WorkspaceCaptureRepo = {
695
+ root: string;
696
+ head: string | null;
697
+ detached: boolean;
698
+ upstream: string | null;
699
+ ahead: number;
700
+ behind: number;
701
+ status: GitFileStatus[];
702
+ diff: GitFileDiff[];
703
+ };
704
+ type WorkspaceCaptureDegradedReason = "repository_discovery_command_failed" | "repository_discovery_timed_out" | "repository_discovery_result_limit_exceeded";
705
+ type WorkspaceCaptureStats = {
706
+ repoCount: number;
707
+ fileCount: number;
708
+ additions: number;
709
+ deletions: number;
710
+ totalBytes: number;
711
+ tooLargeCount: number;
712
+ binaryCount: number;
713
+ treeEntryCount: number;
714
+ treeTruncated: boolean;
715
+ durationMs: number;
716
+ fingerprint?: string;
717
+ };
718
+ type WorkspaceCaptureManifest = {
719
+ version: 1;
720
+ revision: number;
721
+ capturedAt: string;
722
+ turnId: string | null;
723
+ leaseEpoch: number;
724
+ treeIndex: FsTreeNode;
725
+ treeTruncated: boolean;
726
+ repos: WorkspaceCaptureRepo[];
727
+ files: WorkspaceCaptureFile[];
728
+ stats: WorkspaceCaptureStats;
729
+ };
730
+ type WorkspaceRevisionCapturedPayload = {
731
+ revision: number;
732
+ turnId: string | null;
733
+ capturedAt: string;
734
+ leaseEpoch: number;
735
+ stats: WorkspaceCaptureStats;
736
+ };
737
+ type WorkspaceRevisionDegradedPayload = {
738
+ revision: number;
739
+ turnId: string | null;
740
+ capturedAt: string;
741
+ leaseEpoch: number;
742
+ reason: WorkspaceCaptureDegradedReason;
743
+ };
744
+ type WorkspaceCaptureSignedUrl = {
745
+ url: string;
746
+ expiresAt: string;
747
+ };
748
+ type GetWorkspaceCaptureResponse = {
749
+ available: false;
750
+ degradedReason?: WorkspaceCaptureDegradedReason | null;
751
+ revision?: number | null;
752
+ capturedAt?: string | null;
753
+ turnId?: string | null;
754
+ leaseEpoch?: number | null;
755
+ } | {
756
+ available: true;
757
+ revision: number;
758
+ capturedAt: string;
759
+ turnId: string | null;
760
+ leaseEpoch: number;
761
+ sizeBytes: number;
762
+ stats: WorkspaceCaptureStats;
763
+ manifest: WorkspaceCaptureManifest | null;
764
+ manifestUrl: WorkspaceCaptureSignedUrl | null;
765
+ };
766
+ type GetWorkspaceCaptureFileResponse = {
767
+ path: string;
768
+ revision: number;
769
+ status: GitFileStatusCode;
770
+ hash: string | null;
771
+ baseHash: string | null;
772
+ sizeBytes: number;
773
+ isBinary: boolean;
774
+ tooLarge: boolean;
775
+ encoding: FsEncoding | null;
776
+ content: string | null;
777
+ contentUrl: WorkspaceCaptureSignedUrl | null;
778
+ };
519
779
  type TerminalExecRequest = {
520
780
  command: string;
521
781
  cwd?: string;
@@ -612,7 +872,10 @@ type ScheduledTask = {
612
872
  overlapPolicy: ScheduledTaskOverlapPolicy;
613
873
  agentConfig: ScheduledTaskAgentConfig;
614
874
  reusableSessionId: string | null;
875
+ variableSetId: string | null;
876
+ /** @deprecated use variableSetId */
615
877
  environmentId: string | null;
878
+ rigId: string | null;
616
879
  metadata: Record<string, unknown>;
617
880
  createdAt: string;
618
881
  updatedAt: string;
@@ -628,7 +891,10 @@ type CreateSessionRequest = {
628
891
  sandboxBackend?: SandboxBackend | undefined;
629
892
  targetSandboxId?: string | undefined;
630
893
  workingDir?: string | undefined;
894
+ variableSetId?: string | undefined;
895
+ /** @deprecated use variableSetId */
631
896
  environmentId?: string | undefined;
897
+ rigId?: string | undefined;
632
898
  goal?: GoalSpec | undefined;
633
899
  clientEventId?: string | undefined;
634
900
  idempotencyKey?: string | undefined;
@@ -638,7 +904,7 @@ type CreateSessionRequest = {
638
904
  groupId: string;
639
905
  } | undefined;
640
906
  };
641
- 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", "environments:manage", "environments:use", "mcp_servers:attach", "goals:manage", "enrollments:read", "enrollments:manage"];
907
+ 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"];
642
908
  type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
643
909
  /**
644
910
  * Permissions the SDK knows about today, kept open so a newer OpenGeni server
@@ -866,9 +1132,27 @@ type Workspace = {
866
1132
  externalSource: string | null;
867
1133
  externalId: string | null;
868
1134
  agentInstructions: string | null;
1135
+ settings: Record<string, unknown>;
1136
+ inferenceState?: "active" | "paused";
1137
+ inferenceGeneration?: number;
1138
+ inferenceReason?: string | null;
1139
+ inferenceChangedBy?: string | null;
1140
+ inferenceChangedAt?: string | null;
1141
+ defaultRigId?: string | null;
869
1142
  createdAt: string;
870
1143
  updatedAt: string;
871
1144
  };
1145
+ type WorkspaceSettings = {
1146
+ memoryEnabled?: boolean | undefined;
1147
+ [key: string]: unknown;
1148
+ };
1149
+ type UpdateWorkspaceSettingsRequest = {
1150
+ memoryEnabled?: boolean | undefined;
1151
+ [key: string]: unknown;
1152
+ };
1153
+ type SetWorkspaceDefaultRigRequest = {
1154
+ rigId: string | null;
1155
+ };
872
1156
  type CreateWorkspaceRequest = {
873
1157
  accountId?: string | undefined;
874
1158
  name: string;
@@ -958,21 +1242,61 @@ type UpdateSessionRequest = {
958
1242
  };
959
1243
  /** Outcome of a manual /compact trigger. */
960
1244
  type CompactSessionContextResult = {
961
- /**
962
- * queued: a client-side (Azure) compaction will run before the next turn.
963
- * noop: nothing to do (server-managed provider, mode off, or no history).
964
- */
965
- status: "queued" | "noop";
1245
+ /** pending waits for the current safe boundary; completed ran while idle. */
1246
+ status: "pending" | "completed" | "noop";
966
1247
  message: string;
967
1248
  };
968
- type UpdateSessionTurnRequest = {
969
- prompt?: string | undefined;
970
- resources?: ResourceRef[] | undefined;
971
- tools?: ToolRef[] | undefined;
972
- model?: string | undefined;
973
- reasoningEffort?: ReasoningEffort | undefined;
974
- sandboxBackend?: SandboxBackend | undefined;
975
- metadata?: Record<string, unknown> | undefined;
1249
+ type SessionQueueSnapshot = {
1250
+ version: number;
1251
+ controlState: "active" | "paused";
1252
+ controlGeneration: number;
1253
+ workspaceInferenceState: "active" | "paused";
1254
+ workspaceInferenceGeneration: number;
1255
+ workspaceRunExceptionGeneration: number | null;
1256
+ items: SessionTurn[];
1257
+ };
1258
+ type SystemUpdateClassification = "success" | "failure" | "action_required" | "info";
1259
+ type SessionSystemUpdateKind = "child_session_update" | "scheduled_wake" | "lifecycle_event" | "runtime_notice";
1260
+ type SessionSystemUpdateState = "pending" | "deferred" | "delivered" | "cancelled" | "failed";
1261
+ type SessionSystemUpdate = {
1262
+ id: string;
1263
+ sessionId: string;
1264
+ kind: SessionSystemUpdateKind;
1265
+ classification: SystemUpdateClassification;
1266
+ sourceId: string;
1267
+ dedupeKey: string;
1268
+ summary: string;
1269
+ payload: Record<string, unknown>;
1270
+ lineage: Record<string, unknown>;
1271
+ state: SessionSystemUpdateState;
1272
+ deliveredTurnId: string | null;
1273
+ deliveredAt: string | null;
1274
+ createdAt: string;
1275
+ };
1276
+ type SessionControlResponse = {
1277
+ operationId: string;
1278
+ event: SessionEvent;
1279
+ controlState: "active" | "paused";
1280
+ controlGeneration: number;
1281
+ expectedActiveTurnId: string | null;
1282
+ expectedExecutionGeneration: number | null;
1283
+ expectedAttemptId: string | null;
1284
+ deliveryEventId: string | null;
1285
+ shouldSignalControl: boolean;
1286
+ shouldWake: boolean;
1287
+ };
1288
+ type WorkspaceInferenceControlResponse = {
1289
+ operationId: string;
1290
+ state: "active" | "paused";
1291
+ generation: number;
1292
+ affectedSessionIds: string[];
1293
+ controlSessionIds: string[];
1294
+ exceptionSessionIds: string[];
1295
+ };
1296
+ type SessionQueueMutationResponse = {
1297
+ snapshot: SessionQueueSnapshot;
1298
+ events: SessionEvent[];
1299
+ shouldWake: boolean;
976
1300
  };
977
1301
  /** Input shape for agent config on create/update (server applies defaults). */
978
1302
  type ScheduledTaskAgentConfigInput = {
@@ -992,7 +1316,10 @@ type CreateScheduledTaskRequest = {
992
1316
  overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
993
1317
  agentConfig: ScheduledTaskAgentConfigInput;
994
1318
  status?: ScheduledTaskStatus | undefined;
1319
+ variableSetId?: string | null | undefined;
1320
+ /** @deprecated use variableSetId */
995
1321
  environmentId?: string | null | undefined;
1322
+ rigId?: string | null | undefined;
996
1323
  metadata?: Record<string, unknown> | undefined;
997
1324
  };
998
1325
  type UpdateScheduledTaskRequest = {
@@ -1002,7 +1329,10 @@ type UpdateScheduledTaskRequest = {
1002
1329
  overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
1003
1330
  agentConfig?: ScheduledTaskAgentConfigInput | undefined;
1004
1331
  status?: ScheduledTaskStatus | undefined;
1332
+ variableSetId?: string | null | undefined;
1333
+ /** @deprecated use variableSetId */
1005
1334
  environmentId?: string | null | undefined;
1335
+ rigId?: string | null | undefined;
1006
1336
  metadata?: Record<string, unknown> | undefined;
1007
1337
  };
1008
1338
  type ScheduledTaskRunStatus = "queued" | "dispatched" | "failed";
@@ -1027,23 +1357,27 @@ type ScheduledTaskRun = {
1027
1357
  * reads expose name + version metadata only. Values are decrypted exclusively
1028
1358
  * inside the worker at sandbox materialization time.
1029
1359
  */
1030
- type WorkspaceEnvironmentVariableMetadata = {
1360
+ type VariableSetVariableMetadata = {
1031
1361
  name: string;
1032
1362
  version: number;
1033
1363
  createdAt: string;
1034
1364
  updatedAt: string;
1035
1365
  };
1036
- type WorkspaceEnvironment = {
1366
+ type VariableSet = {
1037
1367
  id: string;
1038
1368
  accountId: string;
1039
1369
  workspaceId: string;
1040
1370
  name: string;
1041
1371
  description: string | null;
1042
- variables: WorkspaceEnvironmentVariableMetadata[];
1372
+ variables: VariableSetVariableMetadata[];
1043
1373
  createdAt: string;
1044
1374
  updatedAt: string;
1045
1375
  };
1046
- type CreateWorkspaceEnvironmentRequest = {
1376
+ /** @deprecated use VariableSetVariableMetadata */
1377
+ type WorkspaceEnvironmentVariableMetadata = VariableSetVariableMetadata;
1378
+ /** @deprecated use VariableSet */
1379
+ type WorkspaceEnvironment = VariableSet;
1380
+ type CreateVariableSetRequest = {
1047
1381
  name: string;
1048
1382
  description?: string | undefined;
1049
1383
  /** Initial variables. Values are write-only: they never come back on reads. */
@@ -1052,10 +1386,114 @@ type CreateWorkspaceEnvironmentRequest = {
1052
1386
  value: string;
1053
1387
  }[] | undefined;
1054
1388
  };
1055
- type UpdateWorkspaceEnvironmentRequest = {
1389
+ /** @deprecated use CreateVariableSetRequest */
1390
+ type CreateWorkspaceEnvironmentRequest = CreateVariableSetRequest;
1391
+ type UpdateVariableSetRequest = {
1392
+ name?: string | undefined;
1393
+ description?: string | null | undefined;
1394
+ };
1395
+ /** @deprecated use UpdateVariableSetRequest */
1396
+ type UpdateWorkspaceEnvironmentRequest = UpdateVariableSetRequest;
1397
+ type SetVariableSetVariableRequest = {
1398
+ value: string;
1399
+ };
1400
+ /** @deprecated use SetVariableSetVariableRequest */
1401
+ type SetWorkspaceEnvironmentVariableRequest = SetVariableSetVariableRequest;
1402
+ type RigCheck = {
1403
+ name: string;
1404
+ command: string;
1405
+ };
1406
+ type RigVersion = {
1407
+ id: string;
1408
+ rigId: string;
1409
+ version: number;
1410
+ image: string | null;
1411
+ setupScript: string | null;
1412
+ checks: RigCheck[];
1413
+ credentialHooks: string[];
1414
+ defaultVariableSetIds: string[];
1415
+ changelog: string | null;
1416
+ createdBy: string | null;
1417
+ active: boolean;
1418
+ createdAt: string;
1419
+ };
1420
+ type RigVerificationHealth = {
1421
+ checkHealth: "passing" | "failing" | "unknown";
1422
+ lastVerifiedAt: string | null;
1423
+ };
1424
+ type Rig = {
1425
+ id: string;
1426
+ accountId: string;
1427
+ workspaceId: string;
1428
+ name: string;
1429
+ description: string | null;
1430
+ createdBy: string | null;
1431
+ activeVersion: RigVersion | null;
1432
+ activeVersionHealth?: RigVerificationHealth | null;
1433
+ versionCount: number;
1434
+ createdAt: string;
1435
+ updatedAt: string;
1436
+ };
1437
+ type RigChangeKind = "setup_append" | "definition_edit";
1438
+ type RigChangeStatus = "proposed" | "verifying" | "merged" | "rejected" | "failed";
1439
+ type RigCheckResult = {
1440
+ name: string;
1441
+ command: string;
1442
+ exitCode: number | null;
1443
+ output?: string | undefined;
1444
+ };
1445
+ type RigChangeVerification = {
1446
+ startedAt?: string | undefined;
1447
+ finishedAt?: string | undefined;
1448
+ log?: string | undefined;
1449
+ checkResults?: RigCheckResult[] | undefined;
1450
+ [key: string]: unknown;
1451
+ };
1452
+ type RigChange = {
1453
+ id: string;
1454
+ rigId: string;
1455
+ baseVersionId: string | null;
1456
+ kind: RigChangeKind;
1457
+ payload: Record<string, unknown>;
1458
+ status: RigChangeStatus;
1459
+ proposedBy: string | null;
1460
+ verification: RigChangeVerification | null;
1461
+ resultVersionId: string | null;
1462
+ createdAt: string;
1463
+ updatedAt: string;
1464
+ };
1465
+ type CreateRigRequest = {
1466
+ name: string;
1467
+ description?: string | undefined;
1468
+ image?: string | undefined;
1469
+ setupScript?: string | undefined;
1470
+ checks?: RigCheck[] | undefined;
1471
+ credentialHooks?: string[] | undefined;
1472
+ defaultVariableSetIds?: string[] | undefined;
1473
+ };
1474
+ type UpdateRigRequest = {
1056
1475
  name?: string | undefined;
1057
1476
  description?: string | null | undefined;
1058
1477
  };
1478
+ type RigSetupAppendPayload = {
1479
+ command: string;
1480
+ note?: string | undefined;
1481
+ };
1482
+ type RigDefinitionEditPayload = {
1483
+ image?: string | null | undefined;
1484
+ setupScript?: string | null | undefined;
1485
+ checks?: RigCheck[] | undefined;
1486
+ credentialHooks?: string[] | undefined;
1487
+ defaultVariableSetIds?: string[] | undefined;
1488
+ changelog?: string | null | undefined;
1489
+ };
1490
+ type ProposeRigChangeRequest = {
1491
+ kind: "setup_append";
1492
+ payload: RigSetupAppendPayload;
1493
+ } | {
1494
+ kind: "definition_edit";
1495
+ payload: RigDefinitionEditPayload;
1496
+ };
1059
1497
  type FileStatus = "pending_upload" | "ready" | "failed" | "expired" | "deleted";
1060
1498
  type FileAsset = {
1061
1499
  id: string;
@@ -1103,6 +1541,8 @@ type UploadFileInput = {
1103
1541
  sha256?: string | undefined;
1104
1542
  };
1105
1543
  type DocumentStatus = "queued" | "indexing" | "ready" | "failed";
1544
+ type KnowledgeSourceKind = "manual_upload" | "meeting_transcript" | "repository" | "email" | "chat" | "document" | "web" | "other";
1545
+ type DocumentSearchMode = "hybrid" | "vector" | "keyword";
1106
1546
  type DocumentBase = {
1107
1547
  id: string;
1108
1548
  workspaceId: string;
@@ -1121,6 +1561,15 @@ type Document = {
1121
1561
  parser: string;
1122
1562
  chunkCount: number;
1123
1563
  error: string | null;
1564
+ sourceKind: KnowledgeSourceKind;
1565
+ sourceUri: string | null;
1566
+ sourceExternalId: string | null;
1567
+ sourceTitle: string | null;
1568
+ sourceAuthor: string | null;
1569
+ sourceCreatedAt: string | null;
1570
+ sourceUpdatedAt: string | null;
1571
+ sourceVersion: string | null;
1572
+ aclTags: string[];
1124
1573
  createdAt: string;
1125
1574
  updatedAt: string;
1126
1575
  };
@@ -1133,20 +1582,128 @@ type DocumentSearchResult = {
1133
1582
  title: string;
1134
1583
  text: string;
1135
1584
  score: number;
1585
+ matchType: DocumentSearchMode;
1586
+ vectorScore: number | null;
1587
+ keywordScore: number | null;
1136
1588
  chunkIndex: number;
1137
1589
  metadata: Record<string, unknown>;
1590
+ sourceKind: KnowledgeSourceKind;
1591
+ sourceUri: string | null;
1592
+ sourceExternalId: string | null;
1593
+ sourceTitle: string | null;
1594
+ sourceAuthor: string | null;
1595
+ sourceCreatedAt: string | null;
1596
+ sourceUpdatedAt: string | null;
1597
+ sourceVersion: string | null;
1598
+ aclTags: string[];
1138
1599
  };
1139
1600
  type CreateDocumentBaseRequest = {
1140
1601
  name: string;
1141
1602
  description?: string | undefined;
1142
1603
  };
1604
+ type AddDocumentRequest = {
1605
+ fileId: string;
1606
+ title?: string | undefined;
1607
+ sourceKind?: KnowledgeSourceKind | undefined;
1608
+ sourceUri?: string | undefined;
1609
+ sourceExternalId?: string | undefined;
1610
+ sourceTitle?: string | undefined;
1611
+ sourceAuthor?: string | undefined;
1612
+ sourceCreatedAt?: string | undefined;
1613
+ sourceUpdatedAt?: string | undefined;
1614
+ sourceVersion?: string | undefined;
1615
+ aclTags?: string[] | undefined;
1616
+ };
1143
1617
  type DocumentSearchRequest = {
1144
1618
  query: string;
1619
+ baseIds?: string[] | undefined;
1620
+ mode?: DocumentSearchMode | undefined;
1621
+ sourceKinds?: KnowledgeSourceKind[] | undefined;
1622
+ aclTags?: string[] | undefined;
1145
1623
  limit?: number | undefined;
1146
1624
  };
1147
1625
  type DocumentSearchResponse = {
1148
1626
  results: DocumentSearchResult[];
1149
1627
  };
1628
+ type KnowledgeMemoryStatus = "proposed" | "approved" | "rejected" | "active" | "superseded" | "archived";
1629
+ type KnowledgeMemoryKind = "semantic" | "episodic" | "procedural" | "decision" | "preference";
1630
+ type KnowledgeSourceRef = {
1631
+ kind: "document_chunk" | "document" | "session_event" | "memory" | "external";
1632
+ id: string;
1633
+ uri?: string | undefined;
1634
+ title?: string | undefined;
1635
+ metadata?: Record<string, unknown> | undefined;
1636
+ };
1637
+ type KnowledgeMemory = {
1638
+ id: string;
1639
+ workspaceId: string;
1640
+ status: KnowledgeMemoryStatus;
1641
+ kind: KnowledgeMemoryKind;
1642
+ scope: string;
1643
+ text: string;
1644
+ sourceRefs: KnowledgeSourceRef[];
1645
+ confidence: number;
1646
+ metadata: Record<string, unknown>;
1647
+ createdBySessionId: string | null;
1648
+ reviewedBy: string | null;
1649
+ reviewedAt: string | null;
1650
+ pinned: boolean;
1651
+ usageCount: number;
1652
+ lastUsedAt: string | null;
1653
+ supersedesId: string | null;
1654
+ supersededById: string | null;
1655
+ validFrom: string;
1656
+ validUntil: string | null;
1657
+ createdAt: string;
1658
+ updatedAt: string;
1659
+ };
1660
+ type CreateKnowledgeMemoryRequest = {
1661
+ status?: KnowledgeMemoryStatus | undefined;
1662
+ kind?: KnowledgeMemoryKind | undefined;
1663
+ scope?: string | undefined;
1664
+ text: string;
1665
+ sourceRefs?: KnowledgeSourceRef[] | undefined;
1666
+ confidence?: number | undefined;
1667
+ metadata?: Record<string, unknown> | undefined;
1668
+ createdBySessionId?: string | undefined;
1669
+ pinned?: boolean | undefined;
1670
+ replacesId?: string | undefined;
1671
+ };
1672
+ type UpdateKnowledgeMemoryRequest = {
1673
+ status?: KnowledgeMemoryStatus | undefined;
1674
+ kind?: KnowledgeMemoryKind | undefined;
1675
+ scope?: string | undefined;
1676
+ text?: string | undefined;
1677
+ sourceRefs?: KnowledgeSourceRef[] | undefined;
1678
+ confidence?: number | undefined;
1679
+ metadata?: Record<string, unknown> | undefined;
1680
+ reviewedBy?: string | undefined;
1681
+ pinned?: boolean | undefined;
1682
+ };
1683
+ type KnowledgeMemorySearchRequest = {
1684
+ query?: string | undefined;
1685
+ status?: KnowledgeMemoryStatus | undefined;
1686
+ kind?: KnowledgeMemoryKind | undefined;
1687
+ scope?: string | undefined;
1688
+ limit?: number | undefined;
1689
+ };
1690
+ type WorkspaceMemorySearchMode = "hybrid" | "vector" | "keyword";
1691
+ type WorkspaceMemorySearchRequest = {
1692
+ query: string;
1693
+ kind?: KnowledgeMemoryKind | undefined;
1694
+ limit?: number | undefined;
1695
+ mode?: WorkspaceMemorySearchMode | undefined;
1696
+ };
1697
+ type WorkspaceMemorySearchResult = {
1698
+ memory: KnowledgeMemory;
1699
+ score: number;
1700
+ matchType: WorkspaceMemorySearchMode;
1701
+ vectorScore: number | null;
1702
+ keywordScore: number | null;
1703
+ };
1704
+ type WorkspaceMemorySearchResponse = {
1705
+ results: WorkspaceMemorySearchResult[];
1706
+ };
1150
1707
  type CapabilityPackConnectorAuthModel = "oauth2_authorization_code_pkce" | "oauth2_authorization_code" | "api_key" | "credential_ref";
1151
1708
  type CapabilityPackConnector = {
1152
1709
  id: string;
@@ -1183,7 +1740,7 @@ type CapabilityPackSkill = {
1183
1740
  description?: string | undefined;
1184
1741
  files: CapabilityPackSkillFile[];
1185
1742
  };
1186
- type CapabilityPackEnvironmentSpec = {
1743
+ type CapabilityPackVariableSetSpec = {
1187
1744
  description: string;
1188
1745
  requiredVariables: string[];
1189
1746
  required: boolean;
@@ -1201,7 +1758,7 @@ type CapabilityPack = {
1201
1758
  connectors: CapabilityPackConnector[];
1202
1759
  knowledge: CapabilityPackKnowledge[];
1203
1760
  scheduledTaskTemplates: CapabilityPackScheduledTaskTemplate[];
1204
- environment?: CapabilityPackEnvironmentSpec | undefined;
1761
+ variableSet?: CapabilityPackVariableSetSpec | undefined;
1205
1762
  metadata: Record<string, unknown>;
1206
1763
  };
1207
1764
  /** Input shape for registering a pack manifest (server applies defaults). */
@@ -1245,7 +1802,7 @@ type RegisterCapabilityPackRequest = {
1245
1802
  defaultOverlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
1246
1803
  prompt?: string | undefined;
1247
1804
  }[] | undefined;
1248
- environment?: {
1805
+ variableSet?: {
1249
1806
  description: string;
1250
1807
  requiredVariables?: string[] | undefined;
1251
1808
  required?: boolean | undefined;
@@ -1271,6 +1828,8 @@ type PackInstallation = {
1271
1828
  updatedAt: string;
1272
1829
  };
1273
1830
  type EnablePackRequest = {
1831
+ variableSetId?: string | undefined;
1832
+ /** @deprecated use variableSetId */
1274
1833
  environmentId?: string | undefined;
1275
1834
  metadata?: Record<string, unknown> | undefined;
1276
1835
  };
@@ -1283,8 +1842,10 @@ type GetPackResponse = {
1283
1842
  installation: PackInstallation | null;
1284
1843
  };
1285
1844
  type CapabilityKind = "pack" | "mcp" | "api" | "skill" | "plugin";
1286
- type CapabilitySource = "built_in" | "configured" | "public_registry" | "manual";
1845
+ type CapabilitySource = "built_in" | "configured" | "public_registry" | "registry" | "manual";
1287
1846
  type CapabilityInstallationStatus = "active" | "disabled";
1847
+ type CapabilityCatalogAuthKind = "oauth2" | "api_key" | "none" | "unknown";
1848
+ type CapabilityCatalogTier = "verified" | "community";
1288
1849
  type CapabilityRuntime = {
1289
1850
  available: boolean;
1290
1851
  mcpServerId?: string | undefined;
@@ -1305,10 +1866,28 @@ type CapabilityCatalogItem = {
1305
1866
  endpointUrl: string | null;
1306
1867
  installUrl: string | null;
1307
1868
  authModel: string | null;
1869
+ providerDomain: string | null;
1870
+ surfaceType: string | null;
1871
+ transport: string | null;
1872
+ mcpUrl: string | null;
1873
+ authKind: CapabilityCatalogAuthKind | null;
1874
+ credentialFacts: Record<string, unknown>[];
1875
+ tier: CapabilityCatalogTier | null;
1876
+ provenance: string | null;
1877
+ logoAssetPath: string | null;
1878
+ importBatchId: string | null;
1879
+ stale: boolean;
1880
+ staleAt: string | null;
1308
1881
  tools: ToolRef[];
1309
1882
  runtime: CapabilityRuntime;
1310
1883
  enabled: boolean;
1311
1884
  enabledReason: string | null;
1885
+ /** The connection backing this enabled installation, or null when none is involved. */
1886
+ connectionRef: {
1887
+ connectionId: string;
1888
+ providerDomain: string;
1889
+ kind: string;
1890
+ } | null;
1312
1891
  metadata: Record<string, unknown>;
1313
1892
  createdAt?: string | undefined;
1314
1893
  updatedAt?: string | undefined;
@@ -1346,6 +1925,7 @@ type CreateCapabilityCatalogItemRequest = {
1346
1925
  type EnableCapabilityRequest = {
1347
1926
  config?: Record<string, unknown> | undefined;
1348
1927
  metadata?: Record<string, unknown> | undefined;
1928
+ connectionRef?: McpServerConnectionRef | undefined;
1349
1929
  /**
1350
1930
  * Credential headers for remote MCP capabilities. Write-only: encrypted at
1351
1931
  * rest, injected only into the runtime MCP client, never returned by the
@@ -1353,10 +1933,12 @@ type EnableCapabilityRequest = {
1353
1933
  */
1354
1934
  headers?: Record<string, string> | undefined;
1355
1935
  /**
1356
- * Initial environment attachment for kind=pack capabilities — mirrors the
1936
+ * Initial variableSet attachment for kind=pack capabilities — mirrors the
1357
1937
  * dedicated POST /packs/:id/enable body. Required to enable an
1358
- * environment.required pack through this unified path; ignored otherwise.
1938
+ * variableSet.required pack through this unified path; ignored otherwise.
1359
1939
  */
1940
+ variableSetId?: string | undefined;
1941
+ /** @deprecated use variableSetId */
1360
1942
  environmentId?: string | undefined;
1361
1943
  };
1362
1944
  type DiscoverMcpCapabilitiesResponse = {
@@ -1466,13 +2048,6 @@ type UserMessageEventInput = {
1466
2048
  mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[] | undefined;
1467
2049
  };
1468
2050
  };
1469
- type UserInterruptEventInput = {
1470
- type: "user.interrupt";
1471
- clientEventId?: string | undefined;
1472
- payload?: {
1473
- reason?: string | undefined;
1474
- } | undefined;
1475
- };
1476
2051
  type UserApprovalDecisionEventInput = {
1477
2052
  type: "user.approvalDecision";
1478
2053
  clientEventId?: string | undefined;
@@ -1483,7 +2058,7 @@ type UserApprovalDecisionEventInput = {
1483
2058
  };
1484
2059
  };
1485
2060
  /** Control/user events a client may POST to a session's event log. */
1486
- type ClientSessionEventInput = UserMessageEventInput | UserInterruptEventInput | UserApprovalDecisionEventInput;
2061
+ type ClientSessionEventInput = UserMessageEventInput | UserApprovalDecisionEventInput;
1487
2062
  /** A point-in-time machine metrics sample. `gpuUtilPct`/`gpuMemBytes` are null
1488
2063
  * when no GPU was present (not-reported, never a real zero); the bytes/load are
1489
2064
  * numbers; `sampledAt` is an ISO-8601 instant. */
@@ -1518,6 +2093,10 @@ type MachineView = {
1518
2093
  os: string;
1519
2094
  arch: string;
1520
2095
  hasDisplay: boolean;
2096
+ /** Non-null only when a display exists but capture is blocked (macOS Screen
2097
+ * Recording / TCC not granted) — the UI can surface "display: capture not
2098
+ * granted". null == capture permitted OR headless. */
2099
+ desktopUnavailableReason?: string | null | undefined;
1521
2100
  allowScreenControl: boolean;
1522
2101
  sharedSessionCount: number;
1523
2102
  lastSeenAt: string | null;
@@ -1549,6 +2128,7 @@ type SwapActiveSandboxResponse = {
1549
2128
  activeSandboxId: string | null;
1550
2129
  activeEpoch: number;
1551
2130
  reason?: string;
2131
+ code?: "stale_pointer" | "offline_enrollment" | "unsupported_backend_context" | "transient_establishment" | "concurrent_swap";
1552
2132
  };
1553
2133
  /** Mirror of `@opengeni/contracts` EnrollmentOs. */
1554
2134
  type EnrollmentOs = "linux" | "macos" | "windows";
@@ -1696,18 +2276,15 @@ type SendMessageInput = {
1696
2276
  model?: string;
1697
2277
  reasoningEffort?: ReasoningEffort;
1698
2278
  clientEventId?: string;
2279
+ expectedControlGeneration?: number;
2280
+ expectedWorkspaceInferenceGeneration?: number;
2281
+ mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[];
1699
2282
  };
1700
2283
  type SteerMessageResult = {
1701
2284
  /** The accepted `user.message` event. */
1702
2285
  accepted: SessionEvent;
1703
- /**
1704
- * The turn created for the message, when it could be located — usually
1705
- * still queued, but already claimed (running/requires_action or even
1706
- * finished) when the worker picked it up mid-call.
1707
- */
1708
- turn: SessionTurn | null;
1709
- /** True when the running turn was interrupted to make way for the message. */
1710
- interrupted: boolean;
2286
+ /** The exact turn created for this message in the same server transaction. */
2287
+ turn: SessionTurn;
1711
2288
  };
1712
2289
  /**
1713
2290
  * Typed client for the OpenGeni public API. Framework-agnostic: only needs
@@ -1724,7 +2301,19 @@ declare class OpenGeniClient {
1724
2301
  updateSession(workspaceId: string, sessionId: string, request: UpdateSessionRequest): Promise<Session>;
1725
2302
  listSessions(workspaceId: string, options?: {
1726
2303
  limit?: number;
2304
+ parentSessionId?: string | null;
2305
+ search?: string;
1727
2306
  }): Promise<Session[]>;
2307
+ /** Pin-aware ordinary-session page with a stable keyset cursor. */
2308
+ listSessionPage(workspaceId: string, options?: {
2309
+ limit?: number;
2310
+ parentSessionId?: string | null;
2311
+ cursor?: string;
2312
+ search?: string;
2313
+ }): Promise<SessionListResponse>;
2314
+ /** Set this authenticated member's personal workspace pin for a session. */
2315
+ updateSessionPin(workspaceId: string, sessionId: string, request: UpdateSessionPinRequest): Promise<Session>;
2316
+ getSessionLineage(workspaceId: string, sessionId: string): Promise<SessionLineageResponse>;
1728
2317
  listTurns(workspaceId: string, sessionId: string, options?: {
1729
2318
  limit?: number;
1730
2319
  }): Promise<SessionTurn[]>;
@@ -1804,7 +2393,7 @@ declare class OpenGeniClient {
1804
2393
  /** POST a user/control event to the session. Returns the accepted event. */
1805
2394
  sendEvent(workspaceId: string, sessionId: string, event: ClientSessionEventInput): Promise<SessionEvent>;
1806
2395
  sendMessage(workspaceId: string, sessionId: string, message: string | SendMessageInput): Promise<SessionEvent>;
1807
- interrupt(workspaceId: string, sessionId: string, options?: {
2396
+ pauseSession(workspaceId: string, sessionId: string, options?: {
1808
2397
  reason?: string;
1809
2398
  clientEventId?: string;
1810
2399
  }): Promise<SessionEvent>;
@@ -1827,35 +2416,43 @@ declare class OpenGeniClient {
1827
2416
  after?: number;
1828
2417
  signal?: AbortSignal;
1829
2418
  }): Promise<ReadableStream<Uint8Array>>;
1830
- /** Edit a still-queued turn (prompt, model, resources, tools, ...). */
1831
- updateQueuedTurn(workspaceId: string, sessionId: string, turnId: string, update: UpdateSessionTurnRequest): Promise<SessionTurn>;
1832
- /**
1833
- * Reorder the queued turns. `turnIds` must all reference queued turns; the
1834
- * server assigns positions in the given order and returns the queue.
1835
- */
1836
- reorderQueuedTurns(workspaceId: string, sessionId: string, turnIds: string[]): Promise<SessionTurn[]>;
2419
+ getQueue(workspaceId: string, sessionId: string): Promise<SessionQueueSnapshot>;
2420
+ cancelQueueItem(workspaceId: string, sessionId: string, turnId: string, request: {
2421
+ expectedQueueVersion: number;
2422
+ expectedItemVersion: number;
2423
+ reason?: string;
2424
+ }): Promise<SessionQueueMutationResponse>;
2425
+ controlSession(workspaceId: string, sessionId: string, request: {
2426
+ mode: "pause" | "resume";
2427
+ reason?: string;
2428
+ clientEventId?: string;
2429
+ expectedControlState?: "active" | "paused";
2430
+ expectedControlGeneration?: number;
2431
+ expectedWorkspaceInferenceGeneration?: number;
2432
+ }): Promise<SessionControlResponse>;
2433
+ resumeSession(workspaceId: string, sessionId: string, options?: {
2434
+ reason?: string;
2435
+ clientEventId?: string;
2436
+ }): Promise<SessionControlResponse>;
2437
+ setWorkspaceInferenceState(workspaceId: string, request: {
2438
+ state: "active" | "paused";
2439
+ reason: string;
2440
+ clientEventId: string;
2441
+ expectedState: "active" | "paused";
2442
+ expectedGeneration: number;
2443
+ exceptSessionIds?: string[];
2444
+ }): Promise<WorkspaceInferenceControlResponse>;
1837
2445
  /** Cancel a queued turn before it is claimed. Returns the cancelled turn. */
1838
2446
  deleteQueuedTurn(workspaceId: string, sessionId: string, turnId: string): Promise<SessionTurn>;
1839
2447
  /**
1840
- * Steer: deliver a message *now* instead of behind the queue. Sends the
1841
- * message, promotes its queued turn to the front, and interrupts the
1842
- * running turn so the session picks the steer turn up next. On a session
1843
- * that is not running this degrades gracefully to a plain queued message.
1844
- *
1845
- * The steer turn is located by `triggerEventId` across ALL turns (retried
1846
- * briefly in case the server is still materializing it) — not just the
1847
- * queued ones, because the worker can claim the steer turn before it is
1848
- * ever observed queued, and a claimed steer turn means the message is
1849
- * already being delivered: interrupting then would cancel the very message
1850
- * being steered. If the turn cannot be found while other turns are queued,
1851
- * the interrupt is also skipped — stopping the running turn would otherwise
1852
- * promote someone else's queued work over this message — and the call
1853
- * degrades to a plain queued send (`interrupted: false`).
2448
+ * Steer: atomically put this prompt at the head and supersede the current
2449
+ * inference. The client performs one request and renders server order.
1854
2450
  */
1855
2451
  steerMessage(workspaceId: string, sessionId: string, message: string | SendMessageInput): Promise<SteerMessageResult>;
1856
2452
  /** The session's goal. 404s when the session never had one. */
1857
2453
  getGoal(workspaceId: string, sessionId: string): Promise<SessionGoal>;
1858
2454
  updateGoal(workspaceId: string, sessionId: string, request: UpdateSessionGoalRequest): Promise<SessionGoal>;
2455
+ deleteGoal(workspaceId: string, sessionId: string): Promise<void>;
1859
2456
  /** Pause the goal loop: the session stops self-continuing until resumed. */
1860
2457
  pauseGoal(workspaceId: string, sessionId: string, options?: {
1861
2458
  rationale?: string;
@@ -1870,12 +2467,7 @@ declare class OpenGeniClient {
1870
2467
  * context — the destructive intent is explicit on the wire.
1871
2468
  */
1872
2469
  clearSessionContext(workspaceId: string, sessionId: string): Promise<void>;
1873
- /**
1874
- * Trigger conversation compaction now. On the client-managed (Azure) path this
1875
- * queues a forced compaction the worker honors before the next turn
1876
- * (`status:"queued"`); on a server-managed provider or when compaction is off
1877
- * it is a no-op (`status:"noop"`) with an explanatory message.
1878
- */
2470
+ /** Request one durable portable compaction at the next safe model boundary. */
1879
2471
  compactSessionContext(workspaceId: string, sessionId: string): Promise<CompactSessionContextResult>;
1880
2472
  /** FileSystem: list a directory tree (feeds the Pierre file tree). */
1881
2473
  fsList(workspaceId: string, sessionId: string, request?: FsListRequest): Promise<FsListResponse>;
@@ -1897,6 +2489,15 @@ declare class OpenGeniClient {
1897
2489
  gitLog(workspaceId: string, sessionId: string, request?: GitLogRequest): Promise<GitLogResponse>;
1898
2490
  /** Git: show a commit (diff vs first parent) or fetch a raw blob at a ref. */
1899
2491
  gitShow(workspaceId: string, sessionId: string, request: GitShowRequest): Promise<GitShowResponse>;
2492
+ /** Workspace capture: the latest turn-end snapshot of the session's workspace
2493
+ * (tree + per-repo diff + file after-image refs), served from durable storage
2494
+ * WITHOUT warming a machine — the workbench cold-paint source. Returns
2495
+ * `{available:false}` when no capture exists yet (fall back to the live path). */
2496
+ getWorkspaceCapture(workspaceId: string, sessionId: string): Promise<GetWorkspaceCaptureResponse>;
2497
+ /** Workspace capture: a single file's after-image from the capture (revision
2498
+ * pins a specific one; omitted → latest). Content is inline for small files,
2499
+ * else a short-TTL signed URL; a tooLarge file returns metadata only. */
2500
+ getWorkspaceCaptureFile(workspaceId: string, sessionId: string, path: string, revision?: number): Promise<GetWorkspaceCaptureFileResponse>;
1900
2501
  /** Terminal: run a bounded command, returning buffered stdout/stderr inline. */
1901
2502
  terminalExec(workspaceId: string, sessionId: string, request: TerminalExecRequest): Promise<TerminalExecResponse>;
1902
2503
  /** Terminal: open an interactive PTY. Output streams on the event SSE as
@@ -1982,13 +2583,60 @@ declare class OpenGeniClient {
1982
2583
  listScheduledTaskRuns(workspaceId: string, taskId: string, options?: {
1983
2584
  limit?: number;
1984
2585
  }): Promise<ScheduledTaskRun[]>;
1985
- listEnvironments(workspaceId: string): Promise<WorkspaceEnvironment[]>;
1986
- createEnvironment(workspaceId: string, request: CreateWorkspaceEnvironmentRequest): Promise<WorkspaceEnvironment>;
1987
- getEnvironment(workspaceId: string, environmentId: string): Promise<WorkspaceEnvironment>;
1988
- updateEnvironment(workspaceId: string, environmentId: string, request: UpdateWorkspaceEnvironmentRequest): Promise<WorkspaceEnvironment>;
1989
- deleteEnvironment(workspaceId: string, environmentId: string): Promise<void>;
2586
+ listVariableSets(workspaceId: string): Promise<VariableSet[]>;
2587
+ createVariableSet(workspaceId: string, request: CreateVariableSetRequest): Promise<VariableSet>;
2588
+ getVariableSet(workspaceId: string, variableSetId: string): Promise<VariableSet>;
2589
+ updateVariableSet(workspaceId: string, variableSetId: string, request: UpdateVariableSetRequest): Promise<VariableSet>;
2590
+ deleteVariableSet(workspaceId: string, variableSetId: string): Promise<void>;
1990
2591
  /** Create or rotate a variable. The value never comes back on any read. */
1991
- setEnvironmentVariable(workspaceId: string, environmentId: string, name: string, value: string): Promise<WorkspaceEnvironmentVariableMetadata>;
2592
+ setVariableSetVariable(workspaceId: string, variableSetId: string, name: string, value: string): Promise<VariableSetVariableMetadata>;
2593
+ deleteVariableSetVariable(workspaceId: string, variableSetId: string, name: string): Promise<void>;
2594
+ listRigs(workspaceId: string): Promise<Rig[]>;
2595
+ createRig(workspaceId: string, request: CreateRigRequest): Promise<Rig>;
2596
+ getRig(workspaceId: string, rigId: string): Promise<Rig>;
2597
+ updateRig(workspaceId: string, rigId: string, request: UpdateRigRequest): Promise<Rig>;
2598
+ deleteRig(workspaceId: string, rigId: string): Promise<void>;
2599
+ listRigVersions(workspaceId: string, rigId: string): Promise<RigVersion[]>;
2600
+ /** Roll the active version to an existing one (rollback / promote-activate). */
2601
+ activateRigVersion(workspaceId: string, rigId: string, versionId: string): Promise<RigVersion>;
2602
+ listRigChanges(workspaceId: string, rigId: string): Promise<RigChange[]>;
2603
+ /** Propose a change against the rig's active version (rigs:use). */
2604
+ proposeRigChange(workspaceId: string, rigId: string, request: ProposeRigChangeRequest): Promise<RigChange>;
2605
+ getRigChange(workspaceId: string, rigId: string, changeId: string): Promise<RigChange>;
2606
+ /**
2607
+ * Re-run verification for a change (rigs:use). Verification is asynchronous:
2608
+ * this returns the change immediately with status `verifying`; poll
2609
+ * `getRigChange`/`listRigChanges` for the terminal outcome + logs.
2610
+ */
2611
+ verifyRigChange(workspaceId: string, rigId: string, changeId: string): Promise<RigChange>;
2612
+ /**
2613
+ * Promote a verified `definition_edit` change into a new active rig version
2614
+ * (rigs:manage). Only valid once the change's verification passed; returns the
2615
+ * newly minted version.
2616
+ */
2617
+ promoteRigChange(workspaceId: string, rigId: string, changeId: string): Promise<RigVersion>;
2618
+ /**
2619
+ * Re-run the active version's checks in a clean throwaway sandbox (rigs:use).
2620
+ * Asynchronous — returns the version id being verified; the outcome lands on
2621
+ * the version's audit trail.
2622
+ */
2623
+ verifyRig(workspaceId: string, rigId: string): Promise<{
2624
+ ok: boolean;
2625
+ versionId: string;
2626
+ }>;
2627
+ /** @deprecated use listVariableSets */
2628
+ listEnvironments(workspaceId: string): Promise<VariableSet[]>;
2629
+ /** @deprecated use createVariableSet */
2630
+ createEnvironment(workspaceId: string, request: CreateVariableSetRequest): Promise<VariableSet>;
2631
+ /** @deprecated use getVariableSet */
2632
+ getEnvironment(workspaceId: string, environmentId: string): Promise<VariableSet>;
2633
+ /** @deprecated use updateVariableSet */
2634
+ updateEnvironment(workspaceId: string, environmentId: string, request: UpdateVariableSetRequest): Promise<VariableSet>;
2635
+ /** @deprecated use deleteVariableSet */
2636
+ deleteEnvironment(workspaceId: string, environmentId: string): Promise<void>;
2637
+ /** @deprecated use setVariableSetVariable */
2638
+ setEnvironmentVariable(workspaceId: string, environmentId: string, name: string, value: string): Promise<VariableSetVariableMetadata>;
2639
+ /** @deprecated use deleteVariableSetVariable */
1992
2640
  deleteEnvironmentVariable(workspaceId: string, environmentId: string, name: string): Promise<void>;
1993
2641
  /** Step 1 of the upload flow: returns the pre-signed PUT target. */
1994
2642
  beginFileUpload(workspaceId: string, request: CreateFileUploadRequest): Promise<CreateFileUploadResponse>;
@@ -2007,9 +2655,7 @@ declare class OpenGeniClient {
2007
2655
  listDocumentBases(workspaceId: string): Promise<DocumentBase[]>;
2008
2656
  getDocumentBase(workspaceId: string, baseId: string): Promise<DocumentBase>;
2009
2657
  /** Index an uploaded file into the base. The file must be `ready`. */
2010
- addDocument(workspaceId: string, baseId: string, request: {
2011
- fileId: string;
2012
- }): Promise<Document>;
2658
+ addDocument(workspaceId: string, baseId: string, request: AddDocumentRequest): Promise<Document>;
2013
2659
  listDocuments(workspaceId: string, baseId: string): Promise<Document[]>;
2014
2660
  /** Retry indexing for a failed document. */
2015
2661
  reindexDocument(workspaceId: string, baseId: string, documentId: string): Promise<Document>;
@@ -2018,10 +2664,17 @@ declare class OpenGeniClient {
2018
2664
  * chunks while leaving the uploaded file asset available for other uses.
2019
2665
  */
2020
2666
  deleteDocument(workspaceId: string, baseId: string, documentId: string): Promise<void>;
2021
- searchDocuments(workspaceId: string, baseId: string, request: {
2022
- query: string;
2023
- limit?: number;
2024
- }): Promise<DocumentSearchResponse>;
2667
+ searchDocuments(workspaceId: string, baseId: string, request: Omit<DocumentSearchRequest, "baseIds">): Promise<DocumentSearchResponse>;
2668
+ searchKnowledge(workspaceId: string, request: DocumentSearchRequest): Promise<DocumentSearchResponse>;
2669
+ listKnowledgeMemories(workspaceId: string, request?: KnowledgeMemorySearchRequest): Promise<KnowledgeMemory[]>;
2670
+ getKnowledgeMemory(workspaceId: string, memoryId: string): Promise<KnowledgeMemory>;
2671
+ createKnowledgeMemory(workspaceId: string, request: CreateKnowledgeMemoryRequest): Promise<KnowledgeMemory>;
2672
+ updateKnowledgeMemory(workspaceId: string, memoryId: string, request: UpdateKnowledgeMemoryRequest): Promise<KnowledgeMemory>;
2673
+ /** Hybrid (semantic + keyword) search over the workspace's agent-visible memory. */
2674
+ searchWorkspaceMemories(workspaceId: string, request: WorkspaceMemorySearchRequest): Promise<WorkspaceMemorySearchResponse>;
2675
+ /** Deep-merge a settings patch into the workspace (preserves unknown keys). */
2676
+ updateWorkspaceSettings(workspaceId: string, request: UpdateWorkspaceSettingsRequest): Promise<Workspace>;
2677
+ setWorkspaceDefaultRig(workspaceId: string, request: SetWorkspaceDefaultRigRequest): Promise<Workspace>;
2025
2678
  /** Built-in + registered packs, with the workspace's installations. */
2026
2679
  listPacks(workspaceId: string): Promise<ListPacksResponse>;
2027
2680
  /** Register (or replace) a workspace-scoped pack from a manifest. */
@@ -2041,6 +2694,14 @@ declare class OpenGeniClient {
2041
2694
  query?: string;
2042
2695
  limit?: number;
2043
2696
  }): Promise<DiscoverMcpCapabilitiesResponse>;
2697
+ listConnections(workspaceId: string): Promise<ConnectionMetadata[]>;
2698
+ createConnection(workspaceId: string, request: CreateConnectionRequest): Promise<ConnectionMetadata>;
2699
+ updateConnection(workspaceId: string, connectionId: string, request: UpdateConnectionRequest): Promise<ConnectionMetadata>;
2700
+ deleteConnection(workspaceId: string, connectionId: string): Promise<ConnectionMetadata>;
2701
+ /** Start an OAuth connection flow; redirect the user to the returned `authorizationUrl`. */
2702
+ startConnectionOAuth(workspaceId: string, request: OAuthStartRequest): Promise<OAuthStartResponse>;
2703
+ /** Public, immutably-cached URL for a catalog item's logo, or null when the item has none. */
2704
+ catalogAssetUrl(logoAssetPath: string | null): string | null;
2044
2705
  /** GitHub App configuration status + a signed install URL when configured. */
2045
2706
  getGitHubApp(workspaceId: string): Promise<GitHubAppInfo>;
2046
2707
  /**
@@ -2334,4 +2995,4 @@ declare function ttydInputFrame(data: string): string;
2334
2995
  /** Build a client→server RESIZE frame: "1" + JSON.stringify({ columns, rows }). */
2335
2996
  declare function ttydResizeFrame(columns: number, rows: number): string;
2336
2997
 
2337
- export { type AccessContext, type AccessGrant, type AccountGrant, type AccountRole, type AcknowledgeStreamRequest, type AcknowledgeStreamResponse, 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 CapabilityPackEnvironmentSpec, type CapabilityPackKnowledge, type CapabilityPackScheduledTaskTemplate, type CapabilityPackSkill, type CapabilityPackSkillFile, type CapabilityRuntime, type CapabilitySource, type CapabilityUnavailableReason, type ClientAuthConfig, type ClientConfig, type ClientModel, type ClientSessionEventInput, type CodexAccount, type CodexAccountSwitchedPayload, type CodexAccountsResponse, type CodexConnectPoll, type CodexConnectStart, type CodexConnectionStatus, type CodexRotationSettings, type CodexUsage, type CodexUsageMap, type CodexUsagePayload, type CodexUsageWindow, type CompactSessionContextResult, type CompleteFileUploadResponse, type ComputerUseCapability, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateCapabilityCatalogItemRequest, type CreateCheckoutRequest, type CreateCheckoutResponse, type CreateDocumentBaseRequest, type CreateFileUploadRequest, type CreateFileUploadResponse, type CreateGitHubAppManifestRequest, type CreateGitHubAppManifestResponse, type CreateScheduledTaskRequest, type CreateSessionRequest, type CreateWorkspaceEnvironmentRequest, type CreateWorkspaceRequest, 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 DocumentSearchRequest, type DocumentSearchResponse, type DocumentSearchResult, type DocumentStatus, 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 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 GitCapability, type GitChangedPayload, type GitCommit, type GitDiffHunk, type GitDiffLine, type GitDiffLineType, type GitDiffRequest, type GitDiffResponse, type GitFileDiff, type GitFileStatus, type GitFileStatusCode, type GitHubAppInfo, type GitHubRepositoriesResponse, type GitHubRepository, type GitLogRequest, type GitLogResponse, type GitShowRequest, type GitShowResponse, type GitStatusRequest, type GitStatusResponse, type GoalSpec, KNOWN_PERMISSIONS, KNOWN_USAGE_EVENT_TYPES, type KnownPermission, type KnownSessionEventType, type KnownUsageEventType, type ListApiKeysResponse, type ListPacksResponse, type ListWorkspaceMembersResponse, type MachineKind, type MachineMetricsSeriesResponse, type MachineState, type MachineView, type MachinesResponse, type MetricSample, type MintEnrollTokenRequest, type MintEnrollTokenResponse, OpenGeniApiError, OpenGeniClient, type OpenGeniClientOptions, OpenGeniStreamError, type PackInstallation, type PackInstallationStatus, type Permission, type ProductAccessMode, type ProxySessionEventStreamOptions, type PtyCloseRequest, type PtyOpenRequest, type PtyOpenResponse, type PtyResizeRequest, type PtyWriteRequest, type ReasoningEffort, type RecordingAvailablePayload, type RecordingCapability, type RecordingCodec, type RecordingContentType, type RecordingFailedPayload, type RecordingFailedReason, type RecordingMode, type RecordingStartedPayload, type RegisterCapabilityPackRequest, type RepositoryResourceRef, type ResourceRef, SESSION_EVENT_TYPES, type SandboxBackend, type SandboxCapabilityName, type SandboxCommandOutputDeltaPayload, type SandboxOs, 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 Session, type SessionCapabilities, type SessionEvent, type SessionEventStreamTransport, type SessionEventType, type SessionGoal, type SessionGoalCreatedBy, type SessionGoalStatus, type SessionMcpCredentialUpdateInput, type SessionMcpServerInput, type SessionMcpServerMetadata, type SessionStatus, type SessionStatusChangedPayload, type SessionStructuredCapabilities, type SessionTurn, type SessionTurnSource, type SessionTurnStatus, type SseMessage, type SseReStreamOptions, type SteerMessageResult, type StreamClosedPayload, type StreamConnectionState, type StreamOpenedPayload, type StreamRevokedPayload, type StreamSessionEventsOptions, type StreamUrlRotatedPayload, type SwapActiveSandboxRequest, type SwapActiveSandboxResponse, TTYD_SUBPROTOCOL, type TerminalCapability, type TerminalExecRequest, type TerminalExecResponse, type TerminalPtyExitedPayload, type TerminalPtyOutputDeltaPayload, type TerminalPtyStartedPayload, type ToolRef, TtydClientCommand, TtydServerCommand, type UpdateScheduledTaskRequest, type UpdateSessionGoalRequest, type UpdateSessionRequest, type UpdateSessionTurnRequest, type UpdateWorkspaceEnvironmentRequest, type UpdateWorkspaceMemberRequest, type UpdateWorkspaceRequest, type UploadFileInput, type UsageEvent, type UsageEventType, type UserApprovalDecisionEventInput, type UserInterruptEventInput, type UserMessageEventInput, type ViewerHeartbeatRequest, type ViewerHeartbeatResponse, type ViewerHolder, type Workspace, type WorkspaceEnvironment, type WorkspaceEnvironmentVariableMetadata, type WorkspaceMember, type WorkspaceRegisteredPack, applyUrlRotation, desktopSocketUrl, formatSseEvent, isRetryableStreamError, nextDesktopState, parseSseStream, proxySessionEventStream, resumeSequenceFromRequest, sessionEventsToSseResponse, sessionEventsToSseStream, streamSessionEvents, terminalSocketUrl, ttydAuthFrame, ttydInputFrame, ttydResizeFrame };
2998
+ export { type AccessContext, type AccessGrant, type AccountGrant, type AccountRole, type AcknowledgeStreamRequest, type AcknowledgeStreamResponse, 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 CodexAccountSwitchedPayload, type CodexAccountsResponse, type CodexConnectPoll, type CodexConnectStart, type CodexConnectionStatus, type CodexRotationSettings, type CodexUsage, type CodexUsageMap, type CodexUsagePayload, type CodexUsageWindow, type CompactSessionContextResult, type CompleteFileUploadResponse, 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 CreateKnowledgeMemoryRequest, type CreateRigRequest, type CreateScheduledTaskRequest, type CreateSessionRequest, type CreateVariableSetRequest, type CreateWorkspaceEnvironmentRequest, type CreateWorkspaceRequest, 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 DocumentSearchMode, type DocumentSearchRequest, type DocumentSearchResponse, type DocumentSearchResult, type DocumentStatus, 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 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 GitCredentialProvider, type GitDiffHunk, type GitDiffLine, type GitDiffLineType, type GitDiffRequest, type GitDiffResponse, type GitFileDiff, type GitFileStatus, type GitFileStatusCode, type GitHubAppInfo, type GitHubRepositoriesResponse, type GitHubRepository, type GitLogRequest, type GitLogResponse, type GitShowRequest, type GitShowResponse, type GitStatusRequest, type GitStatusResponse, type GoalSpec, 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 OAuthStartRequest, type OAuthStartResponse, OpenGeniApiError, OpenGeniClient, type OpenGeniClientOptions, OpenGeniStreamError, type PackInstallation, type PackInstallationStatus, type Permission, type ProductAccessMode, type ProposeRigChangeRequest, type ProxySessionEventStreamOptions, type PtyCloseRequest, type PtyOpenRequest, type PtyOpenResponse, type PtyResizeRequest, type PtyWriteRequest, 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 Rig, type RigChange, type RigChangeKind, type RigChangeStatus, type RigChangeVerification, type RigCheck, type RigCheckResult, type RigDefinitionEditPayload, type RigSetupAppendPayload, type RigVersion, SESSION_EVENT_TYPES, type SandboxBackend, type SandboxCapabilityName, type SandboxCommandOutputDeltaPayload, type SandboxOs, 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 Session, type SessionCapabilities, type SessionControlResponse, type SessionEvent, type SessionEventStreamTransport, type SessionEventType, type SessionGoal, type SessionGoalCreatedBy, type SessionGoalStatus, type SessionLineageResponse, type SessionListResponse, type SessionMcpCredentialUpdateInput, type SessionMcpServerInput, type SessionMcpServerMetadata, type SessionQueueMutationResponse, type SessionQueueSnapshot, type SessionStatus, type SessionStatusChangedPayload, type SessionStructuredCapabilities, type SessionSummary, type SessionSystemUpdate, type SessionSystemUpdateKind, type SessionSystemUpdateState, type SessionTurn, type SessionTurnSource, type SessionTurnStatus, type SetWorkspaceEnvironmentVariableRequest, type SseMessage, type SseReStreamOptions, type SteerMessageResult, type StreamClosedPayload, type StreamConnectionState, type StreamOpenedPayload, type StreamRevokedPayload, type StreamSessionEventsOptions, type StreamUrlRotatedPayload, type SwapActiveSandboxRequest, type SwapActiveSandboxResponse, TTYD_SUBPROTOCOL, type TerminalCapability, type TerminalExecRequest, type TerminalExecResponse, type TerminalPtyExitedPayload, type TerminalPtyOutputDeltaPayload, type TerminalPtyStartedPayload, type ToolAuthNeededPayload, type ToolRef, TtydClientCommand, TtydServerCommand, type UpdateConnectionRequest, type UpdateKnowledgeMemoryRequest, type UpdateRigRequest, type UpdateScheduledTaskRequest, type UpdateSessionGoalRequest, type UpdateSessionPinRequest, type UpdateSessionRequest, type UpdateVariableSetRequest, type UpdateWorkspaceEnvironmentRequest, type UpdateWorkspaceMemberRequest, type UpdateWorkspaceRequest, type UpdateWorkspaceSettingsRequest, type UploadFileInput, type UsageEvent, type UsageEventType, type UserApprovalDecisionEventInput, 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 WorkspaceEnvironment, type WorkspaceEnvironmentVariableMetadata, type WorkspaceInferenceControlResponse, type WorkspaceMember, type WorkspaceMemorySearchMode, type WorkspaceMemorySearchRequest, type WorkspaceMemorySearchResponse, type WorkspaceMemorySearchResult, type WorkspaceRegisteredPack, type WorkspaceRevisionCapturedPayload, type WorkspaceRevisionDegradedPayload, type WorkspaceSettings, applyUrlRotation, desktopSocketUrl, formatSseEvent, isRetryableStreamError, nextDesktopState, parseSseStream, proxySessionEventStream, resumeSequenceFromRequest, sessionEventsToSseResponse, sessionEventsToSseStream, streamSessionEvents, terminalSocketUrl, ttydAuthFrame, ttydInputFrame, ttydResizeFrame };