memory-journal-mcp 9.0.0 → 9.1.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 (356) hide show
  1. package/README.md +165 -124
  2. package/dist/audit/interceptor.d.ts.map +1 -1
  3. package/dist/auth/authorization-server-discovery.d.ts.map +1 -1
  4. package/dist/auth/middleware.d.ts +11 -22
  5. package/dist/auth/middleware.d.ts.map +1 -1
  6. package/dist/auth/scope-map.d.ts.map +1 -1
  7. package/dist/auth/scopes.d.ts.map +1 -1
  8. package/dist/auth/token-validator.d.ts.map +1 -1
  9. package/dist/auth/transport-agnostic.d.ts +4 -0
  10. package/dist/auth/transport-agnostic.d.ts.map +1 -1
  11. package/dist/auth/validation.d.ts +1 -0
  12. package/dist/auth/validation.d.ts.map +1 -1
  13. package/dist/{chunk-6RCZ4IYV.js → chunk-4FZCHFB5.js} +28 -5
  14. package/dist/{chunk-AIWHVEOW.js → chunk-D2FY6XS5.js} +99 -7
  15. package/dist/chunk-FZLB6NAV.js +746 -0
  16. package/dist/{chunk-NVXCRDCO.js → chunk-LE6ZWUPK.js} +216 -138
  17. package/dist/chunk-SGJU2DHU.js +2102 -0
  18. package/dist/{chunk-2UIMA6JF.js → chunk-T7SROBBV.js} +32375 -29351
  19. package/dist/{chunk-IYZWMAA4.js → chunk-Y6MMKR2Z.js} +957 -1333
  20. package/dist/cli/commands/admin.d.ts +1 -1
  21. package/dist/cli/commands/admin.d.ts.map +1 -1
  22. package/dist/cli/commands/entry-payload.d.ts +38 -0
  23. package/dist/cli/commands/entry-payload.d.ts.map +1 -0
  24. package/dist/cli/commands/entry.d.ts +10 -0
  25. package/dist/cli/commands/entry.d.ts.map +1 -1
  26. package/dist/cli/commands/exec.d.ts.map +1 -1
  27. package/dist/cli/commands/io.d.ts +1 -0
  28. package/dist/cli/commands/io.d.ts.map +1 -1
  29. package/dist/cli/commands/visualize.d.ts.map +1 -1
  30. package/dist/cli/index.js +7 -10
  31. package/dist/cli/schemas.d.ts +14 -1
  32. package/dist/cli/schemas.d.ts.map +1 -1
  33. package/dist/cli/server-options-builder.d.ts.map +1 -1
  34. package/dist/cli.js +7 -10
  35. package/dist/codemode/api/journal-api.d.ts +5 -23
  36. package/dist/codemode/api/journal-api.d.ts.map +1 -1
  37. package/dist/codemode/api/key-normalizer.d.ts +8 -0
  38. package/dist/codemode/api/key-normalizer.d.ts.map +1 -0
  39. package/dist/codemode/api/param-normalizer.d.ts +2 -4
  40. package/dist/codemode/api/param-normalizer.d.ts.map +1 -1
  41. package/dist/codemode/api/project-registry-ops.d.ts +26 -0
  42. package/dist/codemode/api/project-registry-ops.d.ts.map +1 -0
  43. package/dist/codemode/api/sandbox-bindings.d.ts +25 -0
  44. package/dist/codemode/api/sandbox-bindings.d.ts.map +1 -0
  45. package/dist/codemode/api/types.d.ts.map +1 -1
  46. package/dist/codemode/api-constants.d.ts +3 -39
  47. package/dist/codemode/api-constants.d.ts.map +1 -1
  48. package/dist/codemode/constants/examples-and-params.d.ts +31 -0
  49. package/dist/codemode/constants/examples-and-params.d.ts.map +1 -0
  50. package/dist/codemode/constants/method-aliases.d.ts +8 -0
  51. package/dist/codemode/constants/method-aliases.d.ts.map +1 -0
  52. package/dist/codemode/normalizers/domain-tool-interceptions.d.ts +6 -0
  53. package/dist/codemode/normalizers/domain-tool-interceptions.d.ts.map +1 -0
  54. package/dist/codemode/normalizers/entry-and-search-interceptions.d.ts +6 -0
  55. package/dist/codemode/normalizers/entry-and-search-interceptions.d.ts.map +1 -0
  56. package/dist/codemode/normalizers/generic-interceptions.d.ts +6 -0
  57. package/dist/codemode/normalizers/generic-interceptions.d.ts.map +1 -0
  58. package/dist/codemode/normalizers/github-and-backup-interceptions.d.ts +6 -0
  59. package/dist/codemode/normalizers/github-and-backup-interceptions.d.ts.map +1 -0
  60. package/dist/codemode/normalizers/shared-utils.d.ts +31 -0
  61. package/dist/codemode/normalizers/shared-utils.d.ts.map +1 -0
  62. package/dist/codemode/param-normalizer.d.ts +5 -1
  63. package/dist/codemode/param-normalizer.d.ts.map +1 -1
  64. package/dist/codemode/proxy-helpers.d.ts +34 -0
  65. package/dist/codemode/proxy-helpers.d.ts.map +1 -0
  66. package/dist/codemode/proxy-namespaces.d.ts +30 -0
  67. package/dist/codemode/proxy-namespaces.d.ts.map +1 -0
  68. package/dist/codemode/security.d.ts +11 -0
  69. package/dist/codemode/security.d.ts.map +1 -1
  70. package/dist/codemode/type-generator.d.ts.map +1 -1
  71. package/dist/codemode/types.d.ts.map +1 -1
  72. package/dist/codemode/worker/mj-shim-domains.d.ts +15 -0
  73. package/dist/codemode/worker/mj-shim-domains.d.ts.map +1 -0
  74. package/dist/codemode/worker/mj-shim-proxy.d.ts +18 -0
  75. package/dist/codemode/worker/mj-shim-proxy.d.ts.map +1 -0
  76. package/dist/codemode/worker/namespace-shims.d.ts +32 -0
  77. package/dist/codemode/worker/namespace-shims.d.ts.map +1 -0
  78. package/dist/codemode/worker/node-shims.d.ts +65 -0
  79. package/dist/codemode/worker/node-shims.d.ts.map +1 -0
  80. package/dist/codemode/worker/prototype-hardening.d.ts +18 -0
  81. package/dist/codemode/worker/prototype-hardening.d.ts.map +1 -0
  82. package/dist/codemode/worker/result-compactor.d.ts +20 -0
  83. package/dist/codemode/worker/result-compactor.d.ts.map +1 -0
  84. package/dist/codemode/worker/sandbox-globals.d.ts +19 -0
  85. package/dist/codemode/worker/sandbox-globals.d.ts.map +1 -0
  86. package/dist/codemode/worker-api-proxy.d.ts +1 -6
  87. package/dist/codemode/worker-api-proxy.d.ts.map +1 -1
  88. package/dist/codemode/worker-result-proxy.d.ts.map +1 -1
  89. package/dist/codemode/worker-sandbox.d.ts.map +1 -1
  90. package/dist/constants/instructions/admin.d.ts +1 -1
  91. package/dist/constants/instructions/admin.d.ts.map +1 -1
  92. package/dist/constants/instructions/base.d.ts +2 -2
  93. package/dist/constants/instructions/base.d.ts.map +1 -1
  94. package/dist/constants/instructions/codemode.d.ts +1 -1
  95. package/dist/constants/instructions/codemode.d.ts.map +1 -1
  96. package/dist/constants/instructions/core.d.ts +1 -1
  97. package/dist/constants/instructions/core.d.ts.map +1 -1
  98. package/dist/constants/instructions/github.d.ts +1 -1
  99. package/dist/constants/instructions/github.d.ts.map +1 -1
  100. package/dist/constants/instructions/gotchas.d.ts +1 -1
  101. package/dist/constants/instructions/gotchas.d.ts.map +1 -1
  102. package/dist/constants/instructions/io.d.ts +1 -1
  103. package/dist/constants/instructions/io.d.ts.map +1 -1
  104. package/dist/constants/instructions/templates.d.ts +1 -1
  105. package/dist/constants/instructions/templates.d.ts.map +1 -1
  106. package/dist/constants/server-instructions.d.ts +2 -2
  107. package/dist/constants/server-instructions.d.ts.map +1 -1
  108. package/dist/database/core/interfaces.d.ts +6 -6
  109. package/dist/database/core/interfaces.d.ts.map +1 -1
  110. package/dist/database/sqlite-adapter/adapter-delegates.d.ts +161 -0
  111. package/dist/database/sqlite-adapter/adapter-delegates.d.ts.map +1 -0
  112. package/dist/database/sqlite-adapter/backup.d.ts.map +1 -1
  113. package/dist/database/sqlite-adapter/database-adapter.d.ts +17 -147
  114. package/dist/database/sqlite-adapter/database-adapter.d.ts.map +1 -1
  115. package/dist/database/sqlite-adapter/entries/crud-read.d.ts +16 -0
  116. package/dist/database/sqlite-adapter/entries/crud-read.d.ts.map +1 -0
  117. package/dist/database/sqlite-adapter/entries/crud-write.d.ts +62 -0
  118. package/dist/database/sqlite-adapter/entries/crud-write.d.ts.map +1 -0
  119. package/dist/database/sqlite-adapter/entries/crud.d.ts +3 -92
  120. package/dist/database/sqlite-adapter/entries/crud.d.ts.map +1 -1
  121. package/dist/database/sqlite-adapter/entries/importance.d.ts +7 -0
  122. package/dist/database/sqlite-adapter/entries/importance.d.ts.map +1 -1
  123. package/dist/database/sqlite-adapter/entries/index.d.ts +9 -4
  124. package/dist/database/sqlite-adapter/entries/index.d.ts.map +1 -1
  125. package/dist/database/sqlite-adapter/entries/revisions.d.ts +16 -0
  126. package/dist/database/sqlite-adapter/entries/revisions.d.ts.map +1 -0
  127. package/dist/database/sqlite-adapter/entries/search/date-and-pagination.d.ts +37 -0
  128. package/dist/database/sqlite-adapter/entries/search/date-and-pagination.d.ts.map +1 -0
  129. package/dist/database/sqlite-adapter/entries/search/entity-lookups.d.ts +31 -0
  130. package/dist/database/sqlite-adapter/entries/search/entity-lookups.d.ts.map +1 -0
  131. package/dist/database/sqlite-adapter/entries/search/fts-and-hybrid.d.ts +44 -0
  132. package/dist/database/sqlite-adapter/entries/search/fts-and-hybrid.d.ts.map +1 -0
  133. package/dist/database/sqlite-adapter/entries/search/index.d.ts +1 -1
  134. package/dist/database/sqlite-adapter/entries/search/index.d.ts.map +1 -1
  135. package/dist/database/sqlite-adapter/entries/search/query.d.ts +3 -82
  136. package/dist/database/sqlite-adapter/entries/search/query.d.ts.map +1 -1
  137. package/dist/database/sqlite-adapter/entries/statistics.d.ts.map +1 -1
  138. package/dist/database/sqlite-adapter/insights/cross-project.d.ts +42 -0
  139. package/dist/database/sqlite-adapter/insights/cross-project.d.ts.map +1 -0
  140. package/dist/database/sqlite-adapter/insights/entry-digest-queries.d.ts +17 -0
  141. package/dist/database/sqlite-adapter/insights/entry-digest-queries.d.ts.map +1 -0
  142. package/dist/database/sqlite-adapter/insights/team-collaboration.d.ts +29 -0
  143. package/dist/database/sqlite-adapter/insights/team-collaboration.d.ts.map +1 -0
  144. package/dist/database/sqlite-adapter/insights-operations.d.ts +11 -50
  145. package/dist/database/sqlite-adapter/insights-operations.d.ts.map +1 -1
  146. package/dist/database/sqlite-adapter/lifecycle-operations.d.ts.map +1 -1
  147. package/dist/database/sqlite-adapter/members.d.ts.map +1 -1
  148. package/dist/database/sqlite-adapter/native-connection.d.ts +5 -0
  149. package/dist/database/sqlite-adapter/native-connection.d.ts.map +1 -1
  150. package/dist/database/sqlite-adapter/relationships.d.ts +1 -2
  151. package/dist/database/sqlite-adapter/relationships.d.ts.map +1 -1
  152. package/dist/database/sqlite-adapter/tags.d.ts.map +1 -1
  153. package/dist/database/sqlite-adapter/vector-operations.d.ts.map +1 -1
  154. package/dist/filtering/tool-constants.d.ts +1 -1
  155. package/dist/{fts-T466O2JP.js → fts-YHUVPPYF.js} +2 -2
  156. package/dist/github/commit-references/enricher.d.ts.map +1 -1
  157. package/dist/github/github-integration/projects.d.ts.map +1 -1
  158. package/dist/handlers/prompts/adversarial-helpers.d.ts +75 -0
  159. package/dist/handlers/prompts/adversarial-helpers.d.ts.map +1 -0
  160. package/dist/handlers/prompts/adversarial.d.ts +3 -5
  161. package/dist/handlers/prompts/adversarial.d.ts.map +1 -1
  162. package/dist/handlers/prompts/cms-supervisor.d.ts +8 -0
  163. package/dist/handlers/prompts/cms-supervisor.d.ts.map +1 -0
  164. package/dist/handlers/prompts/index.d.ts.map +1 -1
  165. package/dist/handlers/prompts/optimizer.d.ts.map +1 -1
  166. package/dist/handlers/prompts/workflow.d.ts.map +1 -1
  167. package/dist/handlers/resources/core/briefing/context-section.d.ts.map +1 -1
  168. package/dist/handlers/resources/core/briefing/github-repo-and-kanban.d.ts +57 -0
  169. package/dist/handlers/resources/core/briefing/github-repo-and-kanban.d.ts.map +1 -0
  170. package/dist/handlers/resources/core/briefing/github-section.d.ts +23 -20
  171. package/dist/handlers/resources/core/briefing/github-section.d.ts.map +1 -1
  172. package/dist/handlers/resources/core/briefing/system-section.d.ts.map +1 -1
  173. package/dist/handlers/resources/core/briefing/user-message.d.ts.map +1 -1
  174. package/dist/handlers/resources/help.d.ts.map +1 -1
  175. package/dist/handlers/resources/index.d.ts.map +1 -1
  176. package/dist/handlers/resources/shared.d.ts +1 -0
  177. package/dist/handlers/resources/shared.d.ts.map +1 -1
  178. package/dist/handlers/resources/staleness.d.ts.map +1 -1
  179. package/dist/handlers/tools/admin/batch-tools.d.ts.map +1 -1
  180. package/dist/handlers/tools/admin/core-tools.d.ts.map +1 -1
  181. package/dist/handlers/tools/admin/index.d.ts.map +1 -1
  182. package/dist/handlers/tools/admin/lifecycle-tools.d.ts.map +1 -1
  183. package/dist/handlers/tools/admin/project-tools.d.ts +1 -1
  184. package/dist/handlers/tools/admin/project-tools.d.ts.map +1 -1
  185. package/dist/handlers/tools/admin/schemas/crud-batch-schemas.d.ts +609 -0
  186. package/dist/handlers/tools/admin/schemas/crud-batch-schemas.d.ts.map +1 -0
  187. package/dist/handlers/tools/admin/schemas/project-and-ops-schemas.d.ts +136 -0
  188. package/dist/handlers/tools/admin/schemas/project-and-ops-schemas.d.ts.map +1 -0
  189. package/dist/handlers/tools/admin/schemas.d.ts +2 -733
  190. package/dist/handlers/tools/admin/schemas.d.ts.map +1 -1
  191. package/dist/handlers/tools/admin/update_configuration.d.ts +14 -0
  192. package/dist/handlers/tools/admin/update_configuration.d.ts.map +1 -1
  193. package/dist/handlers/tools/admin/vector-tools.d.ts.map +1 -1
  194. package/dist/handlers/tools/analytics.d.ts.map +1 -1
  195. package/dist/handlers/tools/arg-interceptions.d.ts +51 -0
  196. package/dist/handlers/tools/arg-interceptions.d.ts.map +1 -0
  197. package/dist/handlers/tools/codemode/code-healer.d.ts +11 -0
  198. package/dist/handlers/tools/codemode/code-healer.d.ts.map +1 -0
  199. package/dist/handlers/tools/codemode/handler.d.ts +4 -23
  200. package/dist/handlers/tools/codemode/handler.d.ts.map +1 -1
  201. package/dist/handlers/tools/codemode/json-entry-recovery.d.ts +13 -0
  202. package/dist/handlers/tools/codemode/json-entry-recovery.d.ts.map +1 -0
  203. package/dist/handlers/tools/codemode/payload-synthesizer.d.ts +17 -0
  204. package/dist/handlers/tools/codemode/payload-synthesizer.d.ts.map +1 -0
  205. package/dist/handlers/tools/codemode/secure-dispatcher.d.ts +25 -0
  206. package/dist/handlers/tools/codemode/secure-dispatcher.d.ts.map +1 -0
  207. package/dist/handlers/tools/codemode/sql-recovery.d.ts +14 -0
  208. package/dist/handlers/tools/codemode/sql-recovery.d.ts.map +1 -0
  209. package/dist/handlers/tools/core/dummy-healing/alias-catalog.d.ts +21 -0
  210. package/dist/handlers/tools/core/dummy-healing/alias-catalog.d.ts.map +1 -0
  211. package/dist/handlers/tools/core/dummy-healing/entry-fallbacks.d.ts +4 -0
  212. package/dist/handlers/tools/core/dummy-healing/entry-fallbacks.d.ts.map +1 -0
  213. package/dist/handlers/tools/core/dummy-healing/fs-fallbacks.d.ts +19 -0
  214. package/dist/handlers/tools/core/dummy-healing/fs-fallbacks.d.ts.map +1 -0
  215. package/dist/handlers/tools/core/dummy-healing/index.d.ts +7 -0
  216. package/dist/handlers/tools/core/dummy-healing/index.d.ts.map +1 -0
  217. package/dist/handlers/tools/core/dummy-healing/mcp-fallbacks.d.ts +12 -0
  218. package/dist/handlers/tools/core/dummy-healing/mcp-fallbacks.d.ts.map +1 -0
  219. package/dist/handlers/tools/core/dummy-healing.d.ts +1 -29
  220. package/dist/handlers/tools/core/dummy-healing.d.ts.map +1 -1
  221. package/dist/handlers/tools/core/index.d.ts +1 -1
  222. package/dist/handlers/tools/core/index.d.ts.map +1 -1
  223. package/dist/handlers/tools/core/schemas.d.ts +33 -9
  224. package/dist/handlers/tools/core/schemas.d.ts.map +1 -1
  225. package/dist/handlers/tools/core/staleness-tools.d.ts +17 -0
  226. package/dist/handlers/tools/core/staleness-tools.d.ts.map +1 -1
  227. package/dist/handlers/tools/core/tools.d.ts.map +1 -1
  228. package/dist/handlers/tools/git.d.ts +5 -11
  229. package/dist/handlers/tools/git.d.ts.map +1 -1
  230. package/dist/handlers/tools/github/close-issue-tool.d.ts +6 -0
  231. package/dist/handlers/tools/github/close-issue-tool.d.ts.map +1 -0
  232. package/dist/handlers/tools/github/create-issue-tool.d.ts +6 -0
  233. package/dist/handlers/tools/github/create-issue-tool.d.ts.map +1 -0
  234. package/dist/handlers/tools/github/issue-tools.d.ts +3 -0
  235. package/dist/handlers/tools/github/issue-tools.d.ts.map +1 -1
  236. package/dist/handlers/tools/github/kanban-tools.d.ts.map +1 -1
  237. package/dist/handlers/tools/github/milestone-tools.d.ts.map +1 -1
  238. package/dist/handlers/tools/index.d.ts +2 -2
  239. package/dist/handlers/tools/index.d.ts.map +1 -1
  240. package/dist/handlers/tools/io/schemas.d.ts +5 -2
  241. package/dist/handlers/tools/io/schemas.d.ts.map +1 -1
  242. package/dist/handlers/tools/relationships.d.ts.map +1 -1
  243. package/dist/handlers/tools/schemas/constants-and-primitives.d.ts +53 -0
  244. package/dist/handlers/tools/schemas/constants-and-primitives.d.ts.map +1 -0
  245. package/dist/handlers/tools/schemas/hallucination-healer.d.ts +8 -0
  246. package/dist/handlers/tools/schemas/hallucination-healer.d.ts.map +1 -0
  247. package/dist/handlers/tools/schemas/output-schemas.d.ts +247 -0
  248. package/dist/handlers/tools/schemas/output-schemas.d.ts.map +1 -0
  249. package/dist/handlers/tools/schemas.d.ts +4 -306
  250. package/dist/handlers/tools/schemas.d.ts.map +1 -1
  251. package/dist/handlers/tools/search/cross-team.d.ts +14 -0
  252. package/dist/handlers/tools/search/cross-team.d.ts.map +1 -1
  253. package/dist/handlers/tools/search/helpers.d.ts.map +1 -1
  254. package/dist/handlers/tools/search/hybrid.d.ts.map +1 -1
  255. package/dist/handlers/tools/search/misc-tools.d.ts.map +1 -1
  256. package/dist/handlers/tools/search/schemas.d.ts +6 -3
  257. package/dist/handlers/tools/search/schemas.d.ts.map +1 -1
  258. package/dist/handlers/tools/search/search-entries.d.ts.map +1 -1
  259. package/dist/handlers/tools/search/semantic-search.d.ts.map +1 -1
  260. package/dist/handlers/tools/team/admin-tools/batch.d.ts.map +1 -1
  261. package/dist/handlers/tools/team/admin-tools/crud.d.ts.map +1 -1
  262. package/dist/handlers/tools/team/backup-tools.d.ts.map +1 -1
  263. package/dist/handlers/tools/team/core-tools.d.ts.map +1 -1
  264. package/dist/handlers/tools/team/helpers.d.ts.map +1 -1
  265. package/dist/handlers/tools/team/io-tools.d.ts.map +1 -1
  266. package/dist/handlers/tools/team/member-tools.d.ts.map +1 -1
  267. package/dist/handlers/tools/team/rbac.d.ts.map +1 -1
  268. package/dist/handlers/tools/team/relationship-tools.d.ts.map +1 -1
  269. package/dist/handlers/tools/team/schemas/admin-batch-schemas.d.ts +618 -0
  270. package/dist/handlers/tools/team/schemas/admin-batch-schemas.d.ts.map +1 -0
  271. package/dist/handlers/tools/team/schemas/analytics-vector-schemas.d.ts +464 -0
  272. package/dist/handlers/tools/team/schemas/analytics-vector-schemas.d.ts.map +1 -0
  273. package/dist/handlers/tools/team/schemas/core-search-schemas.d.ts +525 -0
  274. package/dist/handlers/tools/team/schemas/core-search-schemas.d.ts.map +1 -0
  275. package/dist/handlers/tools/team/schemas/io-backup-schemas.d.ts +419 -0
  276. package/dist/handlers/tools/team/schemas/io-backup-schemas.d.ts.map +1 -0
  277. package/dist/handlers/tools/team/schemas.d.ts +5 -2002
  278. package/dist/handlers/tools/team/schemas.d.ts.map +1 -1
  279. package/dist/handlers/tools/team/search-tools.d.ts.map +1 -1
  280. package/dist/handlers/tools/team/vector-tools.d.ts.map +1 -1
  281. package/dist/index.js +6 -9
  282. package/dist/markdown/exporter.d.ts.map +1 -1
  283. package/dist/markdown/importer.d.ts.map +1 -1
  284. package/dist/observability/latency-tracker.d.ts.map +1 -1
  285. package/dist/observability/metrics-server.d.ts +1 -1
  286. package/dist/observability/metrics-server.d.ts.map +1 -1
  287. package/dist/observability/token-estimator.d.ts.map +1 -1
  288. package/dist/{security-utils-HNTROJAG.js → security-utils-P4P6A2DG.js} +1 -1
  289. package/dist/server/digest-reporter.d.ts +1 -0
  290. package/dist/server/digest-reporter.d.ts.map +1 -1
  291. package/dist/server/mcp-server/core.d.ts.map +1 -1
  292. package/dist/server/mcp-server/tool-registration/call-interceptor.d.ts +6 -0
  293. package/dist/server/mcp-server/tool-registration/call-interceptor.d.ts.map +1 -0
  294. package/dist/server/mcp-server/tool-registration/index.d.ts +4 -0
  295. package/dist/server/mcp-server/tool-registration/index.d.ts.map +1 -0
  296. package/dist/server/mcp-server/tool-registration/list-interceptor.d.ts +4 -0
  297. package/dist/server/mcp-server/tool-registration/list-interceptor.d.ts.map +1 -0
  298. package/dist/server/mcp-server/tool-registration/register-tools.d.ts +18 -0
  299. package/dist/server/mcp-server/tool-registration/register-tools.d.ts.map +1 -0
  300. package/dist/server/mcp-server/tool-registration.d.ts +1 -17
  301. package/dist/server/mcp-server/tool-registration.d.ts.map +1 -1
  302. package/dist/server/registration.d.ts +2 -0
  303. package/dist/server/registration.d.ts.map +1 -1
  304. package/dist/server/scheduler.d.ts +1 -0
  305. package/dist/server/scheduler.d.ts.map +1 -1
  306. package/dist/server/subscription-manager.d.ts +2 -0
  307. package/dist/server/subscription-manager.d.ts.map +1 -1
  308. package/dist/tools-BOQV7QD3.js +6 -0
  309. package/dist/transports/http/security.d.ts.map +1 -1
  310. package/dist/transports/http/server/http-transport.d.ts +25 -0
  311. package/dist/transports/http/server/http-transport.d.ts.map +1 -0
  312. package/dist/transports/http/server/index.d.ts +3 -30
  313. package/dist/transports/http/server/index.d.ts.map +1 -1
  314. package/dist/transports/http/server/legacy-sse.d.ts.map +1 -1
  315. package/dist/transports/http/server/protocol-handlers.d.ts +9 -0
  316. package/dist/transports/http/server/protocol-handlers.d.ts.map +1 -0
  317. package/dist/types/entities.d.ts +41 -1
  318. package/dist/types/entities.d.ts.map +1 -1
  319. package/dist/types/index.d.ts +11 -4
  320. package/dist/types/index.d.ts.map +1 -1
  321. package/dist/utils/config-manager.d.ts +2 -0
  322. package/dist/utils/config-manager.d.ts.map +1 -1
  323. package/dist/utils/error-helpers.d.ts.map +1 -1
  324. package/dist/utils/issue-logger.d.ts.map +1 -1
  325. package/dist/utils/mcp-logger.d.ts +14 -2
  326. package/dist/utils/mcp-logger.d.ts.map +1 -1
  327. package/dist/utils/security-utils.d.ts.map +1 -1
  328. package/dist/utils/vector-index-helpers.d.ts +1 -1
  329. package/dist/utils/vector-index-helpers.d.ts.map +1 -1
  330. package/dist/utils/workspace-resolver.d.ts.map +1 -1
  331. package/dist/vector/vector-search-manager/manager.d.ts +2 -2
  332. package/dist/vector/vector-search-manager/manager.d.ts.map +1 -1
  333. package/dist/vector/vector-search-manager/rebuild.d.ts.map +1 -1
  334. package/dist/vendor/lib-agent-exec/interceptors/git-interceptor.d.ts.map +1 -1
  335. package/dist/vendor/lib-agent-exec/schema.d.ts +18 -18
  336. package/dist/vendor/lib-agent-exec/schema.d.ts.map +1 -1
  337. package/dist/vendor/lib-agent-exec/stream-manager.d.ts.map +1 -1
  338. package/dist/worker-script.js +2662 -2645
  339. package/package.json +3 -4
  340. package/skills/memory-journal-mcp/SKILL.md +8 -8
  341. package/dist/auth/context.d.ts +0 -7
  342. package/dist/auth/context.d.ts.map +0 -1
  343. package/dist/chunk-ELMJYRTT.js +0 -29
  344. package/dist/chunk-F6WSLZVN.js +0 -675
  345. package/dist/chunk-JVGY2GHK.js +0 -776
  346. package/dist/chunk-KWSBCSFM.js +0 -411
  347. package/dist/chunk-SP5D3XYY.js +0 -1550
  348. package/dist/chunk-XJMEPP36.js +0 -57
  349. package/dist/database/core/entry-columns.d.ts +0 -8
  350. package/dist/database/core/entry-columns.d.ts.map +0 -1
  351. package/dist/database/core/schema.d.ts +0 -69
  352. package/dist/database/core/schema.d.ts.map +0 -1
  353. package/dist/error-helpers-STR7IPUR.js +0 -2
  354. package/dist/git-runner-6OE7PVKA.js +0 -1
  355. package/dist/journal-api-UG43ZD7Y.js +0 -1289
  356. package/dist/tools-RBNFDWIE.js +0 -9
@@ -1,2 +1,2 @@
1
- export declare const GITHUB_HELP = "# GitHub Integration\n\n- Include `issue_number`/`pr_number` and `--project` in your `memory-journal-mcp entry create` CLI command to auto-link\n- After closing issue/merging PR \u2192 create summary entry with learnings\n- CI failures \u2192 `actions-failure-digest` prompt or `memory://actions/recent`\n- Kanban: `get_kanban_board` \u2192 `add_kanban_item` / `move_kanban_item` / `delete_kanban_item` \u2192 document completion (project_number auto-resolves if repo is registered). **\u26A0\uFE0F Eventual Consistency:** GitHub Projects V2 read index is heavily eventually consistent. Do NOT rely on `get_kanban_board` to immediately reflect items that were just added or moved.\n- Milestones: `get_github_milestones` \u2192 track project progress, `memory://github/milestones`\n- Commits: `memory://commits/{project_number}/by-issue` and `memory://commits/{project_number}/by-pr` group commits by referenced issues/PRs.\n- Rate Limits: Before expensive API operations, check `memory://github/rate-limit` (or `memory://github/rate-limit/{repo}`) to proactively throttle.\n- **Project Initialization**: To register a new project workspace, create an entry with `project_number: N`. Instruct the user to manually update their `PROJECT_REGISTRY` config, as agents cannot directly edit protected IDE config files.\n- **Multi-Project Routing**: If `memory://briefing` shows \"Registered Workspaces\":\n - **Tools**: The `repo` parameter automatically resolves from `project_number`. If you omit both, they default to the primary project.\n - **Resources**: Resource URIs like `memory://github/status` will fallback to the default project. To explicitly target another project, use the `{repo}` variant (e.g., `memory://github/status/{repo}`).\n - **Dynamic Briefings**: You can explicitly request the briefing for a specific project by reading `memory://briefing/{repo}` instead of the global `memory://briefing` resource.\n\n## Copilot Review Patterns\n\nWhen the user has GitHub Copilot code review enabled:\n\n**Learn from reviews** \u2014 After a PR is merged or reviewed, use `get_copilot_reviews({ pr_number, owner, repo })` to read Copilot's findings (leave `owner` and `repo` empty to auto-detect from git). If patterns emerge (e.g., repeated null check warnings, missing error handling), suggest adding a rule or updating existing rules. Create journal entries tagged `copilot-finding` and link to the PR via `pr_number`.\n\n**Pre-emptive checking** \u2014 Before creating or modifying code, search journal entries with tag `copilot-finding` for patterns relevant to the current work. Apply those patterns proactively to reduce review cycles.\n\n## Available Tools\n\n- **Issues**: `get_github_issues`, `get_github_issue`, `create_github_issue_with_entry`, `close_github_issue_with_entry`\n- **Pull Requests**: `get_github_prs`, `get_github_pr`, `get_copilot_reviews`\n- **Context & Insights**: `get_github_context`, `get_repo_insights`\n- **Kanban**: `get_kanban_board`, `add_kanban_item`, `move_kanban_item`, `delete_kanban_item`\n- **Milestones**: `get_github_milestones`, `get_github_milestone`, `create_github_milestone`, `update_github_milestone`, `delete_github_milestone`\n\n";
1
+ export declare const GITHUB_HELP = "# GitHub Integration\n\n- Include `issue_number`/`pr_number` and `--project` in your `memory-journal-mcp entry create` CLI command to auto-link\n- After closing issue/merging PR \u2192 create summary entry with learnings\n- CI failures \u2192 `actions-failure-digest` prompt or `memory://actions/recent`\n- Kanban: `get_kanban_board` \u2192 `add_kanban_item` / `move_kanban_item` / `delete_kanban_item` \u2192 document completion (project_number auto-resolves if repo is registered). **\u26A0\uFE0F Eventual Consistency:** GitHub Projects V2 read index is heavily eventually consistent. Do NOT rely on `get_kanban_board` to immediately reflect items that were just added or moved.\n- Milestones: `get_github_milestones` \u2192 track project progress, `memory://github/milestones`\n- Commits: `memory://commits/{project_number}/by-issue` and `memory://commits/{project_number}/by-pr` group commits by referenced issues/PRs.\n- Rate Limits & Status: Before expensive API operations, check `memory://github/status` (or `memory://github/status/{+repo}`) to inspect repository connectivity and status.\n- **Project Initialization**: To register a new project workspace, use the `register_project` (or `update_project`) MCP tool (`mj.admin.registerProject` / `mj.admin.updateProject` in Code Mode) or the `memory-journal-mcp project create <name> --path <path> --number <N>` CLI command.\n- **Multi-Project Routing**: If `memory://briefing` shows \"Registered Workspaces\":\n - **Tools**: The `repo` parameter automatically resolves from `project_number`. If you omit both, they default to the primary project.\n - **Resources**: Resource URIs like `memory://github/status` will fallback to the default project. To explicitly target another project, use the `{repo}` variant (e.g., `memory://github/status/{repo}`).\n - **Dynamic Briefings**: You can explicitly request the briefing for a specific project by reading `memory://briefing/{repo}` instead of the global `memory://briefing` resource.\n\n## Copilot Review Patterns\n\nWhen the user has GitHub Copilot code review enabled:\n\n**Learn from reviews** \u2014 After a PR is merged or reviewed, use `get_copilot_reviews({ pr_number, owner, repo })` to read Copilot's findings (leave `owner` and `repo` empty to auto-detect from git). If patterns emerge (e.g., repeated null check warnings, missing error handling), suggest adding a rule or updating existing rules. Create journal entries tagged `copilot-finding` and link to the PR via `pr_number`.\n\n**Pre-emptive checking** \u2014 Before creating or modifying code, search journal entries with tag `copilot-finding` for patterns relevant to the current work. Apply those patterns proactively to reduce review cycles.\n\n## Available Tools\n\n- **Issues**: `get_github_issues`, `get_github_issue`, `create_github_issue_with_entry`, `close_github_issue_with_entry`\n- **Pull Requests**: `get_github_prs`, `get_github_pr`, `get_copilot_reviews`\n- **Context & Insights**: `get_github_context`, `get_repo_insights`\n- **Kanban**: `get_kanban_board`, `add_kanban_item`, `move_kanban_item`, `delete_kanban_item`\n- **Milestones**: `get_github_milestones`, `get_github_milestone`, `create_github_milestone`, `update_github_milestone`, `delete_github_milestone`\n\n";
2
2
  //# sourceMappingURL=github.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/github.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,6nGA+BvB,CAAC"}
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/github.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,msGA+BvB,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const GOTCHAS_HELP = "# Field Notes & Gotchas\n\n## Tool Usage Pitfalls\n\n1. **Result Limits**: The `MAX_QUERY_LIMIT` is strictly 500 for most search tools. Use the optional `cursor` parameter and `next_cursor` output for O(1) keyset pagination on large datasets. Batch operations are strictly limited to `MAX_BATCH_SIZE` (50) per transaction.\n2. **Code Mode Restrictions**: The `mj_execute_code` sandbox cannot make network requests (calling `fetch()` throws a `SandboxNetworkError` and Node network modules are stripped). Use it strictly for orchestrating `mj.*` API calls. If you need to hit external/HTTP endpoints or execute shell commands, you must use native OS tools outside of Code Mode. Note: `setTimeout` and `sleep(ms)` are available for minor delays, but avoid long-running operations.\n3. **Tool & Parameter Hallucinations**: Do NOT attempt to use tools that are not listed in the `memory://help` resource. If you guess incorrect parameter names, array methods, or access `Promise` objects synchronously in Code Mode, the proxy layer will intercept the mistake and return a structured `[VALIDATION_ERROR]` payload with `{ success: false }`. Read the feedback and adjust your payload rather than expecting a raw V8 crash. (Note: In-process MCP tool and argument healing is enabled by default and can be disabled globally via `--no-agent-healing` or `MCP_AGENT_HEALING=false`.)\n - **Batch Operations:** Tools like `batch_create_entries`, `batch_update_entries`, and `batch_delete_entries` strictly require an object wrapper (e.g., `{ entries: [...] }`, `{ updates: [...] }`, `{ entry_ids: [...] }`). **NEVER** pass an array directly as the main argument.\n - **Entry Creation Fields:** Entry creation tools require `content` for the primary markdown text. Hallucinated parameter names such as `entry`, `text`, `message`, `description`, `notes`, or `details` (as well as nested `{ entry: { ... } }` objects) are automatically healed and normalized to `content`.\n - **Parameterless Tools & Prompts:** Tools like `rebuild_vector_index` take an empty object `{}`. Similarly, for MCP Prompts, note that some arguments are explicitly required (e.g., the `lookback` or `autoRun` arguments in the `optimize-journal` prompt).\n - **Diagnostic & Adapter Tools:** Ecosystem diagnostic methods like `server_info`, `server_health`, and `list_adapters` are automatically healed when called as MCP tools or via Code Mode (`mj.system.listAdapters()`, `mj.adapters()`).\n - **Native Tool & Codebase Search Fallbacks:** Agent-native inspection tools like `grep_search`, `file_search`, `view_file`, and `list_dir` are automatically healed when autonomous healing is enabled. When invoked against the MCP server, local filesystem queries are bounded by `--allowed-io-roots` (`ALLOWED_IO_ROOTS`) and returned safely, and journal queries are seamlessly mapped to `search_entries` or resources.\n4. **Phrase Matching**: The `query` parameter in search tools supports true phrase matching. Wrap exact strings in double quotes (e.g., `\"error handling\"`) when word order and adjacency are critical.\n5. **Typo Tolerance**: FTS5 search operations automatically fall back to Levenshtein distance matching on tags and entry types if no results are found. To disable this when strict exact matching is needed, explicitly set `fuzzy_match: false`.\n6. **Team RBAC**: If the team database has at least one member registered, RBAC is active. Unregistered authors fall back to the `TEAM_DEFAULT_ROLE` (which denies access by default). Non-admin members can only modify or resolve entries/flags they originally authored.\n7. **Concurrent Edits**: When updating an entry (`update_entry`, `team_update_entry`), always pass `expectedVersion` if you know the current version to prevent silently overwriting concurrent changes. If you get a `VERSION_CONFLICT` error, re-read the latest entry state returned in the error payload, merge your changes, and retry.\n8. **Cross-Team Search**: The `cross_team_search` tool searches across multiple team databases configured via `ADDITIONAL_TEAM_DBS`. Results include a `team_db` label identifying the source database. This tool is read-only and uses FTS5 only (no semantic/vector search across DBs). Individual DB failures are non-fatal \u2014 the response includes `degraded: true` and per-DB error details.\n9. **Observability & Persistence**: If the server runs via HTTP with `--metrics-export prometheus` (or `METRICS_EXPORT`), a standard `/metrics` endpoint is exposed for external scrapers. Code Mode cannot natively fetch this endpoint; instead, use the `memory://metrics/summary`, `memory://metrics/latency`, and `memory://metrics/resources` resources to retrieve telemetry. **Metrics reset on restart** unless the `--persist-metrics` flag (or `PERSIST_METRICS` env var) is provided, which enables periodic JSON state snapshots for long-term trend analysis.\n10. **Multi-step Operations & Error Aggregation**: Tools performing batch actions (e.g., `import_markdown`, `batch_create_entries`, `batch_update_entries`, `batch_delete_entries`, `rebuild_vector_index`) will return a single `ErrorResponse` on partial failure (with `success: false`). This response contains an `aggregated_errors` array of objects (e.g. `[{ \"message\": \"Item at index 0 failed: UNIQUE constraint failed\" }]`) detailing individual item failures, while the top-level error message summarizes total success/failure counts.\n11. **Configuration Precedence & Debugging**: Server settings are resolved using strict precedence: CLI flags override Environment Variables, which override the Config File (`memory-journal.config.yaml` / `.yml` / `.json`), which overrides Defaults. If you encounter unexpected settings, you can run the server with the `--dump-config` flag. This command aggregates any startup configuration validation errors (printing them all at once rather than failing on the first one) or, if valid, prints the fully resolved configuration tree (with secrets automatically redacted as `[REDACTED]`) and exits cleanly. This is the primary method for diagnosing overriding issues.\n12. **Runtime Configuration Hot-Reloading**: Use `update_configuration` to dynamically change the `tool_filter` or briefing variables without a server restart. Both `update_configuration` and `mj_execute_code` are **always available** regardless of the active filter \u2014 you can never lock yourself out.\n\n **Granular Tool Switching**: You can enable/disable individual tools at runtime:\n - Add a tool: `update_configuration({ tool_filter: \"starter,+get_github_issues\" })`\n - Remove a tool: `update_configuration({ tool_filter: \"full,-backup_journal,-restore_backup\" })`\n - Exact whitelist: `update_configuration({ tool_filter: \"create_entry,search_entries\" })`\n - Read `memory://tools/available` to discover all tools and their groups before enabling them.\n \n After calling `update_configuration`, the server emits `notifications/tools/list_changed` so MCP clients that support it automatically refresh the available tool list.\n13. **Database Encryption**: If the database requires SQLCipher encryption at rest, you must set the `DB_ENCRYPTION_KEY` environment variable when starting the server. If this key is missing or incorrect for an encrypted database, any operations will fail with a \"not a database\" error.\n14. **Scheduled Reports**: The `--report-interval` scheduler job is HTTP-only and requires `--report-webhook-url` to actually deliver reports. Without a webhook URL, the job still generates and persists report snapshots (viewable via `memory://insights/reports`) but skips delivery. Report delivery failures are logged but never crash the server.\n15. **Token Estimation & Content-Type Heuristics**: To assist you in optimizing your context window consumption, every tool execution result includes a `_meta.tokenEstimate` field. This value uses dynamic, content-type-aware heuristics to closely estimate real token costs (Prose defaults to 4.0 bytes/token; JSON payloads to 2.8 bytes/token; Code blocks to 3.2 bytes/token). Leverage this telemetry to govern your batch sizes or fallback to paginated/throttled endpoints if usage spikes.\n16. **Schema Hallucinations in Custom Scripts**: When writing standalone scripts or Code Mode execution payloads, do **NOT** write raw SQL queries against `better-sqlite3` guessing the database schema based on TypeScript interfaces. For example, the primary table is named `memory_journal` (NOT `entries`), and it **DOES NOT** have columns for `importance` or `created_by_agent`. Always rely on the built-in MCP API tools (e.g., `search_entries`, `get_recent_entries`) or Code Mode `mj` globals rather than crafting raw `SELECT` or `DELETE` statements to avoid `SqliteError: no such table` or `no such column` crashes.\n17. **Template Literals & Backticks in Code Mode**: When generating JavaScript code inside `mj_execute_code`, avoid unescaped nested backticks (`` ` ``) inside template literals (e.g., `` content: `... `.npmrc` ...` ``). Unescaped backticks prematurely terminate the template string and trigger syntax errors or tagged template TypeErrors (e.g., `TypeError: \"...\".npmrc is not a function`). Instead, pass large markdown payloads via the `context` parameter (e.g., `context: { content: \"...\" }`) and reference them as `context.content`, or escape all nested backticks with `\\`.\n18. **Result Size Cap & Auto-Compaction in Code Mode**: The Code Mode sandbox enforces a default 100KB result serialization cap to protect context windows and prevent out-of-memory crashes. If your script returns large payloads (such as querying 50+ entries with complete markdown content), pass `max_result_size: <bytes>` (e.g. `200 * 1024` or `500 * 1024`, up to 50MB) in `mj_execute_code` parameters or context, set the `CODE_MODE_MAX_RESULT_SIZE` environment variable, or select specific fields before returning. When returning oversized collections, the sandbox automatically compacts large markdown strings to preserve execution success.\n\n## GitHub & Kanban Sync\n\n- **Eventual Consistency**: GitHub Projects V2 read indexes are eventually consistent. If you `add_kanban_item` or `move_kanban_item`, a subsequent `get_kanban_board` might take up to 10 seconds to reflect the change.\n- **Multi-Project Routing**: Always pass the `repo` parameter to GitHub tools if your `memory://briefing` indicates you are in a multi-project environment.\n\n## Structural Integrity\n\n- **Session Summaries**: Always use `entry_type: \"retrospective\"` and tag with `session-summary`.\n- **References**: Never guess `entry_id`, `issue_number`, or `pr_number`. Always query them first to avoid broken links.\n- **Significance**: Only mark entries with `significance_type` if they are genuinely major milestones, decisions, or breakthroughs. Overusing this degrades the signal-to-noise ratio of the journal.";
1
+ export declare const GOTCHAS_HELP = "# Field Notes & Gotchas\n\n## Tool Usage Pitfalls\n\n1. **Result Limits**: The `MAX_QUERY_LIMIT` is strictly 500 for most search tools. Use the optional `cursor` parameter and `next_cursor` output for O(1) keyset pagination on large datasets. Batch operations are strictly limited to `MAX_BATCH_SIZE` (50) per transaction.\n2. **Code Mode Restrictions**: The `mj_execute_code` sandbox cannot make network requests (calling `fetch()` returns a 403 `VALIDATION_ERROR` response object and Node network modules are stripped). Use it strictly for orchestrating `mj.*` API calls. If you need to hit external/HTTP endpoints or execute shell commands, you must use native OS tools outside of Code Mode. Note: `setTimeout` and `sleep(ms)` are available for minor delays, but avoid long-running operations.\n3. **Tool & Parameter Hallucinations**: Do NOT attempt to use tools that are not listed in the `memory://help` resource. If you guess incorrect parameter names, array methods, or access `Promise` objects synchronously in Code Mode, the proxy layer will intercept the mistake and return a structured `[VALIDATION_ERROR]` payload with `{ success: false }`. Read the feedback and adjust your payload rather than expecting a raw V8 crash. (Note: In-process MCP tool and argument healing is enabled by default and can be disabled globally via `--no-agent-healing` or `MCP_AGENT_HEALING=false`.)\n - **Batch Operations:** Tools like `batch_create_entries`, `batch_update_entries`, and `batch_delete_entries` strictly require an object wrapper (e.g., `{ entries: [...] }`, `{ updates: [...] }`, `{ entry_ids: [...] }`). **NEVER** pass an array directly as the main argument.\n - **Entry Creation Fields:** Entry creation tools require `content` for the primary markdown text. Hallucinated parameter names such as `entry`, `text`, `message`, `description`, `notes`, or `details` (as well as nested `{ entry: { ... } }` objects) are automatically healed and normalized to `content`.\n - **Parameterless Tools & Prompts:** Tools like `rebuild_vector_index` take an empty object `{}`. Similarly, for MCP Prompts, note that some arguments are explicitly required (e.g., `project_number` in `project-status-summary` and `project-milestone-tracker`, or `pr_number` in `pr-summary`, `code-review-prep`, and `pr-retrospective`).\n - **Diagnostic & Adapter Tools:** Ecosystem diagnostic methods like `server_info`, `server_health`, and `list_adapters` are automatically healed when called as MCP tools or via Code Mode (`mj.system.listAdapters()`, `mj.adapters()`).\n - **Native Tool & Codebase Search Fallbacks:** Agent-native inspection tools like `grep_search`, `file_search`, `view_file`, and `list_dir` are automatically healed when autonomous healing is enabled. When invoked against the MCP server, local filesystem queries are bounded by `--allowed-io-roots` (`ALLOWED_IO_ROOTS`) and returned safely, and journal queries are seamlessly mapped to `search_entries` or resources.\n4. **Phrase Matching**: The `query` parameter in search tools supports true phrase matching. Wrap exact strings in double quotes (e.g., `\"error handling\"`) when word order and adjacency are critical.\n5. **Typo Tolerance**: FTS5 search operations automatically fall back to Levenshtein distance matching on tags and entry types if no results are found. To disable this when strict exact matching is needed, explicitly set `fuzzy_match: false`.\n6. **Team RBAC**: If the team database has at least one member registered, RBAC is active. Unregistered authors fall back to the `TEAM_DEFAULT_ROLE` (which denies access by default). Non-admin members can only modify or delete entries they originally authored.\n7. **Concurrent Edits**: When updating or deleting an entry (`update_entry`, `team_update_entry`, `delete_entry`, `team_delete_entry`), always pass `expected_version` if you know the current version to prevent silently overwriting concurrent changes. If you get a `VERSION_CONFLICT` error, re-read the latest entry state returned in the error payload, merge your changes, and retry.\n8. **Cross-Team Search**: The `cross_team_search` tool searches across multiple team databases configured via `ADDITIONAL_TEAM_DBS`. Results include a `team_db` label identifying the source database. This tool is read-only and uses FTS5 only (no semantic/vector search across DBs). Individual DB failures are non-fatal \u2014 the response includes `degraded: true` and per-DB error details.\n9. **Observability & Persistence**: If the server runs via HTTP with `--metrics-export prometheus` (or `METRICS_EXPORT`), a standard `/metrics` endpoint is exposed for external scrapers. Code Mode cannot natively fetch this endpoint; instead, use the `memory://metrics/summary`, `memory://metrics/latency`, and `memory://metrics/resources` resources to retrieve telemetry. **Metrics reset on restart** unless the `--persist-metrics` flag (or `PERSIST_METRICS` env var) is provided, which enables periodic JSON state snapshots for long-term trend analysis.\n10. **Multi-step Operations & Error Aggregation**: Tools performing batch actions (e.g., `import_markdown`, `batch_create_entries`, `batch_update_entries`, `batch_delete_entries`, `rebuild_vector_index`) will return a single `ErrorResponse` on partial failure (with `success: false`). This response contains an `aggregated_errors` array of objects (e.g. `[{ \"message\": \"Item at index 0 failed: UNIQUE constraint failed\" }]`) detailing individual item failures, while the top-level error message summarizes total success/failure counts.\n11. **Configuration Precedence & Debugging**: Server settings are resolved using strict precedence: CLI flags override Environment Variables, which override the Config File (`memory-journal.config.yaml` / `.yml` / `.json`), which overrides Defaults. If you encounter unexpected settings, you can run the server with the `--dump-config` flag. This command aggregates any startup configuration validation errors (printing them all at once rather than failing on the first one) or, if valid, prints the fully resolved configuration tree (with secrets automatically redacted as `[REDACTED]`) and exits cleanly. This is the primary method for diagnosing overriding issues.\n12. **Runtime Configuration Hot-Reloading**: Use `update_configuration` to dynamically change the `tool_filter` or briefing variables without a server restart. Both `update_configuration` and `mj_execute_code` are **always available** regardless of the active filter \u2014 you can never lock yourself out.\n\n **Granular Tool Switching**: You can enable/disable individual tools at runtime:\n - Add a tool: `update_configuration({ tool_filter: \"starter,+get_github_issues\" })`\n - Remove a tool: `update_configuration({ tool_filter: \"full,-backup_journal,-restore_backup\" })`\n - Exact whitelist: `update_configuration({ tool_filter: \"create_entry,search_entries\" })`\n - Read `memory://tools/available` to discover all tools and their groups before enabling them.\n \n After calling `update_configuration`, the server emits `notifications/tools/list_changed` so MCP clients that support it automatically refresh the available tool list.\n13. **Database Encryption**: If the database requires SQLCipher encryption at rest, you must set the `DB_ENCRYPTION_KEY` environment variable when starting the server. If this key is missing or incorrect for an encrypted database, any operations will fail with a \"not a database\" error.\n14. **Scheduled Reports**: The `--report-interval` scheduler job is HTTP-only and requires `--report-webhook-url` to actually deliver reports. Without a webhook URL, the job still generates and persists report snapshots (viewable via `memory://insights/reports`) but skips delivery. Report delivery failures are logged but never crash the server.\n15. **Token Estimation & Content-Type Heuristics**: To assist you in optimizing your context window consumption, every tool execution result includes a `_meta.tokenEstimate` field. This value uses dynamic, content-type-aware heuristics to closely estimate real token costs (Prose defaults to 4.0 bytes/token; JSON payloads to 2.8 bytes/token; Code blocks to 3.2 bytes/token). Leverage this telemetry to govern your batch sizes or fallback to paginated/throttled endpoints if usage spikes.\n16. **Schema Hallucinations in Custom Scripts**: When writing standalone scripts or Code Mode execution payloads, do **NOT** write raw SQL queries against `better-sqlite3` guessing the database schema based on TypeScript interfaces. For example, the primary table is named `memory_journal` (NOT `entries`), and it **DOES NOT** have columns for `importance` or `created_by_agent`. Always rely on the built-in MCP API tools (e.g., `search_entries`, `get_recent_entries`) or Code Mode `mj` globals rather than crafting raw `SELECT` or `DELETE` statements to avoid `SqliteError: no such table` or `no such column` crashes.\n17. **Template Literals & Backticks in Code Mode**: When generating JavaScript code inside `mj_execute_code`, avoid unescaped nested backticks (`` ` ``) inside template literals (e.g., `` content: `... `.npmrc` ...` ``). Unescaped backticks prematurely terminate the template string and trigger syntax errors or tagged template TypeErrors (e.g., `TypeError: \"...\".npmrc is not a function`). Instead, pass large markdown payloads via the `context` parameter (e.g., `context: { content: \"...\" }`) and reference them as `context.content`, or escape all nested backticks with `\\`.\n18. **Result Size Cap & Auto-Compaction in Code Mode**: The Code Mode sandbox enforces a default 100KB result serialization cap to protect context windows and prevent out-of-memory crashes. If your script returns large payloads (such as querying 50+ entries with complete markdown content), pass `max_result_size: <bytes>` (e.g. `200 * 1024` or `500 * 1024`, up to 50MB) in `mj_execute_code` parameters or context, set the `CODE_MODE_MAX_RESULT_SIZE` environment variable, or select specific fields before returning. When returning oversized collections, the sandbox automatically compacts large markdown strings to preserve execution success.\n\n## GitHub & Kanban Sync\n\n- **Eventual Consistency**: GitHub Projects V2 read indexes are eventually consistent. If you `add_kanban_item` or `move_kanban_item`, a subsequent `get_kanban_board` might take up to 10 seconds to reflect the change.\n- **Multi-Project Routing**: Always pass the `repo` parameter to GitHub tools if your `memory://briefing` indicates you are in a multi-project environment.\n\n## Structural Integrity\n\n- **Session Summaries**: Always use `entry_type: \"retrospective\"` and tag with `session-summary`.\n- **References**: Never guess `entry_id`, `issue_number`, or `pr_number`. Always query them first to avoid broken links.\n- **Significance**: Only mark entries with `significance_type` if they are genuinely major milestones, decisions, or breakthroughs. Overusing this degrades the signal-to-noise ratio of the journal.";
2
2
  //# sourceMappingURL=gotchas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gotchas.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/gotchas.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,ioVA6C+K,CAAC"}
1
+ {"version":3,"file":"gotchas.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/gotchas.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,gxVA6C+K,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const IO_HELP = "# IO Operations\n- **Exporting**: Supports exporting entries to JSON or Markdown format. Markdown exports include YAML frontmatter for metadata.\n- **Importing**: Supports importing entries from Markdown files with YAML frontmatter, or from external JSON formats.\n\n## Available Tools\n\n- **Export**: `export_entries`, `export_markdown`\n- **Import**: `import_markdown`, `import_external`\n";
1
+ export declare const IO_HELP = "# IO Operations\n- **Exporting**: Supports exporting entries to JSON or Markdown format. Native Markdown exports (`export_markdown`) include JSON-formatted frontmatter inside `---` delimiters for lossless metadata round-tripping.\n- **Importing**: Supports importing entries from native Markdown files with JSON frontmatter (`import_markdown`) or external Markdown vaults with standard YAML frontmatter such as Obsidian, Notion, and Logseq (`import_external`).\n\n## Available Tools\n\n- **Export**: `export_entries`, `export_markdown`\n- **Import**: `import_markdown`, `import_external`\n";
2
2
  //# sourceMappingURL=io.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/io.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,6YAQnB,CAAC"}
1
+ {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/io.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,klBAQnB,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const TEMPLATES_HELP = "# Content Templates\n\nThese templates define the REQUIRED structure for journal entry content by type. Do NOT invent additional top-level sections. Do NOT omit required sections.\n\n## Session Summary (entry\\_type: \"retrospective\", tag: \"session-summary\")\n\n```\n## Accomplished\n- [Concrete item: what was done, key files/PRs/entry IDs]\n- [Another concrete item]\n\n## Unfinished / Blocked\n- [Item: why it's blocked or what remains \u2014 or \"None\" if complete]\n\n## Context for Next Session\n- [Key context the next agent/session needs: branch names, PR numbers, entry IDs, pending decisions]\n```\n\nDo NOT add extra top-level sections (no \"## Summary\", \"## Overview\", \"## Notes\").\nDo NOT omit any of the three required sections.\nAlways remember to populate the `auto_context` payload parameter with the session's commit SHAs.\n\n## Feature Implementation (entry\\_type: \"feature\\_implementation\")\n\n```\n## Summary\n[1-2 sentence description of the feature]\n\n## Changes\n- [File/module]: [what changed]\n\n## Testing\n- [How it was tested, results]\n\n## Notes\n- [Any gotchas, follow-ups, or related entries]\n```\n\n## Bug Fix (entry\\_type: \"bug\\_fix\")\n\n```\n## Problem\n[What was broken and how it manifested]\n\n## Root Cause\n[Why it happened]\n\n## Fix\n- [What was changed to fix it]\n\n## Verification\n- [How the fix was verified]\n```\n\n## Planning (entry\\_type: \"planning\")\n\n```\n## Goal\n[What this plan aims to achieve]\n\n## Approach\n- [Step or phase]: [description]\n\n## Open Questions\n- [Unresolved decisions or dependencies]\n```\n\n## Technical Note (entry\\_type: \"technical\\_note\")\n\n```\n## Topic\n[What this note documents]\n\n## Details\n[Technical explanation, code patterns, configuration]\n\n## References\n- [Related entries, docs, or external links]\n```\n\n## General Rule\n\nFor any entry type not listed above, structure content with:\n1. A clear `##` heading describing the main topic\n2. Bullet points for discrete items\n3. No invented sections beyond what the content actually covers";
1
+ export declare const TEMPLATES_HELP = "# Content Templates\n\nThese templates define the REQUIRED structure for journal entry content by type. Do NOT invent additional top-level sections. Do NOT omit required sections.\n\n## Session Summary (entry\\_type: \"retrospective\", tag: \"session-summary\")\n\n```\n## Accomplished\n- [Concrete item: what was done, key files/PRs/entry IDs]\n- [Another concrete item]\n\n## Unfinished / Blocked\n- [Item: why it's blocked or what remains \u2014 or \"None\" if complete]\n\n## Context for Next Session\n- [Key context the next agent/session needs: branch names, PR numbers, entry IDs, pending decisions]\n\n## Commits\n- `<sha>` \u2014 [Brief commit summary or \"None\"]\n```\n\nDo NOT add extra top-level sections (no \"## Summary\", \"## Overview\", \"## Notes\").\nDo NOT omit any of the four required sections.\nAlways remember to populate the `auto_context` payload parameter with the session's commit SHAs.\n\n## Feature Implementation (entry\\_type: \"feature\\_implementation\")\n\n```\n## Summary\n[1-2 sentence description of the feature]\n\n## Changes\n- [File/module]: [what changed]\n\n## Testing\n- [How it was tested, results]\n\n## Notes\n- [Any gotchas, follow-ups, or related entries]\n```\n\n## Bug Fix (entry\\_type: \"bug\\_fix\")\n\n```\n## Problem\n[What was broken and how it manifested]\n\n## Root Cause\n[Why it happened]\n\n## Fix\n- [What was changed to fix it]\n\n## Verification\n- [How the fix was verified]\n```\n\n## Planning (entry\\_type: \"planning\")\n\n```\n## Goal\n[What this plan aims to achieve]\n\n## Approach\n- [Step or phase]: [description]\n\n## Open Questions\n- [Unresolved decisions or dependencies]\n```\n\n## Technical Note (entry\\_type: \"technical\\_note\")\n\n```\n## Topic\n[What this note documents]\n\n## Details\n[Technical explanation, code patterns, configuration]\n\n## References\n- [Related entries, docs, or external links]\n```\n\n## General Rule\n\nFor any entry type not listed above, structure content with:\n1. A clear `##` heading describing the main topic\n2. Bullet points for discrete items\n3. No invented sections beyond what the content actually covers";
2
2
  //# sourceMappingURL=templates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/templates.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,whEAqFqC,CAAC"}
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/templates.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,0lEAwFqC,CAAC"}
@@ -54,10 +54,10 @@ export declare function generateCodeModeInstructions(enabledTools: Set<string>,
54
54
  * Static instructions for backward compatibility.
55
55
  * @deprecated Use generateStandardInstructions() instead for dynamic content
56
56
  */
57
- export declare const SERVER_INSTRUCTIONS = "# memory-journal-mcp\n\n## Quick Access\n\n| Purpose | Action |\n| --------------- | --------------------------- |\n| Session context | `memory://briefing` |\n| Recent entries | `memory://recent` |\n| Health/time | `memory://health` |\n| Metrics/Summary | `memory://metrics/summary` |\n| Metrics/Latency | `memory://metrics/latency` |\n| Resource reads | `memory://metrics/resources`|\n| Project staleness| `memory://staleness` |\n| Report history | `memory://insights/reports` |\n| Agent context | `memory://agent-context/{repo}` |\n\n## Help Resources\n\n- **Agent Skill:** If available in your environment, load the `memory-journal-mcp` skill for high-level workflow guidelines.\n- **Dynamic Help:** Read `memory://help` for tool group index and available help resources.\n- **Gotchas:** Read `memory://help/gotchas` for critical usage patterns, heuristics, and session summary rules.\n- **Group Reference:** Read `memory://help/{group}` for per-group tool reference (parameters, annotations, examples).\n\nOnly help resources for your enabled tool groups are registered.\n\n## Essential Behaviors\n\n1. **Briefing:** You **MUST** read the `memory://briefing/{+repo}` at the start of each chat!\n2. **Session Identity:** You MUST pass your AntiGravity Conversation ID as the `--session-id` argument for all CLI journal mutation commands.\n3. **Workspace Isolation:** The `--project` argument is STRICTLY REQUIRED for mutations. Find it in the briefing's Config row. If you are mid-task and need this context, NEVER re-query the briefing; ALWAYS query `memory://agent-context/{repo_name}`.\n4. **Anti-Hallucination:** If confused by an API, read `memory://help/{group}` or `memory://help/gotchas` BEFORE guessing. Use `mcp-heal` if a structural hallucination persists.\n5. **Orphan Prevention:** ALWAYS link entries to previous context via `--related-to` (comma-separated entry IDs).\n\n## Essential Operations\n\n- **Creating Entries:** Use the `memory-journal-mcp entry create` CLI command via your terminal (`run_command`). CLI commands are ALWAYS available globally on the system; do NOT attempt to run them via Code Mode. ALL entries MUST define `--impact-score`, `--trust-score`, and `--validation-status`. See `memory://help/core` for criteria.\n- **Session Summaries:** Use the `memory-journal-mcp entry create` CLI command with `--type retrospective` and `--tags session-summary`. You MUST provide the markdown content via `--content \"<string>\"` or `--file <path>` (or pipe to stdin). See `memory://help/templates` for the exact 4-section format required.\n- **Updating/Deleting:** Use `memory-journal-mcp entry update` (pass `--expected-version` to prevent concurrent overwrites) and use the `delete_entry` MCP tool for soft-deletes.\n- **Searching:** Use `search_entries` or `search_by_date_range`. Use `sort_by: \"importance\"` to surface structurally significant entries. Use phrase matching (e.g. `\"error handling\"`) for exact matches.\n- **Team DB:** Append the `--team` flag to your CLI commands for shared state. Use `team_*` MCP tools ONLY for searches or deletes. See `memory://help/team` for RBAC rules. Do NOT create bulk relationships between unrelated entries that happen to share tags.";
57
+ export declare const SERVER_INSTRUCTIONS = "# memory-journal-mcp\n\n## Quick Access\n\n| Purpose | Action |\n| --------------- | --------------------------- |\n| Session context | `memory://briefing` |\n| Recent entries | `memory://recent` |\n| Health/time | `memory://health` |\n| Metrics/Summary | `memory://metrics/summary` |\n| Metrics/Latency | `memory://metrics/latency` |\n| Resource reads | `memory://metrics/resources`|\n| Project staleness| `memory://staleness` |\n| Report history | `memory://insights/reports` |\n| Agent context | `memory://agent-context/{+repo}` |\n\n## Help Resources\n\n- **Agent Skill:** If available in your environment, load the `memory-journal-mcp` skill for high-level workflow guidelines.\n- **Dynamic Help:** Read `memory://help` for tool group index and available help resources.\n- **Gotchas:** Read `memory://help/gotchas` for critical usage patterns, heuristics, and session summary rules.\n- **Group Reference:** Read `memory://help/{group}` for per-group tool reference (parameters, annotations, examples).\n\nOnly help resources for your enabled tool groups are registered.\n\n## Essential Behaviors\n\n1. **Briefing:** You **MUST** read the `memory://briefing/{+repo}` at the start of each chat!\n2. **Session Identity:** You MUST pass your AntiGravity Conversation ID as the `--session-id` argument for all CLI journal mutation commands.\n3. **Workspace Isolation:** The `--project` argument is STRICTLY REQUIRED for mutations when the current working directory is not mapped in `PROJECT_REGISTRY` (otherwise it auto-resolves from CWD). Find it in the briefing's Config row. If you are mid-task and need this context, NEVER re-query the briefing; ALWAYS query `memory://agent-context/{+repo}`.\n4. **Anti-Hallucination:** If confused by an API, read `memory://help/{group}` or `memory://help/gotchas` BEFORE guessing. Use `mcp-heal` if a structural hallucination persists.\n5. **Orphan Prevention:** ALWAYS link entries to previous context via `--related-to` (comma-separated entry IDs).\n\n## Essential Operations\n\n- **Creating Entries:** Use the `memory-journal-mcp entry create` CLI command via your terminal (`run_command`). CLI commands are ALWAYS available globally on the system; do NOT attempt to run them via Code Mode. ALL entries MUST define `--impact-score`, `--trust-score`, and `--validation-status`. See `memory://help/core` for criteria.\n- **Session Summaries:** Use the `memory-journal-mcp entry create` CLI command with `--type retrospective` and `--tags session-summary`. You MUST provide the markdown content via `--content \"<string>\"` or `--file <path>` (or pipe to stdin). See `memory://help/templates` for the exact 4-section format required.\n- **Updating/Deleting:** Use `memory-journal-mcp entry update` (pass `--expected-version` to prevent concurrent overwrites) and use the `delete_entry` MCP tool for soft-deletes.\n- **Searching:** Use `search_entries` or `search_by_date_range`. Use `sort_by: \"importance\"` to surface structurally significant entries. Use phrase matching (e.g. `\"error handling\"`) for exact matches.\n- **Team DB:** Append the `--team` flag to your CLI commands for shared state. Use `team_*` MCP tools (or `mj.team.*` in Code Mode) for searches, deletes, relationships, analytics, and RBAC member/alias management. See `memory://help/team` for RBAC rules. Do NOT create bulk relationships between unrelated entries that happen to share tags.";
58
58
  /**
59
59
  * Help content keyed by group name.
60
- * 'gotchas' is the always-available help (memory://help).
60
+ * 'gotchas' is the always-available help (memory://help/gotchas).
61
61
  * Other keys are feature-specific help (memory://help/{key}).
62
62
  */
63
63
  export declare const HELP_CONTENT: ReadonlyMap<string, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../../src/constants/server-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAkBlD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;CAClB;AAoDD;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CACxC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,OAAO,EAAE,gBAAgB,EAAE,EAC3B,WAAW,CAAC,EAAE,mBAAmB,EACjC,aAAa,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,EAC9B,MAAM,CAAC,EAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,GACzC,MAAM,CAoCR;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CACxC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,OAAO,EAAE,gBAAgB,EAAE,EAC3B,WAAW,CAAC,EAAE,mBAAmB,EACjC,aAAa,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,EAC9B,MAAM,CAAC,EAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,GACzC,MAAM,CAGR;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,+tGAAoB,CAAA;AAEpD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAcnD,CAAA"}
1
+ {"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../../src/constants/server-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAkBlD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;CAClB;AAoDD;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CACxC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,OAAO,EAAE,gBAAgB,EAAE,EAC3B,WAAW,CAAC,EAAE,mBAAmB,EACjC,aAAa,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,EAC9B,MAAM,CAAC,EAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,GACzC,MAAM,CAoCR;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CACxC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,OAAO,EAAE,gBAAgB,EAAE,EAC3B,WAAW,CAAC,EAAE,mBAAmB,EACjC,aAAa,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,EAC9B,MAAM,CAAC,EAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,GACzC,MAAM,CAGR;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,45GAAoB,CAAA;AAEpD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAcnD,CAAA"}
@@ -1,5 +1,5 @@
1
- import type { JournalEntry, Tag, Relationship, EntryType, RelationshipType, ImportanceResult, EntryRevision, AnchorStatus, Anchor } from '../../types/index.js';
2
- import type { CreateEntryInput } from './schema.js';
1
+ import type { JournalEntry, Tag, Relationship, EntryType, RelationshipType, ImportanceResult, EntryRevision, AnchorStatus, Anchor, CreateEntryInput, CreateTeamEntryInput } from '../../types/index.js';
2
+ export type { CreateEntryInput, CreateTeamEntryInput };
3
3
  export type TeamRole = 'admin' | 'member' | 'viewer';
4
4
  export interface TeamMember {
5
5
  id: number;
@@ -124,7 +124,7 @@ export interface IDatabaseAdapter {
124
124
  sessionId?: string;
125
125
  targetWorkspaceId?: string;
126
126
  }): JournalEntry | null;
127
- deleteEntry(id: number, permanent?: boolean): boolean;
127
+ deleteEntry(id: number, permanent?: boolean, workspaceId?: string): boolean;
128
128
  getAnchorsByEntryId(entryId: number): Anchor[];
129
129
  updateAnchorStatus(id: number, status: AnchorStatus): void;
130
130
  addTeamMember(author: string, role: TeamRole, addedBy?: string, displayName?: string): TeamMember;
@@ -141,7 +141,7 @@ export interface IDatabaseAdapter {
141
141
  resolveAuthor(rawAuthor: string): string;
142
142
  resolveAuthors(rawAuthors: string[]): Map<string, string>;
143
143
  consolidateAuthors(canonicalAuthor: string): number;
144
- restoreEntry(id: number): boolean;
144
+ restoreEntry(id: number, workspaceId?: string): boolean;
145
145
  getDeletedEntries(options?: {
146
146
  limit?: number;
147
147
  offset?: number;
@@ -190,7 +190,7 @@ export interface IDatabaseAdapter {
190
190
  error: Error;
191
191
  }[];
192
192
  };
193
- deleteEntries(ids: number[], permanent?: boolean): {
193
+ deleteEntries(ids: number[], permanent?: boolean, workspaceId?: string): {
194
194
  deleted: number[];
195
195
  notFound: number[];
196
196
  errors: {
@@ -335,7 +335,7 @@ export interface IDatabaseAdapter {
335
335
  createdAt: string;
336
336
  data: Record<string, unknown>;
337
337
  }[];
338
- computeDigest(): Record<string, unknown>;
338
+ computeDigest(workspaceId?: string): Record<string, unknown>;
339
339
  pragma(command: string): void;
340
340
  getCrossProjectInsights(options: {
341
341
  startDate?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/database/core/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,YAAY,EACZ,GAAG,EACH,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,MAAM,EACT,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAEpD,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,QAAQ,CAAA;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAA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CAAC;gBAAC,QAAQ,EAAE,MAAM,CAAA;aAAE,EAAE,CAAA;SAClD,CAAA;KACJ,CAAA;IAED,oBAAoB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAAA;IAEvC,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC9F,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC/C"}
@@ -0,0 +1,161 @@
1
+ import type { JournalEntry, Tag, Relationship, RelationshipType, ToolHandlerConfig } from '../../types/index.js';
2
+ import type { IDatabaseAdapter, TeamMember, TeamRole, AuthorAlias } from '../core/interfaces.js';
3
+ import { NativeConnectionManager } from './native-connection.js';
4
+ import { AliasManager } from './aliases.js';
5
+ import { TagsManager } from './tags.js';
6
+ import { EntriesManager } from './entries/index.js';
7
+ import { RelationshipsManager } from './relationships.js';
8
+ import { BackupManager } from './backup.js';
9
+ import { MembersManager } from './members.js';
10
+ import { HealthOperations } from './health-operations.js';
11
+ import { LifecycleOperations } from './lifecycle-operations.js';
12
+ import { InsightsOperations } from './insights-operations.js';
13
+ import { VectorOperations } from './vector-operations.js';
14
+ /**
15
+ * Base delegate layer for SQLite DatabaseAdapter:
16
+ * Houses connection lifecycle, RBAC team members, author aliases, tags,
17
+ * relationships, backups, health, lifecycle, vector operations, and insights.
18
+ */
19
+ export declare class AdapterDelegates {
20
+ protected connection: NativeConnectionManager;
21
+ protected tagsMgr: TagsManager;
22
+ protected entriesMgr: EntriesManager;
23
+ protected relationshipsMgr: RelationshipsManager;
24
+ protected backupMgr: BackupManager;
25
+ protected membersMgr: MembersManager;
26
+ protected aliasMgr: AliasManager;
27
+ protected healthOps: HealthOperations;
28
+ protected lifecycleOps: LifecycleOperations;
29
+ protected insightsOps: InsightsOperations;
30
+ protected vectorOps: VectorOperations;
31
+ constructor(dbPath: string, config?: ToolHandlerConfig);
32
+ initialize(): Promise<void>;
33
+ applyTeamSchema(): void;
34
+ flushSave(): void;
35
+ close(): void;
36
+ pragma(command: string): void;
37
+ executeInTransaction<T>(cb: () => T): T;
38
+ addTeamMember(author: string, role: TeamRole, addedBy?: string, displayName?: string): TeamMember;
39
+ removeTeamMember(author: string): boolean;
40
+ updateTeamMemberRole(author: string, newRole: TeamRole): TeamMember | null;
41
+ getTeamMember(author: string): TeamMember | null;
42
+ listTeamMembers(): TeamMember[];
43
+ getTeamMemberCount(): number;
44
+ isTeamRbacActive(): boolean;
45
+ resolveTeamRole(author: string, defaultRole?: TeamRole | 'denied'): TeamRole | null;
46
+ addAuthorAlias(alias: string, canonicalAuthor: string, createdBy?: string): AuthorAlias;
47
+ removeAuthorAlias(alias: string): boolean;
48
+ listAuthorAliases(canonicalAuthor?: string): AuthorAlias[];
49
+ resolveAuthor(rawAuthor: string): string;
50
+ resolveAuthors(rawAuthors: string[]): Map<string, string>;
51
+ consolidateAuthors(canonicalAuthor: string): number;
52
+ getTagsForEntry(entryId: number): string[];
53
+ getTagsForEntries(entryIds: number[]): Map<number, string[]>;
54
+ listTags(): Tag[];
55
+ mergeTags(sourceTag: string, targetTag: string): {
56
+ entriesUpdated: number;
57
+ sourceDeleted: boolean;
58
+ };
59
+ linkEntries(fromEntryId: number, toEntryId: number, relationshipType: RelationshipType, description?: string): Relationship;
60
+ getRelationships(entryId: number): Relationship[];
61
+ getRelationshipsForEntries(entryIds: number[]): Map<number, Relationship[]>;
62
+ getRelationshipHubs(limit: number): {
63
+ entryId: number;
64
+ content: string;
65
+ totalLinks: number;
66
+ }[];
67
+ getOrphanCount(workspaceId?: string): number;
68
+ getBackupsDir(): string;
69
+ exportToFile(backupName?: string): Promise<{
70
+ filename: string;
71
+ path: string;
72
+ sizeBytes: number;
73
+ }>;
74
+ listBackups(): {
75
+ filename: string;
76
+ path: string;
77
+ sizeBytes: number;
78
+ createdAt: string;
79
+ }[];
80
+ deleteOldBackups(keepCount: number): {
81
+ deleted: string[];
82
+ kept: number;
83
+ };
84
+ restoreFromFile(filename: string, runtime?: unknown): Promise<{
85
+ restoredFrom: string;
86
+ previousEntryCount: number;
87
+ newEntryCount: number;
88
+ }>;
89
+ getHealthStatus(): ReturnType<IDatabaseAdapter['getHealthStatus']>;
90
+ getVectorMetadata(key: string): string | undefined;
91
+ setVectorMetadata(key: string, value: string): void;
92
+ createVecTable(dimensions: number): void;
93
+ dropVecTable(): void;
94
+ upsertVector(entryId: number, embedding: Float32Array): void;
95
+ upsertVectors(vectors: {
96
+ entryId: number;
97
+ embedding: Float32Array;
98
+ }[]): void;
99
+ searchVectors(embedding: Float32Array, limit: number): {
100
+ entry_id: number;
101
+ distance: number;
102
+ }[];
103
+ getVector(entryId: number): Float32Array | null;
104
+ deleteVector(entryId: number): void;
105
+ clearVectors(): void;
106
+ getVectorCount(): number;
107
+ cleanupStaleVectors(): number;
108
+ executeDataLifecycle(options: {
109
+ archiveOlderThanDays: number;
110
+ pruneOlderThanDays: number;
111
+ hardDeleteOlderThanDays: number;
112
+ importanceThreshold: number;
113
+ dryRun?: boolean;
114
+ excludeTags?: string[];
115
+ }): ReturnType<IDatabaseAdapter['executeDataLifecycle']>;
116
+ getWorkflowActionEntries(limit: number, workspaceId?: string): JournalEntry[];
117
+ getSignificantEntries(limit: number, projectNumber?: number, workspaceId?: string): JournalEntry[];
118
+ getRecentGraphRelationships(limit: number): {
119
+ from_entry_id: number;
120
+ to_entry_id: number;
121
+ relationship_type: string;
122
+ from_content: string;
123
+ to_content: string;
124
+ }[];
125
+ getAuthorStatistics(workspaceId?: string): {
126
+ author: string;
127
+ count: number;
128
+ }[];
129
+ getAuthorsForEntries(entryIds: number[]): Map<number, string | null>;
130
+ saveAnalyticsSnapshot(type: string, data: Record<string, unknown>): number;
131
+ getLatestAnalyticsSnapshot(type: string): {
132
+ id: number;
133
+ createdAt: string;
134
+ data: Record<string, unknown>;
135
+ } | null;
136
+ getAnalyticsSnapshots(type: string, limit?: number): {
137
+ id: number;
138
+ createdAt: string;
139
+ data: Record<string, unknown>;
140
+ }[];
141
+ computeDigest(workspaceId?: string): Record<string, unknown>;
142
+ getCrossProjectInsights(options: {
143
+ startDate?: string;
144
+ endDate?: string;
145
+ minEntries: number;
146
+ inactiveThresholdDays: number;
147
+ workspaceId?: string;
148
+ }): ReturnType<IDatabaseAdapter['getCrossProjectInsights']>;
149
+ visualizeRelationships(options: {
150
+ entryId?: number;
151
+ tags?: string[];
152
+ relationshipType?: string;
153
+ depth: number;
154
+ limit: number;
155
+ }): ReturnType<IDatabaseAdapter['visualizeRelationships']>;
156
+ getTeamCollaborationMatrix(options: {
157
+ period: string;
158
+ limit: number;
159
+ }): ReturnType<IDatabaseAdapter['getTeamCollaborationMatrix']>;
160
+ }
161
+ //# sourceMappingURL=adapter-delegates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter-delegates.d.ts","sourceRoot":"","sources":["../../../src/database/sqlite-adapter/adapter-delegates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,YAAY,EACZ,GAAG,EACH,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACpB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACR,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,WAAW,EACd,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,O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,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;KAChB,GAAG,UAAU,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IAI1D,0BAA0B,CAAC,OAAO,EAAE;QAChC,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,MAAM,CAAA;KAChB,GAAG,UAAU,CAAC,gBAAgB,CAAC,4BAA4B,CAAC,CAAC;CAGjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"backup.d.ts","sourceRoot":"","sources":["../../../src/database/sqlite-adapter/backup.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAKhE,qBAAa,aAAa;IACV,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,mBAAmB;IAEtC,YAAY,CACd,UAAU,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAgDjE,WAAW,IAAI;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE;IAuCzF,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;IAoCpF,eAAe,CACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC;QACP,YAAY,EAAE,MAAM,CAAA;QACpB,kBAAkB,EAAE,MAAM,CAAA;QAC1B,aAAa,EAAE,MAAM,CAAA;KACxB,CAAC;CAoUL"}
1
+ {"version":3,"file":"backup.d.ts","sourceRoot":"","sources":["../../../src/database/sqlite-adapter/backup.ts"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