@lucern/sdk 0.3.0-alpha.1 → 0.3.0-alpha.11

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 (221) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/README.md +51 -4
  3. package/dist/accessControl.d.ts +78 -0
  4. package/dist/accessControl.js +1118 -0
  5. package/dist/accessControl.js.map +1 -0
  6. package/dist/adminClient.d.ts +10 -8
  7. package/dist/adminClient.js +242 -39
  8. package/dist/adminClient.js.map +1 -1
  9. package/dist/answersClient.d.ts +2 -0
  10. package/dist/answersClient.js +221 -11
  11. package/dist/answersClient.js.map +1 -1
  12. package/dist/audience/index.d.ts +2 -1
  13. package/dist/audience/index.js +1 -3
  14. package/dist/audience/index.js.map +1 -1
  15. package/dist/audiencesClient.d.ts +18 -16
  16. package/dist/audiencesClient.js +297 -90
  17. package/dist/audiencesClient.js.map +1 -1
  18. package/dist/auditClient.d.ts +2 -0
  19. package/dist/auditClient.js +227 -15
  20. package/dist/auditClient.js.map +1 -1
  21. package/dist/authContext.d.ts +56 -0
  22. package/dist/authContext.js +170 -0
  23. package/dist/authContext.js.map +1 -0
  24. package/dist/authDeviceClient.d.ts +49 -0
  25. package/dist/authDeviceClient.js +121 -0
  26. package/dist/authDeviceClient.js.map +1 -0
  27. package/dist/beliefs/index.d.ts +26 -5
  28. package/dist/beliefs/index.js +3625 -1140
  29. package/dist/beliefs/index.js.map +1 -1
  30. package/dist/beliefsClient.d.ts +4 -2
  31. package/dist/beliefsClient.js +230 -26
  32. package/dist/beliefsClient.js.map +1 -1
  33. package/dist/boundaryClientSurface.d.ts +20 -0
  34. package/dist/boundaryClientSurface.js +73 -0
  35. package/dist/boundaryClientSurface.js.map +1 -0
  36. package/dist/client.d.ts +2988 -27
  37. package/dist/client.js +3625 -1140
  38. package/dist/client.js.map +1 -1
  39. package/dist/clientHelpers.d.ts +48 -0
  40. package/dist/clientHelpers.js +137 -0
  41. package/dist/clientHelpers.js.map +1 -0
  42. package/dist/contextClient.d.ts +6 -3
  43. package/dist/contextClient.js +252 -30
  44. package/dist/contextClient.js.map +1 -1
  45. package/dist/contextFacade.js +25 -16
  46. package/dist/contextFacade.js.map +1 -1
  47. package/dist/contextPackCompiler.js +19 -30
  48. package/dist/contextPackCompiler.js.map +1 -1
  49. package/dist/contextPackPolicy.js +7 -17
  50. package/dist/contextPackPolicy.js.map +1 -1
  51. package/dist/contextTypes.d.ts +2 -0
  52. package/dist/contracts/api-enums.contract.d.ts +2 -2
  53. package/dist/contracts/api-enums.contract.js +6 -1
  54. package/dist/contracts/api-enums.contract.js.map +1 -1
  55. package/dist/contracts/index.d.ts +1 -0
  56. package/dist/contracts/index.js +120 -5
  57. package/dist/contracts/index.js.map +1 -1
  58. package/dist/contracts/lens-filter.contract.js +4 -3
  59. package/dist/contracts/lens-filter.contract.js.map +1 -1
  60. package/dist/contracts/lens-workflow.contract.js +4 -3
  61. package/dist/contracts/lens-workflow.contract.js.map +1 -1
  62. package/dist/contracts/lensFilter.js +4 -3
  63. package/dist/contracts/lensFilter.js.map +1 -1
  64. package/dist/contracts/lensWorkflow.js +4 -3
  65. package/dist/contracts/lensWorkflow.js.map +1 -1
  66. package/dist/contracts/mcpTools.d.ts +46 -1
  67. package/dist/contracts/mcpTools.js +108 -0
  68. package/dist/contracts/mcpTools.js.map +1 -1
  69. package/dist/contradictions/index.d.ts +25 -4
  70. package/dist/contradictions/index.js +3625 -1140
  71. package/dist/contradictions/index.js.map +1 -1
  72. package/dist/coreClient.d.ts +11 -1
  73. package/dist/coreClient.js +222 -14
  74. package/dist/coreClient.js.map +1 -1
  75. package/dist/decisions/index.d.ts +35 -14
  76. package/dist/decisions/index.js +3625 -1140
  77. package/dist/decisions/index.js.map +1 -1
  78. package/dist/decisionsClient.d.ts +6 -12
  79. package/dist/decisionsClient.js +235 -37
  80. package/dist/decisionsClient.js.map +1 -1
  81. package/dist/edges/index.d.ts +48 -87
  82. package/dist/edges/index.js +3625 -1140
  83. package/dist/edges/index.js.map +1 -1
  84. package/dist/embeddingsClient.d.ts +106 -0
  85. package/dist/embeddingsClient.js +731 -0
  86. package/dist/embeddingsClient.js.map +1 -0
  87. package/dist/eventingClient.d.ts +96 -0
  88. package/dist/eventingClient.js +728 -0
  89. package/dist/eventingClient.js.map +1 -0
  90. package/dist/events.js +6 -3
  91. package/dist/events.js.map +1 -1
  92. package/dist/eventsCore.d.ts +3 -1
  93. package/dist/eventsCore.js +222 -14
  94. package/dist/eventsCore.js.map +1 -1
  95. package/dist/evidence/index.d.ts +25 -4
  96. package/dist/evidence/index.js +3625 -1140
  97. package/dist/evidence/index.js.map +1 -1
  98. package/dist/evidenceClient.d.ts +2 -0
  99. package/dist/evidenceClient.js +222 -14
  100. package/dist/evidenceClient.js.map +1 -1
  101. package/dist/facade/context.d.ts +2 -1
  102. package/dist/facade/context.js +25 -16
  103. package/dist/facade/context.js.map +1 -1
  104. package/dist/functionSurface.d.ts +143 -0
  105. package/dist/functionSurface.js +1204 -0
  106. package/dist/functionSurface.js.map +1 -0
  107. package/dist/functionSurfaceClient.d.ts +8 -0
  108. package/dist/functionSurfaceClient.js +1204 -0
  109. package/dist/functionSurfaceClient.js.map +1 -0
  110. package/dist/gatewayFacades.d.ts +64 -46
  111. package/dist/gatewayFacades.js +461 -128
  112. package/dist/gatewayFacades.js.map +1 -1
  113. package/dist/graphAnalysisClient.d.ts +192 -0
  114. package/dist/graphAnalysisClient.js +799 -0
  115. package/dist/graphAnalysisClient.js.map +1 -0
  116. package/dist/graphClient.d.ts +8 -13
  117. package/dist/graphClient.js +244 -45
  118. package/dist/graphClient.js.map +1 -1
  119. package/dist/graphIntel.d.ts +4 -0
  120. package/dist/graphIntel.js +3 -0
  121. package/dist/graphIntel.js.map +1 -0
  122. package/dist/graphIntelligence.d.ts +2 -0
  123. package/dist/graphIntelligence.js +47 -0
  124. package/dist/graphIntelligence.js.map +1 -0
  125. package/dist/graphRecommendationsClient.d.ts +56 -0
  126. package/dist/graphRecommendationsClient.js +664 -0
  127. package/dist/graphRecommendationsClient.js.map +1 -0
  128. package/dist/graphStateClassifierClient.d.ts +73 -0
  129. package/dist/graphStateClassifierClient.js +716 -0
  130. package/dist/graphStateClassifierClient.js.map +1 -0
  131. package/dist/harnessClient.d.ts +15 -24
  132. package/dist/harnessClient.js +235 -42
  133. package/dist/harnessClient.js.map +1 -1
  134. package/dist/identityClient.d.ts +97 -11
  135. package/dist/identityClient.js +409 -33
  136. package/dist/identityClient.js.map +1 -1
  137. package/dist/index.d.ts +30 -5
  138. package/dist/index.js +4272 -1225
  139. package/dist/index.js.map +1 -1
  140. package/dist/infisicalRuntime.d.ts +43 -0
  141. package/dist/infisicalRuntime.js +346 -0
  142. package/dist/infisicalRuntime.js.map +1 -0
  143. package/dist/jobsClient.d.ts +98 -0
  144. package/dist/jobsClient.js +726 -0
  145. package/dist/jobsClient.js.map +1 -0
  146. package/dist/learningClient.d.ts +8 -6
  147. package/dist/learningClient.js +252 -44
  148. package/dist/learningClient.js.map +1 -1
  149. package/dist/lenses/index.d.ts +77 -38
  150. package/dist/lenses/index.js +3625 -1140
  151. package/dist/lenses/index.js.map +1 -1
  152. package/dist/mcpClient.d.ts +28 -0
  153. package/dist/mcpClient.js +669 -0
  154. package/dist/mcpClient.js.map +1 -0
  155. package/dist/modelRuntimeClient.d.ts +72 -0
  156. package/dist/modelRuntimeClient.js +704 -0
  157. package/dist/modelRuntimeClient.js.map +1 -0
  158. package/dist/nodes/index.d.ts +64 -21
  159. package/dist/nodes/index.js +3625 -1140
  160. package/dist/nodes/index.js.map +1 -1
  161. package/dist/ontologies/index.d.ts +54 -32
  162. package/dist/ontologies/index.js +3625 -1140
  163. package/dist/ontologies/index.js.map +1 -1
  164. package/dist/ontologyClient.d.ts +19 -25
  165. package/dist/ontologyClient.js +258 -40
  166. package/dist/ontologyClient.js.map +1 -1
  167. package/dist/ontologyLinksClient.d.ts +71 -0
  168. package/dist/ontologyLinksClient.js +697 -0
  169. package/dist/ontologyLinksClient.js.map +1 -0
  170. package/dist/orgGraphSearchClient.d.ts +85 -0
  171. package/dist/orgGraphSearchClient.js +672 -0
  172. package/dist/orgGraphSearchClient.js.map +1 -0
  173. package/dist/packsClient.d.ts +11 -23
  174. package/dist/packsClient.js +234 -46
  175. package/dist/packsClient.js.map +1 -1
  176. package/dist/policyClient.d.ts +13 -10
  177. package/dist/policyClient.js +243 -25
  178. package/dist/policyClient.js.map +1 -1
  179. package/dist/questions/index.d.ts +25 -4
  180. package/dist/questions/index.js +3625 -1140
  181. package/dist/questions/index.js.map +1 -1
  182. package/dist/realtime/index.d.ts +1 -1
  183. package/dist/reportsClient.d.ts +9 -7
  184. package/dist/reportsClient.js +281 -53
  185. package/dist/reportsClient.js.map +1 -1
  186. package/dist/schemaClient.d.ts +5 -3
  187. package/dist/schemaClient.js +235 -29
  188. package/dist/schemaClient.js.map +1 -1
  189. package/dist/sdkSurface.d.ts +8 -3
  190. package/dist/sdkSurface.js +10 -6
  191. package/dist/sdkSurface.js.map +1 -1
  192. package/dist/secrets.d.ts +1 -0
  193. package/dist/secrets.js +3 -0
  194. package/dist/secrets.js.map +1 -0
  195. package/dist/sourcesClient.d.ts +2 -0
  196. package/dist/sourcesClient.js +222 -14
  197. package/dist/sourcesClient.js.map +1 -1
  198. package/dist/telemetryClient.d.ts +94 -0
  199. package/dist/telemetryClient.js +741 -0
  200. package/dist/telemetryClient.js.map +1 -0
  201. package/dist/toolRegistryClient.d.ts +115 -0
  202. package/dist/toolRegistryClient.js +767 -0
  203. package/dist/toolRegistryClient.js.map +1 -0
  204. package/dist/topics/index.d.ts +36 -9
  205. package/dist/topics/index.js +3627 -1140
  206. package/dist/topics/index.js.map +1 -1
  207. package/dist/topicsClient.d.ts +4 -0
  208. package/dist/topicsClient.js +237 -24
  209. package/dist/topicsClient.js.map +1 -1
  210. package/dist/types.d.ts +5 -0
  211. package/dist/version.d.ts +1 -1
  212. package/dist/version.js +1 -1
  213. package/dist/version.js.map +1 -1
  214. package/dist/workflowClient.d.ts +58 -40
  215. package/dist/workflowClient.js +243 -58
  216. package/dist/workflowClient.js.map +1 -1
  217. package/dist/worktrees/index.d.ts +70 -33
  218. package/dist/worktrees/index.js +3625 -1140
  219. package/dist/worktrees/index.js.map +1 -1
  220. package/package.json +13 -3
  221. package/dist/client-B6aWUUwp.d.ts +0 -2552
package/dist/client.d.ts CHANGED
@@ -1,32 +1,2993 @@
1
- import './audiencesClient.js';
2
- import './schemaClient.js';
3
- import './harnessClient.js';
4
- import './identityClient.js';
5
- import './adminClient.js';
6
- import './controlObjectOwnership.js';
7
- import './beliefsClient.js';
8
- import './packsClient.js';
9
- import './customTools.js';
10
- import './policyClient.js';
11
- import './coreClient.js';
12
- import './ontologyClient.js';
13
- import './contextTypes.js';
14
- import './topicsClient.js';
15
- import './answersClient.js';
16
- import './auditClient.js';
17
- export { L as LucernClientConfig, c as createLucernClient } from './client-B6aWUUwp.js';
18
- import './contextClient.js';
19
- import './contracts/lens-workflow.contract.js';
20
- import './decisionsClient.js';
21
- import './evidenceClient.js';
22
- import './graphClient.js';
23
- import './learningClient.js';
24
- import './reportsClient.js';
25
- import './types.js';
26
- import './sourcesClient.js';
27
- import './workflowClient.js';
1
+ import { AudiencesClientConfig, AudienceRegistryInput, AudienceGrantInput, AudienceGrantRevokeInput } from './audiencesClient.js';
2
+ import { SchemaClientConfig, SchemaPackInstallInput, SchemaEntitlementInput } from './schemaClient.js';
3
+ import { HarnessClientConfig, HarnessAgentWriteInput, HarnessInvokeManagedAgentInput, HarnessToolWriteInput, HarnessExecuteToolInput, HarnessExecuteToolResult, HarnessStartRunInput, HarnessRunReportInput, HarnessCompleteRunInput } from './harnessClient.js';
4
+ import { AdminClientConfig, TenantApiKeyRecord, TenantVaultSecretRecord, TenantConfigRecord, TenantModelRoutingSnapshot } from './adminClient.js';
5
+ import { ControlObjectOwnershipContract } from './controlObjectOwnership.js';
6
+ import { BeliefsClientConfig, ModulateConfidenceInput, OpinionHistoryEntry, CreateBeliefInput, RefineBeliefInput, ModulateConfidenceOpinionInput, ForkBeliefInput, UpdateBeliefStatusInput, UpdateBeliefRationaleInput, LinkBeliefsInput, UnlinkBeliefEvidenceInput, UpdateBeliefCriticalityInput, BatchUpdateBeliefCriticalityInput, ReassignBeliefsTopicInput } from './beliefsClient.js';
7
+ import { DeviceCodeInput, DeviceCodeResponse, DeviceTokenResponse } from './authDeviceClient.js';
8
+ import { McpBootstrapSessionInput, McpBootstrapSessionResponse, McpCheckWritePolicyInput, McpCheckWritePolicyResponse, McpBeginBuildSessionInput, McpBeginBuildSessionResponse, McpEvaluateEngineeringContractInput, McpContractEvaluationResponse, McpEvaluateResearchContractInput } from './mcpClient.js';
9
+ import { IdentityClientConfig, PolicyEvaluationInput, PolicyDecisionRecord, RecordPolicyDecisionInput, PutTenantSecretReferenceInput, TenantSecretReference, ClerkUserSearchResult, TenantIdentityScope, TenantIdentityConfigRecord, UpdateTenantConfigInput, TenantIntegrationRecord, UpsertTenantIntegrationInput } from './identityClient.js';
10
+ import { normalizeCanonicalPrincipalIdentity, RequireAccessInput, AccessCheckResult } from './accessControl.js';
11
+ import { PacksClientConfig, PackInstallInput, PackEnableInput, PackDisableInput, PackEntitlementInput, PackUninstallInput, PackUpgradeInput } from './packsClient.js';
12
+ import { ToolRegistryClientConfig, ToolRegistryQuery, ToolCatalogEntry, EffectiveToolsQuery, UpsertCoreToolsInput, SetPackToolsStatusInput, CreateToolAclInput, ToolAclRecord, DeleteToolAclInput, RegisterCustomToolInput } from './toolRegistryClient.js';
13
+ import { TelemetryClientConfig, LogSystemEventInput, LogToolCallsBatchInput, RecordEpistemicAuditInput, RecordTelemetryPolicyDecisionInput, StartTelemetryRunInput, TelemetryRunRecord, FinishTelemetryRunInput, TelemetryScope } from './telemetryClient.js';
14
+ import { JobsClientConfig, EnqueueJobInput, JobRecord, JobsScope, ClaimJobInput, UpdateJobStatusInput, RetryJobInput, RecordJobRunStartInput, JobRunRecord, RecordJobRunFinishInput } from './jobsClient.js';
15
+ import { ModelRuntimeClientConfig, ModelRuntimeScope, ModelRegistryRecord, ModelFunctionSlot, ResolveModelSlotInput, UpdateModelSlotConfigInput } from './modelRuntimeClient.js';
16
+ import { GraphStateClassifierClientConfig, ClassifyNodeInput, GraphStateClassification, ClassifyTopicInput, ListGraphStateClassificationsInput, RecordGraphStateClassificationInput } from './graphStateClassifierClient.js';
17
+ import { OntologyLinksClientConfig, OntologyLinkWriteInput, OntologyLinkRecord, ListOntologyLinksForNodeInput, UpdateOntologyLinkStatusInput } from './ontologyLinksClient.js';
18
+ import { OrgGraphSearchClientConfig, OrgGraphSearchInput, OrgGraphSearchResponse, GetOrgGraphNodeInput, OrgGraphSearchResult, ListOrgGraphByProvenanceInput, ListPublishedFromWorkspaceInput } from './orgGraphSearchClient.js';
19
+ import { GraphRecommendationsClientConfig, GraphRecommendationListInput, GraphRecommendationRecord, MarkGraphRecommendationStatusInput } from './graphRecommendationsClient.js';
20
+ import { GraphAnalysisClientConfig, ListGraphIntelligenceQueriesInput, GraphIntelligenceQueryCatalogResponse, RunGraphIntelligenceQueryInput, GraphIntelligenceQueryRunResponse, SaveGraphAnalysisInput, GraphAnalysisRecord, ListGraphAnalysesInput, GetLatestGraphAnalysisInput, SaveGraphSuggestionsInput, GraphAnalysisSuggestionsResponse, UpdateGraphSuggestionStatusInput, GraphAnalysisSuggestion, ListGraphSuggestionsInput, ListGraphChangesInput, ComputeOrRequestGraphAnalysisInput } from './graphAnalysisClient.js';
21
+ import { EmbeddingsClientConfig, GetEmbeddingsByNodeIdsInput, EmbeddingRecord, ListMissingEmbeddingsInput, MissingEmbeddingCandidate, VectorSearchByTopicInput, VectorSearchMatch, MarkEmbeddingBackfillQueuedInput } from './embeddingsClient.js';
22
+ import { PolicyClientConfig, PermissionDecision, PermissionKind, WritePolicyRecord, WritePolicyCreateInput, WritePolicyUpdateInput, TenantPolicyRecord, TenantPolicyPermission } from './policyClient.js';
23
+ import { PlatformGatewaySuccess, GatewayScope } from './coreClient.js';
24
+ import { OntologyClientConfig, OntologyBindingInput, OntologyDefinitionInput, OntologyDefinitionUpdateInput, OntologyVersionInput } from './ontologyClient.js';
25
+ import { CompileContextInput, PublicCompiledContext } from './contextTypes.js';
26
+ import { TopicsClientConfig, TopicListInput, TopicCreateInput, TopicUpdateInput, TopicTreeQuery, TopicCoverageQuery, TopicBulkCreateInput } from './topicsClient.js';
27
+ import { FunctionSurfaceClientConfig, FunctionSurfaceInput, FunctionSurfaceResult } from './functionSurface.js';
28
+ import { AnswersClientConfig } from './answersClient.js';
29
+ import { AuditClientConfig } from './auditClient.js';
30
+ import { ListResult, JsonObject, PlatformSourceRecord, PlatformGraphNode, PlatformGraphEdge, GraphNeighborhoodResponse, JsonArray, RecordJudgmentResponse, ListJudgmentsResponse, GetJudgmentResponse, RecordJudgmentOutcomeResponse, JudgmentReadinessResponse, JudgmentCalibrationResponse, PendingJudgmentOutcomeRecord, JudgmentTransitionAuditIntegrityResponse, TopicIdentifierInput, WorkflowBranchRecord, WorkflowLensRecord, WorkflowLensBindingRecord, WorkflowWorktreeRecord, ListWorktreesResponse, PushWorktreeResponse, OpenPullRequestResponse, TopicListResponse, TopicRecord, TopicTreeResponse, TopicCoverageResponse, PlatformBeliefRecord, ModulateConfidenceResponse, ForkBeliefResponse, DeleteEdgeResponse, GraphPathResponse, GraphAnalyticsResponse, MergeWorktreeResponse, ListTopicsResponse, SwitchTopicContextResponse, CreateTaskResponse, CompleteTaskResponse, UpdateTaskResponse, ReportTemplatesResponse, ReportWithSectionsResponse } from './types.js';
31
+ import { ContextClientConfig } from './contextClient.js';
32
+ import { LensPromptTemplateReference, LensWorkflowTemplate, LensTaskTemplate } from './contracts/lens-workflow.contract.js';
33
+ import { registerCustomTool, unregisterCustomTool, listRegisteredCustomTools, clearRegisteredCustomTools } from './customTools.js';
34
+ import { DecisionsClientConfig, RecordJudgmentInput, ListJudgmentsInput, RecordJudgmentOutcomeInput, GetJudgmentCalibrationInput, ListPendingJudgmentOutcomeReviewInput, GetJudgmentTransitionAuditIntegrityInput } from './decisionsClient.js';
35
+ import { EvidenceClientConfig, EvidenceClassificationRequestConfig, ClassifyEvidenceResult, ClassifyEvidenceBatchItem, ClassifyEvidenceBatchResult } from './evidenceClient.js';
36
+ import { EventingClientConfig, RecordEventInput, EventingRecord, EventingScope, EventingWebhookRecord, EnqueueDeliveryInput, EventingDeliveryRecord, RecordDeliveryAttemptInput, UpdateDeliveryStatusInput } from './eventingClient.js';
37
+ import { GraphClientConfig, ListNodesInput, GetNodeInput, HardDeleteNodeInput, CreateEdgeInput, NeighborhoodInput, CreateNodeInput, UpdateNodeInput, BatchCreateNodesInput, SupersedeNodeInput, VerifyNodeInput, ListEdgesInput, DeleteEdgeInput, TraverseInput, AnalyzeInput, BiasInput, GapsInput, SearchInput, PathInput, AnalyticsInput } from './graphClient.js';
38
+ import { LearningClientConfig } from './learningClient.js';
39
+ import { ReportsClientConfig } from './reportsClient.js';
40
+ import { SourcesClientConfig, UpsertSourceSpec } from './sourcesClient.js';
41
+ import { WorkflowClientConfig, WorkflowLensPerspectiveType, WorkflowLensStatus, AddWorktreeInput, WorkflowWorktreeStatus, UpdateWorktreeTargetsInput, MergeInput, CreateTaskInput, CompleteTaskInput, UpdateTaskInput, WorkflowBranchStatus, CompleteWorktreeInput, AdvanceWorktreePhaseInput, SetWorktreePhaseInput, PatchWorktreeStateInput, BulkCreateWorktreesInput, ListTopicsInput, SwitchTopicContextInput } from './workflowClient.js';
42
+ import { CustomToolInput as CustomToolInput$1 } from './clientHelpers.js';
43
+ import './authContext.js';
44
+ import './contracts/auth-session.contract.js';
28
45
  import './contracts/workflow-runtime.contract.js';
29
46
  import './contracts/lens-filter.contract.js';
30
47
  import './opinion.js';
48
+ import '@lucern/contracts/mcp-gateway-boundary.contract';
49
+ import './boundaryClientSurface.js';
50
+ import '@lucern/contracts';
31
51
  import 'zod';
32
52
  import '@lucern/contracts/tool-contracts';
53
+
54
+ type ClientConfig = BeliefsClientConfig | SourcesClientConfig | GraphClientConfig | DecisionsClientConfig | AnswersClientConfig | ContextClientConfig | WorkflowClientConfig | AuditClientConfig | AdminClientConfig | EvidenceClientConfig | EmbeddingsClientConfig | EventingClientConfig | GraphAnalysisClientConfig | GraphRecommendationsClientConfig | GraphStateClassifierClientConfig | IdentityClientConfig | JobsClientConfig | ModelRuntimeClientConfig | OntologyLinksClientConfig | OrgGraphSearchClientConfig | PolicyClientConfig | PacksClientConfig | ReportsClientConfig | LearningClientConfig | TelemetryClientConfig | ToolRegistryClientConfig | FunctionSurfaceClientConfig | OntologyClientConfig | HarnessClientConfig | SchemaClientConfig | AudiencesClientConfig | TopicsClientConfig;
55
+ type CustomToolInput = CustomToolInput$1;
56
+ type CustomToolInvoker = (input?: CustomToolInput) => Promise<unknown>;
57
+ type CustomToolNamespace = Record<string, CustomToolInvoker>;
58
+ type GatewayDataEnvelope<T = unknown> = PlatformGatewaySuccess<T> & (T extends Record<string, unknown> ? T : Record<string, unknown>);
59
+ type BeliefsCompatCreateInput = {
60
+ topicId?: string;
61
+ text?: string;
62
+ canonicalText?: string;
63
+ formulation?: string;
64
+ rationale?: string;
65
+ worktreeId?: string;
66
+ pillar?: string;
67
+ baseRate?: number;
68
+ sourceBeliefIds?: string[];
69
+ sourceType?: string;
70
+ beliefType?: string;
71
+ reversibility?: string;
72
+ predictionMeta?: JsonObject;
73
+ metadata?: JsonObject;
74
+ };
75
+ type BeliefsCompatForkInput = {
76
+ text?: string;
77
+ newFormulation?: string;
78
+ formulation?: string;
79
+ forkReason?: "refinement" | "contradiction_response" | "scope_change" | "confidence_collapse" | "manual";
80
+ rationale?: string;
81
+ };
82
+ type BeliefsCompatUpdateConfidenceInput = ModulateConfidenceInput;
83
+ /**
84
+ * Configuration for the high-level Lucern SDK client.
85
+ *
86
+ * At minimum, provide `apiKey` and `baseUrl`. The SDK handles
87
+ * authentication, retries, and idempotency automatically.
88
+ */
89
+ type LucernClientConfig = ClientConfig & {
90
+ /** API key for authenticating with the Lucern platform. */
91
+ apiKey?: string;
92
+ /**
93
+ * Optional Clerk JWT for per-user identity and RBAC.
94
+ * When present, the SDK operates in user-scoped mode with
95
+ * pack-aware tool filtering. When absent, operates in agent mode.
96
+ */
97
+ /** Lucern platform session token for interactive/user-scoped requests. */
98
+ userToken?: string;
99
+ /**
100
+ * Optional pack key for auto-install convenience.
101
+ * When set, the SDK will call `packs.install()` on first use
102
+ * to ensure the pack is available in the workspace.
103
+ */
104
+ packKey?: string;
105
+ /** Target environment. Defaults to production if not specified. */
106
+ environment?: "sandbox" | "production";
107
+ };
108
+ /**
109
+ * Create the high-level Lucern SDK client with all domain namespaces.
110
+ *
111
+ * @param config - Client configuration with API key, base URL, and optional settings.
112
+ * @returns The Lucern client with namespaced methods for beliefs, topics, evidence, decisions, and more.
113
+ */
114
+ declare function createLucernClient(config?: LucernClientConfig): {
115
+ config: LucernClientConfig;
116
+ version: string;
117
+ search: (query: string, options?: {
118
+ topicId?: string;
119
+ types?: string[];
120
+ status?: string;
121
+ minConfidence?: number;
122
+ limit?: number;
123
+ cursor?: string;
124
+ }) => Promise<GatewayDataEnvelope<{
125
+ [x: string]: unknown;
126
+ } & {
127
+ cursor?: string;
128
+ total?: number;
129
+ } & {
130
+ beliefs?: {
131
+ [x: string]: unknown;
132
+ }[];
133
+ results?: {
134
+ [x: string]: unknown;
135
+ }[];
136
+ }>>;
137
+ events: {
138
+ list(query?: Parameters<(query?: {
139
+ topicId?: string;
140
+ after?: string;
141
+ types?: string[];
142
+ startTime?: number;
143
+ endTime?: number;
144
+ limit?: number;
145
+ }) => Promise<PlatformGatewaySuccess<{
146
+ [x: string]: unknown;
147
+ } & {
148
+ cursor?: string;
149
+ total?: number;
150
+ } & {
151
+ events?: {
152
+ [x: string]: unknown;
153
+ }[];
154
+ }>>>[0]): Promise<GatewayDataEnvelope<{
155
+ [x: string]: unknown;
156
+ } & {
157
+ cursor?: string;
158
+ total?: number;
159
+ } & {
160
+ events?: {
161
+ [x: string]: unknown;
162
+ }[];
163
+ }>>;
164
+ replay(input: Parameters<(input: {
165
+ [x: string]: unknown;
166
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
167
+ [x: string]: unknown;
168
+ }>>>[0]): Promise<GatewayDataEnvelope<{
169
+ [x: string]: unknown;
170
+ }>>;
171
+ recordEvent: (input: RecordEventInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<EventingRecord>>;
172
+ listEvents: (input: EventingScope) => Promise<PlatformGatewaySuccess<ListResult<EventingRecord, "events">>>;
173
+ listWebhooks: (input: EventingScope) => Promise<PlatformGatewaySuccess<ListResult<EventingWebhookRecord, "webhooks">>>;
174
+ enqueueDelivery: (input: EnqueueDeliveryInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<EventingDeliveryRecord>>;
175
+ recordDeliveryAttempt: (input: RecordDeliveryAttemptInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<EventingDeliveryRecord>>;
176
+ updateDeliveryStatus: (input: UpdateDeliveryStatusInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<EventingDeliveryRecord>>;
177
+ };
178
+ beliefs: {
179
+ create(input: BeliefsCompatCreateInput): Promise<GatewayDataEnvelope<{
180
+ [x: string]: unknown;
181
+ } & {
182
+ id?: string;
183
+ beliefId?: string;
184
+ nodeId?: string;
185
+ }>>;
186
+ get(nodeId: string): Promise<GatewayDataEnvelope<{
187
+ [x: string]: unknown;
188
+ } & {
189
+ id?: string;
190
+ beliefId?: string;
191
+ nodeId?: string;
192
+ }>>;
193
+ refine(nodeId: string, textOrInput: string | {
194
+ text: string;
195
+ rationale?: string;
196
+ }, rationale?: string): Promise<GatewayDataEnvelope<{
197
+ [x: string]: unknown;
198
+ } & {
199
+ id?: string;
200
+ beliefId?: string;
201
+ nodeId?: string;
202
+ }>>;
203
+ updateConfidence(nodeId: string, input: BeliefsCompatUpdateConfidenceInput): Promise<GatewayDataEnvelope<{
204
+ [x: string]: unknown;
205
+ }>>;
206
+ modulateConfidence(nodeId: string, input: BeliefsCompatUpdateConfidenceInput): Promise<GatewayDataEnvelope<{
207
+ [x: string]: unknown;
208
+ }>>;
209
+ updateStatus(input: Parameters<(input: {
210
+ id?: string;
211
+ nodeId?: string;
212
+ beliefId?: string;
213
+ status: "active" | "superseded" | "archived";
214
+ reason?: string;
215
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
216
+ [x: string]: unknown;
217
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
218
+ [x: string]: unknown;
219
+ }>>;
220
+ updateRationale(input: Parameters<(input: {
221
+ id?: string;
222
+ nodeId?: string;
223
+ beliefId?: string;
224
+ rationale?: string;
225
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
226
+ [x: string]: unknown;
227
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
228
+ [x: string]: unknown;
229
+ }>>;
230
+ linkBeliefs(input: Parameters<(input: {
231
+ fromNodeId: string;
232
+ toNodeId: string;
233
+ edgeType: string;
234
+ weight?: number;
235
+ context?: string;
236
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
237
+ [x: string]: unknown;
238
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
239
+ [x: string]: unknown;
240
+ }>>;
241
+ unlinkEvidence(input: Parameters<(input: {
242
+ beliefNodeId?: string;
243
+ beliefId?: string;
244
+ insightId?: string;
245
+ evidenceId?: string;
246
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
247
+ [x: string]: unknown;
248
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
249
+ [x: string]: unknown;
250
+ }>>;
251
+ updateCriticality(input: Parameters<(input: {
252
+ id?: string;
253
+ nodeId?: string;
254
+ beliefId?: string;
255
+ criticality: string;
256
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
257
+ [x: string]: unknown;
258
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
259
+ [x: string]: unknown;
260
+ }>>;
261
+ batchUpdateCriticality(input: Parameters<(input: {
262
+ updates: {
263
+ [x: string]: unknown;
264
+ }[];
265
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
266
+ [x: string]: unknown;
267
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
268
+ [x: string]: unknown;
269
+ }>>;
270
+ reassignTopic(input: Parameters<(input: {
271
+ beliefNodeIds?: string[];
272
+ beliefIds?: string[];
273
+ targetTopicId: string;
274
+ reason?: string;
275
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
276
+ [x: string]: unknown;
277
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
278
+ [x: string]: unknown;
279
+ }>>;
280
+ fork(nodeId: string, input: BeliefsCompatForkInput): Promise<GatewayDataEnvelope<{
281
+ [x: string]: unknown;
282
+ } & {
283
+ id?: string;
284
+ beliefId?: string;
285
+ nodeId?: string;
286
+ }>>;
287
+ archive(nodeId: string, input?: string | {
288
+ reason?: string;
289
+ rationale?: string;
290
+ }): Promise<GatewayDataEnvelope<{
291
+ [x: string]: unknown;
292
+ }>>;
293
+ list(args: {
294
+ topicId?: string;
295
+ worktreeId?: string;
296
+ status?: string;
297
+ minConfidence?: number;
298
+ limit?: number;
299
+ cursor?: string;
300
+ }): Promise<GatewayDataEnvelope<{
301
+ [x: string]: unknown;
302
+ } & {
303
+ cursor?: string;
304
+ total?: number;
305
+ } & {
306
+ beliefs?: ({
307
+ [x: string]: unknown;
308
+ } & {
309
+ id?: string;
310
+ beliefId?: string;
311
+ nodeId?: string;
312
+ })[];
313
+ }>>;
314
+ search: (args: {
315
+ query: string;
316
+ topicId?: string;
317
+ status?: string;
318
+ minConfidence?: number;
319
+ limit?: number;
320
+ }) => Promise<{
321
+ results: Record<string, unknown>[];
322
+ }>;
323
+ lineage(nodeId: string): Promise<GatewayDataEnvelope<{
324
+ [x: string]: unknown;
325
+ } & {
326
+ beliefId?: string;
327
+ lineage?: {
328
+ [x: string]: unknown;
329
+ }[];
330
+ }>>;
331
+ confidenceHistory(nodeId: string): Promise<GatewayDataEnvelope<{
332
+ [x: string]: unknown;
333
+ }>>;
334
+ opinionHistory: (nodeId: string) => Promise<OpinionHistoryEntry[]>;
335
+ createContract(nodeId: string, input: Parameters<(id: string, input: {
336
+ [x: string]: unknown;
337
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
338
+ [x: string]: unknown;
339
+ }>>>[1]): Promise<GatewayDataEnvelope<{
340
+ [x: string]: unknown;
341
+ }>>;
342
+ bisect(nodeId: string, input: Parameters<(id: string, input: {
343
+ expectedDirection: "overconfident" | "underconfident";
344
+ timeRange?: {
345
+ start: number;
346
+ end: number;
347
+ };
348
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
349
+ [x: string]: unknown;
350
+ }>>>[1]): Promise<GatewayDataEnvelope<{
351
+ [x: string]: unknown;
352
+ }>>;
353
+ };
354
+ webhooks: {
355
+ create(input: Parameters<(input: {
356
+ [x: string]: unknown;
357
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
358
+ [x: string]: unknown;
359
+ }>>>[0]): Promise<GatewayDataEnvelope<{
360
+ [x: string]: unknown;
361
+ }>>;
362
+ list(query?: Parameters<(query?: {
363
+ topicId?: string;
364
+ }) => Promise<PlatformGatewaySuccess<{
365
+ [x: string]: unknown;
366
+ } & {
367
+ cursor?: string;
368
+ total?: number;
369
+ } & {
370
+ webhooks?: {
371
+ [x: string]: unknown;
372
+ }[];
373
+ }>>>[0]): Promise<GatewayDataEnvelope<{
374
+ [x: string]: unknown;
375
+ } & {
376
+ cursor?: string;
377
+ total?: number;
378
+ } & {
379
+ webhooks?: {
380
+ [x: string]: unknown;
381
+ }[];
382
+ }>>;
383
+ get(id: string): Promise<GatewayDataEnvelope<{
384
+ [x: string]: unknown;
385
+ }>>;
386
+ update(id: string, input: Parameters<(id: string, input: {
387
+ [x: string]: unknown;
388
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
389
+ [x: string]: unknown;
390
+ }>>>[1]): Promise<GatewayDataEnvelope<{
391
+ [x: string]: unknown;
392
+ }>>;
393
+ delete(id: string): Promise<GatewayDataEnvelope<{
394
+ [x: string]: unknown;
395
+ }>>;
396
+ test(id: string, input?: Parameters<(id: string, input?: {
397
+ topicId?: string;
398
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
399
+ [x: string]: unknown;
400
+ }>>>[1]): Promise<GatewayDataEnvelope<{
401
+ [x: string]: unknown;
402
+ }>>;
403
+ deliveries(id: string, query?: Parameters<(id: string, query?: {
404
+ limit?: number;
405
+ }) => Promise<PlatformGatewaySuccess<{
406
+ [x: string]: unknown;
407
+ }>>>[1]): Promise<GatewayDataEnvelope<{
408
+ [x: string]: unknown;
409
+ }>>;
410
+ health(id: string): Promise<GatewayDataEnvelope<{
411
+ [x: string]: unknown;
412
+ }>>;
413
+ };
414
+ edges: {
415
+ create(args: FunctionSurfaceInput & {
416
+ from?: unknown;
417
+ to?: unknown;
418
+ sourceId?: string;
419
+ targetId?: string;
420
+ edgeType: string;
421
+ topicId?: string;
422
+ confidence?: number;
423
+ weight?: number;
424
+ context?: string;
425
+ reasoning?: string;
426
+ }, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
427
+ createEdge(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
428
+ update(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
429
+ updateEdge(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
430
+ remove(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
431
+ removeEdge(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
432
+ removeBetween(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
433
+ removeEdgesBetween(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
434
+ batchCreate(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
435
+ batchCreateEdges(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
436
+ delete(input: Parameters<(input: {
437
+ edgeIds: string[];
438
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
439
+ [x: string]: unknown;
440
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
441
+ [x: string]: unknown;
442
+ }>>;
443
+ list(args: {
444
+ sourceId: string;
445
+ edgeType?: string;
446
+ limit?: number;
447
+ cursor?: string;
448
+ }): Promise<GatewayDataEnvelope<{
449
+ [x: string]: unknown;
450
+ } & {
451
+ cursor?: string;
452
+ total?: number;
453
+ }>>;
454
+ traverse(args: {
455
+ startNode: string;
456
+ direction?: string;
457
+ maxDepth?: number;
458
+ topicId?: string;
459
+ }): Promise<GatewayDataEnvelope<{
460
+ [x: string]: unknown;
461
+ }>>;
462
+ };
463
+ evidence: {
464
+ create(args: {
465
+ text?: string;
466
+ canonicalText?: string;
467
+ topicId?: string;
468
+ source?: string;
469
+ sourceUrl?: string;
470
+ targetId?: string;
471
+ weight?: number;
472
+ metadata?: JsonObject;
473
+ title?: string;
474
+ content?: string;
475
+ contentType?: string;
476
+ kind?: string;
477
+ supports?: {
478
+ nodeId: string;
479
+ weight: number;
480
+ reasoning?: string;
481
+ };
482
+ }): Promise<GatewayDataEnvelope<{
483
+ [x: string]: unknown;
484
+ } & {
485
+ id?: string;
486
+ }>>;
487
+ add: (args: {
488
+ text?: string;
489
+ canonicalText?: string;
490
+ topicId?: string;
491
+ source?: string;
492
+ sourceUrl?: string;
493
+ targetId?: string;
494
+ weight?: number;
495
+ metadata?: JsonObject;
496
+ title?: string;
497
+ content?: string;
498
+ contentType?: string;
499
+ kind?: string;
500
+ rationale?: string;
501
+ supports?: {
502
+ nodeId: string;
503
+ weight: number;
504
+ reasoning?: string;
505
+ };
506
+ }) => Promise<{
507
+ [x: string]: unknown;
508
+ } & {
509
+ id?: string;
510
+ }>;
511
+ get(evidenceId: string): Promise<GatewayDataEnvelope<{
512
+ [x: string]: unknown;
513
+ }>>;
514
+ list(args: {
515
+ topicId?: string;
516
+ targetId?: string;
517
+ limit?: number;
518
+ cursor?: string;
519
+ }): Promise<GatewayDataEnvelope<{
520
+ [x: string]: unknown;
521
+ } & {
522
+ cursor?: string;
523
+ total?: number;
524
+ }>>;
525
+ search(args: {
526
+ q?: string;
527
+ query?: string;
528
+ topicId?: string;
529
+ targetId?: string;
530
+ methodology?: string;
531
+ limit?: number;
532
+ cursor?: string;
533
+ }): Promise<GatewayDataEnvelope<{
534
+ [x: string]: unknown;
535
+ } & {
536
+ cursor?: string;
537
+ total?: number;
538
+ }>>;
539
+ link(args: {
540
+ evidenceId: string;
541
+ targetId?: string;
542
+ beliefId?: string;
543
+ questionId?: string;
544
+ targetType?: "belief" | "question" | string;
545
+ weight?: number;
546
+ rationale?: string;
547
+ }): Promise<GatewayDataEnvelope<{
548
+ [x: string]: unknown;
549
+ } & {
550
+ edgeId?: string;
551
+ }>>;
552
+ linkToBelief(args: {
553
+ evidenceId: string;
554
+ beliefId: string;
555
+ weight: number;
556
+ rationale?: string;
557
+ }): Promise<{
558
+ beliefId: string;
559
+ edgeId?: string;
560
+ }>;
561
+ classifyEvidence(beliefId: string, evidenceId: string, config?: Parameters<(beliefId: string, evidenceId: string, classificationConfig?: EvidenceClassificationRequestConfig, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ClassifyEvidenceResult>>>[2], idempotencyKey?: string): Promise<GatewayDataEnvelope<ClassifyEvidenceResult>>;
562
+ classifyEvidenceBatch(beliefId: string, evidence: Parameters<(beliefId: string, evidence: ClassifyEvidenceBatchItem[], classificationConfig?: EvidenceClassificationRequestConfig, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ClassifyEvidenceBatchResult>>>[1], config?: Parameters<(beliefId: string, evidence: ClassifyEvidenceBatchItem[], classificationConfig?: EvidenceClassificationRequestConfig, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ClassifyEvidenceBatchResult>>>[2], idempotencyKey?: string): Promise<GatewayDataEnvelope<ClassifyEvidenceBatchResult>>;
563
+ updateStatus(input: Parameters<(input: {
564
+ [x: string]: unknown;
565
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
566
+ [x: string]: unknown;
567
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
568
+ [x: string]: unknown;
569
+ }>>;
570
+ update(input: Parameters<(input: {
571
+ [x: string]: unknown;
572
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
573
+ [x: string]: unknown;
574
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
575
+ [x: string]: unknown;
576
+ }>>;
577
+ flagIncorrect(input: Parameters<(input: {
578
+ [x: string]: unknown;
579
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
580
+ [x: string]: unknown;
581
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
582
+ [x: string]: unknown;
583
+ }>>;
584
+ remove(input: Parameters<(input: {
585
+ [x: string]: unknown;
586
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
587
+ [x: string]: unknown;
588
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
589
+ [x: string]: unknown;
590
+ }>>;
591
+ updateVerificationStatus(input: Parameters<(input: {
592
+ [x: string]: unknown;
593
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
594
+ [x: string]: unknown;
595
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
596
+ [x: string]: unknown;
597
+ }>>;
598
+ };
599
+ sources: {
600
+ upsert(input: Parameters<(spec: UpsertSourceSpec, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformSourceRecord>>>[0], idempotencyKey?: Parameters<(spec: UpsertSourceSpec, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformSourceRecord>>>[1]): Promise<GatewayDataEnvelope<PlatformSourceRecord>>;
601
+ get(sourceId: string): Promise<GatewayDataEnvelope<PlatformSourceRecord>>;
602
+ };
603
+ questions: {
604
+ create(args: {
605
+ text: string;
606
+ topicId?: string;
607
+ priority?: string;
608
+ linkedBeliefId?: string;
609
+ metadata?: JsonObject;
610
+ }): Promise<GatewayDataEnvelope<{
611
+ [x: string]: unknown;
612
+ }>>;
613
+ get(questionId: string): Promise<GatewayDataEnvelope<{
614
+ [x: string]: unknown;
615
+ }>>;
616
+ refine(questionId: string, text: string, refinementReason?: string): Promise<GatewayDataEnvelope<{
617
+ [x: string]: unknown;
618
+ }>>;
619
+ list(args: {
620
+ topicId?: string;
621
+ status?: string;
622
+ priority?: string;
623
+ worktreeId?: string;
624
+ limit?: number;
625
+ cursor?: string;
626
+ }): Promise<GatewayDataEnvelope<{
627
+ [x: string]: unknown;
628
+ } & {
629
+ cursor?: string;
630
+ total?: number;
631
+ } & {
632
+ questions?: Array<{
633
+ [x: string]: unknown;
634
+ } & {
635
+ priority?: string;
636
+ }>;
637
+ }>>;
638
+ updateStatus(questionId: string, status: string, rationale?: string): Promise<GatewayDataEnvelope<{
639
+ [x: string]: unknown;
640
+ }>>;
641
+ batchCreate(input: Parameters<(input: {
642
+ [x: string]: unknown;
643
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
644
+ [x: string]: unknown;
645
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
646
+ [x: string]: unknown;
647
+ }>>;
648
+ add(input: Parameters<(input: {
649
+ [x: string]: unknown;
650
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
651
+ [x: string]: unknown;
652
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
653
+ [x: string]: unknown;
654
+ }>>;
655
+ updatePriority(input: Parameters<(input: {
656
+ [x: string]: unknown;
657
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
658
+ [x: string]: unknown;
659
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
660
+ [x: string]: unknown;
661
+ }>>;
662
+ advanceToConviction(input: Parameters<(input: {
663
+ [x: string]: unknown;
664
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
665
+ [x: string]: unknown;
666
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
667
+ [x: string]: unknown;
668
+ }>>;
669
+ updateConviction(input: Parameters<(input: {
670
+ [x: string]: unknown;
671
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
672
+ [x: string]: unknown;
673
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
674
+ [x: string]: unknown;
675
+ }>>;
676
+ finalizeConviction(input: Parameters<(input: {
677
+ [x: string]: unknown;
678
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
679
+ [x: string]: unknown;
680
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
681
+ [x: string]: unknown;
682
+ }>>;
683
+ update(input: Parameters<(input: {
684
+ [x: string]: unknown;
685
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
686
+ [x: string]: unknown;
687
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
688
+ [x: string]: unknown;
689
+ }>>;
690
+ delete(input: Parameters<(input: {
691
+ [x: string]: unknown;
692
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
693
+ [x: string]: unknown;
694
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
695
+ [x: string]: unknown;
696
+ }>>;
697
+ answer(questionId: string, input: {
698
+ text: string;
699
+ confidence?: string;
700
+ evidenceIds?: string[];
701
+ rationale?: string;
702
+ }): Promise<GatewayDataEnvelope<{
703
+ [x: string]: unknown;
704
+ }>>;
705
+ archive(questionId: string, reason?: string): Promise<GatewayDataEnvelope<{
706
+ [x: string]: unknown;
707
+ }>>;
708
+ linkEvidence(args: {
709
+ evidenceId: string;
710
+ questionId: string;
711
+ relevance?: number;
712
+ weight?: number;
713
+ rationale?: string;
714
+ }): Promise<{
715
+ questionId: string;
716
+ relevance: number | undefined;
717
+ edgeId?: string;
718
+ }>;
719
+ getHighPriority(args: {
720
+ topicId?: string;
721
+ limit?: number;
722
+ includeAnswered?: boolean;
723
+ }): Promise<{
724
+ questions: ({
725
+ priority?: string;
726
+ } & Record<string, unknown>)[];
727
+ }>;
728
+ findMissing(args: {
729
+ topicId?: string;
730
+ minConfidence?: number;
731
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
732
+ };
733
+ graph: {
734
+ nodes: {
735
+ list: (query: ListNodesInput) => Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
736
+ get(input: string | Parameters<(query: GetNodeInput) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0]): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
737
+ create(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
738
+ createEpistemicNode(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
739
+ update(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
740
+ updateEpistemicNode(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
741
+ batchCreate(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
742
+ batchCreateEpistemicNodes(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
743
+ listByTopicAndType(input: {
744
+ topicId?: string;
745
+ projectId?: string;
746
+ nodeType?: string;
747
+ nodeTypes?: string[];
748
+ query?: string;
749
+ sourceText?: string;
750
+ limit?: number;
751
+ cursor?: string;
752
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
753
+ countByTopicAndType(input: {
754
+ topicId?: string;
755
+ projectId?: string;
756
+ nodeType?: string;
757
+ nodeTypes?: string[];
758
+ query?: string;
759
+ limit?: number;
760
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
761
+ supersede(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
762
+ verify(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
763
+ archive(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
764
+ hardDelete: (input: HardDeleteNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
765
+ };
766
+ createEdge: (input: CreateEdgeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphEdge>>;
767
+ neighborhood(args: Parameters<(query: NeighborhoodInput) => Promise<PlatformGatewaySuccess<GraphNeighborhoodResponse>>>[0]): Promise<GatewayDataEnvelope<GraphNeighborhoodResponse>>;
768
+ queryLineage: (nodeId: string, depth?: number) => Promise<{
769
+ chain: {
770
+ nodeId: {};
771
+ relation: string;
772
+ }[];
773
+ forkTree: {
774
+ nodeId: string;
775
+ parentCount: number;
776
+ childCount: number;
777
+ children: never[];
778
+ };
779
+ depth: number;
780
+ beliefId: string | undefined;
781
+ lineage: {
782
+ [x: string]: unknown;
783
+ }[];
784
+ }>;
785
+ getConfidenceHistory: (nodeId: string) => Promise<GatewayDataEnvelope<{
786
+ [x: string]: unknown;
787
+ }>>;
788
+ getOpinionHistory: (nodeId: string) => Promise<OpinionHistoryEntry[]>;
789
+ getAuditTrail: (nodeId: string, limit?: number) => Promise<{
790
+ entries: {
791
+ action: string;
792
+ actor: string;
793
+ timestamp: number;
794
+ rationale: string;
795
+ before: string | number | boolean | JsonObject | JsonArray | null;
796
+ after: string | number | boolean | JsonObject | JsonArray | null;
797
+ }[];
798
+ }>;
799
+ traverse(args: {
800
+ startNode: string;
801
+ direction?: string;
802
+ maxDepth?: number;
803
+ topicId?: string;
804
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
805
+ analyze(args: {
806
+ topicId?: string;
807
+ limit?: number;
808
+ metric?: string;
809
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
810
+ bias(args: {
811
+ topicId?: string;
812
+ threshold?: number;
813
+ limit?: number;
814
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
815
+ gaps(args: {
816
+ topicId?: string;
817
+ minConfidence?: number;
818
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
819
+ falsify(args: {
820
+ topicId?: string;
821
+ beliefId?: string;
822
+ beliefIds?: string[];
823
+ minConfidence?: number;
824
+ }): Promise<GatewayDataEnvelope<{
825
+ [x: string]: unknown;
826
+ }>>;
827
+ traceEntityImpact(args: {
828
+ nodeId: string;
829
+ topicId?: string;
830
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
831
+ searchBeliefs: (args: {
832
+ query: string;
833
+ topicId?: string;
834
+ status?: string;
835
+ minConfidence?: number;
836
+ limit?: number;
837
+ }) => Promise<{
838
+ results: Record<string, unknown>[];
839
+ }>;
840
+ findContradictions: (args: {
841
+ topicId?: string;
842
+ nodeId?: string;
843
+ status?: string;
844
+ }) => Promise<{
845
+ contradictions: {
846
+ beliefA: string;
847
+ beliefB: string;
848
+ description: string;
849
+ severity: string;
850
+ status: string;
851
+ defeatType: string;
852
+ }[];
853
+ }>;
854
+ bisectConfidence: (nodeId: string, args: {
855
+ expectedDirection: "overconfident" | "underconfident";
856
+ }) => Promise<GatewayDataEnvelope<{
857
+ [x: string]: unknown;
858
+ }>>;
859
+ listBeliefs: (args: {
860
+ topicId?: string;
861
+ worktreeId?: string;
862
+ status?: string;
863
+ minConfidence?: number;
864
+ limit?: number;
865
+ cursor?: string;
866
+ }) => Promise<({
867
+ [x: string]: unknown;
868
+ } & {
869
+ id?: string;
870
+ beliefId?: string;
871
+ nodeId?: string;
872
+ })[]>;
873
+ detectConfirmationBias(topicId: string, threshold?: number): Promise<{
874
+ topicId: string;
875
+ threshold: number;
876
+ success: true;
877
+ data: Record<string, unknown>;
878
+ correlationId: string;
879
+ policyTraceId: string | null;
880
+ idempotentReplay: boolean;
881
+ }>;
882
+ getStructureAnalysis(topicId: string): Promise<{
883
+ topicId: string;
884
+ success: true;
885
+ data: Record<string, unknown>;
886
+ correlationId: string;
887
+ policyTraceId: string | null;
888
+ idempotentReplay: boolean;
889
+ }>;
890
+ getFalsificationQuestions(topicId: string, beliefIds?: string[]): Promise<{
891
+ topicId: string;
892
+ questions: unknown;
893
+ }>;
894
+ };
895
+ themes: {
896
+ listByTopic(input: {
897
+ topicId?: string;
898
+ projectId?: string;
899
+ query?: string;
900
+ limit?: number;
901
+ cursor?: string;
902
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
903
+ };
904
+ graphSearch: {
905
+ keywordSearchNodes(input: {
906
+ topicId?: string;
907
+ projectId?: string;
908
+ query?: string;
909
+ sourceText?: string;
910
+ nodeType?: string;
911
+ nodeTypes?: string[];
912
+ limit?: number;
913
+ cursor?: string;
914
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
915
+ };
916
+ classifiers: {
917
+ listBeliefCandidates(input: {
918
+ topicId?: string;
919
+ projectId?: string;
920
+ classifierKey?: string;
921
+ query?: string;
922
+ limit?: number;
923
+ cursor?: string;
924
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
925
+ };
926
+ archetypes: {
927
+ getJudgmentSignature(input: {
928
+ topicId?: string;
929
+ projectId?: string;
930
+ principalId?: string;
931
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
932
+ };
933
+ judgments: {
934
+ create: (input: RecordJudgmentInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
935
+ record: (input: RecordJudgmentInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
936
+ list: (query: ListJudgmentsInput) => Promise<PlatformGatewaySuccess<ListJudgmentsResponse>>;
937
+ get: (judgmentId: string) => Promise<PlatformGatewaySuccess<GetJudgmentResponse>>;
938
+ recordOutcome: (judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
939
+ updateOutcome: (judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
940
+ readiness(topicId: string): Promise<PlatformGatewaySuccess<JudgmentReadinessResponse>>;
941
+ calibration(topicId: string): Promise<PlatformGatewaySuccess<JudgmentCalibrationResponse>>;
942
+ pendingOutcomeReview(topicId: string): Promise<PlatformGatewaySuccess<ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
943
+ transitionAuditIntegrity(args: {
944
+ topicId?: string;
945
+ judgmentId?: string;
946
+ includePassing?: boolean;
947
+ }): Promise<PlatformGatewaySuccess<JudgmentTransitionAuditIntegrityResponse>>;
948
+ };
949
+ decisions: {
950
+ create: (input: RecordJudgmentInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
951
+ record: (input: RecordJudgmentInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
952
+ list: (query: ListJudgmentsInput) => Promise<PlatformGatewaySuccess<ListJudgmentsResponse>>;
953
+ get: (judgmentId: string) => Promise<PlatformGatewaySuccess<GetJudgmentResponse>>;
954
+ recordOutcome: (judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
955
+ lessons(decisionId: string, input: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
956
+ archive(decisionId: string, input?: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
957
+ readiness(topicId: string): Promise<PlatformGatewaySuccess<JudgmentReadinessResponse>>;
958
+ calibration(topicId: string): Promise<PlatformGatewaySuccess<JudgmentCalibrationResponse>>;
959
+ pendingOutcomeReview(topicId: string): Promise<PlatformGatewaySuccess<ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
960
+ };
961
+ worktrees: {
962
+ createBranch: (input: {
963
+ name: string;
964
+ topicId?: string;
965
+ description?: string;
966
+ metadata?: JsonObject;
967
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowBranchRecord>>;
968
+ createLens: (input: {
969
+ name: string;
970
+ workspaceId?: string;
971
+ topicId?: string;
972
+ description?: string;
973
+ perspectiveType: WorkflowLensPerspectiveType;
974
+ promptTemplates?: LensPromptTemplateReference[];
975
+ workflowTemplates?: LensWorkflowTemplate[];
976
+ taskTemplates?: LensTaskTemplate[];
977
+ filterCriteria?: JsonObject;
978
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowLensRecord>>;
979
+ listLenses: (query: {
980
+ workspaceId?: string;
981
+ topicId?: string;
982
+ status
983
+ /**
984
+ * Optional pack key for auto-install convenience.
985
+ * When set, the SDK will call `packs.install()` on first use
986
+ * to ensure the pack is available in the workspace.
987
+ */
988
+ ? /**
989
+ * Optional pack key for auto-install convenience.
990
+ * When set, the SDK will call `packs.install()` on first use
991
+ * to ensure the pack is available in the workspace.
992
+ */: WorkflowLensStatus;
993
+ perspectiveType?: WorkflowLensPerspectiveType;
994
+ } & TopicIdentifierInput) => Promise<PlatformGatewaySuccess<ListResult<WorkflowLensRecord, "lenses">>>;
995
+ applyLensToTopic: (input: {
996
+ lensId: string;
997
+ topicId?: string;
998
+ metadata?: JsonObject;
999
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>;
1000
+ removeLensFromTopic: (input: {
1001
+ lensId: string;
1002
+ topicId?: string;
1003
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>;
1004
+ create(input: AddWorktreeInput): Promise<PlatformGatewaySuccess<{
1005
+ [x: string]: unknown;
1006
+ }>>;
1007
+ add(input: AddWorktreeInput): Promise<PlatformGatewaySuccess<{
1008
+ [x: string]: unknown;
1009
+ }>>;
1010
+ list(query: Parameters<(query: {
1011
+ topicId?: string;
1012
+ branchId?: string;
1013
+ status?: WorkflowWorktreeStatus;
1014
+ groupBy?: "campaign" | "lane" | "flat";
1015
+ lane?: string;
1016
+ campaign?: number;
1017
+ limit?: number;
1018
+ } & TopicIdentifierInput) => Promise<PlatformGatewaySuccess<ListResult<WorkflowWorktreeRecord, "worktrees">>>>[0]): Promise<PlatformGatewaySuccess<{
1019
+ [x: string]: unknown;
1020
+ } & {
1021
+ cursor?: string;
1022
+ total?: number;
1023
+ } & {
1024
+ worktrees?: {
1025
+ [x: string]: unknown;
1026
+ }[];
1027
+ }>>;
1028
+ listByTopic(query: Parameters<(query: {
1029
+ topicId?: string;
1030
+ branchId?: string;
1031
+ status?: WorkflowWorktreeStatus;
1032
+ groupBy?: "campaign" | "lane" | "flat";
1033
+ lane?: string;
1034
+ campaign?: number;
1035
+ limit?: number;
1036
+ } & TopicIdentifierInput) => Promise<PlatformGatewaySuccess<ListResult<WorkflowWorktreeRecord, "worktrees">>>>[0]): Promise<PlatformGatewaySuccess<{
1037
+ [x: string]: unknown;
1038
+ } & {
1039
+ cursor?: string;
1040
+ total?: number;
1041
+ } & {
1042
+ worktrees?: {
1043
+ [x: string]: unknown;
1044
+ }[];
1045
+ }>>;
1046
+ findByPairedSprint(input: {
1047
+ sprintId: string;
1048
+ topicId?: string;
1049
+ projectId?: string;
1050
+ limit?: number;
1051
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1052
+ activate(worktreeId: string): Promise<PlatformGatewaySuccess<{
1053
+ [x: string]: unknown;
1054
+ }>>;
1055
+ updateMetadata(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<{
1056
+ [x: string]: unknown;
1057
+ }>>;
1058
+ update(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<{
1059
+ [x: string]: unknown;
1060
+ }>>;
1061
+ updateTargets(input: Parameters<(input: UpdateWorktreeTargetsInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>>[0]): Promise<PlatformGatewaySuccess<{
1062
+ [x: string]: unknown;
1063
+ }>>;
1064
+ listAll: (query?: {
1065
+ status?: WorkflowWorktreeStatus;
1066
+ groupBy?: "campaign" | "lane" | "flat";
1067
+ lane?: string;
1068
+ campaign?: number;
1069
+ limit?: number;
1070
+ }) => Promise<PlatformGatewaySuccess<ListWorktreesResponse>>;
1071
+ merge(worktreeId: string, input: MergeInput): Promise<PlatformGatewaySuccess<{
1072
+ [x: string]: unknown;
1073
+ }>>;
1074
+ push: (worktreeId: string, input: {
1075
+ targetContext: string;
1076
+ beliefIds?: string[];
1077
+ metadata?: JsonObject;
1078
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PushWorktreeResponse>>;
1079
+ openPullRequest: (worktreeId: string, input: {
1080
+ summary: string;
1081
+ reviewers?: string[];
1082
+ status?: "pending_review" | "changes_requested" | "approved" | "blocked";
1083
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<OpenPullRequestResponse>>;
1084
+ pipelineSnapshot(topicId: string): FunctionSurfaceResult<unknown>;
1085
+ complete: (input: {
1086
+ worktreeId: string;
1087
+ keyFindings?: string[];
1088
+ decisionsReached?: string[];
1089
+ nextSteps?: string[];
1090
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1091
+ [x: string]: unknown;
1092
+ }>>;
1093
+ advancePhase(worktreeId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1094
+ [x: string]: unknown;
1095
+ }>>;
1096
+ setPhase(worktreeId: string, phase: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1097
+ [x: string]: unknown;
1098
+ }>>;
1099
+ patchState: (input: {
1100
+ worktreeId: string;
1101
+ patch: {
1102
+ [x: string]: unknown;
1103
+ };
1104
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1105
+ [x: string]: unknown;
1106
+ }>>;
1107
+ bulkCreate: (input: {
1108
+ worktrees: unknown[];
1109
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1110
+ [x: string]: unknown;
1111
+ }>>;
1112
+ };
1113
+ context: {
1114
+ listTopics(query?: Parameters<(query?: TopicListInput) => Promise<PlatformGatewaySuccess<TopicListResponse>>>[0]): Promise<PlatformGatewaySuccess<TopicListResponse>>;
1115
+ compile: (topicIdOrInput?: string | CompileContextInput, input?: CompileContextInput) => Promise<PlatformGatewaySuccess<PublicCompiledContext>>;
1116
+ recordScopeLearning: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1117
+ discover(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1118
+ analyzeTopicDensity: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1119
+ applyAutoBranching: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1120
+ seedBeliefLattice: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1121
+ getLatticeCoverage: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1122
+ matchEntityType(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<{
1123
+ [x: string]: unknown;
1124
+ }>>;
1125
+ discoverEntityConnections(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1126
+ triggerBeliefReview(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1127
+ };
1128
+ tasks: {
1129
+ create(input: CreateTaskInput): Promise<PlatformGatewaySuccess<{
1130
+ [x: string]: unknown;
1131
+ }>>;
1132
+ complete(taskId: string, input: CompleteTaskInput): Promise<PlatformGatewaySuccess<{
1133
+ [x: string]: unknown;
1134
+ }>>;
1135
+ update(taskId: string, input: UpdateTaskInput): Promise<PlatformGatewaySuccess<{
1136
+ [x: string]: unknown;
1137
+ }>>;
1138
+ list(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<{
1139
+ [x: string]: unknown;
1140
+ } & {
1141
+ cursor?: string;
1142
+ total?: number;
1143
+ } & {
1144
+ tasks?: {
1145
+ [x: string]: unknown;
1146
+ }[];
1147
+ }>>;
1148
+ listByTopic(input: FunctionSurfaceInput & {
1149
+ topicId?: string;
1150
+ }): Promise<PlatformGatewaySuccess<{
1151
+ [x: string]: unknown;
1152
+ } & {
1153
+ cursor?: string;
1154
+ total?: number;
1155
+ } & {
1156
+ tasks?: {
1157
+ [x: string]: unknown;
1158
+ }[];
1159
+ }>>;
1160
+ listByWorktree(input: FunctionSurfaceInput & {
1161
+ worktreeId: string;
1162
+ }): Promise<PlatformGatewaySuccess<{
1163
+ [x: string]: unknown;
1164
+ } & {
1165
+ cursor?: string;
1166
+ total?: number;
1167
+ } & {
1168
+ tasks?: {
1169
+ [x: string]: unknown;
1170
+ }[];
1171
+ }>>;
1172
+ linkChat(taskId: string, input: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1173
+ };
1174
+ topics: {
1175
+ list(input?: Parameters<(query?: TopicListInput) => Promise<PlatformGatewaySuccess<TopicListResponse>>>[0]): Promise<PlatformGatewaySuccess<TopicListResponse>>;
1176
+ get: (topicId: string) => Promise<PlatformGatewaySuccess<TopicRecord>>;
1177
+ create(input: Parameters<(input: TopicCreateInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<TopicRecord>>>[0]): Promise<GatewayDataEnvelope<unknown>>;
1178
+ update(topicId: string, input: Parameters<(topicId: string, input: TopicUpdateInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<TopicRecord>>>[1]): Promise<PlatformGatewaySuccess<TopicRecord>>;
1179
+ tree(topicId: string, query?: Parameters<(topicId: string, query?: TopicTreeQuery) => Promise<PlatformGatewaySuccess<TopicTreeResponse>>>[1]): Promise<PlatformGatewaySuccess<TopicTreeResponse>>;
1180
+ getTree(input: {
1181
+ rootId: string;
1182
+ maxDepth?: number;
1183
+ }): Promise<PlatformGatewaySuccess<TopicTreeResponse>>;
1184
+ coverage(topicId: string, query?: Parameters<(topicId: string, query?: TopicCoverageQuery) => Promise<PlatformGatewaySuccess<TopicCoverageResponse>>>[1]): Promise<PlatformGatewaySuccess<TopicCoverageResponse>>;
1185
+ remove: (topicId: string, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1186
+ bulkCreate: (input: TopicBulkCreateInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1187
+ materializeGraph(input?: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
1188
+ materializeTopicGraph(input?: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
1189
+ graphSpine(input?: FunctionSurfaceInput): Promise<GatewayDataEnvelope<unknown>>;
1190
+ getTopicGraphSpine(input?: FunctionSurfaceInput): Promise<GatewayDataEnvelope<unknown>>;
1191
+ };
1192
+ answers: {
1193
+ create(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<{
1194
+ [x: string]: unknown;
1195
+ }>>;
1196
+ get(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1197
+ };
1198
+ contradictions: {
1199
+ flag(args: {
1200
+ beliefA: string;
1201
+ beliefB: string;
1202
+ description: string;
1203
+ topicId?: string;
1204
+ severity?: string;
1205
+ defeatType?: string;
1206
+ }): Promise<GatewayDataEnvelope<{
1207
+ [x: string]: unknown;
1208
+ }>>;
1209
+ list(args: {
1210
+ topicId?: string;
1211
+ status?: string;
1212
+ limit?: number;
1213
+ cursor?: string;
1214
+ }): Promise<GatewayDataEnvelope<{
1215
+ [x: string]: unknown;
1216
+ } & {
1217
+ cursor?: string;
1218
+ total?: number;
1219
+ } & {
1220
+ contradictions?: {
1221
+ [x: string]: unknown;
1222
+ }[];
1223
+ }>>;
1224
+ get(contradictionId: string): Promise<GatewayDataEnvelope<{
1225
+ [x: string]: unknown;
1226
+ }>>;
1227
+ find: (args: {
1228
+ topicId?: string;
1229
+ nodeId?: string;
1230
+ status?: string;
1231
+ }) => Promise<{
1232
+ contradictions: {
1233
+ beliefA: string;
1234
+ beliefB: string;
1235
+ description: string;
1236
+ severity: string;
1237
+ status: string;
1238
+ defeatType: string;
1239
+ }[];
1240
+ }>;
1241
+ };
1242
+ ontologies: {
1243
+ list(input?: {
1244
+ tenantId?: string;
1245
+ tier?: string;
1246
+ status?: string;
1247
+ }): Promise<GatewayDataEnvelope<{
1248
+ ontologies: unknown[];
1249
+ total: number;
1250
+ items: unknown[];
1251
+ definitions: unknown[];
1252
+ }>>;
1253
+ get(ontologyId: string): Promise<GatewayDataEnvelope<{
1254
+ [x: string]: unknown;
1255
+ }>>;
1256
+ bind(input: Parameters<(input: OntologyBindingInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1257
+ [x: string]: unknown;
1258
+ }>>>[0], idempotencyKey?: Parameters<(input: OntologyBindingInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1259
+ [x: string]: unknown;
1260
+ }>>>[1]): Promise<GatewayDataEnvelope<{
1261
+ [x: string]: unknown;
1262
+ }>>;
1263
+ match(input: Parameters<(input: {
1264
+ [x: string]: unknown;
1265
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1266
+ [x: string]: unknown;
1267
+ }>>>[0], idempotencyKey?: Parameters<(input: {
1268
+ [x: string]: unknown;
1269
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1270
+ [x: string]: unknown;
1271
+ }>>>[1]): Promise<GatewayDataEnvelope<{
1272
+ [x: string]: unknown;
1273
+ }>>;
1274
+ create(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
1275
+ update(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
1276
+ archive(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
1277
+ createVersion(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
1278
+ publishVersion(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1279
+ publishOntologyVersion(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1280
+ deprecateVersion(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1281
+ deprecateOntologyVersion(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1282
+ resolveEffective(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1283
+ resolveEffectiveOntology(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1284
+ raw: {
1285
+ list(filters?: GatewayScope & {
1286
+ tenantId?: string;
1287
+ tier?: string;
1288
+ status?: string;
1289
+ }): Promise<PlatformGatewaySuccess<{
1290
+ ontologies: unknown[];
1291
+ total: number;
1292
+ items: unknown[];
1293
+ definitions: unknown[];
1294
+ }>>;
1295
+ get(id: string): Promise<PlatformGatewaySuccess<unknown>>;
1296
+ bind(input: OntologyBindingInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1297
+ createDefinition(input: OntologyDefinitionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1298
+ updateDefinition(id: string, input: OntologyDefinitionUpdateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1299
+ archiveDefinition(id: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1300
+ listVersions(ontologyId: string, filters?: GatewayScope & {
1301
+ status?: string;
1302
+ }): Promise<PlatformGatewaySuccess<ListResult<unknown, "versions">>>;
1303
+ createVersion(ontologyId: string, input: OntologyVersionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1304
+ publishVersion(ontologyId: string, versionId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1305
+ deprecateVersion(ontologyId: string, versionId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1306
+ listTopics(ontologyId: string): Promise<PlatformGatewaySuccess<ListResult<any, "topics">>>;
1307
+ } & {
1308
+ listDefinitions: (filters?: GatewayScope & {
1309
+ tenantId?: string;
1310
+ tier?: string;
1311
+ status?: string;
1312
+ }) => Promise<PlatformGatewaySuccess<{
1313
+ ontologies: unknown[];
1314
+ total: number;
1315
+ items: unknown[];
1316
+ definitions: unknown[];
1317
+ }>>;
1318
+ getDefinition: (id: string) => Promise<PlatformGatewaySuccess<unknown>>;
1319
+ listTopicsByOntology: (ontologyId: string) => Promise<PlatformGatewaySuccess<ListResult<any, "topics">>>;
1320
+ };
1321
+ };
1322
+ coordination: {
1323
+ registerSession: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1324
+ heartbeatSession: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1325
+ endSession: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1326
+ listActiveSessions: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1327
+ sendAgentMessage: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1328
+ broadcastMessage: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1329
+ getInbox: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1330
+ getAgentInbox: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1331
+ claimFiles: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1332
+ };
1333
+ policy: {
1334
+ checkPermission(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<PermissionDecision>>;
1335
+ listAccessibleTopics(input?: Parameters<(query?: GatewayScope & {
1336
+ permission?: PermissionKind;
1337
+ includeShared?: boolean;
1338
+ principal?: string;
1339
+ principalId?: string;
1340
+ limit?: number;
1341
+ }) => Promise<{
1342
+ data: {
1343
+ permission: PermissionKind;
1344
+ topics: {
1345
+ [key: string]: unknown;
1346
+ topicId?: string;
1347
+ name?: string;
1348
+ type?: string;
1349
+ isOwner?: boolean;
1350
+ }[];
1351
+ total: number;
1352
+ deniedTopics: {
1353
+ topicId: string;
1354
+ reasonCode: string;
1355
+ }[];
1356
+ };
1357
+ success: true;
1358
+ correlationId: string;
1359
+ policyTraceId: string | null;
1360
+ idempotentReplay: boolean;
1361
+ }>>[0]): Promise<{
1362
+ data: {
1363
+ permission: PermissionKind;
1364
+ topics: {
1365
+ [key: string]: unknown;
1366
+ topicId?: string;
1367
+ name?: string;
1368
+ type?: string;
1369
+ isOwner?: boolean;
1370
+ }[];
1371
+ total: number;
1372
+ deniedTopics: {
1373
+ topicId: string;
1374
+ reasonCode: string;
1375
+ }[];
1376
+ };
1377
+ success: true;
1378
+ correlationId: string;
1379
+ policyTraceId: string | null;
1380
+ idempotentReplay: boolean;
1381
+ }>;
1382
+ filterByPermission(input: FunctionSurfaceInput): Promise<{
1383
+ success: true;
1384
+ data: {
1385
+ permission: PermissionKind;
1386
+ allowedTopicIds: string[];
1387
+ deniedTopics: Array<{
1388
+ topicId: string;
1389
+ reasonCode: string;
1390
+ }>;
1391
+ count: number;
1392
+ };
1393
+ }>;
1394
+ manageWritePolicy(input: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1395
+ raw: {
1396
+ listDecisions(query?: GatewayScope & {
1397
+ action?: string;
1398
+ decision?: string;
1399
+ traceId?: string;
1400
+ principalId?: string;
1401
+ topicId?: string;
1402
+ limit?: number;
1403
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "decisions">>>;
1404
+ grant(input: GatewayScope & {
1405
+ topicId: string;
1406
+ permission: PermissionKind;
1407
+ principal?: string;
1408
+ principalId?: string;
1409
+ groupId?: string;
1410
+ beliefClusterId?: string;
1411
+ expiresAt?: number;
1412
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1413
+ revoke(input: GatewayScope & {
1414
+ topicId: string;
1415
+ principal?: string;
1416
+ principalId?: string;
1417
+ groupId?: string;
1418
+ beliefClusterId?: string;
1419
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1420
+ listWritePolicies(query?: GatewayScope & {
1421
+ topicId?: string;
1422
+ role?: string;
1423
+ toolCategory?: string;
1424
+ enabled?: boolean;
1425
+ }): Promise<{
1426
+ data: {
1427
+ policies: WritePolicyRecord[];
1428
+ };
1429
+ success: true;
1430
+ correlationId: string;
1431
+ policyTraceId: string | null;
1432
+ idempotentReplay: boolean;
1433
+ }>;
1434
+ createWritePolicy(input: WritePolicyCreateInput, idempotencyKey?: string): Promise<{
1435
+ data: {
1436
+ id: string | undefined;
1437
+ created: boolean;
1438
+ policy: WritePolicyRecord | null;
1439
+ };
1440
+ success: true;
1441
+ correlationId: string;
1442
+ policyTraceId: string | null;
1443
+ idempotentReplay: boolean;
1444
+ }>;
1445
+ updateWritePolicy(id: string, input: WritePolicyUpdateInput, idempotencyKey?: string): Promise<{
1446
+ data: {
1447
+ id: string | undefined;
1448
+ updated: boolean;
1449
+ policy: WritePolicyRecord | null;
1450
+ };
1451
+ success: true;
1452
+ correlationId: string;
1453
+ policyTraceId: string | null;
1454
+ idempotentReplay: boolean;
1455
+ }>;
1456
+ deleteWritePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1457
+ id?: string;
1458
+ deleted?: boolean;
1459
+ }>>;
1460
+ listRolePolicies(query?: GatewayScope): Promise<{
1461
+ data: {
1462
+ policies: TenantPolicyRecord[];
1463
+ };
1464
+ success: true;
1465
+ correlationId: string;
1466
+ policyTraceId: string | null;
1467
+ idempotentReplay: boolean;
1468
+ }>;
1469
+ createRolePolicy(input: GatewayScope & {
1470
+ roleName: string;
1471
+ description?: string;
1472
+ permissions: TenantPolicyPermission[];
1473
+ groupBindings?: string[];
1474
+ }, idempotencyKey?: string): Promise<{
1475
+ data: {
1476
+ policy: TenantPolicyRecord | null;
1477
+ };
1478
+ success: true;
1479
+ correlationId: string;
1480
+ policyTraceId: string | null;
1481
+ idempotentReplay: boolean;
1482
+ }>;
1483
+ updateRolePolicy(id: string, input: GatewayScope & {
1484
+ roleName: string;
1485
+ description?: string;
1486
+ permissions: TenantPolicyPermission[];
1487
+ groupBindings?: string[];
1488
+ }, idempotencyKey?: string): Promise<{
1489
+ data: {
1490
+ policy: TenantPolicyRecord | null;
1491
+ };
1492
+ success: true;
1493
+ correlationId: string;
1494
+ policyTraceId: string | null;
1495
+ idempotentReplay: boolean;
1496
+ }>;
1497
+ deleteRolePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1498
+ checkPermission(query: GatewayScope & {
1499
+ topicId?: string;
1500
+ permission?: PermissionKind;
1501
+ principal?: string;
1502
+ principalId?: string;
1503
+ beliefClusterId?: string;
1504
+ }): Promise<PlatformGatewaySuccess<PermissionDecision>>;
1505
+ listAccessibleTopics(query?: GatewayScope & {
1506
+ permission?: PermissionKind;
1507
+ includeShared?: boolean;
1508
+ principal?: string;
1509
+ principalId?: string;
1510
+ limit?: number;
1511
+ }): Promise<{
1512
+ data: {
1513
+ permission: PermissionKind;
1514
+ topics: {
1515
+ [key: string]: unknown;
1516
+ topicId?: string;
1517
+ name?: string;
1518
+ type?: string;
1519
+ isOwner?: boolean;
1520
+ }[];
1521
+ total: number;
1522
+ deniedTopics: {
1523
+ topicId: string;
1524
+ reasonCode: string;
1525
+ }[];
1526
+ };
1527
+ success: true;
1528
+ correlationId: string;
1529
+ policyTraceId: string | null;
1530
+ idempotentReplay: boolean;
1531
+ }>;
1532
+ filterByPermission(input: GatewayScope & {
1533
+ topicIds?: string[];
1534
+ permission?: PermissionKind;
1535
+ principal?: string;
1536
+ principalId?: string;
1537
+ }): Promise<{
1538
+ success: true;
1539
+ data: {
1540
+ permission: PermissionKind;
1541
+ allowedTopicIds: string[];
1542
+ deniedTopics: Array<{
1543
+ topicId: string;
1544
+ reasonCode: string;
1545
+ }>;
1546
+ count: number;
1547
+ };
1548
+ }>;
1549
+ };
1550
+ };
1551
+ observations: {
1552
+ ingest: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1553
+ ingestObservation: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1554
+ getContext: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1555
+ getObservationContext: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1556
+ };
1557
+ coding: {
1558
+ getCodeContext: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1559
+ getChangeHistory: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1560
+ recordAttempt: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1561
+ getFailureLog: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1562
+ };
1563
+ contracts: {
1564
+ create(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1565
+ createEpistemicContract(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1566
+ list(input?: {
1567
+ beliefNodeId?: string;
1568
+ contractId?: string;
1569
+ status?: string;
1570
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1571
+ evaluate(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1572
+ evaluateContract(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1573
+ getStatus(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1574
+ getContractStatus(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1575
+ };
1576
+ bootstrap: {
1577
+ generateSessionHandoff: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
1578
+ };
1579
+ embeddings: {
1580
+ getByNodeIds(input: GetEmbeddingsByNodeIdsInput): Promise<PlatformGatewaySuccess<ListResult<EmbeddingRecord, "embeddings">>>;
1581
+ listMissingForTopic(input: ListMissingEmbeddingsInput): Promise<PlatformGatewaySuccess<ListResult<MissingEmbeddingCandidate, "nodes">>>;
1582
+ vectorSearchByTopic(input: VectorSearchByTopicInput): Promise<PlatformGatewaySuccess<ListResult<VectorSearchMatch, "results">>>;
1583
+ markEmbeddingBackfillQueued(input: MarkEmbeddingBackfillQueuedInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1584
+ queued: number;
1585
+ topicId: string;
1586
+ workspaceId: string;
1587
+ nodeIds: string[];
1588
+ }>>;
1589
+ };
1590
+ graphAnalysis: {
1591
+ listGraphIntelligenceQueries(input?: ListGraphIntelligenceQueriesInput): Promise<PlatformGatewaySuccess<GraphIntelligenceQueryCatalogResponse>>;
1592
+ runGraphIntelligenceQuery(input: RunGraphIntelligenceQueryInput): Promise<PlatformGatewaySuccess<GraphIntelligenceQueryRunResponse>>;
1593
+ saveAnalysis(input: SaveGraphAnalysisInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisRecord>>;
1594
+ listAnalyses(input: ListGraphAnalysesInput): Promise<PlatformGatewaySuccess<ListResult<any, "analyses">>>;
1595
+ getLatestAnalysis(input: GetLatestGraphAnalysisInput): Promise<PlatformGatewaySuccess<GraphAnalysisRecord>>;
1596
+ saveSuggestions(input: SaveGraphSuggestionsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisSuggestionsResponse>>;
1597
+ updateSuggestionStatus(input: UpdateGraphSuggestionStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisSuggestion>>;
1598
+ listSuggestions(input: ListGraphSuggestionsInput): Promise<PlatformGatewaySuccess<ListResult<any, "suggestions">>>;
1599
+ listGraphChanges(input: ListGraphChangesInput): Promise<PlatformGatewaySuccess<ListResult<any, "changes">>>;
1600
+ computeOrRequestAnalysis(input: ComputeOrRequestGraphAnalysisInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisRecord>>;
1601
+ };
1602
+ graphRecommendations: {
1603
+ listForTopic(input: GraphRecommendationListInput): Promise<PlatformGatewaySuccess<ListResult<any, "recommendations">>>;
1604
+ getRecommendation(recommendationId: string): Promise<PlatformGatewaySuccess<GraphRecommendationRecord>>;
1605
+ markRecommendationStatus(input: MarkGraphRecommendationStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphRecommendationRecord>>;
1606
+ };
1607
+ orgGraphSearch: {
1608
+ search(input: OrgGraphSearchInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResponse>>;
1609
+ getNode(input: GetOrgGraphNodeInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResult>>;
1610
+ listByProvenance(input: ListOrgGraphByProvenanceInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResponse>>;
1611
+ listPublishedFromWorkspace(input: ListPublishedFromWorkspaceInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResponse>>;
1612
+ };
1613
+ ontologyLinks: {
1614
+ resolveThemeSource(input: JsonObject): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1615
+ createLink(input: OntologyLinkWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OntologyLinkRecord>>;
1616
+ upsertLink(input: OntologyLinkWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OntologyLinkRecord>>;
1617
+ listLinksForNode(input: ListOntologyLinksForNodeInput): Promise<PlatformGatewaySuccess<ListResult<OntologyLinkRecord, "links">>>;
1618
+ updateLinkStatus(input: UpdateOntologyLinkStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OntologyLinkRecord>>;
1619
+ };
1620
+ graphStateClassifier: {
1621
+ classifyNode(input: ClassifyNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphStateClassification>>;
1622
+ classifyTopic(input: ClassifyTopicInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ListResult<GraphStateClassification, "classifications">>>;
1623
+ listClassifications(input: ListGraphStateClassificationsInput): Promise<PlatformGatewaySuccess<ListResult<GraphStateClassification, "classifications">>>;
1624
+ recordClassification(input: RecordGraphStateClassificationInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphStateClassification>>;
1625
+ };
1626
+ modelRuntime: {
1627
+ listModels(input: ModelRuntimeScope): Promise<PlatformGatewaySuccess<ListResult<ModelRegistryRecord, "models">>>;
1628
+ getModel(input: ModelRuntimeScope & {
1629
+ modelId: string;
1630
+ }): Promise<PlatformGatewaySuccess<ModelRegistryRecord>>;
1631
+ listFunctionSlots(input: ModelRuntimeScope & {
1632
+ functionName?: string;
1633
+ }): Promise<PlatformGatewaySuccess<ListResult<ModelFunctionSlot, "slots">>>;
1634
+ resolveSlot(input: ResolveModelSlotInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ModelFunctionSlot>>;
1635
+ updateSlotConfig(input: UpdateModelSlotConfigInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ModelFunctionSlot>>;
1636
+ };
1637
+ jobs: {
1638
+ enqueue(input: EnqueueJobInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
1639
+ list(input: JobsScope): Promise<PlatformGatewaySuccess<ListResult<JobRecord, "jobs">>>;
1640
+ claim(input: ClaimJobInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
1641
+ updateStatus(input: UpdateJobStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
1642
+ retry(input: RetryJobInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
1643
+ recordRunStart(input: RecordJobRunStartInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRunRecord>>;
1644
+ recordRunFinish(input: RecordJobRunFinishInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRunRecord>>;
1645
+ };
1646
+ telemetry: {
1647
+ logSystemEvent(input: LogSystemEventInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1648
+ eventId?: string;
1649
+ recorded: boolean;
1650
+ }>>;
1651
+ logToolCallsBatch(input: LogToolCallsBatchInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1652
+ recorded: number;
1653
+ }>>;
1654
+ recordEpistemicAudit(input: RecordEpistemicAuditInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1655
+ auditId?: string;
1656
+ recorded: boolean;
1657
+ }>>;
1658
+ recordPolicyDecision(input: RecordTelemetryPolicyDecisionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1659
+ decisionId?: string;
1660
+ recorded: boolean;
1661
+ }>>;
1662
+ startRun(input: StartTelemetryRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TelemetryRunRecord>>;
1663
+ finishRun(input: FinishTelemetryRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TelemetryRunRecord>>;
1664
+ listRuns(input: TelemetryScope): Promise<PlatformGatewaySuccess<ListResult<TelemetryRunRecord, "runs">>>;
1665
+ };
1666
+ publication: {
1667
+ create(input: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1668
+ update(publicationId: string, input: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1669
+ list(input?: JsonObject): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1670
+ getByTopic(input: string | {
1671
+ topicId: string;
1672
+ workspaceId?: string;
1673
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1674
+ publish(publicationId: string, input?: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1675
+ unpublish(publicationId: string, input?: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1676
+ remove(publicationId: string, input?: JsonObject): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1677
+ };
1678
+ contentPublication: {
1679
+ create(input: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1680
+ update(publicationId: string, input: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1681
+ list(input?: JsonObject): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1682
+ getByTopic(input: string | {
1683
+ topicId: string;
1684
+ workspaceId?: string;
1685
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1686
+ publish(publicationId: string, input?: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1687
+ unpublish(publicationId: string, input?: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1688
+ remove(publicationId: string, input?: JsonObject): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1689
+ };
1690
+ tools: {
1691
+ listCatalog: (input: ToolRegistryQuery) => Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
1692
+ listExecutable: (input: ToolRegistryQuery) => Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
1693
+ listEffectiveTools: (input: EffectiveToolsQuery) => Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
1694
+ upsertCoreTools: (input: UpsertCoreToolsInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
1695
+ setPackToolsStatus: (input: SetPackToolsStatusInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
1696
+ createAcl: (input: CreateToolAclInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ToolAclRecord>>;
1697
+ deleteAcl: (input: DeleteToolAclInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1698
+ aclId: string;
1699
+ deleted: boolean;
1700
+ }>>;
1701
+ registerCustomTool: (input: RegisterCustomToolInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ToolCatalogEntry>>;
1702
+ register: typeof registerCustomTool;
1703
+ unregister: typeof unregisterCustomTool;
1704
+ list: typeof listRegisteredCustomTools;
1705
+ clear: typeof clearRegisteredCustomTools;
1706
+ invoke(name: string, input?: CustomToolInput): Promise<unknown>;
1707
+ namespace: (namespace: string) => CustomToolNamespace;
1708
+ };
1709
+ packs: {
1710
+ /**
1711
+ * Ensure the configured packKey is installed.
1712
+ * No-op if no packKey was provided or if the pack is already installed.
1713
+ * Called automatically on first API use when packKey is set.
1714
+ */
1715
+ ensurePack: () => Promise<void>;
1716
+ /**
1717
+ * Check if the configured pack has been installed in this session.
1718
+ */
1719
+ readonly isInstalled: boolean;
1720
+ listCatalog: () => Promise<PlatformGatewaySuccess<ListResult<any, "catalog">>>;
1721
+ catalog: () => Promise<PlatformGatewaySuccess<ListResult<any, "catalog">>>;
1722
+ listStates: (query?: GatewayScope) => Promise<PlatformGatewaySuccess<ListResult<any, "states">>>;
1723
+ states: (query?: GatewayScope) => Promise<PlatformGatewaySuccess<ListResult<any, "states">>>;
1724
+ install: (input: PackInstallInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
1725
+ enable: (input: PackEnableInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
1726
+ disable: (input: PackDisableInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
1727
+ };
1728
+ nodes: {
1729
+ list: (query: ListNodesInput) => Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
1730
+ get(input: string | Parameters<(query: GetNodeInput) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0]): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1731
+ create(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
1732
+ createEpistemicNode(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
1733
+ update(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
1734
+ updateEpistemicNode(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
1735
+ batchCreate(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
1736
+ batchCreateEpistemicNodes(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
1737
+ listByTopicAndType(input: {
1738
+ topicId?: string;
1739
+ projectId?: string;
1740
+ nodeType?: string;
1741
+ nodeTypes?: string[];
1742
+ query?: string;
1743
+ sourceText?: string;
1744
+ limit?: number;
1745
+ cursor?: string;
1746
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1747
+ countByTopicAndType(input: {
1748
+ topicId?: string;
1749
+ projectId?: string;
1750
+ nodeType?: string;
1751
+ nodeTypes?: string[];
1752
+ query?: string;
1753
+ limit?: number;
1754
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1755
+ supersede(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
1756
+ verify(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
1757
+ archive(input: FunctionSurfaceInput, idempotencyKey?: string): Promise<GatewayDataEnvelope<unknown>>;
1758
+ hardDelete: (input: HardDeleteNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1759
+ };
1760
+ identity: {
1761
+ access: {
1762
+ normalizePrincipal: typeof normalizeCanonicalPrincipalIdentity;
1763
+ checkAccess: (input: RequireAccessInput, idempotencyKey?: string) => Promise<AccessCheckResult>;
1764
+ requireAccess: (input: RequireAccessInput, idempotencyKey?: string) => Promise<AccessCheckResult>;
1765
+ canAccess: (input: RequireAccessInput, idempotencyKey?: string) => Promise<boolean>;
1766
+ };
1767
+ evaluatePolicy: (input: PolicyEvaluationInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PolicyDecisionRecord>>;
1768
+ recordPolicyDecision: (input: RecordPolicyDecisionInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PolicyDecisionRecord>>;
1769
+ putSecretReference: (input: PutTenantSecretReferenceInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<TenantSecretReference>>;
1770
+ createPrincipal: (input: GatewayScope & {
1771
+ principalId: string;
1772
+ principalType: "user" | "group" | "service" | "external_viewer";
1773
+ clerkId?: string;
1774
+ email?: string;
1775
+ displayName?: string;
1776
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
1777
+ metadata?: JsonObject;
1778
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
1779
+ updatePrincipal: (input: GatewayScope & {
1780
+ principalId: string;
1781
+ principalType: "user" | "group" | "service" | "external_viewer";
1782
+ clerkId?: string;
1783
+ email?: string;
1784
+ displayName?: string;
1785
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
1786
+ metadata?: JsonObject;
1787
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
1788
+ raw: {
1789
+ whoami(): Promise<PlatformGatewaySuccess<{
1790
+ principalId: string;
1791
+ principalType: "human" | "service" | "agent" | "user" | "group" | "external_viewer";
1792
+ tenantId: string | null;
1793
+ workspaceId: string | null;
1794
+ scopes: string[];
1795
+ roles: string[];
1796
+ isPlatformAdmin: boolean;
1797
+ isTenantAdmin: boolean;
1798
+ isWorkspaceAdmin: boolean;
1799
+ authMode: string | undefined;
1800
+ sessionId: string | undefined;
1801
+ delegatedBy: string | undefined;
1802
+ expiresAt: number | undefined;
1803
+ }>>;
1804
+ listPrincipals(query?: GatewayScope & {
1805
+ status?: string;
1806
+ principalType?: string;
1807
+ query?: string;
1808
+ limit?: number;
1809
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "principals">>>;
1810
+ createPrincipal(input: GatewayScope & {
1811
+ principalId: string;
1812
+ principalType: "user" | "group" | "service" | "external_viewer";
1813
+ clerkId?: string;
1814
+ email?: string;
1815
+ displayName?: string;
1816
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
1817
+ metadata?: JsonObject;
1818
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1819
+ updatePrincipal: (input: GatewayScope & {
1820
+ principalId: string;
1821
+ principalType: "user" | "group" | "service" | "external_viewer";
1822
+ clerkId?: string;
1823
+ email?: string;
1824
+ displayName?: string;
1825
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
1826
+ metadata?: JsonObject;
1827
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
1828
+ upsertPrincipal: (input: GatewayScope & {
1829
+ principalId: string;
1830
+ principalType: "user" | "group" | "service" | "external_viewer";
1831
+ clerkId?: string;
1832
+ email?: string;
1833
+ displayName?: string;
1834
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
1835
+ metadata?: JsonObject;
1836
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
1837
+ listKeys(query?: GatewayScope & {
1838
+ principalId?: string;
1839
+ status?: string;
1840
+ limit?: number;
1841
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "keys">>>;
1842
+ createKey(input: GatewayScope & {
1843
+ principalId: string;
1844
+ keyId?: string;
1845
+ token?: string;
1846
+ scopes?: string[];
1847
+ environment?: "sandbox" | "production";
1848
+ expiresInDays?: number;
1849
+ rateLimitTier?: "free" | "developer" | "partner";
1850
+ metadata?: JsonObject;
1851
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1852
+ rotateKey(keyId: string, input?: {
1853
+ replacementKeyId?: string;
1854
+ replacementToken?: string;
1855
+ replacementExpiresInDays?: number;
1856
+ gracePeriodHours?: number;
1857
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1858
+ deleteKey: (keyId: string, input?: {
1859
+ reason?: string;
1860
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
1861
+ revokeKey: (keyId: string, input?: {
1862
+ reason?: string;
1863
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
1864
+ searchClerkUsers(q: string): Promise<PlatformGatewaySuccess<ClerkUserSearchResult[]>>;
1865
+ getTenantConfig(input: TenantIdentityScope): Promise<PlatformGatewaySuccess<TenantIdentityConfigRecord>>;
1866
+ updateTenantConfig(input: UpdateTenantConfigInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantIdentityConfigRecord>>;
1867
+ listIntegrations(input: TenantIdentityScope): Promise<PlatformGatewaySuccess<ListResult<TenantIntegrationRecord, "integrations">>>;
1868
+ upsertIntegration(input: UpsertTenantIntegrationInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantIntegrationRecord>>;
1869
+ listSecrets(input: TenantIdentityScope): Promise<PlatformGatewaySuccess<ListResult<TenantSecretReference, "secrets">>>;
1870
+ putSecretReference(input: PutTenantSecretReferenceInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantSecretReference>>;
1871
+ evaluatePolicy(input: PolicyEvaluationInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PolicyDecisionRecord>>;
1872
+ recordPolicyDecision(input: RecordPolicyDecisionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PolicyDecisionRecord>>;
1873
+ };
1874
+ whoami(): Promise<PlatformGatewaySuccess<{
1875
+ principalId: string;
1876
+ principalType: "human" | "service" | "agent" | "user" | "group" | "external_viewer";
1877
+ tenantId: string | null;
1878
+ workspaceId: string | null;
1879
+ scopes: string[];
1880
+ roles: string[];
1881
+ isPlatformAdmin: boolean;
1882
+ isTenantAdmin: boolean;
1883
+ isWorkspaceAdmin: boolean;
1884
+ authMode: string | undefined;
1885
+ sessionId: string | undefined;
1886
+ delegatedBy: string | undefined;
1887
+ expiresAt: number | undefined;
1888
+ }> & {
1889
+ principalId: string;
1890
+ principalType: "human" | "service" | "agent" | "user" | "group" | "external_viewer";
1891
+ tenantId: string | null;
1892
+ workspaceId: string | null;
1893
+ scopes: string[];
1894
+ roles: string[];
1895
+ isPlatformAdmin: boolean;
1896
+ isTenantAdmin: boolean;
1897
+ isWorkspaceAdmin: boolean;
1898
+ authMode: string | undefined;
1899
+ sessionId: string | undefined;
1900
+ delegatedBy: string | undefined;
1901
+ expiresAt: number | undefined;
1902
+ }>;
1903
+ };
1904
+ mcp: {
1905
+ bootstrapSession: (input?: McpBootstrapSessionInput) => Promise<McpBootstrapSessionResponse>;
1906
+ checkWritePolicy: (input: McpCheckWritePolicyInput) => Promise<McpCheckWritePolicyResponse>;
1907
+ beginBuildSession: (input: McpBeginBuildSessionInput) => Promise<McpBeginBuildSessionResponse>;
1908
+ evaluateEngineeringContract: (input: McpEvaluateEngineeringContractInput) => Promise<McpContractEvaluationResponse>;
1909
+ evaluateResearchContract: (input: McpEvaluateResearchContractInput) => Promise<McpContractEvaluationResponse>;
1910
+ };
1911
+ auth: {
1912
+ device: {
1913
+ createCode: (input?: DeviceCodeInput) => Promise<DeviceCodeResponse>;
1914
+ pollToken: (deviceCode: string) => Promise<DeviceTokenResponse>;
1915
+ };
1916
+ };
1917
+ custom: CustomToolNamespace;
1918
+ extensions: Record<string, CustomToolNamespace>;
1919
+ raw: {
1920
+ beliefs: {
1921
+ createBelief(input: CreateBeliefInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformBeliefRecord>>;
1922
+ refineBelief(beliefId: string, input: RefineBeliefInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformBeliefRecord>>;
1923
+ modulateConfidence: (beliefId: string, input: ModulateConfidenceOpinionInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ModulateConfidenceResponse>>;
1924
+ getOpinionHistory: (beliefId: string) => Promise<OpinionHistoryEntry[]>;
1925
+ getConfidenceHistory: (beliefId: string) => Promise<OpinionHistoryEntry[]>;
1926
+ forkBelief(beliefId: string, input: ForkBeliefInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ForkBeliefResponse>>;
1927
+ updateBeliefStatus(input: UpdateBeliefStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1928
+ updateBeliefRationale(input: UpdateBeliefRationaleInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1929
+ linkBeliefs(input: LinkBeliefsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1930
+ unlinkBeliefEvidence(input: UnlinkBeliefEvidenceInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1931
+ updateBeliefCriticality(input: UpdateBeliefCriticalityInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1932
+ batchUpdateBeliefCriticality(input: BatchUpdateBeliefCriticalityInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1933
+ reassignBeliefsTopic(input: ReassignBeliefsTopicInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1934
+ };
1935
+ sources: {
1936
+ upsert(spec: UpsertSourceSpec, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformSourceRecord>>;
1937
+ get(sourceId: string): Promise<PlatformGatewaySuccess<PlatformSourceRecord>>;
1938
+ };
1939
+ evidence: {
1940
+ classifyEvidence(beliefId: string, evidenceId: string, classificationConfig?: EvidenceClassificationRequestConfig, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ClassifyEvidenceResult>>;
1941
+ classifyEvidenceBatch(beliefId: string, evidence: ClassifyEvidenceBatchItem[], classificationConfig?: EvidenceClassificationRequestConfig, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ClassifyEvidenceBatchResult>>;
1942
+ };
1943
+ embeddings: {
1944
+ getByNodeIds(input: GetEmbeddingsByNodeIdsInput): Promise<PlatformGatewaySuccess<ListResult<EmbeddingRecord, "embeddings">>>;
1945
+ listMissingForTopic(input: ListMissingEmbeddingsInput): Promise<PlatformGatewaySuccess<ListResult<MissingEmbeddingCandidate, "nodes">>>;
1946
+ vectorSearchByTopic(input: VectorSearchByTopicInput): Promise<PlatformGatewaySuccess<ListResult<VectorSearchMatch, "results">>>;
1947
+ markEmbeddingBackfillQueued(input: MarkEmbeddingBackfillQueuedInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1948
+ queued: number;
1949
+ topicId: string;
1950
+ workspaceId: string;
1951
+ nodeIds: string[];
1952
+ }>>;
1953
+ };
1954
+ eventing: {
1955
+ recordEvent(input: RecordEventInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<EventingRecord>>;
1956
+ listEvents(input: EventingScope): Promise<PlatformGatewaySuccess<ListResult<EventingRecord, "events">>>;
1957
+ listWebhooks(input: EventingScope): Promise<PlatformGatewaySuccess<ListResult<EventingWebhookRecord, "webhooks">>>;
1958
+ enqueueDelivery(input: EnqueueDeliveryInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<EventingDeliveryRecord>>;
1959
+ recordDeliveryAttempt(input: RecordDeliveryAttemptInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<EventingDeliveryRecord>>;
1960
+ updateDeliveryStatus(input: UpdateDeliveryStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<EventingDeliveryRecord>>;
1961
+ };
1962
+ graph: {
1963
+ listNodes(query: ListNodesInput): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
1964
+ getNode(query: GetNodeInput): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1965
+ createNode(input: CreateNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1966
+ updateNode(input: UpdateNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1967
+ batchCreateNodes(input: BatchCreateNodesInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1968
+ supersedeNode(input: SupersedeNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1969
+ verifyNode(input: VerifyNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1970
+ hardDeleteNode(input: HardDeleteNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1971
+ listEdges(query: ListEdgesInput): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphEdge, "edges">>>;
1972
+ createEdge(input: CreateEdgeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphEdge>>;
1973
+ deleteEdge(query: DeleteEdgeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<DeleteEdgeResponse>>;
1974
+ neighborhood(query: NeighborhoodInput): Promise<PlatformGatewaySuccess<GraphNeighborhoodResponse>>;
1975
+ traverse(query: TraverseInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1976
+ analyze(query?: AnalyzeInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1977
+ bias(query?: BiasInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1978
+ gaps(query: GapsInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1979
+ search(query: SearchInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1980
+ getPath(query: PathInput): Promise<PlatformGatewaySuccess<GraphPathResponse>>;
1981
+ getAnalytics(query?: AnalyticsInput): Promise<PlatformGatewaySuccess<GraphAnalyticsResponse>>;
1982
+ } & {
1983
+ queryNodes: (query: ListNodesInput) => Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
1984
+ queryEdges: (query: ListEdgesInput) => Promise<PlatformGatewaySuccess<ListResult<PlatformGraphEdge, "edges">>>;
1985
+ getNeighborhood: (query: NeighborhoodInput) => Promise<PlatformGatewaySuccess<GraphNeighborhoodResponse>>;
1986
+ };
1987
+ graphAnalysis: {
1988
+ listGraphIntelligenceQueries(input?: ListGraphIntelligenceQueriesInput): Promise<PlatformGatewaySuccess<GraphIntelligenceQueryCatalogResponse>>;
1989
+ runGraphIntelligenceQuery(input: RunGraphIntelligenceQueryInput): Promise<PlatformGatewaySuccess<GraphIntelligenceQueryRunResponse>>;
1990
+ saveAnalysis(input: SaveGraphAnalysisInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisRecord>>;
1991
+ listAnalyses(input: ListGraphAnalysesInput): Promise<PlatformGatewaySuccess<ListResult<any, "analyses">>>;
1992
+ getLatestAnalysis(input: GetLatestGraphAnalysisInput): Promise<PlatformGatewaySuccess<GraphAnalysisRecord>>;
1993
+ saveSuggestions(input: SaveGraphSuggestionsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisSuggestionsResponse>>;
1994
+ updateSuggestionStatus(input: UpdateGraphSuggestionStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisSuggestion>>;
1995
+ listSuggestions(input: ListGraphSuggestionsInput): Promise<PlatformGatewaySuccess<ListResult<any, "suggestions">>>;
1996
+ listGraphChanges(input: ListGraphChangesInput): Promise<PlatformGatewaySuccess<ListResult<any, "changes">>>;
1997
+ computeOrRequestAnalysis(input: ComputeOrRequestGraphAnalysisInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisRecord>>;
1998
+ };
1999
+ graphRecommendations: {
2000
+ listForTopic(input: GraphRecommendationListInput): Promise<PlatformGatewaySuccess<ListResult<any, "recommendations">>>;
2001
+ getRecommendation(recommendationId: string): Promise<PlatformGatewaySuccess<GraphRecommendationRecord>>;
2002
+ markRecommendationStatus(input: MarkGraphRecommendationStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphRecommendationRecord>>;
2003
+ };
2004
+ graphStateClassifier: {
2005
+ classifyNode(input: ClassifyNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphStateClassification>>;
2006
+ classifyTopic(input: ClassifyTopicInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ListResult<GraphStateClassification, "classifications">>>;
2007
+ listClassifications(input: ListGraphStateClassificationsInput): Promise<PlatformGatewaySuccess<ListResult<GraphStateClassification, "classifications">>>;
2008
+ recordClassification(input: RecordGraphStateClassificationInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphStateClassification>>;
2009
+ };
2010
+ decisions: {
2011
+ listJudgments(query: ListJudgmentsInput): Promise<PlatformGatewaySuccess<ListJudgmentsResponse>>;
2012
+ getJudgment(judgmentId: string): Promise<PlatformGatewaySuccess<GetJudgmentResponse>>;
2013
+ getJudgmentReadiness(query: {
2014
+ topicId?: string;
2015
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<JudgmentReadinessResponse>>;
2016
+ getJudgmentCalibration(query: GetJudgmentCalibrationInput): Promise<PlatformGatewaySuccess<JudgmentCalibrationResponse>>;
2017
+ listPendingOutcomeReviews(query: ListPendingJudgmentOutcomeReviewInput): Promise<PlatformGatewaySuccess<ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
2018
+ getJudgmentTransitionAuditIntegrity(query: GetJudgmentTransitionAuditIntegrityInput): Promise<PlatformGatewaySuccess<JudgmentTransitionAuditIntegrityResponse>>;
2019
+ createJudgment(input: RecordJudgmentInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
2020
+ updateJudgmentOutcome(judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
2021
+ } & {
2022
+ listPendingJudgmentOutcomeReview: (query: ListPendingJudgmentOutcomeReviewInput) => Promise<PlatformGatewaySuccess<ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
2023
+ recordJudgment: (input: RecordJudgmentInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
2024
+ recordJudgmentOutcome: (judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
2025
+ };
2026
+ workflow: {
2027
+ listBranches(query: {
2028
+ topicId?: string;
2029
+ status?: WorkflowBranchStatus;
2030
+ limit?: number;
2031
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<WorkflowBranchRecord, "branches">>>;
2032
+ createBranch(input: {
2033
+ name: string;
2034
+ topicId?: string;
2035
+ description?: string;
2036
+ metadata?: JsonObject;
2037
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowBranchRecord>>;
2038
+ listLenses(query: {
2039
+ workspaceId?: string;
2040
+ topicId?: string;
2041
+ status
2042
+ /**
2043
+ * Optional pack key for auto-install convenience.
2044
+ * When set, the SDK will call `packs.install()` on first use
2045
+ * to ensure the pack is available in the workspace.
2046
+ */
2047
+ ? /**
2048
+ * Optional pack key for auto-install convenience.
2049
+ * When set, the SDK will call `packs.install()` on first use
2050
+ * to ensure the pack is available in the workspace.
2051
+ */: WorkflowLensStatus;
2052
+ perspectiveType?: WorkflowLensPerspectiveType;
2053
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<WorkflowLensRecord, "lenses">>>;
2054
+ createLens(input: {
2055
+ name: string;
2056
+ workspaceId?: string;
2057
+ topicId?: string;
2058
+ description?: string;
2059
+ perspectiveType: WorkflowLensPerspectiveType;
2060
+ promptTemplates?: LensPromptTemplateReference[];
2061
+ workflowTemplates?: LensWorkflowTemplate[];
2062
+ taskTemplates?: LensTaskTemplate[];
2063
+ filterCriteria?: JsonObject;
2064
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowLensRecord>>;
2065
+ applyLensToTopic(input: {
2066
+ lensId: string;
2067
+ topicId?: string;
2068
+ metadata?: JsonObject;
2069
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>;
2070
+ removeLensFromTopic(input: {
2071
+ lensId: string;
2072
+ topicId?: string;
2073
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>;
2074
+ listWorktrees(query: {
2075
+ topicId?: string;
2076
+ branchId?: string;
2077
+ status?: WorkflowWorktreeStatus;
2078
+ groupBy?: "campaign" | "lane" | "flat";
2079
+ lane?: string;
2080
+ campaign?: number;
2081
+ limit?: number;
2082
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<WorkflowWorktreeRecord, "worktrees">>>;
2083
+ listAllWorktrees(query?: {
2084
+ status?: WorkflowWorktreeStatus;
2085
+ groupBy?: "campaign" | "lane" | "flat";
2086
+ lane?: string;
2087
+ campaign?: number;
2088
+ limit?: number;
2089
+ }): Promise<PlatformGatewaySuccess<ListWorktreesResponse>>;
2090
+ listCampaigns(query?: {
2091
+ topicId?: string;
2092
+ status?: WorkflowWorktreeStatus;
2093
+ limit?: number;
2094
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2095
+ createWorktree(input: AddWorktreeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
2096
+ merge(worktreeId: string, input: MergeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<MergeWorktreeResponse>>;
2097
+ activateWorktree(worktreeId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
2098
+ updateWorktreeTargets(input: UpdateWorktreeTargetsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
2099
+ completeWorktree(input: CompleteWorktreeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2100
+ advanceWorktreePhase(input: AdvanceWorktreePhaseInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2101
+ setWorktreePhase(input: SetWorktreePhaseInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2102
+ patchWorktreeState(input: PatchWorktreeStateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2103
+ bulkCreateWorktrees(input: BulkCreateWorktreesInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2104
+ openPullRequest(worktreeId: string, input: {
2105
+ summary: string;
2106
+ reviewers?: string[];
2107
+ status?: "pending_review" | "changes_requested" | "approved" | "blocked";
2108
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OpenPullRequestResponse>>;
2109
+ push(worktreeId: string, input: {
2110
+ targetContext: string;
2111
+ beliefIds?: string[];
2112
+ metadata?: JsonObject;
2113
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PushWorktreeResponse>>;
2114
+ listTopics(query?: ListTopicsInput): Promise<PlatformGatewaySuccess<ListTopicsResponse>>;
2115
+ switchTopicContext(input: SwitchTopicContextInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<SwitchTopicContextResponse>>;
2116
+ createTask(input: CreateTaskInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<CreateTaskResponse>>;
2117
+ completeTask(taskId: string, input: CompleteTaskInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<CompleteTaskResponse>>;
2118
+ updateTask(taskId: string, input: UpdateTaskInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<UpdateTaskResponse>>;
2119
+ } & {
2120
+ addWorktree: (input: AddWorktreeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
2121
+ createPillar: (input: {
2122
+ name: string;
2123
+ topicId?: string;
2124
+ description?: string;
2125
+ metadata?: JsonObject;
2126
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowBranchRecord>>;
2127
+ createSprint: (input: AddWorktreeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
2128
+ completeSprint: (worktreeId: string, input: MergeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<MergeWorktreeResponse>>;
2129
+ requestReview: (worktreeId: string, input: {
2130
+ summary: string;
2131
+ reviewers?: string[];
2132
+ status?: "pending_review" | "changes_requested" | "approved" | "blocked";
2133
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<OpenPullRequestResponse>>;
2134
+ publishFindings: (worktreeId: string, input: {
2135
+ targetContext: string;
2136
+ beliefIds?: string[];
2137
+ metadata?: JsonObject;
2138
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PushWorktreeResponse>>;
2139
+ };
2140
+ audit: {
2141
+ listEvents(query?: GatewayScope & {
2142
+ action?: string;
2143
+ decision?: string;
2144
+ traceId?: string;
2145
+ principalId?: string;
2146
+ topicId?: string;
2147
+ limit?: number;
2148
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<any, "events">>>;
2149
+ };
2150
+ authDevice: {
2151
+ createDeviceCode(input?: DeviceCodeInput): Promise<DeviceCodeResponse>;
2152
+ pollDeviceToken(deviceCode: string): Promise<DeviceTokenResponse>;
2153
+ };
2154
+ admin: {
2155
+ listTenants(query?: {
2156
+ status?: "provisioning" | "active" | "disabled" | "suspended" | "archived";
2157
+ limit?: number;
2158
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "tenants">>>;
2159
+ createTenant(input: {
2160
+ key: string;
2161
+ slug?: string;
2162
+ name: string;
2163
+ tier?: "free" | "developer" | "team" | "enterprise";
2164
+ status?: "provisioning" | "active" | "disabled" | "suspended" | "archived";
2165
+ ownerClerkId?: string;
2166
+ ownerEmail?: string;
2167
+ lucernDeploymentUrl?: string;
2168
+ appDeploymentUrl?: string;
2169
+ metadata?: JsonObject;
2170
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2171
+ getControlObjectOwnership: () => Promise<PlatformGatewaySuccess<ControlObjectOwnershipContract>>;
2172
+ getControlObjectOwnershipContract: () => Promise<PlatformGatewaySuccess<ControlObjectOwnershipContract>>;
2173
+ listWorkspaces(query?: GatewayScope & {
2174
+ status?: "active" | "archived";
2175
+ limit?: number;
2176
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "workspaces">>>;
2177
+ createWorkspace(input: GatewayScope & {
2178
+ workspaceId?: string;
2179
+ key?: string;
2180
+ slug?: string;
2181
+ name?: string;
2182
+ status?: "active" | "archived";
2183
+ defaultProjectVisibility?: "private" | "team" | "firm" | "external" | "public";
2184
+ restore?: boolean;
2185
+ metadata?: JsonObject;
2186
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2187
+ listMemberships(query?: GatewayScope & {
2188
+ principalId?: string;
2189
+ status?: "active" | "invited" | "revoked" | "expired";
2190
+ role?: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
2191
+ limit?: number;
2192
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "memberships">>>;
2193
+ createMembership: (input: GatewayScope & {
2194
+ membershipId?: string;
2195
+ principalId: string;
2196
+ role: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
2197
+ status?: "active" | "invited" | "revoked" | "expired";
2198
+ source?: "bootstrap" | "manual" | "sync" | "sso" | "api" | "scim" | "invitation";
2199
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2200
+ updateMembership: (input: GatewayScope & {
2201
+ membershipId?: string;
2202
+ principalId: string;
2203
+ role: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
2204
+ status?: "active" | "invited" | "revoked" | "expired";
2205
+ source?: "bootstrap" | "manual" | "sync" | "sso" | "api" | "scim" | "invitation";
2206
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2207
+ upsertMembership: (input: GatewayScope & {
2208
+ membershipId?: string;
2209
+ principalId: string;
2210
+ role: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
2211
+ status?: "active" | "invited" | "revoked" | "expired";
2212
+ source?: "bootstrap" | "manual" | "sync" | "sso" | "api" | "scim" | "invitation";
2213
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2214
+ listTenantApiKeys(scope: GatewayScope & {
2215
+ status?: "active" | "revoked" | "expired";
2216
+ }): Promise<{
2217
+ data: {
2218
+ keys: TenantApiKeyRecord[];
2219
+ };
2220
+ success: true;
2221
+ correlationId: string;
2222
+ policyTraceId: string | null;
2223
+ idempotentReplay: boolean;
2224
+ }>;
2225
+ createTenantApiKey(input: GatewayScope & {
2226
+ label?: string;
2227
+ scopes: string[];
2228
+ expiresAt?: number;
2229
+ }, idempotencyKey?: string): Promise<{
2230
+ data: {
2231
+ key: TenantApiKeyRecord | null;
2232
+ plaintextKey: string | undefined;
2233
+ };
2234
+ success: true;
2235
+ correlationId: string;
2236
+ policyTraceId: string | null;
2237
+ idempotentReplay: boolean;
2238
+ }>;
2239
+ revokeTenantApiKey(keyId: string, input?: GatewayScope & {
2240
+ reason?: string;
2241
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2242
+ listTenantVaultSecrets(scope: GatewayScope): Promise<{
2243
+ data: {
2244
+ secrets: TenantVaultSecretRecord[];
2245
+ };
2246
+ success: true;
2247
+ correlationId: string;
2248
+ policyTraceId: string | null;
2249
+ idempotentReplay: boolean;
2250
+ }>;
2251
+ createTenantVaultSecret(input: GatewayScope & {
2252
+ name: string;
2253
+ description?: string;
2254
+ value: string;
2255
+ }, idempotencyKey?: string): Promise<{
2256
+ data: {
2257
+ secret: TenantVaultSecretRecord | null;
2258
+ };
2259
+ success: true;
2260
+ correlationId: string;
2261
+ policyTraceId: string | null;
2262
+ idempotentReplay: boolean;
2263
+ }>;
2264
+ updateTenantVaultSecret(secretId: string, input: GatewayScope & {
2265
+ name: string;
2266
+ description?: string;
2267
+ value?: string;
2268
+ }, idempotencyKey?: string): Promise<{
2269
+ data: {
2270
+ secret: TenantVaultSecretRecord | null;
2271
+ };
2272
+ success: true;
2273
+ correlationId: string;
2274
+ policyTraceId: string | null;
2275
+ idempotentReplay: boolean;
2276
+ }>;
2277
+ deleteTenantVaultSecret(secretId: string, scope: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2278
+ listTenantSecrets(scope: GatewayScope & {
2279
+ providerId?: string;
2280
+ status?: "active" | "revoked";
2281
+ }): Promise<PlatformGatewaySuccess<unknown>>;
2282
+ upsertTenantSecret(input: GatewayScope & {
2283
+ providerId: string;
2284
+ apiKey: string;
2285
+ label?: string;
2286
+ modelSlotIds?: string[];
2287
+ passThroughOnly?: boolean;
2288
+ metadata?: JsonObject;
2289
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2290
+ revokeTenantSecret(secretRef: string, input: GatewayScope & {
2291
+ reason?: string;
2292
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2293
+ getTenantConfig(scope: GatewayScope & {
2294
+ tenantId: string;
2295
+ }): Promise<PlatformGatewaySuccess<TenantConfigRecord>>;
2296
+ getTenantModelRouting(scope: GatewayScope & {
2297
+ tenantId: string;
2298
+ }): Promise<PlatformGatewaySuccess<TenantModelRoutingSnapshot>>;
2299
+ upsertTenantConfig(input: GatewayScope & Omit<TenantConfigRecord, "updatedAt" | "updatedBy">, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantConfigRecord>>;
2300
+ listGroups(scope?: GatewayScope & {
2301
+ limit?: number;
2302
+ }): Promise<PlatformGatewaySuccess<unknown>>;
2303
+ createGroup(input: GatewayScope & {
2304
+ name: string;
2305
+ groupKey?: string;
2306
+ groupType?: string;
2307
+ description?: string;
2308
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2309
+ updateGroup(groupId: string, input: GatewayScope & {
2310
+ name?: string;
2311
+ description?: string;
2312
+ workspaceId?: string;
2313
+ clearWorkspaceId?: boolean;
2314
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2315
+ deleteGroup(groupId: string, input?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2316
+ listGroupMembers(query: GatewayScope & {
2317
+ groupId: string;
2318
+ }): Promise<PlatformGatewaySuccess<unknown>>;
2319
+ addGroupMember(input: GatewayScope & {
2320
+ groupId: string;
2321
+ principalId: string;
2322
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2323
+ removeGroupMember(input: GatewayScope & {
2324
+ groupId: string;
2325
+ principalId: string;
2326
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2327
+ listPackGroupAssignments(query?: GatewayScope & {
2328
+ groupId?: string;
2329
+ status?: string;
2330
+ }): Promise<PlatformGatewaySuccess<unknown>>;
2331
+ assignPackToGroup(input: GatewayScope & {
2332
+ groupId: string;
2333
+ packKey: string;
2334
+ packVersion?: string;
2335
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2336
+ removePackFromGroup(input: GatewayScope & {
2337
+ groupId: string;
2338
+ packKey: string;
2339
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2340
+ };
2341
+ identity: {
2342
+ whoami(): Promise<PlatformGatewaySuccess<{
2343
+ principalId: string;
2344
+ principalType: "human" | "service" | "agent" | "user" | "group" | "external_viewer";
2345
+ tenantId: string | null;
2346
+ workspaceId: string | null;
2347
+ scopes: string[];
2348
+ roles: string[];
2349
+ isPlatformAdmin: boolean;
2350
+ isTenantAdmin: boolean;
2351
+ isWorkspaceAdmin: boolean;
2352
+ authMode: string | undefined;
2353
+ sessionId: string | undefined;
2354
+ delegatedBy: string | undefined;
2355
+ expiresAt: number | undefined;
2356
+ }>>;
2357
+ listPrincipals(query?: GatewayScope & {
2358
+ status?: string;
2359
+ principalType?: string;
2360
+ query?: string;
2361
+ limit?: number;
2362
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "principals">>>;
2363
+ createPrincipal(input: GatewayScope & {
2364
+ principalId: string;
2365
+ principalType: "user" | "group" | "service" | "external_viewer";
2366
+ clerkId?: string;
2367
+ email?: string;
2368
+ displayName?: string;
2369
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
2370
+ metadata?: JsonObject;
2371
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2372
+ updatePrincipal: (input: GatewayScope & {
2373
+ principalId: string;
2374
+ principalType: "user" | "group" | "service" | "external_viewer";
2375
+ clerkId?: string;
2376
+ email?: string;
2377
+ displayName?: string;
2378
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
2379
+ metadata?: JsonObject;
2380
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2381
+ upsertPrincipal: (input: GatewayScope & {
2382
+ principalId: string;
2383
+ principalType: "user" | "group" | "service" | "external_viewer";
2384
+ clerkId?: string;
2385
+ email?: string;
2386
+ displayName?: string;
2387
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
2388
+ metadata?: JsonObject;
2389
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2390
+ listKeys(query?: GatewayScope & {
2391
+ principalId?: string;
2392
+ status?: string;
2393
+ limit?: number;
2394
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "keys">>>;
2395
+ createKey(input: GatewayScope & {
2396
+ principalId: string;
2397
+ keyId?: string;
2398
+ token?: string;
2399
+ scopes?: string[];
2400
+ environment?: "sandbox" | "production";
2401
+ expiresInDays?: number;
2402
+ rateLimitTier?: "free" | "developer" | "partner";
2403
+ metadata?: JsonObject;
2404
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2405
+ rotateKey(keyId: string, input?: {
2406
+ replacementKeyId?: string;
2407
+ replacementToken?: string;
2408
+ replacementExpiresInDays?: number;
2409
+ gracePeriodHours?: number;
2410
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2411
+ deleteKey: (keyId: string, input?: {
2412
+ reason?: string;
2413
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2414
+ revokeKey: (keyId: string, input?: {
2415
+ reason?: string;
2416
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2417
+ searchClerkUsers(q: string): Promise<PlatformGatewaySuccess<ClerkUserSearchResult[]>>;
2418
+ getTenantConfig(input: TenantIdentityScope): Promise<PlatformGatewaySuccess<TenantIdentityConfigRecord>>;
2419
+ updateTenantConfig(input: UpdateTenantConfigInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantIdentityConfigRecord>>;
2420
+ listIntegrations(input: TenantIdentityScope): Promise<PlatformGatewaySuccess<ListResult<TenantIntegrationRecord, "integrations">>>;
2421
+ upsertIntegration(input: UpsertTenantIntegrationInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantIntegrationRecord>>;
2422
+ listSecrets(input: TenantIdentityScope): Promise<PlatformGatewaySuccess<ListResult<TenantSecretReference, "secrets">>>;
2423
+ putSecretReference(input: PutTenantSecretReferenceInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantSecretReference>>;
2424
+ evaluatePolicy(input: PolicyEvaluationInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PolicyDecisionRecord>>;
2425
+ recordPolicyDecision(input: RecordPolicyDecisionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PolicyDecisionRecord>>;
2426
+ };
2427
+ policy: {
2428
+ listDecisions(query?: GatewayScope & {
2429
+ action?: string;
2430
+ decision?: string;
2431
+ traceId?: string;
2432
+ principalId?: string;
2433
+ topicId?: string;
2434
+ limit?: number;
2435
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "decisions">>>;
2436
+ grant(input: GatewayScope & {
2437
+ topicId: string;
2438
+ permission: PermissionKind;
2439
+ principal?: string;
2440
+ principalId?: string;
2441
+ groupId?: string;
2442
+ beliefClusterId?: string;
2443
+ expiresAt?: number;
2444
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2445
+ revoke(input: GatewayScope & {
2446
+ topicId: string;
2447
+ principal?: string;
2448
+ principalId?: string;
2449
+ groupId?: string;
2450
+ beliefClusterId?: string;
2451
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2452
+ listWritePolicies(query?: GatewayScope & {
2453
+ topicId?: string;
2454
+ role?: string;
2455
+ toolCategory?: string;
2456
+ enabled?: boolean;
2457
+ }): Promise<{
2458
+ data: {
2459
+ policies: WritePolicyRecord[];
2460
+ };
2461
+ success: true;
2462
+ correlationId: string;
2463
+ policyTraceId: string | null;
2464
+ idempotentReplay: boolean;
2465
+ }>;
2466
+ createWritePolicy(input: WritePolicyCreateInput, idempotencyKey?: string): Promise<{
2467
+ data: {
2468
+ id: string | undefined;
2469
+ created: boolean;
2470
+ policy: WritePolicyRecord | null;
2471
+ };
2472
+ success: true;
2473
+ correlationId: string;
2474
+ policyTraceId: string | null;
2475
+ idempotentReplay: boolean;
2476
+ }>;
2477
+ updateWritePolicy(id: string, input: WritePolicyUpdateInput, idempotencyKey?: string): Promise<{
2478
+ data: {
2479
+ id: string | undefined;
2480
+ updated: boolean;
2481
+ policy: WritePolicyRecord | null;
2482
+ };
2483
+ success: true;
2484
+ correlationId: string;
2485
+ policyTraceId: string | null;
2486
+ idempotentReplay: boolean;
2487
+ }>;
2488
+ deleteWritePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2489
+ id?: string;
2490
+ deleted?: boolean;
2491
+ }>>;
2492
+ listRolePolicies(query?: GatewayScope): Promise<{
2493
+ data: {
2494
+ policies: TenantPolicyRecord[];
2495
+ };
2496
+ success: true;
2497
+ correlationId: string;
2498
+ policyTraceId: string | null;
2499
+ idempotentReplay: boolean;
2500
+ }>;
2501
+ createRolePolicy(input: GatewayScope & {
2502
+ roleName: string;
2503
+ description?: string;
2504
+ permissions: TenantPolicyPermission[];
2505
+ groupBindings?: string[];
2506
+ }, idempotencyKey?: string): Promise<{
2507
+ data: {
2508
+ policy: TenantPolicyRecord | null;
2509
+ };
2510
+ success: true;
2511
+ correlationId: string;
2512
+ policyTraceId: string | null;
2513
+ idempotentReplay: boolean;
2514
+ }>;
2515
+ updateRolePolicy(id: string, input: GatewayScope & {
2516
+ roleName: string;
2517
+ description?: string;
2518
+ permissions: TenantPolicyPermission[];
2519
+ groupBindings?: string[];
2520
+ }, idempotencyKey?: string): Promise<{
2521
+ data: {
2522
+ policy: TenantPolicyRecord | null;
2523
+ };
2524
+ success: true;
2525
+ correlationId: string;
2526
+ policyTraceId: string | null;
2527
+ idempotentReplay: boolean;
2528
+ }>;
2529
+ deleteRolePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2530
+ checkPermission(query: GatewayScope & {
2531
+ topicId?: string;
2532
+ permission?: PermissionKind;
2533
+ principal?: string;
2534
+ principalId?: string;
2535
+ beliefClusterId?: string;
2536
+ }): Promise<PlatformGatewaySuccess<PermissionDecision>>;
2537
+ listAccessibleTopics(query?: GatewayScope & {
2538
+ permission?: PermissionKind;
2539
+ includeShared?: boolean;
2540
+ principal?: string;
2541
+ principalId?: string;
2542
+ limit?: number;
2543
+ }): Promise<{
2544
+ data: {
2545
+ permission: PermissionKind;
2546
+ topics: {
2547
+ [key: string]: unknown;
2548
+ topicId?: string;
2549
+ name?: string;
2550
+ type?: string;
2551
+ isOwner?: boolean;
2552
+ }[];
2553
+ total: number;
2554
+ deniedTopics: {
2555
+ topicId: string;
2556
+ reasonCode: string;
2557
+ }[];
2558
+ };
2559
+ success: true;
2560
+ correlationId: string;
2561
+ policyTraceId: string | null;
2562
+ idempotentReplay: boolean;
2563
+ }>;
2564
+ filterByPermission(input: GatewayScope & {
2565
+ topicIds?: string[];
2566
+ permission?: PermissionKind;
2567
+ principal?: string;
2568
+ principalId?: string;
2569
+ }): Promise<{
2570
+ success: true;
2571
+ data: {
2572
+ permission: PermissionKind;
2573
+ allowedTopicIds: string[];
2574
+ deniedTopics: Array<{
2575
+ topicId: string;
2576
+ reasonCode: string;
2577
+ }>;
2578
+ count: number;
2579
+ };
2580
+ }>;
2581
+ };
2582
+ answers: {
2583
+ get(questionId: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2584
+ };
2585
+ ontology: {
2586
+ list(filters?: GatewayScope & {
2587
+ tenantId?: string;
2588
+ tier?: string;
2589
+ status?: string;
2590
+ }): Promise<PlatformGatewaySuccess<{
2591
+ ontologies: unknown[];
2592
+ total: number;
2593
+ items: unknown[];
2594
+ definitions: unknown[];
2595
+ }>>;
2596
+ get(id: string): Promise<PlatformGatewaySuccess<unknown>>;
2597
+ bind(input: OntologyBindingInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2598
+ createDefinition(input: OntologyDefinitionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2599
+ updateDefinition(id: string, input: OntologyDefinitionUpdateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2600
+ archiveDefinition(id: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2601
+ listVersions(ontologyId: string, filters?: GatewayScope & {
2602
+ status?: string;
2603
+ }): Promise<PlatformGatewaySuccess<ListResult<unknown, "versions">>>;
2604
+ createVersion(ontologyId: string, input: OntologyVersionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2605
+ publishVersion(ontologyId: string, versionId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2606
+ deprecateVersion(ontologyId: string, versionId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2607
+ listTopics(ontologyId: string): Promise<PlatformGatewaySuccess<ListResult<any, "topics">>>;
2608
+ } & {
2609
+ listDefinitions: (filters?: GatewayScope & {
2610
+ tenantId?: string;
2611
+ tier?: string;
2612
+ status?: string;
2613
+ }) => Promise<PlatformGatewaySuccess<{
2614
+ ontologies: unknown[];
2615
+ total: number;
2616
+ items: unknown[];
2617
+ definitions: unknown[];
2618
+ }>>;
2619
+ getDefinition: (id: string) => Promise<PlatformGatewaySuccess<unknown>>;
2620
+ listTopicsByOntology: (ontologyId: string) => Promise<PlatformGatewaySuccess<ListResult<any, "topics">>>;
2621
+ };
2622
+ ontologyLinks: {
2623
+ createLink(input: OntologyLinkWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OntologyLinkRecord>>;
2624
+ upsertLink(input: OntologyLinkWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OntologyLinkRecord>>;
2625
+ listLinksForNode(input: ListOntologyLinksForNodeInput): Promise<PlatformGatewaySuccess<ListResult<OntologyLinkRecord, "links">>>;
2626
+ updateLinkStatus(input: UpdateOntologyLinkStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OntologyLinkRecord>>;
2627
+ };
2628
+ orgGraphSearch: {
2629
+ search(input: OrgGraphSearchInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResponse>>;
2630
+ getNode(input: GetOrgGraphNodeInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResult>>;
2631
+ listByProvenance(input: ListOrgGraphByProvenanceInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResponse>>;
2632
+ listPublishedFromWorkspace(input: ListPublishedFromWorkspaceInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResponse>>;
2633
+ };
2634
+ functionSurface: {
2635
+ sessionId: string;
2636
+ activateWorktree(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2637
+ addEvidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2638
+ addWorktree(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2639
+ analyzeTopicDensity(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2640
+ answerQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2641
+ applyAutoBranching(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2642
+ applyLensToTopic(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2643
+ applyOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2644
+ archiveBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2645
+ archiveEpistemicNode(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2646
+ archiveOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2647
+ archiveQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2648
+ batchCreateEdges(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2649
+ batchCreateEpistemicNodes(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2650
+ beginBuildSession(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2651
+ bisectConfidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2652
+ broadcastMessage(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2653
+ checkPermission(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2654
+ claimFiles(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2655
+ compileContext(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2656
+ completeTask(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2657
+ createAnswer(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2658
+ createBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2659
+ createEdge(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2660
+ createEpistemicContract(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2661
+ createEpistemicNode(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2662
+ createEvidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2663
+ createLens(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2664
+ createOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2665
+ createOntologyVersion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2666
+ createQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2667
+ createTask(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2668
+ createTopic(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2669
+ deprecateOntologyVersion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2670
+ detectConfirmationBias(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2671
+ discover(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2672
+ discoverEntityConnections(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2673
+ endSession(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2674
+ evaluateContract(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2675
+ filterByPermission(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2676
+ findContradictions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2677
+ findMissingQuestions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2678
+ flagContradiction(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2679
+ forkBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2680
+ generateSessionHandoff(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2681
+ getAgentInbox(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2682
+ getAnswer(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2683
+ getAuditTrail(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2684
+ getBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2685
+ getChangeHistory(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2686
+ getCodeContext(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2687
+ getConfidenceHistory(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2688
+ getContractStatus(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2689
+ getEpistemicNode(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2690
+ getEvidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2691
+ getFailureLog(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2692
+ getFalsificationQuestions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2693
+ getGraphGaps(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2694
+ getGraphNeighborhood(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2695
+ getGraphStructureAnalysis(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2696
+ getHighPriorityQuestions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2697
+ getLatticeCoverage(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2698
+ getObservationContext(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2699
+ getOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2700
+ getQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2701
+ getTopic(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2702
+ getTopicCoverage(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2703
+ getTopicGraphSpine(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2704
+ getTopicTree(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2705
+ heartbeatSession(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2706
+ whoami(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2707
+ ingestObservation(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2708
+ linkEvidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2709
+ linkEvidenceToBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2710
+ linkEvidenceToQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2711
+ listActiveSessions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2712
+ listAllWorktrees(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2713
+ listBeliefs(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2714
+ listCampaigns(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2715
+ listEpistemicNodes(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2716
+ listEvidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2717
+ listGraphIntelligenceQueries(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2718
+ listLenses(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2719
+ listOntologies(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2720
+ listQuestions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2721
+ listTasks(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2722
+ listTopics(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2723
+ listWorktrees(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2724
+ manageWritePolicy(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2725
+ matchEntityType(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2726
+ materializeTopicGraph(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2727
+ merge(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2728
+ modulateConfidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2729
+ openPullRequest(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2730
+ pipelineSnapshot(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2731
+ publishOntologyVersion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2732
+ push(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2733
+ queryLineage(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2734
+ recordAttempt(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2735
+ recordJudgment(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2736
+ recordScopeLearning(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2737
+ refineBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2738
+ refineQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2739
+ registerSession(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2740
+ removeEdge(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2741
+ removeEdgesBetween(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2742
+ removeLensFromTopic(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2743
+ resolveEffectiveOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2744
+ runGraphIntelligenceQuery(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2745
+ searchBeliefs(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2746
+ searchEvidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2747
+ seedBeliefLattice(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2748
+ sendAgentMessage(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2749
+ supersedeEpistemicNode(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2750
+ traceEntityImpact(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2751
+ traverseGraph(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2752
+ triggerBeliefReview(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2753
+ updateEdge(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2754
+ updateEpistemicNode(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2755
+ updateOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2756
+ updateQuestionStatus(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2757
+ updateTask(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2758
+ updateTopic(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2759
+ updateWorktreeMetadata(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2760
+ updateWorktreeTargets(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2761
+ verifyEpistemicNode(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2762
+ };
2763
+ toolRegistry: {
2764
+ listCatalog(input: ToolRegistryQuery): Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
2765
+ listExecutable(input: ToolRegistryQuery): Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
2766
+ listEffectiveTools(input: EffectiveToolsQuery): Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
2767
+ upsertCoreTools(input: UpsertCoreToolsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
2768
+ setPackToolsStatus(input: SetPackToolsStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
2769
+ createAcl(input: CreateToolAclInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ToolAclRecord>>;
2770
+ deleteAcl(input: DeleteToolAclInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2771
+ aclId: string;
2772
+ deleted: boolean;
2773
+ }>>;
2774
+ registerCustomTool(input: RegisterCustomToolInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ToolCatalogEntry>>;
2775
+ };
2776
+ modelRuntime: {
2777
+ listModels(input: ModelRuntimeScope): Promise<PlatformGatewaySuccess<ListResult<ModelRegistryRecord, "models">>>;
2778
+ getModel(input: ModelRuntimeScope & {
2779
+ modelId: string;
2780
+ }): Promise<PlatformGatewaySuccess<ModelRegistryRecord>>;
2781
+ listFunctionSlots(input: ModelRuntimeScope & {
2782
+ functionName?: string;
2783
+ }): Promise<PlatformGatewaySuccess<ListResult<ModelFunctionSlot, "slots">>>;
2784
+ resolveSlot(input: ResolveModelSlotInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ModelFunctionSlot>>;
2785
+ updateSlotConfig(input: UpdateModelSlotConfigInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ModelFunctionSlot>>;
2786
+ };
2787
+ packs: {
2788
+ listCatalog(): Promise<PlatformGatewaySuccess<ListResult<any, "catalog">>>;
2789
+ getDiscoveryCatalog(): Promise<PlatformGatewaySuccess<unknown>>;
2790
+ getDiscoveryDetail(packKey: string): Promise<PlatformGatewaySuccess<unknown>>;
2791
+ listStates(query?: GatewayScope): Promise<PlatformGatewaySuccess<ListResult<any, "states">>>;
2792
+ getHealth(packKey: string, query?: GatewayScope): Promise<PlatformGatewaySuccess<unknown>>;
2793
+ listTelemetry(query?: GatewayScope & {
2794
+ lookbackHours?: number;
2795
+ limit?: number;
2796
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "telemetry">>>;
2797
+ createEntitlement(input: PackEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2798
+ install(input: PackInstallInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2799
+ enable(input: PackEnableInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2800
+ disable(input: PackDisableInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2801
+ uninstall(input: PackUninstallInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2802
+ upgrade(input: PackUpgradeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2803
+ } & {
2804
+ getCatalog: () => Promise<PlatformGatewaySuccess<ListResult<any, "catalog">>>;
2805
+ getStates: (query?: GatewayScope) => Promise<PlatformGatewaySuccess<ListResult<any, "states">>>;
2806
+ getTelemetry: (query?: GatewayScope & {
2807
+ lookbackHours?: number;
2808
+ limit?: number;
2809
+ }) => Promise<PlatformGatewaySuccess<ListResult<any, "telemetry">>>;
2810
+ updateEntitlement: (input: PackEntitlementInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2811
+ upsertEntitlement: (input: PackEntitlementInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2812
+ };
2813
+ reports: {
2814
+ listTemplates: (args?: {
2815
+ slug?: string;
2816
+ }) => Promise<PlatformGatewaySuccess<ReportTemplatesResponse>>;
2817
+ getTemplates: (args?: {
2818
+ slug?: string;
2819
+ }) => Promise<PlatformGatewaySuccess<ReportTemplatesResponse>>;
2820
+ listReports: (input: TopicIdentifierInput, args?: {
2821
+ summary?: boolean;
2822
+ }) => Promise<PlatformGatewaySuccess<ListResult<any, "reports">>>;
2823
+ getReport: (reportId: string) => Promise<PlatformGatewaySuccess<ReportWithSectionsResponse>>;
2824
+ };
2825
+ learning: {
2826
+ listRecentExecutions: (args?: {
2827
+ namespace?: string;
2828
+ topicId?: string;
2829
+ audienceMode?: string;
2830
+ success?: boolean;
2831
+ limit?: number;
2832
+ } & TopicIdentifierInput) => Promise<PlatformGatewaySuccess<ListResult<any, "executions">>>;
2833
+ getRecentExecutions: (args?: {
2834
+ namespace?: string;
2835
+ topicId?: string;
2836
+ audienceMode?: string;
2837
+ success?: boolean;
2838
+ limit?: number;
2839
+ } & TopicIdentifierInput) => Promise<PlatformGatewaySuccess<ListResult<any, "executions">>>;
2840
+ getExecutionStats: (args?: {
2841
+ namespace?: string;
2842
+ topicId?: string;
2843
+ audienceMode?: string;
2844
+ hours?: number;
2845
+ } & TopicIdentifierInput) => Promise<PlatformGatewaySuccess<unknown>>;
2846
+ };
2847
+ mcp: {
2848
+ bootstrapSession(input?: McpBootstrapSessionInput): Promise<McpBootstrapSessionResponse>;
2849
+ checkWritePolicy(input: McpCheckWritePolicyInput): Promise<McpCheckWritePolicyResponse>;
2850
+ beginBuildSession(input: McpBeginBuildSessionInput): Promise<McpBeginBuildSessionResponse>;
2851
+ evaluateEngineeringContract(input: McpEvaluateEngineeringContractInput): Promise<McpContractEvaluationResponse>;
2852
+ evaluateResearchContract(input: McpEvaluateResearchContractInput): Promise<McpContractEvaluationResponse>;
2853
+ };
2854
+ jobs: {
2855
+ enqueue(input: EnqueueJobInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
2856
+ list(input: JobsScope): Promise<PlatformGatewaySuccess<ListResult<JobRecord, "jobs">>>;
2857
+ claim(input: ClaimJobInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
2858
+ updateStatus(input: UpdateJobStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
2859
+ retry(input: RetryJobInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
2860
+ recordRunStart(input: RecordJobRunStartInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRunRecord>>;
2861
+ recordRunFinish(input: RecordJobRunFinishInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRunRecord>>;
2862
+ };
2863
+ telemetry: {
2864
+ logSystemEvent(input: LogSystemEventInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2865
+ eventId?: string;
2866
+ recorded: boolean;
2867
+ }>>;
2868
+ logToolCallsBatch(input: LogToolCallsBatchInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2869
+ recorded: number;
2870
+ }>>;
2871
+ recordEpistemicAudit(input: RecordEpistemicAuditInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2872
+ auditId?: string;
2873
+ recorded: boolean;
2874
+ }>>;
2875
+ recordPolicyDecision(input: RecordTelemetryPolicyDecisionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2876
+ decisionId?: string;
2877
+ recorded: boolean;
2878
+ }>>;
2879
+ startRun(input: StartTelemetryRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TelemetryRunRecord>>;
2880
+ finishRun(input: FinishTelemetryRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TelemetryRunRecord>>;
2881
+ listRuns(input: TelemetryScope): Promise<PlatformGatewaySuccess<ListResult<TelemetryRunRecord, "runs">>>;
2882
+ };
2883
+ harness: {
2884
+ listAgentDefinitions(scope?: GatewayScope & {
2885
+ status?: string;
2886
+ limit?: number;
2887
+ cursor?: string;
2888
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "agents">>>;
2889
+ getAgentDefinition(agentId: string, scope?: GatewayScope): Promise<PlatformGatewaySuccess<unknown>>;
2890
+ createAgentDefinition(input: HarnessAgentWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2891
+ updateAgentDefinition(agentId: string, input: HarnessAgentWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2892
+ invokeManagedAgentDefinition(agentId: string, input: Omit<HarnessInvokeManagedAgentInput, "agentDefinitionId">, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2893
+ listAgentRuns(agentId: string, scope?: GatewayScope & {
2894
+ status?: string;
2895
+ limit?: number;
2896
+ cursor?: string;
2897
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "runs">>>;
2898
+ listToolDefinitions(scope?: GatewayScope & {
2899
+ status?: string;
2900
+ limit?: number;
2901
+ cursor?: string;
2902
+ gateClassification?: string;
2903
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "tools">>>;
2904
+ getToolDefinition(toolId: string, scope?: GatewayScope): Promise<PlatformGatewaySuccess<unknown>>;
2905
+ createToolDefinition(input: HarnessToolWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2906
+ updateToolDefinition(toolId: string, input: HarnessToolWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2907
+ executeToolDefinition(toolId: string, input?: HarnessExecuteToolInput): Promise<PlatformGatewaySuccess<HarnessExecuteToolResult>>;
2908
+ listRunEntries(scope?: GatewayScope & {
2909
+ status?: string;
2910
+ limit?: number;
2911
+ cursor?: string;
2912
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "runs">>>;
2913
+ startHarnessRun(input: HarnessStartRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2914
+ getRunLedgerEntry(runId: string): Promise<PlatformGatewaySuccess<unknown>>;
2915
+ reportHarnessRunEvent(runId: string, input: HarnessRunReportInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2916
+ heartbeatHarnessRun(runId: string, input: {
2917
+ reportingToken: string;
2918
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2919
+ completeHarnessRun(runId: string, input: HarnessCompleteRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2920
+ listPromptResolutions(query?: {
2921
+ runId?: string;
2922
+ promptName?: string;
2923
+ limit?: number;
2924
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "prompts">>>;
2925
+ getScopeTaxonomy(): Promise<PlatformGatewaySuccess<unknown>>;
2926
+ } & {
2927
+ registerAgentDefinition: (input: HarnessAgentWriteInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2928
+ listRunsForAgent: (agentId: string, scope?: GatewayScope & {
2929
+ status?: string;
2930
+ limit?: number;
2931
+ cursor?: string;
2932
+ }) => Promise<PlatformGatewaySuccess<ListResult<any, "runs">>>;
2933
+ registerToolDefinition: (input: HarnessToolWriteInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2934
+ listRunLedgerEntries: (scope?: GatewayScope & {
2935
+ status?: string;
2936
+ limit?: number;
2937
+ cursor?: string;
2938
+ }) => Promise<PlatformGatewaySuccess<ListResult<any, "runs">>>;
2939
+ };
2940
+ schema: {
2941
+ listPacks(scope?: GatewayScope): Promise<PlatformGatewaySuccess<ListResult<any, "packs">>>;
2942
+ installPack(input: SchemaPackInstallInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2943
+ getPack(packId: string, scope?: GatewayScope): Promise<PlatformGatewaySuccess<unknown>>;
2944
+ listEntitlements(scope?: GatewayScope & {
2945
+ packKey?: string;
2946
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "entitlements">>>;
2947
+ createEntitlement: (input: SchemaEntitlementInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2948
+ updateEntitlement: (input: SchemaEntitlementInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2949
+ upsertEntitlement: (input: SchemaEntitlementInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2950
+ };
2951
+ audiences: {
2952
+ listRegistry: (query?: GatewayScope & {
2953
+ effective?: boolean;
2954
+ status?: "active" | "disabled" | "archived";
2955
+ }) => Promise<PlatformGatewaySuccess<ListResult<any, "registryEntries">>>;
2956
+ getRegistry: (query?: GatewayScope & {
2957
+ effective?: boolean;
2958
+ status?: "active" | "disabled" | "archived";
2959
+ }) => Promise<PlatformGatewaySuccess<ListResult<any, "registryEntries">>>;
2960
+ createRegistryEntry: (input: AudienceRegistryInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2961
+ updateRegistryEntry: (input: AudienceRegistryInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2962
+ upsertRegistry: (input: AudienceRegistryInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2963
+ listGrants: (query?: GatewayScope & {
2964
+ audienceKey?: string;
2965
+ principalId?: string;
2966
+ groupId?: string;
2967
+ status?: "active" | "revoked" | "expired";
2968
+ }) => Promise<PlatformGatewaySuccess<ListResult<any, "grants">>>;
2969
+ getGrants: (query?: GatewayScope & {
2970
+ audienceKey?: string;
2971
+ principalId?: string;
2972
+ groupId?: string;
2973
+ status?: "active" | "revoked" | "expired";
2974
+ }) => Promise<PlatformGatewaySuccess<ListResult<any, "grants">>>;
2975
+ createGrant: (input: AudienceGrantInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2976
+ grant: (input: AudienceGrantInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2977
+ deleteGrant: (input: AudienceGrantRevokeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2978
+ revokeGrant: (input: AudienceGrantRevokeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
2979
+ };
2980
+ topics: {
2981
+ list(query?: TopicListInput): Promise<PlatformGatewaySuccess<TopicListResponse>>;
2982
+ get(topicId: string): Promise<PlatformGatewaySuccess<TopicRecord>>;
2983
+ create(input: TopicCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TopicRecord>>;
2984
+ update(topicId: string, input: TopicUpdateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TopicRecord>>;
2985
+ getTree(topicId: string, query?: TopicTreeQuery): Promise<PlatformGatewaySuccess<TopicTreeResponse>>;
2986
+ getCoverage(topicId: string, query?: TopicCoverageQuery): Promise<PlatformGatewaySuccess<TopicCoverageResponse>>;
2987
+ remove(topicId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2988
+ bulkCreate(input: TopicBulkCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2989
+ };
2990
+ };
2991
+ };
2992
+
2993
+ export { type LucernClientConfig, createLucernClient };