@lucern/sdk 1.0.10 → 1.0.12

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 (331) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +35 -0
  3. package/dist/.generated +2 -0
  4. package/dist/accessControl.d.ts +19 -26
  5. package/dist/accessControl.js +195 -1423
  6. package/dist/adminClient.d.ts +52 -59
  7. package/dist/adminClient.js +364 -1142
  8. package/dist/answersClient.d.ts +5 -14
  9. package/dist/answersClient.js +19 -737
  10. package/dist/audience/index.d.ts +18 -18
  11. package/dist/audience/index.js +87 -90
  12. package/dist/audiencesClient.d.ts +19 -27
  13. package/dist/audiencesClient.js +107 -868
  14. package/dist/auditClient.d.ts +8 -15
  15. package/dist/auditClient.js +18 -791
  16. package/dist/authContext.d.ts +11 -16
  17. package/dist/authContext.js +122 -154
  18. package/dist/authDeviceClient.d.ts +8 -17
  19. package/dist/authDeviceClient.js +113 -102
  20. package/dist/beliefs/index.d.ts +15 -67
  21. package/dist/beliefs/index.js +17 -10172
  22. package/dist/beliefs/lifecycle.d.ts +10 -11
  23. package/dist/beliefs/lifecycle.js +78 -80
  24. package/dist/beliefsClient.d.ts +26 -32
  25. package/dist/beliefsClient.js +250 -990
  26. package/dist/boundaryClientSurface.d.ts +11 -16
  27. package/dist/boundaryClientSurface.js +49 -68
  28. package/dist/client.d.ts +73 -112
  29. package/dist/client.js +232 -10146
  30. package/dist/clientAssemblyTypes.d.ts +3 -3
  31. package/dist/clientAssemblyTypes.js +1 -2
  32. package/dist/clientConfig.d.ts +45 -59
  33. package/dist/clientConfig.js +1 -2
  34. package/dist/clientEvidenceCompat.d.ts +7 -14
  35. package/dist/clientEvidenceCompat.js +50 -64
  36. package/dist/clientGraphNamespaces.d.ts +3 -5
  37. package/dist/clientGraphNamespaces.js +170 -245
  38. package/dist/clientHelpers.d.ts +20 -25
  39. package/dist/clientHelpers.js +104 -127
  40. package/dist/clientKnowledgeNamespaces.d.ts +6 -53
  41. package/dist/clientKnowledgeNamespaces.js +502 -506
  42. package/dist/clientLocalHelpers.d.ts +11 -56
  43. package/dist/clientLocalHelpers.js +503 -732
  44. package/dist/clientPlatformNamespaces.d.ts +14 -53
  45. package/dist/clientPlatformNamespaces.js +229 -314
  46. package/dist/clientRuntime.d.ts +5 -53
  47. package/dist/clientRuntime.js +26 -30
  48. package/dist/clientWorkflowNamespaces.d.ts +6 -15
  49. package/dist/clientWorkflowNamespaces.js +529 -596
  50. package/dist/contextClient.d.ts +9 -17
  51. package/dist/contextClient.js +92 -805
  52. package/dist/contextFacade.d.ts +11 -2
  53. package/dist/contextFacade.js +10 -81
  54. package/dist/contextPackCompiler.d.ts +10 -11
  55. package/dist/contextPackCompiler.js +494 -1040
  56. package/dist/contextPackPolicy.d.ts +14 -15
  57. package/dist/contextPackPolicy.js +227 -305
  58. package/dist/contextPackSchema.d.ts +3 -3
  59. package/dist/contextPackSchema.js +169 -176
  60. package/dist/contextTypes.d.ts +14 -15
  61. package/dist/contextTypes.js +1 -2
  62. package/dist/contracts/api-enums.contract.d.ts +29 -30
  63. package/dist/contracts/api-enums.contract.js +162 -88
  64. package/dist/contracts/auth-session.contract.d.ts +13 -14
  65. package/dist/contracts/auth-session.contract.js +55 -52
  66. package/dist/contracts/context-pack.contract.d.ts +54 -55
  67. package/dist/contracts/context-pack.contract.js +160 -88
  68. package/dist/contracts/contextPack.d.ts +2 -1
  69. package/dist/contracts/contextPack.js +1 -97
  70. package/dist/contracts/index.d.ts +11 -12
  71. package/dist/contracts/index.js +10 -854
  72. package/dist/contracts/lens-filter.contract.d.ts +9 -10
  73. package/dist/contracts/lens-filter.contract.js +82 -58
  74. package/dist/contracts/lens-workflow.contract.d.ts +21 -23
  75. package/dist/contracts/lens-workflow.contract.js +48 -117
  76. package/dist/contracts/lensFilter.d.ts +2 -1
  77. package/dist/contracts/lensFilter.js +1 -71
  78. package/dist/contracts/lensWorkflow.d.ts +2 -2
  79. package/dist/contracts/lensWorkflow.js +1 -123
  80. package/dist/contracts/mcpTools.d.ts +16 -18
  81. package/dist/contracts/mcpTools.js +89 -123
  82. package/dist/contracts/prompt.contract.d.ts +4 -5
  83. package/dist/contracts/prompt.contract.js +23 -10
  84. package/dist/contracts/prompt.d.ts +2 -1
  85. package/dist/contracts/prompt.js +1 -11
  86. package/dist/contracts/sdk-tools.contract.d.ts +2 -1
  87. package/dist/contracts/sdk-tools.contract.js +1 -2
  88. package/dist/contracts/sdkTools.d.ts +2 -1
  89. package/dist/contracts/sdkTools.js +1 -26
  90. package/dist/contracts/tool-contracts.d.ts +2 -1
  91. package/dist/contracts/tool-contracts.js +1 -2
  92. package/dist/contracts/workflow-runtime.contract.d.ts +45 -46
  93. package/dist/contracts/workflow-runtime.contract.js +241 -228
  94. package/dist/contracts/workflowRuntime.d.ts +2 -1
  95. package/dist/contracts/workflowRuntime.js +1 -244
  96. package/dist/contradictions/index.d.ts +8 -60
  97. package/dist/contradictions/index.js +11 -10166
  98. package/dist/control-plane.d.ts +17 -24
  99. package/dist/control-plane.js +124 -840
  100. package/dist/controlObjectOwnership.d.ts +19 -20
  101. package/dist/controlObjectOwnership.js +207 -201
  102. package/dist/coreClient.d.ts +23 -28
  103. package/dist/coreClient.js +567 -692
  104. package/dist/customTools.d.ts +17 -21
  105. package/dist/customTools.js +221 -221
  106. package/dist/decisions/index.d.ts +7 -58
  107. package/dist/decisions/index.js +14 -10168
  108. package/dist/decisionsClient.d.ts +25 -32
  109. package/dist/decisionsClient.js +113 -913
  110. package/dist/domainContext.d.ts +2 -1
  111. package/dist/domainContext.js +1 -2
  112. package/dist/edges/index.d.ts +21 -73
  113. package/dist/edges/index.js +12 -10167
  114. package/dist/embeddingsClient.d.ts +22 -30
  115. package/dist/embeddingsClient.js +73 -922
  116. package/dist/eventingClient.d.ts +23 -31
  117. package/dist/eventingClient.js +89 -918
  118. package/dist/events.d.ts +48 -49
  119. package/dist/events.js +257 -241
  120. package/dist/eventsCore.d.ts +20 -29
  121. package/dist/eventsCore.js +86 -830
  122. package/dist/evidence/index.d.ts +9 -60
  123. package/dist/evidence/index.js +13 -10167
  124. package/dist/evidenceClient.d.ts +13 -22
  125. package/dist/evidenceClient.js +34 -751
  126. package/dist/facade/context.d.ts +7 -8
  127. package/dist/facade/context.js +73 -72
  128. package/dist/functionSurface.d.ts +2 -156
  129. package/dist/functionSurface.js +1 -1460
  130. package/dist/functionSurfaceClient.d.ts +2 -9
  131. package/dist/functionSurfaceClient.js +1 -1460
  132. package/dist/gatewayFacades.d.ts +79 -296
  133. package/dist/gatewayFacades.factories.d.ts +209 -14
  134. package/dist/gatewayFacades.factories.js +561 -2227
  135. package/dist/gatewayFacades.js +284 -2627
  136. package/dist/generated/functionSurface.d.ts +149 -0
  137. package/dist/generated/functionSurface.js +749 -0
  138. package/dist/graphAnalysisClient.d.ts +41 -49
  139. package/dist/graphAnalysisClient.js +185 -974
  140. package/dist/graphClient.d.ts +53 -60
  141. package/dist/graphClient.js +219 -1090
  142. package/dist/graphIntel.d.ts +2 -4
  143. package/dist/graphIntel.js +1 -2
  144. package/dist/graphIntelligence.d.ts +4 -2
  145. package/dist/graphIntelligence.js +2 -46
  146. package/dist/graphRecommendationsClient.d.ts +15 -23
  147. package/dist/graphRecommendationsClient.js +70 -849
  148. package/dist/graphStateClassifierClient.d.ts +17 -25
  149. package/dist/graphStateClassifierClient.js +67 -908
  150. package/dist/harnessClient.d.ts +40 -47
  151. package/dist/harnessClient.js +198 -993
  152. package/dist/identityClient.d.ts +25 -33
  153. package/dist/identityClient.js +245 -1186
  154. package/dist/index.d.ts +73 -69
  155. package/dist/index.js +72 -13304
  156. package/dist/infisicalRuntime.d.ts +12 -14
  157. package/dist/infisicalRuntime.js +290 -297
  158. package/dist/jobsClient.d.ts +24 -32
  159. package/dist/jobsClient.js +101 -916
  160. package/dist/learningClient.d.ts +8 -16
  161. package/dist/learningClient.js +45 -809
  162. package/dist/lenses/index.d.ts +13 -65
  163. package/dist/lenses/index.js +11 -10166
  164. package/dist/mcpClient.d.ts +14 -23
  165. package/dist/mcpClient.js +115 -856
  166. package/dist/modelRuntimeClient.d.ts +18 -26
  167. package/dist/modelRuntimeClient.js +74 -894
  168. package/dist/nodes/index.d.ts +7 -58
  169. package/dist/nodes/index.js +14 -10168
  170. package/dist/ontologies/index.d.ts +21 -73
  171. package/dist/ontologies/index.js +14 -10169
  172. package/dist/ontologyClient.d.ts +23 -31
  173. package/dist/ontologyClient.js +138 -924
  174. package/dist/ontologyLinksClient.d.ts +16 -24
  175. package/dist/ontologyLinksClient.js +76 -886
  176. package/dist/opinion.d.ts +5 -6
  177. package/dist/opinion.js +21 -25
  178. package/dist/orgGraphSearchClient.d.ts +19 -27
  179. package/dist/orgGraphSearchClient.js +89 -857
  180. package/dist/packRuntime.d.ts +2 -2
  181. package/dist/packRuntime.js +1 -2
  182. package/dist/packsClient.d.ts +30 -37
  183. package/dist/packsClient.js +131 -906
  184. package/dist/policyClient.d.ts +21 -29
  185. package/dist/policyClient.js +267 -1026
  186. package/dist/proof-attestation.json +1 -1
  187. package/dist/questions/index.d.ts +9 -60
  188. package/dist/questions/index.js +15 -10169
  189. package/dist/realtime/index.d.ts +20 -16
  190. package/dist/realtime/index.js +30 -19
  191. package/dist/realtime/refs.d.ts +4 -6
  192. package/dist/realtime/refs.js +12 -7
  193. package/dist/realtime-refs.d.ts +1 -0
  194. package/dist/realtime-refs.js +1 -0
  195. package/dist/realtime.d.ts +1 -0
  196. package/dist/realtime.js +1 -0
  197. package/dist/reportsClient.d.ts +10 -19
  198. package/dist/reportsClient.js +48 -836
  199. package/dist/schemaClient.d.ts +16 -23
  200. package/dist/schemaClient.js +62 -832
  201. package/dist/sdkSurface.d.ts +18 -25
  202. package/dist/sdkSurface.js +135 -106
  203. package/dist/secrets.d.ts +2 -1
  204. package/dist/secrets.js +1 -2
  205. package/dist/sourcesClient.d.ts +11 -18
  206. package/dist/sourcesClient.js +18 -741
  207. package/dist/telemetryClient.d.ts +22 -30
  208. package/dist/telemetryClient.js +107 -931
  209. package/dist/toolRegistryClient.d.ts +27 -35
  210. package/dist/toolRegistryClient.js +116 -954
  211. package/dist/topics/index.d.ts +13 -64
  212. package/dist/topics/index.js +15 -10169
  213. package/dist/topicsClient.d.ts +19 -27
  214. package/dist/topicsClient.js +106 -894
  215. package/dist/types.d.ts +84 -87
  216. package/dist/types.js +1 -2
  217. package/dist/version.d.ts +2 -3
  218. package/dist/version.js +2 -5
  219. package/dist/workflowClient.d.ts +60 -65
  220. package/dist/workflowClient.js +343 -1219
  221. package/dist/worktrees/index.d.ts +16 -68
  222. package/dist/worktrees/index.js +14 -10169
  223. package/package.json +6 -6
  224. package/dist/accessControl.js.map +0 -1
  225. package/dist/adminClient.js.map +0 -1
  226. package/dist/answersClient.js.map +0 -1
  227. package/dist/audience/index.js.map +0 -1
  228. package/dist/audiencesClient.js.map +0 -1
  229. package/dist/auditClient.js.map +0 -1
  230. package/dist/authContext.js.map +0 -1
  231. package/dist/authDeviceClient.js.map +0 -1
  232. package/dist/beliefs/index.js.map +0 -1
  233. package/dist/beliefs/lifecycle.js.map +0 -1
  234. package/dist/beliefsClient.js.map +0 -1
  235. package/dist/boundaryClientSurface.js.map +0 -1
  236. package/dist/client.js.map +0 -1
  237. package/dist/clientAssemblyTypes.js.map +0 -1
  238. package/dist/clientConfig.js.map +0 -1
  239. package/dist/clientEvidenceCompat.js.map +0 -1
  240. package/dist/clientGraphNamespaces.js.map +0 -1
  241. package/dist/clientHelpers.js.map +0 -1
  242. package/dist/clientKnowledgeNamespaces.js.map +0 -1
  243. package/dist/clientLocalHelpers.js.map +0 -1
  244. package/dist/clientPlatformNamespaces.js.map +0 -1
  245. package/dist/clientRuntime.js.map +0 -1
  246. package/dist/clientWorkflowNamespaces.js.map +0 -1
  247. package/dist/contextClient.js.map +0 -1
  248. package/dist/contextFacade.js.map +0 -1
  249. package/dist/contextPackCompiler.js.map +0 -1
  250. package/dist/contextPackPolicy.js.map +0 -1
  251. package/dist/contextPackSchema.js.map +0 -1
  252. package/dist/contextTypes.js.map +0 -1
  253. package/dist/contracts/api-enums.contract.js.map +0 -1
  254. package/dist/contracts/auth-session.contract.js.map +0 -1
  255. package/dist/contracts/context-pack.contract.js.map +0 -1
  256. package/dist/contracts/contextPack.js.map +0 -1
  257. package/dist/contracts/index.js.map +0 -1
  258. package/dist/contracts/lens-filter.contract.js.map +0 -1
  259. package/dist/contracts/lens-workflow.contract.js.map +0 -1
  260. package/dist/contracts/lensFilter.js.map +0 -1
  261. package/dist/contracts/lensWorkflow.js.map +0 -1
  262. package/dist/contracts/mcpTools.js.map +0 -1
  263. package/dist/contracts/prompt.contract.js.map +0 -1
  264. package/dist/contracts/prompt.js.map +0 -1
  265. package/dist/contracts/sdk-tools.contract.js.map +0 -1
  266. package/dist/contracts/sdkTools.js.map +0 -1
  267. package/dist/contracts/tool-contracts.js.map +0 -1
  268. package/dist/contracts/workflow-runtime.contract.js.map +0 -1
  269. package/dist/contracts/workflowRuntime.js.map +0 -1
  270. package/dist/contradictions/index.js.map +0 -1
  271. package/dist/control-plane.js.map +0 -1
  272. package/dist/controlObjectOwnership.js.map +0 -1
  273. package/dist/coreClient.js.map +0 -1
  274. package/dist/customTools.js.map +0 -1
  275. package/dist/decisions/index.js.map +0 -1
  276. package/dist/decisionsClient.js.map +0 -1
  277. package/dist/domainContext.js.map +0 -1
  278. package/dist/edges/index.js.map +0 -1
  279. package/dist/embeddingsClient.js.map +0 -1
  280. package/dist/eventingClient.js.map +0 -1
  281. package/dist/events.js.map +0 -1
  282. package/dist/eventsCore.js.map +0 -1
  283. package/dist/evidence/index.js.map +0 -1
  284. package/dist/evidenceClient.js.map +0 -1
  285. package/dist/facade/context.js.map +0 -1
  286. package/dist/functionSurface.js.map +0 -1
  287. package/dist/functionSurfaceClient.js.map +0 -1
  288. package/dist/gatewayFacades.factories.js.map +0 -1
  289. package/dist/gatewayFacades.js.map +0 -1
  290. package/dist/graphAnalysisClient.js.map +0 -1
  291. package/dist/graphClient.js.map +0 -1
  292. package/dist/graphIntel.js.map +0 -1
  293. package/dist/graphIntelligence.js.map +0 -1
  294. package/dist/graphRecommendationsClient.js.map +0 -1
  295. package/dist/graphStateClassifierClient.js.map +0 -1
  296. package/dist/harnessClient.js.map +0 -1
  297. package/dist/identityClient.js.map +0 -1
  298. package/dist/index.js.map +0 -1
  299. package/dist/infisicalRuntime.js.map +0 -1
  300. package/dist/jobsClient.js.map +0 -1
  301. package/dist/learningClient.js.map +0 -1
  302. package/dist/lenses/index.js.map +0 -1
  303. package/dist/mcpClient.js.map +0 -1
  304. package/dist/modelRuntimeClient.js.map +0 -1
  305. package/dist/nodes/index.js.map +0 -1
  306. package/dist/ontologies/index.js.map +0 -1
  307. package/dist/ontologyClient.js.map +0 -1
  308. package/dist/ontologyLinksClient.js.map +0 -1
  309. package/dist/opinion.js.map +0 -1
  310. package/dist/orgGraphSearchClient.js.map +0 -1
  311. package/dist/packRuntime.js.map +0 -1
  312. package/dist/packsClient.js.map +0 -1
  313. package/dist/policyClient.js.map +0 -1
  314. package/dist/questions/index.js.map +0 -1
  315. package/dist/realtime/index.js.map +0 -1
  316. package/dist/realtime/refs.js.map +0 -1
  317. package/dist/reportsClient.js.map +0 -1
  318. package/dist/schemaClient.js.map +0 -1
  319. package/dist/sdk-tools.contract-B4c1Zr1o.d.ts +0 -22
  320. package/dist/sdkSurface.js.map +0 -1
  321. package/dist/secrets.js.map +0 -1
  322. package/dist/sourcesClient.js.map +0 -1
  323. package/dist/telemetryClient.js.map +0 -1
  324. package/dist/tool-contracts-BUiL9P6z.d.ts +0 -22
  325. package/dist/toolRegistryClient.js.map +0 -1
  326. package/dist/topics/index.js.map +0 -1
  327. package/dist/topicsClient.js.map +0 -1
  328. package/dist/types.js.map +0 -1
  329. package/dist/version.js.map +0 -1
  330. package/dist/workflowClient.js.map +0 -1
  331. package/dist/worktrees/index.js.map +0 -1
@@ -1,598 +1,531 @@
1
- // src/clientWorkflowNamespaces.ts
2
- function createClientWorkflowNamespaces(ctx) {
3
- const {
4
- accessControlClient,
5
- addEvidence,
6
- adminClient,
7
- answersClient,
8
- archiveOntologyCompat,
9
- auditClient,
10
- authDeviceClient,
11
- beliefsClient,
12
- beliefsFacade,
13
- bisectConfidence,
14
- buildBeliefsArchivePayload,
15
- buildBeliefsRefinePayload,
16
- clearRegisteredCustomTools,
17
- config,
18
- contextClient,
19
- contradictionsFacade,
20
- controlPlaneClient,
21
- createContractCompat,
22
- createEvidence,
23
- createOntologyCompat,
24
- createOntologyVersionCompat,
25
- decisionsClient,
26
- deprecateOntologyVersionCompat,
27
- discoverEntityConnections,
28
- discoverTopics,
29
- edgesFacade,
30
- embeddingsClient,
31
- ensurePack,
32
- evaluateContractCompat,
33
- eventingClient,
34
- eventsFacade,
35
- evidenceClient,
36
- evidenceFacade,
37
- exposeGatewayData,
38
- extensionNamespaces,
39
- findContradictions,
40
- functionSurfaceClient,
41
- gateway,
42
- getAuditTrail,
43
- getConfidenceHistory,
44
- getContractStatusCompat,
45
- getCustomNamespace,
46
- getOpinionHistory,
47
- getPackInstalled,
48
- graphAnalysisClient,
49
- graphClient,
50
- graphFacade,
51
- graphRecommendationsClient,
52
- graphStateClassifierClient,
53
- harnessClient,
54
- identityClient,
55
- identityFacade,
56
- invokeCustomTool,
57
- jobsClient,
58
- learningClient,
59
- listBeliefs,
60
- listContractsCompat,
61
- listRegisteredCustomTools,
62
- mcpClient,
63
- modelRuntimeClient,
64
- nodesNamespace,
65
- ontologiesFacade,
66
- ontologyClient,
67
- ontologyLinksClient,
68
- ontologyLinksNamespace,
69
- orgGraphSearchClient,
70
- packsClient,
71
- policyClient,
72
- publicationNamespace,
73
- publishOntologyVersionCompat,
74
- questionsFacade,
75
- queryLineage,
76
- randomIdempotencyKey,
77
- registerCustomTool,
78
- reportsClient,
79
- requireBaseRate,
80
- requireText,
81
- requireTopicId,
82
- requireTopicOrProjectId,
83
- resolveCustomToolFullName,
84
- resolveEffectiveOntologyCompat,
85
- resolveTopicId,
86
- schemaClient,
87
- sdkQueryString,
88
- searchBeliefs,
89
- sourcesClient,
90
- tasksFacade,
91
- telemetryClient,
92
- toolRegistryClient,
93
- topicsClient,
94
- topicsFacade,
95
- traceEntityImpactCompat,
96
- triggerBeliefReview,
97
- unregisterCustomTool,
98
- updateOntologyCompat,
99
- webhooksFacade,
100
- workflowClient,
101
- worktreesFacade
102
- } = ctx;
103
- return {
104
- judgments: {
105
- create: decisionsClient.createJudgment,
106
- record: decisionsClient.recordJudgment,
107
- list: decisionsClient.listJudgments,
108
- get: decisionsClient.getJudgment,
109
- recordOutcome: decisionsClient.recordJudgmentOutcome,
110
- updateOutcome: decisionsClient.updateJudgmentOutcome,
111
- readiness(topicId) {
112
- return decisionsClient.getJudgmentReadiness({ topicId });
113
- },
114
- calibration(topicId) {
115
- return decisionsClient.getJudgmentCalibration({ topicId });
116
- },
117
- pendingOutcomeReview(topicId) {
118
- return decisionsClient.listPendingJudgmentOutcomeReview({ topicId });
119
- },
120
- transitionAuditIntegrity(args) {
121
- return decisionsClient.getJudgmentTransitionAuditIntegrity({
122
- ...args,
123
- topicId: requireTopicId(args)
124
- });
125
- }
126
- },
127
- decisions: {
128
- create: decisionsClient.createJudgment,
129
- record: decisionsClient.recordJudgment,
130
- list: decisionsClient.listJudgments,
131
- get: decisionsClient.getJudgment,
132
- recordOutcome: decisionsClient.recordJudgmentOutcome,
133
- lessons(decisionId, input, idempotencyKey) {
134
- return gateway.request({
135
- path: `/api/platform/v1/decisions/${encodeURIComponent(
136
- decisionId
137
- )}/lessons`,
138
- method: "POST",
139
- body: input,
140
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
141
- }).then(exposeGatewayData);
142
- },
143
- archive(decisionId, input = {}, idempotencyKey) {
144
- return gateway.request({
145
- path: `/api/platform/v1/decisions/${encodeURIComponent(
146
- decisionId
147
- )}/archive`,
148
- method: "POST",
149
- body: input,
150
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
151
- }).then(exposeGatewayData);
152
- },
153
- readiness(topicId) {
154
- return decisionsClient.getJudgmentReadiness({ topicId });
155
- },
156
- calibration(topicId) {
157
- return decisionsClient.getJudgmentCalibration({ topicId });
158
- },
159
- pendingOutcomeReview(topicId) {
160
- return decisionsClient.listPendingJudgmentOutcomeReview({ topicId });
161
- }
162
- },
163
- worktrees: {
164
- createBranch: workflowClient.createBranch,
165
- createLens: workflowClient.createLens,
166
- listLenses: workflowClient.listLenses,
167
- applyLensToTopic: workflowClient.applyLensToTopic,
168
- removeLensFromTopic: workflowClient.removeLensFromTopic,
169
- create(input) {
170
- return worktreesFacade.create({
171
- title: input.title,
172
- topicId: requireTopicId(input),
173
- objective: input.objective,
174
- hypothesis: input.hypothesis,
175
- rationale: input.rationale,
176
- worktreeType: input.worktreeType,
177
- startDate: input.startDate,
178
- endDate: input.endDate,
179
- durationWeeks: input.durationWeeks,
180
- confidenceImpact: input.confidenceImpact,
181
- beliefFocus: input.beliefFocus,
182
- beliefIds: input.beliefIds,
183
- targetBeliefIds: input.targetBeliefIds,
184
- targetQuestionIds: input.targetQuestionIds,
185
- keyQuestions: input.keyQuestions,
186
- evidenceSignals: input.evidenceSignals,
187
- decisionGate: input.decisionGate,
188
- goCriteria: input.goCriteria,
189
- noGoSignals: input.noGoSignals,
190
- autoShape: input.autoShape,
191
- domainPackId: input.domainPackId,
192
- campaign: input.campaign,
193
- lane: input.lane,
194
- laneOrderInCampaign: input.laneOrderInCampaign,
195
- orderInLane: input.orderInLane,
196
- dependsOn: input.dependsOn,
197
- blocks: input.blocks,
198
- gate: input.gate,
199
- proofArtifacts: input.proofArtifacts,
200
- staffingHint: typeof input.staffingHint === "string" ? input.staffingHint : void 0,
201
- lastReconciledAt: input.lastReconciledAt,
202
- autoFixPolicy: input.autoFixPolicy,
203
- lensId: input.lensId
204
- });
205
- },
206
- add(input) {
207
- return worktreesFacade.create({
208
- title: input.title,
209
- topicId: requireTopicId(input),
210
- objective: input.objective,
211
- hypothesis: input.hypothesis,
212
- rationale: input.rationale,
213
- worktreeType: input.worktreeType,
214
- startDate: input.startDate,
215
- endDate: input.endDate,
216
- durationWeeks: input.durationWeeks,
217
- confidenceImpact: input.confidenceImpact,
218
- beliefFocus: input.beliefFocus,
219
- beliefIds: input.beliefIds,
220
- targetBeliefIds: input.targetBeliefIds,
221
- targetQuestionIds: input.targetQuestionIds,
222
- keyQuestions: input.keyQuestions,
223
- evidenceSignals: input.evidenceSignals,
224
- decisionGate: input.decisionGate,
225
- goCriteria: input.goCriteria,
226
- noGoSignals: input.noGoSignals,
227
- autoShape: input.autoShape,
228
- domainPackId: input.domainPackId,
229
- campaign: input.campaign,
230
- lane: input.lane,
231
- laneOrderInCampaign: input.laneOrderInCampaign,
232
- orderInLane: input.orderInLane,
233
- dependsOn: input.dependsOn,
234
- blocks: input.blocks,
235
- gate: input.gate,
236
- proofArtifacts: input.proofArtifacts,
237
- staffingHint: typeof input.staffingHint === "string" ? input.staffingHint : void 0,
238
- lastReconciledAt: input.lastReconciledAt,
239
- autoFixPolicy: input.autoFixPolicy,
240
- lensId: input.lensId
241
- });
242
- },
243
- list(query) {
244
- return worktreesFacade.list({
245
- topicId: requireTopicId(query),
246
- status: query.status,
247
- limit: query.limit
248
- });
249
- },
250
- listByTopic(query) {
251
- return worktreesFacade.list({
252
- topicId: requireTopicId(query),
253
- status: query.status,
254
- limit: query.limit
255
- });
256
- },
257
- findByPairedSprint(input) {
258
- return gateway.request({
259
- path: `/api/platform/v1/worktrees/paired-sprint${sdkQueryString({
260
- sprintId: input.sprintId,
261
- topicId: input.topicId ?? input.projectId,
262
- limit: input.limit
263
- })}`
264
- }).then(exposeGatewayData);
265
- },
266
- activate(worktreeId) {
267
- return worktreesFacade.activate({ id: worktreeId });
268
- },
269
- updateMetadata(input) {
270
- const dependsOn = Array.isArray(input.dependsOn) ? input.dependsOn.filter(
271
- (value) => typeof value === "string"
272
- ) : void 0;
273
- const blocks = Array.isArray(input.blocks) ? input.blocks.filter(
274
- (value) => typeof value === "string"
275
- ) : void 0;
276
- return worktreesFacade.update({
277
- id: typeof input.worktreeId === "string" ? input.worktreeId : "",
278
- hypothesis: typeof input.hypothesis === "string" ? input.hypothesis : void 0,
279
- campaign: typeof input.campaign === "number" ? input.campaign : void 0,
280
- lane: typeof input.lane === "string" ? input.lane : void 0,
281
- laneOrderInCampaign: typeof input.laneOrderInCampaign === "number" ? input.laneOrderInCampaign : void 0,
282
- orderInLane: typeof input.orderInLane === "number" ? input.orderInLane : void 0,
283
- dependsOn,
284
- blocks,
285
- gate: typeof input.gate === "string" ? input.gate : void 0
286
- });
287
- },
288
- update(input) {
289
- const dependsOn = Array.isArray(input.dependsOn) ? input.dependsOn.filter(
290
- (value) => typeof value === "string"
291
- ) : void 0;
292
- const blocks = Array.isArray(input.blocks) ? input.blocks.filter(
293
- (value) => typeof value === "string"
294
- ) : void 0;
295
- return worktreesFacade.update({
296
- id: typeof input.worktreeId === "string" ? input.worktreeId : "",
297
- hypothesis: typeof input.hypothesis === "string" ? input.hypothesis : void 0,
298
- campaign: typeof input.campaign === "number" ? input.campaign : void 0,
299
- lane: typeof input.lane === "string" ? input.lane : void 0,
300
- laneOrderInCampaign: typeof input.laneOrderInCampaign === "number" ? input.laneOrderInCampaign : void 0,
301
- orderInLane: typeof input.orderInLane === "number" ? input.orderInLane : void 0,
302
- dependsOn,
303
- blocks,
304
- gate: typeof input.gate === "string" ? input.gate : void 0
305
- });
306
- },
307
- updateTargets(input) {
308
- return worktreesFacade.updateTargets({
309
- id: input.worktreeId,
310
- addBeliefIds: input.addBeliefIds,
311
- addQuestionIds: input.addQuestionIds,
312
- removeBeliefIds: input.removeBeliefIds,
313
- removeQuestionIds: input.removeQuestionIds
314
- });
315
- },
316
- listAll: workflowClient.listAllWorktrees,
317
- merge(worktreeId, input) {
318
- return worktreesFacade.merge({
319
- id: worktreeId,
320
- outcomes: input.outcomes,
321
- summary: input.summary
322
- });
323
- },
324
- push: workflowClient.push,
325
- openPullRequest: workflowClient.openPullRequest,
326
- pipelineSnapshot(topicId) {
327
- return functionSurfaceClient.pipelineSnapshot({ topicId });
328
- },
329
- complete: worktreesFacade.complete,
330
- advancePhase(worktreeId, idempotencyKey) {
331
- return worktreesFacade.advancePhase(
332
- { worktreeId },
333
- idempotencyKey
334
- );
335
- },
336
- setPhase(worktreeId, phase, idempotencyKey) {
337
- return worktreesFacade.setPhase(
338
- { worktreeId, phase },
339
- idempotencyKey
340
- );
341
- },
342
- patchState: worktreesFacade.patchState,
343
- bulkCreate: worktreesFacade.bulkCreate
344
- },
345
- context: {
346
- listTopics(query = {}) {
347
- return topicsFacade.list({
348
- ontologyId: query.ontologyId,
349
- parentTopicId: query.parentTopicId,
350
- status: query.status,
351
- type: query.type
352
- });
353
- },
354
- compile: contextClient.compile,
355
- recordScopeLearning: functionSurfaceClient.recordScopeLearning,
356
- discover(input) {
357
- return discoverTopics(input);
358
- },
359
- analyzeTopicDensity: functionSurfaceClient.analyzeTopicDensity,
360
- applyAutoBranching: functionSurfaceClient.applyAutoBranching,
361
- seedBeliefLattice: functionSurfaceClient.seedBeliefLattice,
362
- getLatticeCoverage: functionSurfaceClient.getLatticeCoverage,
363
- matchEntityType(input) {
364
- return ontologiesFacade.match(input).then(exposeGatewayData);
365
- },
366
- discoverEntityConnections(input) {
367
- return discoverEntityConnections(input);
368
- },
369
- triggerBeliefReview(input) {
370
- return triggerBeliefReview(input);
371
- }
372
- },
373
- tasks: {
374
- create(input) {
375
- return tasksFacade.create({
376
- topicId: resolveTopicId(input),
377
- title: input.title,
378
- description: input.description,
379
- taskType: input.taskType,
380
- priority: input.priority,
381
- linkedBeliefId: input.linkedBeliefId,
382
- linkedQuestionId: input.linkedQuestionId,
383
- linkedWorktreeId: input.linkedWorktreeId
384
- });
385
- },
386
- complete(taskId, input) {
387
- return tasksFacade.complete({
388
- id: taskId,
389
- outputSummary: input.outputSummary
390
- });
391
- },
392
- update(taskId, input) {
393
- return tasksFacade.update({
394
- id: taskId,
395
- title: input.title,
396
- description: input.description,
397
- priority: input.priority,
398
- status: input.status,
399
- linkedBeliefId: input.linkedBeliefId,
400
- linkedQuestionId: input.linkedQuestionId,
401
- linkedWorktreeId: input.linkedWorktreeId
402
- });
403
- },
404
- list(input) {
405
- return tasksFacade.list({
406
- topicId: resolveTopicId(input),
407
- worktreeId: typeof input.worktreeId === "string" ? input.worktreeId : typeof input.linkedWorktreeId === "string" ? input.linkedWorktreeId : void 0,
408
- status: typeof input.status === "string" ? input.status : void 0,
409
- limit: typeof input.limit === "number" ? input.limit : void 0
410
- });
411
- },
412
- listByTopic(input) {
413
- return tasksFacade.list({
414
- topicId: requireTopicId(input),
415
- status: typeof input.status === "string" ? input.status : void 0,
416
- limit: typeof input.limit === "number" ? input.limit : void 0
417
- });
418
- },
419
- listByWorktree(input) {
420
- return tasksFacade.list({
421
- topicId: typeof input.topicId === "string" ? input.topicId : void 0,
422
- worktreeId: input.worktreeId,
423
- status: typeof input.status === "string" ? input.status : void 0,
424
- limit: typeof input.limit === "number" ? input.limit : void 0
425
- });
426
- },
427
- linkChat(taskId, input, idempotencyKey) {
428
- return gateway.request({
429
- path: `/api/platform/v1/tasks/${encodeURIComponent(
430
- taskId
431
- )}/link-chat`,
432
- method: "POST",
433
- body: input,
434
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
435
- }).then(exposeGatewayData);
436
- }
437
- },
438
- topics: {
439
- list(input = {}) {
440
- return topicsFacade.list({
441
- ontologyId: input.ontologyId,
442
- parentTopicId: input.parentTopicId,
443
- status: input.status,
444
- type: input.type
445
- });
446
- },
447
- get: topicsFacade.get,
448
- create(input) {
449
- return functionSurfaceClient.createTopic(input).then(exposeGatewayData);
450
- },
451
- update(topicId, input) {
452
- return topicsFacade.update({
453
- id: topicId,
454
- name: input.name,
455
- description: input.description,
456
- type: input.type,
457
- ontologyId: input.ontologyId,
458
- clearOntologyId: input.clearOntologyId,
459
- status: input.status,
460
- visibility: input.visibility
461
- });
462
- },
463
- tree(topicId, query = {}) {
464
- return topicsFacade.tree({
465
- id: topicId,
466
- maxDepth: query.maxDepth
467
- });
468
- },
469
- getTree(input) {
470
- return topicsFacade.tree({
471
- id: input.rootId,
472
- maxDepth: input.maxDepth
473
- });
474
- },
475
- coverage(topicId, query = {}) {
476
- return topicsFacade.coverage({
477
- id: topicId,
478
- includeDescendants: query.includeDescendants,
479
- maxDepth: query.maxDepth
480
- });
481
- },
482
- remove: topicsFacade.remove,
483
- bulkCreate: topicsFacade.bulkCreate,
484
- materializeGraph(input = {}, idempotencyKey) {
485
- return functionSurfaceClient.materializeTopicGraph(input, idempotencyKey).then(exposeGatewayData);
486
- },
487
- materializeTopicGraph(input = {}, idempotencyKey) {
488
- return functionSurfaceClient.materializeTopicGraph(input, idempotencyKey).then(exposeGatewayData);
489
- },
490
- graphSpine(input = {}) {
491
- return functionSurfaceClient.getTopicGraphSpine(input).then(exposeGatewayData);
492
- },
493
- getTopicGraphSpine(input = {}) {
494
- return functionSurfaceClient.getTopicGraphSpine(input).then(exposeGatewayData);
495
- }
496
- },
497
- answers: {
498
- create(input) {
499
- const questionId = typeof input.questionNodeId === "string" ? input.questionNodeId : "";
500
- if (!questionId) {
501
- throw new Error("questionNodeId is required");
502
- }
503
- const text = typeof input.answerText === "string" ? input.answerText : "";
504
- if (!text) {
505
- throw new Error("answerText is required");
506
- }
507
- const confidence = input.confidence === "moderate" ? "medium" : input.confidence;
508
- return questionsFacade.answer(questionId, {
509
- text,
510
- confidence: typeof confidence === "string" ? confidence : void 0,
511
- evidenceIds: Array.isArray(input.evidenceNodeIds) ? input.evidenceNodeIds.filter(
512
- (value) => typeof value === "string"
513
- ) : void 0
514
- });
515
- },
516
- get(input) {
517
- const questionId = typeof input.questionNodeId === "string" ? input.questionNodeId : "";
518
- if (!questionId) {
519
- throw new Error("questionNodeId is required");
520
- }
521
- return answersClient.get(questionId);
522
- }
523
- },
524
- contradictions: {
525
- flag(args) {
526
- return contradictionsFacade.flag({
527
- beliefA: args.beliefA,
528
- beliefB: args.beliefB,
529
- description: args.description,
530
- topicId: resolveTopicId(args),
531
- severity: args.severity,
532
- defeatType: args.defeatType
533
- }).then(exposeGatewayData);
534
- },
535
- list(args) {
536
- return contradictionsFacade.list({
537
- topicId: requireTopicId(args),
538
- status: args.status,
539
- limit: args.limit,
540
- cursor: args.cursor
541
- }).then(exposeGatewayData);
542
- },
543
- get(contradictionId) {
544
- return contradictionsFacade.get(contradictionId).then(exposeGatewayData);
545
- },
546
- find: findContradictions
547
- },
548
- ontologies: {
549
- list(input = {}) {
550
- return ontologiesFacade.list(input).then(exposeGatewayData);
551
- },
552
- get(ontologyId) {
553
- return ontologiesFacade.get(ontologyId).then((response) => exposeGatewayData(response));
554
- },
555
- bind(input, idempotencyKey) {
556
- return ontologiesFacade.bind(input, idempotencyKey).then((response) => exposeGatewayData(response));
557
- },
558
- match(input, idempotencyKey) {
559
- return ontologiesFacade.match(input, idempotencyKey).then(exposeGatewayData);
560
- },
561
- create(input) {
562
- return createOntologyCompat(input);
563
- },
564
- update(input) {
565
- return updateOntologyCompat(input);
566
- },
567
- archive(input) {
568
- return archiveOntologyCompat(input);
569
- },
570
- createVersion(input) {
571
- return createOntologyVersionCompat(input);
572
- },
573
- publishVersion(input) {
574
- return publishOntologyVersionCompat(input);
575
- },
576
- publishOntologyVersion(input) {
577
- return publishOntologyVersionCompat(input);
578
- },
579
- deprecateVersion(input) {
580
- return deprecateOntologyVersionCompat(input);
581
- },
582
- deprecateOntologyVersion(input) {
583
- return deprecateOntologyVersionCompat(input);
584
- },
585
- resolveEffective(input) {
586
- return resolveEffectiveOntologyCompat(input);
587
- },
588
- resolveEffectiveOntology(input) {
589
- return resolveEffectiveOntologyCompat(input);
590
- },
591
- raw: ontologyClient
592
- }
593
- };
1
+ export function createClientWorkflowNamespaces(ctx) {
2
+ const { accessControlClient, addEvidence, adminClient, answersClient, archiveOntologyCompat, auditClient, authDeviceClient, beliefsClient, beliefsFacade, bisectConfidence, buildBeliefsArchivePayload, buildBeliefsRefinePayload, clearRegisteredCustomTools, config, contextClient, contradictionsFacade, controlPlaneClient, createContractCompat, createEvidence, createOntologyCompat, createOntologyVersionCompat, decisionsClient, deprecateOntologyVersionCompat, discoverEntityConnections, discoverTopics, edgesFacade, embeddingsClient, ensurePack, evaluateContractCompat, eventingClient, eventsFacade, evidenceClient, evidenceFacade, exposeGatewayData, extensionNamespaces, findContradictions, functionSurfaceClient, gateway, getAuditTrail, getConfidenceHistory, getContractStatusCompat, getCustomNamespace, getOpinionHistory, getPackInstalled, graphAnalysisClient, graphClient, graphFacade, graphRecommendationsClient, graphStateClassifierClient, harnessClient, identityClient, identityFacade, invokeCustomTool, jobsClient, learningClient, listBeliefs, listContractsCompat, listRegisteredCustomTools, mcpClient, modelRuntimeClient, nodesNamespace, ontologiesFacade, ontologyClient, ontologyLinksClient, ontologyLinksNamespace, orgGraphSearchClient, packsClient, policyClient, publicationNamespace, publishOntologyVersionCompat, questionsFacade, queryLineage, randomIdempotencyKey, registerCustomTool, reportsClient, requireBaseRate, requireText, requireTopicId, requireTopicOrProjectId, resolveCustomToolFullName, resolveEffectiveOntologyCompat, resolveTopicId, schemaClient, sdkQueryString, searchBeliefs, sourcesClient, tasksFacade, telemetryClient, toolRegistryClient, topicsClient, topicsFacade, traceEntityImpactCompat, triggerBeliefReview, unregisterCustomTool, updateOntologyCompat, webhooksFacade, workflowClient, worktreesFacade, } = ctx;
3
+ return {
4
+ judgments: {
5
+ create: decisionsClient.createJudgment,
6
+ record: decisionsClient.recordJudgment,
7
+ list: decisionsClient.listJudgments,
8
+ get: decisionsClient.getJudgment,
9
+ recordOutcome: decisionsClient.recordJudgmentOutcome,
10
+ updateOutcome: decisionsClient.updateJudgmentOutcome,
11
+ readiness(topicId) {
12
+ return decisionsClient.getJudgmentReadiness({ topicId });
13
+ },
14
+ calibration(topicId) {
15
+ return decisionsClient.getJudgmentCalibration({ topicId });
16
+ },
17
+ pendingOutcomeReview(topicId) {
18
+ return decisionsClient.listPendingJudgmentOutcomeReview({ topicId });
19
+ },
20
+ transitionAuditIntegrity(args) {
21
+ return decisionsClient.getJudgmentTransitionAuditIntegrity({
22
+ ...args,
23
+ topicId: requireTopicId(args),
24
+ });
25
+ },
26
+ },
27
+ decisions: {
28
+ create: decisionsClient.createJudgment,
29
+ record: decisionsClient.recordJudgment,
30
+ list: decisionsClient.listJudgments,
31
+ get: decisionsClient.getJudgment,
32
+ recordOutcome: decisionsClient.recordJudgmentOutcome,
33
+ lessons(decisionId, input, idempotencyKey) {
34
+ return gateway
35
+ .request({
36
+ path: `/api/platform/v1/decisions/${encodeURIComponent(decisionId)}/lessons`,
37
+ method: "POST",
38
+ body: input,
39
+ idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
40
+ })
41
+ .then(exposeGatewayData);
42
+ },
43
+ archive(decisionId, input = {}, idempotencyKey) {
44
+ return gateway
45
+ .request({
46
+ path: `/api/platform/v1/decisions/${encodeURIComponent(decisionId)}/archive`,
47
+ method: "POST",
48
+ body: input,
49
+ idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
50
+ })
51
+ .then(exposeGatewayData);
52
+ },
53
+ readiness(topicId) {
54
+ return decisionsClient.getJudgmentReadiness({ topicId });
55
+ },
56
+ calibration(topicId) {
57
+ return decisionsClient.getJudgmentCalibration({ topicId });
58
+ },
59
+ pendingOutcomeReview(topicId) {
60
+ return decisionsClient.listPendingJudgmentOutcomeReview({ topicId });
61
+ },
62
+ },
63
+ worktrees: {
64
+ createBranch: workflowClient.createBranch,
65
+ createLens: workflowClient.createLens,
66
+ listLenses: workflowClient.listLenses,
67
+ applyLensToTopic: workflowClient.applyLensToTopic,
68
+ removeLensFromTopic: workflowClient.removeLensFromTopic,
69
+ create(input) {
70
+ return worktreesFacade.create({
71
+ title: input.title,
72
+ topicId: requireTopicId(input),
73
+ objective: input.objective,
74
+ hypothesis: input.hypothesis,
75
+ rationale: input.rationale,
76
+ worktreeType: input.worktreeType,
77
+ startDate: input.startDate,
78
+ endDate: input.endDate,
79
+ durationWeeks: input.durationWeeks,
80
+ confidenceImpact: input.confidenceImpact,
81
+ beliefFocus: input.beliefFocus,
82
+ beliefIds: input.beliefIds,
83
+ targetBeliefIds: input.targetBeliefIds,
84
+ targetQuestionIds: input.targetQuestionIds,
85
+ keyQuestions: input.keyQuestions,
86
+ evidenceSignals: input.evidenceSignals,
87
+ decisionGate: input.decisionGate,
88
+ goCriteria: input.goCriteria,
89
+ noGoSignals: input.noGoSignals,
90
+ autoShape: input.autoShape,
91
+ domainPackId: input.domainPackId,
92
+ campaign: input.campaign,
93
+ lane: input.lane,
94
+ laneOrderInCampaign: input.laneOrderInCampaign,
95
+ orderInLane: input.orderInLane,
96
+ dependsOn: input.dependsOn,
97
+ blocks: input.blocks,
98
+ gate: input.gate,
99
+ proofArtifacts: input.proofArtifacts,
100
+ staffingHint: typeof input.staffingHint === "string"
101
+ ? input.staffingHint
102
+ : undefined,
103
+ lastReconciledAt: input.lastReconciledAt,
104
+ autoFixPolicy: input.autoFixPolicy,
105
+ lensId: input.lensId,
106
+ });
107
+ },
108
+ add(input) {
109
+ return worktreesFacade.create({
110
+ title: input.title,
111
+ topicId: requireTopicId(input),
112
+ objective: input.objective,
113
+ hypothesis: input.hypothesis,
114
+ rationale: input.rationale,
115
+ worktreeType: input.worktreeType,
116
+ startDate: input.startDate,
117
+ endDate: input.endDate,
118
+ durationWeeks: input.durationWeeks,
119
+ confidenceImpact: input.confidenceImpact,
120
+ beliefFocus: input.beliefFocus,
121
+ beliefIds: input.beliefIds,
122
+ targetBeliefIds: input.targetBeliefIds,
123
+ targetQuestionIds: input.targetQuestionIds,
124
+ keyQuestions: input.keyQuestions,
125
+ evidenceSignals: input.evidenceSignals,
126
+ decisionGate: input.decisionGate,
127
+ goCriteria: input.goCriteria,
128
+ noGoSignals: input.noGoSignals,
129
+ autoShape: input.autoShape,
130
+ domainPackId: input.domainPackId,
131
+ campaign: input.campaign,
132
+ lane: input.lane,
133
+ laneOrderInCampaign: input.laneOrderInCampaign,
134
+ orderInLane: input.orderInLane,
135
+ dependsOn: input.dependsOn,
136
+ blocks: input.blocks,
137
+ gate: input.gate,
138
+ proofArtifacts: input.proofArtifacts,
139
+ staffingHint: typeof input.staffingHint === "string"
140
+ ? input.staffingHint
141
+ : undefined,
142
+ lastReconciledAt: input.lastReconciledAt,
143
+ autoFixPolicy: input.autoFixPolicy,
144
+ lensId: input.lensId,
145
+ });
146
+ },
147
+ list(query) {
148
+ return worktreesFacade.list({
149
+ topicId: requireTopicId(query),
150
+ status: query.status,
151
+ limit: query.limit,
152
+ });
153
+ },
154
+ listByTopic(query) {
155
+ return worktreesFacade.list({
156
+ topicId: requireTopicId(query),
157
+ status: query.status,
158
+ limit: query.limit,
159
+ });
160
+ },
161
+ findByPairedSprint(input) {
162
+ return gateway
163
+ .request({
164
+ path: `/api/platform/v1/worktrees/paired-sprint${sdkQueryString({
165
+ sprintId: input.sprintId,
166
+ topicId: input.topicId ?? input.projectId,
167
+ limit: input.limit,
168
+ })}`,
169
+ })
170
+ .then(exposeGatewayData);
171
+ },
172
+ activate(worktreeId) {
173
+ return worktreesFacade.activate({ id: worktreeId });
174
+ },
175
+ updateMetadata(input) {
176
+ const dependsOn = Array.isArray(input.dependsOn)
177
+ ? input.dependsOn.filter((value) => typeof value === "string")
178
+ : undefined;
179
+ const blocks = Array.isArray(input.blocks)
180
+ ? input.blocks.filter((value) => typeof value === "string")
181
+ : undefined;
182
+ return worktreesFacade.update({
183
+ id: typeof input.worktreeId === "string" ? input.worktreeId : "",
184
+ hypothesis: typeof input.hypothesis === "string"
185
+ ? input.hypothesis
186
+ : undefined,
187
+ campaign: typeof input.campaign === "number" ? input.campaign : undefined,
188
+ lane: typeof input.lane === "string" ? input.lane : undefined,
189
+ laneOrderInCampaign: typeof input.laneOrderInCampaign === "number"
190
+ ? input.laneOrderInCampaign
191
+ : undefined,
192
+ orderInLane: typeof input.orderInLane === "number"
193
+ ? input.orderInLane
194
+ : undefined,
195
+ dependsOn,
196
+ blocks,
197
+ gate: typeof input.gate === "string" ? input.gate : undefined,
198
+ });
199
+ },
200
+ update(input) {
201
+ const dependsOn = Array.isArray(input.dependsOn)
202
+ ? input.dependsOn.filter((value) => typeof value === "string")
203
+ : undefined;
204
+ const blocks = Array.isArray(input.blocks)
205
+ ? input.blocks.filter((value) => typeof value === "string")
206
+ : undefined;
207
+ return worktreesFacade.update({
208
+ id: typeof input.worktreeId === "string" ? input.worktreeId : "",
209
+ hypothesis: typeof input.hypothesis === "string"
210
+ ? input.hypothesis
211
+ : undefined,
212
+ campaign: typeof input.campaign === "number" ? input.campaign : undefined,
213
+ lane: typeof input.lane === "string" ? input.lane : undefined,
214
+ laneOrderInCampaign: typeof input.laneOrderInCampaign === "number"
215
+ ? input.laneOrderInCampaign
216
+ : undefined,
217
+ orderInLane: typeof input.orderInLane === "number"
218
+ ? input.orderInLane
219
+ : undefined,
220
+ dependsOn,
221
+ blocks,
222
+ gate: typeof input.gate === "string" ? input.gate : undefined,
223
+ });
224
+ },
225
+ updateTargets(input) {
226
+ return worktreesFacade.updateTargets({
227
+ id: input.worktreeId,
228
+ addBeliefIds: input.addBeliefIds,
229
+ addQuestionIds: input.addQuestionIds,
230
+ removeBeliefIds: input.removeBeliefIds,
231
+ removeQuestionIds: input.removeQuestionIds,
232
+ });
233
+ },
234
+ listAll: workflowClient.listAllWorktrees,
235
+ merge(worktreeId, input) {
236
+ return worktreesFacade.merge({
237
+ id: worktreeId,
238
+ outcomes: input.outcomes,
239
+ summary: input.summary,
240
+ });
241
+ },
242
+ push: workflowClient.push,
243
+ openPullRequest: workflowClient.openPullRequest,
244
+ pipelineSnapshot(topicId) {
245
+ return functionSurfaceClient.pipelineSnapshot({ topicId });
246
+ },
247
+ complete: worktreesFacade.complete,
248
+ advancePhase(worktreeId, idempotencyKey) {
249
+ return worktreesFacade.advancePhase({ worktreeId }, idempotencyKey);
250
+ },
251
+ setPhase(worktreeId, phase, idempotencyKey) {
252
+ return worktreesFacade.setPhase({ worktreeId, phase }, idempotencyKey);
253
+ },
254
+ patchState: worktreesFacade.patchState,
255
+ bulkCreate: worktreesFacade.bulkCreate,
256
+ },
257
+ context: {
258
+ listTopics(query = {}) {
259
+ return topicsFacade.list({
260
+ ontologyId: query.ontologyId,
261
+ parentTopicId: query.parentTopicId,
262
+ status: query.status,
263
+ type: query.type,
264
+ });
265
+ },
266
+ compile: contextClient.compile,
267
+ recordScopeLearning: functionSurfaceClient.recordScopeLearning,
268
+ discover(input) {
269
+ return discoverTopics(input);
270
+ },
271
+ analyzeTopicDensity: functionSurfaceClient.analyzeTopicDensity,
272
+ applyAutoBranching: functionSurfaceClient.applyAutoBranching,
273
+ seedBeliefLattice: functionSurfaceClient.seedBeliefLattice,
274
+ getLatticeCoverage: functionSurfaceClient.getLatticeCoverage,
275
+ matchEntityType(input) {
276
+ return ontologiesFacade
277
+ .match(input)
278
+ .then(exposeGatewayData);
279
+ },
280
+ discoverEntityConnections(input) {
281
+ return discoverEntityConnections(input);
282
+ },
283
+ triggerBeliefReview(input) {
284
+ return triggerBeliefReview(input);
285
+ },
286
+ },
287
+ tasks: {
288
+ create(input) {
289
+ return tasksFacade.create({
290
+ topicId: resolveTopicId(input),
291
+ title: input.title,
292
+ description: input.description,
293
+ taskType: input.taskType,
294
+ priority: input.priority,
295
+ linkedBeliefId: input.linkedBeliefId,
296
+ linkedQuestionId: input.linkedQuestionId,
297
+ linkedWorktreeId: input.linkedWorktreeId,
298
+ });
299
+ },
300
+ complete(taskId, input) {
301
+ return tasksFacade.complete({
302
+ id: taskId,
303
+ outputSummary: input.outputSummary,
304
+ });
305
+ },
306
+ update(taskId, input) {
307
+ return tasksFacade.update({
308
+ id: taskId,
309
+ title: input.title,
310
+ description: input.description,
311
+ priority: input.priority,
312
+ status: input.status,
313
+ linkedBeliefId: input.linkedBeliefId,
314
+ linkedQuestionId: input.linkedQuestionId,
315
+ linkedWorktreeId: input.linkedWorktreeId,
316
+ });
317
+ },
318
+ list(input) {
319
+ return tasksFacade.list({
320
+ topicId: resolveTopicId(input),
321
+ worktreeId: typeof input.worktreeId === "string"
322
+ ? input.worktreeId
323
+ : typeof input.linkedWorktreeId === "string"
324
+ ? input.linkedWorktreeId
325
+ : undefined,
326
+ status: typeof input.status === "string" ? input.status : undefined,
327
+ limit: typeof input.limit === "number" ? input.limit : undefined,
328
+ });
329
+ },
330
+ listByTopic(input) {
331
+ return tasksFacade.list({
332
+ topicId: requireTopicId(input),
333
+ status: typeof input.status === "string" ? input.status : undefined,
334
+ limit: typeof input.limit === "number" ? input.limit : undefined,
335
+ });
336
+ },
337
+ listByWorktree(input) {
338
+ return tasksFacade.list({
339
+ topicId: typeof input.topicId === "string" ? input.topicId : undefined,
340
+ worktreeId: input.worktreeId,
341
+ status: typeof input.status === "string" ? input.status : undefined,
342
+ limit: typeof input.limit === "number" ? input.limit : undefined,
343
+ });
344
+ },
345
+ linkChat(taskId, input, idempotencyKey) {
346
+ return gateway
347
+ .request({
348
+ path: `/api/platform/v1/tasks/${encodeURIComponent(taskId)}/link-chat`,
349
+ method: "POST",
350
+ body: input,
351
+ idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
352
+ })
353
+ .then(exposeGatewayData);
354
+ },
355
+ },
356
+ topics: {
357
+ list(input = {}) {
358
+ return topicsFacade.list({
359
+ ontologyId: input.ontologyId,
360
+ parentTopicId: input.parentTopicId,
361
+ status: input.status,
362
+ type: input.type,
363
+ });
364
+ },
365
+ get: topicsFacade.get,
366
+ create(input) {
367
+ return functionSurfaceClient
368
+ .createTopic(input)
369
+ .then(exposeGatewayData);
370
+ },
371
+ update(topicId, input) {
372
+ return topicsFacade.update({
373
+ id: topicId,
374
+ name: input.name,
375
+ description: input.description,
376
+ type: input.type,
377
+ ontologyId: input.ontologyId,
378
+ clearOntologyId: input.clearOntologyId,
379
+ status: input.status,
380
+ visibility: input.visibility,
381
+ });
382
+ },
383
+ tree(topicId, query = {}) {
384
+ return topicsFacade.tree({
385
+ id: topicId,
386
+ maxDepth: query.maxDepth,
387
+ });
388
+ },
389
+ getTree(input) {
390
+ return topicsFacade.tree({
391
+ id: input.rootId,
392
+ maxDepth: input.maxDepth,
393
+ });
394
+ },
395
+ coverage(topicId, query = {}) {
396
+ return topicsFacade.coverage({
397
+ id: topicId,
398
+ includeDescendants: query.includeDescendants,
399
+ maxDepth: query.maxDepth,
400
+ });
401
+ },
402
+ remove: topicsFacade.remove,
403
+ bulkCreate: topicsFacade.bulkCreate,
404
+ materializeGraph(input = {}, idempotencyKey) {
405
+ return functionSurfaceClient
406
+ .materializeTopicGraph(input, idempotencyKey)
407
+ .then(exposeGatewayData);
408
+ },
409
+ materializeTopicGraph(input = {}, idempotencyKey) {
410
+ return functionSurfaceClient
411
+ .materializeTopicGraph(input, idempotencyKey)
412
+ .then(exposeGatewayData);
413
+ },
414
+ graphSpine(input = {}) {
415
+ return functionSurfaceClient
416
+ .getTopicGraphSpine(input)
417
+ .then(exposeGatewayData);
418
+ },
419
+ getTopicGraphSpine(input = {}) {
420
+ return functionSurfaceClient
421
+ .getTopicGraphSpine(input)
422
+ .then(exposeGatewayData);
423
+ },
424
+ },
425
+ answers: {
426
+ create(input) {
427
+ const questionId = typeof input.questionNodeId === "string" ? input.questionNodeId : "";
428
+ if (!questionId) {
429
+ throw new Error("questionNodeId is required");
430
+ }
431
+ const text = typeof input.answerText === "string" ? input.answerText : "";
432
+ if (!text) {
433
+ throw new Error("answerText is required");
434
+ }
435
+ const confidence = input.confidence === "moderate" ? "medium" : input.confidence;
436
+ return questionsFacade.answer(questionId, {
437
+ text,
438
+ confidence: typeof confidence === "string" ? confidence : undefined,
439
+ evidenceIds: Array.isArray(input.evidenceNodeIds)
440
+ ? input.evidenceNodeIds.filter((value) => typeof value === "string")
441
+ : undefined,
442
+ });
443
+ },
444
+ get(input) {
445
+ const questionId = typeof input.questionNodeId === "string" ? input.questionNodeId : "";
446
+ if (!questionId) {
447
+ throw new Error("questionNodeId is required");
448
+ }
449
+ return answersClient.get(questionId);
450
+ },
451
+ },
452
+ contradictions: {
453
+ flag(args) {
454
+ return contradictionsFacade
455
+ .flag({
456
+ beliefA: args.beliefA,
457
+ beliefB: args.beliefB,
458
+ description: args.description,
459
+ topicId: resolveTopicId(args),
460
+ severity: args.severity,
461
+ defeatType: args.defeatType,
462
+ })
463
+ .then(exposeGatewayData);
464
+ },
465
+ list(args) {
466
+ return contradictionsFacade
467
+ .list({
468
+ topicId: requireTopicId(args),
469
+ status: args.status,
470
+ limit: args.limit,
471
+ cursor: args.cursor,
472
+ })
473
+ .then(exposeGatewayData);
474
+ },
475
+ get(contradictionId) {
476
+ return contradictionsFacade.get(contradictionId).then(exposeGatewayData);
477
+ },
478
+ find: findContradictions,
479
+ },
480
+ ontologies: {
481
+ list(input = {}) {
482
+ return ontologiesFacade.list(input).then(exposeGatewayData);
483
+ },
484
+ get(ontologyId) {
485
+ return ontologiesFacade
486
+ .get(ontologyId)
487
+ .then((response) => exposeGatewayData(response));
488
+ },
489
+ bind(input, idempotencyKey) {
490
+ return ontologiesFacade
491
+ .bind(input, idempotencyKey)
492
+ .then((response) => exposeGatewayData(response));
493
+ },
494
+ match(input, idempotencyKey) {
495
+ return ontologiesFacade.match(input, idempotencyKey).then(exposeGatewayData);
496
+ },
497
+ create(input) {
498
+ return createOntologyCompat(input);
499
+ },
500
+ update(input) {
501
+ return updateOntologyCompat(input);
502
+ },
503
+ archive(input) {
504
+ return archiveOntologyCompat(input);
505
+ },
506
+ createVersion(input) {
507
+ return createOntologyVersionCompat(input);
508
+ },
509
+ publishVersion(input) {
510
+ return publishOntologyVersionCompat(input);
511
+ },
512
+ publishOntologyVersion(input) {
513
+ return publishOntologyVersionCompat(input);
514
+ },
515
+ deprecateVersion(input) {
516
+ return deprecateOntologyVersionCompat(input);
517
+ },
518
+ deprecateOntologyVersion(input) {
519
+ return deprecateOntologyVersionCompat(input);
520
+ },
521
+ resolveEffective(input) {
522
+ return resolveEffectiveOntologyCompat(input);
523
+ },
524
+ resolveEffectiveOntology(input) {
525
+ return resolveEffectiveOntologyCompat(input);
526
+ },
527
+ raw: ontologyClient,
528
+ },
529
+ };
594
530
  }
595
-
596
- export { createClientWorkflowNamespaces };
597
- //# sourceMappingURL=clientWorkflowNamespaces.js.map
598
531
  //# sourceMappingURL=clientWorkflowNamespaces.js.map