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

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