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,7 +1,8 @@
1
- import { createServer, initializeDependencies, globalSubscriptionManager, VectorSearchManager } from './chunk-IYZWMAA4.js';
2
- import { VERSION, logAgentIssue, DatabaseAdapterFactory, DEFAULT_AUDIT_LOG_MAX_SIZE_BYTES, logger, callTool, runAutoPrune, AuditLogger, exportEntriesToMarkdown, importMarkdownEntries, convertFile, processImportBatch } from './chunk-2UIMA6JF.js';
1
+ import { createServer, initializeDependencies, VectorSearchManager } from './chunk-Y6MMKR2Z.js';
2
+ import { logAgentIssue, DatabaseAdapterFactory, DEFAULT_AUDIT_LOG_MAX_SIZE_BYTES, logger, callTool, globalSubscriptionManager, runAutoPrune, AuditLogger, exportEntriesToMarkdown, importMarkdownEntries, convertFile, processImportBatch } from './chunk-T7SROBBV.js';
3
+ import { VERSION } from './chunk-SGJU2DHU.js';
3
4
  import { ConfigurationError } from './chunk-E6IQP6PE.js';
4
- import { resolveProjectNumberFromPath, resolveWorkspaceId } from './chunk-AIWHVEOW.js';
5
+ import { resolveProjectNumberFromPath, resolveWorkspaceId } from './chunk-D2FY6XS5.js';
5
6
  import { Command } from 'commander';
6
7
  import { match, P } from 'ts-pattern';
7
8
  import { z, ZodError } from 'zod';
@@ -532,7 +533,7 @@ var ConfigResolver = class {
532
533
  if (isCliSource) {
533
534
  value = this.cliOptions[cliKey];
534
535
  source = "cli";
535
- } else if (envKey && process.env[envKey] !== void 0) {
536
+ } else if (envKey && process.env[envKey] !== void 0 && process.env[envKey] !== "") {
536
537
  value = process.env[envKey];
537
538
  source = "env";
538
539
  } else if (this.configFileOptions[cliKey] !== void 0) {
@@ -579,7 +580,7 @@ var ConfigResolver = class {
579
580
  */
580
581
  resolveInt(cliKey, envKey, min, max) {
581
582
  const val = this.resolve(cliKey, envKey);
582
- if (val === void 0 || val === null) {
583
+ if (val === void 0 || val === null || typeof val === "string" && val.trim() === "") {
583
584
  return void 0;
584
585
  }
585
586
  return this._parseNumeric(val, cliKey, min, max, false);
@@ -589,7 +590,7 @@ var ConfigResolver = class {
589
590
  */
590
591
  resolveNumber(cliKey, envKey, min, max) {
591
592
  const val = this.resolve(cliKey, envKey);
592
- if (val === void 0 || val === null) {
593
+ if (val === void 0 || val === null || typeof val === "string" && val.trim() === "") {
593
594
  return void 0;
594
595
  }
595
596
  return this._parseNumeric(val, cliKey, min, max, true);
@@ -599,7 +600,7 @@ var ConfigResolver = class {
599
600
  */
600
601
  resolveBool(cliKey, envKey) {
601
602
  const val = this.resolve(cliKey, envKey);
602
- if (val === void 0) return void 0;
603
+ if (val === void 0 || val === null || typeof val === "string" && val.trim() === "") return void 0;
603
604
  if (typeof val === "boolean") return val;
604
605
  if (typeof val === "string") return val.toLowerCase() === "true";
605
606
  return Boolean(val);
@@ -667,6 +668,10 @@ function buildServerOptions(resolver, _options, _command, configErrors) {
667
668
  if (metricsPort) {
668
669
  process.env["MJ_METRICS_PORT"] = metricsPort;
669
670
  }
671
+ const authScopes = catchConfig(() => resolver.resolve("authScopes", "MCP_AUTH_SCOPES"), void 0);
672
+ if (authScopes !== void 0 && authScopes.trim() !== "") {
673
+ process.env["MCP_AUTH_SCOPES"] = authScopes.trim();
674
+ }
670
675
  const auditLogPath = catchConfig(() => resolver.resolve("auditLog", "AUDIT_LOG_PATH"), void 0);
671
676
  const auditConfig = auditLogPath ? {
672
677
  enabled: true,
@@ -719,7 +724,7 @@ function buildServerOptions(resolver, _options, _command, configErrors) {
719
724
  allowPlaintextLoopbackOAuth: catchConfig(() => resolver.resolveBool("oauthAllowPlaintextLoopback", "OAUTH_ALLOW_PLAINTEXT_LOOPBACK") ?? false, false),
720
725
  trustProxy: catchConfig(() => resolver.resolveBool("trustProxy", "TRUST_PROXY") ?? false, false),
721
726
  publicOrigin: catchConfig(() => resolver.resolve("publicOrigin", "PUBLIC_ORIGIN"), void 0),
722
- codemodeInternalFullAccess: catchConfig(() => resolver.resolveBool("codemodeInternalFullAccess", "CODEMODE_INTERNAL_FULL_ACCESS") ?? true, true),
727
+ codemodeInternalFullAccess: catchConfig(() => resolver.resolveBool("codemodeInternalFullAccess", "CODEMODE_INTERNAL_FULL_ACCESS") ?? false, false),
723
728
  projectRegistry: catchConfig(() => {
724
729
  const raw = resolver.resolve("projectRegistry", "PROJECT_REGISTRY");
725
730
  if (raw === void 0 || raw === null || raw === "") return void 0;
@@ -804,7 +809,7 @@ function buildServerOptions(resolver, _options, _command, configErrors) {
804
809
  summaryCount: catchConfig(() => resolver.resolveInt("briefingSummaries", "BRIEFING_SUMMARY_COUNT") ?? 1, 1),
805
810
  includeTeam: catchConfig(() => resolver.resolveBool("briefingIncludeTeam", "BRIEFING_INCLUDE_TEAM") ?? false, false),
806
811
  issueCount: catchConfig(() => resolver.resolveInt("briefingIssues", "BRIEFING_ISSUE_COUNT") ?? 0, 0),
807
- prCount: catchConfig(() => resolver.resolveInt("briefingPrs", "BRIEFING_PR_COUNT") ?? 0, 0),
812
+ prCount: catchConfig(() => resolver.resolveInt("briefingPrCount") ?? resolver.resolveInt("briefingPrs", "BRIEFING_PR_COUNT") ?? 0, 0),
808
813
  prStatusBreakdown: catchConfig(() => resolver.resolveBool("briefingPrStatus", "BRIEFING_PR_STATUS") ?? false, false),
809
814
  milestoneCount: catchConfig(() => resolver.resolveInt("briefingMilestones", "BRIEFING_MILESTONE_COUNT") ?? 3, 3),
810
815
  rulesFilePath: catchConfig(() => {
@@ -832,8 +837,8 @@ function buildServerOptions(resolver, _options, _command, configErrors) {
832
837
  },
833
838
  auditConfig,
834
839
  autoPruneIntervalMinutes: catchConfig(() => resolver.resolveInt("autoPruneInterval", "AUTO_PRUNE_INTERVAL_MINUTES", 0) ?? 0, 0),
835
- archiveOlderThanDays: catchConfig(() => resolver.resolveNumber("archiveOlderThanDays", "ARCHIVE_OLDER_THAN_DAYS", 0), 14),
836
- pruneOlderThanDays: catchConfig(() => resolver.resolveNumber("pruneOlderThanDays", "PRUNE_OLDER_THAN_DAYS", 0), 30),
840
+ archiveOlderThanDays: catchConfig(() => resolver.resolveNumber("archiveOlderThanDays", "ARCHIVE_OLDER_THAN_DAYS", 0) ?? 0, 0),
841
+ pruneOlderThanDays: catchConfig(() => resolver.resolveNumber("pruneOlderThanDays", "PRUNE_OLDER_THAN_DAYS", 0) ?? 0, 0),
837
842
  hardDeleteOlderThanDays: catchConfig(() => resolver.resolveNumber("hardDeleteOlderThanDays", "HARD_DELETE_OLDER_THAN_DAYS", 0) ?? 0, 0),
838
843
  pruneImportanceThreshold: catchConfig(() => {
839
844
  const val = resolver.resolve("pruneImportanceThreshold", "PRUNE_IMPORTANCE_THRESHOLD");
@@ -1010,19 +1015,24 @@ var adminPruneOptionsSchema = pruningOptionsSchema.extend(coreOptionsSchema.shap
1010
1015
  pruneOlderThanDays: z.coerce.number().optional(),
1011
1016
  hardDeleteOlderThanDays: z.coerce.number().optional(),
1012
1017
  importanceThreshold: z.coerce.number().optional(),
1018
+ pruneImportanceThreshold: z.coerce.number().optional(),
1013
1019
  dryRun: z.boolean().optional(),
1014
1020
  excludeTags: z.string().optional()
1015
1021
  });
1016
1022
  var baseEntryOptionsSchema = z.object({
1017
1023
  file: z.string().optional(),
1024
+ contentFile: z.string().optional(),
1018
1025
  content: z.string().optional(),
1026
+ body: z.string().optional(),
1019
1027
  description: z.string().optional(),
1020
1028
  title: z.string().optional(),
1021
1029
  summary: z.string().optional(),
1022
1030
  type: z.string().optional(),
1023
1031
  category: z.string().optional(),
1024
1032
  tags: z.string().optional(),
1033
+ tag: z.string().optional(),
1025
1034
  project: safeCoerceNumber,
1035
+ projectNumber: safeCoerceNumber,
1026
1036
  project_number: safeCoerceNumber,
1027
1037
  trustScore: safeCoerceNumber,
1028
1038
  trust_score: safeCoerceNumber,
@@ -1069,7 +1079,7 @@ var ioImportMarkdownOptionsSchema = z.object({
1069
1079
  }).extend(coreOptionsSchema.shape).extend(databaseOptionsSchema.shape).extend(outputOptionsSchema.shape);
1070
1080
  var ioImportExternalOptionsSchema = z.object({
1071
1081
  dir: z.string().optional(),
1072
- format: z.enum(["notion", "obsidian"]).optional()
1082
+ format: z.enum(["notion", "obsidian", "logseq"]).optional()
1073
1083
  }).extend(coreOptionsSchema.shape).extend(databaseOptionsSchema.shape).extend(outputOptionsSchema.shape);
1074
1084
  var visualizeOptionsSchema = z.object({
1075
1085
  out: z.string().optional(),
@@ -1234,6 +1244,7 @@ async function execAction(scriptPath, options, command) {
1234
1244
  process.stderr.write("Execution failed: " + (error instanceof Error ? error.message : String(error)) + "\n");
1235
1245
  process.exit(1);
1236
1246
  } finally {
1247
+ configManager.close();
1237
1248
  if (runtime.auditLogger) await runtime.auditLogger.close();
1238
1249
  if (context.activeMetricsPath) await runtime.metrics.saveToFile(context.activeMetricsPath);
1239
1250
  db.close();
@@ -1326,13 +1337,14 @@ async function vacuumAction(options, command) {
1326
1337
  async function pruneAction(options, command) {
1327
1338
  const { db } = await getDb(options, command);
1328
1339
  try {
1340
+ const rawExcludeTags = options.excludeTags ?? options.pruneExcludeTags;
1329
1341
  const result = await runAutoPrune(db, {
1330
1342
  archiveOlderThanDays: options.archiveOlderThanDays ?? 0,
1331
1343
  pruneOlderThanDays: options.pruneOlderThanDays ?? 0,
1332
1344
  hardDeleteOlderThanDays: options.hardDeleteOlderThanDays ?? 0,
1333
- importanceThreshold: options.importanceThreshold ?? 0.15,
1334
- dryRun: options.dryRun === true,
1335
- excludeTags: options.excludeTags ? options.excludeTags.split(",") : []
1345
+ importanceThreshold: options.importanceThreshold ?? options.pruneImportanceThreshold ?? 0.15,
1346
+ dryRun: options.dryRun === true || options.pruneDryRun === true,
1347
+ excludeTags: rawExcludeTags ? rawExcludeTags.split(",") : []
1336
1348
  });
1337
1349
  if (options.json === true) {
1338
1350
  process.stdout.write(JSON.stringify(result) + "\n");
@@ -1360,9 +1372,9 @@ async function pruneAction(options, command) {
1360
1372
  async function auditAction(options, command) {
1361
1373
  const { db } = await getDb(options, command);
1362
1374
  try {
1363
- const auditLogPath = options.auditLog ?? process.env["MEMORY_JOURNAL_AUDIT_LOG"];
1375
+ const auditLogPath = options.auditLog ?? process.env["AUDIT_LOG_PATH"] ?? process.env["MEMORY_JOURNAL_AUDIT_LOG"];
1364
1376
  if (!auditLogPath) {
1365
- throw new Error("Audit log path not configured (--audit-log or MEMORY_JOURNAL_AUDIT_LOG)");
1377
+ throw new Error("Audit log path not configured (--audit-log or AUDIT_LOG_PATH)");
1366
1378
  }
1367
1379
  const logger2 = new AuditLogger({
1368
1380
  logPath: auditLogPath,
@@ -1402,8 +1414,6 @@ async function rebuildIndexAction(options, command) {
1402
1414
  db.close();
1403
1415
  }
1404
1416
  }
1405
- var createEntrySchema = createEntryOptionsSchema;
1406
- var updateEntrySchema = updateEntryOptionsSchema;
1407
1417
  async function getDb2(options, command) {
1408
1418
  let resolver;
1409
1419
  const configPath2 = options.config ?? process.env["MEMORY_JOURNAL_CONFIG"];
@@ -1423,7 +1433,9 @@ async function getDb2(options, command) {
1423
1433
  }
1424
1434
  const useTeamDb = options.team === true;
1425
1435
  if (useTeamDb && typeof serverOptions.teamDbPath !== "string") {
1426
- process.stderr.write("Error: Cannot use --team flag because no team database is configured.\n");
1436
+ process.stderr.write(
1437
+ "Error: Cannot use --team flag because no team database is configured.\n"
1438
+ );
1427
1439
  process.exit(1);
1428
1440
  }
1429
1441
  const dbPath = useTeamDb ? String(serverOptions.teamDbPath) : serverOptions.dbPath;
@@ -1444,7 +1456,9 @@ async function parseContent(options) {
1444
1456
  let stdinStr = "";
1445
1457
  const timeout = setTimeout(() => {
1446
1458
  if (stdinStr.length === 0) {
1447
- process.stderr.write("Error: Timed out waiting for stdin. You must provide --file or --content when running in a non-interactive shell.\n");
1459
+ process.stderr.write(
1460
+ "Error: Timed out waiting for stdin. You must provide --file or --content when running in a non-interactive shell.\n"
1461
+ );
1448
1462
  process.exit(1);
1449
1463
  }
1450
1464
  }, 3e3);
@@ -1483,7 +1497,9 @@ async function parseContent(options) {
1483
1497
  p.outro("Proceeding with entry creation...");
1484
1498
  return contentPrompt;
1485
1499
  }
1486
- process.stderr.write("Error: Must provide either --file, --content, pipe data to stdin, or run interactively\n");
1500
+ process.stderr.write(
1501
+ "Error: Must provide either --file, --content, pipe data to stdin, or run interactively\n"
1502
+ );
1487
1503
  process.exit(1);
1488
1504
  }
1489
1505
  function parseFrontmatter(rawContent) {
@@ -1522,8 +1538,10 @@ function parseRelationships(relationshipsStr, relFileStr) {
1522
1538
  try {
1523
1539
  str = readFileSync(relFileStr, "utf-8");
1524
1540
  } catch (e) {
1525
- process.stderr.write(`Warning: Failed to read --rel-file: ${e instanceof Error ? e.message : String(e)}
1526
- `);
1541
+ process.stderr.write(
1542
+ `Warning: Failed to read --rel-file: ${e instanceof Error ? e.message : String(e)}
1543
+ `
1544
+ );
1527
1545
  }
1528
1546
  }
1529
1547
  if (typeof str !== "string") return [];
@@ -1537,11 +1555,15 @@ function parseRelationships(relationshipsStr, relFileStr) {
1537
1555
  target_id: Number(rec["target_id"]),
1538
1556
  relation_type: String(rec["relation_type"])
1539
1557
  };
1540
- }).filter((r) => r !== null && !isNaN(r.target_id) && Boolean(r.relation_type));
1558
+ }).filter(
1559
+ (r) => r !== null && !isNaN(r.target_id) && Boolean(r.relation_type)
1560
+ );
1541
1561
  }
1542
1562
  } catch (e) {
1543
- process.stderr.write(`Warning: Failed to parse relationships JSON: ${e instanceof Error ? e.message : String(e)}
1544
- `);
1563
+ process.stderr.write(
1564
+ `Warning: Failed to parse relationships JSON: ${e instanceof Error ? e.message : String(e)}
1565
+ `
1566
+ );
1545
1567
  }
1546
1568
  return [];
1547
1569
  }
@@ -1554,8 +1576,10 @@ function parseMetadata(metadataFile) {
1554
1576
  return z.record(z.string(), z.unknown()).parse(parsed);
1555
1577
  }
1556
1578
  } catch (e) {
1557
- process.stderr.write(`Warning: Failed to parse --metadata JSON: ${e instanceof Error ? e.message : String(e)}
1558
- `);
1579
+ process.stderr.write(
1580
+ `Warning: Failed to parse --metadata JSON: ${e instanceof Error ? e.message : String(e)}
1581
+ `
1582
+ );
1559
1583
  }
1560
1584
  return {};
1561
1585
  }
@@ -1569,19 +1593,18 @@ function buildEntryPayload(options, metadata, config) {
1569
1593
  } else if (metadata["tags"] !== void 0 && metadata["tags"] !== null) {
1570
1594
  tags = Array.isArray(metadata["tags"]) ? metadata["tags"].map(String) : void 0;
1571
1595
  }
1572
- const projectRaw = options.project ?? options.project_number ?? metadata["project"] ?? metadata["projectNumber"] ?? metadata["project_number"];
1596
+ const projectRaw = options.project ?? options.projectNumber ?? options.project_number ?? metadata["project"] ?? metadata["projectNumber"] ?? metadata["project_number"];
1573
1597
  let projectNumber = projectRaw !== void 0 ? Number(projectRaw) : void 0;
1574
1598
  if (projectNumber === void 0 || isNaN(projectNumber)) {
1575
- const autoResolved = resolveProjectNumberFromPath(process.cwd());
1576
- if (autoResolved !== void 0) {
1577
- projectNumber = autoResolved;
1578
- } else {
1579
- projectNumber = void 0;
1580
- }
1599
+ projectNumber = resolveProjectNumberFromPath(process.cwd());
1581
1600
  }
1582
1601
  const optsRec = z.record(z.string(), z.unknown()).parse(options);
1583
1602
  const explicitWorkspaceId = optsRec["workspaceId"] ?? optsRec["workspace_id"] ?? metadata["workspaceId"] ?? metadata["workspace_id"];
1584
- const workspaceId = resolveWorkspaceId(explicitWorkspaceId, projectNumber, config);
1603
+ const workspaceId = resolveWorkspaceId(
1604
+ explicitWorkspaceId,
1605
+ projectNumber,
1606
+ config
1607
+ );
1585
1608
  const trustRaw = options.trustScore ?? options.trust_score ?? options.confidence ?? metadata["trust"] ?? metadata["trustScore"] ?? metadata["trust_score"] ?? metadata["confidence"];
1586
1609
  const trustScore = trustRaw !== void 0 ? Number(trustRaw) : void 0;
1587
1610
  const impactRaw = options.impactScore ?? options.impact_score ?? metadata["impact"] ?? metadata["impactScore"] ?? metadata["impact_score"];
@@ -1593,7 +1616,17 @@ function buildEntryPayload(options, metadata, config) {
1593
1616
  validationStatus = valStatusRaw ? "passed" : "failed";
1594
1617
  } else if (typeof valStatusRaw === "string") {
1595
1618
  const lower = valStatusRaw.trim().toLowerCase();
1596
- if (["passed", "pass", "success", "ok", "validated", "valid", "verified", "true", "1"].includes(lower)) {
1619
+ if ([
1620
+ "passed",
1621
+ "pass",
1622
+ "success",
1623
+ "ok",
1624
+ "validated",
1625
+ "valid",
1626
+ "verified",
1627
+ "true",
1628
+ "1"
1629
+ ].includes(lower)) {
1597
1630
  validationStatus = "passed";
1598
1631
  } else if (["failed", "fail", "error", "failing", "false", "0"].includes(lower)) {
1599
1632
  validationStatus = "failed";
@@ -1612,8 +1645,10 @@ function buildEntryPayload(options, metadata, config) {
1612
1645
  try {
1613
1646
  autoContextStr = readFileSync(autoContextFile, "utf-8");
1614
1647
  } catch (e) {
1615
- process.stderr.write(`Warning: Failed to read --auto-context-file: ${e instanceof Error ? e.message : String(e)}
1616
- `);
1648
+ process.stderr.write(
1649
+ `Warning: Failed to read --auto-context-file: ${e instanceof Error ? e.message : String(e)}
1650
+ `
1651
+ );
1617
1652
  }
1618
1653
  } else if (autoContextStr === void 0 && metadata["auto_context"] !== void 0 && metadata["auto_context"] !== null) {
1619
1654
  autoContextStr = typeof metadata["auto_context"] === "string" ? metadata["auto_context"] : JSON.stringify(metadata["auto_context"]);
@@ -1628,7 +1663,9 @@ function buildEntryPayload(options, metadata, config) {
1628
1663
  target_id: Number(rec?.["target_id"]),
1629
1664
  relation_type: String(rec?.["relation_type"])
1630
1665
  };
1631
- }).filter((r) => !isNaN(r.target_id) && Boolean(r.relation_type) && r.relation_type !== "undefined");
1666
+ }).filter(
1667
+ (r) => !isNaN(r.target_id) && Boolean(r.relation_type) && r.relation_type !== "undefined"
1668
+ );
1632
1669
  } else {
1633
1670
  relationships = parseRelationships(options.relationships, options.relFile);
1634
1671
  }
@@ -1650,27 +1687,66 @@ function buildEntryPayload(options, metadata, config) {
1650
1687
  relatedIds
1651
1688
  };
1652
1689
  }
1653
- async function createEntryAction(...args2) {
1654
- const command = args2[args2.length - 1];
1655
- const options = args2.length > 1 ? args2[args2.length - 2] : {};
1690
+
1691
+ // src/cli/commands/entry.ts
1692
+ var createEntrySchema = createEntryOptionsSchema;
1693
+ var updateEntrySchema = updateEntryOptionsSchema;
1694
+ function applyCliEntryFlagAliases(options, restArgs) {
1656
1695
  if (options.tag !== void 0 && options.tags === void 0) options.tags = options.tag;
1657
- if (options.contentFile !== void 0 && options.file === void 0) options.file = options.contentFile;
1696
+ if (options.contentFile !== void 0 && options.file === void 0) {
1697
+ options.file = options.contentFile;
1698
+ }
1658
1699
  if (options.body !== void 0 && options.content === void 0) options.content = options.body;
1659
- if (options.validation !== void 0 && options.validationStatus === void 0) options.validationStatus = options.validation;
1660
- if (options.validation_status !== void 0 && options.validationStatus === void 0) options.validationStatus = options.validation_status;
1661
- if (options.workspace !== void 0 && options.workspaceId === void 0) options.workspaceId = options.workspace;
1662
- if (options.summary !== void 0 && options.title === void 0) options.title = options.summary;
1663
- const restArgs = args2.slice(0, args2.length - 2);
1664
- let contentArg = void 0;
1665
- if (restArgs.length > 0 && typeof restArgs[0] === "string") {
1666
- contentArg = restArgs.map(String).join(" ");
1667
- }
1668
- if (contentArg !== void 0 && options.content === void 0) {
1669
- options.content = contentArg;
1700
+ if (options.validation !== void 0 && options.validationStatus === void 0) {
1701
+ options.validationStatus = options.validation;
1702
+ }
1703
+ if (options.validation_status !== void 0 && options.validationStatus === void 0) {
1704
+ options.validationStatus = options.validation_status;
1705
+ }
1706
+ if (options.workspace !== void 0 && options.workspaceId === void 0) {
1707
+ options.workspaceId = options.workspace;
1708
+ }
1709
+ if (options.summary !== void 0 && options.title === void 0) {
1710
+ options.title = options.summary;
1711
+ }
1712
+ if (restArgs.length > 0 && typeof restArgs[0] === "string" && options.content === void 0) {
1713
+ options.content = restArgs.map(String).join(" ");
1670
1714
  }
1671
1715
  if (options.description !== void 0 && options.content === void 0) {
1672
1716
  options.content = options.description;
1673
1717
  }
1718
+ }
1719
+ function handleCliEntryError(e, actionLabel) {
1720
+ if (e instanceof z.ZodError) {
1721
+ const issues = e.issues;
1722
+ if (issues.length > 0) {
1723
+ process.stderr.write(
1724
+ `Validation Error:
1725
+ ${issues.map((err) => `- ${err.path.join(".")}: ${err.message}`).join("\n")}
1726
+ `
1727
+ );
1728
+ } else {
1729
+ process.stderr.write(`Validation Error:
1730
+ ${e.message}
1731
+ `);
1732
+ }
1733
+ } else if (e instanceof Error && e.message.includes("FOREIGN KEY constraint failed")) {
1734
+ process.stderr.write(
1735
+ `\u{1F6E0}\uFE0F AUTONOMOUS HEALING: A FOREIGN KEY constraint failed. This usually means a target_id specified in relationships (or relatedIds) does not exist, or the project ID is invalid. Ensure you are passing a valid Entry ID (not a project ID) for relationships, and a valid project ID.
1736
+ `
1737
+ );
1738
+ } else {
1739
+ process.stderr.write(
1740
+ `Failed to ${actionLabel} entry: ${e instanceof Error ? e.message : String(e)}
1741
+ `
1742
+ );
1743
+ }
1744
+ process.exit(1);
1745
+ }
1746
+ async function createEntryAction(...args2) {
1747
+ const command = args2[args2.length - 1];
1748
+ const options = args2.length > 1 ? args2[args2.length - 2] : {};
1749
+ applyCliEntryFlagAliases(options, args2.slice(0, args2.length - 2));
1674
1750
  const { db, config } = await getDb2(options, command);
1675
1751
  try {
1676
1752
  const rawContent = await parseContent(options);
@@ -1685,7 +1761,7 @@ ${content}`;
1685
1761
  const metadata = { ...frontmatter, ...parseMetadata(options.metadata) };
1686
1762
  const payload = buildEntryPayload(options, metadata, config);
1687
1763
  let resolvedWs = payload.workspaceId;
1688
- if (resolvedWs === "default" && config?.defaultWorkspaceId !== "default") {
1764
+ if (resolvedWs === "default" && config.defaultWorkspaceId !== "default") {
1689
1765
  const optsRec = z.record(z.string(), z.unknown()).parse(options);
1690
1766
  const explicitWs = optsRec["workspaceId"] ?? optsRec["workspace_id"] ?? metadata["workspaceId"] ?? metadata["workspace_id"];
1691
1767
  if (explicitWs !== "default") {
@@ -1693,8 +1769,13 @@ ${content}`;
1693
1769
  }
1694
1770
  }
1695
1771
  z.object({
1696
- workspace_id: z.string().min(1, "workspace_id (repository name) is required. It could not be auto-resolved from project_number or current directory."),
1697
- project_number: z.number({ message: "project_number is required. Entries must be assigned to a valid project." })
1772
+ workspace_id: z.string().min(
1773
+ 1,
1774
+ "workspace_id (repository name) is required. It could not be auto-resolved from project_number or current directory."
1775
+ ),
1776
+ project_number: z.number({
1777
+ message: "project_number is required. Entries must be assigned to a valid project."
1778
+ })
1698
1779
  }).parse({ workspace_id: resolvedWs, project_number: payload.projectNumber });
1699
1780
  const entryInput = {
1700
1781
  content,
@@ -1717,30 +1798,15 @@ ${content}`;
1717
1798
  }
1718
1799
  db.flushSave();
1719
1800
  if (options.json === true) {
1720
- process.stdout.write(JSON.stringify({ status: "success", id: newEntry.id, version: newEntry.version }) + "\n");
1801
+ process.stdout.write(
1802
+ JSON.stringify({ status: "success", id: newEntry.id, version: newEntry.version }) + "\n"
1803
+ );
1721
1804
  } else {
1722
1805
  process.stderr.write(`Successfully created entry #${newEntry.id}
1723
1806
  `);
1724
1807
  }
1725
1808
  } catch (e) {
1726
- if (e instanceof z.ZodError) {
1727
- const issues = e.issues;
1728
- if (issues.length > 0) {
1729
- process.stderr.write(`Validation Error:
1730
- ${issues.map((err) => `- ${err.path.join(".")}: ${err.message}`).join("\n")}
1731
- `);
1732
- } else {
1733
- process.stderr.write(`Validation Error:
1734
- ${e.message}
1735
- `);
1736
- }
1737
- } else if (e instanceof Error && e.message.includes("FOREIGN KEY constraint failed")) {
1738
- process.stderr.write(`\u{1F6E0}\uFE0F AUTONOMOUS HEALING: A FOREIGN KEY constraint failed. This usually means a target_id specified in relationships (or relatedIds) does not exist, or the project ID is invalid. Ensure you are passing a valid Entry ID (not a project ID) for relationships, and a valid project ID.
1739
- `);
1740
- } else {
1741
- process.stderr.write("Failed to create entry: " + (e instanceof Error ? e.message : String(e)) + "\n");
1742
- }
1743
- process.exit(1);
1809
+ handleCliEntryError(e, "create");
1744
1810
  } finally {
1745
1811
  db.close();
1746
1812
  }
@@ -1748,23 +1814,7 @@ ${e.message}
1748
1814
  async function updateEntryAction(...args2) {
1749
1815
  const command = args2[args2.length - 1];
1750
1816
  const options = args2.length > 1 ? args2[args2.length - 2] : {};
1751
- if (options.tag !== void 0 && options.tags === void 0) options.tags = options.tag;
1752
- if (options.contentFile !== void 0 && options.file === void 0) options.file = options.contentFile;
1753
- if (options.body !== void 0 && options.content === void 0) options.content = options.body;
1754
- if (options.validation !== void 0 && options.validationStatus === void 0) options.validationStatus = options.validation;
1755
- if (options.validation_status !== void 0 && options.validationStatus === void 0) options.validationStatus = options.validation_status;
1756
- if (options.workspace !== void 0 && options.workspaceId === void 0) options.workspaceId = options.workspace;
1757
- const restArgs = args2.slice(0, args2.length - 2);
1758
- let contentArg = void 0;
1759
- if (restArgs.length > 0 && typeof restArgs[0] === "string") {
1760
- contentArg = restArgs.map(String).join(" ");
1761
- }
1762
- if (contentArg !== void 0 && options.content === void 0) {
1763
- options.content = contentArg;
1764
- }
1765
- if (options.description !== void 0 && options.content === void 0) {
1766
- options.content = options.description;
1767
- }
1817
+ applyCliEntryFlagAliases(options, args2.slice(0, args2.length - 2));
1768
1818
  const { db, config } = await getDb2(options, command);
1769
1819
  try {
1770
1820
  const entryId = options.id;
@@ -1774,7 +1824,9 @@ async function updateEntryAction(...args2) {
1774
1824
  }
1775
1825
  const version = options.expectedVersion;
1776
1826
  if (version === void 0 || isNaN(version)) {
1777
- process.stderr.write("Error: Must provide a valid --expected-version (expected version) to prevent concurrent overwrites\n");
1827
+ process.stderr.write(
1828
+ "Error: Must provide a valid --expected-version (expected version) to prevent concurrent overwrites\n"
1829
+ );
1778
1830
  process.exit(1);
1779
1831
  }
1780
1832
  const rawContent = await parseContent(options);
@@ -1788,14 +1840,19 @@ ${content}`;
1788
1840
  }
1789
1841
  const metadata = { ...frontmatter, ...parseMetadata(options.metadata) };
1790
1842
  const payload = buildEntryPayload(options, metadata, config);
1791
- const updates = { content, expectedVersion: version };
1843
+ const updates = {
1844
+ content,
1845
+ expectedVersion: version
1846
+ };
1792
1847
  if (payload.entryType !== void 0) updates.entryType = payload.entryType;
1793
1848
  if (payload.tags !== void 0) updates.tags = payload.tags;
1794
1849
  if (payload.projectNumber !== void 0) updates.projectNumber = payload.projectNumber;
1795
1850
  if (payload.workspaceId !== void 0) updates.workspaceId = payload.workspaceId;
1796
1851
  if (payload.trustScore !== void 0) updates.trustScore = payload.trustScore;
1797
1852
  if (payload.impactScore !== void 0) updates.impactScore = payload.impactScore;
1798
- if (payload.validationStatus !== void 0) updates.validationStatus = payload.validationStatus;
1853
+ if (payload.validationStatus !== void 0) {
1854
+ updates.validationStatus = payload.validationStatus;
1855
+ }
1799
1856
  if (payload.sessionId !== void 0) updates.sessionId = payload.sessionId;
1800
1857
  if (payload.autoContextStr !== void 0) updates.autoContext = payload.autoContextStr;
1801
1858
  const result = db.updateEntry(entryId, updates);
@@ -1812,30 +1869,17 @@ ${content}`;
1812
1869
  }
1813
1870
  db.flushSave();
1814
1871
  if (options.json === true) {
1815
- process.stdout.write(JSON.stringify({ status: "success", id: result.id, version: result.version }) + "\n");
1872
+ process.stdout.write(
1873
+ JSON.stringify({ status: "success", id: result.id, version: result.version }) + "\n"
1874
+ );
1816
1875
  } else {
1817
- process.stderr.write(`Successfully updated entry #${result.id} to version ${result.version}
1818
- `);
1876
+ process.stderr.write(
1877
+ `Successfully updated entry #${result.id} to version ${result.version}
1878
+ `
1879
+ );
1819
1880
  }
1820
1881
  } catch (e) {
1821
- if (e instanceof z.ZodError) {
1822
- const issues = e.issues;
1823
- if (issues.length > 0) {
1824
- process.stderr.write(`Validation Error:
1825
- ${issues.map((err) => `- ${err.path.join(".")}: ${err.message}`).join("\n")}
1826
- `);
1827
- } else {
1828
- process.stderr.write(`Validation Error:
1829
- ${e.message}
1830
- `);
1831
- }
1832
- } else if (e instanceof Error && e.message.includes("FOREIGN KEY constraint failed")) {
1833
- process.stderr.write(`\u{1F6E0}\uFE0F AUTONOMOUS HEALING: A FOREIGN KEY constraint failed. This usually means a target_id specified in relationships (or relatedIds) does not exist, or the project ID is invalid. Ensure you are passing a valid Entry ID (not a project ID) for relationships, and a valid project ID.
1834
- `);
1835
- } else {
1836
- process.stderr.write("Failed to update entry: " + (e instanceof Error ? e.message : String(e)) + "\n");
1837
- }
1838
- process.exit(1);
1882
+ handleCliEntryError(e, "update");
1839
1883
  } finally {
1840
1884
  db.close();
1841
1885
  }
@@ -1927,21 +1971,55 @@ async function visualizeAction(options, command) {
1927
1971
  depth: 3,
1928
1972
  limit: 200
1929
1973
  });
1974
+ const MERMAID_CONTENT_PREVIEW_LENGTH = 40;
1930
1975
  const mermaidLines = ["```mermaid", "graph TD"];
1931
- for (const node of graph.nodes) {
1932
- const safeLabel = node.label.replace(/"/g, "'").substring(0, 50);
1933
- mermaidLines.push(` E${node.id}["#${node.id}: ${safeLabel}"]`);
1934
- }
1935
- mermaidLines.push("");
1936
- for (const edge of graph.edges) {
1937
- mermaidLines.push(` E${edge.from} -->|${edge.label}| E${edge.to}`);
1938
- }
1939
- mermaidLines.push("");
1940
- for (const node of graph.nodes) {
1941
- if (node.group === "target") {
1942
- mermaidLines.push(` style E${node.id} fill:#E3F2FD`);
1943
- } else {
1944
- mermaidLines.push(` style E${node.id} fill:#FFF3E0`);
1976
+ if (graph.nodes.length === 0) {
1977
+ mermaidLines.push(
1978
+ ' NoData["No entries found with relationships matching your criteria"]'
1979
+ );
1980
+ } else {
1981
+ for (const node of graph.nodes) {
1982
+ const rawContent = typeof node.metadata?.["content"] === "string" ? node.metadata["content"] : "";
1983
+ if (rawContent !== "") {
1984
+ let contentPreview = rawContent.slice(0, MERMAID_CONTENT_PREVIEW_LENGTH).replace(/\n/g, " ");
1985
+ if (rawContent.length > MERMAID_CONTENT_PREVIEW_LENGTH) {
1986
+ contentPreview += "...";
1987
+ }
1988
+ contentPreview = contentPreview.replace(/"/g, "'").replace(/\[/g, "(").replace(/\]/g, ")");
1989
+ const entryTypeShort = node.group.slice(0, 20);
1990
+ mermaidLines.push(
1991
+ ` E${String(node.id)}["#${String(node.id)}: ${contentPreview}<br/>${entryTypeShort}"]`
1992
+ );
1993
+ } else {
1994
+ const safeLabel = node.label.replace(/"/g, "'").substring(0, 50);
1995
+ mermaidLines.push(` E${String(node.id)}["#${String(node.id)}: ${safeLabel}"]`);
1996
+ }
1997
+ }
1998
+ mermaidLines.push("");
1999
+ const relSymbols = {
2000
+ references: "-->",
2001
+ implements: "==>",
2002
+ clarifies: "-.->",
2003
+ evolves_from: "-->",
2004
+ response_to: "<-->",
2005
+ blocked_by: "--x",
2006
+ resolved: "==>",
2007
+ caused: "-.->"
2008
+ };
2009
+ for (const edge of graph.edges) {
2010
+ const arrow = relSymbols[edge.type] ?? "-->";
2011
+ mermaidLines.push(
2012
+ ` E${String(edge.from)} ${arrow}|${edge.type}| E${String(edge.to)}`
2013
+ );
2014
+ }
2015
+ mermaidLines.push("");
2016
+ for (const node of graph.nodes) {
2017
+ const isPersonal = node.metadata !== void 0 && "is_personal" in node.metadata ? Boolean(node.metadata["is_personal"]) : node.group === "target";
2018
+ if (isPersonal) {
2019
+ mermaidLines.push(` style E${String(node.id)} fill:#E3F2FD`);
2020
+ } else {
2021
+ mermaidLines.push(` style E${String(node.id)} fill:#FFF3E0`);
2022
+ }
1945
2023
  }
1946
2024
  }
1947
2025
  mermaidLines.push("```");
@@ -2330,7 +2408,7 @@ addAgentInstructions(
2330
2408
  \u{1F916} AI AGENT INSTRUCTIONS:
2331
2409
  - This is an agent-native CLI.
2332
2410
  - ALWAYS use valid JSON strings for JSON arguments (e.g. \`--rel '[{"target_id":1,"relation_type":"relates_to"}]'\`).
2333
- - If you forget project details, DO NOT hallucinate. Query \`memory://agent-context/{repo}\`.
2411
+ - If you forget project details, DO NOT hallucinate. Query \`memory://agent-context/{+repo}\`.
2334
2412
  - \u{1F6E0}\uFE0F AUTONOMOUS HEALING: DO NOT attempt to run \`node .../build/index.js\`. ALWAYS use the global \`memory-journal-mcp\` wrapper or \`bun src/cli/index.ts\`.`
2335
2413
  );
2336
2414
  var projectCmd = program.command("project").description("Manage projects in the memory-journal-mcp global registry");
@@ -2461,7 +2539,7 @@ addAgentInstructions(
2461
2539
  createEntryCmd.action(withValidation(createEntrySchema, createEntryAction));
2462
2540
  var updateEntryCmd = entryCmd.command("update [content]").description("Update an existing journal entry");
2463
2541
  withGroup(updateEntryCmd, "Command Options", (cmd) => {
2464
- cmd.option("--id <number>", "ID of the entry to update").option("--expected-version <number>", "Expected version of the entry (for concurrent modification safety)").option("-f, --file <path>", "Load new markdown content from a file").option("--content-file <file>", "Alias for --file (Auto-healing agent hallucination)").option("-c, --content <string>", "Raw new markdown content string").option("--body <string>", "Alias for --content (Auto-healing agent hallucination)").option("-d, --description <string>", "Alias for --content (Auto-healing agent hallucination)").option("--title <title>", "Optional title (will be prepended as an H1 to content if provided, for agent compatibility)").option("-t, --type <type>", "Entry type (e.g., retrospective, personal_reflection)").option("--category <type>", "Entry type (alias)").option("--tags <tags>", "Comma-separated tags (e.g., session-summary)").option("--tag <tags>", "Alias for --tags (Auto-healing agent hallucination)").option("--project, --project-number <number>", "Project number").option("--project_number <number>", "Project number (alias)").option("--trust, --trust-score <number>", "Trust score (0.0 to 1.0)").option("--trust_score <number>", "Trust score (0.0 to 1.0) (alias)").option("--impact, --impact-score <number>", "Impact score (0.0 to 1.0)").option("--impact_score <number>", "Impact score (0.0 to 1.0) (alias)").option("--validation-status <status>", "Validation status (passed|none|failed)").option("--validation_status <status>", "Validation status (passed|none|failed) (alias)").option("--validation <status>", "Validation status (passed|none|failed) (alias)").option("--session, --session-id <id>", "Session ID").option("--session_id <id>", "Session ID (alias)").option("--related-to <ids>", "Comma-separated entry IDs to relate to").option("--rel, --relationships <json>", "JSON string of relationships").option("--rel-file <path>", "Load relationships JSON from a file").option("--auto-context <json>", "JSON string for auto context").option("--auto-context-file <path>", "Load auto context JSON from a file").option("--metadata <path>", "Load unified metadata JSON from a file (overrides individual flags)").option("--team", "Route to team database");
2542
+ cmd.option("--id <number>", "ID of the entry to update").option("--expected-version <number>", "Expected version of the entry (for concurrent modification safety)").option("-f, --file <path>", "Load new markdown content from a file").option("--content-file <file>", "Alias for --file (Auto-healing agent hallucination)").option("-c, --content <string>", "Raw new markdown content string").option("--body <string>", "Alias for --content (Auto-healing agent hallucination)").option("-d, --description <string>", "Alias for --content (Auto-healing agent hallucination)").option("--title <title>", "Optional title (will be prepended as an H1 to content if provided, for agent compatibility)").option("-t, --type <type>", "Entry type (e.g., retrospective, personal_reflection)").option("--category <type>", "Entry type (alias)").option("--tags <tags>", "Comma-separated tags (e.g., session-summary)").option("--tag <tags>", "Alias for --tags (Auto-healing agent hallucination)").option("-p, --project <number>", "Project number (alias)").option("--project-number <number>", "Project number").option("--project_number <number>", "Project number (alias)").option("--trust, --trust-score <number>", "Trust score (0.0 to 1.0)").option("--trust_score <number>", "Trust score (0.0 to 1.0) (alias)").option("--impact, --impact-score <number>", "Impact score (0.0 to 1.0)").option("--impact_score <number>", "Impact score (0.0 to 1.0) (alias)").option("--validation-status <status>", "Validation status (passed|none|failed)").option("--validation_status <status>", "Validation status (passed|none|failed) (alias)").option("--validation <status>", "Validation status (passed|none|failed) (alias)").option("--session, --session-id <id>", "Session ID").option("--session_id <id>", "Session ID (alias)").option("--related-to <ids>", "Comma-separated entry IDs to relate to").option("--rel, --relationships <json>", "JSON string of relationships").option("--rel-file <path>", "Load relationships JSON from a file").option("--auto-context <json>", "JSON string for auto context").option("--auto-context-file <path>", "Load auto context JSON from a file").option("--metadata <path>", "Load unified metadata JSON from a file (overrides individual flags)").option("--team", "Route to team database");
2465
2543
  });
2466
2544
  addOutputOptions(updateEntryCmd);
2467
2545
  addCoreOptions(updateEntryCmd);
@@ -2476,13 +2554,13 @@ addAgentInstructions(
2476
2554
  );
2477
2555
  updateEntryCmd.action(withValidation(updateEntrySchema, updateEntryAction));
2478
2556
  entryCmd.command("delete [args...]", { hidden: true }).allowUnknownOption().action(() => {
2479
- process.stderr.write(`\u{1F6E0}\uFE0F AUTONOMOUS HEALING: The 'entry delete' command does not exist in the CLI. Deleting entries is an admin-level operation. Please use the MCP tool 'mj_execute_code' with 'db.admin.batchDeleteEntries({ entry_ids: [...] })' instead.
2557
+ process.stderr.write(`\u{1F6E0}\uFE0F AUTONOMOUS HEALING: The 'entry delete' command does not exist in the CLI. Deleting entries is an admin-level operation. Please use the MCP tool 'mj_execute_code' with 'mj.admin.batchDeleteEntries({ entry_ids: [...] })' instead.
2480
2558
  `);
2481
2559
  process.exit(1);
2482
2560
  });
2483
2561
  var searchCmd = program.command("search [query]").description("Search journal entries");
2484
2562
  withGroup(searchCmd, "Command Options", (cmd) => {
2485
- cmd.option("--query, -q <string>", "Search query (alias for positional argument)").option("--term <string>", "Search query (alias)").option("--keyword <string>", "Search query (alias)").option("--mode <mode>", "Search mode: auto, fts, semantic, hybrid", "auto").option("--limit <number>", "Maximum number of results to return", "50").option("--team", "Search team database");
2563
+ cmd.option("-q, --query <string>", "Search query (alias for positional argument)").option("--term <string>", "Search query (alias)").option("--keyword <string>", "Search query (alias)").option("--mode <mode>", "Search mode: auto, fts, semantic, hybrid", "auto").option("--limit <number>", "Maximum number of results to return", "50").option("--team", "Search team database");
2486
2564
  });
2487
2565
  addOutputOptions(searchCmd);
2488
2566
  addCoreOptions(searchCmd);
@@ -2521,7 +2599,7 @@ addOutputOptions(importMarkdownCmd);
2521
2599
  importMarkdownCmd.action(withValidation(importMarkdownSchema, importMarkdownAction));
2522
2600
  var importExternalCmd = ioCmd.command("import-external").description("Import entries from external knowledge bases");
2523
2601
  withGroup(importExternalCmd, "Command Options", (cmd) => {
2524
- cmd.option("--dir <path>", "Source directory (required)").option("--format <format>", "External format: notion or obsidian (required)");
2602
+ cmd.option("--dir <path>", "Source directory (required)").option("--format <format>", "External format: notion, obsidian, or logseq (required)");
2525
2603
  });
2526
2604
  addCoreOptions(importExternalCmd);
2527
2605
  addDatabaseOptions(importExternalCmd);