@opengeni/sdk 0.48.0 → 0.52.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 (99) hide show
  1. package/README.md +93 -1
  2. package/dist/artifact-client.d.ts +20 -2
  3. package/dist/artifacts.d.ts +4 -0
  4. package/dist/artifacts.js +11 -0
  5. package/dist/artifacts.js.map +1 -0
  6. package/dist/chunk-FHI4DFIG.js +128 -0
  7. package/dist/chunk-FHI4DFIG.js.map +1 -0
  8. package/dist/chunk-FRJFNDIR.js +218 -0
  9. package/dist/chunk-FRJFNDIR.js.map +1 -0
  10. package/dist/{chunk-MBGBLVUV.js → chunk-ILQZR5N6.js} +1088 -577
  11. package/dist/chunk-ILQZR5N6.js.map +1 -0
  12. package/dist/chunk-MZWTWOX6.js +661 -0
  13. package/dist/chunk-MZWTWOX6.js.map +1 -0
  14. package/dist/chunk-VWE2QIVO.js +1162 -0
  15. package/dist/chunk-VWE2QIVO.js.map +1 -0
  16. package/dist/chunk-VYCTL62C.js +230 -0
  17. package/dist/chunk-VYCTL62C.js.map +1 -0
  18. package/dist/client.d.ts +150 -16
  19. package/dist/codex-realtime-controller.d.ts +6 -6
  20. package/dist/codex-realtime-lifecycle.d.ts +1 -1
  21. package/dist/codex-realtime-v3.d.ts +3 -3
  22. package/dist/codex-realtime.d.ts +1 -1
  23. package/dist/company-profile.d.ts +100 -0
  24. package/dist/core.d.ts +5 -5
  25. package/dist/core.js +9 -4
  26. package/dist/desktop.d.ts +1 -1
  27. package/dist/editable-artifact-resources.d.ts +96 -0
  28. package/dist/editable-artifacts/browser-session.d.ts +35 -0
  29. package/dist/editable-artifacts/controller.d.ts +60 -0
  30. package/dist/editable-artifacts/errors.d.ts +23 -0
  31. package/dist/editable-artifacts/http-live-transport.d.ts +46 -0
  32. package/dist/editable-artifacts/index.d.ts +19 -0
  33. package/dist/editable-artifacts/pool.d.ts +15 -0
  34. package/dist/editable-artifacts/session.d.ts +96 -0
  35. package/dist/editable-artifacts/storage.d.ts +72 -0
  36. package/dist/editable-artifacts/types.d.ts +416 -0
  37. package/dist/editable-artifacts/worker/browser-client.d.ts +80 -0
  38. package/dist/editable-artifacts/worker/browser-entry.d.ts +6 -0
  39. package/dist/editable-artifacts/worker/kernel-adapter.d.ts +45 -0
  40. package/dist/editable-artifacts/worker/rpc-protocol.d.ts +92 -0
  41. package/dist/editable-artifacts/worker/runtime.d.ts +66 -0
  42. package/dist/editable-artifacts/worker/wire-codec.d.ts +52 -0
  43. package/dist/editable-artifacts-worker.d.ts +8 -0
  44. package/dist/editable-artifacts-worker.js +1708 -0
  45. package/dist/editable-artifacts-worker.js.map +1 -0
  46. package/dist/editable-artifacts.d.ts +6 -0
  47. package/dist/editable-artifacts.js +5954 -0
  48. package/dist/editable-artifacts.js.map +1 -0
  49. package/dist/gateway-realtime-transport.d.ts +1 -1
  50. package/dist/index.d.ts +41 -35
  51. package/dist/index.js +104 -68
  52. package/dist/index.js.map +1 -1
  53. package/dist/interaction.d.ts +885 -0
  54. package/dist/interaction.js +55 -0
  55. package/dist/interaction.js.map +1 -0
  56. package/dist/memory-slack-client.d.ts +13 -0
  57. package/dist/memory-slack-delivery.d.ts +99 -0
  58. package/dist/memory-slack.d.ts +4 -0
  59. package/dist/memory-slack.js +44 -0
  60. package/dist/memory-slack.js.map +1 -0
  61. package/dist/proxy.d.ts +3 -3
  62. package/dist/realtime.d.ts +12 -12
  63. package/dist/retained-artifacts.d.ts +12 -0
  64. package/dist/stream.d.ts +1 -1
  65. package/dist/terminal.d.ts +1 -1
  66. package/dist/types.d.ts +1128 -18
  67. package/dist/workspace-control-stream.d.ts +2 -2
  68. package/dist/workspace-state.d.ts +1 -1
  69. package/package.json +29 -3
  70. package/src/artifact-client.ts +129 -0
  71. package/src/artifacts.ts +17 -0
  72. package/src/client.ts +1511 -200
  73. package/src/company-profile.ts +92 -0
  74. package/src/editable-artifact-resources.ts +119 -0
  75. package/src/editable-artifacts/browser-session.ts +176 -0
  76. package/src/editable-artifacts/controller.ts +2632 -0
  77. package/src/editable-artifacts/errors.ts +52 -0
  78. package/src/editable-artifacts/http-live-transport.ts +1449 -0
  79. package/src/editable-artifacts/index.ts +175 -0
  80. package/src/editable-artifacts/pool.ts +81 -0
  81. package/src/editable-artifacts/session.ts +778 -0
  82. package/src/editable-artifacts/storage.ts +1718 -0
  83. package/src/editable-artifacts/types.ts +499 -0
  84. package/src/editable-artifacts/worker/browser-client.ts +1167 -0
  85. package/src/editable-artifacts/worker/browser-entry.ts +57 -0
  86. package/src/editable-artifacts/worker/kernel-adapter.ts +1039 -0
  87. package/src/editable-artifacts/worker/rpc-protocol.ts +622 -0
  88. package/src/editable-artifacts/worker/runtime.ts +1204 -0
  89. package/src/editable-artifacts/worker/wire-codec.ts +852 -0
  90. package/src/editable-artifacts-worker.ts +8 -0
  91. package/src/editable-artifacts.ts +6 -0
  92. package/src/index.ts +185 -0
  93. package/src/interaction.ts +1830 -0
  94. package/src/memory-slack-client.ts +71 -0
  95. package/src/memory-slack-delivery.ts +128 -0
  96. package/src/memory-slack.ts +19 -0
  97. package/src/retained-artifacts.ts +326 -0
  98. package/src/types.ts +1343 -28
  99. package/dist/chunk-MBGBLVUV.js.map +0 -1
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { WorkspaceTranscriptionPolicy } from "./transcription";
1
+ import type { WorkspaceTranscriptionPolicy } from "./transcription.js";
2
2
  export type CodexRealtimeWebrtcVersion = "v3";
3
3
  export type CodexRealtimeVoice = "juniper" | "maple" | "spruce" | "ember" | "vale" | "breeze" | "arbor" | "sol" | "cove";
4
4
  export type CodexRealtimeWebrtcRequest = {
@@ -189,6 +189,7 @@ export type SessionCapabilities = {
189
189
  shell: string;
190
190
  url: string | null;
191
191
  token: string | null;
192
+ expiresAt: string | null;
192
193
  reason: CapabilityUnavailableReason | null;
193
194
  };
194
195
  Git: {
@@ -255,6 +256,8 @@ export type StreamRevokedPayload = {
255
256
  export type AttachViewerRequest = {
256
257
  viewerId?: string | undefined;
257
258
  desktop?: boolean | undefined;
259
+ terminal?: boolean | undefined;
260
+ files?: boolean | undefined;
258
261
  };
259
262
  export type ViewerHolder = {
260
263
  viewerId: string;
@@ -271,10 +274,11 @@ export type AttachViewerResponse = ViewerHolder & {
271
274
  streamToken: string | null;
272
275
  streamExpiresAt: string | null;
273
276
  resolution: [number, number] | null;
274
- transport: "vnc-ws" | null;
275
- client: "novnc" | null;
277
+ transport: "vnc-ws" | "relay-frames" | null;
278
+ client: "novnc" | "frames" | null;
276
279
  terminalUrl: string | null;
277
280
  terminalToken: string | null;
281
+ terminalExpiresAt: string | null;
278
282
  terminalTransport: "pty-ws" | null;
279
283
  };
280
284
  export type AcknowledgeStreamRequest = {
@@ -318,7 +322,7 @@ export type RepositoryResourceRef = {
318
322
  githubInstallationId?: number | undefined;
319
323
  githubRepositoryId?: number | undefined;
320
324
  };
321
- /** Value mirror of `@opengeni/contracts`; parity-tested without adding an SDK runtime dependency. */
325
+ /** Value mirror of `@opengeni/contracts`; parity-tested without importing it from ordinary SDK entries. */
322
326
  export declare const DEFAULT_FILE_RESOURCE_MOUNT_ROOT: ".opengeni/files";
323
327
  export type FileResourceRef = {
324
328
  kind: "file";
@@ -469,6 +473,30 @@ export type OpenGeniSlackBotInstallStart = {
469
473
  authorizationUrl: string;
470
474
  expiresAt: string;
471
475
  };
476
+ export type SlackInstallationBindingState = "active" | "quarantined";
477
+ export type SlackInstallationBinding = {
478
+ id: string;
479
+ accountId: string;
480
+ accountName: string;
481
+ workspaceId: string;
482
+ workspaceName: string;
483
+ connectionId: string;
484
+ connectionStatus: ConnectionStatus;
485
+ connectionVersion: number;
486
+ slackTeamId: string;
487
+ slackTeamName: string;
488
+ botId: string;
489
+ botUserId: string;
490
+ botDisplayName: "OpenGeni";
491
+ state: SlackInstallationBindingState;
492
+ quarantineReason: string | null;
493
+ version: number;
494
+ createdAt: string;
495
+ updatedAt: string;
496
+ };
497
+ export type ListSlackInstallationBindingsResponse = {
498
+ bindings: SlackInstallationBinding[];
499
+ };
472
500
  export type GoogleDriveTargetScope = "user" | "workspace" | "organization";
473
501
  export type ConnectorDocumentDestinationAuthority = "organization" | "workspace" | "personal";
474
502
  export type ConnectorDocumentDestinationSelection = {
@@ -501,12 +529,14 @@ export type GoogleDriveSelectedSource = {
501
529
  /** @deprecated Missing destinations resolve to the current workspace boundary. */
502
530
  targetScope?: GoogleDriveTargetScope | undefined;
503
531
  syncCadence: GoogleDriveSyncCadence;
532
+ syncEnabled: boolean;
533
+ configGeneration: number;
504
534
  readPolicy: GoogleDriveReadPolicy;
505
535
  selectedAt: string;
506
536
  };
507
537
  export type GoogleDriveConnectionMetadata = {
508
538
  credentialRole: "google_drive_metadata";
509
- credentialLabel: "Google Drive metadata browser";
539
+ credentialLabel: "Google Drive read-only source sync" | "Google Drive metadata browser";
510
540
  googlePermissionId: string;
511
541
  googleEmail: string;
512
542
  googleDisplayName: string | null;
@@ -552,14 +582,111 @@ export type GoogleDriveBrowseResponse = {
552
582
  nextPageToken: string | null;
553
583
  incompleteSearch: boolean;
554
584
  };
585
+ export type AtlassianSourceKind = "jira_project" | "confluence_space";
586
+ export type AtlassianSyncCadence = "manual" | "hourly" | "daily";
587
+ export type AtlassianReadPolicy = "allow" | "ask" | "block";
588
+ export type AtlassianConnectionLifecycle = {
589
+ state: "active" | "paused" | "token_revoked" | "app_removed" | "disconnected" | "reconnect_required" | "reconsent_required";
590
+ recoverable: boolean;
591
+ observedAt: string;
592
+ };
593
+ export type AtlassianSelectedSource = {
594
+ id: string;
595
+ cloudId: string;
596
+ siteName: string;
597
+ siteUrl: string;
598
+ resourceId: string;
599
+ key: string;
600
+ name: string;
601
+ kind: AtlassianSourceKind;
602
+ destination?: ConnectorDocumentDestination | undefined;
603
+ syncCadence: AtlassianSyncCadence;
604
+ syncEnabled: boolean;
605
+ configGeneration: number;
606
+ readPolicy: AtlassianReadPolicy;
607
+ selectedAt: string;
608
+ };
609
+ export type AtlassianConnectionMetadata = {
610
+ credentialRole: "atlassian_knowledge";
611
+ credentialLabel: "Atlassian read-only knowledge sync";
612
+ atlassianAccountId: string;
613
+ displayName: string;
614
+ email?: string | null | undefined;
615
+ sites: Array<{
616
+ cloudId: string;
617
+ name: string;
618
+ url: string;
619
+ products: Array<"jira" | "confluence">;
620
+ }>;
621
+ verifiedAt: string;
622
+ accessMode: "readonly";
623
+ lifecycle?: AtlassianConnectionLifecycle | undefined;
624
+ documentDestination?: ConnectorDocumentDestination | undefined;
625
+ selectedSources: AtlassianSelectedSource[];
626
+ [key: string]: unknown;
627
+ };
628
+ export type AtlassianOAuthStartResponse = {
629
+ authorizationUrl: string;
630
+ expiresAt: string;
631
+ };
632
+ export type AtlassianLifecycleActionRequest = {
633
+ action: "pause" | "resume";
634
+ expectedVersion: number;
635
+ };
636
+ export type AtlassianDisconnectRequest = {
637
+ expectedVersion: number;
638
+ idempotencyKey: string;
639
+ };
640
+ export type AtlassianBrowseItem = {
641
+ id: string;
642
+ cloudId: string;
643
+ siteName: string;
644
+ siteUrl: string;
645
+ resourceId: string;
646
+ key: string;
647
+ name: string;
648
+ kind: AtlassianSourceKind;
649
+ description: string | null;
650
+ webUrl: string;
651
+ };
652
+ export type AtlassianBrowseResponse = {
653
+ connection: ConnectionMetadata;
654
+ items: AtlassianBrowseItem[];
655
+ };
555
656
  export type SaveGoogleDriveSourceRequest = {
556
657
  sources: Array<Pick<GoogleDriveBrowseItem, "id" | "name" | "mimeType" | "driveId">>;
557
658
  destination?: ConnectorDocumentDestinationSelection | undefined;
558
659
  /** @deprecated Legacy requests resolve to workspace authority. */
559
660
  targetScope?: GoogleDriveTargetScope | undefined;
560
661
  syncCadence: GoogleDriveSyncCadence;
662
+ syncEnabled: boolean;
663
+ readPolicy: GoogleDriveReadPolicy;
664
+ };
665
+ export type GoogleDriveKnowledgeSourceItem = {
666
+ id: string;
667
+ name: string;
668
+ mimeType: string;
669
+ driveId?: string | undefined;
670
+ sourceKind: "my_drive" | "shared_drive" | "folder";
671
+ includeDescendants: boolean;
672
+ };
673
+ export type GoogleDriveKnowledgeSourceDestination = {
674
+ authorityKind: ConnectorDocumentDestinationAuthority;
675
+ authorityAccountId: string;
676
+ authorityWorkspaceId?: string | undefined;
677
+ authoritySubjectId?: string | undefined;
678
+ collectionId?: string | undefined;
679
+ };
680
+ export type GoogleDriveKnowledgeSourceConfig = {
681
+ sources: GoogleDriveKnowledgeSourceItem[];
682
+ destination: GoogleDriveKnowledgeSourceDestination;
683
+ syncCadence: GoogleDriveSyncCadence;
561
684
  readPolicy: GoogleDriveReadPolicy;
562
685
  };
686
+ export type SaveGoogleDriveIntegrationSourceRequest = SaveGoogleDriveSourceRequest & {
687
+ expectedVersion?: number | undefined;
688
+ idempotencyKey: string;
689
+ };
563
690
  export type UpdateConnectionRequest = {
564
691
  providerDomain?: string | undefined;
565
692
  subjectId?: string | null | undefined;
@@ -739,6 +866,49 @@ export type SessionListResponse = {
739
866
  sessions: Session[];
740
867
  nextCursor: string | null;
741
868
  };
869
+ /** Compact, bounded session projection for workspace agent-topology browsers. */
870
+ export type AgentTopologySession = {
871
+ id: string;
872
+ title: string | null;
873
+ titleTruncated: boolean;
874
+ parentSessionId: string | null;
875
+ rootSessionId: string;
876
+ nestedAgentDepth: number;
877
+ ancestorPath: Array<{
878
+ id: string;
879
+ title: string | null;
880
+ titleTruncated: boolean;
881
+ }>;
882
+ status: SessionStatus;
883
+ pause: {
884
+ state: "active" | "paused";
885
+ additionalBlockerCount: number;
886
+ source: {
887
+ kind: "session" | "workspace";
888
+ sessionId?: string | undefined;
889
+ displayName: string;
890
+ displayNameTruncated: boolean;
891
+ } | null;
892
+ };
893
+ children: {
894
+ directChildren: number;
895
+ totalDescendants: number;
896
+ runningDescendants: number;
897
+ queuedDescendants: number;
898
+ attentionDescendants: number;
899
+ pausedDescendants: number;
900
+ failedDescendants: number;
901
+ truncated: boolean;
902
+ };
903
+ createdAt: string;
904
+ updatedAt: string;
905
+ };
906
+ export type AgentTopologyPageResponse = {
907
+ sessions: AgentTopologySession[];
908
+ total: number;
909
+ hasMore: boolean;
910
+ nextCursor: string | null;
911
+ };
742
912
  export type UpdateSessionPinRequest = {
743
913
  pinned: boolean;
744
914
  expectedVersion?: number;
@@ -754,6 +924,30 @@ export type SessionLineageResponse = {
754
924
  };
755
925
  export type SessionTurnStatus = "queued" | "running" | "requires_action" | "recovering" | "waiting_capacity" | "completed" | "failed" | "cancelled" | "superseded" | "withdrawn_for_edit";
756
926
  export type SessionTurnSource = "user" | "scheduled_task" | "api" | "goal" | "system" | "compaction";
927
+ export type TimelineAnnotationSourceKind = "user_message" | "assistant_message" | "tool_output";
928
+ export type TimelineAnnotationSourceEventType = "user.message" | "agent.message.completed" | "agent.toolCall.output";
929
+ export type TimelineAnnotationSource = {
930
+ kind: TimelineAnnotationSourceKind;
931
+ eventId: string;
932
+ eventType: TimelineAnnotationSourceEventType;
933
+ sequence: number;
934
+ turnId: string | null;
935
+ startOffset: number;
936
+ endOffset: number;
937
+ contextBefore: string;
938
+ contextAfter: string;
939
+ label?: string | undefined;
940
+ };
941
+ export type DraftTimelineAnnotation = {
942
+ id: string;
943
+ source: TimelineAnnotationSource;
944
+ quote: string;
945
+ note: string;
946
+ };
947
+ export type SubmittedTimelineAnnotation = DraftTimelineAnnotation;
948
+ export type TimelineAnnotation = DraftTimelineAnnotation & {
949
+ ordinal: number;
950
+ };
757
951
  export type SessionTurn = {
758
952
  id: string;
759
953
  workspaceId: string;
@@ -764,6 +958,7 @@ export type SessionTurn = {
764
958
  source: SessionTurnSource;
765
959
  position: number;
766
960
  prompt: string;
961
+ annotations?: TimelineAnnotation[] | undefined;
767
962
  resources: ResourceRef[];
768
963
  tools: ToolRef[];
769
964
  toolsProvided?: boolean | undefined;
@@ -979,6 +1174,15 @@ export type ToolAuthNeededPayload = {
979
1174
  }> | undefined;
980
1175
  authorizationUrl?: string | undefined;
981
1176
  subjectId?: string | null | undefined;
1177
+ capability?: {
1178
+ id: string;
1179
+ name: string;
1180
+ kind: CapabilityKind;
1181
+ source: CapabilitySource;
1182
+ action: "connect" | "add_credentials" | "enable";
1183
+ rationale: string;
1184
+ requiredVariables: string[];
1185
+ } | undefined;
982
1186
  };
983
1187
  export type AgentTextDeltaPayload = {
984
1188
  text: string;
@@ -1227,6 +1431,9 @@ export type GitStatusRequest = {
1227
1431
  export type GitStatusResponse = {
1228
1432
  isRepo: boolean;
1229
1433
  head: string | null;
1434
+ /** Exact commit object identity. null for unborn/non-repositories; absent on
1435
+ * legacy adapters. */
1436
+ headOid?: string | null | undefined;
1230
1437
  detached: boolean;
1231
1438
  upstream: string | null;
1232
1439
  ahead: number;
@@ -1349,6 +1556,9 @@ export type WorkspaceCaptureFile = {
1349
1556
  export type WorkspaceCaptureRepo = {
1350
1557
  root: string;
1351
1558
  head: string | null;
1559
+ /** Exact HEAD commit object identity. null for unborn repositories; absent
1560
+ * on legacy captures. */
1561
+ headOid?: string | null | undefined;
1352
1562
  detached: boolean;
1353
1563
  upstream: string | null;
1354
1564
  ahead: number;
@@ -1493,6 +1703,8 @@ export type ScheduledTaskRunMode = "new_session_per_run" | "reusable_session" |
1493
1703
  export type ScheduledTaskOverlapPolicy = "allow_concurrent" | "skip" | "buffer_one";
1494
1704
  export type ScheduledTaskDayOfWeek = "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY";
1495
1705
  export type ScheduledTaskScheduleSpec = {
1706
+ type: "manual";
1707
+ } | {
1496
1708
  type: "once";
1497
1709
  runAt: string;
1498
1710
  timeZone: string;
@@ -1520,6 +1732,50 @@ export type ScheduledTaskAgentConfig = {
1520
1732
  goal?: GoalSpec | undefined;
1521
1733
  maxNestedAgentDepth?: number | undefined;
1522
1734
  };
1735
+ export type ScopedKnowledgeScope = {
1736
+ kind: "organization";
1737
+ workspaceId: null;
1738
+ subjectId: null;
1739
+ } | {
1740
+ kind: "workspace";
1741
+ workspaceId: string;
1742
+ subjectId: null;
1743
+ } | {
1744
+ kind: "personal";
1745
+ workspaceId: string | null;
1746
+ subjectId: string;
1747
+ };
1748
+ export type KnowledgeSourceSyncLimits = {
1749
+ maxItems: number;
1750
+ maxBytes: number;
1751
+ maxFileBytes: number;
1752
+ maxProviderRequests: number;
1753
+ maxElapsedSeconds: number;
1754
+ maxConcurrency: number;
1755
+ maxFailureDetails: number;
1756
+ };
1757
+ export type ScheduledTaskAction = {
1758
+ kind: "agent_turn";
1759
+ } | {
1760
+ kind: "knowledge_source_sync";
1761
+ sourceId: string;
1762
+ sourceGeneration: number;
1763
+ sourceLifecycleGeneration: number;
1764
+ sourceConfigGeneration: number;
1765
+ controlWorkspaceId: string;
1766
+ providerCoordinationKey: string;
1767
+ connection: {
1768
+ connectionId: string;
1769
+ connectionVersion: number;
1770
+ providerDomain: string;
1771
+ kind: ConnectionKind;
1772
+ ownerSubjectId: string;
1773
+ };
1774
+ destination: ScopedKnowledgeScope;
1775
+ initiatingSubjectId: string;
1776
+ allDescendants: boolean;
1777
+ limits: KnowledgeSourceSyncLimits;
1778
+ };
1523
1779
  export type ScheduledTask = {
1524
1780
  id: string;
1525
1781
  accountId: string;
@@ -1530,6 +1786,7 @@ export type ScheduledTask = {
1530
1786
  temporalScheduleId: string;
1531
1787
  runMode: ScheduledTaskRunMode;
1532
1788
  overlapPolicy: ScheduledTaskOverlapPolicy;
1789
+ action: ScheduledTaskAction;
1533
1790
  agentConfig: ScheduledTaskAgentConfig;
1534
1791
  createdBy?: TurnInitiator | undefined;
1535
1792
  createdByContext?: TurnInitiatorContext | undefined;
@@ -1581,14 +1838,14 @@ export type CreateSessionRequest = {
1581
1838
  groupId: string;
1582
1839
  } | undefined;
1583
1840
  };
1584
- export 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:list", "variable-sets:read", "variable-sets:write", "variable-sets:manage", "variable-sets:use", "secrets:list", "secrets:read", "secrets:write", "mcp_servers:attach", "toolspace:call", "goals:manage", "enrollments:read", "enrollments:manage", "rigs:use", "rigs:manage", "artifacts:read", "artifacts:publish"];
1841
+ export 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:list", "variable-sets:read", "variable-sets:write", "variable-sets:manage", "variable-sets:use", "secrets:list", "secrets:read", "secrets:write", "mcp_servers:attach", "codemode:call", "goals:manage", "enrollments:read", "enrollments:manage", "rigs:use", "rigs:manage", "artifacts:read", "artifacts:publish"];
1585
1842
  export type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
1586
1843
  /**
1587
1844
  * Permissions the SDK knows about today, kept open so a newer OpenGeni server
1588
1845
  * can introduce permissions without breaking older SDK consumers.
1589
1846
  */
1590
1847
  export type Permission = KnownPermission | (string & {});
1591
- 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" | "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" | "variable_set_list" | "environment_list" | "variable_set_get_variable" | "variable_set_set_variable" | "environment_set_variable" | "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" | "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" | "artifacts_list" | "artifacts_get_source" | "artifacts_create" | "artifacts_publish" | "artifacts_rollback";
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";
1592
1849
  export type ProductAccessMode = "local" | "configured" | "managed";
1593
1850
  export type ModelCapabilitySupportV1 = "supported" | "unsupported" | "unknown";
1594
1851
  export type ModelCapabilityStateV1 = {
@@ -1937,7 +2194,7 @@ export type ClientAuthConfig = {
1937
2194
  mode: "managedSession";
1938
2195
  session: "cookie";
1939
2196
  };
1940
- export declare const OPENGENI_API_CONTRACT_REVISION: "2026-07-workspace-artifacts-v1";
2197
+ export declare const OPENGENI_API_CONTRACT_REVISION: "2026-08-social-provider-tools-v1";
1941
2198
  export declare const OPENGENI_API_CONTRACT_HEADER: "x-opengeni-api-contract";
1942
2199
  /** Bounded request/response identifier shared by browser, ingress, and API diagnostics. */
1943
2200
  export declare const OPENGENI_CORRELATION_HEADER: "x-opengeni-correlation-id";
@@ -2125,7 +2382,7 @@ export type WorkspaceSettings = {
2125
2382
  };
2126
2383
  export type WorkspaceSlackReactionSummonSettings = {
2127
2384
  enabled: boolean;
2128
- emoji: string;
2385
+ emoji: "genie";
2129
2386
  channelPolicy: {
2130
2387
  mode: "bot_member";
2131
2388
  } | {
@@ -2216,6 +2473,36 @@ export type UpdateWorkspaceMemberRequest = {
2216
2473
  role?: string | undefined;
2217
2474
  permissions: Permission[];
2218
2475
  };
2476
+ export type SlackUserLinkAccessRequestStatus = "prepared" | "pending" | "completed" | "denied" | "cancelled" | "expired";
2477
+ /** Token-free durable projection of one signed Slack identity-link intent. */
2478
+ export type SlackUserLinkAccessRequest = {
2479
+ id: string;
2480
+ workspaceId: string;
2481
+ workspaceDisplayName: string | null;
2482
+ subjectLabel: string | null;
2483
+ status: SlackUserLinkAccessRequestStatus;
2484
+ version: number;
2485
+ expiresAt: string;
2486
+ requestedAt: string | null;
2487
+ decidedAt: string | null;
2488
+ completedAt: string | null;
2489
+ createdAt: string;
2490
+ updatedAt: string;
2491
+ };
2492
+ export type PrepareSlackUserLinkAccessRequest = {
2493
+ linkToken: string;
2494
+ };
2495
+ export type SlackUserLinkAccessMutationRequest = {
2496
+ expectedVersion: number;
2497
+ idempotencyKey: string;
2498
+ };
2499
+ export type ApproveSlackUserLinkAccessRequest = SlackUserLinkAccessMutationRequest & {
2500
+ role?: string | undefined;
2501
+ permissions: Permission[];
2502
+ };
2503
+ export type ListSlackUserLinkAccessRequestsResponse = {
2504
+ requests: SlackUserLinkAccessRequest[];
2505
+ };
2219
2506
  export type SessionGoalStatus = "active" | "paused" | "completed";
2220
2507
  export type SessionGoalCreatedBy = "api" | "agent" | "scheduled_task";
2221
2508
  export type SessionGoalContinuationState = "inactive" | "scheduled" | "running" | "blocked" | "invariant_broken";
@@ -2314,6 +2601,7 @@ export type SessionCommandReceipt = {
2314
2601
  export type ComposerDraft = {
2315
2602
  revision: number;
2316
2603
  text: string;
2604
+ annotations?: DraftTimelineAnnotation[] | undefined;
2317
2605
  resources: ResourceRef[];
2318
2606
  model: string;
2319
2607
  reasoningEffort: ReasoningEffort;
@@ -2363,7 +2651,7 @@ export type SessionQueueSnapshot = {
2363
2651
  };
2364
2652
  export type SessionPendingInputPreview = Pick<SessionSystemUpdate, "id" | "sessionId" | "kind" | "classification" | "sourceId" | "summary" | "createdAt">;
2365
2653
  export type SystemUpdateClassification = "success" | "failure" | "action_required" | "info";
2366
- export type SessionSystemUpdateKind = "scheduled_occurrence" | "goal_continuation" | "agent_message" | "agent_steer_instruction" | "child_terminal_result";
2654
+ export type SessionSystemUpdateKind = "scheduled_occurrence" | "goal_continuation" | "agent_message" | "agent_steer_instruction" | "child_terminal_result" | "media_generation_result";
2367
2655
  export type SessionSystemUpdateState = "pending" | "delivered" | "cancelled" | "superseded" | "failed";
2368
2656
  export type SessionSystemUpdate = {
2369
2657
  id: string;
@@ -2471,9 +2759,12 @@ export type ScheduledTaskAgentConfigInput = {
2471
2759
  goal?: GoalSpec | undefined;
2472
2760
  maxNestedAgentDepth?: number | undefined;
2473
2761
  };
2474
- export type CreateScheduledTaskRequest = {
2762
+ export type CreateAgentScheduledTaskRequest = {
2475
2763
  name: string;
2476
2764
  schedule: ScheduledTaskScheduleSpec;
2765
+ action?: {
2766
+ kind: "agent_turn";
2767
+ } | undefined;
2477
2768
  runMode?: ScheduledTaskRunMode | undefined;
2478
2769
  targetSessionId?: string | null | undefined;
2479
2770
  overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
@@ -2485,12 +2776,24 @@ export type CreateScheduledTaskRequest = {
2485
2776
  rigId?: string | null | undefined;
2486
2777
  metadata?: Record<string, unknown> | undefined;
2487
2778
  };
2779
+ export type CreateKnowledgeSourceSyncScheduledTaskRequest = {
2780
+ name: string;
2781
+ schedule: ScheduledTaskScheduleSpec;
2782
+ action: Extract<ScheduledTaskAction, {
2783
+ kind: "knowledge_source_sync";
2784
+ }>;
2785
+ overlapPolicy?: "skip" | "buffer_one" | undefined;
2786
+ status?: ScheduledTaskStatus | undefined;
2787
+ metadata?: Record<string, unknown> | undefined;
2788
+ };
2789
+ export type CreateScheduledTaskRequest = CreateAgentScheduledTaskRequest | CreateKnowledgeSourceSyncScheduledTaskRequest;
2488
2790
  export type UpdateScheduledTaskRequest = {
2489
2791
  name?: string | undefined;
2490
2792
  schedule?: ScheduledTaskScheduleSpec | undefined;
2491
2793
  runMode?: ScheduledTaskRunMode | undefined;
2492
2794
  targetSessionId?: string | null | undefined;
2493
2795
  overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
2796
+ action?: ScheduledTaskAction | undefined;
2494
2797
  agentConfig?: ScheduledTaskAgentConfigInput | undefined;
2495
2798
  status?: ScheduledTaskStatus | undefined;
2496
2799
  variableSetId?: string | null | undefined;
@@ -2499,8 +2802,31 @@ export type UpdateScheduledTaskRequest = {
2499
2802
  rigId?: string | null | undefined;
2500
2803
  metadata?: Record<string, unknown> | undefined;
2501
2804
  };
2502
- export type ScheduledTaskRunStatus = "queued" | "dispatched" | "failed";
2503
- export type ScheduledTaskTriggerType = "scheduled" | "manual";
2805
+ export type ScheduledTaskRunStatus = "queued" | "dispatched" | "succeeded" | "skipped" | "failed";
2806
+ export type KnowledgeSourceSyncRunSummary = {
2807
+ phase: "queued" | "inventory" | "transfer" | "index" | "checkpoint" | "completed" | "failed";
2808
+ scanned: number;
2809
+ imported: number;
2810
+ unchanged: number;
2811
+ skipped: number;
2812
+ failed: number;
2813
+ bytes: number;
2814
+ providerRequests: number;
2815
+ elapsedMs: number;
2816
+ indexed: number;
2817
+ aclPending: number;
2818
+ retryable: boolean;
2819
+ limitReached: "items" | "bytes" | "file_bytes" | "provider_requests" | "elapsed_time" | null;
2820
+ checkpointed: boolean;
2821
+ reconnectRequired: boolean;
2822
+ failures: Array<{
2823
+ externalObjectId: string;
2824
+ code: "authority_changed" | "connection_reconnect_required" | "provider_unavailable" | "provider_rejected" | "provider_payload_invalid" | "content_unsupported" | "content_too_large" | "resource_limit" | "item_processing_failed" | "indexing_failed" | "internal_failure";
2825
+ retryable: boolean;
2826
+ message: string;
2827
+ }>;
2828
+ };
2829
+ export type ScheduledTaskTriggerType = "scheduled" | "manual" | "initial" | "provider_event" | "retry" | "repair";
2504
2830
  export type ScheduledTaskRun = {
2505
2831
  id: string;
2506
2832
  accountId: string;
@@ -2512,6 +2838,10 @@ export type ScheduledTaskRun = {
2512
2838
  firedAt: string;
2513
2839
  sessionId: string | null;
2514
2840
  triggerEventId: string | null;
2841
+ actionKind: "agent_turn" | "knowledge_source_sync";
2842
+ knowledgeSyncRunId: string | null;
2843
+ knowledgeSummary: KnowledgeSourceSyncRunSummary | null;
2844
+ completedAt: string | null;
2515
2845
  error: string | null;
2516
2846
  createdAt: string;
2517
2847
  updatedAt: string;
@@ -2570,6 +2900,36 @@ export type RigCheck = {
2570
2900
  name: string;
2571
2901
  command: string;
2572
2902
  };
2903
+ export type RigProviderImageBuildStatus = "building" | "ready" | "failed" | "unsupported";
2904
+ export type RigProviderImage = {
2905
+ backend: SandboxBackend;
2906
+ provider: string;
2907
+ status: RigProviderImageBuildStatus;
2908
+ contentHash: string;
2909
+ setupHash: string;
2910
+ sourceImage: string | null;
2911
+ buildRequestId: string;
2912
+ imageId: string | null;
2913
+ imageDigest: string | null;
2914
+ artifactId: string | null;
2915
+ providerBindingKeyHash: string | null;
2916
+ coldBootValidation?: {
2917
+ version: 1;
2918
+ checkedAt: string;
2919
+ } | undefined;
2920
+ provenance: {
2921
+ kind: "rig_verification";
2922
+ targetKind: "change" | "version";
2923
+ targetId: string;
2924
+ };
2925
+ startedAt: string;
2926
+ finishedAt: string | null;
2927
+ error: {
2928
+ code: string;
2929
+ message: string;
2930
+ retryable: boolean;
2931
+ } | null;
2932
+ };
2573
2933
  export type RigVersion = {
2574
2934
  id: string;
2575
2935
  rigId: string;
@@ -2580,6 +2940,7 @@ export type RigVersion = {
2580
2940
  credentialHooks: string[];
2581
2941
  defaultVariableSetIds: string[];
2582
2942
  changelog: string | null;
2943
+ providerImages: Partial<Record<SandboxBackend, RigProviderImage>>;
2583
2944
  createdBy: string | null;
2584
2945
  active: boolean;
2585
2946
  createdAt: string;
@@ -2680,7 +3041,9 @@ export type FileAsset = {
2680
3041
  export declare const RETAINED_OUTPUT_DEFAULT_PAGE_BYTES: number;
2681
3042
  export declare const RETAINED_OUTPUT_MAX_PAGE_BYTES: number;
2682
3043
  export declare const COMPUTER_SCREENSHOT_MAX_BYTES: number;
2683
- export type RetainedOutputKind = "tool_result" | "assistant_completion" | "internal_update" | "event_media" | "computer_screenshot" | "file";
3044
+ export declare const GENERATED_IMAGE_MAX_BYTES: number;
3045
+ export declare const GENERATED_VIDEO_MAX_BYTES: number;
3046
+ export type RetainedOutputKind = "tool_result" | "assistant_completion" | "internal_update" | "event_media" | "computer_screenshot" | "generated_image" | "generated_video" | "file";
2684
3047
  export type RetainedOutputUnavailableReason = "not_retained" | "pending" | "failed" | "expired" | "deleted" | "missing_storage" | "storage_write_failed" | "quota_exceeded" | "invalid_content" | "oversized" | "unsupported";
2685
3048
  export type RetainedArtifactReference = {
2686
3049
  available: true;
@@ -2714,6 +3077,114 @@ export type RetainedArtifactUnavailable = {
2714
3077
  reason: RetainedOutputUnavailableReason;
2715
3078
  };
2716
3079
  export type RetainedArtifactMetadata = RetainedArtifactReference | RetainedArtifactUnavailable;
3080
+ export type GeneratedImageReceipt = {
3081
+ type: "generated_image";
3082
+ artifact: RetainedArtifactReference;
3083
+ sandboxPath: string;
3084
+ };
3085
+ export type VideoGenerationSourceMode = "text" | "first_frame" | "first_and_last_frames" | "image_reference" | "video_reference";
3086
+ export type VideoGenerationResolution = "480p" | "720p";
3087
+ export type VideoGenerationAspectRatio = "16:9" | "4:3" | "1:1" | "3:4" | "9:16" | "21:9" | "adaptive";
3088
+ export type VideoGenerationModelCapability = {
3089
+ modelId: string;
3090
+ label: string;
3091
+ providerLabel: string;
3092
+ sourceModes: VideoGenerationSourceMode[];
3093
+ resolutions: VideoGenerationResolution[];
3094
+ aspectRatios: VideoGenerationAspectRatio[];
3095
+ duration: {
3096
+ minSeconds: number;
3097
+ maxSeconds: number;
3098
+ stepSeconds: number;
3099
+ };
3100
+ supportsAudio: boolean;
3101
+ };
3102
+ export type VideoGenerationCapabilities = {
3103
+ schemaVersion: 1;
3104
+ capabilityRevision: string;
3105
+ defaultModelId: string;
3106
+ models: VideoGenerationModelCapability[];
3107
+ };
3108
+ export type VideoGenerationPolicy = {
3109
+ schemaVersion: 1;
3110
+ revision: number;
3111
+ fundingSource: VideoGenerationFundingSource;
3112
+ enabledModelIds: string[];
3113
+ defaultModelId: string | null;
3114
+ };
3115
+ export type UpdateVideoGenerationPolicyRequest = {
3116
+ expectedRevision: number;
3117
+ fundingSource: VideoGenerationFundingSource;
3118
+ enabledModelIds: string[];
3119
+ defaultModelId: string | null;
3120
+ };
3121
+ export type VideoGenerationFundingSource = "opengeni_credits" | "workspace_gateway";
3122
+ export type VideoGenerationFundingOption = {
3123
+ source: VideoGenerationFundingSource;
3124
+ label: string;
3125
+ description: string;
3126
+ available: boolean;
3127
+ unavailableReason: string | null;
3128
+ };
3129
+ export type WorkspaceVideoGenerationSettings = {
3130
+ schemaVersion: 1;
3131
+ policy: VideoGenerationPolicy;
3132
+ fundingOptions: VideoGenerationFundingOption[];
3133
+ availableModels: VideoGenerationModelCapability[];
3134
+ capabilities: VideoGenerationCapabilities | null;
3135
+ };
3136
+ export type GeneratedVideoFacts = {
3137
+ durationSeconds: number;
3138
+ width: number;
3139
+ height: number;
3140
+ fps: number;
3141
+ hasAudio: boolean;
3142
+ videoCodec: "h264";
3143
+ audioCodec: "aac" | null;
3144
+ };
3145
+ export type GeneratedVideoReceipt = {
3146
+ type: "generated_video";
3147
+ schemaVersion: 1;
3148
+ operationId: string;
3149
+ artifact: RetainedArtifactReference;
3150
+ video: GeneratedVideoFacts;
3151
+ sandboxPath: string;
3152
+ };
3153
+ export type VideoGenerationTerminalFailureStatus = "provider_failed" | "retention_failed" | "cancelled_before_submit" | "outcome_unknown";
3154
+ export type MediaGenerationResult = {
3155
+ type: "media_generation_result";
3156
+ schemaVersion: 1;
3157
+ status: "ready";
3158
+ operationId: string;
3159
+ receipt: GeneratedVideoReceipt;
3160
+ } | {
3161
+ type: "media_generation_result";
3162
+ schemaVersion: 1;
3163
+ status: VideoGenerationTerminalFailureStatus;
3164
+ operationId: string;
3165
+ boundedPublicReason: string;
3166
+ };
3167
+ export type VideoGenerationPublicStatus = "preparing" | "prepared" | "accepted" | "provider_started" | "retaining" | "completed" | VideoGenerationTerminalFailureStatus;
3168
+ export type VideoGenerationOperationSummary = {
3169
+ schemaVersion: 1;
3170
+ operationId: string;
3171
+ modelId: string;
3172
+ status: VideoGenerationPublicStatus;
3173
+ createdAt: string;
3174
+ updatedAt: string;
3175
+ terminal: MediaGenerationResult | null;
3176
+ };
3177
+ /** Ephemeral source minted for native browser playback; never persist the URL. */
3178
+ export type VideoArtifactPlaybackSource = {
3179
+ schemaVersion: 1;
3180
+ artifactId: string;
3181
+ url: string;
3182
+ expiresAt: string;
3183
+ contentType: "video/mp4";
3184
+ sizeBytes: number;
3185
+ sha256: string;
3186
+ acceptRanges: "bytes";
3187
+ };
2717
3188
  export type RetainedArtifactContentOptions = {
2718
3189
  /** One RFC-style bytes range, for example `bytes=1048576-2097151`. */
2719
3190
  range?: string | undefined;
@@ -2727,16 +3198,21 @@ export type RetainedArtifactContent = {
2727
3198
  contentRange: string | null;
2728
3199
  acceptRanges: "bytes";
2729
3200
  };
2730
- export type RetainedScreenshotDownloadOptions = {
3201
+ export type RetainedArtifactDownloadOptions = {
2731
3202
  signal?: AbortSignal | undefined;
2732
3203
  /** Retry transient range failures; bounded to 0..3, default 2. */
2733
3204
  maxRetries?: number | undefined;
2734
3205
  };
3206
+ export type RetainedScreenshotDownloadOptions = RetainedArtifactDownloadOptions;
2735
3207
  export type RetainedScreenshotDownload = {
2736
3208
  metadata: RetainedArtifactMetadata;
2737
3209
  /** Null when metadata truth says the screenshot is unavailable. */
2738
3210
  bytes: Uint8Array | null;
2739
3211
  };
3212
+ export type RetainedArtifactDownload = {
3213
+ artifact: RetainedArtifactReference;
3214
+ bytes: Uint8Array;
3215
+ };
2740
3216
  export type CreateFileUploadRequest = {
2741
3217
  filename: string;
2742
3218
  contentType: string;
@@ -3015,6 +3491,43 @@ export type CapabilityPackVariableSetSpec = {
3015
3491
  requiredVariables: string[];
3016
3492
  required: boolean;
3017
3493
  };
3494
+ export type CapabilityPackComponentReference = {
3495
+ key: string;
3496
+ kind: "plugin";
3497
+ pluginKey: string;
3498
+ version: string;
3499
+ manifestDigest: string;
3500
+ required: boolean;
3501
+ } | {
3502
+ key: string;
3503
+ kind: "skill";
3504
+ capabilityId: string;
3505
+ contentSha256: string;
3506
+ required: boolean;
3507
+ } | {
3508
+ key: string;
3509
+ kind: "integration";
3510
+ capabilityId: string;
3511
+ instanceKey: string;
3512
+ revisionId: string;
3513
+ contentSha256: string;
3514
+ required: boolean;
3515
+ } | {
3516
+ key: string;
3517
+ kind: "feature";
3518
+ capabilityId: string;
3519
+ instanceKey: string;
3520
+ featureKey: string;
3521
+ bindingKey: string;
3522
+ configDigest: string;
3523
+ required: boolean;
3524
+ };
3525
+ export type CapabilityPackRigRequirement = {
3526
+ description?: string | undefined;
3527
+ required: boolean;
3528
+ rigId?: string | undefined;
3529
+ requireVerified: boolean;
3530
+ };
3018
3531
  export type CapabilityPack = {
3019
3532
  id: string;
3020
3533
  name: string;
@@ -3029,6 +3542,8 @@ export type CapabilityPack = {
3029
3542
  } | undefined;
3030
3543
  } | undefined;
3031
3544
  skills: CapabilityPackSkill[];
3545
+ components: CapabilityPackComponentReference[];
3546
+ rig?: CapabilityPackRigRequirement | undefined;
3032
3547
  tools: ToolRef[];
3033
3548
  connectors: CapabilityPackConnector[];
3034
3549
  knowledge: CapabilityPackKnowledge[];
@@ -3055,6 +3570,43 @@ export type RegisterCapabilityPackRequest = {
3055
3570
  description?: string | undefined;
3056
3571
  files: CapabilityPackSkillFile[];
3057
3572
  }[] | undefined;
3573
+ components?: ({
3574
+ key: string;
3575
+ kind: "plugin";
3576
+ pluginKey: string;
3577
+ version: string;
3578
+ manifestDigest: string;
3579
+ required?: boolean | undefined;
3580
+ } | {
3581
+ key: string;
3582
+ kind: "skill";
3583
+ capabilityId: string;
3584
+ contentSha256: string;
3585
+ required?: boolean | undefined;
3586
+ } | {
3587
+ key: string;
3588
+ kind: "integration";
3589
+ capabilityId: string;
3590
+ instanceKey: string;
3591
+ revisionId: string;
3592
+ contentSha256: string;
3593
+ required?: boolean | undefined;
3594
+ } | {
3595
+ key: string;
3596
+ kind: "feature";
3597
+ capabilityId: string;
3598
+ instanceKey: string;
3599
+ featureKey: string;
3600
+ bindingKey: string;
3601
+ configDigest: string;
3602
+ required?: boolean | undefined;
3603
+ })[] | undefined;
3604
+ rig?: {
3605
+ description?: string | undefined;
3606
+ required?: boolean | undefined;
3607
+ rigId?: string | undefined;
3608
+ requireVerified?: boolean | undefined;
3609
+ } | undefined;
3058
3610
  tools?: ToolRef[] | undefined;
3059
3611
  connectors?: {
3060
3612
  id: string;
@@ -3096,13 +3648,18 @@ export type WorkspaceRegisteredPack = {
3096
3648
  createdAt: string;
3097
3649
  updatedAt: string;
3098
3650
  };
3099
- export type PackInstallationStatus = "active" | "disabled";
3651
+ export type PackInstallationStatus = "installing" | "active" | "needs_attention" | "disabled";
3100
3652
  export type PackInstallation = {
3101
3653
  id: string;
3102
3654
  accountId: string;
3103
3655
  workspaceId: string;
3104
3656
  packId: string;
3105
3657
  status: PackInstallationStatus;
3658
+ version: number;
3659
+ manifestSnapshot: CapabilityPack | null;
3660
+ manifestDigest: string | null;
3661
+ selectedRigId: string | null;
3662
+ installedBySubjectId: string | null;
3106
3663
  metadata: Record<string, unknown>;
3107
3664
  enabledAt: string;
3108
3665
  updatedAt: string;
@@ -3113,6 +3670,73 @@ export type EnablePackRequest = {
3113
3670
  environmentId?: string | undefined;
3114
3671
  metadata?: Record<string, unknown> | undefined;
3115
3672
  };
3673
+ export type PackComponentResolutionStatus = "ready" | "missing" | "mismatch";
3674
+ export type PackComponentResolution = {
3675
+ key: string;
3676
+ kind: "plugin" | "skill" | "integration" | "feature" | "inline_skill";
3677
+ capabilityId: string;
3678
+ required: boolean;
3679
+ status: PackComponentResolutionStatus;
3680
+ expectedDigest: string;
3681
+ actualDigest: string | null;
3682
+ resolvedId: string | null;
3683
+ label: string;
3684
+ };
3685
+ export type PackRigResolution = {
3686
+ required: boolean;
3687
+ status: "not_required" | "ready" | "missing" | "mismatch" | "unverified";
3688
+ requestedRigId: string | null;
3689
+ rigId: string | null;
3690
+ rigVersionId: string | null;
3691
+ name: string | null;
3692
+ image: string | null;
3693
+ };
3694
+ export type PreviewPackInstallationRequest = {
3695
+ rigId?: string | undefined;
3696
+ variableSetId?: string | undefined;
3697
+ };
3698
+ export type PackInstallationPreview = {
3699
+ packId: string;
3700
+ packVersion: string;
3701
+ manifestDigest: string;
3702
+ installationVersion: number | null;
3703
+ action: "install" | "update" | "repair";
3704
+ ready: boolean;
3705
+ blockers: string[];
3706
+ components: PackComponentResolution[];
3707
+ rig: PackRigResolution;
3708
+ variableSetId: string | null;
3709
+ legacyInlineSkillCount: number;
3710
+ legacySandboxImage: string | null;
3711
+ };
3712
+ export type InstallPackRequest = {
3713
+ expectedManifestDigest: string;
3714
+ expectedInstallationVersion?: number | undefined;
3715
+ rigId?: string | undefined;
3716
+ variableSetId?: string | undefined;
3717
+ idempotencyKey: string;
3718
+ metadata?: Record<string, unknown> | undefined;
3719
+ };
3720
+ export type PackUninstallPreview = {
3721
+ packId: string;
3722
+ installed: boolean;
3723
+ installationVersion: number | null;
3724
+ components: Array<{
3725
+ key: string;
3726
+ kind: "plugin" | "skill" | "integration" | "feature" | "inline_skill";
3727
+ capabilityId: string;
3728
+ retainedByOtherOwners: boolean;
3729
+ }>;
3730
+ };
3731
+ export type UninstallPackRequest = {
3732
+ expectedInstallationVersion: number;
3733
+ idempotencyKey: string;
3734
+ };
3735
+ export type UninstallPackResult = {
3736
+ packId: string;
3737
+ status: "not_installed" | "uninstalled";
3738
+ retainedComponents: string[];
3739
+ };
3116
3740
  export type ListPacksResponse = {
3117
3741
  packs: CapabilityPack[];
3118
3742
  installations: PackInstallation[];
@@ -3126,6 +3750,15 @@ export type CapabilitySource = "built_in" | "library" | "configured" | "public_r
3126
3750
  export type CapabilityInstallationStatus = "active" | "disabled";
3127
3751
  export type CapabilityCatalogAuthKind = "oauth2" | "api_key" | "none" | "unknown";
3128
3752
  export type CapabilityCatalogTier = "verified" | "community";
3753
+ export type CapabilityLifecycleStatus = "available" | "installed" | "connected" | "ready" | "needs_attention" | "unavailable" | "managed";
3754
+ export type CapabilityReadiness = "ready" | "setup_required" | "attention" | "unavailable";
3755
+ export type CapabilityAction = "install" | "connect" | "configure" | "update" | "repair" | "disconnect" | "uninstall" | "inspect";
3756
+ export type CapabilityLifecycle = {
3757
+ status: CapabilityLifecycleStatus;
3758
+ readiness: CapabilityReadiness;
3759
+ detail: string | null;
3760
+ managedBy: "deployment" | "platform" | "workspace" | null;
3761
+ };
3129
3762
  export type CapabilityRuntime = {
3130
3763
  available: boolean;
3131
3764
  mcpServerId?: string | undefined;
@@ -3165,7 +3798,11 @@ export type CapabilityCatalogItem = {
3165
3798
  staleAt: string | null;
3166
3799
  tools: ToolRef[];
3167
3800
  runtime: CapabilityRuntime;
3801
+ lifecycle: CapabilityLifecycle;
3802
+ actions: CapabilityAction[];
3803
+ /** @deprecated Use lifecycle and actions. */
3168
3804
  enabled: boolean;
3805
+ /** @deprecated Use lifecycle.detail. */
3169
3806
  enabledReason: string | null;
3170
3807
  /** The connection backing this enabled installation, or null when none is involved. */
3171
3808
  connectionRef: {
@@ -3232,6 +3869,422 @@ export type DiscoverMcpCapabilitiesResponse = {
3232
3869
  source: "official_mcp_registry";
3233
3870
  sourceUrl: string;
3234
3871
  };
3872
+ export type SkillImportSource = "github" | "skills_sh";
3873
+ export type PreviewSkillImportRequest = {
3874
+ url: string;
3875
+ };
3876
+ export type SkillImportFileSummary = {
3877
+ path: string;
3878
+ byteSize: number;
3879
+ contentSha256: string;
3880
+ };
3881
+ export type SkillImportPreview = {
3882
+ source: SkillImportSource;
3883
+ sourceUrl: string;
3884
+ repositoryUrl: string;
3885
+ owner: string;
3886
+ repository: string;
3887
+ sourcePath: string;
3888
+ sourceCommit: string;
3889
+ name: string;
3890
+ description: string;
3891
+ contentSha256: string;
3892
+ totalBytes: number;
3893
+ files: SkillImportFileSummary[];
3894
+ warnings: string[];
3895
+ installed: boolean;
3896
+ installationVersion: number | null;
3897
+ };
3898
+ export type InstallSkillRequest = {
3899
+ url: string;
3900
+ expectedSourceCommit: string;
3901
+ expectedContentSha256: string;
3902
+ expectedInstallationVersion?: number | undefined;
3903
+ };
3904
+ export type InstalledSkill = {
3905
+ capabilityId: string;
3906
+ pluginId: string;
3907
+ pluginVersionId: string;
3908
+ facetId: string;
3909
+ pluginInstallationId: string;
3910
+ facetInstallationId: string;
3911
+ installationVersion: number;
3912
+ source: SkillImportSource;
3913
+ sourceUrl: string;
3914
+ sourceCommit: string;
3915
+ contentSha256: string;
3916
+ name: string;
3917
+ status: "installed";
3918
+ };
3919
+ export type CapabilityComponentOwner = {
3920
+ kind: "direct" | "plugin" | "pack" | "migration";
3921
+ id: string;
3922
+ removable: boolean;
3923
+ };
3924
+ export type SkillUninstallPreview = {
3925
+ capabilityId: string;
3926
+ installed: boolean;
3927
+ installationVersion: number | null;
3928
+ directOwner: CapabilityComponentOwner | null;
3929
+ remainingOwners: CapabilityComponentOwner[];
3930
+ removesRuntimeSkill: boolean;
3931
+ };
3932
+ export type UninstallSkillRequest = {
3933
+ expectedInstallationVersion: number;
3934
+ };
3935
+ export type UninstallSkillResult = {
3936
+ capabilityId: string;
3937
+ status: "not_installed" | "uninstalled" | "retained_by_other_owners";
3938
+ remainingOwners: CapabilityComponentOwner[];
3939
+ };
3940
+ 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">;
3946
+ configSchema: Record<string, unknown>;
3947
+ capabilities: Record<string, unknown>;
3948
+ };
3949
+ export type IntegrationFeatureBindingSummary = {
3950
+ id: string;
3951
+ featureKey: string;
3952
+ kind: Exclude<IntegrationFeatureKind, "tools">;
3953
+ bindingKey: string;
3954
+ displayName: string;
3955
+ connectionId: string | null;
3956
+ status: IntegrationFeatureStatus;
3957
+ config: Record<string, unknown>;
3958
+ version: number;
3959
+ hasCursor: boolean;
3960
+ lastSuccessAt: string | null;
3961
+ lastErrorCode: string | null;
3962
+ createdAt: string;
3963
+ updatedAt: string;
3964
+ };
3965
+ export type IntegrationInstanceFeaturesResponse = {
3966
+ capabilityId: string;
3967
+ instanceKey: string;
3968
+ providerDomain: string;
3969
+ connectionId: string | null;
3970
+ features: {
3971
+ definition: IntegrationFeatureDefinitionSummary;
3972
+ binding: IntegrationFeatureBindingSummary | null;
3973
+ }[];
3974
+ };
3975
+ export type UpsertIntegrationFeatureRequest = {
3976
+ displayName: string;
3977
+ config?: Record<string, unknown> | undefined;
3978
+ expectedVersion?: number | undefined;
3979
+ idempotencyKey: string;
3980
+ };
3981
+ export type MutateIntegrationFeatureRequest = {
3982
+ expectedVersion: number;
3983
+ idempotencyKey: string;
3984
+ };
3985
+ export type IntegrationFeatureMutationResult = {
3986
+ capabilityId: string;
3987
+ instanceKey: string;
3988
+ featureKey: string;
3989
+ status: "configured" | "paused" | "active";
3990
+ binding: IntegrationFeatureBindingSummary;
3991
+ };
3992
+ export type IntegrationFeatureRemovalResult = {
3993
+ capabilityId: string;
3994
+ instanceKey: string;
3995
+ featureKey: string;
3996
+ status: "not_configured" | "removed" | "retained_by_other_owners";
3997
+ binding: IntegrationFeatureBindingSummary | null;
3998
+ remainingOwners: CapabilityComponentOwner[];
3999
+ };
4000
+ export type ApiIntegrationPresetSummary = {
4001
+ id: string;
4002
+ name: string;
4003
+ summary: string;
4004
+ family: "google" | "microsoft";
4005
+ protocol: "openapi";
4006
+ providerDomain: string;
4007
+ scopes: string[];
4008
+ features: IntegrationFeatureDefinitionSummary[];
4009
+ };
4010
+ export type ListApiIntegrationPresetsResponse = {
4011
+ presets: ApiIntegrationPresetSummary[];
4012
+ };
4013
+ export type ApiIntegrationSource = {
4014
+ kind: "preset";
4015
+ presetId: string;
4016
+ } | {
4017
+ kind: "openapi";
4018
+ url: string;
4019
+ baseUrl?: string | undefined;
4020
+ } | {
4021
+ kind: "graphql";
4022
+ endpoint: string;
4023
+ name?: string | undefined;
4024
+ } | {
4025
+ kind: "auto";
4026
+ url: string;
4027
+ baseUrl?: string | undefined;
4028
+ };
4029
+ export type PreviewApiIntegrationRequest = {
4030
+ source: ApiIntegrationSource;
4031
+ connectionId?: string | undefined;
4032
+ ownership?: ConnectionOwnership | undefined;
4033
+ };
4034
+ export type ApiIntegrationOAuthStartRequest = {
4035
+ presetId: string;
4036
+ ownership?: ConnectionOwnership | undefined;
4037
+ connectionId?: string | undefined;
4038
+ returnPath?: string | undefined;
4039
+ };
4040
+ export type ApiIntegrationAuthPreview = {
4041
+ kind: "none";
4042
+ } | {
4043
+ kind: "oauth2";
4044
+ providerDomain: string;
4045
+ scopes: string[];
4046
+ } | {
4047
+ kind: "api_key";
4048
+ providerDomain: string;
4049
+ carrier: "header" | "query" | "cookie";
4050
+ name: string;
4051
+ } | {
4052
+ kind: "http";
4053
+ providerDomain: string;
4054
+ scheme: string;
4055
+ };
4056
+ export type ApiIntegrationToolPreview = {
4057
+ id: string;
4058
+ operationKey: string;
4059
+ name: string;
4060
+ description: string;
4061
+ safety: "read" | "write" | "destructive";
4062
+ approvalMode: "never" | "ask";
4063
+ deprecated: boolean;
4064
+ };
4065
+ export type ApiIntegrationPreview = {
4066
+ source: ApiIntegrationSource;
4067
+ presetId: string | null;
4068
+ protocol: ApiIntegrationProtocol;
4069
+ integrationId: string;
4070
+ capabilityId: string;
4071
+ pluginKey: string;
4072
+ serverId: string;
4073
+ name: string;
4074
+ description: string | null;
4075
+ provider: string | null;
4076
+ providerDomain: string;
4077
+ baseUrl: string;
4078
+ sourceUrl: string | null;
4079
+ revisionId: string;
4080
+ contentSha256: string;
4081
+ auth: ApiIntegrationAuthPreview;
4082
+ connectionId: string | null;
4083
+ connectionOwnership: ConnectionOwnership | null;
4084
+ tools: ApiIntegrationToolPreview[];
4085
+ warnings: string[];
4086
+ };
4087
+ export type InstallApiIntegrationRequest = {
4088
+ source: ApiIntegrationSource;
4089
+ expectedRevisionId: string;
4090
+ expectedContentSha256: string;
4091
+ connectionId?: string | undefined;
4092
+ ownership?: ConnectionOwnership | undefined;
4093
+ instanceKey?: string | undefined;
4094
+ displayName?: string | undefined;
4095
+ expectedInstanceVersion?: number | undefined;
4096
+ allowedTools?: string[] | undefined;
4097
+ };
4098
+ export type InstalledApiIntegration = {
4099
+ capabilityId: string;
4100
+ pluginId: string;
4101
+ pluginVersionId: string;
4102
+ integrationFacetId: string;
4103
+ apiFacetId: string;
4104
+ pluginInstallationId: string;
4105
+ integrationFacetInstallationId: string;
4106
+ apiFacetInstallationId: string;
4107
+ installationVersion: number;
4108
+ instanceId: string;
4109
+ instanceKey: string;
4110
+ displayName: string;
4111
+ instanceVersion: number;
4112
+ revisionId: string;
4113
+ serverId: string;
4114
+ status: "installed";
4115
+ };
4116
+ export type ApiIntegrationInstallationSummary = {
4117
+ capabilityId: string;
4118
+ pluginKey: string;
4119
+ installationVersion: number;
4120
+ instanceId: string;
4121
+ instanceKey: string;
4122
+ displayName: string;
4123
+ instanceVersion: number;
4124
+ serverId: string;
4125
+ name: string;
4126
+ description: string | null;
4127
+ protocol: ApiIntegrationProtocol;
4128
+ presetId: string | null;
4129
+ providerDomain: string;
4130
+ baseUrl: string;
4131
+ sourceUrl: string | null;
4132
+ connected: boolean;
4133
+ requiresConnection: boolean;
4134
+ connectionId: string | null;
4135
+ ownership: "workspace" | "personal" | "none";
4136
+ allowedTools: string[];
4137
+ toolCount: number;
4138
+ approvalRequiredToolCount: number;
4139
+ revisionId: string;
4140
+ contentSha256: string;
4141
+ };
4142
+ export type ListApiIntegrationsResponse = {
4143
+ integrations: ApiIntegrationInstallationSummary[];
4144
+ };
4145
+ export type ApiIntegrationUninstallPreview = {
4146
+ capabilityId: string;
4147
+ instanceKey: string;
4148
+ displayName: string | null;
4149
+ installed: boolean;
4150
+ installationVersion: number | null;
4151
+ instanceVersion: number | null;
4152
+ directOwner: CapabilityComponentOwner | null;
4153
+ remainingOwners: CapabilityComponentOwner[];
4154
+ removesRuntimeIntegration: boolean;
4155
+ removesDefinition: boolean;
4156
+ };
4157
+ export type UninstallApiIntegrationRequest = {
4158
+ expectedInstallationVersion: number;
4159
+ expectedInstanceVersion: number;
4160
+ };
4161
+ export type UninstallApiIntegrationResult = {
4162
+ capabilityId: string;
4163
+ instanceKey: string;
4164
+ status: "not_installed" | "uninstalled" | "retained_by_other_owners";
4165
+ remainingOwners: CapabilityComponentOwner[];
4166
+ definitionStatus: "retained" | "disabled";
4167
+ };
4168
+ export type PluginManifestComponent = {
4169
+ key: string;
4170
+ kind: "skill";
4171
+ url: string;
4172
+ } | {
4173
+ key: string;
4174
+ kind: "integration";
4175
+ source: ApiIntegrationSource;
4176
+ } | {
4177
+ key: string;
4178
+ kind: "mcp";
4179
+ serverId: string;
4180
+ };
4181
+ export type PluginManifest = {
4182
+ schemaVersion: 1;
4183
+ pluginKey: string;
4184
+ version: string;
4185
+ name: string;
4186
+ description: string;
4187
+ category: string;
4188
+ tags: string[];
4189
+ components: PluginManifestComponent[];
4190
+ };
4191
+ export type PluginComponentBinding = {
4192
+ connectionId?: string | undefined;
4193
+ instanceKey?: string | undefined;
4194
+ displayName?: string | undefined;
4195
+ };
4196
+ export type PreviewPluginRequest = {
4197
+ url: string;
4198
+ bindings?: Record<string, PluginComponentBinding> | undefined;
4199
+ };
4200
+ export type PluginComponentPreview = {
4201
+ key: string;
4202
+ kind: "skill" | "integration" | "mcp";
4203
+ name: string;
4204
+ capabilityId: string;
4205
+ digest: string;
4206
+ connectionRequired: boolean;
4207
+ connectionId: string | null;
4208
+ instanceKey: string | null;
4209
+ displayName: string | null;
4210
+ facts: Record<string, unknown>;
4211
+ };
4212
+ export type PluginUpdateDiff = {
4213
+ fromVersion: string | null;
4214
+ toVersion: string;
4215
+ added: string[];
4216
+ removed: string[];
4217
+ changed: string[];
4218
+ unchanged: string[];
4219
+ };
4220
+ export type PluginPreview = {
4221
+ sourceUrl: string;
4222
+ manifest: PluginManifest;
4223
+ manifestDigest: string;
4224
+ installed: boolean;
4225
+ installationVersion: number | null;
4226
+ components: PluginComponentPreview[];
4227
+ diff: PluginUpdateDiff;
4228
+ };
4229
+ export type InstallPluginRequest = {
4230
+ url: string;
4231
+ expectedManifestDigest: string;
4232
+ expectedComponents: Array<{
4233
+ key: string;
4234
+ digest: string;
4235
+ }>;
4236
+ bindings?: Record<string, PluginComponentBinding> | undefined;
4237
+ idempotencyKey: string;
4238
+ expectedInstallationVersion?: number | undefined;
4239
+ };
4240
+ export type InstalledPlugin = {
4241
+ pluginKey: string;
4242
+ version: string;
4243
+ pluginId: string;
4244
+ pluginVersionId: string;
4245
+ pluginInstallationId: string;
4246
+ installationVersion: number;
4247
+ componentCount: number;
4248
+ status: "installed";
4249
+ };
4250
+ export type PluginInstallationSummary = {
4251
+ pluginKey: string;
4252
+ version: string;
4253
+ name: string;
4254
+ description: string;
4255
+ category: string;
4256
+ tags: string[];
4257
+ sourceUrl: string | null;
4258
+ manifestDigest: string;
4259
+ installationVersion: number;
4260
+ componentCount: number;
4261
+ status: "active" | "needs_attention";
4262
+ installedAt: string;
4263
+ updatedAt: string;
4264
+ };
4265
+ export type ListInstalledPluginsResponse = {
4266
+ plugins: PluginInstallationSummary[];
4267
+ };
4268
+ export type PluginUninstallPreview = {
4269
+ pluginKey: string;
4270
+ installed: boolean;
4271
+ version: string | null;
4272
+ installationVersion: number | null;
4273
+ components: Array<{
4274
+ capabilityId: string;
4275
+ kind: "skill" | "integration" | "mcp";
4276
+ retainedByOtherOwners: boolean;
4277
+ }>;
4278
+ };
4279
+ export type UninstallPluginRequest = {
4280
+ expectedInstallationVersion: number;
4281
+ idempotencyKey: string;
4282
+ };
4283
+ export type UninstallPluginResult = {
4284
+ pluginKey: string;
4285
+ status: "not_installed" | "uninstalled";
4286
+ retainedComponents: string[];
4287
+ };
3235
4288
  export type GitHubRepository = {
3236
4289
  id: number;
3237
4290
  installationId: number;
@@ -3302,7 +4355,7 @@ export type BillingBalance = {
3302
4355
  currency: "usd";
3303
4356
  updatedAt: string;
3304
4357
  };
3305
- export declare const KNOWN_USAGE_EVENT_TYPES: readonly ["agent_run.created", "agent_run.completed", "model.tokens", "model.cost", "file.uploaded", "file.deleted", "document.indexed", "scheduled_task.fired", "api_key.request", "sandbox.warm_seconds", "sandbox.warm_cost"];
4358
+ export declare const KNOWN_USAGE_EVENT_TYPES: readonly ["agent_run.created", "agent_run.completed", "model.tokens", "model.cost", "file.uploaded", "file.deleted", "document.indexed", "scheduled_task.fired", "knowledge_source_sync.fired", "knowledge_source_sync.completed", "knowledge_source_sync.items", "knowledge_source_sync.bytes", "api_key.request", "sandbox.warm_seconds", "sandbox.warm_cost"];
3306
4359
  export type KnownUsageEventType = (typeof KNOWN_USAGE_EVENT_TYPES)[number];
3307
4360
  export type UsageEventType = KnownUsageEventType | (string & {});
3308
4361
  export type UsageEvent = {
@@ -3333,6 +4386,7 @@ export type BillingUsageResponse = {
3333
4386
  };
3334
4387
  export type InsightsRange = "today" | "week" | "month" | "ytd";
3335
4388
  export type InsightsBillingPath = "opengeni_credits" | "external";
4389
+ export type InsightsPricingSource = "configured_list_price" | "gateway_reported";
3336
4390
  export type InsightsModelUsageRow = {
3337
4391
  id: string;
3338
4392
  model: string;
@@ -3342,16 +4396,31 @@ export type InsightsModelUsageRow = {
3342
4396
  inputTokens: number;
3343
4397
  outputTokens: number;
3344
4398
  cachedTokens: number;
4399
+ cacheInputTokens: number;
3345
4400
  cacheWriteTokens: number;
3346
4401
  reasoningTokens: number;
4402
+ totalTokens: number;
4403
+ tokenKnownCalls: number;
4404
+ cacheKnownCalls: number;
3347
4405
  creditUsd: number;
4406
+ estimatedProviderUsd: number;
4407
+ estimatedProviderCostKnownCalls: number;
3348
4408
  };
3349
4409
  export type InsightsSeriesPoint = {
3350
4410
  label: string;
3351
4411
  modelCostUsd: number;
4412
+ estimatedProviderUsd: number;
4413
+ estimatedProviderCostKnownCalls: number;
3352
4414
  warmSeconds: number;
3353
4415
  inputTokens: number;
4416
+ outputTokens: number;
3354
4417
  cachedTokens: number;
4418
+ cacheInputTokens: number;
4419
+ cacheWriteTokens: number;
4420
+ reasoningTokens: number;
4421
+ totalTokens: number;
4422
+ tokenKnownCalls: number;
4423
+ cacheKnownCalls: number;
3355
4424
  cacheHitPct: number;
3356
4425
  calls: number;
3357
4426
  };
@@ -3368,9 +4437,12 @@ export type InsightsSpendDriver = {
3368
4437
  groupBy: "root_session" | "schedule";
3369
4438
  label: string;
3370
4439
  creditUsd: number;
4440
+ estimatedProviderUsd: number;
4441
+ estimatedProviderCostKnownCalls: number;
3371
4442
  tokens: number;
3372
4443
  cacheHitPct: number;
3373
4444
  pctOfCreditUsd: number;
4445
+ pctOfTokens: number;
3374
4446
  deltaUsdVsPrior: number;
3375
4447
  };
3376
4448
  export type InsightsWarmGroupRow = {
@@ -3406,16 +4478,42 @@ export type InsightsScheduleRow = {
3406
4478
  name: string;
3407
4479
  fires: number;
3408
4480
  creditUsd: number | null;
4481
+ estimatedProviderUsd: number | null;
4482
+ estimatedProviderCostKnownCalls: number | null;
3409
4483
  tokens: number | null;
3410
4484
  cacheHitPct: number | null;
3411
4485
  billing: InsightsBillingPath | null;
3412
4486
  };
4487
+ export type InsightsModelCallRow = {
4488
+ id: string;
4489
+ occurredAt: string;
4490
+ recordedAt: string;
4491
+ sessionId: string;
4492
+ sessionTitle: string;
4493
+ turnId: string;
4494
+ provider: string;
4495
+ providerApi: string;
4496
+ model: string;
4497
+ billing: InsightsBillingPath;
4498
+ inputTokens: number | null;
4499
+ outputTokens: number | null;
4500
+ cachedTokens: number | null;
4501
+ cacheWriteTokens: number | null;
4502
+ reasoningTokens: number | null;
4503
+ totalTokens: number | null;
4504
+ creditUsd: number;
4505
+ estimatedProviderUsd: number | null;
4506
+ pricingSource: InsightsPricingSource | null;
4507
+ };
3413
4508
  export type WorkspaceInsightsSnapshot = {
3414
4509
  range: InsightsRange;
3415
4510
  rangeLabel: string;
3416
4511
  priorLabel: string;
3417
4512
  seriesLabel: string;
3418
4513
  cacheSeriesLabel: string;
4514
+ windowStart: string;
4515
+ windowEnd: string;
4516
+ generatedAt: string;
3419
4517
  timezone: "UTC";
3420
4518
  models: InsightsModelUsageRow[];
3421
4519
  facets: InsightsModelFacet[];
@@ -3423,6 +4521,7 @@ export type WorkspaceInsightsSnapshot = {
3423
4521
  depth: InsightsDepthBucket[];
3424
4522
  drivers: InsightsSpendDriver[];
3425
4523
  schedules: InsightsScheduleRow[];
4524
+ recentCalls: InsightsModelCallRow[];
3426
4525
  warmSeconds: number;
3427
4526
  priorWarmSeconds: number;
3428
4527
  warmGroups: InsightsWarmGroupRow[];
@@ -3434,7 +4533,13 @@ export type WorkspaceInsightsSnapshot = {
3434
4533
  priorWorkspaceCreditUsd: number;
3435
4534
  creditUsd: number;
3436
4535
  priorCreditUsd: number;
4536
+ estimatedProviderUsd: number;
4537
+ priorEstimatedProviderUsd: number;
4538
+ estimatedProviderCostKnownCalls: number;
4539
+ priorEstimatedProviderCostKnownCalls: number;
4540
+ modelCalls: number;
3437
4541
  priorInputTokens: number;
4542
+ priorTotalTokens: number;
3438
4543
  priorCacheHitPct: number;
3439
4544
  priorCalls: number;
3440
4545
  goalsActive: number;
@@ -3475,6 +4580,7 @@ export type UserMessageEventInput = {
3475
4580
  clientEventId?: string | undefined;
3476
4581
  payload: {
3477
4582
  text: string;
4583
+ annotations?: SubmittedTimelineAnnotation[] | undefined;
3478
4584
  turnInstructions?: string | undefined;
3479
4585
  resources?: ResourceRef[] | undefined;
3480
4586
  model?: string | undefined;
@@ -3574,9 +4680,13 @@ export type RemoveEnrollmentResponse = {
3574
4680
  machineName: string | null;
3575
4681
  lastSeenAt: string | null;
3576
4682
  revokedAt: string | null;
3577
- code: "active_route" | "active_commands" | "active_lease" | "recovery_pending" | "not_selfhosted" | null;
4683
+ code: "active_route" | "active_commands" | "machine_home" | "active_lease" | "recovery_pending" | "not_selfhosted" | null;
3578
4684
  message: string;
3579
4685
  action: string;
4686
+ dependentSessions: Array<{
4687
+ id: string;
4688
+ title: string | null;
4689
+ }>;
3580
4690
  };
3581
4691
  /** POST /v1/workspaces/:ws/sessions/:sessionId/active-sandbox — swap a session's
3582
4692
  * active sandbox. `target` is a `MachineView.sandboxId`, or "session"/"default"