@lucern/sdk 0.2.0-alpha.13 → 0.2.0-alpha.2

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/README.md +166 -609
  2. package/dist/index.js +3539 -6269
  3. package/dist/index.js.map +1 -1
  4. package/dist/{contracts → lucern/contracts/src}/auth-session.contract.d.ts +12 -14
  5. package/dist/{contracts → lucern/contracts/src}/context-pack.contract.d.ts +58 -56
  6. package/dist/{contracts → lucern/contracts/src}/lens-filter.contract.d.ts +8 -10
  7. package/dist/lucern/contracts/src/lens-workflow.contract.d.ts +84 -0
  8. package/dist/lucern/contracts/src/mcp-tools.contract.d.ts +151 -0
  9. package/dist/lucern/contracts/src/workflow-runtime.contract.d.ts +161 -0
  10. package/dist/lucern/mcp-server/src/context-pack-policy.d.ts +119 -0
  11. package/dist/lucern/mcp-server/src/context-pack-schema.d.ts +18 -0
  12. package/dist/lucern/modules/graph-primitives/src/ontology-matching.d.ts +78 -0
  13. package/dist/lucern/modules/graph-primitives/src/text-matching.d.ts +53 -0
  14. package/dist/lucern/packages/client-core/src/beliefs.d.ts +30 -0
  15. package/dist/lucern/packages/client-core/src/context.d.ts +29 -0
  16. package/dist/lucern/packages/client-core/src/contradictions.d.ts +11 -0
  17. package/dist/lucern/packages/client-core/src/edges.d.ts +11 -0
  18. package/dist/lucern/packages/client-core/src/events.d.ts +9 -0
  19. package/dist/lucern/packages/client-core/src/evidence.d.ts +21 -0
  20. package/dist/lucern/packages/client-core/src/graph.d.ts +17 -0
  21. package/dist/lucern/packages/client-core/src/identity.d.ts +7 -0
  22. package/dist/lucern/packages/client-core/src/ids.d.ts +7 -0
  23. package/dist/lucern/packages/client-core/src/ontologies.d.ts +13 -0
  24. package/dist/lucern/packages/client-core/src/questions.d.ts +39 -0
  25. package/dist/lucern/packages/client-core/src/search.d.ts +7 -0
  26. package/dist/lucern/packages/client-core/src/tasks.d.ts +13 -0
  27. package/dist/lucern/packages/client-core/src/topics.d.ts +17 -0
  28. package/dist/lucern/packages/client-core/src/webhooks.d.ts +35 -0
  29. package/dist/lucern/packages/client-core/src/worktrees.d.ts +17 -0
  30. package/dist/lucern/packages/domain-beliefs/src/beliefs.d.ts +283 -0
  31. package/dist/lucern/packages/domain-beliefs/src/index.d.ts +1 -0
  32. package/dist/lucern/packages/domain-context/src/compile.d.ts +11 -0
  33. package/dist/{contextPackCompiler.d.ts → lucern/packages/domain-context/src/context-pack-compiler.d.ts} +10 -11
  34. package/dist/lucern/packages/domain-context/src/index.d.ts +4 -0
  35. package/dist/lucern/packages/domain-context/src/ports.d.ts +58 -0
  36. package/dist/lucern/packages/domain-context/src/public-types.d.ts +1 -0
  37. package/dist/lucern/packages/domain-edges/src/contradictions.d.ts +59 -0
  38. package/dist/lucern/packages/domain-edges/src/edges.d.ts +91 -0
  39. package/dist/lucern/packages/domain-edges/src/index.d.ts +2 -0
  40. package/dist/lucern/packages/domain-evidence/src/evidence.d.ts +115 -0
  41. package/dist/lucern/packages/domain-evidence/src/index.d.ts +1 -0
  42. package/dist/lucern/packages/domain-graph/src/graph.d.ts +150 -0
  43. package/dist/lucern/packages/domain-identity/src/index.d.ts +1 -0
  44. package/dist/lucern/packages/domain-identity/src/whoami.d.ts +13 -0
  45. package/dist/lucern/packages/domain-ontologies/src/ontologies.d.ts +123 -0
  46. package/dist/lucern/packages/domain-questions/src/index.d.ts +1 -0
  47. package/dist/lucern/packages/domain-questions/src/questions.d.ts +147 -0
  48. package/dist/lucern/packages/domain-search/src/search.d.ts +97 -0
  49. package/dist/lucern/packages/domain-tasks/src/index.d.ts +1 -0
  50. package/dist/lucern/packages/domain-tasks/src/tasks.d.ts +102 -0
  51. package/dist/lucern/packages/domain-topics/src/index.d.ts +1 -0
  52. package/dist/lucern/packages/domain-topics/src/topics.d.ts +147 -0
  53. package/dist/lucern/packages/domain-worktrees/src/index.d.ts +1 -0
  54. package/dist/lucern/packages/domain-worktrees/src/worktrees.d.ts +185 -0
  55. package/dist/lucern/packages/events/src/index.d.ts +4 -0
  56. package/dist/lucern/packages/events/src/matching.d.ts +3 -0
  57. package/dist/lucern/packages/events/src/outbox.d.ts +15 -0
  58. package/dist/lucern/packages/events/src/types.d.ts +151 -0
  59. package/dist/lucern/packages/events/src/webhooks.d.ts +9 -0
  60. package/dist/lucern/packages/sdk-typescript/src/facade/beliefs.d.ts +15 -0
  61. package/dist/lucern/packages/sdk-typescript/src/facade/context.d.ts +12 -0
  62. package/dist/lucern/packages/sdk-typescript/src/facade/contradictions.d.ts +7 -0
  63. package/dist/lucern/packages/sdk-typescript/src/facade/edges.d.ts +7 -0
  64. package/dist/lucern/packages/sdk-typescript/src/facade/events.d.ts +6 -0
  65. package/dist/lucern/packages/sdk-typescript/src/facade/evidence.d.ts +21 -0
  66. package/dist/lucern/packages/sdk-typescript/src/facade/graph.d.ts +10 -0
  67. package/dist/lucern/packages/sdk-typescript/src/facade/identity.d.ts +5 -0
  68. package/dist/lucern/packages/sdk-typescript/src/facade/ontologies.d.ts +8 -0
  69. package/dist/lucern/packages/sdk-typescript/src/facade/questions.d.ts +39 -0
  70. package/dist/lucern/packages/sdk-typescript/src/facade/search.d.ts +5 -0
  71. package/dist/lucern/packages/sdk-typescript/src/facade/tasks.d.ts +8 -0
  72. package/dist/lucern/packages/sdk-typescript/src/facade/topics.d.ts +10 -0
  73. package/dist/lucern/packages/sdk-typescript/src/facade/webhooks.d.ts +16 -0
  74. package/dist/lucern/packages/sdk-typescript/src/facade/worktrees.d.ts +10 -0
  75. package/dist/lucern/packages/sdk-typescript/src/index.d.ts +28 -0
  76. package/dist/packages/sdk/src/adminClient.d.ts +89 -0
  77. package/dist/packages/sdk/src/answersClient.d.ts +5 -0
  78. package/dist/{audiencesClient.d.ts → packages/sdk/src/audiencesClient.d.ts} +18 -30
  79. package/dist/packages/sdk/src/auditClient.d.ts +21 -0
  80. package/dist/packages/sdk/src/beliefsClient.d.ts +52 -0
  81. package/dist/packages/sdk/src/client.d.ts +1558 -0
  82. package/dist/packages/sdk/src/contextClient.d.ts +9 -0
  83. package/dist/packages/sdk/src/contracts/api-enums.contract.d.ts +58 -0
  84. package/dist/{controlObjectOwnership.d.ts → packages/sdk/src/controlObjectOwnership.d.ts} +18 -35
  85. package/dist/{coreClient.d.ts → packages/sdk/src/coreClient.d.ts} +14 -38
  86. package/dist/packages/sdk/src/customTools.d.ts +65 -0
  87. package/dist/packages/sdk/src/decisionsClient.d.ts +97 -0
  88. package/dist/packages/sdk/src/graphClient.d.ts +191 -0
  89. package/dist/{harnessClient.d.ts → packages/sdk/src/harnessClient.d.ts} +33 -127
  90. package/dist/packages/sdk/src/identityClient.d.ts +104 -0
  91. package/dist/packages/sdk/src/index.d.ts +28 -0
  92. package/dist/packages/sdk/src/learningClient.d.ts +37 -0
  93. package/dist/{mcpParityClient.d.ts → packages/sdk/src/mcpParityClient.d.ts} +5 -11
  94. package/dist/packages/sdk/src/mcpParitySurface.d.ts +8 -0
  95. package/dist/{ontologyClient.d.ts → packages/sdk/src/ontologyClient.d.ts} +22 -44
  96. package/dist/packages/sdk/src/packsClient.d.ts +101 -0
  97. package/dist/{policyClient.d.ts → packages/sdk/src/policyClient.d.ts} +18 -113
  98. package/dist/packages/sdk/src/reportsClient.d.ts +31 -0
  99. package/dist/packages/sdk/src/schemaClient.d.ts +54 -0
  100. package/dist/packages/sdk/src/sdkSurface.d.ts +55 -0
  101. package/dist/packages/sdk/src/topicsClient.d.ts +45 -0
  102. package/dist/packages/sdk/src/types.d.ts +470 -0
  103. package/dist/packages/sdk/src/version.d.ts +2 -0
  104. package/dist/packages/sdk/src/workflowClient.d.ts +252 -0
  105. package/package.json +37 -92
  106. package/CHANGELOG.md +0 -13
  107. package/dist/adminClient.d.ts +0 -409
  108. package/dist/adminClient.js +0 -755
  109. package/dist/adminClient.js.map +0 -1
  110. package/dist/answersClient.d.ts +0 -23
  111. package/dist/answersClient.js +0 -333
  112. package/dist/answersClient.js.map +0 -1
  113. package/dist/audience/index.d.ts +0 -38
  114. package/dist/audience/index.js +0 -110
  115. package/dist/audience/index.js.map +0 -1
  116. package/dist/audiencesClient.js +0 -472
  117. package/dist/audiencesClient.js.map +0 -1
  118. package/dist/auditClient.d.ts +0 -29
  119. package/dist/auditClient.js +0 -386
  120. package/dist/auditClient.js.map +0 -1
  121. package/dist/beliefs/index.d.ts +0 -465
  122. package/dist/beliefs/index.js +0 -6433
  123. package/dist/beliefs/index.js.map +0 -1
  124. package/dist/beliefs/lifecycle.d.ts +0 -24
  125. package/dist/beliefs/lifecycle.js +0 -98
  126. package/dist/beliefs/lifecycle.js.map +0 -1
  127. package/dist/beliefsClient.d.ts +0 -241
  128. package/dist/beliefsClient.js +0 -646
  129. package/dist/beliefsClient.js.map +0 -1
  130. package/dist/client.d.ts +0 -2398
  131. package/dist/client.js +0 -6411
  132. package/dist/client.js.map +0 -1
  133. package/dist/contextClient.d.ts +0 -27
  134. package/dist/contextClient.js +0 -396
  135. package/dist/contextClient.js.map +0 -1
  136. package/dist/contextFacade.d.ts +0 -2
  137. package/dist/contextFacade.js +0 -73
  138. package/dist/contextFacade.js.map +0 -1
  139. package/dist/contextPackCompiler.js +0 -1091
  140. package/dist/contextPackCompiler.js.map +0 -1
  141. package/dist/contextPackPolicy.d.ts +0 -84
  142. package/dist/contextPackPolicy.js +0 -347
  143. package/dist/contextPackPolicy.js.map +0 -1
  144. package/dist/contextPackSchema.d.ts +0 -7
  145. package/dist/contextPackSchema.js +0 -203
  146. package/dist/contextPackSchema.js.map +0 -1
  147. package/dist/contextTypes.d.ts +0 -135
  148. package/dist/contextTypes.js +0 -3
  149. package/dist/contextTypes.js.map +0 -1
  150. package/dist/contracts/api-enums.contract.d.ts +0 -81
  151. package/dist/contracts/api-enums.contract.js +0 -98
  152. package/dist/contracts/api-enums.contract.js.map +0 -1
  153. package/dist/contracts/auth-session.contract.js +0 -48
  154. package/dist/contracts/auth-session.contract.js.map +0 -1
  155. package/dist/contracts/context-pack.contract.js +0 -98
  156. package/dist/contracts/context-pack.contract.js.map +0 -1
  157. package/dist/contracts/contextPack.d.ts +0 -1
  158. package/dist/contracts/contextPack.js +0 -98
  159. package/dist/contracts/contextPack.js.map +0 -1
  160. package/dist/contracts/index.d.ts +0 -9
  161. package/dist/contracts/index.js +0 -4928
  162. package/dist/contracts/index.js.map +0 -1
  163. package/dist/contracts/lens-filter.contract.js +0 -71
  164. package/dist/contracts/lens-filter.contract.js.map +0 -1
  165. package/dist/contracts/lens-workflow.contract.d.ts +0 -87
  166. package/dist/contracts/lens-workflow.contract.js +0 -123
  167. package/dist/contracts/lens-workflow.contract.js.map +0 -1
  168. package/dist/contracts/lensFilter.d.ts +0 -1
  169. package/dist/contracts/lensFilter.js +0 -71
  170. package/dist/contracts/lensFilter.js.map +0 -1
  171. package/dist/contracts/lensWorkflow.d.ts +0 -2
  172. package/dist/contracts/lensWorkflow.js +0 -123
  173. package/dist/contracts/lensWorkflow.js.map +0 -1
  174. package/dist/contracts/mcp-tools.contract.d.ts +0 -1
  175. package/dist/contracts/mcp-tools.contract.js +0 -3016
  176. package/dist/contracts/mcp-tools.contract.js.map +0 -1
  177. package/dist/contracts/mcpTools.d.ts +0 -1
  178. package/dist/contracts/mcpTools.js +0 -3016
  179. package/dist/contracts/mcpTools.js.map +0 -1
  180. package/dist/contracts/prompt.contract.d.ts +0 -26
  181. package/dist/contracts/prompt.contract.js +0 -12
  182. package/dist/contracts/prompt.contract.js.map +0 -1
  183. package/dist/contracts/prompt.d.ts +0 -1
  184. package/dist/contracts/prompt.js +0 -12
  185. package/dist/contracts/prompt.js.map +0 -1
  186. package/dist/contracts/sdk-tools.contract.d.ts +0 -2
  187. package/dist/contracts/sdk-tools.contract.js +0 -4164
  188. package/dist/contracts/sdk-tools.contract.js.map +0 -1
  189. package/dist/contracts/sdkTools.d.ts +0 -2
  190. package/dist/contracts/sdkTools.js +0 -4164
  191. package/dist/contracts/sdkTools.js.map +0 -1
  192. package/dist/contracts/workflow-runtime.contract.d.ts +0 -163
  193. package/dist/contracts/workflow-runtime.contract.js +0 -245
  194. package/dist/contracts/workflow-runtime.contract.js.map +0 -1
  195. package/dist/contracts/workflowRuntime.d.ts +0 -1
  196. package/dist/contracts/workflowRuntime.js +0 -245
  197. package/dist/contracts/workflowRuntime.js.map +0 -1
  198. package/dist/contradictions/index.d.ts +0 -158
  199. package/dist/contradictions/index.js +0 -6427
  200. package/dist/contradictions/index.js.map +0 -1
  201. package/dist/controlObjectOwnership.js +0 -215
  202. package/dist/controlObjectOwnership.js.map +0 -1
  203. package/dist/coreClient.js +0 -339
  204. package/dist/coreClient.js.map +0 -1
  205. package/dist/customTools.d.ts +0 -88
  206. package/dist/customTools.js +0 -248
  207. package/dist/customTools.js.map +0 -1
  208. package/dist/decisions/index.d.ts +0 -68
  209. package/dist/decisions/index.js +0 -6429
  210. package/dist/decisions/index.js.map +0 -1
  211. package/dist/decisionsClient.d.ts +0 -111
  212. package/dist/decisionsClient.js +0 -522
  213. package/dist/decisionsClient.js.map +0 -1
  214. package/dist/domainContext.d.ts +0 -1
  215. package/dist/domainContext.js +0 -3
  216. package/dist/domainContext.js.map +0 -1
  217. package/dist/edges/index.d.ts +0 -204
  218. package/dist/edges/index.js +0 -6428
  219. package/dist/edges/index.js.map +0 -1
  220. package/dist/events.d.ts +0 -178
  221. package/dist/events.js +0 -251
  222. package/dist/events.js.map +0 -1
  223. package/dist/eventsCore.d.ts +0 -49
  224. package/dist/eventsCore.js +0 -429
  225. package/dist/eventsCore.js.map +0 -1
  226. package/dist/evidence/index.d.ts +0 -295
  227. package/dist/evidence/index.js +0 -6428
  228. package/dist/evidence/index.js.map +0 -1
  229. package/dist/evidenceClient.d.ts +0 -119
  230. package/dist/evidenceClient.js +0 -350
  231. package/dist/evidenceClient.js.map +0 -1
  232. package/dist/facade/context.d.ts +0 -18
  233. package/dist/facade/context.js +0 -73
  234. package/dist/facade/context.js.map +0 -1
  235. package/dist/gatewayFacades.d.ts +0 -589
  236. package/dist/gatewayFacades.js +0 -2006
  237. package/dist/gatewayFacades.js.map +0 -1
  238. package/dist/graphClient.d.ts +0 -271
  239. package/dist/graphClient.js +0 -698
  240. package/dist/graphClient.js.map +0 -1
  241. package/dist/harnessClient.js +0 -607
  242. package/dist/harnessClient.js.map +0 -1
  243. package/dist/identityClient.d.ts +0 -140
  244. package/dist/identityClient.js +0 -497
  245. package/dist/identityClient.js.map +0 -1
  246. package/dist/index.d.ts +0 -45
  247. package/dist/learningClient.d.ts +0 -46
  248. package/dist/learningClient.js +0 -409
  249. package/dist/learningClient.js.map +0 -1
  250. package/dist/lenses/index.d.ts +0 -194
  251. package/dist/lenses/index.js +0 -6427
  252. package/dist/lenses/index.js.map +0 -1
  253. package/dist/mcpParityClient.js +0 -516
  254. package/dist/mcpParityClient.js.map +0 -1
  255. package/dist/mcpParitySurface.d.ts +0 -12
  256. package/dist/mcpParitySurface.js +0 -65
  257. package/dist/mcpParitySurface.js.map +0 -1
  258. package/dist/mcpTools-DPZxowDX.d.ts +0 -254
  259. package/dist/nodes/index.d.ts +0 -62
  260. package/dist/nodes/index.js +0 -6429
  261. package/dist/nodes/index.js.map +0 -1
  262. package/dist/ontologies/index.d.ts +0 -178
  263. package/dist/ontologies/index.js +0 -6430
  264. package/dist/ontologies/index.js.map +0 -1
  265. package/dist/ontologyClient.js +0 -513
  266. package/dist/ontologyClient.js.map +0 -1
  267. package/dist/opinion.d.ts +0 -11
  268. package/dist/opinion.js +0 -35
  269. package/dist/opinion.js.map +0 -1
  270. package/dist/packRuntime.d.ts +0 -2
  271. package/dist/packRuntime.js +0 -3
  272. package/dist/packRuntime.js.map +0 -1
  273. package/dist/packsClient.d.ts +0 -131
  274. package/dist/packsClient.js +0 -525
  275. package/dist/packsClient.js.map +0 -1
  276. package/dist/policyClient.js +0 -625
  277. package/dist/policyClient.js.map +0 -1
  278. package/dist/questions/index.d.ts +0 -297
  279. package/dist/questions/index.js +0 -6430
  280. package/dist/questions/index.js.map +0 -1
  281. package/dist/realtime/index.d.ts +0 -29
  282. package/dist/realtime/index.js +0 -23
  283. package/dist/realtime/index.js.map +0 -1
  284. package/dist/realtime/refs.d.ts +0 -17
  285. package/dist/realtime/refs.js +0 -9
  286. package/dist/realtime/refs.js.map +0 -1
  287. package/dist/reportsClient.d.ts +0 -41
  288. package/dist/reportsClient.js +0 -418
  289. package/dist/reportsClient.js.map +0 -1
  290. package/dist/schemaClient.d.ts +0 -64
  291. package/dist/schemaClient.js +0 -434
  292. package/dist/schemaClient.js.map +0 -1
  293. package/dist/sdkSurface.d.ts +0 -61
  294. package/dist/sdkSurface.js +0 -112
  295. package/dist/sdkSurface.js.map +0 -1
  296. package/dist/sdkTools-CwXJDACb.d.ts +0 -150
  297. package/dist/sourcesClient.d.ts +0 -24
  298. package/dist/sourcesClient.js +0 -339
  299. package/dist/sourcesClient.js.map +0 -1
  300. package/dist/topics/index.d.ts +0 -68
  301. package/dist/topics/index.js +0 -6428
  302. package/dist/topics/index.js.map +0 -1
  303. package/dist/topicsClient.d.ts +0 -84
  304. package/dist/topicsClient.js +0 -492
  305. package/dist/topicsClient.js.map +0 -1
  306. package/dist/types.d.ts +0 -715
  307. package/dist/types.js +0 -3
  308. package/dist/types.js.map +0 -1
  309. package/dist/version.d.ts +0 -4
  310. package/dist/version.js +0 -6
  311. package/dist/version.js.map +0 -1
  312. package/dist/workflowClient.d.ts +0 -316
  313. package/dist/workflowClient.js +0 -830
  314. package/dist/workflowClient.js.map +0 -1
  315. package/dist/worktrees/index.d.ts +0 -210
  316. package/dist/worktrees/index.js +0 -6430
  317. package/dist/worktrees/index.js.map +0 -1
@@ -1,830 +0,0 @@
1
- // src/coreClient.ts
2
- var LucernApiError = class extends Error {
3
- code;
4
- status;
5
- invariant;
6
- suggestion;
7
- details;
8
- requestId;
9
- correlationId;
10
- policyTraceId;
11
- constructor(args) {
12
- super(args.message);
13
- this.name = "LucernApiError";
14
- this.code = args.code;
15
- this.status = args.status;
16
- this.invariant = args.invariant;
17
- this.suggestion = args.suggestion;
18
- this.details = args.details;
19
- this.requestId = args.requestId;
20
- this.correlationId = args.correlationId;
21
- this.policyTraceId = args.policyTraceId;
22
- }
23
- };
24
- function toQueryString(scope) {
25
- const params = new URLSearchParams();
26
- if (scope.tenantId) {
27
- params.set("tenantId", scope.tenantId);
28
- }
29
- if (scope.workspaceId) {
30
- params.set("workspaceId", scope.workspaceId);
31
- }
32
- for (const [key, value] of Object.entries(scope)) {
33
- if (key === "tenantId" || key === "workspaceId") {
34
- continue;
35
- }
36
- if (value === void 0) {
37
- continue;
38
- }
39
- params.set(key, String(value));
40
- }
41
- const serialized = params.toString();
42
- return serialized.length > 0 ? `?${serialized}` : "";
43
- }
44
- function fillRandomBytes(length) {
45
- const bytes = new Uint8Array(length);
46
- if (typeof globalThis.crypto?.getRandomValues === "function") {
47
- globalThis.crypto.getRandomValues(bytes);
48
- return bytes;
49
- }
50
- for (let index = 0; index < length; index += 1) {
51
- bytes[index] = Math.floor(Math.random() * 256);
52
- }
53
- return bytes;
54
- }
55
- function generatePortableRequestId() {
56
- if (typeof globalThis.crypto?.randomUUID === "function") {
57
- return globalThis.crypto.randomUUID();
58
- }
59
- const bytes = fillRandomBytes(16);
60
- bytes[6] = bytes[6] & 15 | 64;
61
- bytes[8] = bytes[8] & 63 | 128;
62
- const hex = Array.from(bytes, (value) => value.toString(16).padStart(2, "0"));
63
- return `${hex.slice(0, 4).join("")}-${hex.slice(4, 6).join("")}-${hex.slice(
64
- 6,
65
- 8
66
- ).join("")}-${hex.slice(8, 10).join("")}-${hex.slice(10).join("")}`;
67
- }
68
- function randomIdempotencyKey() {
69
- return generatePortableRequestId();
70
- }
71
- function isRetryableStatus(status) {
72
- return status >= 500 || status === 408 || status === 429;
73
- }
74
- function fallbackErrorCode(status) {
75
- if (status === 401) {
76
- return "AUTHENTICATION_REQUIRED";
77
- }
78
- if (status === 403) {
79
- return "FORBIDDEN";
80
- }
81
- if (status === 404) {
82
- return "NOT_FOUND";
83
- }
84
- if (status === 408) {
85
- return "UPSTREAM_ERROR";
86
- }
87
- if (status === 409) {
88
- return "CONFLICT";
89
- }
90
- if (status === 429) {
91
- return "RATE_LIMIT_EXCEEDED";
92
- }
93
- if (status >= 500) {
94
- return "UPSTREAM_ERROR";
95
- }
96
- return "INTERNAL_ERROR";
97
- }
98
- function delay(ms) {
99
- return new Promise((resolve) => setTimeout(resolve, ms));
100
- }
101
- function parseRetryAfterMs(value) {
102
- if (!value) {
103
- return null;
104
- }
105
- const trimmed = value.trim();
106
- if (!trimmed) {
107
- return null;
108
- }
109
- const numeric = Number(trimmed);
110
- if (Number.isFinite(numeric)) {
111
- return Math.max(0, Math.round(numeric * 1e3));
112
- }
113
- const parsedDate = Date.parse(trimmed);
114
- if (Number.isFinite(parsedDate)) {
115
- return Math.max(0, parsedDate - Date.now());
116
- }
117
- return null;
118
- }
119
- function computeRetryDelayMs(args) {
120
- const baseDelay = args.status === 429 ? Math.max(
121
- args.retryAfterMs ?? 0,
122
- Math.min(1e3 * 2 ** args.attempt, 1e4)
123
- ) : Math.min(1e3 * 2 ** args.attempt, 4e3);
124
- if (args.status !== 429) {
125
- return baseDelay;
126
- }
127
- const jitterWindow = Math.max(250, Math.round(baseDelay * 0.25));
128
- return baseDelay + Math.round(Math.random() * jitterWindow);
129
- }
130
- function timeoutError(timeoutMs) {
131
- const error = new Error(`Request timed out after ${timeoutMs}ms`);
132
- error.name = "AbortError";
133
- return error;
134
- }
135
- function readPolicySummaryFromDetails(details) {
136
- if (!details || typeof details !== "object" || Array.isArray(details)) {
137
- return null;
138
- }
139
- const directSummary = details.summary;
140
- if (typeof directSummary === "string" && directSummary.trim().length > 0) {
141
- return directSummary.trim();
142
- }
143
- const policy = details.policy;
144
- if (!policy || typeof policy !== "object" || Array.isArray(policy)) {
145
- return null;
146
- }
147
- const explanation = policy.explanation;
148
- if (!explanation || typeof explanation !== "object" || Array.isArray(explanation)) {
149
- return null;
150
- }
151
- const nestedSummary = explanation.summary;
152
- if (typeof nestedSummary === "string" && nestedSummary.trim().length > 0) {
153
- return nestedSummary.trim();
154
- }
155
- return null;
156
- }
157
- function createGatewayRequestClient(config = {}) {
158
- const fetchImpl = config.fetchImpl ?? fetch;
159
- const baseUrl = config.baseUrl?.replace(/\/+$/, "") ?? "";
160
- const maxRetries = config.maxRetries ?? 2;
161
- const requestIdFactory = config.requestIdFactory ?? (() => generatePortableRequestId());
162
- async function resolveAuthHeaders() {
163
- if (!config.getAuthHeaders) {
164
- return {};
165
- }
166
- return await config.getAuthHeaders();
167
- }
168
- async function fetchWithTimeout(url, init, timeoutMs) {
169
- const controller = new AbortController();
170
- const timer = setTimeout(() => controller.abort(), timeoutMs);
171
- try {
172
- return await fetchImpl(url, { ...init, signal: controller.signal });
173
- } catch (error) {
174
- if (controller.signal.aborted) {
175
- throw timeoutError(timeoutMs);
176
- }
177
- throw error;
178
- } finally {
179
- clearTimeout(timer);
180
- }
181
- }
182
- async function parsePayload(response) {
183
- const text = await response.text();
184
- if (!text) {
185
- return null;
186
- }
187
- try {
188
- return JSON.parse(text);
189
- } catch {
190
- return null;
191
- }
192
- }
193
- function resolveTimeoutMs(method, requestTimeoutMs) {
194
- if (typeof requestTimeoutMs === "number") {
195
- return requestTimeoutMs;
196
- }
197
- const methodTimeoutMs = config.timeoutMsByMethod?.[method];
198
- if (typeof methodTimeoutMs === "number") {
199
- return methodTimeoutMs;
200
- }
201
- return config.timeoutMs ?? 15e3;
202
- }
203
- function buildApiError(args) {
204
- const failure = args.failure;
205
- const legacyError = failure && typeof failure.error === "object" && failure.error !== null ? failure.error : failure?.legacyError;
206
- const correlationId = failure?.correlationId ?? args.response.headers.get("x-lucern-correlation-id")?.trim() ?? args.requestId;
207
- const policyTraceId = failure?.policyTraceId ?? args.response.headers.get("x-lucern-policy-trace-id")?.trim() ?? null;
208
- const details = failure?.details ?? legacyError?.details;
209
- const policySummary = readPolicySummaryFromDetails(details);
210
- return new LucernApiError({
211
- code: failure?.code ?? legacyError?.code ?? fallbackErrorCode(args.response.status),
212
- message: policySummary ?? (typeof failure?.error === "string" ? failure.error : legacyError?.message ?? (args.response.ok ? "Platform API returned an invalid success payload." : "Platform API request failed.")),
213
- status: args.response.status,
214
- invariant: failure?.invariant,
215
- suggestion: failure?.suggestion,
216
- details,
217
- requestId: args.requestId,
218
- correlationId,
219
- policyTraceId
220
- });
221
- }
222
- async function request(args) {
223
- const authHeaders = await resolveAuthHeaders();
224
- const method = args.method ?? "GET";
225
- const timeoutMs = resolveTimeoutMs(method, args.timeoutMs);
226
- const headers = new Headers({
227
- "content-type": "application/json",
228
- ...authHeaders
229
- });
230
- if (args.idempotencyKey) {
231
- headers.set("idempotency-key", args.idempotencyKey);
232
- }
233
- const requestId = headers.get("x-correlation-id")?.trim() || headers.get("x-request-id")?.trim() || args.requestId || requestIdFactory();
234
- if (!headers.has("x-correlation-id") && !headers.has("x-request-id")) {
235
- headers.set("x-correlation-id", requestId);
236
- }
237
- const url = `${baseUrl}${args.path}`;
238
- const serializedBody = args.body ? JSON.stringify(args.body) : void 0;
239
- const init = {
240
- method,
241
- headers,
242
- body: serializedBody
243
- };
244
- let lastError;
245
- for (let attempt = 0; attempt <= maxRetries; attempt++) {
246
- const hookRequestContext = {
247
- requestId,
248
- attempt,
249
- maxRetries,
250
- method,
251
- path: args.path,
252
- url,
253
- headers: new Headers(headers),
254
- body: serializedBody,
255
- timeoutMs
256
- };
257
- await config.onRequest?.(hookRequestContext);
258
- const startedAt = Date.now();
259
- try {
260
- const response = await fetchWithTimeout(url, init, timeoutMs);
261
- const responseClone = response.clone();
262
- const payload = await parsePayload(response);
263
- const retryAfterMs = parseRetryAfterMs(
264
- response.headers.get("Retry-After")
265
- );
266
- if (!response.ok || !payload?.success) {
267
- const failure = payload && !payload.success ? payload : null;
268
- const apiError = buildApiError({
269
- requestId,
270
- response,
271
- failure
272
- });
273
- const willRetry = attempt < maxRetries && isRetryableStatus(response.status);
274
- await config.onResponse?.({
275
- ...hookRequestContext,
276
- durationMs: Date.now() - startedAt,
277
- status: response.status,
278
- response: responseClone,
279
- error: apiError,
280
- correlationId: apiError.correlationId ?? requestId,
281
- policyTraceId: apiError.policyTraceId ?? null,
282
- retryAfterMs,
283
- willRetry
284
- });
285
- if (willRetry) {
286
- lastError = apiError;
287
- await delay(
288
- computeRetryDelayMs({
289
- attempt,
290
- status: response.status,
291
- retryAfterMs
292
- })
293
- );
294
- continue;
295
- }
296
- throw apiError;
297
- }
298
- const successPayload = payload;
299
- await config.onResponse?.({
300
- ...hookRequestContext,
301
- durationMs: Date.now() - startedAt,
302
- status: response.status,
303
- response: responseClone,
304
- correlationId: successPayload.correlationId ?? response.headers.get("x-lucern-correlation-id")?.trim() ?? requestId,
305
- policyTraceId: successPayload.policyTraceId ?? response.headers.get("x-lucern-policy-trace-id")?.trim() ?? null,
306
- idempotentReplay: successPayload.idempotentReplay,
307
- retryAfterMs,
308
- willRetry: false
309
- });
310
- return successPayload;
311
- } catch (fetchError) {
312
- if (fetchError instanceof LucernApiError) {
313
- throw fetchError;
314
- }
315
- const willRetry = attempt < maxRetries;
316
- await config.onResponse?.({
317
- ...hookRequestContext,
318
- durationMs: Date.now() - startedAt,
319
- error: fetchError,
320
- correlationId: requestId,
321
- policyTraceId: null,
322
- willRetry
323
- });
324
- lastError = fetchError;
325
- if (willRetry) {
326
- await delay(computeRetryDelayMs({ attempt }));
327
- }
328
- }
329
- }
330
- throw lastError instanceof Error ? lastError : new Error("Platform API request failed after retries.");
331
- }
332
- return {
333
- request
334
- };
335
- }
336
-
337
- // src/sdkSurface.ts
338
- function asRecord(value) {
339
- return value && typeof value === "object" ? value : {};
340
- }
341
- function cleanString(value) {
342
- return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
343
- }
344
- function cloneWith(value, patch) {
345
- return { ...value, ...patch };
346
- }
347
- function resolveTopicId(value) {
348
- return cleanString(value.topicId);
349
- }
350
- function withTopicAlias(value) {
351
- const topicId = cleanString(value.topicId) ?? void 0;
352
- if (!topicId) {
353
- return value;
354
- }
355
- return cloneWith(value, { topicId });
356
- }
357
- function withTextAlias(value) {
358
- const text = cleanString(value.text) ?? cleanString(value.canonicalText) ?? void 0;
359
- if (!text) {
360
- return value;
361
- }
362
- return cloneWith(value, { text, canonicalText: text });
363
- }
364
- function withSdkAliases(value) {
365
- return withTopicAlias(withTextAlias(value));
366
- }
367
- function normalizeTopicQuery(value) {
368
- const topicId = cleanString(value.topicId);
369
- if (!topicId) {
370
- return value;
371
- }
372
- return { ...value, topicId };
373
- }
374
- function asListItems(data, legacyKey) {
375
- if (Array.isArray(data)) {
376
- return data;
377
- }
378
- const record = asRecord(data);
379
- if (Array.isArray(record.items)) {
380
- return record.items;
381
- }
382
- if (legacyKey && Array.isArray(record[legacyKey])) {
383
- return record[legacyKey];
384
- }
385
- return [];
386
- }
387
- function createListResult(items, legacyKey) {
388
- const result = {
389
- items,
390
- total: items.length
391
- };
392
- if (legacyKey) {
393
- result[legacyKey] = items;
394
- }
395
- return result;
396
- }
397
- function mapGatewayData(response, mapper) {
398
- return {
399
- ...response,
400
- data: mapper(response.data)
401
- };
402
- }
403
- function mapAliasedList(data, legacyKey) {
404
- const items = asListItems(data, legacyKey).map(
405
- (item) => withSdkAliases(item)
406
- );
407
- return createListResult(items, legacyKey);
408
- }
409
-
410
- // src/workflowClient.ts
411
- function normalizeLensQuery(value) {
412
- const topicId = resolveTopicId(value);
413
- return {
414
- ...value,
415
- ...topicId ? { topicId } : {}
416
- };
417
- }
418
- function createWorkflowClient(config = {}) {
419
- const gateway = createGatewayRequestClient(config);
420
- const client = {
421
- /**
422
- * List workflow branches for a topic scope.
423
- */
424
- async listBranches(query) {
425
- return gateway.request({
426
- path: `/api/platform/v1/workflow/branches${toQueryString(
427
- normalizeTopicQuery(query)
428
- )}`
429
- }).then(
430
- (response) => mapGatewayData(
431
- response,
432
- (data) => mapAliasedList(data, "branches")
433
- )
434
- );
435
- },
436
- /**
437
- * Create a workflow branch.
438
- */
439
- async createBranch(input, idempotencyKey) {
440
- return gateway.request({
441
- path: "/api/platform/v1/workflow/branches",
442
- method: "POST",
443
- body: normalizeTopicQuery(input),
444
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
445
- }).then(
446
- (response) => mapGatewayData(
447
- response,
448
- (data) => withTopicAlias(data)
449
- )
450
- );
451
- },
452
- /**
453
- * List reusable lenses for a workspace or topic scope.
454
- */
455
- async listLenses(query) {
456
- return gateway.request({
457
- path: `/api/platform/v1/workflow/lenses${toQueryString(
458
- normalizeLensQuery(query)
459
- )}`
460
- }).then(
461
- (response) => mapGatewayData(
462
- response,
463
- (data) => mapAliasedList(data, "lenses")
464
- )
465
- );
466
- },
467
- /**
468
- * Create a reusable workflow lens.
469
- */
470
- async createLens(input, idempotencyKey) {
471
- const payload = normalizeLensQuery(input);
472
- return gateway.request({
473
- path: "/api/platform/v1/workflow/lenses",
474
- method: "POST",
475
- body: payload,
476
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
477
- }).then(
478
- (response) => mapGatewayData(
479
- response,
480
- (data) => withTopicAlias(data)
481
- )
482
- );
483
- },
484
- /**
485
- * Apply an existing lens to a topic.
486
- */
487
- async applyLensToTopic(input, idempotencyKey) {
488
- const payload = normalizeLensQuery(input);
489
- return gateway.request({
490
- path: "/api/platform/v1/workflow/lens-bindings",
491
- method: "POST",
492
- body: payload,
493
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
494
- }).then(
495
- (response) => mapGatewayData(
496
- response,
497
- (data) => withTopicAlias(data)
498
- )
499
- );
500
- },
501
- /**
502
- * Remove an applied lens from a topic.
503
- */
504
- async removeLensFromTopic(input, idempotencyKey) {
505
- const topicId = resolveTopicId(input);
506
- if (!topicId) {
507
- throw new LucernApiError({
508
- code: "INVALID_REQUEST",
509
- message: "topicId is required",
510
- status: 400
511
- });
512
- }
513
- return gateway.request({
514
- path: `/api/platform/v1/workflow/lens-bindings${toQueryString({
515
- lensId: input.lensId,
516
- topicId
517
- })}`,
518
- method: "DELETE",
519
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
520
- }).then(
521
- (response) => mapGatewayData(
522
- response,
523
- (data) => withTopicAlias(data)
524
- )
525
- );
526
- },
527
- /**
528
- * List worktrees for a topic scope.
529
- */
530
- async listWorktrees(query) {
531
- const normalized = normalizeTopicQuery(query);
532
- return gateway.request({
533
- path: `/api/platform/v1/worktrees${toQueryString({
534
- ...normalized,
535
- track: query.track,
536
- executionBand: query.executionBand
537
- })}`
538
- }).then(
539
- (response) => mapGatewayData(
540
- response,
541
- (data) => mapAliasedList(
542
- data,
543
- "worktrees"
544
- )
545
- )
546
- );
547
- },
548
- /**
549
- * List all worktrees across accessible topics.
550
- */
551
- async listAllWorktrees(query = {}) {
552
- return gateway.request({
553
- path: `/api/platform/v1/worktrees${toQueryString({
554
- status: query.status,
555
- track: query.track,
556
- executionBand: query.executionBand,
557
- limit: query.limit
558
- })}`
559
- }).then(
560
- (response) => mapGatewayData(response, (data) => {
561
- const record = data && typeof data === "object" && !Array.isArray(data) ? data : {};
562
- const list = mapAliasedList(
563
- data,
564
- "worktrees"
565
- );
566
- return {
567
- ...list,
568
- ...record.tracks && typeof record.tracks === "object" && !Array.isArray(record.tracks) ? { tracks: record.tracks } : {},
569
- ...record.bands && typeof record.bands === "object" && !Array.isArray(record.bands) ? { bands: record.bands } : {}
570
- };
571
- })
572
- );
573
- },
574
- /**
575
- * Create a workflow worktree.
576
- */
577
- async createWorktree(input, idempotencyKey) {
578
- return gateway.request({
579
- path: "/api/platform/v1/worktrees",
580
- method: "POST",
581
- body: normalizeTopicQuery(input),
582
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
583
- }).then(
584
- (response) => mapGatewayData(
585
- response,
586
- (data) => withTopicAlias(data)
587
- )
588
- );
589
- },
590
- /**
591
- * @deprecated Use createWorktree.
592
- */
593
- async addWorktree(input, idempotencyKey) {
594
- return client.createWorktree(input, idempotencyKey);
595
- },
596
- /**
597
- * Merge a worktree into the main belief line.
598
- */
599
- async merge(worktreeId, input, idempotencyKey) {
600
- return gateway.request({
601
- path: `/api/platform/v1/worktrees/${encodeURIComponent(worktreeId)}/merge`,
602
- method: "POST",
603
- body: input,
604
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
605
- });
606
- },
607
- /**
608
- * Activate a planning worktree.
609
- */
610
- async activateWorktree(worktreeId, idempotencyKey) {
611
- return gateway.request({
612
- path: `/api/platform/v1/worktrees/${encodeURIComponent(worktreeId)}/activate`,
613
- method: "POST",
614
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
615
- }).then(
616
- (response) => mapGatewayData(
617
- response,
618
- (data) => withTopicAlias(data)
619
- )
620
- );
621
- },
622
- /**
623
- * Update targeted beliefs/questions for a worktree.
624
- */
625
- async updateWorktreeTargets(input, idempotencyKey) {
626
- const { worktreeId, ...body } = input;
627
- return gateway.request({
628
- path: `/api/platform/v1/worktrees/${encodeURIComponent(worktreeId)}/targets`,
629
- method: "POST",
630
- body,
631
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
632
- }).then(
633
- (response) => mapGatewayData(
634
- response,
635
- (data) => withTopicAlias(data)
636
- )
637
- );
638
- },
639
- /**
640
- * Mark a worktree record complete.
641
- */
642
- async completeWorktree(input, idempotencyKey) {
643
- return gateway.request({
644
- path: "/api/platform/v1/worktrees/complete",
645
- method: "POST",
646
- body: input,
647
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
648
- });
649
- },
650
- /**
651
- * Advance a worktree to its next lifecycle phase.
652
- */
653
- async advanceWorktreePhase(input, idempotencyKey) {
654
- return gateway.request({
655
- path: "/api/platform/v1/worktrees/advance-phase",
656
- method: "POST",
657
- body: input,
658
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
659
- });
660
- },
661
- /**
662
- * Force a worktree into a specific lifecycle phase.
663
- */
664
- async setWorktreePhase(input, idempotencyKey) {
665
- return gateway.request({
666
- path: "/api/platform/v1/worktrees/set-phase",
667
- method: "POST",
668
- body: input,
669
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
670
- });
671
- },
672
- /**
673
- * Patch opaque worktree state for orchestration flows.
674
- */
675
- async patchWorktreeState(input, idempotencyKey) {
676
- return gateway.request({
677
- path: "/api/platform/v1/worktrees/patch-state",
678
- method: "POST",
679
- body: input,
680
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
681
- });
682
- },
683
- /**
684
- * Batch create worktree records.
685
- */
686
- async bulkCreateWorktrees(input, idempotencyKey) {
687
- return gateway.request({
688
- path: "/api/platform/v1/worktrees/bulk",
689
- method: "POST",
690
- body: input,
691
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
692
- });
693
- },
694
- /**
695
- * Open a pull request for a worktree.
696
- */
697
- async openPullRequest(worktreeId, input, idempotencyKey) {
698
- return gateway.request({
699
- path: `/api/platform/v1/workflow/worktrees/${encodeURIComponent(worktreeId)}/pull-request`,
700
- method: "POST",
701
- body: input,
702
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
703
- });
704
- },
705
- /**
706
- * Push scored worktree findings into another context.
707
- */
708
- async push(worktreeId, input, idempotencyKey) {
709
- return gateway.request({
710
- path: `/api/platform/v1/workflow/worktrees/${encodeURIComponent(worktreeId)}/push`,
711
- method: "POST",
712
- body: input,
713
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
714
- });
715
- },
716
- /**
717
- * List accessible topic contexts.
718
- */
719
- async listTopics(query = {}) {
720
- return gateway.request({
721
- path: `/api/platform/v1/workflow/topics${toQueryString({
722
- includeShared: typeof query.includeShared === "boolean" ? query.includeShared ? "true" : "false" : void 0,
723
- limit: query.limit
724
- })}`
725
- }).then(
726
- (response) => mapGatewayData(response, (data) => {
727
- const items = asListItems(data, "topics").map(
728
- (item) => withTopicAlias(
729
- item
730
- )
731
- );
732
- const record = data && typeof data === "object" ? data : {};
733
- return {
734
- ...record,
735
- ...createListResult(items, "topics"),
736
- total: typeof record.total === "number" ? record.total : items.length
737
- };
738
- })
739
- );
740
- },
741
- /**
742
- * Switch the active context by topic or project name.
743
- */
744
- async switchTopicContext(input, idempotencyKey) {
745
- return gateway.request({
746
- path: "/api/platform/v1/workflow/topics/switch",
747
- method: "POST",
748
- body: {
749
- targetTopicName: input.targetTopicName
750
- },
751
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
752
- }).then(
753
- (response) => mapGatewayData(
754
- response,
755
- (data) => withTopicAlias(
756
- data
757
- )
758
- )
759
- );
760
- },
761
- /**
762
- * Create a workflow task.
763
- */
764
- async createTask(input, idempotencyKey) {
765
- return gateway.request({
766
- path: "/api/platform/v1/workflow/tasks",
767
- method: "POST",
768
- body: normalizeTopicQuery(input),
769
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
770
- });
771
- },
772
- /**
773
- * Complete a workflow task.
774
- */
775
- async completeTask(taskId, input, idempotencyKey) {
776
- return gateway.request({
777
- path: `/api/platform/v1/workflow/tasks/${encodeURIComponent(taskId)}/complete`,
778
- method: "POST",
779
- body: input,
780
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
781
- });
782
- },
783
- /**
784
- * Update a workflow task.
785
- */
786
- async updateTask(taskId, input, idempotencyKey) {
787
- return gateway.request({
788
- path: `/api/platform/v1/workflow/tasks/${encodeURIComponent(taskId)}`,
789
- method: "PATCH",
790
- body: input,
791
- idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
792
- });
793
- },
794
- /**
795
- * @deprecated Use createBranch.
796
- */
797
- async createPillar(input, idempotencyKey) {
798
- return client.createBranch(input, idempotencyKey);
799
- },
800
- /**
801
- * @deprecated Use addWorktree.
802
- */
803
- async createSprint(input, idempotencyKey) {
804
- return client.createWorktree(input, idempotencyKey);
805
- },
806
- /**
807
- * @deprecated Use merge.
808
- */
809
- async completeSprint(worktreeId, input, idempotencyKey) {
810
- return client.merge(worktreeId, input, idempotencyKey);
811
- },
812
- /**
813
- * @deprecated Use openPullRequest.
814
- */
815
- async requestReview(worktreeId, input, idempotencyKey) {
816
- return client.openPullRequest(worktreeId, input, idempotencyKey);
817
- },
818
- /**
819
- * @deprecated Use push.
820
- */
821
- async publishFindings(worktreeId, input, idempotencyKey) {
822
- return client.push(worktreeId, input, idempotencyKey);
823
- }
824
- };
825
- return client;
826
- }
827
-
828
- export { LucernApiError, createWorkflowClient };
829
- //# sourceMappingURL=workflowClient.js.map
830
- //# sourceMappingURL=workflowClient.js.map