squish-memory 1.0.2 → 1.2.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 (704) hide show
  1. package/.env.example +146 -0
  2. package/CHANGELOG.md +202 -0
  3. package/README.md +192 -287
  4. package/{scripts → bin}/dependency-manager.mjs +217 -217
  5. package/{scripts → bin}/detect-clients.mjs +78 -78
  6. package/bin/install-interactive.mjs +321 -0
  7. package/bin/squish-mcp.mjs +46 -0
  8. package/bin/squish.mjs +33 -0
  9. package/config/mcp-migration-map.json +1 -6
  10. package/config/mcp-mode-semantics.json +10 -12
  11. package/config/mcp-remote-auth.json +3 -26
  12. package/config/mcp-universal.schema.json +5 -35
  13. package/config/settings.json +78 -22
  14. package/config.js +5 -0
  15. package/config.ts +218 -0
  16. package/core/adapters/config/claude-code.ts +133 -0
  17. package/core/adapters/config/cursor.ts +90 -0
  18. package/core/adapters/config/opencode.ts +89 -0
  19. package/core/adapters/config/windsurf.ts +90 -0
  20. package/core/adapters/index.ts +102 -0
  21. package/core/adapters/timeline.ts +116 -0
  22. package/core/adapters/types.ts +166 -0
  23. package/core/agent-preferences.ts +140 -0
  24. package/core/algorithms/analytics/token-estimator.ts +216 -0
  25. package/core/algorithms/detection/hash-filters.ts +260 -0
  26. package/core/algorithms/detection/semantic-ranker.ts +194 -0
  27. package/core/algorithms/detection/two-stage-detector.ts +421 -0
  28. package/core/algorithms/handlers/approve-merge.ts +215 -0
  29. package/core/algorithms/handlers/detect-duplicates.ts +192 -0
  30. package/core/algorithms/handlers/get-stats.ts +132 -0
  31. package/core/algorithms/handlers/list-proposals.ts +130 -0
  32. package/core/algorithms/handlers/preview-merge.ts +139 -0
  33. package/core/algorithms/handlers/reject-merge.ts +93 -0
  34. package/core/algorithms/handlers/reverse-merge.ts +155 -0
  35. package/core/algorithms/index.ts +39 -0
  36. package/core/algorithms/operations/cache-maintenance.ts +182 -0
  37. package/core/algorithms/safety/safety-checks.ts +256 -0
  38. package/core/algorithms/strategies/merge-strategies.ts +381 -0
  39. package/core/algorithms/types.ts +140 -0
  40. package/core/algorithms/utils/response-builder.ts +61 -0
  41. package/core/associations.ts +363 -0
  42. package/core/beliefs/decay.ts +289 -0
  43. package/core/beliefs/extractor.ts +131 -0
  44. package/core/beliefs/store.ts +557 -0
  45. package/core/beliefs/types.ts +38 -0
  46. package/core/commands/mcp-server.ts +5 -0
  47. package/core/compression.ts +177 -0
  48. package/core/config.js +2 -0
  49. package/core/consolidation.ts +330 -0
  50. package/core/context/agent-context.ts +388 -0
  51. package/core/context/context-paging.ts +449 -0
  52. package/core/context/context-window.ts +234 -0
  53. package/core/context/context.ts +35 -0
  54. package/core/embeddings/embeddings.ts +616 -0
  55. package/core/embeddings/google-multimodal.ts +200 -0
  56. package/core/embeddings/local-embeddings.ts +12 -0
  57. package/core/embeddings/qmd-client.ts +495 -0
  58. package/core/embeddings/transformers-local.ts +261 -0
  59. package/core/embeddings.js +4 -0
  60. package/core/error-handling.ts +206 -0
  61. package/core/external +219 -0
  62. package/core/graph/entity-deduplicator.ts +232 -0
  63. package/core/graph/graph-builder.ts +257 -0
  64. package/core/graph/graph-traversal.ts +490 -0
  65. package/core/graph/index.ts +24 -0
  66. package/core/graph/llm-entity-extractor.ts +402 -0
  67. package/core/graph/multi-hop-retrieval.ts +317 -0
  68. package/core/graph/relationship-extractor.ts +465 -0
  69. package/core/hooks/agent-hooks.ts +653 -0
  70. package/core/hooks/auto-tagger.ts +149 -0
  71. package/core/hooks/capture-filter.ts +169 -0
  72. package/core/hot-cache.ts +388 -0
  73. package/core/index.ts +10 -0
  74. package/core/ingestion/agent-memory.ts +167 -0
  75. package/core/ingestion/core-memory.ts +326 -0
  76. package/core/ingestion/learnings.ts +260 -0
  77. package/core/ingestion/signal-engine.ts +266 -0
  78. package/core/integrations/obsidian-vault.ts +197 -0
  79. package/core/layers/generator.ts +115 -0
  80. package/core/lib/db-client.ts +168 -0
  81. package/core/lib/parse-embedding.ts +59 -0
  82. package/core/lib/schemas.ts +102 -0
  83. package/core/lib/types.ts +49 -0
  84. package/core/lib/utils.ts +151 -0
  85. package/core/lib/validation.ts +180 -0
  86. package/core/lifecycle.ts +353 -0
  87. package/core/logger.ts +59 -0
  88. package/core/memory/bridge-discovery.ts +395 -0
  89. package/core/memory/categorizer.ts +390 -0
  90. package/core/memory/conflict-detector.ts +62 -0
  91. package/core/memory/consolidation.ts +372 -0
  92. package/core/memory/context-collector.ts +75 -0
  93. package/core/memory/contradiction-resolver.ts +494 -0
  94. package/core/memory/edit-workflow.ts +174 -0
  95. package/core/memory/entity-extractor.ts +426 -0
  96. package/core/memory/entity-resolver.ts +89 -0
  97. package/core/memory/explain.ts +112 -0
  98. package/core/memory/fact-deriver.ts +300 -0
  99. package/core/memory/fact-extractor.ts +120 -0
  100. package/core/memory/feedback-tracker.ts +200 -0
  101. package/core/memory/hooks.ts +230 -0
  102. package/core/memory/hybrid-retrieval.ts +65 -0
  103. package/core/memory/hybrid-scorer.ts +325 -0
  104. package/core/memory/hybrid-search.ts +748 -0
  105. package/core/memory/importance.ts +319 -0
  106. package/core/memory/index.ts +11 -0
  107. package/core/memory/loader.ts +178 -0
  108. package/core/memory/markdown/markdown-storage.ts +318 -0
  109. package/core/memory/memories.ts +565 -0
  110. package/core/memory/memory-lifecycle.ts +51 -0
  111. package/core/memory/memory-manager.ts +53 -0
  112. package/core/memory/migrate.ts +173 -0
  113. package/core/memory/normalization.ts +30 -0
  114. package/core/memory/path-strengthener.ts +211 -0
  115. package/core/memory/progressive-disclosure.ts +392 -0
  116. package/core/memory/query-processor.ts +130 -0
  117. package/core/memory/query-rewriter.ts +153 -0
  118. package/core/memory/response-analyzer.ts +81 -0
  119. package/core/memory/retrieval-feedback.ts +276 -0
  120. package/core/memory/serialization.ts +83 -0
  121. package/core/memory/stale-cleaner.ts +147 -0
  122. package/core/memory/stats.ts +181 -0
  123. package/core/memory/telemetry.ts +392 -0
  124. package/core/memory/temporal-facts.ts +356 -0
  125. package/core/memory/temporal-parser.ts +477 -0
  126. package/core/memory/trigger-detector.ts +104 -0
  127. package/core/memory/write-gate.ts +288 -0
  128. package/core/places/index.ts +14 -0
  129. package/core/places/memory-places.ts +339 -0
  130. package/core/places/places.ts +406 -0
  131. package/core/places/rules.ts +308 -0
  132. package/core/places/walking.ts +192 -0
  133. package/core/projects +89 -0
  134. package/core/projects.ts +131 -0
  135. package/core/redis.ts +82 -0
  136. package/core/responses.ts +187 -0
  137. package/core/runtime/trust-report.ts +195 -0
  138. package/core/runtime/trust-state.ts +360 -0
  139. package/core/scheduler/cron-scheduler.ts +581 -0
  140. package/core/scheduler/heartbeat.ts +91 -0
  141. package/core/scheduler/index.ts +8 -0
  142. package/core/scheduler/job-runner.ts +197 -0
  143. package/core/search/conversations.ts +166 -0
  144. package/core/search/entities.ts +46 -0
  145. package/core/search/folder-context.ts +154 -0
  146. package/core/search/graph-boost.ts +22 -0
  147. package/core/search/index.ts +4 -0
  148. package/core/search/qmd-wrapper.ts +84 -0
  149. package/core/security/encrypt.ts +51 -0
  150. package/core/security/governance.ts +102 -0
  151. package/core/security/privacy.ts +108 -0
  152. package/core/security/secret-detector.ts +122 -0
  153. package/core/session/auto-load.ts +160 -0
  154. package/core/session/entity-tracker.ts +363 -0
  155. package/core/session/index.ts +7 -0
  156. package/core/session/reference-resolver.ts +158 -0
  157. package/core/session/self-iteration-job.ts +478 -0
  158. package/core/session/session-hooks.ts +69 -0
  159. package/core/session/types.ts +36 -0
  160. package/core/session/working-set.ts +275 -0
  161. package/core/snapshots/cleanup.ts +13 -0
  162. package/core/snapshots/comparison.ts +59 -0
  163. package/core/snapshots/creation.ts +139 -0
  164. package/core/snapshots/retrieval.ts +44 -0
  165. package/core/snapshots/stats.ts +63 -0
  166. package/core/storage/cache.ts +241 -0
  167. package/core/storage/database.ts +23 -0
  168. package/core/summarization/cleanup.ts +13 -0
  169. package/core/summarization/queries.ts +32 -0
  170. package/core/summarization/stats.ts +64 -0
  171. package/core/summarization/strategies.ts +52 -0
  172. package/core/summarization.ts +248 -0
  173. package/core/temporal-facts.ts +244 -0
  174. package/core/tracing/collector.ts +470 -0
  175. package/core/tracing/visualizer.ts +195 -0
  176. package/core/utils/cleanup-operations.ts +50 -0
  177. package/core/utils/content-extraction.ts +95 -0
  178. package/core/utils/filter-builder.ts +56 -0
  179. package/core/utils/history-traversal.ts +63 -0
  180. package/core/utils/memory-operations.ts +56 -0
  181. package/core/utils/query-operations.ts +83 -0
  182. package/core/utils/summarization-helpers.ts +45 -0
  183. package/core/utils/temporal-queries.ts +39 -0
  184. package/core/utils/vector-operations.ts +135 -0
  185. package/core/utils/version-management.ts +74 -0
  186. package/core/worker.ts +324 -0
  187. package/db/adapter.ts +215 -0
  188. package/db/bootstrap.ts +1055 -0
  189. package/db/drizzle/migrations/0000_needy_cerebro.sql +402 -0
  190. package/db/drizzle/migrations/meta/0000_snapshot.json +3451 -0
  191. package/db/drizzle/migrations/meta/_journal.json +13 -0
  192. package/db/drizzle/schema-sqlite.ts +1032 -0
  193. package/db/drizzle/schema.ts +1128 -0
  194. package/db/drizzle.config.ts +12 -0
  195. package/db/index.ts +83 -0
  196. package/db/init.sql +5 -0
  197. package/db/migrations/associations.ts +35 -0
  198. package/db/migrations/beliefs.ts +89 -0
  199. package/db/migrations/core-memory.ts +35 -0
  200. package/db/migrations/fts.ts +59 -0
  201. package/db/migrations/index.ts +54 -0
  202. package/db/migrations/indexes.ts +36 -0
  203. package/db/migrations/learnings.ts +34 -0
  204. package/db/migrations/maintenance.ts +68 -0
  205. package/db/migrations/memories.ts +22 -0
  206. package/db/migrations/memory-places.ts +35 -0
  207. package/db/migrations/places.ts +49 -0
  208. package/db/migrations/projects.ts +21 -0
  209. package/db/migrations/tier-conversion.ts +24 -0
  210. package/db/neon.ts +22 -0
  211. package/db/schema/beliefs.ts +50 -0
  212. package/db/schema/generator.ts +159 -0
  213. package/db/schema/index.ts +58 -0
  214. package/db/schema/learnings.ts +32 -0
  215. package/db/schema/memories.ts +83 -0
  216. package/db/schema/projects.ts +33 -0
  217. package/db/schema.ts +13 -0
  218. package/db/supabase.ts +27 -0
  219. package/dist/config.d.ts +61 -14
  220. package/dist/config.js +159 -139
  221. package/dist/core/adapters/config/claude-code.d.ts +45 -0
  222. package/dist/core/adapters/config/claude-code.js +113 -0
  223. package/dist/core/adapters/config/cursor.d.ts +26 -0
  224. package/dist/core/adapters/config/cursor.js +74 -0
  225. package/dist/core/adapters/config/opencode.d.ts +23 -0
  226. package/dist/core/adapters/config/opencode.js +73 -0
  227. package/dist/core/adapters/config/windsurf.d.ts +26 -0
  228. package/dist/core/adapters/config/windsurf.js +74 -0
  229. package/dist/core/adapters/index.d.ts +45 -0
  230. package/dist/core/adapters/index.js +84 -0
  231. package/dist/core/adapters/scripts/install-adapter.d.ts +19 -0
  232. package/dist/core/adapters/scripts/install-adapter.js +149 -0
  233. package/dist/core/adapters/timeline.d.ts +23 -0
  234. package/dist/core/adapters/timeline.js +88 -0
  235. package/dist/core/adapters/types.d.ts +137 -0
  236. package/dist/core/adapters/types.js +50 -0
  237. package/dist/core/agent-preferences.d.ts +16 -0
  238. package/dist/core/agent-preferences.js +124 -0
  239. package/dist/{algorithms → core/algorithms}/analytics/token-estimator.d.ts +1 -1
  240. package/dist/{algorithms → core/algorithms}/analytics/token-estimator.js +3 -3
  241. package/dist/{algorithms → core/algorithms}/detection/semantic-ranker.d.ts +1 -1
  242. package/dist/{algorithms → core/algorithms}/detection/semantic-ranker.js +1 -1
  243. package/dist/{algorithms → core/algorithms}/detection/two-stage-detector.d.ts +1 -1
  244. package/dist/{algorithms → core/algorithms}/detection/two-stage-detector.js +7 -10
  245. package/dist/{algorithms → core/algorithms}/handlers/approve-merge.js +4 -4
  246. package/dist/{algorithms → core/algorithms}/handlers/detect-duplicates.js +3 -3
  247. package/dist/{algorithms → core/algorithms}/handlers/get-stats.js +3 -3
  248. package/dist/{algorithms → core/algorithms}/handlers/list-proposals.js +3 -3
  249. package/dist/{algorithms → core/algorithms}/handlers/preview-merge.js +3 -3
  250. package/dist/{algorithms → core/algorithms}/handlers/reject-merge.js +3 -3
  251. package/dist/{algorithms → core/algorithms}/handlers/reverse-merge.js +3 -3
  252. package/dist/core/algorithms/index.d.ts +21 -0
  253. package/dist/core/algorithms/index.js +26 -0
  254. package/dist/core/algorithms/operations/cache-maintenance.d.ts +12 -0
  255. package/dist/core/algorithms/operations/cache-maintenance.js +157 -0
  256. package/dist/{algorithms → core/algorithms}/safety/safety-checks.d.ts +2 -6
  257. package/dist/{algorithms → core/algorithms}/strategies/merge-strategies.d.ts +19 -1
  258. package/dist/{algorithms → core/algorithms}/strategies/merge-strategies.js +74 -123
  259. package/dist/core/algorithms/types.d.ts +125 -0
  260. package/dist/core/algorithms/types.js +5 -0
  261. package/dist/core/associations.d.ts +3 -2
  262. package/dist/core/associations.js +37 -2
  263. package/dist/core/autosave.d.ts +19 -0
  264. package/dist/core/autosave.js +16 -0
  265. package/dist/core/beliefs/decay.d.ts +27 -0
  266. package/dist/core/beliefs/decay.js +217 -0
  267. package/dist/core/beliefs/extractor.d.ts +9 -0
  268. package/dist/core/beliefs/extractor.js +113 -0
  269. package/dist/core/beliefs/store.d.ts +46 -0
  270. package/dist/core/beliefs/store.js +466 -0
  271. package/dist/core/beliefs/types.d.ts +28 -0
  272. package/dist/core/beliefs/types.js +2 -0
  273. package/dist/core/commands/mcp-server.d.ts +2 -0
  274. package/dist/core/commands/mcp-server.js +6 -0
  275. package/dist/core/commands/remember.d.ts +24 -0
  276. package/dist/core/commands/remember.js +144 -0
  277. package/dist/core/compression.d.ts +45 -0
  278. package/dist/core/compression.js +160 -0
  279. package/dist/core/context/agent-context.d.ts +106 -0
  280. package/dist/core/context/agent-context.js +274 -0
  281. package/dist/core/{context-paging.d.ts → context/context-paging.d.ts} +2 -12
  282. package/dist/core/{context-paging.js → context/context-paging.js} +19 -39
  283. package/dist/core/context/context-window.d.ts +40 -0
  284. package/dist/core/context/context-window.js +177 -0
  285. package/dist/core/context/context.js +22 -0
  286. package/dist/core/embeddings/embeddings.d.ts +29 -0
  287. package/dist/core/embeddings/embeddings.js +546 -0
  288. package/dist/core/embeddings/google-multimodal.js +6 -2
  289. package/dist/core/embeddings/local-embeddings.d.ts +11 -0
  290. package/dist/core/embeddings/local-embeddings.js +11 -0
  291. package/dist/core/embeddings/qmd-client.js +1 -1
  292. package/dist/core/embeddings/transformers-local.d.ts +64 -0
  293. package/dist/core/embeddings/transformers-local.js +213 -0
  294. package/dist/core/embeddings.d.ts +1 -28
  295. package/dist/core/embeddings.js +2 -401
  296. package/dist/core/error-handling.d.ts +63 -0
  297. package/dist/core/error-handling.js +173 -0
  298. package/dist/core/graph/entity-deduplicator.d.ts +24 -0
  299. package/dist/core/graph/entity-deduplicator.js +183 -0
  300. package/dist/core/graph/graph-builder.d.ts +46 -0
  301. package/dist/core/graph/graph-builder.js +174 -0
  302. package/dist/core/graph/graph-traversal.d.ts +80 -0
  303. package/dist/core/graph/graph-traversal.js +315 -0
  304. package/dist/core/graph/index.d.ts +19 -0
  305. package/dist/core/graph/index.js +13 -0
  306. package/dist/core/graph/llm-entity-extractor.d.ts +49 -0
  307. package/dist/core/graph/llm-entity-extractor.js +313 -0
  308. package/dist/core/graph/multi-hop-retrieval.d.ts +48 -0
  309. package/dist/core/graph/multi-hop-retrieval.js +215 -0
  310. package/dist/core/graph/relationship-extractor.d.ts +48 -0
  311. package/dist/core/graph/relationship-extractor.js +351 -0
  312. package/dist/core/hooks/agent-hooks.d.ts +83 -0
  313. package/dist/core/hooks/agent-hooks.js +521 -0
  314. package/dist/core/hooks/auto-tagger.d.ts +19 -0
  315. package/dist/core/hooks/auto-tagger.js +155 -0
  316. package/dist/core/hooks/capture-filter.d.ts +41 -0
  317. package/dist/core/hooks/capture-filter.js +128 -0
  318. package/dist/core/hot-cache.d.ts +86 -0
  319. package/dist/core/hot-cache.js +285 -0
  320. package/dist/core/index.d.ts +9 -9
  321. package/dist/core/index.js +9 -12
  322. package/dist/core/{agent-memory.js → ingestion/agent-memory.js} +5 -7
  323. package/dist/core/{core-memory.d.ts → ingestion/core-memory.d.ts} +2 -2
  324. package/dist/core/{core-memory.js → ingestion/core-memory.js} +7 -7
  325. package/dist/core/ingestion/learnings.d.ts +57 -0
  326. package/dist/core/ingestion/learnings.js +205 -0
  327. package/dist/core/ingestion/signal-engine.d.ts +41 -0
  328. package/dist/core/ingestion/signal-engine.js +201 -0
  329. package/dist/core/integrations/obsidian-vault.d.ts +31 -0
  330. package/dist/core/integrations/obsidian-vault.js +156 -0
  331. package/dist/core/lib/db-client.d.ts +114 -0
  332. package/dist/core/lib/db-client.js +130 -0
  333. package/dist/core/lib/parse-embedding.d.ts +9 -0
  334. package/dist/core/lib/parse-embedding.js +58 -0
  335. package/dist/core/lib/schemas.d.ts +132 -0
  336. package/dist/core/lib/schemas.js +87 -0
  337. package/dist/core/lib/types.d.ts +45 -0
  338. package/dist/core/lib/types.js +6 -0
  339. package/dist/core/{utils.d.ts → lib/utils.d.ts} +5 -0
  340. package/dist/core/lib/utils.js +145 -0
  341. package/dist/core/lib/validation.d.ts +38 -0
  342. package/dist/core/lib/validation.js +151 -0
  343. package/dist/core/lifecycle.d.ts +7 -1
  344. package/dist/core/lifecycle.js +152 -42
  345. package/dist/core/logger.d.ts +1 -0
  346. package/dist/core/logger.js +13 -1
  347. package/dist/core/mcp/tools.d.ts +0 -2
  348. package/dist/core/mcp/tools.js +35 -90
  349. package/dist/core/mcp/types.d.ts +25 -253
  350. package/dist/core/mcp/types.js +2 -2
  351. package/dist/core/memory/categorizer.js +2 -0
  352. package/dist/core/memory/conflict-detector.js +1 -1
  353. package/dist/core/memory/consolidation.d.ts +1 -10
  354. package/dist/core/memory/consolidation.js +4 -39
  355. package/dist/core/memory/context-collector.js +1 -1
  356. package/dist/core/memory/edit-workflow.js +1 -1
  357. package/dist/core/memory/entity-extractor.d.ts +4 -0
  358. package/dist/core/memory/entity-extractor.js +30 -16
  359. package/dist/core/memory/entity-resolver.js +7 -7
  360. package/dist/core/memory/explain.d.ts +18 -0
  361. package/dist/core/memory/explain.js +92 -0
  362. package/dist/core/memory/fact-deriver.d.ts +31 -0
  363. package/dist/core/memory/fact-deriver.js +236 -0
  364. package/dist/core/memory/fact-extractor.js +12 -12
  365. package/dist/core/memory/feedback-tracker.js +1 -1
  366. package/dist/core/memory/hooks.d.ts +88 -0
  367. package/dist/core/memory/hooks.js +174 -0
  368. package/dist/core/memory/hybrid-retrieval.d.ts +14 -16
  369. package/dist/core/memory/hybrid-retrieval.js +25 -127
  370. package/dist/core/memory/hybrid-scorer.js +6 -23
  371. package/dist/core/memory/hybrid-search.d.ts +9 -11
  372. package/dist/core/memory/hybrid-search.js +496 -273
  373. package/dist/core/memory/importance.d.ts +2 -24
  374. package/dist/core/memory/importance.js +7 -91
  375. package/dist/core/memory/index.d.ts +1 -0
  376. package/dist/core/memory/index.js +1 -0
  377. package/dist/core/memory/loader.d.ts +31 -0
  378. package/dist/core/memory/loader.js +141 -0
  379. package/dist/core/memory/markdown/markdown-storage.d.ts +72 -0
  380. package/dist/core/memory/markdown/markdown-storage.js +243 -0
  381. package/dist/core/memory/memories.d.ts +23 -19
  382. package/dist/core/memory/memories.js +243 -228
  383. package/dist/core/memory/memory-lifecycle.d.ts +8 -0
  384. package/dist/core/memory/memory-lifecycle.js +47 -0
  385. package/dist/core/memory/migrate.d.ts +21 -0
  386. package/dist/core/memory/migrate.js +134 -0
  387. package/dist/core/memory/normalization.d.ts +7 -0
  388. package/dist/core/memory/normalization.js +26 -0
  389. package/dist/core/memory/path-strengthener.d.ts +39 -0
  390. package/dist/core/memory/path-strengthener.js +150 -0
  391. package/dist/core/memory/progressive-disclosure.js +1 -1
  392. package/dist/core/memory/query-processor.js +37 -3
  393. package/dist/core/memory/query-rewriter.js +9 -9
  394. package/dist/core/memory/retrieval-feedback.d.ts +70 -0
  395. package/dist/core/memory/retrieval-feedback.js +213 -0
  396. package/dist/core/memory/serialization.d.ts +4 -0
  397. package/dist/core/memory/serialization.js +49 -0
  398. package/dist/core/memory/stale-cleaner.d.ts +26 -0
  399. package/dist/core/memory/stale-cleaner.js +97 -0
  400. package/dist/core/memory/stats.d.ts +15 -0
  401. package/dist/core/memory/stats.js +69 -13
  402. package/dist/core/memory/temporal-facts.js +21 -0
  403. package/dist/core/memory/trigger-detector.d.ts +8 -1
  404. package/dist/core/memory/trigger-detector.js +42 -5
  405. package/dist/core/memory/write-gate.js +1 -1
  406. package/dist/core/places/index.d.ts +14 -0
  407. package/dist/core/places/index.js +14 -0
  408. package/dist/core/places/memory-places.d.ts +68 -0
  409. package/dist/core/places/memory-places.js +261 -0
  410. package/dist/core/places/places.d.ts +88 -0
  411. package/dist/core/places/places.js +314 -0
  412. package/dist/core/places/rules.d.ts +74 -0
  413. package/dist/core/places/rules.js +240 -0
  414. package/dist/core/places/walking.d.ts +56 -0
  415. package/dist/core/places/walking.js +121 -0
  416. package/dist/core/projects.d.ts +5 -0
  417. package/dist/core/projects.js +47 -18
  418. package/dist/core/responses.d.ts +96 -0
  419. package/dist/core/responses.js +122 -0
  420. package/dist/core/runtime/trust-report.d.ts +102 -0
  421. package/dist/core/runtime/trust-report.js +107 -0
  422. package/dist/core/runtime/trust-state.d.ts +12 -0
  423. package/dist/core/runtime/trust-state.js +309 -0
  424. package/dist/core/scheduler/cron-scheduler.d.ts +1 -1
  425. package/dist/core/scheduler/cron-scheduler.js +193 -10
  426. package/dist/core/scheduler/index.d.ts +1 -1
  427. package/dist/core/scheduler/index.js +1 -1
  428. package/dist/core/scheduler/job-runner.js +2 -2
  429. package/dist/core/search/conversations.js +40 -42
  430. package/dist/core/search/entities.js +6 -9
  431. package/dist/core/search/graph-boost.d.ts +7 -0
  432. package/dist/core/search/graph-boost.js +23 -0
  433. package/dist/core/search/qmd-wrapper.d.ts +36 -0
  434. package/dist/core/search/qmd-wrapper.js +58 -0
  435. package/dist/core/security/encrypt.d.ts +6 -0
  436. package/dist/core/security/encrypt.js +47 -0
  437. package/dist/core/{governance.d.ts → security/governance.d.ts} +6 -1
  438. package/dist/core/security/governance.js +79 -0
  439. package/dist/core/session/auto-load.js +34 -9
  440. package/dist/core/session/entity-tracker.d.ts +62 -0
  441. package/dist/core/session/entity-tracker.js +287 -0
  442. package/dist/core/session/index.d.ts +1 -1
  443. package/dist/core/session/index.js +1 -1
  444. package/dist/core/session/reference-resolver.d.ts +26 -0
  445. package/dist/core/session/reference-resolver.js +121 -0
  446. package/dist/core/{session-hooks → session}/self-iteration-job.d.ts +15 -0
  447. package/dist/core/{session-hooks → session}/self-iteration-job.js +195 -90
  448. package/dist/core/session/working-set.d.ts +50 -0
  449. package/dist/core/session/working-set.js +212 -0
  450. package/dist/core/snapshots/creation.d.ts +2 -8
  451. package/dist/core/snapshots/creation.js +3 -12
  452. package/dist/core/{cache.js → storage/cache.js} +2 -2
  453. package/dist/core/utils/memory-operations.js +1 -1
  454. package/dist/core/utils/summarization-helpers.d.ts +0 -4
  455. package/dist/core/utils/summarization-helpers.js +1 -6
  456. package/dist/core/utils/vector-operations.d.ts +71 -0
  457. package/dist/core/utils/vector-operations.js +129 -0
  458. package/dist/db/adapter.d.ts +3 -3
  459. package/dist/db/adapter.js +99 -88
  460. package/dist/db/bootstrap.d.ts +2 -0
  461. package/dist/db/bootstrap.js +921 -674
  462. package/dist/{drizzle → db/drizzle}/schema-sqlite.d.ts +775 -25
  463. package/dist/{drizzle → db/drizzle}/schema-sqlite.js +170 -24
  464. package/dist/{drizzle → db/drizzle}/schema.d.ts +731 -32
  465. package/dist/{drizzle → db/drizzle}/schema.js +192 -32
  466. package/dist/db/drizzle.config.d.ts +3 -0
  467. package/dist/db/drizzle.config.js +12 -0
  468. package/dist/db/index.d.ts +1 -5
  469. package/dist/db/index.js +51 -8
  470. package/dist/db/migrations/associations.d.ts +6 -0
  471. package/dist/db/migrations/associations.js +29 -0
  472. package/dist/db/migrations/beliefs.d.ts +10 -0
  473. package/dist/db/migrations/beliefs.js +76 -0
  474. package/dist/db/migrations/core-memory.d.ts +6 -0
  475. package/dist/db/migrations/core-memory.js +29 -0
  476. package/dist/db/migrations/fts.d.ts +6 -0
  477. package/dist/db/migrations/fts.js +52 -0
  478. package/dist/db/migrations/index.d.ts +25 -0
  479. package/dist/db/migrations/index.js +51 -0
  480. package/dist/db/migrations/indexes.d.ts +6 -0
  481. package/dist/db/migrations/indexes.js +30 -0
  482. package/dist/db/migrations/learnings.d.ts +7 -0
  483. package/dist/db/migrations/learnings.js +26 -0
  484. package/dist/db/migrations/maintenance.d.ts +6 -0
  485. package/dist/db/migrations/maintenance.js +61 -0
  486. package/dist/db/migrations/memories.d.ts +7 -0
  487. package/dist/db/migrations/memories.js +16 -0
  488. package/dist/db/migrations/memory-places.d.ts +6 -0
  489. package/dist/db/migrations/memory-places.js +29 -0
  490. package/dist/db/migrations/places.d.ts +6 -0
  491. package/dist/db/migrations/places.js +43 -0
  492. package/dist/db/migrations/projects.d.ts +3 -0
  493. package/dist/db/migrations/projects.js +13 -0
  494. package/dist/db/migrations/tier-conversion.d.ts +7 -0
  495. package/dist/db/migrations/tier-conversion.js +20 -0
  496. package/dist/db/neon.d.ts +8 -0
  497. package/dist/db/neon.js +20 -0
  498. package/dist/db/schema/beliefs.d.ts +9 -0
  499. package/dist/db/schema/beliefs.js +46 -0
  500. package/dist/db/schema/generator.d.ts +38 -0
  501. package/dist/db/schema/generator.js +108 -0
  502. package/dist/db/schema/index.d.ts +39 -0
  503. package/dist/db/schema/index.js +51 -0
  504. package/dist/db/schema/learnings.d.ts +7 -0
  505. package/dist/db/schema/learnings.js +30 -0
  506. package/dist/db/schema/memories.d.ts +7 -0
  507. package/dist/db/schema/memories.js +81 -0
  508. package/dist/db/schema/projects.d.ts +4 -0
  509. package/dist/db/schema/projects.js +31 -0
  510. package/dist/db/schema/tables/context-sessions.d.ts +9 -0
  511. package/dist/db/schema/tables/context-sessions.js +37 -0
  512. package/dist/db/schema/tables/conversations.d.ts +9 -0
  513. package/dist/db/schema/tables/conversations.js +47 -0
  514. package/dist/db/schema/tables/core-memory.d.ts +9 -0
  515. package/dist/db/schema/tables/core-memory.js +41 -0
  516. package/dist/db/schema/tables/entities.d.ts +9 -0
  517. package/dist/db/schema/tables/entities.js +39 -0
  518. package/dist/db/schema/tables/entity-relations.d.ts +9 -0
  519. package/dist/db/schema/tables/entity-relations.js +31 -0
  520. package/dist/db/schema/tables/learnings.d.ts +9 -0
  521. package/dist/db/schema/tables/learnings.js +66 -0
  522. package/dist/db/schema/tables/memories.d.ts +9 -0
  523. package/dist/db/schema/tables/memories.js +161 -0
  524. package/dist/db/schema/tables/memory-associations.d.ts +9 -0
  525. package/dist/db/schema/tables/memory-associations.js +39 -0
  526. package/dist/db/schema/tables/memory-hash-cache.d.ts +9 -0
  527. package/dist/db/schema/tables/memory-hash-cache.js +29 -0
  528. package/dist/db/schema/tables/memory-merge-history.d.ts +9 -0
  529. package/dist/db/schema/tables/memory-merge-history.js +33 -0
  530. package/dist/db/schema/tables/memory-merge-proposals.d.ts +9 -0
  531. package/dist/db/schema/tables/memory-merge-proposals.js +39 -0
  532. package/dist/db/schema/tables/messages.d.ts +9 -0
  533. package/dist/db/schema/tables/messages.js +41 -0
  534. package/dist/db/schema/tables/namespaces.d.ts +9 -0
  535. package/dist/db/schema/tables/namespaces.js +37 -0
  536. package/dist/db/schema/tables/projects.d.ts +9 -0
  537. package/dist/db/schema/tables/projects.js +31 -0
  538. package/dist/db/schema/tables/users.d.ts +9 -0
  539. package/dist/db/schema/tables/users.js +27 -0
  540. package/dist/db/schema.d.ts +1 -1
  541. package/dist/db/schema.js +2 -2
  542. package/dist/db/supabase.d.ts +9 -0
  543. package/dist/db/supabase.js +24 -0
  544. package/dist/packages/mcp/src/index.d.ts +3 -0
  545. package/dist/packages/mcp/src/index.js +733 -0
  546. package/mcp.json.example +8 -0
  547. package/package.json +132 -173
  548. package/packages/cli/package.json +22 -0
  549. package/packages/cli/src/commands/clean.ts +68 -0
  550. package/packages/cli/src/commands/context.ts +79 -0
  551. package/packages/cli/src/commands/doctor.ts +357 -0
  552. package/packages/cli/src/commands/forget.ts +72 -0
  553. package/packages/cli/src/commands/health.ts +36 -0
  554. package/packages/cli/src/commands/inspect.ts +41 -0
  555. package/packages/cli/src/commands/link.ts +50 -0
  556. package/packages/cli/src/commands/migrate.ts +93 -0
  557. package/packages/cli/src/commands/recall.ts +99 -0
  558. package/packages/cli/src/commands/recent.ts +57 -0
  559. package/packages/cli/src/commands/remember.ts +139 -0
  560. package/packages/cli/src/commands/run.ts +58 -0
  561. package/packages/cli/src/commands/stale.ts +43 -0
  562. package/packages/cli/src/commands/stats.ts +42 -0
  563. package/packages/cli/src/index.ts +57 -0
  564. package/packages/cli/tsconfig.json +24 -0
  565. package/packages/mcp/package.json +26 -0
  566. package/packages/mcp/src/index.ts +877 -0
  567. package/packages/mcp/tsconfig.json +20 -0
  568. package/skills/squish-memory/SKILL.md +107 -114
  569. package/skills/squish-memory/install.sh +3 -3
  570. package/skills/squish-memory/{claude-desktop.json → references/claude-desktop.json} +12 -12
  571. package/skills/squish-memory/{openclaw.json → references/openclaw.json} +13 -13
  572. package/skills/squish-memory/{opencode.json → references/opencode.json} +14 -14
  573. package/.claude-plugin/marketplace.json +0 -20
  574. package/.claude-plugin/plugin.json +0 -32
  575. package/.env.mcp.example +0 -60
  576. package/.mcp.json +0 -11
  577. package/QUICK-START.md +0 -71
  578. package/bin/squish-add.mjs +0 -32
  579. package/bin/squish-rm.mjs +0 -21
  580. package/commands/context-paging.md +0 -51
  581. package/commands/context-status.md +0 -22
  582. package/commands/context.md +0 -5
  583. package/commands/core-memory.md +0 -56
  584. package/commands/health.md +0 -5
  585. package/commands/init.md +0 -39
  586. package/commands/merge.md +0 -113
  587. package/commands/observe.md +0 -5
  588. package/commands/recall.md +0 -5
  589. package/commands/remember.md +0 -11
  590. package/commands/search.md +0 -10
  591. package/config/mcp-cli-fallback-policy.json +0 -22
  592. package/config/mcp.json +0 -38
  593. package/config/plugin-manifest.json +0 -152
  594. package/config/plugin-manifest.schema.json +0 -244
  595. package/config/remote-memory-policy.json +0 -32
  596. package/dist/api/web/index.d.ts +0 -3
  597. package/dist/api/web/index.js +0 -4
  598. package/dist/api/web/web-server.d.ts +0 -3
  599. package/dist/api/web/web-server.js +0 -6
  600. package/dist/api/web/web.d.ts +0 -4
  601. package/dist/api/web/web.js +0 -639
  602. package/dist/commands/managed-sync.d.ts +0 -10
  603. package/dist/commands/managed-sync.js +0 -64
  604. package/dist/commands/mcp-server.d.ts +0 -3
  605. package/dist/commands/mcp-server.js +0 -393
  606. package/dist/core/context.js +0 -24
  607. package/dist/core/governance.js +0 -64
  608. package/dist/core/local-embeddings.d.ts +0 -6
  609. package/dist/core/local-embeddings.js +0 -20
  610. package/dist/core/namespaces/index.d.ts +0 -71
  611. package/dist/core/namespaces/index.js +0 -305
  612. package/dist/core/namespaces/uri-parser.d.ts +0 -31
  613. package/dist/core/namespaces/uri-parser.js +0 -74
  614. package/dist/core/observations.d.ts +0 -26
  615. package/dist/core/observations.js +0 -110
  616. package/dist/core/requirements.d.ts +0 -20
  617. package/dist/core/requirements.js +0 -35
  618. package/dist/core/search/qmd-search.d.ts +0 -61
  619. package/dist/core/search/qmd-search.js +0 -178
  620. package/dist/core/snapshots.d.ts +0 -29
  621. package/dist/core/snapshots.js +0 -220
  622. package/dist/core/sync/qmd-sync.d.ts +0 -106
  623. package/dist/core/sync/qmd-sync.js +0 -213
  624. package/dist/core/utils.js +0 -74
  625. package/dist/index.d.ts +0 -19
  626. package/dist/index.js +0 -997
  627. package/generated/mcp/manifest.json +0 -23
  628. package/generated/mcp/mcp-servers.json +0 -25
  629. package/generated/mcp/mcporter.json +0 -34
  630. package/generated/mcp/openclaw-memory-qmd.json +0 -17
  631. package/generated/mcp/runtime.json +0 -12
  632. package/hooks/hooks.json +0 -52
  633. package/hooks/post-tool-use.js +0 -26
  634. package/hooks/session-end.js +0 -28
  635. package/hooks/session-start.js +0 -33
  636. package/hooks/user-prompt-submit.js +0 -26
  637. package/hooks/utils.js +0 -153
  638. package/npx-installer.js +0 -208
  639. package/packages/plugin-claude-code/README.md +0 -73
  640. package/packages/plugin-claude-code/dist/plugin-wrapper.d.ts +0 -35
  641. package/packages/plugin-claude-code/dist/plugin-wrapper.js +0 -191
  642. package/packages/plugin-claude-code/package.json +0 -31
  643. package/packages/plugin-openclaw/README.md +0 -70
  644. package/packages/plugin-openclaw/dist/index.d.ts +0 -49
  645. package/packages/plugin-openclaw/dist/index.js +0 -262
  646. package/packages/plugin-openclaw/openclaw.plugin.json +0 -94
  647. package/packages/plugin-openclaw/package.json +0 -31
  648. package/packages/plugin-opencode/install.mjs +0 -217
  649. package/packages/plugin-opencode/package.json +0 -21
  650. package/plugin.json +0 -32
  651. package/scripts/build-release.sh +0 -36
  652. package/scripts/check-secrets.js +0 -132
  653. package/scripts/db/check-db.mjs +0 -88
  654. package/scripts/db/fix-all-columns.mjs +0 -52
  655. package/scripts/db/fix-schema-all.mjs +0 -55
  656. package/scripts/db/fix-schema-full.mjs +0 -46
  657. package/scripts/db/fix-schema.mjs +0 -38
  658. package/scripts/db/init-db.mjs +0 -13
  659. package/scripts/db/recreate-db.mjs +0 -14
  660. package/scripts/generate-mcp.mjs +0 -264
  661. package/scripts/github-release.sh +0 -77
  662. package/scripts/init-dirs.mjs +0 -13
  663. package/scripts/install-interactive.mjs +0 -677
  664. package/scripts/install-mcp.mjs +0 -116
  665. package/scripts/install-plugin.mjs +0 -415
  666. package/scripts/install-web.sh +0 -120
  667. package/scripts/install.mjs +0 -340
  668. package/scripts/openclaw-bootstrap.mjs +0 -127
  669. package/scripts/package-release.sh +0 -71
  670. package/scripts/remote-preflight.mjs +0 -62
  671. package/scripts/squish-fallback.mjs +0 -132
  672. package/scripts/test/test-all-systems.mjs +0 -139
  673. package/scripts/test/test-memory-system.mjs +0 -139
  674. package/scripts/test/test-v0.5.0.mjs +0 -210
  675. package/scripts/test-interactive.mjs +0 -131
  676. package/scripts/verify-mcp.mjs +0 -214
  677. package/skills/memory-guide/SKILL.md +0 -332
  678. package/skills/squish-cli/SKILL.md +0 -240
  679. package/skills/squish-mcp/SKILL.md +0 -355
  680. package/skills/squish-memory/install.mjs +0 -335
  681. package/skills/squish-memory/skill.json +0 -32
  682. /package/dist/{algorithms → core/algorithms}/detection/hash-filters.d.ts +0 -0
  683. /package/dist/{algorithms → core/algorithms}/detection/hash-filters.js +0 -0
  684. /package/dist/{algorithms → core/algorithms}/handlers/approve-merge.d.ts +0 -0
  685. /package/dist/{algorithms → core/algorithms}/handlers/detect-duplicates.d.ts +0 -0
  686. /package/dist/{algorithms → core/algorithms}/handlers/get-stats.d.ts +0 -0
  687. /package/dist/{algorithms → core/algorithms}/handlers/list-proposals.d.ts +0 -0
  688. /package/dist/{algorithms → core/algorithms}/handlers/preview-merge.d.ts +0 -0
  689. /package/dist/{algorithms → core/algorithms}/handlers/reject-merge.d.ts +0 -0
  690. /package/dist/{algorithms → core/algorithms}/handlers/reverse-merge.d.ts +0 -0
  691. /package/dist/{algorithms → core/algorithms}/safety/safety-checks.js +0 -0
  692. /package/dist/{algorithms → core/algorithms}/utils/response-builder.d.ts +0 -0
  693. /package/dist/{algorithms → core/algorithms}/utils/response-builder.js +0 -0
  694. /package/dist/core/{context.d.ts → context/context.d.ts} +0 -0
  695. /package/dist/core/{agent-memory.d.ts → ingestion/agent-memory.d.ts} +0 -0
  696. /package/dist/core/{privacy.d.ts → security/privacy.d.ts} +0 -0
  697. /package/dist/core/{privacy.js → security/privacy.js} +0 -0
  698. /package/dist/core/{secret-detector.d.ts → security/secret-detector.d.ts} +0 -0
  699. /package/dist/core/{secret-detector.js → security/secret-detector.js} +0 -0
  700. /package/dist/core/{session-hooks → session}/session-hooks.d.ts +0 -0
  701. /package/dist/core/{session-hooks → session}/session-hooks.js +0 -0
  702. /package/dist/core/{cache.d.ts → storage/cache.d.ts} +0 -0
  703. /package/dist/core/{database.d.ts → storage/database.d.ts} +0 -0
  704. /package/dist/core/{database.js → storage/database.js} +0 -0
@@ -0,0 +1,3451 @@
1
+ {
2
+ "id": "ac21826c-9cd6-4a92-b64b-400f0d6fb65c",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.context_paging_sessions": {
8
+ "name": "context_paging_sessions",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "session_id": {
19
+ "name": "session_id",
20
+ "type": "text",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "project_id": {
25
+ "name": "project_id",
26
+ "type": "uuid",
27
+ "primaryKey": false,
28
+ "notNull": false
29
+ },
30
+ "user_id": {
31
+ "name": "user_id",
32
+ "type": "uuid",
33
+ "primaryKey": false,
34
+ "notNull": false
35
+ },
36
+ "loaded_memory_ids": {
37
+ "name": "loaded_memory_ids",
38
+ "type": "text[]",
39
+ "primaryKey": false,
40
+ "notNull": false,
41
+ "default": "'{}'"
42
+ },
43
+ "preload_candidate_ids": {
44
+ "name": "preload_candidate_ids",
45
+ "type": "text[]",
46
+ "primaryKey": false,
47
+ "notNull": false,
48
+ "default": "'{}'"
49
+ },
50
+ "token_budget": {
51
+ "name": "token_budget",
52
+ "type": "integer",
53
+ "primaryKey": false,
54
+ "notNull": true,
55
+ "default": 8000
56
+ },
57
+ "tokens_used": {
58
+ "name": "tokens_used",
59
+ "type": "integer",
60
+ "primaryKey": false,
61
+ "notNull": true,
62
+ "default": 0
63
+ },
64
+ "loaded_memories_tokens": {
65
+ "name": "loaded_memories_tokens",
66
+ "type": "integer",
67
+ "primaryKey": false,
68
+ "notNull": true,
69
+ "default": 0
70
+ },
71
+ "metadata": {
72
+ "name": "metadata",
73
+ "type": "jsonb",
74
+ "primaryKey": false,
75
+ "notNull": false
76
+ },
77
+ "created_at": {
78
+ "name": "created_at",
79
+ "type": "timestamp",
80
+ "primaryKey": false,
81
+ "notNull": true,
82
+ "default": "now()"
83
+ },
84
+ "updated_at": {
85
+ "name": "updated_at",
86
+ "type": "timestamp",
87
+ "primaryKey": false,
88
+ "notNull": true,
89
+ "default": "now()"
90
+ }
91
+ },
92
+ "indexes": {
93
+ "context_paging_session_idx": {
94
+ "name": "context_paging_session_idx",
95
+ "columns": [
96
+ {
97
+ "expression": "session_id",
98
+ "isExpression": false,
99
+ "asc": true,
100
+ "nulls": "last"
101
+ }
102
+ ],
103
+ "isUnique": false,
104
+ "concurrently": false,
105
+ "method": "btree",
106
+ "with": {}
107
+ },
108
+ "context_paging_project_idx": {
109
+ "name": "context_paging_project_idx",
110
+ "columns": [
111
+ {
112
+ "expression": "project_id",
113
+ "isExpression": false,
114
+ "asc": true,
115
+ "nulls": "last"
116
+ }
117
+ ],
118
+ "isUnique": false,
119
+ "concurrently": false,
120
+ "method": "btree",
121
+ "with": {}
122
+ },
123
+ "context_paging_created_idx": {
124
+ "name": "context_paging_created_idx",
125
+ "columns": [
126
+ {
127
+ "expression": "created_at",
128
+ "isExpression": false,
129
+ "asc": true,
130
+ "nulls": "last"
131
+ }
132
+ ],
133
+ "isUnique": false,
134
+ "concurrently": false,
135
+ "method": "btree",
136
+ "with": {}
137
+ }
138
+ },
139
+ "foreignKeys": {
140
+ "context_paging_sessions_project_id_projects_id_fk": {
141
+ "name": "context_paging_sessions_project_id_projects_id_fk",
142
+ "tableFrom": "context_paging_sessions",
143
+ "tableTo": "projects",
144
+ "columnsFrom": [
145
+ "project_id"
146
+ ],
147
+ "columnsTo": [
148
+ "id"
149
+ ],
150
+ "onDelete": "cascade",
151
+ "onUpdate": "no action"
152
+ },
153
+ "context_paging_sessions_user_id_users_id_fk": {
154
+ "name": "context_paging_sessions_user_id_users_id_fk",
155
+ "tableFrom": "context_paging_sessions",
156
+ "tableTo": "users",
157
+ "columnsFrom": [
158
+ "user_id"
159
+ ],
160
+ "columnsTo": [
161
+ "id"
162
+ ],
163
+ "onDelete": "set null",
164
+ "onUpdate": "no action"
165
+ }
166
+ },
167
+ "compositePrimaryKeys": {},
168
+ "uniqueConstraints": {
169
+ "context_paging_sessions_session_id_unique": {
170
+ "name": "context_paging_sessions_session_id_unique",
171
+ "nullsNotDistinct": false,
172
+ "columns": [
173
+ "session_id"
174
+ ]
175
+ }
176
+ },
177
+ "policies": {},
178
+ "checkConstraints": {},
179
+ "isRLSEnabled": false
180
+ },
181
+ "public.context_sessions": {
182
+ "name": "context_sessions",
183
+ "schema": "",
184
+ "columns": {
185
+ "id": {
186
+ "name": "id",
187
+ "type": "uuid",
188
+ "primaryKey": true,
189
+ "notNull": true,
190
+ "default": "gen_random_uuid()"
191
+ },
192
+ "session_id": {
193
+ "name": "session_id",
194
+ "type": "text",
195
+ "primaryKey": false,
196
+ "notNull": true
197
+ },
198
+ "project_id": {
199
+ "name": "project_id",
200
+ "type": "uuid",
201
+ "primaryKey": false,
202
+ "notNull": false
203
+ },
204
+ "user_id": {
205
+ "name": "user_id",
206
+ "type": "uuid",
207
+ "primaryKey": false,
208
+ "notNull": false
209
+ },
210
+ "loaded_memory_ids": {
211
+ "name": "loaded_memory_ids",
212
+ "type": "text[]",
213
+ "primaryKey": false,
214
+ "notNull": false,
215
+ "default": "'{}'"
216
+ },
217
+ "token_budget": {
218
+ "name": "token_budget",
219
+ "type": "integer",
220
+ "primaryKey": false,
221
+ "notNull": true,
222
+ "default": 8000
223
+ },
224
+ "tokens_used": {
225
+ "name": "tokens_used",
226
+ "type": "integer",
227
+ "primaryKey": false,
228
+ "notNull": true,
229
+ "default": 0
230
+ },
231
+ "core_memory_tokens": {
232
+ "name": "core_memory_tokens",
233
+ "type": "integer",
234
+ "primaryKey": false,
235
+ "notNull": true,
236
+ "default": 0
237
+ },
238
+ "loaded_memories_tokens": {
239
+ "name": "loaded_memories_tokens",
240
+ "type": "integer",
241
+ "primaryKey": false,
242
+ "notNull": true,
243
+ "default": 0
244
+ },
245
+ "metadata": {
246
+ "name": "metadata",
247
+ "type": "jsonb",
248
+ "primaryKey": false,
249
+ "notNull": false
250
+ },
251
+ "created_at": {
252
+ "name": "created_at",
253
+ "type": "timestamp",
254
+ "primaryKey": false,
255
+ "notNull": true,
256
+ "default": "now()"
257
+ },
258
+ "updated_at": {
259
+ "name": "updated_at",
260
+ "type": "timestamp",
261
+ "primaryKey": false,
262
+ "notNull": true,
263
+ "default": "now()"
264
+ }
265
+ },
266
+ "indexes": {
267
+ "context_sessions_session_idx": {
268
+ "name": "context_sessions_session_idx",
269
+ "columns": [
270
+ {
271
+ "expression": "session_id",
272
+ "isExpression": false,
273
+ "asc": true,
274
+ "nulls": "last"
275
+ }
276
+ ],
277
+ "isUnique": false,
278
+ "concurrently": false,
279
+ "method": "btree",
280
+ "with": {}
281
+ },
282
+ "context_sessions_project_idx": {
283
+ "name": "context_sessions_project_idx",
284
+ "columns": [
285
+ {
286
+ "expression": "project_id",
287
+ "isExpression": false,
288
+ "asc": true,
289
+ "nulls": "last"
290
+ }
291
+ ],
292
+ "isUnique": false,
293
+ "concurrently": false,
294
+ "method": "btree",
295
+ "with": {}
296
+ },
297
+ "context_sessions_created_idx": {
298
+ "name": "context_sessions_created_idx",
299
+ "columns": [
300
+ {
301
+ "expression": "created_at",
302
+ "isExpression": false,
303
+ "asc": true,
304
+ "nulls": "last"
305
+ }
306
+ ],
307
+ "isUnique": false,
308
+ "concurrently": false,
309
+ "method": "btree",
310
+ "with": {}
311
+ }
312
+ },
313
+ "foreignKeys": {
314
+ "context_sessions_project_id_projects_id_fk": {
315
+ "name": "context_sessions_project_id_projects_id_fk",
316
+ "tableFrom": "context_sessions",
317
+ "tableTo": "projects",
318
+ "columnsFrom": [
319
+ "project_id"
320
+ ],
321
+ "columnsTo": [
322
+ "id"
323
+ ],
324
+ "onDelete": "cascade",
325
+ "onUpdate": "no action"
326
+ },
327
+ "context_sessions_user_id_users_id_fk": {
328
+ "name": "context_sessions_user_id_users_id_fk",
329
+ "tableFrom": "context_sessions",
330
+ "tableTo": "users",
331
+ "columnsFrom": [
332
+ "user_id"
333
+ ],
334
+ "columnsTo": [
335
+ "id"
336
+ ],
337
+ "onDelete": "set null",
338
+ "onUpdate": "no action"
339
+ }
340
+ },
341
+ "compositePrimaryKeys": {},
342
+ "uniqueConstraints": {
343
+ "context_sessions_session_id_unique": {
344
+ "name": "context_sessions_session_id_unique",
345
+ "nullsNotDistinct": false,
346
+ "columns": [
347
+ "session_id"
348
+ ]
349
+ }
350
+ },
351
+ "policies": {},
352
+ "checkConstraints": {},
353
+ "isRLSEnabled": false
354
+ },
355
+ "public.conversations": {
356
+ "name": "conversations",
357
+ "schema": "",
358
+ "columns": {
359
+ "id": {
360
+ "name": "id",
361
+ "type": "uuid",
362
+ "primaryKey": true,
363
+ "notNull": true,
364
+ "default": "gen_random_uuid()"
365
+ },
366
+ "project_id": {
367
+ "name": "project_id",
368
+ "type": "uuid",
369
+ "primaryKey": false,
370
+ "notNull": false
371
+ },
372
+ "user_id": {
373
+ "name": "user_id",
374
+ "type": "uuid",
375
+ "primaryKey": false,
376
+ "notNull": false
377
+ },
378
+ "session_id": {
379
+ "name": "session_id",
380
+ "type": "text",
381
+ "primaryKey": false,
382
+ "notNull": true
383
+ },
384
+ "title": {
385
+ "name": "title",
386
+ "type": "text",
387
+ "primaryKey": false,
388
+ "notNull": false
389
+ },
390
+ "summary": {
391
+ "name": "summary",
392
+ "type": "text",
393
+ "primaryKey": false,
394
+ "notNull": false
395
+ },
396
+ "message_count": {
397
+ "name": "message_count",
398
+ "type": "integer",
399
+ "primaryKey": false,
400
+ "notNull": false,
401
+ "default": 0
402
+ },
403
+ "token_count": {
404
+ "name": "token_count",
405
+ "type": "integer",
406
+ "primaryKey": false,
407
+ "notNull": false,
408
+ "default": 0
409
+ },
410
+ "started_at": {
411
+ "name": "started_at",
412
+ "type": "timestamp",
413
+ "primaryKey": false,
414
+ "notNull": true,
415
+ "default": "now()"
416
+ },
417
+ "ended_at": {
418
+ "name": "ended_at",
419
+ "type": "timestamp",
420
+ "primaryKey": false,
421
+ "notNull": false
422
+ },
423
+ "metadata": {
424
+ "name": "metadata",
425
+ "type": "jsonb",
426
+ "primaryKey": false,
427
+ "notNull": false
428
+ },
429
+ "created_at": {
430
+ "name": "created_at",
431
+ "type": "timestamp",
432
+ "primaryKey": false,
433
+ "notNull": true,
434
+ "default": "now()"
435
+ },
436
+ "updated_at": {
437
+ "name": "updated_at",
438
+ "type": "timestamp",
439
+ "primaryKey": false,
440
+ "notNull": true,
441
+ "default": "now()"
442
+ }
443
+ },
444
+ "indexes": {
445
+ "conversations_project_idx": {
446
+ "name": "conversations_project_idx",
447
+ "columns": [
448
+ {
449
+ "expression": "project_id",
450
+ "isExpression": false,
451
+ "asc": true,
452
+ "nulls": "last"
453
+ }
454
+ ],
455
+ "isUnique": false,
456
+ "concurrently": false,
457
+ "method": "btree",
458
+ "with": {}
459
+ },
460
+ "conversations_session_idx": {
461
+ "name": "conversations_session_idx",
462
+ "columns": [
463
+ {
464
+ "expression": "session_id",
465
+ "isExpression": false,
466
+ "asc": true,
467
+ "nulls": "last"
468
+ }
469
+ ],
470
+ "isUnique": false,
471
+ "concurrently": false,
472
+ "method": "btree",
473
+ "with": {}
474
+ },
475
+ "conversations_started_idx": {
476
+ "name": "conversations_started_idx",
477
+ "columns": [
478
+ {
479
+ "expression": "started_at",
480
+ "isExpression": false,
481
+ "asc": true,
482
+ "nulls": "last"
483
+ }
484
+ ],
485
+ "isUnique": false,
486
+ "concurrently": false,
487
+ "method": "btree",
488
+ "with": {}
489
+ }
490
+ },
491
+ "foreignKeys": {
492
+ "conversations_project_id_projects_id_fk": {
493
+ "name": "conversations_project_id_projects_id_fk",
494
+ "tableFrom": "conversations",
495
+ "tableTo": "projects",
496
+ "columnsFrom": [
497
+ "project_id"
498
+ ],
499
+ "columnsTo": [
500
+ "id"
501
+ ],
502
+ "onDelete": "cascade",
503
+ "onUpdate": "no action"
504
+ },
505
+ "conversations_user_id_users_id_fk": {
506
+ "name": "conversations_user_id_users_id_fk",
507
+ "tableFrom": "conversations",
508
+ "tableTo": "users",
509
+ "columnsFrom": [
510
+ "user_id"
511
+ ],
512
+ "columnsTo": [
513
+ "id"
514
+ ],
515
+ "onDelete": "set null",
516
+ "onUpdate": "no action"
517
+ }
518
+ },
519
+ "compositePrimaryKeys": {},
520
+ "uniqueConstraints": {},
521
+ "policies": {},
522
+ "checkConstraints": {},
523
+ "isRLSEnabled": false
524
+ },
525
+ "public.core_memory": {
526
+ "name": "core_memory",
527
+ "schema": "",
528
+ "columns": {
529
+ "id": {
530
+ "name": "id",
531
+ "type": "uuid",
532
+ "primaryKey": true,
533
+ "notNull": true,
534
+ "default": "gen_random_uuid()"
535
+ },
536
+ "project_id": {
537
+ "name": "project_id",
538
+ "type": "uuid",
539
+ "primaryKey": false,
540
+ "notNull": false
541
+ },
542
+ "user_id": {
543
+ "name": "user_id",
544
+ "type": "uuid",
545
+ "primaryKey": false,
546
+ "notNull": false
547
+ },
548
+ "section": {
549
+ "name": "section",
550
+ "type": "text",
551
+ "primaryKey": false,
552
+ "notNull": true
553
+ },
554
+ "content": {
555
+ "name": "content",
556
+ "type": "text",
557
+ "primaryKey": false,
558
+ "notNull": true,
559
+ "default": "''"
560
+ },
561
+ "size_bytes": {
562
+ "name": "size_bytes",
563
+ "type": "integer",
564
+ "primaryKey": false,
565
+ "notNull": true,
566
+ "default": 0
567
+ },
568
+ "tokens_estimate": {
569
+ "name": "tokens_estimate",
570
+ "type": "integer",
571
+ "primaryKey": false,
572
+ "notNull": true,
573
+ "default": 0
574
+ },
575
+ "version": {
576
+ "name": "version",
577
+ "type": "integer",
578
+ "primaryKey": false,
579
+ "notNull": true,
580
+ "default": 1
581
+ },
582
+ "created_at": {
583
+ "name": "created_at",
584
+ "type": "timestamp",
585
+ "primaryKey": false,
586
+ "notNull": true,
587
+ "default": "now()"
588
+ },
589
+ "updated_at": {
590
+ "name": "updated_at",
591
+ "type": "timestamp",
592
+ "primaryKey": false,
593
+ "notNull": true,
594
+ "default": "now()"
595
+ }
596
+ },
597
+ "indexes": {
598
+ "core_memory_project_idx": {
599
+ "name": "core_memory_project_idx",
600
+ "columns": [
601
+ {
602
+ "expression": "project_id",
603
+ "isExpression": false,
604
+ "asc": true,
605
+ "nulls": "last"
606
+ }
607
+ ],
608
+ "isUnique": false,
609
+ "concurrently": false,
610
+ "method": "btree",
611
+ "with": {}
612
+ },
613
+ "core_memory_user_idx": {
614
+ "name": "core_memory_user_idx",
615
+ "columns": [
616
+ {
617
+ "expression": "user_id",
618
+ "isExpression": false,
619
+ "asc": true,
620
+ "nulls": "last"
621
+ }
622
+ ],
623
+ "isUnique": false,
624
+ "concurrently": false,
625
+ "method": "btree",
626
+ "with": {}
627
+ },
628
+ "core_memory_section_idx": {
629
+ "name": "core_memory_section_idx",
630
+ "columns": [
631
+ {
632
+ "expression": "section",
633
+ "isExpression": false,
634
+ "asc": true,
635
+ "nulls": "last"
636
+ }
637
+ ],
638
+ "isUnique": false,
639
+ "concurrently": false,
640
+ "method": "btree",
641
+ "with": {}
642
+ }
643
+ },
644
+ "foreignKeys": {
645
+ "core_memory_project_id_projects_id_fk": {
646
+ "name": "core_memory_project_id_projects_id_fk",
647
+ "tableFrom": "core_memory",
648
+ "tableTo": "projects",
649
+ "columnsFrom": [
650
+ "project_id"
651
+ ],
652
+ "columnsTo": [
653
+ "id"
654
+ ],
655
+ "onDelete": "cascade",
656
+ "onUpdate": "no action"
657
+ },
658
+ "core_memory_user_id_users_id_fk": {
659
+ "name": "core_memory_user_id_users_id_fk",
660
+ "tableFrom": "core_memory",
661
+ "tableTo": "users",
662
+ "columnsFrom": [
663
+ "user_id"
664
+ ],
665
+ "columnsTo": [
666
+ "id"
667
+ ],
668
+ "onDelete": "set null",
669
+ "onUpdate": "no action"
670
+ }
671
+ },
672
+ "compositePrimaryKeys": {},
673
+ "uniqueConstraints": {},
674
+ "policies": {},
675
+ "checkConstraints": {},
676
+ "isRLSEnabled": false
677
+ },
678
+ "public.entities": {
679
+ "name": "entities",
680
+ "schema": "",
681
+ "columns": {
682
+ "id": {
683
+ "name": "id",
684
+ "type": "uuid",
685
+ "primaryKey": true,
686
+ "notNull": true,
687
+ "default": "gen_random_uuid()"
688
+ },
689
+ "project_id": {
690
+ "name": "project_id",
691
+ "type": "uuid",
692
+ "primaryKey": false,
693
+ "notNull": false
694
+ },
695
+ "name": {
696
+ "name": "name",
697
+ "type": "text",
698
+ "primaryKey": false,
699
+ "notNull": true
700
+ },
701
+ "type": {
702
+ "name": "type",
703
+ "type": "text",
704
+ "primaryKey": false,
705
+ "notNull": true
706
+ },
707
+ "description": {
708
+ "name": "description",
709
+ "type": "text",
710
+ "primaryKey": false,
711
+ "notNull": false
712
+ },
713
+ "embedding": {
714
+ "name": "embedding",
715
+ "type": "vector(1536)",
716
+ "primaryKey": false,
717
+ "notNull": false
718
+ },
719
+ "properties": {
720
+ "name": "properties",
721
+ "type": "jsonb",
722
+ "primaryKey": false,
723
+ "notNull": false
724
+ },
725
+ "created_at": {
726
+ "name": "created_at",
727
+ "type": "timestamp",
728
+ "primaryKey": false,
729
+ "notNull": true,
730
+ "default": "now()"
731
+ },
732
+ "updated_at": {
733
+ "name": "updated_at",
734
+ "type": "timestamp",
735
+ "primaryKey": false,
736
+ "notNull": true,
737
+ "default": "now()"
738
+ }
739
+ },
740
+ "indexes": {
741
+ "entities_project_idx": {
742
+ "name": "entities_project_idx",
743
+ "columns": [
744
+ {
745
+ "expression": "project_id",
746
+ "isExpression": false,
747
+ "asc": true,
748
+ "nulls": "last"
749
+ }
750
+ ],
751
+ "isUnique": false,
752
+ "concurrently": false,
753
+ "method": "btree",
754
+ "with": {}
755
+ },
756
+ "entities_type_idx": {
757
+ "name": "entities_type_idx",
758
+ "columns": [
759
+ {
760
+ "expression": "type",
761
+ "isExpression": false,
762
+ "asc": true,
763
+ "nulls": "last"
764
+ }
765
+ ],
766
+ "isUnique": false,
767
+ "concurrently": false,
768
+ "method": "btree",
769
+ "with": {}
770
+ },
771
+ "entities_name_idx": {
772
+ "name": "entities_name_idx",
773
+ "columns": [
774
+ {
775
+ "expression": "name",
776
+ "isExpression": false,
777
+ "asc": true,
778
+ "nulls": "last"
779
+ }
780
+ ],
781
+ "isUnique": false,
782
+ "concurrently": false,
783
+ "method": "btree",
784
+ "with": {}
785
+ }
786
+ },
787
+ "foreignKeys": {
788
+ "entities_project_id_projects_id_fk": {
789
+ "name": "entities_project_id_projects_id_fk",
790
+ "tableFrom": "entities",
791
+ "tableTo": "projects",
792
+ "columnsFrom": [
793
+ "project_id"
794
+ ],
795
+ "columnsTo": [
796
+ "id"
797
+ ],
798
+ "onDelete": "cascade",
799
+ "onUpdate": "no action"
800
+ }
801
+ },
802
+ "compositePrimaryKeys": {},
803
+ "uniqueConstraints": {},
804
+ "policies": {},
805
+ "checkConstraints": {},
806
+ "isRLSEnabled": false
807
+ },
808
+ "public.entity_relations": {
809
+ "name": "entity_relations",
810
+ "schema": "",
811
+ "columns": {
812
+ "id": {
813
+ "name": "id",
814
+ "type": "uuid",
815
+ "primaryKey": true,
816
+ "notNull": true,
817
+ "default": "gen_random_uuid()"
818
+ },
819
+ "from_entity_id": {
820
+ "name": "from_entity_id",
821
+ "type": "uuid",
822
+ "primaryKey": false,
823
+ "notNull": true
824
+ },
825
+ "to_entity_id": {
826
+ "name": "to_entity_id",
827
+ "type": "uuid",
828
+ "primaryKey": false,
829
+ "notNull": true
830
+ },
831
+ "type": {
832
+ "name": "type",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": true
836
+ },
837
+ "weight": {
838
+ "name": "weight",
839
+ "type": "integer",
840
+ "primaryKey": false,
841
+ "notNull": false,
842
+ "default": 1
843
+ },
844
+ "properties": {
845
+ "name": "properties",
846
+ "type": "jsonb",
847
+ "primaryKey": false,
848
+ "notNull": false
849
+ },
850
+ "created_at": {
851
+ "name": "created_at",
852
+ "type": "timestamp",
853
+ "primaryKey": false,
854
+ "notNull": true,
855
+ "default": "now()"
856
+ }
857
+ },
858
+ "indexes": {
859
+ "relations_from_idx": {
860
+ "name": "relations_from_idx",
861
+ "columns": [
862
+ {
863
+ "expression": "from_entity_id",
864
+ "isExpression": false,
865
+ "asc": true,
866
+ "nulls": "last"
867
+ }
868
+ ],
869
+ "isUnique": false,
870
+ "concurrently": false,
871
+ "method": "btree",
872
+ "with": {}
873
+ },
874
+ "relations_to_idx": {
875
+ "name": "relations_to_idx",
876
+ "columns": [
877
+ {
878
+ "expression": "to_entity_id",
879
+ "isExpression": false,
880
+ "asc": true,
881
+ "nulls": "last"
882
+ }
883
+ ],
884
+ "isUnique": false,
885
+ "concurrently": false,
886
+ "method": "btree",
887
+ "with": {}
888
+ },
889
+ "relations_type_idx": {
890
+ "name": "relations_type_idx",
891
+ "columns": [
892
+ {
893
+ "expression": "type",
894
+ "isExpression": false,
895
+ "asc": true,
896
+ "nulls": "last"
897
+ }
898
+ ],
899
+ "isUnique": false,
900
+ "concurrently": false,
901
+ "method": "btree",
902
+ "with": {}
903
+ }
904
+ },
905
+ "foreignKeys": {
906
+ "entity_relations_from_entity_id_entities_id_fk": {
907
+ "name": "entity_relations_from_entity_id_entities_id_fk",
908
+ "tableFrom": "entity_relations",
909
+ "tableTo": "entities",
910
+ "columnsFrom": [
911
+ "from_entity_id"
912
+ ],
913
+ "columnsTo": [
914
+ "id"
915
+ ],
916
+ "onDelete": "cascade",
917
+ "onUpdate": "no action"
918
+ },
919
+ "entity_relations_to_entity_id_entities_id_fk": {
920
+ "name": "entity_relations_to_entity_id_entities_id_fk",
921
+ "tableFrom": "entity_relations",
922
+ "tableTo": "entities",
923
+ "columnsFrom": [
924
+ "to_entity_id"
925
+ ],
926
+ "columnsTo": [
927
+ "id"
928
+ ],
929
+ "onDelete": "cascade",
930
+ "onUpdate": "no action"
931
+ }
932
+ },
933
+ "compositePrimaryKeys": {},
934
+ "uniqueConstraints": {},
935
+ "policies": {},
936
+ "checkConstraints": {},
937
+ "isRLSEnabled": false
938
+ },
939
+ "public.lightweight_memory_indices": {
940
+ "name": "lightweight_memory_indices",
941
+ "schema": "",
942
+ "columns": {
943
+ "id": {
944
+ "name": "id",
945
+ "type": "uuid",
946
+ "primaryKey": true,
947
+ "notNull": true,
948
+ "default": "gen_random_uuid()"
949
+ },
950
+ "memory_id": {
951
+ "name": "memory_id",
952
+ "type": "uuid",
953
+ "primaryKey": false,
954
+ "notNull": false
955
+ },
956
+ "content_hash": {
957
+ "name": "content_hash",
958
+ "type": "text",
959
+ "primaryKey": false,
960
+ "notNull": true
961
+ },
962
+ "content_preview": {
963
+ "name": "content_preview",
964
+ "type": "text",
965
+ "primaryKey": false,
966
+ "notNull": true
967
+ },
968
+ "key_terms": {
969
+ "name": "key_terms",
970
+ "type": "text[]",
971
+ "primaryKey": false,
972
+ "notNull": false
973
+ },
974
+ "category": {
975
+ "name": "category",
976
+ "type": "text",
977
+ "primaryKey": false,
978
+ "notNull": true
979
+ },
980
+ "importance_score": {
981
+ "name": "importance_score",
982
+ "type": "integer",
983
+ "primaryKey": false,
984
+ "notNull": true
985
+ },
986
+ "created_at": {
987
+ "name": "created_at",
988
+ "type": "timestamp",
989
+ "primaryKey": false,
990
+ "notNull": true,
991
+ "default": "now()"
992
+ }
993
+ },
994
+ "indexes": {
995
+ "lightweight_indices_memory_idx": {
996
+ "name": "lightweight_indices_memory_idx",
997
+ "columns": [
998
+ {
999
+ "expression": "memory_id",
1000
+ "isExpression": false,
1001
+ "asc": true,
1002
+ "nulls": "last"
1003
+ }
1004
+ ],
1005
+ "isUnique": false,
1006
+ "concurrently": false,
1007
+ "method": "btree",
1008
+ "with": {}
1009
+ },
1010
+ "lightweight_indices_category_idx": {
1011
+ "name": "lightweight_indices_category_idx",
1012
+ "columns": [
1013
+ {
1014
+ "expression": "category",
1015
+ "isExpression": false,
1016
+ "asc": true,
1017
+ "nulls": "last"
1018
+ }
1019
+ ],
1020
+ "isUnique": false,
1021
+ "concurrently": false,
1022
+ "method": "btree",
1023
+ "with": {}
1024
+ },
1025
+ "lightweight_indices_importance_idx": {
1026
+ "name": "lightweight_indices_importance_idx",
1027
+ "columns": [
1028
+ {
1029
+ "expression": "importance_score",
1030
+ "isExpression": false,
1031
+ "asc": true,
1032
+ "nulls": "last"
1033
+ }
1034
+ ],
1035
+ "isUnique": false,
1036
+ "concurrently": false,
1037
+ "method": "btree",
1038
+ "with": {}
1039
+ }
1040
+ },
1041
+ "foreignKeys": {
1042
+ "lightweight_memory_indices_memory_id_memories_id_fk": {
1043
+ "name": "lightweight_memory_indices_memory_id_memories_id_fk",
1044
+ "tableFrom": "lightweight_memory_indices",
1045
+ "tableTo": "memories",
1046
+ "columnsFrom": [
1047
+ "memory_id"
1048
+ ],
1049
+ "columnsTo": [
1050
+ "id"
1051
+ ],
1052
+ "onDelete": "cascade",
1053
+ "onUpdate": "no action"
1054
+ }
1055
+ },
1056
+ "compositePrimaryKeys": {},
1057
+ "uniqueConstraints": {},
1058
+ "policies": {},
1059
+ "checkConstraints": {},
1060
+ "isRLSEnabled": false
1061
+ },
1062
+ "public.memories": {
1063
+ "name": "memories",
1064
+ "schema": "",
1065
+ "columns": {
1066
+ "id": {
1067
+ "name": "id",
1068
+ "type": "uuid",
1069
+ "primaryKey": true,
1070
+ "notNull": true,
1071
+ "default": "gen_random_uuid()"
1072
+ },
1073
+ "project_id": {
1074
+ "name": "project_id",
1075
+ "type": "uuid",
1076
+ "primaryKey": false,
1077
+ "notNull": false
1078
+ },
1079
+ "user_id": {
1080
+ "name": "user_id",
1081
+ "type": "uuid",
1082
+ "primaryKey": false,
1083
+ "notNull": false
1084
+ },
1085
+ "type": {
1086
+ "name": "type",
1087
+ "type": "text",
1088
+ "primaryKey": false,
1089
+ "notNull": true
1090
+ },
1091
+ "content": {
1092
+ "name": "content",
1093
+ "type": "text",
1094
+ "primaryKey": false,
1095
+ "notNull": true
1096
+ },
1097
+ "summary": {
1098
+ "name": "summary",
1099
+ "type": "text",
1100
+ "primaryKey": false,
1101
+ "notNull": false
1102
+ },
1103
+ "embedding": {
1104
+ "name": "embedding",
1105
+ "type": "vector(1536)",
1106
+ "primaryKey": false,
1107
+ "notNull": false
1108
+ },
1109
+ "source": {
1110
+ "name": "source",
1111
+ "type": "text",
1112
+ "primaryKey": false,
1113
+ "notNull": false
1114
+ },
1115
+ "confidence": {
1116
+ "name": "confidence",
1117
+ "type": "integer",
1118
+ "primaryKey": false,
1119
+ "notNull": false,
1120
+ "default": 100
1121
+ },
1122
+ "tags": {
1123
+ "name": "tags",
1124
+ "type": "text[]",
1125
+ "primaryKey": false,
1126
+ "notNull": false
1127
+ },
1128
+ "metadata": {
1129
+ "name": "metadata",
1130
+ "type": "jsonb",
1131
+ "primaryKey": false,
1132
+ "notNull": false
1133
+ },
1134
+ "is_private": {
1135
+ "name": "is_private",
1136
+ "type": "boolean",
1137
+ "primaryKey": false,
1138
+ "notNull": false,
1139
+ "default": false
1140
+ },
1141
+ "has_secrets": {
1142
+ "name": "has_secrets",
1143
+ "type": "boolean",
1144
+ "primaryKey": false,
1145
+ "notNull": false,
1146
+ "default": false
1147
+ },
1148
+ "relevance_score": {
1149
+ "name": "relevance_score",
1150
+ "type": "integer",
1151
+ "primaryKey": false,
1152
+ "notNull": false,
1153
+ "default": 50
1154
+ },
1155
+ "sector": {
1156
+ "name": "sector",
1157
+ "type": "text",
1158
+ "primaryKey": false,
1159
+ "notNull": false,
1160
+ "default": "'episodic'"
1161
+ },
1162
+ "tier": {
1163
+ "name": "tier",
1164
+ "type": "text",
1165
+ "primaryKey": false,
1166
+ "notNull": false,
1167
+ "default": "'hot'"
1168
+ },
1169
+ "decay_rate": {
1170
+ "name": "decay_rate",
1171
+ "type": "integer",
1172
+ "primaryKey": false,
1173
+ "notNull": false,
1174
+ "default": 30
1175
+ },
1176
+ "coactivation_score": {
1177
+ "name": "coactivation_score",
1178
+ "type": "integer",
1179
+ "primaryKey": false,
1180
+ "notNull": false,
1181
+ "default": 0
1182
+ },
1183
+ "last_decay_at": {
1184
+ "name": "last_decay_at",
1185
+ "type": "timestamp",
1186
+ "primaryKey": false,
1187
+ "notNull": false,
1188
+ "default": "now()"
1189
+ },
1190
+ "agent_id": {
1191
+ "name": "agent_id",
1192
+ "type": "text",
1193
+ "primaryKey": false,
1194
+ "notNull": false
1195
+ },
1196
+ "agent_role": {
1197
+ "name": "agent_role",
1198
+ "type": "text",
1199
+ "primaryKey": false,
1200
+ "notNull": false
1201
+ },
1202
+ "visibility_scope": {
1203
+ "name": "visibility_scope",
1204
+ "type": "text",
1205
+ "primaryKey": false,
1206
+ "notNull": false,
1207
+ "default": "'private'"
1208
+ },
1209
+ "is_protected": {
1210
+ "name": "is_protected",
1211
+ "type": "boolean",
1212
+ "primaryKey": false,
1213
+ "notNull": false,
1214
+ "default": false
1215
+ },
1216
+ "is_pinned": {
1217
+ "name": "is_pinned",
1218
+ "type": "boolean",
1219
+ "primaryKey": false,
1220
+ "notNull": false,
1221
+ "default": false
1222
+ },
1223
+ "is_immutable": {
1224
+ "name": "is_immutable",
1225
+ "type": "boolean",
1226
+ "primaryKey": false,
1227
+ "notNull": false,
1228
+ "default": false
1229
+ },
1230
+ "write_scope": {
1231
+ "name": "write_scope",
1232
+ "type": "text[]",
1233
+ "primaryKey": false,
1234
+ "notNull": false
1235
+ },
1236
+ "read_scope": {
1237
+ "name": "read_scope",
1238
+ "type": "text[]",
1239
+ "primaryKey": false,
1240
+ "notNull": false
1241
+ },
1242
+ "triggered_by": {
1243
+ "name": "triggered_by",
1244
+ "type": "text",
1245
+ "primaryKey": false,
1246
+ "notNull": false
1247
+ },
1248
+ "capture_reason": {
1249
+ "name": "capture_reason",
1250
+ "type": "text",
1251
+ "primaryKey": false,
1252
+ "notNull": false
1253
+ },
1254
+ "last_used_at": {
1255
+ "name": "last_used_at",
1256
+ "type": "timestamp",
1257
+ "primaryKey": false,
1258
+ "notNull": false
1259
+ },
1260
+ "usage_count": {
1261
+ "name": "usage_count",
1262
+ "type": "integer",
1263
+ "primaryKey": false,
1264
+ "notNull": false,
1265
+ "default": 0
1266
+ },
1267
+ "valid_from": {
1268
+ "name": "valid_from",
1269
+ "type": "timestamp",
1270
+ "primaryKey": false,
1271
+ "notNull": false
1272
+ },
1273
+ "valid_to": {
1274
+ "name": "valid_to",
1275
+ "type": "timestamp",
1276
+ "primaryKey": false,
1277
+ "notNull": false
1278
+ },
1279
+ "recorded_at": {
1280
+ "name": "recorded_at",
1281
+ "type": "timestamp",
1282
+ "primaryKey": false,
1283
+ "notNull": true,
1284
+ "default": "now()"
1285
+ },
1286
+ "superseded_by": {
1287
+ "name": "superseded_by",
1288
+ "type": "uuid",
1289
+ "primaryKey": false,
1290
+ "notNull": false
1291
+ },
1292
+ "version": {
1293
+ "name": "version",
1294
+ "type": "integer",
1295
+ "primaryKey": false,
1296
+ "notNull": false,
1297
+ "default": 1
1298
+ },
1299
+ "is_active": {
1300
+ "name": "is_active",
1301
+ "type": "boolean",
1302
+ "primaryKey": false,
1303
+ "notNull": false,
1304
+ "default": true
1305
+ },
1306
+ "expires_at": {
1307
+ "name": "expires_at",
1308
+ "type": "timestamp",
1309
+ "primaryKey": false,
1310
+ "notNull": false
1311
+ },
1312
+ "access_count": {
1313
+ "name": "access_count",
1314
+ "type": "integer",
1315
+ "primaryKey": false,
1316
+ "notNull": false,
1317
+ "default": 0
1318
+ },
1319
+ "last_accessed_at": {
1320
+ "name": "last_accessed_at",
1321
+ "type": "timestamp",
1322
+ "primaryKey": false,
1323
+ "notNull": false
1324
+ },
1325
+ "is_merged": {
1326
+ "name": "is_merged",
1327
+ "type": "boolean",
1328
+ "primaryKey": false,
1329
+ "notNull": false,
1330
+ "default": false
1331
+ },
1332
+ "merged_into_id": {
1333
+ "name": "merged_into_id",
1334
+ "type": "uuid",
1335
+ "primaryKey": false,
1336
+ "notNull": false
1337
+ },
1338
+ "merged_at": {
1339
+ "name": "merged_at",
1340
+ "type": "timestamp",
1341
+ "primaryKey": false,
1342
+ "notNull": false
1343
+ },
1344
+ "is_canonical": {
1345
+ "name": "is_canonical",
1346
+ "type": "boolean",
1347
+ "primaryKey": false,
1348
+ "notNull": false,
1349
+ "default": false
1350
+ },
1351
+ "merge_source_ids": {
1352
+ "name": "merge_source_ids",
1353
+ "type": "jsonb",
1354
+ "primaryKey": false,
1355
+ "notNull": false
1356
+ },
1357
+ "is_mergeable": {
1358
+ "name": "is_mergeable",
1359
+ "type": "boolean",
1360
+ "primaryKey": false,
1361
+ "notNull": false,
1362
+ "default": true
1363
+ },
1364
+ "merge_version": {
1365
+ "name": "merge_version",
1366
+ "type": "integer",
1367
+ "primaryKey": false,
1368
+ "notNull": false,
1369
+ "default": 1
1370
+ },
1371
+ "created_at": {
1372
+ "name": "created_at",
1373
+ "type": "timestamp",
1374
+ "primaryKey": false,
1375
+ "notNull": true,
1376
+ "default": "now()"
1377
+ },
1378
+ "updated_at": {
1379
+ "name": "updated_at",
1380
+ "type": "timestamp",
1381
+ "primaryKey": false,
1382
+ "notNull": true,
1383
+ "default": "now()"
1384
+ }
1385
+ },
1386
+ "indexes": {
1387
+ "memories_project_idx": {
1388
+ "name": "memories_project_idx",
1389
+ "columns": [
1390
+ {
1391
+ "expression": "project_id",
1392
+ "isExpression": false,
1393
+ "asc": true,
1394
+ "nulls": "last"
1395
+ }
1396
+ ],
1397
+ "isUnique": false,
1398
+ "concurrently": false,
1399
+ "method": "btree",
1400
+ "with": {}
1401
+ },
1402
+ "memories_type_idx": {
1403
+ "name": "memories_type_idx",
1404
+ "columns": [
1405
+ {
1406
+ "expression": "type",
1407
+ "isExpression": false,
1408
+ "asc": true,
1409
+ "nulls": "last"
1410
+ }
1411
+ ],
1412
+ "isUnique": false,
1413
+ "concurrently": false,
1414
+ "method": "btree",
1415
+ "with": {}
1416
+ },
1417
+ "memories_created_idx": {
1418
+ "name": "memories_created_idx",
1419
+ "columns": [
1420
+ {
1421
+ "expression": "created_at",
1422
+ "isExpression": false,
1423
+ "asc": true,
1424
+ "nulls": "last"
1425
+ }
1426
+ ],
1427
+ "isUnique": false,
1428
+ "concurrently": false,
1429
+ "method": "btree",
1430
+ "with": {}
1431
+ },
1432
+ "memories_tags_idx": {
1433
+ "name": "memories_tags_idx",
1434
+ "columns": [
1435
+ {
1436
+ "expression": "tags",
1437
+ "isExpression": false,
1438
+ "asc": true,
1439
+ "nulls": "last"
1440
+ }
1441
+ ],
1442
+ "isUnique": false,
1443
+ "concurrently": false,
1444
+ "method": "btree",
1445
+ "with": {}
1446
+ },
1447
+ "memories_relevance_idx": {
1448
+ "name": "memories_relevance_idx",
1449
+ "columns": [
1450
+ {
1451
+ "expression": "relevance_score",
1452
+ "isExpression": false,
1453
+ "asc": true,
1454
+ "nulls": "last"
1455
+ }
1456
+ ],
1457
+ "isUnique": false,
1458
+ "concurrently": false,
1459
+ "method": "btree",
1460
+ "with": {}
1461
+ },
1462
+ "memories_private_idx": {
1463
+ "name": "memories_private_idx",
1464
+ "columns": [
1465
+ {
1466
+ "expression": "is_private",
1467
+ "isExpression": false,
1468
+ "asc": true,
1469
+ "nulls": "last"
1470
+ }
1471
+ ],
1472
+ "isUnique": false,
1473
+ "concurrently": false,
1474
+ "method": "btree",
1475
+ "with": {}
1476
+ },
1477
+ "memories_merged_idx": {
1478
+ "name": "memories_merged_idx",
1479
+ "columns": [
1480
+ {
1481
+ "expression": "is_merged",
1482
+ "isExpression": false,
1483
+ "asc": true,
1484
+ "nulls": "last"
1485
+ }
1486
+ ],
1487
+ "isUnique": false,
1488
+ "concurrently": false,
1489
+ "method": "btree",
1490
+ "with": {}
1491
+ },
1492
+ "memories_canonical_idx": {
1493
+ "name": "memories_canonical_idx",
1494
+ "columns": [
1495
+ {
1496
+ "expression": "is_canonical",
1497
+ "isExpression": false,
1498
+ "asc": true,
1499
+ "nulls": "last"
1500
+ }
1501
+ ],
1502
+ "isUnique": false,
1503
+ "concurrently": false,
1504
+ "method": "btree",
1505
+ "with": {}
1506
+ },
1507
+ "memories_sector_idx": {
1508
+ "name": "memories_sector_idx",
1509
+ "columns": [
1510
+ {
1511
+ "expression": "sector",
1512
+ "isExpression": false,
1513
+ "asc": true,
1514
+ "nulls": "last"
1515
+ }
1516
+ ],
1517
+ "isUnique": false,
1518
+ "concurrently": false,
1519
+ "method": "btree",
1520
+ "with": {}
1521
+ },
1522
+ "memories_tier_idx": {
1523
+ "name": "memories_tier_idx",
1524
+ "columns": [
1525
+ {
1526
+ "expression": "tier",
1527
+ "isExpression": false,
1528
+ "asc": true,
1529
+ "nulls": "last"
1530
+ }
1531
+ ],
1532
+ "isUnique": false,
1533
+ "concurrently": false,
1534
+ "method": "btree",
1535
+ "with": {}
1536
+ },
1537
+ "memories_agent_idx": {
1538
+ "name": "memories_agent_idx",
1539
+ "columns": [
1540
+ {
1541
+ "expression": "agent_id",
1542
+ "isExpression": false,
1543
+ "asc": true,
1544
+ "nulls": "last"
1545
+ }
1546
+ ],
1547
+ "isUnique": false,
1548
+ "concurrently": false,
1549
+ "method": "btree",
1550
+ "with": {}
1551
+ },
1552
+ "memories_visibility_idx": {
1553
+ "name": "memories_visibility_idx",
1554
+ "columns": [
1555
+ {
1556
+ "expression": "visibility_scope",
1557
+ "isExpression": false,
1558
+ "asc": true,
1559
+ "nulls": "last"
1560
+ }
1561
+ ],
1562
+ "isUnique": false,
1563
+ "concurrently": false,
1564
+ "method": "btree",
1565
+ "with": {}
1566
+ },
1567
+ "memories_protected_idx": {
1568
+ "name": "memories_protected_idx",
1569
+ "columns": [
1570
+ {
1571
+ "expression": "is_protected",
1572
+ "isExpression": false,
1573
+ "asc": true,
1574
+ "nulls": "last"
1575
+ }
1576
+ ],
1577
+ "isUnique": false,
1578
+ "concurrently": false,
1579
+ "method": "btree",
1580
+ "with": {}
1581
+ },
1582
+ "memories_pinned_idx": {
1583
+ "name": "memories_pinned_idx",
1584
+ "columns": [
1585
+ {
1586
+ "expression": "is_pinned",
1587
+ "isExpression": false,
1588
+ "asc": true,
1589
+ "nulls": "last"
1590
+ }
1591
+ ],
1592
+ "isUnique": false,
1593
+ "concurrently": false,
1594
+ "method": "btree",
1595
+ "with": {}
1596
+ },
1597
+ "memories_valid_from_idx": {
1598
+ "name": "memories_valid_from_idx",
1599
+ "columns": [
1600
+ {
1601
+ "expression": "valid_from",
1602
+ "isExpression": false,
1603
+ "asc": true,
1604
+ "nulls": "last"
1605
+ }
1606
+ ],
1607
+ "isUnique": false,
1608
+ "concurrently": false,
1609
+ "method": "btree",
1610
+ "with": {}
1611
+ },
1612
+ "memories_valid_to_idx": {
1613
+ "name": "memories_valid_to_idx",
1614
+ "columns": [
1615
+ {
1616
+ "expression": "valid_to",
1617
+ "isExpression": false,
1618
+ "asc": true,
1619
+ "nulls": "last"
1620
+ }
1621
+ ],
1622
+ "isUnique": false,
1623
+ "concurrently": false,
1624
+ "method": "btree",
1625
+ "with": {}
1626
+ },
1627
+ "memories_duplicate_detection_idx": {
1628
+ "name": "memories_duplicate_detection_idx",
1629
+ "columns": [
1630
+ {
1631
+ "expression": "project_id",
1632
+ "isExpression": false,
1633
+ "asc": true,
1634
+ "nulls": "last"
1635
+ },
1636
+ {
1637
+ "expression": "is_merged",
1638
+ "isExpression": false,
1639
+ "asc": true,
1640
+ "nulls": "last"
1641
+ },
1642
+ {
1643
+ "expression": "is_mergeable",
1644
+ "isExpression": false,
1645
+ "asc": true,
1646
+ "nulls": "last"
1647
+ },
1648
+ {
1649
+ "expression": "is_active",
1650
+ "isExpression": false,
1651
+ "asc": true,
1652
+ "nulls": "last"
1653
+ }
1654
+ ],
1655
+ "isUnique": false,
1656
+ "concurrently": false,
1657
+ "method": "btree",
1658
+ "with": {}
1659
+ },
1660
+ "memories_eviction_idx": {
1661
+ "name": "memories_eviction_idx",
1662
+ "columns": [
1663
+ {
1664
+ "expression": "project_id",
1665
+ "isExpression": false,
1666
+ "asc": true,
1667
+ "nulls": "last"
1668
+ },
1669
+ {
1670
+ "expression": "tier",
1671
+ "isExpression": false,
1672
+ "asc": true,
1673
+ "nulls": "last"
1674
+ },
1675
+ {
1676
+ "expression": "relevance_score",
1677
+ "isExpression": false,
1678
+ "asc": true,
1679
+ "nulls": "last"
1680
+ },
1681
+ {
1682
+ "expression": "created_at",
1683
+ "isExpression": false,
1684
+ "asc": true,
1685
+ "nulls": "last"
1686
+ }
1687
+ ],
1688
+ "isUnique": false,
1689
+ "concurrently": false,
1690
+ "method": "btree",
1691
+ "with": {}
1692
+ },
1693
+ "memories_decay_idx": {
1694
+ "name": "memories_decay_idx",
1695
+ "columns": [
1696
+ {
1697
+ "expression": "sector",
1698
+ "isExpression": false,
1699
+ "asc": true,
1700
+ "nulls": "last"
1701
+ },
1702
+ {
1703
+ "expression": "last_decay_at",
1704
+ "isExpression": false,
1705
+ "asc": true,
1706
+ "nulls": "last"
1707
+ },
1708
+ {
1709
+ "expression": "is_protected",
1710
+ "isExpression": false,
1711
+ "asc": true,
1712
+ "nulls": "last"
1713
+ }
1714
+ ],
1715
+ "isUnique": false,
1716
+ "concurrently": false,
1717
+ "method": "btree",
1718
+ "with": {}
1719
+ },
1720
+ "memories_temporal_idx": {
1721
+ "name": "memories_temporal_idx",
1722
+ "columns": [
1723
+ {
1724
+ "expression": "project_id",
1725
+ "isExpression": false,
1726
+ "asc": true,
1727
+ "nulls": "last"
1728
+ },
1729
+ {
1730
+ "expression": "valid_from",
1731
+ "isExpression": false,
1732
+ "asc": true,
1733
+ "nulls": "last"
1734
+ },
1735
+ {
1736
+ "expression": "valid_to",
1737
+ "isExpression": false,
1738
+ "asc": true,
1739
+ "nulls": "last"
1740
+ }
1741
+ ],
1742
+ "isUnique": false,
1743
+ "concurrently": false,
1744
+ "method": "btree",
1745
+ "with": {}
1746
+ },
1747
+ "memories_agent_visibility_idx": {
1748
+ "name": "memories_agent_visibility_idx",
1749
+ "columns": [
1750
+ {
1751
+ "expression": "agent_id",
1752
+ "isExpression": false,
1753
+ "asc": true,
1754
+ "nulls": "last"
1755
+ },
1756
+ {
1757
+ "expression": "visibility_scope",
1758
+ "isExpression": false,
1759
+ "asc": true,
1760
+ "nulls": "last"
1761
+ },
1762
+ {
1763
+ "expression": "is_active",
1764
+ "isExpression": false,
1765
+ "asc": true,
1766
+ "nulls": "last"
1767
+ }
1768
+ ],
1769
+ "isUnique": false,
1770
+ "concurrently": false,
1771
+ "method": "btree",
1772
+ "with": {}
1773
+ }
1774
+ },
1775
+ "foreignKeys": {
1776
+ "memories_project_id_projects_id_fk": {
1777
+ "name": "memories_project_id_projects_id_fk",
1778
+ "tableFrom": "memories",
1779
+ "tableTo": "projects",
1780
+ "columnsFrom": [
1781
+ "project_id"
1782
+ ],
1783
+ "columnsTo": [
1784
+ "id"
1785
+ ],
1786
+ "onDelete": "cascade",
1787
+ "onUpdate": "no action"
1788
+ },
1789
+ "memories_user_id_users_id_fk": {
1790
+ "name": "memories_user_id_users_id_fk",
1791
+ "tableFrom": "memories",
1792
+ "tableTo": "users",
1793
+ "columnsFrom": [
1794
+ "user_id"
1795
+ ],
1796
+ "columnsTo": [
1797
+ "id"
1798
+ ],
1799
+ "onDelete": "set null",
1800
+ "onUpdate": "no action"
1801
+ },
1802
+ "memories_superseded_by_memories_id_fk": {
1803
+ "name": "memories_superseded_by_memories_id_fk",
1804
+ "tableFrom": "memories",
1805
+ "tableTo": "memories",
1806
+ "columnsFrom": [
1807
+ "superseded_by"
1808
+ ],
1809
+ "columnsTo": [
1810
+ "id"
1811
+ ],
1812
+ "onDelete": "no action",
1813
+ "onUpdate": "no action"
1814
+ },
1815
+ "memories_merged_into_id_memories_id_fk": {
1816
+ "name": "memories_merged_into_id_memories_id_fk",
1817
+ "tableFrom": "memories",
1818
+ "tableTo": "memories",
1819
+ "columnsFrom": [
1820
+ "merged_into_id"
1821
+ ],
1822
+ "columnsTo": [
1823
+ "id"
1824
+ ],
1825
+ "onDelete": "no action",
1826
+ "onUpdate": "no action"
1827
+ }
1828
+ },
1829
+ "compositePrimaryKeys": {},
1830
+ "uniqueConstraints": {},
1831
+ "policies": {},
1832
+ "checkConstraints": {},
1833
+ "isRLSEnabled": false
1834
+ },
1835
+ "public.memory_associations": {
1836
+ "name": "memory_associations",
1837
+ "schema": "",
1838
+ "columns": {
1839
+ "id": {
1840
+ "name": "id",
1841
+ "type": "uuid",
1842
+ "primaryKey": true,
1843
+ "notNull": true,
1844
+ "default": "gen_random_uuid()"
1845
+ },
1846
+ "from_memory_id": {
1847
+ "name": "from_memory_id",
1848
+ "type": "uuid",
1849
+ "primaryKey": false,
1850
+ "notNull": true
1851
+ },
1852
+ "to_memory_id": {
1853
+ "name": "to_memory_id",
1854
+ "type": "uuid",
1855
+ "primaryKey": false,
1856
+ "notNull": true
1857
+ },
1858
+ "association_type": {
1859
+ "name": "association_type",
1860
+ "type": "text",
1861
+ "primaryKey": false,
1862
+ "notNull": true
1863
+ },
1864
+ "weight": {
1865
+ "name": "weight",
1866
+ "type": "integer",
1867
+ "primaryKey": false,
1868
+ "notNull": false,
1869
+ "default": 1
1870
+ },
1871
+ "coactivation_count": {
1872
+ "name": "coactivation_count",
1873
+ "type": "integer",
1874
+ "primaryKey": false,
1875
+ "notNull": false,
1876
+ "default": 0
1877
+ },
1878
+ "metadata": {
1879
+ "name": "metadata",
1880
+ "type": "jsonb",
1881
+ "primaryKey": false,
1882
+ "notNull": false
1883
+ },
1884
+ "created_at": {
1885
+ "name": "created_at",
1886
+ "type": "timestamp",
1887
+ "primaryKey": false,
1888
+ "notNull": true,
1889
+ "default": "now()"
1890
+ },
1891
+ "last_coactivated_at": {
1892
+ "name": "last_coactivated_at",
1893
+ "type": "timestamp",
1894
+ "primaryKey": false,
1895
+ "notNull": false
1896
+ }
1897
+ },
1898
+ "indexes": {
1899
+ "associations_from_idx": {
1900
+ "name": "associations_from_idx",
1901
+ "columns": [
1902
+ {
1903
+ "expression": "from_memory_id",
1904
+ "isExpression": false,
1905
+ "asc": true,
1906
+ "nulls": "last"
1907
+ }
1908
+ ],
1909
+ "isUnique": false,
1910
+ "concurrently": false,
1911
+ "method": "btree",
1912
+ "with": {}
1913
+ },
1914
+ "associations_to_idx": {
1915
+ "name": "associations_to_idx",
1916
+ "columns": [
1917
+ {
1918
+ "expression": "to_memory_id",
1919
+ "isExpression": false,
1920
+ "asc": true,
1921
+ "nulls": "last"
1922
+ }
1923
+ ],
1924
+ "isUnique": false,
1925
+ "concurrently": false,
1926
+ "method": "btree",
1927
+ "with": {}
1928
+ },
1929
+ "associations_type_idx": {
1930
+ "name": "associations_type_idx",
1931
+ "columns": [
1932
+ {
1933
+ "expression": "association_type",
1934
+ "isExpression": false,
1935
+ "asc": true,
1936
+ "nulls": "last"
1937
+ }
1938
+ ],
1939
+ "isUnique": false,
1940
+ "concurrently": false,
1941
+ "method": "btree",
1942
+ "with": {}
1943
+ },
1944
+ "associations_weight_idx": {
1945
+ "name": "associations_weight_idx",
1946
+ "columns": [
1947
+ {
1948
+ "expression": "weight",
1949
+ "isExpression": false,
1950
+ "asc": true,
1951
+ "nulls": "last"
1952
+ }
1953
+ ],
1954
+ "isUnique": false,
1955
+ "concurrently": false,
1956
+ "method": "btree",
1957
+ "with": {}
1958
+ },
1959
+ "associations_graph_traversal_idx": {
1960
+ "name": "associations_graph_traversal_idx",
1961
+ "columns": [
1962
+ {
1963
+ "expression": "from_memory_id",
1964
+ "isExpression": false,
1965
+ "asc": true,
1966
+ "nulls": "last"
1967
+ },
1968
+ {
1969
+ "expression": "to_memory_id",
1970
+ "isExpression": false,
1971
+ "asc": true,
1972
+ "nulls": "last"
1973
+ },
1974
+ {
1975
+ "expression": "weight",
1976
+ "isExpression": false,
1977
+ "asc": true,
1978
+ "nulls": "last"
1979
+ },
1980
+ {
1981
+ "expression": "association_type",
1982
+ "isExpression": false,
1983
+ "asc": true,
1984
+ "nulls": "last"
1985
+ }
1986
+ ],
1987
+ "isUnique": false,
1988
+ "concurrently": false,
1989
+ "method": "btree",
1990
+ "with": {}
1991
+ }
1992
+ },
1993
+ "foreignKeys": {
1994
+ "memory_associations_from_memory_id_memories_id_fk": {
1995
+ "name": "memory_associations_from_memory_id_memories_id_fk",
1996
+ "tableFrom": "memory_associations",
1997
+ "tableTo": "memories",
1998
+ "columnsFrom": [
1999
+ "from_memory_id"
2000
+ ],
2001
+ "columnsTo": [
2002
+ "id"
2003
+ ],
2004
+ "onDelete": "cascade",
2005
+ "onUpdate": "no action"
2006
+ },
2007
+ "memory_associations_to_memory_id_memories_id_fk": {
2008
+ "name": "memory_associations_to_memory_id_memories_id_fk",
2009
+ "tableFrom": "memory_associations",
2010
+ "tableTo": "memories",
2011
+ "columnsFrom": [
2012
+ "to_memory_id"
2013
+ ],
2014
+ "columnsTo": [
2015
+ "id"
2016
+ ],
2017
+ "onDelete": "cascade",
2018
+ "onUpdate": "no action"
2019
+ }
2020
+ },
2021
+ "compositePrimaryKeys": {},
2022
+ "uniqueConstraints": {},
2023
+ "policies": {},
2024
+ "checkConstraints": {},
2025
+ "isRLSEnabled": false
2026
+ },
2027
+ "public.memory_edit_proposals": {
2028
+ "name": "memory_edit_proposals",
2029
+ "schema": "",
2030
+ "columns": {
2031
+ "id": {
2032
+ "name": "id",
2033
+ "type": "uuid",
2034
+ "primaryKey": true,
2035
+ "notNull": true,
2036
+ "default": "gen_random_uuid()"
2037
+ },
2038
+ "project_id": {
2039
+ "name": "project_id",
2040
+ "type": "uuid",
2041
+ "primaryKey": false,
2042
+ "notNull": true
2043
+ },
2044
+ "user_id": {
2045
+ "name": "user_id",
2046
+ "type": "uuid",
2047
+ "primaryKey": false,
2048
+ "notNull": false
2049
+ },
2050
+ "memory_id": {
2051
+ "name": "memory_id",
2052
+ "type": "uuid",
2053
+ "primaryKey": false,
2054
+ "notNull": true
2055
+ },
2056
+ "current_content": {
2057
+ "name": "current_content",
2058
+ "type": "text",
2059
+ "primaryKey": false,
2060
+ "notNull": true
2061
+ },
2062
+ "proposed_content": {
2063
+ "name": "proposed_content",
2064
+ "type": "text",
2065
+ "primaryKey": false,
2066
+ "notNull": true
2067
+ },
2068
+ "reason": {
2069
+ "name": "reason",
2070
+ "type": "text",
2071
+ "primaryKey": false,
2072
+ "notNull": true
2073
+ },
2074
+ "conflict_warnings": {
2075
+ "name": "conflict_warnings",
2076
+ "type": "jsonb",
2077
+ "primaryKey": false,
2078
+ "notNull": false
2079
+ },
2080
+ "status": {
2081
+ "name": "status",
2082
+ "type": "text",
2083
+ "primaryKey": false,
2084
+ "notNull": true,
2085
+ "default": "'pending'"
2086
+ },
2087
+ "version": {
2088
+ "name": "version",
2089
+ "type": "integer",
2090
+ "primaryKey": false,
2091
+ "notNull": true,
2092
+ "default": 1
2093
+ },
2094
+ "created_at": {
2095
+ "name": "created_at",
2096
+ "type": "timestamp",
2097
+ "primaryKey": false,
2098
+ "notNull": true,
2099
+ "default": "now()"
2100
+ },
2101
+ "reviewed_at": {
2102
+ "name": "reviewed_at",
2103
+ "type": "timestamp",
2104
+ "primaryKey": false,
2105
+ "notNull": false
2106
+ },
2107
+ "review_notes": {
2108
+ "name": "review_notes",
2109
+ "type": "text",
2110
+ "primaryKey": false,
2111
+ "notNull": false
2112
+ }
2113
+ },
2114
+ "indexes": {
2115
+ "memory_edit_proposals_memory_idx": {
2116
+ "name": "memory_edit_proposals_memory_idx",
2117
+ "columns": [
2118
+ {
2119
+ "expression": "memory_id",
2120
+ "isExpression": false,
2121
+ "asc": true,
2122
+ "nulls": "last"
2123
+ }
2124
+ ],
2125
+ "isUnique": false,
2126
+ "concurrently": false,
2127
+ "method": "btree",
2128
+ "with": {}
2129
+ },
2130
+ "memory_edit_proposals_status_idx": {
2131
+ "name": "memory_edit_proposals_status_idx",
2132
+ "columns": [
2133
+ {
2134
+ "expression": "status",
2135
+ "isExpression": false,
2136
+ "asc": true,
2137
+ "nulls": "last"
2138
+ }
2139
+ ],
2140
+ "isUnique": false,
2141
+ "concurrently": false,
2142
+ "method": "btree",
2143
+ "with": {}
2144
+ },
2145
+ "memory_edit_proposals_created_at_idx": {
2146
+ "name": "memory_edit_proposals_created_at_idx",
2147
+ "columns": [
2148
+ {
2149
+ "expression": "created_at",
2150
+ "isExpression": false,
2151
+ "asc": true,
2152
+ "nulls": "last"
2153
+ }
2154
+ ],
2155
+ "isUnique": false,
2156
+ "concurrently": false,
2157
+ "method": "btree",
2158
+ "with": {}
2159
+ }
2160
+ },
2161
+ "foreignKeys": {
2162
+ "memory_edit_proposals_project_id_projects_id_fk": {
2163
+ "name": "memory_edit_proposals_project_id_projects_id_fk",
2164
+ "tableFrom": "memory_edit_proposals",
2165
+ "tableTo": "projects",
2166
+ "columnsFrom": [
2167
+ "project_id"
2168
+ ],
2169
+ "columnsTo": [
2170
+ "id"
2171
+ ],
2172
+ "onDelete": "cascade",
2173
+ "onUpdate": "no action"
2174
+ },
2175
+ "memory_edit_proposals_user_id_users_id_fk": {
2176
+ "name": "memory_edit_proposals_user_id_users_id_fk",
2177
+ "tableFrom": "memory_edit_proposals",
2178
+ "tableTo": "users",
2179
+ "columnsFrom": [
2180
+ "user_id"
2181
+ ],
2182
+ "columnsTo": [
2183
+ "id"
2184
+ ],
2185
+ "onDelete": "set null",
2186
+ "onUpdate": "no action"
2187
+ },
2188
+ "memory_edit_proposals_memory_id_memories_id_fk": {
2189
+ "name": "memory_edit_proposals_memory_id_memories_id_fk",
2190
+ "tableFrom": "memory_edit_proposals",
2191
+ "tableTo": "memories",
2192
+ "columnsFrom": [
2193
+ "memory_id"
2194
+ ],
2195
+ "columnsTo": [
2196
+ "id"
2197
+ ],
2198
+ "onDelete": "cascade",
2199
+ "onUpdate": "no action"
2200
+ }
2201
+ },
2202
+ "compositePrimaryKeys": {},
2203
+ "uniqueConstraints": {},
2204
+ "policies": {},
2205
+ "checkConstraints": {},
2206
+ "isRLSEnabled": false
2207
+ },
2208
+ "public.memory_hash_cache": {
2209
+ "name": "memory_hash_cache",
2210
+ "schema": "",
2211
+ "columns": {
2212
+ "memory_id": {
2213
+ "name": "memory_id",
2214
+ "type": "uuid",
2215
+ "primaryKey": true,
2216
+ "notNull": true
2217
+ },
2218
+ "project_id": {
2219
+ "name": "project_id",
2220
+ "type": "uuid",
2221
+ "primaryKey": false,
2222
+ "notNull": true
2223
+ },
2224
+ "simhash": {
2225
+ "name": "simhash",
2226
+ "type": "text",
2227
+ "primaryKey": false,
2228
+ "notNull": false
2229
+ },
2230
+ "minhash": {
2231
+ "name": "minhash",
2232
+ "type": "jsonb",
2233
+ "primaryKey": false,
2234
+ "notNull": false
2235
+ },
2236
+ "content_hash": {
2237
+ "name": "content_hash",
2238
+ "type": "text",
2239
+ "primaryKey": false,
2240
+ "notNull": true
2241
+ },
2242
+ "last_updated": {
2243
+ "name": "last_updated",
2244
+ "type": "timestamp",
2245
+ "primaryKey": false,
2246
+ "notNull": true,
2247
+ "default": "now()"
2248
+ }
2249
+ },
2250
+ "indexes": {
2251
+ "memory_hash_cache_project_id_idx": {
2252
+ "name": "memory_hash_cache_project_id_idx",
2253
+ "columns": [
2254
+ {
2255
+ "expression": "project_id",
2256
+ "isExpression": false,
2257
+ "asc": true,
2258
+ "nulls": "last"
2259
+ }
2260
+ ],
2261
+ "isUnique": false,
2262
+ "concurrently": false,
2263
+ "method": "btree",
2264
+ "with": {}
2265
+ },
2266
+ "memory_hash_cache_simhash_idx": {
2267
+ "name": "memory_hash_cache_simhash_idx",
2268
+ "columns": [
2269
+ {
2270
+ "expression": "simhash",
2271
+ "isExpression": false,
2272
+ "asc": true,
2273
+ "nulls": "last"
2274
+ }
2275
+ ],
2276
+ "isUnique": false,
2277
+ "concurrently": false,
2278
+ "method": "btree",
2279
+ "with": {}
2280
+ }
2281
+ },
2282
+ "foreignKeys": {
2283
+ "memory_hash_cache_memory_id_memories_id_fk": {
2284
+ "name": "memory_hash_cache_memory_id_memories_id_fk",
2285
+ "tableFrom": "memory_hash_cache",
2286
+ "tableTo": "memories",
2287
+ "columnsFrom": [
2288
+ "memory_id"
2289
+ ],
2290
+ "columnsTo": [
2291
+ "id"
2292
+ ],
2293
+ "onDelete": "cascade",
2294
+ "onUpdate": "no action"
2295
+ },
2296
+ "memory_hash_cache_project_id_projects_id_fk": {
2297
+ "name": "memory_hash_cache_project_id_projects_id_fk",
2298
+ "tableFrom": "memory_hash_cache",
2299
+ "tableTo": "projects",
2300
+ "columnsFrom": [
2301
+ "project_id"
2302
+ ],
2303
+ "columnsTo": [
2304
+ "id"
2305
+ ],
2306
+ "onDelete": "cascade",
2307
+ "onUpdate": "no action"
2308
+ }
2309
+ },
2310
+ "compositePrimaryKeys": {},
2311
+ "uniqueConstraints": {},
2312
+ "policies": {},
2313
+ "checkConstraints": {},
2314
+ "isRLSEnabled": false
2315
+ },
2316
+ "public.memory_merge_history": {
2317
+ "name": "memory_merge_history",
2318
+ "schema": "",
2319
+ "columns": {
2320
+ "id": {
2321
+ "name": "id",
2322
+ "type": "uuid",
2323
+ "primaryKey": true,
2324
+ "notNull": true,
2325
+ "default": "gen_random_uuid()"
2326
+ },
2327
+ "project_id": {
2328
+ "name": "project_id",
2329
+ "type": "uuid",
2330
+ "primaryKey": false,
2331
+ "notNull": true
2332
+ },
2333
+ "user_id": {
2334
+ "name": "user_id",
2335
+ "type": "uuid",
2336
+ "primaryKey": false,
2337
+ "notNull": false
2338
+ },
2339
+ "proposal_id": {
2340
+ "name": "proposal_id",
2341
+ "type": "uuid",
2342
+ "primaryKey": false,
2343
+ "notNull": false
2344
+ },
2345
+ "source_memory_ids": {
2346
+ "name": "source_memory_ids",
2347
+ "type": "jsonb",
2348
+ "primaryKey": false,
2349
+ "notNull": true
2350
+ },
2351
+ "canonical_memory_id": {
2352
+ "name": "canonical_memory_id",
2353
+ "type": "uuid",
2354
+ "primaryKey": false,
2355
+ "notNull": true
2356
+ },
2357
+ "source_memories_snapshot": {
2358
+ "name": "source_memories_snapshot",
2359
+ "type": "jsonb",
2360
+ "primaryKey": false,
2361
+ "notNull": true
2362
+ },
2363
+ "merge_strategy": {
2364
+ "name": "merge_strategy",
2365
+ "type": "text",
2366
+ "primaryKey": false,
2367
+ "notNull": true
2368
+ },
2369
+ "tokens_saved": {
2370
+ "name": "tokens_saved",
2371
+ "type": "integer",
2372
+ "primaryKey": false,
2373
+ "notNull": false
2374
+ },
2375
+ "is_reversed": {
2376
+ "name": "is_reversed",
2377
+ "type": "boolean",
2378
+ "primaryKey": false,
2379
+ "notNull": false,
2380
+ "default": false
2381
+ },
2382
+ "reversed_at": {
2383
+ "name": "reversed_at",
2384
+ "type": "timestamp",
2385
+ "primaryKey": false,
2386
+ "notNull": false
2387
+ },
2388
+ "reversed_by": {
2389
+ "name": "reversed_by",
2390
+ "type": "uuid",
2391
+ "primaryKey": false,
2392
+ "notNull": false
2393
+ },
2394
+ "merged_at": {
2395
+ "name": "merged_at",
2396
+ "type": "timestamp",
2397
+ "primaryKey": false,
2398
+ "notNull": true,
2399
+ "default": "now()"
2400
+ }
2401
+ },
2402
+ "indexes": {},
2403
+ "foreignKeys": {
2404
+ "memory_merge_history_project_id_projects_id_fk": {
2405
+ "name": "memory_merge_history_project_id_projects_id_fk",
2406
+ "tableFrom": "memory_merge_history",
2407
+ "tableTo": "projects",
2408
+ "columnsFrom": [
2409
+ "project_id"
2410
+ ],
2411
+ "columnsTo": [
2412
+ "id"
2413
+ ],
2414
+ "onDelete": "cascade",
2415
+ "onUpdate": "no action"
2416
+ },
2417
+ "memory_merge_history_user_id_users_id_fk": {
2418
+ "name": "memory_merge_history_user_id_users_id_fk",
2419
+ "tableFrom": "memory_merge_history",
2420
+ "tableTo": "users",
2421
+ "columnsFrom": [
2422
+ "user_id"
2423
+ ],
2424
+ "columnsTo": [
2425
+ "id"
2426
+ ],
2427
+ "onDelete": "set null",
2428
+ "onUpdate": "no action"
2429
+ },
2430
+ "memory_merge_history_proposal_id_memory_merge_proposals_id_fk": {
2431
+ "name": "memory_merge_history_proposal_id_memory_merge_proposals_id_fk",
2432
+ "tableFrom": "memory_merge_history",
2433
+ "tableTo": "memory_merge_proposals",
2434
+ "columnsFrom": [
2435
+ "proposal_id"
2436
+ ],
2437
+ "columnsTo": [
2438
+ "id"
2439
+ ],
2440
+ "onDelete": "set null",
2441
+ "onUpdate": "no action"
2442
+ },
2443
+ "memory_merge_history_canonical_memory_id_memories_id_fk": {
2444
+ "name": "memory_merge_history_canonical_memory_id_memories_id_fk",
2445
+ "tableFrom": "memory_merge_history",
2446
+ "tableTo": "memories",
2447
+ "columnsFrom": [
2448
+ "canonical_memory_id"
2449
+ ],
2450
+ "columnsTo": [
2451
+ "id"
2452
+ ],
2453
+ "onDelete": "cascade",
2454
+ "onUpdate": "no action"
2455
+ }
2456
+ },
2457
+ "compositePrimaryKeys": {},
2458
+ "uniqueConstraints": {},
2459
+ "policies": {},
2460
+ "checkConstraints": {},
2461
+ "isRLSEnabled": false
2462
+ },
2463
+ "public.memory_merge_proposals": {
2464
+ "name": "memory_merge_proposals",
2465
+ "schema": "",
2466
+ "columns": {
2467
+ "id": {
2468
+ "name": "id",
2469
+ "type": "uuid",
2470
+ "primaryKey": true,
2471
+ "notNull": true,
2472
+ "default": "gen_random_uuid()"
2473
+ },
2474
+ "project_id": {
2475
+ "name": "project_id",
2476
+ "type": "uuid",
2477
+ "primaryKey": false,
2478
+ "notNull": true
2479
+ },
2480
+ "user_id": {
2481
+ "name": "user_id",
2482
+ "type": "uuid",
2483
+ "primaryKey": false,
2484
+ "notNull": false
2485
+ },
2486
+ "source_memory_ids": {
2487
+ "name": "source_memory_ids",
2488
+ "type": "jsonb",
2489
+ "primaryKey": false,
2490
+ "notNull": true
2491
+ },
2492
+ "proposed_content": {
2493
+ "name": "proposed_content",
2494
+ "type": "text",
2495
+ "primaryKey": false,
2496
+ "notNull": true
2497
+ },
2498
+ "proposed_summary": {
2499
+ "name": "proposed_summary",
2500
+ "type": "text",
2501
+ "primaryKey": false,
2502
+ "notNull": false
2503
+ },
2504
+ "proposed_tags": {
2505
+ "name": "proposed_tags",
2506
+ "type": "jsonb",
2507
+ "primaryKey": false,
2508
+ "notNull": false
2509
+ },
2510
+ "proposed_metadata": {
2511
+ "name": "proposed_metadata",
2512
+ "type": "jsonb",
2513
+ "primaryKey": false,
2514
+ "notNull": false
2515
+ },
2516
+ "detection_method": {
2517
+ "name": "detection_method",
2518
+ "type": "text",
2519
+ "primaryKey": false,
2520
+ "notNull": true
2521
+ },
2522
+ "similarity_score": {
2523
+ "name": "similarity_score",
2524
+ "type": "numeric",
2525
+ "primaryKey": false,
2526
+ "notNull": true
2527
+ },
2528
+ "confidence_level": {
2529
+ "name": "confidence_level",
2530
+ "type": "text",
2531
+ "primaryKey": false,
2532
+ "notNull": true
2533
+ },
2534
+ "merge_reason": {
2535
+ "name": "merge_reason",
2536
+ "type": "text",
2537
+ "primaryKey": false,
2538
+ "notNull": true
2539
+ },
2540
+ "conflict_warnings": {
2541
+ "name": "conflict_warnings",
2542
+ "type": "jsonb",
2543
+ "primaryKey": false,
2544
+ "notNull": false
2545
+ },
2546
+ "status": {
2547
+ "name": "status",
2548
+ "type": "text",
2549
+ "primaryKey": false,
2550
+ "notNull": true,
2551
+ "default": "'pending'"
2552
+ },
2553
+ "reviewed_at": {
2554
+ "name": "reviewed_at",
2555
+ "type": "timestamp",
2556
+ "primaryKey": false,
2557
+ "notNull": false
2558
+ },
2559
+ "review_notes": {
2560
+ "name": "review_notes",
2561
+ "type": "text",
2562
+ "primaryKey": false,
2563
+ "notNull": false
2564
+ },
2565
+ "created_at": {
2566
+ "name": "created_at",
2567
+ "type": "timestamp",
2568
+ "primaryKey": false,
2569
+ "notNull": true,
2570
+ "default": "now()"
2571
+ },
2572
+ "expires_at": {
2573
+ "name": "expires_at",
2574
+ "type": "timestamp",
2575
+ "primaryKey": false,
2576
+ "notNull": false
2577
+ }
2578
+ },
2579
+ "indexes": {
2580
+ "memory_merge_proposals_project_status_idx": {
2581
+ "name": "memory_merge_proposals_project_status_idx",
2582
+ "columns": [
2583
+ {
2584
+ "expression": "project_id",
2585
+ "isExpression": false,
2586
+ "asc": true,
2587
+ "nulls": "last"
2588
+ },
2589
+ {
2590
+ "expression": "status",
2591
+ "isExpression": false,
2592
+ "asc": true,
2593
+ "nulls": "last"
2594
+ }
2595
+ ],
2596
+ "isUnique": false,
2597
+ "concurrently": false,
2598
+ "method": "btree",
2599
+ "with": {}
2600
+ },
2601
+ "memory_merge_proposals_created_at_idx": {
2602
+ "name": "memory_merge_proposals_created_at_idx",
2603
+ "columns": [
2604
+ {
2605
+ "expression": "created_at",
2606
+ "isExpression": false,
2607
+ "asc": true,
2608
+ "nulls": "last"
2609
+ }
2610
+ ],
2611
+ "isUnique": false,
2612
+ "concurrently": false,
2613
+ "method": "btree",
2614
+ "with": {}
2615
+ }
2616
+ },
2617
+ "foreignKeys": {
2618
+ "memory_merge_proposals_project_id_projects_id_fk": {
2619
+ "name": "memory_merge_proposals_project_id_projects_id_fk",
2620
+ "tableFrom": "memory_merge_proposals",
2621
+ "tableTo": "projects",
2622
+ "columnsFrom": [
2623
+ "project_id"
2624
+ ],
2625
+ "columnsTo": [
2626
+ "id"
2627
+ ],
2628
+ "onDelete": "cascade",
2629
+ "onUpdate": "no action"
2630
+ },
2631
+ "memory_merge_proposals_user_id_users_id_fk": {
2632
+ "name": "memory_merge_proposals_user_id_users_id_fk",
2633
+ "tableFrom": "memory_merge_proposals",
2634
+ "tableTo": "users",
2635
+ "columnsFrom": [
2636
+ "user_id"
2637
+ ],
2638
+ "columnsTo": [
2639
+ "id"
2640
+ ],
2641
+ "onDelete": "set null",
2642
+ "onUpdate": "no action"
2643
+ }
2644
+ },
2645
+ "compositePrimaryKeys": {},
2646
+ "uniqueConstraints": {},
2647
+ "policies": {},
2648
+ "checkConstraints": {},
2649
+ "isRLSEnabled": false
2650
+ },
2651
+ "public.memory_snapshots": {
2652
+ "name": "memory_snapshots",
2653
+ "schema": "",
2654
+ "columns": {
2655
+ "id": {
2656
+ "name": "id",
2657
+ "type": "uuid",
2658
+ "primaryKey": true,
2659
+ "notNull": true,
2660
+ "default": "gen_random_uuid()"
2661
+ },
2662
+ "memory_id": {
2663
+ "name": "memory_id",
2664
+ "type": "uuid",
2665
+ "primaryKey": false,
2666
+ "notNull": true
2667
+ },
2668
+ "snapshot_type": {
2669
+ "name": "snapshot_type",
2670
+ "type": "text",
2671
+ "primaryKey": false,
2672
+ "notNull": true
2673
+ },
2674
+ "content": {
2675
+ "name": "content",
2676
+ "type": "text",
2677
+ "primaryKey": false,
2678
+ "notNull": true
2679
+ },
2680
+ "metadata": {
2681
+ "name": "metadata",
2682
+ "type": "jsonb",
2683
+ "primaryKey": false,
2684
+ "notNull": false
2685
+ },
2686
+ "diff": {
2687
+ "name": "diff",
2688
+ "type": "jsonb",
2689
+ "primaryKey": false,
2690
+ "notNull": false
2691
+ },
2692
+ "created_at": {
2693
+ "name": "created_at",
2694
+ "type": "timestamp",
2695
+ "primaryKey": false,
2696
+ "notNull": true,
2697
+ "default": "now()"
2698
+ }
2699
+ },
2700
+ "indexes": {
2701
+ "snapshots_memory_idx": {
2702
+ "name": "snapshots_memory_idx",
2703
+ "columns": [
2704
+ {
2705
+ "expression": "memory_id",
2706
+ "isExpression": false,
2707
+ "asc": true,
2708
+ "nulls": "last"
2709
+ }
2710
+ ],
2711
+ "isUnique": false,
2712
+ "concurrently": false,
2713
+ "method": "btree",
2714
+ "with": {}
2715
+ },
2716
+ "snapshots_type_idx": {
2717
+ "name": "snapshots_type_idx",
2718
+ "columns": [
2719
+ {
2720
+ "expression": "snapshot_type",
2721
+ "isExpression": false,
2722
+ "asc": true,
2723
+ "nulls": "last"
2724
+ }
2725
+ ],
2726
+ "isUnique": false,
2727
+ "concurrently": false,
2728
+ "method": "btree",
2729
+ "with": {}
2730
+ },
2731
+ "snapshots_created_idx": {
2732
+ "name": "snapshots_created_idx",
2733
+ "columns": [
2734
+ {
2735
+ "expression": "created_at",
2736
+ "isExpression": false,
2737
+ "asc": true,
2738
+ "nulls": "last"
2739
+ }
2740
+ ],
2741
+ "isUnique": false,
2742
+ "concurrently": false,
2743
+ "method": "btree",
2744
+ "with": {}
2745
+ }
2746
+ },
2747
+ "foreignKeys": {
2748
+ "memory_snapshots_memory_id_memories_id_fk": {
2749
+ "name": "memory_snapshots_memory_id_memories_id_fk",
2750
+ "tableFrom": "memory_snapshots",
2751
+ "tableTo": "memories",
2752
+ "columnsFrom": [
2753
+ "memory_id"
2754
+ ],
2755
+ "columnsTo": [
2756
+ "id"
2757
+ ],
2758
+ "onDelete": "cascade",
2759
+ "onUpdate": "no action"
2760
+ }
2761
+ },
2762
+ "compositePrimaryKeys": {},
2763
+ "uniqueConstraints": {},
2764
+ "policies": {},
2765
+ "checkConstraints": {},
2766
+ "isRLSEnabled": false
2767
+ },
2768
+ "public.messages": {
2769
+ "name": "messages",
2770
+ "schema": "",
2771
+ "columns": {
2772
+ "id": {
2773
+ "name": "id",
2774
+ "type": "uuid",
2775
+ "primaryKey": true,
2776
+ "notNull": true,
2777
+ "default": "gen_random_uuid()"
2778
+ },
2779
+ "conversation_id": {
2780
+ "name": "conversation_id",
2781
+ "type": "uuid",
2782
+ "primaryKey": false,
2783
+ "notNull": true
2784
+ },
2785
+ "role": {
2786
+ "name": "role",
2787
+ "type": "text",
2788
+ "primaryKey": false,
2789
+ "notNull": true
2790
+ },
2791
+ "content": {
2792
+ "name": "content",
2793
+ "type": "text",
2794
+ "primaryKey": false,
2795
+ "notNull": true
2796
+ },
2797
+ "embedding": {
2798
+ "name": "embedding",
2799
+ "type": "vector(1536)",
2800
+ "primaryKey": false,
2801
+ "notNull": false
2802
+ },
2803
+ "token_count": {
2804
+ "name": "token_count",
2805
+ "type": "integer",
2806
+ "primaryKey": false,
2807
+ "notNull": false
2808
+ },
2809
+ "tool_calls": {
2810
+ "name": "tool_calls",
2811
+ "type": "jsonb",
2812
+ "primaryKey": false,
2813
+ "notNull": false
2814
+ },
2815
+ "metadata": {
2816
+ "name": "metadata",
2817
+ "type": "jsonb",
2818
+ "primaryKey": false,
2819
+ "notNull": false
2820
+ },
2821
+ "created_at": {
2822
+ "name": "created_at",
2823
+ "type": "timestamp",
2824
+ "primaryKey": false,
2825
+ "notNull": true,
2826
+ "default": "now()"
2827
+ }
2828
+ },
2829
+ "indexes": {
2830
+ "messages_conversation_idx": {
2831
+ "name": "messages_conversation_idx",
2832
+ "columns": [
2833
+ {
2834
+ "expression": "conversation_id",
2835
+ "isExpression": false,
2836
+ "asc": true,
2837
+ "nulls": "last"
2838
+ }
2839
+ ],
2840
+ "isUnique": false,
2841
+ "concurrently": false,
2842
+ "method": "btree",
2843
+ "with": {}
2844
+ },
2845
+ "messages_role_idx": {
2846
+ "name": "messages_role_idx",
2847
+ "columns": [
2848
+ {
2849
+ "expression": "role",
2850
+ "isExpression": false,
2851
+ "asc": true,
2852
+ "nulls": "last"
2853
+ }
2854
+ ],
2855
+ "isUnique": false,
2856
+ "concurrently": false,
2857
+ "method": "btree",
2858
+ "with": {}
2859
+ },
2860
+ "messages_created_idx": {
2861
+ "name": "messages_created_idx",
2862
+ "columns": [
2863
+ {
2864
+ "expression": "created_at",
2865
+ "isExpression": false,
2866
+ "asc": true,
2867
+ "nulls": "last"
2868
+ }
2869
+ ],
2870
+ "isUnique": false,
2871
+ "concurrently": false,
2872
+ "method": "btree",
2873
+ "with": {}
2874
+ }
2875
+ },
2876
+ "foreignKeys": {
2877
+ "messages_conversation_id_conversations_id_fk": {
2878
+ "name": "messages_conversation_id_conversations_id_fk",
2879
+ "tableFrom": "messages",
2880
+ "tableTo": "conversations",
2881
+ "columnsFrom": [
2882
+ "conversation_id"
2883
+ ],
2884
+ "columnsTo": [
2885
+ "id"
2886
+ ],
2887
+ "onDelete": "cascade",
2888
+ "onUpdate": "no action"
2889
+ }
2890
+ },
2891
+ "compositePrimaryKeys": {},
2892
+ "uniqueConstraints": {},
2893
+ "policies": {},
2894
+ "checkConstraints": {},
2895
+ "isRLSEnabled": false
2896
+ },
2897
+ "public.observations": {
2898
+ "name": "observations",
2899
+ "schema": "",
2900
+ "columns": {
2901
+ "id": {
2902
+ "name": "id",
2903
+ "type": "uuid",
2904
+ "primaryKey": true,
2905
+ "notNull": true,
2906
+ "default": "gen_random_uuid()"
2907
+ },
2908
+ "project_id": {
2909
+ "name": "project_id",
2910
+ "type": "uuid",
2911
+ "primaryKey": false,
2912
+ "notNull": false
2913
+ },
2914
+ "conversation_id": {
2915
+ "name": "conversation_id",
2916
+ "type": "uuid",
2917
+ "primaryKey": false,
2918
+ "notNull": false
2919
+ },
2920
+ "type": {
2921
+ "name": "type",
2922
+ "type": "text",
2923
+ "primaryKey": false,
2924
+ "notNull": true
2925
+ },
2926
+ "action": {
2927
+ "name": "action",
2928
+ "type": "text",
2929
+ "primaryKey": false,
2930
+ "notNull": true
2931
+ },
2932
+ "target": {
2933
+ "name": "target",
2934
+ "type": "text",
2935
+ "primaryKey": false,
2936
+ "notNull": false
2937
+ },
2938
+ "summary": {
2939
+ "name": "summary",
2940
+ "type": "text",
2941
+ "primaryKey": false,
2942
+ "notNull": true
2943
+ },
2944
+ "details": {
2945
+ "name": "details",
2946
+ "type": "jsonb",
2947
+ "primaryKey": false,
2948
+ "notNull": false
2949
+ },
2950
+ "embedding": {
2951
+ "name": "embedding",
2952
+ "type": "vector(1536)",
2953
+ "primaryKey": false,
2954
+ "notNull": false
2955
+ },
2956
+ "folder_path": {
2957
+ "name": "folder_path",
2958
+ "type": "text",
2959
+ "primaryKey": false,
2960
+ "notNull": false
2961
+ },
2962
+ "project_path": {
2963
+ "name": "project_path",
2964
+ "type": "text",
2965
+ "primaryKey": false,
2966
+ "notNull": false
2967
+ },
2968
+ "is_private": {
2969
+ "name": "is_private",
2970
+ "type": "boolean",
2971
+ "primaryKey": false,
2972
+ "notNull": false,
2973
+ "default": false
2974
+ },
2975
+ "has_secrets": {
2976
+ "name": "has_secrets",
2977
+ "type": "boolean",
2978
+ "primaryKey": false,
2979
+ "notNull": false,
2980
+ "default": false
2981
+ },
2982
+ "relevance_score": {
2983
+ "name": "relevance_score",
2984
+ "type": "integer",
2985
+ "primaryKey": false,
2986
+ "notNull": false,
2987
+ "default": 50
2988
+ },
2989
+ "category": {
2990
+ "name": "category",
2991
+ "type": "text",
2992
+ "primaryKey": false,
2993
+ "notNull": false
2994
+ },
2995
+ "importance": {
2996
+ "name": "importance",
2997
+ "type": "integer",
2998
+ "primaryKey": false,
2999
+ "notNull": false,
3000
+ "default": 50
3001
+ },
3002
+ "metadata": {
3003
+ "name": "metadata",
3004
+ "type": "jsonb",
3005
+ "primaryKey": false,
3006
+ "notNull": false
3007
+ },
3008
+ "created_at": {
3009
+ "name": "created_at",
3010
+ "type": "timestamp",
3011
+ "primaryKey": false,
3012
+ "notNull": true,
3013
+ "default": "now()"
3014
+ }
3015
+ },
3016
+ "indexes": {
3017
+ "observations_project_idx": {
3018
+ "name": "observations_project_idx",
3019
+ "columns": [
3020
+ {
3021
+ "expression": "project_id",
3022
+ "isExpression": false,
3023
+ "asc": true,
3024
+ "nulls": "last"
3025
+ }
3026
+ ],
3027
+ "isUnique": false,
3028
+ "concurrently": false,
3029
+ "method": "btree",
3030
+ "with": {}
3031
+ },
3032
+ "observations_type_idx": {
3033
+ "name": "observations_type_idx",
3034
+ "columns": [
3035
+ {
3036
+ "expression": "type",
3037
+ "isExpression": false,
3038
+ "asc": true,
3039
+ "nulls": "last"
3040
+ }
3041
+ ],
3042
+ "isUnique": false,
3043
+ "concurrently": false,
3044
+ "method": "btree",
3045
+ "with": {}
3046
+ },
3047
+ "observations_action_idx": {
3048
+ "name": "observations_action_idx",
3049
+ "columns": [
3050
+ {
3051
+ "expression": "action",
3052
+ "isExpression": false,
3053
+ "asc": true,
3054
+ "nulls": "last"
3055
+ }
3056
+ ],
3057
+ "isUnique": false,
3058
+ "concurrently": false,
3059
+ "method": "btree",
3060
+ "with": {}
3061
+ },
3062
+ "observations_created_idx": {
3063
+ "name": "observations_created_idx",
3064
+ "columns": [
3065
+ {
3066
+ "expression": "created_at",
3067
+ "isExpression": false,
3068
+ "asc": true,
3069
+ "nulls": "last"
3070
+ }
3071
+ ],
3072
+ "isUnique": false,
3073
+ "concurrently": false,
3074
+ "method": "btree",
3075
+ "with": {}
3076
+ },
3077
+ "observations_folder_idx": {
3078
+ "name": "observations_folder_idx",
3079
+ "columns": [
3080
+ {
3081
+ "expression": "folder_path",
3082
+ "isExpression": false,
3083
+ "asc": true,
3084
+ "nulls": "last"
3085
+ }
3086
+ ],
3087
+ "isUnique": false,
3088
+ "concurrently": false,
3089
+ "method": "btree",
3090
+ "with": {}
3091
+ },
3092
+ "observations_relevance_idx": {
3093
+ "name": "observations_relevance_idx",
3094
+ "columns": [
3095
+ {
3096
+ "expression": "relevance_score",
3097
+ "isExpression": false,
3098
+ "asc": true,
3099
+ "nulls": "last"
3100
+ }
3101
+ ],
3102
+ "isUnique": false,
3103
+ "concurrently": false,
3104
+ "method": "btree",
3105
+ "with": {}
3106
+ },
3107
+ "observations_private_idx": {
3108
+ "name": "observations_private_idx",
3109
+ "columns": [
3110
+ {
3111
+ "expression": "is_private",
3112
+ "isExpression": false,
3113
+ "asc": true,
3114
+ "nulls": "last"
3115
+ }
3116
+ ],
3117
+ "isUnique": false,
3118
+ "concurrently": false,
3119
+ "method": "btree",
3120
+ "with": {}
3121
+ }
3122
+ },
3123
+ "foreignKeys": {
3124
+ "observations_project_id_projects_id_fk": {
3125
+ "name": "observations_project_id_projects_id_fk",
3126
+ "tableFrom": "observations",
3127
+ "tableTo": "projects",
3128
+ "columnsFrom": [
3129
+ "project_id"
3130
+ ],
3131
+ "columnsTo": [
3132
+ "id"
3133
+ ],
3134
+ "onDelete": "cascade",
3135
+ "onUpdate": "no action"
3136
+ },
3137
+ "observations_conversation_id_conversations_id_fk": {
3138
+ "name": "observations_conversation_id_conversations_id_fk",
3139
+ "tableFrom": "observations",
3140
+ "tableTo": "conversations",
3141
+ "columnsFrom": [
3142
+ "conversation_id"
3143
+ ],
3144
+ "columnsTo": [
3145
+ "id"
3146
+ ],
3147
+ "onDelete": "set null",
3148
+ "onUpdate": "no action"
3149
+ }
3150
+ },
3151
+ "compositePrimaryKeys": {},
3152
+ "uniqueConstraints": {},
3153
+ "policies": {},
3154
+ "checkConstraints": {},
3155
+ "isRLSEnabled": false
3156
+ },
3157
+ "public.projects": {
3158
+ "name": "projects",
3159
+ "schema": "",
3160
+ "columns": {
3161
+ "id": {
3162
+ "name": "id",
3163
+ "type": "uuid",
3164
+ "primaryKey": true,
3165
+ "notNull": true,
3166
+ "default": "gen_random_uuid()"
3167
+ },
3168
+ "name": {
3169
+ "name": "name",
3170
+ "type": "text",
3171
+ "primaryKey": false,
3172
+ "notNull": true
3173
+ },
3174
+ "path": {
3175
+ "name": "path",
3176
+ "type": "text",
3177
+ "primaryKey": false,
3178
+ "notNull": true
3179
+ },
3180
+ "description": {
3181
+ "name": "description",
3182
+ "type": "text",
3183
+ "primaryKey": false,
3184
+ "notNull": false
3185
+ },
3186
+ "metadata": {
3187
+ "name": "metadata",
3188
+ "type": "jsonb",
3189
+ "primaryKey": false,
3190
+ "notNull": false
3191
+ },
3192
+ "created_at": {
3193
+ "name": "created_at",
3194
+ "type": "timestamp",
3195
+ "primaryKey": false,
3196
+ "notNull": true,
3197
+ "default": "now()"
3198
+ },
3199
+ "updated_at": {
3200
+ "name": "updated_at",
3201
+ "type": "timestamp",
3202
+ "primaryKey": false,
3203
+ "notNull": true,
3204
+ "default": "now()"
3205
+ }
3206
+ },
3207
+ "indexes": {
3208
+ "projects_path_idx": {
3209
+ "name": "projects_path_idx",
3210
+ "columns": [
3211
+ {
3212
+ "expression": "path",
3213
+ "isExpression": false,
3214
+ "asc": true,
3215
+ "nulls": "last"
3216
+ }
3217
+ ],
3218
+ "isUnique": false,
3219
+ "concurrently": false,
3220
+ "method": "btree",
3221
+ "with": {}
3222
+ }
3223
+ },
3224
+ "foreignKeys": {},
3225
+ "compositePrimaryKeys": {},
3226
+ "uniqueConstraints": {},
3227
+ "policies": {},
3228
+ "checkConstraints": {},
3229
+ "isRLSEnabled": false
3230
+ },
3231
+ "public.session_summaries": {
3232
+ "name": "session_summaries",
3233
+ "schema": "",
3234
+ "columns": {
3235
+ "id": {
3236
+ "name": "id",
3237
+ "type": "uuid",
3238
+ "primaryKey": true,
3239
+ "notNull": true,
3240
+ "default": "gen_random_uuid()"
3241
+ },
3242
+ "conversation_id": {
3243
+ "name": "conversation_id",
3244
+ "type": "uuid",
3245
+ "primaryKey": false,
3246
+ "notNull": true
3247
+ },
3248
+ "project_id": {
3249
+ "name": "project_id",
3250
+ "type": "uuid",
3251
+ "primaryKey": false,
3252
+ "notNull": false
3253
+ },
3254
+ "summary_type": {
3255
+ "name": "summary_type",
3256
+ "type": "text",
3257
+ "primaryKey": false,
3258
+ "notNull": true
3259
+ },
3260
+ "content": {
3261
+ "name": "content",
3262
+ "type": "text",
3263
+ "primaryKey": false,
3264
+ "notNull": true
3265
+ },
3266
+ "compressed_from": {
3267
+ "name": "compressed_from",
3268
+ "type": "integer",
3269
+ "primaryKey": false,
3270
+ "notNull": false
3271
+ },
3272
+ "tokens_saved": {
3273
+ "name": "tokens_saved",
3274
+ "type": "integer",
3275
+ "primaryKey": false,
3276
+ "notNull": false
3277
+ },
3278
+ "embedding": {
3279
+ "name": "embedding",
3280
+ "type": "vector(1536)",
3281
+ "primaryKey": false,
3282
+ "notNull": false
3283
+ },
3284
+ "created_at": {
3285
+ "name": "created_at",
3286
+ "type": "timestamp",
3287
+ "primaryKey": false,
3288
+ "notNull": true,
3289
+ "default": "now()"
3290
+ }
3291
+ },
3292
+ "indexes": {
3293
+ "session_summaries_conversation_idx": {
3294
+ "name": "session_summaries_conversation_idx",
3295
+ "columns": [
3296
+ {
3297
+ "expression": "conversation_id",
3298
+ "isExpression": false,
3299
+ "asc": true,
3300
+ "nulls": "last"
3301
+ }
3302
+ ],
3303
+ "isUnique": false,
3304
+ "concurrently": false,
3305
+ "method": "btree",
3306
+ "with": {}
3307
+ },
3308
+ "session_summaries_project_idx": {
3309
+ "name": "session_summaries_project_idx",
3310
+ "columns": [
3311
+ {
3312
+ "expression": "project_id",
3313
+ "isExpression": false,
3314
+ "asc": true,
3315
+ "nulls": "last"
3316
+ }
3317
+ ],
3318
+ "isUnique": false,
3319
+ "concurrently": false,
3320
+ "method": "btree",
3321
+ "with": {}
3322
+ },
3323
+ "session_summaries_type_idx": {
3324
+ "name": "session_summaries_type_idx",
3325
+ "columns": [
3326
+ {
3327
+ "expression": "summary_type",
3328
+ "isExpression": false,
3329
+ "asc": true,
3330
+ "nulls": "last"
3331
+ }
3332
+ ],
3333
+ "isUnique": false,
3334
+ "concurrently": false,
3335
+ "method": "btree",
3336
+ "with": {}
3337
+ }
3338
+ },
3339
+ "foreignKeys": {
3340
+ "session_summaries_conversation_id_conversations_id_fk": {
3341
+ "name": "session_summaries_conversation_id_conversations_id_fk",
3342
+ "tableFrom": "session_summaries",
3343
+ "tableTo": "conversations",
3344
+ "columnsFrom": [
3345
+ "conversation_id"
3346
+ ],
3347
+ "columnsTo": [
3348
+ "id"
3349
+ ],
3350
+ "onDelete": "cascade",
3351
+ "onUpdate": "no action"
3352
+ },
3353
+ "session_summaries_project_id_projects_id_fk": {
3354
+ "name": "session_summaries_project_id_projects_id_fk",
3355
+ "tableFrom": "session_summaries",
3356
+ "tableTo": "projects",
3357
+ "columnsFrom": [
3358
+ "project_id"
3359
+ ],
3360
+ "columnsTo": [
3361
+ "id"
3362
+ ],
3363
+ "onDelete": "cascade",
3364
+ "onUpdate": "no action"
3365
+ }
3366
+ },
3367
+ "compositePrimaryKeys": {},
3368
+ "uniqueConstraints": {},
3369
+ "policies": {},
3370
+ "checkConstraints": {},
3371
+ "isRLSEnabled": false
3372
+ },
3373
+ "public.users": {
3374
+ "name": "users",
3375
+ "schema": "",
3376
+ "columns": {
3377
+ "id": {
3378
+ "name": "id",
3379
+ "type": "uuid",
3380
+ "primaryKey": true,
3381
+ "notNull": true,
3382
+ "default": "gen_random_uuid()"
3383
+ },
3384
+ "external_id": {
3385
+ "name": "external_id",
3386
+ "type": "text",
3387
+ "primaryKey": false,
3388
+ "notNull": false
3389
+ },
3390
+ "name": {
3391
+ "name": "name",
3392
+ "type": "text",
3393
+ "primaryKey": false,
3394
+ "notNull": false
3395
+ },
3396
+ "email": {
3397
+ "name": "email",
3398
+ "type": "text",
3399
+ "primaryKey": false,
3400
+ "notNull": false
3401
+ },
3402
+ "preferences": {
3403
+ "name": "preferences",
3404
+ "type": "jsonb",
3405
+ "primaryKey": false,
3406
+ "notNull": false
3407
+ },
3408
+ "created_at": {
3409
+ "name": "created_at",
3410
+ "type": "timestamp",
3411
+ "primaryKey": false,
3412
+ "notNull": true,
3413
+ "default": "now()"
3414
+ },
3415
+ "updated_at": {
3416
+ "name": "updated_at",
3417
+ "type": "timestamp",
3418
+ "primaryKey": false,
3419
+ "notNull": true,
3420
+ "default": "now()"
3421
+ }
3422
+ },
3423
+ "indexes": {},
3424
+ "foreignKeys": {},
3425
+ "compositePrimaryKeys": {},
3426
+ "uniqueConstraints": {
3427
+ "users_external_id_unique": {
3428
+ "name": "users_external_id_unique",
3429
+ "nullsNotDistinct": false,
3430
+ "columns": [
3431
+ "external_id"
3432
+ ]
3433
+ }
3434
+ },
3435
+ "policies": {},
3436
+ "checkConstraints": {},
3437
+ "isRLSEnabled": false
3438
+ }
3439
+ },
3440
+ "enums": {},
3441
+ "schemas": {},
3442
+ "sequences": {},
3443
+ "roles": {},
3444
+ "policies": {},
3445
+ "views": {},
3446
+ "_meta": {
3447
+ "columns": {},
3448
+ "schemas": {},
3449
+ "tables": {}
3450
+ }
3451
+ }