@opengeni/sdk 0.52.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +67 -7
  2. package/dist/artifacts.js +5 -5
  3. package/dist/{chunk-FRJFNDIR.js → chunk-4DV37UUA.js} +6 -2
  4. package/dist/chunk-4DV37UUA.js.map +1 -0
  5. package/dist/{chunk-KIHGPM7H.js → chunk-A5DC5WEM.js} +288 -45
  6. package/dist/chunk-A5DC5WEM.js.map +1 -0
  7. package/dist/{chunk-V5F253OG.js → chunk-GU6JF75T.js} +6 -3
  8. package/dist/chunk-GU6JF75T.js.map +1 -0
  9. package/dist/{chunk-MZWTWOX6.js → chunk-ST5DDKJP.js} +327 -1
  10. package/dist/chunk-ST5DDKJP.js.map +1 -0
  11. package/dist/{chunk-FHI4DFIG.js → chunk-TYZ4JL4J.js} +2 -2
  12. package/dist/{chunk-ILQZR5N6.js → chunk-YGH5P47G.js} +693 -34
  13. package/dist/chunk-YGH5P47G.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 +108 -18
  17. package/dist/codex-realtime-controller.d.ts +5 -0
  18. package/dist/codex-realtime-controller.js +2 -2
  19. package/dist/codex-realtime-v3.d.ts +13 -2
  20. package/dist/core.js +7 -7
  21. package/dist/desktop.d.ts +8 -0
  22. package/dist/editable-artifacts.js +4 -4
  23. package/dist/gateway-realtime-transport.d.ts +1 -0
  24. package/dist/gateway-realtime-transport.js +5 -3
  25. package/dist/index.d.ts +6 -2
  26. package/dist/index.js +68 -34
  27. package/dist/index.js.map +1 -1
  28. package/dist/interaction-revision-stream.d.ts +11 -0
  29. package/dist/interaction.d.ts +604 -5
  30. package/dist/interaction.js +27 -1
  31. package/dist/realtime.d.ts +3 -3
  32. package/dist/realtime.js +11 -7
  33. package/dist/realtime.js.map +1 -1
  34. package/dist/types.d.ts +283 -69
  35. package/dist/workspace-live-stream.d.ts +14 -0
  36. package/package.json +2 -2
  37. package/src/client.ts +863 -62
  38. package/src/codex-realtime-controller.ts +239 -12
  39. package/src/codex-realtime-lifecycle.ts +1 -0
  40. package/src/codex-realtime-v3.ts +162 -31
  41. package/src/desktop.ts +11 -1
  42. package/src/errors.ts +16 -2
  43. package/src/gateway-realtime-transport.ts +252 -109
  44. package/src/index.ts +42 -13
  45. package/src/interaction-revision-stream.ts +117 -0
  46. package/src/interaction.ts +1049 -5
  47. package/src/realtime.ts +14 -4
  48. package/src/types.ts +353 -72
  49. package/src/workspace-live-stream.ts +137 -0
  50. package/dist/chunk-DXDL7EEW.js.map +0 -1
  51. package/dist/chunk-FRJFNDIR.js.map +0 -1
  52. package/dist/chunk-ILQZR5N6.js.map +0 -1
  53. package/dist/chunk-KIHGPM7H.js.map +0 -1
  54. package/dist/chunk-MZWTWOX6.js.map +0 -1
  55. package/dist/chunk-V5F253OG.js.map +0 -1
  56. /package/dist/{chunk-FHI4DFIG.js.map → chunk-TYZ4JL4J.js.map} +0 -0
package/src/types.ts CHANGED
@@ -125,6 +125,8 @@ export type SessionRealtimeInboundEntry = {
125
125
  delegationItemId?: string | null | undefined;
126
126
  text?: string | null | undefined;
127
127
  payload?: Record<string, unknown> | undefined;
128
+ /** Model-visible application context attached to this exact realtime message. */
129
+ modelContext?: string | undefined;
128
130
  };
129
131
 
130
132
  export type SyncSessionRealtimeLedgerRequest = {
@@ -148,6 +150,7 @@ export type SyncSessionRealtimeLedgerResponse = {
148
150
 
149
151
  export type SessionRealtimeModel =
150
152
  | "gpt-live-1-boulder-alpha"
153
+ | "supergrok/grok-voice-think-fast-2.0"
151
154
  | "opengeni-gateway/openai/gpt-realtime-2.1"
152
155
  | "opengeni-gateway/openai/gpt-realtime-mini"
153
156
  | "opengeni-gateway/xai/grok-voice-think-fast-2.0"
@@ -158,7 +161,7 @@ export type SessionRealtimeModel =
158
161
  export type WorkspaceRealtimeModelCatalogItem = {
159
162
  id: SessionRealtimeModel;
160
163
  label: string;
161
- provider: "OpenGeni" | "Connected Codex" | "Your Gateway";
164
+ provider: "OpenGeni" | "Connected Codex" | "Connected SuperGrok" | "Your Gateway";
162
165
  description: string;
163
166
  available: boolean;
164
167
  unavailableReason: string | null;
@@ -282,7 +285,7 @@ export type SessionCapabilities = {
282
285
  reason: CapabilityUnavailableReason | null;
283
286
  };
284
287
  Terminal: {
285
- transport: "sse-events" | "pty-ws" | null;
288
+ transport: "sse-events" | "pty-ws" | "relay-pty" | null;
286
289
  ptyCapable: boolean;
287
290
  shell: string;
288
291
  url: string | null;
@@ -416,7 +419,7 @@ export type AttachViewerResponse = ViewerHolder & {
416
419
  terminalUrl: string | null;
417
420
  terminalToken: string | null;
418
421
  terminalExpiresAt: string | null;
419
- terminalTransport: "pty-ws" | null;
422
+ terminalTransport: "pty-ws" | "relay-pty" | null;
420
423
  };
421
424
 
422
425
  // Mirror of `@opengeni/contracts` AcknowledgeStreamRequest/Response — the
@@ -527,6 +530,7 @@ export type GoalSpec = {
527
530
  text: string;
528
531
  successCriteria?: string | undefined;
529
532
  maxAutoContinuations?: number | undefined;
533
+ mutationPolicy?: SessionGoalMutationPolicy | undefined;
530
534
  };
531
535
 
532
536
  export type SessionMcpServerInput = {
@@ -640,6 +644,23 @@ export type OpenGeniSlackBotInstallRequest = {
640
644
  connectionId?: string | undefined;
641
645
  };
642
646
 
647
+ export type FikenInstallRequest = {
648
+ apiToken: string;
649
+ defaultCompanySlug?: string | undefined;
650
+ /** Existing Fiken connection to rewrite in place (reconnect). */
651
+ connectionId?: string | undefined;
652
+ };
653
+
654
+ export type FikenOAuthStartRequest = {
655
+ /** Existing Fiken connection to re-authorize in place (reconnect). */
656
+ connectionId?: string | undefined;
657
+ };
658
+
659
+ export type FikenOAuthStartResponse = {
660
+ authorizationUrl: string;
661
+ expiresAt: string;
662
+ };
663
+
643
664
  export type OpenGeniSlackBotInstallStart = {
644
665
  authorizationUrl: string;
645
666
  expiresAt: string;
@@ -724,8 +745,9 @@ export type GoogleDriveConnectionMetadata = {
724
745
  googleEmail: string;
725
746
  googleDisplayName: string | null;
726
747
  verifiedAt: string;
727
- accessMode: "metadata_readonly" | "readonly";
748
+ accessMode: "file_only" | "metadata_readonly" | "readonly";
728
749
  lifecycle?: GoogleDriveConnectionLifecycle | undefined;
750
+ outputDestination?: GoogleDriveOutputDestination | undefined;
729
751
  documentDestination?: ConnectorDocumentDestination | undefined;
730
752
  selectedSources?: GoogleDriveSelectedSource[] | undefined;
731
753
  /** @deprecated Read selectedSources; retained while existing connections migrate. */
@@ -733,8 +755,17 @@ export type GoogleDriveConnectionMetadata = {
733
755
  [key: string]: unknown;
734
756
  };
735
757
 
758
+ export type GoogleDriveOutputDestination = {
759
+ folderId: string;
760
+ folderName: string;
761
+ driveId: string | null;
762
+ location: "my_drive" | "shared_drive";
763
+ selectedAt: string;
764
+ };
765
+
736
766
  export type GoogleDriveOAuthStartRequest = {
737
767
  connectionId?: string | undefined;
768
+ capability?: "source_read" | "publish" | undefined;
738
769
  };
739
770
 
740
771
  export type GoogleDriveOAuthStartResponse = {
@@ -822,12 +853,18 @@ export type AtlassianConnectionMetadata = {
822
853
  selectedSources: AtlassianSelectedSource[];
823
854
  [key: string]: unknown;
824
855
  };
825
- export type AtlassianOAuthStartResponse = { authorizationUrl: string; expiresAt: string };
856
+ export type AtlassianOAuthStartResponse = {
857
+ authorizationUrl: string;
858
+ expiresAt: string;
859
+ };
826
860
  export type AtlassianLifecycleActionRequest = {
827
861
  action: "pause" | "resume";
828
862
  expectedVersion: number;
829
863
  };
830
- export type AtlassianDisconnectRequest = { expectedVersion: number; idempotencyKey: string };
864
+ export type AtlassianDisconnectRequest = {
865
+ expectedVersion: number;
866
+ idempotencyKey: string;
867
+ };
831
868
  export type AtlassianBrowseItem = {
832
869
  id: string;
833
870
  cloudId: string;
@@ -1028,6 +1065,8 @@ export type Session = {
1028
1065
  // rig-less session. Frozen at create; a later rig promote never moves them.
1029
1066
  rigId: string | null;
1030
1067
  rigVersionId: string | null;
1068
+ /** Workspace channel the session is filed under; null = unfiled (inbox). */
1069
+ channelId: string | null;
1031
1070
  firstPartyMcpPermissions: string[] | null;
1032
1071
  firstPartyMcpTools: FirstPartyMcpToolName[];
1033
1072
  mcpServers: SessionMcpServerMetadata[];
@@ -1104,7 +1143,11 @@ export type AgentTopologySession = {
1104
1143
  parentSessionId: string | null;
1105
1144
  rootSessionId: string;
1106
1145
  nestedAgentDepth: number;
1107
- ancestorPath: Array<{ id: string; title: string | null; titleTruncated: boolean }>;
1146
+ ancestorPath: Array<{
1147
+ id: string;
1148
+ title: string | null;
1149
+ titleTruncated: boolean;
1150
+ }>;
1108
1151
  status: SessionStatus;
1109
1152
  pause: {
1110
1153
  state: "active" | "paused";
@@ -1347,6 +1390,9 @@ export const SESSION_EVENT_TYPES = [
1347
1390
  "artifact.created",
1348
1391
  "goal.set",
1349
1392
  "goal.updated",
1393
+ "goal.progress",
1394
+ "goal.rewrite.proposed",
1395
+ "goal.rewrite.rejected",
1350
1396
  "goal.completed",
1351
1397
  "goal.paused",
1352
1398
  "goal.resumed",
@@ -1386,6 +1432,7 @@ export const SESSION_EVENT_TYPES = [
1386
1432
  "terminal.pty.output.delta",
1387
1433
  "terminal.pty.exited",
1388
1434
  "session.title_set",
1435
+ "session.visibility.changed",
1389
1436
  "session.mcp.approval_policy.updated",
1390
1437
  "session.tool_policy.updated",
1391
1438
  // Multi-account Codex (P1): the session's inference account changed.
@@ -2235,8 +2282,8 @@ export type CreateSessionRequest = {
2235
2282
  initialMessage?: string | undefined;
2236
2283
  /** Create an idle session shell so realtime voice can be the first interaction. */
2237
2284
  startMode?: "realtime" | undefined;
2238
- /** System instructions scoped to the initial turn; never visible timeline text. */
2239
- turnInstructions?: string | undefined;
2285
+ /** Model-visible application context attached to the initial user message; omitted by standard timeline rendering. */
2286
+ modelContext?: string | undefined;
2240
2287
  // Per-session agent persona/system instructions (org-visible metadata, not a
2241
2288
  // secret). Delivered system-level, composed AFTER the per-workspace persona —
2242
2289
  // how a host supplies per-agent-type prompts without leaking them into the
@@ -2354,6 +2401,7 @@ export type FirstPartyMcpToolName =
2354
2401
  | "set_session_title"
2355
2402
  | "goal_set"
2356
2403
  | "goal_update"
2404
+ | "goal_progress"
2357
2405
  | "goal_complete"
2358
2406
  | "goal_pause"
2359
2407
  | "memory_search"
@@ -2361,6 +2409,9 @@ export type FirstPartyMcpToolName =
2361
2409
  | "memory_correct"
2362
2410
  | "preference_registry_summary"
2363
2411
  | "preference_registry_get"
2412
+ | "task_notes_list"
2413
+ | "task_note_save"
2414
+ | "task_note_archive"
2364
2415
  | "sandboxes_list"
2365
2416
  | "sandbox_attach"
2366
2417
  | "sandbox_swap"
@@ -2386,13 +2437,17 @@ export type FirstPartyMcpToolName =
2386
2437
  | "browser_tabs"
2387
2438
  | "browser_observe"
2388
2439
  | "browser_act"
2440
+ | "browser_clipboard"
2389
2441
  | "browser_debug"
2442
+ | "browser_auth"
2443
+ | "interaction_request_human"
2390
2444
  | "browser_identity"
2391
2445
  | "browser_publish"
2392
2446
  | "browser_lifecycle"
2393
2447
  | "computer_open"
2394
2448
  | "computer_targets"
2395
2449
  | "computer_observe"
2450
+ | "computer_clipboard"
2396
2451
  | "computer_act"
2397
2452
  | "computer_lifecycle"
2398
2453
  | "variable_set_list"
@@ -2442,6 +2497,16 @@ export type FirstPartyMcpToolName =
2442
2497
  | "slack_bot_file_content"
2443
2498
  | "slack_bot_post_message"
2444
2499
  | "slack_bot_delete_message"
2500
+ | "fiken_companies_list"
2501
+ | "fiken_contacts_list"
2502
+ | "fiken_contact_create"
2503
+ | "fiken_products_list"
2504
+ | "fiken_invoices_list"
2505
+ | "fiken_invoice_get"
2506
+ | "fiken_invoice_draft_create"
2507
+ | "fiken_bank_accounts_list"
2508
+ | "fiken_purchases_list"
2509
+ | "fiken_sales_list"
2445
2510
  | "atlassian_sources_list"
2446
2511
  | "atlassian_search"
2447
2512
  | "atlassian_get"
@@ -2504,7 +2569,7 @@ export type ModelCapabilitiesV1 = {
2504
2569
 
2505
2570
  export type ModelCredentialSourceV1 =
2506
2571
  | { kind: "deployment"; mechanism: "api_key" | "azure_ad_bearer" }
2507
- | { kind: "connected_subscription"; provider: "codex" }
2572
+ | { kind: "connected_subscription"; provider: "codex" | "xai" }
2508
2573
  | { kind: "workspace_connection"; mechanism: "api_key" };
2509
2574
 
2510
2575
  export type ModelBillingAttributionV1 = {
@@ -2544,7 +2609,7 @@ export type ClientModel = {
2544
2609
  provider: string;
2545
2610
  providerLabel: string;
2546
2611
  api: "responses" | "chat";
2547
- source?: "opengeni" | "codex" | "workspace_gateway" | undefined;
2612
+ source?: "opengeni" | "codex" | "supergrok" | "workspace_gateway" | undefined;
2548
2613
  contextWindowTokens?: number | undefined;
2549
2614
  schemaVersion?: 1 | undefined;
2550
2615
  aliases?: string[] | undefined;
@@ -2826,6 +2891,89 @@ export type CodexConnectPoll =
2826
2891
  isActive?: boolean;
2827
2892
  };
2828
2893
 
2894
+ /** Explicit authority of one connected SuperGrok/xAI subscription account. */
2895
+ export type SuperGrokAccountScope = "workspace" | "user";
2896
+
2897
+ /** Metadata-only connected SuperGrok account. Secret OAuth material never crosses the API. */
2898
+ export type SuperGrokAccount = {
2899
+ id: string;
2900
+ scope: SuperGrokAccountScope;
2901
+ subject: string;
2902
+ email?: string | null;
2903
+ label?: string | null;
2904
+ status: "active" | "needs_relogin" | "error";
2905
+ active: boolean;
2906
+ expiresAt?: string | null;
2907
+ lastRefreshAt?: string | null;
2908
+ lastError?: string | null;
2909
+ allocatorEnabled: boolean;
2910
+ allocatorVersion: number;
2911
+ allocatorUpdatedAt?: string | null;
2912
+ exhaustedUntil?: string | null;
2913
+ quota?: {
2914
+ usedPercent: number | null;
2915
+ periodStart: string | null;
2916
+ periodEnd: string | null;
2917
+ subscriptionTier: string | null;
2918
+ checkedAt: string | null;
2919
+ } | null;
2920
+ };
2921
+
2922
+ export type SuperGrokRotationSettings = {
2923
+ rotationEnabled: boolean;
2924
+ rotationStrategy: "sharded";
2925
+ activeCredentialId: string | null;
2926
+ };
2927
+
2928
+ /** GET /supergrok/accounts — visible accounts plus the workspace active pointer. */
2929
+ export type SuperGrokAccountsResponse = {
2930
+ accounts: SuperGrokAccount[];
2931
+ activeAccountId: string | null;
2932
+ settings: SuperGrokRotationSettings;
2933
+ };
2934
+
2935
+ export type SuperGrokConnectionStatus = {
2936
+ connected: boolean;
2937
+ valid?: boolean;
2938
+ accountCount?: number;
2939
+ models?: ClientModel[];
2940
+ activeAccount?: {
2941
+ id: string;
2942
+ label?: string | null;
2943
+ subject?: string | null;
2944
+ scope: SuperGrokAccountScope;
2945
+ } | null;
2946
+ };
2947
+
2948
+ /** Workspace is the deliberately simple/default connection authority. */
2949
+ export type SuperGrokConnectStart = {
2950
+ userCode: string;
2951
+ verificationUri: string;
2952
+ verificationUriComplete?: string | null;
2953
+ intervalSeconds: number;
2954
+ expiresInSeconds: number;
2955
+ scope: SuperGrokAccountScope;
2956
+ state: string;
2957
+ };
2958
+
2959
+ export type SuperGrokConnectPoll =
2960
+ | { status: "pending" | "slow_down"; intervalSeconds?: number }
2961
+ | { status: "expired" | "denied" }
2962
+ | {
2963
+ status: "connected";
2964
+ accountId: string;
2965
+ scope: SuperGrokAccountScope;
2966
+ isActive: boolean;
2967
+ email?: string | null;
2968
+ };
2969
+
2970
+ export type SuperGrokAllocatorUpdate = {
2971
+ allocatorEnabled: boolean;
2972
+ allocatorVersion: number;
2973
+ allocatorUpdatedAt: string | null;
2974
+ changed: boolean;
2975
+ };
2976
+
2829
2977
  /** Remaining usage/limits for one account. `usage` is the normalized P2 payload. */
2830
2978
  export type CodexUsage = {
2831
2979
  status: "ok" | "limit_reached" | "error" | "no-data";
@@ -2848,7 +2996,7 @@ export type ClientAuthConfig =
2848
2996
 
2849
2997
  // Kept value-identical to @opengeni/contracts and pinned by the SDK contract
2850
2998
  // parity suite. The SDK has no runtime dependency on the Zod contracts package.
2851
- export const OPENGENI_API_CONTRACT_REVISION = "2026-08-social-provider-tools-v1" as const;
2999
+ export const OPENGENI_API_CONTRACT_REVISION = "2026-08-model-context-v1" as const;
2852
3000
  export const OPENGENI_API_CONTRACT_HEADER = "x-opengeni-api-contract" as const;
2853
3001
  /** Bounded request/response identifier shared by browser, ingress, and API diagnostics. */
2854
3002
  export const OPENGENI_CORRELATION_HEADER = "x-opengeni-correlation-id" as const;
@@ -2870,6 +3018,13 @@ export type ClientConfig = {
2870
3018
  defaultReasoningEffort: ReasoningEffort;
2871
3019
  allowedReasoningEfforts: ReasoningEffort[];
2872
3020
  mcpServers: { id: string; name: string }[];
3021
+ /** Deployment defaults and hard maximum for built-in OpenGeni session tools. */
3022
+ firstPartyMcpTools?:
3023
+ | {
3024
+ default: FirstPartyMcpToolName[];
3025
+ allowed: FirstPartyMcpToolName[];
3026
+ }
3027
+ | undefined;
2873
3028
  fileUploads: { enabled: boolean; maxSizeBytes: number };
2874
3029
  /** Native browser microphone capture + server-side transcription capability. */
2875
3030
  voiceInput?: ClientVoiceInputConfig | undefined;
@@ -3040,6 +3195,17 @@ export type AccessContext = {
3040
3195
  defaultWorkspaceId: string | null;
3041
3196
  };
3042
3197
 
3198
+ export type ManagedOrganizationMembership = {
3199
+ id: string;
3200
+ organizationId: string;
3201
+ status: "active";
3202
+ personalWorkspaceId: string;
3203
+ };
3204
+
3205
+ export type ListManagedOrganizationMembershipsResponse = {
3206
+ memberships: ManagedOrganizationMembership[];
3207
+ };
3208
+
3043
3209
  export type Workspace = {
3044
3210
  id: string;
3045
3211
  accountId: string;
@@ -3063,6 +3229,8 @@ export type Workspace = {
3063
3229
 
3064
3230
  export type WorkspaceSettings = {
3065
3231
  memoryEnabled?: boolean | undefined;
3232
+ /** Reversible Memory V1 prompt composition rollout. */
3233
+ memoryPromptMode?: "legacy_standing" | "retrieval_only" | undefined;
3066
3234
  voiceInput?: WorkspaceVoiceInputSettings | undefined;
3067
3235
  transcription?: WorkspaceTranscriptionPolicy | undefined;
3068
3236
  maxNestedAgentDepth?: number | null | undefined;
@@ -3097,6 +3265,7 @@ export type WorkspaceVoiceInputSettings = {
3097
3265
 
3098
3266
  export type UpdateWorkspaceSettingsRequest = {
3099
3267
  memoryEnabled?: boolean | undefined;
3268
+ memoryPromptMode?: "legacy_standing" | "retrieval_only" | undefined;
3100
3269
  voiceInput?: WorkspaceVoiceInputSettings | undefined;
3101
3270
  transcription?: WorkspaceTranscriptionPolicy | undefined;
3102
3271
  maxNestedAgentDepth?: number | null | undefined;
@@ -3229,6 +3398,39 @@ export type SessionGoalStatus = "active" | "paused" | "completed";
3229
3398
 
3230
3399
  export type SessionGoalCreatedBy = "api" | "agent" | "scheduled_task";
3231
3400
 
3401
+ export type SessionGoalMutationPolicy =
3402
+ | "review_changes"
3403
+ | "preserve_intent"
3404
+ | "autonomous_adaptation";
3405
+
3406
+ export type SessionGoalChangeKind = "refinement" | "adaptation" | "replacement";
3407
+
3408
+ export type SessionGoalRevision = {
3409
+ id: string;
3410
+ accountId: string;
3411
+ workspaceId: string;
3412
+ sessionId: string;
3413
+ goalId: string;
3414
+ disposition: "applied" | "proposed" | "rejected";
3415
+ changeKind: SessionGoalChangeKind;
3416
+ baseObjectiveRevision: number;
3417
+ resultObjectiveRevision: number | null;
3418
+ text: string;
3419
+ successCriteria: string | null;
3420
+ mutationPolicy: SessionGoalMutationPolicy;
3421
+ rationale: string;
3422
+ actor: "agent" | "api" | "scheduled_task";
3423
+ actorTurnId: string | null;
3424
+ actorAttemptId: string | null;
3425
+ proposalId: string | null;
3426
+ createdAt: string;
3427
+ };
3428
+
3429
+ export type ApplySessionGoalRevisionRequest = {
3430
+ expectedObjectiveRevision: number;
3431
+ rationale?: string | undefined;
3432
+ };
3433
+
3232
3434
  export type SessionGoalContinuationState =
3233
3435
  | "inactive"
3234
3436
  | "scheduled"
@@ -3272,6 +3474,8 @@ export type SessionGoal = {
3272
3474
  pausedReason: string | null;
3273
3475
  createdBy: SessionGoalCreatedBy;
3274
3476
  version: number;
3477
+ objectiveRevision: number;
3478
+ mutationPolicy: SessionGoalMutationPolicy;
3275
3479
  autoContinuations: number;
3276
3480
  noProgressStreak: number;
3277
3481
  maxAutoContinuations: number | null;
@@ -3282,10 +3486,18 @@ export type SessionGoal = {
3282
3486
  updatedAt: string;
3283
3487
  };
3284
3488
 
3285
- export type UpdateSessionGoalRequest = {
3286
- status: "paused" | "active";
3287
- rationale?: string | undefined;
3288
- };
3489
+ export type UpdateSessionGoalRequest =
3490
+ | {
3491
+ status: "paused" | "active";
3492
+ rationale?: string | undefined;
3493
+ }
3494
+ | {
3495
+ text: string;
3496
+ successCriteria?: string | null | undefined;
3497
+ mutationPolicy?: SessionGoalMutationPolicy | undefined;
3498
+ rationale: string;
3499
+ expectedObjectiveRevision: number;
3500
+ };
3289
3501
 
3290
3502
  export type UpdateSessionRequest = {
3291
3503
  title: string;
@@ -3790,6 +4002,36 @@ export type RigVerificationHealth = {
3790
4002
  lastVerifiedAt: string | null;
3791
4003
  };
3792
4004
 
4005
+ /**
4006
+ * Workspace-shared channel organizing root sessions ("workstreams") by work
4007
+ * type in the rail. Pure organizational metadata.
4008
+ */
4009
+ export type Channel = {
4010
+ id: string;
4011
+ accountId: string;
4012
+ workspaceId: string;
4013
+ name: string;
4014
+ description: string | null;
4015
+ createdBy: string | null;
4016
+ createdAt: string;
4017
+ updatedAt: string;
4018
+ };
4019
+
4020
+ export type CreateChannelRequest = {
4021
+ name: string;
4022
+ description?: string;
4023
+ };
4024
+
4025
+ export type UpdateChannelRequest = {
4026
+ name?: string;
4027
+ description?: string | null;
4028
+ };
4029
+
4030
+ /** Re-files one session; null moves it back to the unfiled inbox. */
4031
+ export type UpdateSessionChannelRequest = {
4032
+ channelId: string | null;
4033
+ };
4034
+
3793
4035
  export type Rig = {
3794
4036
  id: string;
3795
4037
  accountId: string;
@@ -4008,7 +4250,10 @@ export type UpdateVideoGenerationPolicyRequest = {
4008
4250
  defaultModelId: string | null;
4009
4251
  };
4010
4252
 
4011
- export type VideoGenerationFundingSource = "opengeni_credits" | "workspace_gateway";
4253
+ export type VideoGenerationFundingSource =
4254
+ | "opengeni_credits"
4255
+ | "workspace_gateway"
4256
+ | "supergrok_subscription";
4012
4257
 
4013
4258
  export type VideoGenerationFundingOption = {
4014
4259
  source: VideoGenerationFundingSource;
@@ -4502,10 +4747,10 @@ export type CapabilityPackComponentReference =
4502
4747
  }
4503
4748
  | {
4504
4749
  key: string;
4505
- kind: "feature";
4750
+ kind: "facet";
4506
4751
  capabilityId: string;
4507
4752
  instanceKey: string;
4508
- featureKey: string;
4753
+ facetKey: string;
4509
4754
  bindingKey: string;
4510
4755
  configDigest: string;
4511
4756
  required: boolean;
@@ -4591,10 +4836,10 @@ export type RegisterCapabilityPackRequest = {
4591
4836
  }
4592
4837
  | {
4593
4838
  key: string;
4594
- kind: "feature";
4839
+ kind: "facet";
4595
4840
  capabilityId: string;
4596
4841
  instanceKey: string;
4597
- featureKey: string;
4842
+ facetKey: string;
4598
4843
  bindingKey: string;
4599
4844
  configDigest: string;
4600
4845
  required?: boolean | undefined;
@@ -4689,7 +4934,7 @@ export type PackComponentResolutionStatus = "ready" | "missing" | "mismatch";
4689
4934
 
4690
4935
  export type PackComponentResolution = {
4691
4936
  key: string;
4692
- kind: "plugin" | "skill" | "integration" | "feature" | "inline_skill";
4937
+ kind: "plugin" | "skill" | "integration" | "facet" | "inline_skill";
4693
4938
  capabilityId: string;
4694
4939
  required: boolean;
4695
4940
  status: PackComponentResolutionStatus;
@@ -4744,7 +4989,7 @@ export type PackUninstallPreview = {
4744
4989
  installationVersion: number | null;
4745
4990
  components: Array<{
4746
4991
  key: string;
4747
- kind: "plugin" | "skill" | "integration" | "feature" | "inline_skill";
4992
+ kind: "plugin" | "skill" | "integration" | "facet" | "inline_skill";
4748
4993
  capabilityId: string;
4749
4994
  retainedByOtherOwners: boolean;
4750
4995
  }>;
@@ -4901,7 +5146,7 @@ export type CapabilityCatalogResponse = {
4901
5146
 
4902
5147
  export type CreateCapabilityCatalogItemRequest = {
4903
5148
  id?: string | undefined;
4904
- kind: Exclude<CapabilityKind, "pack">;
5149
+ kind: "mcp";
4905
5150
  source?: CapabilitySource | undefined;
4906
5151
  name: string;
4907
5152
  description?: string | undefined;
@@ -4924,14 +5169,6 @@ export type EnableCapabilityRequest = {
4924
5169
  * API (responses expose header names only).
4925
5170
  */
4926
5171
  headers?: Record<string, string> | undefined;
4927
- /**
4928
- * Initial variableSet attachment for kind=pack capabilities — mirrors the
4929
- * dedicated POST /packs/:id/enable body. Required to enable an
4930
- * variableSet.required pack through this unified path; ignored otherwise.
4931
- */
4932
- variableSetId?: string | undefined;
4933
- /** @deprecated use variableSetId */
4934
- environmentId?: string | undefined;
4935
5172
  };
4936
5173
 
4937
5174
  export type DiscoverMcpCapabilitiesResponse = {
@@ -4942,6 +5179,8 @@ export type DiscoverMcpCapabilitiesResponse = {
4942
5179
 
4943
5180
  export type SkillImportSource = "github" | "skills_sh";
4944
5181
 
5182
+ export type SkillInstallationSource = "library" | "github" | "skills_sh" | "pack";
5183
+
4945
5184
  export type PreviewSkillImportRequest = {
4946
5185
  url: string;
4947
5186
  };
@@ -4977,6 +5216,12 @@ export type InstallSkillRequest = {
4977
5216
  expectedInstallationVersion?: number | undefined;
4978
5217
  };
4979
5218
 
5219
+ export type InstallLibrarySkillRequest = {
5220
+ expectedVersion: string;
5221
+ expectedContentSha256: string;
5222
+ expectedInstallationVersion?: number | undefined;
5223
+ };
5224
+
4980
5225
  export type InstalledSkill = {
4981
5226
  capabilityId: string;
4982
5227
  pluginId: string;
@@ -4985,7 +5230,8 @@ export type InstalledSkill = {
4985
5230
  pluginInstallationId: string;
4986
5231
  facetInstallationId: string;
4987
5232
  installationVersion: number;
4988
- source: SkillImportSource;
5233
+ source: SkillInstallationSource;
5234
+ version: string;
4989
5235
  sourceUrl: string;
4990
5236
  sourceCommit: string;
4991
5237
  contentSha256: string;
@@ -4999,6 +5245,34 @@ export type CapabilityComponentOwner = {
4999
5245
  removable: boolean;
5000
5246
  };
5001
5247
 
5248
+ export type InstalledSkillSummary = {
5249
+ capabilityId: string;
5250
+ pluginKey: string;
5251
+ installationVersion: number;
5252
+ name: string;
5253
+ description: string;
5254
+ category: string;
5255
+ tags: string[];
5256
+ provenance: string;
5257
+ source: SkillInstallationSource;
5258
+ version: string;
5259
+ sourceUrl: string;
5260
+ repositoryUrl: string;
5261
+ sourceCommit: string;
5262
+ sourcePath: string;
5263
+ contentSha256: string;
5264
+ fileCount: number;
5265
+ totalBytes: number;
5266
+ license: string | null;
5267
+ installedAt: string;
5268
+ updatedAt: string;
5269
+ owners: CapabilityComponentOwner[];
5270
+ };
5271
+
5272
+ export type ListInstalledSkillsResponse = {
5273
+ skills: InstalledSkillSummary[];
5274
+ };
5275
+
5002
5276
  export type SkillUninstallPreview = {
5003
5277
  capabilityId: string;
5004
5278
  installed: boolean;
@@ -5019,31 +5293,32 @@ export type UninstallSkillResult = {
5019
5293
  };
5020
5294
 
5021
5295
  export type ApiIntegrationProtocol = "openapi" | "graphql";
5296
+ export type IntegrationDefinitionProvenance = "curated" | "workspace";
5022
5297
 
5023
- export type IntegrationFeatureKind =
5298
+ export type IntegrationFacetKind =
5024
5299
  | "tools"
5025
5300
  | "knowledge_source"
5026
5301
  | "inbound_trigger"
5027
5302
  | "delivery_destination"
5028
5303
  | "identity_link";
5029
5304
 
5030
- export type IntegrationFeatureStatus = "active" | "paused" | "needs_attention" | "disabled";
5305
+ export type IntegrationFacetStatus = "active" | "paused" | "needs_attention" | "disabled";
5031
5306
 
5032
- export type IntegrationFeatureDefinitionSummary = {
5033
- featureKey: string;
5034
- kind: Exclude<IntegrationFeatureKind, "tools">;
5307
+ export type IntegrationFacetDefinitionSummary = {
5308
+ facetKey: string;
5309
+ kind: Exclude<IntegrationFacetKind, "tools">;
5035
5310
  configSchema: Record<string, unknown>;
5036
5311
  capabilities: Record<string, unknown>;
5037
5312
  };
5038
5313
 
5039
- export type IntegrationFeatureBindingSummary = {
5314
+ export type IntegrationFacetBindingSummary = {
5040
5315
  id: string;
5041
- featureKey: string;
5042
- kind: Exclude<IntegrationFeatureKind, "tools">;
5316
+ facetKey: string;
5317
+ kind: Exclude<IntegrationFacetKind, "tools">;
5043
5318
  bindingKey: string;
5044
5319
  displayName: string;
5045
5320
  connectionId: string | null;
5046
- status: IntegrationFeatureStatus;
5321
+ status: IntegrationFacetStatus;
5047
5322
  config: Record<string, unknown>;
5048
5323
  version: number;
5049
5324
  hasCursor: boolean;
@@ -5053,75 +5328,80 @@ export type IntegrationFeatureBindingSummary = {
5053
5328
  updatedAt: string;
5054
5329
  };
5055
5330
 
5056
- export type IntegrationInstanceFeaturesResponse = {
5331
+ export type IntegrationInstanceFacetsResponse = {
5057
5332
  capabilityId: string;
5058
5333
  instanceKey: string;
5059
5334
  providerDomain: string;
5060
5335
  connectionId: string | null;
5061
- features: {
5062
- definition: IntegrationFeatureDefinitionSummary;
5063
- binding: IntegrationFeatureBindingSummary | null;
5336
+ facets: {
5337
+ definition: IntegrationFacetDefinitionSummary;
5338
+ binding: IntegrationFacetBindingSummary | null;
5064
5339
  }[];
5065
5340
  };
5066
5341
 
5067
- export type UpsertIntegrationFeatureRequest = {
5342
+ export type UpsertIntegrationFacetRequest = {
5068
5343
  displayName: string;
5069
5344
  config?: Record<string, unknown> | undefined;
5070
5345
  expectedVersion?: number | undefined;
5071
5346
  idempotencyKey: string;
5072
5347
  };
5073
5348
 
5074
- export type MutateIntegrationFeatureRequest = {
5349
+ export type MutateIntegrationFacetRequest = {
5075
5350
  expectedVersion: number;
5076
5351
  idempotencyKey: string;
5077
5352
  };
5078
5353
 
5079
- export type IntegrationFeatureMutationResult = {
5354
+ export type IntegrationFacetMutationResult = {
5080
5355
  capabilityId: string;
5081
5356
  instanceKey: string;
5082
- featureKey: string;
5357
+ facetKey: string;
5083
5358
  status: "configured" | "paused" | "active";
5084
- binding: IntegrationFeatureBindingSummary;
5359
+ binding: IntegrationFacetBindingSummary;
5085
5360
  };
5086
5361
 
5087
- export type IntegrationFeatureRemovalResult = {
5362
+ export type IntegrationFacetRemovalResult = {
5088
5363
  capabilityId: string;
5089
5364
  instanceKey: string;
5090
- featureKey: string;
5365
+ facetKey: string;
5091
5366
  status: "not_configured" | "removed" | "retained_by_other_owners";
5092
- binding: IntegrationFeatureBindingSummary | null;
5367
+ binding: IntegrationFacetBindingSummary | null;
5093
5368
  remainingOwners: CapabilityComponentOwner[];
5094
5369
  };
5095
5370
 
5096
- export type ApiIntegrationPresetSummary = {
5371
+ export type IntegrationDefinitionSummary = {
5097
5372
  id: string;
5098
5373
  name: string;
5099
5374
  summary: string;
5100
- family: "google" | "microsoft";
5101
5375
  protocol: "openapi";
5102
- providerDomain: string;
5103
- scopes: string[];
5104
- features: IntegrationFeatureDefinitionSummary[];
5376
+ provider: {
5377
+ id: "google" | "microsoft";
5378
+ domain: string;
5379
+ };
5380
+ authentication: {
5381
+ kind: "oauth2";
5382
+ scopes: string[];
5383
+ };
5384
+ facets: IntegrationFacetDefinitionSummary[];
5105
5385
  };
5106
5386
 
5107
- export type ListApiIntegrationPresetsResponse = {
5108
- presets: ApiIntegrationPresetSummary[];
5387
+ export type ListIntegrationDefinitionsResponse = {
5388
+ definitions: IntegrationDefinitionSummary[];
5109
5389
  };
5110
5390
 
5111
- export type ApiIntegrationSource =
5112
- | { kind: "preset"; presetId: string }
5391
+ export type IntegrationSource =
5392
+ | { kind: "definition"; definitionId: string }
5113
5393
  | { kind: "openapi"; url: string; baseUrl?: string | undefined }
5114
5394
  | { kind: "graphql"; endpoint: string; name?: string | undefined }
5115
5395
  | { kind: "auto"; url: string; baseUrl?: string | undefined };
5116
5396
 
5117
5397
  export type PreviewApiIntegrationRequest = {
5118
- source: ApiIntegrationSource;
5398
+ source: IntegrationSource;
5119
5399
  connectionId?: string | undefined;
5120
5400
  ownership?: ConnectionOwnership | undefined;
5121
5401
  };
5122
5402
 
5123
5403
  export type ApiIntegrationOAuthStartRequest = {
5124
- presetId: string;
5404
+ definitionId: string;
5125
5405
  ownership?: ConnectionOwnership | undefined;
5126
5406
  connectionId?: string | undefined;
5127
5407
  returnPath?: string | undefined;
@@ -5149,10 +5429,10 @@ export type ApiIntegrationToolPreview = {
5149
5429
  };
5150
5430
 
5151
5431
  export type ApiIntegrationPreview = {
5152
- source: ApiIntegrationSource;
5153
- presetId: string | null;
5432
+ source: IntegrationSource;
5433
+ definitionId: string;
5434
+ definitionProvenance: IntegrationDefinitionProvenance;
5154
5435
  protocol: ApiIntegrationProtocol;
5155
- integrationId: string;
5156
5436
  capabilityId: string;
5157
5437
  pluginKey: string;
5158
5438
  serverId: string;
@@ -5172,7 +5452,7 @@ export type ApiIntegrationPreview = {
5172
5452
  };
5173
5453
 
5174
5454
  export type InstallApiIntegrationRequest = {
5175
- source: ApiIntegrationSource;
5455
+ source: IntegrationSource;
5176
5456
  expectedRevisionId: string;
5177
5457
  expectedContentSha256: string;
5178
5458
  connectionId?: string | undefined;
@@ -5214,7 +5494,8 @@ export type ApiIntegrationInstallationSummary = {
5214
5494
  name: string;
5215
5495
  description: string | null;
5216
5496
  protocol: ApiIntegrationProtocol;
5217
- presetId: string | null;
5497
+ definitionId: string;
5498
+ definitionProvenance: IntegrationDefinitionProvenance;
5218
5499
  providerDomain: string;
5219
5500
  baseUrl: string;
5220
5501
  sourceUrl: string | null;
@@ -5261,7 +5542,7 @@ export type UninstallApiIntegrationResult = {
5261
5542
 
5262
5543
  export type PluginManifestComponent =
5263
5544
  | { key: string; kind: "skill"; url: string }
5264
- | { key: string; kind: "integration"; source: ApiIntegrationSource }
5545
+ | { key: string; kind: "integration"; source: IntegrationSource }
5265
5546
  | { key: string; kind: "mcp"; serverId: string };
5266
5547
 
5267
5548
  export type PluginManifest = {
@@ -5737,7 +6018,7 @@ export type UserMessageEventInput = {
5737
6018
  payload: {
5738
6019
  text: string;
5739
6020
  annotations?: SubmittedTimelineAnnotation[] | undefined;
5740
- turnInstructions?: string | undefined;
6021
+ modelContext?: string | undefined;
5741
6022
  resources?: ResourceRef[] | undefined;
5742
6023
  model?: string | undefined;
5743
6024
  reasoningEffort?: ReasoningEffort | undefined;