@opengeni/sdk 6.1.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +84 -45
  2. package/dist/artifacts.js +4 -4
  3. package/dist/browser.d.ts +2 -0
  4. package/dist/browser.js +2 -2
  5. package/dist/chat/index.js +5 -5
  6. package/dist/{chunk-64S3VKJU.js → chunk-7ESHQLTB.js} +130 -83
  7. package/dist/chunk-7ESHQLTB.js.map +1 -0
  8. package/dist/{chunk-IZH5F7QC.js → chunk-L3MYVTPO.js} +10 -2
  9. package/dist/chunk-L3MYVTPO.js.map +1 -0
  10. package/dist/{chunk-CFSYTYMA.js → chunk-MXQX4M36.js} +2 -2
  11. package/dist/{chunk-VDACQXJZ.js → chunk-N76DIO4E.js} +8 -87
  12. package/dist/chunk-N76DIO4E.js.map +1 -0
  13. package/dist/{chunk-CMEU67C4.js → chunk-P7OFNKCH.js} +2 -2
  14. package/dist/chunk-P7OFNKCH.js.map +1 -0
  15. package/dist/{chunk-4ZQQQBOH.js → chunk-RCVWE6UR.js} +2 -2
  16. package/dist/client.d.ts +47 -21
  17. package/dist/core.js +3 -3
  18. package/dist/document-authority-client.d.ts +3 -1
  19. package/dist/document-authority.js +3 -3
  20. package/dist/editable-artifacts.js +13 -2
  21. package/dist/editable-artifacts.js.map +1 -1
  22. package/dist/embedding-client.d.ts +3 -21
  23. package/dist/index.d.ts +3 -1
  24. package/dist/index.js +6 -6
  25. package/dist/knowledge.d.ts +5 -3
  26. package/dist/knowledge.js +12 -3
  27. package/dist/knowledge.js.map +1 -1
  28. package/dist/organization-integration-policy.d.ts +26 -0
  29. package/dist/organization-integration-policy.js +26 -0
  30. package/dist/organization-integration-policy.js.map +1 -0
  31. package/dist/session-message-search.d.ts +41 -0
  32. package/dist/site-browser-runtime.gen.d.ts +1 -1
  33. package/dist/site-document.js +1 -1
  34. package/dist/site-document.js.map +1 -1
  35. package/dist/site.js +3 -3
  36. package/dist/skills.d.ts +3 -0
  37. package/dist/types.d.ts +168 -380
  38. package/package.json +7 -3
  39. package/src/browser.ts +12 -0
  40. package/src/client.ts +206 -136
  41. package/src/document-authority-client.ts +15 -0
  42. package/src/editable-artifacts/controller.ts +25 -1
  43. package/src/embedding-client.ts +10 -134
  44. package/src/index.ts +25 -34
  45. package/src/knowledge.ts +22 -1
  46. package/src/organization-integration-policy.ts +54 -0
  47. package/src/session-message-search.ts +39 -0
  48. package/src/site-browser-runtime.gen.ts +1 -1
  49. package/src/skills.ts +3 -0
  50. package/src/types.ts +176 -432
  51. package/dist/chunk-64S3VKJU.js.map +0 -1
  52. package/dist/chunk-CMEU67C4.js.map +0 -1
  53. package/dist/chunk-IZH5F7QC.js.map +0 -1
  54. package/dist/chunk-VDACQXJZ.js.map +0 -1
  55. /package/dist/{chunk-CFSYTYMA.js.map → chunk-MXQX4M36.js.map} +0 -0
  56. /package/dist/{chunk-4ZQQQBOH.js.map → chunk-RCVWE6UR.js.map} +0 -0
package/src/types.ts CHANGED
@@ -1,6 +1,13 @@
1
1
  import type { WorkspaceTranscriptionPolicy } from "./transcription";
2
+ export type {
3
+ SessionMessageSearchRequest,
4
+ SessionMessageSearchMatch,
5
+ SessionMessageSearchResponse,
6
+ } from "./session-message-search";
2
7
 
3
8
  export type BundledSkillId =
9
+ | "builtin:opengeni-help"
10
+ | "builtin:opengeni-client"
4
11
  | "builtin:opengeni-visualize"
5
12
  | "builtin:document-parsing"
6
13
  | "builtin:opengeni-skills"
@@ -585,11 +592,13 @@ export type ToolRef = {
585
592
  export type SessionToolPolicy = {
586
593
  mode: "workspace_default" | "explicit" | "inherited";
587
594
  inheritedFromSessionId: string | null;
595
+ excludedMcpServerIds?: string[] | undefined;
588
596
  };
589
597
 
590
598
  export type UpdateSessionToolPolicyRequest =
591
599
  | {
592
600
  mode: "workspace_default";
601
+ excludedMcpServerIds?: string[] | undefined;
593
602
  expectedVersion: number;
594
603
  }
595
604
  | {
@@ -622,10 +631,18 @@ export type SessionEffectiveToolPolicy = {
622
631
  idsTruncated: boolean;
623
632
  };
624
633
 
634
+ export type SessionGoalReportRequirement = { id: string; title: string };
635
+ export type SessionGoalReportDelivery = {
636
+ requirementId: string;
637
+ artifactId: string;
638
+ inspectionReceiptId: string;
639
+ };
640
+
625
641
  export type GoalSpec = {
626
642
  text: string;
627
643
  successCriteria?: string | undefined;
628
644
  rootConstraints?: string[] | undefined;
645
+ reportRequirements?: SessionGoalReportRequirement[] | undefined;
629
646
  maxAutoContinuations?: number | undefined;
630
647
  mutationPolicy?: SessionGoalMutationPolicy | undefined;
631
648
  };
@@ -682,10 +699,18 @@ export type UpdateSessionMcpApprovalPolicyRequest = {
682
699
  };
683
700
 
684
701
  export type UpdateSessionMcpApprovalPolicyResponse = {
685
- server: SessionMcpServerMetadata;
702
+ server: SessionMcpApprovalPolicyTarget;
686
703
  effectiveFrom: "next_attempt";
687
704
  };
688
705
 
706
+ export type SessionMcpApprovalPolicyTarget =
707
+ | SessionMcpServerMetadata
708
+ | {
709
+ id: string;
710
+ source: "workspace";
711
+ requireApproval: SessionMcpApprovalPolicy;
712
+ };
713
+
689
714
  export type ConnectionKind = "oauth2" | "api_key" | "app_install" | "delegated";
690
715
  export type ConnectionStatus = "active" | "needs_reauth" | "revoked" | "error";
691
716
 
@@ -704,14 +729,14 @@ export type UserResourceDelegation = {
704
729
  resourceVersionId?: string | null | undefined;
705
730
  };
706
731
 
707
- export type McpConnectionAuthoritySelection = {
732
+ export type McpConnectionAccountSelection = {
708
733
  serverId: string;
709
734
  connectionId: string;
710
- userDelegation: UserResourceDelegation;
711
735
  };
712
736
 
713
737
  export type McpServerConnectionRef = {
714
738
  connectionId?: string | undefined;
739
+ accountSelection?: "all_eligible" | undefined;
715
740
  authoritySource?: "host" | undefined;
716
741
  /** accepted_turn is configuration-only; each accepted owner must select a grant. */
717
742
  hostBinding?:
@@ -1371,6 +1396,16 @@ export type CancelSessionBackgroundCommandResult = {
1371
1396
  };
1372
1397
 
1373
1398
  export type Session = {
1399
+ /** Detail-only dispatch evidence; delivery does not prove turn execution. */
1400
+ dispatchWait?:
1401
+ | {
1402
+ state: "pending" | "acknowledged" | "unavailable";
1403
+ attempts: number;
1404
+ nextAttemptAt: string | null;
1405
+ lastError: string | null;
1406
+ }
1407
+ | null
1408
+ | undefined;
1374
1409
  /** Detail-only failure evidence through lastSequence; independent of timeline paging. */
1375
1410
  failureDiagnostics?:
1376
1411
  | {
@@ -1433,6 +1468,7 @@ export type Session = {
1433
1468
  firstPartyMcpPermissions: string[] | null;
1434
1469
  firstPartyMcpTools: FirstPartyMcpToolName[];
1435
1470
  mcpServers: SessionMcpServerMetadata[];
1471
+ mcpApprovalPolicies?: Record<string, SessionMcpApprovalPolicy> | undefined;
1436
1472
  parentSessionId: string | null;
1437
1473
  /** Immutable server-authored nested-agent lineage and policy snapshot. */
1438
1474
  rootSessionId: string;
@@ -1531,6 +1567,10 @@ export type SessionListResponse = {
1531
1567
  pinnedTruncated?: boolean;
1532
1568
  /** Present only when the server recognized and applied additive list filters. */
1533
1569
  filtersApplied?: true;
1570
+ /** Effective server ordering. Name: ASCII-space trim, ASCII case fold,
1571
+ * UTF-8 byte order, id ASC. Date keys and id ties are DESC. */
1572
+ sortBy?: "updatedAt" | "createdAt" | "name" | "archivedAt";
1573
+ archiveStatus?: "active" | "archived" | "all";
1534
1574
  /** Server-resolved Site origin filter, when requested. */
1535
1575
  originSiteId?: string;
1536
1576
  sessions: Session[];
@@ -1794,6 +1834,7 @@ export type HumanInputOption = {
1794
1834
  };
1795
1835
 
1796
1836
  export type SkillReviewReference = {
1837
+ removalOperationId?: string | undefined;
1797
1838
  sourceOperationId: string;
1798
1839
  skillId: string;
1799
1840
  revisionId: string;
@@ -1802,7 +1843,7 @@ export type SkillReviewReference = {
1802
1843
  };
1803
1844
 
1804
1845
  export type HumanInputQuestion = {
1805
- skillReview?: SkillReviewReference | undefined;
1846
+ skillReview?: SkillReviewReference | null | undefined;
1806
1847
  id: string;
1807
1848
  kind: HumanInputQuestionKind;
1808
1849
  prompt: string;
@@ -2142,6 +2183,10 @@ export type SessionEventPage = {
2142
2183
 
2143
2184
  export type ToolAuthNeededPayload = {
2144
2185
  serverId: string;
2186
+ /** Configured connector for recovery; serverId retains the execution alias. */
2187
+ canonicalServerId?: string | undefined;
2188
+ /** Scope of the exact failed account, not the canonical catalog default. */
2189
+ connectionSubjectScope?: "workspace" | "subject" | undefined;
2145
2190
  toolName?: string | null | undefined;
2146
2191
  providerDomain: string;
2147
2192
  provider?: string | undefined;
@@ -2815,6 +2860,7 @@ export type IncidentTelemetryPreflightInput = Omit<
2815
2860
  };
2816
2861
 
2817
2862
  export type ScheduledTaskAgentConfig = {
2863
+ connectionAccounts?: McpConnectionAccountSelection[] | undefined;
2818
2864
  knowledgeSource?: Extract<ScheduledTaskAction, { kind: "knowledge_source_sync" }> | undefined;
2819
2865
  bundledSkillIds?: BundledSkillId[] | undefined;
2820
2866
  prompt: string;
@@ -2875,6 +2921,8 @@ export type ScheduledTask = {
2875
2921
  accountId: string;
2876
2922
  workspaceId: string;
2877
2923
  name: string;
2924
+ /** Immutable execution owner; null for workspace/service tasks. */
2925
+ ownerSubjectId: string | null;
2878
2926
  status: ScheduledTaskStatus;
2879
2927
  schedule: ScheduledTaskScheduleSpec;
2880
2928
  temporalScheduleId: string;
@@ -2884,7 +2932,6 @@ export type ScheduledTask = {
2884
2932
  agentConfig: ScheduledTaskAgentConfig;
2885
2933
  createdBy?: TurnInitiator | undefined;
2886
2934
  createdByContext?: TurnInitiatorContext | undefined;
2887
- personalConnections?: McpPersonalConnectionSummary[] | undefined;
2888
2935
  authorityRevision: number;
2889
2936
  executionDigest: string;
2890
2937
  targetSessionId: string | null;
@@ -2900,12 +2947,9 @@ export type ScheduledTask = {
2900
2947
  };
2901
2948
 
2902
2949
  export type CreateSessionRequest = {
2903
- /** Opt-in host grants for a direct external-user initial turn. */
2904
- selectedHostMcpDelegations?:
2905
- | { serverId: string; delegationId: string; generation: number }[]
2906
- | undefined;
2907
2950
  /** Omitted: defaults/inheritance; []: no bundled guidance. Children cannot widen. */
2908
2951
  bundledSkillIds?: BundledSkillId[] | undefined;
2952
+ excludedMcpServerIds?: string[] | undefined;
2909
2953
  // Optional UUID preallocated by an embedding host so it can durably link its
2910
2954
  // projection before OpenGeni admits the initial turn. Replays must retain the
2911
2955
  // same UUID and idempotency key.
@@ -2962,6 +3006,8 @@ export type CreateSessionRequest = {
2962
3006
  firstPartyMcpPermissions?: string[] | undefined;
2963
3007
  firstPartyMcpTools?: FirstPartyMcpToolName[] | undefined;
2964
3008
  mcpServers?: SessionMcpServerInput[] | undefined;
3009
+ mcpApprovalPolicies?: Record<string, SessionMcpApprovalPolicy> | undefined;
3010
+ connectionAccounts?: McpConnectionAccountSelection[] | undefined;
2965
3011
  /** Atomically attach the server-derived personal Variable Set/Rig closure to the initial turn. */
2966
3012
  personalResourceAttachment?: PersonalResourceAttachmentIntent | undefined;
2967
3013
  // Shared-sandbox placement (mirror of `@opengeni/contracts` CreateSessionRequest.sandbox,
@@ -3054,6 +3100,7 @@ export type Permission = KnownPermission | (string & {});
3054
3100
 
3055
3101
  export type FirstPartyMcpToolName =
3056
3102
  | "knowledge_search"
3103
+ | "knowledge_prepare_save"
3057
3104
  | "knowledge_get"
3058
3105
  | "knowledge_browse"
3059
3106
  | "knowledge_save"
@@ -3671,6 +3718,15 @@ export type CodexAccountsResponse = {
3671
3718
 
3672
3719
  export type OrganizationCodexAccountsResponse = Omit<CodexAccountsResponse, "apps" | "source">;
3673
3720
 
3721
+ /** Session-authorized choices: the accepted pool for a capacity wait, otherwise
3722
+ * the current pool for the next turn. Current execution may use another pool. */
3723
+ export type SessionCodexAccountsResponse = Omit<CodexAccountsResponse, "apps" | "source"> & {
3724
+ currentSelection: { credentialId: string | null; waiting: boolean } | null;
3725
+ currentAccount: CodexAccount | null;
3726
+ pinnedAccountId: string | null;
3727
+ lastAccountId: string | null;
3728
+ };
3729
+
3674
3730
  export type CodexAppsUpdate = {
3675
3731
  credentialId: string | null;
3676
3732
  version: number;
@@ -3819,7 +3875,7 @@ export type ClientAuthConfig =
3819
3875
 
3820
3876
  // Kept value-identical to @opengeni/contracts and pinned by the SDK contract
3821
3877
  // parity suite. The SDK has no runtime dependency on the Zod contracts package.
3822
- export const OPENGENI_API_CONTRACT_REVISION = "2026-08-organization-recovery-custody-v1" as const;
3878
+ export const OPENGENI_API_CONTRACT_REVISION = "2026-09-plugins-and-skills-v1" as const;
3823
3879
  export const OPENGENI_API_CONTRACT_HEADER = "x-opengeni-api-contract" as const;
3824
3880
  /** Bounded request/response identifier shared by browser, ingress, and API diagnostics. */
3825
3881
  export const OPENGENI_CORRELATION_HEADER = "x-opengeni-correlation-id" as const;
@@ -4069,7 +4125,7 @@ export type UserResourceAuthoritySummary = {
4069
4125
  grants: UserResourceAuthorityGrant[];
4070
4126
  };
4071
4127
  export type ListUserResourceAuthoritiesOptions = {
4072
- resourceKind: UserResourceKind;
4128
+ resourceKind: Exclude<UserResourceKind, "connection">;
4073
4129
  cursor?: string | undefined;
4074
4130
  limit?: number | undefined;
4075
4131
  };
@@ -4081,7 +4137,7 @@ export type ListUserResourceAuthoritiesResponse = {
4081
4137
  export type IssueUserResourceGrantRequest =
4082
4138
  | {
4083
4139
  scope: "user";
4084
- resourceKind: UserResourceKind;
4140
+ resourceKind: Exclude<UserResourceKind, "connection">;
4085
4141
  mode: "session";
4086
4142
  context: "user_private" | "workspace_shared";
4087
4143
  sessionId: string;
@@ -4090,7 +4146,7 @@ export type IssueUserResourceGrantRequest =
4090
4146
  }
4091
4147
  | {
4092
4148
  scope: "user";
4093
- resourceKind: UserResourceKind;
4149
+ resourceKind: Exclude<UserResourceKind, "connection">;
4094
4150
  mode: "always";
4095
4151
  context: "user_private" | "workspace_shared";
4096
4152
  sessionId?: null | undefined;
@@ -4499,6 +4555,7 @@ export type WorkspaceSessionDefaults = {
4499
4555
  };
4500
4556
 
4501
4557
  export type WorkspaceSessionToolDefaults = {
4558
+ inheritConnectedMcpServers?: boolean | undefined;
4502
4559
  mcpServerIds?: string[];
4503
4560
  firstPartyMcpTools?: FirstPartyMcpToolName[];
4504
4561
  };
@@ -4566,7 +4623,11 @@ export type UpdateWorkspaceSettingsRequest = {
4566
4623
  memoryPromptMode?: "legacy_standing" | "retrieval_only" | undefined;
4567
4624
  sessionDefaults?: WorkspaceSessionDefaults | undefined;
4568
4625
  sessionToolDefaults?:
4569
- | { mcpServerIds?: string[] | null; firstPartyMcpTools?: FirstPartyMcpToolName[] | null }
4626
+ | {
4627
+ mcpServerIds?: string[] | null;
4628
+ firstPartyMcpTools?: FirstPartyMcpToolName[] | null;
4629
+ inheritConnectedMcpServers?: boolean | null;
4630
+ }
4570
4631
  | undefined;
4571
4632
  voiceInput?: WorkspaceVoiceInputSettings | undefined;
4572
4633
  transcription?: WorkspaceTranscriptionPolicy | undefined;
@@ -4876,6 +4937,8 @@ export type SessionGoal = {
4876
4937
  text: string;
4877
4938
  successCriteria: string | null;
4878
4939
  rootConstraints: string[];
4940
+ /** Optional for older-server/source compatibility; current servers always supply this projection. */
4941
+ reportRequirements?: SessionGoalReportRequirement[] | undefined;
4879
4942
  evidence: string | null;
4880
4943
  rationale: string | null;
4881
4944
  pausedReason: string | null;
@@ -4997,6 +5060,7 @@ export type ComposerDraft = {
4997
5060
 
4998
5061
  export type NewSessionDraftOptions = {
4999
5062
  agentLearning?: import("@opengeni/contracts").AgentLearningOverrides | undefined;
5063
+ excludedMcpServerIds?: string[] | undefined;
5000
5064
  visibility?: SessionVisibility | undefined;
5001
5065
  sandboxBackend?: SandboxBackend | undefined;
5002
5066
  targetSandboxId?: string | undefined;
@@ -5124,6 +5188,52 @@ export type SessionSystemUpdate = {
5124
5188
  createdAt: string;
5125
5189
  };
5126
5190
 
5191
+ export type SessionRetryRequest = {
5192
+ clientEventId: string;
5193
+ failureEventId: string;
5194
+ model?: string;
5195
+ reasoningEffort?: ReasoningEffort;
5196
+ latencyMode?: LatencyMode;
5197
+ };
5198
+
5199
+ export type SandboxRecoverySelection = {
5200
+ version: 1;
5201
+ sessionId: string;
5202
+ sandboxGroupId: string;
5203
+ leaseId: string;
5204
+ routeEpoch: number;
5205
+ authorityEpoch: number;
5206
+ leaseEpoch: number;
5207
+ workspaceGeneration: number;
5208
+ archiveGeneration: number;
5209
+ artifactId: string;
5210
+ revision: string;
5211
+ capturedAt: string;
5212
+ };
5213
+ export type SandboxRecoveryProjection = {
5214
+ version: 1;
5215
+ status: "unsupported" | "blocked" | "eligible" | "consent_accepted" | "restoring" | "restored";
5216
+ reason: string | null;
5217
+ checkpoint: SandboxRecoverySelection | null;
5218
+ operationId: string | null;
5219
+ };
5220
+ export type SandboxRecoveryRequest = {
5221
+ operationId: string;
5222
+ acceptHistoricalCheckpoint: true;
5223
+ selection: SandboxRecoverySelection;
5224
+ };
5225
+ export type SandboxRecoveryResponse = {
5226
+ outcome: "accepted" | "replayed";
5227
+ operationId: string;
5228
+ recovery: SandboxRecoveryProjection;
5229
+ };
5230
+
5231
+ export type SessionRetryResponse = {
5232
+ outcome: "accepted" | "replayed";
5233
+ turnId: string;
5234
+ failureEventId: string;
5235
+ };
5236
+
5127
5237
  export type SessionControlResponse = {
5128
5238
  receipt: SessionCommandReceipt;
5129
5239
  effectiveControl: EffectiveSessionControl;
@@ -5234,7 +5344,7 @@ export type SubmitComposerDraftRequest = Omit<SaveComposerDraftRequest, "expecte
5234
5344
  controlEtag?: string;
5235
5345
  modelContext?: string;
5236
5346
  mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[];
5237
- connectionAuthorities?: McpConnectionAuthoritySelection[];
5347
+ connectionAccounts?: McpConnectionAccountSelection[];
5238
5348
  personalResourceAttachment?: PersonalResourceAttachmentIntent;
5239
5349
  };
5240
5350
 
@@ -5285,8 +5395,7 @@ export type CreateAgentScheduledTaskRequest = {
5285
5395
  action?: { kind: "agent_turn" } | undefined;
5286
5396
  runMode?: ScheduledTaskRunMode | undefined;
5287
5397
  targetSessionId?: string | null | undefined;
5288
- connectionAuthorities?: McpConnectionAuthoritySelection[] | undefined;
5289
- selectedHostMcpDelegations?: CreateSessionRequest["selectedHostMcpDelegations"];
5398
+ connectionAccounts?: McpConnectionAccountSelection[] | undefined;
5290
5399
  overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
5291
5400
  agentConfig: ScheduledTaskAgentConfigInput;
5292
5401
  status?: ScheduledTaskStatus | undefined;
@@ -5316,8 +5425,7 @@ export type UpdateScheduledTaskRequest = {
5316
5425
  schedule?: ScheduledTaskScheduleSpec | undefined;
5317
5426
  runMode?: ScheduledTaskRunMode | undefined;
5318
5427
  targetSessionId?: string | null | undefined;
5319
- connectionAuthorities?: McpConnectionAuthoritySelection[] | undefined;
5320
- selectedHostMcpDelegations?: CreateSessionRequest["selectedHostMcpDelegations"];
5428
+ connectionAccounts?: McpConnectionAccountSelection[] | undefined;
5321
5429
  overlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
5322
5430
  action?: ScheduledTaskAction | undefined;
5323
5431
  agentConfig?: ScheduledTaskAgentConfigInput | undefined;
@@ -6331,329 +6439,26 @@ export type WorkspaceMemorySearchResponse = {
6331
6439
  results: WorkspaceMemorySearchResult[];
6332
6440
  };
6333
6441
 
6334
- // --- Capability packs ---------------------------------------------------------
6335
-
6336
- export type CapabilityPackConnectorAuthModel =
6337
- | "oauth2_authorization_code_pkce"
6338
- | "oauth2_authorization_code"
6339
- | "api_key"
6340
- | "credential_ref";
6341
-
6342
- export type CapabilityPackConnector = {
6343
- id: string;
6344
- name: string;
6345
- category: string;
6346
- authModel: CapabilityPackConnectorAuthModel;
6347
- providers: string[];
6348
- scopes: string[];
6349
- required: boolean;
6350
- metadata: Record<string, unknown>;
6351
- };
6352
-
6353
- export type CapabilityPackKnowledge = {
6354
- type: "document_base";
6355
- id: string;
6356
- name: string;
6357
- description: string | null;
6358
- required: boolean;
6359
- };
6360
-
6361
- export type CapabilityPackScheduledTaskTemplate = {
6362
- id: string;
6363
- name: string;
6364
- description: string;
6365
- defaultSchedule: ScheduledTaskScheduleSpec;
6366
- defaultRunMode: ScheduledTaskRunMode;
6367
- defaultOverlapPolicy: ScheduledTaskOverlapPolicy;
6368
- prompt?: string | undefined;
6369
- };
6370
-
6371
- export type CapabilityPackAutomationTemplate = {
6372
- id: string;
6373
- name: string;
6374
- description: string;
6375
- adapterId: string;
6376
- eventTypes: string[];
6377
- sessionTemplate: {
6378
- bundledSkillIds?: BundledSkillId[] | undefined;
6379
- prompt: string;
6380
- instructions: string | null;
6381
- resources: ResourceRef[];
6382
- skills: CapabilityPackSkill[];
6383
- tools: ToolRef[];
6384
- firstPartyMcpTools: string[];
6385
- firstPartyMcpPermissions: Permission[];
6386
- model: string | null;
6387
- reasoningEffort: ReasoningEffort | null;
6388
- sandboxBackend: SandboxBackend | null;
6389
- policyRole: string | null;
6390
- metadata: Record<string, unknown>;
6391
- };
6392
- configuration: Record<string, unknown>;
6393
- connectionRequirement: string | null;
6394
- };
6395
-
6396
- export type CapabilityPackSkillFile = {
6442
+ export type SkillArtifactFile = {
6397
6443
  path: string;
6398
6444
  content: string;
6399
6445
  };
6400
6446
 
6401
- export type CapabilityPackSkill = {
6447
+ export type SkillArtifactDefinition = {
6402
6448
  name: string;
6403
6449
  description?: string | undefined;
6404
6450
  /** Omitted means workspace-wide; session_selected requires explicit session attachment. */
6405
6451
  activationMode?: "workspace_managed" | "session_selected" | undefined;
6406
- files: CapabilityPackSkillFile[];
6452
+ files: SkillArtifactFile[];
6407
6453
  };
6408
6454
 
6409
- export type SessionSkill = Omit<CapabilityPackSkill, "activationMode">;
6455
+ export type SessionSkill = Omit<SkillArtifactDefinition, "activationMode">;
6410
6456
  /** SKILL.md owns metadata; supplied legacy fields must exactly match it. */
6411
- export type CapabilityPackSkillInput = Omit<CapabilityPackSkill, "name" | "description"> & {
6457
+ export type SkillArtifactDefinitionInput = Omit<SkillArtifactDefinition, "name" | "description"> & {
6412
6458
  name?: string | undefined;
6413
6459
  description?: string | undefined;
6414
6460
  };
6415
- export type SessionSkillInput = Omit<CapabilityPackSkillInput, "activationMode">;
6416
-
6417
- export type CapabilityPackVariableSetSpec = {
6418
- description: string;
6419
- requiredVariables: string[];
6420
- required: boolean;
6421
- };
6422
-
6423
- export type CapabilityPackComponentReference =
6424
- | {
6425
- key: string;
6426
- kind: "plugin";
6427
- pluginKey: string;
6428
- version: string;
6429
- manifestDigest: string;
6430
- required: boolean;
6431
- }
6432
- | {
6433
- key: string;
6434
- kind: "skill";
6435
- capabilityId: string;
6436
- contentSha256: string;
6437
- required: boolean;
6438
- }
6439
- | {
6440
- key: string;
6441
- kind: "integration";
6442
- capabilityId: string;
6443
- instanceKey: string;
6444
- revisionId: string;
6445
- contentSha256: string;
6446
- required: boolean;
6447
- }
6448
- | {
6449
- key: string;
6450
- kind: "facet";
6451
- capabilityId: string;
6452
- instanceKey: string;
6453
- facetKey: string;
6454
- bindingKey: string;
6455
- configDigest: string;
6456
- required: boolean;
6457
- };
6458
-
6459
- export type CapabilityPackRigRequirement = {
6460
- description?: string | undefined;
6461
- required: boolean;
6462
- rigId?: string | undefined;
6463
- requireVerified: boolean;
6464
- };
6465
-
6466
- export type CapabilityPack = {
6467
- id: string;
6468
- name: string;
6469
- description: string;
6470
- role: string;
6471
- category: string;
6472
- version: string;
6473
- sandboxImage?: string | undefined;
6474
- sandboxProviderImages?:
6475
- | {
6476
- modal?: { imageId: string } | undefined;
6477
- }
6478
- | undefined;
6479
- skills: CapabilityPackSkill[];
6480
- components: CapabilityPackComponentReference[];
6481
- rig?: CapabilityPackRigRequirement | undefined;
6482
- tools: ToolRef[];
6483
- connectors: CapabilityPackConnector[];
6484
- knowledge: CapabilityPackKnowledge[];
6485
- scheduledTaskTemplates: CapabilityPackScheduledTaskTemplate[];
6486
- automationTemplates?: CapabilityPackAutomationTemplate[] | undefined;
6487
- variableSet?: CapabilityPackVariableSetSpec | undefined;
6488
- metadata: Record<string, unknown>;
6489
- };
6490
-
6491
- /** Input shape for registering a pack manifest (server applies defaults). */
6492
- export type RegisterCapabilityPackRequest = {
6493
- id: string;
6494
- name: string;
6495
- description: string;
6496
- role: string;
6497
- category: string;
6498
- version: string;
6499
- sandboxImage?: string | undefined;
6500
- sandboxProviderImages?:
6501
- | {
6502
- modal?: { imageId: string } | undefined;
6503
- }
6504
- | undefined;
6505
- skills?:
6506
- | {
6507
- name?: string | undefined;
6508
- description?: string | undefined;
6509
- activationMode?: "workspace_managed" | "session_selected" | undefined;
6510
- files: CapabilityPackSkillFile[];
6511
- }[]
6512
- | undefined;
6513
- components?:
6514
- | (
6515
- | {
6516
- key: string;
6517
- kind: "plugin";
6518
- pluginKey: string;
6519
- version: string;
6520
- manifestDigest: string;
6521
- required?: boolean | undefined;
6522
- }
6523
- | {
6524
- key: string;
6525
- kind: "skill";
6526
- capabilityId: string;
6527
- contentSha256: string;
6528
- required?: boolean | undefined;
6529
- }
6530
- | {
6531
- key: string;
6532
- kind: "integration";
6533
- capabilityId: string;
6534
- instanceKey: string;
6535
- revisionId: string;
6536
- contentSha256: string;
6537
- required?: boolean | undefined;
6538
- }
6539
- | {
6540
- key: string;
6541
- kind: "facet";
6542
- capabilityId: string;
6543
- instanceKey: string;
6544
- facetKey: string;
6545
- bindingKey: string;
6546
- configDigest: string;
6547
- required?: boolean | undefined;
6548
- }
6549
- )[]
6550
- | undefined;
6551
- rig?:
6552
- | {
6553
- description?: string | undefined;
6554
- required?: boolean | undefined;
6555
- rigId?: string | undefined;
6556
- requireVerified?: boolean | undefined;
6557
- }
6558
- | undefined;
6559
- tools?: ToolRef[] | undefined;
6560
- connectors?:
6561
- | {
6562
- id: string;
6563
- name: string;
6564
- category: string;
6565
- authModel: CapabilityPackConnectorAuthModel;
6566
- providers?: string[] | undefined;
6567
- scopes?: string[] | undefined;
6568
- required?: boolean | undefined;
6569
- metadata?: Record<string, unknown> | undefined;
6570
- }[]
6571
- | undefined;
6572
- knowledge?:
6573
- | {
6574
- type: "document_base";
6575
- id: string;
6576
- name: string;
6577
- description?: string | null | undefined;
6578
- required?: boolean | undefined;
6579
- }[]
6580
- | undefined;
6581
- scheduledTaskTemplates?:
6582
- | {
6583
- id: string;
6584
- name: string;
6585
- description: string;
6586
- defaultSchedule: ScheduledTaskScheduleSpec;
6587
- defaultRunMode?: ScheduledTaskRunMode | undefined;
6588
- defaultOverlapPolicy?: ScheduledTaskOverlapPolicy | undefined;
6589
- prompt?: string | undefined;
6590
- }[]
6591
- | undefined;
6592
- automationTemplates?:
6593
- | {
6594
- id: string;
6595
- name: string;
6596
- description: string;
6597
- adapterId: string;
6598
- eventTypes: string[];
6599
- sessionTemplate: {
6600
- bundledSkillIds?: BundledSkillId[] | undefined;
6601
- prompt: string;
6602
- instructions?: string | null | undefined;
6603
- resources?: ResourceRef[] | undefined;
6604
- skills?: CapabilityPackSkill[] | undefined;
6605
- tools?: ToolRef[] | undefined;
6606
- firstPartyMcpTools?: string[] | undefined;
6607
- firstPartyMcpPermissions?: Permission[] | undefined;
6608
- model?: string | null | undefined;
6609
- reasoningEffort?: ReasoningEffort | null | undefined;
6610
- sandboxBackend?: SandboxBackend | null | undefined;
6611
- policyRole?: string | null | undefined;
6612
- metadata?: Record<string, unknown> | undefined;
6613
- };
6614
- configuration?: Record<string, unknown> | undefined;
6615
- connectionRequirement?: string | null | undefined;
6616
- }[]
6617
- | undefined;
6618
- variableSet?:
6619
- | {
6620
- description: string;
6621
- requiredVariables?: string[] | undefined;
6622
- required?: boolean | undefined;
6623
- }
6624
- | undefined;
6625
- metadata?: Record<string, unknown> | undefined;
6626
- };
6627
-
6628
- export type WorkspaceRegisteredPack = {
6629
- accountId: string;
6630
- workspaceId: string;
6631
- pack: CapabilityPack;
6632
- createdAt: string;
6633
- updatedAt: string;
6634
- };
6635
-
6636
- export type PackInstallationStatus = "installing" | "active" | "needs_attention" | "disabled";
6637
-
6638
- export type PackInstallation = {
6639
- skillPublications?: import("./skills").SkillPublicationReceipt[] | undefined;
6640
- skillWrites?: import("./skills").SkillWriteReceipt[] | undefined;
6641
- skillReleases?: import("./skills").SkillSourceReleaseReceipt[] | undefined;
6642
- id: string;
6643
- accountId: string;
6644
- workspaceId: string;
6645
- packId: string;
6646
- status: PackInstallationStatus;
6647
- version: number;
6648
- /** Exact accepted manifest, not a normalized executable Pack. */
6649
- manifestSnapshot: Record<string, unknown> | null;
6650
- manifestDigest: string | null;
6651
- selectedRigId: string | null;
6652
- installedBySubjectId: string | null;
6653
- metadata: Record<string, unknown>;
6654
- enabledAt: string;
6655
- updatedAt: string;
6656
- };
6461
+ export type SessionSkillInput = Omit<SkillArtifactDefinitionInput, "activationMode">;
6657
6462
 
6658
6463
  // --- OpenGeni Review Bot ------------------------------------------------------------
6659
6464
 
@@ -6769,103 +6574,9 @@ export type PrReviewManagedGitHubSetup = {
6769
6574
  missing: string[];
6770
6575
  };
6771
6576
 
6772
- export type EnablePackRequest = {
6773
- variableSetId?: string | undefined;
6774
- /** @deprecated use variableSetId */
6775
- environmentId?: string | undefined;
6776
- metadata?: Record<string, unknown> | undefined;
6777
- };
6778
-
6779
- export type PackComponentResolutionStatus = "ready" | "missing" | "mismatch";
6780
-
6781
- export type PackComponentResolution = {
6782
- key: string;
6783
- kind: "plugin" | "skill" | "integration" | "facet" | "inline_skill";
6784
- capabilityId: string;
6785
- required: boolean;
6786
- status: PackComponentResolutionStatus;
6787
- expectedDigest: string;
6788
- actualDigest: string | null;
6789
- resolvedId: string | null;
6790
- label: string;
6791
- };
6792
-
6793
- export type PackRigResolution = {
6794
- required: boolean;
6795
- status: "not_required" | "ready" | "missing" | "mismatch" | "unverified";
6796
- requestedRigId: string | null;
6797
- rigId: string | null;
6798
- rigVersionId: string | null;
6799
- name: string | null;
6800
- image: string | null;
6801
- };
6802
-
6803
- export type PreviewPackInstallationRequest = {
6804
- rigId?: string | undefined;
6805
- variableSetId?: string | undefined;
6806
- };
6807
-
6808
- export type PackInstallationPreview = {
6809
- packId: string;
6810
- packVersion: string;
6811
- manifestDigest: string;
6812
- installationVersion: number | null;
6813
- action: "install" | "update" | "repair";
6814
- ready: boolean;
6815
- blockers: string[];
6816
- components: PackComponentResolution[];
6817
- rig: PackRigResolution;
6818
- variableSetId: string | null;
6819
- legacyInlineSkillCount: number;
6820
- legacySandboxImage: string | null;
6821
- };
6822
-
6823
- export type InstallPackRequest = {
6824
- expectedManifestDigest: string;
6825
- expectedInstallationVersion?: number | undefined;
6826
- rigId?: string | undefined;
6827
- variableSetId?: string | undefined;
6828
- idempotencyKey: string;
6829
- metadata?: Record<string, unknown> | undefined;
6830
- };
6831
-
6832
- export type PackUninstallPreview = {
6833
- packId: string;
6834
- installed: boolean;
6835
- installationVersion: number | null;
6836
- components: Array<{
6837
- key: string;
6838
- kind: "plugin" | "skill" | "integration" | "facet" | "inline_skill";
6839
- capabilityId: string;
6840
- retainedByOtherOwners: boolean;
6841
- }>;
6842
- };
6843
-
6844
- export type UninstallPackRequest = {
6845
- expectedInstallationVersion: number;
6846
- idempotencyKey: string;
6847
- };
6848
-
6849
- export type UninstallPackResult = {
6850
- skillReleases?: import("./skills").SkillSourceReleaseReceipt[] | undefined;
6851
- packId: string;
6852
- status: "not_installed" | "uninstalled";
6853
- retainedComponents: string[];
6854
- };
6855
-
6856
- export type ListPacksResponse = {
6857
- packs: CapabilityPack[];
6858
- installations: PackInstallation[];
6859
- };
6860
-
6861
- export type GetPackResponse = {
6862
- pack: CapabilityPack;
6863
- installation: PackInstallation | null;
6864
- };
6865
-
6866
6577
  // --- Capabilities ---------------------------------------------------------------
6867
6578
 
6868
- export type CapabilityKind = "pack" | "mcp" | "api" | "skill" | "plugin";
6579
+ export type CapabilityKind = "mcp" | "api" | "skill" | "plugin";
6869
6580
 
6870
6581
  export type CapabilitySource =
6871
6582
  | "built_in"
@@ -6964,6 +6675,7 @@ export type CapabilityCatalogItem = {
6964
6675
  /** The connection backing this enabled installation, or null when none is involved. */
6965
6676
  connectionRef: {
6966
6677
  connectionId?: string | undefined;
6678
+ accountSelection?: "all_eligible" | undefined;
6967
6679
  authoritySource?: "host" | undefined;
6968
6680
  providerDomain: string;
6969
6681
  kind: string;
@@ -7008,6 +6720,7 @@ export type CreateCapabilityCatalogItemRequest = {
7008
6720
  };
7009
6721
 
7010
6722
  export type EnableCapabilityRequest = {
6723
+ onlyIfUninstalled?: boolean | undefined;
7011
6724
  config?: Record<string, unknown> | undefined;
7012
6725
  metadata?: Record<string, unknown> | undefined;
7013
6726
  connectionRef?: McpServerConnectionRef | undefined;
@@ -7027,7 +6740,7 @@ export type DiscoverMcpCapabilitiesResponse = {
7027
6740
 
7028
6741
  export type SkillImportSource = "github" | "skills_sh";
7029
6742
 
7030
- export type SkillInstallationSource = "library" | "github" | "skills_sh" | "pack";
6743
+ export type SkillInstallationSource = "library" | "github" | "skills_sh";
7031
6744
 
7032
6745
  export type PreviewSkillImportRequest = {
7033
6746
  url: string;
@@ -7090,7 +6803,7 @@ export type InstalledSkill = {
7090
6803
  };
7091
6804
 
7092
6805
  export type CapabilityComponentOwner = {
7093
- kind: "direct" | "plugin" | "pack" | "migration";
6806
+ kind: "direct" | "plugin" | "migration";
7094
6807
  id: string;
7095
6808
  removable: boolean;
7096
6809
  };
@@ -7511,20 +7224,29 @@ export type ListInstalledPluginsResponse = {
7511
7224
  plugins: PluginInstallationSummary[];
7512
7225
  };
7513
7226
 
7227
+ export type PluginUninstallComponentImpact = {
7228
+ capabilityId: string;
7229
+ kind: "skill" | "integration" | "mcp";
7230
+ retainedByOtherOwners: boolean;
7231
+ name: string;
7232
+ disposition: "removed" | "retained" | "inactive";
7233
+ retentionReasons: Array<"other_owners" | "customized" | "re_scoped" | "registry_unavailable">;
7234
+ remainingOwners: Array<{ kind: "direct" | "plugin" | "migration"; name: string }>;
7235
+ skillId?: string | undefined;
7236
+ };
7237
+
7514
7238
  export type PluginUninstallPreview = {
7515
7239
  pluginKey: string;
7516
7240
  installed: boolean;
7517
7241
  version: string | null;
7518
7242
  installationVersion: number | null;
7519
- components: Array<{
7520
- capabilityId: string;
7521
- kind: "skill" | "integration" | "mcp";
7522
- retainedByOtherOwners: boolean;
7523
- }>;
7243
+ previewToken?: string | undefined;
7244
+ components: PluginUninstallComponentImpact[];
7524
7245
  };
7525
7246
 
7526
7247
  export type UninstallPluginRequest = {
7527
7248
  expectedInstallationVersion: number;
7249
+ expectedPreviewToken?: string | undefined;
7528
7250
  idempotencyKey: string;
7529
7251
  };
7530
7252
 
@@ -8002,8 +7724,7 @@ export type UserMessageEventInput = {
8002
7724
  controlEtag?: string | undefined;
8003
7725
  expectedDraftRevision?: number | undefined;
8004
7726
  mcpCredentialUpdates?: SessionMcpCredentialUpdateInput[] | undefined;
8005
- connectionAuthorities?: McpConnectionAuthoritySelection[] | undefined;
8006
- selectedHostMcpDelegations?: CreateSessionRequest["selectedHostMcpDelegations"];
7727
+ connectionAccounts?: McpConnectionAccountSelection[] | undefined;
8007
7728
  personalResourceAttachment?: PersonalResourceAttachmentIntent | undefined;
8008
7729
  };
8009
7730
  };
@@ -8366,3 +8087,26 @@ export type ModelConnectionAccessResponse = {
8366
8087
  workspaces: Array<{ id: string; name: string }>;
8367
8088
  personalWorkspacesSupported: boolean;
8368
8089
  };
8090
+
8091
+ export type ConnectorToolPermission = "allow" | "ask" | "block";
8092
+ export type ConnectorToolPermissionEntry = {
8093
+ name: string;
8094
+ title?: string | undefined;
8095
+ description?: string | undefined;
8096
+ group: "read" | "write" | "other";
8097
+ permission: ConnectorToolPermission;
8098
+ inherited: boolean;
8099
+ approvalRequired: boolean;
8100
+ };
8101
+ export type ConnectorToolPermissionsResponse = {
8102
+ connectionId: string;
8103
+ serverId: string;
8104
+ defaultPermission: ConnectorToolPermission | null;
8105
+ tools: ConnectorToolPermissionEntry[];
8106
+ discoveryError: string | null;
8107
+ canManage: boolean;
8108
+ };
8109
+ export type UpdateConnectorToolPermissionsRequest = {
8110
+ connectionId: string;
8111
+ permission: ConnectorToolPermission;
8112
+ } & ({ target: "default" } | { target: "tools"; toolNames: string[] });