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
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Shared parameter normalization utilities, alias maps, and content healers.
3
+ */
4
+ export declare function isRecord(val: unknown): val is Record<string, unknown>;
5
+ export declare function safeString(val: unknown): string;
6
+ /**
7
+ * Known parameter alias map for common agent hallucinations.
8
+ * Maps hallucinated parameter names to their canonical equivalents.
9
+ * Only applied when the canonical name is not already present.
10
+ */
11
+ export declare const PARAM_ALIASES: Record<string, string>;
12
+ /**
13
+ * Common hallucinated entry types -> canonical types
14
+ */
15
+ export declare const ENTRY_TYPE_ALIASES: Record<string, string>;
16
+ /**
17
+ * Common hallucinated tags -> canonical tags
18
+ */
19
+ export declare const TAG_ALIASES: Record<string, string>;
20
+ /**
21
+ * Heal mangled, duplicate, or missing section headers in session summary content.
22
+ */
23
+ export declare function healSessionSummaryContent(content: string, options?: {
24
+ normalizeSynonyms?: boolean;
25
+ usePeriodOnNone?: boolean;
26
+ }): string;
27
+ /**
28
+ * Heal auto_context 'commits' hallucination (e.g. passing a string instead of an array, or using 'commit_shas').
29
+ */
30
+ export declare function healAutoContext(result: Record<string, unknown>): void;
31
+ //# sourceMappingURL=shared-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-utils.d.ts","sourceRoot":"","sources":["../../../src/codemode/normalizers/shared-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAErE;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAW/C;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA8ChD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsBrD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQ9C,CAAA;AAUD;;GAEG;AACH,wBAAgB,yBAAyB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GACrE,MAAM,CAyCR;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAuCrE"}
@@ -1,4 +1,8 @@
1
- export declare function isRecord(val: unknown): val is Record<string, unknown>;
1
+ /**
2
+ * Parameter normalization and hallucination interception pipeline for Code Mode & MCP tools.
3
+ */
4
+ import { isRecord } from './normalizers/shared-utils.js';
5
+ export { isRecord };
2
6
  export declare function applyArgInterceptions(methodName: string, args: unknown[]): {
3
7
  args: unknown[];
4
8
  } | {
@@ -1 +1 @@
1
- {"version":3,"file":"param-normalizer.d.ts","sourceRoot":"","sources":["../../src/codemode/param-normalizer.ts"],"names":[],"mappings":"AAGA,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAErE;AAeD,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG;IAAE,IAAI,EAAE,OAAO,EAAE,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAojDnI"}
1
+ {"version":3,"file":"param-normalizer.d.ts","sourceRoot":"","sources":["../../src/codemode/param-normalizer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAKxD,OAAO,EAAE,QAAQ,EAAE,CAAA;AAEnB,wBAAgB,qBAAqB,CACjC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,OAAO,EAAE,GAChB;IAAE,IAAI,EAAE,OAAO,EAAE,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAmB1D"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Worker API Proxy Helpers — promise wrappers, introspection attachers,
3
+ * and hallucination interceptors for `mj.*` API proxies.
4
+ */
5
+ /**
6
+ * Wraps a tool call Promise with a Proxy that gives actionable Autonomous Healing
7
+ * errors when an agent forgets `await` and accesses properties or iterates directly.
8
+ */
9
+ export declare function wrapPromise(promise: Promise<unknown>, methodName: string): Promise<unknown>;
10
+ /**
11
+ * Attaches `.schema()`, `.help()`, and `.describe()` introspection methods to a tool function.
12
+ */
13
+ export declare function attachMethodIntrospection(targetFn: (...args: unknown[]) => unknown, group: string, methodName: string, getSchema: () => string, customDescription?: string): void;
14
+ /**
15
+ * Interceptor for `getConfig()` hallucination.
16
+ */
17
+ export declare function createGetConfigInterceptor(): () => Promise<unknown>;
18
+ /**
19
+ * Interceptor for `getBriefing()` hallucination.
20
+ */
21
+ export declare function createGetBriefingInterceptor(): () => Promise<unknown>;
22
+ /**
23
+ * Interceptor for `readResource()` hallucination with URI-aware suggestions.
24
+ */
25
+ export declare function createReadResourceInterceptor(): (uri?: string) => Promise<unknown>;
26
+ /**
27
+ * Creates a factory function proxy (e.g. `mj.getInstance()`, `new mj.getClient()`) that returns `api`.
28
+ */
29
+ export declare function createFactoryFnProxy(api: Record<string, unknown>): object;
30
+ /**
31
+ * Creates a rejection proxy when an unknown top-level group or property is accessed on `mj`.
32
+ */
33
+ export declare function createUnknownGroupRejectionProxy(prop: string, reason: string): object;
34
+ //# sourceMappingURL=proxy-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy-helpers.d.ts","sourceRoot":"","sources":["../../src/codemode/proxy-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAwB3F;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACrC,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EACzC,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,MAAM,EACvB,iBAAiB,CAAC,EAAE,MAAM,GAC3B,IAAI,CAWN;AAED;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,OAAO,CAAC,OAAO,CAAC,CAcnE;AAED;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,OAAO,CAAC,OAAO,CAAC,CAcrE;AAWD;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAoBlF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAiBzE;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAiCrF"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Worker API Proxy Namespaces — virtual namespace builders (`schema`, `projects`,
3
+ * `tags`, `system`, `context`) attached to `mj.*`.
4
+ */
5
+ export type InvokeRpcFn = (group: string, method: string, args: unknown[]) => Promise<unknown>;
6
+ export type SafeRpcCallFn = (group: string, method: string, args: unknown[]) => Promise<unknown>;
7
+ /**
8
+ * Builds the `mj.schema` virtual namespace proxy.
9
+ */
10
+ export declare function createSchemaProxy(safeRpcCall: SafeRpcCallFn): object;
11
+ /**
12
+ * Builds the `mj.projects` / `mj.project` virtual namespace proxy.
13
+ */
14
+ export declare function createProjectsProxy(methods: Record<string, string[]>, invokeRpc: InvokeRpcFn): object;
15
+ /**
16
+ * Builds the `mj.tags` / `mj.tag` virtual namespace proxy.
17
+ */
18
+ export declare function createTagsProxy(methods: Record<string, string[]>, invokeRpc: InvokeRpcFn): object;
19
+ /**
20
+ * Builds the `mj.system` / `mj.adapters` virtual namespace proxy.
21
+ */
22
+ export declare function createSystemProxy(methods: Record<string, string[]>, invokeRpc: InvokeRpcFn): object;
23
+ /**
24
+ * Builds the `mj.context` virtual namespace proxy and `getContext` RPC helper.
25
+ */
26
+ export declare function createContextNamespaceProxy(contextObj?: Record<string, unknown>): {
27
+ contextProxy: object;
28
+ getContextRpc: (keyOrObj?: unknown) => Promise<unknown>;
29
+ };
30
+ //# sourceMappingURL=proxy-namespaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy-namespaces.d.ts","sourceRoot":"","sources":["../../src/codemode/proxy-namespaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;AAC9F,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;AAahG;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,aAAa,GAAG,MAAM,CA2CpE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACjC,SAAS,EAAE,WAAW,GACvB,MAAM,CA6ER;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACjC,SAAS,EAAE,WAAW,GACvB,MAAM,CAiCR;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACjC,SAAS,EAAE,WAAW,GACvB,MAAM,CA4BR;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC/E,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CAC1D,CAiDA"}
@@ -6,6 +6,17 @@
6
6
  * and result size caps.
7
7
  */
8
8
  import { type SecurityConfig, type ValidationResult } from './types.js';
9
+ /**
10
+ * Single-pass lexical scanner that strips JS comments and string literal contents
11
+ * in a single left-to-right pass while preserving:
12
+ * 1. `${...}` template literal interpolation expressions (so blocked patterns inside
13
+ * `${...}` cannot evade static scanning)
14
+ * 2. String literals whose exact content is `constructor`, `__proto__`, or `prototype`
15
+ * (so bracket-notation access checks like `['constructor']` remain detectable)
16
+ * 3. Comment markers inside string literals (preventing `"/*"` ... `"*" + "/"` or `"//"`
17
+ * comment-stripping desynchronization bypasses)
18
+ */
19
+ export declare function stripCommentsAndStrings(rawCode: string): string;
9
20
  /**
10
21
  * Validates user-submitted code against security policies before execution.
11
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/codemode/security.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA2B,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAgBhG;;GAEG;AACH,qBAAa,uBAAuB;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoC;IAC/D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgB;gBAEpC,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;IAO5C;;OAEG;IACH,OAAO,IAAI,IAAI;IAQf;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB;IAmD5C;;;OAGG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAqBzC;;;OAGG;IACH,iBAAiB,IAAI,IAAI;IAazB;;OAEG;IACH,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,gBAAgB;IAqErD,6CAA6C;IAC7C,SAAS,IAAI,QAAQ,CAAC,cAAc,CAAC;CAGxC"}
1
+ {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/codemode/security.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA2B,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAShG;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA4K/D;AAWD;;GAEG;AACH,qBAAa,uBAAuB;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoC;IAC/D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAgB;gBAEpC,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;IAO5C;;OAEG;IACH,OAAO,IAAI,IAAI;IAQf;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB;IA0C5C;;;OAGG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAqBzC;;;OAGG;IACH,iBAAiB,IAAI,IAAI;IAazB;;OAEG;IACH,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,gBAAgB;IAqErD,6CAA6C;IAC7C,SAAS,IAAI,QAAQ,CAAC,cAAc,CAAC;CAGxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"type-generator.d.ts","sourceRoot":"","sources":["../../src/codemode/type-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAGvD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CA0CxD;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,MAAM,CA2C9E"}
1
+ {"version":3,"file":"type-generator.d.ts","sourceRoot":"","sources":["../../src/codemode/type-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAGvD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE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DAAqD;IACrD,WAAW,EAAE,MAAM,CAAA;IACnB,uBAAuB;IACvB,MAAM,EAAE,aAAa,CAAA;IACrB,wCAAwC;IACxC,QAAQ,EAAE,OAAO,CAAA;CACpB;AAMD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,sBAAsB;IACtB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,iCAAiC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wBAAwB;IACxB,OAAO,EAAE,gBAAgB,CAAA;CAC5B;AAMD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACvB,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAA;IACV,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAA;IACd,sCAAsC;IACtC,IAAI,EAAE,OAAO,EAAE,CAAA;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,mDAAmD;IACnD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Worker `shimMj` Domain Builders — specialized sub-proxies and interceptors
3
+ * (`adapters`, `entries`, `projects`, `db`, `system`, `search`, `append`, etc.)
4
+ * used by `createShimMjProxy`.
5
+ */
6
+ export declare function createAdaptersShim(prop: string): object;
7
+ export declare function createShimReadResourceHandler(): (uri?: string) => Promise<unknown>;
8
+ export declare function createEntriesDomainProxy(target: Record<string, unknown>): unknown;
9
+ export declare function createGetReadFindInterceptor(target: Record<string, unknown>, shimMj: Record<string, unknown>): (arg?: unknown) => unknown;
10
+ export declare function createShimProjectsDomain(target: Record<string, unknown>, shimMj: Record<string, unknown>): object;
11
+ export declare function createDbDomainProxy(target: Record<string, unknown>, shimMj: Record<string, unknown>): object;
12
+ export declare function createSystemDatabaseDomainProxy(target: Record<string, unknown>, shimMj: Record<string, unknown>): object;
13
+ export declare function createSearchDomainProxy(target: Record<string, unknown>): unknown;
14
+ export declare function createAppendInterceptor(target: Record<string, unknown>): ((arg1: unknown, arg2: unknown, arg3: unknown) => unknown) | undefined;
15
+ //# sourceMappingURL=mj-shim-domains.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mj-shim-domains.d.ts","sourceRoot":"","sources":["../../../src/codemode/worker/mj-shim-domains.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoBH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAuBvD;AAYD,wBAAgB,6BAA6B,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAelF;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAqDjF;AAED,wBAAgB,4BAA4B,CACxC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,CAAC,GAAG,CAAC,EAAE,OAAO,KAAK,OAAO,CAsB5B;AAED,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,MAAM,CAiCR;AAUD,wBAAgB,mBAAmB,CAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,MAAM,CAkDR;AAED,wBAAgB,+BAA+B,CAC3C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,MAAM,CAkBR;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAuBhF;AAED,wBAAgB,uBAAuB,CACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,SAAS,CAexE"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Worker `shimMj` Proxy — permissive top-level proxy that wraps `mjApi` to
3
+ * smooth out common agent hallucinations across repositories and SDK patterns.
4
+ */
5
+ import { type SafeFsShim } from './node-shims.js';
6
+ export interface CreateShimMjOptions {
7
+ mjApi: Record<string, unknown>;
8
+ safeFsShim: SafeFsShim;
9
+ executeCodeFnRef: {
10
+ current?: (arg: unknown) => Promise<unknown>;
11
+ };
12
+ getUpdateMemoryFn: () => (arg: unknown) => unknown;
13
+ }
14
+ /**
15
+ * Builds the `shimMj` permissive proxy wrapping `mjApi`.
16
+ */
17
+ export declare function createShimMjProxy(options: CreateShimMjOptions): Record<string, unknown>;
18
+ //# sourceMappingURL=mj-shim-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mj-shim-proxy.d.ts","sourceRoot":"","sources":["../../../src/codemode/worker/mj-shim-proxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,UAAU,EAAsD,MAAM,iBAAiB,CAAA;AA8ErG,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,UAAU,EAAE,UAAU,CAAA;IACtB,gBAAgB,EAAE;QAAE,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;KAAE,CAAA;IAClE,iBAAiB,EAAE,MAAM,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAA;CACrD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA0LvF"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Worker Namespace Shims — helper factories for callable shims, schema shims,
3
+ * delegating tool wrappers, and `context` proxy fallbacks.
4
+ */
5
+ export declare const DB_TO_JOURNAL: Record<string, [string, string]>;
6
+ /**
7
+ * Creates a callable/constructable proxy that resolves all calls and property reads to `shimMj`.
8
+ */
9
+ export declare function createCallableShim(shimMj: Record<string, unknown>, fnName?: string): object;
10
+ /**
11
+ * Creates the `updateMemory` / `setMemory` / `updateJournal` smart router function.
12
+ */
13
+ export declare function createUpdateMemoryFn(shimMj: Record<string, unknown>): (arg: unknown) => unknown;
14
+ /**
15
+ * Wraps a top-level delegating function so `.schema()`, `.help()`, and `.describe()`
16
+ * forward to the underlying method on `shimMj`.
17
+ */
18
+ export declare function wrapDelegatingTool(fn: (...args: unknown[]) => unknown, targetFnGetter: () => unknown): unknown;
19
+ export declare const schemaHelpFn: () => Promise<unknown>;
20
+ /**
21
+ * Creates the `schema` shim proxy for `shimMj`.
22
+ */
23
+ export declare function createSchemaShim(shimMj: Record<string, unknown>): object;
24
+ /**
25
+ * Creates an empty iterable/array-like/map-like fallback for missing collection properties on `context`.
26
+ */
27
+ export declare function createEmptyFallback(_name: string): unknown;
28
+ /**
29
+ * Builds the frozen `context` global proxy for the sandbox.
30
+ */
31
+ export declare function createContextProxy(contextObj?: Record<string, unknown>): Record<string, unknown>;
32
+ //# sourceMappingURL=namespace-shims.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"namespace-shims.d.ts","sourceRoot":"","sources":["../../../src/codemode/worker/namespace-shims.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAW1D,CAAA;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,SAAkB,GAAG,MAAM,CAqBpG;AAMD;;GAEG;AACH,wBAAgB,oBAAoB,CAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAgE3B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAC9B,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EACnC,cAAc,EAAE,MAAM,OAAO,GAC9B,OAAO,CAeT;AAaD,eAAO,MAAM,YAAY,QAAO,OAAO,CAAC,OAAO,CA0BzC,CAAA;AAEN;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CA4DxE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAyC1D;AAsCD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA4DhG"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Worker Node.js Shims — safe sandbox shims for `fs`, `path`, `console`,
3
+ * and SQLite prepared statements (`db.prepare(...)`).
4
+ */
5
+ export interface SafeFsShim {
6
+ existsSync: (filePath?: unknown) => boolean;
7
+ statSync: (_filePath?: unknown) => {
8
+ size: number;
9
+ isFile: () => boolean;
10
+ isDirectory: () => boolean;
11
+ mtime: Date;
12
+ birthtime: Date;
13
+ };
14
+ stat: (_filePath?: unknown, cb?: (err: Error | null, stats?: unknown) => void) => Promise<unknown>;
15
+ lstatSync: (_filePath?: unknown) => {
16
+ size: number;
17
+ isFile: () => boolean;
18
+ isDirectory: () => boolean;
19
+ mtime: Date;
20
+ birthtime: Date;
21
+ };
22
+ readFileSync: (_filePath?: unknown) => string;
23
+ readFile: (_filePath?: unknown, cb?: (err: Error | null, data?: string) => void) => Promise<string>;
24
+ writeFileSync: () => void;
25
+ writeFile: () => Promise<void>;
26
+ mkdirSync: () => void;
27
+ unlinkSync: () => void;
28
+ readdirSync: () => string[];
29
+ promises: {
30
+ stat: () => Promise<{
31
+ size: number;
32
+ isFile: () => boolean;
33
+ isDirectory: () => boolean;
34
+ mtime: Date;
35
+ birthtime: Date;
36
+ }>;
37
+ readFile: () => Promise<string>;
38
+ writeFile: () => Promise<void>;
39
+ };
40
+ }
41
+ export declare function createSafeFsShim(contextObj?: Record<string, unknown>): SafeFsShim;
42
+ export declare const pathShim: {
43
+ join: (...parts: unknown[]) => string;
44
+ resolve: (...parts: unknown[]) => string;
45
+ basename: (p: unknown, ext?: string) => string;
46
+ dirname: (p: unknown) => string;
47
+ extname: (p: unknown) => string;
48
+ normalize: (p: unknown) => string;
49
+ isAbsolute: (p: unknown) => boolean;
50
+ sep: string;
51
+ delimiter: string;
52
+ };
53
+ export declare const consoleShim: Readonly<{
54
+ log: (...args: unknown[]) => unknown[];
55
+ warn: (...args: unknown[]) => unknown[];
56
+ error: (...args: unknown[]) => unknown[];
57
+ info: (...args: unknown[]) => unknown[];
58
+ debug: (...args: unknown[]) => unknown[];
59
+ }>;
60
+ /**
61
+ * Translates raw `db.prepare(sql).run(...)` / `.get(...)` / `.all(...)` hallucinations
62
+ * into high-level `mj.core` / `mj.admin` calls.
63
+ */
64
+ export declare function createPreparedStatementShim(sql: string, shimMj: Record<string, unknown>): Record<string, unknown>;
65
+ //# sourceMappingURL=node-shims.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-shims.d.ts","sourceRoot":"","sources":["../../../src/codemode/worker/node-shims.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,MAAM,WAAW,UAAU;IACvB,UAAU,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,OAAO,CAAA;IAC3C,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK;QAC/B,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,MAAM,OAAO,CAAA;QACrB,WAAW,EAAE,MAAM,OAAO,CAAA;QAC1B,KAAK,EAAE,IAAI,CAAA;QACX,SAAS,EAAE,IAAI,CAAA;KAClB,CAAA;IACD,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAClG,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK;QAChC,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,MAAM,OAAO,CAAA;QACrB,WAAW,EAAE,MAAM,OAAO,CAAA;QAC1B,KAAK,EAAE,IAAI,CAAA;QACX,SAAS,EAAE,IAAI,CAAA;KAClB,CAAA;IACD,YAAY,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,MAAM,CAAA;IAC7C,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,KA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AAO,CAAC,CA8MzB"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Worker Prototype Hardening — outer-realm and inner-VM prototype freezing
3
+ * to prevent dynamic constructor chain escapes (`fn['con'+'structor']`).
4
+ */
5
+ import * as vm from 'node:vm';
6
+ /**
7
+ * Neuters `.constructor` on all outer function prototypes so untrusted scripts
8
+ * inside `vm` cannot traverse `fn['con'+'structor']` to reach the outer realm's
9
+ * Function/AsyncFunction/GeneratorFunction constructors.
10
+ */
11
+ export declare function hardenOuterFunctionPrototypes(): void;
12
+ /**
13
+ * Freezes built-in prototypes and neuters Function constructors inside the
14
+ * VM context to prevent dynamic constructor chain escapes like:
15
+ * `const c = 'con'+'structor'; Error()[c][c]('return process')()`
16
+ */
17
+ export declare function freezeInnerVmContext(context: vm.Context): void;
18
+ //# sourceMappingURL=prototype-hardening.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prototype-hardening.d.ts","sourceRoot":"","sources":["../../../src/codemode/worker/prototype-hardening.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAA;AAE7B;;;;GAIG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CA6EpD;AA4CD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,GAAG,IAAI,CAE9D"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Worker Result Compactor — compacts oversized structured payloads and enforces
3
+ * the serialized egress byte boundary to prevent OOM and hard payload failures.
4
+ */
5
+ import type { SandboxResult } from '../types.js';
6
+ /**
7
+ * Automatically compacts oversized structured result payloads (objects and collections)
8
+ * so that queries returning large datasets (e.g. 50 entries with markdown content)
9
+ * do not fail outright when exceeding the egress limit.
10
+ *
11
+ * Primitive strings and numbers are deliberately left uncompacted so that raw
12
+ * string contract tests reject properly with structured aggregation guidance.
13
+ */
14
+ export declare function compactOversizedResult(val: unknown, limitBytes: number, depth?: number, seen?: WeakSet<object>): unknown;
15
+ /**
16
+ * Enforces the egress byte limit during JSON serialization and applies
17
+ * `compactOversizedResult` fallback when an object/array exceeds the boundary.
18
+ */
19
+ export declare function serializeAndEnforceEgress(result: SandboxResult, maxResultSize?: number): void;
20
+ //# sourceMappingURL=result-compactor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-compactor.d.ts","sourceRoot":"","sources":["../../../src/codemode/worker/result-compactor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAClC,GAAG,EAAE,OAAO,EACZ,UAAU,EAAE,MAAM,EAClB,KAAK,SAAI,EACT,IAAI,kBAAgB,GACrB,OAAO,CAiET;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACrC,MAAM,EAAE,aAAa,EACrB,aAAa,CAAC,EAAE,MAAM,GACvB,IAAI,CA+EN"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Worker Sandbox Globals — builds the frozen `sandbox` object exposed to
3
+ * `vm.createContext` with all top-level aliases, delegating wrappers, and shims.
4
+ */
5
+ import { type SafeFsShim } from './node-shims.js';
6
+ export interface BuildSandboxGlobalsOptions {
7
+ mjApi: Record<string, unknown>;
8
+ shimMj: Record<string, unknown>;
9
+ safeFsShim: SafeFsShim;
10
+ frozenContext: Record<string, unknown>;
11
+ executeCodeFn: (arg: unknown) => Promise<unknown>;
12
+ updateMemoryFn: (arg: unknown) => unknown;
13
+ activeTimers?: Set<NodeJS.Timeout>;
14
+ }
15
+ /**
16
+ * Builds and freezes the sandbox global object for `vm.createContext`.
17
+ */
18
+ export declare function buildSandboxGlobals(options: BuildSandboxGlobalsOptions): Record<string, unknown>;
19
+ //# sourceMappingURL=sandbox-globals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-globals.d.ts","sourceRoot":"","sources":["../../../src/codemode/worker/sandbox-globals.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,UAAU,EAAsD,MAAM,iBAAiB,CAAA;AAOrG,MAAM,WAAW,0BAA0B;IACvC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,UAAU,EAAE,UAAU,CAAA;IACtB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IACjD,cAAc,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAA;IACzC,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;CACrC;AAkJD;;GAEG;AACH,wBAAgB,mBAAmB,CAC/B,OAAO,EAAE,0BAA0B,GACpC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA4NzB"}
@@ -2,16 +2,11 @@
2
2
  * Worker API Proxy Builder — constructs the `mj.*` proxy API for the sandbox.
3
3
  *
4
4
  * Each tool group becomes a namespace with methods that dispatch RPC calls
5
- * to the main thread. Includes snake_case→camelCase fallback, readResource
5
+ * to the main thread. Includes snake_case->camelCase fallback, readResource
6
6
  * hallucination handling, and schema() introspection on every method.
7
7
  */
8
8
  /**
9
9
  * Build the mj.* API proxy from method and schema lists.
10
- *
11
- * @param rpcCall - Function to dispatch RPC calls to main thread
12
- * @param methods - Map of group name → method names
13
- * @param schemas - Optional map of group name → method name → type string
14
- * @param readonlyMode - If true, blocked methods show readonly error
15
10
  */
16
11
  export declare function buildApiProxy(rpcCall: (group: string, method: string, args: unknown[]) => Promise<unknown>, methods: Record<string, string[]>, schemas?: Record<string, Record<string, string>>, readonlyMode?: boolean, contextObj?: Record<string, unknown>): Record<string, unknown>;
17
12
  //# sourceMappingURL=worker-api-proxy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"worker-api-proxy.d.ts","sourceRoot":"","sources":["../../src/codemode/worker-api-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;;;;;;GAOG;AACH,wBAAgB,aAAa,CACzB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,EAC7E,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACjC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAChD,YAAY,CAAC,EAAE,OAAO,EACtB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwwBzB"}
1
+ {"version":3,"file":"worker-api-proxy.d.ts","sourceRoot":"","sources":["../../src/codemode/worker-api-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6CH;;GAEG;AACH,wBAAgB,aAAa,CACzB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,EAC7E,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACjC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAChD,YAAY,CAAC,EAAE,OAAO,EACtB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA2QzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"worker-result-proxy.d.ts","sourceRoot":"","sources":["../../src/codemode/worker-result-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAoZnD"}
1
+ {"version":3,"file":"worker-result-proxy.d.ts","sourceRoot":"","sources":["../../src/codemode/worker-result-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiFH;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAoOnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"worker-sandbox.d.ts","sourceRoot":"","sources":["../../src/codemode/worker-sandbox.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAGH,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,aAAa,EAGrB,MAAM,YAAY,CAAA;AAuBnB;;;GAGG;AACH,qBAAa,aAAa;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,MAAM,CAAsB;IAC7B,MAAM,UAAQ;IACrB,SAAgB,SAAS,EAAE,MAAM,CAAa;IACvC,UAAU,EAAE,MAAM,CAAa;IACtC,OAAO,CAAC,gBAAgB,CAMT;IACf,OAAO,CAAC,WAAW,CAAI;IAEvB,IAAW,UAAU,IAAI,OAAO,CAE/B;gBAEW,OAAO,CAAC,EAAE,cAAc;IAKpC,OAAO,CAAC,UAAU;IAqDlB,OAAO,CAAC,iBAAiB;IA4BzB,OAAO,IAAI,IAAI;IAaf;;OAEG;IACG,OAAO,CACT,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAChD,SAAS,CAAC,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,YAAY,CAAC,EAAE,OAA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YAAY,CAAC,EAAE,OAAO,EACtB,qBAAqB,CAAC,EAAE,MAAM,GAC/B,OAAO,CAAC,aAAa,CAAC;IAqBzB,cAAc,IAAI,MAAM;IAIxB,OAAO,IAAI,IAAI;IAWf,QAAQ,CAAC,MAAM,sDAAsB;CACxC"}
@@ -1,2 +1,2 @@
1
- export declare const ADMIN_HELP = "# Admin Operations\n- **Workspace Bounds**: Batch updates, deletions, and rebuilding vector indexes require `workspace_id` awareness. Ensure you are targeting the correct workspace to avoid unintended cross-tenant mutations.\n\n### Auto-Prune\n\nOn server startup, the auto-prune system automatically soft-deletes old entries with low significance scores.\n- **Configurable Thresholds**: Controlled via `--prune-older-than-days` (soft-delete) and `--prune-importance-threshold`.\n- **Exclusion Rules**: Specific tags can be exempted from auto-pruning using `--prune-exclude-tags <tags>` (e.g. `architecture`, `never-prune`).\n- **Dry Run**: Server administrators can preview what would be processed without mutating the database by using the `--prune-dry-run` flag.\n\n### Scheduled Reports\n\nWhen deployed in HTTP mode with `--report-interval <minutes>` and `--report-webhook-url <url>`, the server periodically generates digest reports and delivers them to the configured webhook. Reports include activity trends, significance highlights, stale project warnings, and top-importance entries.\n\n- **Formats**: `slack` (default, `{\"text\":\"<markdown>\"}`), `discord` (`{\"content\":\"<markdown>\"}`), or `json` (raw DigestSnapshot payload).\n- **Report history**: Read `memory://insights/reports` to view the last 5 generated reports and their delivery status.\n- **Independent from digest**: The `report` job is separate from the `digest` analytics job. You can run one without the other.\n\n### Real-Time Subscriptions\n\nThe server supports the standard MCP `resources/subscribe` capability. You can subscribe to team resources (e.g., `memory://team/recent`, `memory://flags`, and `memory://briefing`) to receive real-time `notifications/resources/updated` notifications when other agents or team members mutate shared data. Note that subscriptions are scope-authorized; your session must possess the required scope (e.g., `team` or `admin`) for the target resource, or the subscription will be rejected with a `PermissionError`.\n\n## Available Tools\n\n- **Configuration**: `update_configuration`\n- **Project Lifecycle**: `register_project`, `update_project`, `delete_project`, `get_project`, `list_projects`\n- **Entry Mutations**: `update_entry`, `delete_entry`, `restore_entry`\n- **Batch Operations**: `batch_create_entries`, `batch_update_entries`, `batch_delete_entries`\n- **Vector Index**: `rebuild_vector_index`, `add_to_vector_index`\n- **Maintenance**: `merge_tags`, `run_auto_prune`\n- **Auditing**: `search_audit_log`\n\n";
1
+ export declare const ADMIN_HELP = "# Admin Operations\n- **Workspace Bounds**: Batch updates, deletions, and rebuilding vector indexes require `workspace_id` awareness. Ensure you are targeting the correct workspace to avoid unintended cross-tenant mutations.\n\n### Auto-Prune\n\nOn server startup, the auto-prune system automatically soft-deletes old entries with low significance scores.\n- **Configurable Thresholds**: Controlled via `--prune-older-than-days` (soft-delete) and `--prune-importance-threshold`.\n- **Exclusion Rules**: Specific tags can be exempted from auto-pruning using `--prune-exclude-tags <tags>` (e.g. `architecture`, `never-prune`).\n- **Dry Run**: Server administrators can preview what would be processed without mutating the database by using the `--prune-dry-run` flag.\n\n### Scheduled Reports\n\nWhen deployed in HTTP mode with `--report-interval <minutes>` and `--report-webhook-url <url>`, the server periodically generates digest reports and delivers them to the configured webhook. Reports include activity trends, significance highlights, stale project warnings, and top-importance entries.\n\n- **Formats**: `slack` (default, `{\"text\":\"<markdown>\"}`), `discord` (`{\"content\":\"<markdown>\"}`), or `json` (raw DigestSnapshot payload).\n- **Report history**: Read `memory://insights/reports` to view the last 5 generated reports and their delivery status.\n- **Independent from digest**: The `report` job is separate from the `digest` analytics job. You can run one without the other.\n\n### Real-Time Subscriptions\n\nThe server supports the standard MCP `resources/subscribe` capability. You can subscribe to resources (e.g., `memory://recent`, `memory://team/recent`, and `memory://briefing`) to receive real-time `notifications/resources/updated` notifications when other agents or team members mutate shared data. Note that subscriptions are scope-authorized; your session must possess the required scope (e.g., `team` or `admin`) for the target resource, or the subscription will be rejected with a `PermissionError`.\n\n## Available Tools\n\n- **Configuration**: `update_configuration`\n- **Project Lifecycle**: `register_project`, `update_project`, `delete_project`, `get_project`, `list_projects`\n- **Entry Mutations**: `update_entry`, `delete_entry`, `restore_entry`\n- **Batch Operations**: `batch_create_entries`, `batch_update_entries`, `batch_delete_entries`\n- **Vector Index**: `rebuild_vector_index`, `add_to_vector_index`\n- **Maintenance**: `merge_tags`, `run_auto_prune`\n- **Auditing**: `search_audit_log`\n\n";
2
2
  //# sourceMappingURL=admin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/admin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,o/EAgCtB,CAAC"}
1
+ {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/admin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,g/EAgCtB,CAAC"}
@@ -1,3 +1,3 @@
1
- export declare const CORE_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.";
2
- export declare const CODE_MODE_INSTRUCTIONS = "\n## Code Mode\n\nAPI: `tool_name` \u2192 `mj.group.action()` (e.g., `search_entries` \u2192 `mj.search.searchEntries()`)\nGlobals: `createEntry()`, `find()`, `recent()`, `searchEntries()`, `deleteEntry()`, `help()` work without the `mj.` prefix.\nPositional: `createEntry(\"note\")`, `searchEntries(\"performance\")`\nAliases: Common parameter names are auto-corrected (`q`/`search`\u2192`query`, `path`/`filepath`\u2192`output_dir`, `keep`\u2192`keep_count`, `user`/`assignee`\u2192`target_user`, `team`/`project`\u2192`workspace_id`).\nDiscovery: `mj.help()` \u2192 `{groups, totalMethods}`. `mj.core.help()` for group-specific.\nAnti-Hallucination: Always provide a valid JavaScript string in the `code` parameter (e.g. `code: \"return await mj.searchEntries({ query: '...' })\"`). If `mj_execute_code` is called with an empty payload `{}` or missing `code`, Code Mode auto-heals by returning the active sandbox status and available namespaces. Structured dictionaries or JSON payloads passed in `code`, `payload`, or `entry` are automatically synthesized into journal entry operations.\nSandbox: No network access (`fetch` is undefined). Node native modules (`fs`, `path`, `child_process`, `require()`) are disabled. Use the `context` parameter to pass file contents or external data into Code Mode. `setTimeout` and `sleep(ms)` are available for minor delays.\nReadonly: Pass `readonly: true` to `mj_execute_code` to restrict execution to read-only operations.\nRead `memory://help/codemode` for full namespace table, examples, and patterns.\n**Codemode-only**: When `mj_execute_code` is the only registered tool, all tool names referenced in these instructions (e.g., `create_entry`, `search_entries`) must be called via `mj_execute_code` using `mj.*` namespaces or bare globals. Do NOT call them as direct MCP tools. Note: This rule applies ONLY to MCP tools; CLI commands (like `memory-journal-mcp entry create`) should always be run natively in the terminal using `run_command`.";
1
+ export declare const CORE_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.";
2
+ export declare const CODE_MODE_INSTRUCTIONS = "\n## Code Mode\n\nAPI: `tool_name` \u2192 `mj.group.action()` (e.g., `search_entries` \u2192 `mj.search.searchEntries()`)\nGlobals: `createEntry()`, `find()`, `recent()`, `searchEntries()`, `deleteEntry()`, `help()` work without the `mj.` prefix.\nPositional: `createEntry(\"note\")`, `searchEntries(\"performance\")`\nAliases: Common parameter names are auto-corrected (`q`/`search`\u2192`query`, `path`/`filepath`\u2192`output_dir`, `keep`\u2192`keep_count`, `user`/`assignee`\u2192`target_user`, `team`/`project`\u2192`workspace_id`).\nDiscovery: `mj.help()` \u2192 `{groups, totalMethods}`. `mj.core.help()` for group-specific.\nAnti-Hallucination: Always provide a valid JavaScript string in the `code` parameter (e.g. `code: \"return await mj.searchEntries({ query: '...' })\"`). If `mj_execute_code` is called with an empty payload `{}` or missing `code`, Code Mode auto-heals by returning the active sandbox status and available namespaces. Structured dictionaries or JSON payloads passed in `code`, `payload`, or `entry` are automatically synthesized into journal entry operations.\nSandbox: No network access (`fetch()` is blocked and returns a 403 `VALIDATION_ERROR` response object). Node native modules (`fs`, `path`, `child_process`, `require()`) are disabled. Use the `context` parameter to pass file contents or external data into Code Mode. `setTimeout` and `sleep(ms)` are available for minor delays.\nReadonly: Pass `readonly: true` to `mj_execute_code` to restrict execution to read-only operations.\nRead `memory://help/codemode` for full namespace table, examples, and patterns.\n**Codemode-only**: When `mj_execute_code` is the only registered tool, all tool names referenced in these instructions (e.g., `create_entry`, `search_entries`) must be called via `mj_execute_code` using `mj.*` namespaces or bare globals. Do NOT call them as direct MCP tools. Note: This rule applies ONLY to MCP tools; CLI commands (like `memory-journal-mcp entry create`) should always be run natively in the terminal using `run_command`.";
3
3
  //# sourceMappingURL=base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/base.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,+tGAuC2O,CAAC;AAE1Q,eAAO,MAAM,sBAAsB,y8DAYma,CAAC"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/base.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,45GAuCgU,CAAC;AAE/V,eAAO,MAAM,sBAAsB,8/DAYma,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const CODEMODE_HELP = "# Code Mode API Reference\n\nIn Code Mode (`mj_execute_code`), you do NOT have native MCP tool schemas. You must orchestrate the server using the `mj.*` API inside the sandbox.\n\n## Sandbox Environment\n- **Network:** Disabled. `fetch()` throws `SandboxNetworkError`. Node network modules are stripped.\n- **Native Modules:** `fs`, `path`, `child_process`, `require()`, `import` are disabled. To pass file contents or external payloads into Code Mode, use the `context` parameter (accessible inside JS code as `context`).\n- **Globals:** `createEntry()`, `find()`, `recent()`, `searchEntries()`, `deleteEntry()`, `help()` work without the `mj.` prefix.\n- **Positional Arguments:** `createEntry(\"note\")`, `searchEntries(\"performance\")`, `mj.backup.backupJournal(\"snapshot\")`.\n- **Healing Aliases:** The proxy auto-heals common hallucinations (e.g., `query` (search, q), `output_dir` (path, filepath), `keep_count` (keep), `target_user` (user, assignee), `workspace_id` (team, project)).\n- **Arrays & Methods:** Proxies seamlessly support native array properties/methods (e.g., `.length`, `[0]`, `.map()`, `.filter()`, `.includes()`, `.shift()`, `.concat()`). Calling an unsupported method returns an actionable `VALIDATION_ERROR` rather than crashing.\n- **Async/Await:** Do NOT access `Promise` objects synchronously. Always `await` async operations. Missing `await` statements will be intercepted and return an actionable `VALIDATION_ERROR`.\n- **SQL Translation & Auto-Healing:** Code Mode executes JavaScript code via `mj.*` API. If raw SQL statements are passed (e.g., `SELECT * FROM journal_entries LIMIT 10`), the server automatically translates them to type-safe `mj.core.getRecentEntries({ limit: 10 })` or `mj.search.searchEntries({ query: \"...\" })` calls.\n- **Direct SQLite & Prepared Statements:** Do NOT execute direct SQLite statements or driver preparations (e.g. `const db = mj.getDatabase(); db.prepare(...)`). Use high-level `mj.*` API calls instead: `mj.admin.updateEntry({ entry_id: ..., content: ... })` to update entries, and `mj.core.createEntry({ ... })` to insert entries. The sandbox automatically translates prepared statement updates and queries into safe `mj.*` method invocations.\n- **Template Literals & Backticks:** When passing multi-line strings or markdown with embedded backticks (e.g. inline code blocks like `` `.npmrc` ``), avoid raw unescaped backticks inside a template literal. Either escape them (`\\```) or pass the string safely via the `context` parameter and access it as `context.myContent`.\n- **Quotes & Escaping:** When passing strings with single quotes, double quotes, or backticks in Code Mode, avoid double-escaping backslashes (e.g. `\\\\'` or `\\\\\"`), which prematurely terminates string literals in JavaScript. Pass complex content safely via `context.content`.\n- **Payload Objects & Raw JSON:** When calling Code Mode, structured dictionary objects (via `payload`, `entry`, or as a raw JSON string in `code`) containing task summaries, notes, changes, status, or action directives (e.g., `{ action: \"create\", task: \"...\", changes: [...], notes: \"...\" }`) are automatically translated and synthesized into type-safe `mj.core.createEntry(...)` or `mj.admin.updateEntry(...)` calls.\n- **Result Size Cap & Auto-Compaction:** By default, Code Mode enforces a 100KB result serialization boundary to protect LLM context windows. For large datasets or multi-entry queries, pass `max_result_size: <bytes>` (e.g. `200 * 1024` or `500 * 1024`, up to 50MB) in `mj_execute_code` parameters or context. When structured results exceed the limit, the sandbox automatically compacts oversized markdown content and long arrays so execution succeeds seamlessly.\n\n## API Namespace Map\n\n### `mj.core`\n- `createEntry(params)`\n- `getEntryById(params)`\n- `getRecentEntries(params)`\n- `getEntryHistory(params)`\n- `testSimple(params)`\n- `testErrorHandling(params)`\n- `triggerProgress(params)`\n- `listTags(params)`\n- `markAnchorsStale(params)`\n\n### `mj.search`\n- `searchEntries(params)`\n- `searchByDateRange(params)`\n- `semanticSearch(params)`\n- `getVectorIndexStats(params)`\n- `listDeletedEntries(params)`\n- `crossTeamSearch(params)`\n\n### `mj.analytics`\n- `getStatistics(params)` (or `getStats()`)\n- `getCrossProjectInsights(params)` (or `getInsights()`)\n\n### `mj.relationships`\n- `linkEntries(params)`\n- `visualizeRelationships(params)`\n\n### `mj.io`\n- `exportEntries(params)`\n- `exportMarkdown(params)`\n- `importMarkdown(params)`\n- `importExternal(params)`\n\n### `mj.admin`\n- `updateConfiguration(params)`\n- `registerProject(params)`\n- `updateProject(params)`\n- `deleteProject(params)`\n- `getProject(params)`\n- `listProjects(params)`\n- `updateEntry(params)`\n- `deleteEntry(params)`\n- `restoreEntry(params)`\n- `rebuildVectorIndex(params)`\n- `addToVectorIndex(params)`\n- `mergeTags(params)`\n- `batchCreateEntries(params)`\n- `batchUpdateEntries(params)`\n- `batchDeleteEntries(params)`\n- `runAutoPrune(params)`\n- `searchAuditLog(params)`\n\n### `mj.github`\n- `getGithubIssues(params)`\n- `getGithubPrs(params)`\n- `getGithubIssue(params)`\n- `getGithubPr(params)`\n- `getGithubContext(params)`\n- `getKanbanBoard(params)`\n- `moveKanbanItem(params)`\n- `addKanbanItem(params)`\n- `deleteKanbanItem(params)`\n- `createGithubIssueWithEntry(params)`\n- `closeGithubIssueWithEntry(params)`\n- `getGithubMilestones(params)`\n- `getGithubMilestone(params)`\n- `createGithubMilestone(params)`\n- `updateGithubMilestone(params)`\n- `deleteGithubMilestone(params)`\n- `getRepoInsights(params)`\n- `getCopilotReviews(params)`\n\n### `mj.git`\n- `getCommitHistory(params)`\n- `searchCommits(params)`\n- `getReleaseInfo(params)`\n- `getUnreleasedCommits(params)`\n- `analyzeCommitPatterns(params)`\n- `checkEntryStaleness(params)`\n\n### `mj.backup`\n- `backupJournal(params)`\n- `listBackups(params)`\n- `restoreBackup(params)`\n- `cleanupBackups(params)`\n\n### `mj.team`\n- `teamCreateEntry(params)`, `teamGetEntryById(params)` (or `read()`), `teamGetRecent(params)`, `teamListTags(params)`\n- `teamSearch(params)`, `teamSearchByDateRange(params)`, `teamSemanticSearch(params)`\n- `teamUpdateEntry(params)`, `teamDeleteEntry(params)`, `teamRestoreEntry(params)`, `teamListDeletedEntries(params)` (or `trash()`)\n- `teamMergeTags(params)`, `teamLinkEntries(params)`, `teamVisualizeRelationships(params)`\n- `teamBatchCreateEntries(params)`, `teamBatchUpdateEntries(params)`, `teamBatchDeleteEntries(params)`\n- `teamGetStatistics(params)` (or `stats()`), `teamGetCrossProjectInsights(params)`, `teamGetCollaborationMatrix(params)`\n- `teamExportEntries(params)` (or `export()`), `teamExportMarkdown(params)`, `teamImportMarkdown(params)` (or `importMd()`), `teamImportExternal(params)`\n- `teamBackup(params)`, `teamListBackups(params)`\n- `teamGetVectorIndexStats(params)`, `teamRebuildVectorIndex(params)`, `teamAddToVectorIndex(params)`\n- `teamAddMember(params)`, `teamRemoveMember(params)`, `teamUpdateMemberRole(params)`, `teamListMembers(params)`, `teamGetMember(params)`\n- `teamAddAuthorAlias(params)`, `teamRemoveAuthorAlias(params)`, `teamListAuthorAliases(params)`, `teamResolveAuthor(params)`, `teamConsolidateAuthors(params)`\n\n**Rule:** When `mj_execute_code` is the only registered tool (e.g., Code Mode), all tool actions must be performed using the `mj.*` namespaces listed above inside the code sandbox. Do NOT attempt to call the original tool names as direct MCP operations. CLI commands are exempt from this and should be run in the terminal.";
1
+ export declare const CODEMODE_HELP = "# Code Mode API Reference\n\nIn Code Mode (`mj_execute_code`), you do NOT have native MCP tool schemas. You must orchestrate the server using the `mj.*` API inside the sandbox.\n\n## Sandbox Environment\n- **Network:** Disabled. `fetch()` is blocked and returns a 403 `VALIDATION_ERROR` response object. Node network modules are stripped.\n- **Native Modules:** `fs`, `path`, `child_process`, `require()`, `import` are disabled. To pass file contents or external payloads into Code Mode, use the `context` parameter (accessible inside JS code as `context`).\n- **Globals:** `createEntry()`, `find()`, `recent()`, `searchEntries()`, `deleteEntry()`, `help()` work without the `mj.` prefix.\n- **Positional Arguments:** `createEntry(\"note\")`, `searchEntries(\"performance\")`, `mj.backup.backupJournal(\"snapshot\")`.\n- **Healing Aliases:** The proxy auto-heals common hallucinations (e.g., `query` (search, q), `output_dir` (path, filepath), `keep_count` (keep), `target_user` (user, assignee), `workspace_id` (team, project)).\n- **Arrays & Methods:** Proxies seamlessly support native array properties/methods (e.g., `.length`, `[0]`, `.map()`, `.filter()`, `.includes()`, `.shift()`, `.concat()`). Calling an unsupported method returns an actionable `VALIDATION_ERROR` rather than crashing.\n- **Async/Await:** Do NOT access `Promise` objects synchronously. Always `await` async operations. Missing `await` statements will be intercepted and return an actionable `VALIDATION_ERROR`.\n- **SQL Translation & Auto-Healing:** Code Mode executes JavaScript code via `mj.*` API. If raw SQL statements are passed (e.g., `SELECT * FROM journal_entries LIMIT 10`), the server automatically translates them to type-safe `mj.core.getRecentEntries({ limit: 10 })` or `mj.search.searchEntries({ query: \"...\" })` calls.\n- **Direct SQLite & Prepared Statements:** Do NOT execute direct SQLite statements or driver preparations (e.g. `const db = mj.getDatabase(); db.prepare(...)`). Use high-level `mj.*` API calls instead: `mj.admin.updateEntry({ entry_id: ..., content: ... })` to update entries, and `mj.core.createEntry({ ... })` to insert entries. The sandbox automatically translates prepared statement updates and queries into safe `mj.*` method invocations.\n- **Template Literals & Backticks:** When passing multi-line strings or markdown with embedded backticks (e.g. inline code blocks like `` `.npmrc` ``), avoid raw unescaped backticks inside a template literal. Either escape them (`\\```) or pass the string safely via the `context` parameter and access it as `context.myContent`.\n- **Quotes & Escaping:** When passing strings with single quotes, double quotes, or backticks in Code Mode, avoid double-escaping backslashes (e.g. `\\\\'` or `\\\\\"`), which prematurely terminates string literals in JavaScript. Pass complex content safely via `context.content`.\n- **Payload Objects & Raw JSON:** When calling Code Mode, structured dictionary objects (via `payload`, `entry`, or as a raw JSON string in `code`) containing task summaries, notes, changes, status, or action directives (e.g., `{ action: \"create\", task: \"...\", changes: [...], notes: \"...\" }`) are automatically translated and synthesized into type-safe `mj.core.createEntry(...)` or `mj.admin.updateEntry(...)` calls.\n- **Result Size Cap & Auto-Compaction:** By default, Code Mode enforces a 100KB result serialization boundary to protect LLM context windows. For large datasets or multi-entry queries, pass `max_result_size: <bytes>` (e.g. `200 * 1024` or `500 * 1024`, up to 50MB) in `mj_execute_code` parameters or context. When structured results exceed the limit, the sandbox automatically compacts oversized markdown content and long arrays so execution succeeds seamlessly.\n\n## API Namespace Map\n\n### `mj.core`\n- `createEntry(params)`\n- `getEntryById(params)`\n- `getRecentEntries(params)`\n- `getEntryHistory(params)`\n- `testSimple(params)`\n- `testErrorHandling(params)`\n- `triggerProgress(params)`\n- `listTags(params)`\n- `markAnchorsStale(params)`\n\n### `mj.search`\n- `searchEntries(params)`\n- `searchByDateRange(params)`\n- `semanticSearch(params)`\n- `getVectorIndexStats(params)`\n- `listDeletedEntries(params)`\n- `crossTeamSearch(params)`\n\n### `mj.analytics`\n- `getStatistics(params)` (or `getStats()`)\n- `getCrossProjectInsights(params)` (or `getInsights()`)\n\n### `mj.relationships`\n- `linkEntries(params)`\n- `visualizeRelationships(params)`\n\n### `mj.io`\n- `exportEntries(params)`\n- `exportMarkdown(params)`\n- `importMarkdown(params)`\n- `importExternal(params)`\n\n### `mj.admin`\n- `updateConfiguration(params)`\n- `registerProject(params)`\n- `updateProject(params)`\n- `deleteProject(params)`\n- `getProject(params)`\n- `listProjects(params)`\n- `updateEntry(params)`\n- `deleteEntry(params)`\n- `restoreEntry(params)`\n- `rebuildVectorIndex(params)`\n- `addToVectorIndex(params)`\n- `mergeTags(params)`\n- `batchCreateEntries(params)`\n- `batchUpdateEntries(params)`\n- `batchDeleteEntries(params)`\n- `runAutoPrune(params)`\n- `searchAuditLog(params)`\n\n### `mj.github`\n- `getGithubIssues(params)`\n- `getGithubPrs(params)`\n- `getGithubIssue(params)`\n- `getGithubPr(params)`\n- `getGithubContext(params)`\n- `getKanbanBoard(params)`\n- `moveKanbanItem(params)`\n- `addKanbanItem(params)`\n- `deleteKanbanItem(params)`\n- `createGithubIssueWithEntry(params)`\n- `closeGithubIssueWithEntry(params)`\n- `getGithubMilestones(params)`\n- `getGithubMilestone(params)`\n- `createGithubMilestone(params)`\n- `updateGithubMilestone(params)`\n- `deleteGithubMilestone(params)`\n- `getRepoInsights(params)`\n- `getCopilotReviews(params)`\n\n### `mj.git`\n- `getCommitHistory(params)`\n- `searchCommits(params)`\n- `getReleaseInfo(params)`\n- `getUnreleasedCommits(params)`\n- `analyzeCommitPatterns(params)`\n- `checkEntryStaleness(params)`\n\n### `mj.backup`\n- `backupJournal(params)`\n- `listBackups(params)`\n- `restoreBackup(params)`\n- `cleanupBackups(params)`\n\n### `mj.team`\n- `teamCreateEntry(params)`, `teamGetEntryById(params)` (or `read()`), `teamGetRecent(params)`, `teamListTags(params)`\n- `teamSearch(params)`, `teamSearchByDateRange(params)`, `teamSemanticSearch(params)`\n- `teamUpdateEntry(params)`, `teamDeleteEntry(params)`, `teamRestoreEntry(params)`, `teamListDeletedEntries(params)` (or `trash()`)\n- `teamMergeTags(params)`, `teamLinkEntries(params)`, `teamVisualizeRelationships(params)`\n- `teamBatchCreateEntries(params)`, `teamBatchUpdateEntries(params)`, `teamBatchDeleteEntries(params)`\n- `teamGetStatistics(params)` (or `stats()`), `teamGetCrossProjectInsights(params)`, `teamGetCollaborationMatrix(params)`\n- `teamExportEntries(params)` (or `export()`), `teamExportMarkdown(params)`, `teamImportMarkdown(params)` (or `importMd()`), `teamImportExternal(params)`\n- `teamBackup(params)`, `teamListBackups(params)`\n- `teamGetVectorIndexStats(params)`, `teamRebuildVectorIndex(params)`, `teamAddToVectorIndex(params)`\n- `teamAddMember(params)`, `teamRemoveMember(params)`, `teamUpdateMemberRole(params)`, `teamListMembers(params)`, `teamGetMember(params)`\n- `teamAddAuthorAlias(params)`, `teamRemoveAuthorAlias(params)`, `teamListAuthorAliases(params)`, `teamResolveAuthor(params)`, `teamConsolidateAuthors(params)`\n\n**Rule:** When `mj_execute_code` is the only registered tool (e.g., Code Mode), all tool actions must be performed using the `mj.*` namespaces listed above inside the code sandbox. Do NOT attempt to call the original tool names as direct MCP operations. CLI commands are exempt from this and should be run in the terminal.";
2
2
  //# sourceMappingURL=codemode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codemode.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/codemode.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,+4OAwH6S,CAAC"}
1
+ {"version":3,"file":"codemode.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/codemode.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,k7OAwH6S,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const CORE_HELP = "# Core Operations\n- **Workspace Isolation**: When creating or reading entries, consider the `workspace_id` parameter. If a default workspace is active, entries are automatically scoped to it unless explicitly overridden.\n\n### Session Summaries\n\nUse the `memory-journal-mcp entry create` terminal command to record session summaries. You MUST provide the markdown content via `--content \"<string>\"` or `--file <path>` (or pipe to stdin). Required fields:\n\n- `--type retrospective`\n- `--tags session-summary` (plus relevant domain/activity tags, comma-separated)\n- `--project` from the briefing\n- `--impact-score`, `--trust-score`, and `--validation-status` MUST be evaluated and populated.\n- `--related-to` MUST be populated with IDs of related tasks, architectural plans, or preceding summaries.\n- `--auto-context` MUST be populated with a concise JSON payload representing the context (e.g. `{ \"commits\": [\"abc1234\", \"def5678\"] }`)\n\nDo NOT create session summaries for testing passes where everything passed and no code changes were made. Only summarize sessions with substantive work.\n\n### Entry Type Selection\n\nChoose the correct `entry_type` \u2014 do NOT default everything to `personal_reflection`:\n\n- `retrospective` \u2014 Session summaries, certification reports, any \"what was accomplished\" recap\n- `bug_fix` \u2014 Specific bug identification and/or resolution\n- `project_decision` \u2014 Architecture decisions, pattern adoptions, technology choices\n- `planning` \u2014 Roadmaps, sprint plans, project initialization\n- `code_review` \u2014 Security audits, code quality reviews, copilot findings\n- `technical_note` \u2014 Implementation notes, gotchas, reference documentation\n- `feature_implementation` \u2014 New feature completions\n- `research` \u2014 Investigation, benchmarking, evaluation of alternatives\n- `meeting_notes` \u2014 Meeting minutes, sync notes, discussion summaries\n- `learning` \u2014 Lessons learned, tutorials completed, skill acquisition\n- `standup` \u2014 Daily standup notes, status updates\n- `milestone` \u2014 Major project milestones, release checkpoints\n- `technical_achievement` \u2014 Significant technical accomplishments\n- `enhancement` \u2014 Incremental improvements, optimizations\n- `development_note` \u2014 Day-to-day development context and progress\n- `system_integration_test` \u2014 Full integration/e2e test results\n- `test_entry` \u2014 Automated or manual test results\n- `plan_draft` \u2014 Initial drafts of implementation plans\n- `adversarial_review` \u2014 Reviews and critiques from adversarial subagents\n- `plan_refinement` \u2014 Refinements to plans based on reviews\n- `plan_finalized` \u2014 Finalized implementation plans after review\n- `copilot_validation` \u2014 Validation of copilot suggestions\n- `other` \u2014 Anything that doesn't fit the above categories\n- `personal_reflection` \u2014 Only for genuinely personal notes that don't fit above\n\n### Tag Taxonomy\n\nEvery entry MUST have at least one tag. Use kebab-case exclusively.\nTags are limited to a maximum of 100 characters. Journal entry content is limited to a maximum of 50,000 characters.\n\n- _Activity_: `session-summary`, `certification`, `stress-test`, `bug-fix`, `release`, `audit`, `remediation`, `refactor`\n- _Domain_: `security`, `performance`, `architecture`, `code-mode`, `documentation`, `ci-cd`, `github-integration`\n- _Tool group_: Name of the tool group being worked on (e.g., `core`, `search`, `github`, `admin`)\n- _Pattern_: `split-schema`, `zod`, `error-handling`, `dual-schema`\n\n### Heuristic Scoring Criteria\n\nALL entries MUST define heuristic scores. Use these explicit thresholds:\n\n- `validation`: \n - `none`: Work completed but not yet explicitly tested/verified.\n - `passed`: Work explicitly validated via tests, manual confirmation, or peer review.\n - `failed`: Work that failed verification or was found to be hallucinatory.\n- `trust_score` (Confidence):\n - `0.0 - 0.2`: Suspected hallucination or failed validation.\n - `0.3 - 0.5`: Unverified work, draft plans, or assumptions (Baseline for unverified work).\n - `0.6 - 0.8`: Partially verified or low-risk routine changes.\n - `0.9 - 1.0`: Rigorously verified via automated tests, peer review, or explicitly confirmed by the user.\n - *Note: `trust_score` acts as a multiplier on the entry's importance. Low trust entries will decay and be auto-pruned faster.*\n- `impact_score` (Blast Radius):\n - `0.0 - 0.2`: Trivial changes, typos, minor doc updates.\n - `0.3 - 0.5`: Standard feature work, isolated bug fixes.\n - `0.6 - 0.8`: Major new features, cross-module changes.\n - `0.9 - 1.0`: Core architectural shifts, destructive operations, critical security patches.\n\n### Significance Marking\n\nMark important entries with `significance_type`:\n\n- `release` \u2014 Version deployments\n- `milestone` \u2014 Major completions (full certification, security audit, feature launch)\n- `decision` \u2014 Technology or process decisions\n- `architecture` \u2014 Architecture decisions, pattern adoptions, structural changes\n- `blocker_resolved` \u2014 Critical blockers that were resolved\n- `lesson_learned` \u2014 Documented lessons from failures or unexpected outcomes\n- `breakthrough` \u2014 Significant technical or conceptual breakthroughs\n- `security` \u2014 Security audit completions, vulnerability remediations, hardening milestones\n\nDo NOT mark routine session summaries or pass-only testing results as significant.\n\n### Link Entries\n\nCreate relationships to build traversable context chains:\n\n- `implements` \u2014 implementation\u2192spec, remediation\u2192audit findings\n- `resolved` \u2014 bugfix\u2192issue that reported the bug\n- `evolves_from` \u2014 v2\u2192v1, new iteration\u2192prior version\n- `references` \u2014 cross-project parity work, related entries\n- `clarifies` \u2014 documentation\u2192implementation it explains\n- `response_to` \u2014 reply to a question or issue raised in another entry\n- `blocked_by` \u2014 entry was blocked by another (blocker\u2192resolution)\n- `caused` \u2014 entry caused or led to another outcome\n\nOnly link truly related entries. Do NOT create bulk relationships between unrelated entries that happen to share tags.\n\n### Git Commit Standards\n\nWhen committing changes to a repository:\n\n- **Commit Journaling**: Record a corresponding `commit-narrative` journal entry containing `auto_context: { \"commits\": [\"<sha>\"] }` along with accurate heuristic scores (`impact_score`, `trust_score`, `validation_status`). If your workspace provides a `commit.ts` wrapper (e.g. `.agents/scripts/commit.ts`), append `--journal` to automate this step; otherwise use standard `git commit` and log the entry via `mj_execute_code`, `create_entry`, or `memory-journal-mcp entry create`.\n- **Scoring**: Provide accurate scores (`0.1-1.0`) for blast radius (`impact_score`) and verification level (`trust_score`). **NEVER \"rubber stamp\" 1.0** without rigorous validation; accurately reflect verification.\n- **Validation**: Provide `validation_status` (`passed`, `failed`, or `none`).\n\n## Available Tools\n\n- **Entry Lifecycle**: `create_entry`, `get_entry_by_id`, `get_recent_entries`, `get_entry_history`\n- **Taxonomy & Graph**: `list_tags`, `mark_anchors_stale`\n- **Testing Tools**: `test_simple`, `test_error_handling`, `trigger_progress`\n\n";
1
+ export declare const CORE_HELP = "# Core Operations\n- **Workspace Isolation**: When creating or reading entries, consider the `workspace_id` parameter. If a default workspace is active, entries are automatically scoped to it unless explicitly overridden.\n\n### Session Summaries\n\nUse the `memory-journal-mcp entry create` terminal command to record session summaries. You MUST provide the markdown content via `--content \"<string>\"` or `--file <path>` (or pipe to stdin). Required fields:\n\n- `--type retrospective`\n- `--tags session-summary` (plus relevant domain/activity tags, comma-separated)\n- `--project` from the briefing\n- `--impact-score`, `--trust-score`, and `--validation-status` MUST be evaluated and populated.\n- `--related-to` MUST be populated with IDs of related tasks, architectural plans, or preceding summaries.\n- `--auto-context` MUST be populated with a concise JSON payload representing the context (e.g. `{ \"commits\": [\"abc1234\", \"def5678\"] }`)\n\nDo NOT create session summaries for testing passes where everything passed and no code changes were made. Only summarize sessions with substantive work.\n\n### Entry Type Selection\n\nChoose the correct `entry_type` \u2014 do NOT default everything to `personal_reflection`:\n\n- `retrospective` \u2014 Session summaries, certification reports, any \"what was accomplished\" recap\n- `bug_fix` \u2014 Specific bug identification and/or resolution\n- `project_decision` \u2014 Architecture decisions, pattern adoptions, technology choices\n- `planning` \u2014 Roadmaps, sprint plans, project initialization\n- `code_review` \u2014 Security audits, code quality reviews, copilot findings\n- `technical_note` \u2014 Implementation notes, gotchas, reference documentation\n- `feature_implementation` \u2014 New feature completions\n- `research` \u2014 Investigation, benchmarking, evaluation of alternatives\n- `meeting_notes` \u2014 Meeting minutes, sync notes, discussion summaries\n- `learning` \u2014 Lessons learned, tutorials completed, skill acquisition\n- `standup` \u2014 Daily standup notes, status updates\n- `milestone` \u2014 Major project milestones, release checkpoints\n- `technical_achievement` \u2014 Significant technical accomplishments\n- `enhancement` \u2014 Incremental improvements, optimizations\n- `development_note` \u2014 Day-to-day development context and progress\n- `system_integration_test` \u2014 Full integration/e2e test results\n- `test_entry` \u2014 Automated or manual test results\n- `plan_draft` \u2014 Initial drafts of implementation plans\n- `adversarial_review` \u2014 Reviews and critiques from adversarial subagents\n- `plan_refinement` \u2014 Refinements to plans based on reviews\n- `plan_finalized` \u2014 Finalized implementation plans after review\n- `copilot_validation` \u2014 Validation of copilot suggestions\n- `maintenance` \u2014 Scheduled or manual database optimization, CMS consolidation, and infrastructure healing reports\n- `other` \u2014 Anything that doesn't fit the above categories\n- `personal_reflection` \u2014 Only for genuinely personal notes that don't fit above\n\n### Tag Taxonomy\n\nEvery entry MUST have at least one tag. Use kebab-case exclusively.\nTags are limited to a maximum of 100 characters. Journal entry content is limited to a maximum of 50,000 characters.\n\n- _Activity_: `session-summary`, `certification`, `stress-test`, `bug-fix`, `release`, `audit`, `remediation`, `refactor`\n- _Domain_: `security`, `performance`, `architecture`, `code-mode`, `documentation`, `ci-cd`, `github-integration`\n- _Tool group_: Name of the tool group being worked on (e.g., `core`, `search`, `github`, `admin`)\n- _Pattern_: `split-schema`, `zod`, `error-handling`, `dual-schema`\n\n### Heuristic Scoring Criteria\n\nALL entries MUST define heuristic scores. Use these explicit thresholds:\n\n- `validation_status`: \n - `none`: Work completed but not yet explicitly tested/verified.\n - `passed`: Work explicitly validated via tests, manual confirmation, or peer review.\n - `failed`: Work that failed verification or was found to be hallucinatory.\n- `trust_score` (Confidence):\n - `0.0 - 0.2`: Suspected hallucination or failed validation.\n - `0.3 - 0.5`: Unverified work, draft plans, or assumptions (Baseline for unverified work).\n - `0.6 - 0.8`: Partially verified or low-risk routine changes.\n - `0.9 - 1.0`: Rigorously verified via automated tests, peer review, or explicitly confirmed by the user.\n - *Note: `trust_score` acts as a multiplier on the entry's importance. Low trust entries will decay and be auto-pruned faster.*\n- `impact_score` (Blast Radius):\n - `0.0 - 0.2`: Trivial changes, typos, minor doc updates.\n - `0.3 - 0.5`: Standard feature work, isolated bug fixes.\n - `0.6 - 0.8`: Major new features, cross-module changes.\n - `0.9 - 1.0`: Core architectural shifts, destructive operations, critical security patches.\n\n### Significance Marking\n\nMark important entries with `significance_type`:\n\n- `release` \u2014 Version deployments\n- `milestone` \u2014 Major completions (full certification, security audit, feature launch)\n- `decision` \u2014 Technology or process decisions\n- `architecture` \u2014 Architecture decisions, pattern adoptions, structural changes\n- `blocker_resolved` \u2014 Critical blockers that were resolved\n- `lesson_learned` \u2014 Documented lessons from failures or unexpected outcomes\n- `breakthrough` \u2014 Significant technical or conceptual breakthroughs\n- `security` \u2014 Security audit completions, vulnerability remediations, hardening milestones\n\nDo NOT mark routine session summaries or pass-only testing results as significant.\n\n### Link Entries\n\nCreate relationships to build traversable context chains:\n\n- `implements` \u2014 implementation\u2192spec, remediation\u2192audit findings\n- `resolved` \u2014 bugfix\u2192issue that reported the bug\n- `evolves_from` \u2014 v2\u2192v1, new iteration\u2192prior version\n- `references` \u2014 cross-project parity work, related entries\n- `clarifies` \u2014 documentation\u2192implementation it explains\n- `response_to` \u2014 reply to a question or issue raised in another entry\n- `blocked_by` \u2014 entry was blocked by another (blocker\u2192resolution)\n- `caused` \u2014 entry caused or led to another outcome\n\nOnly link truly related entries. Do NOT create bulk relationships between unrelated entries that happen to share tags.\n- **Opportunistic Superseding (Awake Contradiction Resolution)**: When creating a `project_decision`, `bug_fix`, or `technical_note` that invalidates or replaces an earlier entry surfaced in your briefing or search results, immediately link the new entry to the superseded entry via `evolves_from` or `resolved` so the knowledge graph reflects the superseding chain in real time.\n\n### Git Commit Standards\n\nWhen committing changes to a repository:\n\n- **Commit Journaling**: Record a corresponding `commit-narrative` journal entry containing `auto_context: { \"commits\": [\"<sha>\"] }` along with accurate heuristic scores (`impact_score`, `trust_score`, `validation_status`). If your workspace provides a `commit.ts` wrapper (e.g. `.agents/scripts/commit.ts`), append `--journal` to automate this step; otherwise use standard `git commit` and log the entry via `mj_execute_code`, `create_entry`, or `memory-journal-mcp entry create`.\n- **Scoring**: Provide accurate scores (`0.1-1.0`) for blast radius (`impact_score`) and verification level (`trust_score`). **NEVER \"rubber stamp\" 1.0** without rigorous validation; accurately reflect verification.\n- **Validation**: Provide `validation_status` (`passed`, `failed`, or `none`).\n\n## Available Tools\n\n- **Entry Lifecycle**: `create_entry`, `get_entry_by_id`, `get_recent_entries`, `get_entry_history`\n- **Taxonomy & Graph**: `list_tags`, `mark_anchors_stale`\n- **Testing Tools**: `test_simple`, `test_error_handling`, `trigger_progress`\n\n";
2
2
  //# sourceMappingURL=core.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/core.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,2vOAuHrB,CAAC"}
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/constants/instructions/core.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,wvPAyHrB,CAAC"}