@facthouse/mcp 0.26.0

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 (413) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +611 -0
  3. package/dist/cli/index.d.ts +30 -0
  4. package/dist/cli/index.d.ts.map +1 -0
  5. package/dist/cli/index.js +785 -0
  6. package/dist/cli/index.js.map +1 -0
  7. package/dist/cli/init-backfill.d.ts +26 -0
  8. package/dist/cli/init-backfill.d.ts.map +1 -0
  9. package/dist/cli/init-backfill.js +56 -0
  10. package/dist/cli/init-backfill.js.map +1 -0
  11. package/dist/cli/init-knobs.d.ts +137 -0
  12. package/dist/cli/init-knobs.d.ts.map +1 -0
  13. package/dist/cli/init-knobs.js +400 -0
  14. package/dist/cli/init-knobs.js.map +1 -0
  15. package/dist/cli/init-wizard.d.ts +67 -0
  16. package/dist/cli/init-wizard.d.ts.map +1 -0
  17. package/dist/cli/init-wizard.js +319 -0
  18. package/dist/cli/init-wizard.js.map +1 -0
  19. package/dist/cli/init.d.ts +124 -0
  20. package/dist/cli/init.d.ts.map +1 -0
  21. package/dist/cli/init.js +286 -0
  22. package/dist/cli/init.js.map +1 -0
  23. package/dist/cli/inspect-html.d.ts +15 -0
  24. package/dist/cli/inspect-html.d.ts.map +1 -0
  25. package/dist/cli/inspect-html.js +491 -0
  26. package/dist/cli/inspect-html.js.map +1 -0
  27. package/dist/cli/inspect-intelligence.d.ts +8 -0
  28. package/dist/cli/inspect-intelligence.d.ts.map +1 -0
  29. package/dist/cli/inspect-intelligence.js +103 -0
  30. package/dist/cli/inspect-intelligence.js.map +1 -0
  31. package/dist/cli/inspect-model.d.ts +42 -0
  32. package/dist/cli/inspect-model.d.ts.map +1 -0
  33. package/dist/cli/inspect-model.js +108 -0
  34. package/dist/cli/inspect-model.js.map +1 -0
  35. package/dist/cli/inspect-payload.d.ts +122 -0
  36. package/dist/cli/inspect-payload.d.ts.map +1 -0
  37. package/dist/cli/inspect-payload.js +338 -0
  38. package/dist/cli/inspect-payload.js.map +1 -0
  39. package/dist/cli/inspect-theme.d.ts +44 -0
  40. package/dist/cli/inspect-theme.d.ts.map +1 -0
  41. package/dist/cli/inspect-theme.js +118 -0
  42. package/dist/cli/inspect-theme.js.map +1 -0
  43. package/dist/cli/inspect.d.ts +24 -0
  44. package/dist/cli/inspect.d.ts.map +1 -0
  45. package/dist/cli/inspect.js +172 -0
  46. package/dist/cli/inspect.js.map +1 -0
  47. package/dist/cli/log-event.d.ts +55 -0
  48. package/dist/cli/log-event.d.ts.map +1 -0
  49. package/dist/cli/log-event.js +149 -0
  50. package/dist/cli/log-event.js.map +1 -0
  51. package/dist/cli/package-version.d.ts +2 -0
  52. package/dist/cli/package-version.d.ts.map +1 -0
  53. package/dist/cli/package-version.js +15 -0
  54. package/dist/cli/package-version.js.map +1 -0
  55. package/dist/cli/query.d.ts +53 -0
  56. package/dist/cli/query.d.ts.map +1 -0
  57. package/dist/cli/query.js +325 -0
  58. package/dist/cli/query.js.map +1 -0
  59. package/dist/cli/record.d.ts +55 -0
  60. package/dist/cli/record.d.ts.map +1 -0
  61. package/dist/cli/record.js +149 -0
  62. package/dist/cli/record.js.map +1 -0
  63. package/dist/cli/settings.d.ts +26 -0
  64. package/dist/cli/settings.d.ts.map +1 -0
  65. package/dist/cli/settings.js +161 -0
  66. package/dist/cli/settings.js.map +1 -0
  67. package/dist/cli/spend-dashboard.d.ts +53 -0
  68. package/dist/cli/spend-dashboard.d.ts.map +1 -0
  69. package/dist/cli/spend-dashboard.js +297 -0
  70. package/dist/cli/spend-dashboard.js.map +1 -0
  71. package/dist/cli/stats-html.d.ts +20 -0
  72. package/dist/cli/stats-html.d.ts.map +1 -0
  73. package/dist/cli/stats-html.js +879 -0
  74. package/dist/cli/stats-html.js.map +1 -0
  75. package/dist/cli/web.d.ts +60 -0
  76. package/dist/cli/web.d.ts.map +1 -0
  77. package/dist/cli/web.js +416 -0
  78. package/dist/cli/web.js.map +1 -0
  79. package/dist/config.d.ts +102 -0
  80. package/dist/config.d.ts.map +1 -0
  81. package/dist/config.js +302 -0
  82. package/dist/config.js.map +1 -0
  83. package/dist/db/connection.d.ts +96 -0
  84. package/dist/db/connection.d.ts.map +1 -0
  85. package/dist/db/connection.js +200 -0
  86. package/dist/db/connection.js.map +1 -0
  87. package/dist/db/consolidation-lock.d.ts +16 -0
  88. package/dist/db/consolidation-lock.d.ts.map +1 -0
  89. package/dist/db/consolidation-lock.js +67 -0
  90. package/dist/db/consolidation-lock.js.map +1 -0
  91. package/dist/db/consolidations.d.ts +41 -0
  92. package/dist/db/consolidations.d.ts.map +1 -0
  93. package/dist/db/consolidations.js +165 -0
  94. package/dist/db/consolidations.js.map +1 -0
  95. package/dist/db/disk-budget.d.ts +44 -0
  96. package/dist/db/disk-budget.d.ts.map +1 -0
  97. package/dist/db/disk-budget.js +177 -0
  98. package/dist/db/disk-budget.js.map +1 -0
  99. package/dist/db/domains.d.ts +14 -0
  100. package/dist/db/domains.d.ts.map +1 -0
  101. package/dist/db/domains.js +37 -0
  102. package/dist/db/domains.js.map +1 -0
  103. package/dist/db/embeddings-hnsw.d.ts +30 -0
  104. package/dist/db/embeddings-hnsw.d.ts.map +1 -0
  105. package/dist/db/embeddings-hnsw.js +129 -0
  106. package/dist/db/embeddings-hnsw.js.map +1 -0
  107. package/dist/db/embeddings.d.ts +68 -0
  108. package/dist/db/embeddings.d.ts.map +1 -0
  109. package/dist/db/embeddings.js +139 -0
  110. package/dist/db/embeddings.js.map +1 -0
  111. package/dist/db/entities.d.ts +157 -0
  112. package/dist/db/entities.d.ts.map +1 -0
  113. package/dist/db/entities.js +489 -0
  114. package/dist/db/entities.js.map +1 -0
  115. package/dist/db/extract-watermarks.d.ts +55 -0
  116. package/dist/db/extract-watermarks.d.ts.map +1 -0
  117. package/dist/db/extract-watermarks.js +171 -0
  118. package/dist/db/extract-watermarks.js.map +1 -0
  119. package/dist/db/facts.d.ts +117 -0
  120. package/dist/db/facts.d.ts.map +1 -0
  121. package/dist/db/facts.js +326 -0
  122. package/dist/db/facts.js.map +1 -0
  123. package/dist/db/index.d.ts +26 -0
  124. package/dist/db/index.d.ts.map +1 -0
  125. package/dist/db/index.js +23 -0
  126. package/dist/db/index.js.map +1 -0
  127. package/dist/db/inferences.d.ts +36 -0
  128. package/dist/db/inferences.d.ts.map +1 -0
  129. package/dist/db/inferences.js +212 -0
  130. package/dist/db/inferences.js.map +1 -0
  131. package/dist/db/intelligence-runs.d.ts +20 -0
  132. package/dist/db/intelligence-runs.d.ts.map +1 -0
  133. package/dist/db/intelligence-runs.js +60 -0
  134. package/dist/db/intelligence-runs.js.map +1 -0
  135. package/dist/db/pg-backend.d.ts +14 -0
  136. package/dist/db/pg-backend.d.ts.map +1 -0
  137. package/dist/db/pg-backend.js +53 -0
  138. package/dist/db/pg-backend.js.map +1 -0
  139. package/dist/db/postgres-schema.d.ts +13 -0
  140. package/dist/db/postgres-schema.d.ts.map +1 -0
  141. package/dist/db/postgres-schema.js +392 -0
  142. package/dist/db/postgres-schema.js.map +1 -0
  143. package/dist/db/postgres.d.ts +30 -0
  144. package/dist/db/postgres.d.ts.map +1 -0
  145. package/dist/db/postgres.js +154 -0
  146. package/dist/db/postgres.js.map +1 -0
  147. package/dist/db/prune.d.ts +67 -0
  148. package/dist/db/prune.d.ts.map +1 -0
  149. package/dist/db/prune.js +113 -0
  150. package/dist/db/prune.js.map +1 -0
  151. package/dist/db/scheduler-signal.d.ts +20 -0
  152. package/dist/db/scheduler-signal.d.ts.map +1 -0
  153. package/dist/db/scheduler-signal.js +32 -0
  154. package/dist/db/scheduler-signal.js.map +1 -0
  155. package/dist/db/schema-version.d.ts +7 -0
  156. package/dist/db/schema-version.d.ts.map +1 -0
  157. package/dist/db/schema-version.js +7 -0
  158. package/dist/db/schema-version.js.map +1 -0
  159. package/dist/db/schema.d.ts +12 -0
  160. package/dist/db/schema.d.ts.map +1 -0
  161. package/dist/db/schema.js +983 -0
  162. package/dist/db/schema.js.map +1 -0
  163. package/dist/db/session-facts.d.ts +108 -0
  164. package/dist/db/session-facts.d.ts.map +1 -0
  165. package/dist/db/session-facts.js +244 -0
  166. package/dist/db/session-facts.js.map +1 -0
  167. package/dist/db/sessions.d.ts +85 -0
  168. package/dist/db/sessions.d.ts.map +1 -0
  169. package/dist/db/sessions.js +169 -0
  170. package/dist/db/sessions.js.map +1 -0
  171. package/dist/db/sources.d.ts +22 -0
  172. package/dist/db/sources.d.ts.map +1 -0
  173. package/dist/db/sources.js +43 -0
  174. package/dist/db/sources.js.map +1 -0
  175. package/dist/db/stats.d.ts +94 -0
  176. package/dist/db/stats.d.ts.map +1 -0
  177. package/dist/db/stats.js +79 -0
  178. package/dist/db/stats.js.map +1 -0
  179. package/dist/db/store.d.ts +19 -0
  180. package/dist/db/store.d.ts.map +1 -0
  181. package/dist/db/store.js +58 -0
  182. package/dist/db/store.js.map +1 -0
  183. package/dist/db/watermarks.d.ts +20 -0
  184. package/dist/db/watermarks.d.ts.map +1 -0
  185. package/dist/db/watermarks.js +30 -0
  186. package/dist/db/watermarks.js.map +1 -0
  187. package/dist/embedding/ollama.d.ts +31 -0
  188. package/dist/embedding/ollama.d.ts.map +1 -0
  189. package/dist/embedding/ollama.js +148 -0
  190. package/dist/embedding/ollama.js.map +1 -0
  191. package/dist/embedding/provider.d.ts +37 -0
  192. package/dist/embedding/provider.d.ts.map +1 -0
  193. package/dist/embedding/provider.js +71 -0
  194. package/dist/embedding/provider.js.map +1 -0
  195. package/dist/embedding/types.d.ts +61 -0
  196. package/dist/embedding/types.d.ts.map +1 -0
  197. package/dist/embedding/types.js +13 -0
  198. package/dist/embedding/types.js.map +1 -0
  199. package/dist/embedding/voyage.d.ts +31 -0
  200. package/dist/embedding/voyage.d.ts.map +1 -0
  201. package/dist/embedding/voyage.js +105 -0
  202. package/dist/embedding/voyage.js.map +1 -0
  203. package/dist/identity.d.ts +32 -0
  204. package/dist/identity.d.ts.map +1 -0
  205. package/dist/identity.js +53 -0
  206. package/dist/identity.js.map +1 -0
  207. package/dist/index.d.ts +9 -0
  208. package/dist/index.d.ts.map +1 -0
  209. package/dist/index.js +275 -0
  210. package/dist/index.js.map +1 -0
  211. package/dist/intelligence/backing.d.ts +19 -0
  212. package/dist/intelligence/backing.d.ts.map +1 -0
  213. package/dist/intelligence/backing.js +88 -0
  214. package/dist/intelligence/backing.js.map +1 -0
  215. package/dist/intelligence/cli.d.ts +90 -0
  216. package/dist/intelligence/cli.d.ts.map +1 -0
  217. package/dist/intelligence/cli.js +823 -0
  218. package/dist/intelligence/cli.js.map +1 -0
  219. package/dist/intelligence/consolidate.d.ts +84 -0
  220. package/dist/intelligence/consolidate.d.ts.map +1 -0
  221. package/dist/intelligence/consolidate.js +1234 -0
  222. package/dist/intelligence/consolidate.js.map +1 -0
  223. package/dist/intelligence/extract-prompt.d.ts +78 -0
  224. package/dist/intelligence/extract-prompt.d.ts.map +1 -0
  225. package/dist/intelligence/extract-prompt.js +146 -0
  226. package/dist/intelligence/extract-prompt.js.map +1 -0
  227. package/dist/intelligence/heuristic.d.ts +15 -0
  228. package/dist/intelligence/heuristic.d.ts.map +1 -0
  229. package/dist/intelligence/heuristic.js +224 -0
  230. package/dist/intelligence/heuristic.js.map +1 -0
  231. package/dist/intelligence/http.d.ts +77 -0
  232. package/dist/intelligence/http.d.ts.map +1 -0
  233. package/dist/intelligence/http.js +496 -0
  234. package/dist/intelligence/http.js.map +1 -0
  235. package/dist/intelligence/provider-type.d.ts +6 -0
  236. package/dist/intelligence/provider-type.d.ts.map +1 -0
  237. package/dist/intelligence/provider-type.js +18 -0
  238. package/dist/intelligence/provider-type.js.map +1 -0
  239. package/dist/intelligence/provider.d.ts +49 -0
  240. package/dist/intelligence/provider.d.ts.map +1 -0
  241. package/dist/intelligence/provider.js +52 -0
  242. package/dist/intelligence/provider.js.map +1 -0
  243. package/dist/intelligence/related-k.d.ts +15 -0
  244. package/dist/intelligence/related-k.d.ts.map +1 -0
  245. package/dist/intelligence/related-k.js +57 -0
  246. package/dist/intelligence/related-k.js.map +1 -0
  247. package/dist/intelligence/routing-view.d.ts +33 -0
  248. package/dist/intelligence/routing-view.d.ts.map +1 -0
  249. package/dist/intelligence/routing-view.js +54 -0
  250. package/dist/intelligence/routing-view.js.map +1 -0
  251. package/dist/intelligence/sampling.d.ts +20 -0
  252. package/dist/intelligence/sampling.d.ts.map +1 -0
  253. package/dist/intelligence/sampling.js +324 -0
  254. package/dist/intelligence/sampling.js.map +1 -0
  255. package/dist/intelligence/stage-router.d.ts +32 -0
  256. package/dist/intelligence/stage-router.d.ts.map +1 -0
  257. package/dist/intelligence/stage-router.js +251 -0
  258. package/dist/intelligence/stage-router.js.map +1 -0
  259. package/dist/intelligence/steps.d.ts +65 -0
  260. package/dist/intelligence/steps.d.ts.map +1 -0
  261. package/dist/intelligence/steps.js +86 -0
  262. package/dist/intelligence/steps.js.map +1 -0
  263. package/dist/intelligence/subject.d.ts +42 -0
  264. package/dist/intelligence/subject.d.ts.map +1 -0
  265. package/dist/intelligence/subject.js +44 -0
  266. package/dist/intelligence/subject.js.map +1 -0
  267. package/dist/intelligence/token-budget.d.ts +86 -0
  268. package/dist/intelligence/token-budget.d.ts.map +1 -0
  269. package/dist/intelligence/token-budget.js +312 -0
  270. package/dist/intelligence/token-budget.js.map +1 -0
  271. package/dist/intelligence/types.d.ts +179 -0
  272. package/dist/intelligence/types.d.ts.map +1 -0
  273. package/dist/intelligence/types.js +7 -0
  274. package/dist/intelligence/types.js.map +1 -0
  275. package/dist/intelligence/usage.d.ts +104 -0
  276. package/dist/intelligence/usage.d.ts.map +1 -0
  277. package/dist/intelligence/usage.js +233 -0
  278. package/dist/intelligence/usage.js.map +1 -0
  279. package/dist/ipc/scheduler-ipc.d.ts +52 -0
  280. package/dist/ipc/scheduler-ipc.d.ts.map +1 -0
  281. package/dist/ipc/scheduler-ipc.js +214 -0
  282. package/dist/ipc/scheduler-ipc.js.map +1 -0
  283. package/dist/paths.d.ts +29 -0
  284. package/dist/paths.d.ts.map +1 -0
  285. package/dist/paths.js +47 -0
  286. package/dist/paths.js.map +1 -0
  287. package/dist/scheduler.d.ts +39 -0
  288. package/dist/scheduler.d.ts.map +1 -0
  289. package/dist/scheduler.js +93 -0
  290. package/dist/scheduler.js.map +1 -0
  291. package/dist/schemas/domains.d.ts +89 -0
  292. package/dist/schemas/domains.d.ts.map +1 -0
  293. package/dist/schemas/domains.js +160 -0
  294. package/dist/schemas/domains.js.map +1 -0
  295. package/dist/schemas/starter-vocabulary.d.ts +34 -0
  296. package/dist/schemas/starter-vocabulary.d.ts.map +1 -0
  297. package/dist/schemas/starter-vocabulary.js +91 -0
  298. package/dist/schemas/starter-vocabulary.js.map +1 -0
  299. package/dist/search/ann.d.ts +36 -0
  300. package/dist/search/ann.d.ts.map +1 -0
  301. package/dist/search/ann.js +59 -0
  302. package/dist/search/ann.js.map +1 -0
  303. package/dist/search/entity.d.ts +43 -0
  304. package/dist/search/entity.d.ts.map +1 -0
  305. package/dist/search/entity.js +147 -0
  306. package/dist/search/entity.js.map +1 -0
  307. package/dist/search/episodes.d.ts +28 -0
  308. package/dist/search/episodes.d.ts.map +1 -0
  309. package/dist/search/episodes.js +102 -0
  310. package/dist/search/episodes.js.map +1 -0
  311. package/dist/search/hnsw-graph.d.ts +35 -0
  312. package/dist/search/hnsw-graph.d.ts.map +1 -0
  313. package/dist/search/hnsw-graph.js +177 -0
  314. package/dist/search/hnsw-graph.js.map +1 -0
  315. package/dist/search/hnsw-ram.d.ts +29 -0
  316. package/dist/search/hnsw-ram.d.ts.map +1 -0
  317. package/dist/search/hnsw-ram.js +95 -0
  318. package/dist/search/hnsw-ram.js.map +1 -0
  319. package/dist/search/index.d.ts +119 -0
  320. package/dist/search/index.d.ts.map +1 -0
  321. package/dist/search/index.js +420 -0
  322. package/dist/search/index.js.map +1 -0
  323. package/dist/search/interlocutor-rank.d.ts +10 -0
  324. package/dist/search/interlocutor-rank.d.ts.map +1 -0
  325. package/dist/search/interlocutor-rank.js +21 -0
  326. package/dist/search/interlocutor-rank.js.map +1 -0
  327. package/dist/search/key-facts.d.ts +34 -0
  328. package/dist/search/key-facts.d.ts.map +1 -0
  329. package/dist/search/key-facts.js +43 -0
  330. package/dist/search/key-facts.js.map +1 -0
  331. package/dist/search/profile.d.ts +31 -0
  332. package/dist/search/profile.d.ts.map +1 -0
  333. package/dist/search/profile.js +43 -0
  334. package/dist/search/profile.js.map +1 -0
  335. package/dist/search/vector.d.ts +90 -0
  336. package/dist/search/vector.d.ts.map +1 -0
  337. package/dist/search/vector.js +187 -0
  338. package/dist/search/vector.js.map +1 -0
  339. package/dist/sources/claude-code.d.ts +35 -0
  340. package/dist/sources/claude-code.d.ts.map +1 -0
  341. package/dist/sources/claude-code.js +401 -0
  342. package/dist/sources/claude-code.js.map +1 -0
  343. package/dist/sources/copy.d.ts +58 -0
  344. package/dist/sources/copy.d.ts.map +1 -0
  345. package/dist/sources/copy.js +104 -0
  346. package/dist/sources/copy.js.map +1 -0
  347. package/dist/sources/cursor.d.ts +44 -0
  348. package/dist/sources/cursor.d.ts.map +1 -0
  349. package/dist/sources/cursor.js +99 -0
  350. package/dist/sources/cursor.js.map +1 -0
  351. package/dist/sources/jsonl-copy.d.ts +58 -0
  352. package/dist/sources/jsonl-copy.d.ts.map +1 -0
  353. package/dist/sources/jsonl-copy.js +195 -0
  354. package/dist/sources/jsonl-copy.js.map +1 -0
  355. package/dist/sources/jsonl-ingest.d.ts +58 -0
  356. package/dist/sources/jsonl-ingest.d.ts.map +1 -0
  357. package/dist/sources/jsonl-ingest.js +195 -0
  358. package/dist/sources/jsonl-ingest.js.map +1 -0
  359. package/dist/sources/pull.d.ts +85 -0
  360. package/dist/sources/pull.d.ts.map +1 -0
  361. package/dist/sources/pull.js +145 -0
  362. package/dist/sources/pull.js.map +1 -0
  363. package/dist/sources/resolve.d.ts +38 -0
  364. package/dist/sources/resolve.d.ts.map +1 -0
  365. package/dist/sources/resolve.js +91 -0
  366. package/dist/sources/resolve.js.map +1 -0
  367. package/dist/tools/capture-fact-description.d.ts +18 -0
  368. package/dist/tools/capture-fact-description.d.ts.map +1 -0
  369. package/dist/tools/capture-fact-description.js +41 -0
  370. package/dist/tools/capture-fact-description.js.map +1 -0
  371. package/dist/tools/fact-manager.d.ts +69 -0
  372. package/dist/tools/fact-manager.d.ts.map +1 -0
  373. package/dist/tools/fact-manager.js +332 -0
  374. package/dist/tools/fact-manager.js.map +1 -0
  375. package/dist/tools/inference-descriptions.d.ts +8 -0
  376. package/dist/tools/inference-descriptions.d.ts.map +1 -0
  377. package/dist/tools/inference-descriptions.js +16 -0
  378. package/dist/tools/inference-descriptions.js.map +1 -0
  379. package/dist/tools/inferences.d.ts +11 -0
  380. package/dist/tools/inferences.d.ts.map +1 -0
  381. package/dist/tools/inferences.js +98 -0
  382. package/dist/tools/inferences.js.map +1 -0
  383. package/dist/tools/read-tools.d.ts +21 -0
  384. package/dist/tools/read-tools.d.ts.map +1 -0
  385. package/dist/tools/read-tools.js +276 -0
  386. package/dist/tools/read-tools.js.map +1 -0
  387. package/dist/tools/resources.d.ts +62 -0
  388. package/dist/tools/resources.d.ts.map +1 -0
  389. package/dist/tools/resources.js +199 -0
  390. package/dist/tools/resources.js.map +1 -0
  391. package/dist/tools/session-manager.d.ts +44 -0
  392. package/dist/tools/session-manager.d.ts.map +1 -0
  393. package/dist/tools/session-manager.js +227 -0
  394. package/dist/tools/session-manager.js.map +1 -0
  395. package/dist/types/config.d.ts +400 -0
  396. package/dist/types/config.d.ts.map +1 -0
  397. package/dist/types/config.js +105 -0
  398. package/dist/types/config.js.map +1 -0
  399. package/dist/types/data.d.ts +357 -0
  400. package/dist/types/data.d.ts.map +1 -0
  401. package/dist/types/data.js +36 -0
  402. package/dist/types/data.js.map +1 -0
  403. package/dist/types/index.d.ts +6 -0
  404. package/dist/types/index.d.ts.map +1 -0
  405. package/dist/types/index.js +6 -0
  406. package/dist/types/index.js.map +1 -0
  407. package/dist/types.d.ts +115 -0
  408. package/dist/types.d.ts.map +1 -0
  409. package/dist/types.js +6 -0
  410. package/dist/types.js.map +1 -0
  411. package/dist/warnings.d.ts.map +1 -0
  412. package/dist/warnings.js.map +1 -0
  413. package/package.json +62 -0
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Server configuration types — how Facthouse is initialised and configured.
3
+ */
4
+ /** Default importance when not specified by the calling LLM or user config. */
5
+ export const DEFAULT_IMPORTANCE = 0.5;
6
+ /** Default confidence when not specified by the calling LLM. */
7
+ export const DEFAULT_CONFIDENCE = 0.7;
8
+ /**
9
+ * Well-known OpenAI-compat roots. The path `/v1` is shared; the port is not.
10
+ * Default is Ollama because that is what we verified. Other hosts set
11
+ * `intelligence.http.base_url`.
12
+ */
13
+ export const HTTP_WELL_KNOWN_BASE_URLS = [
14
+ { host: "Ollama", base_url: "http://localhost:11434/v1" },
15
+ { host: "LM Studio", base_url: "http://localhost:1234/v1" },
16
+ { host: "vLLM", base_url: "http://localhost:8000/v1" },
17
+ { host: "llama.cpp", base_url: "http://localhost:8080/v1" },
18
+ ];
19
+ /** OpenAI-compatible chat host. Ollama's default /v1 port. */
20
+ export const HTTP_DEFAULT_BASE_URL = HTTP_WELL_KNOWN_BASE_URLS[0].base_url;
21
+ /** What to do when a stage's primary provider cannot run. */
22
+ export const STAGE_ON_FAIL_VALUES = ["cli", "http", "none"];
23
+ export function isStageOnFail(value) {
24
+ return (typeof value === "string" &&
25
+ STAGE_ON_FAIL_VALUES.includes(value));
26
+ }
27
+ /** Default `--model` for the CLI intelligence provider. One definition. */
28
+ export const CLI_DEFAULT_MODEL = "haiku";
29
+ /** Default per-stage subprocess timeout (ms). One definition. */
30
+ export const CLI_DEFAULT_TIMEOUT_MS = 45_000;
31
+ /**
32
+ * Auto HNSW threshold: 32 MiB of float32 for the current model+dimension.
33
+ * 8,192 facts at 1024-d; 16,384 at 512-d. 4,000 at 512-d (8 MiB) stays exact.
34
+ */
35
+ export const ANN_DEFAULT_MAX_BYTES = 32 * 1024 * 1024;
36
+ /**
37
+ * A named capture source for this store.
38
+ *
39
+ * Empty `sources` (the default) means copy is off: nothing is discovered, and
40
+ * MCP `log_event` / `capture_fact` keep working as they do today. A source is
41
+ * explicit — `{ kind, home, cwd? }` — and scoped to this store. Facthouse
42
+ * does not auto-glob `~/.claude*` / `~/.cursor*` or honour `CLAUDE_CONFIG_DIR`
43
+ * as implicit discovery; that variable is only useful as an example of what
44
+ * `home` is (the client config dir).
45
+ *
46
+ * `claude-code` tails session JSONL. `cursor` tails Cursor Agent JSONL under
47
+ * home/projects/<group>/agent-transcripts/ only — not Composer SQLite, not
48
+ * `state.vscdb`. Grok and Codex remain later adapters.
49
+ */
50
+ export const CAPTURE_SOURCE_KINDS = ["claude-code", "cursor"];
51
+ export function isCaptureSourceKind(value) {
52
+ return (typeof value === "string" &&
53
+ CAPTURE_SOURCE_KINDS.includes(value));
54
+ }
55
+ /** Default configuration values. */
56
+ export const DEFAULT_CONFIG = {
57
+ embedding: {
58
+ provider: null,
59
+ model: null,
60
+ dimensions: null,
61
+ api_key_env: "VOYAGE_API_KEY",
62
+ batch_size: 128,
63
+ min_similarity_ratio: 0.85,
64
+ min_similarity: null,
65
+ ann: null,
66
+ ann_max_bytes: ANN_DEFAULT_MAX_BYTES,
67
+ },
68
+ capture: {
69
+ default_confidence: DEFAULT_CONFIDENCE,
70
+ },
71
+ extraction: {
72
+ enabled: true,
73
+ event_types: ["message", "tool_call", "tool_result", "artifact"],
74
+ roles: ["user", "assistant", "system", "tool"],
75
+ batch_size: 50,
76
+ min_content_length: 10,
77
+ max_content_length: 2000,
78
+ working_memory_size: 50,
79
+ },
80
+ intelligence: {
81
+ // Default to the CLI provider — spawns the `claude` CLI using the user's
82
+ // existing subscription for real LLM consolidation, with no API key. Many
83
+ // MCP clients don't advertise the sampling capability, so the sampling
84
+ // provider would degrade to regex for them; the CLI provider is the path
85
+ // that actually delivers server-side intelligence on those hosts. Every
86
+ // stage falls back to the heuristic provider on failure (CLI not installed,
87
+ // rate limit, timeout). Override with the FACTHOUSE_PROVIDER env var
88
+ // (e.g. =heuristic) or intelligence.provider in config.json.
89
+ provider: "cli",
90
+ api_key: null,
91
+ },
92
+ consolidation: {
93
+ triggers: ["session_start", "threshold", "compaction", "shutdown", "manual"],
94
+ threshold: 10,
95
+ auto_link_events: 5,
96
+ },
97
+ retention: {
98
+ prune_keep_per_session: null,
99
+ },
100
+ inferences: {
101
+ enabled: false,
102
+ },
103
+ sources: [],
104
+ };
105
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAoDtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,2BAA2B,EAAE;IACzD,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,0BAA0B,EAAE;IAC3D,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,0BAA0B,EAAE;IACtD,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,0BAA0B,EAAE;CACnD,CAAC;AAEX,8DAA8D;AAC9D,MAAM,CAAC,MAAM,qBAAqB,GAAG,yBAAyB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;AAQ3E,6DAA6D;AAC7D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAGrE,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACxB,oBAA0C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC5D,CAAC;AACJ,CAAC;AA0ED,2EAA2E;AAC3E,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QAC7D,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,IAAI;KACd;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,CAAC,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC;QAC5E,SAAS,EAAE,EAAE;QACb,gBAAgB,EAAE,CAAC;KACpB;IACD,SAAS,EAAE;QACT,sBAAsB,EAAE,IAAI;KAC7B;IACD,UAAU,EAAE;QACV,OAAO,EAAE,KAAK;KACf;IACD,OAAO,EAAE,EAAE;CACZ,CAAC"}
@@ -0,0 +1,357 @@
1
+ /**
2
+ * Data model types — the shape of records stored and returned by Facthouse.
3
+ *
4
+ * DIKW here is an engineering abstraction (Ackoff 1989), not a memory-science model.
5
+ * Organised by the DIKW hierarchy:
6
+ *
7
+ * Data SessionEvent Raw interactions, uninterpreted, append-only
8
+ * Information SessionFact LLM-extracted, tagged, awaiting integration
9
+ * Knowledge Fact Integrated, entity-linked, deduplicated, routed
10
+ * Wisdom Inference Gated hypotheses. Default off. Not produced by I→K.
11
+ *
12
+ * Each transformation is explicit:
13
+ * Data → Information Copy / record fill session_events; capture_fact is
14
+ * an optional explicit correction; extraction runs at
15
+ * consolidation
16
+ * Information → Knowledge Event-driven batch consolidation
17
+ * Knowledge → Wisdom capture_inference then validate_inference (opt-in)
18
+ *
19
+ * Session scopes the MCP connection. Conversation identity is written at
20
+ * insert (`client_session_id`, else `mcp_session_id`). Consolidation extracts
21
+ * each conversation separately; it does not invent narrative boundaries.
22
+ */
23
+ /** MCP connection lifecycle — an open-ended container for events and facts. */
24
+ export interface Session {
25
+ id: string;
26
+ source_tool: string | null;
27
+ project: string | null;
28
+ started_at: string;
29
+ last_activity_at: string;
30
+ }
31
+ /** Last-known binding for a live deictic in the current activity. */
32
+ export interface Referent {
33
+ phrase: string;
34
+ binding: string;
35
+ }
36
+ /**
37
+ * A closed activity in one conversation: gist + referents as they were,
38
+ * bounded by event sequence. Return-worthy, not a per-noun granule.
39
+ */
40
+ export interface TopicSegment {
41
+ start_sequence: number;
42
+ end_sequence: number;
43
+ gist: string;
44
+ referents: Referent[];
45
+ }
46
+ /** Which intelligence path produced a fact. One CHECK list in the schema. */
47
+ export declare const SOURCE_QUALITY_VALUES: readonly ["heuristic", "cli", "sampling", "explicit", "http"];
48
+ export type SourceQuality = (typeof SOURCE_QUALITY_VALUES)[number];
49
+ /** A consolidation run over session facts. Can happen multiple times per session. */
50
+ export interface Consolidation {
51
+ id: string;
52
+ session_id: string | null;
53
+ facts_in: number;
54
+ facts_integrated: number;
55
+ facts_rejected: number;
56
+ entities_created: number;
57
+ entities_linked: number;
58
+ supersessions: number;
59
+ summary: string | null;
60
+ open_threads: string[] | null;
61
+ /** Current activity gist for this session_id, if this row carries situation. */
62
+ now: string | null;
63
+ now_start_sequence: number | null;
64
+ now_referents: Referent[] | null;
65
+ segments: TopicSegment[] | null;
66
+ created_at: string;
67
+ }
68
+ /** Who uttered a session event — channel, not a named participant. */
69
+ export type SpeakerRole = "user" | "assistant" | "system" | "tool";
70
+ /**
71
+ * DIKW: Data — raw interaction event. Append-only, never server-purged.
72
+ * The episodic ground truth. Events are grouped into episodes at consolidation.
73
+ */
74
+ export interface SessionEvent {
75
+ id: string;
76
+ /** Openmemory MCP server's connection UUID. Null for hook-sourced events. */
77
+ mcp_session_id: string | null;
78
+ /** AI client's conversation UUID. Null when unknown. */
79
+ client_session_id: string | null;
80
+ sequence: number;
81
+ event_type: "message" | "tool_call" | "tool_result" | "artifact";
82
+ role: SpeakerRole;
83
+ content_type: "text" | "json" | "image" | "audio" | "binary";
84
+ content: string | null;
85
+ /** URI or path for non-text content. Reference, not embed. */
86
+ content_ref: string | null;
87
+ /**
88
+ * Named participant when the transcript has one. Role stays the channel.
89
+ * Null for ordinary user/assistant turns with no name.
90
+ */
91
+ speaker: string | null;
92
+ metadata: Record<string, unknown> | null;
93
+ /** When Facthouse wrote this row. */
94
+ created_at: string;
95
+ /**
96
+ * When the turn was said. Pull copies Claude Code JSONL `timestamp` when
97
+ * present, otherwise null (a backfill must not pretend copying was speech).
98
+ * Hook `record` and MCP `log_event` stamp the call — those fire at the
99
+ * turn, and the hook payload has no clock of its own.
100
+ */
101
+ occurred_at: string | null;
102
+ }
103
+ /**
104
+ * DIKW: Information — captured or extracted fact awaiting consolidation.
105
+ * Also serves as in-session working memory (queryable via get_session_context).
106
+ * Integrates to Fact during consolidation.
107
+ */
108
+ export interface SessionFact {
109
+ id: string;
110
+ session_id: string;
111
+ content: string;
112
+ /** SHA-256 of content for intra-session dedup. */
113
+ content_hash: string;
114
+ /** Who created this: AI via capture_fact ('explicit') or server via event extraction ('inferred'). */
115
+ source_origin: "explicit" | "inferred";
116
+ /** Points to the primary SessionEvent that prompted this capture. */
117
+ source_event_id: string | null;
118
+ domain_hint: string | null;
119
+ /** LLM-suggested subdomain tag (e.g. 'beverage', 'dietary'). */
120
+ subdomain_hint: string | null;
121
+ confidence: number | null;
122
+ importance: number | null;
123
+ /** LLM self-assessed confidence 0–1. */
124
+ confidence_signal: number | null;
125
+ /** LLM-assessed importance/durability 0–1. */
126
+ importance_signal: number | null;
127
+ /** ISO timestamp when this fact became true, if the LLM extracted it. */
128
+ valid_from_hint: string | null;
129
+ /** ISO timestamp when this fact stopped being true, if the LLM extracted it. */
130
+ valid_until_hint: string | null;
131
+ /** JSON-serialised entities attached to this fact by holistic extraction. */
132
+ entities_json: string | null;
133
+ /** Which provider produced this fact. */
134
+ source_quality: SourceQuality;
135
+ source_tool: string | null;
136
+ capture_context: string | null;
137
+ /** UUID of the consolidation run that claimed this fact (null = unclaimed). */
138
+ consolidation_id: string | null;
139
+ /**
140
+ * Role of the primary event this fact was extracted from. Null when there
141
+ * is no primary (rewritten sentences that do not appear in any event, or
142
+ * explicit capture with no source event). Not who the fact is about.
143
+ */
144
+ speaker_role: SpeakerRole | null;
145
+ /** Named participant copied from the primary event. Null when unnamed. */
146
+ speaker: string | null;
147
+ created_at: string;
148
+ }
149
+ /** Provenance link: which events contributed to a session fact. */
150
+ export interface SessionFactSource {
151
+ session_fact_id: string;
152
+ event_id: string;
153
+ /** How central this event was to the extracted fact (0.0–1.0). */
154
+ relevance: number;
155
+ /**
156
+ * 'primary' = stated the fact, 'corroborating' = mentioned again (same
157
+ * speaker), 'contextual' = nearby context, 'assent' = short user yes after
158
+ * a proposal, 'observation' = a tool event that contains the sentence,
159
+ * 'restatement' = a different speaker later said the same sentence.
160
+ */
161
+ extraction_type: ExtractionType;
162
+ }
163
+ export type ExtractionType = "primary" | "corroborating" | "contextual" | "assent" | "observation" | "restatement";
164
+ export declare const BACKING_TYPES: readonly ["assent", "observation", "restatement"];
165
+ export type BackingType = (typeof BACKING_TYPES)[number];
166
+ /**
167
+ * DIKW: Knowledge — integrated fact in the canonical store. Entity-linked,
168
+ * deduplicated, domain-routed. Only enters this table after consolidation.
169
+ */
170
+ export interface Fact {
171
+ id: string;
172
+ content: string;
173
+ domain: string;
174
+ subdomain: string | null;
175
+ confidence: number;
176
+ importance: number;
177
+ source_type: string;
178
+ source_tool: string | null;
179
+ source_id: string | null;
180
+ status: "active" | "superseded" | "rejected";
181
+ superseded_by: string | null;
182
+ is_latest: boolean;
183
+ created_at: string;
184
+ valid_from: string | null;
185
+ valid_until: string | null;
186
+ system_retired_at: string | null;
187
+ session_id: string | null;
188
+ capture_context: string | null;
189
+ access_count: number;
190
+ /** Which intelligence provider produced this fact. Enables provenance
191
+ * tracking and future reprocess passes that upgrade heuristic-era facts. */
192
+ source_quality: SourceQuality;
193
+ /**
194
+ * Role of the primary event, copied from session_facts at integration.
195
+ * Null when unknown. Distinct from source_origin (how it entered I) and
196
+ * source_type (conversation vs inference).
197
+ */
198
+ speaker_role: SpeakerRole | null;
199
+ /** Named participant copied from staging. Null when unnamed. */
200
+ speaker: string | null;
201
+ }
202
+ export interface Entity {
203
+ id: string;
204
+ type: string;
205
+ name: string;
206
+ canonical_name: string;
207
+ metadata: Record<string, unknown> | null;
208
+ created_at: string;
209
+ access_count: number;
210
+ last_accessed_at: string | null;
211
+ /**
212
+ * This entity is the user of this store. At most one row may set it.
213
+ *
214
+ * Stored as 0/1 rather than a boolean because SQLite has no boolean type and
215
+ * the partial unique index that enforces the singleton indexes the raw value.
216
+ */
217
+ is_self: 0 | 1;
218
+ }
219
+ export interface EntityEdge {
220
+ from_entity: string;
221
+ to_entity: string;
222
+ relationship: string;
223
+ strength: number;
224
+ metadata: Record<string, unknown> | null;
225
+ created_at: string;
226
+ last_accessed_at: string | null;
227
+ }
228
+ export interface Source {
229
+ id: string;
230
+ type: string;
231
+ tool_id: string | null;
232
+ timestamp: string;
233
+ raw_content: string | null;
234
+ metadata: Record<string, unknown> | null;
235
+ }
236
+ /**
237
+ * A fact retrieved via an entity, carrying how it relates to that entity.
238
+ *
239
+ * `is_subject` distinguishes "this fact is about Robin" from "this fact happens
240
+ * to name Robin" — the difference between what is known about someone and where
241
+ * they have been mentioned. Surfaced to callers rather than kept internal
242
+ * because an assistant reading these needs it too: a fact naming Robin as an
243
+ * approver should not be repeated back as a fact about Robin.
244
+ */
245
+ export type EntityFact = Fact & {
246
+ is_subject: boolean;
247
+ };
248
+ /**
249
+ * A hypothesis awaiting (or after) a validation gate. Not knowledge until
250
+ * confirmed. Wisdom-layer judgement, gated: I→K never writes these.
251
+ */
252
+ export type InferenceStatus = "pending" | "confirmed" | "rejected";
253
+ export interface Inference {
254
+ id: string;
255
+ hypothesis: string;
256
+ status: InferenceStatus;
257
+ /** Fact ids cited as support. Required at capture; never empty. */
258
+ evidence_fact_ids: string[];
259
+ /**
260
+ * Optional pair of entity ids when the hypothesis is that two existing
261
+ * rows are one thing. Empty unless captured. Confirm writes `same_as`.
262
+ */
263
+ entity_ids: string[];
264
+ reason: string | null;
265
+ /** Integrated fact id, set only when confirmed. */
266
+ fact_id: string | null;
267
+ created_at: string;
268
+ validated_at: string | null;
269
+ }
270
+ export interface SearchResult {
271
+ fact: Fact;
272
+ score: number;
273
+ entities: Entity[];
274
+ source: Source | null;
275
+ /** Extra evidence kinds (assent / observation / restatement), not a score. */
276
+ backing?: BackingType[];
277
+ }
278
+ /** Search response with retrieval quality signals for calling AIs. */
279
+ /**
280
+ * A fact captured but not yet consolidated — knowledge the assistant was told
281
+ * and has not yet integrated.
282
+ *
283
+ * Kept apart from `results` rather than merged into the same ranking, because a
284
+ * pending fact has been through none of the pipeline: not deduplicated, not
285
+ * reconciled against existing knowledge, possibly contradicting a fact already
286
+ * held, with a domain that is still only a hint. It is real knowledge and must
287
+ * be findable — but presenting it as equal to a integrated fact would overstate
288
+ * what is actually known.
289
+ */
290
+ export interface PendingFact {
291
+ id: string;
292
+ content: string;
293
+ /** Where it came from: the assistant via capture_fact, or event extraction. */
294
+ source_origin: "explicit" | "inferred";
295
+ /** Suggested domain, not a routing decision — consolidation may disagree. */
296
+ domain_hint: string | null;
297
+ /**
298
+ * The caller's stated confidence, or the configured default applied at
299
+ * capture. Nullable because the column is — nothing guarantees a value until
300
+ * consolidation scores it properly. Treat it as the assistant's own estimate,
301
+ * not a corroborated score: nothing has yet checked it against what is
302
+ * already known.
303
+ */
304
+ confidence: number | null;
305
+ created_at: string;
306
+ session_id: string;
307
+ }
308
+ export interface SearchResponse {
309
+ results: SearchResult[];
310
+ /**
311
+ * Matching facts captured this session or a previous one that have not been
312
+ * consolidated yet. Keyword-matched only — entities and domains do not exist
313
+ * for a fact until it integrates.
314
+ */
315
+ pending: PendingFact[];
316
+ /**
317
+ * Short raw-log windows around a keyword hit in `session_events`. Filled
318
+ * only when integrated `results` are empty — pattern completion from D, not
319
+ * a second retrieval product. Not extracted, not reconciled; never mixed
320
+ * into `results` or `pending`.
321
+ */
322
+ episodes: EpisodeSlice[];
323
+ /** Estimated fraction of relevant knowledge surfaced (0.0–1.0). */
324
+ coverage_estimate: number;
325
+ /** Confidence in result quality based on score distribution (0.0–1.0). */
326
+ result_confidence: number;
327
+ /** Suggested query refinement when results look thin. */
328
+ suggested_refinement: string | null;
329
+ /**
330
+ * Set when searching as-of system time and the requested instant is before
331
+ * this store started recording `system_retired_at`. Supersessions from the
332
+ * simple-mode era left that column null, so a fact the system had already
333
+ * replaced can still appear as believed at T.
334
+ */
335
+ system_time_warning?: string | null;
336
+ }
337
+ /** One event inside an episode slice. */
338
+ export interface EpisodeEvent {
339
+ id: string;
340
+ sequence: number;
341
+ role: SessionEvent["role"];
342
+ event_type: SessionEvent["event_type"];
343
+ content: string | null;
344
+ /** True on the event whose content matched the query. */
345
+ matched: boolean;
346
+ }
347
+ /**
348
+ * A short window of `session_events` around a keyword hit.
349
+ *
350
+ * `conversation_id` is the client chat id, else the MCP session id, else the
351
+ * hit event's id (same partition as prune).
352
+ */
353
+ export interface EpisodeSlice {
354
+ conversation_id: string;
355
+ events: EpisodeEvent[];
356
+ }
357
+ //# sourceMappingURL=data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/types/data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,+EAA+E;AAC/E,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,qEAAqE;AACrE,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,+DAMxB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAA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AQ,EAAE,YAAY,EAAE,CAAC;IACzB,mEAAmE;IACnE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0EAA0E;IAC1E,iBAAiB,EAAE,MAAM,CAAC;IAC1B,yDAAyD;IACzD,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,yCAAyC;AACzC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3B,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IACvC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,yDAAyD;IACzD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Data model types — the shape of records stored and returned by Facthouse.
3
+ *
4
+ * DIKW here is an engineering abstraction (Ackoff 1989), not a memory-science model.
5
+ * Organised by the DIKW hierarchy:
6
+ *
7
+ * Data SessionEvent Raw interactions, uninterpreted, append-only
8
+ * Information SessionFact LLM-extracted, tagged, awaiting integration
9
+ * Knowledge Fact Integrated, entity-linked, deduplicated, routed
10
+ * Wisdom Inference Gated hypotheses. Default off. Not produced by I→K.
11
+ *
12
+ * Each transformation is explicit:
13
+ * Data → Information Copy / record fill session_events; capture_fact is
14
+ * an optional explicit correction; extraction runs at
15
+ * consolidation
16
+ * Information → Knowledge Event-driven batch consolidation
17
+ * Knowledge → Wisdom capture_inference then validate_inference (opt-in)
18
+ *
19
+ * Session scopes the MCP connection. Conversation identity is written at
20
+ * insert (`client_session_id`, else `mcp_session_id`). Consolidation extracts
21
+ * each conversation separately; it does not invent narrative boundaries.
22
+ */
23
+ /** Which intelligence path produced a fact. One CHECK list in the schema. */
24
+ export const SOURCE_QUALITY_VALUES = [
25
+ "heuristic",
26
+ "cli",
27
+ "sampling",
28
+ "explicit",
29
+ "http",
30
+ ];
31
+ export const BACKING_TYPES = [
32
+ "assent",
33
+ "observation",
34
+ "restatement",
35
+ ];
36
+ //# sourceMappingURL=data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/types/data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AA4BH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,WAAW;IACX,KAAK;IACL,UAAU;IACV,UAAU;IACV,MAAM;CACE,CAAC;AAkIX,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ;IACR,aAAa;IACb,aAAa;CAC+B,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Barrel re-export for all Facthouse types.
3
+ */
4
+ export * from "./config.js";
5
+ export * from "./data.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Barrel re-export for all Facthouse types.
3
+ */
4
+ export * from "./config.js";
5
+ export * from "./data.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Core type definitions for OpenMemory.
3
+ */
4
+ export interface Fact {
5
+ id: string;
6
+ content: string;
7
+ domain: string;
8
+ subdomain: string | null;
9
+ confidence: number;
10
+ importance: number;
11
+ source_type: string;
12
+ source_tool: string | null;
13
+ source_id: string | null;
14
+ status: "active" | "superseded" | "rejected";
15
+ superseded_by: string | null;
16
+ is_latest: boolean;
17
+ created_at: string;
18
+ valid_from: string | null;
19
+ valid_until: string | null;
20
+ system_retired_at: string | null;
21
+ session_id: string | null;
22
+ capture_context: string | null;
23
+ access_count: number;
24
+ }
25
+ export interface Entity {
26
+ id: string;
27
+ type: string;
28
+ name: string;
29
+ canonical_name: string | null;
30
+ metadata: Record<string, unknown> | null;
31
+ created_at: string;
32
+ access_count: number;
33
+ last_accessed_at: string | null;
34
+ }
35
+ export interface EntityEdge {
36
+ from_entity: string;
37
+ to_entity: string;
38
+ relationship: string;
39
+ strength: number;
40
+ metadata: Record<string, unknown> | null;
41
+ created_at: string;
42
+ last_accessed_at: string | null;
43
+ }
44
+ export interface Source {
45
+ id: string;
46
+ type: string;
47
+ tool_id: string | null;
48
+ timestamp: string;
49
+ raw_content: string | null;
50
+ metadata: Record<string, unknown> | null;
51
+ }
52
+ export interface Inference {
53
+ id: string;
54
+ hypothesis: string;
55
+ evidence: string[];
56
+ confidence: number;
57
+ status: "pending" | "confirmed" | "rejected";
58
+ rejection_reason: string | null;
59
+ no_reinfer_until: string | null;
60
+ created_at: string;
61
+ validated_at: string | null;
62
+ }
63
+ export interface SearchResult {
64
+ fact: Fact;
65
+ score: number;
66
+ entities: Entity[];
67
+ source: Source | null;
68
+ }
69
+ /** Search response with metamemory signals for calling AIs. */
70
+ export interface SearchResponse {
71
+ results: SearchResult[];
72
+ /** Estimated fraction of relevant knowledge surfaced (0.0–1.0). */
73
+ coverage_estimate: number;
74
+ /** Confidence in result quality based on score distribution (0.0–1.0). */
75
+ result_confidence: number;
76
+ /** Suggested query refinement when results look thin. */
77
+ suggested_refinement: string | null;
78
+ }
79
+ /** Default importance when not specified by the calling LLM or user config. */
80
+ export declare const DEFAULT_IMPORTANCE = 0.5;
81
+ /** A domain definition — seed domains ship in config, new ones created at runtime. */
82
+ export interface DomainDef {
83
+ name: string;
84
+ subdomains: string[];
85
+ }
86
+ /** Temporal mode configuration. */
87
+ export type TemporalMode = "simple" | "bitemporal";
88
+ export interface TemporalConfig {
89
+ mode: TemporalMode;
90
+ /** ISO timestamp recorded automatically when switching from simple to bitemporal.
91
+ * System-time queries before this date return incomplete results. */
92
+ bitemporal_since: string | null;
93
+ }
94
+ /** Top-level server configuration (loaded from config.json in data dir). */
95
+ export interface ServerConfig {
96
+ storage: {
97
+ provider: "sqlite";
98
+ sqlite?: {
99
+ path: string;
100
+ };
101
+ };
102
+ temporal: TemporalConfig;
103
+ search?: {
104
+ embedding_provider: "openai" | "ollama" | null;
105
+ };
106
+ /** Optional seed domains with suggested subdomains, created on init.
107
+ * New domains can also be created at runtime by the calling LLM or server.
108
+ * If omitted, the server starts with an empty domains table. */
109
+ domains?: DomainDef[];
110
+ /** Optional domain importance defaults. When the calling LLM doesn't
111
+ * specify importance at capture time, the server uses these.
112
+ * Falls back to DEFAULT_IMPORTANCE (0.5) for unconfigured domains. */
113
+ importance_defaults?: Record<string, number>;
114
+ }
115
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,QAAQ,GAAG,YAAY,GAAG,UAAU,CAAC;IAC7C,aAAa,EAAE,MA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