squish-memory 1.2.0 → 1.2.1

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 (449) hide show
  1. package/bin/squish-mcp.mjs +40 -42
  2. package/core/scheduler/cron-scheduler.ts +10 -1
  3. package/core/worker.ts +10 -1
  4. package/package.json +119 -119
  5. package/packages/mcp/src/index.ts +99 -36
  6. package/dist/config.d.ts +0 -106
  7. package/dist/config.js +0 -194
  8. package/dist/core/adapters/config/claude-code.d.ts +0 -45
  9. package/dist/core/adapters/config/claude-code.js +0 -113
  10. package/dist/core/adapters/config/cursor.d.ts +0 -26
  11. package/dist/core/adapters/config/cursor.js +0 -74
  12. package/dist/core/adapters/config/opencode.d.ts +0 -23
  13. package/dist/core/adapters/config/opencode.js +0 -73
  14. package/dist/core/adapters/config/windsurf.d.ts +0 -26
  15. package/dist/core/adapters/config/windsurf.js +0 -74
  16. package/dist/core/adapters/index.d.ts +0 -45
  17. package/dist/core/adapters/index.js +0 -84
  18. package/dist/core/adapters/scripts/install-adapter.d.ts +0 -19
  19. package/dist/core/adapters/scripts/install-adapter.js +0 -149
  20. package/dist/core/adapters/timeline.d.ts +0 -23
  21. package/dist/core/adapters/timeline.js +0 -88
  22. package/dist/core/adapters/types.d.ts +0 -137
  23. package/dist/core/adapters/types.js +0 -50
  24. package/dist/core/agent-preferences.d.ts +0 -16
  25. package/dist/core/agent-preferences.js +0 -124
  26. package/dist/core/algorithms/analytics/token-estimator.d.ts +0 -50
  27. package/dist/core/algorithms/analytics/token-estimator.js +0 -154
  28. package/dist/core/algorithms/detection/hash-filters.d.ts +0 -47
  29. package/dist/core/algorithms/detection/hash-filters.js +0 -190
  30. package/dist/core/algorithms/detection/semantic-ranker.d.ts +0 -32
  31. package/dist/core/algorithms/detection/semantic-ranker.js +0 -118
  32. package/dist/core/algorithms/detection/two-stage-detector.d.ts +0 -52
  33. package/dist/core/algorithms/detection/two-stage-detector.js +0 -299
  34. package/dist/core/algorithms/handlers/approve-merge.d.ts +0 -22
  35. package/dist/core/algorithms/handlers/approve-merge.js +0 -179
  36. package/dist/core/algorithms/handlers/detect-duplicates.d.ts +0 -47
  37. package/dist/core/algorithms/handlers/detect-duplicates.js +0 -145
  38. package/dist/core/algorithms/handlers/get-stats.d.ts +0 -39
  39. package/dist/core/algorithms/handlers/get-stats.js +0 -88
  40. package/dist/core/algorithms/handlers/list-proposals.d.ts +0 -45
  41. package/dist/core/algorithms/handlers/list-proposals.js +0 -83
  42. package/dist/core/algorithms/handlers/preview-merge.d.ts +0 -39
  43. package/dist/core/algorithms/handlers/preview-merge.js +0 -93
  44. package/dist/core/algorithms/handlers/reject-merge.d.ts +0 -28
  45. package/dist/core/algorithms/handlers/reject-merge.js +0 -69
  46. package/dist/core/algorithms/handlers/reverse-merge.d.ts +0 -21
  47. package/dist/core/algorithms/handlers/reverse-merge.js +0 -121
  48. package/dist/core/algorithms/index.d.ts +0 -21
  49. package/dist/core/algorithms/index.js +0 -26
  50. package/dist/core/algorithms/operations/cache-maintenance.d.ts +0 -12
  51. package/dist/core/algorithms/operations/cache-maintenance.js +0 -157
  52. package/dist/core/algorithms/safety/safety-checks.d.ts +0 -18
  53. package/dist/core/algorithms/safety/safety-checks.js +0 -179
  54. package/dist/core/algorithms/strategies/merge-strategies.d.ts +0 -50
  55. package/dist/core/algorithms/strategies/merge-strategies.js +0 -288
  56. package/dist/core/algorithms/types.d.ts +0 -125
  57. package/dist/core/algorithms/types.js +0 -5
  58. package/dist/core/algorithms/utils/response-builder.d.ts +0 -28
  59. package/dist/core/algorithms/utils/response-builder.js +0 -37
  60. package/dist/core/associations.d.ts +0 -33
  61. package/dist/core/associations.js +0 -284
  62. package/dist/core/autosave.d.ts +0 -19
  63. package/dist/core/autosave.js +0 -16
  64. package/dist/core/beliefs/decay.d.ts +0 -27
  65. package/dist/core/beliefs/decay.js +0 -217
  66. package/dist/core/beliefs/extractor.d.ts +0 -9
  67. package/dist/core/beliefs/extractor.js +0 -113
  68. package/dist/core/beliefs/store.d.ts +0 -46
  69. package/dist/core/beliefs/store.js +0 -466
  70. package/dist/core/beliefs/types.d.ts +0 -28
  71. package/dist/core/beliefs/types.js +0 -2
  72. package/dist/core/commands/mcp-server.d.ts +0 -2
  73. package/dist/core/commands/mcp-server.js +0 -6
  74. package/dist/core/commands/remember.d.ts +0 -24
  75. package/dist/core/commands/remember.js +0 -144
  76. package/dist/core/compression.d.ts +0 -45
  77. package/dist/core/compression.js +0 -160
  78. package/dist/core/consolidation.d.ts +0 -37
  79. package/dist/core/consolidation.js +0 -248
  80. package/dist/core/context/agent-context.d.ts +0 -106
  81. package/dist/core/context/agent-context.js +0 -274
  82. package/dist/core/context/context-paging.d.ts +0 -80
  83. package/dist/core/context/context-paging.js +0 -328
  84. package/dist/core/context/context-window.d.ts +0 -40
  85. package/dist/core/context/context-window.js +0 -177
  86. package/dist/core/context/context.d.ts +0 -7
  87. package/dist/core/context/context.js +0 -22
  88. package/dist/core/embeddings/embeddings.d.ts +0 -29
  89. package/dist/core/embeddings/embeddings.js +0 -546
  90. package/dist/core/embeddings/google-multimodal.d.ts +0 -14
  91. package/dist/core/embeddings/google-multimodal.js +0 -146
  92. package/dist/core/embeddings/local-embeddings.d.ts +0 -11
  93. package/dist/core/embeddings/local-embeddings.js +0 -11
  94. package/dist/core/embeddings/qmd-client.d.ts +0 -136
  95. package/dist/core/embeddings/qmd-client.js +0 -403
  96. package/dist/core/embeddings/transformers-local.d.ts +0 -64
  97. package/dist/core/embeddings/transformers-local.js +0 -213
  98. package/dist/core/embeddings.d.ts +0 -2
  99. package/dist/core/embeddings.js +0 -3
  100. package/dist/core/error-handling.d.ts +0 -63
  101. package/dist/core/error-handling.js +0 -173
  102. package/dist/core/graph/entity-deduplicator.d.ts +0 -24
  103. package/dist/core/graph/entity-deduplicator.js +0 -183
  104. package/dist/core/graph/graph-builder.d.ts +0 -46
  105. package/dist/core/graph/graph-builder.js +0 -174
  106. package/dist/core/graph/graph-traversal.d.ts +0 -80
  107. package/dist/core/graph/graph-traversal.js +0 -315
  108. package/dist/core/graph/index.d.ts +0 -19
  109. package/dist/core/graph/index.js +0 -13
  110. package/dist/core/graph/llm-entity-extractor.d.ts +0 -49
  111. package/dist/core/graph/llm-entity-extractor.js +0 -313
  112. package/dist/core/graph/multi-hop-retrieval.d.ts +0 -48
  113. package/dist/core/graph/multi-hop-retrieval.js +0 -215
  114. package/dist/core/graph/relationship-extractor.d.ts +0 -48
  115. package/dist/core/graph/relationship-extractor.js +0 -351
  116. package/dist/core/hooks/agent-hooks.d.ts +0 -83
  117. package/dist/core/hooks/agent-hooks.js +0 -521
  118. package/dist/core/hooks/auto-tagger.d.ts +0 -19
  119. package/dist/core/hooks/auto-tagger.js +0 -155
  120. package/dist/core/hooks/capture-filter.d.ts +0 -41
  121. package/dist/core/hooks/capture-filter.js +0 -128
  122. package/dist/core/hot-cache.d.ts +0 -86
  123. package/dist/core/hot-cache.js +0 -285
  124. package/dist/core/index.d.ts +0 -10
  125. package/dist/core/index.js +0 -11
  126. package/dist/core/ingestion/agent-memory.d.ts +0 -22
  127. package/dist/core/ingestion/agent-memory.js +0 -109
  128. package/dist/core/ingestion/core-memory.d.ts +0 -78
  129. package/dist/core/ingestion/core-memory.js +0 -226
  130. package/dist/core/ingestion/learnings.d.ts +0 -57
  131. package/dist/core/ingestion/learnings.js +0 -205
  132. package/dist/core/ingestion/signal-engine.d.ts +0 -41
  133. package/dist/core/ingestion/signal-engine.js +0 -201
  134. package/dist/core/integrations/obsidian-vault.d.ts +0 -31
  135. package/dist/core/integrations/obsidian-vault.js +0 -156
  136. package/dist/core/layers/generator.d.ts +0 -25
  137. package/dist/core/layers/generator.js +0 -76
  138. package/dist/core/lib/db-client.d.ts +0 -114
  139. package/dist/core/lib/db-client.js +0 -130
  140. package/dist/core/lib/parse-embedding.d.ts +0 -9
  141. package/dist/core/lib/parse-embedding.js +0 -58
  142. package/dist/core/lib/schemas.d.ts +0 -132
  143. package/dist/core/lib/schemas.js +0 -87
  144. package/dist/core/lib/types.d.ts +0 -45
  145. package/dist/core/lib/types.js +0 -6
  146. package/dist/core/lib/utils.d.ts +0 -18
  147. package/dist/core/lib/utils.js +0 -145
  148. package/dist/core/lib/validation.d.ts +0 -38
  149. package/dist/core/lib/validation.js +0 -151
  150. package/dist/core/lifecycle.d.ts +0 -25
  151. package/dist/core/lifecycle.js +0 -292
  152. package/dist/core/logger.d.ts +0 -17
  153. package/dist/core/logger.js +0 -46
  154. package/dist/core/mcp/client.d.ts +0 -17
  155. package/dist/core/mcp/client.js +0 -101
  156. package/dist/core/mcp/index.d.ts +0 -6
  157. package/dist/core/mcp/index.js +0 -6
  158. package/dist/core/mcp/server.d.ts +0 -18
  159. package/dist/core/mcp/server.js +0 -157
  160. package/dist/core/mcp/standalone-server.d.ts +0 -13
  161. package/dist/core/mcp/standalone-server.js +0 -46
  162. package/dist/core/mcp/tools.d.ts +0 -7
  163. package/dist/core/mcp/tools.js +0 -278
  164. package/dist/core/mcp/types.d.ts +0 -87
  165. package/dist/core/mcp/types.js +0 -48
  166. package/dist/core/memory/bridge-discovery.d.ts +0 -50
  167. package/dist/core/memory/bridge-discovery.js +0 -291
  168. package/dist/core/memory/categorizer.d.ts +0 -27
  169. package/dist/core/memory/categorizer.js +0 -306
  170. package/dist/core/memory/conflict-detector.d.ts +0 -7
  171. package/dist/core/memory/conflict-detector.js +0 -43
  172. package/dist/core/memory/consolidation.d.ts +0 -42
  173. package/dist/core/memory/consolidation.js +0 -277
  174. package/dist/core/memory/context-collector.d.ts +0 -10
  175. package/dist/core/memory/context-collector.js +0 -56
  176. package/dist/core/memory/contradiction-resolver.d.ts +0 -40
  177. package/dist/core/memory/contradiction-resolver.js +0 -368
  178. package/dist/core/memory/edit-workflow.d.ts +0 -19
  179. package/dist/core/memory/edit-workflow.js +0 -120
  180. package/dist/core/memory/entity-extractor.d.ts +0 -37
  181. package/dist/core/memory/entity-extractor.js +0 -350
  182. package/dist/core/memory/entity-resolver.d.ts +0 -23
  183. package/dist/core/memory/entity-resolver.js +0 -64
  184. package/dist/core/memory/explain.d.ts +0 -18
  185. package/dist/core/memory/explain.js +0 -92
  186. package/dist/core/memory/fact-deriver.d.ts +0 -31
  187. package/dist/core/memory/fact-deriver.js +0 -236
  188. package/dist/core/memory/fact-extractor.d.ts +0 -24
  189. package/dist/core/memory/fact-extractor.js +0 -89
  190. package/dist/core/memory/feedback-tracker.d.ts +0 -12
  191. package/dist/core/memory/feedback-tracker.js +0 -155
  192. package/dist/core/memory/hooks.d.ts +0 -88
  193. package/dist/core/memory/hooks.js +0 -174
  194. package/dist/core/memory/hybrid-retrieval.d.ts +0 -27
  195. package/dist/core/memory/hybrid-retrieval.js +0 -37
  196. package/dist/core/memory/hybrid-scorer.d.ts +0 -40
  197. package/dist/core/memory/hybrid-scorer.js +0 -267
  198. package/dist/core/memory/hybrid-search.d.ts +0 -23
  199. package/dist/core/memory/hybrid-search.js +0 -596
  200. package/dist/core/memory/importance.d.ts +0 -46
  201. package/dist/core/memory/importance.js +0 -241
  202. package/dist/core/memory/index.d.ts +0 -9
  203. package/dist/core/memory/index.js +0 -11
  204. package/dist/core/memory/loader.d.ts +0 -31
  205. package/dist/core/memory/loader.js +0 -141
  206. package/dist/core/memory/markdown/markdown-storage.d.ts +0 -72
  207. package/dist/core/memory/markdown/markdown-storage.js +0 -243
  208. package/dist/core/memory/memories.d.ts +0 -43
  209. package/dist/core/memory/memories.js +0 -452
  210. package/dist/core/memory/memory-lifecycle.d.ts +0 -8
  211. package/dist/core/memory/memory-lifecycle.js +0 -47
  212. package/dist/core/memory/memory-manager.d.ts +0 -15
  213. package/dist/core/memory/memory-manager.js +0 -46
  214. package/dist/core/memory/migrate.d.ts +0 -21
  215. package/dist/core/memory/migrate.js +0 -134
  216. package/dist/core/memory/normalization.d.ts +0 -7
  217. package/dist/core/memory/normalization.js +0 -26
  218. package/dist/core/memory/path-strengthener.d.ts +0 -39
  219. package/dist/core/memory/path-strengthener.js +0 -150
  220. package/dist/core/memory/progressive-disclosure.d.ts +0 -43
  221. package/dist/core/memory/progressive-disclosure.js +0 -280
  222. package/dist/core/memory/query-processor.d.ts +0 -21
  223. package/dist/core/memory/query-processor.js +0 -106
  224. package/dist/core/memory/query-rewriter.d.ts +0 -13
  225. package/dist/core/memory/query-rewriter.js +0 -118
  226. package/dist/core/memory/response-analyzer.d.ts +0 -9
  227. package/dist/core/memory/response-analyzer.js +0 -61
  228. package/dist/core/memory/retrieval-feedback.d.ts +0 -70
  229. package/dist/core/memory/retrieval-feedback.js +0 -213
  230. package/dist/core/memory/serialization.d.ts +0 -10
  231. package/dist/core/memory/serialization.js +0 -84
  232. package/dist/core/memory/stale-cleaner.d.ts +0 -26
  233. package/dist/core/memory/stale-cleaner.js +0 -97
  234. package/dist/core/memory/stats.d.ts +0 -32
  235. package/dist/core/memory/stats.js +0 -143
  236. package/dist/core/memory/telemetry.d.ts +0 -69
  237. package/dist/core/memory/telemetry.js +0 -313
  238. package/dist/core/memory/temporal-facts.d.ts +0 -41
  239. package/dist/core/memory/temporal-facts.js +0 -283
  240. package/dist/core/memory/temporal-parser.d.ts +0 -32
  241. package/dist/core/memory/temporal-parser.js +0 -385
  242. package/dist/core/memory/trigger-detector.d.ts +0 -21
  243. package/dist/core/memory/trigger-detector.js +0 -79
  244. package/dist/core/memory/write-gate.d.ts +0 -54
  245. package/dist/core/memory/write-gate.js +0 -210
  246. package/dist/core/places/index.d.ts +0 -14
  247. package/dist/core/places/index.js +0 -14
  248. package/dist/core/places/memory-places.d.ts +0 -68
  249. package/dist/core/places/memory-places.js +0 -261
  250. package/dist/core/places/places.d.ts +0 -88
  251. package/dist/core/places/places.js +0 -314
  252. package/dist/core/places/rules.d.ts +0 -74
  253. package/dist/core/places/rules.js +0 -240
  254. package/dist/core/places/walking.d.ts +0 -56
  255. package/dist/core/places/walking.js +0 -121
  256. package/dist/core/projects.d.ts +0 -17
  257. package/dist/core/projects.js +0 -116
  258. package/dist/core/redis.d.ts +0 -11
  259. package/dist/core/redis.js +0 -69
  260. package/dist/core/responses.d.ts +0 -96
  261. package/dist/core/responses.js +0 -122
  262. package/dist/core/runtime/trust-report.d.ts +0 -102
  263. package/dist/core/runtime/trust-report.js +0 -107
  264. package/dist/core/runtime/trust-state.d.ts +0 -12
  265. package/dist/core/runtime/trust-state.js +0 -309
  266. package/dist/core/scheduler/cron-scheduler.d.ts +0 -32
  267. package/dist/core/scheduler/cron-scheduler.js +0 -493
  268. package/dist/core/scheduler/heartbeat.d.ts +0 -11
  269. package/dist/core/scheduler/heartbeat.js +0 -73
  270. package/dist/core/scheduler/index.d.ts +0 -8
  271. package/dist/core/scheduler/index.js +0 -8
  272. package/dist/core/scheduler/job-runner.d.ts +0 -11
  273. package/dist/core/scheduler/job-runner.js +0 -164
  274. package/dist/core/search/conversations.d.ts +0 -25
  275. package/dist/core/search/conversations.js +0 -110
  276. package/dist/core/search/entities.d.ts +0 -12
  277. package/dist/core/search/entities.js +0 -31
  278. package/dist/core/search/folder-context.d.ts +0 -25
  279. package/dist/core/search/folder-context.js +0 -119
  280. package/dist/core/search/graph-boost.d.ts +0 -7
  281. package/dist/core/search/graph-boost.js +0 -23
  282. package/dist/core/search/index.d.ts +0 -4
  283. package/dist/core/search/index.js +0 -5
  284. package/dist/core/search/qmd-wrapper.d.ts +0 -36
  285. package/dist/core/search/qmd-wrapper.js +0 -58
  286. package/dist/core/security/encrypt.d.ts +0 -6
  287. package/dist/core/security/encrypt.js +0 -47
  288. package/dist/core/security/governance.d.ts +0 -26
  289. package/dist/core/security/governance.js +0 -79
  290. package/dist/core/security/privacy.d.ts +0 -23
  291. package/dist/core/security/privacy.js +0 -82
  292. package/dist/core/security/secret-detector.d.ts +0 -32
  293. package/dist/core/security/secret-detector.js +0 -88
  294. package/dist/core/session/auto-load.d.ts +0 -6
  295. package/dist/core/session/auto-load.js +0 -144
  296. package/dist/core/session/entity-tracker.d.ts +0 -62
  297. package/dist/core/session/entity-tracker.js +0 -287
  298. package/dist/core/session/index.d.ts +0 -7
  299. package/dist/core/session/index.js +0 -7
  300. package/dist/core/session/reference-resolver.d.ts +0 -26
  301. package/dist/core/session/reference-resolver.js +0 -121
  302. package/dist/core/session/self-iteration-job.d.ts +0 -35
  303. package/dist/core/session/self-iteration-job.js +0 -387
  304. package/dist/core/session/session-hooks.d.ts +0 -18
  305. package/dist/core/session/session-hooks.js +0 -58
  306. package/dist/core/session/types.d.ts +0 -26
  307. package/dist/core/session/types.js +0 -10
  308. package/dist/core/session/working-set.d.ts +0 -50
  309. package/dist/core/session/working-set.js +0 -212
  310. package/dist/core/snapshots/cleanup.d.ts +0 -9
  311. package/dist/core/snapshots/cleanup.js +0 -12
  312. package/dist/core/snapshots/comparison.d.ts +0 -19
  313. package/dist/core/snapshots/comparison.js +0 -43
  314. package/dist/core/snapshots/creation.d.ts +0 -13
  315. package/dist/core/snapshots/creation.js +0 -117
  316. package/dist/core/snapshots/retrieval.d.ts +0 -7
  317. package/dist/core/snapshots/retrieval.js +0 -41
  318. package/dist/core/snapshots/stats.d.ts +0 -11
  319. package/dist/core/snapshots/stats.js +0 -52
  320. package/dist/core/storage/cache.d.ts +0 -13
  321. package/dist/core/storage/cache.js +0 -202
  322. package/dist/core/storage/database.d.ts +0 -12
  323. package/dist/core/storage/database.js +0 -12
  324. package/dist/core/summarization/cleanup.d.ts +0 -9
  325. package/dist/core/summarization/cleanup.js +0 -12
  326. package/dist/core/summarization/queries.d.ts +0 -9
  327. package/dist/core/summarization/queries.js +0 -28
  328. package/dist/core/summarization/stats.d.ts +0 -14
  329. package/dist/core/summarization/stats.js +0 -52
  330. package/dist/core/summarization/strategies.d.ts +0 -24
  331. package/dist/core/summarization/strategies.js +0 -28
  332. package/dist/core/summarization.d.ts +0 -37
  333. package/dist/core/summarization.js +0 -188
  334. package/dist/core/temporal-facts.d.ts +0 -54
  335. package/dist/core/temporal-facts.js +0 -193
  336. package/dist/core/tracing/collector.d.ts +0 -111
  337. package/dist/core/tracing/collector.js +0 -350
  338. package/dist/core/tracing/visualizer.d.ts +0 -32
  339. package/dist/core/tracing/visualizer.js +0 -165
  340. package/dist/core/utils/cleanup-operations.d.ts +0 -13
  341. package/dist/core/utils/cleanup-operations.js +0 -44
  342. package/dist/core/utils/content-extraction.d.ts +0 -19
  343. package/dist/core/utils/content-extraction.js +0 -75
  344. package/dist/core/utils/filter-builder.d.ts +0 -13
  345. package/dist/core/utils/filter-builder.js +0 -44
  346. package/dist/core/utils/history-traversal.d.ts +0 -13
  347. package/dist/core/utils/history-traversal.js +0 -50
  348. package/dist/core/utils/memory-operations.d.ts +0 -17
  349. package/dist/core/utils/memory-operations.js +0 -43
  350. package/dist/core/utils/query-operations.d.ts +0 -18
  351. package/dist/core/utils/query-operations.js +0 -65
  352. package/dist/core/utils/summarization-helpers.d.ts +0 -17
  353. package/dist/core/utils/summarization-helpers.js +0 -33
  354. package/dist/core/utils/temporal-queries.d.ts +0 -13
  355. package/dist/core/utils/temporal-queries.js +0 -27
  356. package/dist/core/utils/vector-operations.d.ts +0 -71
  357. package/dist/core/utils/vector-operations.js +0 -129
  358. package/dist/core/utils/version-management.d.ts +0 -9
  359. package/dist/core/utils/version-management.js +0 -61
  360. package/dist/core/worker.d.ts +0 -82
  361. package/dist/core/worker.js +0 -272
  362. package/dist/db/adapter.d.ts +0 -7
  363. package/dist/db/adapter.js +0 -175
  364. package/dist/db/bootstrap.d.ts +0 -11
  365. package/dist/db/bootstrap.js +0 -1034
  366. package/dist/db/drizzle/schema-sqlite.d.ts +0 -5538
  367. package/dist/db/drizzle/schema-sqlite.js +0 -763
  368. package/dist/db/drizzle/schema.d.ts +0 -4734
  369. package/dist/db/drizzle/schema.js +0 -859
  370. package/dist/db/drizzle.config.d.ts +0 -3
  371. package/dist/db/drizzle.config.js +0 -12
  372. package/dist/db/index.d.ts +0 -7
  373. package/dist/db/index.js +0 -89
  374. package/dist/db/migrations/associations.d.ts +0 -6
  375. package/dist/db/migrations/associations.js +0 -29
  376. package/dist/db/migrations/beliefs.d.ts +0 -10
  377. package/dist/db/migrations/beliefs.js +0 -76
  378. package/dist/db/migrations/core-memory.d.ts +0 -6
  379. package/dist/db/migrations/core-memory.js +0 -29
  380. package/dist/db/migrations/fts.d.ts +0 -6
  381. package/dist/db/migrations/fts.js +0 -52
  382. package/dist/db/migrations/index.d.ts +0 -25
  383. package/dist/db/migrations/index.js +0 -51
  384. package/dist/db/migrations/indexes.d.ts +0 -6
  385. package/dist/db/migrations/indexes.js +0 -30
  386. package/dist/db/migrations/learnings.d.ts +0 -7
  387. package/dist/db/migrations/learnings.js +0 -26
  388. package/dist/db/migrations/maintenance.d.ts +0 -6
  389. package/dist/db/migrations/maintenance.js +0 -61
  390. package/dist/db/migrations/memories.d.ts +0 -7
  391. package/dist/db/migrations/memories.js +0 -16
  392. package/dist/db/migrations/memory-places.d.ts +0 -6
  393. package/dist/db/migrations/memory-places.js +0 -29
  394. package/dist/db/migrations/places.d.ts +0 -6
  395. package/dist/db/migrations/places.js +0 -43
  396. package/dist/db/migrations/projects.d.ts +0 -3
  397. package/dist/db/migrations/projects.js +0 -13
  398. package/dist/db/migrations/tier-conversion.d.ts +0 -7
  399. package/dist/db/migrations/tier-conversion.js +0 -20
  400. package/dist/db/neon.d.ts +0 -8
  401. package/dist/db/neon.js +0 -20
  402. package/dist/db/schema/beliefs.d.ts +0 -9
  403. package/dist/db/schema/beliefs.js +0 -46
  404. package/dist/db/schema/generator.d.ts +0 -38
  405. package/dist/db/schema/generator.js +0 -108
  406. package/dist/db/schema/index.d.ts +0 -39
  407. package/dist/db/schema/index.js +0 -51
  408. package/dist/db/schema/learnings.d.ts +0 -7
  409. package/dist/db/schema/learnings.js +0 -30
  410. package/dist/db/schema/memories.d.ts +0 -7
  411. package/dist/db/schema/memories.js +0 -81
  412. package/dist/db/schema/projects.d.ts +0 -4
  413. package/dist/db/schema/projects.js +0 -31
  414. package/dist/db/schema/tables/context-sessions.d.ts +0 -9
  415. package/dist/db/schema/tables/context-sessions.js +0 -37
  416. package/dist/db/schema/tables/conversations.d.ts +0 -9
  417. package/dist/db/schema/tables/conversations.js +0 -47
  418. package/dist/db/schema/tables/core-memory.d.ts +0 -9
  419. package/dist/db/schema/tables/core-memory.js +0 -41
  420. package/dist/db/schema/tables/entities.d.ts +0 -9
  421. package/dist/db/schema/tables/entities.js +0 -39
  422. package/dist/db/schema/tables/entity-relations.d.ts +0 -9
  423. package/dist/db/schema/tables/entity-relations.js +0 -31
  424. package/dist/db/schema/tables/learnings.d.ts +0 -9
  425. package/dist/db/schema/tables/learnings.js +0 -66
  426. package/dist/db/schema/tables/memories.d.ts +0 -9
  427. package/dist/db/schema/tables/memories.js +0 -161
  428. package/dist/db/schema/tables/memory-associations.d.ts +0 -9
  429. package/dist/db/schema/tables/memory-associations.js +0 -39
  430. package/dist/db/schema/tables/memory-hash-cache.d.ts +0 -9
  431. package/dist/db/schema/tables/memory-hash-cache.js +0 -29
  432. package/dist/db/schema/tables/memory-merge-history.d.ts +0 -9
  433. package/dist/db/schema/tables/memory-merge-history.js +0 -33
  434. package/dist/db/schema/tables/memory-merge-proposals.d.ts +0 -9
  435. package/dist/db/schema/tables/memory-merge-proposals.js +0 -39
  436. package/dist/db/schema/tables/messages.d.ts +0 -9
  437. package/dist/db/schema/tables/messages.js +0 -41
  438. package/dist/db/schema/tables/namespaces.d.ts +0 -9
  439. package/dist/db/schema/tables/namespaces.js +0 -37
  440. package/dist/db/schema/tables/projects.d.ts +0 -9
  441. package/dist/db/schema/tables/projects.js +0 -31
  442. package/dist/db/schema/tables/users.d.ts +0 -9
  443. package/dist/db/schema/tables/users.js +0 -27
  444. package/dist/db/schema.d.ts +0 -3
  445. package/dist/db/schema.js +0 -11
  446. package/dist/db/supabase.d.ts +0 -9
  447. package/dist/db/supabase.js +0 -24
  448. package/dist/packages/mcp/src/index.d.ts +0 -3
  449. package/dist/packages/mcp/src/index.js +0 -733
@@ -1,43 +0,0 @@
1
- /**
2
- * Places table migrations
3
- */
4
- import { logger } from '../../core/logger.js';
5
- export async function runPlacesMigrations(sqlite) {
6
- const placesTableCheck = sqlite.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='places'").get();
7
- if (!placesTableCheck)
8
- return;
9
- const placesInfo = sqlite.prepare("PRAGMA table_info(places)").all();
10
- const placesColumns = new Set(placesInfo.map(col => col.name));
11
- const placesMigrations = [
12
- { col: 'sort_order', sql: 'ALTER TABLE places ADD COLUMN sort_order INTEGER DEFAULT 0' },
13
- { col: 'loci_index', sql: '' },
14
- ];
15
- for (const migration of placesMigrations) {
16
- if (migration.col === 'loci_index') {
17
- if (placesColumns.has('loci_index') && !placesColumns.has('sort_order')) {
18
- try {
19
- sqlite.exec("UPDATE places SET sort_order = loci_index WHERE sort_order = 0 OR sort_order IS NULL");
20
- logger.info('Migration: Copied loci_index data to sort_order');
21
- }
22
- catch (error) {
23
- const errMsg = error instanceof Error ? error.message : String(error);
24
- logger.warn(`Migration: Could not copy loci_index data: ${errMsg}`);
25
- }
26
- }
27
- continue;
28
- }
29
- if (!placesColumns.has(migration.col)) {
30
- try {
31
- sqlite.exec(migration.sql);
32
- logger.info(`Migration: Added column ${migration.col} to places table`);
33
- }
34
- catch (error) {
35
- const msg = error instanceof Error ? error.message : String(error);
36
- if (!msg.includes('duplicate column name')) {
37
- throw new Error(`Migration failed for places.${migration.col}: ${msg}`);
38
- }
39
- }
40
- }
41
- }
42
- }
43
- //# sourceMappingURL=places.js.map
@@ -1,3 +0,0 @@
1
- import type { Database } from 'better-sqlite3';
2
- export declare function runProjectMigrations(sqlite: Database): Promise<void>;
3
- //# sourceMappingURL=projects.d.ts.map
@@ -1,13 +0,0 @@
1
- import { migrateTable } from '../schema/generator.js';
2
- import { projectsSchema, usersSchema } from '../schema/projects.js';
3
- export async function runProjectMigrations(sqlite) {
4
- const projectCheck = sqlite.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='projects'").get();
5
- if (projectCheck) {
6
- await migrateTable(sqlite, projectsSchema);
7
- }
8
- const userCheck = sqlite.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='users'").get();
9
- if (userCheck) {
10
- await migrateTable(sqlite, usersSchema);
11
- }
12
- }
13
- //# sourceMappingURL=projects.js.map
@@ -1,7 +0,0 @@
1
- /**
2
- * Tier conversion migration
3
- * Converts deprecated 'warm' tier memories to 'cold'
4
- */
5
- import type { Database } from 'better-sqlite3';
6
- export declare function runTierConversion(sqlite: Database): Promise<void>;
7
- //# sourceMappingURL=tier-conversion.d.ts.map
@@ -1,20 +0,0 @@
1
- /**
2
- * Tier conversion migration
3
- * Converts deprecated 'warm' tier memories to 'cold'
4
- */
5
- import { logger } from '../../core/logger.js';
6
- export async function runTierConversion(sqlite) {
7
- const warmMemories = sqlite.prepare("SELECT COUNT(*) as count FROM memories WHERE tier = 'warm'").get();
8
- if (warmMemories && warmMemories.count > 0) {
9
- logger.info(`Migration: Converting ${warmMemories.count} warm-tiered memories to cold`);
10
- try {
11
- sqlite.exec("UPDATE memories SET tier = 'cold' WHERE tier = 'warm'");
12
- logger.info('Migration: Tier conversion complete (warm -> cold)');
13
- }
14
- catch (error) {
15
- const msg = error instanceof Error ? error.message : String(error);
16
- logger.warn(`Migration: Could not convert warm tier: ${msg}`);
17
- }
18
- }
19
- }
20
- //# sourceMappingURL=tier-conversion.js.map
package/dist/db/neon.d.ts DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * Neon client wrapper that returns a Drizzle HTTP client.
3
- * Neon HTTP driver is faster for single non-interactive transactions.
4
- */
5
- export declare function createNeonClient(): Promise<import("drizzle-orm/neon-http").NeonHttpDatabase<Record<string, never>> & {
6
- $client: import("@neondatabase/serverless").NeonQueryFunction<false, false>;
7
- }>;
8
- //# sourceMappingURL=neon.d.ts.map
package/dist/db/neon.js DELETED
@@ -1,20 +0,0 @@
1
- import { config } from '../config.js';
2
- import { neon } from '@neondatabase/serverless';
3
- import { drizzle } from 'drizzle-orm/neon-http';
4
- /**
5
- * Neon client wrapper that returns a Drizzle HTTP client.
6
- * Neon HTTP driver is faster for single non-interactive transactions.
7
- */
8
- export async function createNeonClient() {
9
- if (!config.neonProjectId || !config.neonServiceKey) {
10
- throw new Error('Neon configuration missing (NEON_PROJECT_ID or NEON_SERVICE_KEY)');
11
- }
12
- // Neon HTTP driver - use DATABASE_URL with Neon connection string
13
- const connectionString = process.env.DATABASE_URL;
14
- if (!connectionString) {
15
- throw new Error('DATABASE_URL required for Neon connection');
16
- }
17
- const sql = neon(connectionString);
18
- return drizzle(sql);
19
- }
20
- //# sourceMappingURL=neon.js.map
@@ -1,9 +0,0 @@
1
- /**
2
- * Beliefs table schema for migrations
3
- * Column definitions for ALTER TABLE migrations
4
- */
5
- import type { TableSchema } from '../generator.js';
6
- export declare const beliefsSchema: TableSchema;
7
- export declare const beliefMemorySourcesSchema: TableSchema;
8
- export declare const beliefEdgesSchema: TableSchema;
9
- //# sourceMappingURL=beliefs.d.ts.map
@@ -1,46 +0,0 @@
1
- /**
2
- * Beliefs table schema for migrations
3
- * Column definitions for ALTER TABLE migrations
4
- */
5
- export const beliefsSchema = {
6
- name: 'beliefs',
7
- columns: {
8
- id: { type: 'TEXT', primary: true },
9
- project_id: { type: 'TEXT' },
10
- belief_type: { type: 'TEXT' },
11
- statement: { type: 'TEXT' },
12
- normalized_key: { type: 'TEXT' },
13
- confidence: { type: 'REAL', default: '0.5' },
14
- belief_decay_rate: { type: 'INTEGER', default: '30' },
15
- last_confirmed_at: { type: 'INTEGER' },
16
- source_count: { type: 'INTEGER', default: '1' },
17
- status: { type: 'TEXT', default: "'active'" },
18
- reason: { type: 'TEXT' },
19
- context: { type: 'TEXT' },
20
- evidence_summary: { type: 'TEXT' },
21
- metadata: { type: 'TEXT' },
22
- created_at: { type: 'INTEGER' },
23
- updated_at: { type: 'INTEGER' },
24
- },
25
- };
26
- export const beliefMemorySourcesSchema = {
27
- name: 'belief_memory_sources',
28
- columns: {
29
- id: { type: 'TEXT', primary: true },
30
- belief_id: { type: 'TEXT' },
31
- memory_id: { type: 'TEXT' },
32
- created_at: { type: 'INTEGER' },
33
- },
34
- };
35
- export const beliefEdgesSchema = {
36
- name: 'belief_edges',
37
- columns: {
38
- id: { type: 'TEXT', primary: true },
39
- from_belief_id: { type: 'TEXT' },
40
- to_belief_id: { type: 'TEXT' },
41
- edge_type: { type: 'TEXT' },
42
- metadata: { type: 'TEXT' },
43
- created_at: { type: 'INTEGER' },
44
- },
45
- };
46
- //# sourceMappingURL=beliefs.js.map
@@ -1,38 +0,0 @@
1
- /**
2
- * Migration Generator - Creates migrations from schema definitions
3
- *
4
- * This utility generates ALTER TABLE statements from schema column definitions,
5
- * eliminating the need for inline column arrays in migration files.
6
- */
7
- import type { Database } from 'better-sqlite3';
8
- export interface ColumnDefinition {
9
- type: string;
10
- primary?: boolean;
11
- references?: string;
12
- default?: string;
13
- notNull?: boolean;
14
- }
15
- export interface IndexDefinition {
16
- name: string;
17
- columns: string[];
18
- using?: string;
19
- unique?: boolean;
20
- }
21
- export interface TableSchema {
22
- name: string;
23
- columns: Record<string, ColumnDefinition>;
24
- indexes?: IndexDefinition[];
25
- }
26
- /**
27
- * Generate and run column migrations for a table schema
28
- */
29
- export declare function migrateTable(sqlite: Database, schema: TableSchema): Promise<void>;
30
- /**
31
- * Generate and run index migrations
32
- */
33
- export declare function migrateIndexes(sqlite: Database, tableName: string, indexes: IndexDefinition[]): Promise<void>;
34
- /**
35
- * Run all table migrations from schema list
36
- */
37
- export declare function runAllSchemaMigrations(sqlite: Database, schemas: TableSchema[]): Promise<void>;
38
- //# sourceMappingURL=generator.d.ts.map
@@ -1,108 +0,0 @@
1
- /**
2
- * Migration Generator - Creates migrations from schema definitions
3
- *
4
- * This utility generates ALTER TABLE statements from schema column definitions,
5
- * eliminating the need for inline column arrays in migration files.
6
- */
7
- import { logger } from '../../core/logger.js';
8
- /**
9
- * Get existing columns for a table
10
- */
11
- function getExistingColumns(sqlite, tableName) {
12
- try {
13
- const tableInfo = sqlite.prepare(`PRAGMA table_info(${tableName})`).all();
14
- return new Set(tableInfo.map(col => col.name));
15
- }
16
- catch {
17
- return new Set();
18
- }
19
- }
20
- /**
21
- * Get existing indexes for a table
22
- */
23
- function getExistingIndexes(sqlite, tableName) {
24
- try {
25
- const indexes = sqlite.prepare("SELECT name FROM sqlite_master WHERE type='index' AND tbl_name=?").all(tableName);
26
- return new Set(indexes.map(idx => idx.name));
27
- }
28
- catch {
29
- return new Set();
30
- }
31
- }
32
- /**
33
- * Generate and run column migrations for a table schema
34
- */
35
- export async function migrateTable(sqlite, schema) {
36
- const existingColumns = getExistingColumns(sqlite, schema.name);
37
- for (const [columnName, definition] of Object.entries(schema.columns)) {
38
- if (!existingColumns.has(columnName)) {
39
- const sql = generateAlterTable(schema.name, columnName, definition);
40
- try {
41
- sqlite.exec(sql);
42
- logger.info(`Migration: Added column ${columnName} to ${schema.name}`);
43
- }
44
- catch (error) {
45
- const msg = error instanceof Error ? error.message : String(error);
46
- if (msg.includes('duplicate column name')) {
47
- logger.debug(`Migration skipped for ${schema.name}.${columnName}: already exists`);
48
- }
49
- else {
50
- throw new Error(`Migration failed for ${schema.name}.${columnName}: ${msg}`);
51
- }
52
- }
53
- }
54
- }
55
- // Handle indexes
56
- if (schema.indexes) {
57
- await migrateIndexes(sqlite, schema.name, schema.indexes);
58
- }
59
- }
60
- /**
61
- * Generate and run index migrations
62
- */
63
- export async function migrateIndexes(sqlite, tableName, indexes) {
64
- const existingIndexes = getExistingIndexes(sqlite, tableName);
65
- for (const indexDef of indexes) {
66
- if (!existingIndexes.has(indexDef.name)) {
67
- const sql = generateCreateIndex(tableName, indexDef);
68
- try {
69
- sqlite.exec(sql);
70
- logger.info(`Migration: Added index ${indexDef.name}`);
71
- }
72
- catch (error) {
73
- const msg = error instanceof Error ? error.message : String(error);
74
- logger.warn(`Index migration failed for ${indexDef.name}: ${msg}`);
75
- }
76
- }
77
- }
78
- }
79
- /**
80
- * Generate ALTER TABLE ADD COLUMN statement
81
- */
82
- function generateAlterTable(tableName, columnName, definition) {
83
- let sql = `ALTER TABLE ${tableName} ADD COLUMN ${columnName} ${definition.type}`;
84
- if (definition.default) {
85
- sql += ` DEFAULT ${definition.default}`;
86
- }
87
- return sql;
88
- }
89
- /**
90
- * Generate CREATE INDEX statement
91
- */
92
- function generateCreateIndex(tableName, indexDef) {
93
- const columns = indexDef.columns.join(', ');
94
- const unique = indexDef.unique ? 'UNIQUE ' : '';
95
- return `CREATE ${unique}INDEX IF NOT EXISTS ${indexDef.name} ON ${tableName}(${columns})`;
96
- }
97
- /**
98
- * Run all table migrations from schema list
99
- */
100
- export async function runAllSchemaMigrations(sqlite, schemas) {
101
- for (const schema of schemas) {
102
- const tableCheck = sqlite.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name=?").get(schema.name);
103
- if (tableCheck) {
104
- await migrateTable(sqlite, schema);
105
- }
106
- }
107
- }
108
- //# sourceMappingURL=generator.js.map
@@ -1,39 +0,0 @@
1
- /**
2
- * Schema Index - Table schema definitions
3
- *
4
- * DEPRECATED: This module was previously used to aggregate table schemas.
5
- * Table definitions are now in db/bootstrap.ts for first-time setup
6
- * and db/schema/*.ts for migration column definitions.
7
- *
8
- * These exports remain for backward compatibility but return empty arrays.
9
- */
10
- import type { TableSchema } from './generator.js';
11
- export { memoriesSchema } from './memories.js';
12
- export { learningsSchema } from './learnings.js';
13
- export { beliefsSchema, beliefMemorySourcesSchema, beliefEdgesSchema } from './beliefs.js';
14
- /**
15
- * Table schemas for migration utilities
16
- * @deprecated Use db/schema/memories.ts, db/schema/learnings.ts, db/schema/beliefs.ts directly
17
- */
18
- export declare const tableSchemas: TableSchema[];
19
- /**
20
- * Generate complete SQLite schema SQL
21
- * @deprecated Table definitions moved to db/bootstrap.ts
22
- */
23
- export declare function generateSqliteSchema(): string;
24
- /**
25
- * Generate complete PostgreSQL schema SQL
26
- * @deprecated Table definitions moved to db/bootstrap.ts
27
- */
28
- export declare function generatePostgresSchema(): string;
29
- /**
30
- * Get all SQLite table definitions in order
31
- * @deprecated Table definitions moved to db/bootstrap.ts
32
- */
33
- export declare function getAllSqliteTables(): string[];
34
- /**
35
- * Get all PostgreSQL table definitions in order
36
- * @deprecated Table definitions moved to db/bootstrap.ts
37
- */
38
- export declare function getAllPostgresTables(): string[];
39
- //# sourceMappingURL=index.d.ts.map
@@ -1,51 +0,0 @@
1
- /**
2
- * Schema Index - Table schema definitions
3
- *
4
- * DEPRECATED: This module was previously used to aggregate table schemas.
5
- * Table definitions are now in db/bootstrap.ts for first-time setup
6
- * and db/schema/*.ts for migration column definitions.
7
- *
8
- * These exports remain for backward compatibility but return empty arrays.
9
- */
10
- // Re-export migration schemas for compatibility
11
- export { memoriesSchema } from './memories.js';
12
- export { learningsSchema } from './learnings.js';
13
- export { beliefsSchema, beliefMemorySourcesSchema, beliefEdgesSchema } from './beliefs.js';
14
- /**
15
- * Table schemas for migration utilities
16
- * @deprecated Use db/schema/memories.ts, db/schema/learnings.ts, db/schema/beliefs.ts directly
17
- */
18
- export const tableSchemas = [];
19
- /**
20
- * Generate complete SQLite schema SQL
21
- * @deprecated Table definitions moved to db/bootstrap.ts
22
- */
23
- export function generateSqliteSchema() {
24
- console.warn('DEPRECATED: generateSqliteSchema() - table definitions are in db/bootstrap.ts');
25
- return '';
26
- }
27
- /**
28
- * Generate complete PostgreSQL schema SQL
29
- * @deprecated Table definitions moved to db/bootstrap.ts
30
- */
31
- export function generatePostgresSchema() {
32
- console.warn('DEPRECATED: generatePostgresSchema() - table definitions are in db/bootstrap.ts');
33
- return '';
34
- }
35
- /**
36
- * Get all SQLite table definitions in order
37
- * @deprecated Table definitions moved to db/bootstrap.ts
38
- */
39
- export function getAllSqliteTables() {
40
- console.warn('DEPRECATED: getAllSqliteTables() - table definitions are in db/bootstrap.ts');
41
- return [];
42
- }
43
- /**
44
- * Get all PostgreSQL table definitions in order
45
- * @deprecated Table definitions moved to db/bootstrap.ts
46
- */
47
- export function getAllPostgresTables() {
48
- console.warn('DEPRECATED: getAllPostgresTables() - table definitions are in db/bootstrap.ts');
49
- return [];
50
- }
51
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- /**
2
- * Learnings table schema for migrations
3
- * Column definitions for ALTER TABLE migrations
4
- */
5
- import type { TableSchema } from '../generator.js';
6
- export declare const learningsSchema: TableSchema;
7
- //# sourceMappingURL=learnings.d.ts.map
@@ -1,30 +0,0 @@
1
- /**
2
- * Learnings table schema for migrations
3
- * Column definitions for ALTER TABLE migrations
4
- */
5
- export const learningsSchema = {
6
- name: 'learnings',
7
- columns: {
8
- id: { type: 'TEXT', primary: true },
9
- project_id: { type: 'TEXT' },
10
- type: { type: 'TEXT' },
11
- content: { type: 'TEXT' },
12
- summary: { type: 'TEXT' },
13
- source: { type: 'TEXT' },
14
- confidence: { type: 'INTEGER', default: '50' },
15
- confidence_level: { type: 'TEXT', default: "'speculative'" },
16
- tags: { type: 'TEXT' },
17
- metadata: { type: 'TEXT' },
18
- embedding: { type: 'BLOB' },
19
- folder_path: { type: 'TEXT' },
20
- project_path: { type: 'TEXT' },
21
- is_private: { type: 'INTEGER', default: '0' },
22
- has_secrets: { type: 'INTEGER', default: '0' },
23
- relevance_score: { type: 'INTEGER', default: '50' },
24
- memory_id: { type: 'TEXT' },
25
- is_imported: { type: 'INTEGER', default: '0' },
26
- created_at: { type: 'INTEGER' },
27
- updated_at: { type: 'INTEGER' },
28
- },
29
- };
30
- //# sourceMappingURL=learnings.js.map
@@ -1,7 +0,0 @@
1
- /**
2
- * Memories table schema for migrations
3
- * Column definitions for ALTER TABLE migrations
4
- */
5
- import type { TableSchema } from '../generator.js';
6
- export declare const memoriesSchema: TableSchema;
7
- //# sourceMappingURL=memories.d.ts.map
@@ -1,81 +0,0 @@
1
- /**
2
- * Memories table schema for migrations
3
- * Column definitions for ALTER TABLE migrations
4
- */
5
- export const memoriesSchema = {
6
- name: 'memories',
7
- columns: {
8
- id: { type: 'TEXT', primary: true },
9
- project_id: { type: 'TEXT' },
10
- user_id: { type: 'TEXT' },
11
- type: { type: 'TEXT' },
12
- content: { type: 'TEXT' },
13
- summary: { type: 'TEXT' },
14
- embedding_json: { type: 'TEXT' },
15
- embedding: { type: 'BLOB' },
16
- source: { type: 'TEXT' },
17
- confidence: { type: 'INTEGER', default: '50' },
18
- confidence_level: { type: 'TEXT', default: "'speculative'" },
19
- tags: { type: 'TEXT' },
20
- metadata: { type: 'TEXT' },
21
- is_private: { type: 'INTEGER', default: '0' },
22
- has_secrets: { type: 'INTEGER', default: '0' },
23
- relevance_score: { type: 'INTEGER', default: '50' },
24
- is_active: { type: 'INTEGER', default: '1' },
25
- expires_at: { type: 'INTEGER' },
26
- access_count: { type: 'INTEGER', default: '0' },
27
- last_accessed_at: { type: 'INTEGER' },
28
- is_merged: { type: 'INTEGER', default: '0' },
29
- merged_into_id: { type: 'TEXT' },
30
- merged_at: { type: 'INTEGER' },
31
- is_canonical: { type: 'INTEGER', default: '0' },
32
- merge_source_ids: { type: 'TEXT' },
33
- is_mergeable: { type: 'INTEGER', default: '1' },
34
- merge_version: { type: 'INTEGER', default: '1' },
35
- namespace_id: { type: 'TEXT' },
36
- namespace_path: { type: 'TEXT' },
37
- has_l0_abstract: { type: 'INTEGER', default: '0' },
38
- has_l1_overview: { type: 'INTEGER', default: '0' },
39
- last_layer_update: { type: 'INTEGER' },
40
- importance_score: { type: 'INTEGER', default: '50' },
41
- importance_decay_rate: { type: 'INTEGER', default: '30' },
42
- last_importance_recalc: { type: 'INTEGER' },
43
- retrieval_priority: { type: 'INTEGER', default: '50' },
44
- tokens_estimate: { type: 'INTEGER', default: '0' },
45
- consolidated_into: { type: 'TEXT' },
46
- consolidated_at: { type: 'INTEGER' },
47
- is_consolidated: { type: 'INTEGER', default: '0' },
48
- sector: { type: 'TEXT', default: "'episodic'" },
49
- tier: { type: 'TEXT', default: "'hot'" },
50
- status: { type: 'TEXT', default: "'active'" },
51
- encrypted_content: { type: 'TEXT' },
52
- encryption_nonce: { type: 'TEXT' },
53
- is_encrypted: { type: 'INTEGER', default: '0' },
54
- context_status: { type: 'TEXT', default: "'out-of-context'" },
55
- decay_rate: { type: 'INTEGER', default: '30' },
56
- coactivation_score: { type: 'INTEGER', default: '0' },
57
- last_decay_at: { type: 'INTEGER' },
58
- agent_id: { type: 'TEXT' },
59
- agent_role: { type: 'TEXT' },
60
- visibility_scope: { type: 'TEXT', default: "'private'" },
61
- is_protected: { type: 'INTEGER', default: '0' },
62
- is_pinned: { type: 'INTEGER', default: '0' },
63
- is_immutable: { type: 'INTEGER', default: '0' },
64
- write_scope: { type: 'TEXT' },
65
- read_scope: { type: 'TEXT' },
66
- triggered_by: { type: 'TEXT' },
67
- capture_reason: { type: 'TEXT' },
68
- last_used_at: { type: 'INTEGER' },
69
- usage_count: { type: 'INTEGER', default: '0' },
70
- valid_from: { type: 'INTEGER' },
71
- valid_to: { type: 'INTEGER' },
72
- recorded_at: { type: 'INTEGER' },
73
- superseded_by: { type: 'TEXT' },
74
- version: { type: 'INTEGER', default: '1' },
75
- place_id: { type: 'TEXT' },
76
- place_sort_order: { type: 'INTEGER', default: '0' },
77
- created_at: { type: 'INTEGER' },
78
- updated_at: { type: 'INTEGER' },
79
- },
80
- };
81
- //# sourceMappingURL=memories.js.map
@@ -1,4 +0,0 @@
1
- import type { TableSchema } from '../generator.js';
2
- export declare const projectsSchema: TableSchema;
3
- export declare const usersSchema: TableSchema;
4
- //# sourceMappingURL=projects.d.ts.map
@@ -1,31 +0,0 @@
1
- export const projectsSchema = {
2
- name: 'projects',
3
- columns: {
4
- id: { type: 'TEXT', primary: true },
5
- name: { type: 'TEXT' },
6
- path: { type: 'TEXT' },
7
- description: { type: 'TEXT' },
8
- metadata: { type: 'TEXT' },
9
- created_at: { type: 'INTEGER' },
10
- updated_at: { type: 'INTEGER' },
11
- },
12
- indexes: [
13
- {
14
- name: 'projects_path_idx',
15
- columns: ['path'],
16
- },
17
- ],
18
- };
19
- export const usersSchema = {
20
- name: 'users',
21
- columns: {
22
- id: { type: 'TEXT', primary: true },
23
- external_id: { type: 'TEXT' },
24
- name: { type: 'TEXT' },
25
- email: { type: 'TEXT' },
26
- preferences: { type: 'TEXT' },
27
- created_at: { type: 'INTEGER' },
28
- updated_at: { type: 'INTEGER' },
29
- },
30
- };
31
- //# sourceMappingURL=projects.js.map
@@ -1,9 +0,0 @@
1
- /**
2
- * Context Sessions Table Schema
3
- * SQLite and PostgreSQL definitions
4
- */
5
- export declare const contextSessionsTable: {
6
- sqlite: string;
7
- postgres: string;
8
- };
9
- //# sourceMappingURL=context-sessions.d.ts.map
@@ -1,37 +0,0 @@
1
- /**
2
- * Context Sessions Table Schema
3
- * SQLite and PostgreSQL definitions
4
- */
5
- export const contextSessionsTable = {
6
- sqlite: `
7
- CREATE TABLE IF NOT EXISTS context_sessions (
8
- id TEXT PRIMARY KEY,
9
- project_id TEXT REFERENCES projects(id) ON DELETE CASCADE,
10
- session_id TEXT NOT NULL,
11
- status TEXT DEFAULT 'active',
12
- memory_ids TEXT,
13
- token_count INTEGER DEFAULT 0,
14
- started_at INTEGER DEFAULT (strftime('%s','now')) NOT NULL,
15
- ended_at INTEGER,
16
- metadata TEXT
17
- );
18
-
19
- CREATE INDEX IF NOT EXISTS context_sessions_project_idx ON context_sessions(project_id);
20
- CREATE INDEX IF NOT EXISTS context_sessions_session_idx ON context_sessions(session_id);`,
21
- postgres: `
22
- CREATE TABLE IF NOT EXISTS context_sessions (
23
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
24
- project_id UUID REFERENCES projects(id) ON DELETE CASCADE,
25
- session_id TEXT NOT NULL,
26
- status TEXT DEFAULT 'active',
27
- memory_ids TEXT[],
28
- token_count INTEGER DEFAULT 0,
29
- started_at TIMESTAMPTZ DEFAULT NOW() NOT NULL,
30
- ended_at TIMESTAMPTZ,
31
- metadata JSONB
32
- );
33
-
34
- CREATE INDEX IF NOT EXISTS context_sessions_project_idx ON context_sessions(project_id);
35
- CREATE INDEX IF NOT EXISTS context_sessions_session_idx ON context_sessions(session_id);`,
36
- };
37
- //# sourceMappingURL=context-sessions.js.map
@@ -1,9 +0,0 @@
1
- /**
2
- * Conversations Table Schema
3
- * SQLite and PostgreSQL definitions
4
- */
5
- export declare const conversationsTable: {
6
- sqlite: string;
7
- postgres: string;
8
- };
9
- //# sourceMappingURL=conversations.d.ts.map