@lucern/graph-primitives 0.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/README.md +29 -0
  2. package/dist/beliefDecay-Q_26RTc-.d.ts +72 -0
  3. package/dist/beliefDecay.d.ts +2 -0
  4. package/dist/beliefDecay.js +1628 -0
  5. package/dist/beliefDecay.js.map +1 -0
  6. package/dist/beliefEvidenceLinks-42FlR48t.d.ts +77 -0
  7. package/dist/beliefEvidenceLinks.d.ts +1 -0
  8. package/dist/beliefEvidenceLinks.js +1978 -0
  9. package/dist/beliefEvidenceLinks.js.map +1 -0
  10. package/dist/beliefLifecycle-C-AehZgF.d.ts +43 -0
  11. package/dist/beliefLifecycle.d.ts +1 -0
  12. package/dist/beliefLifecycle.js +98 -0
  13. package/dist/beliefLifecycle.js.map +1 -0
  14. package/dist/confidencePropagationDispatch.d.ts +46 -0
  15. package/dist/confidencePropagationDispatch.js +744 -0
  16. package/dist/confidencePropagationDispatch.js.map +1 -0
  17. package/dist/contradictions-Hdwl7zid.d.ts +71 -0
  18. package/dist/contradictions.d.ts +1 -0
  19. package/dist/contradictions.js +1557 -0
  20. package/dist/contradictions.js.map +1 -0
  21. package/dist/convex.d.ts +23 -0
  22. package/dist/convex.js +17 -0
  23. package/dist/convex.js.map +1 -0
  24. package/dist/edgeValidation-CeI0wc0r.d.ts +35 -0
  25. package/dist/edgeValidation.d.ts +2 -0
  26. package/dist/edgeValidation.js +307 -0
  27. package/dist/edgeValidation.js.map +1 -0
  28. package/dist/edges/contains.d.ts +6 -0
  29. package/dist/edges/contains.js +14 -0
  30. package/dist/edges/contains.js.map +1 -0
  31. package/dist/edges/contradicts.d.ts +6 -0
  32. package/dist/edges/contradicts.js +183 -0
  33. package/dist/edges/contradicts.js.map +1 -0
  34. package/dist/edges/dependsOn.d.ts +6 -0
  35. package/dist/edges/dependsOn.js +240 -0
  36. package/dist/edges/dependsOn.js.map +1 -0
  37. package/dist/edges/derivedFrom.d.ts +6 -0
  38. package/dist/edges/derivedFrom.js +14 -0
  39. package/dist/edges/derivedFrom.js.map +1 -0
  40. package/dist/edges/elaborates.d.ts +6 -0
  41. package/dist/edges/elaborates.js +100 -0
  42. package/dist/edges/elaborates.js.map +1 -0
  43. package/dist/edges/index.d.ts +3 -0
  44. package/dist/edges/index.js +556 -0
  45. package/dist/edges/index.js.map +1 -0
  46. package/dist/edges/informs.d.ts +6 -0
  47. package/dist/edges/informs.js +112 -0
  48. package/dist/edges/informs.js.map +1 -0
  49. package/dist/edges/propagationTypes.d.ts +39 -0
  50. package/dist/edges/propagationTypes.js +17 -0
  51. package/dist/edges/propagationTypes.js.map +1 -0
  52. package/dist/edges/refutes.d.ts +6 -0
  53. package/dist/edges/refutes.js +108 -0
  54. package/dist/edges/refutes.js.map +1 -0
  55. package/dist/edges/supports.d.ts +6 -0
  56. package/dist/edges/supports.js +193 -0
  57. package/dist/edges/supports.js.map +1 -0
  58. package/dist/edges/tests.d.ts +6 -0
  59. package/dist/edges/tests.js +14 -0
  60. package/dist/edges/tests.js.map +1 -0
  61. package/dist/edges/utils.d.ts +12 -0
  62. package/dist/edges/utils.js +188 -0
  63. package/dist/edges/utils.js.map +1 -0
  64. package/dist/embeddingTrigger.d.ts +24 -0
  65. package/dist/embeddingTrigger.js +24 -0
  66. package/dist/embeddingTrigger.js.map +1 -0
  67. package/dist/entityBridge-DMaKooYn.d.ts +59 -0
  68. package/dist/entityBridge.d.ts +1 -0
  69. package/dist/entityBridge.js +663 -0
  70. package/dist/entityBridge.js.map +1 -0
  71. package/dist/entityLifecycle-BkhRJ-XI.d.ts +69 -0
  72. package/dist/entityLifecycle.d.ts +1 -0
  73. package/dist/entityLifecycle.js +2083 -0
  74. package/dist/entityLifecycle.js.map +1 -0
  75. package/dist/entityValidation-KLZ_Xl2D.d.ts +50 -0
  76. package/dist/entityValidation.d.ts +3 -0
  77. package/dist/entityValidation.js +71 -0
  78. package/dist/entityValidation.js.map +1 -0
  79. package/dist/epistemicAnswers-DSP1slZ9.d.ts +67 -0
  80. package/dist/epistemicAnswers.d.ts +1 -0
  81. package/dist/epistemicAnswers.js +1650 -0
  82. package/dist/epistemicAnswers.js.map +1 -0
  83. package/dist/epistemicBeliefs-DtFVTp-k.d.ts +377 -0
  84. package/dist/epistemicBeliefs.d.ts +5 -0
  85. package/dist/epistemicBeliefs.js +6386 -0
  86. package/dist/epistemicBeliefs.js.map +1 -0
  87. package/dist/epistemicContractHelpers.d.ts +1 -0
  88. package/dist/epistemicContractHelpers.js +320 -0
  89. package/dist/epistemicContractHelpers.js.map +1 -0
  90. package/dist/epistemicContracts.d.ts +77 -0
  91. package/dist/epistemicContracts.js +8436 -0
  92. package/dist/epistemicContracts.js.map +1 -0
  93. package/dist/epistemicEdges-DcA8ErUG.d.ts +191 -0
  94. package/dist/epistemicEdges.d.ts +2 -0
  95. package/dist/epistemicEdges.js +2749 -0
  96. package/dist/epistemicEdges.js.map +1 -0
  97. package/dist/epistemicEvidence-Bo638XDP.d.ts +128 -0
  98. package/dist/epistemicEvidence.d.ts +3 -0
  99. package/dist/epistemicEvidence.js +3282 -0
  100. package/dist/epistemicEvidence.js.map +1 -0
  101. package/dist/epistemicHelpers-Bd9xbaib.d.ts +329 -0
  102. package/dist/epistemicHelpers.d.ts +4 -0
  103. package/dist/epistemicHelpers.js +999 -0
  104. package/dist/epistemicHelpers.js.map +1 -0
  105. package/dist/epistemicLinking-CyeLOIzN.d.ts +35 -0
  106. package/dist/epistemicLinking.d.ts +1 -0
  107. package/dist/epistemicLinking.js +1391 -0
  108. package/dist/epistemicLinking.js.map +1 -0
  109. package/dist/epistemicNodes-BpD6Koud.d.ts +167 -0
  110. package/dist/epistemicNodes.d.ts +2 -0
  111. package/dist/epistemicNodes.js +2942 -0
  112. package/dist/epistemicNodes.js.map +1 -0
  113. package/dist/epistemicQuestions-CmEeY6zQ.d.ts +214 -0
  114. package/dist/epistemicQuestions.d.ts +3 -0
  115. package/dist/epistemicQuestions.js +4993 -0
  116. package/dist/epistemicQuestions.js.map +1 -0
  117. package/dist/epistemicSources-ZazxHOK1.d.ts +25 -0
  118. package/dist/epistemicSources.d.ts +1 -0
  119. package/dist/epistemicSources.js +2025 -0
  120. package/dist/epistemicSources.js.map +1 -0
  121. package/dist/evaluators/index.d.ts +9 -0
  122. package/dist/evaluators/index.js +8440 -0
  123. package/dist/evaluators/index.js.map +1 -0
  124. package/dist/evaluators/lintCheckerEvaluator.d.ts +11 -0
  125. package/dist/evaluators/lintCheckerEvaluator.js +155 -0
  126. package/dist/evaluators/lintCheckerEvaluator.js.map +1 -0
  127. package/dist/evaluators/sentryCheckerEvaluator.d.ts +11 -0
  128. package/dist/evaluators/sentryCheckerEvaluator.js +126 -0
  129. package/dist/evaluators/sentryCheckerEvaluator.js.map +1 -0
  130. package/dist/evaluators/shared.d.ts +27 -0
  131. package/dist/evaluators/shared.js +92 -0
  132. package/dist/evaluators/shared.js.map +1 -0
  133. package/dist/evaluators/testRunnerEvaluator.d.ts +17 -0
  134. package/dist/evaluators/testRunnerEvaluator.js +232 -0
  135. package/dist/evaluators/testRunnerEvaluator.js.map +1 -0
  136. package/dist/evaluators/tscCheckerEvaluator.d.ts +11 -0
  137. package/dist/evaluators/tscCheckerEvaluator.js +189 -0
  138. package/dist/evaluators/tscCheckerEvaluator.js.map +1 -0
  139. package/dist/globalId-DKh9d_uD.d.ts +20 -0
  140. package/dist/globalId.d.ts +1 -0
  141. package/dist/globalId.js +15 -0
  142. package/dist/globalId.js.map +1 -0
  143. package/dist/graphTypes-CpgIuCdo.d.ts +52 -0
  144. package/dist/graphTypes.d.ts +1 -0
  145. package/dist/graphTypes.js +120 -0
  146. package/dist/graphTypes.js.map +1 -0
  147. package/dist/helpers-BYHIk5vU.d.ts +27 -0
  148. package/dist/helpers.d.ts +4 -0
  149. package/dist/helpers.js +313 -0
  150. package/dist/helpers.js.map +1 -0
  151. package/dist/index-Dct1T70K.d.ts +25 -0
  152. package/dist/index-Dq-7R-gi.d.ts +31 -0
  153. package/dist/index.d.ts +45 -0
  154. package/dist/index.js +22294 -0
  155. package/dist/index.js.map +1 -0
  156. package/dist/invariantEnforcement.d.ts +52 -0
  157. package/dist/invariantEnforcement.js +231 -0
  158. package/dist/invariantEnforcement.js.map +1 -0
  159. package/dist/logicalRoleInference-CJxqWi3u.d.ts +16 -0
  160. package/dist/logicalRoleInference.d.ts +3 -0
  161. package/dist/logicalRoleInference.js +64 -0
  162. package/dist/logicalRoleInference.js.map +1 -0
  163. package/dist/matcherFeedbackUtils.d.ts +33 -0
  164. package/dist/matcherFeedbackUtils.js +95 -0
  165. package/dist/matcherFeedbackUtils.js.map +1 -0
  166. package/dist/ontology-matching-Buhu23ss.d.ts +48 -0
  167. package/dist/ontology-matching.d.ts +2 -0
  168. package/dist/ontology-matching.js +346 -0
  169. package/dist/ontology-matching.js.map +1 -0
  170. package/dist/ontologyApproval-Ba0Jjk1k.d.ts +26 -0
  171. package/dist/ontologyApproval.d.ts +1 -0
  172. package/dist/ontologyApproval.js +78 -0
  173. package/dist/ontologyApproval.js.map +1 -0
  174. package/dist/ontologyDefinitions.d.ts +72 -0
  175. package/dist/ontologyDefinitions.js +635 -0
  176. package/dist/ontologyDefinitions.js.map +1 -0
  177. package/dist/ontologyHelpers.d.ts +79 -0
  178. package/dist/ontologyHelpers.js +81 -0
  179. package/dist/ontologyHelpers.js.map +1 -0
  180. package/dist/ontologyRegistry-B67rPJ16.d.ts +31 -0
  181. package/dist/ontologyRegistry.d.ts +1 -0
  182. package/dist/ontologyRegistry.js +296 -0
  183. package/dist/ontologyRegistry.js.map +1 -0
  184. package/dist/projectionReconciliation-CxrXYGaB.d.ts +20 -0
  185. package/dist/projectionReconciliation.d.ts +1 -0
  186. package/dist/projectionReconciliation.js +261 -0
  187. package/dist/projectionReconciliation.js.map +1 -0
  188. package/dist/projectionStaleness-CAdpIsaW.d.ts +51 -0
  189. package/dist/projectionStaleness.d.ts +1 -0
  190. package/dist/projectionStaleness.js +57 -0
  191. package/dist/projectionStaleness.js.map +1 -0
  192. package/dist/questionEvidenceLinks-BdQD0TkM.d.ts +34 -0
  193. package/dist/questionEvidenceLinks.d.ts +1 -0
  194. package/dist/questionEvidenceLinks.js +1690 -0
  195. package/dist/questionEvidenceLinks.js.map +1 -0
  196. package/dist/resolverTypes-CC8Ea2E2.d.ts +20 -0
  197. package/dist/resolverTypes.d.ts +4 -0
  198. package/dist/resolverTypes.js +3 -0
  199. package/dist/resolverTypes.js.map +1 -0
  200. package/dist/resolvers-Br1a6eLV.d.ts +14 -0
  201. package/dist/resolvers.d.ts +5 -0
  202. package/dist/resolvers.js +308 -0
  203. package/dist/resolvers.js.map +1 -0
  204. package/dist/scopeResolverCompat.d.ts +26 -0
  205. package/dist/scopeResolverCompat.js +242 -0
  206. package/dist/scopeResolverCompat.js.map +1 -0
  207. package/dist/text-matching-CMn2WnVD.d.ts +40 -0
  208. package/dist/text-matching.d.ts +2 -0
  209. package/dist/text-matching.js +246 -0
  210. package/dist/text-matching.js.map +1 -0
  211. package/dist/topicOntologyResolver.d.ts +80 -0
  212. package/dist/topicOntologyResolver.js +67 -0
  213. package/dist/topicOntologyResolver.js.map +1 -0
  214. package/dist/topicProjectOverlay.d.ts +92 -0
  215. package/dist/topicProjectOverlay.js +249 -0
  216. package/dist/topicProjectOverlay.js.map +1 -0
  217. package/dist/topicScope-By_zp4tt.d.ts +34 -0
  218. package/dist/topicScope.d.ts +3 -0
  219. package/dist/topicScope.js +206 -0
  220. package/dist/topicScope.js.map +1 -0
  221. package/dist/workspaceIsolation.d.ts +44 -0
  222. package/dist/workspaceIsolation.js +950 -0
  223. package/dist/workspaceIsolation.js.map +1 -0
  224. package/package.json +46 -0
@@ -0,0 +1,377 @@
1
+ import { VerificationConfidenceTrigger, SLOperator } from '@lucern/confidence';
2
+ import { B as BeliefLifecycleStatus } from './beliefLifecycle-C-AehZgF.js';
3
+ import { Doc, MutationCtx, Id } from './convex.js';
4
+
5
+ /**
6
+ * Epistemic Beliefs API
7
+ *
8
+ * Clean API for managing beliefs in the epistemic spine (epistemicNodes).
9
+ * This is the NEW API that replaces beliefs.ts.
10
+ *
11
+ * Key differences from beliefs.ts:
12
+ * - Writes ONLY to epistemicNodes (no dual-write)
13
+ * - Uses epistemicNodes IDs directly (no runtime ID translation fallback)
14
+ * - Syncs to Neo4j after mutations
15
+ * - Follows Lucern invariants strictly
16
+ *
17
+ * @see /docs/epistemic-invariants/00-epistemic-invariants.md
18
+ */
19
+
20
+ type BeliefConfidenceTrigger = "initial" | "evidence_added" | "evidence_removed" | "contradiction_detected" | "contradiction_resolved" | "manual" | "decay" | "agent_assessment" | "worktree_outcome" | "worktree_completed" | "fusion" | "discount" | "deduction" | "backfill_synthetic" | VerificationConfidenceTrigger;
21
+ declare function resolveBeliefWorktreeId(metadata: Record<string, unknown> | undefined): string | undefined;
22
+ declare function flattenBeliefNode(node: Doc<"epistemicNodes">): {
23
+ _id: any;
24
+ _epistemicNodeId: any;
25
+ _creationTime: any;
26
+ belief: any;
27
+ formulation: any;
28
+ projectId: any;
29
+ topicId: any;
30
+ userId: any;
31
+ confidence: "high" | "medium" | "low";
32
+ status: any;
33
+ beliefStatus: BeliefLifecycleStatus;
34
+ topic: string;
35
+ pillar: string;
36
+ category: string;
37
+ subcategory: string;
38
+ categoryIcon: string;
39
+ supportingEvidence: string[];
40
+ contradictingEvidence: string[];
41
+ testingQuestions: string[];
42
+ linkedInsights: string[];
43
+ createdAt: any;
44
+ updatedAt: any;
45
+ tupleContradicted: boolean;
46
+ sprintId: string | undefined;
47
+ worktreeId: string | undefined;
48
+ sourceBeliefIds: string[];
49
+ criticality: "critical" | "blocking" | "supporting" | "nice_to_have" | "unanalyzed" | "important";
50
+ rationale: string;
51
+ audienceLabel: any;
52
+ policyTags: any;
53
+ sensitivityTier: any;
54
+ exportClass: any;
55
+ anonymizationClass: any;
56
+ };
57
+ declare function applyBeliefConfidenceChange(ctx: MutationCtx, args: {
58
+ nodeId: Id<"epistemicNodes">;
59
+ belief: number;
60
+ disbelief: number;
61
+ uncertainty: number;
62
+ baseRate?: number;
63
+ trigger: BeliefConfidenceTrigger;
64
+ rationale?: string;
65
+ authenticatedUserId: string;
66
+ slOperator?: SLOperator;
67
+ triggeringEvidenceId?: Id<"epistemicNodes">;
68
+ triggeringWorktreeId?: string;
69
+ }): Promise<{
70
+ nodeId: Id<"epistemicNodes">;
71
+ previousConfidence: number;
72
+ newConfidence: number;
73
+ opinion: {
74
+ b: number;
75
+ d: number;
76
+ u: number;
77
+ a: number;
78
+ };
79
+ beliefConfidenceId: Id<"beliefConfidence">;
80
+ }>;
81
+ /**
82
+ * Propagate a confidence change through graph edges whose specs allow it.
83
+ *
84
+ * After a belief is scored, this function:
85
+ * 1. Reads the graph-primitives edge propagation specs
86
+ * 2. Traverses matching incoming/outgoing/bidirectional edges hop by hop
87
+ * 3. Applies the edge operator with per-hop damping and hop limits
88
+ * 4. Writes propagated opinions as new beliefConfidence entries
89
+ */
90
+ declare const propagateConfidenceChange: any;
91
+ /**
92
+ * Create a new belief in the epistemic spine.
93
+ * Returns the epistemicNodes ID directly (not a beliefs ID).
94
+ */
95
+ declare const create: any;
96
+ /**
97
+ * Get a belief by its epistemicNodes ID.
98
+ */
99
+ declare const getById: any;
100
+ /**
101
+ * Refine an unscored belief in place.
102
+ *
103
+ * Lucern Invariant #1 + #2: Draft beliefs may be refined in place, but scored
104
+ * beliefs are immutable and must be evolved through forkBelief().
105
+ */
106
+ declare const refineBelief: any;
107
+ /**
108
+ * Get all beliefs for a project.
109
+ */
110
+ declare const getByProject: any;
111
+ /**
112
+ * Get all beliefs for a topic.
113
+ */
114
+ declare const getByTopic: any;
115
+ /**
116
+ * Fork a belief - create a new version while preserving the original.
117
+ * This is the Lucern-compliant way to "update" a belief.
118
+ *
119
+ * Lucern Invariant #1: Beliefs are append-only. Never modify formulation.
120
+ * Lucern Invariant #3: Lineage is permanent.
121
+ */
122
+ declare const forkBelief: any;
123
+ /**
124
+ * Modulate a belief's confidence.
125
+ *
126
+ * Lucern Invariant #2: Confidence changes are append-only (tracked in beliefConfidence table).
127
+ */
128
+ declare const modulateConfidence: any;
129
+ /**
130
+ * Update a belief's status.
131
+ */
132
+ declare const updateStatus: any;
133
+ /**
134
+ * Archive a belief (soft delete).
135
+ * Lucern invariant: Beliefs are never deleted, only archived.
136
+ */
137
+ declare const archive: any;
138
+ /**
139
+ * Update a belief rationale without changing formulation.
140
+ * Formulation mutability rules are unchanged (use fork/refine paths for wording).
141
+ */
142
+ declare const updateRationale: any;
143
+ declare const updateStatusInternal: any;
144
+ /**
145
+ * Get the confidence history for a belief.
146
+ */
147
+ declare const getConfidenceHistory: any;
148
+ /**
149
+ * Get the lineage of a belief (all forks and parents).
150
+ */
151
+ declare const getLineage: any;
152
+ /**
153
+ * Get multiple beliefs by their IDs.
154
+ */
155
+ declare const getByIds: any;
156
+ /**
157
+ * Get all beliefs associated with a worktree via worktreeBeliefCluster.
158
+ */
159
+ declare const getByWorktree: any;
160
+ /**
161
+ * Update a belief's pillar/topic categorization.
162
+ * Uses canonical epistemicNodes IDs.
163
+ */
164
+ declare const updatePillar: any;
165
+ /**
166
+ * Get counts of beliefs by status for a project.
167
+ */
168
+ declare const getCountByStatus: any;
169
+ /**
170
+ * Create an edge between two beliefs in the epistemic spine.
171
+ * This works with epistemicNodes IDs directly (no legacy lookup needed).
172
+ */
173
+ declare const linkBeliefs: any;
174
+ /**
175
+ * Link an insight (evidence) to a belief.
176
+ * Creates an edge from evidence → belief with appropriate type.
177
+ */
178
+ declare const linkEvidence: any;
179
+ /**
180
+ * Remove the link between an insight and a belief.
181
+ */
182
+ declare const unlinkEvidence: any;
183
+ /**
184
+ * Get a belief along with all its linked evidence.
185
+ */
186
+ declare const getWithEvidence: any;
187
+ /**
188
+ * Get all relationships (edges) for a belief.
189
+ */
190
+ declare const getRelationships: any;
191
+ /**
192
+ * Delete a relationship (edge) between nodes.
193
+ */
194
+ declare const deleteRelationship: any;
195
+ /**
196
+ * Update a belief's criticality level.
197
+ */
198
+ declare const updateCriticality: any;
199
+ /**
200
+ * Batch update criticality for multiple beliefs.
201
+ * Uses canonical epistemicNodes IDs.
202
+ */
203
+ declare const batchUpdateCriticality: any;
204
+ /**
205
+ * Get beliefs by criticality level.
206
+ */
207
+ declare const getByCriticality: any;
208
+ /**
209
+ * Get beliefs that haven't been analyzed yet.
210
+ * Used by BI agents for batch processing.
211
+ */
212
+ declare const getUnanalyzed: any;
213
+ /**
214
+ * Get all beliefs for a project (system level - no auth check).
215
+ * Used by BI agents and thesis audit agents.
216
+ */
217
+ declare const getByProjectSystem: any;
218
+ /**
219
+ * Get beliefs filtered by pillar/topic.
220
+ */
221
+ declare const getByPillar: any;
222
+ /**
223
+ * Get the belief cluster for a worktree.
224
+ * Returns all beliefs linked to the worktree and their relationships.
225
+ */
226
+ declare const getWorktreeCluster: any;
227
+ /**
228
+ * Internal query to get beliefs for a project.
229
+ * Returns epistemicNodes in legacy beliefs format for backward compatibility.
230
+ *
231
+ * @internal Use by other Convex functions only
232
+ */
233
+ declare const internalGetByProject: any;
234
+ /**
235
+ * Internal query to get beliefs for a topic.
236
+ *
237
+ * @internal Use by other Convex functions only
238
+ */
239
+ declare const internalGetByTopic: any;
240
+ /**
241
+ * Internal query to get active beliefs for a project.
242
+ *
243
+ * @internal Use by other Convex functions only
244
+ */
245
+ declare const internalGetActive: any;
246
+ /**
247
+ * Internal query to get a single belief by ID.
248
+ * Uses canonical epistemicNodes IDs.
249
+ *
250
+ * @internal Use by other Convex functions only
251
+ */
252
+ declare const internalGetById: any;
253
+ /**
254
+ * Internal mutation to create a belief.
255
+ * Creates ONLY in epistemicNodes (no dual-write).
256
+ *
257
+ * @internal Use by other Convex functions only
258
+ */
259
+ declare const internalCreate: any;
260
+ /**
261
+ * Get recent confidence changes for beliefs in a project.
262
+ * Shows beliefs that have had confidence updates via propagation, decay,
263
+ * or other users - useful for "Attention Needed" dashboard panel.
264
+ */
265
+ declare const getRecentConfidenceChanges: any;
266
+ /**
267
+ * Backfill synthetic t0 opinion-history rows for legacy beliefs that have
268
+ * node-level opinion/confidence metadata but no beliefConfidence history.
269
+ *
270
+ * Run with:
271
+ * npx convex run epistemicBeliefs:backfillSyntheticOpinionHistory '{"limit":100}'
272
+ */
273
+ declare const backfillSyntheticOpinionHistory: any;
274
+ /**
275
+ * Backfill mandatory priors for legacy beliefs created before LKC-2.
276
+ *
277
+ * Run with:
278
+ * npx convex run epistemicBeliefs:backfillMandatoryPriors '{"limit":100}'
279
+ */
280
+ declare const backfillMandatoryPriors: any;
281
+ /**
282
+ * Backfill valence + certainty on beliefConfidence records and epistemicNodes metadata.
283
+ * Converts existing single-number confidence to two-axis:
284
+ * valence = confidence * 2 - 1 (maps 0→-1, 0.5→0, 1→+1)
285
+ * certainty = |confidence - 0.5| * 2 (maps 0.5→0, 0/1→1)
286
+ *
287
+ * Run with: npx convex run epistemicBeliefs:backfillTwoAxisConfidence '{}'
288
+ */
289
+ declare const backfillTwoAxisConfidence: any;
290
+ /**
291
+ * Backfill: Create relates_to_thesis edges for confidence-bearing beliefs in a project.
292
+ *
293
+ * When modulateConfidence was missing the edge-creation step, beliefs got scored
294
+ * but never linked to the project's theme node. This backfill fixes that.
295
+ *
296
+ * Run: npx convex run epistemicBeliefs:backfillScoredBeliefEdges '{"projectId":"<id>"}'
297
+ * Dry run first: npx convex run epistemicBeliefs:backfillScoredBeliefEdges '{"projectId":"<id>","dryRun":true}'
298
+ */
299
+ declare const backfillScoredBeliefEdges: any;
300
+ /**
301
+ * @deprecated Legacy sprint backfill — removed. Sprints are D-tier.
302
+ * Kept as no-op stub to avoid breaking deployed function references.
303
+ */
304
+ declare const backfillBeliefSprintIds: any;
305
+ /**
306
+ * Get belief cluster positions for visualization.
307
+ * Classifies each belief as "clustered" (in a worktree) or "unprocessed"
308
+ * based on worktreeBeliefCluster membership.
309
+ *
310
+ * Used by PillarDetailPanel, PillarsPanel, BeliefListPanel.
311
+ */
312
+ declare const getBeliefClusterPositions: any;
313
+ /**
314
+ * Reassign a batch of belief nodes to a different topic.
315
+ *
316
+ * Used by the density-based auto-branching system when beliefs are moved
317
+ * from a parent topic into newly created subtopics. Patches `topicId`
318
+ * and `updatedAt` on the target beliefs, and also reassigns any questions
319
+ * and evidence nodes that are connected to the reassigned beliefs via edges.
320
+ *
321
+ * Skips nodes that don't exist or aren't active.
322
+ */
323
+ declare const reassignBeliefsTopic: any;
324
+
325
+ type epistemicBeliefs_BeliefConfidenceTrigger = BeliefConfidenceTrigger;
326
+ declare const epistemicBeliefs_applyBeliefConfidenceChange: typeof applyBeliefConfidenceChange;
327
+ declare const epistemicBeliefs_archive: typeof archive;
328
+ declare const epistemicBeliefs_backfillBeliefSprintIds: typeof backfillBeliefSprintIds;
329
+ declare const epistemicBeliefs_backfillMandatoryPriors: typeof backfillMandatoryPriors;
330
+ declare const epistemicBeliefs_backfillScoredBeliefEdges: typeof backfillScoredBeliefEdges;
331
+ declare const epistemicBeliefs_backfillSyntheticOpinionHistory: typeof backfillSyntheticOpinionHistory;
332
+ declare const epistemicBeliefs_backfillTwoAxisConfidence: typeof backfillTwoAxisConfidence;
333
+ declare const epistemicBeliefs_batchUpdateCriticality: typeof batchUpdateCriticality;
334
+ declare const epistemicBeliefs_create: typeof create;
335
+ declare const epistemicBeliefs_deleteRelationship: typeof deleteRelationship;
336
+ declare const epistemicBeliefs_flattenBeliefNode: typeof flattenBeliefNode;
337
+ declare const epistemicBeliefs_forkBelief: typeof forkBelief;
338
+ declare const epistemicBeliefs_getBeliefClusterPositions: typeof getBeliefClusterPositions;
339
+ declare const epistemicBeliefs_getByCriticality: typeof getByCriticality;
340
+ declare const epistemicBeliefs_getById: typeof getById;
341
+ declare const epistemicBeliefs_getByIds: typeof getByIds;
342
+ declare const epistemicBeliefs_getByPillar: typeof getByPillar;
343
+ declare const epistemicBeliefs_getByProject: typeof getByProject;
344
+ declare const epistemicBeliefs_getByProjectSystem: typeof getByProjectSystem;
345
+ declare const epistemicBeliefs_getByTopic: typeof getByTopic;
346
+ declare const epistemicBeliefs_getByWorktree: typeof getByWorktree;
347
+ declare const epistemicBeliefs_getConfidenceHistory: typeof getConfidenceHistory;
348
+ declare const epistemicBeliefs_getCountByStatus: typeof getCountByStatus;
349
+ declare const epistemicBeliefs_getLineage: typeof getLineage;
350
+ declare const epistemicBeliefs_getRecentConfidenceChanges: typeof getRecentConfidenceChanges;
351
+ declare const epistemicBeliefs_getRelationships: typeof getRelationships;
352
+ declare const epistemicBeliefs_getUnanalyzed: typeof getUnanalyzed;
353
+ declare const epistemicBeliefs_getWithEvidence: typeof getWithEvidence;
354
+ declare const epistemicBeliefs_getWorktreeCluster: typeof getWorktreeCluster;
355
+ declare const epistemicBeliefs_internalCreate: typeof internalCreate;
356
+ declare const epistemicBeliefs_internalGetActive: typeof internalGetActive;
357
+ declare const epistemicBeliefs_internalGetById: typeof internalGetById;
358
+ declare const epistemicBeliefs_internalGetByProject: typeof internalGetByProject;
359
+ declare const epistemicBeliefs_internalGetByTopic: typeof internalGetByTopic;
360
+ declare const epistemicBeliefs_linkBeliefs: typeof linkBeliefs;
361
+ declare const epistemicBeliefs_linkEvidence: typeof linkEvidence;
362
+ declare const epistemicBeliefs_modulateConfidence: typeof modulateConfidence;
363
+ declare const epistemicBeliefs_propagateConfidenceChange: typeof propagateConfidenceChange;
364
+ declare const epistemicBeliefs_reassignBeliefsTopic: typeof reassignBeliefsTopic;
365
+ declare const epistemicBeliefs_refineBelief: typeof refineBelief;
366
+ declare const epistemicBeliefs_resolveBeliefWorktreeId: typeof resolveBeliefWorktreeId;
367
+ declare const epistemicBeliefs_unlinkEvidence: typeof unlinkEvidence;
368
+ declare const epistemicBeliefs_updateCriticality: typeof updateCriticality;
369
+ declare const epistemicBeliefs_updatePillar: typeof updatePillar;
370
+ declare const epistemicBeliefs_updateRationale: typeof updateRationale;
371
+ declare const epistemicBeliefs_updateStatus: typeof updateStatus;
372
+ declare const epistemicBeliefs_updateStatusInternal: typeof updateStatusInternal;
373
+ declare namespace epistemicBeliefs {
374
+ export { type epistemicBeliefs_BeliefConfidenceTrigger as BeliefConfidenceTrigger, epistemicBeliefs_applyBeliefConfidenceChange as applyBeliefConfidenceChange, epistemicBeliefs_archive as archive, epistemicBeliefs_backfillBeliefSprintIds as backfillBeliefSprintIds, epistemicBeliefs_backfillMandatoryPriors as backfillMandatoryPriors, epistemicBeliefs_backfillScoredBeliefEdges as backfillScoredBeliefEdges, epistemicBeliefs_backfillSyntheticOpinionHistory as backfillSyntheticOpinionHistory, epistemicBeliefs_backfillTwoAxisConfidence as backfillTwoAxisConfidence, epistemicBeliefs_batchUpdateCriticality as batchUpdateCriticality, epistemicBeliefs_create as create, epistemicBeliefs_deleteRelationship as deleteRelationship, epistemicBeliefs_flattenBeliefNode as flattenBeliefNode, epistemicBeliefs_forkBelief as forkBelief, epistemicBeliefs_getBeliefClusterPositions as getBeliefClusterPositions, epistemicBeliefs_getByCriticality as getByCriticality, epistemicBeliefs_getById as getById, epistemicBeliefs_getByIds as getByIds, epistemicBeliefs_getByPillar as getByPillar, epistemicBeliefs_getByProject as getByProject, epistemicBeliefs_getByProjectSystem as getByProjectSystem, epistemicBeliefs_getByTopic as getByTopic, epistemicBeliefs_getByWorktree as getByWorktree, epistemicBeliefs_getConfidenceHistory as getConfidenceHistory, epistemicBeliefs_getCountByStatus as getCountByStatus, epistemicBeliefs_getLineage as getLineage, epistemicBeliefs_getRecentConfidenceChanges as getRecentConfidenceChanges, epistemicBeliefs_getRelationships as getRelationships, epistemicBeliefs_getUnanalyzed as getUnanalyzed, epistemicBeliefs_getWithEvidence as getWithEvidence, epistemicBeliefs_getWorktreeCluster as getWorktreeCluster, epistemicBeliefs_internalCreate as internalCreate, epistemicBeliefs_internalGetActive as internalGetActive, epistemicBeliefs_internalGetById as internalGetById, epistemicBeliefs_internalGetByProject as internalGetByProject, epistemicBeliefs_internalGetByTopic as internalGetByTopic, epistemicBeliefs_linkBeliefs as linkBeliefs, epistemicBeliefs_linkEvidence as linkEvidence, epistemicBeliefs_modulateConfidence as modulateConfidence, epistemicBeliefs_propagateConfidenceChange as propagateConfidenceChange, epistemicBeliefs_reassignBeliefsTopic as reassignBeliefsTopic, epistemicBeliefs_refineBelief as refineBelief, epistemicBeliefs_resolveBeliefWorktreeId as resolveBeliefWorktreeId, epistemicBeliefs_unlinkEvidence as unlinkEvidence, epistemicBeliefs_updateCriticality as updateCriticality, epistemicBeliefs_updatePillar as updatePillar, epistemicBeliefs_updateRationale as updateRationale, epistemicBeliefs_updateStatus as updateStatus, epistemicBeliefs_updateStatusInternal as updateStatusInternal };
375
+ }
376
+
377
+ export { getRelationships as A, type BeliefConfidenceTrigger as B, deleteRelationship as C, updateCriticality as D, batchUpdateCriticality as E, getByCriticality as F, getUnanalyzed as G, getByProjectSystem as H, getByPillar as I, getWorktreeCluster as J, internalGetByProject as K, internalGetByTopic as L, internalGetActive as M, internalGetById as N, internalCreate as O, getRecentConfidenceChanges as P, backfillSyntheticOpinionHistory as Q, backfillMandatoryPriors as R, backfillTwoAxisConfidence as S, backfillScoredBeliefEdges as T, backfillBeliefSprintIds as U, getBeliefClusterPositions as V, reassignBeliefsTopic as W, applyBeliefConfidenceChange as a, refineBelief as b, create as c, getByProject as d, epistemicBeliefs as e, flattenBeliefNode as f, getById as g, getByTopic as h, forkBelief as i, archive as j, updateRationale as k, updateStatusInternal as l, modulateConfidence as m, getConfidenceHistory as n, getLineage as o, propagateConfidenceChange as p, getByIds as q, resolveBeliefWorktreeId as r, getByWorktree as s, updatePillar as t, updateStatus as u, getCountByStatus as v, linkBeliefs as w, linkEvidence as x, unlinkEvidence as y, getWithEvidence as z };
@@ -0,0 +1,5 @@
1
+ import '@lucern/confidence';
2
+ import './beliefLifecycle-C-AehZgF.js';
3
+ import './convex.js';
4
+ export { B as BeliefConfidenceTrigger, a as applyBeliefConfidenceChange, j as archive, U as backfillBeliefSprintIds, R as backfillMandatoryPriors, T as backfillScoredBeliefEdges, Q as backfillSyntheticOpinionHistory, S as backfillTwoAxisConfidence, E as batchUpdateCriticality, c as create, C as deleteRelationship, f as flattenBeliefNode, i as forkBelief, V as getBeliefClusterPositions, F as getByCriticality, g as getById, q as getByIds, I as getByPillar, d as getByProject, H as getByProjectSystem, h as getByTopic, s as getByWorktree, n as getConfidenceHistory, v as getCountByStatus, o as getLineage, P as getRecentConfidenceChanges, A as getRelationships, G as getUnanalyzed, z as getWithEvidence, J as getWorktreeCluster, O as internalCreate, M as internalGetActive, N as internalGetById, K as internalGetByProject, L as internalGetByTopic, w as linkBeliefs, x as linkEvidence, m as modulateConfidence, p as propagateConfidenceChange, W as reassignBeliefsTopic, b as refineBelief, r as resolveBeliefWorktreeId, y as unlinkEvidence, D as updateCriticality, t as updatePillar, k as updateRationale, u as updateStatus, l as updateStatusInternal } from './epistemicBeliefs-DtFVTp-k.js';
5
+ import 'convex/values';