@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
@@ -0,0 +1,101 @@
1
+ import { type GatewayClientConfig, type GatewayScope, LucernApiError } from "./coreClient";
2
+ import type { JsonObject } from "./types";
3
+ export { LucernApiError };
4
+ export type { GatewayScope, PlatformGatewaySuccess } from "./coreClient";
5
+ export type PacksClientConfig = GatewayClientConfig;
6
+ export type PackInstallInput = GatewayScope & {
7
+ packKey: string;
8
+ version?: string;
9
+ autoEnable?: boolean;
10
+ metadata?: JsonObject;
11
+ };
12
+ export type PackEnableInput = GatewayScope & {
13
+ packKey: string;
14
+ metadata?: JsonObject;
15
+ };
16
+ export type PackDisableInput = GatewayScope & {
17
+ packKey: string;
18
+ force?: boolean;
19
+ metadata?: JsonObject;
20
+ };
21
+ export type PackUpgradeInput = GatewayScope & {
22
+ packKey: string;
23
+ mode: "prepare" | "canary" | "commit" | "rollback";
24
+ targetVersion?: string;
25
+ metadata?: JsonObject;
26
+ };
27
+ export type PackEntitlementInput = GatewayScope & {
28
+ packKey: string;
29
+ status: "active" | "disabled" | "revoked";
30
+ allowedLifecycles?: Array<"active" | "beta" | "experimental">;
31
+ minVersion?: string;
32
+ maxVersion?: string;
33
+ metadata?: JsonObject;
34
+ };
35
+ /**
36
+ * Create the packs client for pack catalog, state, and entitlement operations.
37
+ */
38
+ export declare function createPacksClient(config?: PacksClientConfig): {
39
+ /**
40
+ * List catalog entries for available packs.
41
+ */
42
+ listCatalog(): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "catalog">>>;
43
+ /**
44
+ * @deprecated Use listCatalog.
45
+ */
46
+ getCatalog(): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "catalog">>>;
47
+ /**
48
+ * List pack states for the current scope.
49
+ */
50
+ listStates(query?: GatewayScope): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "states">>>;
51
+ /**
52
+ * @deprecated Use listStates.
53
+ */
54
+ getStates(query?: GatewayScope): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "states">>>;
55
+ /**
56
+ * Get health details for a pack.
57
+ */
58
+ getHealth(packKey: string, query?: GatewayScope): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
59
+ /**
60
+ * List pack telemetry entries.
61
+ */
62
+ listTelemetry(query?: GatewayScope & {
63
+ lookbackHours?: number;
64
+ limit?: number;
65
+ }): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "telemetry">>>;
66
+ /**
67
+ * @deprecated Use listTelemetry.
68
+ */
69
+ getTelemetry(query?: GatewayScope & {
70
+ lookbackHours?: number;
71
+ limit?: number;
72
+ }): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "telemetry">>>;
73
+ /**
74
+ * Create a pack entitlement.
75
+ */
76
+ createEntitlement(input: PackEntitlementInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
77
+ /**
78
+ * Update a pack entitlement.
79
+ */
80
+ updateEntitlement(input: PackEntitlementInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
81
+ /**
82
+ * @deprecated Use createEntitlement or updateEntitlement.
83
+ */
84
+ upsertEntitlement(input: PackEntitlementInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
85
+ /**
86
+ * Install a pack.
87
+ */
88
+ install(input: PackInstallInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
89
+ /**
90
+ * Enable a pack.
91
+ */
92
+ enable(input: PackEnableInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
93
+ /**
94
+ * Disable a pack.
95
+ */
96
+ disable(input: PackDisableInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
97
+ /**
98
+ * Upgrade a pack.
99
+ */
100
+ upgrade(input: PackUpgradeInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
101
+ };
@@ -1,16 +1,9 @@
1
- import { GatewayClientConfig, GatewayScope, PlatformGatewaySuccess } from './coreClient.js';
2
- export { LucernApiError } from './coreClient.js';
3
- import { ListResult } from './types.js';
4
- import './contracts/workflow-runtime.contract.js';
5
- import './contracts/lens-workflow.contract.js';
6
- import './contracts/lens-filter.contract.js';
7
-
8
- /** Configuration for the policy client. */
9
- type PolicyClientConfig = GatewayClientConfig;
10
- /** Permission direction: read access or write access. */
11
- type PermissionKind = "read" | "write";
12
- /** Permission level for a write policy rule. */
13
- type WritePolicyPermission = "allow" | "deny" | "review_required";
1
+ import { type GatewayClientConfig, type GatewayScope, LucernApiError } from "./coreClient";
2
+ export { LucernApiError };
3
+ export type { GatewayScope, PlatformGatewaySuccess } from "./coreClient";
4
+ export type PolicyClientConfig = GatewayClientConfig;
5
+ export type PermissionKind = "read" | "write";
6
+ export type WritePolicyPermission = "allow" | "deny" | "review_required";
14
7
  type TopicRecord = {
15
8
  topicId?: string;
16
9
  name?: string;
@@ -18,8 +11,7 @@ type TopicRecord = {
18
11
  isOwner?: boolean;
19
12
  [key: string]: unknown;
20
13
  };
21
- /** Structured explanation of how a policy decision was derived. */
22
- type PolicyDecisionExplanation = {
14
+ export type PolicyDecisionExplanation = {
23
15
  summary?: string;
24
16
  matchedReasonCode?: string;
25
17
  steps?: Array<{
@@ -30,8 +22,7 @@ type PolicyDecisionExplanation = {
30
22
  }>;
31
23
  [key: string]: unknown;
32
24
  };
33
- /** Result of a permission check against the policy engine. */
34
- type PermissionDecision = {
25
+ export type PermissionDecision = {
35
26
  allowed?: boolean;
36
27
  decision?: string;
37
28
  reasonCode?: string;
@@ -42,8 +33,7 @@ type PermissionDecision = {
42
33
  traceId?: string | null;
43
34
  explanation?: PolicyDecisionExplanation;
44
35
  };
45
- /** A persisted write policy rule controlling mutation access. */
46
- type WritePolicyRecord = {
36
+ export type WritePolicyRecord = {
47
37
  id?: string;
48
38
  topicId?: string;
49
39
  role?: string;
@@ -58,8 +48,7 @@ type WritePolicyRecord = {
58
48
  resolution?: string;
59
49
  [key: string]: unknown;
60
50
  };
61
- /** Input for creating a write policy rule. */
62
- type WritePolicyCreateInput = GatewayScope & {
51
+ export type WritePolicyCreateInput = GatewayScope & {
63
52
  topicId?: string;
64
53
  role: string;
65
54
  toolCategory: string;
@@ -69,8 +58,7 @@ type WritePolicyCreateInput = GatewayScope & {
69
58
  rationale?: string;
70
59
  createdBy?: string;
71
60
  };
72
- /** Input for partially updating an existing write policy rule. */
73
- type WritePolicyUpdateInput = GatewayScope & {
61
+ export type WritePolicyUpdateInput = GatewayScope & {
74
62
  topicId?: string;
75
63
  clearTopicId?: boolean;
76
64
  role?: string;
@@ -82,29 +70,10 @@ type WritePolicyUpdateInput = GatewayScope & {
82
70
  rationale?: string;
83
71
  clearRationale?: boolean;
84
72
  };
85
- type TenantPolicyPermission = {
86
- resource: string;
87
- actions: string[];
88
- };
89
- type TenantPolicyRecord = {
90
- id?: string;
91
- tenantId: string;
92
- workspaceId?: string;
93
- roleName: string;
94
- description?: string;
95
- permissions: TenantPolicyPermission[];
96
- groupBindings: string[];
97
- createdAt?: number;
98
- updatedAt?: number;
99
- createdBy?: string;
100
- updatedBy?: string;
101
- };
102
73
  /**
103
- * Create the policy client for permission checks, grants, and write policies.
104
- * @param config - Gateway transport configuration.
105
- * @returns An object with methods to check permissions, manage grants, and manage write policies.
74
+ * Create the policy client for permission checks and grants.
106
75
  */
107
- declare function createPolicyClient(config?: PolicyClientConfig): {
76
+ export declare function createPolicyClient(config?: PolicyClientConfig): {
108
77
  /**
109
78
  * List policy decisions in the current scope.
110
79
  */
@@ -115,7 +84,7 @@ declare function createPolicyClient(config?: PolicyClientConfig): {
115
84
  principalId?: string;
116
85
  topicId?: string;
117
86
  limit?: number;
118
- }): Promise<PlatformGatewaySuccess<ListResult<any, "decisions">>>;
87
+ }): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "decisions">>>;
119
88
  /**
120
89
  * Create a permission grant.
121
90
  */
@@ -127,7 +96,7 @@ declare function createPolicyClient(config?: PolicyClientConfig): {
127
96
  groupId?: string;
128
97
  beliefClusterId?: string;
129
98
  expiresAt?: number;
130
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
99
+ }, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
131
100
  /**
132
101
  * Delete a permission grant by revoking it.
133
102
  */
@@ -137,10 +106,7 @@ declare function createPolicyClient(config?: PolicyClientConfig): {
137
106
  principalId?: string;
138
107
  groupId?: string;
139
108
  beliefClusterId?: string;
140
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
141
- /**
142
- * List write policy rules for the current scope.
143
- */
109
+ }, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
144
110
  listWritePolicies(query?: GatewayScope & {
145
111
  topicId?: string;
146
112
  role?: string;
@@ -155,9 +121,6 @@ declare function createPolicyClient(config?: PolicyClientConfig): {
155
121
  policyTraceId: string | null;
156
122
  idempotentReplay: boolean;
157
123
  }>;
158
- /**
159
- * Create a write policy rule.
160
- */
161
124
  createWritePolicy(input: WritePolicyCreateInput, idempotencyKey?: string): Promise<{
162
125
  data: {
163
126
  id: string | undefined;
@@ -169,9 +132,6 @@ declare function createPolicyClient(config?: PolicyClientConfig): {
169
132
  policyTraceId: string | null;
170
133
  idempotentReplay: boolean;
171
134
  }>;
172
- /**
173
- * Update an existing write policy rule by identifier.
174
- */
175
135
  updateWritePolicy(id: string, input: WritePolicyUpdateInput, idempotencyKey?: string): Promise<{
176
136
  data: {
177
137
  id: string | undefined;
@@ -183,63 +143,10 @@ declare function createPolicyClient(config?: PolicyClientConfig): {
183
143
  policyTraceId: string | null;
184
144
  idempotentReplay: boolean;
185
145
  }>;
186
- /**
187
- * Delete a write policy rule by identifier.
188
- */
189
- deleteWritePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
146
+ deleteWritePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<{
190
147
  id?: string;
191
148
  deleted?: boolean;
192
149
  }>>;
193
- /**
194
- * List tenant role policies for the current scope.
195
- */
196
- listRolePolicies(query?: GatewayScope): Promise<{
197
- data: {
198
- policies: TenantPolicyRecord[];
199
- };
200
- success: true;
201
- correlationId: string;
202
- policyTraceId: string | null;
203
- idempotentReplay: boolean;
204
- }>;
205
- /**
206
- * Create a tenant role policy.
207
- */
208
- createRolePolicy(input: GatewayScope & {
209
- roleName: string;
210
- description?: string;
211
- permissions: TenantPolicyPermission[];
212
- groupBindings?: string[];
213
- }, idempotencyKey?: string): Promise<{
214
- data: {
215
- policy: TenantPolicyRecord | null;
216
- };
217
- success: true;
218
- correlationId: string;
219
- policyTraceId: string | null;
220
- idempotentReplay: boolean;
221
- }>;
222
- /**
223
- * Update a tenant role policy by identifier.
224
- */
225
- updateRolePolicy(id: string, input: GatewayScope & {
226
- roleName: string;
227
- description?: string;
228
- permissions: TenantPolicyPermission[];
229
- groupBindings?: string[];
230
- }, idempotencyKey?: string): Promise<{
231
- data: {
232
- policy: TenantPolicyRecord | null;
233
- };
234
- success: true;
235
- correlationId: string;
236
- policyTraceId: string | null;
237
- idempotentReplay: boolean;
238
- }>;
239
- /**
240
- * Delete a tenant role policy by identifier.
241
- */
242
- deleteRolePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
243
150
  /**
244
151
  * Check a permission decision for a topic or project scope.
245
152
  */
@@ -249,7 +156,7 @@ declare function createPolicyClient(config?: PolicyClientConfig): {
249
156
  principal?: string;
250
157
  principalId?: string;
251
158
  beliefClusterId?: string;
252
- }): Promise<PlatformGatewaySuccess<PermissionDecision>>;
159
+ }): Promise<import("./coreClient").PlatformGatewaySuccess<PermissionDecision>>;
253
160
  /**
254
161
  * List accessible topics for a principal.
255
162
  */
@@ -295,5 +202,3 @@ declare function createPolicyClient(config?: PolicyClientConfig): {
295
202
  };
296
203
  }>;
297
204
  };
298
-
299
- export { GatewayScope, type PermissionDecision, type PermissionKind, PlatformGatewaySuccess, type PolicyClientConfig, type PolicyDecisionExplanation, type TenantPolicyPermission, type TenantPolicyRecord, type WritePolicyCreateInput, type WritePolicyPermission, type WritePolicyRecord, type WritePolicyUpdateInput, createPolicyClient };
@@ -0,0 +1,31 @@
1
+ import { type GatewayClientConfig } from "./coreClient";
2
+ import type { TopicIdentifierInput, ReportTemplatesResponse, ReportWithSectionsResponse } from "./types";
3
+ export type ReportsClientConfig = GatewayClientConfig;
4
+ export type { ProjectReportsResponse, ReportTemplatesResponse, ReportWithSectionsResponse, } from "./types";
5
+ /**
6
+ * Create the reports client for report templates and generated reports.
7
+ */
8
+ export declare function createReportsClient(config?: ReportsClientConfig): {
9
+ /**
10
+ * List report templates.
11
+ */
12
+ listTemplates(args?: {
13
+ slug?: string;
14
+ }): Promise<import("./coreClient").PlatformGatewaySuccess<ReportTemplatesResponse>>;
15
+ /**
16
+ * @deprecated Use listTemplates.
17
+ */
18
+ getTemplates(args?: {
19
+ slug?: string;
20
+ }): Promise<import("./coreClient").PlatformGatewaySuccess<ReportTemplatesResponse>>;
21
+ /**
22
+ * List reports for a topic scope.
23
+ */
24
+ listReports(input: TopicIdentifierInput, args?: {
25
+ summary?: boolean;
26
+ }): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "reports">>>;
27
+ /**
28
+ * Get a generated report.
29
+ */
30
+ getReport(reportId: string): Promise<import("./coreClient").PlatformGatewaySuccess<ReportWithSectionsResponse>>;
31
+ };
@@ -0,0 +1,54 @@
1
+ import { type GatewayClientConfig, type GatewayScope, LucernApiError } from "./coreClient";
2
+ import type { JsonObject } from "./types";
3
+ export { LucernApiError };
4
+ export type { GatewayScope, PlatformGatewaySuccess } from "./coreClient";
5
+ export type SchemaClientConfig = GatewayClientConfig;
6
+ export type SchemaPackInstallInput = GatewayScope & {
7
+ packKey: string;
8
+ version?: string;
9
+ autoEnable?: boolean;
10
+ metadata?: JsonObject;
11
+ };
12
+ export type SchemaEntitlementInput = GatewayScope & {
13
+ packKey: string;
14
+ status: "active" | "disabled" | "revoked";
15
+ allowedLifecycles?: Array<"active" | "beta" | "experimental">;
16
+ minVersion?: string;
17
+ maxVersion?: string;
18
+ metadata?: JsonObject;
19
+ };
20
+ /**
21
+ * Create the schema client for pack catalog and entitlement operations.
22
+ */
23
+ export declare function createSchemaClient(config?: SchemaClientConfig): {
24
+ /**
25
+ * List schema packs.
26
+ */
27
+ listPacks(scope?: GatewayScope): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "packs">>>;
28
+ /**
29
+ * Install a schema pack.
30
+ */
31
+ installPack(input: SchemaPackInstallInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
32
+ /**
33
+ * Get a schema pack by identifier.
34
+ */
35
+ getPack(packId: string, scope?: GatewayScope): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
36
+ /**
37
+ * List schema entitlements.
38
+ */
39
+ listEntitlements(scope?: GatewayScope & {
40
+ packKey?: string;
41
+ }): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<any, "entitlements">>>;
42
+ /**
43
+ * Create a schema entitlement.
44
+ */
45
+ createEntitlement(input: SchemaEntitlementInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
46
+ /**
47
+ * Update a schema entitlement.
48
+ */
49
+ updateEntitlement(input: SchemaEntitlementInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
50
+ /**
51
+ * @deprecated Use createEntitlement or updateEntitlement.
52
+ */
53
+ upsertEntitlement(input: SchemaEntitlementInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
54
+ };
@@ -0,0 +1,55 @@
1
+ import type { PlatformGatewaySuccess } from "./coreClient";
2
+ import type { JsonObject, ListResult } from "./types";
3
+ type TopicScopedValue = {
4
+ topicId?: string;
5
+ };
6
+ type TextScopedValue = {
7
+ text?: string;
8
+ canonicalText?: string;
9
+ };
10
+ type AnyRecord = Record<string, unknown>;
11
+ /**
12
+ * Resolve the canonical topic identifier.
13
+ */
14
+ export declare function resolveTopicId(value: TopicScopedValue): string | undefined;
15
+ /**
16
+ * Resolve the canonical text field from text-first or legacy canonicalText-first inputs.
17
+ */
18
+ export declare function resolveText(value: TextScopedValue): string | undefined;
19
+ /**
20
+ * Attach the topicId to a record.
21
+ */
22
+ export declare function withTopicAlias<T extends AnyRecord>(value: T): T;
23
+ /**
24
+ * Attach the text/canonicalText alias pair to a record.
25
+ */
26
+ export declare function withTextAlias<T extends AnyRecord>(value: T): T;
27
+ /**
28
+ * Attach topic and text aliases to SDK node-like records.
29
+ */
30
+ export declare function withSdkAliases<T extends AnyRecord>(value: T): T;
31
+ /**
32
+ * Normalize a belief/question/evidence write payload to the canonical gateway shape.
33
+ */
34
+ export declare function normalizeNodeWriteInput<T extends JsonObject>(value: T): T;
35
+ /**
36
+ * Build a topic-aware query object.
37
+ */
38
+ export declare function normalizeTopicQuery<T extends JsonObject>(value: T): T;
39
+ /**
40
+ * Extract list items from array or list-envelope payloads.
41
+ */
42
+ export declare function asListItems<T>(data: unknown, legacyKey?: string): T[];
43
+ /**
44
+ * Standardize list data to { items, total } while retaining an optional legacy array key.
45
+ */
46
+ export declare function createListResult<T, LegacyKey extends string>(items: T[], legacyKey?: LegacyKey): ListResult<T, LegacyKey>;
47
+ /**
48
+ * Map a gateway success envelope's data while preserving the transport metadata.
49
+ */
50
+ export declare function mapGatewayData<T, U>(response: PlatformGatewaySuccess<T>, mapper: (data: T) => U): PlatformGatewaySuccess<U>;
51
+ /**
52
+ * Apply SDK aliases across all items in a list-like payload.
53
+ */
54
+ export declare function mapAliasedList<TItem extends AnyRecord, LegacyKey extends string>(data: unknown, legacyKey?: LegacyKey): ListResult<TItem, LegacyKey>;
55
+ export {};
@@ -0,0 +1,45 @@
1
+ import { type GatewayClientConfig } from "./coreClient";
2
+ import type { JsonObject, TopicCoverageResponse, TopicIdentifierInput, TopicListResponse, TopicRecord, TopicTreeResponse } from "./types";
3
+ export type TopicsClientConfig = GatewayClientConfig;
4
+ export type TopicListInput = TopicIdentifierInput & {
5
+ ontologyId?: string;
6
+ parentTopicId?: string;
7
+ status?: string;
8
+ type?: string;
9
+ };
10
+ export type TopicCreateInput = TopicIdentifierInput & {
11
+ name: string;
12
+ description?: string;
13
+ type?: string;
14
+ parentTopicId?: string;
15
+ ontologyId?: string;
16
+ tenantId?: string;
17
+ workspaceId?: string;
18
+ visibility?: "private" | "team" | "firm" | "external" | "public";
19
+ createdBy?: string;
20
+ metadata?: JsonObject;
21
+ };
22
+ export type TopicUpdateInput = TopicIdentifierInput & {
23
+ name?: string;
24
+ description?: string;
25
+ type?: string;
26
+ ontologyId?: string;
27
+ clearOntologyId?: boolean;
28
+ status?: "active" | "archived" | "watching";
29
+ visibility?: "private" | "team" | "firm" | "external" | "public";
30
+ };
31
+ export type TopicTreeQuery = {
32
+ maxDepth?: number;
33
+ };
34
+ export type TopicCoverageQuery = {
35
+ includeDescendants?: boolean;
36
+ maxDepth?: number;
37
+ };
38
+ export declare function createTopicsClient(config?: TopicsClientConfig): {
39
+ list(query?: TopicListInput): Promise<import("./coreClient").PlatformGatewaySuccess<TopicListResponse>>;
40
+ get(topicId: string): Promise<import("./coreClient").PlatformGatewaySuccess<TopicRecord>>;
41
+ create(input: TopicCreateInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<TopicRecord>>;
42
+ update(topicId: string, input: TopicUpdateInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<TopicRecord>>;
43
+ getTree(topicId: string, query?: TopicTreeQuery): Promise<import("./coreClient").PlatformGatewaySuccess<TopicTreeResponse>>;
44
+ getCoverage(topicId: string, query?: TopicCoverageQuery): Promise<import("./coreClient").PlatformGatewaySuccess<TopicCoverageResponse>>;
45
+ };