@lucern/contracts 0.3.0-alpha.0 → 0.3.0-alpha.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 (117) hide show
  1. package/dist/dsl.js +3 -0
  2. package/dist/dsl.js.map +1 -1
  3. package/dist/function-registry/beliefs.d.ts +11 -51
  4. package/dist/function-registry/beliefs.js +445 -94
  5. package/dist/function-registry/beliefs.js.map +1 -1
  6. package/dist/function-registry/coding.d.ts +7 -31
  7. package/dist/function-registry/coding.js +264 -81
  8. package/dist/function-registry/coding.js.map +1 -1
  9. package/dist/function-registry/context.d.ts +4 -16
  10. package/dist/function-registry/context.js +223 -62
  11. package/dist/function-registry/context.js.map +1 -1
  12. package/dist/function-registry/contracts.d.ts +4 -16
  13. package/dist/function-registry/contracts.js +195 -54
  14. package/dist/function-registry/contracts.js.map +1 -1
  15. package/dist/function-registry/coordination.d.ts +10 -46
  16. package/dist/function-registry/coordination.js +208 -57
  17. package/dist/function-registry/coordination.js.map +1 -1
  18. package/dist/function-registry/edges.d.ts +10 -18
  19. package/dist/function-registry/edges.js +343 -68
  20. package/dist/function-registry/edges.js.map +1 -1
  21. package/dist/function-registry/evidence.d.ts +17 -49
  22. package/dist/function-registry/evidence.js +395 -99
  23. package/dist/function-registry/evidence.js.map +1 -1
  24. package/dist/function-registry/graph.d.ts +14 -66
  25. package/dist/function-registry/graph.js +225 -65
  26. package/dist/function-registry/graph.js.map +1 -1
  27. package/dist/function-registry/helpers.d.ts +6 -8
  28. package/dist/function-registry/helpers.js +204 -55
  29. package/dist/function-registry/helpers.js.map +1 -1
  30. package/dist/function-registry/identity.d.ts +4 -16
  31. package/dist/function-registry/identity.js +195 -54
  32. package/dist/function-registry/identity.js.map +1 -1
  33. package/dist/function-registry/index.d.ts +2 -2
  34. package/dist/function-registry/index.js +204 -55
  35. package/dist/function-registry/index.js.map +1 -1
  36. package/dist/function-registry/judgments.d.ts +5 -13
  37. package/dist/function-registry/judgments.js +214 -63
  38. package/dist/function-registry/judgments.js.map +1 -1
  39. package/dist/function-registry/legacy.d.ts +2 -6
  40. package/dist/function-registry/legacy.js +195 -54
  41. package/dist/function-registry/legacy.js.map +1 -1
  42. package/dist/function-registry/lenses.d.ts +5 -21
  43. package/dist/function-registry/lenses.js +241 -58
  44. package/dist/function-registry/lenses.js.map +1 -1
  45. package/dist/function-registry/manifest.d.ts +3 -3
  46. package/dist/function-registry/manifest.js +1 -0
  47. package/dist/function-registry/manifest.js.map +1 -1
  48. package/dist/function-registry/ontologies.d.ts +12 -56
  49. package/dist/function-registry/ontologies.js +227 -77
  50. package/dist/function-registry/ontologies.js.map +1 -1
  51. package/dist/function-registry/pipeline.d.ts +4 -16
  52. package/dist/function-registry/pipeline.js +207 -55
  53. package/dist/function-registry/pipeline.js.map +1 -1
  54. package/dist/function-registry/questions.d.ts +13 -61
  55. package/dist/function-registry/questions.js +281 -82
  56. package/dist/function-registry/questions.js.map +1 -1
  57. package/dist/function-registry/tasks.d.ts +5 -21
  58. package/dist/function-registry/tasks.js +265 -58
  59. package/dist/function-registry/tasks.js.map +1 -1
  60. package/dist/function-registry/topics.d.ts +6 -26
  61. package/dist/function-registry/topics.js +214 -57
  62. package/dist/function-registry/topics.js.map +1 -1
  63. package/dist/function-registry/types.d.ts +2 -2
  64. package/dist/function-registry/worktrees.d.ts +49 -46
  65. package/dist/function-registry/worktrees.js +326 -81
  66. package/dist/function-registry/worktrees.js.map +1 -1
  67. package/dist/generated/convexSchemas.js +4 -3
  68. package/dist/generated/convexSchemas.js.map +1 -1
  69. package/dist/generated/schema-manifest.json +55 -3
  70. package/dist/generated/tableOwnership.d.ts +2 -1
  71. package/dist/generated/tableOwnership.js +2 -0
  72. package/dist/generated/tableOwnership.js.map +1 -1
  73. package/dist/generated/tier-expectations.json +6 -3
  74. package/dist/index-CV-0_VWJ.d.ts +25 -0
  75. package/dist/index.d.ts +414 -4
  76. package/dist/index.js +665 -62
  77. package/dist/index.js.map +1 -1
  78. package/dist/schema-helpers/validators.d.ts +1 -1
  79. package/dist/schema-helpers/validators.js +1 -1
  80. package/dist/schema-helpers/validators.js.map +1 -1
  81. package/dist/schemas/component-table-manifest.d.ts +74 -0
  82. package/dist/schemas/component-table-manifest.js +26 -0
  83. package/dist/schemas/component-table-manifest.js.map +1 -0
  84. package/dist/schemas/index.d.ts +2 -0
  85. package/dist/schemas/index.js +68 -10
  86. package/dist/schemas/index.js.map +1 -1
  87. package/dist/schemas/manifest.d.ts +110 -45
  88. package/dist/schemas/manifest.js +36 -9
  89. package/dist/schemas/manifest.js.map +1 -1
  90. package/dist/schemas/sl-opinion.d.ts +31 -0
  91. package/dist/schemas/sl-opinion.js +19 -0
  92. package/dist/schemas/sl-opinion.js.map +1 -0
  93. package/dist/schemas/tables/kernel/epistemic.d.ts +6 -4
  94. package/dist/schemas/tables/kernel/epistemic.js +6 -4
  95. package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
  96. package/dist/schemas/tables/kernel/infra.d.ts +13 -1
  97. package/dist/schemas/tables/kernel/infra.js +23 -1
  98. package/dist/schemas/tables/kernel/infra.js.map +1 -1
  99. package/dist/schemas/tables/kernel/worktree.d.ts +4 -4
  100. package/dist/schemas/tables/kernel/worktree.js +6 -4
  101. package/dist/schemas/tables/kernel/worktree.js.map +1 -1
  102. package/dist/schemas/tables/mc/runtime.d.ts +1 -1
  103. package/dist/schemas/tables/mc/runtime.js +1 -1
  104. package/dist/schemas/tables/mc/runtime.js.map +1 -1
  105. package/dist/sdk-methods.contract.d.ts +5 -2
  106. package/dist/{sdk-tools.contract-C2kQN_Xk.d.ts → sdk-tools.contract-S4ia0TTo.d.ts} +1 -1
  107. package/dist/sdk-tools.contract.d.ts +2 -2
  108. package/dist/sdk-tools.contract.js +154 -51
  109. package/dist/sdk-tools.contract.js.map +1 -1
  110. package/dist/{tool-contracts-WCnuE9DW.d.ts → tool-contracts-C92-9ueT.d.ts} +5 -3
  111. package/dist/tool-contracts.d.ts +1 -1
  112. package/dist/tool-contracts.js +155 -52
  113. package/dist/tool-contracts.js.map +1 -1
  114. package/dist/workflow-runtime.contract.js +1 -1
  115. package/dist/workflow-runtime.contract.js.map +1 -1
  116. package/package.json +19 -1
  117. package/dist/index-DoDXl8KS.d.ts +0 -19
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { v } from 'convex/values';
2
3
 
3
4
  // src/function-registry/helpers.ts
4
5
 
@@ -14,7 +15,7 @@ var LENS_PERSPECTIVE_TYPES = [
14
15
  // src/tool-contracts.ts
15
16
  var CREATE_BELIEF = {
16
17
  name: "create_belief",
17
- description: "Commit a new belief (knowledge unit) to the reasoning graph. Like `git commit` \u2014 creates an atomic, traceable knowledge object with a mandatory prior. Creation stores the vacuous opinion `(0, 0, 1, a)`; use modulate_confidence to record the first evidential update.",
18
+ 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.",
18
19
  parameters: {
19
20
  canonicalText: {
20
21
  type: "string",
@@ -26,7 +27,7 @@ var CREATE_BELIEF = {
26
27
  },
27
28
  baseRate: {
28
29
  type: "number",
29
- description: "Required prior probability used to seed the vacuous opinion `(0, 0, 1, a)` at creation time."
30
+ description: "Prior probability used to seed the vacuous opinion `(0, 0, 1, a)` at creation time. Defaults to 0.5 when omitted."
30
31
  },
31
32
  beliefType: {
32
33
  type: "string",
@@ -37,7 +38,7 @@ var CREATE_BELIEF = {
37
38
  description: "Optional extra metadata merged into the node (e.g., { codeAnchors: ['path/to/file.ts'] } for coding intelligence)"
38
39
  }
39
40
  },
40
- required: ["canonicalText", "baseRate"],
41
+ required: ["canonicalText"],
41
42
  response: {
42
43
  description: "The created canonical belief record",
43
44
  fields: {
@@ -100,7 +101,7 @@ var REFINE_BELIEF = {
100
101
  };
101
102
  var MODULATE_CONFIDENCE = {
102
103
  name: "modulate_confidence",
103
- description: "Record a confidence change for a belief. Like `git commit` to the credence log \u2014 an atomic, append-only write. Each modulation is a new entry in the history, not an overwrite. Scoring happens via merge; this tool records the individual data points. Pass the full subjective-logic tuple (`belief`, `disbelief`, `uncertainty`, `baseRate`) directly. If a caller only has a scalar probability, use `@lucern/sdk` helpers `opinionFromBaseRate`, `opinionFromDogmatic`, or `opinionFromProjected` to name the intended interpretation before calling this tool. Triggers: evidence_added, evidence_removed, contradiction_detected, contradiction_resolved, agent_assessment, worktree_outcome, worktree_completed, fusion, discount, deduction, manual, decay.",
104
+ description: "Record a confidence change for a belief. Like `git commit` to the credence log \u2014 an atomic, append-only write. Each modulation is a new entry in the history, not an overwrite. Scoring happens via merge; this tool records the individual data points. Pass the full subjective-logic tuple (`belief`, `disbelief`, `uncertainty`, `baseRate`) directly. If a caller only has a scalar probability, use `@lucern/sdk` helpers `opinionFromBaseRate`, `opinionFromDogmatic`, or `opinionFromProjected` to name the intended interpretation before calling this tool. Every modulation must cite a truth-bearing artifact: triggeringEvidenceId, triggeringQuestionId, triggeringAnswerId, triggeringContradictionId, or triggeringWorktreeId. Triggers: evidence_added, evidence_removed, contradiction_detected, contradiction_resolved, agent_assessment, worktree_outcome, worktree_completed, fusion, discount, deduction.",
104
105
  parameters: {
105
106
  nodeId: { type: "string", description: "The belief to score" },
106
107
  belief: {
@@ -119,9 +120,9 @@ var MODULATE_CONFIDENCE = {
119
120
  type: "number",
120
121
  description: "Subjective-logic base rate `a` in [0, 1]. Required for tuple payloads."
121
122
  },
122
- confidence: {
123
- type: "number",
124
- description: "Deprecated scalar confidence value in [0, 1]. Scalar-only payloads are rejected as AMBIGUOUS_SCALAR."
123
+ worktreeId: {
124
+ type: "string",
125
+ description: "Completed worktree that tested this belief when confidence policy requires merge-backed scoring."
125
126
  },
126
127
  trigger: {
127
128
  type: "string",
@@ -136,17 +137,43 @@ var MODULATE_CONFIDENCE = {
136
137
  "worktree_completed",
137
138
  "fusion",
138
139
  "discount",
139
- "deduction",
140
- "manual",
141
- "decay"
140
+ "deduction"
142
141
  ]
143
142
  },
143
+ triggeringEvidenceId: {
144
+ type: "string",
145
+ description: "Evidence node that caused an evidence-triggered modulation"
146
+ },
147
+ triggeringQuestionId: {
148
+ type: "string",
149
+ description: "Answered question whose resolution supports this modulation"
150
+ },
151
+ triggeringAnswerId: {
152
+ type: "string",
153
+ description: "Answer node whose content supports this modulation"
154
+ },
155
+ triggeringContradictionId: {
156
+ type: "string",
157
+ description: "Contradiction record that caused a contradiction-triggered modulation"
158
+ },
159
+ triggeringWorktreeId: {
160
+ type: "string",
161
+ description: "Completed worktree whose outcome caused a worktree-triggered modulation"
162
+ },
144
163
  rationale: {
145
164
  type: "string",
146
165
  description: "Human-readable explanation of why confidence changed"
147
166
  }
148
167
  },
149
- required: ["nodeId", "trigger", "rationale"],
168
+ required: [
169
+ "nodeId",
170
+ "belief",
171
+ "disbelief",
172
+ "uncertainty",
173
+ "baseRate",
174
+ "trigger",
175
+ "rationale"
176
+ ],
150
177
  response: {
151
178
  description: "Confidence modulation result",
152
179
  fields: {
@@ -340,7 +367,7 @@ var ADD_EVIDENCE = {
340
367
  description: "Optional extra metadata merged into the node (e.g., { codeAnchors: ['path/to/file.ts'], failedApproach: true } for coding intelligence)"
341
368
  }
342
369
  },
343
- required: ["canonicalText", "targetNodeId"],
370
+ required: ["canonicalText", "targetNodeId", "reasoning"],
344
371
  response: {
345
372
  description: "The created evidence node and its edge",
346
373
  fields: {
@@ -421,9 +448,21 @@ var ADD_WORKTREE = {
421
448
  type: "string",
422
449
  description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
423
450
  },
424
- executionOrder: {
451
+ campaign: {
452
+ type: "number",
453
+ description: "Top-level pipeline campaign number. Campaigns define the outer execution slice."
454
+ },
455
+ lane: {
456
+ type: "string",
457
+ description: "GitButler-aligned workstream lane name inside the campaign."
458
+ },
459
+ laneOrderInCampaign: {
425
460
  type: "number",
426
- description: "Global execution order for this worktree"
461
+ description: "Ordering for this lane within its campaign."
462
+ },
463
+ orderInLane: {
464
+ type: "number",
465
+ description: "Position of this worktree inside its lane."
427
466
  },
428
467
  dependsOn: {
429
468
  type: "array",
@@ -1081,6 +1120,10 @@ var CREATE_EVIDENCE = {
1081
1120
  type: "object",
1082
1121
  description: "Optional metadata merged into the canonical evidence node"
1083
1122
  },
1123
+ rationale: {
1124
+ type: "string",
1125
+ description: "Why this evidence should enter the reasoning graph"
1126
+ },
1084
1127
  title: { type: "string", description: "Optional short title" },
1085
1128
  content: { type: "string", description: "Optional long-form content" },
1086
1129
  contentType: {
@@ -1089,7 +1132,7 @@ var CREATE_EVIDENCE = {
1089
1132
  },
1090
1133
  kind: { type: "string", description: "Optional evidence kind" }
1091
1134
  },
1092
- required: ["text"],
1135
+ required: ["text", "rationale"],
1093
1136
  response: {
1094
1137
  description: "The created canonical evidence record",
1095
1138
  fields: {
@@ -1137,7 +1180,7 @@ var LIST_EVIDENCE = {
1137
1180
  limit: { type: "number", description: "Max results" },
1138
1181
  cursor: { type: "string", description: "Pagination cursor" }
1139
1182
  },
1140
- required: [],
1183
+ required: ["topicId"],
1141
1184
  response: {
1142
1185
  description: "Canonical evidence page",
1143
1186
  fields: {
@@ -1322,6 +1365,7 @@ var ANSWER_QUESTION = {
1322
1365
  description: "Answer a question with optional evidence links. Like `git commit` on the question thread \u2014 records the answer and closes the loop with a canonical answered state.",
1323
1366
  parameters: {
1324
1367
  id: { type: "string", description: "Canonical question ID" },
1368
+ topicId: { type: "string", description: "Topic scope for the answer" },
1325
1369
  text: { type: "string", description: "Answer text" },
1326
1370
  confidence: {
1327
1371
  type: "string",
@@ -1334,7 +1378,7 @@ var ANSWER_QUESTION = {
1334
1378
  },
1335
1379
  rationale: { type: "string", description: "Why this answer is credible" }
1336
1380
  },
1337
- required: ["id", "text"],
1381
+ required: ["id", "topicId", "text"],
1338
1382
  response: {
1339
1383
  description: "Answer result",
1340
1384
  fields: {
@@ -1553,6 +1597,10 @@ var LIST_BELIEFS = {
1553
1597
  minConfidence: {
1554
1598
  type: "number",
1555
1599
  description: "Minimum confidence threshold"
1600
+ },
1601
+ limit: {
1602
+ type: "number",
1603
+ description: "Maximum results"
1556
1604
  }
1557
1605
  },
1558
1606
  required: ["topicId"],
@@ -1569,20 +1617,37 @@ var LIST_BELIEFS = {
1569
1617
  };
1570
1618
  var LIST_WORKTREES = {
1571
1619
  name: "list_worktrees",
1572
- description: "List all worktrees for a topic. Like `git worktree list` \u2014 shows active and completed investigation branches with their phase, status, and belief counts.",
1620
+ description: "List all worktrees for a topic. Like `git worktree list` \u2014 shows active and completed investigation branches with lifecycle phase, pipeline campaign/lane, status, and belief counts.",
1573
1621
  parameters: {
1574
1622
  topicId: { type: "string", description: "Topic scope" },
1575
1623
  status: {
1576
1624
  type: "string",
1577
1625
  description: "Filter: active, merged, abandoned",
1578
1626
  enum: ["active", "merged", "abandoned"]
1627
+ },
1628
+ groupBy: {
1629
+ type: "string",
1630
+ description: "Optional grouping mode for the response.",
1631
+ enum: ["campaign", "lane", "flat"]
1632
+ },
1633
+ lane: {
1634
+ type: "string",
1635
+ description: "Filter by GitButler-aligned lane name."
1636
+ },
1637
+ campaign: {
1638
+ type: "number",
1639
+ description: "Filter by top-level pipeline campaign number."
1640
+ },
1641
+ limit: {
1642
+ type: "number",
1643
+ description: "Maximum results to return."
1579
1644
  }
1580
1645
  },
1581
1646
  required: ["topicId"],
1582
1647
  response: {
1583
- description: "Worktrees with phase, status, belief count, and creation time",
1648
+ description: "Worktrees with lifecycle phase, campaign, lane, status, belief count, and creation time",
1584
1649
  fields: {
1585
- worktrees: "array \u2014 { worktreeId, title, phase, status, beliefCount, createdAt }"
1650
+ worktrees: "array \u2014 { worktreeId, title, phase, campaign, lane, laneOrderInCampaign, orderInLane, status, beliefCount, createdAt }"
1586
1651
  }
1587
1652
  },
1588
1653
  ownerModule: "workflow-engine",
@@ -1591,7 +1656,7 @@ var LIST_WORKTREES = {
1591
1656
  };
1592
1657
  var LIST_ALL_WORKTREES = {
1593
1658
  name: "list_all_worktrees",
1594
- description: "List ALL worktrees across ALL topics in one query. No topic scope required. Like `git worktree list --all` \u2014 returns the complete pipeline inventory with track, trackPosition, executionBand, dependencies, and status. Supports filtering by status, track, and executionBand. This is the PM's primary pipeline query \u2014 one call, full picture.",
1659
+ description: "List ALL worktrees across ALL topics in one query. No topic scope required. Like `git worktree list --all` \u2014 returns the complete pipeline inventory with campaign, lane, lane order, dependencies, and status. Supports filtering by status, lane, and campaign. This is the PM's primary pipeline query \u2014 one call, full picture.",
1595
1660
  parameters: {
1596
1661
  status: {
1597
1662
  type: "string",
@@ -1609,13 +1674,18 @@ var LIST_ALL_WORKTREES = {
1609
1674
  "dismissed"
1610
1675
  ]
1611
1676
  },
1612
- track: {
1677
+ lane: {
1613
1678
  type: "string",
1614
- description: "Filter by track name (e.g., 'ontology', 'tc-scope', 'control-plane', 'dev-portal', 'mcp-sdk-parity')"
1679
+ description: "Filter by lane name (e.g., 'ontology', 'tc-scope', 'control-plane', 'dev-portal', 'mcp-sdk-parity')"
1615
1680
  },
1616
- executionBand: {
1681
+ campaign: {
1617
1682
  type: "number",
1618
- description: "Filter by execution band number (e.g., 1, 2, 3). Returns only worktrees in that parallel execution group."
1683
+ description: "Filter by campaign number (e.g., 1, 2, 3). Returns only worktrees in that campaign."
1684
+ },
1685
+ groupBy: {
1686
+ type: "string",
1687
+ description: "Optional grouping mode for the response.",
1688
+ enum: ["campaign", "lane", "flat"]
1619
1689
  },
1620
1690
  limit: {
1621
1691
  type: "number",
@@ -1626,10 +1696,39 @@ var LIST_ALL_WORKTREES = {
1626
1696
  response: {
1627
1697
  description: "All worktrees across all topics with full pipeline metadata",
1628
1698
  fields: {
1629
- worktrees: "array \u2014 { worktreeId, title, topicId, topicName, phase, status, hypothesis, track, trackPosition, executionBand, executionOrder, dependsOn, blocks, gate, createdAt }",
1699
+ worktrees: "array \u2014 { worktreeId, title, topicId, topicName, phase, status, hypothesis, campaign, lane, laneOrderInCampaign, orderInLane, dependsOn, blocks, gate, createdAt }",
1630
1700
  total: "number \u2014 total count after filtering",
1631
- tracks: "object \u2014 { trackName: count } summary of worktrees per track",
1632
- bands: "object \u2014 { bandNumber: count } summary of worktrees per execution band"
1701
+ lanes: "object \u2014 { laneName: count } summary of worktrees per lane",
1702
+ campaigns: "object \u2014 { campaignNumber: count } summary of worktrees per campaign"
1703
+ }
1704
+ },
1705
+ ownerModule: "workflow-engine",
1706
+ ontologyPrimitive: "worktree",
1707
+ tier: "showcase"
1708
+ };
1709
+ var LIST_CAMPAIGNS = {
1710
+ name: "list_campaigns",
1711
+ 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.",
1712
+ parameters: {
1713
+ topicId: {
1714
+ type: "string",
1715
+ description: "Optional topic scope."
1716
+ },
1717
+ status: {
1718
+ type: "string",
1719
+ description: "Optional worktree status filter before grouping campaigns and lanes."
1720
+ },
1721
+ limit: {
1722
+ type: "number",
1723
+ description: "Maximum worktrees to scan before grouping."
1724
+ }
1725
+ },
1726
+ required: [],
1727
+ response: {
1728
+ description: "Pipeline campaigns with nested lane summaries.",
1729
+ fields: {
1730
+ campaigns: "array \u2014 { campaign, lanes: [{ lane, laneOrderInCampaign, worktreeCount, activeCount, readyCount, blockedCount, completedCount, nextWorktree }] }",
1731
+ totalWorktrees: "number \u2014 total worktrees scanned after filtering"
1633
1732
  }
1634
1733
  },
1635
1734
  ownerModule: "workflow-engine",
@@ -1692,16 +1791,28 @@ var UPDATE_WORKTREE_TARGETS = {
1692
1791
  };
1693
1792
  var UPDATE_WORKTREE_METADATA = {
1694
1793
  name: "update_worktree_metadata",
1695
- description: "Update worktree sequencing metadata \u2014 execution order, dependencies, blocking relations, and gates. Like `git config` for a worktree \u2014 sets the scheduling and dependency metadata that determines when this worktree can activate relative to others. Use to backfill or correct sequencing data.",
1794
+ description: "Update worktree sequencing metadata \u2014 campaign, lane, dependencies, blocking relations, and gates. Like `git config` for a worktree \u2014 sets the scheduling and dependency metadata that determines when this worktree can activate relative to others. Use to backfill or correct sequencing data.",
1696
1795
  parameters: {
1697
1796
  worktreeId: { type: "string", description: "The worktree to update" },
1698
1797
  hypothesis: {
1699
1798
  type: "string",
1700
1799
  description: "Testable claim this worktree investigates"
1701
1800
  },
1702
- executionOrder: {
1801
+ campaign: {
1703
1802
  type: "number",
1704
- description: "Global execution order (1 = first, higher = later)"
1803
+ description: "Top-level pipeline campaign number."
1804
+ },
1805
+ lane: {
1806
+ type: "string",
1807
+ description: "GitButler-aligned workstream lane name inside the campaign."
1808
+ },
1809
+ laneOrderInCampaign: {
1810
+ type: "number",
1811
+ description: "Ordering for this lane within the campaign."
1812
+ },
1813
+ orderInLane: {
1814
+ type: "number",
1815
+ description: "Position of this worktree inside its lane."
1705
1816
  },
1706
1817
  dependsOn: {
1707
1818
  type: "array",
@@ -1739,18 +1850,6 @@ var UPDATE_WORKTREE_METADATA = {
1739
1850
  type: "object",
1740
1851
  description: "Calibrated auto-fix policy controlling dry-run vs safe execution, per-run action caps, and permitted mutation tiers."
1741
1852
  },
1742
- track: {
1743
- type: "string",
1744
- description: "Parallel workstream name (e.g., 'ontology', 'tc-scope', 'control-plane', 'dev-portal', 'mcp-sdk-parity', 'execution-program'). Groups worktrees into named lanes for pipeline visualization and PM analysis."
1745
- },
1746
- trackPosition: {
1747
- type: "number",
1748
- description: "Position within the track (1-indexed). E.g., TC-A=1, TC-B=2, TC-C=3 within the 'tc-scope' track."
1749
- },
1750
- executionBand: {
1751
- type: "number",
1752
- description: "Parallel execution band number. All worktrees in the same band can run simultaneously. Band 2 = OE-B + TC-A, Band 3 = TC-B + 11D-R + S2-13A, etc."
1753
- },
1754
1853
  status: {
1755
1854
  type: "string",
1756
1855
  description: "Override the worktree status. Use for lifecycle transitions like marking a worktree superseded, long-term, or as a raw idea.",
@@ -2120,6 +2219,10 @@ var LIST_TASKS = {
2120
2219
  type: "string",
2121
2220
  description: "Filter to tasks linked to this worktree"
2122
2221
  },
2222
+ worktreeId: {
2223
+ type: "string",
2224
+ description: "Alias for linkedWorktreeId"
2225
+ },
2123
2226
  status: {
2124
2227
  type: "string",
2125
2228
  description: "Filter by status: todo, in_progress, blocked, done",
@@ -2207,7 +2310,7 @@ var GET_TOPIC = {
2207
2310
  description: "Legacy alias for topicId"
2208
2311
  }
2209
2312
  },
2210
- required: [],
2313
+ required: ["topicId"],
2211
2314
  response: {
2212
2315
  description: "Single topic record",
2213
2316
  fields: {
@@ -2562,7 +2665,7 @@ var GET_ONTOLOGY = {
2562
2665
  description: "Tenant scope for key lookup. Omit for platform-level."
2563
2666
  }
2564
2667
  },
2565
- required: [],
2668
+ required: ["id"],
2566
2669
  response: {
2567
2670
  description: "Ontology definition with latest published version",
2568
2671
  fields: {
@@ -2629,7 +2732,7 @@ var MATCH_ENTITY_TYPE = {
2629
2732
  description: "Optional maximum number of ranked matches to return"
2630
2733
  }
2631
2734
  },
2632
- required: ["text"],
2735
+ required: ["text", "ontologyId"],
2633
2736
  response: {
2634
2737
  description: "Ranked ontology entity type matches",
2635
2738
  fields: {
@@ -2883,7 +2986,7 @@ var RECORD_SCOPE_LEARNING = {
2883
2986
  };
2884
2987
  var PIPELINE_SNAPSHOT = {
2885
2988
  name: "pipeline_snapshot",
2886
- description: "Summarize a topic's worktree pipeline in band-and-lane form. Like `git status --short` for Lucern execution \u2014 returns the hinge worktree, next planned wave, blockers, critical path, superseded work, and graph hygiene debt.",
2989
+ description: "Summarize a topic's worktree pipeline in campaign-and-lane form. Like `git status --short` for Lucern execution \u2014 returns the hinge worktree, next planned wave, blockers, critical path, superseded work, and graph hygiene debt.",
2887
2990
  parameters: {
2888
2991
  topicId: { type: "string", description: "Topic scope ID" }
2889
2992
  },
@@ -2893,14 +2996,14 @@ var PIPELINE_SNAPSHOT = {
2893
2996
  fields: {
2894
2997
  topicId: "string",
2895
2998
  topicName: "string",
2896
- currentBand: "number | null",
2897
- nextBand: "number | null",
2999
+ currentCampaign: "number | null",
3000
+ nextCampaign: "number | null",
2898
3001
  activeWorktrees: "array \u2014 current hinge worktree(s)",
2899
- nextWave: "array \u2014 worktrees in the next planned band",
3002
+ nextWave: "array \u2014 worktrees in the next planned campaign",
2900
3003
  readyNow: "array \u2014 planning worktrees with dependencies completed",
2901
3004
  blockedBy: "array \u2014 grouped blockers",
2902
3005
  criticalPath: "array \u2014 ordered incomplete worktree chain",
2903
- bands: "array \u2014 incomplete worktrees grouped by executionBand",
3006
+ campaigns: "array \u2014 incomplete worktrees grouped by campaign",
2904
3007
  superseded: "array \u2014 worktrees marked superseded or not for activation",
2905
3008
  graphHygiene: "object \u2014 untargeted and taskless worktree debt",
2906
3009
  riskQuestions: "array \u2014 critical/high open questions",
@@ -3489,6 +3592,7 @@ var MCP_TOOL_CONTRACTS = {
3489
3592
  list_beliefs: LIST_BELIEFS,
3490
3593
  list_worktrees: LIST_WORKTREES,
3491
3594
  list_all_worktrees: LIST_ALL_WORKTREES,
3595
+ list_campaigns: LIST_CAMPAIGNS,
3492
3596
  activate_worktree: ACTIVATE_WORKTREE,
3493
3597
  update_worktree_targets: UPDATE_WORKTREE_TARGETS,
3494
3598
  update_worktree_metadata: UPDATE_WORKTREE_METADATA,
@@ -3671,6 +3775,7 @@ var MCP_WORKFLOW_PLATFORM_OPERATION_NAMES = [
3671
3775
  "activate_worktree",
3672
3776
  "list_worktrees",
3673
3777
  "list_all_worktrees",
3778
+ "list_campaigns",
3674
3779
  "update_worktree_targets",
3675
3780
  "update_worktree_metadata",
3676
3781
  "create_task",
@@ -3878,6 +3983,7 @@ var LUCERN_OPERATION_MANIFEST = {
3878
3983
 
3879
3984
  // src/function-registry/helpers.ts
3880
3985
  var jsonObjectSchema = z.record(z.unknown());
3986
+ var sdkSessionIdSchema = z.string().optional();
3881
3987
  function mcpContractShape(contract) {
3882
3988
  const required = new Set(contract.required);
3883
3989
  return Object.fromEntries(
@@ -3912,10 +4018,40 @@ function argsSchemaFromMcpContract(contract) {
3912
4018
  return z.object(mcpContractShape(contract));
3913
4019
  }
3914
4020
  function inputSchemaFromMcpContract(contract) {
3915
- return argsSchemaFromMcpContract(contract).passthrough();
4021
+ return withInternalSurfaceFields(argsSchemaFromMcpContract(contract));
4022
+ }
4023
+ function withInternalSurfaceFields(schema) {
4024
+ return schema.extend({ __sdkSessionId: sdkSessionIdSchema }).strict();
4025
+ }
4026
+ function normalizeInputSchema(schema) {
4027
+ if (schema instanceof z.ZodObject) {
4028
+ return withInternalSurfaceFields(schema);
4029
+ }
4030
+ return schema;
4031
+ }
4032
+ function unwrapObjectSchema(schema) {
4033
+ let current = schema;
4034
+ while (true) {
4035
+ switch (current._def.typeName) {
4036
+ case z.ZodFirstPartyTypeKind.ZodEffects:
4037
+ current = current._def.schema;
4038
+ continue;
4039
+ case z.ZodFirstPartyTypeKind.ZodBranded:
4040
+ current = current._def.type;
4041
+ continue;
4042
+ default:
4043
+ return current instanceof z.ZodObject ? current : void 0;
4044
+ }
4045
+ }
3916
4046
  }
3917
4047
  function getObjectShape(schema) {
3918
- const shape = typeof schema._def.shape === "function" ? schema._def.shape() : schema._def.shape;
4048
+ const objectSchema = unwrapObjectSchema(schema);
4049
+ if (!objectSchema) {
4050
+ throw new Error(
4051
+ `Expected a Zod object schema, received ${schema._def.typeName}.`
4052
+ );
4053
+ }
4054
+ const shape = typeof objectSchema._def.shape === "function" ? objectSchema._def.shape() : objectSchema._def.shape;
3919
4055
  return shape;
3920
4056
  }
3921
4057
  function unwrapMcpParameterSchema(schema) {
@@ -3936,6 +4072,9 @@ function unwrapMcpParameterSchema(schema) {
3936
4072
  case z.ZodFirstPartyTypeKind.ZodBranded:
3937
4073
  current = current._def.type;
3938
4074
  continue;
4075
+ case z.ZodFirstPartyTypeKind.ZodEffects:
4076
+ current = current._def.schema;
4077
+ continue;
3939
4078
  default:
3940
4079
  return { schema: current, required, description: description ?? current.description };
3941
4080
  }
@@ -3955,6 +4094,7 @@ function mcpParameterFromZod(fieldName, schema, contractName) {
3955
4094
  return { parameter: { type: "array", description }, required };
3956
4095
  case z.ZodFirstPartyTypeKind.ZodObject:
3957
4096
  case z.ZodFirstPartyTypeKind.ZodRecord:
4097
+ case z.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:
3958
4098
  return { parameter: { type: "object", description }, required };
3959
4099
  case z.ZodFirstPartyTypeKind.ZodEnum:
3960
4100
  return {
@@ -4016,6 +4156,14 @@ function withCreatedBy(input, context) {
4016
4156
  createdBy: typeof input.createdBy === "string" ? input.createdBy : authUserId(context)
4017
4157
  };
4018
4158
  }
4159
+ function compactRecord(input) {
4160
+ return Object.fromEntries(
4161
+ Object.entries(input).filter(([, value]) => value !== void 0)
4162
+ );
4163
+ }
4164
+ function recordValue(value) {
4165
+ return value && typeof value === "object" && !Array.isArray(value) ? value : {};
4166
+ }
4019
4167
  function surfaceMcpContract(name) {
4020
4168
  const contract = MCP_TOOL_CONTRACTS[name];
4021
4169
  if (!contract) {
@@ -4060,7 +4208,9 @@ function surfaceContract(args) {
4060
4208
  const canonicalArgs = args.args ?? argsSchemaFromMcpContract(baseMcp);
4061
4209
  const mcp = args.args ? mcpContractFromArgsSchema(baseMcp, canonicalArgs, args.name) : baseMcp;
4062
4210
  const canonicalReturns = args.returns ?? jsonObjectSchema;
4063
- const input = args.input ?? inputSchemaFromMcpContract(mcp);
4211
+ const input = normalizeInputSchema(
4212
+ args.input ?? inputSchemaFromMcpContract(mcp)
4213
+ );
4064
4214
  const output = args.output ?? canonicalReturns;
4065
4215
  return defineFunctionContract({
4066
4216
  name: args.name,
@@ -4104,20 +4254,184 @@ function surfaceContract(args) {
4104
4254
  });
4105
4255
  }
4106
4256
 
4257
+ // src/projections/projection-dsl.ts
4258
+ function defineProjection(def) {
4259
+ return def;
4260
+ }
4261
+
4262
+ // src/projections/create-evidence.projection.ts
4263
+ var jsonRecordSchema = z.record(z.unknown());
4264
+ var createEvidenceInputSchemaBase = z.object({
4265
+ projectId: z.string().optional(),
4266
+ topicId: z.string().optional(),
4267
+ text: z.string().optional(),
4268
+ canonicalText: z.string().optional(),
4269
+ title: z.string().optional(),
4270
+ content: z.string().optional(),
4271
+ contentType: z.string().optional(),
4272
+ kind: z.string().optional(),
4273
+ tags: z.array(z.string()).optional(),
4274
+ source: z.string().optional(),
4275
+ sourceUrl: z.string().optional(),
4276
+ sourceType: z.string().optional(),
4277
+ externalSourceType: z.string().optional(),
4278
+ sourceQuestionId: z.string().optional(),
4279
+ methodology: z.string().optional(),
4280
+ informationAsymmetry: z.string().optional(),
4281
+ sourceDescription: z.string().optional(),
4282
+ targetId: z.string().optional(),
4283
+ targetNodeId: z.string().optional(),
4284
+ linkedBeliefNodeId: z.string().optional(),
4285
+ evidenceRelation: z.enum(["supports", "contradicts", "neutral"]).optional(),
4286
+ confidence: z.number().optional(),
4287
+ weight: z.number().optional(),
4288
+ reasoning: z.string().optional(),
4289
+ rationale: z.string(),
4290
+ metadata: jsonRecordSchema.optional(),
4291
+ trustedBypassAccessCheck: z.boolean().optional()
4292
+ }).passthrough();
4293
+ var createEvidenceInputSchema = createEvidenceInputSchemaBase.refine(
4294
+ (input) => Boolean(input.text ?? input.canonicalText),
4295
+ {
4296
+ message: "create_evidence requires text",
4297
+ path: ["text"]
4298
+ }
4299
+ );
4300
+ function compactRecord2(input) {
4301
+ return Object.fromEntries(
4302
+ Object.entries(input).filter(([, value]) => value !== void 0)
4303
+ );
4304
+ }
4305
+ function recordValue2(value) {
4306
+ return value && typeof value === "object" && !Array.isArray(value) ? value : {};
4307
+ }
4308
+ var createEvidenceProjection = defineProjection({
4309
+ contractName: "create_evidence",
4310
+ inputSchema: createEvidenceInputSchema,
4311
+ project: (input) => {
4312
+ const text = input.text ?? input.canonicalText;
4313
+ const weight = typeof input.weight === "number" ? input.weight : void 0;
4314
+ return compactRecord2({
4315
+ projectId: input.projectId,
4316
+ topicId: input.topicId,
4317
+ text,
4318
+ title: input.title ?? text,
4319
+ content: input.content ?? text,
4320
+ contentType: input.contentType,
4321
+ kind: input.kind,
4322
+ tags: input.tags,
4323
+ sourceType: input.sourceType,
4324
+ externalSourceType: input.externalSourceType,
4325
+ sourceUrl: input.sourceUrl ?? input.source,
4326
+ sourceQuestionId: input.sourceQuestionId,
4327
+ methodology: input.methodology,
4328
+ informationAsymmetry: input.informationAsymmetry,
4329
+ sourceDescription: input.sourceDescription,
4330
+ metadata: compactRecord2({
4331
+ ...recordValue2(input.metadata),
4332
+ source: input.source,
4333
+ targetId: input.targetId,
4334
+ targetNodeId: input.targetNodeId,
4335
+ weight,
4336
+ reasoning: input.reasoning,
4337
+ rationale: input.rationale
4338
+ }),
4339
+ linkedBeliefNodeId: input.linkedBeliefNodeId ?? input.targetNodeId ?? input.targetId,
4340
+ evidenceRelation: input.evidenceRelation ?? (weight === void 0 ? void 0 : weight < 0 ? "contradicts" : "supports"),
4341
+ confidence: input.confidence ?? (weight === void 0 ? void 0 : Math.min(1, Math.max(0, Math.abs(weight)))),
4342
+ rationale: input.rationale,
4343
+ trustedBypassAccessCheck: input.trustedBypassAccessCheck ?? true
4344
+ });
4345
+ },
4346
+ convexArgsValidator: v.object({
4347
+ projectId: v.optional(v.string()),
4348
+ topicId: v.optional(v.string()),
4349
+ text: v.string(),
4350
+ title: v.optional(v.string()),
4351
+ content: v.optional(v.string()),
4352
+ contentType: v.optional(v.string()),
4353
+ kind: v.optional(v.string()),
4354
+ tags: v.optional(v.array(v.string())),
4355
+ sourceType: v.optional(v.string()),
4356
+ externalSourceType: v.optional(v.string()),
4357
+ sourceUrl: v.optional(v.string()),
4358
+ sourceQuestionId: v.optional(v.string()),
4359
+ methodology: v.optional(v.string()),
4360
+ informationAsymmetry: v.optional(v.string()),
4361
+ sourceDescription: v.optional(v.string()),
4362
+ metadata: v.optional(v.record(v.string(), v.any())),
4363
+ linkedBeliefNodeId: v.optional(v.string()),
4364
+ evidenceRelation: v.optional(
4365
+ v.union(
4366
+ v.literal("supports"),
4367
+ v.literal("contradicts"),
4368
+ v.literal("neutral")
4369
+ )
4370
+ ),
4371
+ confidence: v.optional(v.number()),
4372
+ rationale: v.string(),
4373
+ trustedBypassAccessCheck: v.optional(v.boolean())
4374
+ })
4375
+ });
4376
+
4107
4377
  // src/function-registry/evidence.ts
4108
- var evidenceIdInput = (input) => ({
4109
- ...input,
4110
- evidenceId: input.evidenceId ?? input.id ?? input.nodeId,
4378
+ var evidenceIdInput = (input) => compactRecord({
4379
+ evidenceId: input.evidenceId,
4380
+ insightId: input.insightId,
4111
4381
  nodeId: input.nodeId ?? input.id ?? input.evidenceId
4112
4382
  });
4113
- var createEvidenceInput = (input, context) => withUserId(
4114
- {
4115
- ...input,
4116
- title: input.title ?? input.text,
4117
- content: input.content ?? input.text,
4118
- sourceType: input.sourceType ?? input.source ?? "agent",
4383
+ var evidenceTopicInput = (input) => compactRecord({
4384
+ topicId: input.topicId,
4385
+ status: input.status,
4386
+ userId: input.userId,
4387
+ limit: input.limit
4388
+ });
4389
+ var createEvidenceInput = (input, context) => {
4390
+ const parsed = createEvidenceProjection.inputSchema.safeParse(input);
4391
+ if (!parsed.success) {
4392
+ throw new Error(
4393
+ `create_evidence projection input rejected: ${parsed.error.message}`
4394
+ );
4395
+ }
4396
+ return withUserId(
4397
+ compactRecord(createEvidenceProjection.project(parsed.data)),
4398
+ context
4399
+ );
4400
+ };
4401
+ var linkEvidenceToBeliefEdgeInput = (input, context) => withCreatedBy(
4402
+ compactRecord({
4403
+ fromNodeId: input.insightId ?? input.evidenceNodeId ?? input.evidenceId,
4404
+ toNodeId: input.beliefNodeId ?? input.beliefId ?? input.targetId,
4405
+ edgeType: "evidence_supports_belief",
4406
+ globalId: input.globalId ?? `edge:${String(
4407
+ input.insightId ?? input.evidenceNodeId ?? input.evidenceId
4408
+ )}:${String(
4409
+ input.beliefNodeId ?? input.beliefId ?? input.targetId
4410
+ )}:evidence_supports_belief`,
4411
+ weight: typeof input.weight === "number" ? input.weight : input.type === "contradicting" ? -1 : 1,
4412
+ context: input.rationale ?? input.context,
4413
+ skipLayerValidation: true,
4414
+ topicId: input.topicId,
4119
4415
  trustedBypassAccessCheck: input.trustedBypassAccessCheck ?? true
4120
- },
4416
+ }),
4417
+ context
4418
+ );
4419
+ var linkEvidenceToQuestionEdgeInput = (input, context) => withCreatedBy(
4420
+ compactRecord({
4421
+ fromNodeId: input.insightId ?? input.evidenceNodeId ?? input.evidenceId,
4422
+ toNodeId: input.questionId ?? input.questionNodeId ?? input.targetId,
4423
+ edgeType: "evidence_supports_question",
4424
+ globalId: input.globalId ?? `edge:${String(
4425
+ input.insightId ?? input.evidenceNodeId ?? input.evidenceId
4426
+ )}:${String(
4427
+ input.questionId ?? input.questionNodeId ?? input.targetId
4428
+ )}:evidence_supports_question`,
4429
+ weight: input.impactScore ?? input.weight,
4430
+ context: input.rationale ?? input.context,
4431
+ skipLayerValidation: true,
4432
+ topicId: input.topicId,
4433
+ trustedBypassAccessCheck: input.trustedBypassAccessCheck ?? true
4434
+ }),
4121
4435
  context
4122
4436
  );
4123
4437
  var evidenceContracts = [
@@ -4161,8 +4475,9 @@ var evidenceContracts = [
4161
4475
  linkedBeliefNodeId: input.linkedBeliefNodeId ?? input.targetNodeId ?? input.targetId,
4162
4476
  evidenceRelation: weight < 0 ? "contradicts" : "supports",
4163
4477
  confidence: Math.min(1, Math.max(0, Math.abs(weight))),
4478
+ rationale: input.reasoning,
4164
4479
  metadata: {
4165
- ...input.metadata && typeof input.metadata === "object" && !Array.isArray(input.metadata) ? input.metadata : {},
4480
+ ...recordValue(input.metadata),
4166
4481
  reasoning: input.reasoning,
4167
4482
  sourceUrl: input.sourceUrl
4168
4483
  }
@@ -4202,7 +4517,8 @@ var evidenceContracts = [
4202
4517
  convex: {
4203
4518
  module: "evidence",
4204
4519
  functionName: "getByTopic",
4205
- kind: "query"
4520
+ kind: "query",
4521
+ inputProjection: evidenceTopicInput
4206
4522
  }
4207
4523
  }),
4208
4524
  surfaceContract({
@@ -4218,10 +4534,12 @@ var evidenceContracts = [
4218
4534
  module: "nodes",
4219
4535
  functionName: "search",
4220
4536
  kind: "query",
4221
- inputProjection: (input) => ({
4222
- ...input,
4537
+ inputProjection: (input) => compactRecord({
4223
4538
  searchQuery: input.searchQuery ?? input.q ?? input.query,
4224
- nodeType: "evidence"
4539
+ projectId: input.projectId,
4540
+ topicId: input.topicId,
4541
+ nodeType: "evidence",
4542
+ limit: input.limit
4225
4543
  })
4226
4544
  }
4227
4545
  }),
@@ -4235,17 +4553,10 @@ var evidenceContracts = [
4235
4553
  sdkMethod: "linkEvidenceToBelief",
4236
4554
  summary: "Link evidence to a belief.",
4237
4555
  convex: {
4238
- module: "beliefs",
4239
- functionName: "linkEvidence",
4556
+ module: "edges",
4557
+ functionName: "create",
4240
4558
  kind: "mutation",
4241
- inputProjection: (input, context) => withUserId(
4242
- {
4243
- ...input,
4244
- beliefNodeId: input.beliefNodeId ?? input.beliefId ?? input.targetId,
4245
- evidenceNodeId: input.evidenceNodeId ?? input.evidenceId
4246
- },
4247
- context
4248
- )
4559
+ inputProjection: linkEvidenceToBeliefEdgeInput
4249
4560
  }
4250
4561
  }),
4251
4562
  surfaceContract({
@@ -4258,18 +4569,10 @@ var evidenceContracts = [
4258
4569
  sdkMethod: "linkEvidenceToQuestion",
4259
4570
  summary: "Link evidence to a question.",
4260
4571
  convex: {
4261
- module: "questionLinks",
4572
+ module: "edges",
4262
4573
  functionName: "create",
4263
4574
  kind: "mutation",
4264
- inputProjection: (input, context) => withCreatedBy(
4265
- {
4266
- ...input,
4267
- questionId: input.questionId,
4268
- insightId: input.insightId ?? input.evidenceId,
4269
- helpsAnswer: input.helpsAnswer ?? true
4270
- },
4271
- context
4272
- )
4575
+ inputProjection: linkEvidenceToQuestionEdgeInput
4273
4576
  }
4274
4577
  }),
4275
4578
  surfaceContract({
@@ -4282,17 +4585,10 @@ var evidenceContracts = [
4282
4585
  sdkMethod: "linkEvidence",
4283
4586
  summary: "Link evidence to a target node.",
4284
4587
  convex: {
4285
- module: "beliefs",
4286
- functionName: "linkEvidence",
4588
+ module: "edges",
4589
+ functionName: "create",
4287
4590
  kind: "mutation",
4288
- inputProjection: (input, context) => withUserId(
4289
- {
4290
- ...input,
4291
- beliefNodeId: input.beliefNodeId ?? input.targetId,
4292
- evidenceNodeId: input.evidenceNodeId ?? input.evidenceId
4293
- },
4294
- context
4295
- )
4591
+ inputProjection: linkEvidenceToBeliefEdgeInput
4296
4592
  }
4297
4593
  })
4298
4594
  ];