@lucern/graph-primitives 0.3.0-alpha.17 → 0.3.0-alpha.3

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 (123) hide show
  1. package/dist/{beliefDecay-DZ6tkLYq.d.ts → beliefDecay-Q_26RTc-.d.ts} +1 -1
  2. package/dist/beliefDecay.d.ts +1 -1
  3. package/dist/beliefDecay.js +47 -158
  4. package/dist/beliefDecay.js.map +1 -1
  5. package/dist/{beliefEvidenceLinks-CWOXxxJg.d.ts → beliefEvidenceLinks-42FlR48t.d.ts} +1 -1
  6. package/dist/beliefEvidenceLinks.d.ts +1 -1
  7. package/dist/beliefEvidenceLinks.js +45 -141
  8. package/dist/beliefEvidenceLinks.js.map +1 -1
  9. package/dist/{beliefLifecycle-y8WLXqQj.d.ts → beliefLifecycle-C-AehZgF.d.ts} +1 -1
  10. package/dist/beliefLifecycle.d.ts +1 -1
  11. package/dist/confidencePropagationDispatch.d.ts +1 -1
  12. package/dist/confidencePropagationDispatch.js +3 -1
  13. package/dist/confidencePropagationDispatch.js.map +1 -1
  14. package/dist/{contradictions-51VLsESq.d.ts → contradictions-Hdwl7zid.d.ts} +1 -1
  15. package/dist/contradictions.d.ts +1 -1
  16. package/dist/contradictions.js +8 -67
  17. package/dist/contradictions.js.map +1 -1
  18. package/dist/edges/contradicts.js.map +1 -1
  19. package/dist/edges/dependsOn.js.map +1 -1
  20. package/dist/edges/elaborates.js.map +1 -1
  21. package/dist/edges/index.js +3 -1
  22. package/dist/edges/index.js.map +1 -1
  23. package/dist/edges/informs.js +3 -1
  24. package/dist/edges/informs.js.map +1 -1
  25. package/dist/edges/refutes.js +3 -1
  26. package/dist/edges/refutes.js.map +1 -1
  27. package/dist/edges/supports.js.map +1 -1
  28. package/dist/edges/utils.d.ts +3 -3
  29. package/dist/edges/utils.js +4 -2
  30. package/dist/edges/utils.js.map +1 -1
  31. package/dist/embeddingTrigger.js +1 -21
  32. package/dist/embeddingTrigger.js.map +1 -1
  33. package/dist/entityBridge.js +1 -1
  34. package/dist/entityBridge.js.map +1 -1
  35. package/dist/{entityLifecycle-CvgSK5FV.d.ts → entityLifecycle-BkhRJ-XI.d.ts} +1 -1
  36. package/dist/entityLifecycle.d.ts +1 -1
  37. package/dist/entityLifecycle.js +47 -134
  38. package/dist/entityLifecycle.js.map +1 -1
  39. package/dist/{epistemicAnswers-C5ib4z6_.d.ts → epistemicAnswers-DSP1slZ9.d.ts} +1 -1
  40. package/dist/epistemicAnswers.d.ts +1 -1
  41. package/dist/epistemicAnswers.js +8 -67
  42. package/dist/epistemicAnswers.js.map +1 -1
  43. package/dist/{epistemicBeliefs-DzKjZAeC.d.ts → epistemicBeliefs-DtFVTp-k.d.ts} +3 -3
  44. package/dist/epistemicBeliefs.d.ts +2 -2
  45. package/dist/epistemicBeliefs.js +114 -289
  46. package/dist/epistemicBeliefs.js.map +1 -1
  47. package/dist/epistemicContracts.d.ts +1 -1
  48. package/dist/epistemicContracts.js +115 -297
  49. package/dist/epistemicContracts.js.map +1 -1
  50. package/dist/{epistemicEdges-CvlKnEyy.d.ts → epistemicEdges-DcA8ErUG.d.ts} +1 -1
  51. package/dist/epistemicEdges.d.ts +1 -1
  52. package/dist/epistemicEdges.js +60 -192
  53. package/dist/epistemicEdges.js.map +1 -1
  54. package/dist/{epistemicEvidence-xw6UUrwh.d.ts → epistemicEvidence-Bo638XDP.d.ts} +1 -1
  55. package/dist/epistemicEvidence.d.ts +1 -1
  56. package/dist/epistemicEvidence.js +49 -163
  57. package/dist/epistemicEvidence.js.map +1 -1
  58. package/dist/{epistemicHelpers-DevrYgPN.d.ts → epistemicHelpers-Bd9xbaib.d.ts} +1 -1
  59. package/dist/epistemicHelpers.d.ts +1 -1
  60. package/dist/{epistemicLinking-CfE00tHJ.d.ts → epistemicLinking-CyeLOIzN.d.ts} +1 -1
  61. package/dist/epistemicLinking.d.ts +1 -1
  62. package/dist/epistemicLinking.js +1 -1
  63. package/dist/{epistemicNodes-DjSUfvyD.d.ts → epistemicNodes-BpD6Koud.d.ts} +1 -1
  64. package/dist/epistemicNodes.d.ts +1 -1
  65. package/dist/epistemicNodes.js +33 -163
  66. package/dist/epistemicNodes.js.map +1 -1
  67. package/dist/{epistemicQuestions-B_nUclrH.d.ts → epistemicQuestions-CmEeY6zQ.d.ts} +1 -1
  68. package/dist/epistemicQuestions.d.ts +1 -1
  69. package/dist/epistemicQuestions.js +62 -311
  70. package/dist/epistemicQuestions.js.map +1 -1
  71. package/dist/{epistemicSources-dlKj58Jp.d.ts → epistemicSources-ZazxHOK1.d.ts} +1 -1
  72. package/dist/epistemicSources.d.ts +1 -1
  73. package/dist/epistemicSources.js +8 -65
  74. package/dist/epistemicSources.js.map +1 -1
  75. package/dist/evaluators/index.js +115 -297
  76. package/dist/evaluators/index.js.map +1 -1
  77. package/dist/evaluators/lintCheckerEvaluator.js.map +1 -1
  78. package/dist/evaluators/sentryCheckerEvaluator.js.map +1 -1
  79. package/dist/evaluators/shared.js +1 -20
  80. package/dist/evaluators/shared.js.map +1 -1
  81. package/dist/evaluators/testRunnerEvaluator.js +1 -20
  82. package/dist/evaluators/testRunnerEvaluator.js.map +1 -1
  83. package/dist/evaluators/tscCheckerEvaluator.js.map +1 -1
  84. package/dist/index.d.ts +20 -20
  85. package/dist/index.js +206 -729
  86. package/dist/index.js.map +1 -1
  87. package/dist/{ontology-matching-C6rrz2VP.d.ts → ontology-matching-Buhu23ss.d.ts} +1 -1
  88. package/dist/ontology-matching.d.ts +1 -1
  89. package/dist/{ontologyApproval-CFYmqKmk.d.ts → ontologyApproval-Ba0Jjk1k.d.ts} +1 -1
  90. package/dist/ontologyApproval.d.ts +1 -1
  91. package/dist/ontologyDefinitions.js +3 -4
  92. package/dist/ontologyDefinitions.js.map +1 -1
  93. package/dist/ontologyHelpers.d.ts +1 -1
  94. package/dist/ontologyHelpers.js +3 -4
  95. package/dist/ontologyHelpers.js.map +1 -1
  96. package/dist/{projectionReconciliation-jww2fBI0.d.ts → projectionReconciliation-CxrXYGaB.d.ts} +1 -1
  97. package/dist/projectionReconciliation.d.ts +1 -1
  98. package/dist/projectionReconciliation.js +20 -14
  99. package/dist/projectionReconciliation.js.map +1 -1
  100. package/dist/{projectionStaleness-CmdbpjVK.d.ts → projectionStaleness-CAdpIsaW.d.ts} +1 -1
  101. package/dist/projectionStaleness.d.ts +1 -1
  102. package/dist/{questionEvidenceLinks-DFlyPpAj.d.ts → questionEvidenceLinks-BdQD0TkM.d.ts} +1 -1
  103. package/dist/questionEvidenceLinks.d.ts +1 -1
  104. package/dist/questionEvidenceLinks.js +45 -144
  105. package/dist/questionEvidenceLinks.js.map +1 -1
  106. package/dist/resolvers.js +37 -86
  107. package/dist/resolvers.js.map +1 -1
  108. package/dist/scopeResolverCompat.js +7 -64
  109. package/dist/scopeResolverCompat.js.map +1 -1
  110. package/dist/{text-matching-DNg4M5Wd.d.ts → text-matching-CMn2WnVD.d.ts} +1 -1
  111. package/dist/text-matching.d.ts +1 -1
  112. package/dist/topicProjectOverlay.js +13 -56
  113. package/dist/topicProjectOverlay.js.map +1 -1
  114. package/dist/topicScope.js +6 -55
  115. package/dist/topicScope.js.map +1 -1
  116. package/dist/workflowBridge.js +6 -55
  117. package/dist/workflowBridge.js.map +1 -1
  118. package/dist/workspaceIsolation.js +6 -55
  119. package/dist/workspaceIsolation.js.map +1 -1
  120. package/package.json +5 -5
  121. package/dist/debug.d.ts +0 -4
  122. package/dist/debug.js +0 -34
  123. package/dist/debug.js.map +0 -1
@@ -125,4 +125,4 @@ declare namespace epistemicEvidence {
125
125
  export { epistemicEvidence_create as create, epistemicEvidence_createAndLink as createAndLink, epistemicEvidence_flagAsIncorrect as flagAsIncorrect, epistemicEvidence_flattenEvidenceNode as flattenEvidenceNode, epistemicEvidence_getById as getById, epistemicEvidence_getByProject as getByProject, epistemicEvidence_getByProjectSystem as getByProjectSystem, epistemicEvidence_getByTopic as getByTopic, epistemicEvidence_getEvidenceBalance as getEvidenceBalance, epistemicEvidence_getForBelief as getForBelief, epistemicEvidence_internalCreate as internalCreate, epistemicEvidence_internalGetByProject as internalGetByProject, epistemicEvidence_internalGetByTopic as internalGetByTopic, epistemicEvidence_remove as remove, epistemicEvidence_resolveEvidenceLinkedWorktreeId as resolveEvidenceLinkedWorktreeId, epistemicEvidence_update as update, epistemicEvidence_updateStatus as updateStatus, epistemicEvidence_updateVerificationStatus as updateVerificationStatus };
126
126
  }
127
127
 
128
- export { createAndLink as a, flattenEvidenceNode as b, create as c, getByProject as d, epistemicEvidence as e, flagAsIncorrect as f, getById as g, getByProjectSystem as h, getByTopic as i, getEvidenceBalance as j, getForBelief as k, internalCreate as l, internalGetByProject as m, internalGetByTopic as n, resolveEvidenceLinkedWorktreeId as o, updateStatus as p, updateVerificationStatus as q, remove as r, update as u };
128
+ export { createAndLink as a, getByProject as b, create as c, getByTopic as d, epistemicEvidence as e, flattenEvidenceNode as f, getById as g, getForBelief as h, internalGetByProject as i, internalGetByTopic as j, internalCreate as k, updateVerificationStatus as l, getByProjectSystem as m, getEvidenceBalance as n, update as o, flagAsIncorrect as p, remove as q, resolveEvidenceLinkedWorktreeId as r, updateStatus as u };
@@ -1,3 +1,3 @@
1
1
  import './convex.js';
2
- export { c as create, a as createAndLink, f as flagAsIncorrect, b as flattenEvidenceNode, g as getById, d as getByProject, h as getByProjectSystem, i as getByTopic, j as getEvidenceBalance, k as getForBelief, l as internalCreate, m as internalGetByProject, n as internalGetByTopic, r as remove, o as resolveEvidenceLinkedWorktreeId, u as update, p as updateStatus, q as updateVerificationStatus } from './epistemicEvidence-xw6UUrwh.js';
2
+ export { c as create, a as createAndLink, p as flagAsIncorrect, f as flattenEvidenceNode, g as getById, b as getByProject, m as getByProjectSystem, d as getByTopic, n as getEvidenceBalance, h as getForBelief, k as internalCreate, i as internalGetByProject, j as internalGetByTopic, q as remove, r as resolveEvidenceLinkedWorktreeId, o as update, u as updateStatus, l as updateVerificationStatus } from './epistemicEvidence-Bo638XDP.js';
3
3
  import 'convex/values';
@@ -3,7 +3,7 @@ import { requireProjectAccess, checkScopeAccess, checkProjectAccess } from '@luc
3
3
  import { canAudienceClassAccess, normalizeAudienceKey, classFromAudienceKey } from '@lucern/access-control/audience';
4
4
  import { listAudienceRegistryRows } from '@lucern/access-control/audienceRegistry';
5
5
  import { permissiveReturn } from '@lucern/contracts/schema-helpers/validators';
6
- import { componentsGeneric, anyApi, mutationGeneric, queryGeneric, internalQueryGeneric, internalMutationGeneric } from 'convex/server';
6
+ import { componentsGeneric, mutationGeneric, anyApi, queryGeneric, internalQueryGeneric, internalMutationGeneric } from 'convex/server';
7
7
  import { isNodeType, getLayerForNodeType } from '@lucern/contracts/schema-helpers/spine/tables/epistemicNodes';
8
8
 
9
9
  // src/epistemicEvidence.ts
@@ -15,18 +15,6 @@ var internalQuery = internalQueryGeneric;
15
15
  var mutation = mutationGeneric;
16
16
  var query = queryGeneric;
17
17
 
18
- // src/debug.ts
19
- function isGraphPrimitiveDebugEnabled() {
20
- const env = globalThis.process?.env;
21
- return env?.LUCERN_COMPAT_FALLBACK_DEBUG === "1" || env?.LUCERN_GRAPH_DEBUG === "1";
22
- }
23
- function debugGraphPrimitiveFallback(message, context) {
24
- if (!isGraphPrimitiveDebugEnabled()) {
25
- return;
26
- }
27
- console.debug(message, context ?? {});
28
- }
29
-
30
18
  // src/embeddingTrigger.ts
31
19
  async function scheduleEmbeddingGeneration(args) {
32
20
  try {
@@ -44,15 +32,7 @@ async function scheduleEmbeddingGeneration(args) {
44
32
  confidence: args.confidence
45
33
  }
46
34
  );
47
- } catch (error) {
48
- debugGraphPrimitiveFallback(
49
- "[embeddingTrigger] Failed to schedule embedding generation",
50
- {
51
- error,
52
- nodeId: String(args.nodeId),
53
- nodeType: args.nodeType
54
- }
55
- );
35
+ } catch {
56
36
  }
57
37
  }
58
38
 
@@ -113,37 +93,19 @@ function isProjectLikeTopic(topic) {
113
93
  return topic.type === "theme" || topic.type === "thematic" || topic.type === "deal" || topic.type === "monitoring" || readLegacyProjectId(topic) !== void 0 || readNonEmptyString(metadata.projectType) !== void 0;
114
94
  }
115
95
  function isMissingLucernChildComponentError(error) {
116
- const message = getErrorMessage(error);
96
+ const message = error instanceof Error ? error.message : String(error);
117
97
  return message.includes(
118
98
  'Child component ComponentName(Identifier("lucern")) not found'
119
99
  ) || message.includes("Child component") && message.includes("lucern") && message.includes("not found");
120
100
  }
121
- function getErrorMessage(error) {
122
- if (error instanceof Error) {
123
- return error.message;
124
- }
125
- if (typeof error === "object" && error !== null && "message" in error && typeof error.message === "string") {
126
- return error.message;
127
- }
128
- return "unknown error";
129
- }
130
101
  async function resolveTopicDoc(ctx, scopeId) {
131
102
  if (ctx?.db && typeof ctx.db.get === "function") {
132
103
  try {
133
- const directTopic = await ctx.db.get(
134
- scopeId
135
- );
104
+ const directTopic = await ctx.db.get(scopeId);
136
105
  if (directTopic) {
137
106
  return directTopic;
138
107
  }
139
- } catch (error) {
140
- debugGraphPrimitiveFallback(
141
- "[topicProjectOverlay] Failed to resolve topic by direct ID",
142
- {
143
- error,
144
- scopeId
145
- }
146
- );
108
+ } catch {
147
109
  }
148
110
  }
149
111
  if (typeof ctx.runQuery !== "function") {
@@ -156,14 +118,7 @@ async function resolveTopicDoc(ctx, scopeId) {
156
118
  if (topic?.name !== void 0 && topic?.type !== void 0) {
157
119
  return topic;
158
120
  }
159
- } catch (error) {
160
- debugGraphPrimitiveFallback(
161
- "[topicProjectOverlay] Failed to resolve topic by ID query",
162
- {
163
- error,
164
- scopeId
165
- }
166
- );
121
+ } catch {
167
122
  }
168
123
  try {
169
124
  const topic = await ctx.runQuery(api.topics.getByLegacyScopeId, {
@@ -172,11 +127,7 @@ async function resolveTopicDoc(ctx, scopeId) {
172
127
  if (topic?.name !== void 0 && topic?.type !== void 0) {
173
128
  return topic;
174
129
  }
175
- } catch (error) {
176
- debugGraphPrimitiveFallback(
177
- "[topicProjectOverlay] Failed to resolve topic by legacy scope ID",
178
- { error, scopeId }
179
- );
130
+ } catch {
180
131
  }
181
132
  return null;
182
133
  }
@@ -230,11 +181,7 @@ async function listTopicProjectOverlays(ctx, options = {}) {
230
181
  if (ctx?.db?.query && typeof ctx.db.query === "function") {
231
182
  try {
232
183
  allTopics = await ctx.db.query("topics").collect();
233
- } catch (error) {
234
- debugGraphPrimitiveFallback(
235
- "[topicProjectOverlay] Failed to read topics table; falling back to API",
236
- { error }
237
- );
184
+ } catch {
238
185
  allTopics = [];
239
186
  }
240
187
  }
@@ -329,28 +276,19 @@ async function patchTopicProjectOverlay(ctx, scopeId, value) {
329
276
  "Cannot patch topic without component adapter (ctx.runMutation unavailable)"
330
277
  );
331
278
  }
332
- return materializeTopicProjectOverlay({
333
- ...topic,
334
- ...patch,
335
- metadata: nextMetadata
336
- });
279
+ return materializeTopicProjectOverlay(
280
+ {
281
+ ...topic,
282
+ ...patch,
283
+ metadata: nextMetadata
284
+ }
285
+ );
337
286
  }
338
287
 
339
288
  // src/resolvers.ts
340
289
  function isMissingLucernChildComponentError2(error) {
341
- const message = getErrorMessage2(error);
342
- return message.includes(
343
- 'Child component ComponentName(Identifier("lucern")) not found'
344
- ) || message.includes("Child component") && message.includes("lucern") && message.includes("not found");
345
- }
346
- function getErrorMessage2(error) {
347
- if (error instanceof Error) {
348
- return error.message;
349
- }
350
- if (typeof error === "object" && error !== null && "message" in error && typeof error.message === "string") {
351
- return error.message;
352
- }
353
- return "unknown error";
290
+ const message = error instanceof Error ? error.message : String(error);
291
+ return message.includes('Child component ComponentName(Identifier("lucern")) not found') || message.includes("Child component") && message.includes("lucern") && message.includes("not found");
354
292
  }
355
293
  function isAdvisoryTopicPatch(value) {
356
294
  const advisoryKeys = /* @__PURE__ */ new Set(["lastActivityAt", "updatedAt"]);
@@ -364,27 +302,32 @@ async function patchProjectWithTolerance(ctx, projectId, value) {
364
302
  if (!isAdvisoryTopicPatch(value) || !isMissingLucernChildComponentError2(error)) {
365
303
  throw error;
366
304
  }
367
- console.warn(
368
- "[lucern graph-primitives] Non-fatal advisory topic patch failure",
369
- {
370
- projectId,
371
- keys: Object.keys(value),
372
- error: getErrorMessage2(error)
373
- }
374
- );
305
+ console.warn("[lucern graph-primitives] Non-fatal advisory topic patch failure", {
306
+ projectId,
307
+ keys: Object.keys(value),
308
+ error: error instanceof Error ? error.message : error
309
+ });
375
310
  }
376
311
  }
377
312
  function defaultResolvers() {
378
313
  return {
379
- getProject: (ctx, projectId) => resolveTopicProjectOverlay(ctx, projectId, {
380
- idMode: "legacy",
381
- projectLikeOnly: false
382
- }),
383
- patchProject: (ctx, projectId, value) => patchProjectWithTolerance(ctx, projectId, value),
384
- listTopics: (ctx) => listTopicProjectOverlays(ctx, {
385
- idMode: "legacy"
386
- }),
387
- getFinalArtifact: (ctx, artifactId) => ctx.db.get(artifactId)
314
+ async getProject(ctx, projectId) {
315
+ return await resolveTopicProjectOverlay(ctx, projectId, {
316
+ idMode: "legacy",
317
+ projectLikeOnly: false
318
+ });
319
+ },
320
+ async patchProject(ctx, projectId, value) {
321
+ await patchProjectWithTolerance(ctx, projectId, value);
322
+ },
323
+ async listTopics(ctx) {
324
+ return await listTopicProjectOverlays(ctx, {
325
+ idMode: "legacy"
326
+ });
327
+ },
328
+ async getFinalArtifact(ctx, artifactId) {
329
+ return await ctx.db.get(artifactId);
330
+ }
388
331
  };
389
332
  }
390
333
  var resolverOverrides = {};
@@ -435,14 +378,7 @@ async function findTopicsByScopeAlias(ctx, scopeId) {
435
378
  "by_graph_scope_project",
436
379
  (q) => q.eq(LEGACY_SCOPE_FIELD2, scopeId)
437
380
  ).collect();
438
- } catch (error) {
439
- debugGraphPrimitiveFallback(
440
- "[topicScope] Failed to resolve scope alias via index",
441
- {
442
- error,
443
- scopeId
444
- }
445
- );
381
+ } catch {
446
382
  const topics = await ctx.db.query("topics").collect();
447
383
  return topics.filter((topic) => {
448
384
  const normalizedGlobalId = normalizeScopeValue(topic.globalId);
@@ -459,14 +395,7 @@ async function tryResolveHostTopicById(ctx, topicId) {
459
395
  return await ctx.runQuery(api.topics.get, {
460
396
  id: topicId
461
397
  }) ?? null;
462
- } catch (error) {
463
- debugGraphPrimitiveFallback(
464
- "[topicScope] Failed to resolve topic by host query",
465
- {
466
- error,
467
- topicId
468
- }
469
- );
398
+ } catch {
470
399
  return null;
471
400
  }
472
401
  }
@@ -478,14 +407,7 @@ async function tryResolveHostTopicByLegacyScope(ctx, legacyScopeId) {
478
407
  return await ctx.runQuery(api.topics.getByLegacyScopeId, {
479
408
  projectId: legacyScopeId
480
409
  }) ?? null;
481
- } catch (error) {
482
- debugGraphPrimitiveFallback(
483
- "[topicScope] Failed to resolve topic by legacy scope",
484
- {
485
- error,
486
- legacyScopeId
487
- }
488
- );
410
+ } catch {
489
411
  return null;
490
412
  }
491
413
  }
@@ -514,17 +436,8 @@ async function resolveTopicProjectScope(ctx, args) {
514
436
  if (args.topicId) {
515
437
  let topic = null;
516
438
  try {
517
- topic = await ctx.db.get(
518
- args.topicId
519
- );
520
- } catch (error) {
521
- debugGraphPrimitiveFallback(
522
- "[topicScope] Failed to load topic by direct id",
523
- {
524
- error,
525
- topicId: args.topicId
526
- }
527
- );
439
+ topic = await ctx.db.get(args.topicId);
440
+ } catch {
528
441
  }
529
442
  if (!topic) {
530
443
  topic = await tryResolveHostTopicById(ctx, String(args.topicId));
@@ -561,14 +474,7 @@ async function resolveTopicProjectScope(ctx, args) {
561
474
  directTopic = await ctx.db.get(
562
475
  args.projectId
563
476
  );
564
- } catch (error) {
565
- debugGraphPrimitiveFallback(
566
- "[topicScope] Failed to load direct project topic",
567
- {
568
- error,
569
- projectId: args.projectId
570
- }
571
- );
477
+ } catch {
572
478
  }
573
479
  if (directTopic) {
574
480
  const inherited = await resolveInheritedWorkspaceScope(ctx, directTopic);
@@ -819,15 +725,7 @@ async function resolveEvidenceScopeOrNull(ctx, args) {
819
725
  projectId: args.projectId ?? void 0,
820
726
  topicId: args.topicId ?? void 0
821
727
  });
822
- } catch (error) {
823
- debugGraphPrimitiveFallback(
824
- "[epistemicEvidence] Failed to resolve evidence scope",
825
- {
826
- error,
827
- projectId: args.projectId,
828
- topicId: args.topicId
829
- }
830
- );
728
+ } catch {
831
729
  return null;
832
730
  }
833
731
  }
@@ -1203,15 +1101,7 @@ var getByProject = query({
1203
1101
  projectId: args.projectId,
1204
1102
  topicId: args.topicId
1205
1103
  });
1206
- } catch (error) {
1207
- debugGraphPrimitiveFallback(
1208
- "[epistemicEvidence] Failed to resolve getByProject scope",
1209
- {
1210
- error,
1211
- projectId: args.projectId,
1212
- topicId: args.topicId
1213
- }
1214
- );
1104
+ } catch {
1215
1105
  return [];
1216
1106
  }
1217
1107
  if (args.userId) {
@@ -1246,9 +1136,7 @@ var getByTopic = query({
1246
1136
  handler: async (ctx, args) => {
1247
1137
  const pageSize = clampEvidenceLimit(args.limit);
1248
1138
  const scanLimit = Math.min(pageSize * 3, MAX_EVIDENCE_PAGE_SIZE);
1249
- const scope = await resolveTopicProjectScope(ctx, {
1250
- topicId: args.topicId
1251
- });
1139
+ const scope = await resolveTopicProjectScope(ctx, { topicId: args.topicId });
1252
1140
  const topicNodes = await ctx.db.query("epistemicNodes").withIndex(
1253
1141
  "by_topic_type",
1254
1142
  (q) => q.eq("topicId", scope.topicId).eq("nodeType", "evidence")
@@ -1358,9 +1246,7 @@ var internalGetByTopic = internalQuery({
1358
1246
  const pageSize = clampEvidenceLimit(args.limit, 500);
1359
1247
  const scanLimit = Math.min(pageSize * 3, MAX_EVIDENCE_PAGE_SIZE);
1360
1248
  const audienceMode = args.audienceMode ?? "internal";
1361
- const scope = await resolveTopicProjectScope(ctx, {
1362
- topicId: args.topicId
1363
- });
1249
+ const scope = await resolveTopicProjectScope(ctx, { topicId: args.topicId });
1364
1250
  const registryRows = await listAudienceRegistryRows(ctx, {
1365
1251
  tenantId: scope.tenantId,
1366
1252
  workspaceId: scope.workspaceId