@opengeni/sdk 0.52.1 → 0.57.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.
Files changed (54) hide show
  1. package/README.md +61 -7
  2. package/dist/artifacts.js +5 -5
  3. package/dist/{chunk-V5F253OG.js → chunk-GU6JF75T.js} +6 -3
  4. package/dist/chunk-GU6JF75T.js.map +1 -0
  5. package/dist/{chunk-FRJFNDIR.js → chunk-HJ3HHUT5.js} +5 -1
  6. package/dist/chunk-HJ3HHUT5.js.map +1 -0
  7. package/dist/{chunk-KIHGPM7H.js → chunk-JDLDDRNE.js} +20 -14
  8. package/dist/chunk-JDLDDRNE.js.map +1 -0
  9. package/dist/{chunk-FHI4DFIG.js → chunk-JRPFWI6T.js} +2 -2
  10. package/dist/{chunk-ILQZR5N6.js → chunk-PKQ377ED.js} +693 -34
  11. package/dist/chunk-PKQ377ED.js.map +1 -0
  12. package/dist/{chunk-MZWTWOX6.js → chunk-ST5DDKJP.js} +327 -1
  13. package/dist/chunk-ST5DDKJP.js.map +1 -0
  14. package/dist/{chunk-DXDL7EEW.js → chunk-YKZME56C.js} +197 -113
  15. package/dist/chunk-YKZME56C.js.map +1 -0
  16. package/dist/client.d.ts +106 -16
  17. package/dist/codex-realtime-controller.d.ts +3 -0
  18. package/dist/codex-realtime-controller.js +2 -2
  19. package/dist/core.js +7 -7
  20. package/dist/desktop.d.ts +8 -0
  21. package/dist/editable-artifacts.js +4 -4
  22. package/dist/gateway-realtime-transport.d.ts +1 -0
  23. package/dist/gateway-realtime-transport.js +5 -3
  24. package/dist/index.d.ts +6 -2
  25. package/dist/index.js +68 -34
  26. package/dist/index.js.map +1 -1
  27. package/dist/interaction-revision-stream.d.ts +11 -0
  28. package/dist/interaction.d.ts +604 -5
  29. package/dist/interaction.js +27 -1
  30. package/dist/realtime.d.ts +3 -3
  31. package/dist/realtime.js +11 -7
  32. package/dist/realtime.js.map +1 -1
  33. package/dist/types.d.ts +267 -64
  34. package/dist/workspace-live-stream.d.ts +14 -0
  35. package/package.json +2 -2
  36. package/src/client.ts +861 -60
  37. package/src/codex-realtime-controller.ts +25 -7
  38. package/src/codex-realtime-lifecycle.ts +1 -0
  39. package/src/desktop.ts +11 -1
  40. package/src/errors.ts +16 -2
  41. package/src/gateway-realtime-transport.ts +252 -109
  42. package/src/index.ts +42 -13
  43. package/src/interaction-revision-stream.ts +117 -0
  44. package/src/interaction.ts +1049 -5
  45. package/src/realtime.ts +14 -4
  46. package/src/types.ts +336 -67
  47. package/src/workspace-live-stream.ts +137 -0
  48. package/dist/chunk-DXDL7EEW.js.map +0 -1
  49. package/dist/chunk-FRJFNDIR.js.map +0 -1
  50. package/dist/chunk-ILQZR5N6.js.map +0 -1
  51. package/dist/chunk-KIHGPM7H.js.map +0 -1
  52. package/dist/chunk-MZWTWOX6.js.map +0 -1
  53. package/dist/chunk-V5F253OG.js.map +0 -1
  54. /package/dist/{chunk-FHI4DFIG.js.map → chunk-JRPFWI6T.js.map} +0 -0
package/dist/types.d.ts CHANGED
@@ -112,11 +112,11 @@ export type SyncSessionRealtimeLedgerResponse = {
112
112
  }>;
113
113
  outbound: SessionRealtimeLedgerEntry[];
114
114
  };
115
- export type SessionRealtimeModel = "gpt-live-1-boulder-alpha" | "opengeni-gateway/openai/gpt-realtime-2.1" | "opengeni-gateway/openai/gpt-realtime-mini" | "opengeni-gateway/xai/grok-voice-think-fast-2.0" | "workspace-gateway/openai/gpt-realtime-2.1" | "workspace-gateway/openai/gpt-realtime-mini" | "workspace-gateway/xai/grok-voice-think-fast-2.0";
115
+ export type SessionRealtimeModel = "gpt-live-1-boulder-alpha" | "supergrok/grok-voice-think-fast-2.0" | "opengeni-gateway/openai/gpt-realtime-2.1" | "opengeni-gateway/openai/gpt-realtime-mini" | "opengeni-gateway/xai/grok-voice-think-fast-2.0" | "workspace-gateway/openai/gpt-realtime-2.1" | "workspace-gateway/openai/gpt-realtime-mini" | "workspace-gateway/xai/grok-voice-think-fast-2.0";
116
116
  export type WorkspaceRealtimeModelCatalogItem = {
117
117
  id: SessionRealtimeModel;
118
118
  label: string;
119
- provider: "OpenGeni" | "Connected Codex" | "Your Gateway";
119
+ provider: "OpenGeni" | "Connected Codex" | "Connected SuperGrok" | "Your Gateway";
120
120
  description: string;
121
121
  available: boolean;
122
122
  unavailableReason: string | null;
@@ -184,7 +184,7 @@ export type SessionCapabilities = {
184
184
  reason: CapabilityUnavailableReason | null;
185
185
  };
186
186
  Terminal: {
187
- transport: "sse-events" | "pty-ws" | null;
187
+ transport: "sse-events" | "pty-ws" | "relay-pty" | null;
188
188
  ptyCapable: boolean;
189
189
  shell: string;
190
190
  url: string | null;
@@ -279,7 +279,7 @@ export type AttachViewerResponse = ViewerHolder & {
279
279
  terminalUrl: string | null;
280
280
  terminalToken: string | null;
281
281
  terminalExpiresAt: string | null;
282
- terminalTransport: "pty-ws" | null;
282
+ terminalTransport: "pty-ws" | "relay-pty" | null;
283
283
  };
284
284
  export type AcknowledgeStreamRequest = {
285
285
  acknowledgeUnredacted?: boolean | undefined;
@@ -375,6 +375,7 @@ export type GoalSpec = {
375
375
  text: string;
376
376
  successCriteria?: string | undefined;
377
377
  maxAutoContinuations?: number | undefined;
378
+ mutationPolicy?: SessionGoalMutationPolicy | undefined;
378
379
  };
379
380
  export type SessionMcpServerInput = {
380
381
  id: string;
@@ -469,6 +470,20 @@ export type OpenGeniSlackBotInstallRequest = {
469
470
  /** Existing OpenGeni Slack bot connection to reinstall in place. */
470
471
  connectionId?: string | undefined;
471
472
  };
473
+ export type FikenInstallRequest = {
474
+ apiToken: string;
475
+ defaultCompanySlug?: string | undefined;
476
+ /** Existing Fiken connection to rewrite in place (reconnect). */
477
+ connectionId?: string | undefined;
478
+ };
479
+ export type FikenOAuthStartRequest = {
480
+ /** Existing Fiken connection to re-authorize in place (reconnect). */
481
+ connectionId?: string | undefined;
482
+ };
483
+ export type FikenOAuthStartResponse = {
484
+ authorizationUrl: string;
485
+ expiresAt: string;
486
+ };
472
487
  export type OpenGeniSlackBotInstallStart = {
473
488
  authorizationUrl: string;
474
489
  expiresAt: string;
@@ -804,6 +819,8 @@ export type Session = {
804
819
  environmentId: string | null;
805
820
  rigId: string | null;
806
821
  rigVersionId: string | null;
822
+ /** Workspace channel the session is filed under; null = unfiled (inbox). */
823
+ channelId: string | null;
807
824
  firstPartyMcpPermissions: string[] | null;
808
825
  firstPartyMcpTools: FirstPartyMcpToolName[];
809
826
  mcpServers: SessionMcpServerMetadata[];
@@ -1037,7 +1054,7 @@ export type SessionHumanInputRequest = {
1037
1054
  createdAt: string;
1038
1055
  updatedAt: string;
1039
1056
  };
1040
- export declare const SESSION_EVENT_TYPES: readonly ["session.created", "session.event.envelope_omitted", "session.status.changed", "session.realtime.started", "session.realtime.ended", "session.requiresAction", "session.humanInput.requested", "session.context.compaction.requested", "session.context.compaction.started", "session.context.compacted", "session.context.compaction.skipped", "session.context.cleared", "user.message", "user.pause", "user.approvalDecision", "user.humanInputResponse", "turn.queued", "turn.started", "turn.completed", "turn.failed", "turn.cancelled", "turn.superseded", "turn.recovery.requested", "turn.capacity_waiting", "agent.message.delta", "agent.message.completed", "agent.reasoning.delta", "agent.toolCall.created", "agent.toolCall.output", "agent.model.request", "agent.model.usage", "tool.auth_needed", "credential.auth_needed", "agent.updated", "rig.setup.started", "rig.setup.completed", "rig.setup.skipped", "rig.setup.failed", "sandbox.operation.started", "sandbox.operation.completed", "sandbox.operation.failed", "sandbox.command.output.delta", "artifact.created", "goal.set", "goal.updated", "goal.completed", "goal.paused", "goal.resumed", "goal.cleared", "goal.continuation", "system.update.pending", "system.update.delivered", "system.update.superseded", "system.update.cancelled", "system.update.settled", "session.control.paused", "session.control.resumed", "session.control.steer_requested", "workspace.inference.paused", "workspace.inference.resumed", "session.queue.changed", "session.queue.prompt.cancelled", "session.queue.history", "turn.event.rejected_late", "memory.saved", "memory.corrected", "stream.url.rotated", "stream.opened", "stream.closed", "stream.revoked", "recording.started", "recording.available", "recording.failed", "fs.changed", "git.changed", "terminal.pty.started", "terminal.pty.output.delta", "terminal.pty.exited", "session.title_set", "session.mcp.approval_policy.updated", "session.tool_policy.updated", "codex.account.switched", "codex.credential.selected", "codex.fleet.decision", "codex.capacity.waiting", "codex.capacity.resumed", "codex.capacity.superseded", "sandbox.box.created", "sandbox.box.lost", "sandbox.box.terminated", "sandbox.box.snapshot", "sandbox.env.drift", "session.route.reconciled", "workspace.revision.captured", "workspace.revision.degraded", "machine.op.failed", "machine.op.recovered", "machine.link.lost", "machine.link.restored", "machine.runner.restarted"];
1057
+ export declare const SESSION_EVENT_TYPES: readonly ["session.created", "session.event.envelope_omitted", "session.status.changed", "session.realtime.started", "session.realtime.ended", "session.requiresAction", "session.humanInput.requested", "session.context.compaction.requested", "session.context.compaction.started", "session.context.compacted", "session.context.compaction.skipped", "session.context.cleared", "user.message", "user.pause", "user.approvalDecision", "user.humanInputResponse", "turn.queued", "turn.started", "turn.completed", "turn.failed", "turn.cancelled", "turn.superseded", "turn.recovery.requested", "turn.capacity_waiting", "agent.message.delta", "agent.message.completed", "agent.reasoning.delta", "agent.toolCall.created", "agent.toolCall.output", "agent.model.request", "agent.model.usage", "tool.auth_needed", "credential.auth_needed", "agent.updated", "rig.setup.started", "rig.setup.completed", "rig.setup.skipped", "rig.setup.failed", "sandbox.operation.started", "sandbox.operation.completed", "sandbox.operation.failed", "sandbox.command.output.delta", "artifact.created", "goal.set", "goal.updated", "goal.progress", "goal.rewrite.proposed", "goal.rewrite.rejected", "goal.completed", "goal.paused", "goal.resumed", "goal.cleared", "goal.continuation", "system.update.pending", "system.update.delivered", "system.update.superseded", "system.update.cancelled", "system.update.settled", "session.control.paused", "session.control.resumed", "session.control.steer_requested", "workspace.inference.paused", "workspace.inference.resumed", "session.queue.changed", "session.queue.prompt.cancelled", "session.queue.history", "turn.event.rejected_late", "memory.saved", "memory.corrected", "stream.url.rotated", "stream.opened", "stream.closed", "stream.revoked", "recording.started", "recording.available", "recording.failed", "fs.changed", "git.changed", "terminal.pty.started", "terminal.pty.output.delta", "terminal.pty.exited", "session.title_set", "session.visibility.changed", "session.mcp.approval_policy.updated", "session.tool_policy.updated", "codex.account.switched", "codex.credential.selected", "codex.fleet.decision", "codex.capacity.waiting", "codex.capacity.resumed", "codex.capacity.superseded", "sandbox.box.created", "sandbox.box.lost", "sandbox.box.terminated", "sandbox.box.snapshot", "sandbox.env.drift", "session.route.reconciled", "workspace.revision.captured", "workspace.revision.degraded", "machine.op.failed", "machine.op.recovered", "machine.link.lost", "machine.link.restored", "machine.runner.restarted"];
1041
1058
  export type KnownSessionEventType = (typeof SESSION_EVENT_TYPES)[number];
1042
1059
  /**
1043
1060
  * Event types the SDK knows about today, kept open so a newer OpenGeni server
@@ -1845,7 +1862,7 @@ export type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
1845
1862
  * can introduce permissions without breaking older SDK consumers.
1846
1863
  */
1847
1864
  export type Permission = KnownPermission | (string & {});
1848
- export type FirstPartyMcpToolName = "set_session_title" | "goal_set" | "goal_update" | "goal_complete" | "goal_pause" | "memory_search" | "memory_save" | "memory_correct" | "preference_registry_summary" | "preference_registry_get" | "sandboxes_list" | "sandbox_attach" | "sandbox_swap" | "run_on" | "sandbox_provision" | "connected_machine_remove" | "rig_list" | "rig_get" | "rig_propose_change" | "rig_verify" | "rig_promote" | "sessions_list" | "session_get" | "session_events" | "session_create" | "session_send_message" | "session_pause" | "session_resume" | "session_steer" | "set_other_session_title" | "interaction_discover" | "browser_open" | "browser_tabs" | "browser_observe" | "browser_act" | "browser_debug" | "browser_identity" | "browser_publish" | "browser_lifecycle" | "computer_open" | "computer_targets" | "computer_observe" | "computer_act" | "computer_lifecycle" | "variable_set_list" | "environment_list" | "variable_set_get_variable" | "variable_set_set_variable" | "environment_set_variable" | "capability_catalog_search" | "capability_authorization_request" | "github_connect_link" | "github_repositories_list" | "social_connections_list" | "social_posts_recent" | "social_daily_analysis_context" | "social_search_live" | "social_mentions_live" | "social_thread_fetch" | "social_posts_sync" | "social_post_reply" | "x_accounts_list" | "x_search_live" | "x_mentions_live" | "x_thread_fetch" | "x_posts_sync" | "x_post_reply" | "reddit_accounts_list" | "reddit_search_live" | "reddit_mentions_live" | "reddit_thread_fetch" | "reddit_posts_sync" | "reddit_post_reply" | "scheduled_tasks_list" | "scheduled_tasks_get" | "scheduled_tasks_create" | "scheduled_tasks_update" | "scheduled_tasks_pause" | "scheduled_tasks_resume" | "scheduled_tasks_trigger" | "scheduled_tasks_delete" | "scheduled_task_runs_list" | "slack_bot_list_channels" | "slack_bot_channel_history" | "slack_bot_thread_replies" | "slack_bot_list_users" | "slack_bot_list_files" | "slack_bot_file_info" | "slack_bot_file_content" | "slack_bot_post_message" | "slack_bot_delete_message" | "atlassian_sources_list" | "atlassian_search" | "atlassian_get" | "artifacts_list" | "artifacts_get_source" | "artifacts_create" | "artifacts_publish" | "artifacts_rollback" | "editable_artifact_list" | "editable_artifact_create" | "editable_artifact_import" | "editable_artifact_get" | "editable_artifact_inspect" | "editable_artifact_apply" | "editable_artifact_export" | "editable_artifact_export_status";
1865
+ export type FirstPartyMcpToolName = "set_session_title" | "goal_set" | "goal_update" | "goal_progress" | "goal_complete" | "goal_pause" | "memory_search" | "memory_save" | "memory_correct" | "preference_registry_summary" | "preference_registry_get" | "task_notes_list" | "task_note_save" | "task_note_archive" | "sandboxes_list" | "sandbox_attach" | "sandbox_swap" | "run_on" | "sandbox_provision" | "connected_machine_remove" | "rig_list" | "rig_get" | "rig_propose_change" | "rig_verify" | "rig_promote" | "sessions_list" | "session_get" | "session_events" | "session_create" | "session_send_message" | "session_pause" | "session_resume" | "session_steer" | "set_other_session_title" | "interaction_discover" | "browser_open" | "browser_tabs" | "browser_observe" | "browser_act" | "browser_clipboard" | "browser_debug" | "browser_auth" | "interaction_request_human" | "browser_identity" | "browser_publish" | "browser_lifecycle" | "computer_open" | "computer_targets" | "computer_observe" | "computer_clipboard" | "computer_act" | "computer_lifecycle" | "variable_set_list" | "environment_list" | "variable_set_get_variable" | "variable_set_set_variable" | "environment_set_variable" | "capability_catalog_search" | "capability_authorization_request" | "github_connect_link" | "github_repositories_list" | "social_connections_list" | "social_posts_recent" | "social_daily_analysis_context" | "social_search_live" | "social_mentions_live" | "social_thread_fetch" | "social_posts_sync" | "social_post_reply" | "x_accounts_list" | "x_search_live" | "x_mentions_live" | "x_thread_fetch" | "x_posts_sync" | "x_post_reply" | "reddit_accounts_list" | "reddit_search_live" | "reddit_mentions_live" | "reddit_thread_fetch" | "reddit_posts_sync" | "reddit_post_reply" | "scheduled_tasks_list" | "scheduled_tasks_get" | "scheduled_tasks_create" | "scheduled_tasks_update" | "scheduled_tasks_pause" | "scheduled_tasks_resume" | "scheduled_tasks_trigger" | "scheduled_tasks_delete" | "scheduled_task_runs_list" | "slack_bot_list_channels" | "slack_bot_channel_history" | "slack_bot_thread_replies" | "slack_bot_list_users" | "slack_bot_list_files" | "slack_bot_file_info" | "slack_bot_file_content" | "slack_bot_post_message" | "slack_bot_delete_message" | "fiken_companies_list" | "fiken_contacts_list" | "fiken_contact_create" | "fiken_products_list" | "fiken_invoices_list" | "fiken_invoice_get" | "fiken_invoice_draft_create" | "fiken_bank_accounts_list" | "fiken_purchases_list" | "fiken_sales_list" | "atlassian_sources_list" | "atlassian_search" | "atlassian_get" | "artifacts_list" | "artifacts_get_source" | "artifacts_create" | "artifacts_publish" | "artifacts_rollback" | "editable_artifact_list" | "editable_artifact_create" | "editable_artifact_import" | "editable_artifact_get" | "editable_artifact_inspect" | "editable_artifact_apply" | "editable_artifact_export" | "editable_artifact_export_status";
1849
1866
  export type ProductAccessMode = "local" | "configured" | "managed";
1850
1867
  export type ModelCapabilitySupportV1 = "supported" | "unsupported" | "unknown";
1851
1868
  export type ModelCapabilityStateV1 = {
@@ -1888,7 +1905,7 @@ export type ModelCredentialSourceV1 = {
1888
1905
  mechanism: "api_key" | "azure_ad_bearer";
1889
1906
  } | {
1890
1907
  kind: "connected_subscription";
1891
- provider: "codex";
1908
+ provider: "codex" | "xai";
1892
1909
  } | {
1893
1910
  kind: "workspace_connection";
1894
1911
  mechanism: "api_key";
@@ -1925,7 +1942,7 @@ export type ClientModel = {
1925
1942
  provider: string;
1926
1943
  providerLabel: string;
1927
1944
  api: "responses" | "chat";
1928
- source?: "opengeni" | "codex" | "workspace_gateway" | undefined;
1945
+ source?: "opengeni" | "codex" | "supergrok" | "workspace_gateway" | undefined;
1929
1946
  contextWindowTokens?: number | undefined;
1930
1947
  schemaVersion?: 1 | undefined;
1931
1948
  aliases?: string[] | undefined;
@@ -2169,6 +2186,83 @@ export type CodexConnectPoll = {
2169
2186
  accountId?: string;
2170
2187
  isActive?: boolean;
2171
2188
  };
2189
+ /** Explicit authority of one connected SuperGrok/xAI subscription account. */
2190
+ export type SuperGrokAccountScope = "workspace" | "user";
2191
+ /** Metadata-only connected SuperGrok account. Secret OAuth material never crosses the API. */
2192
+ export type SuperGrokAccount = {
2193
+ id: string;
2194
+ scope: SuperGrokAccountScope;
2195
+ subject: string;
2196
+ email?: string | null;
2197
+ label?: string | null;
2198
+ status: "active" | "needs_relogin" | "error";
2199
+ active: boolean;
2200
+ expiresAt?: string | null;
2201
+ lastRefreshAt?: string | null;
2202
+ lastError?: string | null;
2203
+ allocatorEnabled: boolean;
2204
+ allocatorVersion: number;
2205
+ allocatorUpdatedAt?: string | null;
2206
+ exhaustedUntil?: string | null;
2207
+ quota?: {
2208
+ usedPercent: number | null;
2209
+ periodStart: string | null;
2210
+ periodEnd: string | null;
2211
+ subscriptionTier: string | null;
2212
+ checkedAt: string | null;
2213
+ } | null;
2214
+ };
2215
+ export type SuperGrokRotationSettings = {
2216
+ rotationEnabled: boolean;
2217
+ rotationStrategy: "sharded";
2218
+ activeCredentialId: string | null;
2219
+ };
2220
+ /** GET /supergrok/accounts — visible accounts plus the workspace active pointer. */
2221
+ export type SuperGrokAccountsResponse = {
2222
+ accounts: SuperGrokAccount[];
2223
+ activeAccountId: string | null;
2224
+ settings: SuperGrokRotationSettings;
2225
+ };
2226
+ export type SuperGrokConnectionStatus = {
2227
+ connected: boolean;
2228
+ valid?: boolean;
2229
+ accountCount?: number;
2230
+ models?: ClientModel[];
2231
+ activeAccount?: {
2232
+ id: string;
2233
+ label?: string | null;
2234
+ subject?: string | null;
2235
+ scope: SuperGrokAccountScope;
2236
+ } | null;
2237
+ };
2238
+ /** Workspace is the deliberately simple/default connection authority. */
2239
+ export type SuperGrokConnectStart = {
2240
+ userCode: string;
2241
+ verificationUri: string;
2242
+ verificationUriComplete?: string | null;
2243
+ intervalSeconds: number;
2244
+ expiresInSeconds: number;
2245
+ scope: SuperGrokAccountScope;
2246
+ state: string;
2247
+ };
2248
+ export type SuperGrokConnectPoll = {
2249
+ status: "pending" | "slow_down";
2250
+ intervalSeconds?: number;
2251
+ } | {
2252
+ status: "expired" | "denied";
2253
+ } | {
2254
+ status: "connected";
2255
+ accountId: string;
2256
+ scope: SuperGrokAccountScope;
2257
+ isActive: boolean;
2258
+ email?: string | null;
2259
+ };
2260
+ export type SuperGrokAllocatorUpdate = {
2261
+ allocatorEnabled: boolean;
2262
+ allocatorVersion: number;
2263
+ allocatorUpdatedAt: string | null;
2264
+ changed: boolean;
2265
+ };
2172
2266
  /** Remaining usage/limits for one account. `usage` is the normalized P2 payload. */
2173
2267
  export type CodexUsage = {
2174
2268
  status: "ok" | "limit_reached" | "error" | "no-data";
@@ -2218,6 +2312,11 @@ export type ClientConfig = {
2218
2312
  id: string;
2219
2313
  name: string;
2220
2314
  }[];
2315
+ /** Deployment defaults and hard maximum for built-in OpenGeni session tools. */
2316
+ firstPartyMcpTools?: {
2317
+ default: FirstPartyMcpToolName[];
2318
+ allowed: FirstPartyMcpToolName[];
2319
+ } | undefined;
2221
2320
  fileUploads: {
2222
2321
  enabled: boolean;
2223
2322
  maxSizeBytes: number;
@@ -2348,6 +2447,15 @@ export type AccessContext = {
2348
2447
  defaultAccountId: string | null;
2349
2448
  defaultWorkspaceId: string | null;
2350
2449
  };
2450
+ export type ManagedOrganizationMembership = {
2451
+ id: string;
2452
+ organizationId: string;
2453
+ status: "active";
2454
+ personalWorkspaceId: string;
2455
+ };
2456
+ export type ListManagedOrganizationMembershipsResponse = {
2457
+ memberships: ManagedOrganizationMembership[];
2458
+ };
2351
2459
  export type Workspace = {
2352
2460
  id: string;
2353
2461
  accountId: string;
@@ -2370,6 +2478,8 @@ export type Workspace = {
2370
2478
  };
2371
2479
  export type WorkspaceSettings = {
2372
2480
  memoryEnabled?: boolean | undefined;
2481
+ /** Reversible Memory V1 prompt composition rollout. */
2482
+ memoryPromptMode?: "legacy_standing" | "retrieval_only" | undefined;
2373
2483
  voiceInput?: WorkspaceVoiceInputSettings | undefined;
2374
2484
  transcription?: WorkspaceTranscriptionPolicy | undefined;
2375
2485
  maxNestedAgentDepth?: number | null | undefined;
@@ -2404,6 +2514,7 @@ export type WorkspaceVoiceInputSettings = {
2404
2514
  };
2405
2515
  export type UpdateWorkspaceSettingsRequest = {
2406
2516
  memoryEnabled?: boolean | undefined;
2517
+ memoryPromptMode?: "legacy_standing" | "retrieval_only" | undefined;
2407
2518
  voiceInput?: WorkspaceVoiceInputSettings | undefined;
2408
2519
  transcription?: WorkspaceTranscriptionPolicy | undefined;
2409
2520
  maxNestedAgentDepth?: number | null | undefined;
@@ -2505,6 +2616,32 @@ export type ListSlackUserLinkAccessRequestsResponse = {
2505
2616
  };
2506
2617
  export type SessionGoalStatus = "active" | "paused" | "completed";
2507
2618
  export type SessionGoalCreatedBy = "api" | "agent" | "scheduled_task";
2619
+ export type SessionGoalMutationPolicy = "review_changes" | "preserve_intent" | "autonomous_adaptation";
2620
+ export type SessionGoalChangeKind = "refinement" | "adaptation" | "replacement";
2621
+ export type SessionGoalRevision = {
2622
+ id: string;
2623
+ accountId: string;
2624
+ workspaceId: string;
2625
+ sessionId: string;
2626
+ goalId: string;
2627
+ disposition: "applied" | "proposed" | "rejected";
2628
+ changeKind: SessionGoalChangeKind;
2629
+ baseObjectiveRevision: number;
2630
+ resultObjectiveRevision: number | null;
2631
+ text: string;
2632
+ successCriteria: string | null;
2633
+ mutationPolicy: SessionGoalMutationPolicy;
2634
+ rationale: string;
2635
+ actor: "agent" | "api" | "scheduled_task";
2636
+ actorTurnId: string | null;
2637
+ actorAttemptId: string | null;
2638
+ proposalId: string | null;
2639
+ createdAt: string;
2640
+ };
2641
+ export type ApplySessionGoalRevisionRequest = {
2642
+ expectedObjectiveRevision: number;
2643
+ rationale?: string | undefined;
2644
+ };
2508
2645
  export type SessionGoalContinuationState = "inactive" | "scheduled" | "running" | "blocked" | "invariant_broken";
2509
2646
  export type SessionGoalContinuationReason = "goal_inactive" | "wake_pending" | "continuation_pending" | "human_work_pending" | "goal_turn_running" | "human_turn_running" | "workstream_paused" | "approval_required" | "provider_backpressure" | "session_cancelled" | "system_work_pending" | "missing_obligation";
2510
2647
  export type SessionGoalContinuation = {
@@ -2528,6 +2665,8 @@ export type SessionGoal = {
2528
2665
  pausedReason: string | null;
2529
2666
  createdBy: SessionGoalCreatedBy;
2530
2667
  version: number;
2668
+ objectiveRevision: number;
2669
+ mutationPolicy: SessionGoalMutationPolicy;
2531
2670
  autoContinuations: number;
2532
2671
  noProgressStreak: number;
2533
2672
  maxAutoContinuations: number | null;
@@ -2540,6 +2679,12 @@ export type SessionGoal = {
2540
2679
  export type UpdateSessionGoalRequest = {
2541
2680
  status: "paused" | "active";
2542
2681
  rationale?: string | undefined;
2682
+ } | {
2683
+ text: string;
2684
+ successCriteria?: string | null | undefined;
2685
+ mutationPolicy?: SessionGoalMutationPolicy | undefined;
2686
+ rationale: string;
2687
+ expectedObjectiveRevision: number;
2543
2688
  };
2544
2689
  export type UpdateSessionRequest = {
2545
2690
  title: string;
@@ -2949,6 +3094,32 @@ export type RigVerificationHealth = {
2949
3094
  checkHealth: "passing" | "failing" | "unknown";
2950
3095
  lastVerifiedAt: string | null;
2951
3096
  };
3097
+ /**
3098
+ * Workspace-shared channel organizing root sessions ("workstreams") by work
3099
+ * type in the rail. Pure organizational metadata.
3100
+ */
3101
+ export type Channel = {
3102
+ id: string;
3103
+ accountId: string;
3104
+ workspaceId: string;
3105
+ name: string;
3106
+ description: string | null;
3107
+ createdBy: string | null;
3108
+ createdAt: string;
3109
+ updatedAt: string;
3110
+ };
3111
+ export type CreateChannelRequest = {
3112
+ name: string;
3113
+ description?: string;
3114
+ };
3115
+ export type UpdateChannelRequest = {
3116
+ name?: string;
3117
+ description?: string | null;
3118
+ };
3119
+ /** Re-files one session; null moves it back to the unfiled inbox. */
3120
+ export type UpdateSessionChannelRequest = {
3121
+ channelId: string | null;
3122
+ };
2952
3123
  export type Rig = {
2953
3124
  id: string;
2954
3125
  accountId: string;
@@ -3118,7 +3289,7 @@ export type UpdateVideoGenerationPolicyRequest = {
3118
3289
  enabledModelIds: string[];
3119
3290
  defaultModelId: string | null;
3120
3291
  };
3121
- export type VideoGenerationFundingSource = "opengeni_credits" | "workspace_gateway";
3292
+ export type VideoGenerationFundingSource = "opengeni_credits" | "workspace_gateway" | "supergrok_subscription";
3122
3293
  export type VideoGenerationFundingOption = {
3123
3294
  source: VideoGenerationFundingSource;
3124
3295
  label: string;
@@ -3514,10 +3685,10 @@ export type CapabilityPackComponentReference = {
3514
3685
  required: boolean;
3515
3686
  } | {
3516
3687
  key: string;
3517
- kind: "feature";
3688
+ kind: "facet";
3518
3689
  capabilityId: string;
3519
3690
  instanceKey: string;
3520
- featureKey: string;
3691
+ facetKey: string;
3521
3692
  bindingKey: string;
3522
3693
  configDigest: string;
3523
3694
  required: boolean;
@@ -3593,10 +3764,10 @@ export type RegisterCapabilityPackRequest = {
3593
3764
  required?: boolean | undefined;
3594
3765
  } | {
3595
3766
  key: string;
3596
- kind: "feature";
3767
+ kind: "facet";
3597
3768
  capabilityId: string;
3598
3769
  instanceKey: string;
3599
- featureKey: string;
3770
+ facetKey: string;
3600
3771
  bindingKey: string;
3601
3772
  configDigest: string;
3602
3773
  required?: boolean | undefined;
@@ -3673,7 +3844,7 @@ export type EnablePackRequest = {
3673
3844
  export type PackComponentResolutionStatus = "ready" | "missing" | "mismatch";
3674
3845
  export type PackComponentResolution = {
3675
3846
  key: string;
3676
- kind: "plugin" | "skill" | "integration" | "feature" | "inline_skill";
3847
+ kind: "plugin" | "skill" | "integration" | "facet" | "inline_skill";
3677
3848
  capabilityId: string;
3678
3849
  required: boolean;
3679
3850
  status: PackComponentResolutionStatus;
@@ -3723,7 +3894,7 @@ export type PackUninstallPreview = {
3723
3894
  installationVersion: number | null;
3724
3895
  components: Array<{
3725
3896
  key: string;
3726
- kind: "plugin" | "skill" | "integration" | "feature" | "inline_skill";
3897
+ kind: "plugin" | "skill" | "integration" | "facet" | "inline_skill";
3727
3898
  capabilityId: string;
3728
3899
  retainedByOtherOwners: boolean;
3729
3900
  }>;
@@ -3833,7 +4004,7 @@ export type CapabilityCatalogResponse = {
3833
4004
  };
3834
4005
  export type CreateCapabilityCatalogItemRequest = {
3835
4006
  id?: string | undefined;
3836
- kind: Exclude<CapabilityKind, "pack">;
4007
+ kind: "mcp";
3837
4008
  source?: CapabilitySource | undefined;
3838
4009
  name: string;
3839
4010
  description?: string | undefined;
@@ -3855,14 +4026,6 @@ export type EnableCapabilityRequest = {
3855
4026
  * API (responses expose header names only).
3856
4027
  */
3857
4028
  headers?: Record<string, string> | undefined;
3858
- /**
3859
- * Initial variableSet attachment for kind=pack capabilities — mirrors the
3860
- * dedicated POST /packs/:id/enable body. Required to enable an
3861
- * variableSet.required pack through this unified path; ignored otherwise.
3862
- */
3863
- variableSetId?: string | undefined;
3864
- /** @deprecated use variableSetId */
3865
- environmentId?: string | undefined;
3866
4029
  };
3867
4030
  export type DiscoverMcpCapabilitiesResponse = {
3868
4031
  items: CapabilityCatalogItem[];
@@ -3870,6 +4033,7 @@ export type DiscoverMcpCapabilitiesResponse = {
3870
4033
  sourceUrl: string;
3871
4034
  };
3872
4035
  export type SkillImportSource = "github" | "skills_sh";
4036
+ export type SkillInstallationSource = "library" | "github" | "skills_sh" | "pack";
3873
4037
  export type PreviewSkillImportRequest = {
3874
4038
  url: string;
3875
4039
  };
@@ -3901,6 +4065,11 @@ export type InstallSkillRequest = {
3901
4065
  expectedContentSha256: string;
3902
4066
  expectedInstallationVersion?: number | undefined;
3903
4067
  };
4068
+ export type InstallLibrarySkillRequest = {
4069
+ expectedVersion: string;
4070
+ expectedContentSha256: string;
4071
+ expectedInstallationVersion?: number | undefined;
4072
+ };
3904
4073
  export type InstalledSkill = {
3905
4074
  capabilityId: string;
3906
4075
  pluginId: string;
@@ -3909,7 +4078,8 @@ export type InstalledSkill = {
3909
4078
  pluginInstallationId: string;
3910
4079
  facetInstallationId: string;
3911
4080
  installationVersion: number;
3912
- source: SkillImportSource;
4081
+ source: SkillInstallationSource;
4082
+ version: string;
3913
4083
  sourceUrl: string;
3914
4084
  sourceCommit: string;
3915
4085
  contentSha256: string;
@@ -3921,6 +4091,32 @@ export type CapabilityComponentOwner = {
3921
4091
  id: string;
3922
4092
  removable: boolean;
3923
4093
  };
4094
+ export type InstalledSkillSummary = {
4095
+ capabilityId: string;
4096
+ pluginKey: string;
4097
+ installationVersion: number;
4098
+ name: string;
4099
+ description: string;
4100
+ category: string;
4101
+ tags: string[];
4102
+ provenance: string;
4103
+ source: SkillInstallationSource;
4104
+ version: string;
4105
+ sourceUrl: string;
4106
+ repositoryUrl: string;
4107
+ sourceCommit: string;
4108
+ sourcePath: string;
4109
+ contentSha256: string;
4110
+ fileCount: number;
4111
+ totalBytes: number;
4112
+ license: string | null;
4113
+ installedAt: string;
4114
+ updatedAt: string;
4115
+ owners: CapabilityComponentOwner[];
4116
+ };
4117
+ export type ListInstalledSkillsResponse = {
4118
+ skills: InstalledSkillSummary[];
4119
+ };
3924
4120
  export type SkillUninstallPreview = {
3925
4121
  capabilityId: string;
3926
4122
  installed: boolean;
@@ -3938,22 +4134,23 @@ export type UninstallSkillResult = {
3938
4134
  remainingOwners: CapabilityComponentOwner[];
3939
4135
  };
3940
4136
  export type ApiIntegrationProtocol = "openapi" | "graphql";
3941
- export type IntegrationFeatureKind = "tools" | "knowledge_source" | "inbound_trigger" | "delivery_destination" | "identity_link";
3942
- export type IntegrationFeatureStatus = "active" | "paused" | "needs_attention" | "disabled";
3943
- export type IntegrationFeatureDefinitionSummary = {
3944
- featureKey: string;
3945
- kind: Exclude<IntegrationFeatureKind, "tools">;
4137
+ export type IntegrationDefinitionProvenance = "curated" | "workspace";
4138
+ export type IntegrationFacetKind = "tools" | "knowledge_source" | "inbound_trigger" | "delivery_destination" | "identity_link";
4139
+ export type IntegrationFacetStatus = "active" | "paused" | "needs_attention" | "disabled";
4140
+ export type IntegrationFacetDefinitionSummary = {
4141
+ facetKey: string;
4142
+ kind: Exclude<IntegrationFacetKind, "tools">;
3946
4143
  configSchema: Record<string, unknown>;
3947
4144
  capabilities: Record<string, unknown>;
3948
4145
  };
3949
- export type IntegrationFeatureBindingSummary = {
4146
+ export type IntegrationFacetBindingSummary = {
3950
4147
  id: string;
3951
- featureKey: string;
3952
- kind: Exclude<IntegrationFeatureKind, "tools">;
4148
+ facetKey: string;
4149
+ kind: Exclude<IntegrationFacetKind, "tools">;
3953
4150
  bindingKey: string;
3954
4151
  displayName: string;
3955
4152
  connectionId: string | null;
3956
- status: IntegrationFeatureStatus;
4153
+ status: IntegrationFacetStatus;
3957
4154
  config: Record<string, unknown>;
3958
4155
  version: number;
3959
4156
  hasCursor: boolean;
@@ -3962,57 +4159,62 @@ export type IntegrationFeatureBindingSummary = {
3962
4159
  createdAt: string;
3963
4160
  updatedAt: string;
3964
4161
  };
3965
- export type IntegrationInstanceFeaturesResponse = {
4162
+ export type IntegrationInstanceFacetsResponse = {
3966
4163
  capabilityId: string;
3967
4164
  instanceKey: string;
3968
4165
  providerDomain: string;
3969
4166
  connectionId: string | null;
3970
- features: {
3971
- definition: IntegrationFeatureDefinitionSummary;
3972
- binding: IntegrationFeatureBindingSummary | null;
4167
+ facets: {
4168
+ definition: IntegrationFacetDefinitionSummary;
4169
+ binding: IntegrationFacetBindingSummary | null;
3973
4170
  }[];
3974
4171
  };
3975
- export type UpsertIntegrationFeatureRequest = {
4172
+ export type UpsertIntegrationFacetRequest = {
3976
4173
  displayName: string;
3977
4174
  config?: Record<string, unknown> | undefined;
3978
4175
  expectedVersion?: number | undefined;
3979
4176
  idempotencyKey: string;
3980
4177
  };
3981
- export type MutateIntegrationFeatureRequest = {
4178
+ export type MutateIntegrationFacetRequest = {
3982
4179
  expectedVersion: number;
3983
4180
  idempotencyKey: string;
3984
4181
  };
3985
- export type IntegrationFeatureMutationResult = {
4182
+ export type IntegrationFacetMutationResult = {
3986
4183
  capabilityId: string;
3987
4184
  instanceKey: string;
3988
- featureKey: string;
4185
+ facetKey: string;
3989
4186
  status: "configured" | "paused" | "active";
3990
- binding: IntegrationFeatureBindingSummary;
4187
+ binding: IntegrationFacetBindingSummary;
3991
4188
  };
3992
- export type IntegrationFeatureRemovalResult = {
4189
+ export type IntegrationFacetRemovalResult = {
3993
4190
  capabilityId: string;
3994
4191
  instanceKey: string;
3995
- featureKey: string;
4192
+ facetKey: string;
3996
4193
  status: "not_configured" | "removed" | "retained_by_other_owners";
3997
- binding: IntegrationFeatureBindingSummary | null;
4194
+ binding: IntegrationFacetBindingSummary | null;
3998
4195
  remainingOwners: CapabilityComponentOwner[];
3999
4196
  };
4000
- export type ApiIntegrationPresetSummary = {
4197
+ export type IntegrationDefinitionSummary = {
4001
4198
  id: string;
4002
4199
  name: string;
4003
4200
  summary: string;
4004
- family: "google" | "microsoft";
4005
4201
  protocol: "openapi";
4006
- providerDomain: string;
4007
- scopes: string[];
4008
- features: IntegrationFeatureDefinitionSummary[];
4202
+ provider: {
4203
+ id: "google" | "microsoft";
4204
+ domain: string;
4205
+ };
4206
+ authentication: {
4207
+ kind: "oauth2";
4208
+ scopes: string[];
4209
+ };
4210
+ facets: IntegrationFacetDefinitionSummary[];
4009
4211
  };
4010
- export type ListApiIntegrationPresetsResponse = {
4011
- presets: ApiIntegrationPresetSummary[];
4212
+ export type ListIntegrationDefinitionsResponse = {
4213
+ definitions: IntegrationDefinitionSummary[];
4012
4214
  };
4013
- export type ApiIntegrationSource = {
4014
- kind: "preset";
4015
- presetId: string;
4215
+ export type IntegrationSource = {
4216
+ kind: "definition";
4217
+ definitionId: string;
4016
4218
  } | {
4017
4219
  kind: "openapi";
4018
4220
  url: string;
@@ -4027,12 +4229,12 @@ export type ApiIntegrationSource = {
4027
4229
  baseUrl?: string | undefined;
4028
4230
  };
4029
4231
  export type PreviewApiIntegrationRequest = {
4030
- source: ApiIntegrationSource;
4232
+ source: IntegrationSource;
4031
4233
  connectionId?: string | undefined;
4032
4234
  ownership?: ConnectionOwnership | undefined;
4033
4235
  };
4034
4236
  export type ApiIntegrationOAuthStartRequest = {
4035
- presetId: string;
4237
+ definitionId: string;
4036
4238
  ownership?: ConnectionOwnership | undefined;
4037
4239
  connectionId?: string | undefined;
4038
4240
  returnPath?: string | undefined;
@@ -4063,10 +4265,10 @@ export type ApiIntegrationToolPreview = {
4063
4265
  deprecated: boolean;
4064
4266
  };
4065
4267
  export type ApiIntegrationPreview = {
4066
- source: ApiIntegrationSource;
4067
- presetId: string | null;
4268
+ source: IntegrationSource;
4269
+ definitionId: string;
4270
+ definitionProvenance: IntegrationDefinitionProvenance;
4068
4271
  protocol: ApiIntegrationProtocol;
4069
- integrationId: string;
4070
4272
  capabilityId: string;
4071
4273
  pluginKey: string;
4072
4274
  serverId: string;
@@ -4085,7 +4287,7 @@ export type ApiIntegrationPreview = {
4085
4287
  warnings: string[];
4086
4288
  };
4087
4289
  export type InstallApiIntegrationRequest = {
4088
- source: ApiIntegrationSource;
4290
+ source: IntegrationSource;
4089
4291
  expectedRevisionId: string;
4090
4292
  expectedContentSha256: string;
4091
4293
  connectionId?: string | undefined;
@@ -4125,7 +4327,8 @@ export type ApiIntegrationInstallationSummary = {
4125
4327
  name: string;
4126
4328
  description: string | null;
4127
4329
  protocol: ApiIntegrationProtocol;
4128
- presetId: string | null;
4330
+ definitionId: string;
4331
+ definitionProvenance: IntegrationDefinitionProvenance;
4129
4332
  providerDomain: string;
4130
4333
  baseUrl: string;
4131
4334
  sourceUrl: string | null;
@@ -4172,7 +4375,7 @@ export type PluginManifestComponent = {
4172
4375
  } | {
4173
4376
  key: string;
4174
4377
  kind: "integration";
4175
- source: ApiIntegrationSource;
4378
+ source: IntegrationSource;
4176
4379
  } | {
4177
4380
  key: string;
4178
4381
  kind: "mcp";
@@ -0,0 +1,14 @@
1
+ import type { WorkspaceInteractionRevisionEvent } from "./interaction.js";
2
+ import { type StreamSessionEventsOptions } from "./stream.js";
3
+ import type { WorkspaceControlEvent } from "./types.js";
4
+ export type WorkspaceLiveEvent = WorkspaceControlEvent | WorkspaceInteractionRevisionEvent;
5
+ export type WorkspaceLiveStreamOptions = Omit<StreamSessionEventsOptions, "after"> & {
6
+ controlAfter?: number;
7
+ interactionAfter?: number;
8
+ };
9
+ export type WorkspaceLiveStreamTransport = {
10
+ openStream: (controlAfter: number, interactionAfter: number, signal: AbortSignal | undefined) => Promise<ReadableStream<Uint8Array>>;
11
+ };
12
+ /** One reconnecting SSE connection with independent durable cursors. */
13
+ export declare function streamWorkspaceLiveEvents(transport: WorkspaceLiveStreamTransport, options?: WorkspaceLiveStreamOptions): AsyncGenerator<WorkspaceLiveEvent, void, void>;
14
+ export declare function parseWorkspaceLiveEvent(data: string): WorkspaceLiveEvent | null;