@lucern/contracts 0.3.0-alpha.17 → 0.3.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 (316) hide show
  1. package/CHANGELOG.md +0 -10
  2. package/dist/api-enums.contract.d.ts +3 -5
  3. package/dist/api-enums.contract.js +12 -14
  4. package/dist/api-enums.contract.js.map +1 -1
  5. package/dist/auth-context.contract.js +2 -14
  6. package/dist/auth-context.contract.js.map +1 -1
  7. package/dist/auth-session.contract.js +2 -14
  8. package/dist/auth-session.contract.js.map +1 -1
  9. package/dist/auth.contract.d.ts +1 -1
  10. package/dist/auth.contract.js +2 -14
  11. package/dist/auth.contract.js.map +1 -1
  12. package/dist/context-pack.contract.d.ts +3 -5
  13. package/dist/context-pack.contract.js.map +1 -1
  14. package/dist/{defineTable-t1wr5wgn.d.ts → defineTable-CBQ03FXl.d.ts} +1 -1
  15. package/dist/{dsl-DVPthQGY.d.ts → dsl-BgpoVOVQ.d.ts} +2 -2
  16. package/dist/dsl.d.ts +2 -2
  17. package/dist/dsl.js +4 -1
  18. package/dist/dsl.js.map +1 -1
  19. package/dist/function-registry/beliefs.d.ts +51 -64
  20. package/dist/function-registry/beliefs.js +57 -817
  21. package/dist/function-registry/beliefs.js.map +1 -1
  22. package/dist/function-registry/coding.d.ts +6 -15
  23. package/dist/function-registry/coding.js +43 -866
  24. package/dist/function-registry/coding.js.map +1 -1
  25. package/dist/function-registry/context.d.ts +16 -22
  26. package/dist/function-registry/context.js +46 -805
  27. package/dist/function-registry/context.js.map +1 -1
  28. package/dist/function-registry/contracts.d.ts +3 -9
  29. package/dist/function-registry/contracts.js +39 -770
  30. package/dist/function-registry/contracts.js.map +1 -1
  31. package/dist/function-registry/coordination.d.ts +9 -21
  32. package/dist/function-registry/coordination.js +39 -770
  33. package/dist/function-registry/coordination.js.map +1 -1
  34. package/dist/function-registry/edges.d.ts +2 -167
  35. package/dist/function-registry/edges.js +71 -978
  36. package/dist/function-registry/edges.js.map +1 -1
  37. package/dist/function-registry/evidence.d.ts +41 -52
  38. package/dist/function-registry/evidence.js +62 -826
  39. package/dist/function-registry/evidence.js.map +1 -1
  40. package/dist/function-registry/graph.d.ts +66 -162
  41. package/dist/function-registry/graph.js +46 -886
  42. package/dist/function-registry/graph.js.map +1 -1
  43. package/dist/function-registry/helpers.d.ts +4 -7
  44. package/dist/function-registry/helpers.js +40 -771
  45. package/dist/function-registry/helpers.js.map +1 -1
  46. package/dist/function-registry/identity.d.ts +16 -62
  47. package/dist/function-registry/identity.js +45 -793
  48. package/dist/function-registry/identity.js.map +1 -1
  49. package/dist/function-registry/index.d.ts +3 -5
  50. package/dist/function-registry/index.js +43 -777
  51. package/dist/function-registry/index.js.map +1 -1
  52. package/dist/function-registry/judgments.d.ts +11 -16
  53. package/dist/function-registry/judgments.js +42 -782
  54. package/dist/function-registry/judgments.js.map +1 -1
  55. package/dist/function-registry/legacy.d.ts +1 -5
  56. package/dist/function-registry/legacy.js +39 -770
  57. package/dist/function-registry/legacy.js.map +1 -1
  58. package/dist/function-registry/lenses.d.ts +21 -28
  59. package/dist/function-registry/lenses.js +42 -793
  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 +2 -19
  63. package/dist/function-registry/manifest.js.map +1 -1
  64. package/dist/function-registry/ontologies.d.ts +56 -70
  65. package/dist/function-registry/ontologies.js +45 -788
  66. package/dist/function-registry/ontologies.js.map +1 -1
  67. package/dist/function-registry/pipeline.d.ts +16 -22
  68. package/dist/function-registry/pipeline.js +42 -779
  69. package/dist/function-registry/pipeline.js.map +1 -1
  70. package/dist/function-registry/questions.d.ts +61 -76
  71. package/dist/function-registry/questions.js +52 -869
  72. package/dist/function-registry/questions.js.map +1 -1
  73. package/dist/function-registry/tasks.d.ts +21 -28
  74. package/dist/function-registry/tasks.js +48 -845
  75. package/dist/function-registry/tasks.js.map +1 -1
  76. package/dist/function-registry/topics.d.ts +26 -114
  77. package/dist/function-registry/topics.js +43 -852
  78. package/dist/function-registry/topics.js.map +1 -1
  79. package/dist/function-registry/types.d.ts +3 -7
  80. package/dist/function-registry/worktrees.d.ts +51 -104
  81. package/dist/function-registry/worktrees.js +51 -925
  82. package/dist/function-registry/worktrees.js.map +1 -1
  83. package/dist/gateway.contract.d.ts +0 -6
  84. package/dist/gateway.contract.js.map +1 -1
  85. package/dist/generated/convexSchemas.d.ts +3 -3
  86. package/dist/generated/convexSchemas.js +18 -39
  87. package/dist/generated/convexSchemas.js.map +1 -1
  88. package/dist/generated/schema-manifest.json +98 -1244
  89. package/dist/generated/tableOwnership.d.ts +28 -49
  90. package/dist/generated/tableOwnership.js +26 -68
  91. package/dist/generated/tableOwnership.js.map +1 -1
  92. package/dist/generated/tier-expectations.json +9 -66
  93. package/dist/graph-types/index.d.ts +1 -5
  94. package/dist/graph-types/index.js +4 -15
  95. package/dist/graph-types/index.js.map +1 -1
  96. package/dist/index-CV-0_VWJ.d.ts +25 -0
  97. package/dist/index.d.ts +414 -30
  98. package/dist/index.js +342 -35266
  99. package/dist/index.js.map +1 -1
  100. package/dist/lens-filter.contract.js +3 -4
  101. package/dist/lens-filter.contract.js.map +1 -1
  102. package/dist/lens-workflow.contract.js +3 -4
  103. package/dist/lens-workflow.contract.js.map +1 -1
  104. package/dist/schema-helpers/enumValidation.js +5 -2
  105. package/dist/schema-helpers/enumValidation.js.map +1 -1
  106. package/dist/schema-helpers/spine/nodes/decision.js +1 -2
  107. package/dist/schema-helpers/spine/nodes/decision.js.map +1 -1
  108. package/dist/schema-helpers/spine/tables/epistemicNodes.js +27 -27
  109. package/dist/schema-helpers/spine/tables/epistemicNodes.js.map +1 -1
  110. package/dist/schemas/component-table-manifest.d.ts +6 -6
  111. package/dist/schemas/component-table-manifest.js +2 -2
  112. package/dist/schemas/component-table-manifest.js.map +1 -1
  113. package/dist/schemas/enums.d.ts +2 -5
  114. package/dist/schemas/enums.js +2 -5
  115. package/dist/schemas/enums.js.map +1 -1
  116. package/dist/schemas/index.d.ts +3 -3
  117. package/dist/schemas/index.js +139 -1165
  118. package/dist/schemas/index.js.map +1 -1
  119. package/dist/schemas/manifest.d.ts +932 -3042
  120. package/dist/schemas/manifest.js +137 -1163
  121. package/dist/schemas/manifest.js.map +1 -1
  122. package/dist/schemas/sl-opinion.d.ts +4 -4
  123. package/dist/schemas/tables/{controlPlane → identity}/agent.d.ts +1 -1
  124. package/dist/schemas/tables/{controlPlane → identity}/agent.js +3 -3
  125. package/dist/schemas/tables/identity/agent.js.map +1 -0
  126. package/dist/schemas/tables/{controlPlane → identity}/epistemic.d.ts +1 -1
  127. package/dist/schemas/tables/{controlPlane → identity}/epistemic.js +3 -3
  128. package/dist/schemas/tables/identity/epistemic.js.map +1 -0
  129. package/dist/schemas/tables/{controlPlane → identity}/model.d.ts +1 -1
  130. package/dist/schemas/tables/{controlPlane → identity}/model.js +6 -6
  131. package/dist/schemas/tables/identity/model.js.map +1 -0
  132. package/dist/schemas/tables/{controlPlane → identity}/platform.d.ts +11 -11
  133. package/dist/schemas/tables/{controlPlane → identity}/platform.js +18 -18
  134. package/dist/schemas/tables/identity/platform.js.map +1 -0
  135. package/dist/schemas/tables/{controlPlane → identity}/project.d.ts +1 -1
  136. package/dist/schemas/tables/{controlPlane → identity}/project.js +3 -3
  137. package/dist/schemas/tables/identity/project.js.map +1 -0
  138. package/dist/schemas/tables/{controlPlane → identity}/user.d.ts +1 -1
  139. package/dist/schemas/tables/{controlPlane → identity}/user.js +3 -3
  140. package/dist/schemas/tables/identity/user.js.map +1 -0
  141. package/dist/schemas/tables/kernel/config.d.ts +1 -1
  142. package/dist/schemas/tables/kernel/config.js.map +1 -1
  143. package/dist/schemas/tables/kernel/coordination.d.ts +1 -1
  144. package/dist/schemas/tables/kernel/coordination.js.map +1 -1
  145. package/dist/schemas/tables/kernel/decision.d.ts +1 -1
  146. package/dist/schemas/tables/kernel/decision.js.map +1 -1
  147. package/dist/schemas/tables/kernel/embedding.d.ts +1 -1
  148. package/dist/schemas/tables/kernel/embedding.js.map +1 -1
  149. package/dist/schemas/tables/kernel/epistemic.d.ts +7 -7
  150. package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
  151. package/dist/schemas/tables/kernel/idempotency.d.ts +1 -1
  152. package/dist/schemas/tables/kernel/idempotency.js.map +1 -1
  153. package/dist/schemas/tables/kernel/infra.d.ts +5 -5
  154. package/dist/schemas/tables/kernel/infra.js.map +1 -1
  155. package/dist/schemas/tables/kernel/intelligence.d.ts +11 -11
  156. package/dist/schemas/tables/kernel/intelligence.js.map +1 -1
  157. package/dist/schemas/tables/kernel/lens.d.ts +5 -5
  158. package/dist/schemas/tables/kernel/lens.js.map +1 -1
  159. package/dist/schemas/tables/kernel/ontology.d.ts +1 -1
  160. package/dist/schemas/tables/kernel/ontology.js.map +1 -1
  161. package/dist/schemas/tables/kernel/platform.d.ts +13 -13
  162. package/dist/schemas/tables/kernel/platform.js.map +1 -1
  163. package/dist/schemas/tables/kernel/spine.d.ts +4 -5
  164. package/dist/schemas/tables/kernel/spine.js +2 -6
  165. package/dist/schemas/tables/kernel/spine.js.map +1 -1
  166. package/dist/schemas/tables/kernel/task.d.ts +43 -43
  167. package/dist/schemas/tables/kernel/task.js.map +1 -1
  168. package/dist/schemas/tables/kernel/topic.d.ts +1 -1
  169. package/dist/schemas/tables/kernel/topic.js +1 -5
  170. package/dist/schemas/tables/kernel/topic.js.map +1 -1
  171. package/dist/schemas/tables/kernel/workflow.d.ts +1 -1
  172. package/dist/schemas/tables/kernel/workflow.js.map +1 -1
  173. package/dist/schemas/tables/kernel/worktree.d.ts +55 -55
  174. package/dist/schemas/tables/kernel/worktree.js.map +1 -1
  175. package/dist/schemas/tables/mc/identity.d.ts +4 -44
  176. package/dist/schemas/tables/mc/identity.js +1 -66
  177. package/dist/schemas/tables/mc/identity.js.map +1 -1
  178. package/dist/schemas/tables/mc/methodology.d.ts +1 -1
  179. package/dist/schemas/tables/mc/methodology.js.map +1 -1
  180. package/dist/schemas/tables/mc/pack.d.ts +21 -21
  181. package/dist/schemas/tables/mc/pack.js.map +1 -1
  182. package/dist/schemas/tables/mc/policy.d.ts +2 -2
  183. package/dist/schemas/tables/mc/policy.js +1 -1
  184. package/dist/schemas/tables/mc/policy.js.map +1 -1
  185. package/dist/schemas/tables/mc/registry.d.ts +5 -5
  186. package/dist/schemas/tables/mc/registry.js.map +1 -1
  187. package/dist/schemas/tables/mc/runtime.d.ts +3 -109
  188. package/dist/schemas/tables/mc/runtime.js +104 -330
  189. package/dist/schemas/tables/mc/runtime.js.map +1 -1
  190. package/dist/schemas/tables/mc/tenant.d.ts +2 -4
  191. package/dist/schemas/tables/mc/tenant.js +1 -3
  192. package/dist/schemas/tables/mc/tenant.js.map +1 -1
  193. package/dist/schemas/tables/mc/workspace.d.ts +5 -28
  194. package/dist/schemas/tables/mc/workspace.js +2 -36
  195. package/dist/schemas/tables/mc/workspace.js.map +1 -1
  196. package/dist/sdk-methods.contract.d.ts +2 -2
  197. package/dist/{sdk-tools.contract-CKmSsrZ2.d.ts → sdk-tools.contract-S4ia0TTo.d.ts} +2 -2
  198. package/dist/sdk-tools.contract.d.ts +2 -2
  199. package/dist/sdk-tools.contract.js +27 -719
  200. package/dist/sdk-tools.contract.js.map +1 -1
  201. package/dist/{tool-contracts-C_xvM9q2.d.ts → tool-contracts-C92-9ueT.d.ts} +2 -38
  202. package/dist/tool-contracts.d.ts +1 -1
  203. package/dist/tool-contracts.js +28 -720
  204. package/dist/tool-contracts.js.map +1 -1
  205. package/package.json +1 -30
  206. package/dist/component-boundary.contract.d.ts +0 -14
  207. package/dist/component-boundary.contract.js +0 -175
  208. package/dist/component-boundary.contract.js.map +0 -1
  209. package/dist/component-host-boundary.contract.d.ts +0 -46
  210. package/dist/component-host-boundary.contract.js +0 -60
  211. package/dist/component-host-boundary.contract.js.map +0 -1
  212. package/dist/edge-policy-manifest-Dw5IhT1L.d.ts +0 -133
  213. package/dist/function-registry/nodes.d.ts +0 -412
  214. package/dist/function-registry/nodes.js +0 -5354
  215. package/dist/function-registry/nodes.js.map +0 -1
  216. package/dist/function-registry-input-audit.d.ts +0 -13
  217. package/dist/function-registry-input-audit.js +0 -166
  218. package/dist/function-registry-input-audit.js.map +0 -1
  219. package/dist/generated/infisicalRuntimeEnv.d.ts +0 -70
  220. package/dist/generated/infisicalRuntimeEnv.js +0 -27345
  221. package/dist/generated/infisicalRuntimeEnv.js.map +0 -1
  222. package/dist/generated/lucernGatewayEnv.d.ts +0 -17
  223. package/dist/generated/lucernGatewayEnv.js +0 -38
  224. package/dist/generated/lucernGatewayEnv.js.map +0 -1
  225. package/dist/generated/lucernWebPublicEnv.d.ts +0 -26
  226. package/dist/generated/lucernWebPublicEnv.js +0 -32
  227. package/dist/generated/lucernWebPublicEnv.js.map +0 -1
  228. package/dist/generated/lucernWebServerEnv.d.ts +0 -33
  229. package/dist/generated/lucernWebServerEnv.js +0 -51
  230. package/dist/generated/lucernWebServerEnv.js.map +0 -1
  231. package/dist/graph-intelligence.contract.d.ts +0 -506
  232. package/dist/graph-intelligence.contract.js +0 -595
  233. package/dist/graph-intelligence.contract.js.map +0 -1
  234. package/dist/index-CM1Pl_vI.d.ts +0 -28
  235. package/dist/infisical-runtime.contract.d.ts +0 -1889
  236. package/dist/infisical-runtime.contract.js +0 -3235
  237. package/dist/infisical-runtime.contract.js.map +0 -1
  238. package/dist/manifests/edge-policy-manifest.d.ts +0 -2
  239. package/dist/manifests/edge-policy-manifest.data.d.ts +0 -13
  240. package/dist/manifests/edge-policy-manifest.data.js +0 -26
  241. package/dist/manifests/edge-policy-manifest.data.js.map +0 -1
  242. package/dist/manifests/edge-policy-manifest.js +0 -92
  243. package/dist/manifests/edge-policy-manifest.js.map +0 -1
  244. package/dist/manifests/infisical-runtime-manifest.d.ts +0 -1792
  245. package/dist/manifests/infisical-runtime-manifest.js +0 -3090
  246. package/dist/manifests/infisical-runtime-manifest.js.map +0 -1
  247. package/dist/manifests/invariant-manifest.d.ts +0 -65
  248. package/dist/manifests/invariant-manifest.js +0 -18
  249. package/dist/manifests/invariant-manifest.js.map +0 -1
  250. package/dist/manifests/invariants/ast-utils.d.ts +0 -14
  251. package/dist/manifests/invariants/ast-utils.js +0 -54
  252. package/dist/manifests/invariants/ast-utils.js.map +0 -1
  253. package/dist/manifests/invariants/index.d.ts +0 -15
  254. package/dist/manifests/invariants/index.js +0 -183
  255. package/dist/manifests/invariants/index.js.map +0 -1
  256. package/dist/manifests/invariants/inv-1-beliefs-append-only.d.ts +0 -12
  257. package/dist/manifests/invariants/inv-1-beliefs-append-only.js +0 -94
  258. package/dist/manifests/invariants/inv-1-beliefs-append-only.js.map +0 -1
  259. package/dist/manifests/invariants/inv-14-no-silent-transitions.d.ts +0 -12
  260. package/dist/manifests/invariants/inv-14-no-silent-transitions.js +0 -99
  261. package/dist/manifests/invariants/inv-14-no-silent-transitions.js.map +0 -1
  262. package/dist/manifests/invariants/manifest-1-projections-declare-audit.d.ts +0 -12
  263. package/dist/manifests/invariants/manifest-1-projections-declare-audit.js +0 -42
  264. package/dist/manifests/invariants/manifest-1-projections-declare-audit.js.map +0 -1
  265. package/dist/manifests/tenant-client-manifest.d.ts +0 -327
  266. package/dist/manifests/tenant-client-manifest.js +0 -449
  267. package/dist/manifests/tenant-client-manifest.js.map +0 -1
  268. package/dist/mcp-gateway-boundary.contract.d.ts +0 -201
  269. package/dist/mcp-gateway-boundary.contract.js +0 -45
  270. package/dist/mcp-gateway-boundary.contract.js.map +0 -1
  271. package/dist/permit-principal-projection.contract.d.ts +0 -74
  272. package/dist/permit-principal-projection.contract.js +0 -167
  273. package/dist/permit-principal-projection.contract.js.map +0 -1
  274. package/dist/projections/check-convex-args-shape.d.ts +0 -3
  275. package/dist/projections/check-convex-args-shape.js +0 -403
  276. package/dist/projections/check-convex-args-shape.js.map +0 -1
  277. package/dist/projections/create-evidence.projection.d.ts +0 -176
  278. package/dist/projections/create-evidence.projection.js +0 -130
  279. package/dist/projections/create-evidence.projection.js.map +0 -1
  280. package/dist/projections/index.d.ts +0 -102
  281. package/dist/projections/index.js +0 -352
  282. package/dist/projections/index.js.map +0 -1
  283. package/dist/projections/list-beliefs.projection.d.ts +0 -36
  284. package/dist/projections/list-beliefs.projection.js +0 -54
  285. package/dist/projections/list-beliefs.projection.js.map +0 -1
  286. package/dist/projections/list-tasks.projection.d.ts +0 -44
  287. package/dist/projections/list-tasks.projection.js +0 -57
  288. package/dist/projections/list-tasks.projection.js.map +0 -1
  289. package/dist/projections/modulate-confidence.projection.d.ts +0 -219
  290. package/dist/projections/modulate-confidence.projection.js +0 -148
  291. package/dist/projections/modulate-confidence.projection.js.map +0 -1
  292. package/dist/projections/projection-dsl.d.ts +0 -11
  293. package/dist/projections/projection-dsl.js +0 -8
  294. package/dist/projections/projection-dsl.js.map +0 -1
  295. package/dist/proof-attestation.json +0 -45
  296. package/dist/schemas/tables/controlPlane/accessControl.d.ts +0 -260
  297. package/dist/schemas/tables/controlPlane/accessControl.js +0 -658
  298. package/dist/schemas/tables/controlPlane/accessControl.js.map +0 -1
  299. package/dist/schemas/tables/controlPlane/agent.js.map +0 -1
  300. package/dist/schemas/tables/controlPlane/epistemic.js.map +0 -1
  301. package/dist/schemas/tables/controlPlane/model.js.map +0 -1
  302. package/dist/schemas/tables/controlPlane/platform.js.map +0 -1
  303. package/dist/schemas/tables/controlPlane/project.js.map +0 -1
  304. package/dist/schemas/tables/controlPlane/user.js.map +0 -1
  305. package/dist/schemas/tables/kernel/events.d.ts +0 -21
  306. package/dist/schemas/tables/kernel/events.js +0 -43
  307. package/dist/schemas/tables/kernel/events.js.map +0 -1
  308. package/dist/tenant-bootstrap-seed.contract.d.ts +0 -1289
  309. package/dist/tenant-bootstrap-seed.contract.js +0 -764
  310. package/dist/tenant-bootstrap-seed.contract.js.map +0 -1
  311. package/dist/tenant-bootstrap-seed.defaults.d.ts +0 -16
  312. package/dist/tenant-bootstrap-seed.defaults.js +0 -321
  313. package/dist/tenant-bootstrap-seed.defaults.js.map +0 -1
  314. package/dist/tenant-client.contract.d.ts +0 -354
  315. package/dist/tenant-client.contract.js +0 -505
  316. package/dist/tenant-client.contract.js.map +0 -1
@@ -2,20 +2,6 @@ import { z } from 'zod';
2
2
 
3
3
  // src/function-registry/helpers.ts
4
4
 
5
- // src/types/reasoning-method.ts
6
- var REASONING_METHODS = [
7
- "deductive",
8
- "inductive",
9
- "abductive",
10
- "analogical",
11
- "causal",
12
- "correlational",
13
- "testimonial",
14
- "statistical",
15
- "implicit",
16
- "pattern_match"
17
- ];
18
-
19
5
  // src/lens-workflow.contract.ts
20
6
  var LENS_PERSPECTIVE_TYPES = [
21
7
  "investigation",
@@ -436,22 +422,7 @@ var ADD_WORKTREE = {
436
422
  description: "Check out a branch into an active worktree for investigation. Like `git worktree add <branch>` \u2014 creates independent working state on a thematic branch. Beliefs committed within the worktree can be freely amended (draft code on a feature branch). When investigation is complete, `merge` integrates findings into main.",
437
423
  parameters: {
438
424
  title: { type: "string", description: "Worktree name/objective" },
439
- name: {
440
- type: "string",
441
- description: "Optional storage-name alias for callers that already use backend naming"
442
- },
443
- projectId: {
444
- type: "string",
445
- description: "Legacy topicId alias or resolver hint"
446
- },
447
- topicId: {
448
- type: "string",
449
- description: "Optional topic scope hint for resolver validation"
450
- },
451
- topicHint: {
452
- type: "string",
453
- description: "Natural-language topic hint for automatic topic resolution"
454
- },
425
+ topicId: { type: "string", description: "Optional topic scope hint" },
455
426
  branchId: {
456
427
  type: "string",
457
428
  description: "The branch this worktree investigates"
@@ -464,107 +435,18 @@ var ADD_WORKTREE = {
464
435
  type: "string",
465
436
  description: "The testable claim this worktree investigates"
466
437
  },
467
- rationale: {
468
- type: "string",
469
- description: "Why this worktree exists and why it belongs in the campaign"
470
- },
471
- worktreeType: {
472
- type: "string",
473
- description: "Schema-enum worktree type used by the kernel lifecycle and retrieval layers"
474
- },
475
- gate: {
476
- type: "string",
477
- description: "Exit gate name for this worktree"
478
- },
479
- startDate: {
480
- type: "number",
481
- description: "Planned start timestamp in milliseconds since epoch"
482
- },
483
- endDate: {
484
- type: "number",
485
- description: "Planned end timestamp in milliseconds since epoch"
486
- },
487
- durationWeeks: {
488
- type: "number",
489
- description: "Planned duration in weeks"
490
- },
491
- confidenceImpact: {
492
- type: "string",
493
- description: "Expected confidence impact if the worktree succeeds",
494
- enum: ["high", "medium", "low"]
495
- },
496
- beliefFocus: {
497
- type: "string",
498
- description: "Natural-language focus spanning the target belief neighborhood"
499
- },
500
438
  beliefIds: {
501
439
  type: "array",
502
- description: "Legacy alias for targetBeliefIds"
503
- },
504
- beliefs: {
505
- type: "array",
506
- description: "Legacy alias for targetBeliefIds"
507
- },
508
- targetBeliefIds: {
509
- type: "array",
510
- description: "Belief node IDs this worktree is expected to test or update"
511
- },
512
- targetQuestionIds: {
513
- type: "array",
514
- description: "Question node IDs this worktree is expected to answer"
515
- },
516
- keyQuestions: {
517
- type: "array",
518
- description: "Inline key question objects with question, optional status, answer, answerConfidence, and linkedQuestionId"
519
- },
520
- evidenceSignals: {
521
- type: "array",
522
- description: "Evidence signal objects with signal, optional collected state, progress, and notes"
523
- },
524
- decisionGate: {
525
- type: "object",
526
- description: "Decision gate object with goCriteria, noGoSignals, optional verdict, rationale, decidedAt, and decidedBy"
527
- },
528
- goCriteria: {
529
- type: "array",
530
- description: "Shorthand go criteria used to build decisionGate"
531
- },
532
- noGoSignals: {
533
- type: "array",
534
- description: "Shorthand no-go signals used to build decisionGate"
535
- },
536
- proofArtifacts: {
537
- type: "array",
538
- description: "Expected proof artifacts required to close the worktree"
440
+ description: "Beliefs to test in this worktree"
539
441
  },
540
442
  autoShape: {
541
443
  type: "boolean",
542
444
  description: "Whether to invoke inquiry auto-shaping during worktree creation"
543
445
  },
544
- autoFixPolicy: {
545
- type: "object",
546
- description: "Policy for permitted automatic remediation inside the worktree"
547
- },
548
446
  domainPackId: {
549
447
  type: "string",
550
448
  description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
551
449
  },
552
- tags: {
553
- type: "array",
554
- description: "Additional topic-resolution tags for the worktree"
555
- },
556
- touchedPaths: {
557
- type: "array",
558
- description: "File paths used as topic-resolution signals"
559
- },
560
- sourceRef: {
561
- type: "string",
562
- description: "Source reference used as a topic-resolution signal"
563
- },
564
- sourceKind: {
565
- type: "string",
566
- description: "Source kind used as a topic-resolution signal"
567
- },
568
450
  campaign: {
569
451
  type: "number",
570
452
  description: "Top-level pipeline campaign number. Campaigns define the outer execution slice."
@@ -589,20 +471,12 @@ var ADD_WORKTREE = {
589
471
  type: "array",
590
472
  description: "Worktree IDs blocked by this worktree"
591
473
  },
592
- staffingHint: {
593
- type: "string",
594
- description: "Suggested staffing or agent allocation note"
595
- },
596
- lensId: {
474
+ gate: {
597
475
  type: "string",
598
- description: "Lens that scopes this worktree when applicable"
599
- },
600
- lastReconciledAt: {
601
- type: "number",
602
- description: "Timestamp when worktree metadata was last reconciled"
476
+ description: "Exit gate name for this worktree"
603
477
  }
604
478
  },
605
- required: ["title"],
479
+ required: ["title", "topicId"],
606
480
  response: {
607
481
  description: "The created worktree",
608
482
  fields: {
@@ -629,7 +503,7 @@ var MERGE = {
629
503
  worktreeId: { type: "string", description: "The worktree to merge" },
630
504
  outcomes: {
631
505
  type: "array",
632
- description: "Merge outcomes as key-finding strings, or scoring outcomes for beliefs: { beliefId, confidence, rationale }"
506
+ description: "Scoring outcomes for each belief: { beliefId, confidence, rationale }"
633
507
  },
634
508
  summary: { type: "string", description: "Overall findings summary" }
635
509
  },
@@ -847,23 +721,19 @@ var FIND_CONTRADICTIONS = {
847
721
  };
848
722
  var CREATE_EDGE = {
849
723
  name: "create_edge",
850
- description: "Commit a typed relationship between two nodes in the reasoning graph. Like `git commit` \u2014 an atomic write that declares a dependency between nodes. Accepts any public epistemic edge type between public graph node refs so agents can author the full spine.",
724
+ description: "Commit a typed relationship between two nodes in the reasoning graph. Like `git commit` \u2014 an atomic write that declares a dependency between nodes. The engine enforces layer transition rules \u2014 for example, L1 \u2192 L3 direct edges are forbidden (must go through L2).",
851
725
  parameters: {
852
- from: {
853
- type: "object",
854
- description: "Source graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'topic' }"
855
- },
856
- to: {
857
- type: "object",
858
- description: "Target graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'belief' }"
726
+ sourceId: {
727
+ type: "string",
728
+ description: "Source node of the relationship"
859
729
  },
860
- edgeType: {
730
+ targetId: {
861
731
  type: "string",
862
- description: "Relationship type from the public epistemic edge enum."
732
+ description: "Target node of the relationship"
863
733
  },
864
- globalId: {
734
+ edgeType: {
865
735
  type: "string",
866
- description: "Optional idempotent edge global ID."
736
+ description: "Relationship type (informs, tests, depends_on, supersedes, etc.)"
867
737
  },
868
738
  weight: {
869
739
  type: "number",
@@ -873,14 +743,10 @@ var CREATE_EDGE = {
873
743
  reasoningMethod: {
874
744
  type: "string",
875
745
  description: "How this was determined",
876
- enum: [...REASONING_METHODS]
877
- },
878
- metadata: {
879
- type: "object",
880
- description: "Optional edge metadata."
746
+ enum: ["deductive", "inductive", "abductive", "analogical", "empirical"]
881
747
  }
882
748
  },
883
- required: ["from", "to", "edgeType"],
749
+ required: ["sourceId", "targetId", "edgeType"],
884
750
  response: {
885
751
  description: "The created edge",
886
752
  fields: {
@@ -894,240 +760,6 @@ var CREATE_EDGE = {
894
760
  ontologyPrimitive: "edge",
895
761
  tier: "showcase"
896
762
  };
897
- var UPDATE_EDGE = {
898
- name: "update_edge",
899
- description: "Amend metadata on an existing graph edge. Like `git commit --amend` \u2014 changes the edge annotation without recreating the relationship.",
900
- parameters: {
901
- edgeId: { type: "string", description: "Edge ID or global ID to update" },
902
- weight: { type: "number", description: "Updated edge weight" },
903
- confidence: { type: "number", description: "Updated confidence" },
904
- context: { type: "string", description: "Updated human-readable context" },
905
- derivationType: { type: "string", description: "Updated derivation type" },
906
- metadata: { type: "object", description: "Updated metadata" }
907
- },
908
- required: ["edgeId"],
909
- response: {
910
- description: "Edge update result",
911
- fields: { success: "boolean" }
912
- },
913
- ownerModule: "graph-primitives",
914
- ontologyPrimitive: "edge",
915
- tier: "workhorse"
916
- };
917
- var REMOVE_EDGE = {
918
- name: "remove_edge",
919
- description: "Remove one graph edge by ID. Like `git rm` \u2014 deletes a single explicit relationship from the spine.",
920
- parameters: {
921
- edgeId: { type: "string", description: "Edge ID or global ID to remove" }
922
- },
923
- required: ["edgeId"],
924
- response: {
925
- description: "Edge removal result",
926
- fields: { success: "boolean" }
927
- },
928
- ownerModule: "graph-primitives",
929
- ontologyPrimitive: "edge",
930
- tier: "workhorse"
931
- };
932
- var REMOVE_EDGES_BETWEEN = {
933
- name: "remove_edges_between",
934
- description: "Remove graph edges between two nodes. Like `git rm <pathspec>` \u2014 deletes relationships matching a source, target, and optional type.",
935
- parameters: {
936
- fromNodeId: { type: "string", description: "Source node ID or global ID" },
937
- toNodeId: { type: "string", description: "Target node ID or global ID" },
938
- edgeType: { type: "string", description: "Optional edge type filter" }
939
- },
940
- required: ["fromNodeId", "toNodeId"],
941
- response: {
942
- description: "Matched edge removal result",
943
- fields: { deleted: "number" }
944
- },
945
- ownerModule: "graph-primitives",
946
- ontologyPrimitive: "edge",
947
- tier: "workhorse"
948
- };
949
- var BATCH_CREATE_EDGES = {
950
- name: "batch_create_edges",
951
- description: "Commit multiple typed graph edges. Like `git commit` with many staged paths \u2014 writes a batch of explicit relationships atomically per edge.",
952
- parameters: {
953
- edges: {
954
- type: "array",
955
- description: "Edges to create, each with from, to, edgeType, and optional weight/confidence/context."
956
- },
957
- skipLayerValidation: {
958
- type: "boolean",
959
- description: "Skip kernel layer validation for trusted materialization flows."
960
- }
961
- },
962
- required: ["edges"],
963
- response: {
964
- description: "Batch edge creation result",
965
- fields: {
966
- created: "number",
967
- results: "array",
968
- errors: "array"
969
- }
970
- },
971
- ownerModule: "graph-primitives",
972
- ontologyPrimitive: "edge",
973
- tier: "workhorse"
974
- };
975
- var CREATE_EPISTEMIC_NODE = {
976
- name: "create_epistemic_node",
977
- description: "Commit a generic epistemic graph node. Like `git commit` \u2014 creates a canonical node in the public spine for topics, beliefs, evidence, questions, answers, sources, and entities.",
978
- parameters: {
979
- globalId: { type: "string", description: "Optional idempotent node global ID" },
980
- nodeType: { type: "string", description: "Public epistemic node type" },
981
- canonicalText: { type: "string", description: "Canonical node text" },
982
- text: { type: "string", description: "Alias for canonicalText" },
983
- contentHash: { type: "string", description: "Optional idempotency content hash" },
984
- sourceType: { type: "string", description: "Source type for provenance" },
985
- topicId: { type: "string", description: "Optional topic scope" },
986
- content: { type: "string", description: "Extended content" },
987
- title: { type: "string", description: "Display title" },
988
- metadata: { type: "object", description: "Optional node metadata" }
989
- },
990
- required: ["nodeType"],
991
- response: {
992
- description: "Created node result",
993
- fields: {
994
- nodeId: "string",
995
- nodeGlobalId: "string",
996
- isDuplicate: "boolean"
997
- }
998
- },
999
- ownerModule: "reasoning-kernel",
1000
- ontologyPrimitive: "graph",
1001
- tier: "showcase"
1002
- };
1003
- var GET_EPISTEMIC_NODE = {
1004
- name: "get_epistemic_node",
1005
- description: "Read one epistemic graph node. Like `git show` \u2014 resolves a canonical spine node by ID or global ID.",
1006
- parameters: {
1007
- nodeId: { type: "string", description: "Node ID or global ID" }
1008
- },
1009
- required: ["nodeId"],
1010
- response: {
1011
- description: "The resolved node",
1012
- fields: { node: "object" }
1013
- },
1014
- ownerModule: "reasoning-kernel",
1015
- ontologyPrimitive: "graph",
1016
- tier: "workhorse"
1017
- };
1018
- var LIST_EPISTEMIC_NODES = {
1019
- name: "list_epistemic_nodes",
1020
- description: "List epistemic graph nodes. Like `git ls-tree` \u2014 lists canonical spine nodes by topic, type, status, or search query.",
1021
- parameters: {
1022
- topicId: { type: "string", description: "Optional topic scope" },
1023
- nodeType: { type: "string", description: "Optional node type filter" },
1024
- status: { type: "string", description: "Optional lifecycle status" },
1025
- searchQuery: { type: "string", description: "Optional text search query" },
1026
- limit: { type: "number", description: "Maximum nodes to return" }
1027
- },
1028
- required: [],
1029
- response: {
1030
- description: "Matching nodes",
1031
- fields: { nodes: "array" }
1032
- },
1033
- ownerModule: "reasoning-kernel",
1034
- ontologyPrimitive: "graph",
1035
- tier: "workhorse"
1036
- };
1037
- var UPDATE_EPISTEMIC_NODE = {
1038
- name: "update_epistemic_node",
1039
- description: "Amend an epistemic graph node. Like `git commit --amend` \u2014 updates mutable node metadata, text, status, or verification fields.",
1040
- parameters: {
1041
- nodeId: { type: "string", description: "Node ID or global ID" },
1042
- canonicalText: { type: "string", description: "Updated canonical text" },
1043
- text: { type: "string", description: "Alias for canonicalText" },
1044
- contentHash: { type: "string", description: "Updated content hash" },
1045
- content: { type: "string", description: "Updated content" },
1046
- title: { type: "string", description: "Updated display title" },
1047
- metadata: { type: "object", description: "Updated metadata" },
1048
- confidence: { type: "number", description: "Updated confidence" },
1049
- verificationStatus: { type: "string", description: "Updated verification status" },
1050
- status: { type: "string", description: "Updated lifecycle status" }
1051
- },
1052
- required: ["nodeId"],
1053
- response: {
1054
- description: "Node update result",
1055
- fields: { success: "boolean" }
1056
- },
1057
- ownerModule: "reasoning-kernel",
1058
- ontologyPrimitive: "graph",
1059
- tier: "workhorse"
1060
- };
1061
- var ARCHIVE_EPISTEMIC_NODE = {
1062
- name: "archive_epistemic_node",
1063
- description: "Archive an epistemic graph node. Like `git rm --cached` \u2014 removes a node from active traversal without hard-deleting it.",
1064
- parameters: {
1065
- nodeId: { type: "string", description: "Node ID or global ID" }
1066
- },
1067
- required: ["nodeId"],
1068
- response: {
1069
- description: "Archive result",
1070
- fields: { success: "boolean", effectiveStatus: "string" }
1071
- },
1072
- ownerModule: "reasoning-kernel",
1073
- ontologyPrimitive: "graph",
1074
- tier: "workhorse"
1075
- };
1076
- var VERIFY_EPISTEMIC_NODE = {
1077
- name: "verify_epistemic_node",
1078
- description: "Record verification state on an epistemic graph node. Like `git tag` \u2014 marks the node with a reviewed verification state.",
1079
- parameters: {
1080
- nodeId: { type: "string", description: "Node ID or global ID" },
1081
- verificationStatus: { type: "string", description: "Verification status" },
1082
- confidence: { type: "number", description: "Optional confidence update" }
1083
- },
1084
- required: ["nodeId", "verificationStatus"],
1085
- response: {
1086
- description: "Verification result",
1087
- fields: { success: "boolean" }
1088
- },
1089
- ownerModule: "reasoning-kernel",
1090
- ontologyPrimitive: "graph",
1091
- tier: "workhorse"
1092
- };
1093
- var SUPERSEDE_EPISTEMIC_NODE = {
1094
- name: "supersede_epistemic_node",
1095
- description: "Supersede an epistemic graph node with a new version. Like `git commit --amend` on an immutable history branch \u2014 creates the replacement and marks the old node superseded.",
1096
- parameters: {
1097
- oldNodeId: { type: "string", description: "Node ID or global ID to supersede" },
1098
- newGlobalId: { type: "string", description: "Optional replacement global ID" },
1099
- newCanonicalText: { type: "string", description: "Replacement canonical text" },
1100
- text: { type: "string", description: "Alias for newCanonicalText" },
1101
- newContentHash: { type: "string", description: "Optional replacement content hash" },
1102
- reason: { type: "string", description: "Reason for superseding" }
1103
- },
1104
- required: ["oldNodeId"],
1105
- response: {
1106
- description: "Supersede result",
1107
- fields: { oldNodeId: "string", newNodeId: "string" }
1108
- },
1109
- ownerModule: "reasoning-kernel",
1110
- ontologyPrimitive: "graph",
1111
- tier: "workhorse"
1112
- };
1113
- var BATCH_CREATE_EPISTEMIC_NODES = {
1114
- name: "batch_create_epistemic_nodes",
1115
- description: "Commit multiple epistemic graph nodes. Like `git commit` with many staged files \u2014 writes a batch of canonical spine nodes.",
1116
- parameters: {
1117
- nodes: {
1118
- type: "array",
1119
- description: "Nodes to create with nodeType, canonicalText/text, and optional metadata."
1120
- }
1121
- },
1122
- required: ["nodes"],
1123
- response: {
1124
- description: "Batch node creation result",
1125
- fields: { created: "number", results: "array" }
1126
- },
1127
- ownerModule: "reasoning-kernel",
1128
- ontologyPrimitive: "graph",
1129
- tier: "workhorse"
1130
- };
1131
763
  var RECORD_JUDGMENT = {
1132
764
  name: "record_judgment",
1133
765
  description: "Record a judgment \u2014 an irreversible commitment based on the current epistemic state. Like a `git tag` marking a release. A judgment synthesizes beliefs, evidence, and uncertainties into a determination. Once issued, a judgment is evaluated against the epistemic state that existed when it was made (knowledge horizon evaluation, Invariant #10).",
@@ -1425,74 +1057,6 @@ var GET_GRAPH_STRUCTURE_ANALYSIS = {
1425
1057
  ontologyPrimitive: "graph",
1426
1058
  tier: "showcase"
1427
1059
  };
1428
- var LIST_GRAPH_INTELLIGENCE_QUERIES = {
1429
- name: "list_graph_intelligence_queries",
1430
- description: "List the Graph Intelligence query catalog that powers structural graph analysis experiences. Returns categories, query IDs, prompt templates, modes, and the public tool plan each query can use.",
1431
- parameters: {
1432
- categoryId: {
1433
- type: "string",
1434
- description: "Optional category filter, such as problems or strategic"
1435
- },
1436
- mode: {
1437
- type: "string",
1438
- description: "Optional mode filter: core, bias, stress, operational, alpha, semantic, or evidence"
1439
- }
1440
- },
1441
- required: [],
1442
- response: {
1443
- description: "Graph Intelligence query catalog and mode-to-tool mapping",
1444
- fields: {
1445
- categories: "array \u2014 query categories",
1446
- queries: "array \u2014 query definitions with prompt templates and tools",
1447
- quickQueries: "array \u2014 recommended one-click query presets",
1448
- publicToolNamesByMode: "object \u2014 public tool names available to each Graph Intelligence mode"
1449
- }
1450
- },
1451
- ownerModule: "graph-intelligence",
1452
- ontologyPrimitive: "graph",
1453
- tier: "showcase"
1454
- };
1455
- var RUN_GRAPH_INTELLIGENCE_QUERY = {
1456
- name: "run_graph_intelligence_query",
1457
- description: "Run a named Graph Intelligence query against a tenant topic graph. Returns the selected query, prompt, deterministic graph-analysis bundle, graph context, and public tool plan for model synthesis.",
1458
- parameters: {
1459
- topicId: { type: "string", description: "Topic to analyze" },
1460
- queryId: {
1461
- type: "string",
1462
- description: "Graph Intelligence query ID, such as confirmation-bias, pre-mortem, or thesis-summary"
1463
- },
1464
- prompt: {
1465
- type: "string",
1466
- description: "Optional custom prompt for custom analysis runs"
1467
- },
1468
- input: {
1469
- type: "string",
1470
- description: "Optional entity, theme, belief, company, or search text for input-driven queries"
1471
- },
1472
- mode: {
1473
- type: "string",
1474
- description: "Optional mode override: core, bias, stress, operational, alpha, semantic, or evidence"
1475
- },
1476
- limit: {
1477
- type: "number",
1478
- description: "Maximum graph context rows to return"
1479
- }
1480
- },
1481
- required: ["topicId"],
1482
- response: {
1483
- description: "Graph Intelligence query result bundle ready for model or prompt-library synthesis",
1484
- fields: {
1485
- query: "object \u2014 selected query definition",
1486
- prompt: "string \u2014 resolved prompt template",
1487
- toolPlan: "array \u2014 public tools and args the model can call next",
1488
- analysis: "object \u2014 structure, coverage, gap, and confirmation-bias analysis",
1489
- context: "object \u2014 sampled beliefs, questions, evidence, edges, and contradictions"
1490
- }
1491
- },
1492
- ownerModule: "graph-intelligence",
1493
- ontologyPrimitive: "graph",
1494
- tier: "showcase"
1495
- };
1496
1060
  var GET_FALSIFICATION_QUESTIONS = {
1497
1061
  name: "get_falsification_questions",
1498
1062
  description: "Generate Popperian falsification questions for beliefs. Like `git test` \u2014 identifies the questions most likely to disprove current beliefs. Karl Popper as a tool: surfaces what would need to be true to invalidate each belief.",
@@ -2327,8 +1891,8 @@ var IDENTITY_WHOAMI = {
2327
1891
  response: {
2328
1892
  description: "Canonical identity summary for the current session",
2329
1893
  fields: {
2330
- principalId: "string \u2014 canonical principal identifier; for humans this is the Clerk user_... ID",
2331
- principalType: "string \u2014 human, service, agent, group, or external_viewer",
1894
+ principalId: "string \u2014 canonical federated principal identifier",
1895
+ principalType: "string \u2014 human, service, or agent",
2332
1896
  tenantId: "string | undefined \u2014 resolved tenant scope",
2333
1897
  workspaceId: "string | undefined \u2014 resolved workspace scope",
2334
1898
  scopes: "string[] | undefined \u2014 granted scopes for this session",
@@ -2339,60 +1903,17 @@ var IDENTITY_WHOAMI = {
2339
1903
  ontologyPrimitive: "identity",
2340
1904
  tier: "workhorse"
2341
1905
  };
2342
- var RESOLVE_INTERACTIVE_PRINCIPAL = {
2343
- name: "resolve_interactive_principal",
2344
- description: "Read the Permit-backed Lucern principal context for an authenticated Clerk user. Like `git config --get user.email` plus the repository ACL \u2014 resolves the Clerk subject into tenant/workspace authorization context.",
2345
- parameters: {
2346
- clerkId: {
2347
- type: "string",
2348
- description: "Authenticated Clerk subject (`sub`). Clerk proves identity only; it is not the authorization record."
2349
- },
2350
- tenantId: {
2351
- type: "string",
2352
- description: "Optional tenant scope. Omit only when the Clerk alias is globally unambiguous."
2353
- },
2354
- workspaceId: {
2355
- type: "string",
2356
- description: "Optional workspace scope. Required when the principal has access to multiple workspaces and no default can be inferred."
2357
- },
2358
- providerProjectId: {
2359
- type: "string",
2360
- description: "Optional Clerk project or provider instance id for tenants with multiple identity providers."
2361
- }
2362
- },
2363
- required: ["clerkId"],
2364
- response: {
2365
- description: "Permit-backed Lucern principal context for tenant SDK bootstrap",
2366
- fields: {
2367
- principalId: "string \u2014 canonical Clerk user_... ID for human sessions",
2368
- principalType: "string \u2014 human, service, agent, group, or external_viewer",
2369
- clerkId: "string \u2014 authenticated Clerk subject alias",
2370
- tenantId: "string \u2014 resolved tenant scope",
2371
- workspaceId: "string | null \u2014 resolved workspace scope",
2372
- roles: "string[] \u2014 effective Permit roles",
2373
- scopes: "string[] \u2014 effective scopes derived from Permit/control-plane projection",
2374
- groupIds: "string[] \u2014 active Permit group memberships",
2375
- principalStatus: "string \u2014 active, invited, suspended, disabled, revoked, or missing",
2376
- tenantStatus: "string \u2014 projected tenant resource status",
2377
- workspaceStatus: "string \u2014 projected workspace resource status",
2378
- permit: "object \u2014 Permit subject, tenant, and optional workspace tuple"
2379
- }
2380
- },
2381
- ownerModule: "control-plane",
2382
- ontologyPrimitive: "identity",
2383
- tier: "workhorse"
2384
- };
2385
1906
  var COMPILE_CONTEXT = {
2386
1907
  name: "compile_context",
2387
- description: "Compile a focused reasoning context. If topicId is omitted, Lucern resolves the best topic from the query. Like `git log --graph --decorate` for the reasoning substrate \u2014 returns the canonical Pillar 3 context pack through the public API shape.",
1908
+ description: "Compile a focused reasoning context for a topic. Like `git log --graph --decorate` for the reasoning substrate \u2014 returns the canonical Pillar 3 context pack through the public API shape.",
2388
1909
  parameters: {
2389
1910
  topicId: {
2390
1911
  type: "string",
2391
- description: "Optional topic scope ID. Omit to resolve the topic from query."
1912
+ description: "Topic scope ID to compile"
2392
1913
  },
2393
1914
  query: {
2394
1915
  type: "string",
2395
- description: "Focus query used to resolve the topic and rank context items. Required when topicId is omitted."
1916
+ description: "Optional focus query used to rank context items"
2396
1917
  },
2397
1918
  budget: {
2398
1919
  type: "number",
@@ -2416,7 +1937,7 @@ var COMPILE_CONTEXT = {
2416
1937
  description: "Include related ontological entities in the compiled result"
2417
1938
  }
2418
1939
  },
2419
- required: [],
1940
+ required: ["topicId"],
2420
1941
  response: {
2421
1942
  description: "Compiled context pack for the requested topic",
2422
1943
  fields: {
@@ -2590,64 +2111,18 @@ var CREATE_TASK = {
2590
2111
  name: "create_task",
2591
2112
  description: "Create an execution task tied to the reasoning state. Like `git task` \u2014 tracks concrete work items (calls to make, data to gather, analyses to run) linked to questions, beliefs, or worktrees.",
2592
2113
  parameters: {
2593
- title: { type: "string", description: "Task title" },
2114
+ title: { type: "string", description: "Task description" },
2594
2115
  topicId: { type: "string", description: "Topic scope" },
2595
- description: {
2596
- type: "string",
2597
- description: "Long-form task description"
2598
- },
2599
2116
  taskType: {
2600
2117
  type: "string",
2601
- description: "Task taxonomy",
2602
- enum: [
2603
- "general",
2604
- "find_evidence",
2605
- "verify_claim",
2606
- "research",
2607
- "review",
2608
- "interview",
2609
- "analysis",
2610
- "track_metrics"
2611
- ]
2612
- },
2613
- priority: {
2614
- type: "string",
2615
- description: "Priority",
2616
- enum: ["urgent", "high", "medium", "low"]
2617
- },
2618
- status: {
2619
- type: "string",
2620
- description: "Initial status (defaults to todo)",
2621
- enum: ["todo", "in_progress", "blocked", "done"]
2622
- },
2623
- linkedWorktreeId: {
2624
- type: "string",
2625
- description: "Worktree this task belongs to"
2626
- },
2627
- linkedBeliefId: {
2628
- type: "string",
2629
- description: "Belief this task supports"
2118
+ description: "Type: research, interview, analysis, data_collection",
2119
+ enum: ["research", "interview", "analysis", "data_collection"]
2630
2120
  },
2631
2121
  linkedQuestionId: {
2632
2122
  type: "string",
2633
2123
  description: "Question this task addresses"
2634
2124
  },
2635
- assigneeId: {
2636
- type: "string",
2637
- description: "Principal assigned to the task"
2638
- },
2639
- dueDate: {
2640
- type: "number",
2641
- description: "Due date as epoch milliseconds"
2642
- },
2643
- tags: {
2644
- type: "array",
2645
- description: "Free-form string tags"
2646
- },
2647
- metadata: {
2648
- type: "object",
2649
- description: "Structured task metadata for handoff context and routing hints"
2650
- }
2125
+ linkedWorktreeId: { type: "string", description: "Worktree scope" }
2651
2126
  },
2652
2127
  required: ["title"],
2653
2128
  response: {
@@ -2720,10 +2195,6 @@ var UPDATE_TASK = {
2720
2195
  type: "string",
2721
2196
  description: "Updated status",
2722
2197
  enum: ["todo", "in_progress", "blocked", "done"]
2723
- },
2724
- metadata: {
2725
- type: "object",
2726
- description: "Structured task metadata to replace or refine"
2727
2198
  }
2728
2199
  },
2729
2200
  required: ["taskId"],
@@ -2771,10 +2242,6 @@ var CREATE_TOPIC = {
2771
2242
  name: "create_topic",
2772
2243
  description: "Create a new topic container for scoping knowledge. Like `git init` \u2014 initializes a new repository for a knowledge domain. Topics are hierarchical: a deal topic can nest under a theme topic. Types: domain, theme, deal, strategy, constitution, project, portfolio.",
2773
2244
  parameters: {
2774
- globalId: {
2775
- type: "string",
2776
- description: "Optional idempotent topic global ID"
2777
- },
2778
2245
  name: { type: "string", description: "Topic name" },
2779
2246
  type: {
2780
2247
  type: "string",
@@ -2785,18 +2252,6 @@ var CREATE_TOPIC = {
2785
2252
  type: "string",
2786
2253
  description: "Optional parent topic for nesting"
2787
2254
  },
2788
- parentTopicGlobalId: {
2789
- type: "string",
2790
- description: "Optional parent topic global ID for nesting"
2791
- },
2792
- tenantId: { type: "string", description: "Optional tenant scope" },
2793
- workspaceId: { type: "string", description: "Optional workspace scope" },
2794
- visibility: {
2795
- type: "string",
2796
- description: "Topic visibility",
2797
- enum: ["private", "team", "firm", "external", "public"]
2798
- },
2799
- metadata: { type: "object", description: "Optional topic metadata" },
2800
2255
  createdBy: { type: "string", description: "Who created this topic" }
2801
2256
  },
2802
2257
  required: ["name", "type"],
@@ -2805,9 +2260,6 @@ var CREATE_TOPIC = {
2805
2260
  fields: {
2806
2261
  id: "string \u2014 topic ID",
2807
2262
  globalId: "string \u2014 globally unique ID",
2808
- topicGlobalId: "string \u2014 topic global ID",
2809
- epistemicNodeId: "string \u2014 materialized topic node ID",
2810
- epistemicNodeGlobalId: "string \u2014 materialized topic node global ID",
2811
2263
  depth: "number \u2014 nesting depth"
2812
2264
  }
2813
2265
  },
@@ -2938,65 +2390,6 @@ var GET_TOPIC_TREE = {
2938
2390
  ontologyPrimitive: "graph",
2939
2391
  tier: "workhorse"
2940
2392
  };
2941
- var MATERIALIZE_TOPIC_GRAPH = {
2942
- name: "materialize_topic_graph",
2943
- description: "Backfill the topic graph spine. Like `git fsck --connectivity-only` with repair enabled \u2014 creates missing topic nodes and parent-child edges idempotently.",
2944
- parameters: {
2945
- rootTopicId: {
2946
- type: "string",
2947
- description: "Optional root topic for a bounded materialization pass"
2948
- },
2949
- dryRun: {
2950
- type: "boolean",
2951
- description: "When true, report missing rows without writing them"
2952
- }
2953
- },
2954
- required: [],
2955
- response: {
2956
- description: "Topic graph materialization counts",
2957
- fields: {
2958
- topicsSeen: "number",
2959
- nodesCreated: "number",
2960
- nodesExisting: "number",
2961
- edgesCreated: "number",
2962
- edgesExisting: "number",
2963
- errors: "array"
2964
- }
2965
- },
2966
- ownerModule: "reasoning-kernel",
2967
- ontologyPrimitive: "graph",
2968
- tier: "workhorse"
2969
- };
2970
- var GET_TOPIC_GRAPH_SPINE = {
2971
- name: "get_topic_graph_spine",
2972
- description: "Verify the topic graph spine. Like `git fsck` \u2014 reads topics, materialized topic nodes, parent-child edges, and missing spine rows.",
2973
- parameters: {
2974
- rootTopicId: {
2975
- type: "string",
2976
- description: "Optional root topic for a bounded verifier pass"
2977
- },
2978
- includeTopicBeliefEdges: {
2979
- type: "boolean",
2980
- description: "Include topic -> belief edges in the verifier payload"
2981
- }
2982
- },
2983
- required: [],
2984
- response: {
2985
- description: "Topic graph spine verification payload",
2986
- fields: {
2987
- ok: "boolean",
2988
- counts: "object",
2989
- topics: "array",
2990
- topicNodes: "array",
2991
- parentEdges: "array",
2992
- missingTopicNodes: "array",
2993
- missingParentEdges: "array"
2994
- }
2995
- },
2996
- ownerModule: "reasoning-kernel",
2997
- ontologyPrimitive: "graph",
2998
- tier: "workhorse"
2999
- };
3000
2393
  var GET_CODE_CONTEXT = {
3001
2394
  name: "get_code_context",
3002
2395
  description: "Returns code-grounded beliefs, contracts, migration states, and failed attempts anchored to a specific file or function path. Like `git log -- <path>` \u2014 filters the knowledge graph to nodes anchored to a file path via metadata.codeAnchors. Results are separated by coding belief type: decisions, contracts, migrations, patterns, deprecations, and failures.",
@@ -3192,7 +2585,7 @@ var MANAGE_WRITE_POLICY = {
3192
2585
  },
3193
2586
  role: {
3194
2587
  type: "string",
3195
- description: "Role to set policy for (required for 'set'). E.g. 'agent:internal' or a Permit role key such as 'workspace_admin'."
2588
+ description: "Role to set policy for (required for 'set'). E.g. 'agent:internal', 'user:analyst'."
3196
2589
  },
3197
2590
  permission: {
3198
2591
  type: "string",
@@ -4129,72 +3522,6 @@ var GENERATE_SESSION_HANDOFF = {
4129
3522
  tier: "showcase",
4130
3523
  internal: true
4131
3524
  };
4132
- var BEGIN_BUILD_SESSION = {
4133
- name: "begin_build_session",
4134
- description: "Bootstrap a coding build session for a Lucern worktree. Like `git worktree add` plus `git status` \u2014 returns the compact context packet an agent needs before editing.",
4135
- parameters: {
4136
- worktreeId: {
4137
- type: "string",
4138
- description: "The Lucern worktree ID to bootstrap."
4139
- },
4140
- branch: {
4141
- type: "string",
4142
- description: "Optional git branch name. Auto-generated from the worktree name when omitted."
4143
- },
4144
- branchBase: {
4145
- type: "string",
4146
- description: 'Base branch for the feature branch. Default: "staging".'
4147
- },
4148
- prBase: {
4149
- type: "string",
4150
- description: 'Target branch for the PR. Default: "staging".'
4151
- },
4152
- sessionMode: {
4153
- type: "string",
4154
- description: 'Session mode: "async" for Codex/headless or "interactive" for live sessions.',
4155
- enum: ["async", "interactive"]
4156
- },
4157
- activateIfPlanning: {
4158
- type: "boolean",
4159
- description: "When true, automatically activate a planning worktree during bootstrap."
4160
- }
4161
- },
4162
- required: ["worktreeId"],
4163
- response: {
4164
- description: "A compact build-session packet with worktree metadata, graph anchors, questions, dependencies, and git defaults.",
4165
- fields: {
4166
- topicId: "string \u2014 canonical topic scope",
4167
- topicName: "string \u2014 human-readable topic name",
4168
- worktreeId: "string \u2014 worktree ID",
4169
- worktreeName: "string \u2014 human-readable worktree name",
4170
- branch: "string \u2014 git branch name",
4171
- branchBase: "string \u2014 base branch",
4172
- prBase: "string \u2014 PR target branch",
4173
- campaign: "number | null \u2014 top-level pipeline campaign",
4174
- lane: "string \u2014 campaign lane",
4175
- gate: "string \u2014 exit gate",
4176
- hypothesis: "string \u2014 worktree hypothesis",
4177
- focus: "string \u2014 session focus",
4178
- status: "string \u2014 worktree status after optional activation",
4179
- sessionMode: "string \u2014 async | interactive",
4180
- targetBeliefIds: "array \u2014 scoped belief IDs",
4181
- targetQuestionIds: "array \u2014 scoped question IDs",
4182
- taskIds: "array \u2014 assigned task IDs for this worktree",
4183
- incompleteTaskIds: "array \u2014 assigned task IDs that still require done/deferred/blocked proof",
4184
- tasks: "array \u2014 assigned task packet with id, title, status, priority, links, and summaries",
4185
- topBeliefs: "array \u2014 highest-confidence scoped beliefs",
4186
- openQuestions: "array \u2014 open scoped questions",
4187
- resolvedDecisions: "array \u2014 answered questions summarized for the session",
4188
- dependencies: "array \u2014 upstream worktrees",
4189
- unblocks: "array \u2014 downstream worktrees",
4190
- mergeOrderNotes: "string \u2014 merge ordering advisory"
4191
- }
4192
- },
4193
- ownerModule: "bootstrap",
4194
- ontologyPrimitive: "worktree",
4195
- tier: "showcase",
4196
- internal: true
4197
- };
4198
3525
  var MCP_TOOL_CONTRACTS = {
4199
3526
  // Belief lifecycle (commit, amend, fork, archive)
4200
3527
  create_belief: CREATE_BELIEF,
@@ -4237,26 +3564,11 @@ var MCP_TOOL_CONTRACTS = {
4237
3564
  bisect_confidence: BISECT_CONFIDENCE,
4238
3565
  // Edges (commit)
4239
3566
  create_edge: CREATE_EDGE,
4240
- update_edge: UPDATE_EDGE,
4241
- remove_edge: REMOVE_EDGE,
4242
- remove_edges_between: REMOVE_EDGES_BETWEEN,
4243
- batch_create_edges: BATCH_CREATE_EDGES,
4244
- // Epistemic node spine (commit/amend/show)
4245
- create_epistemic_node: CREATE_EPISTEMIC_NODE,
4246
- get_epistemic_node: GET_EPISTEMIC_NODE,
4247
- list_epistemic_nodes: LIST_EPISTEMIC_NODES,
4248
- update_epistemic_node: UPDATE_EPISTEMIC_NODE,
4249
- archive_epistemic_node: ARCHIVE_EPISTEMIC_NODE,
4250
- verify_epistemic_node: VERIFY_EPISTEMIC_NODE,
4251
- supersede_epistemic_node: SUPERSEDE_EPISTEMIC_NODE,
4252
- batch_create_epistemic_nodes: BATCH_CREATE_EPISTEMIC_NODES,
4253
3567
  // Judgments (tag)
4254
3568
  record_judgment: RECORD_JUDGMENT,
4255
3569
  // Graph intelligence (showcase)
4256
3570
  detect_confirmation_bias: DETECT_CONFIRMATION_BIAS,
4257
3571
  get_graph_structure_analysis: GET_GRAPH_STRUCTURE_ANALYSIS,
4258
- list_graph_intelligence_queries: LIST_GRAPH_INTELLIGENCE_QUERIES,
4259
- run_graph_intelligence_query: RUN_GRAPH_INTELLIGENCE_QUERY,
4260
3572
  get_falsification_questions: GET_FALSIFICATION_QUESTIONS,
4261
3573
  // Evidence operations (workhorse)
4262
3574
  search_evidence: SEARCH_EVIDENCE,
@@ -4284,7 +3596,6 @@ var MCP_TOOL_CONTRACTS = {
4284
3596
  update_worktree_targets: UPDATE_WORKTREE_TARGETS,
4285
3597
  update_worktree_metadata: UPDATE_WORKTREE_METADATA,
4286
3598
  identity_whoami: IDENTITY_WHOAMI,
4287
- resolve_interactive_principal: RESOLVE_INTERACTIVE_PRINCIPAL,
4288
3599
  compile_context: COMPILE_CONTEXT,
4289
3600
  record_scope_learning: RECORD_SCOPE_LEARNING,
4290
3601
  pipeline_snapshot: PIPELINE_SNAPSHOT,
@@ -4304,7 +3615,6 @@ var MCP_TOOL_CONTRACTS = {
4304
3615
  get_agent_inbox: GET_AGENT_INBOX,
4305
3616
  claim_files: CLAIM_FILES,
4306
3617
  generate_session_handoff: GENERATE_SESSION_HANDOFF,
4307
- begin_build_session: BEGIN_BUILD_SESSION,
4308
3618
  // Policy / ACL (workhorse)
4309
3619
  check_permission: CHECK_PERMISSION,
4310
3620
  filter_by_permission: FILTER_BY_PERMISSION,
@@ -4324,8 +3634,6 @@ var MCP_TOOL_CONTRACTS = {
4324
3634
  get_topic: GET_TOPIC,
4325
3635
  update_topic: UPDATE_TOPIC,
4326
3636
  get_topic_tree: GET_TOPIC_TREE,
4327
- materialize_topic_graph: MATERIALIZE_TOPIC_GRAPH,
4328
- get_topic_graph_spine: GET_TOPIC_GRAPH_SPINE,
4329
3637
  // Coding intelligence (code-grounded knowledge)
4330
3638
  get_code_context: GET_CODE_CONTEXT,
4331
3639
  get_change_history: GET_CHANGE_HISTORY,
@@ -4402,7 +3710,6 @@ function entries(names, surfaceClass, surfaceIntent, surfaces, rationale) {
4402
3710
  var MCP_CORE_OPERATION_NAMES = [
4403
3711
  "compile_context",
4404
3712
  "identity_whoami",
4405
- "resolve_interactive_principal",
4406
3713
  "check_permission",
4407
3714
  "filter_by_permission",
4408
3715
  "create_belief",
@@ -4431,34 +3738,18 @@ var MCP_CORE_OPERATION_NAMES = [
4431
3738
  "find_missing_questions",
4432
3739
  "get_high_priority_questions",
4433
3740
  "get_falsification_questions",
4434
- "create_epistemic_node",
4435
- "get_epistemic_node",
4436
- "list_epistemic_nodes",
4437
- "update_epistemic_node",
4438
- "archive_epistemic_node",
4439
- "verify_epistemic_node",
4440
- "supersede_epistemic_node",
4441
- "batch_create_epistemic_nodes",
4442
3741
  "create_topic",
4443
3742
  "get_topic",
4444
3743
  "list_topics",
4445
3744
  "update_topic",
4446
- "get_topic_tree",
4447
- "materialize_topic_graph",
4448
- "get_topic_graph_spine"
3745
+ "get_topic_tree"
4449
3746
  ];
4450
3747
  var MCP_ANALYSIS_PLATFORM_OPERATION_NAMES = [
4451
3748
  "create_edge",
4452
- "update_edge",
4453
- "remove_edge",
4454
- "remove_edges_between",
4455
- "batch_create_edges",
4456
3749
  "query_lineage",
4457
3750
  "traverse_graph",
4458
3751
  "get_graph_neighborhood",
4459
3752
  "get_graph_structure_analysis",
4460
- "list_graph_intelligence_queries",
4461
- "run_graph_intelligence_query",
4462
3753
  "find_contradictions",
4463
3754
  "flag_contradiction",
4464
3755
  "detect_confirmation_bias",
@@ -4537,7 +3828,6 @@ var PLATFORM_INTERNAL_OPERATION_NAMES = [
4537
3828
  "get_change_history",
4538
3829
  "get_failure_log",
4539
3830
  "record_attempt",
4540
- "begin_build_session",
4541
3831
  "push",
4542
3832
  "open_pull_request",
4543
3833
  "record_judgment",
@@ -4592,6 +3882,7 @@ var SDK_ONLY_OPERATION_NAMES = [
4592
3882
  "find_semantic_orphans"
4593
3883
  ];
4594
3884
  var MCP_ONLY_INTERNAL_OPERATION_NAMES = [
3885
+ "begin_build_session",
4595
3886
  "evaluate_engineering_contract",
4596
3887
  "evaluate_research_contract"
4597
3888
  ];
@@ -4688,13 +3979,6 @@ var LUCERN_OPERATION_MANIFEST = {
4688
3979
  "Lucern MCP-only platform operation for local agent/bootstrap or verification workflows. Hidden from public discovery."
4689
3980
  )
4690
3981
  };
4691
- z.enum(["decision", "belief", "question", "theme", "deal", "topic", "claim", "evidence", "synthesis", "answer", "atomic_fact", "excerpt", "source", "company", "person", "investor", "function", "value_chain"]);
4692
- var EDGE_TYPE_VALUES = ["supports", "informs", "depends_on", "derived_from", "contains", "tests", "supersedes", "responds_to", "belongs_to", "relates_to_thesis", "works_at", "invested_in", "competes_with", "participates_in", "founded_by", "evaluates", "performs", "function_in", "impacts", "raised_from", "mentioned_in", "perspective_on", "plays_theme", "answers", "explores", "qualifies", "based_on", "based_on_belief", "based_on_question", "blocked_by_contradiction", "informed_by_theme", "same_as", "reinforces", "parent_of", "child_of", "falsified_by", "exclusive_with", "collapses_if", "cascade_from", "counterfactual_of", "cascade_to", "mutually_exclusive", "correlates_with", "amplifies", "precondition_for", "in_tension_with", "strengthened_by", "weakened_by", "alternative_to", "subsumes", "validated_by", "required_for", "blocks", "prerequisite_for", "parallel_to", "corroborates", "extends", "same_source_as", "same_theme_as", "assumes", "would_predict", "analogous_to", "independent_of", "implements", "violates", "co_changes_with", "migrating_from", "migrating_to", "scoped_by", "about_entity", "entity_referenced_in", "contradicts", "cites", "summarizes", "related_to", "partially_answers", "refines", "branches_from"];
4693
- var STORAGE_EDGE_TYPE_VALUES = [...EDGE_TYPE_VALUES, "extracted_from"];
4694
- z.enum(EDGE_TYPE_VALUES);
4695
- z.enum(STORAGE_EDGE_TYPE_VALUES);
4696
- z.enum(["active", "archived", "watching"]);
4697
- z.enum(["private", "team", "firm", "external", "public"]);
4698
3982
 
4699
3983
  // src/function-registry/helpers.ts
4700
3984
  var jsonObjectSchema = z.record(z.unknown());
@@ -4791,20 +4075,12 @@ function unwrapMcpParameterSchema(schema) {
4791
4075
  current = current._def.schema;
4792
4076
  continue;
4793
4077
  default:
4794
- return {
4795
- schema: current,
4796
- required,
4797
- description: description ?? current.description
4798
- };
4078
+ return { schema: current, required, description: description ?? current.description };
4799
4079
  }
4800
4080
  }
4801
4081
  }
4802
4082
  function mcpParameterFromZod(fieldName, schema, contractName) {
4803
- const {
4804
- schema: unwrapped,
4805
- required,
4806
- description: schemaDescription
4807
- } = unwrapMcpParameterSchema(schema);
4083
+ const { schema: unwrapped, required, description: schemaDescription } = unwrapMcpParameterSchema(schema);
4808
4084
  const description = schemaDescription ?? unwrapped.description ?? fieldName;
4809
4085
  switch (unwrapped._def.typeName) {
4810
4086
  case z.ZodFirstPartyTypeKind.ZodString:
@@ -4849,12 +4125,10 @@ function mcpContractFromArgsSchema(base, args, contractName) {
4849
4125
  const entries2 = Object.entries(getObjectShape(args)).sort(
4850
4126
  ([left], [right]) => left.localeCompare(right)
4851
4127
  );
4852
- const converted = entries2.map(
4853
- ([fieldName, schema]) => [
4854
- fieldName,
4855
- mcpParameterFromZod(fieldName, schema, contractName)
4856
- ]
4857
- );
4128
+ const converted = entries2.map(([fieldName, schema]) => [
4129
+ fieldName,
4130
+ mcpParameterFromZod(fieldName, schema, contractName)
4131
+ ]);
4858
4132
  return {
4859
4133
  ...base,
4860
4134
  parameters: Object.fromEntries(
@@ -4863,7 +4137,9 @@ function mcpContractFromArgsSchema(base, args, contractName) {
4863
4137
  required: converted.filter(([, field]) => field.required).map(([fieldName]) => fieldName)
4864
4138
  };
4865
4139
  }
4866
- var defineFunctionContract = (contract) => contract;
4140
+ function defineFunctionContract(contract) {
4141
+ return contract;
4142
+ }
4867
4143
  function surfaceMcpContract(name) {
4868
4144
  const contract = MCP_TOOL_CONTRACTS[name];
4869
4145
  if (!contract) {
@@ -4940,16 +4216,9 @@ function surfaceContract(args) {
4940
4216
  scopes: args.scopes ?? [
4941
4217
  args.kind === "query" ? `${args.domain}.read` : `${args.domain}.write`
4942
4218
  ],
4943
- allowedPrincipalTypes: [
4944
- "user",
4945
- "service",
4946
- "agent",
4947
- "group",
4948
- "external_viewer"
4949
- ]
4219
+ allowedPrincipalTypes: ["user", "service", "agent"]
4950
4220
  },
4951
4221
  convex: args.convex,
4952
- gateway: args.gateway,
4953
4222
  args: canonicalArgs,
4954
4223
  returns: canonicalReturns,
4955
4224
  input,
@@ -4960,6 +4229,8 @@ function surfaceContract(args) {
4960
4229
  }
4961
4230
  });
4962
4231
  }
4232
+
4233
+ // src/function-registry/identity.ts
4963
4234
  var withPrincipal = (input, context) => ({
4964
4235
  ...input,
4965
4236
  tenantId: input.tenantId ?? context.tenantId,
@@ -4978,30 +4249,11 @@ var identityContracts = [
4978
4249
  sdkNamespace: "identity",
4979
4250
  sdkMethod: "whoami",
4980
4251
  summary: "Describe the current gateway principal.",
4981
- gateway: {
4982
- handler: "identity.whoami"
4983
- }
4984
- }),
4985
- surfaceContract({
4986
- name: "resolve_interactive_principal",
4987
- kind: "query",
4988
- domain: "controlPlane",
4989
- surfaceClass: "platform_public",
4990
- method: "POST",
4991
- path: "/control-plane/identity/resolve-interactive-principal",
4992
- sdkNamespace: "controlPlane.identity",
4993
- sdkMethod: "resolveInteractivePrincipal",
4994
- summary: "Resolve an authenticated Clerk user into a Permit-backed Lucern principal context.",
4995
- args: z.object({
4996
- clerkId: z.string().min(1),
4997
- tenantId: z.string().min(1).optional(),
4998
- workspaceId: z.string().min(1).optional(),
4999
- providerProjectId: z.string().min(1).optional()
5000
- }),
5001
4252
  convex: {
5002
- module: "platform",
5003
- functionName: "resolveInteractivePrincipal",
5004
- kind: "query"
4253
+ module: "identity",
4254
+ functionName: "whoami",
4255
+ kind: "query",
4256
+ inputProjection: withPrincipal
5005
4257
  }
5006
4258
  }),
5007
4259
  surfaceContract({