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

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