@lucern/contracts 0.3.0-alpha.1 → 0.3.0-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/api-enums.contract.d.ts +5 -3
  3. package/dist/api-enums.contract.js +14 -12
  4. package/dist/api-enums.contract.js.map +1 -1
  5. package/dist/component-boundary.contract.d.ts +14 -0
  6. package/dist/component-boundary.contract.js +174 -0
  7. package/dist/component-boundary.contract.js.map +1 -0
  8. package/dist/component-host-boundary.contract.d.ts +46 -0
  9. package/dist/component-host-boundary.contract.js +60 -0
  10. package/dist/component-host-boundary.contract.js.map +1 -0
  11. package/dist/context-pack.contract.d.ts +5 -3
  12. package/dist/context-pack.contract.js.map +1 -1
  13. package/dist/{defineTable-CBQ03FXl.d.ts → defineTable-t1wr5wgn.d.ts} +1 -1
  14. package/dist/{dsl-BgpoVOVQ.d.ts → dsl-DVPthQGY.d.ts} +2 -2
  15. package/dist/dsl.d.ts +2 -2
  16. package/dist/dsl.js +1 -4
  17. package/dist/dsl.js.map +1 -1
  18. package/dist/edge-policy-manifest-Dw5IhT1L.d.ts +133 -0
  19. package/dist/function-registry/beliefs.d.ts +54 -41
  20. package/dist/function-registry/beliefs.js +759 -38
  21. package/dist/function-registry/beliefs.js.map +1 -1
  22. package/dist/function-registry/coding.d.ts +9 -0
  23. package/dist/function-registry/coding.js +811 -39
  24. package/dist/function-registry/coding.js.map +1 -1
  25. package/dist/function-registry/context.d.ts +19 -13
  26. package/dist/function-registry/context.js +750 -42
  27. package/dist/function-registry/context.js.map +1 -1
  28. package/dist/function-registry/contracts.d.ts +6 -0
  29. package/dist/function-registry/contracts.js +715 -35
  30. package/dist/function-registry/contracts.js.map +1 -1
  31. package/dist/function-registry/coordination.d.ts +12 -0
  32. package/dist/function-registry/coordination.js +715 -35
  33. package/dist/function-registry/coordination.js.map +1 -1
  34. package/dist/function-registry/edges.d.ts +165 -0
  35. package/dist/function-registry/edges.js +923 -67
  36. package/dist/function-registry/edges.js.map +1 -1
  37. package/dist/function-registry/evidence.d.ts +44 -33
  38. package/dist/function-registry/evidence.js +769 -47
  39. package/dist/function-registry/evidence.js.map +1 -1
  40. package/dist/function-registry/graph.d.ts +149 -53
  41. package/dist/function-registry/graph.js +831 -42
  42. package/dist/function-registry/graph.js.map +1 -1
  43. package/dist/function-registry/helpers.d.ts +6 -3
  44. package/dist/function-registry/helpers.js +716 -36
  45. package/dist/function-registry/helpers.js.map +1 -1
  46. package/dist/function-registry/identity.d.ts +6 -0
  47. package/dist/function-registry/identity.js +715 -35
  48. package/dist/function-registry/identity.js.map +1 -1
  49. package/dist/function-registry/index.d.ts +5 -3
  50. package/dist/function-registry/index.js +722 -39
  51. package/dist/function-registry/index.js.map +1 -1
  52. package/dist/function-registry/judgments.d.ts +14 -9
  53. package/dist/function-registry/judgments.js +727 -38
  54. package/dist/function-registry/judgments.js.map +1 -1
  55. package/dist/function-registry/legacy.d.ts +4 -0
  56. package/dist/function-registry/legacy.js +715 -35
  57. package/dist/function-registry/legacy.js.map +1 -1
  58. package/dist/function-registry/lenses.d.ts +24 -17
  59. package/dist/function-registry/lenses.js +738 -38
  60. package/dist/function-registry/lenses.js.map +1 -1
  61. package/dist/function-registry/manifest.d.ts +6 -6
  62. package/dist/function-registry/manifest.js +18 -2
  63. package/dist/function-registry/manifest.js.map +1 -1
  64. package/dist/function-registry/nodes.d.ts +412 -0
  65. package/dist/function-registry/nodes.js +5303 -0
  66. package/dist/function-registry/nodes.js.map +1 -0
  67. package/dist/function-registry/ontologies.d.ts +59 -45
  68. package/dist/function-registry/ontologies.js +733 -41
  69. package/dist/function-registry/ontologies.js.map +1 -1
  70. package/dist/function-registry/pipeline.d.ts +19 -13
  71. package/dist/function-registry/pipeline.js +724 -38
  72. package/dist/function-registry/pipeline.js.map +1 -1
  73. package/dist/function-registry/questions.d.ts +64 -49
  74. package/dist/function-registry/questions.js +812 -43
  75. package/dist/function-registry/questions.js.map +1 -1
  76. package/dist/function-registry/tasks.d.ts +24 -17
  77. package/dist/function-registry/tasks.js +776 -44
  78. package/dist/function-registry/tasks.js.map +1 -1
  79. package/dist/function-registry/topics.d.ts +109 -21
  80. package/dist/function-registry/topics.js +797 -39
  81. package/dist/function-registry/topics.js.map +1 -1
  82. package/dist/function-registry/types.d.ts +6 -2
  83. package/dist/function-registry/worktrees.d.ts +94 -41
  84. package/dist/function-registry/worktrees.js +854 -47
  85. package/dist/function-registry/worktrees.js.map +1 -1
  86. package/dist/function-registry-input-audit.d.ts +13 -0
  87. package/dist/function-registry-input-audit.js +166 -0
  88. package/dist/function-registry-input-audit.js.map +1 -0
  89. package/dist/gateway.contract.d.ts +5 -0
  90. package/dist/gateway.contract.js.map +1 -1
  91. package/dist/generated/convexSchemas.d.ts +3 -3
  92. package/dist/generated/convexSchemas.js +38 -18
  93. package/dist/generated/convexSchemas.js.map +1 -1
  94. package/dist/generated/infisicalRuntimeEnv.d.ts +70 -0
  95. package/dist/generated/infisicalRuntimeEnv.js +26572 -0
  96. package/dist/generated/infisicalRuntimeEnv.js.map +1 -0
  97. package/dist/generated/lucernGatewayEnv.d.ts +17 -0
  98. package/dist/generated/lucernGatewayEnv.js +38 -0
  99. package/dist/generated/lucernGatewayEnv.js.map +1 -0
  100. package/dist/generated/lucernWebPublicEnv.d.ts +26 -0
  101. package/dist/generated/lucernWebPublicEnv.js +32 -0
  102. package/dist/generated/lucernWebPublicEnv.js.map +1 -0
  103. package/dist/generated/lucernWebServerEnv.d.ts +33 -0
  104. package/dist/generated/lucernWebServerEnv.js +51 -0
  105. package/dist/generated/lucernWebServerEnv.js.map +1 -0
  106. package/dist/generated/schema-manifest.json +1199 -138
  107. package/dist/generated/tableOwnership.d.ts +47 -27
  108. package/dist/generated/tableOwnership.js +66 -26
  109. package/dist/generated/tableOwnership.js.map +1 -1
  110. package/dist/generated/tier-expectations.json +62 -8
  111. package/dist/graph-intelligence.contract.d.ts +506 -0
  112. package/dist/graph-intelligence.contract.js +595 -0
  113. package/dist/graph-intelligence.contract.js.map +1 -0
  114. package/dist/graph-types/index.d.ts +5 -1
  115. package/dist/graph-types/index.js +15 -4
  116. package/dist/graph-types/index.js.map +1 -1
  117. package/dist/index-CM1Pl_vI.d.ts +28 -0
  118. package/dist/index.d.ts +29 -414
  119. package/dist/index.js +34791 -1088
  120. package/dist/index.js.map +1 -1
  121. package/dist/infisical-runtime.contract.d.ts +1768 -0
  122. package/dist/infisical-runtime.contract.js +3093 -0
  123. package/dist/infisical-runtime.contract.js.map +1 -0
  124. package/dist/lens-filter.contract.js +4 -3
  125. package/dist/lens-filter.contract.js.map +1 -1
  126. package/dist/lens-workflow.contract.js +4 -3
  127. package/dist/lens-workflow.contract.js.map +1 -1
  128. package/dist/manifests/edge-policy-manifest.d.ts +2 -0
  129. package/dist/manifests/edge-policy-manifest.data.d.ts +13 -0
  130. package/dist/manifests/edge-policy-manifest.data.js +26 -0
  131. package/dist/manifests/edge-policy-manifest.data.js.map +1 -0
  132. package/dist/manifests/edge-policy-manifest.js +92 -0
  133. package/dist/manifests/edge-policy-manifest.js.map +1 -0
  134. package/dist/manifests/infisical-runtime-manifest.d.ts +1672 -0
  135. package/dist/manifests/infisical-runtime-manifest.js +2948 -0
  136. package/dist/manifests/infisical-runtime-manifest.js.map +1 -0
  137. package/dist/manifests/invariant-manifest.d.ts +65 -0
  138. package/dist/manifests/invariant-manifest.js +18 -0
  139. package/dist/manifests/invariant-manifest.js.map +1 -0
  140. package/dist/manifests/invariants/ast-utils.d.ts +14 -0
  141. package/dist/manifests/invariants/ast-utils.js +54 -0
  142. package/dist/manifests/invariants/ast-utils.js.map +1 -0
  143. package/dist/manifests/invariants/index.d.ts +15 -0
  144. package/dist/manifests/invariants/index.js +183 -0
  145. package/dist/manifests/invariants/index.js.map +1 -0
  146. package/dist/manifests/invariants/inv-1-beliefs-append-only.d.ts +12 -0
  147. package/dist/manifests/invariants/inv-1-beliefs-append-only.js +94 -0
  148. package/dist/manifests/invariants/inv-1-beliefs-append-only.js.map +1 -0
  149. package/dist/manifests/invariants/inv-14-no-silent-transitions.d.ts +12 -0
  150. package/dist/manifests/invariants/inv-14-no-silent-transitions.js +99 -0
  151. package/dist/manifests/invariants/inv-14-no-silent-transitions.js.map +1 -0
  152. package/dist/manifests/invariants/manifest-1-projections-declare-audit.d.ts +12 -0
  153. package/dist/manifests/invariants/manifest-1-projections-declare-audit.js +42 -0
  154. package/dist/manifests/invariants/manifest-1-projections-declare-audit.js.map +1 -0
  155. package/dist/manifests/tenant-client-manifest.d.ts +322 -0
  156. package/dist/manifests/tenant-client-manifest.js +432 -0
  157. package/dist/manifests/tenant-client-manifest.js.map +1 -0
  158. package/dist/mcp-gateway-boundary.contract.d.ts +201 -0
  159. package/dist/mcp-gateway-boundary.contract.js +45 -0
  160. package/dist/mcp-gateway-boundary.contract.js.map +1 -0
  161. package/dist/projections/check-convex-args-shape.d.ts +3 -0
  162. package/dist/projections/check-convex-args-shape.js +403 -0
  163. package/dist/projections/check-convex-args-shape.js.map +1 -0
  164. package/dist/projections/create-evidence.projection.d.ts +176 -0
  165. package/dist/projections/create-evidence.projection.js +130 -0
  166. package/dist/projections/create-evidence.projection.js.map +1 -0
  167. package/dist/projections/index.d.ts +102 -0
  168. package/dist/projections/index.js +352 -0
  169. package/dist/projections/index.js.map +1 -0
  170. package/dist/projections/list-beliefs.projection.d.ts +36 -0
  171. package/dist/projections/list-beliefs.projection.js +54 -0
  172. package/dist/projections/list-beliefs.projection.js.map +1 -0
  173. package/dist/projections/list-tasks.projection.d.ts +44 -0
  174. package/dist/projections/list-tasks.projection.js +57 -0
  175. package/dist/projections/list-tasks.projection.js.map +1 -0
  176. package/dist/projections/modulate-confidence.projection.d.ts +219 -0
  177. package/dist/projections/modulate-confidence.projection.js +148 -0
  178. package/dist/projections/modulate-confidence.projection.js.map +1 -0
  179. package/dist/projections/projection-dsl.d.ts +11 -0
  180. package/dist/projections/projection-dsl.js +8 -0
  181. package/dist/projections/projection-dsl.js.map +1 -0
  182. package/dist/proof-attestation.json +45 -0
  183. package/dist/schema-helpers/enumValidation.js +2 -5
  184. package/dist/schema-helpers/enumValidation.js.map +1 -1
  185. package/dist/schema-helpers/spine/nodes/decision.js +2 -1
  186. package/dist/schema-helpers/spine/nodes/decision.js.map +1 -1
  187. package/dist/schema-helpers/spine/tables/epistemicNodes.js +27 -27
  188. package/dist/schema-helpers/spine/tables/epistemicNodes.js.map +1 -1
  189. package/dist/schemas/component-table-manifest.d.ts +6 -6
  190. package/dist/schemas/component-table-manifest.js +2 -2
  191. package/dist/schemas/component-table-manifest.js.map +1 -1
  192. package/dist/schemas/enums.d.ts +5 -2
  193. package/dist/schemas/enums.js +5 -2
  194. package/dist/schemas/enums.js.map +1 -1
  195. package/dist/schemas/index.d.ts +3 -3
  196. package/dist/schemas/index.js +1129 -139
  197. package/dist/schemas/index.js.map +1 -1
  198. package/dist/schemas/manifest.d.ts +2979 -949
  199. package/dist/schemas/manifest.js +1127 -137
  200. package/dist/schemas/manifest.js.map +1 -1
  201. package/dist/schemas/sl-opinion.d.ts +4 -4
  202. package/dist/schemas/tables/controlPlane/accessControl.d.ts +260 -0
  203. package/dist/schemas/tables/controlPlane/accessControl.js +653 -0
  204. package/dist/schemas/tables/controlPlane/accessControl.js.map +1 -0
  205. package/dist/schemas/tables/{identity → controlPlane}/agent.d.ts +1 -1
  206. package/dist/schemas/tables/{identity → controlPlane}/agent.js +3 -3
  207. package/dist/schemas/tables/controlPlane/agent.js.map +1 -0
  208. package/dist/schemas/tables/{identity → controlPlane}/epistemic.d.ts +1 -1
  209. package/dist/schemas/tables/{identity → controlPlane}/epistemic.js +3 -3
  210. package/dist/schemas/tables/controlPlane/epistemic.js.map +1 -0
  211. package/dist/schemas/tables/{identity → controlPlane}/model.d.ts +1 -1
  212. package/dist/schemas/tables/{identity → controlPlane}/model.js +6 -6
  213. package/dist/schemas/tables/controlPlane/model.js.map +1 -0
  214. package/dist/schemas/tables/{identity → controlPlane}/platform.d.ts +11 -11
  215. package/dist/schemas/tables/{identity → controlPlane}/platform.js +18 -18
  216. package/dist/schemas/tables/controlPlane/platform.js.map +1 -0
  217. package/dist/schemas/tables/{identity → controlPlane}/project.d.ts +1 -1
  218. package/dist/schemas/tables/{identity → controlPlane}/project.js +3 -3
  219. package/dist/schemas/tables/controlPlane/project.js.map +1 -0
  220. package/dist/schemas/tables/{identity → controlPlane}/user.d.ts +1 -1
  221. package/dist/schemas/tables/{identity → controlPlane}/user.js +3 -3
  222. package/dist/schemas/tables/controlPlane/user.js.map +1 -0
  223. package/dist/schemas/tables/kernel/config.d.ts +1 -1
  224. package/dist/schemas/tables/kernel/config.js.map +1 -1
  225. package/dist/schemas/tables/kernel/coordination.d.ts +1 -1
  226. package/dist/schemas/tables/kernel/coordination.js.map +1 -1
  227. package/dist/schemas/tables/kernel/decision.d.ts +1 -1
  228. package/dist/schemas/tables/kernel/decision.js.map +1 -1
  229. package/dist/schemas/tables/kernel/embedding.d.ts +1 -1
  230. package/dist/schemas/tables/kernel/embedding.js.map +1 -1
  231. package/dist/schemas/tables/kernel/epistemic.d.ts +7 -7
  232. package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
  233. package/dist/schemas/tables/kernel/idempotency.d.ts +1 -1
  234. package/dist/schemas/tables/kernel/idempotency.js.map +1 -1
  235. package/dist/schemas/tables/kernel/infra.d.ts +5 -5
  236. package/dist/schemas/tables/kernel/infra.js.map +1 -1
  237. package/dist/schemas/tables/kernel/intelligence.d.ts +11 -11
  238. package/dist/schemas/tables/kernel/intelligence.js.map +1 -1
  239. package/dist/schemas/tables/kernel/lens.d.ts +5 -5
  240. package/dist/schemas/tables/kernel/lens.js.map +1 -1
  241. package/dist/schemas/tables/kernel/ontology.d.ts +1 -1
  242. package/dist/schemas/tables/kernel/ontology.js.map +1 -1
  243. package/dist/schemas/tables/kernel/platform.d.ts +13 -13
  244. package/dist/schemas/tables/kernel/platform.js.map +1 -1
  245. package/dist/schemas/tables/kernel/spine.d.ts +5 -4
  246. package/dist/schemas/tables/kernel/spine.js +6 -2
  247. package/dist/schemas/tables/kernel/spine.js.map +1 -1
  248. package/dist/schemas/tables/kernel/task.d.ts +43 -43
  249. package/dist/schemas/tables/kernel/task.js.map +1 -1
  250. package/dist/schemas/tables/kernel/topic.d.ts +1 -1
  251. package/dist/schemas/tables/kernel/topic.js +5 -1
  252. package/dist/schemas/tables/kernel/topic.js.map +1 -1
  253. package/dist/schemas/tables/kernel/workflow.d.ts +1 -1
  254. package/dist/schemas/tables/kernel/workflow.js.map +1 -1
  255. package/dist/schemas/tables/kernel/worktree.d.ts +55 -55
  256. package/dist/schemas/tables/kernel/worktree.js.map +1 -1
  257. package/dist/schemas/tables/mc/identity.d.ts +44 -4
  258. package/dist/schemas/tables/mc/identity.js +66 -1
  259. package/dist/schemas/tables/mc/identity.js.map +1 -1
  260. package/dist/schemas/tables/mc/methodology.d.ts +1 -1
  261. package/dist/schemas/tables/mc/methodology.js.map +1 -1
  262. package/dist/schemas/tables/mc/pack.d.ts +21 -21
  263. package/dist/schemas/tables/mc/pack.js.map +1 -1
  264. package/dist/schemas/tables/mc/policy.d.ts +2 -2
  265. package/dist/schemas/tables/mc/policy.js +1 -1
  266. package/dist/schemas/tables/mc/policy.js.map +1 -1
  267. package/dist/schemas/tables/mc/registry.d.ts +5 -5
  268. package/dist/schemas/tables/mc/registry.js.map +1 -1
  269. package/dist/schemas/tables/mc/runtime.d.ts +109 -3
  270. package/dist/schemas/tables/mc/runtime.js +330 -104
  271. package/dist/schemas/tables/mc/runtime.js.map +1 -1
  272. package/dist/schemas/tables/mc/tenant.d.ts +3 -2
  273. package/dist/schemas/tables/mc/tenant.js +2 -1
  274. package/dist/schemas/tables/mc/tenant.js.map +1 -1
  275. package/dist/schemas/tables/mc/workspace.d.ts +28 -5
  276. package/dist/schemas/tables/mc/workspace.js +36 -2
  277. package/dist/schemas/tables/mc/workspace.js.map +1 -1
  278. package/dist/sdk-methods.contract.d.ts +2 -2
  279. package/dist/{sdk-tools.contract-S4ia0TTo.d.ts → sdk-tools.contract-BNklQDfB.d.ts} +2 -2
  280. package/dist/sdk-tools.contract.d.ts +2 -2
  281. package/dist/sdk-tools.contract.js +672 -24
  282. package/dist/sdk-tools.contract.js.map +1 -1
  283. package/dist/tenant-bootstrap-seed.contract.d.ts +1269 -0
  284. package/dist/tenant-bootstrap-seed.contract.js +751 -0
  285. package/dist/tenant-bootstrap-seed.contract.js.map +1 -0
  286. package/dist/tenant-bootstrap-seed.defaults.d.ts +16 -0
  287. package/dist/tenant-bootstrap-seed.defaults.js +303 -0
  288. package/dist/tenant-bootstrap-seed.defaults.js.map +1 -0
  289. package/dist/tenant-client.contract.d.ts +349 -0
  290. package/dist/tenant-client.contract.js +488 -0
  291. package/dist/tenant-client.contract.js.map +1 -0
  292. package/dist/{tool-contracts-C92-9ueT.d.ts → tool-contracts-BevD9Ho2.d.ts} +36 -2
  293. package/dist/tool-contracts.d.ts +1 -1
  294. package/dist/tool-contracts.js +673 -25
  295. package/dist/tool-contracts.js.map +1 -1
  296. package/package.json +30 -1
  297. package/dist/index-CV-0_VWJ.d.ts +0 -25
  298. package/dist/schemas/tables/identity/agent.js.map +0 -1
  299. package/dist/schemas/tables/identity/epistemic.js.map +0 -1
  300. package/dist/schemas/tables/identity/model.js.map +0 -1
  301. package/dist/schemas/tables/identity/platform.js.map +0 -1
  302. package/dist/schemas/tables/identity/project.js.map +0 -1
  303. package/dist/schemas/tables/identity/user.js.map +0 -1
@@ -0,0 +1,349 @@
1
+ /**
2
+ * Tenant client contract
3
+ *
4
+ * Defines the generic boundary for any customer-owned product that consumes
5
+ * Lucern through the SDK, hosted API, or MCP server. Tenant clients may run
6
+ * their own UI, auth provider, deployment, and data plane, but reasoning
7
+ * operations must enter through the published packages below.
8
+ */
9
+ declare const TENANT_CLIENT_CONTRACT_VERSION: "2026-04-27";
10
+ declare const TENANT_CLIENT_AUTH_MODES: readonly ["interactive_user", "service_principal", "tenant_api_key", "session_token"];
11
+ type TenantClientAuthMode = (typeof TENANT_CLIENT_AUTH_MODES)[number];
12
+ declare const TENANT_CLIENT_PRINCIPAL_TYPES: readonly ["human", "service", "agent"];
13
+ type TenantClientPrincipalType = (typeof TENANT_CLIENT_PRINCIPAL_TYPES)[number];
14
+ declare const TENANT_CLIENT_REQUIRED_CONTEXT_FIELDS: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
15
+ type TenantClientRequiredContextField = (typeof TENANT_CLIENT_REQUIRED_CONTEXT_FIELDS)[number];
16
+ declare const TENANT_CLIENT_OPTIONAL_CONTEXT_FIELDS: readonly ["principalType", "roles", "sessionId", "delegationChain"];
17
+ type TenantClientOptionalContextField = (typeof TENANT_CLIENT_OPTIONAL_CONTEXT_FIELDS)[number];
18
+ declare const TENANT_CLIENT_INSTALL_TOKEN_ENV: "INSTALL_LUCERN_NPM";
19
+ declare const TENANT_CLIENT_INSTALL_TOKEN_INFISICAL_PATH: "tenants/shared";
20
+ declare const TENANT_CLIENT_FORBIDDEN_INSTALL_TOKEN_INFISICAL_PATHS: readonly ["/platform/publish"];
21
+ declare const TENANT_CLIENT_FORBIDDEN_SECRET_ENV: readonly ["NPM_TOKEN"];
22
+ type TenantClientForbiddenInstallTokenInfisicalPath = (typeof TENANT_CLIENT_FORBIDDEN_INSTALL_TOKEN_INFISICAL_PATHS)[number];
23
+ type TenantClientForbiddenSecretEnv = (typeof TENANT_CLIENT_FORBIDDEN_SECRET_ENV)[number];
24
+ declare const TENANT_CLIENT_INSTALLABLE_PACKAGES: readonly [{
25
+ readonly packageName: "@lucern/access-control";
26
+ readonly role: "runtime_entrypoint";
27
+ readonly directTenantImport: true;
28
+ }, {
29
+ readonly packageName: "@lucern/agent";
30
+ readonly role: "platform_runtime";
31
+ readonly directTenantImport: false;
32
+ }, {
33
+ readonly packageName: "@lucern/auth";
34
+ readonly role: "sdk_dependency";
35
+ readonly directTenantImport: false;
36
+ }, {
37
+ readonly packageName: "@lucern/cli";
38
+ readonly role: "developer_tool";
39
+ readonly directTenantImport: false;
40
+ }, {
41
+ readonly packageName: "@lucern/client-core";
42
+ readonly role: "sdk_dependency";
43
+ readonly directTenantImport: false;
44
+ }, {
45
+ readonly packageName: "@lucern/confidence";
46
+ readonly role: "sdk_dependency";
47
+ readonly directTenantImport: false;
48
+ }, {
49
+ readonly packageName: "@lucern/config";
50
+ readonly role: "configuration";
51
+ readonly directTenantImport: false;
52
+ }, {
53
+ readonly packageName: "@lucern/contracts";
54
+ readonly role: "contract_entrypoint";
55
+ readonly directTenantImport: true;
56
+ }, {
57
+ readonly packageName: "@lucern/control-plane";
58
+ readonly role: "component_runtime";
59
+ readonly directTenantImport: false;
60
+ }, {
61
+ readonly packageName: "@lucern/developer-kit";
62
+ readonly role: "developer_tool";
63
+ readonly directTenantImport: false;
64
+ }, {
65
+ readonly packageName: "@lucern/events";
66
+ readonly role: "sdk_dependency";
67
+ readonly directTenantImport: false;
68
+ }, {
69
+ readonly packageName: "@lucern/graph-primitives";
70
+ readonly role: "sdk_dependency";
71
+ readonly directTenantImport: false;
72
+ }, {
73
+ readonly packageName: "@lucern/graph-sync";
74
+ readonly role: "host_addon_runtime";
75
+ readonly directTenantImport: true;
76
+ }, {
77
+ readonly packageName: "@lucern/mcp";
78
+ readonly role: "runtime_entrypoint";
79
+ readonly directTenantImport: true;
80
+ }, {
81
+ readonly packageName: "@lucern/pack-host";
82
+ readonly role: "platform_runtime";
83
+ readonly directTenantImport: false;
84
+ }, {
85
+ readonly packageName: "@lucern/pack-installer";
86
+ readonly role: "developer_tool";
87
+ readonly directTenantImport: false;
88
+ }, {
89
+ readonly packageName: "@lucern/proof-compiler";
90
+ readonly role: "developer_tool";
91
+ readonly directTenantImport: false;
92
+ }, {
93
+ readonly packageName: "@lucern/react";
94
+ readonly role: "runtime_entrypoint";
95
+ readonly directTenantImport: true;
96
+ }, {
97
+ readonly packageName: "@lucern/reasoning-kernel";
98
+ readonly role: "component_runtime";
99
+ readonly directTenantImport: false;
100
+ }, {
101
+ readonly packageName: "@lucern/sdk";
102
+ readonly role: "runtime_entrypoint";
103
+ readonly directTenantImport: true;
104
+ }, {
105
+ readonly packageName: "@lucern/secrets";
106
+ readonly role: "sdk_dependency";
107
+ readonly directTenantImport: false;
108
+ }, {
109
+ readonly packageName: "@lucern/server-core";
110
+ readonly role: "platform_runtime";
111
+ readonly directTenantImport: false;
112
+ }, {
113
+ readonly packageName: "@lucern/testing";
114
+ readonly role: "test_support";
115
+ readonly directTenantImport: false;
116
+ }, {
117
+ readonly packageName: "@lucern/types";
118
+ readonly role: "contract_entrypoint";
119
+ readonly directTenantImport: true;
120
+ }];
121
+ type TenantClientInstallablePackage = (typeof TENANT_CLIENT_INSTALLABLE_PACKAGES)[number];
122
+ type TenantClientPackageRole = TenantClientInstallablePackage["role"];
123
+ type TenantClientInstallablePackageName = TenantClientInstallablePackage["packageName"];
124
+ /**
125
+ * Direct package installs are package.json entries owned by the tenant repo.
126
+ * Direct imports are source-code imports that tenant application code may use.
127
+ *
128
+ * These concepts intentionally differ: `@lucern/cli` is a direct install when a
129
+ * tenant repo needs the `lucern` binary, but it is not a direct application
130
+ * import. `@lucern/reasoning-kernel` and `@lucern/control-plane` are direct installs
131
+ * for Convex component binding, while tenant app code should only import their
132
+ * explicit component config subpaths.
133
+ */
134
+ type TenantClientInstallProfile = {
135
+ id: string;
136
+ description: string;
137
+ packageNames: readonly TenantClientInstallablePackageName[];
138
+ dependencyField: "dependencies" | "devDependencies" | "mixed";
139
+ };
140
+ declare const TENANT_CLIENT_FULL_SUITE_PACKAGE_NAMES: readonly TenantClientInstallablePackageName[];
141
+ declare const TENANT_CLIENT_INSTALL_PROFILES: readonly [{
142
+ readonly id: "core_app_runtime";
143
+ readonly description: "Smallest tenant app/runtime install for typed Lucern API calls plus tool-access policy helpers.";
144
+ readonly packageNames: readonly ["@lucern/sdk", "@lucern/access-control"];
145
+ readonly dependencyField: "dependencies";
146
+ }, {
147
+ readonly id: "react_app_runtime";
148
+ readonly description: "React tenant app install for hooks, provider, curated graph components, and direct SDK calls.";
149
+ readonly packageNames: readonly ["@lucern/react", "@lucern/sdk", "@lucern/access-control"];
150
+ readonly dependencyField: "dependencies";
151
+ }, {
152
+ readonly id: "convex_components";
153
+ readonly description: "Tenant Convex host install for binding the Lucern control-plane and reasoning-kernel components.";
154
+ readonly packageNames: readonly ["@lucern/control-plane", "@lucern/reasoning-kernel"];
155
+ readonly dependencyField: "dependencies";
156
+ }, {
157
+ readonly id: "graph_mirroring_addon";
158
+ readonly description: "Optional tenant Convex host install for Neo4j graph projection, edge topology writes, backfill, health checks, and query proxy helpers.";
159
+ readonly packageNames: readonly ["@lucern/graph-sync"];
160
+ readonly dependencyField: "dependencies";
161
+ }, {
162
+ readonly id: "operator_cli";
163
+ readonly description: "Developer/operator install for the `lucern` binary, including tenant bootstrap seed commands.";
164
+ readonly packageNames: readonly ["@lucern/cli"];
165
+ readonly dependencyField: "devDependencies";
166
+ }, {
167
+ readonly id: "mcp_runtime";
168
+ readonly description: "Agent runtime install for the standalone Lucern MCP server and hosted route helpers.";
169
+ readonly packageNames: readonly ["@lucern/mcp"];
170
+ readonly dependencyField: "dependencies";
171
+ }, {
172
+ readonly id: "contracts_and_types";
173
+ readonly description: "Compile-time contract/type install for codegen, audits, and tenant integration validation.";
174
+ readonly packageNames: readonly ["@lucern/contracts", "@lucern/types"];
175
+ readonly dependencyField: "dependencies";
176
+ }, {
177
+ readonly id: "full_suite";
178
+ readonly description: "Full coherent Lucern package suite for design-partner repos that want every published runtime, tool, component, test, and config package pinned together.";
179
+ readonly packageNames: readonly ("@lucern/access-control" | "@lucern/agent" | "@lucern/auth" | "@lucern/cli" | "@lucern/client-core" | "@lucern/confidence" | "@lucern/config" | "@lucern/contracts" | "@lucern/control-plane" | "@lucern/developer-kit" | "@lucern/events" | "@lucern/graph-primitives" | "@lucern/graph-sync" | "@lucern/mcp" | "@lucern/pack-host" | "@lucern/pack-installer" | "@lucern/proof-compiler" | "@lucern/react" | "@lucern/reasoning-kernel" | "@lucern/sdk" | "@lucern/secrets" | "@lucern/server-core" | "@lucern/testing" | "@lucern/types")[];
180
+ readonly dependencyField: "mixed";
181
+ }];
182
+ type TenantClientInstallProfileId = (typeof TENANT_CLIENT_INSTALL_PROFILES)[number]["id"];
183
+ /**
184
+ * Direct imports tenant-owned product code may use. This is intentionally
185
+ * smaller than TENANT_CLIENT_INSTALLABLE_PACKAGES: several publishable packages
186
+ * are installed as SDK dependencies, tooling, or platform runtimes but should
187
+ * not become the application integration surface.
188
+ */
189
+ declare const TENANT_CLIENT_PUBLIC_IMPORTS: readonly [{
190
+ readonly packageName: "@lucern/sdk";
191
+ readonly surface: "runtime";
192
+ readonly subpaths: "published_exports";
193
+ readonly description: "TypeScript SDK runtime and generated operation namespaces.";
194
+ }, {
195
+ readonly packageName: "@lucern/react";
196
+ readonly surface: "runtime";
197
+ readonly subpaths: "published_exports";
198
+ readonly description: "React bindings for tenant-owned UI applications.";
199
+ }, {
200
+ readonly packageName: "@lucern/mcp";
201
+ readonly surface: "runtime";
202
+ readonly subpaths: "published_exports";
203
+ readonly description: "MCP client/server entry points and hosted route helpers.";
204
+ }, {
205
+ readonly packageName: "@lucern/graph-sync";
206
+ readonly surface: "runtime";
207
+ readonly subpaths: "published_exports";
208
+ readonly description: "Optional Neo4j graph mirroring host actions, edge API, query proxy, backfill, and health helpers.";
209
+ }, {
210
+ readonly packageName: "@lucern/contracts";
211
+ readonly surface: "contract";
212
+ readonly subpaths: "published_exports";
213
+ readonly description: "Published type and manifest contracts.";
214
+ }, {
215
+ readonly packageName: "@lucern/access-control";
216
+ readonly surface: "runtime";
217
+ readonly subpaths: "published_exports";
218
+ readonly description: "Tenant runtime access-control helpers, including effective tool access.";
219
+ }, {
220
+ readonly packageName: "@lucern/types";
221
+ readonly surface: "contract";
222
+ readonly subpaths: "published_exports";
223
+ readonly description: "Published type-only helpers for tenant integration code.";
224
+ }];
225
+ type TenantClientPublicImport = (typeof TENANT_CLIENT_PUBLIC_IMPORTS)[number];
226
+ type TenantClientPublicPackage = TenantClientPublicImport["packageName"];
227
+ type TenantClientPublicSurface = TenantClientPublicImport["surface"];
228
+ declare const TENANT_CLIENT_COMPONENT_CONFIG_IMPORTS: readonly [{
229
+ readonly packageName: "@lucern/control-plane";
230
+ readonly importPath: "@lucern/control-plane/convex.config";
231
+ readonly surface: "component_config";
232
+ readonly description: "Convex component binding config for tenant deployments that install the Lucern control plane.";
233
+ }, {
234
+ readonly packageName: "@lucern/reasoning-kernel";
235
+ readonly importPath: "@lucern/reasoning-kernel/convex.config";
236
+ readonly surface: "component_config";
237
+ readonly description: "Convex component binding config for tenant deployments that install the Lucern reasoning kernel.";
238
+ }, {
239
+ readonly packageName: "@lucern/reasoning-kernel";
240
+ readonly importPath: "@lucern/reasoning-kernel/runtime.config";
241
+ readonly surface: "component_config";
242
+ readonly description: "Runtime config alias for tenant deployments that install the Lucern reasoning kernel.";
243
+ }];
244
+ type TenantClientComponentConfigImport = (typeof TENANT_CLIENT_COMPONENT_CONFIG_IMPORTS)[number];
245
+ type TenantClientAllowedImport = TenantClientPublicImport | TenantClientComponentConfigImport;
246
+ declare function findTenantClientInstallablePackage(packageName: string): TenantClientInstallablePackage | undefined;
247
+ declare function isTenantClientInstallablePackage(packageName: string): boolean;
248
+ declare const TENANT_CLIENT_REQUIRED_SDK_NAMESPACES: readonly ["bootstrap", "context", "beliefs", "evidence", "questions", "graph", "worktrees", "topics", "edges", "contradictions", "contracts", "graphIntel", "graphIntelligence", "graphAnalysis", "graphRecommendations", "orgGraphSearch", "embeddings", "ontologyLinks", "graphStateClassifier", "tools", "identity", "modelRuntime", "events", "jobs", "telemetry"];
249
+ type TenantClientRequiredSdkNamespace = (typeof TENANT_CLIENT_REQUIRED_SDK_NAMESPACES)[number];
250
+ declare const TENANT_CLIENT_CAPABILITIES: readonly [{
251
+ readonly id: "identity.bootstrap_session";
252
+ readonly description: "Start a scoped Lucern session for a tenant principal.";
253
+ readonly surfaces: readonly ["@lucern/sdk", "@lucern/mcp"];
254
+ readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
255
+ }, {
256
+ readonly id: "reasoning.context.compile";
257
+ readonly description: "Compile tenant and workspace scoped reasoning context.";
258
+ readonly surfaces: readonly ["@lucern/sdk", "@lucern/react", "@lucern/mcp"];
259
+ readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
260
+ }, {
261
+ readonly id: "reasoning.graph.read";
262
+ readonly description: "Read beliefs, evidence, questions, topics, graph edges, and lineage.";
263
+ readonly surfaces: readonly ["@lucern/sdk", "@lucern/react", "@lucern/mcp"];
264
+ readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
265
+ }, {
266
+ readonly id: "reasoning.graph.write";
267
+ readonly description: "Create and update graph objects through authorized APIs.";
268
+ readonly surfaces: readonly ["@lucern/sdk", "@lucern/mcp"];
269
+ readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
270
+ }, {
271
+ readonly id: "reasoning.graph_intelligence.run";
272
+ readonly description: "Discover and run Graph Intelligence query recipes for structural graph analysis.";
273
+ readonly surfaces: readonly ["@lucern/sdk", "@lucern/cli", "@lucern/mcp"];
274
+ readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
275
+ }, {
276
+ readonly id: "reasoning.graph_mirroring.install";
277
+ readonly description: "Install and run the optional Neo4j graph mirror for paid or enterprise tenant deployments.";
278
+ readonly surfaces: readonly ["@lucern/graph-sync", "@lucern/cli"];
279
+ readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
280
+ }, {
281
+ readonly id: "workflow.worktree_lifecycle";
282
+ readonly description: "Create, review, merge, and close scoped worktrees.";
283
+ readonly surfaces: readonly ["@lucern/sdk", "@lucern/react", "@lucern/mcp"];
284
+ readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
285
+ }];
286
+ type TenantClientCapability = (typeof TENANT_CLIENT_CAPABILITIES)[number];
287
+ type TenantClientCapabilityId = TenantClientCapability["id"];
288
+ declare const TENANT_CLIENT_ISOLATION_RULES: readonly [{
289
+ readonly id: "tenant_workspace_scope_required";
290
+ readonly description: "Runtime operations must resolve both tenantId and workspaceId before reaching Lucern reasoning state.";
291
+ }, {
292
+ readonly id: "principal_audit_required";
293
+ readonly description: "Runtime operations must carry principalId, authMode, and scopes for audit attribution.";
294
+ }, {
295
+ readonly id: "no_private_lucern_imports";
296
+ readonly description: "Tenant code must not import Lucern source, Convex internals, generated adapters, or unpublished package internals.";
297
+ }];
298
+ type TenantClientIsolationRule = (typeof TENANT_CLIENT_ISOLATION_RULES)[number];
299
+ declare const TENANT_CLIENT_FORBIDDEN_IMPORT_PATTERNS: readonly [{
300
+ readonly id: "deep_src_import";
301
+ readonly pattern: "^@lucern/[^/]+/src(?:/|$)";
302
+ readonly description: "Published packages must not be bypassed through src paths.";
303
+ }, {
304
+ readonly id: "deep_dist_import";
305
+ readonly pattern: "^@lucern/[^/]+/dist(?:/|$)";
306
+ readonly description: "Published package exports must be used instead of dist file paths.";
307
+ }, {
308
+ readonly id: "generated_adapter_import";
309
+ readonly pattern: "^@lucern/[^/]+/(?:adapters/)?_generated(?:/|$)";
310
+ readonly description: "Generated Lucern adapters are internal deployment artifacts.";
311
+ }, {
312
+ readonly id: "private_runtime_import";
313
+ readonly pattern: "^@lucern/[^/]+/(?:internal|private)(?:/|$)";
314
+ readonly description: "Internal and private package subpaths are not public SDK API.";
315
+ }, {
316
+ readonly id: "workspace_source_import";
317
+ readonly pattern: "^(?:packages|modules|services|lucern|apps)/(?:.+/)?src(?:/|$)";
318
+ readonly description: "Tenant clients must not import source files from the Lucern monorepo.";
319
+ }, {
320
+ readonly id: "root_alias_lucern_import";
321
+ readonly pattern: "^@/(?:lucern|packages|modules|services|apps)(?:/|$)";
322
+ readonly description: "Tenant clients must not depend on Lucern repo-local path aliases.";
323
+ }, {
324
+ readonly id: "relative_lucern_source_import";
325
+ readonly pattern: "^\\.\\.?/(?:.+/)?(?:packages|modules|services|lucern|apps)(?:/|$)";
326
+ readonly description: "Tenant clients must not reach back into Lucern source through relative paths.";
327
+ }, {
328
+ readonly id: "monorepo_path_import";
329
+ readonly pattern: "lucern-repo";
330
+ readonly description: "Absolute imports that name the Lucern repository are not portable tenant code.";
331
+ }];
332
+ type TenantClientForbiddenImportPattern = (typeof TENANT_CLIENT_FORBIDDEN_IMPORT_PATTERNS)[number];
333
+ type TenantClientForbiddenImportPatternId = TenantClientForbiddenImportPattern["id"];
334
+ type TenantClientImportDecision = "public" | "forbidden" | "local" | "external";
335
+ type TenantClientImportClassification = {
336
+ importPath: string;
337
+ decision: TenantClientImportDecision;
338
+ publicImport?: TenantClientAllowedImport;
339
+ pattern?: TenantClientForbiddenImportPattern;
340
+ reason: string;
341
+ };
342
+ declare function classifyTenantClientImport(importPath: string): TenantClientImportClassification;
343
+ declare function isTenantClientPublicImport(importPath: string): boolean;
344
+ declare function isTenantClientComponentConfigImport(importPath: string): boolean;
345
+ declare function isTenantClientAllowedImport(importPath: string): boolean;
346
+ declare function assertTenantClientImportAllowed(importPath: string): void;
347
+ declare function formatTenantClientImportViolation(classification: TenantClientImportClassification): string;
348
+
349
+ export { TENANT_CLIENT_AUTH_MODES, TENANT_CLIENT_CAPABILITIES, TENANT_CLIENT_COMPONENT_CONFIG_IMPORTS, TENANT_CLIENT_CONTRACT_VERSION, TENANT_CLIENT_FORBIDDEN_IMPORT_PATTERNS, TENANT_CLIENT_FORBIDDEN_INSTALL_TOKEN_INFISICAL_PATHS, TENANT_CLIENT_FORBIDDEN_SECRET_ENV, TENANT_CLIENT_FULL_SUITE_PACKAGE_NAMES, TENANT_CLIENT_INSTALLABLE_PACKAGES, TENANT_CLIENT_INSTALL_PROFILES, TENANT_CLIENT_INSTALL_TOKEN_ENV, TENANT_CLIENT_INSTALL_TOKEN_INFISICAL_PATH, TENANT_CLIENT_ISOLATION_RULES, TENANT_CLIENT_OPTIONAL_CONTEXT_FIELDS, TENANT_CLIENT_PRINCIPAL_TYPES, TENANT_CLIENT_PUBLIC_IMPORTS, TENANT_CLIENT_REQUIRED_CONTEXT_FIELDS, TENANT_CLIENT_REQUIRED_SDK_NAMESPACES, type TenantClientAllowedImport, type TenantClientAuthMode, type TenantClientCapability, type TenantClientCapabilityId, type TenantClientComponentConfigImport, type TenantClientForbiddenImportPattern, type TenantClientForbiddenImportPatternId, type TenantClientForbiddenInstallTokenInfisicalPath, type TenantClientForbiddenSecretEnv, type TenantClientImportClassification, type TenantClientImportDecision, type TenantClientInstallProfile, type TenantClientInstallProfileId, type TenantClientInstallablePackage, type TenantClientInstallablePackageName, type TenantClientIsolationRule, type TenantClientOptionalContextField, type TenantClientPackageRole, type TenantClientPrincipalType, type TenantClientPublicImport, type TenantClientPublicPackage, type TenantClientPublicSurface, type TenantClientRequiredContextField, type TenantClientRequiredSdkNamespace, assertTenantClientImportAllowed, classifyTenantClientImport, findTenantClientInstallablePackage, formatTenantClientImportViolation, isTenantClientAllowedImport, isTenantClientComponentConfigImport, isTenantClientInstallablePackage, isTenantClientPublicImport };