@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
@@ -1,3 +1,17 @@
1
+ // src/types/reasoning-method.ts
2
+ var REASONING_METHODS = [
3
+ "deductive",
4
+ "inductive",
5
+ "abductive",
6
+ "analogical",
7
+ "causal",
8
+ "correlational",
9
+ "testimonial",
10
+ "statistical",
11
+ "implicit",
12
+ "pattern_match"
13
+ ];
14
+
1
15
  // src/lens-workflow.contract.ts
2
16
  var LENS_PERSPECTIVE_TYPES = [
3
17
  "investigation",
@@ -418,7 +432,22 @@ var ADD_WORKTREE = {
418
432
  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.",
419
433
  parameters: {
420
434
  title: { type: "string", description: "Worktree name/objective" },
421
- topicId: { type: "string", description: "Optional topic scope hint" },
435
+ name: {
436
+ type: "string",
437
+ description: "Optional storage-name alias for callers that already use backend naming"
438
+ },
439
+ projectId: {
440
+ type: "string",
441
+ description: "Legacy topicId alias or resolver hint"
442
+ },
443
+ topicId: {
444
+ type: "string",
445
+ description: "Optional topic scope hint for resolver validation"
446
+ },
447
+ topicHint: {
448
+ type: "string",
449
+ description: "Natural-language topic hint for automatic topic resolution"
450
+ },
422
451
  branchId: {
423
452
  type: "string",
424
453
  description: "The branch this worktree investigates"
@@ -431,18 +460,107 @@ var ADD_WORKTREE = {
431
460
  type: "string",
432
461
  description: "The testable claim this worktree investigates"
433
462
  },
463
+ rationale: {
464
+ type: "string",
465
+ description: "Why this worktree exists and why it belongs in the campaign"
466
+ },
467
+ worktreeType: {
468
+ type: "string",
469
+ description: "Schema-enum worktree type used by the kernel lifecycle and retrieval layers"
470
+ },
471
+ gate: {
472
+ type: "string",
473
+ description: "Exit gate name for this worktree"
474
+ },
475
+ startDate: {
476
+ type: "number",
477
+ description: "Planned start timestamp in milliseconds since epoch"
478
+ },
479
+ endDate: {
480
+ type: "number",
481
+ description: "Planned end timestamp in milliseconds since epoch"
482
+ },
483
+ durationWeeks: {
484
+ type: "number",
485
+ description: "Planned duration in weeks"
486
+ },
487
+ confidenceImpact: {
488
+ type: "string",
489
+ description: "Expected confidence impact if the worktree succeeds",
490
+ enum: ["high", "medium", "low"]
491
+ },
492
+ beliefFocus: {
493
+ type: "string",
494
+ description: "Natural-language focus spanning the target belief neighborhood"
495
+ },
434
496
  beliefIds: {
435
497
  type: "array",
436
- description: "Beliefs to test in this worktree"
498
+ description: "Legacy alias for targetBeliefIds"
499
+ },
500
+ beliefs: {
501
+ type: "array",
502
+ description: "Legacy alias for targetBeliefIds"
503
+ },
504
+ targetBeliefIds: {
505
+ type: "array",
506
+ description: "Belief node IDs this worktree is expected to test or update"
507
+ },
508
+ targetQuestionIds: {
509
+ type: "array",
510
+ description: "Question node IDs this worktree is expected to answer"
511
+ },
512
+ keyQuestions: {
513
+ type: "array",
514
+ description: "Inline key question objects with question, optional status, answer, answerConfidence, and linkedQuestionId"
515
+ },
516
+ evidenceSignals: {
517
+ type: "array",
518
+ description: "Evidence signal objects with signal, optional collected state, progress, and notes"
519
+ },
520
+ decisionGate: {
521
+ type: "object",
522
+ description: "Decision gate object with goCriteria, noGoSignals, optional verdict, rationale, decidedAt, and decidedBy"
523
+ },
524
+ goCriteria: {
525
+ type: "array",
526
+ description: "Shorthand go criteria used to build decisionGate"
527
+ },
528
+ noGoSignals: {
529
+ type: "array",
530
+ description: "Shorthand no-go signals used to build decisionGate"
531
+ },
532
+ proofArtifacts: {
533
+ type: "array",
534
+ description: "Expected proof artifacts required to close the worktree"
437
535
  },
438
536
  autoShape: {
439
537
  type: "boolean",
440
538
  description: "Whether to invoke inquiry auto-shaping during worktree creation"
441
539
  },
540
+ autoFixPolicy: {
541
+ type: "object",
542
+ description: "Policy for permitted automatic remediation inside the worktree"
543
+ },
442
544
  domainPackId: {
443
545
  type: "string",
444
546
  description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
445
547
  },
548
+ tags: {
549
+ type: "array",
550
+ description: "Additional topic-resolution tags for the worktree"
551
+ },
552
+ touchedPaths: {
553
+ type: "array",
554
+ description: "File paths used as topic-resolution signals"
555
+ },
556
+ sourceRef: {
557
+ type: "string",
558
+ description: "Source reference used as a topic-resolution signal"
559
+ },
560
+ sourceKind: {
561
+ type: "string",
562
+ description: "Source kind used as a topic-resolution signal"
563
+ },
446
564
  campaign: {
447
565
  type: "number",
448
566
  description: "Top-level pipeline campaign number. Campaigns define the outer execution slice."
@@ -467,12 +585,20 @@ var ADD_WORKTREE = {
467
585
  type: "array",
468
586
  description: "Worktree IDs blocked by this worktree"
469
587
  },
470
- gate: {
588
+ staffingHint: {
471
589
  type: "string",
472
- description: "Exit gate name for this worktree"
590
+ description: "Suggested staffing or agent allocation note"
591
+ },
592
+ lensId: {
593
+ type: "string",
594
+ description: "Lens that scopes this worktree when applicable"
595
+ },
596
+ lastReconciledAt: {
597
+ type: "number",
598
+ description: "Timestamp when worktree metadata was last reconciled"
473
599
  }
474
600
  },
475
- required: ["title", "topicId"],
601
+ required: ["title"],
476
602
  response: {
477
603
  description: "The created worktree",
478
604
  fields: {
@@ -499,7 +625,7 @@ var MERGE = {
499
625
  worktreeId: { type: "string", description: "The worktree to merge" },
500
626
  outcomes: {
501
627
  type: "array",
502
- description: "Scoring outcomes for each belief: { beliefId, confidence, rationale }"
628
+ description: "Merge outcomes as key-finding strings, or scoring outcomes for beliefs: { beliefId, confidence, rationale }"
503
629
  },
504
630
  summary: { type: "string", description: "Overall findings summary" }
505
631
  },
@@ -717,19 +843,23 @@ var FIND_CONTRADICTIONS = {
717
843
  };
718
844
  var CREATE_EDGE = {
719
845
  name: "create_edge",
720
- 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).",
846
+ 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.",
721
847
  parameters: {
722
- sourceId: {
723
- type: "string",
724
- description: "Source node of the relationship"
848
+ from: {
849
+ type: "object",
850
+ description: "Source graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'topic' }"
725
851
  },
726
- targetId: {
727
- type: "string",
728
- description: "Target node of the relationship"
852
+ to: {
853
+ type: "object",
854
+ description: "Target graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'belief' }"
729
855
  },
730
856
  edgeType: {
731
857
  type: "string",
732
- description: "Relationship type (informs, tests, depends_on, supersedes, etc.)"
858
+ description: "Relationship type from the public epistemic edge enum."
859
+ },
860
+ globalId: {
861
+ type: "string",
862
+ description: "Optional idempotent edge global ID."
733
863
  },
734
864
  weight: {
735
865
  type: "number",
@@ -739,10 +869,14 @@ var CREATE_EDGE = {
739
869
  reasoningMethod: {
740
870
  type: "string",
741
871
  description: "How this was determined",
742
- enum: ["deductive", "inductive", "abductive", "analogical", "empirical"]
872
+ enum: [...REASONING_METHODS]
873
+ },
874
+ metadata: {
875
+ type: "object",
876
+ description: "Optional edge metadata."
743
877
  }
744
878
  },
745
- required: ["sourceId", "targetId", "edgeType"],
879
+ required: ["from", "to", "edgeType"],
746
880
  response: {
747
881
  description: "The created edge",
748
882
  fields: {
@@ -756,6 +890,240 @@ var CREATE_EDGE = {
756
890
  ontologyPrimitive: "edge",
757
891
  tier: "showcase"
758
892
  };
893
+ var UPDATE_EDGE = {
894
+ name: "update_edge",
895
+ description: "Amend metadata on an existing graph edge. Like `git commit --amend` \u2014 changes the edge annotation without recreating the relationship.",
896
+ parameters: {
897
+ edgeId: { type: "string", description: "Edge ID or global ID to update" },
898
+ weight: { type: "number", description: "Updated edge weight" },
899
+ confidence: { type: "number", description: "Updated confidence" },
900
+ context: { type: "string", description: "Updated human-readable context" },
901
+ derivationType: { type: "string", description: "Updated derivation type" },
902
+ metadata: { type: "object", description: "Updated metadata" }
903
+ },
904
+ required: ["edgeId"],
905
+ response: {
906
+ description: "Edge update result",
907
+ fields: { success: "boolean" }
908
+ },
909
+ ownerModule: "graph-primitives",
910
+ ontologyPrimitive: "edge",
911
+ tier: "workhorse"
912
+ };
913
+ var REMOVE_EDGE = {
914
+ name: "remove_edge",
915
+ description: "Remove one graph edge by ID. Like `git rm` \u2014 deletes a single explicit relationship from the spine.",
916
+ parameters: {
917
+ edgeId: { type: "string", description: "Edge ID or global ID to remove" }
918
+ },
919
+ required: ["edgeId"],
920
+ response: {
921
+ description: "Edge removal result",
922
+ fields: { success: "boolean" }
923
+ },
924
+ ownerModule: "graph-primitives",
925
+ ontologyPrimitive: "edge",
926
+ tier: "workhorse"
927
+ };
928
+ var REMOVE_EDGES_BETWEEN = {
929
+ name: "remove_edges_between",
930
+ description: "Remove graph edges between two nodes. Like `git rm <pathspec>` \u2014 deletes relationships matching a source, target, and optional type.",
931
+ parameters: {
932
+ fromNodeId: { type: "string", description: "Source node ID or global ID" },
933
+ toNodeId: { type: "string", description: "Target node ID or global ID" },
934
+ edgeType: { type: "string", description: "Optional edge type filter" }
935
+ },
936
+ required: ["fromNodeId", "toNodeId"],
937
+ response: {
938
+ description: "Matched edge removal result",
939
+ fields: { deleted: "number" }
940
+ },
941
+ ownerModule: "graph-primitives",
942
+ ontologyPrimitive: "edge",
943
+ tier: "workhorse"
944
+ };
945
+ var BATCH_CREATE_EDGES = {
946
+ name: "batch_create_edges",
947
+ description: "Commit multiple typed graph edges. Like `git commit` with many staged paths \u2014 writes a batch of explicit relationships atomically per edge.",
948
+ parameters: {
949
+ edges: {
950
+ type: "array",
951
+ description: "Edges to create, each with from, to, edgeType, and optional weight/confidence/context."
952
+ },
953
+ skipLayerValidation: {
954
+ type: "boolean",
955
+ description: "Skip kernel layer validation for trusted materialization flows."
956
+ }
957
+ },
958
+ required: ["edges"],
959
+ response: {
960
+ description: "Batch edge creation result",
961
+ fields: {
962
+ created: "number",
963
+ results: "array",
964
+ errors: "array"
965
+ }
966
+ },
967
+ ownerModule: "graph-primitives",
968
+ ontologyPrimitive: "edge",
969
+ tier: "workhorse"
970
+ };
971
+ var CREATE_EPISTEMIC_NODE = {
972
+ name: "create_epistemic_node",
973
+ 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.",
974
+ parameters: {
975
+ globalId: { type: "string", description: "Optional idempotent node global ID" },
976
+ nodeType: { type: "string", description: "Public epistemic node type" },
977
+ canonicalText: { type: "string", description: "Canonical node text" },
978
+ text: { type: "string", description: "Alias for canonicalText" },
979
+ contentHash: { type: "string", description: "Optional idempotency content hash" },
980
+ sourceType: { type: "string", description: "Source type for provenance" },
981
+ topicId: { type: "string", description: "Optional topic scope" },
982
+ content: { type: "string", description: "Extended content" },
983
+ title: { type: "string", description: "Display title" },
984
+ metadata: { type: "object", description: "Optional node metadata" }
985
+ },
986
+ required: ["nodeType"],
987
+ response: {
988
+ description: "Created node result",
989
+ fields: {
990
+ nodeId: "string",
991
+ nodeGlobalId: "string",
992
+ isDuplicate: "boolean"
993
+ }
994
+ },
995
+ ownerModule: "reasoning-kernel",
996
+ ontologyPrimitive: "graph",
997
+ tier: "showcase"
998
+ };
999
+ var GET_EPISTEMIC_NODE = {
1000
+ name: "get_epistemic_node",
1001
+ description: "Read one epistemic graph node. Like `git show` \u2014 resolves a canonical spine node by ID or global ID.",
1002
+ parameters: {
1003
+ nodeId: { type: "string", description: "Node ID or global ID" }
1004
+ },
1005
+ required: ["nodeId"],
1006
+ response: {
1007
+ description: "The resolved node",
1008
+ fields: { node: "object" }
1009
+ },
1010
+ ownerModule: "reasoning-kernel",
1011
+ ontologyPrimitive: "graph",
1012
+ tier: "workhorse"
1013
+ };
1014
+ var LIST_EPISTEMIC_NODES = {
1015
+ name: "list_epistemic_nodes",
1016
+ description: "List epistemic graph nodes. Like `git ls-tree` \u2014 lists canonical spine nodes by topic, type, status, or search query.",
1017
+ parameters: {
1018
+ topicId: { type: "string", description: "Optional topic scope" },
1019
+ nodeType: { type: "string", description: "Optional node type filter" },
1020
+ status: { type: "string", description: "Optional lifecycle status" },
1021
+ searchQuery: { type: "string", description: "Optional text search query" },
1022
+ limit: { type: "number", description: "Maximum nodes to return" }
1023
+ },
1024
+ required: [],
1025
+ response: {
1026
+ description: "Matching nodes",
1027
+ fields: { nodes: "array" }
1028
+ },
1029
+ ownerModule: "reasoning-kernel",
1030
+ ontologyPrimitive: "graph",
1031
+ tier: "workhorse"
1032
+ };
1033
+ var UPDATE_EPISTEMIC_NODE = {
1034
+ name: "update_epistemic_node",
1035
+ description: "Amend an epistemic graph node. Like `git commit --amend` \u2014 updates mutable node metadata, text, status, or verification fields.",
1036
+ parameters: {
1037
+ nodeId: { type: "string", description: "Node ID or global ID" },
1038
+ canonicalText: { type: "string", description: "Updated canonical text" },
1039
+ text: { type: "string", description: "Alias for canonicalText" },
1040
+ contentHash: { type: "string", description: "Updated content hash" },
1041
+ content: { type: "string", description: "Updated content" },
1042
+ title: { type: "string", description: "Updated display title" },
1043
+ metadata: { type: "object", description: "Updated metadata" },
1044
+ confidence: { type: "number", description: "Updated confidence" },
1045
+ verificationStatus: { type: "string", description: "Updated verification status" },
1046
+ status: { type: "string", description: "Updated lifecycle status" }
1047
+ },
1048
+ required: ["nodeId"],
1049
+ response: {
1050
+ description: "Node update result",
1051
+ fields: { success: "boolean" }
1052
+ },
1053
+ ownerModule: "reasoning-kernel",
1054
+ ontologyPrimitive: "graph",
1055
+ tier: "workhorse"
1056
+ };
1057
+ var ARCHIVE_EPISTEMIC_NODE = {
1058
+ name: "archive_epistemic_node",
1059
+ description: "Archive an epistemic graph node. Like `git rm --cached` \u2014 removes a node from active traversal without hard-deleting it.",
1060
+ parameters: {
1061
+ nodeId: { type: "string", description: "Node ID or global ID" }
1062
+ },
1063
+ required: ["nodeId"],
1064
+ response: {
1065
+ description: "Archive result",
1066
+ fields: { success: "boolean", effectiveStatus: "string" }
1067
+ },
1068
+ ownerModule: "reasoning-kernel",
1069
+ ontologyPrimitive: "graph",
1070
+ tier: "workhorse"
1071
+ };
1072
+ var VERIFY_EPISTEMIC_NODE = {
1073
+ name: "verify_epistemic_node",
1074
+ description: "Record verification state on an epistemic graph node. Like `git tag` \u2014 marks the node with a reviewed verification state.",
1075
+ parameters: {
1076
+ nodeId: { type: "string", description: "Node ID or global ID" },
1077
+ verificationStatus: { type: "string", description: "Verification status" },
1078
+ confidence: { type: "number", description: "Optional confidence update" }
1079
+ },
1080
+ required: ["nodeId", "verificationStatus"],
1081
+ response: {
1082
+ description: "Verification result",
1083
+ fields: { success: "boolean" }
1084
+ },
1085
+ ownerModule: "reasoning-kernel",
1086
+ ontologyPrimitive: "graph",
1087
+ tier: "workhorse"
1088
+ };
1089
+ var SUPERSEDE_EPISTEMIC_NODE = {
1090
+ name: "supersede_epistemic_node",
1091
+ 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.",
1092
+ parameters: {
1093
+ oldNodeId: { type: "string", description: "Node ID or global ID to supersede" },
1094
+ newGlobalId: { type: "string", description: "Optional replacement global ID" },
1095
+ newCanonicalText: { type: "string", description: "Replacement canonical text" },
1096
+ text: { type: "string", description: "Alias for newCanonicalText" },
1097
+ newContentHash: { type: "string", description: "Optional replacement content hash" },
1098
+ reason: { type: "string", description: "Reason for superseding" }
1099
+ },
1100
+ required: ["oldNodeId"],
1101
+ response: {
1102
+ description: "Supersede result",
1103
+ fields: { oldNodeId: "string", newNodeId: "string" }
1104
+ },
1105
+ ownerModule: "reasoning-kernel",
1106
+ ontologyPrimitive: "graph",
1107
+ tier: "workhorse"
1108
+ };
1109
+ var BATCH_CREATE_EPISTEMIC_NODES = {
1110
+ name: "batch_create_epistemic_nodes",
1111
+ description: "Commit multiple epistemic graph nodes. Like `git commit` with many staged files \u2014 writes a batch of canonical spine nodes.",
1112
+ parameters: {
1113
+ nodes: {
1114
+ type: "array",
1115
+ description: "Nodes to create with nodeType, canonicalText/text, and optional metadata."
1116
+ }
1117
+ },
1118
+ required: ["nodes"],
1119
+ response: {
1120
+ description: "Batch node creation result",
1121
+ fields: { created: "number", results: "array" }
1122
+ },
1123
+ ownerModule: "reasoning-kernel",
1124
+ ontologyPrimitive: "graph",
1125
+ tier: "workhorse"
1126
+ };
759
1127
  var RECORD_JUDGMENT = {
760
1128
  name: "record_judgment",
761
1129
  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).",
@@ -1053,6 +1421,74 @@ var GET_GRAPH_STRUCTURE_ANALYSIS = {
1053
1421
  ontologyPrimitive: "graph",
1054
1422
  tier: "showcase"
1055
1423
  };
1424
+ var LIST_GRAPH_INTELLIGENCE_QUERIES = {
1425
+ name: "list_graph_intelligence_queries",
1426
+ 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.",
1427
+ parameters: {
1428
+ categoryId: {
1429
+ type: "string",
1430
+ description: "Optional category filter, such as problems or strategic"
1431
+ },
1432
+ mode: {
1433
+ type: "string",
1434
+ description: "Optional mode filter: core, bias, stress, operational, alpha, semantic, or evidence"
1435
+ }
1436
+ },
1437
+ required: [],
1438
+ response: {
1439
+ description: "Graph Intelligence query catalog and mode-to-tool mapping",
1440
+ fields: {
1441
+ categories: "array \u2014 query categories",
1442
+ queries: "array \u2014 query definitions with prompt templates and tools",
1443
+ quickQueries: "array \u2014 recommended one-click query presets",
1444
+ publicToolNamesByMode: "object \u2014 public tool names available to each Graph Intelligence mode"
1445
+ }
1446
+ },
1447
+ ownerModule: "graph-intelligence",
1448
+ ontologyPrimitive: "graph",
1449
+ tier: "showcase"
1450
+ };
1451
+ var RUN_GRAPH_INTELLIGENCE_QUERY = {
1452
+ name: "run_graph_intelligence_query",
1453
+ 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.",
1454
+ parameters: {
1455
+ topicId: { type: "string", description: "Topic to analyze" },
1456
+ queryId: {
1457
+ type: "string",
1458
+ description: "Graph Intelligence query ID, such as confirmation-bias, pre-mortem, or thesis-summary"
1459
+ },
1460
+ prompt: {
1461
+ type: "string",
1462
+ description: "Optional custom prompt for custom analysis runs"
1463
+ },
1464
+ input: {
1465
+ type: "string",
1466
+ description: "Optional entity, theme, belief, company, or search text for input-driven queries"
1467
+ },
1468
+ mode: {
1469
+ type: "string",
1470
+ description: "Optional mode override: core, bias, stress, operational, alpha, semantic, or evidence"
1471
+ },
1472
+ limit: {
1473
+ type: "number",
1474
+ description: "Maximum graph context rows to return"
1475
+ }
1476
+ },
1477
+ required: ["topicId"],
1478
+ response: {
1479
+ description: "Graph Intelligence query result bundle ready for model or prompt-library synthesis",
1480
+ fields: {
1481
+ query: "object \u2014 selected query definition",
1482
+ prompt: "string \u2014 resolved prompt template",
1483
+ toolPlan: "array \u2014 public tools and args the model can call next",
1484
+ analysis: "object \u2014 structure, coverage, gap, and confirmation-bias analysis",
1485
+ context: "object \u2014 sampled beliefs, questions, evidence, edges, and contradictions"
1486
+ }
1487
+ },
1488
+ ownerModule: "graph-intelligence",
1489
+ ontologyPrimitive: "graph",
1490
+ tier: "showcase"
1491
+ };
1056
1492
  var GET_FALSIFICATION_QUESTIONS = {
1057
1493
  name: "get_falsification_questions",
1058
1494
  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.",
@@ -1901,15 +2337,15 @@ var IDENTITY_WHOAMI = {
1901
2337
  };
1902
2338
  var COMPILE_CONTEXT = {
1903
2339
  name: "compile_context",
1904
- 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.",
2340
+ 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.",
1905
2341
  parameters: {
1906
2342
  topicId: {
1907
2343
  type: "string",
1908
- description: "Topic scope ID to compile"
2344
+ description: "Optional topic scope ID. Omit to resolve the topic from query."
1909
2345
  },
1910
2346
  query: {
1911
2347
  type: "string",
1912
- description: "Optional focus query used to rank context items"
2348
+ description: "Focus query used to resolve the topic and rank context items. Required when topicId is omitted."
1913
2349
  },
1914
2350
  budget: {
1915
2351
  type: "number",
@@ -1933,7 +2369,7 @@ var COMPILE_CONTEXT = {
1933
2369
  description: "Include related ontological entities in the compiled result"
1934
2370
  }
1935
2371
  },
1936
- required: ["topicId"],
2372
+ required: [],
1937
2373
  response: {
1938
2374
  description: "Compiled context pack for the requested topic",
1939
2375
  fields: {
@@ -2107,18 +2543,64 @@ var CREATE_TASK = {
2107
2543
  name: "create_task",
2108
2544
  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.",
2109
2545
  parameters: {
2110
- title: { type: "string", description: "Task description" },
2546
+ title: { type: "string", description: "Task title" },
2111
2547
  topicId: { type: "string", description: "Topic scope" },
2548
+ description: {
2549
+ type: "string",
2550
+ description: "Long-form task description"
2551
+ },
2112
2552
  taskType: {
2113
2553
  type: "string",
2114
- description: "Type: research, interview, analysis, data_collection",
2115
- enum: ["research", "interview", "analysis", "data_collection"]
2554
+ description: "Task taxonomy",
2555
+ enum: [
2556
+ "general",
2557
+ "find_evidence",
2558
+ "verify_claim",
2559
+ "research",
2560
+ "review",
2561
+ "interview",
2562
+ "analysis",
2563
+ "track_metrics"
2564
+ ]
2565
+ },
2566
+ priority: {
2567
+ type: "string",
2568
+ description: "Priority",
2569
+ enum: ["urgent", "high", "medium", "low"]
2570
+ },
2571
+ status: {
2572
+ type: "string",
2573
+ description: "Initial status (defaults to todo)",
2574
+ enum: ["todo", "in_progress", "blocked", "done"]
2575
+ },
2576
+ linkedWorktreeId: {
2577
+ type: "string",
2578
+ description: "Worktree this task belongs to"
2579
+ },
2580
+ linkedBeliefId: {
2581
+ type: "string",
2582
+ description: "Belief this task supports"
2116
2583
  },
2117
2584
  linkedQuestionId: {
2118
2585
  type: "string",
2119
2586
  description: "Question this task addresses"
2120
2587
  },
2121
- linkedWorktreeId: { type: "string", description: "Worktree scope" }
2588
+ assigneeId: {
2589
+ type: "string",
2590
+ description: "Principal assigned to the task"
2591
+ },
2592
+ dueDate: {
2593
+ type: "number",
2594
+ description: "Due date as epoch milliseconds"
2595
+ },
2596
+ tags: {
2597
+ type: "array",
2598
+ description: "Free-form string tags"
2599
+ },
2600
+ metadata: {
2601
+ type: "object",
2602
+ description: "Structured task metadata for handoff context and routing hints"
2603
+ }
2122
2604
  },
2123
2605
  required: ["title"],
2124
2606
  response: {
@@ -2191,6 +2673,10 @@ var UPDATE_TASK = {
2191
2673
  type: "string",
2192
2674
  description: "Updated status",
2193
2675
  enum: ["todo", "in_progress", "blocked", "done"]
2676
+ },
2677
+ metadata: {
2678
+ type: "object",
2679
+ description: "Structured task metadata to replace or refine"
2194
2680
  }
2195
2681
  },
2196
2682
  required: ["taskId"],
@@ -2238,6 +2724,10 @@ var CREATE_TOPIC = {
2238
2724
  name: "create_topic",
2239
2725
  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.",
2240
2726
  parameters: {
2727
+ globalId: {
2728
+ type: "string",
2729
+ description: "Optional idempotent topic global ID"
2730
+ },
2241
2731
  name: { type: "string", description: "Topic name" },
2242
2732
  type: {
2243
2733
  type: "string",
@@ -2248,6 +2738,18 @@ var CREATE_TOPIC = {
2248
2738
  type: "string",
2249
2739
  description: "Optional parent topic for nesting"
2250
2740
  },
2741
+ parentTopicGlobalId: {
2742
+ type: "string",
2743
+ description: "Optional parent topic global ID for nesting"
2744
+ },
2745
+ tenantId: { type: "string", description: "Optional tenant scope" },
2746
+ workspaceId: { type: "string", description: "Optional workspace scope" },
2747
+ visibility: {
2748
+ type: "string",
2749
+ description: "Topic visibility",
2750
+ enum: ["private", "team", "firm", "external", "public"]
2751
+ },
2752
+ metadata: { type: "object", description: "Optional topic metadata" },
2251
2753
  createdBy: { type: "string", description: "Who created this topic" }
2252
2754
  },
2253
2755
  required: ["name", "type"],
@@ -2256,6 +2758,9 @@ var CREATE_TOPIC = {
2256
2758
  fields: {
2257
2759
  id: "string \u2014 topic ID",
2258
2760
  globalId: "string \u2014 globally unique ID",
2761
+ topicGlobalId: "string \u2014 topic global ID",
2762
+ epistemicNodeId: "string \u2014 materialized topic node ID",
2763
+ epistemicNodeGlobalId: "string \u2014 materialized topic node global ID",
2259
2764
  depth: "number \u2014 nesting depth"
2260
2765
  }
2261
2766
  },
@@ -2386,6 +2891,65 @@ var GET_TOPIC_TREE = {
2386
2891
  ontologyPrimitive: "graph",
2387
2892
  tier: "workhorse"
2388
2893
  };
2894
+ var MATERIALIZE_TOPIC_GRAPH = {
2895
+ name: "materialize_topic_graph",
2896
+ description: "Backfill the topic graph spine. Like `git fsck --connectivity-only` with repair enabled \u2014 creates missing topic nodes and parent-child edges idempotently.",
2897
+ parameters: {
2898
+ rootTopicId: {
2899
+ type: "string",
2900
+ description: "Optional root topic for a bounded materialization pass"
2901
+ },
2902
+ dryRun: {
2903
+ type: "boolean",
2904
+ description: "When true, report missing rows without writing them"
2905
+ }
2906
+ },
2907
+ required: [],
2908
+ response: {
2909
+ description: "Topic graph materialization counts",
2910
+ fields: {
2911
+ topicsSeen: "number",
2912
+ nodesCreated: "number",
2913
+ nodesExisting: "number",
2914
+ edgesCreated: "number",
2915
+ edgesExisting: "number",
2916
+ errors: "array"
2917
+ }
2918
+ },
2919
+ ownerModule: "reasoning-kernel",
2920
+ ontologyPrimitive: "graph",
2921
+ tier: "workhorse"
2922
+ };
2923
+ var GET_TOPIC_GRAPH_SPINE = {
2924
+ name: "get_topic_graph_spine",
2925
+ description: "Verify the topic graph spine. Like `git fsck` \u2014 reads topics, materialized topic nodes, parent-child edges, and missing spine rows.",
2926
+ parameters: {
2927
+ rootTopicId: {
2928
+ type: "string",
2929
+ description: "Optional root topic for a bounded verifier pass"
2930
+ },
2931
+ includeTopicBeliefEdges: {
2932
+ type: "boolean",
2933
+ description: "Include topic -> belief edges in the verifier payload"
2934
+ }
2935
+ },
2936
+ required: [],
2937
+ response: {
2938
+ description: "Topic graph spine verification payload",
2939
+ fields: {
2940
+ ok: "boolean",
2941
+ counts: "object",
2942
+ topics: "array",
2943
+ topicNodes: "array",
2944
+ parentEdges: "array",
2945
+ missingTopicNodes: "array",
2946
+ missingParentEdges: "array"
2947
+ }
2948
+ },
2949
+ ownerModule: "reasoning-kernel",
2950
+ ontologyPrimitive: "graph",
2951
+ tier: "workhorse"
2952
+ };
2389
2953
  var GET_CODE_CONTEXT = {
2390
2954
  name: "get_code_context",
2391
2955
  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.",
@@ -3518,6 +4082,72 @@ var GENERATE_SESSION_HANDOFF = {
3518
4082
  tier: "showcase",
3519
4083
  internal: true
3520
4084
  };
4085
+ var BEGIN_BUILD_SESSION = {
4086
+ name: "begin_build_session",
4087
+ 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.",
4088
+ parameters: {
4089
+ worktreeId: {
4090
+ type: "string",
4091
+ description: "The Lucern worktree ID to bootstrap."
4092
+ },
4093
+ branch: {
4094
+ type: "string",
4095
+ description: "Optional git branch name. Auto-generated from the worktree name when omitted."
4096
+ },
4097
+ branchBase: {
4098
+ type: "string",
4099
+ description: 'Base branch for the feature branch. Default: "staging".'
4100
+ },
4101
+ prBase: {
4102
+ type: "string",
4103
+ description: 'Target branch for the PR. Default: "staging".'
4104
+ },
4105
+ sessionMode: {
4106
+ type: "string",
4107
+ description: 'Session mode: "async" for Codex/headless or "interactive" for live sessions.',
4108
+ enum: ["async", "interactive"]
4109
+ },
4110
+ activateIfPlanning: {
4111
+ type: "boolean",
4112
+ description: "When true, automatically activate a planning worktree during bootstrap."
4113
+ }
4114
+ },
4115
+ required: ["worktreeId"],
4116
+ response: {
4117
+ description: "A compact build-session packet with worktree metadata, graph anchors, questions, dependencies, and git defaults.",
4118
+ fields: {
4119
+ topicId: "string \u2014 canonical topic scope",
4120
+ topicName: "string \u2014 human-readable topic name",
4121
+ worktreeId: "string \u2014 worktree ID",
4122
+ worktreeName: "string \u2014 human-readable worktree name",
4123
+ branch: "string \u2014 git branch name",
4124
+ branchBase: "string \u2014 base branch",
4125
+ prBase: "string \u2014 PR target branch",
4126
+ campaign: "number | null \u2014 top-level pipeline campaign",
4127
+ lane: "string \u2014 campaign lane",
4128
+ gate: "string \u2014 exit gate",
4129
+ hypothesis: "string \u2014 worktree hypothesis",
4130
+ focus: "string \u2014 session focus",
4131
+ status: "string \u2014 worktree status after optional activation",
4132
+ sessionMode: "string \u2014 async | interactive",
4133
+ targetBeliefIds: "array \u2014 scoped belief IDs",
4134
+ targetQuestionIds: "array \u2014 scoped question IDs",
4135
+ taskIds: "array \u2014 assigned task IDs for this worktree",
4136
+ incompleteTaskIds: "array \u2014 assigned task IDs that still require done/deferred/blocked proof",
4137
+ tasks: "array \u2014 assigned task packet with id, title, status, priority, links, and summaries",
4138
+ topBeliefs: "array \u2014 highest-confidence scoped beliefs",
4139
+ openQuestions: "array \u2014 open scoped questions",
4140
+ resolvedDecisions: "array \u2014 answered questions summarized for the session",
4141
+ dependencies: "array \u2014 upstream worktrees",
4142
+ unblocks: "array \u2014 downstream worktrees",
4143
+ mergeOrderNotes: "string \u2014 merge ordering advisory"
4144
+ }
4145
+ },
4146
+ ownerModule: "bootstrap",
4147
+ ontologyPrimitive: "worktree",
4148
+ tier: "showcase",
4149
+ internal: true
4150
+ };
3521
4151
  var MCP_TOOL_CONTRACTS = {
3522
4152
  // Belief lifecycle (commit, amend, fork, archive)
3523
4153
  create_belief: CREATE_BELIEF,
@@ -3560,11 +4190,26 @@ var MCP_TOOL_CONTRACTS = {
3560
4190
  bisect_confidence: BISECT_CONFIDENCE,
3561
4191
  // Edges (commit)
3562
4192
  create_edge: CREATE_EDGE,
4193
+ update_edge: UPDATE_EDGE,
4194
+ remove_edge: REMOVE_EDGE,
4195
+ remove_edges_between: REMOVE_EDGES_BETWEEN,
4196
+ batch_create_edges: BATCH_CREATE_EDGES,
4197
+ // Epistemic node spine (commit/amend/show)
4198
+ create_epistemic_node: CREATE_EPISTEMIC_NODE,
4199
+ get_epistemic_node: GET_EPISTEMIC_NODE,
4200
+ list_epistemic_nodes: LIST_EPISTEMIC_NODES,
4201
+ update_epistemic_node: UPDATE_EPISTEMIC_NODE,
4202
+ archive_epistemic_node: ARCHIVE_EPISTEMIC_NODE,
4203
+ verify_epistemic_node: VERIFY_EPISTEMIC_NODE,
4204
+ supersede_epistemic_node: SUPERSEDE_EPISTEMIC_NODE,
4205
+ batch_create_epistemic_nodes: BATCH_CREATE_EPISTEMIC_NODES,
3563
4206
  // Judgments (tag)
3564
4207
  record_judgment: RECORD_JUDGMENT,
3565
4208
  // Graph intelligence (showcase)
3566
4209
  detect_confirmation_bias: DETECT_CONFIRMATION_BIAS,
3567
4210
  get_graph_structure_analysis: GET_GRAPH_STRUCTURE_ANALYSIS,
4211
+ list_graph_intelligence_queries: LIST_GRAPH_INTELLIGENCE_QUERIES,
4212
+ run_graph_intelligence_query: RUN_GRAPH_INTELLIGENCE_QUERY,
3568
4213
  get_falsification_questions: GET_FALSIFICATION_QUESTIONS,
3569
4214
  // Evidence operations (workhorse)
3570
4215
  search_evidence: SEARCH_EVIDENCE,
@@ -3611,6 +4256,7 @@ var MCP_TOOL_CONTRACTS = {
3611
4256
  get_agent_inbox: GET_AGENT_INBOX,
3612
4257
  claim_files: CLAIM_FILES,
3613
4258
  generate_session_handoff: GENERATE_SESSION_HANDOFF,
4259
+ begin_build_session: BEGIN_BUILD_SESSION,
3614
4260
  // Policy / ACL (workhorse)
3615
4261
  check_permission: CHECK_PERMISSION,
3616
4262
  filter_by_permission: FILTER_BY_PERMISSION,
@@ -3630,6 +4276,8 @@ var MCP_TOOL_CONTRACTS = {
3630
4276
  get_topic: GET_TOPIC,
3631
4277
  update_topic: UPDATE_TOPIC,
3632
4278
  get_topic_tree: GET_TOPIC_TREE,
4279
+ materialize_topic_graph: MATERIALIZE_TOPIC_GRAPH,
4280
+ get_topic_graph_spine: GET_TOPIC_GRAPH_SPINE,
3633
4281
  // Coding intelligence (code-grounded knowledge)
3634
4282
  get_code_context: GET_CODE_CONTEXT,
3635
4283
  get_change_history: GET_CHANGE_HISTORY,