@happyvertical/smrt-facts 0.51.32 → 0.51.33

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 (42) hide show
  1. package/dist/__smrt-register__.d.ts +2 -0
  2. package/dist/__smrt-register__.d.ts.map +1 -0
  3. package/dist/__tests__/fixtures/decision-claim-support-3166.d.ts +33 -0
  4. package/dist/__tests__/fixtures/decision-claim-support-3166.d.ts.map +1 -0
  5. package/dist/catalog-search.d.ts +7 -0
  6. package/dist/catalog-search.d.ts.map +1 -0
  7. package/dist/fact-content.d.ts +39 -0
  8. package/dist/fact-content.d.ts.map +1 -0
  9. package/dist/fact-contents.d.ts +32 -0
  10. package/dist/fact-contents.d.ts.map +1 -0
  11. package/dist/fact-evidence.d.ts +37 -0
  12. package/dist/fact-evidence.d.ts.map +1 -0
  13. package/dist/fact-evidences.d.ts +32 -0
  14. package/dist/fact-evidences.d.ts.map +1 -0
  15. package/dist/fact-source.d.ts +29 -0
  16. package/dist/fact-source.d.ts.map +1 -0
  17. package/dist/fact-sources.d.ts +50 -0
  18. package/dist/fact-sources.d.ts.map +1 -0
  19. package/dist/fact-subject.d.ts +28 -0
  20. package/dist/fact-subject.d.ts.map +1 -0
  21. package/dist/fact-subjects.d.ts +56 -0
  22. package/dist/fact-subjects.d.ts.map +1 -0
  23. package/dist/fact-tag.d.ts +34 -0
  24. package/dist/fact-tag.d.ts.map +1 -0
  25. package/dist/fact-tags.d.ts +51 -0
  26. package/dist/fact-tags.d.ts.map +1 -0
  27. package/dist/fact.d.ts +77 -0
  28. package/dist/fact.d.ts.map +1 -0
  29. package/dist/facts.d.ts +173 -0
  30. package/dist/facts.d.ts.map +1 -0
  31. package/dist/index.d.ts +25 -854
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +1 -1
  34. package/dist/manifest.json +1 -1
  35. package/dist/prompts.d.ts +5 -0
  36. package/dist/prompts.d.ts.map +1 -0
  37. package/dist/smrt-knowledge.json +4 -4
  38. package/dist/types.d.ts +258 -382
  39. package/dist/types.d.ts.map +1 -0
  40. package/dist/utils.d.ts +26 -0
  41. package/dist/utils.d.ts.map +1 -0
  42. package/package.json +6 -6
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Utility functions for @happyvertical/smrt-facts
3
+ */
4
+ /**
5
+ * Calculate confidence score for a fact based on multiple signals.
6
+ *
7
+ * Formula (v1, simple weighted):
8
+ * base = 0.5
9
+ * + min(sourceCount/10, 0.3) source volume boost
10
+ * + avgSourceCredibility * 0.2 credibility boost
11
+ * + max(0, 0.1 - days*0.01) recency boost (decays over 10 days)
12
+ * + corroborationScore * 0.1 agreement boost
13
+ * = clamped to [0, 1]
14
+ */
15
+ export declare function calculateConfidence(params: {
16
+ sourceCount: number;
17
+ avgSourceCredibility?: number;
18
+ daysSinceLastSource?: number;
19
+ corroborationScore?: number;
20
+ }): number;
21
+ /**
22
+ * Normalize text for comparison and storage.
23
+ * Trims whitespace, collapses multiple spaces, and lowercases.
24
+ */
25
+ export declare function normalizeText(text: string): string;
26
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,MAAM,CAiBT;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-facts",
3
- "version": "0.51.32",
3
+ "version": "0.51.33",
4
4
  "description": "Distributed memory and knowledge management with provenance tracking for SMRT framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,16 +22,16 @@
22
22
  "@happyvertical/ai": "^0.94.1",
23
23
  "@happyvertical/files": "^0.94.1",
24
24
  "@happyvertical/logger": "^0.94.1",
25
- "@happyvertical/smrt-core": "0.51.32",
26
- "@happyvertical/smrt-prompts": "0.51.32",
27
- "@happyvertical/smrt-tenancy": "0.51.32",
25
+ "@happyvertical/smrt-core": "0.51.33",
26
+ "@happyvertical/smrt-prompts": "0.51.33",
27
+ "@happyvertical/smrt-tenancy": "0.51.33",
28
28
  "@happyvertical/sql": "^0.94.1",
29
29
  "@happyvertical/utils": "^0.94.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@happyvertical/smrt-vitest": "0.51.32",
32
+ "@happyvertical/smrt-vitest": "0.51.33",
33
33
  "@types/node": "24.13.6",
34
- "typescript": "5.9.3",
34
+ "typescript": "6.0.3",
35
35
  "vite": "8.1.4",
36
36
  "vitest": "4.1.10"
37
37
  },