@opengeni/sdk 0.11.0 → 0.15.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" | "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
  };
@@ -230,6 +236,11 @@ type OAuthStartRequest = {
230
236
  requestedScopes?: string[] | undefined;
231
237
  returnPath?: string | undefined;
232
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;
233
244
  };
234
245
  type OAuthStartResponse = {
235
246
  state: string;
@@ -258,22 +269,71 @@ type Session = {
258
269
  metadata: Record<string, unknown>;
259
270
  model: string;
260
271
  sandboxBackend: SandboxBackend;
272
+ sandboxOs: SandboxOs;
273
+ sandboxGroupId: string;
274
+ activeSandboxId: string | null;
275
+ activeEpoch: number;
276
+ variableSetId: string | null;
277
+ /** @deprecated use variableSetId */
261
278
  environmentId: string | null;
279
+ rigId: string | null;
280
+ rigVersionId: string | null;
262
281
  firstPartyMcpPermissions: string[] | null;
263
282
  mcpServers: SessionMcpServerMetadata[];
283
+ parentSessionId: string | null;
264
284
  createIdempotencyKey: string | null;
265
285
  temporalWorkflowId: string | null;
266
286
  activeTurnId: string | null;
287
+ queueVersion: number;
288
+ queueHeadPosition: number;
289
+ queueTailPosition: number;
290
+ effectiveControl: EffectiveSessionControl;
267
291
  lastSequence: number;
268
292
  /** Multi-account Codex (P1): the account this session is pinned to (null ⇒ follow workspace active). */
269
293
  codexPinnedCredentialId?: string | null;
270
294
  /** Multi-account Codex (P1): the account the most recent turn ran on (the "Running on:" indicator). */
271
295
  codexLastCredentialId?: string | null;
296
+ /** Personal (authenticated subject) workspace pin state, never workspace-global. */
297
+ pinned?: boolean;
298
+ /** Stable pin ordering key; null when this subject has not pinned the session. */
299
+ pinnedAt?: string | null;
300
+ /** Optimistic pin-state revision; zero represents an absent pin relation. */
301
+ pinVersion?: number;
302
+ /** Server-authoritative descendant counts populated by session-list reads. */
303
+ treeStats?: {
304
+ directChildren: number;
305
+ totalDescendants: number;
306
+ runningDescendants: number;
307
+ queuedDescendants: number;
308
+ attentionDescendants: number;
309
+ pausedDescendants: number;
310
+ failedDescendants: number;
311
+ } | undefined;
272
312
  createdAt: string;
273
313
  updatedAt: string;
274
314
  };
275
- type SessionTurnStatus = "queued" | "running" | "requires_action" | "completed" | "failed" | "cancelled";
276
- type SessionTurnSource = "user" | "scheduled_task" | "api" | "goal";
315
+ type SessionSummary = Session;
316
+ /** Canonical session-list page; pinned rows are excluded from ordinary pages. */
317
+ type SessionListResponse = {
318
+ pinned: Session[];
319
+ sessions: Session[];
320
+ nextCursor: string | null;
321
+ };
322
+ type UpdateSessionPinRequest = {
323
+ pinned: boolean;
324
+ expectedVersion?: number;
325
+ };
326
+ type LineageNode = {
327
+ session: SessionSummary;
328
+ children: LineageNode[];
329
+ };
330
+ type SessionLineageResponse = {
331
+ ancestors: SessionSummary[];
332
+ children: LineageNode[];
333
+ truncated: boolean;
334
+ };
335
+ type SessionTurnStatus = "queued" | "running" | "requires_action" | "recovering" | "waiting_capacity" | "completed" | "failed" | "cancelled" | "superseded" | "withdrawn_for_edit";
336
+ type SessionTurnSource = "user" | "scheduled_task" | "api" | "goal" | "system" | "compaction";
277
337
  type SessionTurn = {
278
338
  id: string;
279
339
  workspaceId: string;
@@ -289,13 +349,20 @@ type SessionTurn = {
289
349
  model: string;
290
350
  reasoningEffort: ReasoningEffort;
291
351
  sandboxBackend: SandboxBackend;
352
+ sandboxOs: SandboxOs | null;
292
353
  metadata: Record<string, unknown>;
354
+ version: number;
355
+ executionGeneration: number;
356
+ activeAttemptId: string | null;
357
+ lineage: Record<string, unknown>;
358
+ cancelledBy?: string | null;
359
+ cancelReason?: string | null;
293
360
  startedAt: string | null;
294
361
  finishedAt: string | null;
295
362
  createdAt: string;
296
363
  updatedAt: string;
297
364
  };
298
- 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", "tool.auth_needed", "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"];
365
+ 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.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", "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"];
299
366
  type KnownSessionEventType = (typeof SESSION_EVENT_TYPES)[number];
300
367
  /**
301
368
  * Event types the SDK knows about today, kept open so a newer OpenGeni server
@@ -313,6 +380,11 @@ type SessionEvent = {
313
380
  occurredAt: string;
314
381
  clientEventId?: string | null | undefined;
315
382
  turnId?: string | null | undefined;
383
+ turnGeneration?: number | null | undefined;
384
+ turnAttemptId?: string | null | undefined;
385
+ turnAssociation?: "current" | "late_rejected" | "duplicate" | null | undefined;
386
+ duplicateOfEventId?: string | null | undefined;
387
+ duplicateReason?: string | null | undefined;
316
388
  };
317
389
  type ToolAuthNeededPayload = {
318
390
  serverId: string;
@@ -603,6 +675,102 @@ type GitShowResponse = {
603
675
  } | null;
604
676
  revision: number;
605
677
  };
678
+ type WorkspaceCaptureFile = {
679
+ path: string;
680
+ status: GitFileStatusCode;
681
+ hash: string | null;
682
+ baseHash: string | null;
683
+ contentRef: string | null;
684
+ sizeBytes: number;
685
+ isBinary: boolean;
686
+ tooLarge: boolean;
687
+ deleted: boolean;
688
+ };
689
+ type WorkspaceCaptureRepo = {
690
+ root: string;
691
+ head: string | null;
692
+ detached: boolean;
693
+ upstream: string | null;
694
+ ahead: number;
695
+ behind: number;
696
+ status: GitFileStatus[];
697
+ diff: GitFileDiff[];
698
+ };
699
+ type WorkspaceCaptureDegradedReason = "repository_discovery_command_failed" | "repository_discovery_timed_out" | "repository_discovery_result_limit_exceeded";
700
+ type WorkspaceCaptureStats = {
701
+ repoCount: number;
702
+ fileCount: number;
703
+ additions: number;
704
+ deletions: number;
705
+ totalBytes: number;
706
+ tooLargeCount: number;
707
+ binaryCount: number;
708
+ treeEntryCount: number;
709
+ treeTruncated: boolean;
710
+ durationMs: number;
711
+ fingerprint?: string;
712
+ };
713
+ type WorkspaceCaptureManifest = {
714
+ version: 1;
715
+ revision: number;
716
+ capturedAt: string;
717
+ turnId: string | null;
718
+ leaseEpoch: number;
719
+ treeIndex: FsTreeNode;
720
+ treeTruncated: boolean;
721
+ repos: WorkspaceCaptureRepo[];
722
+ files: WorkspaceCaptureFile[];
723
+ stats: WorkspaceCaptureStats;
724
+ };
725
+ type WorkspaceRevisionCapturedPayload = {
726
+ revision: number;
727
+ turnId: string | null;
728
+ capturedAt: string;
729
+ leaseEpoch: number;
730
+ stats: WorkspaceCaptureStats;
731
+ };
732
+ type WorkspaceRevisionDegradedPayload = {
733
+ revision: number;
734
+ turnId: string | null;
735
+ capturedAt: string;
736
+ leaseEpoch: number;
737
+ reason: WorkspaceCaptureDegradedReason;
738
+ };
739
+ type WorkspaceCaptureSignedUrl = {
740
+ url: string;
741
+ expiresAt: string;
742
+ };
743
+ type GetWorkspaceCaptureResponse = {
744
+ available: false;
745
+ degradedReason?: WorkspaceCaptureDegradedReason | null;
746
+ revision?: number | null;
747
+ capturedAt?: string | null;
748
+ turnId?: string | null;
749
+ leaseEpoch?: number | null;
750
+ } | {
751
+ available: true;
752
+ revision: number;
753
+ capturedAt: string;
754
+ turnId: string | null;
755
+ leaseEpoch: number;
756
+ sizeBytes: number;
757
+ stats: WorkspaceCaptureStats;
758
+ manifest: WorkspaceCaptureManifest | null;
759
+ manifestUrl: WorkspaceCaptureSignedUrl | null;
760
+ };
761
+ type GetWorkspaceCaptureFileResponse = {
762
+ path: string;
763
+ revision: number;
764
+ status: GitFileStatusCode;
765
+ hash: string | null;
766
+ baseHash: string | null;
767
+ sizeBytes: number;
768
+ isBinary: boolean;
769
+ tooLarge: boolean;
770
+ encoding: FsEncoding | null;
771
+ content: string | null;
772
+ contentUrl: WorkspaceCaptureSignedUrl | null;
773
+ };
606
774
  type TerminalExecRequest = {
607
775
  command: string;
608
776
  cwd?: string;
@@ -699,7 +867,10 @@ type ScheduledTask = {
699
867
  overlapPolicy: ScheduledTaskOverlapPolicy;
700
868
  agentConfig: ScheduledTaskAgentConfig;
701
869
  reusableSessionId: string | null;
870
+ variableSetId: string | null;
871
+ /** @deprecated use variableSetId */
702
872
  environmentId: string | null;
873
+ rigId: string | null;
703
874
  metadata: Record<string, unknown>;
704
875
  createdAt: string;
705
876
  updatedAt: string;
@@ -715,7 +886,10 @@ type CreateSessionRequest = {
715
886
  sandboxBackend?: SandboxBackend | undefined;
716
887
  targetSandboxId?: string | undefined;
717
888
  workingDir?: string | undefined;
889
+ variableSetId?: string | undefined;
890
+ /** @deprecated use variableSetId */
718
891
  environmentId?: string | undefined;
892
+ rigId?: string | undefined;
719
893
  goal?: GoalSpec | undefined;
720
894
  clientEventId?: string | undefined;
721
895
  idempotencyKey?: string | undefined;
@@ -725,7 +899,7 @@ type CreateSessionRequest = {
725
899
  groupId: string;
726
900
  } | undefined;
727
901
  };
728
- 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", "mcp_servers:attach", "toolspace:call", "goals:manage", "enrollments:read", "enrollments:manage"];
902
+ 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"];
729
903
  type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
730
904
  /**
731
905
  * Permissions the SDK knows about today, kept open so a newer OpenGeni server
@@ -889,6 +1063,8 @@ type ClientAuthConfig = {
889
1063
  mode: "managedSession";
890
1064
  session: "cookie";
891
1065
  };
1066
+ declare const OPENGENI_API_CONTRACT_REVISION: "2026-07-session-control-v1";
1067
+ declare const OPENGENI_API_CONTRACT_HEADER: "x-opengeni-api-contract";
892
1068
  /**
893
1069
  * Public, unauthenticated-by-default client bootstrap config returned by
894
1070
  * `GET /v1/config/client`: which models + reasoning efforts are exposed, the
@@ -898,6 +1074,8 @@ type ClientAuthConfig = {
898
1074
  */
899
1075
  type ClientConfig = {
900
1076
  deploymentRevision: string;
1077
+ apiContractRevision: typeof OPENGENI_API_CONTRACT_REVISION;
1078
+ serverVersion?: string | undefined;
901
1079
  defaultModel: string;
902
1080
  allowedModels: string[];
903
1081
  models: ClientModel[];
@@ -953,9 +1131,29 @@ type Workspace = {
953
1131
  externalSource: string | null;
954
1132
  externalId: string | null;
955
1133
  agentInstructions: string | null;
1134
+ settings: Record<string, unknown>;
1135
+ inferenceControl: {
1136
+ state: "active" | "paused";
1137
+ revision: number;
1138
+ reason: string | null;
1139
+ changedBy: string | null;
1140
+ changedAt: string | null;
1141
+ };
1142
+ defaultRigId?: string | null;
956
1143
  createdAt: string;
957
1144
  updatedAt: string;
958
1145
  };
1146
+ type WorkspaceSettings = {
1147
+ memoryEnabled?: boolean | undefined;
1148
+ [key: string]: unknown;
1149
+ };
1150
+ type UpdateWorkspaceSettingsRequest = {
1151
+ memoryEnabled?: boolean | undefined;
1152
+ [key: string]: unknown;
1153
+ };
1154
+ type SetWorkspaceDefaultRigRequest = {
1155
+ rigId: string | null;
1156
+ };
959
1157
  type CreateWorkspaceRequest = {
960
1158
  accountId?: string | undefined;
961
1159
  name: string;
@@ -1045,21 +1243,146 @@ type UpdateSessionRequest = {
1045
1243
  };
1046
1244
  /** Outcome of a manual /compact trigger. */
1047
1245
  type CompactSessionContextResult = {
1048
- /**
1049
- * queued: a client-side (Azure) compaction will run before the next turn.
1050
- * noop: nothing to do (server-managed provider, mode off, or no history).
1051
- */
1052
- status: "queued" | "noop";
1246
+ /** pending waits for the current safe boundary; completed ran while idle. */
1247
+ status: "pending" | "completed" | "noop";
1053
1248
  message: string;
1054
1249
  };
1055
- type UpdateSessionTurnRequest = {
1056
- prompt?: string | undefined;
1057
- resources?: ResourceRef[] | undefined;
1058
- tools?: ToolRef[] | undefined;
1059
- model?: string | undefined;
1060
- reasoningEffort?: ReasoningEffort | undefined;
1061
- sandboxBackend?: SandboxBackend | undefined;
1062
- metadata?: Record<string, unknown> | undefined;
1250
+ type EffectiveControlBlocker = {
1251
+ kind: "session" | "workspace";
1252
+ sessionId?: string | undefined;
1253
+ displayName: string;
1254
+ actor: string | null;
1255
+ reason: string | null;
1256
+ changedAt: string | null;
1257
+ revision: number;
1258
+ };
1259
+ type EffectiveControlResumeOption = {
1260
+ scope: "selected" | "session" | "workspace";
1261
+ targetId?: string | undefined;
1262
+ selectedStateAfter: "active" | "paused";
1263
+ remainingPrimaryBlocker?: EffectiveControlBlocker | undefined;
1264
+ impactCopy: string;
1265
+ };
1266
+ type EffectiveSessionControl = {
1267
+ state: "active" | "paused";
1268
+ controlVersion: number;
1269
+ controlEtag: string;
1270
+ directState: "active" | "paused";
1271
+ primaryBlocker: EffectiveControlBlocker | null;
1272
+ additionalBlockerCount: number;
1273
+ blockers: EffectiveControlBlocker[];
1274
+ resumeOptions: EffectiveControlResumeOption[];
1275
+ override: {
1276
+ rootSessionId: string;
1277
+ revision: number;
1278
+ } | null;
1279
+ settlement: {
1280
+ state: "stopping";
1281
+ attemptCount: number;
1282
+ } | null;
1283
+ };
1284
+ type SessionCommandReceipt = {
1285
+ id: string;
1286
+ action: string;
1287
+ operationKey: string;
1288
+ targetSessionId: string | null;
1289
+ targetTurnId: string | null;
1290
+ appliedControlRevision: number | null;
1291
+ appliedQueueVersion: number | null;
1292
+ appliedTurnVersion: number | null;
1293
+ appliedDraftRevision: number | null;
1294
+ createdAt: string;
1295
+ };
1296
+ type ComposerDraft = {
1297
+ revision: number;
1298
+ text: string;
1299
+ resources: ResourceRef[];
1300
+ tools: ToolRef[];
1301
+ model: string;
1302
+ reasoningEffort: ReasoningEffort;
1303
+ sourceTurnId: string | null;
1304
+ sourceTurnVersion: number | null;
1305
+ updatedAt: string | null;
1306
+ };
1307
+ type SessionQueueSnapshot = {
1308
+ version: number;
1309
+ effectiveControl: EffectiveSessionControl;
1310
+ items: SessionTurn[];
1311
+ };
1312
+ type SystemUpdateClassification = "success" | "failure" | "action_required" | "info";
1313
+ type SessionSystemUpdateKind = "scheduled_occurrence" | "goal_continuation" | "agent_message" | "agent_steer_instruction" | "child_terminal_result";
1314
+ type SessionSystemUpdateState = "pending" | "deferred" | "delivered" | "cancelled" | "superseded" | "failed";
1315
+ type SessionSystemUpdate = {
1316
+ id: string;
1317
+ sessionId: string;
1318
+ kind: SessionSystemUpdateKind;
1319
+ classification: SystemUpdateClassification;
1320
+ sourceId: string;
1321
+ dedupeKey: string;
1322
+ summary: string;
1323
+ payload: Record<string, unknown>;
1324
+ lineage: Record<string, unknown>;
1325
+ state: SessionSystemUpdateState;
1326
+ deliveredTurnId: string | null;
1327
+ deliveredAt: string | null;
1328
+ createdAt: string;
1329
+ };
1330
+ type SessionControlResponse = {
1331
+ receipt: SessionCommandReceipt;
1332
+ effectiveControl: EffectiveSessionControl;
1333
+ interruptionCount: number;
1334
+ wakeCount: number;
1335
+ };
1336
+ type WorkspaceInferenceControlResponse = {
1337
+ receipt: SessionCommandReceipt;
1338
+ state: "active" | "paused";
1339
+ revision: number;
1340
+ interruptionCount: number;
1341
+ wakeCount: number;
1342
+ };
1343
+ type WorkspaceControlEvent = {
1344
+ id: string;
1345
+ workspaceId: string;
1346
+ /** Same monotonic value as revision; named sequence for SSE resume cursors. */
1347
+ sequence: number;
1348
+ revision: number;
1349
+ type: "workspace.control.changed";
1350
+ scope: "workspace" | "session";
1351
+ rootSessionId: string | null;
1352
+ action: "pause" | "resume";
1353
+ automatic: boolean;
1354
+ reason: string | null;
1355
+ actor: string;
1356
+ occurredAt: string;
1357
+ };
1358
+ type SessionQueueMutationResponse = {
1359
+ receipt: SessionCommandReceipt;
1360
+ snapshot: SessionQueueSnapshot;
1361
+ draft?: ComposerDraft;
1362
+ };
1363
+ type MoveSessionQueueItemRequest = {
1364
+ clientEventId: string;
1365
+ expectedQueueVersion: number;
1366
+ beforeTurnId: string | null;
1367
+ };
1368
+ type EditSessionQueueItemRequest = {
1369
+ clientEventId: string;
1370
+ expectedTurnVersion: number;
1371
+ expectedDraftRevision: number;
1372
+ replaceDraft: boolean;
1373
+ };
1374
+ type SteerSessionQueueItemRequest = {
1375
+ clientEventId: string;
1376
+ expectedTurnVersion: number;
1377
+ controlEtag?: string;
1378
+ };
1379
+ type DeleteSessionQueueItemRequest = {
1380
+ clientEventId: string;
1381
+ expectedTurnVersion: number;
1382
+ reason?: string;
1383
+ };
1384
+ type SaveComposerDraftRequest = Omit<ComposerDraft, "revision" | "sourceTurnId" | "sourceTurnVersion" | "updatedAt"> & {
1385
+ expectedRevision: number;
1063
1386
  };
1064
1387
  /** Input shape for agent config on create/update (server applies defaults). */
1065
1388
  type ScheduledTaskAgentConfigInput = {
@@ -1079,7 +1402,10 @@ type CreateScheduledTaskRequest = {
1079
1402
  overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
1080
1403
  agentConfig: ScheduledTaskAgentConfigInput;
1081
1404
  status?: ScheduledTaskStatus | undefined;
1405
+ variableSetId?: string | null | undefined;
1406
+ /** @deprecated use variableSetId */
1082
1407
  environmentId?: string | null | undefined;
1408
+ rigId?: string | null | undefined;
1083
1409
  metadata?: Record<string, unknown> | undefined;
1084
1410
  };
1085
1411
  type UpdateScheduledTaskRequest = {
@@ -1089,7 +1415,10 @@ type UpdateScheduledTaskRequest = {
1089
1415
  overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
1090
1416
  agentConfig?: ScheduledTaskAgentConfigInput | undefined;
1091
1417
  status?: ScheduledTaskStatus | undefined;
1418
+ variableSetId?: string | null | undefined;
1419
+ /** @deprecated use variableSetId */
1092
1420
  environmentId?: string | null | undefined;
1421
+ rigId?: string | null | undefined;
1093
1422
  metadata?: Record<string, unknown> | undefined;
1094
1423
  };
1095
1424
  type ScheduledTaskRunStatus = "queued" | "dispatched" | "failed";
@@ -1114,23 +1443,27 @@ type ScheduledTaskRun = {
1114
1443
  * reads expose name + version metadata only. Values are decrypted exclusively
1115
1444
  * inside the worker at sandbox materialization time.
1116
1445
  */
1117
- type WorkspaceEnvironmentVariableMetadata = {
1446
+ type VariableSetVariableMetadata = {
1118
1447
  name: string;
1119
1448
  version: number;
1120
1449
  createdAt: string;
1121
1450
  updatedAt: string;
1122
1451
  };
1123
- type WorkspaceEnvironment = {
1452
+ type VariableSet = {
1124
1453
  id: string;
1125
1454
  accountId: string;
1126
1455
  workspaceId: string;
1127
1456
  name: string;
1128
1457
  description: string | null;
1129
- variables: WorkspaceEnvironmentVariableMetadata[];
1458
+ variables: VariableSetVariableMetadata[];
1130
1459
  createdAt: string;
1131
1460
  updatedAt: string;
1132
1461
  };
1133
- type CreateWorkspaceEnvironmentRequest = {
1462
+ /** @deprecated use VariableSetVariableMetadata */
1463
+ type WorkspaceEnvironmentVariableMetadata = VariableSetVariableMetadata;
1464
+ /** @deprecated use VariableSet */
1465
+ type WorkspaceEnvironment = VariableSet;
1466
+ type CreateVariableSetRequest = {
1134
1467
  name: string;
1135
1468
  description?: string | undefined;
1136
1469
  /** Initial variables. Values are write-only: they never come back on reads. */
@@ -1139,10 +1472,114 @@ type CreateWorkspaceEnvironmentRequest = {
1139
1472
  value: string;
1140
1473
  }[] | undefined;
1141
1474
  };
1142
- type UpdateWorkspaceEnvironmentRequest = {
1475
+ /** @deprecated use CreateVariableSetRequest */
1476
+ type CreateWorkspaceEnvironmentRequest = CreateVariableSetRequest;
1477
+ type UpdateVariableSetRequest = {
1143
1478
  name?: string | undefined;
1144
1479
  description?: string | null | undefined;
1145
1480
  };
1481
+ /** @deprecated use UpdateVariableSetRequest */
1482
+ type UpdateWorkspaceEnvironmentRequest = UpdateVariableSetRequest;
1483
+ type SetVariableSetVariableRequest = {
1484
+ value: string;
1485
+ };
1486
+ /** @deprecated use SetVariableSetVariableRequest */
1487
+ type SetWorkspaceEnvironmentVariableRequest = SetVariableSetVariableRequest;
1488
+ type RigCheck = {
1489
+ name: string;
1490
+ command: string;
1491
+ };
1492
+ type RigVersion = {
1493
+ id: string;
1494
+ rigId: string;
1495
+ version: number;
1496
+ image: string | null;
1497
+ setupScript: string | null;
1498
+ checks: RigCheck[];
1499
+ credentialHooks: string[];
1500
+ defaultVariableSetIds: string[];
1501
+ changelog: string | null;
1502
+ createdBy: string | null;
1503
+ active: boolean;
1504
+ createdAt: string;
1505
+ };
1506
+ type RigVerificationHealth = {
1507
+ checkHealth: "passing" | "failing" | "unknown";
1508
+ lastVerifiedAt: string | null;
1509
+ };
1510
+ type Rig = {
1511
+ id: string;
1512
+ accountId: string;
1513
+ workspaceId: string;
1514
+ name: string;
1515
+ description: string | null;
1516
+ createdBy: string | null;
1517
+ activeVersion: RigVersion | null;
1518
+ activeVersionHealth?: RigVerificationHealth | null;
1519
+ versionCount: number;
1520
+ createdAt: string;
1521
+ updatedAt: string;
1522
+ };
1523
+ type RigChangeKind = "setup_append" | "definition_edit";
1524
+ type RigChangeStatus = "proposed" | "verifying" | "merged" | "rejected" | "failed";
1525
+ type RigCheckResult = {
1526
+ name: string;
1527
+ command: string;
1528
+ exitCode: number | null;
1529
+ output?: string | undefined;
1530
+ };
1531
+ type RigChangeVerification = {
1532
+ startedAt?: string | undefined;
1533
+ finishedAt?: string | undefined;
1534
+ log?: string | undefined;
1535
+ checkResults?: RigCheckResult[] | undefined;
1536
+ [key: string]: unknown;
1537
+ };
1538
+ type RigChange = {
1539
+ id: string;
1540
+ rigId: string;
1541
+ baseVersionId: string | null;
1542
+ kind: RigChangeKind;
1543
+ payload: Record<string, unknown>;
1544
+ status: RigChangeStatus;
1545
+ proposedBy: string | null;
1546
+ verification: RigChangeVerification | null;
1547
+ resultVersionId: string | null;
1548
+ createdAt: string;
1549
+ updatedAt: string;
1550
+ };
1551
+ type CreateRigRequest = {
1552
+ name: string;
1553
+ description?: string | undefined;
1554
+ image?: string | undefined;
1555
+ setupScript?: string | undefined;
1556
+ checks?: RigCheck[] | undefined;
1557
+ credentialHooks?: string[] | undefined;
1558
+ defaultVariableSetIds?: string[] | undefined;
1559
+ };
1560
+ type UpdateRigRequest = {
1561
+ name?: string | undefined;
1562
+ description?: string | null | undefined;
1563
+ };
1564
+ type RigSetupAppendPayload = {
1565
+ command: string;
1566
+ note?: string | undefined;
1567
+ };
1568
+ type RigDefinitionEditPayload = {
1569
+ image?: string | null | undefined;
1570
+ setupScript?: string | null | undefined;
1571
+ checks?: RigCheck[] | undefined;
1572
+ credentialHooks?: string[] | undefined;
1573
+ defaultVariableSetIds?: string[] | undefined;
1574
+ changelog?: string | null | undefined;
1575
+ };
1576
+ type ProposeRigChangeRequest = {
1577
+ kind: "setup_append";
1578
+ payload: RigSetupAppendPayload;
1579
+ } | {
1580
+ kind: "definition_edit";
1581
+ payload: RigDefinitionEditPayload;
1582
+ };
1146
1583
  type FileStatus = "pending_upload" | "ready" | "failed" | "expired" | "deleted";
1147
1584
  type FileAsset = {
1148
1585
  id: string;
@@ -1274,7 +1711,7 @@ type DocumentSearchRequest = {
1274
1711
  type DocumentSearchResponse = {
1275
1712
  results: DocumentSearchResult[];
1276
1713
  };
1277
- type KnowledgeMemoryStatus = "proposed" | "approved" | "rejected";
1714
+ type KnowledgeMemoryStatus = "proposed" | "approved" | "rejected" | "active" | "superseded" | "archived";
1278
1715
  type KnowledgeMemoryKind = "semantic" | "episodic" | "procedural" | "decision" | "preference";
1279
1716
  type KnowledgeSourceRef = {
1280
1717
  kind: "document_chunk" | "document" | "session_event" | "memory" | "external";
@@ -1296,6 +1733,13 @@ type KnowledgeMemory = {
1296
1733
  createdBySessionId: string | null;
1297
1734
  reviewedBy: string | null;
1298
1735
  reviewedAt: string | null;
1736
+ pinned: boolean;
1737
+ usageCount: number;
1738
+ lastUsedAt: string | null;
1739
+ supersedesId: string | null;
1740
+ supersededById: string | null;
1741
+ validFrom: string;
1742
+ validUntil: string | null;
1299
1743
  createdAt: string;
1300
1744
  updatedAt: string;
1301
1745
  };
@@ -1308,6 +1752,8 @@ type CreateKnowledgeMemoryRequest = {
1308
1752
  confidence?: number | undefined;
1309
1753
  metadata?: Record<string, unknown> | undefined;
1310
1754
  createdBySessionId?: string | undefined;
1755
+ pinned?: boolean | undefined;
1756
+ replacesId?: string | undefined;
1311
1757
  };
1312
1758
  type UpdateKnowledgeMemoryRequest = {
1313
1759
  status?: KnowledgeMemoryStatus | undefined;
@@ -1318,6 +1764,7 @@ type UpdateKnowledgeMemoryRequest = {
1318
1764
  confidence?: number | undefined;
1319
1765
  metadata?: Record<string, unknown> | undefined;
1320
1766
  reviewedBy?: string | undefined;
1767
+ pinned?: boolean | undefined;
1321
1768
  };
1322
1769
  type KnowledgeMemorySearchRequest = {
1323
1770
  query?: string | undefined;
@@ -1326,6 +1773,23 @@ type KnowledgeMemorySearchRequest = {
1326
1773
  scope?: string | undefined;
1327
1774
  limit?: number | undefined;
1328
1775
  };
1776
+ type WorkspaceMemorySearchMode = "hybrid" | "vector" | "keyword";
1777
+ type WorkspaceMemorySearchRequest = {
1778
+ query: string;
1779
+ kind?: KnowledgeMemoryKind | undefined;
1780
+ limit?: number | undefined;
1781
+ mode?: WorkspaceMemorySearchMode | undefined;
1782
+ };
1783
+ type WorkspaceMemorySearchResult = {
1784
+ memory: KnowledgeMemory;
1785
+ score: number;
1786
+ matchType: WorkspaceMemorySearchMode;
1787
+ vectorScore: number | null;
1788
+ keywordScore: number | null;
1789
+ };
1790
+ type WorkspaceMemorySearchResponse = {
1791
+ results: WorkspaceMemorySearchResult[];
1792
+ };
1329
1793
  type CapabilityPackConnectorAuthModel = "oauth2_authorization_code_pkce" | "oauth2_authorization_code" | "api_key" | "credential_ref";
1330
1794
  type CapabilityPackConnector = {
1331
1795
  id: string;
@@ -1362,7 +1826,7 @@ type CapabilityPackSkill = {
1362
1826
  description?: string | undefined;
1363
1827
  files: CapabilityPackSkillFile[];
1364
1828
  };
1365
- type CapabilityPackEnvironmentSpec = {
1829
+ type CapabilityPackVariableSetSpec = {
1366
1830
  description: string;
1367
1831
  requiredVariables: string[];
1368
1832
  required: boolean;
@@ -1380,7 +1844,7 @@ type CapabilityPack = {
1380
1844
  connectors: CapabilityPackConnector[];
1381
1845
  knowledge: CapabilityPackKnowledge[];
1382
1846
  scheduledTaskTemplates: CapabilityPackScheduledTaskTemplate[];
1383
- environment?: CapabilityPackEnvironmentSpec | undefined;
1847
+ variableSet?: CapabilityPackVariableSetSpec | undefined;
1384
1848
  metadata: Record<string, unknown>;
1385
1849
  };
1386
1850
  /** Input shape for registering a pack manifest (server applies defaults). */
@@ -1424,7 +1888,7 @@ type RegisterCapabilityPackRequest = {
1424
1888
  defaultOverlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
1425
1889
  prompt?: string | undefined;
1426
1890
  }[] | undefined;
1427
- environment?: {
1891
+ variableSet?: {
1428
1892
  description: string;
1429
1893
  requiredVariables?: string[] | undefined;
1430
1894
  required?: boolean | undefined;
@@ -1450,6 +1914,8 @@ type PackInstallation = {
1450
1914
  updatedAt: string;
1451
1915
  };
1452
1916
  type EnablePackRequest = {
1917
+ variableSetId?: string | undefined;
1918
+ /** @deprecated use variableSetId */
1453
1919
  environmentId?: string | undefined;
1454
1920
  metadata?: Record<string, unknown> | undefined;
1455
1921
  };
@@ -1502,6 +1968,12 @@ type CapabilityCatalogItem = {
1502
1968
  runtime: CapabilityRuntime;
1503
1969
  enabled: boolean;
1504
1970
  enabledReason: string | null;
1971
+ /** The connection backing this enabled installation, or null when none is involved. */
1972
+ connectionRef: {
1973
+ connectionId: string;
1974
+ providerDomain: string;
1975
+ kind: string;
1976
+ } | null;
1505
1977
  metadata: Record<string, unknown>;
1506
1978
  createdAt?: string | undefined;
1507
1979
  updatedAt?: string | undefined;
@@ -1547,10 +2019,12 @@ type EnableCapabilityRequest = {
1547
2019
  */
1548
2020
  headers?: Record<string, string> | undefined;
1549
2021
  /**
1550
- * Initial environment attachment for kind=pack capabilities — mirrors the
2022
+ * Initial variableSet attachment for kind=pack capabilities — mirrors the
1551
2023
  * dedicated POST /packs/:id/enable body. Required to enable an
1552
- * environment.required pack through this unified path; ignored otherwise.
2024
+ * variableSet.required pack through this unified path; ignored otherwise.
1553
2025
  */
2026
+ variableSetId?: string | undefined;
2027
+ /** @deprecated use variableSetId */
1554
2028
  environmentId?: string | undefined;
1555
2029
  };
1556
2030
  type DiscoverMcpCapabilitiesResponse = {
@@ -1660,13 +2134,6 @@ type UserMessageEventInput = {
1660
2134
  mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[] | undefined;
1661
2135
  };
1662
2136
  };
1663
- type UserInterruptEventInput = {
1664
- type: "user.interrupt";
1665
- clientEventId?: string | undefined;
1666
- payload?: {
1667
- reason?: string | undefined;
1668
- } | undefined;
1669
- };
1670
2137
  type UserApprovalDecisionEventInput = {
1671
2138
  type: "user.approvalDecision";
1672
2139
  clientEventId?: string | undefined;
@@ -1677,7 +2144,7 @@ type UserApprovalDecisionEventInput = {
1677
2144
  };
1678
2145
  };
1679
2146
  /** Control/user events a client may POST to a session's event log. */
1680
- type ClientSessionEventInput = UserMessageEventInput | UserInterruptEventInput | UserApprovalDecisionEventInput;
2147
+ type ClientSessionEventInput = UserMessageEventInput | UserApprovalDecisionEventInput;
1681
2148
  /** A point-in-time machine metrics sample. `gpuUtilPct`/`gpuMemBytes` are null
1682
2149
  * when no GPU was present (not-reported, never a real zero); the bytes/load are
1683
2150
  * numbers; `sampledAt` is an ISO-8601 instant. */
@@ -1747,6 +2214,7 @@ type SwapActiveSandboxResponse = {
1747
2214
  activeSandboxId: string | null;
1748
2215
  activeEpoch: number;
1749
2216
  reason?: string;
2217
+ code?: "stale_pointer" | "offline_enrollment" | "unsupported_backend_context" | "transient_establishment" | "concurrent_swap";
1750
2218
  };
1751
2219
  /** Mirror of `@opengeni/contracts` EnrollmentOs. */
1752
2220
  type EnrollmentOs = "linux" | "macos" | "windows";
@@ -1857,6 +2325,8 @@ type StreamSessionEventsOptions = {
1857
2325
  * reconnects = N+1 total open-stream calls). Defaults to unlimited.
1858
2326
  */
1859
2327
  maxReconnectAttempts?: number;
2328
+ /** Await authoritative client reconciliation before exposing `live`. */
2329
+ beforeLive?: (() => void | Promise<void>) | undefined;
1860
2330
  onStateChange?: (state: StreamConnectionState) => void;
1861
2331
  };
1862
2332
  /**
@@ -1876,6 +2346,17 @@ type StreamSessionEventsOptions = {
1876
2346
  */
1877
2347
  declare function streamSessionEvents(transport: SessionEventStreamTransport, options?: StreamSessionEventsOptions): AsyncGenerator<SessionEvent, void, void>;
1878
2348
 
2349
+ type WorkspaceControlStreamTransport = {
2350
+ /** The server replays every durable event after the cursor before going live. */
2351
+ openStream: (after: number, signal: AbortSignal | undefined) => Promise<ReadableStream<Uint8Array>>;
2352
+ };
2353
+ /**
2354
+ * Reconnecting workspace invalidation stream. Control revisions are monotonic
2355
+ * but can begin above one after the one-way migration, so unlike conversation
2356
+ * events this stream intentionally permits sparse sequence values.
2357
+ */
2358
+ declare function streamWorkspaceControlEvents(transport: WorkspaceControlStreamTransport, options?: StreamSessionEventsOptions): AsyncGenerator<WorkspaceControlEvent, void, void>;
2359
+
1879
2360
  type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
1880
2361
  type OpenGeniClientOptions = {
1881
2362
  /** Base URL of the OpenGeni API, e.g. `https://api.example.com`. */
@@ -1894,18 +2375,15 @@ type SendMessageInput = {
1894
2375
  model?: string;
1895
2376
  reasoningEffort?: ReasoningEffort;
1896
2377
  clientEventId?: string;
2378
+ controlEtag?: string;
2379
+ expectedDraftRevision?: number;
2380
+ mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[];
1897
2381
  };
1898
2382
  type SteerMessageResult = {
1899
2383
  /** The accepted `user.message` event. */
1900
2384
  accepted: SessionEvent;
1901
- /**
1902
- * The turn created for the message, when it could be located — usually
1903
- * still queued, but already claimed (running/requires_action or even
1904
- * finished) when the worker picked it up mid-call.
1905
- */
1906
- turn: SessionTurn | null;
1907
- /** True when the running turn was interrupted to make way for the message. */
1908
- interrupted: boolean;
2385
+ /** The exact turn created for this message in the same server transaction. */
2386
+ turn: SessionTurn;
1909
2387
  };
1910
2388
  /**
1911
2389
  * Typed client for the OpenGeni public API. Framework-agnostic: only needs
@@ -1922,7 +2400,19 @@ declare class OpenGeniClient {
1922
2400
  updateSession(workspaceId: string, sessionId: string, request: UpdateSessionRequest): Promise<Session>;
1923
2401
  listSessions(workspaceId: string, options?: {
1924
2402
  limit?: number;
2403
+ parentSessionId?: string | null;
2404
+ search?: string;
1925
2405
  }): Promise<Session[]>;
2406
+ /** Pin-aware ordinary-session page with a stable keyset cursor. */
2407
+ listSessionPage(workspaceId: string, options?: {
2408
+ limit?: number;
2409
+ parentSessionId?: string | null;
2410
+ cursor?: string;
2411
+ search?: string;
2412
+ }): Promise<SessionListResponse>;
2413
+ /** Set this authenticated member's personal workspace pin for a session. */
2414
+ updateSessionPin(workspaceId: string, sessionId: string, request: UpdateSessionPinRequest): Promise<Session>;
2415
+ getSessionLineage(workspaceId: string, sessionId: string): Promise<SessionLineageResponse>;
1926
2416
  listTurns(workspaceId: string, sessionId: string, options?: {
1927
2417
  limit?: number;
1928
2418
  }): Promise<SessionTurn[]>;
@@ -2002,10 +2492,11 @@ declare class OpenGeniClient {
2002
2492
  /** POST a user/control event to the session. Returns the accepted event. */
2003
2493
  sendEvent(workspaceId: string, sessionId: string, event: ClientSessionEventInput): Promise<SessionEvent>;
2004
2494
  sendMessage(workspaceId: string, sessionId: string, message: string | SendMessageInput): Promise<SessionEvent>;
2005
- interrupt(workspaceId: string, sessionId: string, options?: {
2495
+ pauseSession(workspaceId: string, sessionId: string, options?: {
2006
2496
  reason?: string;
2007
2497
  clientEventId?: string;
2008
- }): Promise<SessionEvent>;
2498
+ expectedControlEtag?: string;
2499
+ }): Promise<SessionControlResponse>;
2009
2500
  sendApprovalDecision(workspaceId: string, sessionId: string, decision: {
2010
2501
  approvalId: string;
2011
2502
  decision: "approve" | "reject";
@@ -2025,35 +2516,49 @@ declare class OpenGeniClient {
2025
2516
  after?: number;
2026
2517
  signal?: AbortSignal;
2027
2518
  }): Promise<ReadableStream<Uint8Array>>;
2028
- /** Edit a still-queued turn (prompt, model, resources, tools, ...). */
2029
- updateQueuedTurn(workspaceId: string, sessionId: string, turnId: string, update: UpdateSessionTurnRequest): Promise<SessionTurn>;
2030
- /**
2031
- * Reorder the queued turns. `turnIds` must all reference queued turns; the
2032
- * server assigns positions in the given order and returns the queue.
2033
- */
2034
- reorderQueuedTurns(workspaceId: string, sessionId: string, turnIds: string[]): Promise<SessionTurn[]>;
2035
- /** Cancel a queued turn before it is claimed. Returns the cancelled turn. */
2036
- deleteQueuedTurn(workspaceId: string, sessionId: string, turnId: string): Promise<SessionTurn>;
2519
+ getQueue(workspaceId: string, sessionId: string): Promise<SessionQueueSnapshot>;
2520
+ moveQueueItem(workspaceId: string, sessionId: string, turnId: string, request: MoveSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
2521
+ editQueueItem(workspaceId: string, sessionId: string, turnId: string, request: EditSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
2522
+ steerQueueItem(workspaceId: string, sessionId: string, turnId: string, request: SteerSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
2523
+ deleteQueueItem(workspaceId: string, sessionId: string, turnId: string, request: DeleteSessionQueueItemRequest): Promise<SessionQueueMutationResponse>;
2524
+ getComposerDraft(workspaceId: string, sessionId: string): Promise<ComposerDraft>;
2525
+ saveComposerDraft(workspaceId: string, sessionId: string, request: SaveComposerDraftRequest): Promise<ComposerDraft>;
2526
+ controlSession(workspaceId: string, sessionId: string, request: {
2527
+ action: "pause" | "resume";
2528
+ reason?: string;
2529
+ clientEventId: string;
2530
+ expectedControlEtag?: string;
2531
+ }): Promise<SessionControlResponse>;
2532
+ resumeSession(workspaceId: string, sessionId: string, options?: {
2533
+ reason?: string;
2534
+ clientEventId?: string;
2535
+ expectedControlEtag?: string;
2536
+ }): Promise<SessionControlResponse>;
2537
+ setWorkspaceInferenceState(workspaceId: string, request: {
2538
+ action: "pause" | "resume";
2539
+ reason?: string;
2540
+ clientEventId: string;
2541
+ expectedRevision?: number;
2542
+ }): Promise<WorkspaceInferenceControlResponse>;
2543
+ listWorkspaceControlEvents(workspaceId: string, options?: {
2544
+ after?: number;
2545
+ limit?: number;
2546
+ }): Promise<WorkspaceControlEvent[]>;
2547
+ streamWorkspaceControlEvents(workspaceId: string, options?: StreamSessionEventsOptions): AsyncGenerator<WorkspaceControlEvent, void, void>;
2548
+ workspaceControlStreamTransport(workspaceId: string): WorkspaceControlStreamTransport;
2549
+ openWorkspaceControlEventStream(workspaceId: string, options?: {
2550
+ after?: number;
2551
+ signal?: AbortSignal;
2552
+ }): Promise<ReadableStream<Uint8Array>>;
2037
2553
  /**
2038
- * Steer: deliver a message *now* instead of behind the queue. Sends the
2039
- * message, promotes its queued turn to the front, and interrupts the
2040
- * running turn so the session picks the steer turn up next. On a session
2041
- * that is not running this degrades gracefully to a plain queued message.
2042
- *
2043
- * The steer turn is located by `triggerEventId` across ALL turns (retried
2044
- * briefly in case the server is still materializing it) — not just the
2045
- * queued ones, because the worker can claim the steer turn before it is
2046
- * ever observed queued, and a claimed steer turn means the message is
2047
- * already being delivered: interrupting then would cancel the very message
2048
- * being steered. If the turn cannot be found while other turns are queued,
2049
- * the interrupt is also skipped — stopping the running turn would otherwise
2050
- * promote someone else's queued work over this message — and the call
2051
- * degrades to a plain queued send (`interrupted: false`).
2554
+ * Steer: atomically put this prompt at the head and supersede the current
2555
+ * inference. The client performs one request and renders server order.
2052
2556
  */
2053
2557
  steerMessage(workspaceId: string, sessionId: string, message: string | SendMessageInput): Promise<SteerMessageResult>;
2054
2558
  /** The session's goal. 404s when the session never had one. */
2055
2559
  getGoal(workspaceId: string, sessionId: string): Promise<SessionGoal>;
2056
2560
  updateGoal(workspaceId: string, sessionId: string, request: UpdateSessionGoalRequest): Promise<SessionGoal>;
2561
+ deleteGoal(workspaceId: string, sessionId: string): Promise<void>;
2057
2562
  /** Pause the goal loop: the session stops self-continuing until resumed. */
2058
2563
  pauseGoal(workspaceId: string, sessionId: string, options?: {
2059
2564
  rationale?: string;
@@ -2068,12 +2573,7 @@ declare class OpenGeniClient {
2068
2573
  * context — the destructive intent is explicit on the wire.
2069
2574
  */
2070
2575
  clearSessionContext(workspaceId: string, sessionId: string): Promise<void>;
2071
- /**
2072
- * Trigger conversation compaction now. On the client-managed (Azure) path this
2073
- * queues a forced compaction the worker honors before the next turn
2074
- * (`status:"queued"`); on a server-managed provider or when compaction is off
2075
- * it is a no-op (`status:"noop"`) with an explanatory message.
2076
- */
2576
+ /** Request one durable portable compaction at the next safe model boundary. */
2077
2577
  compactSessionContext(workspaceId: string, sessionId: string): Promise<CompactSessionContextResult>;
2078
2578
  /** FileSystem: list a directory tree (feeds the Pierre file tree). */
2079
2579
  fsList(workspaceId: string, sessionId: string, request?: FsListRequest): Promise<FsListResponse>;
@@ -2095,6 +2595,15 @@ declare class OpenGeniClient {
2095
2595
  gitLog(workspaceId: string, sessionId: string, request?: GitLogRequest): Promise<GitLogResponse>;
2096
2596
  /** Git: show a commit (diff vs first parent) or fetch a raw blob at a ref. */
2097
2597
  gitShow(workspaceId: string, sessionId: string, request: GitShowRequest): Promise<GitShowResponse>;
2598
+ /** Workspace capture: the latest turn-end snapshot of the session's workspace
2599
+ * (tree + per-repo diff + file after-image refs), served from durable storage
2600
+ * WITHOUT warming a machine — the workbench cold-paint source. Returns
2601
+ * `{available:false}` when no capture exists yet (fall back to the live path). */
2602
+ getWorkspaceCapture(workspaceId: string, sessionId: string): Promise<GetWorkspaceCaptureResponse>;
2603
+ /** Workspace capture: a single file's after-image from the capture (revision
2604
+ * pins a specific one; omitted → latest). Content is inline for small files,
2605
+ * else a short-TTL signed URL; a tooLarge file returns metadata only. */
2606
+ getWorkspaceCaptureFile(workspaceId: string, sessionId: string, path: string, revision?: number): Promise<GetWorkspaceCaptureFileResponse>;
2098
2607
  /** Terminal: run a bounded command, returning buffered stdout/stderr inline. */
2099
2608
  terminalExec(workspaceId: string, sessionId: string, request: TerminalExecRequest): Promise<TerminalExecResponse>;
2100
2609
  /** Terminal: open an interactive PTY. Output streams on the event SSE as
@@ -2180,13 +2689,60 @@ declare class OpenGeniClient {
2180
2689
  listScheduledTaskRuns(workspaceId: string, taskId: string, options?: {
2181
2690
  limit?: number;
2182
2691
  }): Promise<ScheduledTaskRun[]>;
2183
- listEnvironments(workspaceId: string): Promise<WorkspaceEnvironment[]>;
2184
- createEnvironment(workspaceId: string, request: CreateWorkspaceEnvironmentRequest): Promise<WorkspaceEnvironment>;
2185
- getEnvironment(workspaceId: string, environmentId: string): Promise<WorkspaceEnvironment>;
2186
- updateEnvironment(workspaceId: string, environmentId: string, request: UpdateWorkspaceEnvironmentRequest): Promise<WorkspaceEnvironment>;
2187
- deleteEnvironment(workspaceId: string, environmentId: string): Promise<void>;
2692
+ listVariableSets(workspaceId: string): Promise<VariableSet[]>;
2693
+ createVariableSet(workspaceId: string, request: CreateVariableSetRequest): Promise<VariableSet>;
2694
+ getVariableSet(workspaceId: string, variableSetId: string): Promise<VariableSet>;
2695
+ updateVariableSet(workspaceId: string, variableSetId: string, request: UpdateVariableSetRequest): Promise<VariableSet>;
2696
+ deleteVariableSet(workspaceId: string, variableSetId: string): Promise<void>;
2188
2697
  /** Create or rotate a variable. The value never comes back on any read. */
2189
- setEnvironmentVariable(workspaceId: string, environmentId: string, name: string, value: string): Promise<WorkspaceEnvironmentVariableMetadata>;
2698
+ setVariableSetVariable(workspaceId: string, variableSetId: string, name: string, value: string): Promise<VariableSetVariableMetadata>;
2699
+ deleteVariableSetVariable(workspaceId: string, variableSetId: string, name: string): Promise<void>;
2700
+ listRigs(workspaceId: string): Promise<Rig[]>;
2701
+ createRig(workspaceId: string, request: CreateRigRequest): Promise<Rig>;
2702
+ getRig(workspaceId: string, rigId: string): Promise<Rig>;
2703
+ updateRig(workspaceId: string, rigId: string, request: UpdateRigRequest): Promise<Rig>;
2704
+ deleteRig(workspaceId: string, rigId: string): Promise<void>;
2705
+ listRigVersions(workspaceId: string, rigId: string): Promise<RigVersion[]>;
2706
+ /** Roll the active version to an existing one (rollback / promote-activate). */
2707
+ activateRigVersion(workspaceId: string, rigId: string, versionId: string): Promise<RigVersion>;
2708
+ listRigChanges(workspaceId: string, rigId: string): Promise<RigChange[]>;
2709
+ /** Propose a change against the rig's active version (rigs:use). */
2710
+ proposeRigChange(workspaceId: string, rigId: string, request: ProposeRigChangeRequest): Promise<RigChange>;
2711
+ getRigChange(workspaceId: string, rigId: string, changeId: string): Promise<RigChange>;
2712
+ /**
2713
+ * Re-run verification for a change (rigs:use). Verification is asynchronous:
2714
+ * this returns the change immediately with status `verifying`; poll
2715
+ * `getRigChange`/`listRigChanges` for the terminal outcome + logs.
2716
+ */
2717
+ verifyRigChange(workspaceId: string, rigId: string, changeId: string): Promise<RigChange>;
2718
+ /**
2719
+ * Promote a verified `definition_edit` change into a new active rig version
2720
+ * (rigs:manage). Only valid once the change's verification passed; returns the
2721
+ * newly minted version.
2722
+ */
2723
+ promoteRigChange(workspaceId: string, rigId: string, changeId: string): Promise<RigVersion>;
2724
+ /**
2725
+ * Re-run the active version's checks in a clean throwaway sandbox (rigs:use).
2726
+ * Asynchronous — returns the version id being verified; the outcome lands on
2727
+ * the version's audit trail.
2728
+ */
2729
+ verifyRig(workspaceId: string, rigId: string): Promise<{
2730
+ ok: boolean;
2731
+ versionId: string;
2732
+ }>;
2733
+ /** @deprecated use listVariableSets */
2734
+ listEnvironments(workspaceId: string): Promise<VariableSet[]>;
2735
+ /** @deprecated use createVariableSet */
2736
+ createEnvironment(workspaceId: string, request: CreateVariableSetRequest): Promise<VariableSet>;
2737
+ /** @deprecated use getVariableSet */
2738
+ getEnvironment(workspaceId: string, environmentId: string): Promise<VariableSet>;
2739
+ /** @deprecated use updateVariableSet */
2740
+ updateEnvironment(workspaceId: string, environmentId: string, request: UpdateVariableSetRequest): Promise<VariableSet>;
2741
+ /** @deprecated use deleteVariableSet */
2742
+ deleteEnvironment(workspaceId: string, environmentId: string): Promise<void>;
2743
+ /** @deprecated use setVariableSetVariable */
2744
+ setEnvironmentVariable(workspaceId: string, environmentId: string, name: string, value: string): Promise<VariableSetVariableMetadata>;
2745
+ /** @deprecated use deleteVariableSetVariable */
2190
2746
  deleteEnvironmentVariable(workspaceId: string, environmentId: string, name: string): Promise<void>;
2191
2747
  /** Step 1 of the upload flow: returns the pre-signed PUT target. */
2192
2748
  beginFileUpload(workspaceId: string, request: CreateFileUploadRequest): Promise<CreateFileUploadResponse>;
@@ -2220,6 +2776,11 @@ declare class OpenGeniClient {
2220
2776
  getKnowledgeMemory(workspaceId: string, memoryId: string): Promise<KnowledgeMemory>;
2221
2777
  createKnowledgeMemory(workspaceId: string, request: CreateKnowledgeMemoryRequest): Promise<KnowledgeMemory>;
2222
2778
  updateKnowledgeMemory(workspaceId: string, memoryId: string, request: UpdateKnowledgeMemoryRequest): Promise<KnowledgeMemory>;
2779
+ /** Hybrid (semantic + keyword) search over the workspace's agent-visible memory. */
2780
+ searchWorkspaceMemories(workspaceId: string, request: WorkspaceMemorySearchRequest): Promise<WorkspaceMemorySearchResponse>;
2781
+ /** Deep-merge a settings patch into the workspace (preserves unknown keys). */
2782
+ updateWorkspaceSettings(workspaceId: string, request: UpdateWorkspaceSettingsRequest): Promise<Workspace>;
2783
+ setWorkspaceDefaultRig(workspaceId: string, request: SetWorkspaceDefaultRigRequest): Promise<Workspace>;
2223
2784
  /** Built-in + registered packs, with the workspace's installations. */
2224
2785
  listPacks(workspaceId: string): Promise<ListPacksResponse>;
2225
2786
  /** Register (or replace) a workspace-scoped pack from a manifest. */
@@ -2239,6 +2800,14 @@ declare class OpenGeniClient {
2239
2800
  query?: string;
2240
2801
  limit?: number;
2241
2802
  }): Promise<DiscoverMcpCapabilitiesResponse>;
2803
+ listConnections(workspaceId: string): Promise<ConnectionMetadata[]>;
2804
+ createConnection(workspaceId: string, request: CreateConnectionRequest): Promise<ConnectionMetadata>;
2805
+ updateConnection(workspaceId: string, connectionId: string, request: UpdateConnectionRequest): Promise<ConnectionMetadata>;
2806
+ deleteConnection(workspaceId: string, connectionId: string): Promise<ConnectionMetadata>;
2807
+ /** Start an OAuth connection flow; redirect the user to the returned `authorizationUrl`. */
2808
+ startConnectionOAuth(workspaceId: string, request: OAuthStartRequest): Promise<OAuthStartResponse>;
2809
+ /** Public, immutably-cached URL for a catalog item's logo, or null when the item has none. */
2810
+ catalogAssetUrl(logoAssetPath: string | null): string | null;
2242
2811
  /** GitHub App configuration status + a signed install URL when configured. */
2243
2812
  getGitHubApp(workspaceId: string): Promise<GitHubAppInfo>;
2244
2813
  /**
@@ -2323,6 +2892,12 @@ declare class OpenGeniApiError extends Error {
2323
2892
  readonly body: string;
2324
2893
  constructor(status: number, body: string);
2325
2894
  }
2895
+ /** The browser bundle and API disagree about their state-changing wire contract. */
2896
+ declare class OpenGeniApiContractMismatchError extends Error {
2897
+ readonly expected: string;
2898
+ readonly actual: string;
2899
+ constructor(expected: string, actual: string);
2900
+ }
2326
2901
  /** Error for an unrecoverable event-stream condition (not a transient drop). */
2327
2902
  declare class OpenGeniStreamError extends Error {
2328
2903
  constructor(message: string);
@@ -2532,4 +3107,4 @@ declare function ttydInputFrame(data: string): string;
2532
3107
  /** Build a client→server RESIZE frame: "1" + JSON.stringify({ columns, rows }). */
2533
3108
  declare function ttydResizeFrame(columns: number, rows: number): string;
2534
3109
 
2535
- 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 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 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 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 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 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, 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 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 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 ToolAuthNeededPayload, type ToolRef, TtydClientCommand, TtydServerCommand, type UpdateConnectionRequest, type UpdateKnowledgeMemoryRequest, 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 };
3110
+ 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 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 CreateKnowledgeMemoryRequest, type CreateRigRequest, type CreateScheduledTaskRequest, type CreateSessionRequest, type CreateVariableSetRequest, type CreateWorkspaceEnvironmentRequest, type CreateWorkspaceRequest, 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 DocumentSearchMode, type DocumentSearchRequest, type DocumentSearchResponse, type DocumentSearchResult, type DocumentStatus, 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 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 MoveSessionQueueItemRequest, type OAuthStartRequest, type OAuthStartResponse, OPENGENI_API_CONTRACT_HEADER, OPENGENI_API_CONTRACT_REVISION, OpenGeniApiContractMismatchError, 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 SaveComposerDraftRequest, 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 SessionCommandReceipt, 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 SteerSessionQueueItemRequest, 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 WorkspaceControlEvent, type WorkspaceControlStreamTransport, 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, streamWorkspaceControlEvents, terminalSocketUrl, ttydAuthFrame, ttydInputFrame, ttydResizeFrame };