memory-journal-mcp 5.1.1 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (452) hide show
  1. package/.dockerignore +4 -1
  2. package/.gitattributes +7 -16
  3. package/.github/aw/actions-lock.json +14 -0
  4. package/.github/copilot-instructions.md +122 -0
  5. package/.github/dependabot.yml +3 -5
  6. package/.github/workflows/README.md +133 -0
  7. package/.github/workflows/agentics-maintenance.yml +141 -0
  8. package/.github/workflows/auto-release.yml +68 -0
  9. package/.github/workflows/ci-health-monitor.lock.yml +1121 -0
  10. package/.github/workflows/ci-health-monitor.md +87 -0
  11. package/.github/workflows/codeql.yml +4 -4
  12. package/.github/workflows/dependency-maintenance.lock.yml +1182 -0
  13. package/.github/workflows/dependency-maintenance.md +147 -0
  14. package/.github/workflows/docker-publish.yml +17 -17
  15. package/.github/workflows/docs-drift-detector.lock.yml +1142 -0
  16. package/.github/workflows/docs-drift-detector.md +115 -0
  17. package/.github/workflows/lint-and-test.yml +4 -4
  18. package/.github/workflows/publish-npm.yml +2 -2
  19. package/.github/workflows/secrets-scanning.yml +3 -3
  20. package/.github/workflows/security-update.yml +7 -7
  21. package/CHANGELOG.md +347 -66
  22. package/CONTRIBUTING.md +24 -13
  23. package/DOCKER_README.md +156 -273
  24. package/Dockerfile +21 -32
  25. package/LICENSE +2 -2
  26. package/README.md +241 -139
  27. package/SECURITY.md +26 -16
  28. package/UNRELEASED.md +10 -0
  29. package/dist/chunk-2HIG4FI2.js +12251 -0
  30. package/dist/cli.d.ts +2 -5
  31. package/dist/cli.js +150 -70
  32. package/dist/index.d.ts +647 -8
  33. package/dist/index.js +10 -13
  34. package/dist/worker-script.d.ts +2 -0
  35. package/dist/worker-script.js +133 -0
  36. package/docs/README.md +20 -0
  37. package/docs/agentic-journal-synergy.md +175 -0
  38. package/docs/code-map.md +298 -0
  39. package/docs/copilot-setup.md +72 -0
  40. package/docs/team-crud-expansion.md +117 -0
  41. package/docs/tool-reference.md +179 -0
  42. package/package.json +9 -6
  43. package/playwright.config.ts +7 -1
  44. package/releases/v6.0.0.md +48 -0
  45. package/releases/v6.0.1.md +36 -0
  46. package/scripts/generate-server-instructions.ts +4 -4
  47. package/scripts/server-instructions-function-body.ts +0 -2
  48. package/server.json +3 -3
  49. package/src/auth/auth-context.ts +78 -0
  50. package/src/auth/authorization-server-discovery.ts +263 -0
  51. package/src/auth/errors.ts +215 -0
  52. package/src/auth/index.ts +58 -0
  53. package/src/auth/middleware.ts +392 -0
  54. package/src/auth/oauth-resource-server.ts +170 -0
  55. package/src/auth/scope-map.ts +46 -0
  56. package/src/auth/scopes.ts +256 -0
  57. package/src/auth/token-validator.ts +293 -0
  58. package/src/auth/transport-agnostic.ts +164 -0
  59. package/src/auth/types.ts +372 -0
  60. package/src/cli.ts +156 -16
  61. package/src/codemode/api-constants.ts +228 -0
  62. package/src/codemode/api.ts +302 -0
  63. package/src/codemode/index.ts +47 -0
  64. package/src/codemode/sandbox-factory.ts +144 -0
  65. package/src/codemode/sandbox.ts +219 -0
  66. package/src/codemode/security.ts +155 -0
  67. package/src/codemode/types.ts +228 -0
  68. package/src/codemode/worker-sandbox.ts +277 -0
  69. package/src/codemode/worker-script.ts +214 -0
  70. package/src/constants/server-instructions.md +82 -17
  71. package/src/constants/{ServerInstructions.ts → server-instructions.ts} +83 -20
  72. package/src/database/adapter-factory.ts +16 -0
  73. package/src/database/core/entry-columns.ts +10 -0
  74. package/src/database/core/interfaces.ts +186 -0
  75. package/src/database/{schema.ts → core/schema.ts} +26 -2
  76. package/src/database/sqlite-adapter/backup.ts +167 -0
  77. package/src/database/sqlite-adapter/entries/crud.ts +233 -0
  78. package/src/database/sqlite-adapter/entries/importance.ts +76 -0
  79. package/src/database/sqlite-adapter/entries/index.ts +140 -0
  80. package/src/database/sqlite-adapter/entries/search.ts +236 -0
  81. package/src/database/sqlite-adapter/entries/shared.ts +102 -0
  82. package/src/database/sqlite-adapter/entries/statistics.ts +162 -0
  83. package/src/database/sqlite-adapter/index.ts +263 -0
  84. package/src/database/sqlite-adapter/native-connection.ts +296 -0
  85. package/src/database/sqlite-adapter/relationships.ts +70 -0
  86. package/src/database/sqlite-adapter/tags.ts +182 -0
  87. package/src/filtering/{ToolFilter.ts → tool-filter.ts} +4 -1
  88. package/src/github/github-integration/client.ts +114 -0
  89. package/src/github/github-integration/index.ts +297 -0
  90. package/src/github/github-integration/insights.ts +155 -0
  91. package/src/github/github-integration/issues.ts +213 -0
  92. package/src/github/github-integration/milestones.ts +262 -0
  93. package/src/github/github-integration/projects.ts +414 -0
  94. package/src/github/github-integration/pull-requests.ts +235 -0
  95. package/src/github/github-integration/repository.ts +110 -0
  96. package/src/github/github-integration/types.ts +43 -0
  97. package/src/handlers/prompts/github.ts +14 -13
  98. package/src/handlers/prompts/index.ts +7 -7
  99. package/src/handlers/prompts/workflow.ts +21 -16
  100. package/src/handlers/resources/core/briefing/context-section.ts +182 -0
  101. package/src/handlers/resources/core/briefing/github-section.ts +354 -0
  102. package/src/handlers/resources/core/briefing/index.ts +103 -0
  103. package/src/handlers/resources/core/briefing/user-message.ts +114 -0
  104. package/src/handlers/resources/core/health.ts +74 -0
  105. package/src/handlers/resources/core/index.ts +25 -0
  106. package/src/handlers/resources/core/instructions.ts +38 -0
  107. package/src/handlers/resources/core/utilities.ts +103 -0
  108. package/src/handlers/resources/github.ts +132 -149
  109. package/src/handlers/resources/graph.ts +8 -36
  110. package/src/handlers/resources/index.ts +13 -10
  111. package/src/handlers/resources/shared.ts +122 -10
  112. package/src/handlers/resources/team.ts +10 -8
  113. package/src/handlers/resources/templates.ts +9 -32
  114. package/src/handlers/tools/admin.ts +86 -50
  115. package/src/handlers/tools/analytics.ts +147 -122
  116. package/src/handlers/tools/backup.ts +69 -50
  117. package/src/handlers/tools/codemode.ts +188 -0
  118. package/src/handlers/tools/core.ts +77 -87
  119. package/src/handlers/tools/error-fields-mixin.ts +26 -0
  120. package/src/handlers/tools/export.ts +37 -21
  121. package/src/handlers/tools/github/copilot-tools.ts +72 -0
  122. package/src/handlers/tools/github/helpers.ts +16 -7
  123. package/src/handlers/tools/github/insights-tools.ts +13 -20
  124. package/src/handlers/tools/github/issue-tools.ts +17 -14
  125. package/src/handlers/tools/github/milestone-tools.ts +1 -45
  126. package/src/handlers/tools/github/read-tools.ts +5 -53
  127. package/src/handlers/tools/github/schemas.ts +332 -267
  128. package/src/handlers/tools/github.ts +5 -2
  129. package/src/handlers/tools/index.ts +25 -15
  130. package/src/handlers/tools/relationships.ts +54 -43
  131. package/src/handlers/tools/schemas.ts +69 -40
  132. package/src/handlers/tools/search.ts +95 -60
  133. package/src/handlers/tools/team.ts +120 -90
  134. package/src/index.ts +3 -2
  135. package/src/server/{McpServer.ts → mcp-server.ts} +123 -189
  136. package/src/server/registration.ts +141 -0
  137. package/src/server/{Scheduler.ts → scheduler.ts} +23 -19
  138. package/src/transports/http/handlers.ts +78 -0
  139. package/src/transports/http/index.ts +8 -0
  140. package/src/transports/http/security.ts +147 -0
  141. package/src/transports/http/server/index.ts +340 -0
  142. package/src/transports/http/server/legacy-sse.ts +87 -0
  143. package/src/transports/http/server/stateful.ts +221 -0
  144. package/src/transports/http/server/stateless.ts +42 -0
  145. package/src/transports/http/types.ts +132 -0
  146. package/src/types/error-types.ts +92 -0
  147. package/src/types/errors.ts +186 -0
  148. package/src/types/filtering.ts +1 -0
  149. package/src/types/github.ts +36 -0
  150. package/src/types/index.ts +35 -5
  151. package/src/utils/error-helpers.ts +33 -11
  152. package/src/utils/github-helpers.ts +33 -0
  153. package/src/utils/security-utils.ts +40 -12
  154. package/src/utils/vector-index-helpers.ts +24 -0
  155. package/src/vector/{VectorSearchManager.ts → vector-search-manager.ts} +139 -126
  156. package/test-server/README.md +165 -0
  157. package/test-server/test-instruction-levels.mjs +102 -0
  158. package/test-server/test-scheduler.mjs +174 -0
  159. package/test-server/test-tool-annotations.mjs +115 -0
  160. package/test-server/test-tools-codemode.md +632 -0
  161. package/test-server/test-tools-codemode2.md +915 -0
  162. package/test-server/test-tools.md +729 -0
  163. package/test-server/test-tools2.md +422 -0
  164. package/tests/auth/auth-context.test.ts +162 -0
  165. package/tests/auth/authorization-server-discovery.test.ts +265 -0
  166. package/tests/auth/errors.test.ts +170 -0
  167. package/tests/auth/middleware.test.ts +585 -0
  168. package/tests/auth/oauth-resource-server.test.ts +152 -0
  169. package/tests/auth/scope-map.test.ts +66 -0
  170. package/tests/auth/scopes.test.ts +347 -0
  171. package/tests/auth/token-validator.test.ts +271 -0
  172. package/tests/codemode/api.test.ts +313 -0
  173. package/tests/codemode/codemode-tool-handlers.test.ts +197 -0
  174. package/tests/codemode/sandbox-factory.test.ts +152 -0
  175. package/tests/codemode/sandbox.test.ts +104 -0
  176. package/tests/codemode/security.test.ts +242 -0
  177. package/tests/constants/server-instructions.test.ts +18 -89
  178. package/tests/database/crud-workflow-branches.test.ts +418 -0
  179. package/tests/database/database-branches.test.ts +132 -0
  180. package/tests/database/entries-auth-branches.test.ts +392 -0
  181. package/tests/database/native-connection.test.ts +187 -0
  182. package/tests/database/shared-helpers.test.ts +103 -0
  183. package/tests/database/sqlite-adapter.bench.ts +3 -3
  184. package/tests/database/sqlite-adapter.test.ts +20 -20
  185. package/tests/e2e/auth.spec.ts +3 -51
  186. package/tests/e2e/helpers.ts +139 -0
  187. package/tests/e2e/oauth-discovery.spec.ts +102 -0
  188. package/tests/e2e/payloads-admin.spec.ts +76 -0
  189. package/tests/e2e/payloads-analytics.spec.ts +37 -0
  190. package/tests/e2e/payloads-backup.spec.ts +44 -0
  191. package/tests/e2e/payloads-codemode.spec.ts +116 -0
  192. package/tests/e2e/payloads-core.spec.ts +82 -0
  193. package/tests/e2e/payloads-export.spec.ts +44 -0
  194. package/tests/e2e/payloads-relationships.spec.ts +56 -0
  195. package/tests/e2e/payloads-search.spec.ts +64 -0
  196. package/tests/e2e/prompts.spec.ts +62 -0
  197. package/tests/e2e/rate-limiting.spec.ts +291 -0
  198. package/tests/e2e/resources-expanded.spec.ts +83 -0
  199. package/tests/e2e/security.spec.ts +24 -3
  200. package/tests/e2e/session-advanced.spec.ts +154 -0
  201. package/tests/e2e/stateless.spec.ts +3 -45
  202. package/tests/e2e/streaming.spec.ts +176 -0
  203. package/tests/e2e/tool-filtering.spec.ts +77 -0
  204. package/tests/filtering/tool-filter.test.ts +1 -1
  205. package/tests/github/client-issues-errors.test.ts +433 -0
  206. package/tests/github/github-integration-branches.test.ts +490 -0
  207. package/tests/github/github-integration.test.ts +12 -12
  208. package/tests/github/github-managers-branches.test.ts +907 -0
  209. package/tests/github/pull-requests.test.ts +334 -0
  210. package/tests/handlers/analytics-branches.test.ts +222 -0
  211. package/tests/handlers/backup-branches.test.ts +270 -0
  212. package/tests/handlers/briefing-context-section.test.ts +388 -0
  213. package/tests/handlers/briefing-github-section.test.ts +392 -0
  214. package/tests/handlers/briefing-user-message.test.ts +405 -0
  215. package/tests/handlers/copilot-tools.test.ts +126 -0
  216. package/tests/handlers/error-path-coverage.test.ts +3 -3
  217. package/tests/handlers/export-tools.test.ts +203 -0
  218. package/tests/handlers/github-resource-handlers.test.ts +23 -33
  219. package/tests/handlers/github-tool-handlers.test.ts +12 -15
  220. package/tests/handlers/handler-error-branches.test.ts +346 -0
  221. package/tests/handlers/prompt-handler-coverage.test.ts +6 -4
  222. package/tests/handlers/prompt-handlers.test.ts +3 -3
  223. package/tests/handlers/resource-handler-coverage.test.ts +7 -8
  224. package/tests/handlers/resource-handlers.test.ts +11 -17
  225. package/tests/handlers/resource-prompt-branches.test.ts +495 -0
  226. package/tests/handlers/search-tool-handlers.test.ts +5 -5
  227. package/tests/handlers/targeted-gap-closure.test.ts +5 -5
  228. package/tests/handlers/team-resource-handlers.test.ts +13 -8
  229. package/tests/handlers/team-tool-handlers.test.ts +5 -5
  230. package/tests/handlers/template-github-branches.test.ts +663 -0
  231. package/tests/handlers/tool-handler-coverage.test.ts +8 -8
  232. package/tests/handlers/tool-handlers.test.ts +16 -5
  233. package/tests/handlers/vector-tool-handlers.test.ts +12 -12
  234. package/tests/security/sql-injection.test.ts +6 -6
  235. package/tests/server/mcp-server.bench.ts +3 -3
  236. package/tests/server/mcp-server.test.ts +89 -34
  237. package/tests/server/scheduler.test.ts +5 -5
  238. package/tests/transports/http-legacy-sse.test.ts +275 -0
  239. package/tests/transports/http-security.test.ts +322 -0
  240. package/tests/transports/http-stateful.test.ts +489 -0
  241. package/tests/transports/http-transport-server.test.ts +301 -0
  242. package/tests/transports/http-transport.test.ts +104 -39
  243. package/tests/utils/github-helpers.test.ts +58 -0
  244. package/tests/utils/mcp-logger.test.ts +1 -1
  245. package/tests/vector/vector-search-branches.test.ts +111 -0
  246. package/tests/vector/vector-search-manager.test.ts +109 -126
  247. package/tests/vector/vector-search.bench.ts +7 -12
  248. package/tsconfig.json +1 -1
  249. package/tsup.config.ts +19 -0
  250. package/vitest.config.ts +1 -0
  251. package/dist/cli.d.ts.map +0 -1
  252. package/dist/cli.js.map +0 -1
  253. package/dist/constants/ServerInstructions.d.ts +0 -59
  254. package/dist/constants/ServerInstructions.d.ts.map +0 -1
  255. package/dist/constants/ServerInstructions.js +0 -335
  256. package/dist/constants/ServerInstructions.js.map +0 -1
  257. package/dist/constants/icons.d.ts +0 -56
  258. package/dist/constants/icons.d.ts.map +0 -1
  259. package/dist/constants/icons.js +0 -157
  260. package/dist/constants/icons.js.map +0 -1
  261. package/dist/database/SqliteAdapter.d.ts +0 -311
  262. package/dist/database/SqliteAdapter.d.ts.map +0 -1
  263. package/dist/database/SqliteAdapter.js +0 -1280
  264. package/dist/database/SqliteAdapter.js.map +0 -1
  265. package/dist/database/schema.d.ts +0 -45
  266. package/dist/database/schema.d.ts.map +0 -1
  267. package/dist/database/schema.js +0 -95
  268. package/dist/database/schema.js.map +0 -1
  269. package/dist/filtering/ToolFilter.d.ts +0 -63
  270. package/dist/filtering/ToolFilter.d.ts.map +0 -1
  271. package/dist/filtering/ToolFilter.js +0 -250
  272. package/dist/filtering/ToolFilter.js.map +0 -1
  273. package/dist/github/GitHubIntegration.d.ts +0 -210
  274. package/dist/github/GitHubIntegration.d.ts.map +0 -1
  275. package/dist/github/GitHubIntegration.js +0 -1251
  276. package/dist/github/GitHubIntegration.js.map +0 -1
  277. package/dist/handlers/prompts/github.d.ts +0 -12
  278. package/dist/handlers/prompts/github.d.ts.map +0 -1
  279. package/dist/handlers/prompts/github.js +0 -178
  280. package/dist/handlers/prompts/github.js.map +0 -1
  281. package/dist/handlers/prompts/index.d.ts +0 -49
  282. package/dist/handlers/prompts/index.d.ts.map +0 -1
  283. package/dist/handlers/prompts/index.js +0 -55
  284. package/dist/handlers/prompts/index.js.map +0 -1
  285. package/dist/handlers/prompts/workflow.d.ts +0 -13
  286. package/dist/handlers/prompts/workflow.d.ts.map +0 -1
  287. package/dist/handlers/prompts/workflow.js +0 -312
  288. package/dist/handlers/prompts/workflow.js.map +0 -1
  289. package/dist/handlers/resources/core.d.ts +0 -11
  290. package/dist/handlers/resources/core.d.ts.map +0 -1
  291. package/dist/handlers/resources/core.js +0 -433
  292. package/dist/handlers/resources/core.js.map +0 -1
  293. package/dist/handlers/resources/github.d.ts +0 -11
  294. package/dist/handlers/resources/github.d.ts.map +0 -1
  295. package/dist/handlers/resources/github.js +0 -314
  296. package/dist/handlers/resources/github.js.map +0 -1
  297. package/dist/handlers/resources/graph.d.ts +0 -11
  298. package/dist/handlers/resources/graph.d.ts.map +0 -1
  299. package/dist/handlers/resources/graph.js +0 -204
  300. package/dist/handlers/resources/graph.js.map +0 -1
  301. package/dist/handlers/resources/index.d.ts +0 -26
  302. package/dist/handlers/resources/index.d.ts.map +0 -1
  303. package/dist/handlers/resources/index.js +0 -109
  304. package/dist/handlers/resources/index.js.map +0 -1
  305. package/dist/handlers/resources/shared.d.ts +0 -60
  306. package/dist/handlers/resources/shared.d.ts.map +0 -1
  307. package/dist/handlers/resources/shared.js +0 -49
  308. package/dist/handlers/resources/shared.js.map +0 -1
  309. package/dist/handlers/resources/team.d.ts +0 -13
  310. package/dist/handlers/resources/team.d.ts.map +0 -1
  311. package/dist/handlers/resources/team.js +0 -119
  312. package/dist/handlers/resources/team.js.map +0 -1
  313. package/dist/handlers/resources/templates.d.ts +0 -13
  314. package/dist/handlers/resources/templates.d.ts.map +0 -1
  315. package/dist/handlers/resources/templates.js +0 -310
  316. package/dist/handlers/resources/templates.js.map +0 -1
  317. package/dist/handlers/tools/admin.d.ts +0 -8
  318. package/dist/handlers/tools/admin.d.ts.map +0 -1
  319. package/dist/handlers/tools/admin.js +0 -270
  320. package/dist/handlers/tools/admin.js.map +0 -1
  321. package/dist/handlers/tools/analytics.d.ts +0 -8
  322. package/dist/handlers/tools/analytics.d.ts.map +0 -1
  323. package/dist/handlers/tools/analytics.js +0 -268
  324. package/dist/handlers/tools/analytics.js.map +0 -1
  325. package/dist/handlers/tools/backup.d.ts +0 -8
  326. package/dist/handlers/tools/backup.d.ts.map +0 -1
  327. package/dist/handlers/tools/backup.js +0 -224
  328. package/dist/handlers/tools/backup.js.map +0 -1
  329. package/dist/handlers/tools/core.d.ts +0 -9
  330. package/dist/handlers/tools/core.d.ts.map +0 -1
  331. package/dist/handlers/tools/core.js +0 -336
  332. package/dist/handlers/tools/core.js.map +0 -1
  333. package/dist/handlers/tools/export.d.ts +0 -8
  334. package/dist/handlers/tools/export.d.ts.map +0 -1
  335. package/dist/handlers/tools/export.js +0 -108
  336. package/dist/handlers/tools/export.js.map +0 -1
  337. package/dist/handlers/tools/github/helpers.d.ts +0 -34
  338. package/dist/handlers/tools/github/helpers.d.ts.map +0 -1
  339. package/dist/handlers/tools/github/helpers.js +0 -60
  340. package/dist/handlers/tools/github/helpers.js.map +0 -1
  341. package/dist/handlers/tools/github/insights-tools.d.ts +0 -8
  342. package/dist/handlers/tools/github/insights-tools.d.ts.map +0 -1
  343. package/dist/handlers/tools/github/insights-tools.js +0 -104
  344. package/dist/handlers/tools/github/insights-tools.js.map +0 -1
  345. package/dist/handlers/tools/github/issue-tools.d.ts +0 -8
  346. package/dist/handlers/tools/github/issue-tools.d.ts.map +0 -1
  347. package/dist/handlers/tools/github/issue-tools.js +0 -359
  348. package/dist/handlers/tools/github/issue-tools.js.map +0 -1
  349. package/dist/handlers/tools/github/kanban-tools.d.ts +0 -8
  350. package/dist/handlers/tools/github/kanban-tools.d.ts.map +0 -1
  351. package/dist/handlers/tools/github/kanban-tools.js +0 -109
  352. package/dist/handlers/tools/github/kanban-tools.js.map +0 -1
  353. package/dist/handlers/tools/github/milestone-tools.d.ts +0 -9
  354. package/dist/handlers/tools/github/milestone-tools.d.ts.map +0 -1
  355. package/dist/handlers/tools/github/milestone-tools.js +0 -303
  356. package/dist/handlers/tools/github/milestone-tools.js.map +0 -1
  357. package/dist/handlers/tools/github/mutation-tools.d.ts +0 -12
  358. package/dist/handlers/tools/github/mutation-tools.d.ts.map +0 -1
  359. package/dist/handlers/tools/github/mutation-tools.js +0 -15
  360. package/dist/handlers/tools/github/mutation-tools.js.map +0 -1
  361. package/dist/handlers/tools/github/read-tools.d.ts +0 -8
  362. package/dist/handlers/tools/github/read-tools.d.ts.map +0 -1
  363. package/dist/handlers/tools/github/read-tools.js +0 -266
  364. package/dist/handlers/tools/github/read-tools.js.map +0 -1
  365. package/dist/handlers/tools/github/schemas.d.ts +0 -467
  366. package/dist/handlers/tools/github/schemas.d.ts.map +0 -1
  367. package/dist/handlers/tools/github/schemas.js +0 -335
  368. package/dist/handlers/tools/github/schemas.js.map +0 -1
  369. package/dist/handlers/tools/github.d.ts +0 -14
  370. package/dist/handlers/tools/github.d.ts.map +0 -1
  371. package/dist/handlers/tools/github.js +0 -28
  372. package/dist/handlers/tools/github.js.map +0 -1
  373. package/dist/handlers/tools/index.d.ts +0 -27
  374. package/dist/handlers/tools/index.d.ts.map +0 -1
  375. package/dist/handlers/tools/index.js +0 -169
  376. package/dist/handlers/tools/index.js.map +0 -1
  377. package/dist/handlers/tools/relationships.d.ts +0 -8
  378. package/dist/handlers/tools/relationships.d.ts.map +0 -1
  379. package/dist/handlers/tools/relationships.js +0 -318
  380. package/dist/handlers/tools/relationships.js.map +0 -1
  381. package/dist/handlers/tools/schemas.d.ts +0 -116
  382. package/dist/handlers/tools/schemas.d.ts.map +0 -1
  383. package/dist/handlers/tools/schemas.js +0 -123
  384. package/dist/handlers/tools/schemas.js.map +0 -1
  385. package/dist/handlers/tools/search.d.ts +0 -8
  386. package/dist/handlers/tools/search.d.ts.map +0 -1
  387. package/dist/handlers/tools/search.js +0 -307
  388. package/dist/handlers/tools/search.js.map +0 -1
  389. package/dist/handlers/tools/team.d.ts +0 -11
  390. package/dist/handlers/tools/team.d.ts.map +0 -1
  391. package/dist/handlers/tools/team.js +0 -240
  392. package/dist/handlers/tools/team.js.map +0 -1
  393. package/dist/index.d.ts.map +0 -1
  394. package/dist/index.js.map +0 -1
  395. package/dist/server/McpServer.d.ts +0 -27
  396. package/dist/server/McpServer.d.ts.map +0 -1
  397. package/dist/server/McpServer.js +0 -326
  398. package/dist/server/McpServer.js.map +0 -1
  399. package/dist/server/Scheduler.d.ts +0 -91
  400. package/dist/server/Scheduler.d.ts.map +0 -1
  401. package/dist/server/Scheduler.js +0 -201
  402. package/dist/server/Scheduler.js.map +0 -1
  403. package/dist/transports/http.d.ts +0 -66
  404. package/dist/transports/http.d.ts.map +0 -1
  405. package/dist/transports/http.js +0 -520
  406. package/dist/transports/http.js.map +0 -1
  407. package/dist/types/entities.d.ts +0 -101
  408. package/dist/types/entities.d.ts.map +0 -1
  409. package/dist/types/entities.js +0 -5
  410. package/dist/types/entities.js.map +0 -1
  411. package/dist/types/filtering.d.ts +0 -34
  412. package/dist/types/filtering.d.ts.map +0 -1
  413. package/dist/types/filtering.js +0 -5
  414. package/dist/types/filtering.js.map +0 -1
  415. package/dist/types/github.d.ts +0 -166
  416. package/dist/types/github.d.ts.map +0 -1
  417. package/dist/types/github.js +0 -5
  418. package/dist/types/github.js.map +0 -1
  419. package/dist/types/index.d.ts +0 -213
  420. package/dist/types/index.d.ts.map +0 -1
  421. package/dist/types/index.js +0 -15
  422. package/dist/types/index.js.map +0 -1
  423. package/dist/utils/McpLogger.d.ts +0 -61
  424. package/dist/utils/McpLogger.d.ts.map +0 -1
  425. package/dist/utils/McpLogger.js +0 -113
  426. package/dist/utils/McpLogger.js.map +0 -1
  427. package/dist/utils/error-helpers.d.ts +0 -37
  428. package/dist/utils/error-helpers.d.ts.map +0 -1
  429. package/dist/utils/error-helpers.js +0 -47
  430. package/dist/utils/error-helpers.js.map +0 -1
  431. package/dist/utils/logger.d.ts +0 -31
  432. package/dist/utils/logger.d.ts.map +0 -1
  433. package/dist/utils/logger.js +0 -80
  434. package/dist/utils/logger.js.map +0 -1
  435. package/dist/utils/progress-utils.d.ts +0 -53
  436. package/dist/utils/progress-utils.d.ts.map +0 -1
  437. package/dist/utils/progress-utils.js +0 -63
  438. package/dist/utils/progress-utils.js.map +0 -1
  439. package/dist/utils/security-utils.d.ts +0 -79
  440. package/dist/utils/security-utils.d.ts.map +0 -1
  441. package/dist/utils/security-utils.js +0 -152
  442. package/dist/utils/security-utils.js.map +0 -1
  443. package/dist/vector/VectorSearchManager.d.ts +0 -68
  444. package/dist/vector/VectorSearchManager.d.ts.map +0 -1
  445. package/dist/vector/VectorSearchManager.js +0 -316
  446. package/dist/vector/VectorSearchManager.js.map +0 -1
  447. package/src/database/SqliteAdapter.ts +0 -1633
  448. package/src/github/GitHubIntegration.ts +0 -1559
  449. package/src/handlers/resources/core.ts +0 -528
  450. package/src/transports/http.ts +0 -637
  451. package/src/types/sql.js.d.ts +0 -38
  452. /package/src/utils/{McpLogger.ts → mcp-logger.ts} +0 -0
package/.dockerignore CHANGED
@@ -43,6 +43,7 @@ eslint.config.js
43
43
  vitest.config.ts
44
44
  tests/
45
45
  coverage/
46
+ .test-output/
46
47
  dist/
47
48
 
48
49
  # -----------------------------------------------------------------------------
@@ -87,6 +88,7 @@ data/
87
88
  *.db-wal
88
89
  *.sqlite
89
90
  *.sqlite3
91
+ # Legacy vector index files (before sqlite-vec migration)
90
92
  .vectra_index/
91
93
  *.vectra/
92
94
 
@@ -97,7 +99,7 @@ temp/
97
99
  tmp/
98
100
  *.tmp
99
101
  *.temp
100
- backups/
102
+
101
103
 
102
104
  # -----------------------------------------------------------------------------
103
105
  # Logs
@@ -134,3 +136,4 @@ ENV/
134
136
  # Assets
135
137
  # -----------------------------------------------------------------------------
136
138
  social-preview.png
139
+
package/.gitattributes CHANGED
@@ -1,25 +1,14 @@
1
- # Auto-detect text files and normalize line endings
2
- * text=auto
1
+ # Enforce LF line endings for all text files
2
+ * text=auto eol=lf
3
3
 
4
- # Force LF for source files
5
- *.ts text eol=lf
6
- *.js text eol=lf
7
- *.json text eol=lf
8
- *.md text eol=lf
9
- *.yml text eol=lf
10
- *.yaml text eol=lf
11
- *.css text eol=lf
12
- *.html text eol=lf
4
+ # Windows-specific scripts that require CRLF
5
+ *.bat text eol=crlf
6
+ *.cmd text eol=crlf
13
7
 
14
8
  # Docker
15
9
  Dockerfile text eol=lf
16
10
  .dockerignore text eol=lf
17
11
 
18
- # Config
19
- .prettierrc text eol=lf
20
- .prettierignore text eol=lf
21
- .eslintrc* text eol=lf
22
- .gitignore text eol=lf
23
12
 
24
13
  # Explicitly binary
25
14
  *.db binary
@@ -27,3 +16,5 @@ Dockerfile text eol=lf
27
16
  *.png binary
28
17
  *.jpg binary
29
18
  *.ico binary
19
+
20
+ .github/workflows/*.lock.yml linguist-generated=true merge=ours
@@ -0,0 +1,14 @@
1
+ {
2
+ "entries": {
3
+ "actions/github-script@v8": {
4
+ "repo": "actions/github-script",
5
+ "version": "v8",
6
+ "sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
7
+ },
8
+ "github/gh-aw/actions/setup@v0.57.2": {
9
+ "repo": "github/gh-aw/actions/setup",
10
+ "version": "v0.57.2",
11
+ "sha": "32b3a711a9ee97d38e3989c90af0385aff0066a7"
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,122 @@
1
+ # Memory Journal MCP — Copilot Code Review Context
2
+
3
+ ## Project Overview
4
+
5
+ Memory Journal MCP is a TypeScript MCP (Model Context Protocol) server providing persistent memory for AI agents. It has **44 tools** across **10 groups** (core, search, analytics, relationships, export, admin, github, backup, team, codemode), **22 resources**, and **15 prompts**.
6
+
7
+ **Stack**: TypeScript, Vitest, Zod schemas, better-sqlite3 (SQLite), sqlite-vec (vector search), @huggingface/transformers (embeddings), @octokit/rest (GitHub API).
8
+
9
+ ## Session Context
10
+
11
+ Before starting work on this project, read `memory://briefing` from the `memory-journal-mcp` server for real-time context:
12
+
13
+ - **Recent journal entries** — what was just worked on by the development agent
14
+ - **GitHub status** — open issues, PRs, CI status, milestones
15
+ - **Workflow runs** — recent CI/CD results
16
+ - **Copilot review summaries** — your own recent review findings
17
+
18
+ For detailed session handoff context, search for entries tagged `session-summary` — these contain end-of-session notes from the development agent.
19
+
20
+ If you find issues during code review, use `create_entry` with tag `copilot-finding` to record them for the development agent to see in their next session briefing.
21
+
22
+ ## Coding Standards
23
+
24
+ ### Naming
25
+
26
+ - **Files and folders**: Always kebab-case (`database-adapter.ts`, `tool-filter.ts`, `copilot-tools.ts`)
27
+ - **Never** PascalCase or camelCase for filenames
28
+
29
+ ### Modularity
30
+
31
+ - **File size limit**: Source files stay under ~500 lines
32
+ - **Split pattern**: `foo.ts` → `foo/` directory with sub-modules + `foo/index.ts` barrel re-export
33
+ - **Logical grouping**: Split by functional cohesion, not arbitrary line counts
34
+
35
+ ### Type Safety
36
+
37
+ - **Strict TypeScript** — `tsconfig.json` enforces strict mode
38
+ - **Never use `eslint-disable`** to evade standards
39
+ - **Zod schemas** for all tool input validation
40
+ - **Output schemas** — All tools have Zod output schemas; error responses must pass validation
41
+ - **Dual-schema pattern** — Relaxed schemas for SDK registration (to handle MCP client coercion), strict schemas inside handlers
42
+
43
+ ### Error Handling
44
+
45
+ All tool handlers return structured error responses — never raw exceptions:
46
+
47
+ ```typescript
48
+ {
49
+ success: false,
50
+ error: string, // Human-readable message
51
+ code: string, // Module-prefixed code (e.g., "ENTRY_NOT_FOUND")
52
+ category: string, // ErrorCategory enum (validation, connection, query, etc.)
53
+ suggestion: string, // Actionable fix for the agent
54
+ recoverable: boolean // true = user can fix, false = server error
55
+ }
56
+ ```
57
+
58
+ - Use `formatHandlerErrorResponse()` from `src/utils/error-helpers.ts` for enriched errors
59
+ - Use `MemoryJournalMcpError` subclasses (`ValidationError`, `ResourceNotFoundError`, etc.) for typed errors
60
+ - Existing `formatHandlerError()` preserved for backward compatibility
61
+
62
+ ### Database
63
+
64
+ - Schema migrations in `src/database/schema.ts` via `migrateSchema()`
65
+ - Backward compatible — never break existing data
66
+ - Consider index implications for new queries
67
+
68
+ ## Architecture
69
+
70
+ ```
71
+ src/
72
+ ├── cli.ts # CLI entry point (Commander)
73
+ ├── index.ts # Library entry point
74
+ ├── auth/ # OAuth 2.1 authentication
75
+ ├── codemode/ # Sandboxed JS execution engine
76
+ ├── constants/
77
+ │ ├── server-instructions.md # Source for server instructions
78
+ │ └── server-instructions.ts # Auto-generated (npm run generate:instructions)
79
+ ├── database/
80
+ │ ├── adapter-factory.ts # Database adapter factory
81
+ │ ├── core/ # Core database types and interfaces
82
+ │ └── sqlite-adapter/ # SQLite operations via better-sqlite3
83
+ ├── filtering/
84
+ │ └── tool-filter.ts # Tool filtering (groups, meta-groups)
85
+ ├── github/
86
+ │ └── github-integration/ # GitHub API (@octokit/rest + GraphQL)
87
+ ├── handlers/
88
+ │ ├── tools/ # 44 tool handlers (10 groups)
89
+ │ ├── resources/ # 22 resource handlers
90
+ │ └── prompts/ # 15 prompt handlers
91
+ ├── server/
92
+ │ ├── mcp-server.ts # MCP server setup
93
+ │ ├── registration.ts # Tool/resource/prompt registration
94
+ │ └── scheduler.ts # Recurring task scheduler
95
+ ├── transports/
96
+ │ └── http/ # HTTP/SSE transport (modularized)
97
+ ├── types/ # Type definitions + barrel
98
+ ├── utils/ # Logger, error helpers, progress
99
+ └── vector/ # Semantic search (sqlite-vec + transformers)
100
+ ```
101
+
102
+ ## Key Reference Files
103
+
104
+ | File | Purpose |
105
+ | -------------------------------------- | ----------------------------------------------------- |
106
+ | `src/constants/server-instructions.md` | Full tool parameter reference and behavioral guidance |
107
+ | `docs/code-map.md` | File → tool/handler mapping |
108
+ | `docs/tool-reference.md` | Categorized 44-tool inventory |
109
+ | `CONTRIBUTING.md` | Development setup and PR guidelines |
110
+
111
+ ## Review Checklist
112
+
113
+ When reviewing PRs, check for:
114
+
115
+ - [ ] Hardcoded tool/group counts — should be dynamic or use `getAllToolNames().length`
116
+ - [ ] Missing barrel exports in `src/types/index.ts` when new types are added
117
+ - [ ] `eslint-disable` usage — always forbidden
118
+ - [ ] Raw exceptions from tool handlers — must use `formatHandlerErrorResponse()`
119
+ - [ ] Files approaching 500 lines — flag for splitting
120
+ - [ ] New tools missing from `src/filtering/ToolFilter.ts` TOOL_GROUPS
121
+ - [ ] Missing Zod output schemas on new tools
122
+ - [ ] Kebab-case violations in new filenames
@@ -1,6 +1,5 @@
1
1
  # Dependabot configuration for Memory Journal MCP Server
2
- # v3.0.0+ is a TypeScript/Node.js project (npm dependencies)
3
- # The Python codebase is deprecated and archived in archive/python-v2
2
+ # TypeScript/Node.js project npm, github-actions, and docker ecosystems only
4
3
 
5
4
  version: 2
6
5
  updates:
@@ -28,14 +27,13 @@ updates:
28
27
  - 'patch'
29
28
  ml-packages:
30
29
  patterns:
31
- - '@xenova/*'
32
- - 'vectra*'
30
+ - '@huggingface/*'
31
+ - 'sqlite-vec*'
33
32
  update-types:
34
33
  - 'minor'
35
34
  - 'patch'
36
35
  database:
37
36
  patterns:
38
- - 'sql.js*'
39
37
  - 'better-sqlite3*'
40
38
  update-types:
41
39
  - 'minor'
@@ -0,0 +1,133 @@
1
+ # CI/CD Workflows
2
+
3
+ This directory contains all GitHub Actions workflows for the **memory-journal-mcp** project. The pipeline is organized into three layers: continuous integration, security scanning, and automated release/publishing.
4
+
5
+ ## Workflow Map
6
+
7
+ ```mermaid
8
+ flowchart LR
9
+ subgraph Triggers["Triggers"]
10
+ Push["push to main"]
11
+ PR["pull_request"]
12
+ Tag["release published"]
13
+ Sched["schedule (cron)"]
14
+ Manual["workflow_dispatch"]
15
+ end
16
+
17
+ subgraph CI["CI"]
18
+ LT["lint-and-test"]
19
+ end
20
+
21
+ subgraph Security["Security"]
22
+ CQL["codeql"]
23
+ SS["secrets-scanning"]
24
+ SU["security-update"]
25
+ end
26
+
27
+ subgraph Release["Release"]
28
+ AR["auto-release"]
29
+ NPM["publish-npm"]
30
+ DP["docker-publish"]
31
+ end
32
+
33
+ subgraph Agentic["Agentic Workflows (Copilot)"]
34
+ DM["dependency-maintenance"]
35
+ CHM["ci-health-monitor"]
36
+ DDD["docs-drift-detector"]
37
+ AM["agentics-maintenance"]
38
+ end
39
+
40
+ Push --> LT
41
+ PR --> LT
42
+ Push --> CQL
43
+ Push --> SS
44
+ Push --> SU
45
+ LT -->|workflow_run success| DP
46
+ Push -->|commit contains '[deps]'| AR
47
+ AR -->|creates release| NPM
48
+ Tag --> NPM
49
+ Sched --> CQL
50
+ Sched --> SU
51
+ Sched --> DM
52
+ Sched --> CHM
53
+ Sched --> AM
54
+ PR --> DDD
55
+ Manual --> SU
56
+ Manual --> DM
57
+ Manual --> CHM
58
+ Manual --> AM
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Workflows
64
+
65
+ ### CI
66
+
67
+ | File | Trigger | Purpose |
68
+ | -------------------------------------- | ------------------- | ----------------------------------------------------------------------- |
69
+ | [lint-and-test.yml](lint-and-test.yml) | push / PR to `main` | Lint, typecheck, build, unit tests (Node 24.x + 25.x matrix), npm audit |
70
+
71
+ ### Security
72
+
73
+ | File | Trigger | Purpose |
74
+ | -------------------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
75
+ | [codeql.yml](codeql.yml) | push / PR / weekly (Mon 02:23 UTC) | CodeQL static analysis for `javascript-typescript` and `actions` |
76
+ | [secrets-scanning.yml](secrets-scanning.yml) | push / PR | TruffleHog (verified secrets) + Gitleaks scanning |
77
+ | [security-update.yml](security-update.yml) | push (Dockerfile/package changes) / weekly (Sun 02:00 UTC) / manual | Docker image Trivy scan (CRITICAL/HIGH/MEDIUM), SARIF upload, auto-creates GitHub issue on failure |
78
+
79
+ ### Release & Publishing
80
+
81
+ | File | Trigger | Purpose |
82
+ | ---------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
83
+ | [auto-release.yml](auto-release.yml) | push to `main` with `[deps]` in commit message | Creates git tag + GitHub release for dependency-maintenance patch bumps |
84
+ | [publish-npm.yml](publish-npm.yml) | release published / manual | Publishes to npm with version verification |
85
+ | [docker-publish.yml](docker-publish.yml) | `lint-and-test` workflow_run success on `main` | Multi-arch Docker build (amd64 + arm64), Docker Scout scan, manifest merge, Docker Hub description update |
86
+
87
+ ### Agentic Workflows (GitHub Copilot)
88
+
89
+ These are AI-powered workflows using [GitHub Copilot Coding Agent](https://docs.github.com/en/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot). Each `.md` file contains the agent prompt; the corresponding `.lock.yml` is the auto-generated compiled workflow (**do not edit `.lock.yml` files**).
90
+
91
+ | Prompt | Lock File | Schedule | Purpose |
92
+ | ------------------------------------------------------ | ------------------------------------------------------------------ | -------------------- | -------------------------------------------------------------------------------------------------- |
93
+ | [dependency-maintenance.md](dependency-maintenance.md) | [dependency-maintenance.lock.yml](dependency-maintenance.lock.yml) | Mon 14:00 UTC | Batch-updates npm, Dockerfile patches, Alpine packages; validates, bumps patch version, creates PR |
94
+ | [ci-health-monitor.md](ci-health-monitor.md) | [ci-health-monitor.lock.yml](ci-health-monitor.lock.yml) | Wed 14:00 UTC | Audits workflows for deprecated actions, Node.js runtime issues, stale Dependabot config |
95
+ | [docs-drift-detector.md](docs-drift-detector.md) | [docs-drift-detector.lock.yml](docs-drift-detector.lock.yml) | PR (on code changes) | Audits README, DOCKER_README, CONTRIBUTING for drift against code changes |
96
+ | [agentics-maintenance.yml](agentics-maintenance.yml) | — | Daily 00:37 UTC | Auto-closes expired discussions, issues, and PRs created by agentic workflows |
97
+
98
+ ---
99
+
100
+ ## Release Pipeline
101
+
102
+ The full release flow for dependency updates:
103
+
104
+ ```
105
+ dependency-maintenance (Copilot)
106
+ → creates PR with [deps] prefix
107
+ → lint-and-test runs on PR
108
+ → Copilot reviews + human merge
109
+ → auto-release (creates tag + GitHub release)
110
+ → publish-npm (triggered by release event)
111
+ → docker-publish (triggered by lint-and-test on main)
112
+ ```
113
+
114
+ For manual releases (feature/breaking changes), the maintainer runs `/bump-deploy` locally which pushes a tag and creates a GitHub release, triggering npm and Docker publish.
115
+
116
+ ---
117
+
118
+ ## Secrets Required
119
+
120
+ | Secret | Used By | Purpose |
121
+ | ----------------- | --------------------------------------------------- | ------------------------------ |
122
+ | `GITHUB_TOKEN` | auto-release, security-update, agentics-maintenance | Git operations, issue creation |
123
+ | `NPM_TOKEN` | publish-npm | npm registry authentication |
124
+ | `DOCKER_USERNAME` | docker-publish | Docker Hub login |
125
+ | `DOCKER_PASSWORD` | docker-publish | Docker Hub login |
126
+
127
+ ---
128
+
129
+ ## Editing Guidelines
130
+
131
+ - **YAML workflows** — edit directly, commit to `main` or via PR
132
+ - **Agentic `.md` prompts** — edit the `.md` file, then run `gh aw compile` to regenerate the `.lock.yml`
133
+ - **`.lock.yml` files** — **never edit manually**; always regenerate via `gh aw compile`
@@ -0,0 +1,141 @@
1
+ #
2
+ # ___ _ _
3
+ # / _ \ | | (_)
4
+ # | |_| | __ _ ___ _ __ | |_ _ ___
5
+ # | _ |/ _` |/ _ \ '_ \| __| |/ __|
6
+ # | | | | (_| | __/ | | | |_| | (__
7
+ # \_| |_/\__, |\___|_| |_|\__|_|\___|
8
+ # __/ |
9
+ # _ _ |___/
10
+ # | | | | / _| |
11
+ # | | | | ___ _ __ _ __| |_| | _____ ____
12
+ # | |/\| |/ _ \ '__| |/ /| _| |/ _ \ \ /\ / / ___|
13
+ # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \
14
+ # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/
15
+ #
16
+ # This file was automatically generated by pkg/workflow/maintenance_workflow.go (v0.57.2). DO NOT EDIT.
17
+ #
18
+ # To regenerate this workflow, run:
19
+ # gh aw compile
20
+ # Not all edits will cause changes to this file.
21
+ #
22
+ # For more information: https://github.github.com/gh-aw/introduction/overview/
23
+ #
24
+ # Alternative regeneration methods:
25
+ # make recompile
26
+ #
27
+ # Or use the gh-aw CLI directly:
28
+ # ./gh-aw compile --validate --verbose
29
+ #
30
+ # The workflow is generated when any workflow uses the 'expires' field
31
+ # in create-discussions, create-issues, or create-pull-request safe-outputs configuration.
32
+ # Schedule frequency is automatically determined by the shortest expiration time.
33
+ #
34
+ name: Agentic Maintenance
35
+
36
+ on:
37
+ schedule:
38
+ - cron: '37 0 * * *' # Daily (based on minimum expires: 14 days)
39
+ workflow_dispatch:
40
+ inputs:
41
+ operation:
42
+ description: 'Optional maintenance operation to run'
43
+ required: false
44
+ type: choice
45
+ default: ''
46
+ options:
47
+ - ''
48
+ - 'disable'
49
+ - 'enable'
50
+ - 'update'
51
+ - 'upgrade'
52
+
53
+ permissions: {}
54
+
55
+ jobs:
56
+ close-expired-entities:
57
+ if: ${{ !github.event.repository.fork && (github.event_name != 'workflow_dispatch' || github.event.inputs.operation == '') }}
58
+ runs-on: ubuntu-slim
59
+ permissions:
60
+ discussions: write
61
+ issues: write
62
+ pull-requests: write
63
+ steps:
64
+ - name: Setup Scripts
65
+ uses: github/gh-aw/actions/setup@fa061e89469ef007881d22d3af5a8c9e62363a0d # v0.58.1
66
+ with:
67
+ destination: /opt/gh-aw/actions
68
+
69
+ - name: Close expired discussions
70
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
71
+ with:
72
+ script: |
73
+ const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
74
+ setupGlobals(core, github, context, exec, io);
75
+ const { main } = require('/opt/gh-aw/actions/close_expired_discussions.cjs');
76
+ await main();
77
+
78
+ - name: Close expired issues
79
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
80
+ with:
81
+ script: |
82
+ const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
83
+ setupGlobals(core, github, context, exec, io);
84
+ const { main } = require('/opt/gh-aw/actions/close_expired_issues.cjs');
85
+ await main();
86
+
87
+ - name: Close expired pull requests
88
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
89
+ with:
90
+ script: |
91
+ const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
92
+ setupGlobals(core, github, context, exec, io);
93
+ const { main } = require('/opt/gh-aw/actions/close_expired_pull_requests.cjs');
94
+ await main();
95
+
96
+ run_operation:
97
+ if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.operation != '' && !github.event.repository.fork }}
98
+ runs-on: ubuntu-slim
99
+ permissions:
100
+ actions: write
101
+ contents: write
102
+ pull-requests: write
103
+ steps:
104
+ - name: Checkout repository
105
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
106
+ with:
107
+ persist-credentials: false
108
+
109
+ - name: Setup Scripts
110
+ uses: github/gh-aw/actions/setup@fa061e89469ef007881d22d3af5a8c9e62363a0d # v0.58.1
111
+ with:
112
+ destination: /opt/gh-aw/actions
113
+
114
+ - name: Check admin/maintainer permissions
115
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
116
+ with:
117
+ github-token: ${{ secrets.GITHUB_TOKEN }}
118
+ script: |
119
+ const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
120
+ setupGlobals(core, github, context, exec, io);
121
+ const { main } = require('/opt/gh-aw/actions/check_team_member.cjs');
122
+ await main();
123
+
124
+ - name: Install gh-aw
125
+ uses: github/gh-aw/actions/setup-cli@v0.58.1
126
+ with:
127
+ version: v0.57.2
128
+
129
+ - name: Run operation
130
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
131
+ env:
132
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
133
+ GH_AW_OPERATION: ${{ github.event.inputs.operation }}
134
+ GH_AW_CMD_PREFIX: gh aw
135
+ with:
136
+ github-token: ${{ secrets.GITHUB_TOKEN }}
137
+ script: |
138
+ const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs');
139
+ setupGlobals(core, github, context, exec, io);
140
+ const { main } = require('/opt/gh-aw/actions/run_operation_update_upgrade.cjs');
141
+ await main();
@@ -0,0 +1,68 @@
1
+ name: Auto Release on Merge
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ permissions:
8
+ contents: write
9
+
10
+ jobs:
11
+ auto-release:
12
+ # Only run for dependency maintenance merges (patch bumps)
13
+ if: contains(github.event.head_commit.message, '[deps]') || contains(github.event.head_commit.message, 'Dependency updates and security patches')
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
18
+ with:
19
+ fetch-depth: 0
20
+
21
+ - name: Extract version from package.json
22
+ id: version
23
+ run: |
24
+ VERSION=$(jq -r '.version' package.json)
25
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
26
+ echo "tag=v$VERSION" >> $GITHUB_OUTPUT
27
+ echo "Detected version: $VERSION"
28
+
29
+ - name: Check if tag already exists
30
+ id: check-tag
31
+ run: |
32
+ if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
33
+ echo "exists=true" >> $GITHUB_OUTPUT
34
+ echo "Tag v${{ steps.version.outputs.version }} already exists, skipping"
35
+ else
36
+ echo "exists=false" >> $GITHUB_OUTPUT
37
+ echo "Tag v${{ steps.version.outputs.version }} does not exist, will create"
38
+ fi
39
+
40
+ - name: Create git tag
41
+ if: steps.check-tag.outputs.exists == 'false'
42
+ run: |
43
+ git config user.name "github-actions[bot]"
44
+ git config user.email "github-actions[bot]@users.noreply.github.com"
45
+ git tag -a "v${{ steps.version.outputs.version }}" -m "Release v${{ steps.version.outputs.version }} - Dependency updates and security patches"
46
+ git push origin "v${{ steps.version.outputs.version }}"
47
+
48
+ - name: Create GitHub release
49
+ if: steps.check-tag.outputs.exists == 'false'
50
+ env:
51
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52
+ run: |
53
+ VERSION="${{ steps.version.outputs.version }}"
54
+ RELEASE_FILE="releases/v${VERSION}.md"
55
+
56
+ if [ -f "$RELEASE_FILE" ]; then
57
+ gh release create "v${VERSION}" \
58
+ --title "v${VERSION} - Dependency updates and security patches" \
59
+ --notes-file "$RELEASE_FILE"
60
+ else
61
+ gh release create "v${VERSION}" \
62
+ --title "v${VERSION} - Dependency updates and security patches" \
63
+ --generate-notes
64
+ fi
65
+
66
+ echo "✅ Release v${VERSION} created"
67
+ echo "📦 npm publish will be triggered by the release event"
68
+ echo "🐳 Docker publish will be triggered by lint-and-test on main"