@lucern/sdk 0.2.0-alpha.7 → 0.2.0-alpha.9

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 (257) hide show
  1. package/dist/adminClient.d.ts +409 -0
  2. package/dist/adminClient.js +755 -0
  3. package/dist/adminClient.js.map +1 -0
  4. package/dist/answersClient.d.ts +23 -0
  5. package/dist/answersClient.js +333 -0
  6. package/dist/answersClient.js.map +1 -0
  7. package/dist/audiencesClient.d.ts +99 -0
  8. package/dist/audiencesClient.js +472 -0
  9. package/dist/audiencesClient.js.map +1 -0
  10. package/dist/auditClient.d.ts +29 -0
  11. package/dist/auditClient.js +386 -0
  12. package/dist/auditClient.js.map +1 -0
  13. package/dist/beliefsClient.d.ts +162 -0
  14. package/dist/beliefsClient.js +477 -0
  15. package/dist/beliefsClient.js.map +1 -0
  16. package/dist/client.d.ts +2378 -0
  17. package/dist/client.js +6134 -0
  18. package/dist/client.js.map +1 -0
  19. package/dist/contextClient.d.ts +27 -0
  20. package/dist/contextClient.js +396 -0
  21. package/dist/contextClient.js.map +1 -0
  22. package/dist/contextFacade.d.ts +2 -0
  23. package/dist/contextFacade.js +73 -0
  24. package/dist/contextFacade.js.map +1 -0
  25. package/dist/contextPackCompiler.d.ts +102 -0
  26. package/dist/contextPackCompiler.js +1091 -0
  27. package/dist/contextPackCompiler.js.map +1 -0
  28. package/dist/contextPackPolicy.d.ts +84 -0
  29. package/dist/contextPackPolicy.js +347 -0
  30. package/dist/contextPackPolicy.js.map +1 -0
  31. package/dist/contextPackSchema.d.ts +7 -0
  32. package/{src/contextPackSchema.ts → dist/contextPackSchema.js} +22 -70
  33. package/dist/contextPackSchema.js.map +1 -0
  34. package/dist/contextTypes.d.ts +135 -0
  35. package/dist/contextTypes.js +3 -0
  36. package/dist/contextTypes.js.map +1 -0
  37. package/dist/contracts/api-enums.contract.d.ts +81 -0
  38. package/dist/contracts/api-enums.contract.js +92 -0
  39. package/dist/contracts/api-enums.contract.js.map +1 -0
  40. package/dist/contracts/auth-session.contract.d.ts +55 -0
  41. package/dist/contracts/auth-session.contract.js +48 -0
  42. package/dist/contracts/auth-session.contract.js.map +1 -0
  43. package/dist/contracts/context-pack.contract.d.ts +492 -0
  44. package/dist/contracts/context-pack.contract.js +98 -0
  45. package/dist/contracts/context-pack.contract.js.map +1 -0
  46. package/dist/contracts/contextPack.d.ts +1 -0
  47. package/dist/contracts/contextPack.js +98 -0
  48. package/dist/contracts/contextPack.js.map +1 -0
  49. package/dist/contracts/index.d.ts +9 -0
  50. package/dist/contracts/index.js +4892 -0
  51. package/dist/contracts/index.js.map +1 -0
  52. package/dist/contracts/lens-filter.contract.d.ts +72 -0
  53. package/dist/contracts/lens-filter.contract.js +71 -0
  54. package/dist/contracts/lens-filter.contract.js.map +1 -0
  55. package/dist/contracts/lens-workflow.contract.d.ts +87 -0
  56. package/dist/contracts/lens-workflow.contract.js +123 -0
  57. package/dist/contracts/lens-workflow.contract.js.map +1 -0
  58. package/dist/contracts/lensFilter.d.ts +1 -0
  59. package/dist/contracts/lensFilter.js +71 -0
  60. package/dist/contracts/lensFilter.js.map +1 -0
  61. package/dist/contracts/lensWorkflow.d.ts +2 -0
  62. package/dist/contracts/lensWorkflow.js +123 -0
  63. package/dist/contracts/lensWorkflow.js.map +1 -0
  64. package/dist/contracts/mcp-tools.contract.d.ts +1 -0
  65. package/dist/contracts/mcp-tools.contract.js +2986 -0
  66. package/dist/contracts/mcp-tools.contract.js.map +1 -0
  67. package/dist/contracts/mcpTools.d.ts +1 -0
  68. package/dist/contracts/mcpTools.js +2986 -0
  69. package/dist/contracts/mcpTools.js.map +1 -0
  70. package/dist/contracts/prompt.contract.d.ts +26 -0
  71. package/dist/contracts/prompt.contract.js +12 -0
  72. package/dist/contracts/prompt.contract.js.map +1 -0
  73. package/dist/contracts/prompt.d.ts +1 -0
  74. package/dist/contracts/prompt.js +12 -0
  75. package/dist/contracts/prompt.js.map +1 -0
  76. package/dist/contracts/sdk-tools.contract.d.ts +2 -0
  77. package/dist/contracts/sdk-tools.contract.js +4134 -0
  78. package/dist/contracts/sdk-tools.contract.js.map +1 -0
  79. package/dist/contracts/sdkTools.d.ts +2 -0
  80. package/dist/contracts/sdkTools.js +4134 -0
  81. package/dist/contracts/sdkTools.js.map +1 -0
  82. package/dist/contracts/workflow-runtime.contract.d.ts +163 -0
  83. package/dist/contracts/workflow-runtime.contract.js +245 -0
  84. package/dist/contracts/workflow-runtime.contract.js.map +1 -0
  85. package/dist/contracts/workflowRuntime.d.ts +1 -0
  86. package/dist/contracts/workflowRuntime.js +245 -0
  87. package/dist/contracts/workflowRuntime.js.map +1 -0
  88. package/dist/controlObjectOwnership.d.ts +310 -0
  89. package/{src/controlObjectOwnership.ts → dist/controlObjectOwnership.js} +53 -124
  90. package/dist/controlObjectOwnership.js.map +1 -0
  91. package/dist/coreClient.d.ts +144 -0
  92. package/dist/coreClient.js +339 -0
  93. package/dist/coreClient.js.map +1 -0
  94. package/dist/customTools.d.ts +88 -0
  95. package/dist/customTools.js +248 -0
  96. package/dist/customTools.js.map +1 -0
  97. package/dist/decisionsClient.d.ts +111 -0
  98. package/dist/decisionsClient.js +522 -0
  99. package/dist/decisionsClient.js.map +1 -0
  100. package/dist/domainContext.d.ts +1 -0
  101. package/dist/domainContext.js +3 -0
  102. package/dist/domainContext.js.map +1 -0
  103. package/dist/events.d.ts +178 -0
  104. package/dist/events.js +249 -0
  105. package/dist/events.js.map +1 -0
  106. package/dist/eventsCore.d.ts +49 -0
  107. package/dist/eventsCore.js +429 -0
  108. package/dist/eventsCore.js.map +1 -0
  109. package/dist/facade/context.d.ts +18 -0
  110. package/dist/facade/context.js +73 -0
  111. package/dist/facade/context.js.map +1 -0
  112. package/dist/gatewayFacades.d.ts +591 -0
  113. package/dist/gatewayFacades.js +1953 -0
  114. package/dist/gatewayFacades.js.map +1 -0
  115. package/dist/graphClient.d.ts +271 -0
  116. package/dist/graphClient.js +698 -0
  117. package/dist/graphClient.js.map +1 -0
  118. package/dist/harnessClient.d.ts +314 -0
  119. package/dist/harnessClient.js +607 -0
  120. package/dist/harnessClient.js.map +1 -0
  121. package/dist/identityClient.d.ts +140 -0
  122. package/dist/identityClient.js +497 -0
  123. package/dist/identityClient.js.map +1 -0
  124. package/dist/index.d.ts +42 -0
  125. package/dist/index.js +11381 -0
  126. package/dist/index.js.map +1 -0
  127. package/dist/learningClient.d.ts +46 -0
  128. package/dist/learningClient.js +409 -0
  129. package/dist/learningClient.js.map +1 -0
  130. package/dist/mcpParityClient.d.ts +74 -0
  131. package/dist/mcpParityClient.js +516 -0
  132. package/dist/mcpParityClient.js.map +1 -0
  133. package/dist/mcpParitySurface.d.ts +12 -0
  134. package/{src/mcpParitySurface.ts → dist/mcpParitySurface.js} +9 -14
  135. package/dist/mcpParitySurface.js.map +1 -0
  136. package/dist/mcpTools-DPZxowDX.d.ts +254 -0
  137. package/dist/ontologyClient.d.ts +137 -0
  138. package/dist/ontologyClient.js +513 -0
  139. package/dist/ontologyClient.js.map +1 -0
  140. package/dist/packRuntime.d.ts +2 -0
  141. package/dist/packRuntime.js +3 -0
  142. package/dist/packRuntime.js.map +1 -0
  143. package/dist/packsClient.d.ts +131 -0
  144. package/dist/packsClient.js +525 -0
  145. package/dist/packsClient.js.map +1 -0
  146. package/dist/policyClient.d.ts +299 -0
  147. package/dist/policyClient.js +625 -0
  148. package/dist/policyClient.js.map +1 -0
  149. package/dist/realtime/index.d.ts +29 -0
  150. package/dist/realtime/index.js +23 -0
  151. package/dist/realtime/index.js.map +1 -0
  152. package/{src/realtime/refs.ts → dist/realtime/refs.d.ts} +5 -5
  153. package/dist/realtime/refs.js +9 -0
  154. package/dist/realtime/refs.js.map +1 -0
  155. package/dist/reportsClient.d.ts +41 -0
  156. package/dist/reportsClient.js +418 -0
  157. package/dist/reportsClient.js.map +1 -0
  158. package/dist/schemaClient.d.ts +64 -0
  159. package/dist/schemaClient.js +434 -0
  160. package/dist/schemaClient.js.map +1 -0
  161. package/dist/sdkSurface.d.ts +61 -0
  162. package/dist/sdkSurface.js +112 -0
  163. package/dist/sdkSurface.js.map +1 -0
  164. package/dist/sdkTools-CwXJDACb.d.ts +150 -0
  165. package/dist/topicsClient.d.ts +84 -0
  166. package/dist/topicsClient.js +492 -0
  167. package/dist/topicsClient.js.map +1 -0
  168. package/dist/types.d.ts +696 -0
  169. package/dist/types.js +3 -0
  170. package/dist/types.js.map +1 -0
  171. package/dist/version.d.ts +4 -0
  172. package/dist/version.js +6 -0
  173. package/dist/version.js.map +1 -0
  174. package/dist/workflowClient.d.ts +316 -0
  175. package/dist/workflowClient.js +830 -0
  176. package/dist/workflowClient.js.map +1 -0
  177. package/package.json +39 -7
  178. package/.turbo/turbo-build.log +0 -7
  179. package/.turbo/turbo-typecheck.log +0 -4
  180. package/examples/README.md +0 -69
  181. package/examples/contradiction.ts +0 -94
  182. package/examples/investigation-context.ts +0 -118
  183. package/examples/questions-and-tasks.ts +0 -55
  184. package/examples/quickstart.ts +0 -97
  185. package/examples/shared.ts +0 -318
  186. package/examples/strict-public-types.ts +0 -143
  187. package/examples/worktree-lifecycle.ts +0 -79
  188. package/src/README.md +0 -6
  189. package/src/adminClient.ts +0 -789
  190. package/src/answersClient.ts +0 -29
  191. package/src/audiencesClient.ts +0 -209
  192. package/src/auditClient.ts +0 -50
  193. package/src/beliefsClient.ts +0 -319
  194. package/src/client.ts +0 -2647
  195. package/src/contextClient.ts +0 -130
  196. package/src/contextFacade.ts +0 -15
  197. package/src/contextPackCompiler.ts +0 -828
  198. package/src/contextTypes.ts +0 -153
  199. package/src/contracts/api-enums.contract.ts +0 -202
  200. package/src/contracts/auth-session.contract.ts +0 -109
  201. package/src/contracts/context-pack.contract.ts +0 -700
  202. package/src/contracts/contextPack.ts +0 -1
  203. package/src/contracts/index.ts +0 -10
  204. package/src/contracts/lens-filter.contract.ts +0 -183
  205. package/src/contracts/lens-workflow.contract.ts +0 -162
  206. package/src/contracts/lensFilter.ts +0 -1
  207. package/src/contracts/lensWorkflow.ts +0 -1
  208. package/src/contracts/mcp-tools.contract.ts +0 -3636
  209. package/src/contracts/mcpTools.ts +0 -1
  210. package/src/contracts/prompt.contract.ts +0 -50
  211. package/src/contracts/prompt.ts +0 -1
  212. package/src/contracts/sdk-tools.contract.ts +0 -1457
  213. package/src/contracts/sdkTools.ts +0 -1
  214. package/src/contracts/workflow-runtime.contract.ts +0 -440
  215. package/src/contracts/workflowRuntime.ts +0 -1
  216. package/src/coreClient.ts +0 -570
  217. package/src/customTools.ts +0 -398
  218. package/src/decisionsClient.ts +0 -286
  219. package/src/domainContext.ts +0 -15
  220. package/src/events.ts +0 -531
  221. package/src/eventsCore.ts +0 -168
  222. package/src/facade/beliefs.ts +0 -83
  223. package/src/facade/context.ts +0 -110
  224. package/src/facade/contradictions.ts +0 -29
  225. package/src/facade/edges.ts +0 -30
  226. package/src/facade/events.ts +0 -23
  227. package/src/facade/evidence.ts +0 -41
  228. package/src/facade/graph.ts +0 -38
  229. package/src/facade/identity.ts +0 -16
  230. package/src/facade/ontologies.ts +0 -34
  231. package/src/facade/questions.ts +0 -59
  232. package/src/facade/search.ts +0 -16
  233. package/src/facade/tasks.ts +0 -37
  234. package/src/facade/topics.ts +0 -42
  235. package/src/facade/webhooks.ts +0 -58
  236. package/src/facade/worktrees.ts +0 -51
  237. package/src/gatewayFacades.ts +0 -1666
  238. package/src/graphClient.ts +0 -529
  239. package/src/harnessClient.ts +0 -585
  240. package/src/identityClient.ts +0 -278
  241. package/src/index.ts +0 -49
  242. package/src/learningClient.ts +0 -95
  243. package/src/mcpParityClient.ts +0 -240
  244. package/src/ontologyClient.ts +0 -275
  245. package/src/packRuntime.ts +0 -3
  246. package/src/packsClient.ts +0 -260
  247. package/src/policyClient.ts +0 -572
  248. package/src/promptCatalog.ts +0 -1
  249. package/src/realtime/index.ts +0 -51
  250. package/src/reportsClient.ts +0 -99
  251. package/src/schemaClient.ts +0 -129
  252. package/src/sdkSurface.ts +0 -190
  253. package/src/topicsClient.ts +0 -243
  254. package/src/types.ts +0 -807
  255. package/src/version.ts +0 -2
  256. package/src/workflowClient.ts +0 -826
  257. package/tsconfig.json +0 -9
@@ -0,0 +1,2378 @@
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 { IdentityClientConfig, ClerkUserSearchResult } from './identityClient.js';
5
+ import { AdminClientConfig, TenantApiKeyRecord, TenantVaultSecretRecord, TenantConfigRecord, TenantModelRoutingSnapshot } from './adminClient.js';
6
+ import { ControlObjectOwnershipContract } from './controlObjectOwnership.js';
7
+ import { BeliefsClientConfig, CreateBeliefInput, ModulateConfidenceInput, ForkBeliefInput, UpdateBeliefStatusInput, UpdateBeliefRationaleInput, LinkBeliefsInput, UnlinkBeliefEvidenceInput, UpdateBeliefCriticalityInput, BatchUpdateBeliefCriticalityInput, ReassignBeliefsTopicInput } from './beliefsClient.js';
8
+ import { PacksClientConfig, PackInstallInput, PackEnableInput, PackDisableInput, PackEntitlementInput, PackUninstallInput, PackUpgradeInput } from './packsClient.js';
9
+ import { CustomToolRegistration, RegisteredCustomTool } from './customTools.js';
10
+ import { PolicyClientConfig, PermissionDecision, PermissionKind, WritePolicyRecord, WritePolicyCreateInput, WritePolicyUpdateInput, TenantPolicyRecord, TenantPolicyPermission } from './policyClient.js';
11
+ import { PlatformGatewaySuccess, GatewayScope } from './coreClient.js';
12
+ import { OntologyClientConfig, OntologyBindingInput, OntologyDefinitionInput, OntologyDefinitionUpdateInput, OntologyVersionInput } from './ontologyClient.js';
13
+ import { CompileContextInput, PublicCompiledContext } from './contextTypes.js';
14
+ import { TopicsClientConfig, TopicListInput, TopicCreateInput, TopicUpdateInput, TopicTreeQuery, TopicCoverageQuery, TopicBulkCreateInput } from './topicsClient.js';
15
+ import { AnswersClientConfig } from './answersClient.js';
16
+ import { AuditClientConfig } from './auditClient.js';
17
+ import { ContextClientConfig } from './contextClient.js';
18
+ import { LensPromptTemplateReference, LensWorkflowTemplate, LensTaskTemplate } from './contracts/lens-workflow.contract.js';
19
+ import { DecisionsClientConfig, RecordJudgmentInput, ListJudgmentsInput, RecordJudgmentOutcomeInput, GetJudgmentCalibrationInput, ListPendingJudgmentOutcomeReviewInput, GetJudgmentTransitionAuditIntegrityInput } from './decisionsClient.js';
20
+ import { GraphClientConfig, ListNodesInput, GetNodeInput, CreateNodeInput, UpdateNodeInput, BatchCreateNodesInput, SupersedeNodeInput, VerifyNodeInput, HardDeleteNodeInput, CreateEdgeInput, NeighborhoodInput, QueryNodesInput, ListEdgesInput, QueryEdgesInput, DeleteEdgeInput, TraverseInput, AnalyzeInput, BiasInput, GapsInput, SearchInput, PathInput, AnalyticsInput } from './graphClient.js';
21
+ import { LearningClientConfig } from './learningClient.js';
22
+ import { McpParityClientConfig } from './mcpParityClient.js';
23
+ import { ReportsClientConfig } from './reportsClient.js';
24
+ import { JsonObject, ListResult, 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';
25
+ import { WorkflowClientConfig, WorkflowLensPerspectiveType, WorkflowLensStatus, AddWorktreeInput, WorkflowWorktreeStatus, UpdateWorktreeTargetsInput, MergeInput, CreateTaskInput, CompleteTaskInput, UpdateTaskInput, WorkflowBranchStatus, CompleteWorktreeInput, AdvanceWorktreePhaseInput, SetWorktreePhaseInput, PatchWorktreeStateInput, BulkCreateWorktreesInput, ListTopicsInput, SwitchTopicContextInput } from './workflowClient.js';
26
+ import 'zod';
27
+ import './mcpTools-DPZxowDX.js';
28
+ import './contracts/lens-filter.contract.js';
29
+ import './contracts/workflow-runtime.contract.js';
30
+
31
+ type ClientConfig = BeliefsClientConfig | GraphClientConfig | DecisionsClientConfig | AnswersClientConfig | ContextClientConfig | WorkflowClientConfig | AuditClientConfig | AdminClientConfig | IdentityClientConfig | PolicyClientConfig | PacksClientConfig | ReportsClientConfig | LearningClientConfig | McpParityClientConfig | OntologyClientConfig | HarnessClientConfig | SchemaClientConfig | AudiencesClientConfig | TopicsClientConfig;
32
+ type CustomToolInput = JsonObject;
33
+ type CustomToolInvoker = (input?: CustomToolInput) => Promise<unknown>;
34
+ type CustomToolNamespace = Record<string, CustomToolInvoker>;
35
+ type GatewayDataEnvelope<T extends Record<string, unknown>> = PlatformGatewaySuccess<T> & T;
36
+ type BeliefsCompatCreateInput = {
37
+ topicId?: string;
38
+ text?: string;
39
+ canonicalText?: string;
40
+ formulation?: string;
41
+ rationale?: string;
42
+ worktreeId?: string;
43
+ pillar?: string;
44
+ sourceBeliefIds?: string[];
45
+ sourceType?: string;
46
+ beliefType?: string;
47
+ reversibility?: string;
48
+ predictionMeta?: JsonObject;
49
+ metadata?: JsonObject;
50
+ };
51
+ type BeliefsCompatForkInput = {
52
+ text?: string;
53
+ newFormulation?: string;
54
+ formulation?: string;
55
+ forkReason?: "refinement" | "contradiction_response" | "scope_change" | "confidence_collapse" | "manual";
56
+ rationale?: string;
57
+ };
58
+ type BeliefsCompatUpdateConfidenceInput = {
59
+ confidence: number;
60
+ trigger?: "evidence_added" | "evidence_removed" | "contradiction_detected" | "contradiction_resolved" | "manual" | "decay" | "agent_assessment" | "merge_outcome" | "worktree_outcome" | "worktree_completed";
61
+ rationale: string;
62
+ certainty?: number;
63
+ maxInlinePropagationTargets?: number;
64
+ };
65
+ /**
66
+ * Configuration for the high-level Lucern SDK client.
67
+ *
68
+ * At minimum, provide `apiKey` and `baseUrl`. The SDK handles
69
+ * authentication, retries, and idempotency automatically.
70
+ */
71
+ type LucernClientConfig = ClientConfig & {
72
+ /** API key for authenticating with the Lucern platform. */
73
+ apiKey?: string;
74
+ /**
75
+ * Optional Clerk JWT for per-user identity and RBAC.
76
+ * When present, the SDK operates in user-scoped mode with
77
+ * pack-aware tool filtering. When absent, operates in agent mode.
78
+ */
79
+ userToken?: string;
80
+ /**
81
+ * Optional pack key for auto-install convenience.
82
+ * When set, the SDK will call `packs.install()` on first use
83
+ * to ensure the pack is available in the workspace.
84
+ */
85
+ packKey?: string;
86
+ /** Target environment. Defaults to production if not specified. */
87
+ environment?: "sandbox" | "production";
88
+ };
89
+ /**
90
+ * Create the high-level Lucern SDK client with all domain namespaces.
91
+ *
92
+ * @param config - Client configuration with API key, base URL, and optional settings.
93
+ * @returns The Lucern client with namespaced methods for beliefs, topics, evidence, decisions, and more.
94
+ */
95
+ declare function createLucernClient(config?: LucernClientConfig): {
96
+ config: LucernClientConfig;
97
+ version: string;
98
+ search(query: string, options?: {
99
+ topicId?: string;
100
+ types?: string[];
101
+ status?: string;
102
+ minConfidence?: number;
103
+ limit?: number;
104
+ cursor?: string;
105
+ }): Promise<GatewayDataEnvelope<{
106
+ [x: string]: unknown;
107
+ } & {
108
+ cursor?: string;
109
+ total?: number;
110
+ } & {
111
+ beliefs?: {
112
+ [x: string]: unknown;
113
+ }[];
114
+ results?: {
115
+ [x: string]: unknown;
116
+ }[];
117
+ }>>;
118
+ events: {
119
+ list(query?: Parameters<(query?: {
120
+ topicId?: string;
121
+ after?: string;
122
+ types?: string[];
123
+ startTime?: number;
124
+ endTime?: number;
125
+ limit?: number;
126
+ }) => Promise<PlatformGatewaySuccess<{
127
+ [x: string]: unknown;
128
+ } & {
129
+ cursor?: string;
130
+ total?: number;
131
+ } & {
132
+ events?: {
133
+ [x: string]: unknown;
134
+ }[];
135
+ }>>>[0]): Promise<GatewayDataEnvelope<{
136
+ [x: string]: unknown;
137
+ } & {
138
+ cursor?: string;
139
+ total?: number;
140
+ } & {
141
+ events?: {
142
+ [x: string]: unknown;
143
+ }[];
144
+ }>>;
145
+ replay(input: Parameters<(input: {
146
+ [x: string]: unknown;
147
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
148
+ [x: string]: unknown;
149
+ }>>>[0]): Promise<GatewayDataEnvelope<{
150
+ [x: string]: unknown;
151
+ }>>;
152
+ };
153
+ beliefs: {
154
+ create(input: BeliefsCompatCreateInput): Promise<GatewayDataEnvelope<{
155
+ [x: string]: unknown;
156
+ } & {
157
+ id?: string;
158
+ beliefId?: string;
159
+ nodeId?: string;
160
+ }>>;
161
+ get(nodeId: string): Promise<GatewayDataEnvelope<{
162
+ [x: string]: unknown;
163
+ } & {
164
+ id?: string;
165
+ beliefId?: string;
166
+ nodeId?: string;
167
+ }>>;
168
+ refine(nodeId: string, textOrInput: string | {
169
+ text: string;
170
+ rationale?: string;
171
+ }, rationale?: string): Promise<GatewayDataEnvelope<{
172
+ [x: string]: unknown;
173
+ } & {
174
+ id?: string;
175
+ beliefId?: string;
176
+ nodeId?: string;
177
+ }>>;
178
+ updateConfidence(nodeId: string, input: BeliefsCompatUpdateConfidenceInput): Promise<GatewayDataEnvelope<{
179
+ [x: string]: unknown;
180
+ }>>;
181
+ modulateConfidence(nodeId: string, input: BeliefsCompatUpdateConfidenceInput): Promise<GatewayDataEnvelope<{
182
+ [x: string]: unknown;
183
+ }>>;
184
+ updateStatus(input: Parameters<(input: {
185
+ id?: string;
186
+ nodeId?: string;
187
+ beliefId?: string;
188
+ status: "active" | "superseded" | "archived";
189
+ reason?: string;
190
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
191
+ [x: string]: unknown;
192
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
193
+ [x: string]: unknown;
194
+ }>>;
195
+ updateRationale(input: Parameters<(input: {
196
+ id?: string;
197
+ nodeId?: string;
198
+ beliefId?: string;
199
+ rationale?: string;
200
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
201
+ [x: string]: unknown;
202
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
203
+ [x: string]: unknown;
204
+ }>>;
205
+ linkBeliefs(input: Parameters<(input: {
206
+ fromNodeId: string;
207
+ toNodeId: string;
208
+ edgeType: string;
209
+ weight?: number;
210
+ context?: string;
211
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
212
+ [x: string]: unknown;
213
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
214
+ [x: string]: unknown;
215
+ }>>;
216
+ unlinkEvidence(input: Parameters<(input: {
217
+ beliefNodeId?: string;
218
+ beliefId?: string;
219
+ insightId?: string;
220
+ evidenceId?: string;
221
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
222
+ [x: string]: unknown;
223
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
224
+ [x: string]: unknown;
225
+ }>>;
226
+ updateCriticality(input: Parameters<(input: {
227
+ id?: string;
228
+ nodeId?: string;
229
+ beliefId?: string;
230
+ criticality: string;
231
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
232
+ [x: string]: unknown;
233
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
234
+ [x: string]: unknown;
235
+ }>>;
236
+ batchUpdateCriticality(input: Parameters<(input: {
237
+ updates: {
238
+ [x: string]: unknown;
239
+ }[];
240
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
241
+ [x: string]: unknown;
242
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
243
+ [x: string]: unknown;
244
+ }>>;
245
+ reassignTopic(input: Parameters<(input: {
246
+ beliefNodeIds?: string[];
247
+ beliefIds?: string[];
248
+ targetTopicId: string;
249
+ reason?: string;
250
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
251
+ [x: string]: unknown;
252
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
253
+ [x: string]: unknown;
254
+ }>>;
255
+ fork(nodeId: string, input: BeliefsCompatForkInput): Promise<GatewayDataEnvelope<{
256
+ [x: string]: unknown;
257
+ } & {
258
+ id?: string;
259
+ beliefId?: string;
260
+ nodeId?: string;
261
+ }>>;
262
+ archive(nodeId: string, input?: string | {
263
+ reason?: string;
264
+ rationale?: string;
265
+ }): Promise<GatewayDataEnvelope<{
266
+ [x: string]: unknown;
267
+ }>>;
268
+ list(args: {
269
+ topicId?: string;
270
+ worktreeId?: string;
271
+ status?: string;
272
+ minConfidence?: number;
273
+ limit?: number;
274
+ cursor?: string;
275
+ }): Promise<GatewayDataEnvelope<{
276
+ [x: string]: unknown;
277
+ } & {
278
+ cursor?: string;
279
+ total?: number;
280
+ } & {
281
+ beliefs?: ({
282
+ [x: string]: unknown;
283
+ } & {
284
+ id?: string;
285
+ beliefId?: string;
286
+ nodeId?: string;
287
+ })[];
288
+ }>>;
289
+ search: (args: {
290
+ query: string;
291
+ topicId?: string;
292
+ status?: string;
293
+ minConfidence?: number;
294
+ limit?: number;
295
+ }) => Promise<{
296
+ results: Record<string, unknown>[];
297
+ }>;
298
+ lineage(nodeId: string): Promise<GatewayDataEnvelope<{
299
+ [x: string]: unknown;
300
+ } & {
301
+ beliefId?: string;
302
+ lineage?: {
303
+ [x: string]: unknown;
304
+ }[];
305
+ }>>;
306
+ confidenceHistory(nodeId: string): Promise<GatewayDataEnvelope<{
307
+ [x: string]: unknown;
308
+ }>>;
309
+ createContract(nodeId: string, input: Parameters<(id: string, input: {
310
+ [x: string]: unknown;
311
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
312
+ [x: string]: unknown;
313
+ }>>>[1]): Promise<GatewayDataEnvelope<{
314
+ [x: string]: unknown;
315
+ }>>;
316
+ bisect(nodeId: string, input: Parameters<(id: string, input: {
317
+ expectedDirection: "overconfident" | "underconfident";
318
+ timeRange?: {
319
+ start: number;
320
+ end: number;
321
+ };
322
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
323
+ [x: string]: unknown;
324
+ }>>>[1]): Promise<GatewayDataEnvelope<{
325
+ [x: string]: unknown;
326
+ }>>;
327
+ };
328
+ webhooks: {
329
+ create(input: Parameters<(input: {
330
+ [x: string]: unknown;
331
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
332
+ [x: string]: unknown;
333
+ }>>>[0]): Promise<GatewayDataEnvelope<{
334
+ [x: string]: unknown;
335
+ }>>;
336
+ list(query?: Parameters<(query?: {
337
+ topicId?: string;
338
+ }) => Promise<PlatformGatewaySuccess<{
339
+ [x: string]: unknown;
340
+ } & {
341
+ cursor?: string;
342
+ total?: number;
343
+ } & {
344
+ webhooks?: {
345
+ [x: string]: unknown;
346
+ }[];
347
+ }>>>[0]): Promise<GatewayDataEnvelope<{
348
+ [x: string]: unknown;
349
+ } & {
350
+ cursor?: string;
351
+ total?: number;
352
+ } & {
353
+ webhooks?: {
354
+ [x: string]: unknown;
355
+ }[];
356
+ }>>;
357
+ get(id: string): Promise<GatewayDataEnvelope<{
358
+ [x: string]: unknown;
359
+ }>>;
360
+ update(id: string, input: Parameters<(id: string, input: {
361
+ [x: string]: unknown;
362
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
363
+ [x: string]: unknown;
364
+ }>>>[1]): Promise<GatewayDataEnvelope<{
365
+ [x: string]: unknown;
366
+ }>>;
367
+ delete(id: string): Promise<GatewayDataEnvelope<{
368
+ [x: string]: unknown;
369
+ }>>;
370
+ test(id: string, input?: Parameters<(id: string, input?: {
371
+ topicId?: string;
372
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
373
+ [x: string]: unknown;
374
+ }>>>[1]): Promise<GatewayDataEnvelope<{
375
+ [x: string]: unknown;
376
+ }>>;
377
+ deliveries(id: string, query?: Parameters<(id: string, query?: {
378
+ limit?: number;
379
+ }) => Promise<PlatformGatewaySuccess<{
380
+ [x: string]: unknown;
381
+ }>>>[1]): Promise<GatewayDataEnvelope<{
382
+ [x: string]: unknown;
383
+ }>>;
384
+ health(id: string): Promise<GatewayDataEnvelope<{
385
+ [x: string]: unknown;
386
+ }>>;
387
+ };
388
+ edges: {
389
+ create(args: {
390
+ sourceId: string;
391
+ targetId: string;
392
+ edgeType: string;
393
+ topicId?: string;
394
+ confidence?: number;
395
+ weight?: number;
396
+ context?: string;
397
+ reasoning?: string;
398
+ }): Promise<GatewayDataEnvelope<{
399
+ [x: string]: unknown;
400
+ }>>;
401
+ update(input: Parameters<(input: {
402
+ edgeId: string;
403
+ weight?: number;
404
+ confidence?: number;
405
+ context?: string;
406
+ derivationType?: string;
407
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
408
+ [x: string]: unknown;
409
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
410
+ [x: string]: unknown;
411
+ }>>;
412
+ remove(input: Parameters<(input: {
413
+ edgeId: string;
414
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
415
+ [x: string]: unknown;
416
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
417
+ [x: string]: unknown;
418
+ }>>;
419
+ removeBetween(input: Parameters<(input: {
420
+ fromNodeId: string;
421
+ toNodeId: string;
422
+ edgeType?: string;
423
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
424
+ [x: string]: unknown;
425
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
426
+ [x: string]: unknown;
427
+ }>>;
428
+ batchCreate(input: Parameters<(input: {
429
+ edges: {
430
+ [x: string]: unknown;
431
+ }[];
432
+ skipLayerValidation?: boolean;
433
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
434
+ [x: string]: unknown;
435
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
436
+ [x: string]: unknown;
437
+ }>>;
438
+ delete(input: Parameters<(input: {
439
+ edgeIds: string[];
440
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
441
+ [x: string]: unknown;
442
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
443
+ [x: string]: unknown;
444
+ }>>;
445
+ list(args: {
446
+ sourceId: string;
447
+ edgeType?: string;
448
+ limit?: number;
449
+ cursor?: string;
450
+ }): Promise<GatewayDataEnvelope<{
451
+ [x: string]: unknown;
452
+ } & {
453
+ cursor?: string;
454
+ total?: number;
455
+ }>>;
456
+ traverse(args: {
457
+ startNode: string;
458
+ direction?: string;
459
+ maxDepth?: number;
460
+ topicId?: string;
461
+ }): Promise<GatewayDataEnvelope<{
462
+ [x: string]: unknown;
463
+ }>>;
464
+ };
465
+ evidence: {
466
+ create(args: {
467
+ text?: string;
468
+ canonicalText?: string;
469
+ topicId?: string;
470
+ source?: string;
471
+ sourceUrl?: string;
472
+ targetId?: string;
473
+ weight?: number;
474
+ metadata?: JsonObject;
475
+ title?: string;
476
+ content?: string;
477
+ contentType?: string;
478
+ kind?: string;
479
+ supports?: {
480
+ nodeId: string;
481
+ weight: number;
482
+ reasoning?: string;
483
+ };
484
+ }): Promise<GatewayDataEnvelope<{
485
+ [x: string]: unknown;
486
+ } & {
487
+ id?: string;
488
+ }>>;
489
+ add: (args: {
490
+ text?: string;
491
+ canonicalText?: string;
492
+ topicId?: string;
493
+ source?: string;
494
+ sourceUrl?: string;
495
+ targetId?: string;
496
+ weight?: number;
497
+ metadata?: JsonObject;
498
+ title?: string;
499
+ content?: string;
500
+ contentType?: string;
501
+ kind?: string;
502
+ supports?: {
503
+ nodeId: string;
504
+ weight: number;
505
+ reasoning?: string;
506
+ };
507
+ }) => Promise<{
508
+ [x: string]: unknown;
509
+ } & {
510
+ id?: string;
511
+ }>;
512
+ get(evidenceId: string): Promise<GatewayDataEnvelope<{
513
+ [x: string]: unknown;
514
+ }>>;
515
+ list(args: {
516
+ topicId?: string;
517
+ targetId?: string;
518
+ limit?: number;
519
+ cursor?: string;
520
+ }): Promise<GatewayDataEnvelope<{
521
+ [x: string]: unknown;
522
+ } & {
523
+ cursor?: string;
524
+ total?: number;
525
+ }>>;
526
+ search(args: {
527
+ q?: string;
528
+ query?: string;
529
+ topicId?: string;
530
+ targetId?: string;
531
+ methodology?: string;
532
+ limit?: number;
533
+ cursor?: string;
534
+ }): Promise<GatewayDataEnvelope<{
535
+ [x: string]: unknown;
536
+ } & {
537
+ cursor?: string;
538
+ total?: number;
539
+ }>>;
540
+ link(args: {
541
+ evidenceId: string;
542
+ targetId?: string;
543
+ beliefId?: string;
544
+ questionId?: string;
545
+ targetType?: "belief" | "question" | string;
546
+ weight?: number;
547
+ rationale?: string;
548
+ }): Promise<GatewayDataEnvelope<{
549
+ [x: string]: unknown;
550
+ } & {
551
+ edgeId?: string;
552
+ }>>;
553
+ linkToBelief(args: {
554
+ evidenceId: string;
555
+ beliefId: string;
556
+ weight: number;
557
+ rationale?: string;
558
+ }): Promise<{
559
+ beliefId: string;
560
+ edgeId?: string;
561
+ }>;
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
+ questions: {
599
+ create(args: {
600
+ text: string;
601
+ topicId?: string;
602
+ priority?: string;
603
+ linkedBeliefId?: string;
604
+ metadata?: JsonObject;
605
+ }): Promise<GatewayDataEnvelope<{
606
+ [x: string]: unknown;
607
+ }>>;
608
+ get(questionId: string): Promise<GatewayDataEnvelope<{
609
+ [x: string]: unknown;
610
+ }>>;
611
+ refine(questionId: string, text: string, refinementReason?: string): Promise<GatewayDataEnvelope<{
612
+ [x: string]: unknown;
613
+ }>>;
614
+ list(args: {
615
+ topicId?: string;
616
+ status?: string;
617
+ priority?: string;
618
+ worktreeId?: string;
619
+ limit?: number;
620
+ cursor?: string;
621
+ }): Promise<GatewayDataEnvelope<{
622
+ [x: string]: unknown;
623
+ } & {
624
+ cursor?: string;
625
+ total?: number;
626
+ } & {
627
+ questions?: Array<{
628
+ [x: string]: unknown;
629
+ } & {
630
+ priority?: string;
631
+ }>;
632
+ }>>;
633
+ updateStatus(questionId: string, status: string, rationale?: string): Promise<GatewayDataEnvelope<{
634
+ [x: string]: unknown;
635
+ }>>;
636
+ batchCreate(input: Parameters<(input: {
637
+ [x: string]: unknown;
638
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
639
+ [x: string]: unknown;
640
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
641
+ [x: string]: unknown;
642
+ }>>;
643
+ add(input: Parameters<(input: {
644
+ [x: string]: unknown;
645
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
646
+ [x: string]: unknown;
647
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
648
+ [x: string]: unknown;
649
+ }>>;
650
+ updatePriority(input: Parameters<(input: {
651
+ [x: string]: unknown;
652
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
653
+ [x: string]: unknown;
654
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
655
+ [x: string]: unknown;
656
+ }>>;
657
+ advanceToConviction(input: Parameters<(input: {
658
+ [x: string]: unknown;
659
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
660
+ [x: string]: unknown;
661
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
662
+ [x: string]: unknown;
663
+ }>>;
664
+ updateConviction(input: Parameters<(input: {
665
+ [x: string]: unknown;
666
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
667
+ [x: string]: unknown;
668
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
669
+ [x: string]: unknown;
670
+ }>>;
671
+ finalizeConviction(input: Parameters<(input: {
672
+ [x: string]: unknown;
673
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
674
+ [x: string]: unknown;
675
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
676
+ [x: string]: unknown;
677
+ }>>;
678
+ update(input: Parameters<(input: {
679
+ [x: string]: unknown;
680
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
681
+ [x: string]: unknown;
682
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
683
+ [x: string]: unknown;
684
+ }>>;
685
+ delete(input: Parameters<(input: {
686
+ [x: string]: unknown;
687
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
688
+ [x: string]: unknown;
689
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
690
+ [x: string]: unknown;
691
+ }>>;
692
+ answer(questionId: string, input: {
693
+ text: string;
694
+ confidence?: string;
695
+ evidenceIds?: string[];
696
+ rationale?: string;
697
+ }): Promise<GatewayDataEnvelope<{
698
+ [x: string]: unknown;
699
+ }>>;
700
+ archive(questionId: string, reason?: string): Promise<GatewayDataEnvelope<{
701
+ [x: string]: unknown;
702
+ }>>;
703
+ linkEvidence(args: {
704
+ evidenceId: string;
705
+ questionId: string;
706
+ relevance?: number;
707
+ weight?: number;
708
+ rationale?: string;
709
+ }): Promise<{
710
+ questionId: string;
711
+ relevance: number | undefined;
712
+ edgeId?: string;
713
+ }>;
714
+ getHighPriority(args: {
715
+ topicId?: string;
716
+ limit?: number;
717
+ includeAnswered?: boolean;
718
+ }): Promise<{
719
+ questions: ({
720
+ priority?: string;
721
+ } & Record<string, unknown>)[];
722
+ }>;
723
+ findMissing(args: {
724
+ topicId?: string;
725
+ minConfidence?: number;
726
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
727
+ };
728
+ graph: {
729
+ nodes: {
730
+ list(query: Parameters<(query: ListNodesInput) => Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>>[0]): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
731
+ get(input: string | Parameters<(query: GetNodeInput) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0]): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
732
+ create(input: Parameters<(input: CreateNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
733
+ update(input: Parameters<(input: UpdateNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
734
+ batchCreate(input: Parameters<(input: BatchCreateNodesInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
735
+ supersede(input: Parameters<(input: SupersedeNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
736
+ verify(input: Parameters<(input: VerifyNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
737
+ hardDelete(input: Parameters<(input: HardDeleteNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
738
+ };
739
+ createEdge(input: Parameters<(input: CreateEdgeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphEdge>>>[0]): Promise<PlatformGatewaySuccess<PlatformGraphEdge>>;
740
+ neighborhood(args: Parameters<(query: NeighborhoodInput) => Promise<PlatformGatewaySuccess<GraphNeighborhoodResponse>>>[0]): Promise<GatewayDataEnvelope<GraphNeighborhoodResponse>>;
741
+ queryLineage: (nodeId: string, depth?: number) => Promise<{
742
+ chain: {
743
+ nodeId: {};
744
+ relation: string;
745
+ }[];
746
+ forkTree: {
747
+ nodeId: string;
748
+ parentCount: number;
749
+ childCount: number;
750
+ children: never[];
751
+ };
752
+ depth: number;
753
+ beliefId: string | undefined;
754
+ lineage: {
755
+ [x: string]: unknown;
756
+ }[];
757
+ }>;
758
+ getConfidenceHistory: (nodeId: string) => Promise<GatewayDataEnvelope<{
759
+ [x: string]: unknown;
760
+ }>>;
761
+ getAuditTrail: (nodeId: string, limit?: number) => Promise<{
762
+ entries: {
763
+ action: string;
764
+ actor: string;
765
+ timestamp: number;
766
+ rationale: string;
767
+ before: string | number | boolean | JsonObject | JsonArray | null;
768
+ after: string | number | boolean | JsonObject | JsonArray | null;
769
+ }[];
770
+ }>;
771
+ traverse(args: {
772
+ startNode: string;
773
+ direction?: string;
774
+ maxDepth?: number;
775
+ topicId?: string;
776
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
777
+ analyze(args: {
778
+ topicId?: string;
779
+ limit?: number;
780
+ metric?: string;
781
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
782
+ bias(args: {
783
+ topicId?: string;
784
+ threshold?: number;
785
+ limit?: number;
786
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
787
+ gaps(args: {
788
+ topicId?: string;
789
+ minConfidence?: number;
790
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
791
+ falsify(args: {
792
+ topicId?: string;
793
+ beliefId?: string;
794
+ beliefIds?: string[];
795
+ minConfidence?: number;
796
+ }): Promise<GatewayDataEnvelope<{
797
+ [x: string]: unknown;
798
+ }>>;
799
+ traceEntityImpact(args: {
800
+ nodeId: string;
801
+ topicId?: string;
802
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
803
+ searchBeliefs: (args: {
804
+ query: string;
805
+ topicId?: string;
806
+ status?: string;
807
+ minConfidence?: number;
808
+ limit?: number;
809
+ }) => Promise<{
810
+ results: Record<string, unknown>[];
811
+ }>;
812
+ findContradictions: (args: {
813
+ topicId?: string;
814
+ nodeId?: string;
815
+ status?: string;
816
+ }) => Promise<{
817
+ contradictions: {
818
+ beliefA: string;
819
+ beliefB: string;
820
+ description: string;
821
+ severity: string;
822
+ status: string;
823
+ defeatType: string;
824
+ }[];
825
+ }>;
826
+ bisectConfidence: (nodeId: string, args: {
827
+ expectedDirection: "overconfident" | "underconfident";
828
+ }) => Promise<GatewayDataEnvelope<{
829
+ [x: string]: unknown;
830
+ }>>;
831
+ listBeliefs: (args: {
832
+ topicId?: string;
833
+ worktreeId?: string;
834
+ status?: string;
835
+ minConfidence?: number;
836
+ limit?: number;
837
+ cursor?: string;
838
+ }) => Promise<({
839
+ [x: string]: unknown;
840
+ } & {
841
+ id?: string;
842
+ beliefId?: string;
843
+ nodeId?: string;
844
+ })[]>;
845
+ detectConfirmationBias(topicId: string, threshold?: number): Promise<{
846
+ topicId: string;
847
+ threshold: number;
848
+ success: true;
849
+ data: Record<string, unknown>;
850
+ correlationId: string;
851
+ policyTraceId: string | null;
852
+ idempotentReplay: boolean;
853
+ }>;
854
+ getStructureAnalysis(topicId: string): Promise<{
855
+ topicId: string;
856
+ success: true;
857
+ data: Record<string, unknown>;
858
+ correlationId: string;
859
+ policyTraceId: string | null;
860
+ idempotentReplay: boolean;
861
+ }>;
862
+ getFalsificationQuestions(topicId: string, beliefIds?: string[]): Promise<{
863
+ topicId: string;
864
+ questions: unknown;
865
+ }>;
866
+ };
867
+ judgments: {
868
+ create(input: RecordJudgmentInput): Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
869
+ record(input: RecordJudgmentInput): Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
870
+ list(query: Parameters<(query: ListJudgmentsInput) => Promise<PlatformGatewaySuccess<ListJudgmentsResponse>>>[0]): Promise<PlatformGatewaySuccess<ListJudgmentsResponse>>;
871
+ get(judgmentId: string): Promise<PlatformGatewaySuccess<GetJudgmentResponse>>;
872
+ recordOutcome(judgmentId: string, input: Parameters<(judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>>[1]): Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
873
+ updateOutcome(judgmentId: string, input: Parameters<(judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>>[1]): Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
874
+ readiness(topicId: string): Promise<PlatformGatewaySuccess<JudgmentReadinessResponse>>;
875
+ calibration(topicId: string): Promise<PlatformGatewaySuccess<JudgmentCalibrationResponse>>;
876
+ pendingOutcomeReview(topicId: string): Promise<PlatformGatewaySuccess<ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
877
+ transitionAuditIntegrity(args: {
878
+ topicId?: string;
879
+ judgmentId?: string;
880
+ includePassing?: boolean;
881
+ }): Promise<PlatformGatewaySuccess<JudgmentTransitionAuditIntegrityResponse>>;
882
+ };
883
+ worktrees: {
884
+ createBranch(input: Parameters<(input: {
885
+ name: string;
886
+ topicId?: string;
887
+ description?: string;
888
+ metadata?: JsonObject;
889
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowBranchRecord>>>[0]): Promise<PlatformGatewaySuccess<WorkflowBranchRecord>>;
890
+ createLens(input: Parameters<(input: {
891
+ name: string;
892
+ workspaceId?: string;
893
+ topicId?: string;
894
+ description?: string;
895
+ perspectiveType: WorkflowLensPerspectiveType;
896
+ promptTemplates?: LensPromptTemplateReference[];
897
+ workflowTemplates?: LensWorkflowTemplate[];
898
+ taskTemplates?: LensTaskTemplate[];
899
+ filterCriteria?: JsonObject;
900
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowLensRecord>>>[0]): Promise<PlatformGatewaySuccess<WorkflowLensRecord>>;
901
+ listLenses(query: Parameters<(query: {
902
+ workspaceId?: string;
903
+ topicId?: string;
904
+ status?: WorkflowLensStatus;
905
+ perspectiveType?: WorkflowLensPerspectiveType;
906
+ } & TopicIdentifierInput) => Promise<PlatformGatewaySuccess<ListResult<WorkflowLensRecord, "lenses">>>>[0]): Promise<PlatformGatewaySuccess<ListResult<WorkflowLensRecord, "lenses">>>;
907
+ applyLensToTopic(input: Parameters<(input: {
908
+ lensId: string;
909
+ topicId?: string;
910
+ metadata?: JsonObject;
911
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>>[0]): Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>;
912
+ removeLensFromTopic(input: Parameters<(input: {
913
+ lensId: string;
914
+ topicId?: string;
915
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>>[0]): Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>;
916
+ create(input: AddWorktreeInput): Promise<PlatformGatewaySuccess<{
917
+ [x: string]: unknown;
918
+ }>>;
919
+ add(input: AddWorktreeInput): Promise<PlatformGatewaySuccess<{
920
+ [x: string]: unknown;
921
+ }>>;
922
+ list(query: Parameters<(query: {
923
+ topicId?: string;
924
+ branchId?: string;
925
+ status?: WorkflowWorktreeStatus;
926
+ track?: string;
927
+ executionBand?: number;
928
+ limit?: number;
929
+ } & TopicIdentifierInput) => Promise<PlatformGatewaySuccess<ListResult<WorkflowWorktreeRecord, "worktrees">>>>[0]): Promise<PlatformGatewaySuccess<{
930
+ [x: string]: unknown;
931
+ } & {
932
+ cursor?: string;
933
+ total?: number;
934
+ } & {
935
+ worktrees?: {
936
+ [x: string]: unknown;
937
+ }[];
938
+ }>>;
939
+ activate(worktreeId: string): Promise<PlatformGatewaySuccess<{
940
+ [x: string]: unknown;
941
+ }>>;
942
+ updateMetadata(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<{
943
+ [x: string]: unknown;
944
+ }>>;
945
+ update(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<{
946
+ [x: string]: unknown;
947
+ }>>;
948
+ updateTargets(input: Parameters<(input: UpdateWorktreeTargetsInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>>[0]): Promise<PlatformGatewaySuccess<{
949
+ [x: string]: unknown;
950
+ }>>;
951
+ listAll(query?: Parameters<(query?: {
952
+ status?: WorkflowWorktreeStatus;
953
+ track?: string;
954
+ executionBand?: number;
955
+ limit?: number;
956
+ }) => Promise<PlatformGatewaySuccess<ListWorktreesResponse>>>[0]): Promise<PlatformGatewaySuccess<ListWorktreesResponse>>;
957
+ merge(worktreeId: string, input: MergeInput): Promise<PlatformGatewaySuccess<{
958
+ [x: string]: unknown;
959
+ }>>;
960
+ push(worktreeId: string, input: Parameters<(worktreeId: string, input: {
961
+ targetContext: string;
962
+ beliefIds?: string[];
963
+ metadata?: JsonObject;
964
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PushWorktreeResponse>>>[1]): Promise<PlatformGatewaySuccess<PushWorktreeResponse>>;
965
+ openPullRequest(worktreeId: string, input: Parameters<(worktreeId: string, input: {
966
+ summary: string;
967
+ reviewers?: string[];
968
+ status?: "pending_review" | "changes_requested" | "approved" | "blocked";
969
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<OpenPullRequestResponse>>>[1]): Promise<PlatformGatewaySuccess<OpenPullRequestResponse>>;
970
+ pipelineSnapshot(topicId: string): Promise<PlatformGatewaySuccess<unknown>>;
971
+ complete(input: Parameters<(input: {
972
+ worktreeId: string;
973
+ keyFindings?: string[];
974
+ decisionsReached?: string[];
975
+ nextSteps?: string[];
976
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
977
+ [x: string]: unknown;
978
+ }>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
979
+ [x: string]: unknown;
980
+ }>>;
981
+ advancePhase(worktreeId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
982
+ [x: string]: unknown;
983
+ }>>;
984
+ setPhase(worktreeId: string, phase: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
985
+ [x: string]: unknown;
986
+ }>>;
987
+ patchState(input: Parameters<(input: {
988
+ worktreeId: string;
989
+ patch: {
990
+ [x: string]: unknown;
991
+ };
992
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
993
+ [x: string]: unknown;
994
+ }>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
995
+ [x: string]: unknown;
996
+ }>>;
997
+ bulkCreate(input: Parameters<(input: {
998
+ worktrees: unknown[];
999
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1000
+ [x: string]: unknown;
1001
+ }>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1002
+ [x: string]: unknown;
1003
+ }>>;
1004
+ };
1005
+ context: {
1006
+ listTopics(query?: Parameters<(query?: TopicListInput) => Promise<PlatformGatewaySuccess<TopicListResponse>>>[0]): Promise<PlatformGatewaySuccess<TopicListResponse>>;
1007
+ compile(topicId: string, input?: Parameters<(topicId: string, input?: CompileContextInput) => Promise<PlatformGatewaySuccess<PublicCompiledContext>>>[1]): Promise<PlatformGatewaySuccess<PublicCompiledContext>>;
1008
+ recordScopeLearning(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1009
+ discover(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1010
+ analyzeTopicDensity(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1011
+ applyAutoBranching(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1012
+ seedBeliefLattice(input?: Parameters<(args?: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1013
+ getLatticeCoverage(input?: Parameters<(args?: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1014
+ matchEntityType(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<GatewayDataEnvelope<{
1015
+ [x: string]: unknown;
1016
+ }>>;
1017
+ discoverEntityConnections(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1018
+ triggerBeliefReview(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1019
+ };
1020
+ tasks: {
1021
+ create(input: CreateTaskInput): Promise<PlatformGatewaySuccess<{
1022
+ [x: string]: unknown;
1023
+ }>>;
1024
+ complete(taskId: string, input: CompleteTaskInput): Promise<PlatformGatewaySuccess<{
1025
+ [x: string]: unknown;
1026
+ }>>;
1027
+ update(taskId: string, input: UpdateTaskInput): Promise<PlatformGatewaySuccess<{
1028
+ [x: string]: unknown;
1029
+ }>>;
1030
+ list(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<{
1031
+ [x: string]: unknown;
1032
+ } & {
1033
+ cursor?: string;
1034
+ total?: number;
1035
+ } & {
1036
+ tasks?: {
1037
+ [x: string]: unknown;
1038
+ }[];
1039
+ }>>;
1040
+ };
1041
+ topics: {
1042
+ list(input?: Parameters<(query?: TopicListInput) => Promise<PlatformGatewaySuccess<TopicListResponse>>>[0]): Promise<PlatformGatewaySuccess<TopicListResponse>>;
1043
+ get(topicId: string): Promise<PlatformGatewaySuccess<TopicRecord>>;
1044
+ create(input: Parameters<(input: TopicCreateInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<TopicRecord>>>[0]): Promise<PlatformGatewaySuccess<TopicRecord>>;
1045
+ update(topicId: string, input: Parameters<(topicId: string, input: TopicUpdateInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<TopicRecord>>>[1]): Promise<PlatformGatewaySuccess<TopicRecord>>;
1046
+ tree(topicId: string, query?: Parameters<(topicId: string, query?: TopicTreeQuery) => Promise<PlatformGatewaySuccess<TopicTreeResponse>>>[1]): Promise<PlatformGatewaySuccess<TopicTreeResponse>>;
1047
+ getTree(input: {
1048
+ rootId: string;
1049
+ maxDepth?: number;
1050
+ }): Promise<PlatformGatewaySuccess<TopicTreeResponse>>;
1051
+ coverage(topicId: string, query?: Parameters<(topicId: string, query?: TopicCoverageQuery) => Promise<PlatformGatewaySuccess<TopicCoverageResponse>>>[1]): Promise<PlatformGatewaySuccess<TopicCoverageResponse>>;
1052
+ remove(topicId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1053
+ bulkCreate(input: Parameters<(input: TopicBulkCreateInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1054
+ };
1055
+ answers: {
1056
+ create(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<{
1057
+ [x: string]: unknown;
1058
+ }>>;
1059
+ get(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1060
+ };
1061
+ contradictions: {
1062
+ flag(args: {
1063
+ beliefA: string;
1064
+ beliefB: string;
1065
+ description: string;
1066
+ topicId?: string;
1067
+ severity?: string;
1068
+ defeatType?: string;
1069
+ }): Promise<GatewayDataEnvelope<{
1070
+ [x: string]: unknown;
1071
+ }>>;
1072
+ list(args: {
1073
+ topicId?: string;
1074
+ status?: string;
1075
+ limit?: number;
1076
+ cursor?: string;
1077
+ }): Promise<GatewayDataEnvelope<{
1078
+ [x: string]: unknown;
1079
+ } & {
1080
+ cursor?: string;
1081
+ total?: number;
1082
+ } & {
1083
+ contradictions?: {
1084
+ [x: string]: unknown;
1085
+ }[];
1086
+ }>>;
1087
+ get(contradictionId: string): Promise<GatewayDataEnvelope<{
1088
+ [x: string]: unknown;
1089
+ }>>;
1090
+ find: (args: {
1091
+ topicId?: string;
1092
+ nodeId?: string;
1093
+ status?: string;
1094
+ }) => Promise<{
1095
+ contradictions: {
1096
+ beliefA: string;
1097
+ beliefB: string;
1098
+ description: string;
1099
+ severity: string;
1100
+ status: string;
1101
+ defeatType: string;
1102
+ }[];
1103
+ }>;
1104
+ };
1105
+ ontologies: {
1106
+ list(input?: {
1107
+ tenantId?: string;
1108
+ tier?: string;
1109
+ status?: string;
1110
+ }): Promise<GatewayDataEnvelope<{
1111
+ ontologies: any[];
1112
+ total: number;
1113
+ items: any[];
1114
+ definitions: any[];
1115
+ }>>;
1116
+ get(ontologyId: string): Promise<GatewayDataEnvelope<{
1117
+ [x: string]: unknown;
1118
+ }>>;
1119
+ bind(input: Parameters<(input: OntologyBindingInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1120
+ [x: string]: unknown;
1121
+ }>>>[0], idempotencyKey?: Parameters<(input: OntologyBindingInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1122
+ [x: string]: unknown;
1123
+ }>>>[1]): Promise<GatewayDataEnvelope<{
1124
+ [x: string]: unknown;
1125
+ }>>;
1126
+ match(input: Parameters<(input: {
1127
+ [x: string]: unknown;
1128
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1129
+ [x: string]: unknown;
1130
+ }>>>[0], idempotencyKey?: Parameters<(input: {
1131
+ [x: string]: unknown;
1132
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1133
+ [x: string]: unknown;
1134
+ }>>>[1]): Promise<GatewayDataEnvelope<{
1135
+ [x: string]: unknown;
1136
+ }>>;
1137
+ create(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
1138
+ update(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
1139
+ archive(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
1140
+ createVersion(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
1141
+ publishVersion(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1142
+ deprecateVersion(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1143
+ resolveEffective(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1144
+ raw: {
1145
+ list(filters?: GatewayScope & {
1146
+ tenantId?: string;
1147
+ tier?: string;
1148
+ status?: string;
1149
+ }): Promise<PlatformGatewaySuccess<{
1150
+ ontologies: any[];
1151
+ total: number;
1152
+ items: any[];
1153
+ definitions: any[];
1154
+ }>>;
1155
+ get(id: string): Promise<PlatformGatewaySuccess<unknown>>;
1156
+ bind(input: OntologyBindingInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1157
+ listDefinitions(filters?: GatewayScope & {
1158
+ tenantId?: string;
1159
+ tier?: string;
1160
+ status?: string;
1161
+ }): Promise<PlatformGatewaySuccess<{
1162
+ ontologies: any[];
1163
+ total: number;
1164
+ items: any[];
1165
+ definitions: any[];
1166
+ }>>;
1167
+ getDefinition(id: string): Promise<PlatformGatewaySuccess<unknown>>;
1168
+ createDefinition(input: OntologyDefinitionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1169
+ updateDefinition(id: string, input: OntologyDefinitionUpdateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1170
+ archiveDefinition(id: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1171
+ listVersions(ontologyId: string, filters?: GatewayScope & {
1172
+ status?: string;
1173
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "versions">>>;
1174
+ createVersion(ontologyId: string, input: OntologyVersionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1175
+ publishVersion(ontologyId: string, versionId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1176
+ deprecateVersion(ontologyId: string, versionId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1177
+ listTopics(ontologyId: string): Promise<PlatformGatewaySuccess<ListResult<any, "topics">>>;
1178
+ listTopicsByOntology(ontologyId: string): Promise<PlatformGatewaySuccess<ListResult<any, "topics">>>;
1179
+ };
1180
+ };
1181
+ coordination: {
1182
+ registerSession(input?: Parameters<(args?: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1183
+ heartbeatSession(input?: Parameters<(args?: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1184
+ endSession(input?: Parameters<(args?: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1185
+ listActiveSessions(input?: Parameters<(args?: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1186
+ sendAgentMessage(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1187
+ broadcastMessage(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1188
+ getInbox(input?: Parameters<(args?: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1189
+ claimFiles(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1190
+ };
1191
+ policy: {
1192
+ checkPermission(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<PermissionDecision>>;
1193
+ listAccessibleTopics(input?: Parameters<(query?: GatewayScope & {
1194
+ permission?: PermissionKind;
1195
+ includeShared?: boolean;
1196
+ principal?: string;
1197
+ principalId?: string;
1198
+ limit?: number;
1199
+ }) => Promise<{
1200
+ data: {
1201
+ permission: PermissionKind;
1202
+ topics: {
1203
+ [key: string]: unknown;
1204
+ topicId?: string;
1205
+ name?: string;
1206
+ type?: string;
1207
+ isOwner?: boolean;
1208
+ }[];
1209
+ total: number;
1210
+ deniedTopics: {
1211
+ topicId: string;
1212
+ reasonCode: string;
1213
+ }[];
1214
+ };
1215
+ success: true;
1216
+ correlationId: string;
1217
+ policyTraceId: string | null;
1218
+ idempotentReplay: boolean;
1219
+ }>>[0]): Promise<{
1220
+ data: {
1221
+ permission: PermissionKind;
1222
+ topics: {
1223
+ [key: string]: unknown;
1224
+ topicId?: string;
1225
+ name?: string;
1226
+ type?: string;
1227
+ isOwner?: boolean;
1228
+ }[];
1229
+ total: number;
1230
+ deniedTopics: {
1231
+ topicId: string;
1232
+ reasonCode: string;
1233
+ }[];
1234
+ };
1235
+ success: true;
1236
+ correlationId: string;
1237
+ policyTraceId: string | null;
1238
+ idempotentReplay: boolean;
1239
+ }>;
1240
+ filterByPermission(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<{
1241
+ success: boolean;
1242
+ data: {
1243
+ permission: PermissionKind;
1244
+ allowedTopicIds: string[];
1245
+ deniedTopics: {
1246
+ topicId: string;
1247
+ reasonCode: string;
1248
+ }[];
1249
+ count: number;
1250
+ };
1251
+ }>;
1252
+ manageWritePolicy(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1253
+ raw: {
1254
+ listDecisions(query?: GatewayScope & {
1255
+ action?: string;
1256
+ decision?: string;
1257
+ traceId?: string;
1258
+ principalId?: string;
1259
+ topicId?: string;
1260
+ limit?: number;
1261
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "decisions">>>;
1262
+ grant(input: GatewayScope & {
1263
+ topicId: string;
1264
+ permission: PermissionKind;
1265
+ principal?: string;
1266
+ principalId?: string;
1267
+ groupId?: string;
1268
+ beliefClusterId?: string;
1269
+ expiresAt?: number;
1270
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1271
+ revoke(input: GatewayScope & {
1272
+ topicId: string;
1273
+ principal?: string;
1274
+ principalId?: string;
1275
+ groupId?: string;
1276
+ beliefClusterId?: string;
1277
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1278
+ listWritePolicies(query?: GatewayScope & {
1279
+ topicId?: string;
1280
+ role?: string;
1281
+ toolCategory?: string;
1282
+ enabled?: boolean;
1283
+ }): Promise<{
1284
+ data: {
1285
+ policies: WritePolicyRecord[];
1286
+ };
1287
+ success: true;
1288
+ correlationId: string;
1289
+ policyTraceId: string | null;
1290
+ idempotentReplay: boolean;
1291
+ }>;
1292
+ createWritePolicy(input: WritePolicyCreateInput, idempotencyKey?: string): Promise<{
1293
+ data: {
1294
+ id: string | undefined;
1295
+ created: boolean;
1296
+ policy: WritePolicyRecord | null;
1297
+ };
1298
+ success: true;
1299
+ correlationId: string;
1300
+ policyTraceId: string | null;
1301
+ idempotentReplay: boolean;
1302
+ }>;
1303
+ updateWritePolicy(id: string, input: WritePolicyUpdateInput, idempotencyKey?: string): Promise<{
1304
+ data: {
1305
+ id: string | undefined;
1306
+ updated: boolean;
1307
+ policy: WritePolicyRecord | null;
1308
+ };
1309
+ success: true;
1310
+ correlationId: string;
1311
+ policyTraceId: string | null;
1312
+ idempotentReplay: boolean;
1313
+ }>;
1314
+ deleteWritePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1315
+ id?: string;
1316
+ deleted?: boolean;
1317
+ }>>;
1318
+ listRolePolicies(query?: GatewayScope): Promise<{
1319
+ data: {
1320
+ policies: TenantPolicyRecord[];
1321
+ };
1322
+ success: true;
1323
+ correlationId: string;
1324
+ policyTraceId: string | null;
1325
+ idempotentReplay: boolean;
1326
+ }>;
1327
+ createRolePolicy(input: GatewayScope & {
1328
+ roleName: string;
1329
+ description?: string;
1330
+ permissions: TenantPolicyPermission[];
1331
+ groupBindings?: string[];
1332
+ }, idempotencyKey?: string): Promise<{
1333
+ data: {
1334
+ policy: TenantPolicyRecord | null;
1335
+ };
1336
+ success: true;
1337
+ correlationId: string;
1338
+ policyTraceId: string | null;
1339
+ idempotentReplay: boolean;
1340
+ }>;
1341
+ updateRolePolicy(id: string, input: GatewayScope & {
1342
+ roleName: string;
1343
+ description?: string;
1344
+ permissions: TenantPolicyPermission[];
1345
+ groupBindings?: string[];
1346
+ }, idempotencyKey?: string): Promise<{
1347
+ data: {
1348
+ policy: TenantPolicyRecord | null;
1349
+ };
1350
+ success: true;
1351
+ correlationId: string;
1352
+ policyTraceId: string | null;
1353
+ idempotentReplay: boolean;
1354
+ }>;
1355
+ deleteRolePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1356
+ checkPermission(query: GatewayScope & {
1357
+ topicId?: string;
1358
+ permission?: PermissionKind;
1359
+ principal?: string;
1360
+ principalId?: string;
1361
+ beliefClusterId?: string;
1362
+ }): Promise<PlatformGatewaySuccess<PermissionDecision>>;
1363
+ listAccessibleTopics(query?: GatewayScope & {
1364
+ permission?: PermissionKind;
1365
+ includeShared?: boolean;
1366
+ principal?: string;
1367
+ principalId?: string;
1368
+ limit?: number;
1369
+ }): Promise<{
1370
+ data: {
1371
+ permission: PermissionKind;
1372
+ topics: {
1373
+ [key: string]: unknown;
1374
+ topicId?: string;
1375
+ name?: string;
1376
+ type?: string;
1377
+ isOwner?: boolean;
1378
+ }[];
1379
+ total: number;
1380
+ deniedTopics: {
1381
+ topicId: string;
1382
+ reasonCode: string;
1383
+ }[];
1384
+ };
1385
+ success: true;
1386
+ correlationId: string;
1387
+ policyTraceId: string | null;
1388
+ idempotentReplay: boolean;
1389
+ }>;
1390
+ filterByPermission(input: GatewayScope & {
1391
+ topicIds?: string[];
1392
+ permission?: PermissionKind;
1393
+ principal?: string;
1394
+ principalId?: string;
1395
+ }): Promise<{
1396
+ success: boolean;
1397
+ data: {
1398
+ permission: PermissionKind;
1399
+ allowedTopicIds: string[];
1400
+ deniedTopics: {
1401
+ topicId: string;
1402
+ reasonCode: string;
1403
+ }[];
1404
+ count: number;
1405
+ };
1406
+ }>;
1407
+ };
1408
+ };
1409
+ observations: {
1410
+ ingest(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1411
+ getContext(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1412
+ };
1413
+ coding: {
1414
+ getCodeContext(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1415
+ getChangeHistory(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1416
+ recordAttempt(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1417
+ getFailureLog(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1418
+ };
1419
+ contracts: {
1420
+ create(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1421
+ list(input?: {
1422
+ beliefNodeId?: string;
1423
+ contractId?: string;
1424
+ status?: string;
1425
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1426
+ evaluate(input: Parameters<(args: JsonObject, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1427
+ getStatus(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1428
+ };
1429
+ bootstrap: {
1430
+ generateSessionHandoff(input: Parameters<(args: JsonObject) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1431
+ };
1432
+ research: {
1433
+ searchSources(args: {
1434
+ query: string;
1435
+ topicId?: string;
1436
+ sources?: string[];
1437
+ }): Promise<{
1438
+ results: {
1439
+ title: string;
1440
+ url: string;
1441
+ snippet: string;
1442
+ relevanceScore: number;
1443
+ suggestedEvidence: string;
1444
+ }[];
1445
+ }>;
1446
+ executeDeepResearch(args: {
1447
+ query: string;
1448
+ topicId?: string;
1449
+ depth?: "quick" | "standard" | "deep";
1450
+ }): Promise<{
1451
+ report: {
1452
+ summary: string;
1453
+ findings: {
1454
+ title: string;
1455
+ summary: string;
1456
+ sourceUrl: string;
1457
+ }[];
1458
+ sources: {
1459
+ title: string;
1460
+ url: string;
1461
+ }[];
1462
+ linkedEvidence: never[];
1463
+ linkedQuestions: never[];
1464
+ };
1465
+ }>;
1466
+ };
1467
+ tools: {
1468
+ register(registration: CustomToolRegistration): RegisteredCustomTool;
1469
+ unregister(fullName: string): boolean;
1470
+ list(): RegisteredCustomTool[];
1471
+ clear(): void;
1472
+ invoke(name: string, input?: CustomToolInput): Promise<unknown>;
1473
+ namespace(namespace: string): CustomToolNamespace;
1474
+ };
1475
+ packs: {
1476
+ /**
1477
+ * Ensure the configured packKey is installed.
1478
+ * No-op if no packKey was provided or if the pack is already installed.
1479
+ * Called automatically on first API use when packKey is set.
1480
+ */
1481
+ ensurePack: () => Promise<void>;
1482
+ /**
1483
+ * Check if the configured pack has been installed in this session.
1484
+ */
1485
+ readonly isInstalled: boolean;
1486
+ listCatalog(): Promise<PlatformGatewaySuccess<ListResult<any, "catalog">>>;
1487
+ catalog(): Promise<PlatformGatewaySuccess<ListResult<any, "catalog">>>;
1488
+ listStates(scope?: Parameters<(query?: GatewayScope) => Promise<PlatformGatewaySuccess<ListResult<any, "states">>>>[0]): Promise<PlatformGatewaySuccess<ListResult<any, "states">>>;
1489
+ states(scope?: Parameters<(query?: GatewayScope) => Promise<PlatformGatewaySuccess<ListResult<any, "states">>>>[0]): Promise<PlatformGatewaySuccess<ListResult<any, "states">>>;
1490
+ install(input: Parameters<(input: PackInstallInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1491
+ enable(input: Parameters<(input: PackEnableInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1492
+ disable(input: Parameters<(input: PackDisableInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1493
+ };
1494
+ nodes: {
1495
+ list(query: Parameters<(query: ListNodesInput) => Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>>[0]): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
1496
+ get(input: string | Parameters<(query: GetNodeInput) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0]): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1497
+ create(input: Parameters<(input: CreateNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1498
+ update(input: Parameters<(input: UpdateNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1499
+ batchCreate(input: Parameters<(input: BatchCreateNodesInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1500
+ supersede(input: Parameters<(input: SupersedeNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1501
+ verify(input: Parameters<(input: VerifyNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1502
+ hardDelete(input: Parameters<(input: HardDeleteNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1503
+ };
1504
+ identity: {
1505
+ whoami(): Promise<PlatformGatewaySuccess<{
1506
+ principalId: string;
1507
+ principalType: "user" | "human" | "service" | "group" | "external_viewer" | "agent";
1508
+ tenantId: string | null;
1509
+ workspaceId: string | null;
1510
+ scopes: string[];
1511
+ roles: string[];
1512
+ isPlatformAdmin: boolean;
1513
+ isTenantAdmin: boolean;
1514
+ isWorkspaceAdmin: boolean;
1515
+ authMode: string | undefined;
1516
+ sessionId: string | undefined;
1517
+ delegatedBy: string | undefined;
1518
+ expiresAt: number | undefined;
1519
+ }> & {
1520
+ principalId: string;
1521
+ principalType: "user" | "human" | "service" | "group" | "external_viewer" | "agent";
1522
+ tenantId: string | null;
1523
+ workspaceId: string | null;
1524
+ scopes: string[];
1525
+ roles: string[];
1526
+ isPlatformAdmin: boolean;
1527
+ isTenantAdmin: boolean;
1528
+ isWorkspaceAdmin: boolean;
1529
+ authMode: string | undefined;
1530
+ sessionId: string | undefined;
1531
+ delegatedBy: string | undefined;
1532
+ expiresAt: number | undefined;
1533
+ }>;
1534
+ };
1535
+ custom: CustomToolNamespace;
1536
+ extensions: Record<string, CustomToolNamespace>;
1537
+ raw: {
1538
+ beliefs: {
1539
+ createBelief(input: CreateBeliefInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformBeliefRecord>>;
1540
+ modulateConfidence(beliefId: string, input: ModulateConfidenceInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ModulateConfidenceResponse>>;
1541
+ forkBelief(beliefId: string, input: ForkBeliefInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ForkBeliefResponse>>;
1542
+ updateBeliefStatus(input: UpdateBeliefStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1543
+ updateBeliefRationale(input: UpdateBeliefRationaleInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1544
+ linkBeliefs(input: LinkBeliefsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1545
+ unlinkBeliefEvidence(input: UnlinkBeliefEvidenceInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1546
+ updateBeliefCriticality(input: UpdateBeliefCriticalityInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1547
+ batchUpdateBeliefCriticality(input: BatchUpdateBeliefCriticalityInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1548
+ reassignBeliefsTopic(input: ReassignBeliefsTopicInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1549
+ };
1550
+ graph: {
1551
+ listNodes(query: ListNodesInput): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
1552
+ queryNodes(query: QueryNodesInput): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
1553
+ getNode(query: GetNodeInput): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1554
+ createNode(input: CreateNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1555
+ updateNode(input: UpdateNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1556
+ batchCreateNodes(input: BatchCreateNodesInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1557
+ supersedeNode(input: SupersedeNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1558
+ verifyNode(input: VerifyNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1559
+ hardDeleteNode(input: HardDeleteNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1560
+ listEdges(query: ListEdgesInput): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphEdge, "edges">>>;
1561
+ queryEdges(query: QueryEdgesInput): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphEdge, "edges">>>;
1562
+ createEdge(input: CreateEdgeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphEdge>>;
1563
+ deleteEdge(query: DeleteEdgeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<DeleteEdgeResponse>>;
1564
+ neighborhood(query: NeighborhoodInput): Promise<PlatformGatewaySuccess<GraphNeighborhoodResponse>>;
1565
+ traverse(query: TraverseInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1566
+ analyze(query?: AnalyzeInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1567
+ bias(query?: BiasInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1568
+ gaps(query: GapsInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1569
+ search(query: SearchInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1570
+ getNeighborhood(query: NeighborhoodInput): Promise<PlatformGatewaySuccess<GraphNeighborhoodResponse>>;
1571
+ getPath(query: PathInput): Promise<PlatformGatewaySuccess<GraphPathResponse>>;
1572
+ getAnalytics(query?: AnalyticsInput): Promise<PlatformGatewaySuccess<GraphAnalyticsResponse>>;
1573
+ };
1574
+ decisions: {
1575
+ listJudgments(query: ListJudgmentsInput): Promise<PlatformGatewaySuccess<ListJudgmentsResponse>>;
1576
+ getJudgment(judgmentId: string): Promise<PlatformGatewaySuccess<GetJudgmentResponse>>;
1577
+ getJudgmentReadiness(query: {
1578
+ topicId?: string;
1579
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<JudgmentReadinessResponse>>;
1580
+ getJudgmentCalibration(query: GetJudgmentCalibrationInput): Promise<PlatformGatewaySuccess<JudgmentCalibrationResponse>>;
1581
+ listPendingOutcomeReviews(query: ListPendingJudgmentOutcomeReviewInput): Promise<PlatformGatewaySuccess<ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
1582
+ listPendingJudgmentOutcomeReview(query: ListPendingJudgmentOutcomeReviewInput): Promise<PlatformGatewaySuccess<ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
1583
+ getJudgmentTransitionAuditIntegrity(query: GetJudgmentTransitionAuditIntegrityInput): Promise<PlatformGatewaySuccess<JudgmentTransitionAuditIntegrityResponse>>;
1584
+ createJudgment(input: RecordJudgmentInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
1585
+ recordJudgment(input: RecordJudgmentInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
1586
+ updateJudgmentOutcome(judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
1587
+ recordJudgmentOutcome(judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
1588
+ };
1589
+ workflow: {
1590
+ listBranches(query: {
1591
+ topicId?: string;
1592
+ status?: WorkflowBranchStatus;
1593
+ limit?: number;
1594
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<WorkflowBranchRecord, "branches">>>;
1595
+ createBranch(input: {
1596
+ name: string;
1597
+ topicId?: string;
1598
+ description?: string;
1599
+ metadata?: JsonObject;
1600
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowBranchRecord>>;
1601
+ listLenses(query: {
1602
+ workspaceId?: string;
1603
+ topicId?: string;
1604
+ status?: WorkflowLensStatus;
1605
+ perspectiveType?: WorkflowLensPerspectiveType;
1606
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<WorkflowLensRecord, "lenses">>>;
1607
+ createLens(input: {
1608
+ name: string;
1609
+ workspaceId?: string;
1610
+ topicId?: string;
1611
+ description?: string;
1612
+ perspectiveType: WorkflowLensPerspectiveType;
1613
+ promptTemplates?: LensPromptTemplateReference[];
1614
+ workflowTemplates?: LensWorkflowTemplate[];
1615
+ taskTemplates?: LensTaskTemplate[];
1616
+ filterCriteria?: JsonObject;
1617
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowLensRecord>>;
1618
+ applyLensToTopic(input: {
1619
+ lensId: string;
1620
+ topicId?: string;
1621
+ metadata?: JsonObject;
1622
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>;
1623
+ removeLensFromTopic(input: {
1624
+ lensId: string;
1625
+ topicId?: string;
1626
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>;
1627
+ listWorktrees(query: {
1628
+ topicId?: string;
1629
+ branchId?: string;
1630
+ status?: WorkflowWorktreeStatus;
1631
+ track?: string;
1632
+ executionBand?: number;
1633
+ limit?: number;
1634
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<WorkflowWorktreeRecord, "worktrees">>>;
1635
+ listAllWorktrees(query?: {
1636
+ status?: WorkflowWorktreeStatus;
1637
+ track?: string;
1638
+ executionBand?: number;
1639
+ limit?: number;
1640
+ }): Promise<PlatformGatewaySuccess<ListWorktreesResponse>>;
1641
+ createWorktree(input: AddWorktreeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
1642
+ addWorktree(input: AddWorktreeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
1643
+ merge(worktreeId: string, input: MergeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<MergeWorktreeResponse>>;
1644
+ activateWorktree(worktreeId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
1645
+ updateWorktreeTargets(input: UpdateWorktreeTargetsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
1646
+ completeWorktree(input: CompleteWorktreeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1647
+ advanceWorktreePhase(input: AdvanceWorktreePhaseInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1648
+ setWorktreePhase(input: SetWorktreePhaseInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1649
+ patchWorktreeState(input: PatchWorktreeStateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1650
+ bulkCreateWorktrees(input: BulkCreateWorktreesInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1651
+ openPullRequest(worktreeId: string, input: {
1652
+ summary: string;
1653
+ reviewers?: string[];
1654
+ status?: "pending_review" | "changes_requested" | "approved" | "blocked";
1655
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OpenPullRequestResponse>>;
1656
+ push(worktreeId: string, input: {
1657
+ targetContext: string;
1658
+ beliefIds?: string[];
1659
+ metadata?: JsonObject;
1660
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PushWorktreeResponse>>;
1661
+ listTopics(query?: ListTopicsInput): Promise<PlatformGatewaySuccess<ListTopicsResponse>>;
1662
+ switchTopicContext(input: SwitchTopicContextInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<SwitchTopicContextResponse>>;
1663
+ createTask(input: CreateTaskInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<CreateTaskResponse>>;
1664
+ completeTask(taskId: string, input: CompleteTaskInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<CompleteTaskResponse>>;
1665
+ updateTask(taskId: string, input: UpdateTaskInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<UpdateTaskResponse>>;
1666
+ createPillar(input: {
1667
+ name: string;
1668
+ topicId?: string;
1669
+ description?: string;
1670
+ metadata?: JsonObject;
1671
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowBranchRecord>>;
1672
+ createSprint(input: {
1673
+ title: string;
1674
+ topicId?: string;
1675
+ branchId?: string;
1676
+ hypothesis?: string;
1677
+ beliefIds?: string[];
1678
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
1679
+ completeSprint(worktreeId: string, input: MergeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<MergeWorktreeResponse>>;
1680
+ requestReview(worktreeId: string, input: {
1681
+ summary: string;
1682
+ reviewers?: string[];
1683
+ status?: "pending_review" | "changes_requested" | "approved" | "blocked";
1684
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OpenPullRequestResponse>>;
1685
+ publishFindings(worktreeId: string, input: {
1686
+ targetContext: string;
1687
+ beliefIds?: string[];
1688
+ metadata?: JsonObject;
1689
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PushWorktreeResponse>>;
1690
+ };
1691
+ audit: {
1692
+ listEvents(query?: GatewayScope & {
1693
+ action?: string;
1694
+ decision?: string;
1695
+ traceId?: string;
1696
+ principalId?: string;
1697
+ topicId?: string;
1698
+ limit?: number;
1699
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<any, "events">>>;
1700
+ };
1701
+ admin: {
1702
+ listTenants(query?: {
1703
+ status?: "active" | "disabled" | "archived";
1704
+ limit?: number;
1705
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "tenants">>>;
1706
+ createTenant(input: {
1707
+ key: string;
1708
+ slug?: string;
1709
+ name: string;
1710
+ status?: "active" | "disabled" | "archived";
1711
+ metadata?: JsonObject;
1712
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1713
+ getControlObjectOwnership(): Promise<PlatformGatewaySuccess<ControlObjectOwnershipContract>>;
1714
+ getControlObjectOwnershipContract(): Promise<PlatformGatewaySuccess<ControlObjectOwnershipContract>>;
1715
+ listWorkspaces(query?: GatewayScope & {
1716
+ status?: "active" | "archived";
1717
+ limit?: number;
1718
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "workspaces">>>;
1719
+ createWorkspace(input: GatewayScope & {
1720
+ workspaceId?: string;
1721
+ key?: string;
1722
+ slug?: string;
1723
+ name?: string;
1724
+ status?: "active" | "archived";
1725
+ defaultProjectVisibility?: "private" | "team" | "firm" | "external" | "public";
1726
+ restore?: boolean;
1727
+ metadata?: JsonObject;
1728
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1729
+ listMemberships(query?: GatewayScope & {
1730
+ principalId?: string;
1731
+ status?: "active" | "revoked" | "expired";
1732
+ limit?: number;
1733
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "memberships">>>;
1734
+ createMembership(input: GatewayScope & {
1735
+ membershipId?: string;
1736
+ principalId: string;
1737
+ role: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
1738
+ status?: "active" | "revoked" | "expired";
1739
+ source?: "bootstrap" | "manual" | "sync" | "invitation";
1740
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1741
+ updateMembership(input: GatewayScope & {
1742
+ membershipId?: string;
1743
+ principalId: string;
1744
+ role: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
1745
+ status?: "active" | "revoked" | "expired";
1746
+ source?: "bootstrap" | "manual" | "sync" | "invitation";
1747
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1748
+ upsertMembership(input: GatewayScope & {
1749
+ membershipId?: string;
1750
+ principalId: string;
1751
+ role: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
1752
+ status?: "active" | "revoked" | "expired";
1753
+ source?: "bootstrap" | "manual" | "sync" | "invitation";
1754
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1755
+ listTenantApiKeys(scope: GatewayScope & {
1756
+ status?: "active" | "revoked" | "expired";
1757
+ }): Promise<{
1758
+ data: {
1759
+ keys: TenantApiKeyRecord[];
1760
+ };
1761
+ success: true;
1762
+ correlationId: string;
1763
+ policyTraceId: string | null;
1764
+ idempotentReplay: boolean;
1765
+ }>;
1766
+ createTenantApiKey(input: GatewayScope & {
1767
+ label?: string;
1768
+ scopes: string[];
1769
+ expiresAt?: number;
1770
+ }, idempotencyKey?: string): Promise<{
1771
+ data: {
1772
+ key: TenantApiKeyRecord | null;
1773
+ plaintextKey: string | undefined;
1774
+ };
1775
+ success: true;
1776
+ correlationId: string;
1777
+ policyTraceId: string | null;
1778
+ idempotentReplay: boolean;
1779
+ }>;
1780
+ revokeTenantApiKey(keyId: string, input?: GatewayScope & {
1781
+ reason?: string;
1782
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1783
+ listTenantVaultSecrets(scope: GatewayScope): Promise<{
1784
+ data: {
1785
+ secrets: TenantVaultSecretRecord[];
1786
+ };
1787
+ success: true;
1788
+ correlationId: string;
1789
+ policyTraceId: string | null;
1790
+ idempotentReplay: boolean;
1791
+ }>;
1792
+ createTenantVaultSecret(input: GatewayScope & {
1793
+ name: string;
1794
+ description?: string;
1795
+ value: string;
1796
+ }, idempotencyKey?: string): Promise<{
1797
+ data: {
1798
+ secret: TenantVaultSecretRecord | null;
1799
+ };
1800
+ success: true;
1801
+ correlationId: string;
1802
+ policyTraceId: string | null;
1803
+ idempotentReplay: boolean;
1804
+ }>;
1805
+ updateTenantVaultSecret(secretId: string, input: GatewayScope & {
1806
+ name: string;
1807
+ description?: string;
1808
+ value?: string;
1809
+ }, idempotencyKey?: string): Promise<{
1810
+ data: {
1811
+ secret: TenantVaultSecretRecord | null;
1812
+ };
1813
+ success: true;
1814
+ correlationId: string;
1815
+ policyTraceId: string | null;
1816
+ idempotentReplay: boolean;
1817
+ }>;
1818
+ deleteTenantVaultSecret(secretId: string, scope: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1819
+ listTenantSecrets(scope: GatewayScope & {
1820
+ providerId?: string;
1821
+ status?: "active" | "revoked";
1822
+ }): Promise<PlatformGatewaySuccess<unknown>>;
1823
+ upsertTenantSecret(input: GatewayScope & {
1824
+ providerId: string;
1825
+ apiKey: string;
1826
+ label?: string;
1827
+ modelSlotIds?: string[];
1828
+ passThroughOnly?: boolean;
1829
+ metadata?: JsonObject;
1830
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1831
+ revokeTenantSecret(secretRef: string, input: GatewayScope & {
1832
+ reason?: string;
1833
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1834
+ getTenantConfig(scope: GatewayScope & {
1835
+ tenantId: string;
1836
+ }): Promise<PlatformGatewaySuccess<TenantConfigRecord>>;
1837
+ getTenantModelRouting(scope: GatewayScope & {
1838
+ tenantId: string;
1839
+ }): Promise<PlatformGatewaySuccess<TenantModelRoutingSnapshot>>;
1840
+ upsertTenantConfig(input: GatewayScope & Omit<TenantConfigRecord, "updatedAt" | "updatedBy">, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantConfigRecord>>;
1841
+ listGroups(scope?: GatewayScope & {
1842
+ limit?: number;
1843
+ }): Promise<PlatformGatewaySuccess<unknown>>;
1844
+ createGroup(input: GatewayScope & {
1845
+ name: string;
1846
+ groupKey?: string;
1847
+ groupType?: string;
1848
+ description?: string;
1849
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1850
+ updateGroup(groupId: string, input: GatewayScope & {
1851
+ name?: string;
1852
+ description?: string;
1853
+ workspaceId?: string;
1854
+ clearWorkspaceId?: boolean;
1855
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1856
+ deleteGroup(groupId: string, input?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1857
+ listGroupMembers(query: GatewayScope & {
1858
+ groupId: string;
1859
+ }): Promise<PlatformGatewaySuccess<unknown>>;
1860
+ addGroupMember(input: GatewayScope & {
1861
+ groupId: string;
1862
+ principalId: string;
1863
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1864
+ removeGroupMember(input: GatewayScope & {
1865
+ groupId: string;
1866
+ principalId: string;
1867
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1868
+ listPackGroupAssignments(query?: GatewayScope & {
1869
+ groupId?: string;
1870
+ status?: string;
1871
+ }): Promise<PlatformGatewaySuccess<unknown>>;
1872
+ assignPackToGroup(input: GatewayScope & {
1873
+ groupId: string;
1874
+ packKey: string;
1875
+ packVersion?: string;
1876
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1877
+ removePackFromGroup(input: GatewayScope & {
1878
+ groupId: string;
1879
+ packKey: string;
1880
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1881
+ };
1882
+ identity: {
1883
+ whoami(): Promise<PlatformGatewaySuccess<{
1884
+ principalId: string;
1885
+ principalType: "user" | "human" | "service" | "group" | "external_viewer" | "agent";
1886
+ tenantId: string | null;
1887
+ workspaceId: string | null;
1888
+ scopes: string[];
1889
+ roles: string[];
1890
+ isPlatformAdmin: boolean;
1891
+ isTenantAdmin: boolean;
1892
+ isWorkspaceAdmin: boolean;
1893
+ authMode: string | undefined;
1894
+ sessionId: string | undefined;
1895
+ delegatedBy: string | undefined;
1896
+ expiresAt: number | undefined;
1897
+ }>>;
1898
+ listPrincipals(query?: GatewayScope & {
1899
+ status?: string;
1900
+ principalType?: string;
1901
+ query?: string;
1902
+ limit?: number;
1903
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "principals">>>;
1904
+ createPrincipal(input: GatewayScope & {
1905
+ principalId: string;
1906
+ principalType: "user" | "group" | "service" | "external_viewer";
1907
+ clerkId?: string;
1908
+ email?: string;
1909
+ displayName?: string;
1910
+ status?: "active" | "disabled" | "revoked";
1911
+ metadata?: JsonObject;
1912
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1913
+ updatePrincipal(input: GatewayScope & {
1914
+ principalId: string;
1915
+ principalType: "user" | "group" | "service" | "external_viewer";
1916
+ clerkId?: string;
1917
+ email?: string;
1918
+ displayName?: string;
1919
+ status?: "active" | "disabled" | "revoked";
1920
+ metadata?: JsonObject;
1921
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1922
+ upsertPrincipal(input: GatewayScope & {
1923
+ principalId: string;
1924
+ principalType: "user" | "group" | "service" | "external_viewer";
1925
+ clerkId?: string;
1926
+ email?: string;
1927
+ displayName?: string;
1928
+ status?: "active" | "disabled" | "revoked";
1929
+ metadata?: JsonObject;
1930
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1931
+ listKeys(query?: GatewayScope & {
1932
+ principalId?: string;
1933
+ status?: string;
1934
+ limit?: number;
1935
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "keys">>>;
1936
+ createKey(input: GatewayScope & {
1937
+ principalId: string;
1938
+ keyId?: string;
1939
+ token?: string;
1940
+ scopes?: string[];
1941
+ environment?: "sandbox" | "production";
1942
+ expiresInDays?: number;
1943
+ rateLimitTier?: "free" | "developer" | "partner";
1944
+ metadata?: JsonObject;
1945
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1946
+ rotateKey(keyId: string, input?: {
1947
+ replacementKeyId?: string;
1948
+ replacementToken?: string;
1949
+ replacementExpiresInDays?: number;
1950
+ gracePeriodHours?: number;
1951
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1952
+ deleteKey(keyId: string, input?: {
1953
+ reason?: string;
1954
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1955
+ revokeKey(keyId: string, input?: {
1956
+ reason?: string;
1957
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1958
+ searchClerkUsers(q: string): Promise<PlatformGatewaySuccess<ClerkUserSearchResult[]>>;
1959
+ };
1960
+ policy: {
1961
+ listDecisions(query?: GatewayScope & {
1962
+ action?: string;
1963
+ decision?: string;
1964
+ traceId?: string;
1965
+ principalId?: string;
1966
+ topicId?: string;
1967
+ limit?: number;
1968
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "decisions">>>;
1969
+ grant(input: GatewayScope & {
1970
+ topicId: string;
1971
+ permission: PermissionKind;
1972
+ principal?: string;
1973
+ principalId?: string;
1974
+ groupId?: string;
1975
+ beliefClusterId?: string;
1976
+ expiresAt?: number;
1977
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1978
+ revoke(input: GatewayScope & {
1979
+ topicId: string;
1980
+ principal?: string;
1981
+ principalId?: string;
1982
+ groupId?: string;
1983
+ beliefClusterId?: string;
1984
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1985
+ listWritePolicies(query?: GatewayScope & {
1986
+ topicId?: string;
1987
+ role?: string;
1988
+ toolCategory?: string;
1989
+ enabled?: boolean;
1990
+ }): Promise<{
1991
+ data: {
1992
+ policies: WritePolicyRecord[];
1993
+ };
1994
+ success: true;
1995
+ correlationId: string;
1996
+ policyTraceId: string | null;
1997
+ idempotentReplay: boolean;
1998
+ }>;
1999
+ createWritePolicy(input: WritePolicyCreateInput, idempotencyKey?: string): Promise<{
2000
+ data: {
2001
+ id: string | undefined;
2002
+ created: boolean;
2003
+ policy: WritePolicyRecord | null;
2004
+ };
2005
+ success: true;
2006
+ correlationId: string;
2007
+ policyTraceId: string | null;
2008
+ idempotentReplay: boolean;
2009
+ }>;
2010
+ updateWritePolicy(id: string, input: WritePolicyUpdateInput, idempotencyKey?: string): Promise<{
2011
+ data: {
2012
+ id: string | undefined;
2013
+ updated: boolean;
2014
+ policy: WritePolicyRecord | null;
2015
+ };
2016
+ success: true;
2017
+ correlationId: string;
2018
+ policyTraceId: string | null;
2019
+ idempotentReplay: boolean;
2020
+ }>;
2021
+ deleteWritePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2022
+ id?: string;
2023
+ deleted?: boolean;
2024
+ }>>;
2025
+ listRolePolicies(query?: GatewayScope): Promise<{
2026
+ data: {
2027
+ policies: TenantPolicyRecord[];
2028
+ };
2029
+ success: true;
2030
+ correlationId: string;
2031
+ policyTraceId: string | null;
2032
+ idempotentReplay: boolean;
2033
+ }>;
2034
+ createRolePolicy(input: GatewayScope & {
2035
+ roleName: string;
2036
+ description?: string;
2037
+ permissions: TenantPolicyPermission[];
2038
+ groupBindings?: string[];
2039
+ }, idempotencyKey?: string): Promise<{
2040
+ data: {
2041
+ policy: TenantPolicyRecord | null;
2042
+ };
2043
+ success: true;
2044
+ correlationId: string;
2045
+ policyTraceId: string | null;
2046
+ idempotentReplay: boolean;
2047
+ }>;
2048
+ updateRolePolicy(id: string, input: GatewayScope & {
2049
+ roleName: string;
2050
+ description?: string;
2051
+ permissions: TenantPolicyPermission[];
2052
+ groupBindings?: string[];
2053
+ }, idempotencyKey?: string): Promise<{
2054
+ data: {
2055
+ policy: TenantPolicyRecord | null;
2056
+ };
2057
+ success: true;
2058
+ correlationId: string;
2059
+ policyTraceId: string | null;
2060
+ idempotentReplay: boolean;
2061
+ }>;
2062
+ deleteRolePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2063
+ checkPermission(query: GatewayScope & {
2064
+ topicId?: string;
2065
+ permission?: PermissionKind;
2066
+ principal?: string;
2067
+ principalId?: string;
2068
+ beliefClusterId?: string;
2069
+ }): Promise<PlatformGatewaySuccess<PermissionDecision>>;
2070
+ listAccessibleTopics(query?: GatewayScope & {
2071
+ permission?: PermissionKind;
2072
+ includeShared?: boolean;
2073
+ principal?: string;
2074
+ principalId?: string;
2075
+ limit?: number;
2076
+ }): Promise<{
2077
+ data: {
2078
+ permission: PermissionKind;
2079
+ topics: {
2080
+ [key: string]: unknown;
2081
+ topicId?: string;
2082
+ name?: string;
2083
+ type?: string;
2084
+ isOwner?: boolean;
2085
+ }[];
2086
+ total: number;
2087
+ deniedTopics: {
2088
+ topicId: string;
2089
+ reasonCode: string;
2090
+ }[];
2091
+ };
2092
+ success: true;
2093
+ correlationId: string;
2094
+ policyTraceId: string | null;
2095
+ idempotentReplay: boolean;
2096
+ }>;
2097
+ filterByPermission(input: GatewayScope & {
2098
+ topicIds?: string[];
2099
+ permission?: PermissionKind;
2100
+ principal?: string;
2101
+ principalId?: string;
2102
+ }): Promise<{
2103
+ success: boolean;
2104
+ data: {
2105
+ permission: PermissionKind;
2106
+ allowedTopicIds: string[];
2107
+ deniedTopics: {
2108
+ topicId: string;
2109
+ reasonCode: string;
2110
+ }[];
2111
+ count: number;
2112
+ };
2113
+ }>;
2114
+ };
2115
+ answers: {
2116
+ get(questionId: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2117
+ };
2118
+ ontology: {
2119
+ list(filters?: GatewayScope & {
2120
+ tenantId?: string;
2121
+ tier?: string;
2122
+ status?: string;
2123
+ }): Promise<PlatformGatewaySuccess<{
2124
+ ontologies: any[];
2125
+ total: number;
2126
+ items: any[];
2127
+ definitions: any[];
2128
+ }>>;
2129
+ get(id: string): Promise<PlatformGatewaySuccess<unknown>>;
2130
+ bind(input: OntologyBindingInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2131
+ listDefinitions(filters?: GatewayScope & {
2132
+ tenantId?: string;
2133
+ tier?: string;
2134
+ status?: string;
2135
+ }): Promise<PlatformGatewaySuccess<{
2136
+ ontologies: any[];
2137
+ total: number;
2138
+ items: any[];
2139
+ definitions: any[];
2140
+ }>>;
2141
+ getDefinition(id: string): Promise<PlatformGatewaySuccess<unknown>>;
2142
+ createDefinition(input: OntologyDefinitionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2143
+ updateDefinition(id: string, input: OntologyDefinitionUpdateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2144
+ archiveDefinition(id: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2145
+ listVersions(ontologyId: string, filters?: GatewayScope & {
2146
+ status?: string;
2147
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "versions">>>;
2148
+ createVersion(ontologyId: string, input: OntologyVersionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2149
+ publishVersion(ontologyId: string, versionId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2150
+ deprecateVersion(ontologyId: string, versionId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2151
+ listTopics(ontologyId: string): Promise<PlatformGatewaySuccess<ListResult<any, "topics">>>;
2152
+ listTopicsByOntology(ontologyId: string): Promise<PlatformGatewaySuccess<ListResult<any, "topics">>>;
2153
+ };
2154
+ mcpParity: {
2155
+ sessionId: `${string}-${string}-${string}-${string}-${string}`;
2156
+ listTopics(args?: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2157
+ createTopic(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2158
+ getTopic(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2159
+ getTopicTree(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2160
+ activateWorktree(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2161
+ updateWorktreeMetadata(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2162
+ updateWorktreeTargets(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2163
+ listAllWorktrees(args?: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2164
+ pipelineSnapshot(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2165
+ recordScopeLearning(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2166
+ discover(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2167
+ analyzeTopicDensity(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2168
+ applyAutoBranching(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2169
+ seedBeliefLattice(args?: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2170
+ getLatticeCoverage(args?: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2171
+ matchEntityType(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2172
+ discoverEntityConnections(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2173
+ triggerBeliefReview(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2174
+ listOntologies(args?: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2175
+ getOntology(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2176
+ applyOntology(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2177
+ createOntology(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2178
+ updateOntology(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2179
+ archiveOntology(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2180
+ createOntologyVersion(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2181
+ publishOntologyVersion(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2182
+ deprecateOntologyVersion(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2183
+ resolveEffectiveOntology(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2184
+ registerSession(args?: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2185
+ heartbeatSession(args?: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2186
+ endSession(args?: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2187
+ listActiveSessions(args?: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2188
+ sendAgentMessage(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2189
+ broadcastMessage(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2190
+ getAgentInbox(args?: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2191
+ claimFiles(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2192
+ listTasks(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2193
+ createAnswer(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2194
+ getAnswer(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2195
+ flagContradiction(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2196
+ ingestObservation(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2197
+ getObservationContext(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2198
+ getCodeContext(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2199
+ getChangeHistory(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2200
+ recordAttempt(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2201
+ getFailureLog(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2202
+ createEpistemicContract(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2203
+ evaluateContract(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2204
+ getContractStatus(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2205
+ checkPermission(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2206
+ filterByPermission(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2207
+ manageWritePolicy(args: JsonObject, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2208
+ generateSessionHandoff(args: JsonObject): Promise<PlatformGatewaySuccess<unknown>>;
2209
+ };
2210
+ packs: {
2211
+ listCatalog(): Promise<PlatformGatewaySuccess<ListResult<any, "catalog">>>;
2212
+ getCatalog(): Promise<PlatformGatewaySuccess<ListResult<any, "catalog">>>;
2213
+ getDiscoveryCatalog(): Promise<PlatformGatewaySuccess<unknown>>;
2214
+ getDiscoveryDetail(packKey: string): Promise<PlatformGatewaySuccess<unknown>>;
2215
+ listStates(query?: GatewayScope): Promise<PlatformGatewaySuccess<ListResult<any, "states">>>;
2216
+ getStates(query?: GatewayScope): Promise<PlatformGatewaySuccess<ListResult<any, "states">>>;
2217
+ getHealth(packKey: string, query?: GatewayScope): Promise<PlatformGatewaySuccess<unknown>>;
2218
+ listTelemetry(query?: GatewayScope & {
2219
+ lookbackHours?: number;
2220
+ limit?: number;
2221
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "telemetry">>>;
2222
+ getTelemetry(query?: GatewayScope & {
2223
+ lookbackHours?: number;
2224
+ limit?: number;
2225
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "telemetry">>>;
2226
+ createEntitlement(input: PackEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2227
+ updateEntitlement(input: PackEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2228
+ upsertEntitlement(input: PackEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2229
+ install(input: PackInstallInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2230
+ enable(input: PackEnableInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2231
+ disable(input: PackDisableInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2232
+ uninstall(input: PackUninstallInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2233
+ upgrade(input: PackUpgradeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2234
+ };
2235
+ reports: {
2236
+ listTemplates(args?: {
2237
+ slug?: string;
2238
+ }): Promise<PlatformGatewaySuccess<ReportTemplatesResponse>>;
2239
+ getTemplates(args?: {
2240
+ slug?: string;
2241
+ }): Promise<PlatformGatewaySuccess<ReportTemplatesResponse>>;
2242
+ listReports(input: TopicIdentifierInput, args?: {
2243
+ summary?: boolean;
2244
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "reports">>>;
2245
+ getReport(reportId: string): Promise<PlatformGatewaySuccess<ReportWithSectionsResponse>>;
2246
+ };
2247
+ learning: {
2248
+ listRecentExecutions(args?: {
2249
+ namespace?: string;
2250
+ topicId?: string;
2251
+ audienceMode?: string;
2252
+ success?: boolean;
2253
+ limit?: number;
2254
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<any, "executions">>>;
2255
+ getRecentExecutions(args?: {
2256
+ namespace?: string;
2257
+ topicId?: string;
2258
+ audienceMode?: string;
2259
+ success?: boolean;
2260
+ limit?: number;
2261
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<any, "executions">>>;
2262
+ getExecutionStats(args?: {
2263
+ namespace?: string;
2264
+ topicId?: string;
2265
+ audienceMode?: string;
2266
+ hours?: number;
2267
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<unknown>>;
2268
+ };
2269
+ harness: {
2270
+ listAgentDefinitions(scope?: GatewayScope & {
2271
+ status?: string;
2272
+ limit?: number;
2273
+ cursor?: string;
2274
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "agents">>>;
2275
+ getAgentDefinition(agentId: string, scope?: GatewayScope): Promise<PlatformGatewaySuccess<unknown>>;
2276
+ createAgentDefinition(input: HarnessAgentWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2277
+ registerAgentDefinition(input: HarnessAgentWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2278
+ updateAgentDefinition(agentId: string, input: HarnessAgentWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2279
+ invokeManagedAgentDefinition(agentId: string, input: Omit<HarnessInvokeManagedAgentInput, "agentDefinitionId">, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2280
+ listAgentRuns(agentId: string, scope?: GatewayScope & {
2281
+ status?: string;
2282
+ limit?: number;
2283
+ cursor?: string;
2284
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "runs">>>;
2285
+ listRunsForAgent(agentId: string, scope?: GatewayScope & {
2286
+ status?: string;
2287
+ limit?: number;
2288
+ cursor?: string;
2289
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "runs">>>;
2290
+ listToolDefinitions(scope?: GatewayScope & {
2291
+ status?: string;
2292
+ limit?: number;
2293
+ cursor?: string;
2294
+ gateClassification?: string;
2295
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "tools">>>;
2296
+ getToolDefinition(toolId: string, scope?: GatewayScope): Promise<PlatformGatewaySuccess<unknown>>;
2297
+ createToolDefinition(input: HarnessToolWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2298
+ registerToolDefinition(input: HarnessToolWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2299
+ updateToolDefinition(toolId: string, input: HarnessToolWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2300
+ executeToolDefinition(toolId: string, input?: HarnessExecuteToolInput): Promise<PlatformGatewaySuccess<HarnessExecuteToolResult>>;
2301
+ listRunEntries(scope?: GatewayScope & {
2302
+ status?: string;
2303
+ limit?: number;
2304
+ cursor?: string;
2305
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "runs">>>;
2306
+ listRunLedgerEntries(scope?: GatewayScope & {
2307
+ status?: string;
2308
+ limit?: number;
2309
+ cursor?: string;
2310
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "runs">>>;
2311
+ startHarnessRun(input: HarnessStartRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2312
+ getRunLedgerEntry(runId: string): Promise<PlatformGatewaySuccess<unknown>>;
2313
+ reportHarnessRunEvent(runId: string, input: HarnessRunReportInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2314
+ heartbeatHarnessRun(runId: string, input: {
2315
+ reportingToken: string;
2316
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2317
+ completeHarnessRun(runId: string, input: HarnessCompleteRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2318
+ listPromptResolutions(query?: {
2319
+ runId?: string;
2320
+ promptName?: string;
2321
+ limit?: number;
2322
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "prompts">>>;
2323
+ getScopeTaxonomy(): Promise<PlatformGatewaySuccess<unknown>>;
2324
+ };
2325
+ schema: {
2326
+ listPacks(scope?: GatewayScope): Promise<PlatformGatewaySuccess<ListResult<any, "packs">>>;
2327
+ installPack(input: SchemaPackInstallInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2328
+ getPack(packId: string, scope?: GatewayScope): Promise<PlatformGatewaySuccess<unknown>>;
2329
+ listEntitlements(scope?: GatewayScope & {
2330
+ packKey?: string;
2331
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "entitlements">>>;
2332
+ createEntitlement(input: SchemaEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2333
+ updateEntitlement(input: SchemaEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2334
+ upsertEntitlement(input: SchemaEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2335
+ };
2336
+ audiences: {
2337
+ listRegistry(query?: GatewayScope & {
2338
+ effective?: boolean;
2339
+ status?: "active" | "disabled" | "archived";
2340
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "registryEntries">>>;
2341
+ getRegistry(query?: GatewayScope & {
2342
+ effective?: boolean;
2343
+ status?: "active" | "disabled" | "archived";
2344
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "registryEntries">>>;
2345
+ createRegistryEntry(input: AudienceRegistryInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2346
+ updateRegistryEntry(input: AudienceRegistryInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2347
+ upsertRegistry(input: AudienceRegistryInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2348
+ listGrants(query?: GatewayScope & {
2349
+ audienceKey?: string;
2350
+ principalId?: string;
2351
+ groupId?: string;
2352
+ status?: "active" | "revoked" | "expired";
2353
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "grants">>>;
2354
+ getGrants(query?: GatewayScope & {
2355
+ audienceKey?: string;
2356
+ principalId?: string;
2357
+ groupId?: string;
2358
+ status?: "active" | "revoked" | "expired";
2359
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "grants">>>;
2360
+ createGrant(input: AudienceGrantInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2361
+ grant(input: AudienceGrantInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2362
+ deleteGrant(input: AudienceGrantRevokeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2363
+ revokeGrant(input: AudienceGrantRevokeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2364
+ };
2365
+ topics: {
2366
+ list(query?: TopicListInput): Promise<PlatformGatewaySuccess<TopicListResponse>>;
2367
+ get(topicId: string): Promise<PlatformGatewaySuccess<TopicRecord>>;
2368
+ create(input: TopicCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TopicRecord>>;
2369
+ update(topicId: string, input: TopicUpdateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TopicRecord>>;
2370
+ getTree(topicId: string, query?: TopicTreeQuery): Promise<PlatformGatewaySuccess<TopicTreeResponse>>;
2371
+ getCoverage(topicId: string, query?: TopicCoverageQuery): Promise<PlatformGatewaySuccess<TopicCoverageResponse>>;
2372
+ remove(topicId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2373
+ bulkCreate(input: TopicBulkCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2374
+ };
2375
+ };
2376
+ };
2377
+
2378
+ export { type LucernClientConfig, createLucernClient };