@lucern/sdk 1.0.11 → 1.0.13

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 +10 -0
  2. package/README.md +24 -27
  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 +16 -67
  21. package/dist/beliefs/index.js +20 -10181
  22. package/dist/beliefs/lifecycle.d.ts +10 -11
  23. package/dist/beliefs/lifecycle.js +78 -80
  24. package/dist/beliefsClient.d.ts +30 -35
  25. package/dist/beliefsClient.js +238 -994
  26. package/dist/boundaryClientSurface.d.ts +11 -16
  27. package/dist/boundaryClientSurface.js +49 -68
  28. package/dist/client.d.ts +82 -113
  29. package/dist/client.js +232 -10155
  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 +24 -14
  35. package/dist/clientEvidenceCompat.js +56 -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 +24 -54
  41. package/dist/clientKnowledgeNamespaces.js +506 -506
  42. package/dist/clientLocalHelpers.d.ts +11 -56
  43. package/dist/clientLocalHelpers.js +503 -732
  44. package/dist/clientPlatformNamespaces.d.ts +5 -53
  45. package/dist/clientPlatformNamespaces.js +229 -323
  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 -10175
  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 -10177
  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 -10176
  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 +42 -61
  123. package/dist/evidence/index.js +13 -10176
  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 +93 -296
  133. package/dist/gatewayFacades.factories.d.ts +209 -14
  134. package/dist/gatewayFacades.factories.js +545 -2228
  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 -13313
  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 -10175
  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 -10177
  170. package/dist/ontologies/index.d.ts +21 -73
  171. package/dist/ontologies/index.js +14 -10178
  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 -10178
  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 -10178
  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 -10178
  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,20 +1,15 @@
1
- import { JsonObject, ListResult } from './types.js';
2
- import './contracts/workflow-runtime.contract.js';
3
- import './contracts/lens-workflow.contract.js';
4
- import './contracts/lens-filter.contract.js';
5
-
6
- type TopicProjectAliasInput = {
1
+ import type { JsonObject, ListResult } from "./types";
2
+ export type TopicProjectAliasInput = {
7
3
  topicId?: string;
8
4
  /** @deprecated Use topicId. */
9
5
  projectId?: string;
10
6
  };
11
- declare function cleanOptionalString(value: string | undefined): string | undefined;
12
- declare function cleanRequiredString(value: string | undefined, label: string): string;
13
- declare function readTopicId(input: TopicProjectAliasInput): string | undefined;
14
- declare function requireTopicId(input: TopicProjectAliasInput): string;
15
- declare function assertKnownKeys<T extends string>(input: Record<string, unknown>, allowed: readonly T[], operation: string): void;
16
- declare function knownPayload<T extends string>(input: Record<string, unknown>, allowed: readonly T[], operation: string): JsonObject;
17
- declare function topicPayload<T extends string>(input: TopicProjectAliasInput & Record<string, unknown>, allowed: readonly T[], operation: string): JsonObject;
18
- declare function listResultFromEnvelope<T, LegacyKey extends string>(data: unknown, legacyKey: LegacyKey): ListResult<T, LegacyKey>;
19
-
20
- export { type TopicProjectAliasInput, assertKnownKeys, cleanOptionalString, cleanRequiredString, knownPayload, listResultFromEnvelope, readTopicId, requireTopicId, topicPayload };
7
+ export declare function cleanOptionalString(value: string | undefined): string | undefined;
8
+ export declare function cleanRequiredString(value: string | undefined, label: string): string;
9
+ export declare function readTopicId(input: TopicProjectAliasInput): string | undefined;
10
+ export declare function requireTopicId(input: TopicProjectAliasInput): string;
11
+ export declare function assertKnownKeys<T extends string>(input: Record<string, unknown>, allowed: readonly T[], operation: string): void;
12
+ export declare function knownPayload<T extends string>(input: Record<string, unknown>, allowed: readonly T[], operation: string): JsonObject;
13
+ export declare function topicPayload<T extends string>(input: TopicProjectAliasInput & Record<string, unknown>, allowed: readonly T[], operation: string): JsonObject;
14
+ export declare function listResultFromEnvelope<T, LegacyKey extends string>(data: unknown, legacyKey: LegacyKey): ListResult<T, LegacyKey>;
15
+ //# sourceMappingURL=boundaryClientSurface.d.ts.map
@@ -1,73 +1,54 @@
1
- // src/sdkSurface.ts
2
- function createListResult(items, legacyKey) {
3
- const result = {
4
- items,
5
- total: items.length
6
- };
7
- if (legacyKey) {
8
- return {
9
- ...result,
10
- [legacyKey]: items
11
- };
12
- }
13
- return result;
14
- }
15
-
16
- // src/boundaryClientSurface.ts
17
- function cleanOptionalString(value) {
18
- const normalized = value?.trim();
19
- return normalized ? normalized : void 0;
1
+ import { createListResult } from "./sdkSurface.js";
2
+ export function cleanOptionalString(value) {
3
+ const normalized = value?.trim();
4
+ return normalized ? normalized : undefined;
20
5
  }
21
6
  function isRecord(value) {
22
- return Boolean(value) && typeof value === "object" && !Array.isArray(value);
23
- }
24
- function cleanRequiredString(value, label) {
25
- const normalized = cleanOptionalString(value);
26
- if (!normalized) {
27
- throw new Error(`${label} is required`);
28
- }
29
- return normalized;
30
- }
31
- function readTopicId(input) {
32
- return cleanOptionalString(input.topicId) ?? cleanOptionalString(input.projectId);
33
- }
34
- function requireTopicId(input) {
35
- const topicId = readTopicId(input);
36
- if (!topicId) {
37
- throw new Error("topicId is required");
38
- }
39
- return topicId;
40
- }
41
- function assertKnownKeys(input, allowed, operation) {
42
- const allowedSet = new Set(allowed);
43
- const unknownKeys = Object.keys(input).filter((key) => !allowedSet.has(key));
44
- if (unknownKeys.length > 0) {
45
- throw new Error(
46
- `${operation} received unsupported field(s): ${unknownKeys.join(", ")}`
47
- );
48
- }
49
- }
50
- function knownPayload(input, allowed, operation) {
51
- assertKnownKeys(input, allowed, operation);
52
- return { ...input };
53
- }
54
- function topicPayload(input, allowed, operation) {
55
- assertKnownKeys(input, allowed, operation);
56
- return {
57
- ...input,
58
- topicId: requireTopicId(input),
59
- projectId: void 0
60
- };
7
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
8
+ }
9
+ export function cleanRequiredString(value, label) {
10
+ const normalized = cleanOptionalString(value);
11
+ if (!normalized) {
12
+ throw new Error(`${label} is required`);
13
+ }
14
+ return normalized;
15
+ }
16
+ export function readTopicId(input) {
17
+ return cleanOptionalString(input.topicId) ?? cleanOptionalString(input.projectId);
18
+ }
19
+ export function requireTopicId(input) {
20
+ const topicId = readTopicId(input);
21
+ if (!topicId) {
22
+ throw new Error("topicId is required");
23
+ }
24
+ return topicId;
25
+ }
26
+ export function assertKnownKeys(input, allowed, operation) {
27
+ const allowedSet = new Set(allowed);
28
+ const unknownKeys = Object.keys(input).filter((key) => !allowedSet.has(key));
29
+ if (unknownKeys.length > 0) {
30
+ throw new Error(`${operation} received unsupported field(s): ${unknownKeys.join(", ")}`);
31
+ }
32
+ }
33
+ export function knownPayload(input, allowed, operation) {
34
+ assertKnownKeys(input, allowed, operation);
35
+ return { ...input };
36
+ }
37
+ export function topicPayload(input, allowed, operation) {
38
+ assertKnownKeys(input, allowed, operation);
39
+ return {
40
+ ...input,
41
+ topicId: requireTopicId(input),
42
+ projectId: undefined,
43
+ };
61
44
  }
62
- function listResultFromEnvelope(data, legacyKey) {
63
- const record = isRecord(data) ? data : {};
64
- const legacyItems = record[legacyKey];
65
- return createListResult(
66
- Array.isArray(legacyItems) ? legacyItems : Array.isArray(data) ? data : [],
67
- legacyKey
68
- );
45
+ export function listResultFromEnvelope(data, legacyKey) {
46
+ const record = isRecord(data) ? data : {};
47
+ const legacyItems = record[legacyKey];
48
+ return createListResult(Array.isArray(legacyItems)
49
+ ? legacyItems
50
+ : Array.isArray(data)
51
+ ? data
52
+ : [], legacyKey);
69
53
  }
70
-
71
- export { assertKnownKeys, cleanOptionalString, cleanRequiredString, knownPayload, listResultFromEnvelope, readTopicId, requireTopicId, topicPayload };
72
- //# sourceMappingURL=boundaryClientSurface.js.map
73
54
  //# sourceMappingURL=boundaryClientSurface.js.map
package/dist/client.d.ts CHANGED
@@ -1,59 +1,12 @@
1
- import { AddWorktreeInput, MergeInput, CreateTaskInput, CompleteTaskInput, UpdateTaskInput } from './workflowClient.js';
2
- import { JsonObject } from './types.js';
3
- import { LucernClientConfig, CustomToolInput, BeliefsCompatCreateInput, BeliefsCompatUpdateConfidenceInput, BeliefsCompatForkInput } from './clientConfig.js';
4
- import { FunctionSurfaceInput } from './functionSurface.js';
5
- import './coreClient.js';
6
- import '@lucern/transport-core';
7
- import './authContext.js';
8
- import './contracts/auth-session.contract.js';
9
- import './contracts/workflow-runtime.contract.js';
10
- import './contracts/lens-workflow.contract.js';
11
- import './contracts/lens-filter.contract.js';
12
- import './clientHelpers.js';
13
- import './adminClient.js';
14
- import './controlObjectOwnership.js';
15
- import './answersClient.js';
16
- import './audiencesClient.js';
17
- import './auditClient.js';
18
- import './beliefsClient.js';
19
- import './opinion.js';
20
- import './contextClient.js';
21
- import './contextTypes.js';
22
- import './control-plane.js';
23
- import './decisionsClient.js';
24
- import './embeddingsClient.js';
25
- import './boundaryClientSurface.js';
26
- import './eventingClient.js';
27
- import './evidenceClient.js';
28
- import './graphAnalysisClient.js';
29
- import '@lucern/contracts';
30
- import './graphClient.js';
31
- import './graphRecommendationsClient.js';
32
- import './graphStateClassifierClient.js';
33
- import './harnessClient.js';
34
- import './identityClient.js';
35
- import './jobsClient.js';
36
- import './learningClient.js';
37
- import './modelRuntimeClient.js';
38
- import './ontologyClient.js';
39
- import './ontologyLinksClient.js';
40
- import './orgGraphSearchClient.js';
41
- import './packsClient.js';
42
- import './policyClient.js';
43
- import './reportsClient.js';
44
- import './schemaClient.js';
45
- import './sourcesClient.js';
46
- import './telemetryClient.js';
47
- import './toolRegistryClient.js';
48
- import './topicsClient.js';
49
-
1
+ import type { LucernClientConfig } from "./clientConfig";
2
+ export type { LucernClientConfig } from "./clientConfig";
50
3
  /**
51
4
  * Create the high-level Lucern SDK client with all domain namespaces.
52
5
  *
53
6
  * @param config - Client configuration with API key, base URL, and optional settings.
54
7
  * @returns The Lucern client with namespaced methods for beliefs, topics, evidence, decisions, and more.
55
8
  */
56
- declare function createLucernClient(config?: LucernClientConfig): {
9
+ export declare function createLucernClient(config?: LucernClientConfig): {
57
10
  coordination: {
58
11
  registerSession: any;
59
12
  heartbeatSession: any;
@@ -66,10 +19,10 @@ declare function createLucernClient(config?: LucernClientConfig): {
66
19
  claimFiles: any;
67
20
  };
68
21
  policy: {
69
- checkPermission(input: FunctionSurfaceInput): any;
22
+ checkPermission(input: import("./functionSurface").FunctionSurfaceInput): any;
70
23
  listAccessibleTopics(input?: Parameters<(...args: any[]) => any>[0]): any;
71
- filterByPermission(input: FunctionSurfaceInput): any;
72
- manageWritePolicy(input: FunctionSurfaceInput, idempotencyKey?: string): any;
24
+ filterByPermission(input: import("./functionSurface").FunctionSurfaceInput): any;
25
+ manageWritePolicy(input: import("./functionSurface").FunctionSurfaceInput, idempotencyKey?: string): any;
73
26
  raw: Record<string, (...args: any[]) => any> & {
74
27
  create: (...args: any[]) => any;
75
28
  link: (...args: any[]) => any;
@@ -88,17 +41,17 @@ declare function createLucernClient(config?: LucernClientConfig): {
88
41
  getFailureLog: any;
89
42
  };
90
43
  contracts: {
91
- create(input: FunctionSurfaceInput): any;
92
- createEpistemicContract(input: FunctionSurfaceInput): any;
44
+ create(input: import("./functionSurface").FunctionSurfaceInput): any;
45
+ createEpistemicContract(input: import("./functionSurface").FunctionSurfaceInput): any;
93
46
  list(input?: {
94
47
  beliefNodeId?: string;
95
48
  contractId?: string;
96
49
  status?: string;
97
50
  }): any;
98
- evaluate(input: FunctionSurfaceInput): any;
99
- evaluateContract(input: FunctionSurfaceInput): any;
100
- getStatus(input: FunctionSurfaceInput): any;
101
- getContractStatus(input: FunctionSurfaceInput): any;
51
+ evaluate(input: import("./functionSurface").FunctionSurfaceInput): any;
52
+ evaluateContract(input: import("./functionSurface").FunctionSurfaceInput): any;
53
+ getStatus(input: import("./functionSurface").FunctionSurfaceInput): any;
54
+ getContractStatus(input: import("./functionSurface").FunctionSurfaceInput): any;
102
55
  };
103
56
  bootstrap: {
104
57
  generateSessionHandoff: any;
@@ -136,7 +89,7 @@ declare function createLucernClient(config?: LucernClientConfig): {
136
89
  unregister: any;
137
90
  list: any;
138
91
  clear: any;
139
- invoke(name: string, input?: CustomToolInput): any;
92
+ invoke(name: string, input?: import("./clientConfig").CustomToolInput): any;
140
93
  namespace: any;
141
94
  };
142
95
  packs: {
@@ -259,8 +212,8 @@ declare function createLucernClient(config?: LucernClientConfig): {
259
212
  list: any;
260
213
  get: any;
261
214
  recordOutcome: any;
262
- lessons(decisionId: string, input: JsonObject, idempotencyKey?: string): Promise<any>;
263
- archive(decisionId: string, input?: JsonObject, idempotencyKey?: string): Promise<any>;
215
+ lessons(decisionId: string, input: import("./types").JsonObject, idempotencyKey?: string): Promise<any>;
216
+ archive(decisionId: string, input?: import("./types").JsonObject, idempotencyKey?: string): Promise<any>;
264
217
  readiness(topicId: string): any;
265
218
  calibration(topicId: string): any;
266
219
  pendingOutcomeReview(topicId: string): any;
@@ -271,8 +224,8 @@ declare function createLucernClient(config?: LucernClientConfig): {
271
224
  listLenses: (...args: any[]) => any;
272
225
  applyLensToTopic: (...args: any[]) => any;
273
226
  removeLensFromTopic: (...args: any[]) => any;
274
- create(input: AddWorktreeInput): any;
275
- add(input: AddWorktreeInput): any;
227
+ create(input: import("./workflowClient").AddWorktreeInput): any;
228
+ add(input: import("./workflowClient").AddWorktreeInput): any;
276
229
  list(query: Parameters<(...args: any[]) => any>[0]): any;
277
230
  listByTopic(query: Parameters<(...args: any[]) => any>[0]): any;
278
231
  findByPairedSprint(input: {
@@ -282,11 +235,11 @@ declare function createLucernClient(config?: LucernClientConfig): {
282
235
  limit?: number;
283
236
  }): Promise<any>;
284
237
  activate(worktreeId: string): any;
285
- updateMetadata(input: FunctionSurfaceInput): any;
286
- update(input: FunctionSurfaceInput): any;
238
+ updateMetadata(input: import("./functionSurface").FunctionSurfaceInput): any;
239
+ update(input: import("./functionSurface").FunctionSurfaceInput): any;
287
240
  updateTargets(input: Parameters<(...args: any[]) => any>[0]): any;
288
241
  listAll: (...args: any[]) => any;
289
- merge(worktreeId: string, input: MergeInput): any;
242
+ merge(worktreeId: string, input: import("./workflowClient").MergeInput): any;
290
243
  push: (...args: any[]) => any;
291
244
  openPullRequest: (...args: any[]) => any;
292
245
  pipelineSnapshot(topicId: string): any;
@@ -300,27 +253,27 @@ declare function createLucernClient(config?: LucernClientConfig): {
300
253
  listTopics(query?: Parameters<(...args: any[]) => any>[0]): any;
301
254
  compile: any;
302
255
  recordScopeLearning: any;
303
- discover(input: FunctionSurfaceInput): any;
256
+ discover(input: import("./functionSurface").FunctionSurfaceInput): any;
304
257
  analyzeTopicDensity: any;
305
258
  applyAutoBranching: any;
306
259
  seedBeliefLattice: any;
307
260
  getLatticeCoverage: any;
308
- matchEntityType(input: FunctionSurfaceInput): any;
309
- discoverEntityConnections(input: FunctionSurfaceInput): any;
310
- triggerBeliefReview(input: FunctionSurfaceInput): any;
261
+ matchEntityType(input: import("./functionSurface").FunctionSurfaceInput): any;
262
+ discoverEntityConnections(input: import("./functionSurface").FunctionSurfaceInput): any;
263
+ triggerBeliefReview(input: import("./functionSurface").FunctionSurfaceInput): any;
311
264
  };
312
265
  tasks: {
313
- create(input: CreateTaskInput): any;
314
- complete(taskId: string, input: CompleteTaskInput): any;
315
- update(taskId: string, input: UpdateTaskInput): any;
316
- list(input: FunctionSurfaceInput): any;
317
- listByTopic(input: FunctionSurfaceInput & {
266
+ create(input: import("./workflowClient").CreateTaskInput): any;
267
+ complete(taskId: string, input: import("./workflowClient").CompleteTaskInput): any;
268
+ update(taskId: string, input: import("./workflowClient").UpdateTaskInput): any;
269
+ list(input: import("./functionSurface").FunctionSurfaceInput): any;
270
+ listByTopic(input: import("./functionSurface").FunctionSurfaceInput & {
318
271
  topicId?: string;
319
272
  }): any;
320
- listByWorktree(input: FunctionSurfaceInput & {
273
+ listByWorktree(input: import("./functionSurface").FunctionSurfaceInput & {
321
274
  worktreeId: string;
322
275
  }): any;
323
- linkChat(taskId: string, input: JsonObject, idempotencyKey?: string): Promise<any>;
276
+ linkChat(taskId: string, input: import("./types").JsonObject, idempotencyKey?: string): Promise<any>;
324
277
  };
325
278
  topics: {
326
279
  list(input?: Parameters<(...args: any[]) => any>[0]): any;
@@ -335,14 +288,14 @@ declare function createLucernClient(config?: LucernClientConfig): {
335
288
  coverage(topicId: string, query?: Parameters<(...args: any[]) => any>[1]): any;
336
289
  remove: (...args: any[]) => any;
337
290
  bulkCreate: (...args: any[]) => any;
338
- materializeGraph(input?: FunctionSurfaceInput, idempotencyKey?: string): any;
339
- materializeTopicGraph(input?: FunctionSurfaceInput, idempotencyKey?: string): any;
340
- graphSpine(input?: FunctionSurfaceInput): any;
341
- getTopicGraphSpine(input?: FunctionSurfaceInput): any;
291
+ materializeGraph(input?: import("./functionSurface").FunctionSurfaceInput, idempotencyKey?: string): any;
292
+ materializeTopicGraph(input?: import("./functionSurface").FunctionSurfaceInput, idempotencyKey?: string): any;
293
+ graphSpine(input?: import("./functionSurface").FunctionSurfaceInput): any;
294
+ getTopicGraphSpine(input?: import("./functionSurface").FunctionSurfaceInput): any;
342
295
  };
343
296
  answers: {
344
- create(input: FunctionSurfaceInput): any;
345
- get(input: FunctionSurfaceInput): any;
297
+ create(input: import("./functionSurface").FunctionSurfaceInput): any;
298
+ get(input: import("./functionSurface").FunctionSurfaceInput): any;
346
299
  };
347
300
  contradictions: {
348
301
  flag(args: {
@@ -371,16 +324,16 @@ declare function createLucernClient(config?: LucernClientConfig): {
371
324
  get(ontologyId: string): any;
372
325
  bind(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: Parameters<(...args: any[]) => any>[1]): any;
373
326
  match(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: Parameters<(...args: any[]) => any>[1]): any;
374
- create(input: FunctionSurfaceInput): any;
375
- update(input: FunctionSurfaceInput): any;
376
- archive(input: FunctionSurfaceInput): any;
377
- createVersion(input: FunctionSurfaceInput): any;
378
- publishVersion(input: FunctionSurfaceInput): any;
379
- publishOntologyVersion(input: FunctionSurfaceInput): any;
380
- deprecateVersion(input: FunctionSurfaceInput): any;
381
- deprecateOntologyVersion(input: FunctionSurfaceInput): any;
382
- resolveEffective(input: FunctionSurfaceInput): any;
383
- resolveEffectiveOntology(input: FunctionSurfaceInput): any;
327
+ create(input: import("./functionSurface").FunctionSurfaceInput): any;
328
+ update(input: import("./functionSurface").FunctionSurfaceInput): any;
329
+ archive(input: import("./functionSurface").FunctionSurfaceInput): any;
330
+ createVersion(input: import("./functionSurface").FunctionSurfaceInput): any;
331
+ publishVersion(input: import("./functionSurface").FunctionSurfaceInput): any;
332
+ publishOntologyVersion(input: import("./functionSurface").FunctionSurfaceInput): any;
333
+ deprecateVersion(input: import("./functionSurface").FunctionSurfaceInput): any;
334
+ deprecateOntologyVersion(input: import("./functionSurface").FunctionSurfaceInput): any;
335
+ resolveEffective(input: import("./functionSurface").FunctionSurfaceInput): any;
336
+ resolveEffectiveOntology(input: import("./functionSurface").FunctionSurfaceInput): any;
384
337
  raw: any;
385
338
  };
386
339
  graph: {
@@ -478,14 +431,14 @@ declare function createLucernClient(config?: LucernClientConfig): {
478
431
  updateDeliveryStatus: any;
479
432
  };
480
433
  beliefs: {
481
- create(input: BeliefsCompatCreateInput): any;
434
+ create(input: import("./clientConfig").BeliefsCompatCreateInput): any;
482
435
  get(nodeId: string): any;
483
436
  refine(nodeId: string, textOrInput: string | {
484
437
  text: string;
485
438
  rationale?: string;
486
439
  }, rationale?: string): any;
487
- updateConfidence(nodeId: string, input: BeliefsCompatUpdateConfidenceInput): any;
488
- modulateConfidence(nodeId: string, input: BeliefsCompatUpdateConfidenceInput): any;
440
+ updateConfidence(nodeId: string, input: import("./clientConfig").BeliefsCompatUpdateConfidenceInput): any;
441
+ modulateConfidence(nodeId: string, input: import("./clientConfig").BeliefsCompatUpdateConfidenceInput): any;
489
442
  updateStatus(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
490
443
  updateRationale(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
491
444
  linkBeliefs(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
@@ -493,7 +446,7 @@ declare function createLucernClient(config?: LucernClientConfig): {
493
446
  updateCriticality(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
494
447
  batchUpdateCriticality(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
495
448
  reassignTopic(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
496
- fork(nodeId: string, input: BeliefsCompatForkInput): any;
449
+ fork(nodeId: string, input: import("./clientConfig").BeliefsCompatForkInput): any;
497
450
  archive(nodeId: string, input?: string | {
498
451
  reason?: string;
499
452
  rationale?: string;
@@ -524,7 +477,7 @@ declare function createLucernClient(config?: LucernClientConfig): {
524
477
  health(id: string): any;
525
478
  };
526
479
  edges: {
527
- create(args: FunctionSurfaceInput & {
480
+ create(args: import("./functionSurface").FunctionSurfaceInput & {
528
481
  from?: unknown;
529
482
  to?: unknown;
530
483
  sourceId?: string;
@@ -536,15 +489,15 @@ declare function createLucernClient(config?: LucernClientConfig): {
536
489
  context?: string;
537
490
  reasoning?: string;
538
491
  }, idempotencyKey?: string): any;
539
- createEdge(input: FunctionSurfaceInput, idempotencyKey?: string): any;
540
- update(input: FunctionSurfaceInput, idempotencyKey?: string): any;
541
- updateEdge(input: FunctionSurfaceInput, idempotencyKey?: string): any;
542
- remove(input: FunctionSurfaceInput, idempotencyKey?: string): any;
543
- removeEdge(input: FunctionSurfaceInput, idempotencyKey?: string): any;
544
- removeBetween(input: FunctionSurfaceInput, idempotencyKey?: string): any;
545
- removeEdgesBetween(input: FunctionSurfaceInput, idempotencyKey?: string): any;
546
- batchCreate(input: FunctionSurfaceInput, idempotencyKey?: string): any;
547
- batchCreateEdges(input: FunctionSurfaceInput, idempotencyKey?: string): any;
492
+ createEdge(input: import("./functionSurface").FunctionSurfaceInput, idempotencyKey?: string): any;
493
+ update(input: import("./functionSurface").FunctionSurfaceInput, idempotencyKey?: string): any;
494
+ updateEdge(input: import("./functionSurface").FunctionSurfaceInput, idempotencyKey?: string): any;
495
+ remove(input: import("./functionSurface").FunctionSurfaceInput, idempotencyKey?: string): any;
496
+ removeEdge(input: import("./functionSurface").FunctionSurfaceInput, idempotencyKey?: string): any;
497
+ removeBetween(input: import("./functionSurface").FunctionSurfaceInput, idempotencyKey?: string): any;
498
+ removeEdgesBetween(input: import("./functionSurface").FunctionSurfaceInput, idempotencyKey?: string): any;
499
+ batchCreate(input: import("./functionSurface").FunctionSurfaceInput, idempotencyKey?: string): any;
500
+ batchCreateEdges(input: import("./functionSurface").FunctionSurfaceInput, idempotencyKey?: string): any;
548
501
  delete(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
549
502
  list(args: {
550
503
  sourceId: string;
@@ -568,11 +521,24 @@ declare function createLucernClient(config?: LucernClientConfig): {
568
521
  sourceUrl?: string;
569
522
  targetId?: string;
570
523
  weight?: number;
571
- metadata?: JsonObject;
524
+ evidenceRelation?: "supports" | "contradicts";
525
+ confidence?: number;
526
+ beliefRelations?: Array<{
527
+ beliefId?: string;
528
+ beliefNodeId?: string;
529
+ targetId?: string;
530
+ relation?: "supports" | "contradicts" | "supporting" | "contradicting";
531
+ evidenceRelation?: "supports" | "contradicts";
532
+ confidence?: number;
533
+ weight?: number;
534
+ rationale?: string;
535
+ }>;
536
+ metadata?: import("./types").JsonObject;
572
537
  title?: string;
573
538
  content?: string;
574
539
  contentType?: string;
575
540
  kind?: string;
541
+ rationale?: string;
576
542
  supports?: {
577
543
  nodeId: string;
578
544
  weight: number;
@@ -603,12 +569,16 @@ declare function createLucernClient(config?: LucernClientConfig): {
603
569
  questionId?: string;
604
570
  targetType?: "belief" | "question" | string;
605
571
  weight?: number;
572
+ evidenceRelation?: "supports" | "contradicts";
573
+ confidence?: number;
606
574
  rationale?: string;
607
575
  }): any;
608
576
  linkToBelief(args: {
609
577
  evidenceId: string;
610
578
  beliefId: string;
611
- weight: number;
579
+ weight?: number;
580
+ evidenceRelation?: "supports" | "contradicts";
581
+ confidence?: number;
612
582
  rationale?: string;
613
583
  }): any;
614
584
  classifyEvidence(beliefId: string, evidenceId: string, config?: Parameters<any>[2], idempotencyKey?: string): any;
@@ -629,7 +599,7 @@ declare function createLucernClient(config?: LucernClientConfig): {
629
599
  topicId?: string;
630
600
  priority?: string;
631
601
  linkedBeliefId?: string;
632
- metadata?: JsonObject;
602
+ metadata?: import("./types").JsonObject;
633
603
  }): any;
634
604
  get(questionId: string): any;
635
605
  refine(questionId: string, text: string, refinementReason?: string): any;
@@ -685,5 +655,4 @@ declare function createLucernClient(config?: LucernClientConfig): {
685
655
  cursor?: string;
686
656
  }) => Promise<any>;
687
657
  };
688
-
689
- export { LucernClientConfig, createLucernClient };
658
+ //# sourceMappingURL=client.d.ts.map