@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.
- package/dist/{beliefDecay-DZ6tkLYq.d.ts → beliefDecay-Q_26RTc-.d.ts} +1 -1
- package/dist/beliefDecay.d.ts +1 -1
- package/dist/beliefDecay.js +47 -158
- package/dist/beliefDecay.js.map +1 -1
- package/dist/{beliefEvidenceLinks-CWOXxxJg.d.ts → beliefEvidenceLinks-42FlR48t.d.ts} +1 -1
- package/dist/beliefEvidenceLinks.d.ts +1 -1
- package/dist/beliefEvidenceLinks.js +45 -141
- package/dist/beliefEvidenceLinks.js.map +1 -1
- package/dist/{beliefLifecycle-y8WLXqQj.d.ts → beliefLifecycle-C-AehZgF.d.ts} +1 -1
- package/dist/beliefLifecycle.d.ts +1 -1
- package/dist/confidencePropagationDispatch.d.ts +1 -1
- package/dist/confidencePropagationDispatch.js +3 -1
- package/dist/confidencePropagationDispatch.js.map +1 -1
- package/dist/{contradictions-51VLsESq.d.ts → contradictions-Hdwl7zid.d.ts} +1 -1
- package/dist/contradictions.d.ts +1 -1
- package/dist/contradictions.js +8 -67
- package/dist/contradictions.js.map +1 -1
- package/dist/edges/contradicts.js.map +1 -1
- package/dist/edges/dependsOn.js.map +1 -1
- package/dist/edges/elaborates.js.map +1 -1
- package/dist/edges/index.js +3 -1
- package/dist/edges/index.js.map +1 -1
- package/dist/edges/informs.js +3 -1
- package/dist/edges/informs.js.map +1 -1
- package/dist/edges/refutes.js +3 -1
- package/dist/edges/refutes.js.map +1 -1
- package/dist/edges/supports.js.map +1 -1
- package/dist/edges/utils.d.ts +3 -3
- package/dist/edges/utils.js +4 -2
- package/dist/edges/utils.js.map +1 -1
- package/dist/embeddingTrigger.js +1 -21
- package/dist/embeddingTrigger.js.map +1 -1
- package/dist/entityBridge.js +1 -1
- package/dist/entityBridge.js.map +1 -1
- package/dist/{entityLifecycle-CvgSK5FV.d.ts → entityLifecycle-BkhRJ-XI.d.ts} +1 -1
- package/dist/entityLifecycle.d.ts +1 -1
- package/dist/entityLifecycle.js +47 -134
- package/dist/entityLifecycle.js.map +1 -1
- package/dist/{epistemicAnswers-C5ib4z6_.d.ts → epistemicAnswers-DSP1slZ9.d.ts} +1 -1
- package/dist/epistemicAnswers.d.ts +1 -1
- package/dist/epistemicAnswers.js +8 -67
- package/dist/epistemicAnswers.js.map +1 -1
- package/dist/{epistemicBeliefs-DzKjZAeC.d.ts → epistemicBeliefs-DtFVTp-k.d.ts} +3 -3
- package/dist/epistemicBeliefs.d.ts +2 -2
- package/dist/epistemicBeliefs.js +114 -289
- package/dist/epistemicBeliefs.js.map +1 -1
- package/dist/epistemicContracts.d.ts +1 -1
- package/dist/epistemicContracts.js +115 -297
- package/dist/epistemicContracts.js.map +1 -1
- package/dist/{epistemicEdges-CvlKnEyy.d.ts → epistemicEdges-DcA8ErUG.d.ts} +1 -1
- package/dist/epistemicEdges.d.ts +1 -1
- package/dist/epistemicEdges.js +60 -192
- package/dist/epistemicEdges.js.map +1 -1
- package/dist/{epistemicEvidence-xw6UUrwh.d.ts → epistemicEvidence-Bo638XDP.d.ts} +1 -1
- package/dist/epistemicEvidence.d.ts +1 -1
- package/dist/epistemicEvidence.js +49 -163
- package/dist/epistemicEvidence.js.map +1 -1
- package/dist/{epistemicHelpers-DevrYgPN.d.ts → epistemicHelpers-Bd9xbaib.d.ts} +1 -1
- package/dist/epistemicHelpers.d.ts +1 -1
- package/dist/{epistemicLinking-CfE00tHJ.d.ts → epistemicLinking-CyeLOIzN.d.ts} +1 -1
- package/dist/epistemicLinking.d.ts +1 -1
- package/dist/epistemicLinking.js +1 -1
- package/dist/{epistemicNodes-DjSUfvyD.d.ts → epistemicNodes-BpD6Koud.d.ts} +1 -1
- package/dist/epistemicNodes.d.ts +1 -1
- package/dist/epistemicNodes.js +33 -163
- package/dist/epistemicNodes.js.map +1 -1
- package/dist/{epistemicQuestions-B_nUclrH.d.ts → epistemicQuestions-CmEeY6zQ.d.ts} +1 -1
- package/dist/epistemicQuestions.d.ts +1 -1
- package/dist/epistemicQuestions.js +62 -311
- package/dist/epistemicQuestions.js.map +1 -1
- package/dist/{epistemicSources-dlKj58Jp.d.ts → epistemicSources-ZazxHOK1.d.ts} +1 -1
- package/dist/epistemicSources.d.ts +1 -1
- package/dist/epistemicSources.js +8 -65
- package/dist/epistemicSources.js.map +1 -1
- package/dist/evaluators/index.js +115 -297
- package/dist/evaluators/index.js.map +1 -1
- package/dist/evaluators/lintCheckerEvaluator.js.map +1 -1
- package/dist/evaluators/sentryCheckerEvaluator.js.map +1 -1
- package/dist/evaluators/shared.js +1 -20
- package/dist/evaluators/shared.js.map +1 -1
- package/dist/evaluators/testRunnerEvaluator.js +1 -20
- package/dist/evaluators/testRunnerEvaluator.js.map +1 -1
- package/dist/evaluators/tscCheckerEvaluator.js.map +1 -1
- package/dist/index.d.ts +20 -20
- package/dist/index.js +206 -729
- package/dist/index.js.map +1 -1
- package/dist/{ontology-matching-C6rrz2VP.d.ts → ontology-matching-Buhu23ss.d.ts} +1 -1
- package/dist/ontology-matching.d.ts +1 -1
- package/dist/{ontologyApproval-CFYmqKmk.d.ts → ontologyApproval-Ba0Jjk1k.d.ts} +1 -1
- package/dist/ontologyApproval.d.ts +1 -1
- package/dist/ontologyDefinitions.js +3 -4
- package/dist/ontologyDefinitions.js.map +1 -1
- package/dist/ontologyHelpers.d.ts +1 -1
- package/dist/ontologyHelpers.js +3 -4
- package/dist/ontologyHelpers.js.map +1 -1
- package/dist/{projectionReconciliation-jww2fBI0.d.ts → projectionReconciliation-CxrXYGaB.d.ts} +1 -1
- package/dist/projectionReconciliation.d.ts +1 -1
- package/dist/projectionReconciliation.js +20 -14
- package/dist/projectionReconciliation.js.map +1 -1
- package/dist/{projectionStaleness-CmdbpjVK.d.ts → projectionStaleness-CAdpIsaW.d.ts} +1 -1
- package/dist/projectionStaleness.d.ts +1 -1
- package/dist/{questionEvidenceLinks-DFlyPpAj.d.ts → questionEvidenceLinks-BdQD0TkM.d.ts} +1 -1
- package/dist/questionEvidenceLinks.d.ts +1 -1
- package/dist/questionEvidenceLinks.js +45 -144
- package/dist/questionEvidenceLinks.js.map +1 -1
- package/dist/resolvers.js +37 -86
- package/dist/resolvers.js.map +1 -1
- package/dist/scopeResolverCompat.js +7 -64
- package/dist/scopeResolverCompat.js.map +1 -1
- package/dist/{text-matching-DNg4M5Wd.d.ts → text-matching-CMn2WnVD.d.ts} +1 -1
- package/dist/text-matching.d.ts +1 -1
- package/dist/topicProjectOverlay.js +13 -56
- package/dist/topicProjectOverlay.js.map +1 -1
- package/dist/topicScope.js +6 -55
- package/dist/topicScope.js.map +1 -1
- package/dist/workflowBridge.js +6 -55
- package/dist/workflowBridge.js.map +1 -1
- package/dist/workspaceIsolation.js +6 -55
- package/dist/workspaceIsolation.js.map +1 -1
- package/package.json +5 -5
- package/dist/debug.d.ts +0 -4
- package/dist/debug.js +0 -34
- package/dist/debug.js.map +0 -1
|
@@ -69,4 +69,4 @@ declare namespace beliefDecay {
|
|
|
69
69
|
export { beliefDecay_DEADLINE_URGENCY as DEADLINE_URGENCY, beliefDecay_DECAY_TIERS as DECAY_TIERS, beliefDecay_bayesianUpdate as bayesianUpdate, beliefDecay_computeBaseDecay as computeBaseDecay, beliefDecay_computeDeadlineUrgency as computeDeadlineUrgency, beliefDecay_computeEffectiveDecay as computeEffectiveDecay, beliefDecay_getBeliefDecayInfo as getBeliefDecayInfo, beliefDecay_getGlobalBeliefHealth as getGlobalBeliefHealth, beliefDecay_getRescoringSchedule as getRescoringSchedule, beliefDecay_identifyBeliefsNeedingRescore as identifyBeliefsNeedingRescore };
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export {
|
|
72
|
+
export { getBeliefDecayInfo as a, beliefDecay as b, getGlobalBeliefHealth as g, identifyBeliefsNeedingRescore as i };
|
package/dist/beliefDecay.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { DEADLINE_URGENCY, DECAY_TIERS, bayesianUpdate, computeBaseDecay, computeDeadlineUrgency, computeEffectiveDecay, getRescoringSchedule } from '@lucern/confidence';
|
|
2
|
-
export {
|
|
2
|
+
export { a as getBeliefDecayInfo, g as getGlobalBeliefHealth, i as identifyBeliefsNeedingRescore } from './beliefDecay-Q_26RTc-.js';
|
package/dist/beliefDecay.js
CHANGED
|
@@ -10,18 +10,6 @@ var api = anyApi;
|
|
|
10
10
|
componentsGeneric();
|
|
11
11
|
var query = queryGeneric;
|
|
12
12
|
|
|
13
|
-
// src/debug.ts
|
|
14
|
-
function isGraphPrimitiveDebugEnabled() {
|
|
15
|
-
const env = globalThis.process?.env;
|
|
16
|
-
return env?.LUCERN_COMPAT_FALLBACK_DEBUG === "1" || env?.LUCERN_GRAPH_DEBUG === "1";
|
|
17
|
-
}
|
|
18
|
-
function debugGraphPrimitiveFallback(message, context) {
|
|
19
|
-
if (!isGraphPrimitiveDebugEnabled()) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
console.debug(message, context ?? {});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
13
|
// src/topicProjectOverlay.ts
|
|
26
14
|
var LEGACY_SCOPE_FIELD = "graphScopeProjectId";
|
|
27
15
|
function readNonEmptyString(value) {
|
|
@@ -67,37 +55,19 @@ function isProjectLikeTopic(topic) {
|
|
|
67
55
|
return topic.type === "theme" || topic.type === "thematic" || topic.type === "deal" || topic.type === "monitoring" || readLegacyProjectId(topic) !== void 0 || readNonEmptyString(metadata.projectType) !== void 0;
|
|
68
56
|
}
|
|
69
57
|
function isMissingLucernChildComponentError(error) {
|
|
70
|
-
const message =
|
|
58
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
71
59
|
return message.includes(
|
|
72
60
|
'Child component ComponentName(Identifier("lucern")) not found'
|
|
73
61
|
) || message.includes("Child component") && message.includes("lucern") && message.includes("not found");
|
|
74
62
|
}
|
|
75
|
-
function getErrorMessage(error) {
|
|
76
|
-
if (error instanceof Error) {
|
|
77
|
-
return error.message;
|
|
78
|
-
}
|
|
79
|
-
if (typeof error === "object" && error !== null && "message" in error && typeof error.message === "string") {
|
|
80
|
-
return error.message;
|
|
81
|
-
}
|
|
82
|
-
return "unknown error";
|
|
83
|
-
}
|
|
84
63
|
async function resolveTopicDoc(ctx, scopeId) {
|
|
85
64
|
if (ctx?.db && typeof ctx.db.get === "function") {
|
|
86
65
|
try {
|
|
87
|
-
const directTopic = await ctx.db.get(
|
|
88
|
-
scopeId
|
|
89
|
-
);
|
|
66
|
+
const directTopic = await ctx.db.get(scopeId);
|
|
90
67
|
if (directTopic) {
|
|
91
68
|
return directTopic;
|
|
92
69
|
}
|
|
93
|
-
} catch
|
|
94
|
-
debugGraphPrimitiveFallback(
|
|
95
|
-
"[topicProjectOverlay] Failed to resolve topic by direct ID",
|
|
96
|
-
{
|
|
97
|
-
error,
|
|
98
|
-
scopeId
|
|
99
|
-
}
|
|
100
|
-
);
|
|
70
|
+
} catch {
|
|
101
71
|
}
|
|
102
72
|
}
|
|
103
73
|
if (typeof ctx.runQuery !== "function") {
|
|
@@ -110,14 +80,7 @@ async function resolveTopicDoc(ctx, scopeId) {
|
|
|
110
80
|
if (topic?.name !== void 0 && topic?.type !== void 0) {
|
|
111
81
|
return topic;
|
|
112
82
|
}
|
|
113
|
-
} catch
|
|
114
|
-
debugGraphPrimitiveFallback(
|
|
115
|
-
"[topicProjectOverlay] Failed to resolve topic by ID query",
|
|
116
|
-
{
|
|
117
|
-
error,
|
|
118
|
-
scopeId
|
|
119
|
-
}
|
|
120
|
-
);
|
|
83
|
+
} catch {
|
|
121
84
|
}
|
|
122
85
|
try {
|
|
123
86
|
const topic = await ctx.runQuery(api.topics.getByLegacyScopeId, {
|
|
@@ -126,11 +89,7 @@ async function resolveTopicDoc(ctx, scopeId) {
|
|
|
126
89
|
if (topic?.name !== void 0 && topic?.type !== void 0) {
|
|
127
90
|
return topic;
|
|
128
91
|
}
|
|
129
|
-
} catch
|
|
130
|
-
debugGraphPrimitiveFallback(
|
|
131
|
-
"[topicProjectOverlay] Failed to resolve topic by legacy scope ID",
|
|
132
|
-
{ error, scopeId }
|
|
133
|
-
);
|
|
92
|
+
} catch {
|
|
134
93
|
}
|
|
135
94
|
return null;
|
|
136
95
|
}
|
|
@@ -184,11 +143,7 @@ async function listTopicProjectOverlays(ctx, options = {}) {
|
|
|
184
143
|
if (ctx?.db?.query && typeof ctx.db.query === "function") {
|
|
185
144
|
try {
|
|
186
145
|
allTopics = await ctx.db.query("topics").collect();
|
|
187
|
-
} catch
|
|
188
|
-
debugGraphPrimitiveFallback(
|
|
189
|
-
"[topicProjectOverlay] Failed to read topics table; falling back to API",
|
|
190
|
-
{ error }
|
|
191
|
-
);
|
|
146
|
+
} catch {
|
|
192
147
|
allTopics = [];
|
|
193
148
|
}
|
|
194
149
|
}
|
|
@@ -283,28 +238,19 @@ async function patchTopicProjectOverlay(ctx, scopeId, value) {
|
|
|
283
238
|
"Cannot patch topic without component adapter (ctx.runMutation unavailable)"
|
|
284
239
|
);
|
|
285
240
|
}
|
|
286
|
-
return materializeTopicProjectOverlay(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
241
|
+
return materializeTopicProjectOverlay(
|
|
242
|
+
{
|
|
243
|
+
...topic,
|
|
244
|
+
...patch,
|
|
245
|
+
metadata: nextMetadata
|
|
246
|
+
}
|
|
247
|
+
);
|
|
291
248
|
}
|
|
292
249
|
|
|
293
250
|
// src/resolvers.ts
|
|
294
251
|
function isMissingLucernChildComponentError2(error) {
|
|
295
|
-
const message =
|
|
296
|
-
return message.includes(
|
|
297
|
-
'Child component ComponentName(Identifier("lucern")) not found'
|
|
298
|
-
) || message.includes("Child component") && message.includes("lucern") && message.includes("not found");
|
|
299
|
-
}
|
|
300
|
-
function getErrorMessage2(error) {
|
|
301
|
-
if (error instanceof Error) {
|
|
302
|
-
return error.message;
|
|
303
|
-
}
|
|
304
|
-
if (typeof error === "object" && error !== null && "message" in error && typeof error.message === "string") {
|
|
305
|
-
return error.message;
|
|
306
|
-
}
|
|
307
|
-
return "unknown error";
|
|
252
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
253
|
+
return message.includes('Child component ComponentName(Identifier("lucern")) not found') || message.includes("Child component") && message.includes("lucern") && message.includes("not found");
|
|
308
254
|
}
|
|
309
255
|
function isAdvisoryTopicPatch(value) {
|
|
310
256
|
const advisoryKeys = /* @__PURE__ */ new Set(["lastActivityAt", "updatedAt"]);
|
|
@@ -318,27 +264,32 @@ async function patchProjectWithTolerance(ctx, projectId, value) {
|
|
|
318
264
|
if (!isAdvisoryTopicPatch(value) || !isMissingLucernChildComponentError2(error)) {
|
|
319
265
|
throw error;
|
|
320
266
|
}
|
|
321
|
-
console.warn(
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
error: getErrorMessage2(error)
|
|
327
|
-
}
|
|
328
|
-
);
|
|
267
|
+
console.warn("[lucern graph-primitives] Non-fatal advisory topic patch failure", {
|
|
268
|
+
projectId,
|
|
269
|
+
keys: Object.keys(value),
|
|
270
|
+
error: error instanceof Error ? error.message : error
|
|
271
|
+
});
|
|
329
272
|
}
|
|
330
273
|
}
|
|
331
274
|
function defaultResolvers() {
|
|
332
275
|
return {
|
|
333
|
-
getProject
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
276
|
+
async getProject(ctx, projectId) {
|
|
277
|
+
return await resolveTopicProjectOverlay(ctx, projectId, {
|
|
278
|
+
idMode: "legacy",
|
|
279
|
+
projectLikeOnly: false
|
|
280
|
+
});
|
|
281
|
+
},
|
|
282
|
+
async patchProject(ctx, projectId, value) {
|
|
283
|
+
await patchProjectWithTolerance(ctx, projectId, value);
|
|
284
|
+
},
|
|
285
|
+
async listTopics(ctx) {
|
|
286
|
+
return await listTopicProjectOverlays(ctx, {
|
|
287
|
+
idMode: "legacy"
|
|
288
|
+
});
|
|
289
|
+
},
|
|
290
|
+
async getFinalArtifact(ctx, artifactId) {
|
|
291
|
+
return await ctx.db.get(artifactId);
|
|
292
|
+
}
|
|
342
293
|
};
|
|
343
294
|
}
|
|
344
295
|
var resolverOverrides = {};
|
|
@@ -389,14 +340,7 @@ async function findTopicsByScopeAlias(ctx, scopeId) {
|
|
|
389
340
|
"by_graph_scope_project",
|
|
390
341
|
(q) => q.eq(LEGACY_SCOPE_FIELD2, scopeId)
|
|
391
342
|
).collect();
|
|
392
|
-
} catch
|
|
393
|
-
debugGraphPrimitiveFallback(
|
|
394
|
-
"[topicScope] Failed to resolve scope alias via index",
|
|
395
|
-
{
|
|
396
|
-
error,
|
|
397
|
-
scopeId
|
|
398
|
-
}
|
|
399
|
-
);
|
|
343
|
+
} catch {
|
|
400
344
|
const topics = await ctx.db.query("topics").collect();
|
|
401
345
|
return topics.filter((topic) => {
|
|
402
346
|
const normalizedGlobalId = normalizeScopeValue(topic.globalId);
|
|
@@ -413,14 +357,7 @@ async function tryResolveHostTopicById(ctx, topicId) {
|
|
|
413
357
|
return await ctx.runQuery(api.topics.get, {
|
|
414
358
|
id: topicId
|
|
415
359
|
}) ?? null;
|
|
416
|
-
} catch
|
|
417
|
-
debugGraphPrimitiveFallback(
|
|
418
|
-
"[topicScope] Failed to resolve topic by host query",
|
|
419
|
-
{
|
|
420
|
-
error,
|
|
421
|
-
topicId
|
|
422
|
-
}
|
|
423
|
-
);
|
|
360
|
+
} catch {
|
|
424
361
|
return null;
|
|
425
362
|
}
|
|
426
363
|
}
|
|
@@ -432,14 +369,7 @@ async function tryResolveHostTopicByLegacyScope(ctx, legacyScopeId) {
|
|
|
432
369
|
return await ctx.runQuery(api.topics.getByLegacyScopeId, {
|
|
433
370
|
projectId: legacyScopeId
|
|
434
371
|
}) ?? null;
|
|
435
|
-
} catch
|
|
436
|
-
debugGraphPrimitiveFallback(
|
|
437
|
-
"[topicScope] Failed to resolve topic by legacy scope",
|
|
438
|
-
{
|
|
439
|
-
error,
|
|
440
|
-
legacyScopeId
|
|
441
|
-
}
|
|
442
|
-
);
|
|
372
|
+
} catch {
|
|
443
373
|
return null;
|
|
444
374
|
}
|
|
445
375
|
}
|
|
@@ -468,17 +398,8 @@ async function resolveTopicProjectScope(ctx, args) {
|
|
|
468
398
|
if (args.topicId) {
|
|
469
399
|
let topic = null;
|
|
470
400
|
try {
|
|
471
|
-
topic = await ctx.db.get(
|
|
472
|
-
|
|
473
|
-
);
|
|
474
|
-
} catch (error) {
|
|
475
|
-
debugGraphPrimitiveFallback(
|
|
476
|
-
"[topicScope] Failed to load topic by direct id",
|
|
477
|
-
{
|
|
478
|
-
error,
|
|
479
|
-
topicId: args.topicId
|
|
480
|
-
}
|
|
481
|
-
);
|
|
401
|
+
topic = await ctx.db.get(args.topicId);
|
|
402
|
+
} catch {
|
|
482
403
|
}
|
|
483
404
|
if (!topic) {
|
|
484
405
|
topic = await tryResolveHostTopicById(ctx, String(args.topicId));
|
|
@@ -515,14 +436,7 @@ async function resolveTopicProjectScope(ctx, args) {
|
|
|
515
436
|
directTopic = await ctx.db.get(
|
|
516
437
|
args.projectId
|
|
517
438
|
);
|
|
518
|
-
} catch
|
|
519
|
-
debugGraphPrimitiveFallback(
|
|
520
|
-
"[topicScope] Failed to load direct project topic",
|
|
521
|
-
{
|
|
522
|
-
error,
|
|
523
|
-
projectId: args.projectId
|
|
524
|
-
}
|
|
525
|
-
);
|
|
439
|
+
} catch {
|
|
526
440
|
}
|
|
527
441
|
if (directTopic) {
|
|
528
442
|
const inherited = await resolveInheritedWorkspaceScope(ctx, directTopic);
|
|
@@ -590,20 +504,7 @@ var identifyBeliefsNeedingRescore = query({
|
|
|
590
504
|
returns: permissiveReturn,
|
|
591
505
|
handler: async (ctx, args) => {
|
|
592
506
|
const { maxResults = 20, minPriority = "medium" } = args;
|
|
593
|
-
|
|
594
|
-
try {
|
|
595
|
-
scope = await resolveTopicProjectScope(ctx, args);
|
|
596
|
-
} catch (error) {
|
|
597
|
-
debugGraphPrimitiveFallback(
|
|
598
|
-
"[beliefDecay] Failed to resolve scope for identify beliefs",
|
|
599
|
-
{
|
|
600
|
-
error,
|
|
601
|
-
projectId: args.projectId,
|
|
602
|
-
topicId: args.topicId
|
|
603
|
-
}
|
|
604
|
-
);
|
|
605
|
-
scope = null;
|
|
606
|
-
}
|
|
507
|
+
const scope = await resolveTopicProjectScope(ctx, args).catch(() => null);
|
|
607
508
|
if (!scope) {
|
|
608
509
|
return [];
|
|
609
510
|
}
|
|
@@ -706,21 +607,9 @@ var getGlobalBeliefHealth = query({
|
|
|
706
607
|
);
|
|
707
608
|
const allResults = [];
|
|
708
609
|
for (const project of accessibleProjects.slice(0, 20)) {
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
projectId: String(project._id)
|
|
713
|
-
});
|
|
714
|
-
} catch (error) {
|
|
715
|
-
debugGraphPrimitiveFallback(
|
|
716
|
-
"[beliefDecay] Failed to resolve project scope in health query",
|
|
717
|
-
{
|
|
718
|
-
error,
|
|
719
|
-
projectId: String(project._id)
|
|
720
|
-
}
|
|
721
|
-
);
|
|
722
|
-
continue;
|
|
723
|
-
}
|
|
610
|
+
const scope = await resolveTopicProjectScope(ctx, {
|
|
611
|
+
projectId: String(project._id)
|
|
612
|
+
}).catch(() => null);
|
|
724
613
|
if (!scope) {
|
|
725
614
|
continue;
|
|
726
615
|
}
|