memory-journal-mcp 5.1.0 → 6.0.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.
- package/.dockerignore +9 -1
- package/.gitattributes +7 -16
- package/.github/aw/actions-lock.json +14 -0
- package/.github/copilot-instructions.md +122 -0
- package/.github/dependabot.yml +3 -5
- package/.github/workflows/README.md +133 -0
- package/.github/workflows/agentics-maintenance.yml +141 -0
- package/.github/workflows/auto-release.yml +68 -0
- package/.github/workflows/ci-health-monitor.lock.yml +1121 -0
- package/.github/workflows/ci-health-monitor.md +87 -0
- package/.github/workflows/codeql.yml +4 -4
- package/.github/workflows/dependency-maintenance.lock.yml +1182 -0
- package/.github/workflows/dependency-maintenance.md +147 -0
- package/.github/workflows/docker-publish.yml +17 -17
- package/.github/workflows/docs-drift-detector.lock.yml +1142 -0
- package/.github/workflows/docs-drift-detector.md +115 -0
- package/.github/workflows/lint-and-test.yml +4 -4
- package/.github/workflows/publish-npm.yml +2 -2
- package/.github/workflows/secrets-scanning.yml +3 -3
- package/.github/workflows/security-update.yml +7 -7
- package/CHANGELOG.md +342 -63
- package/CONTRIBUTING.md +24 -13
- package/DOCKER_README.md +155 -272
- package/Dockerfile +9 -10
- package/LICENSE +2 -2
- package/README.md +241 -139
- package/SECURITY.md +26 -16
- package/UNRELEASED.md +1 -0
- package/dist/chunk-V57MTY4E.js +12251 -0
- package/dist/cli.d.ts +2 -5
- package/dist/cli.js +150 -70
- package/dist/index.d.ts +647 -8
- package/dist/index.js +10 -13
- package/dist/worker-script.d.ts +2 -0
- package/dist/worker-script.js +133 -0
- package/docs/README.md +20 -0
- package/docs/agentic-journal-synergy.md +175 -0
- package/docs/code-map.md +298 -0
- package/docs/copilot-setup.md +72 -0
- package/docs/team-crud-expansion.md +117 -0
- package/docs/tool-reference.md +179 -0
- package/package.json +16 -13
- package/playwright.config.ts +7 -1
- package/releases/v5.1.1.md +10 -0
- package/releases/v6.0.0.md +48 -0
- package/scripts/generate-server-instructions.ts +4 -4
- package/scripts/server-instructions-function-body.ts +0 -2
- package/server.json +3 -3
- package/social-preview.png +0 -0
- package/src/auth/auth-context.ts +78 -0
- package/src/auth/authorization-server-discovery.ts +263 -0
- package/src/auth/errors.ts +215 -0
- package/src/auth/index.ts +58 -0
- package/src/auth/middleware.ts +392 -0
- package/src/auth/oauth-resource-server.ts +170 -0
- package/src/auth/scope-map.ts +46 -0
- package/src/auth/scopes.ts +256 -0
- package/src/auth/token-validator.ts +293 -0
- package/src/auth/transport-agnostic.ts +164 -0
- package/src/auth/types.ts +372 -0
- package/src/cli.ts +156 -16
- package/src/codemode/api-constants.ts +228 -0
- package/src/codemode/api.ts +302 -0
- package/src/codemode/index.ts +47 -0
- package/src/codemode/sandbox-factory.ts +144 -0
- package/src/codemode/sandbox.ts +219 -0
- package/src/codemode/security.ts +155 -0
- package/src/codemode/types.ts +228 -0
- package/src/codemode/worker-sandbox.ts +277 -0
- package/src/codemode/worker-script.ts +214 -0
- package/src/constants/server-instructions.md +82 -17
- package/src/constants/{ServerInstructions.ts → server-instructions.ts} +84 -20
- package/src/database/adapter-factory.ts +16 -0
- package/src/database/core/entry-columns.ts +10 -0
- package/src/database/core/interfaces.ts +186 -0
- package/src/database/{schema.ts → core/schema.ts} +26 -2
- package/src/database/sqlite-adapter/backup.ts +167 -0
- package/src/database/sqlite-adapter/entries/crud.ts +233 -0
- package/src/database/sqlite-adapter/entries/importance.ts +76 -0
- package/src/database/sqlite-adapter/entries/index.ts +140 -0
- package/src/database/sqlite-adapter/entries/search.ts +236 -0
- package/src/database/sqlite-adapter/entries/shared.ts +102 -0
- package/src/database/sqlite-adapter/entries/statistics.ts +162 -0
- package/src/database/sqlite-adapter/index.ts +263 -0
- package/src/database/sqlite-adapter/native-connection.ts +296 -0
- package/src/database/sqlite-adapter/relationships.ts +70 -0
- package/src/database/sqlite-adapter/tags.ts +182 -0
- package/src/filtering/{ToolFilter.ts → tool-filter.ts} +4 -1
- package/src/github/github-integration/client.ts +114 -0
- package/src/github/github-integration/index.ts +297 -0
- package/src/github/github-integration/insights.ts +155 -0
- package/src/github/github-integration/issues.ts +213 -0
- package/src/github/github-integration/milestones.ts +262 -0
- package/src/github/github-integration/projects.ts +414 -0
- package/src/github/github-integration/pull-requests.ts +235 -0
- package/src/github/github-integration/repository.ts +110 -0
- package/src/github/github-integration/types.ts +43 -0
- package/src/handlers/prompts/github.ts +14 -13
- package/src/handlers/prompts/index.ts +7 -7
- package/src/handlers/prompts/workflow.ts +21 -16
- package/src/handlers/resources/core/briefing/context-section.ts +182 -0
- package/src/handlers/resources/core/briefing/github-section.ts +354 -0
- package/src/handlers/resources/core/briefing/index.ts +103 -0
- package/src/handlers/resources/core/briefing/user-message.ts +114 -0
- package/src/handlers/resources/core/health.ts +74 -0
- package/src/handlers/resources/core/index.ts +25 -0
- package/src/handlers/resources/core/instructions.ts +38 -0
- package/src/handlers/resources/core/utilities.ts +103 -0
- package/src/handlers/resources/github.ts +132 -149
- package/src/handlers/resources/graph.ts +8 -36
- package/src/handlers/resources/index.ts +13 -10
- package/src/handlers/resources/shared.ts +122 -10
- package/src/handlers/resources/team.ts +10 -8
- package/src/handlers/resources/templates.ts +9 -32
- package/src/handlers/tools/admin.ts +86 -50
- package/src/handlers/tools/analytics.ts +147 -122
- package/src/handlers/tools/backup.ts +69 -50
- package/src/handlers/tools/codemode.ts +188 -0
- package/src/handlers/tools/core.ts +77 -87
- package/src/handlers/tools/error-fields-mixin.ts +26 -0
- package/src/handlers/tools/export.ts +37 -21
- package/src/handlers/tools/github/copilot-tools.ts +72 -0
- package/src/handlers/tools/github/helpers.ts +16 -7
- package/src/handlers/tools/github/insights-tools.ts +13 -20
- package/src/handlers/tools/github/issue-tools.ts +17 -14
- package/src/handlers/tools/github/milestone-tools.ts +1 -45
- package/src/handlers/tools/github/read-tools.ts +5 -53
- package/src/handlers/tools/github/schemas.ts +332 -267
- package/src/handlers/tools/github.ts +5 -2
- package/src/handlers/tools/index.ts +25 -15
- package/src/handlers/tools/relationships.ts +54 -43
- package/src/handlers/tools/schemas.ts +69 -40
- package/src/handlers/tools/search.ts +95 -60
- package/src/handlers/tools/team.ts +120 -90
- package/src/index.ts +3 -2
- package/src/server/{McpServer.ts → mcp-server.ts} +123 -189
- package/src/server/registration.ts +141 -0
- package/src/server/{Scheduler.ts → scheduler.ts} +23 -19
- package/src/transports/http/handlers.ts +78 -0
- package/src/transports/http/index.ts +8 -0
- package/src/transports/http/security.ts +147 -0
- package/src/transports/http/server/index.ts +340 -0
- package/src/transports/http/server/legacy-sse.ts +87 -0
- package/src/transports/http/server/stateful.ts +221 -0
- package/src/transports/http/server/stateless.ts +42 -0
- package/src/transports/http/types.ts +132 -0
- package/src/types/error-types.ts +92 -0
- package/src/types/errors.ts +186 -0
- package/src/types/filtering.ts +1 -0
- package/src/types/github.ts +36 -0
- package/src/types/index.ts +35 -5
- package/src/utils/error-helpers.ts +33 -11
- package/src/utils/github-helpers.ts +33 -0
- package/src/utils/security-utils.ts +40 -12
- package/src/utils/vector-index-helpers.ts +24 -0
- package/src/vector/{VectorSearchManager.ts → vector-search-manager.ts} +139 -126
- package/test-server/README.md +165 -0
- package/test-server/test-instruction-levels.mjs +102 -0
- package/test-server/test-scheduler.mjs +174 -0
- package/test-server/test-tool-annotations.mjs +115 -0
- package/test-server/test-tools-codemode.md +632 -0
- package/test-server/test-tools-codemode2.md +915 -0
- package/test-server/test-tools.md +729 -0
- package/test-server/test-tools2.md +422 -0
- package/tests/auth/auth-context.test.ts +162 -0
- package/tests/auth/authorization-server-discovery.test.ts +265 -0
- package/tests/auth/errors.test.ts +170 -0
- package/tests/auth/middleware.test.ts +585 -0
- package/tests/auth/oauth-resource-server.test.ts +152 -0
- package/tests/auth/scope-map.test.ts +66 -0
- package/tests/auth/scopes.test.ts +347 -0
- package/tests/auth/token-validator.test.ts +271 -0
- package/tests/codemode/api.test.ts +313 -0
- package/tests/codemode/codemode-tool-handlers.test.ts +197 -0
- package/tests/codemode/sandbox-factory.test.ts +152 -0
- package/tests/codemode/sandbox.test.ts +104 -0
- package/tests/codemode/security.test.ts +242 -0
- package/tests/constants/server-instructions.test.ts +18 -89
- package/tests/database/crud-workflow-branches.test.ts +418 -0
- package/tests/database/database-branches.test.ts +132 -0
- package/tests/database/entries-auth-branches.test.ts +392 -0
- package/tests/database/native-connection.test.ts +187 -0
- package/tests/database/shared-helpers.test.ts +103 -0
- package/tests/database/sqlite-adapter.bench.ts +3 -3
- package/tests/database/sqlite-adapter.test.ts +20 -20
- package/tests/e2e/auth.spec.ts +3 -51
- package/tests/e2e/helpers.ts +139 -0
- package/tests/e2e/oauth-discovery.spec.ts +102 -0
- package/tests/e2e/payloads-admin.spec.ts +76 -0
- package/tests/e2e/payloads-analytics.spec.ts +37 -0
- package/tests/e2e/payloads-backup.spec.ts +44 -0
- package/tests/e2e/payloads-codemode.spec.ts +116 -0
- package/tests/e2e/payloads-core.spec.ts +82 -0
- package/tests/e2e/payloads-export.spec.ts +44 -0
- package/tests/e2e/payloads-relationships.spec.ts +56 -0
- package/tests/e2e/payloads-search.spec.ts +64 -0
- package/tests/e2e/prompts.spec.ts +62 -0
- package/tests/e2e/rate-limiting.spec.ts +291 -0
- package/tests/e2e/resources-expanded.spec.ts +83 -0
- package/tests/e2e/security.spec.ts +24 -3
- package/tests/e2e/session-advanced.spec.ts +154 -0
- package/tests/e2e/stateless.spec.ts +3 -45
- package/tests/e2e/streaming.spec.ts +176 -0
- package/tests/e2e/tool-filtering.spec.ts +77 -0
- package/tests/filtering/tool-filter.test.ts +1 -1
- package/tests/github/client-issues-errors.test.ts +433 -0
- package/tests/github/github-integration-branches.test.ts +490 -0
- package/tests/github/github-integration.test.ts +12 -12
- package/tests/github/github-managers-branches.test.ts +907 -0
- package/tests/github/pull-requests.test.ts +334 -0
- package/tests/handlers/analytics-branches.test.ts +222 -0
- package/tests/handlers/backup-branches.test.ts +270 -0
- package/tests/handlers/briefing-context-section.test.ts +388 -0
- package/tests/handlers/briefing-github-section.test.ts +392 -0
- package/tests/handlers/briefing-user-message.test.ts +405 -0
- package/tests/handlers/copilot-tools.test.ts +126 -0
- package/tests/handlers/error-path-coverage.test.ts +3 -3
- package/tests/handlers/export-tools.test.ts +203 -0
- package/tests/handlers/github-resource-handlers.test.ts +23 -33
- package/tests/handlers/github-tool-handlers.test.ts +12 -15
- package/tests/handlers/handler-error-branches.test.ts +346 -0
- package/tests/handlers/prompt-handler-coverage.test.ts +6 -4
- package/tests/handlers/prompt-handlers.test.ts +3 -3
- package/tests/handlers/resource-handler-coverage.test.ts +7 -8
- package/tests/handlers/resource-handlers.test.ts +11 -17
- package/tests/handlers/resource-prompt-branches.test.ts +495 -0
- package/tests/handlers/search-tool-handlers.test.ts +5 -5
- package/tests/handlers/targeted-gap-closure.test.ts +5 -5
- package/tests/handlers/team-resource-handlers.test.ts +13 -8
- package/tests/handlers/team-tool-handlers.test.ts +5 -5
- package/tests/handlers/template-github-branches.test.ts +663 -0
- package/tests/handlers/tool-handler-coverage.test.ts +8 -8
- package/tests/handlers/tool-handlers.test.ts +16 -5
- package/tests/handlers/vector-tool-handlers.test.ts +12 -12
- package/tests/security/sql-injection.test.ts +6 -6
- package/tests/server/mcp-server.bench.ts +3 -3
- package/tests/server/mcp-server.test.ts +89 -34
- package/tests/server/scheduler.test.ts +5 -5
- package/tests/transports/http-legacy-sse.test.ts +275 -0
- package/tests/transports/http-security.test.ts +322 -0
- package/tests/transports/http-stateful.test.ts +490 -0
- package/tests/transports/http-transport-server.test.ts +301 -0
- package/tests/transports/http-transport.test.ts +104 -39
- package/tests/utils/github-helpers.test.ts +58 -0
- package/tests/utils/mcp-logger.test.ts +1 -1
- package/tests/vector/vector-search-branches.test.ts +111 -0
- package/tests/vector/vector-search-manager.test.ts +109 -126
- package/tests/vector/vector-search.bench.ts +7 -12
- package/tsconfig.json +1 -1
- package/tsup.config.ts +19 -0
- package/vitest.config.ts +1 -0
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/constants/ServerInstructions.d.ts +0 -59
- package/dist/constants/ServerInstructions.d.ts.map +0 -1
- package/dist/constants/ServerInstructions.js +0 -335
- package/dist/constants/ServerInstructions.js.map +0 -1
- package/dist/constants/icons.d.ts +0 -56
- package/dist/constants/icons.d.ts.map +0 -1
- package/dist/constants/icons.js +0 -157
- package/dist/constants/icons.js.map +0 -1
- package/dist/database/SqliteAdapter.d.ts +0 -311
- package/dist/database/SqliteAdapter.d.ts.map +0 -1
- package/dist/database/SqliteAdapter.js +0 -1280
- package/dist/database/SqliteAdapter.js.map +0 -1
- package/dist/database/schema.d.ts +0 -45
- package/dist/database/schema.d.ts.map +0 -1
- package/dist/database/schema.js +0 -95
- package/dist/database/schema.js.map +0 -1
- package/dist/filtering/ToolFilter.d.ts +0 -63
- package/dist/filtering/ToolFilter.d.ts.map +0 -1
- package/dist/filtering/ToolFilter.js +0 -250
- package/dist/filtering/ToolFilter.js.map +0 -1
- package/dist/github/GitHubIntegration.d.ts +0 -210
- package/dist/github/GitHubIntegration.d.ts.map +0 -1
- package/dist/github/GitHubIntegration.js +0 -1251
- package/dist/github/GitHubIntegration.js.map +0 -1
- package/dist/handlers/prompts/github.d.ts +0 -12
- package/dist/handlers/prompts/github.d.ts.map +0 -1
- package/dist/handlers/prompts/github.js +0 -178
- package/dist/handlers/prompts/github.js.map +0 -1
- package/dist/handlers/prompts/index.d.ts +0 -49
- package/dist/handlers/prompts/index.d.ts.map +0 -1
- package/dist/handlers/prompts/index.js +0 -55
- package/dist/handlers/prompts/index.js.map +0 -1
- package/dist/handlers/prompts/workflow.d.ts +0 -13
- package/dist/handlers/prompts/workflow.d.ts.map +0 -1
- package/dist/handlers/prompts/workflow.js +0 -312
- package/dist/handlers/prompts/workflow.js.map +0 -1
- package/dist/handlers/resources/core.d.ts +0 -11
- package/dist/handlers/resources/core.d.ts.map +0 -1
- package/dist/handlers/resources/core.js +0 -433
- package/dist/handlers/resources/core.js.map +0 -1
- package/dist/handlers/resources/github.d.ts +0 -11
- package/dist/handlers/resources/github.d.ts.map +0 -1
- package/dist/handlers/resources/github.js +0 -314
- package/dist/handlers/resources/github.js.map +0 -1
- package/dist/handlers/resources/graph.d.ts +0 -11
- package/dist/handlers/resources/graph.d.ts.map +0 -1
- package/dist/handlers/resources/graph.js +0 -204
- package/dist/handlers/resources/graph.js.map +0 -1
- package/dist/handlers/resources/index.d.ts +0 -26
- package/dist/handlers/resources/index.d.ts.map +0 -1
- package/dist/handlers/resources/index.js +0 -109
- package/dist/handlers/resources/index.js.map +0 -1
- package/dist/handlers/resources/shared.d.ts +0 -60
- package/dist/handlers/resources/shared.d.ts.map +0 -1
- package/dist/handlers/resources/shared.js +0 -49
- package/dist/handlers/resources/shared.js.map +0 -1
- package/dist/handlers/resources/team.d.ts +0 -13
- package/dist/handlers/resources/team.d.ts.map +0 -1
- package/dist/handlers/resources/team.js +0 -119
- package/dist/handlers/resources/team.js.map +0 -1
- package/dist/handlers/resources/templates.d.ts +0 -13
- package/dist/handlers/resources/templates.d.ts.map +0 -1
- package/dist/handlers/resources/templates.js +0 -310
- package/dist/handlers/resources/templates.js.map +0 -1
- package/dist/handlers/tools/admin.d.ts +0 -8
- package/dist/handlers/tools/admin.d.ts.map +0 -1
- package/dist/handlers/tools/admin.js +0 -270
- package/dist/handlers/tools/admin.js.map +0 -1
- package/dist/handlers/tools/analytics.d.ts +0 -8
- package/dist/handlers/tools/analytics.d.ts.map +0 -1
- package/dist/handlers/tools/analytics.js +0 -268
- package/dist/handlers/tools/analytics.js.map +0 -1
- package/dist/handlers/tools/backup.d.ts +0 -8
- package/dist/handlers/tools/backup.d.ts.map +0 -1
- package/dist/handlers/tools/backup.js +0 -224
- package/dist/handlers/tools/backup.js.map +0 -1
- package/dist/handlers/tools/core.d.ts +0 -9
- package/dist/handlers/tools/core.d.ts.map +0 -1
- package/dist/handlers/tools/core.js +0 -336
- package/dist/handlers/tools/core.js.map +0 -1
- package/dist/handlers/tools/export.d.ts +0 -8
- package/dist/handlers/tools/export.d.ts.map +0 -1
- package/dist/handlers/tools/export.js +0 -108
- package/dist/handlers/tools/export.js.map +0 -1
- package/dist/handlers/tools/github/helpers.d.ts +0 -34
- package/dist/handlers/tools/github/helpers.d.ts.map +0 -1
- package/dist/handlers/tools/github/helpers.js +0 -60
- package/dist/handlers/tools/github/helpers.js.map +0 -1
- package/dist/handlers/tools/github/insights-tools.d.ts +0 -8
- package/dist/handlers/tools/github/insights-tools.d.ts.map +0 -1
- package/dist/handlers/tools/github/insights-tools.js +0 -104
- package/dist/handlers/tools/github/insights-tools.js.map +0 -1
- package/dist/handlers/tools/github/issue-tools.d.ts +0 -8
- package/dist/handlers/tools/github/issue-tools.d.ts.map +0 -1
- package/dist/handlers/tools/github/issue-tools.js +0 -359
- package/dist/handlers/tools/github/issue-tools.js.map +0 -1
- package/dist/handlers/tools/github/kanban-tools.d.ts +0 -8
- package/dist/handlers/tools/github/kanban-tools.d.ts.map +0 -1
- package/dist/handlers/tools/github/kanban-tools.js +0 -109
- package/dist/handlers/tools/github/kanban-tools.js.map +0 -1
- package/dist/handlers/tools/github/milestone-tools.d.ts +0 -9
- package/dist/handlers/tools/github/milestone-tools.d.ts.map +0 -1
- package/dist/handlers/tools/github/milestone-tools.js +0 -303
- package/dist/handlers/tools/github/milestone-tools.js.map +0 -1
- package/dist/handlers/tools/github/mutation-tools.d.ts +0 -12
- package/dist/handlers/tools/github/mutation-tools.d.ts.map +0 -1
- package/dist/handlers/tools/github/mutation-tools.js +0 -15
- package/dist/handlers/tools/github/mutation-tools.js.map +0 -1
- package/dist/handlers/tools/github/read-tools.d.ts +0 -8
- package/dist/handlers/tools/github/read-tools.d.ts.map +0 -1
- package/dist/handlers/tools/github/read-tools.js +0 -266
- package/dist/handlers/tools/github/read-tools.js.map +0 -1
- package/dist/handlers/tools/github/schemas.d.ts +0 -467
- package/dist/handlers/tools/github/schemas.d.ts.map +0 -1
- package/dist/handlers/tools/github/schemas.js +0 -335
- package/dist/handlers/tools/github/schemas.js.map +0 -1
- package/dist/handlers/tools/github.d.ts +0 -14
- package/dist/handlers/tools/github.d.ts.map +0 -1
- package/dist/handlers/tools/github.js +0 -28
- package/dist/handlers/tools/github.js.map +0 -1
- package/dist/handlers/tools/index.d.ts +0 -27
- package/dist/handlers/tools/index.d.ts.map +0 -1
- package/dist/handlers/tools/index.js +0 -169
- package/dist/handlers/tools/index.js.map +0 -1
- package/dist/handlers/tools/relationships.d.ts +0 -8
- package/dist/handlers/tools/relationships.d.ts.map +0 -1
- package/dist/handlers/tools/relationships.js +0 -318
- package/dist/handlers/tools/relationships.js.map +0 -1
- package/dist/handlers/tools/schemas.d.ts +0 -116
- package/dist/handlers/tools/schemas.d.ts.map +0 -1
- package/dist/handlers/tools/schemas.js +0 -123
- package/dist/handlers/tools/schemas.js.map +0 -1
- package/dist/handlers/tools/search.d.ts +0 -8
- package/dist/handlers/tools/search.d.ts.map +0 -1
- package/dist/handlers/tools/search.js +0 -307
- package/dist/handlers/tools/search.js.map +0 -1
- package/dist/handlers/tools/team.d.ts +0 -11
- package/dist/handlers/tools/team.d.ts.map +0 -1
- package/dist/handlers/tools/team.js +0 -240
- package/dist/handlers/tools/team.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/server/McpServer.d.ts +0 -27
- package/dist/server/McpServer.d.ts.map +0 -1
- package/dist/server/McpServer.js +0 -326
- package/dist/server/McpServer.js.map +0 -1
- package/dist/server/Scheduler.d.ts +0 -91
- package/dist/server/Scheduler.d.ts.map +0 -1
- package/dist/server/Scheduler.js +0 -201
- package/dist/server/Scheduler.js.map +0 -1
- package/dist/transports/http.d.ts +0 -66
- package/dist/transports/http.d.ts.map +0 -1
- package/dist/transports/http.js +0 -520
- package/dist/transports/http.js.map +0 -1
- package/dist/types/entities.d.ts +0 -101
- package/dist/types/entities.d.ts.map +0 -1
- package/dist/types/entities.js +0 -5
- package/dist/types/entities.js.map +0 -1
- package/dist/types/filtering.d.ts +0 -34
- package/dist/types/filtering.d.ts.map +0 -1
- package/dist/types/filtering.js +0 -5
- package/dist/types/filtering.js.map +0 -1
- package/dist/types/github.d.ts +0 -166
- package/dist/types/github.d.ts.map +0 -1
- package/dist/types/github.js +0 -5
- package/dist/types/github.js.map +0 -1
- package/dist/types/index.d.ts +0 -213
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -15
- package/dist/types/index.js.map +0 -1
- package/dist/utils/McpLogger.d.ts +0 -61
- package/dist/utils/McpLogger.d.ts.map +0 -1
- package/dist/utils/McpLogger.js +0 -113
- package/dist/utils/McpLogger.js.map +0 -1
- package/dist/utils/error-helpers.d.ts +0 -37
- package/dist/utils/error-helpers.d.ts.map +0 -1
- package/dist/utils/error-helpers.js +0 -47
- package/dist/utils/error-helpers.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -31
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -80
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/progress-utils.d.ts +0 -53
- package/dist/utils/progress-utils.d.ts.map +0 -1
- package/dist/utils/progress-utils.js +0 -63
- package/dist/utils/progress-utils.js.map +0 -1
- package/dist/utils/security-utils.d.ts +0 -79
- package/dist/utils/security-utils.d.ts.map +0 -1
- package/dist/utils/security-utils.js +0 -152
- package/dist/utils/security-utils.js.map +0 -1
- package/dist/vector/VectorSearchManager.d.ts +0 -68
- package/dist/vector/VectorSearchManager.d.ts.map +0 -1
- package/dist/vector/VectorSearchManager.js +0 -316
- package/dist/vector/VectorSearchManager.js.map +0 -1
- package/src/database/SqliteAdapter.ts +0 -1633
- package/src/github/GitHubIntegration.ts +0 -1559
- package/src/handlers/resources/core.ts +0 -528
- package/src/transports/http.ts +0 -637
- package/src/types/sql.js.d.ts +0 -38
- /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
|
-
|
|
102
|
+
|
|
101
103
|
|
|
102
104
|
# -----------------------------------------------------------------------------
|
|
103
105
|
# Logs
|
|
@@ -129,3 +131,9 @@ env/
|
|
|
129
131
|
ENV/
|
|
130
132
|
*.egg-info/
|
|
131
133
|
*.egg
|
|
134
|
+
|
|
135
|
+
# -----------------------------------------------------------------------------
|
|
136
|
+
# Assets
|
|
137
|
+
# -----------------------------------------------------------------------------
|
|
138
|
+
social-preview.png
|
|
139
|
+
|
package/.gitattributes
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
#
|
|
2
|
-
* text=auto
|
|
1
|
+
# Enforce LF line endings for all text files
|
|
2
|
+
* text=auto eol=lf
|
|
3
3
|
|
|
4
|
-
#
|
|
5
|
-
*.
|
|
6
|
-
*.
|
|
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
|
package/.github/dependabot.yml
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Dependabot configuration for Memory Journal MCP Server
|
|
2
|
-
#
|
|
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
|
-
- '@
|
|
32
|
-
- '
|
|
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@32b3a711a9ee97d38e3989c90af0385aff0066a7 # v0.57.2
|
|
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@32b3a711a9ee97d38e3989c90af0385aff0066a7 # v0.57.2
|
|
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.57.2
|
|
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"
|