@lucern/contracts 1.0.0 → 1.0.1

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 (213) hide show
  1. package/CHANGELOG.md +4 -1
  2. package/dist/dsl.d.ts +75 -4
  3. package/dist/dsl.values-rhsroqi0.d.ts +21 -0
  4. package/dist/dsl.values.d.ts +5 -0
  5. package/dist/dsl.values.js +675 -0
  6. package/dist/dsl.values.js.map +1 -0
  7. package/dist/function-registry/beliefs.d.ts +1 -17
  8. package/dist/function-registry/beliefs.js +155 -117
  9. package/dist/function-registry/beliefs.js.map +1 -1
  10. package/dist/function-registry/coding.d.ts +1 -17
  11. package/dist/function-registry/coding.js +155 -117
  12. package/dist/function-registry/coding.js.map +1 -1
  13. package/dist/function-registry/context.d.ts +1 -17
  14. package/dist/function-registry/context.js +155 -117
  15. package/dist/function-registry/context.js.map +1 -1
  16. package/dist/function-registry/contracts.d.ts +1 -17
  17. package/dist/function-registry/contracts.js +155 -117
  18. package/dist/function-registry/contracts.js.map +1 -1
  19. package/dist/function-registry/coordination.d.ts +1 -17
  20. package/dist/function-registry/coordination.js +155 -117
  21. package/dist/function-registry/coordination.js.map +1 -1
  22. package/dist/function-registry/edges.d.ts +1 -17
  23. package/dist/function-registry/edges.js +155 -117
  24. package/dist/function-registry/edges.js.map +1 -1
  25. package/dist/function-registry/evidence.d.ts +1 -17
  26. package/dist/function-registry/evidence.js +155 -117
  27. package/dist/function-registry/evidence.js.map +1 -1
  28. package/dist/function-registry/graph.d.ts +1 -17
  29. package/dist/function-registry/graph.js +155 -117
  30. package/dist/function-registry/graph.js.map +1 -1
  31. package/dist/function-registry/helpers.d.ts +1 -1
  32. package/dist/function-registry/helpers.js +155 -117
  33. package/dist/function-registry/helpers.js.map +1 -1
  34. package/dist/function-registry/identity.d.ts +1 -17
  35. package/dist/function-registry/identity.js +155 -117
  36. package/dist/function-registry/identity.js.map +1 -1
  37. package/dist/function-registry/index.d.ts +1 -1
  38. package/dist/function-registry/index.js +158 -118
  39. package/dist/function-registry/index.js.map +1 -1
  40. package/dist/function-registry/judgments.d.ts +1 -17
  41. package/dist/function-registry/judgments.js +155 -117
  42. package/dist/function-registry/judgments.js.map +1 -1
  43. package/dist/function-registry/legacy.d.ts +1 -17
  44. package/dist/function-registry/legacy.js +155 -117
  45. package/dist/function-registry/legacy.js.map +1 -1
  46. package/dist/function-registry/lenses.d.ts +1 -17
  47. package/dist/function-registry/lenses.js +155 -117
  48. package/dist/function-registry/lenses.js.map +1 -1
  49. package/dist/function-registry/manifest.d.ts +3 -3
  50. package/dist/function-registry/manifest.js +1 -0
  51. package/dist/function-registry/manifest.js.map +1 -1
  52. package/dist/function-registry/nodes.d.ts +1 -17
  53. package/dist/function-registry/nodes.js +155 -117
  54. package/dist/function-registry/nodes.js.map +1 -1
  55. package/dist/function-registry/ontologies.d.ts +1 -17
  56. package/dist/function-registry/ontologies.js +155 -117
  57. package/dist/function-registry/ontologies.js.map +1 -1
  58. package/dist/function-registry/pipeline.d.ts +1 -17
  59. package/dist/function-registry/pipeline.js +155 -117
  60. package/dist/function-registry/pipeline.js.map +1 -1
  61. package/dist/function-registry/questions.d.ts +1 -17
  62. package/dist/function-registry/questions.js +155 -117
  63. package/dist/function-registry/questions.js.map +1 -1
  64. package/dist/function-registry/tasks.d.ts +1 -17
  65. package/dist/function-registry/tasks.js +155 -117
  66. package/dist/function-registry/tasks.js.map +1 -1
  67. package/dist/function-registry/topics.d.ts +1 -17
  68. package/dist/function-registry/topics.js +155 -117
  69. package/dist/function-registry/topics.js.map +1 -1
  70. package/dist/function-registry/types.d.ts +2 -2
  71. package/dist/function-registry/worktrees.d.ts +41 -17
  72. package/dist/function-registry/worktrees.js +174 -117
  73. package/dist/function-registry/worktrees.js.map +1 -1
  74. package/dist/generated/lucernWebPublicEnv.js.map +1 -1
  75. package/dist/generated/lucernWebServerEnv.js.map +1 -1
  76. package/dist/{idOf-DR8tkhQS.d.ts → idOf-BmkVDhD8.d.ts} +1 -1
  77. package/dist/index.d.ts +47 -8
  78. package/dist/index.js +45072 -45005
  79. package/dist/index.js.map +1 -1
  80. package/dist/infisical-runtime.base.d.ts +444 -0
  81. package/dist/infisical-runtime.base.js +640 -0
  82. package/dist/infisical-runtime.base.js.map +1 -0
  83. package/dist/infisical-runtime.contract.d.ts +9 -440
  84. package/dist/infisical-runtime.contract.js +14 -1
  85. package/dist/infisical-runtime.contract.js.map +1 -1
  86. package/dist/infisical-runtime.platform-ops-secrets.d.ts +743 -0
  87. package/dist/infisical-runtime.platform-ops-secrets.js +962 -0
  88. package/dist/infisical-runtime.platform-ops-secrets.js.map +1 -0
  89. package/dist/infisical-runtime.platform-secrets.d.ts +598 -0
  90. package/dist/infisical-runtime.platform-secrets.js +726 -0
  91. package/dist/infisical-runtime.platform-secrets.js.map +1 -0
  92. package/dist/infisical-runtime.tenant-secrets.d.ts +486 -0
  93. package/dist/infisical-runtime.tenant-secrets.js +1131 -0
  94. package/dist/infisical-runtime.tenant-secrets.js.map +1 -0
  95. package/dist/manifests/edge-policy-manifest.d.ts +1 -1
  96. package/dist/manifests/infisical-runtime-manifest.d.ts +1 -1
  97. package/dist/manifests/infisical-runtime-manifest.js +14 -1
  98. package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
  99. package/dist/manifests/tenant-client-manifest.d.ts +5 -1
  100. package/dist/manifests/tenant-client-manifest.js +5 -0
  101. package/dist/manifests/tenant-client-manifest.js.map +1 -1
  102. package/dist/proof-attestation.json +1 -1
  103. package/dist/schemas/index.d.ts +1 -1
  104. package/dist/schemas/index.js.map +1 -1
  105. package/dist/schemas/manifest.d.ts +61 -61
  106. package/dist/schemas/manifest.js.map +1 -1
  107. package/dist/schemas/tables/kernel/config.js.map +1 -1
  108. package/dist/schemas/tables/kernel/coordination.js.map +1 -1
  109. package/dist/schemas/tables/kernel/decision.d.ts +1 -1
  110. package/dist/schemas/tables/kernel/decision.js.map +1 -1
  111. package/dist/schemas/tables/kernel/embedding.d.ts +1 -1
  112. package/dist/schemas/tables/kernel/embedding.js.map +1 -1
  113. package/dist/schemas/tables/kernel/epistemic.d.ts +1 -1
  114. package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
  115. package/dist/schemas/tables/kernel/idempotency.js.map +1 -1
  116. package/dist/schemas/tables/kernel/infra.js.map +1 -1
  117. package/dist/schemas/tables/kernel/intelligence.d.ts +1 -1
  118. package/dist/schemas/tables/kernel/intelligence.js.map +1 -1
  119. package/dist/schemas/tables/kernel/lens.d.ts +5 -5
  120. package/dist/schemas/tables/kernel/lens.js.map +1 -1
  121. package/dist/schemas/tables/kernel/ontology.d.ts +1 -1
  122. package/dist/schemas/tables/kernel/ontology.js.map +1 -1
  123. package/dist/schemas/tables/kernel/platform.js.map +1 -1
  124. package/dist/schemas/tables/kernel/spine.d.ts +1 -1
  125. package/dist/schemas/tables/kernel/spine.js.map +1 -1
  126. package/dist/schemas/tables/kernel/task.d.ts +1 -1
  127. package/dist/schemas/tables/kernel/task.js.map +1 -1
  128. package/dist/schemas/tables/kernel/topic.d.ts +1 -1
  129. package/dist/schemas/tables/kernel/topic.js.map +1 -1
  130. package/dist/schemas/tables/kernel/workflow.d.ts +1 -1
  131. package/dist/schemas/tables/kernel/workflow.js.map +1 -1
  132. package/dist/schemas/tables/kernel/worktree.d.ts +1 -1
  133. package/dist/schemas/tables/kernel/worktree.js.map +1 -1
  134. package/dist/schemas/tables/mc/identity.d.ts +1 -1
  135. package/dist/schemas/tables/mc/methodology.d.ts +1 -1
  136. package/dist/schemas/tables/mc/pack.d.ts +9 -9
  137. package/dist/schemas/tables/mc/policy.d.ts +1 -1
  138. package/dist/schemas/tables/mc/registry.d.ts +1 -1
  139. package/dist/schemas/tables/mc/runtime.d.ts +1 -1
  140. package/dist/schemas/tables/mc/tenant.d.ts +1 -1
  141. package/dist/schemas/tables/mc/workspace.d.ts +1 -1
  142. package/dist/schemas.values-5J5oIK7z.d.ts +26 -0
  143. package/dist/schemas.values.d.ts +7 -0
  144. package/dist/schemas.values.js +5324 -0
  145. package/dist/schemas.values.js.map +1 -0
  146. package/dist/sdk-tools.contract.analytics.d.ts +27 -0
  147. package/dist/sdk-tools.contract.analytics.js +616 -0
  148. package/dist/sdk-tools.contract.analytics.js.map +1 -0
  149. package/dist/sdk-tools.contract.d.ts +43 -2
  150. package/dist/sdk-tools.contract.graph.d.ts +11 -0
  151. package/dist/sdk-tools.contract.graph.js +156 -0
  152. package/dist/sdk-tools.contract.graph.js.map +1 -0
  153. package/dist/sdk-tools.contract.js +4107 -4062
  154. package/dist/sdk-tools.contract.js.map +1 -1
  155. package/dist/sdk-tools.contract.registry.d.ts +25 -0
  156. package/dist/sdk-tools.contract.registry.js +5504 -0
  157. package/dist/sdk-tools.contract.registry.js.map +1 -0
  158. package/dist/sdk-tools.contract.types.d.ts +15 -0
  159. package/dist/sdk-tools.contract.types.js +3 -0
  160. package/dist/sdk-tools.contract.types.js.map +1 -0
  161. package/dist/sdk-tools.contract.values-LuBh95zg.d.ts +58 -0
  162. package/dist/sdk-tools.contract.values.d.ts +7 -0
  163. package/dist/sdk-tools.contract.values.js +5581 -0
  164. package/dist/sdk-tools.contract.values.js.map +1 -0
  165. package/dist/sdk-tools.contract.workflow.d.ts +17 -0
  166. package/dist/sdk-tools.contract.workflow.js +287 -0
  167. package/dist/sdk-tools.contract.workflow.js.map +1 -0
  168. package/dist/tenant-client.contract.d.ts +5 -1
  169. package/dist/tenant-client.contract.js +5 -0
  170. package/dist/tenant-client.contract.js.map +1 -1
  171. package/dist/tool-contracts.d.ts +34 -1
  172. package/dist/tool-contracts.graph.d.ts +18 -0
  173. package/dist/tool-contracts.graph.js +378 -0
  174. package/dist/tool-contracts.graph.js.map +1 -0
  175. package/dist/tool-contracts.intelligence-evidence.d.ts +15 -0
  176. package/dist/tool-contracts.intelligence-evidence.js +303 -0
  177. package/dist/tool-contracts.intelligence-evidence.js.map +1 -0
  178. package/dist/tool-contracts.js +155 -118
  179. package/dist/tool-contracts.js.map +1 -1
  180. package/dist/tool-contracts.lifecycle.d.ts +13 -0
  181. package/dist/tool-contracts.lifecycle.js +410 -0
  182. package/dist/tool-contracts.lifecycle.js.map +1 -0
  183. package/dist/tool-contracts.nodes-lenses.d.ts +17 -0
  184. package/dist/tool-contracts.nodes-lenses.js +334 -0
  185. package/dist/tool-contracts.nodes-lenses.js.map +1 -0
  186. package/dist/tool-contracts.ontology.d.ts +16 -0
  187. package/dist/tool-contracts.ontology.js +344 -0
  188. package/dist/tool-contracts.ontology.js.map +1 -0
  189. package/dist/tool-contracts.pipeline-coordination.d.ts +25 -0
  190. package/dist/tool-contracts.pipeline-coordination.js +684 -0
  191. package/dist/tool-contracts.pipeline-coordination.js.map +1 -0
  192. package/dist/tool-contracts.policy-observation-task-topic.d.ts +25 -0
  193. package/dist/tool-contracts.policy-observation-task-topic.js +740 -0
  194. package/dist/tool-contracts.policy-observation-task-topic.js.map +1 -0
  195. package/dist/tool-contracts.questions-listing.d.ts +27 -0
  196. package/dist/tool-contracts.questions-listing.js +782 -0
  197. package/dist/tool-contracts.questions-listing.js.map +1 -0
  198. package/dist/tool-contracts.types.d.ts +34 -0
  199. package/dist/tool-contracts.types.js +3 -0
  200. package/dist/tool-contracts.types.js.map +1 -0
  201. package/dist/tool-contracts.values-DjctSW7S.d.ts +147 -0
  202. package/dist/tool-contracts.values.d.ts +11 -0
  203. package/dist/tool-contracts.values.js +4398 -0
  204. package/dist/tool-contracts.values.js.map +1 -0
  205. package/dist/tool-contracts.worktrees.d.ts +8 -0
  206. package/dist/tool-contracts.worktrees.js +280 -0
  207. package/dist/tool-contracts.worktrees.js.map +1 -0
  208. package/package.json +3 -11
  209. package/dist/dsl-DVPthQGY.d.ts +0 -110
  210. package/dist/index-CM1Pl_vI.d.ts +0 -28
  211. package/dist/sdk-tools.contract-CKmSsrZ2.d.ts +0 -146
  212. package/dist/tool-contracts-C_xvM9q2.d.ts +0 -326
  213. package/dist/{edge-policy-manifest-Dw5IhT1L.d.ts → edge-policy-manifest-4KOSP4nk.d.ts} +2 -2
@@ -1,21 +1,5 @@
1
1
  import { z } from 'zod';
2
2
 
3
- /**
4
- * MCP Tool Contract Definitions
5
- *
6
- * Machine-readable source of truth for all Lucern MCP tool names,
7
- * descriptions, parameters, and response schemas.
8
- *
9
- * CONTRACT SURFACE: These definitions are the external API for AI agents.
10
- * Renaming a tool or changing its description is a BREAKING CHANGE.
11
- *
12
- * Git-native naming rules (enforced by lint):
13
- * 1. Workflow tools use git verbs directly (add_worktree, merge, push, open_pull_request)
14
- * 2. Knowledge tools use epistemic verbs (create_belief, fork_belief, modulate_confidence)
15
- * 3. First sentence of description includes the git analog verb
16
- * 4. Description includes "Like `git X`" parenthetical
17
- * 5. Parameter names use domain terms (canonicalText, nodeId, baseRate)
18
- */
19
3
  type McpToolContract = {
20
4
  /** Stable tool name — breaking change to rename */
21
5
  name: string;
@@ -84,7 +68,7 @@ type FunctionConvexTarget = {
84
68
  outputProjection?: ContractOutputProjection;
85
69
  };
86
70
  type FunctionGatewayTarget = {
87
- handler: "identity.whoami" | "beliefs.list" | "evidence.list" | "questions.list" | "tasks.create" | "tasks.list" | "tasks.update" | "tasks.complete";
71
+ handler: "identity.whoami" | "beliefs.list" | "evidence.list" | "questions.list" | "worktrees.get" | "tasks.create" | "tasks.list" | "tasks.update" | "tasks.complete";
88
72
  };
89
73
 
90
74
  declare const tasksContracts: readonly [{
@@ -3,30 +3,7 @@ import { v } from 'convex/values';
3
3
 
4
4
  // src/function-registry/helpers.ts
5
5
 
6
- // src/types/reasoning-method.ts
7
- var REASONING_METHODS = [
8
- "deductive",
9
- "inductive",
10
- "abductive",
11
- "analogical",
12
- "causal",
13
- "correlational",
14
- "testimonial",
15
- "statistical",
16
- "implicit",
17
- "pattern_match"
18
- ];
19
-
20
- // src/lens-workflow.contract.ts
21
- var LENS_PERSPECTIVE_TYPES = [
22
- "investigation",
23
- "monitoring",
24
- "analysis",
25
- "comparison",
26
- "taxonomy"
27
- ];
28
-
29
- // src/tool-contracts.ts
6
+ // src/tool-contracts.lifecycle.ts
30
7
  var CREATE_BELIEF = {
31
8
  name: "create_belief",
32
9
  description: "Commit a new belief (knowledge unit) to the reasoning graph. Like `git commit` \u2014 creates an atomic, traceable knowledge object with a prior. Creation stores the vacuous opinion `(0, 0, 1, a)`; use modulate_confidence to record the first evidential update.",
@@ -432,6 +409,8 @@ var FLAG_CONTRADICTION = {
432
409
  ontologyPrimitive: "belief",
433
410
  tier: "showcase"
434
411
  };
412
+
413
+ // src/tool-contracts.worktrees.ts
435
414
  var ADD_WORKTREE = {
436
415
  name: "add_worktree",
437
416
  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.",
@@ -647,6 +626,82 @@ var MERGE = {
647
626
  ontologyPrimitive: "worktree",
648
627
  tier: "showcase"
649
628
  };
629
+ var PUSH = {
630
+ name: "push",
631
+ description: "Push scored beliefs from a merged worktree to other contexts. Like `git push` \u2014 makes local findings available on the remote. Only merged beliefs can be pushed. Publication makes findings visible to other projects, teams, or external consumers.",
632
+ parameters: {
633
+ worktreeId: {
634
+ type: "string",
635
+ description: "The merged worktree whose findings to push"
636
+ },
637
+ targetContext: {
638
+ type: "string",
639
+ description: "Where to push (e.g., 'portfolio', 'ic_review', 'external')"
640
+ },
641
+ beliefIds: {
642
+ type: "array",
643
+ description: "Optional subset of beliefs to push (default: all scored)"
644
+ }
645
+ },
646
+ required: ["worktreeId", "targetContext"],
647
+ response: {
648
+ description: "Push result",
649
+ fields: {
650
+ pushedCount: "number",
651
+ targetContext: "string",
652
+ pushedAt: "number"
653
+ }
654
+ },
655
+ ownerModule: "workflow-engine",
656
+ ontologyPrimitive: "worktree",
657
+ tier: "workhorse"
658
+ };
659
+ var OPEN_PULL_REQUEST = {
660
+ name: "open_pull_request",
661
+ description: "Open a pull request for peer review before merging a worktree. Like opening a `git pull request` \u2014 the worktree's findings are ready but await approval before merge. Reviewers can approve, request changes, or block the merge. This is the gate between draft work and scored knowledge.",
662
+ parameters: {
663
+ worktreeId: {
664
+ type: "string",
665
+ description: "The worktree to submit for review"
666
+ },
667
+ reviewers: {
668
+ type: "array",
669
+ description: "User IDs of requested reviewers"
670
+ },
671
+ summary: {
672
+ type: "string",
673
+ description: "Summary of findings and why they're ready for merge"
674
+ }
675
+ },
676
+ required: ["worktreeId", "summary"],
677
+ response: {
678
+ description: "The pull request",
679
+ fields: {
680
+ pullRequestId: "string",
681
+ worktreeId: "string",
682
+ status: "string \u2014 'pending_review'"
683
+ }
684
+ },
685
+ ownerModule: "workflow-engine",
686
+ ontologyPrimitive: "worktree",
687
+ tier: "showcase"
688
+ };
689
+
690
+ // src/types/reasoning-method.ts
691
+ var REASONING_METHODS = [
692
+ "deductive",
693
+ "inductive",
694
+ "abductive",
695
+ "analogical",
696
+ "causal",
697
+ "correlational",
698
+ "testimonial",
699
+ "statistical",
700
+ "implicit",
701
+ "pattern_match"
702
+ ];
703
+
704
+ // src/tool-contracts.graph.ts
650
705
  var QUERY_LINEAGE = {
651
706
  name: "query_lineage",
652
707
  description: "Trace a belief's full ancestry \u2014 every fork, score, and confidence modulation. Like `git log --graph`. Returns the complete evolution chain showing how understanding developed over time. Lineage is permanent and can never be erased (Invariant #3).",
@@ -846,6 +901,39 @@ var FIND_CONTRADICTIONS = {
846
901
  ontologyPrimitive: "belief",
847
902
  tier: "showcase"
848
903
  };
904
+ var BISECT_CONFIDENCE = {
905
+ name: "bisect_confidence",
906
+ description: "Find when a belief's confidence diverged from reality. Like `git bisect` \u2014 binary search through the credence history to find the inflection point. Given a belief that is now known to be wrong (or right), traces back through confidence modulations to identify which evidence or event caused the divergence.",
907
+ parameters: {
908
+ nodeId: { type: "string", description: "The belief to bisect" },
909
+ expectedDirection: {
910
+ type: "string",
911
+ description: "Was confidence too high or too low?",
912
+ enum: ["overconfident", "underconfident"]
913
+ },
914
+ timeRange: {
915
+ type: "object",
916
+ description: "Optional time range to search within: { start: number, end: number }"
917
+ }
918
+ },
919
+ required: ["nodeId", "expectedDirection"],
920
+ response: {
921
+ description: "The inflection point in confidence history",
922
+ fields: {
923
+ beliefId: "string \u2014 canonical belief ID",
924
+ expectedDirection: "string \u2014 overconfident | underconfident",
925
+ inflectionEntry: "object \u2014 the confidence modulation where divergence began",
926
+ triggerEvent: "string | null \u2014 what caused the divergence",
927
+ confidenceBefore: "number | null",
928
+ confidenceAfter: "number | null",
929
+ totalEntries: "number",
930
+ inflectionIndex: "number | null"
931
+ }
932
+ },
933
+ ownerModule: "graph-search",
934
+ ontologyPrimitive: "belief",
935
+ tier: "showcase"
936
+ };
849
937
  var CREATE_EDGE = {
850
938
  name: "create_edge",
851
939
  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.",
@@ -973,6 +1061,17 @@ var BATCH_CREATE_EDGES = {
973
1061
  ontologyPrimitive: "edge",
974
1062
  tier: "workhorse"
975
1063
  };
1064
+
1065
+ // src/lens-workflow.contract.ts
1066
+ var LENS_PERSPECTIVE_TYPES = [
1067
+ "investigation",
1068
+ "monitoring",
1069
+ "analysis",
1070
+ "comparison",
1071
+ "taxonomy"
1072
+ ];
1073
+
1074
+ // src/tool-contracts.nodes-lenses.ts
976
1075
  var CREATE_EPISTEMIC_NODE = {
977
1076
  name: "create_epistemic_node",
978
1077
  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.",
@@ -1293,99 +1392,8 @@ var REMOVE_LENS_FROM_TOPIC = {
1293
1392
  ontologyPrimitive: "lens",
1294
1393
  tier: "workhorse"
1295
1394
  };
1296
- var PUSH = {
1297
- name: "push",
1298
- description: "Push scored beliefs from a merged worktree to other contexts. Like `git push` \u2014 makes local findings available on the remote. Only merged beliefs can be pushed. Publication makes findings visible to other projects, teams, or external consumers.",
1299
- parameters: {
1300
- worktreeId: {
1301
- type: "string",
1302
- description: "The merged worktree whose findings to push"
1303
- },
1304
- targetContext: {
1305
- type: "string",
1306
- description: "Where to push (e.g., 'portfolio', 'ic_review', 'external')"
1307
- },
1308
- beliefIds: {
1309
- type: "array",
1310
- description: "Optional subset of beliefs to push (default: all scored)"
1311
- }
1312
- },
1313
- required: ["worktreeId", "targetContext"],
1314
- response: {
1315
- description: "Push result",
1316
- fields: {
1317
- pushedCount: "number",
1318
- targetContext: "string",
1319
- pushedAt: "number"
1320
- }
1321
- },
1322
- ownerModule: "workflow-engine",
1323
- ontologyPrimitive: "worktree",
1324
- tier: "workhorse"
1325
- };
1326
- var OPEN_PULL_REQUEST = {
1327
- name: "open_pull_request",
1328
- description: "Open a pull request for peer review before merging a worktree. Like opening a `git pull request` \u2014 the worktree's findings are ready but await approval before merge. Reviewers can approve, request changes, or block the merge. This is the gate between draft work and scored knowledge.",
1329
- parameters: {
1330
- worktreeId: {
1331
- type: "string",
1332
- description: "The worktree to submit for review"
1333
- },
1334
- reviewers: {
1335
- type: "array",
1336
- description: "User IDs of requested reviewers"
1337
- },
1338
- summary: {
1339
- type: "string",
1340
- description: "Summary of findings and why they're ready for merge"
1341
- }
1342
- },
1343
- required: ["worktreeId", "summary"],
1344
- response: {
1345
- description: "The pull request",
1346
- fields: {
1347
- pullRequestId: "string",
1348
- worktreeId: "string",
1349
- status: "string \u2014 'pending_review'"
1350
- }
1351
- },
1352
- ownerModule: "workflow-engine",
1353
- ontologyPrimitive: "worktree",
1354
- tier: "showcase"
1355
- };
1356
- var BISECT_CONFIDENCE = {
1357
- name: "bisect_confidence",
1358
- description: "Find when a belief's confidence diverged from reality. Like `git bisect` \u2014 binary search through the credence history to find the inflection point. Given a belief that is now known to be wrong (or right), traces back through confidence modulations to identify which evidence or event caused the divergence.",
1359
- parameters: {
1360
- nodeId: { type: "string", description: "The belief to bisect" },
1361
- expectedDirection: {
1362
- type: "string",
1363
- description: "Was confidence too high or too low?",
1364
- enum: ["overconfident", "underconfident"]
1365
- },
1366
- timeRange: {
1367
- type: "object",
1368
- description: "Optional time range to search within: { start: number, end: number }"
1369
- }
1370
- },
1371
- required: ["nodeId", "expectedDirection"],
1372
- response: {
1373
- description: "The inflection point in confidence history",
1374
- fields: {
1375
- beliefId: "string \u2014 canonical belief ID",
1376
- expectedDirection: "string \u2014 overconfident | underconfident",
1377
- inflectionEntry: "object \u2014 the confidence modulation where divergence began",
1378
- triggerEvent: "string | null \u2014 what caused the divergence",
1379
- confidenceBefore: "number | null",
1380
- confidenceAfter: "number | null",
1381
- totalEntries: "number",
1382
- inflectionIndex: "number | null"
1383
- }
1384
- },
1385
- ownerModule: "graph-search",
1386
- ontologyPrimitive: "belief",
1387
- tier: "showcase"
1388
- };
1395
+
1396
+ // src/tool-contracts.intelligence-evidence.ts
1389
1397
  var DETECT_CONFIRMATION_BIAS = {
1390
1398
  name: "detect_confirmation_bias",
1391
1399
  description: "Detect confirmation bias in the evidence graph. Like `git diff --stat` for reasoning \u2014 analyzes the ratio of supporting vs challenging evidence per belief and flags beliefs where the evidence is suspiciously one-sided. Returns risk classification (critical/high/moderate/healthy).",
@@ -1684,6 +1692,8 @@ var LINK_EVIDENCE_TO_BELIEF = {
1684
1692
  ontologyPrimitive: "edge",
1685
1693
  tier: "workhorse"
1686
1694
  };
1695
+
1696
+ // src/tool-contracts.questions-listing.ts
1687
1697
  var CREATE_QUESTION = {
1688
1698
  name: "create_question",
1689
1699
  description: "Commit an investigation question to the reasoning graph. Like `git issue` \u2014 creates a traceable question that drives research and evidence collection. Questions test beliefs and guide worktree investigation.",
@@ -2142,6 +2152,24 @@ var LIST_ALL_WORKTREES = {
2142
2152
  ontologyPrimitive: "worktree",
2143
2153
  tier: "showcase"
2144
2154
  };
2155
+ var GET_WORKTREE = {
2156
+ name: "get_worktree",
2157
+ description: "Get one worktree by ID. Like `git worktree list --porcelain <worktree>` \u2014 inspects one investigation branch without scanning the full pipeline inventory.",
2158
+ parameters: {
2159
+ worktreeId: { type: "string", description: "Canonical worktree ID to retrieve" },
2160
+ id: { type: "string", description: "Legacy alias for worktreeId" }
2161
+ },
2162
+ required: ["worktreeId"],
2163
+ response: {
2164
+ description: "Single worktree record with pipeline metadata",
2165
+ fields: {
2166
+ worktree: "object \u2014 { worktreeId, title, topicId, status, hypothesis, campaign, lane, laneOrderInCampaign, orderInLane, dependsOn, blocks, gate }"
2167
+ }
2168
+ },
2169
+ ownerModule: "workflow-engine",
2170
+ ontologyPrimitive: "worktree",
2171
+ tier: "workhorse"
2172
+ };
2145
2173
  var LIST_CAMPAIGNS = {
2146
2174
  name: "list_campaigns",
2147
2175
  description: "List compact pipeline campaigns with their nested lanes. Use this to see the top-level campaign > lane > worktree shape without pulling the full worktree inventory.",
@@ -2443,6 +2471,8 @@ var COMPILE_CONTEXT = {
2443
2471
  ontologyPrimitive: "graph",
2444
2472
  tier: "showcase"
2445
2473
  };
2474
+
2475
+ // src/tool-contracts.policy-observation-task-topic.ts
2446
2476
  var CHECK_PERMISSION = {
2447
2477
  name: "check_permission",
2448
2478
  description: "Check whether a principal can read or mutate a topic scope. Like `git check-ref-format` for ACLs \u2014 validates whether the requested operation is allowed before execution.",
@@ -3178,6 +3208,8 @@ var GET_GRAPH_GAPS = {
3178
3208
  ontologyPrimitive: "graph",
3179
3209
  tier: "showcase"
3180
3210
  };
3211
+
3212
+ // src/tool-contracts.ontology.ts
3181
3213
  var MANAGE_WRITE_POLICY = {
3182
3214
  name: "manage_write_policy",
3183
3215
  description: "Manage write policies for MCP mutation tools. Like `git config` for write permissions \u2014 sets per-topic or global policies that control which roles can mutate the graph.",
@@ -3517,6 +3549,8 @@ var RESOLVE_EFFECTIVE_ONTOLOGY = {
3517
3549
  ontologyPrimitive: "ontology",
3518
3550
  tier: "workhorse"
3519
3551
  };
3552
+
3553
+ // src/tool-contracts.pipeline-coordination.ts
3520
3554
  var RECORD_SCOPE_LEARNING = {
3521
3555
  name: "record_scope_learning",
3522
3556
  description: "Write a structured learning entry into the epistemic spine. Like `git commit` for scope learnings \u2014 records evidence, can attach to a belief, and can open a follow-up belief/question in one atomic workflow.",
@@ -4196,6 +4230,8 @@ var BEGIN_BUILD_SESSION = {
4196
4230
  tier: "showcase",
4197
4231
  internal: true
4198
4232
  };
4233
+
4234
+ // src/tool-contracts.ts
4199
4235
  var MCP_TOOL_CONTRACTS = {
4200
4236
  // Belief lifecycle (commit, amend, fork, archive)
4201
4237
  create_belief: CREATE_BELIEF,
@@ -4278,6 +4314,7 @@ var MCP_TOOL_CONTRACTS = {
4278
4314
  find_missing_questions: FIND_MISSING_QUESTIONS,
4279
4315
  // Listing & query (workhorse)
4280
4316
  list_beliefs: LIST_BELIEFS,
4317
+ get_worktree: GET_WORKTREE,
4281
4318
  list_worktrees: LIST_WORKTREES,
4282
4319
  list_all_worktrees: LIST_ALL_WORKTREES,
4283
4320
  list_campaigns: LIST_CAMPAIGNS,
@@ -4481,6 +4518,7 @@ var MCP_WORKFLOW_PLATFORM_OPERATION_NAMES = [
4481
4518
  "match_entity_type",
4482
4519
  "resolve_effective_ontology",
4483
4520
  "add_worktree",
4521
+ "get_worktree",
4484
4522
  "activate_worktree",
4485
4523
  "list_worktrees",
4486
4524
  "list_all_worktrees",