@happyvertical/smrt-facts 0.60.14 → 0.60.16
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/AGENTS.md +11 -0
- package/dist/facts.d.ts +7 -0
- package/dist/facts.d.ts.map +1 -1
- package/dist/index.js +33 -17
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +5 -5
- package/dist/smrt-knowledge.okf.md +2 -2
- package/package.json +10 -10
package/AGENTS.md
CHANGED
|
@@ -24,6 +24,17 @@ Distributed knowledge base with semantic deduplication, provenance tracking, and
|
|
|
24
24
|
|
|
25
25
|
`recalculateConfidence()`: weighted formula from `sourceCount`, `avgSourceCredibility`, `daysSinceLastSource`, `corroborationScore`.
|
|
26
26
|
|
|
27
|
+
## Prompt tiers (#4755)
|
|
28
|
+
|
|
29
|
+
Rule in `../prompts/AGENTS.md`. `smrtFacts.extractCandidates`,
|
|
30
|
+
`smrtFacts.extractArticleClaims` and `smrtFacts.reconcile` → `great`
|
|
31
|
+
(persisted facts and merges); `smrtFacts.assessClaimSupport` → `cheap`
|
|
32
|
+
(closed-vocabulary status). `FactCollection.preparePromptCall()` binds the tier
|
|
33
|
+
through `prepareAiOperation()`; a message-only client injected as `options.ai`
|
|
34
|
+
that core does not adopt (no `embed`) is used as is with `routeTier: false`;
|
|
35
|
+
one core adopts binds the tier. A typed-decision client answers
|
|
36
|
+
reconciliation without any tier (#3158).
|
|
37
|
+
|
|
27
38
|
## Gotchas
|
|
28
39
|
|
|
29
40
|
- **Embedding failures non-fatal**: try/catch with silent fail — doesn't block fact creation
|
package/dist/facts.d.ts
CHANGED
|
@@ -9,6 +9,13 @@ import { Fact } from "./fact.js";
|
|
|
9
9
|
import type { EntityBriefing, EvolutionType, FactClaimSupportAssessment, FactClaimSupportCandidate, FactClaimSupportOptions, FactContentRelationship, FactExtractionCandidate, FactExtractionOptions, FactOptions, FactStatus, FactType, ReconcileOptions, ReconcileResult } from "./types.js";
|
|
10
10
|
export declare class FactCollection extends SmrtCollection<Fact> {
|
|
11
11
|
static readonly _itemClass: typeof Fact;
|
|
12
|
+
/**
|
|
13
|
+
* The message client and call options for a resolved prompt. A message-only
|
|
14
|
+
* client injected as `options.ai` is used as is: a tier cannot rebind it, so
|
|
15
|
+
* the tier keys are dropped. Otherwise `prepareAiOperation()` binds the
|
|
16
|
+
* prompt's tier and tags the usage row (#4755).
|
|
17
|
+
*/
|
|
18
|
+
private preparePromptCall;
|
|
12
19
|
private readonly reconciliationQueues;
|
|
13
20
|
/**
|
|
14
21
|
* Fetch one catalog page in SQL. The recursive branch walk may inspect more
|
package/dist/facts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facts.d.ts","sourceRoot":"","sources":["../src/facts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,cAAc,EAEf,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"facts.d.ts","sourceRoot":"","sources":["../src/facts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,cAAc,EAEf,MAAM,0BAA0B,CAAC;AAkBlC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAQ,CAAC;AAS9B,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,0BAA0B,EAC1B,yBAAyB,EACzB,uBAAuB,EAEvB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,eAAe,EAChB,MAAM,YAAS,CAAC;AA4JjB,qBAAa,cAAe,SAAQ,cAAc,CAAC,IAAI,CAAC;IACtD,MAAM,CAAC,QAAQ,CAAC,UAAU,cAAQ;IAElC;;;;;OAKG;YACW,iBAAiB;IAyB/B,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAoC;IAEzE;;;OAGG;YACW,eAAe;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