memory-journal-mcp 6.1.2 → 6.2.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.
- package/README.md +44 -28
- package/dist/{chunk-X4SWFATC.js → chunk-BI4ZNSKA.js} +38 -24
- package/dist/{chunk-HCEWINSB.js → chunk-N6EBIDN7.js} +99 -102
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/tools-WPRY5MJ6.js +2 -0
- package/package.json +10 -1
- package/skills/github-commander/SKILL.md +151 -0
- package/skills/github-commander/config/project-config.example.md +125 -0
- package/skills/github-commander/workflows/code-quality-audit.md +80 -0
- package/skills/github-commander/workflows/full-audit.md +134 -0
- package/skills/github-commander/workflows/issue-triage.md +239 -0
- package/skills/github-commander/workflows/milestone-sprint.md +81 -0
- package/skills/github-commander/workflows/perf-audit.md +142 -0
- package/skills/github-commander/workflows/pr-review.md +123 -0
- package/skills/github-commander/workflows/security-audit.md +170 -0
- package/skills/github-commander/workflows/update-deps.md +109 -0
- package/.dockerignore +0 -139
- package/.gitattributes +0 -20
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -95
- package/.github/ISSUE_TEMPLATE/config.yml +0 -11
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -110
- package/.github/ISSUE_TEMPLATE/question.md +0 -78
- package/.github/aw/actions-lock.json +0 -14
- package/.github/copilot-instructions.md +0 -122
- package/.github/dependabot.yml +0 -93
- package/.github/pull_request_template.md +0 -135
- package/.github/workflows/README.md +0 -133
- package/.github/workflows/agentics-maintenance.yml +0 -141
- package/.github/workflows/auto-release.yml +0 -68
- package/.github/workflows/ci-health-monitor.lock.yml +0 -1121
- package/.github/workflows/ci-health-monitor.md +0 -87
- package/.github/workflows/codeql.yml +0 -41
- package/.github/workflows/dependabot-auto-merge.yml +0 -42
- package/.github/workflows/dependency-maintenance.lock.yml +0 -1182
- package/.github/workflows/dependency-maintenance.md +0 -147
- package/.github/workflows/docker-publish.yml +0 -254
- package/.github/workflows/docs-drift-detector.lock.yml +0 -1142
- package/.github/workflows/docs-drift-detector.md +0 -115
- package/.github/workflows/lint-and-test.yml +0 -60
- package/.github/workflows/publish-npm.yml +0 -85
- package/.github/workflows/secrets-scanning.yml +0 -32
- package/.github/workflows/security-update.yml +0 -127
- package/.gitleaks.toml +0 -9
- package/.prettierignore +0 -21
- package/.prettierrc +0 -33
- package/.scout-ignore +0 -12
- package/.trivyignore +0 -21
- package/CHANGELOG.md +0 -1814
- package/CODE_OF_CONDUCT.md +0 -133
- package/CONTRIBUTING.md +0 -263
- package/DOCKER_README.md +0 -331
- package/Dockerfile +0 -128
- package/SECURITY.md +0 -227
- package/UNRELEASED.md +0 -1
- package/dist/tools-T4U5A3X4.js +0 -2
- package/docker-compose.yml +0 -71
- package/docs/README.md +0 -18
- package/docs/agentic-journal-synergy.md +0 -175
- package/docs/copilot-setup.md +0 -72
- package/eslint.config.js +0 -110
- package/mcp-config-example.json +0 -21
- package/playwright.config.ts +0 -35
- package/releases/v2.1.0.md +0 -220
- package/releases/v2.2.0.md +0 -168
- package/releases/v3.0.0.md +0 -237
- package/releases/v3.1.0.md +0 -104
- package/releases/v3.1.1.md +0 -42
- package/releases/v3.1.2.md +0 -40
- package/releases/v3.1.3.md +0 -64
- package/releases/v3.1.4.md +0 -32
- package/releases/v3.1.5.md +0 -44
- package/releases/v4.0.0.md +0 -71
- package/releases/v4.1.0.md +0 -88
- package/releases/v4.2.0.md +0 -90
- package/releases/v4.3.0.md +0 -92
- package/releases/v4.3.1.md +0 -69
- package/releases/v4.4.0.md +0 -120
- package/releases/v4.4.1.md +0 -33
- package/releases/v4.4.2.md +0 -31
- package/releases/v4.5.0.md +0 -116
- package/releases/v5.0.0.md +0 -105
- package/releases/v5.0.1.md +0 -25
- package/releases/v5.1.0.md +0 -83
- package/releases/v5.1.1.md +0 -10
- package/releases/v6.0.0.md +0 -48
- package/releases/v6.0.1.md +0 -36
- package/releases/v6.1.0.md +0 -68
- package/releases/v6.1.1.md +0 -30
- package/releases/v6.1.2.md +0 -23
- package/scripts/generate-server-instructions.ts +0 -306
- package/scripts/server-instructions-function-body.ts +0 -107
- package/scripts/server-instructions-gotchas.ts +0 -45
- package/server.json +0 -42
- package/social-preview.png +0 -0
- package/src/auth/auth-context.ts +0 -78
- package/src/auth/authorization-server-discovery.ts +0 -263
- package/src/auth/errors.ts +0 -215
- package/src/auth/index.ts +0 -58
- package/src/auth/middleware.ts +0 -392
- package/src/auth/oauth-resource-server.ts +0 -170
- package/src/auth/scope-map.ts +0 -46
- package/src/auth/scopes.ts +0 -256
- package/src/auth/token-validator.ts +0 -293
- package/src/auth/transport-agnostic.ts +0 -164
- package/src/auth/types.ts +0 -372
- package/src/cli.ts +0 -279
- package/src/codemode/api-constants.ts +0 -263
- package/src/codemode/api.ts +0 -302
- package/src/codemode/auto-return.ts +0 -65
- package/src/codemode/index.ts +0 -47
- package/src/codemode/sandbox-factory.ts +0 -144
- package/src/codemode/sandbox.ts +0 -220
- package/src/codemode/security.ts +0 -155
- package/src/codemode/types.ts +0 -228
- package/src/codemode/worker-sandbox.ts +0 -277
- package/src/codemode/worker-script.ts +0 -239
- package/src/constants/icons.ts +0 -183
- package/src/constants/server-instructions.md +0 -166
- package/src/constants/server-instructions.ts +0 -514
- package/src/database/adapter-factory.ts +0 -16
- package/src/database/core/entry-columns.ts +0 -10
- package/src/database/core/interfaces.ts +0 -188
- package/src/database/core/schema.ts +0 -152
- package/src/database/sqlite-adapter/backup.ts +0 -167
- package/src/database/sqlite-adapter/entries/crud.ts +0 -233
- package/src/database/sqlite-adapter/entries/importance.ts +0 -76
- package/src/database/sqlite-adapter/entries/index.ts +0 -142
- package/src/database/sqlite-adapter/entries/search.ts +0 -294
- package/src/database/sqlite-adapter/entries/shared.ts +0 -102
- package/src/database/sqlite-adapter/entries/statistics.ts +0 -162
- package/src/database/sqlite-adapter/index.ts +0 -265
- package/src/database/sqlite-adapter/native-connection.ts +0 -301
- package/src/database/sqlite-adapter/relationships.ts +0 -70
- package/src/database/sqlite-adapter/tags.ts +0 -182
- package/src/filtering/tool-filter.ts +0 -312
- package/src/github/github-integration/client.ts +0 -114
- package/src/github/github-integration/index.ts +0 -297
- package/src/github/github-integration/insights.ts +0 -155
- package/src/github/github-integration/issues.ts +0 -213
- package/src/github/github-integration/milestones.ts +0 -262
- package/src/github/github-integration/projects.ts +0 -414
- package/src/github/github-integration/pull-requests.ts +0 -235
- package/src/github/github-integration/repository.ts +0 -110
- package/src/github/github-integration/types.ts +0 -43
- package/src/handlers/prompts/github.ts +0 -210
- package/src/handlers/prompts/index.ts +0 -97
- package/src/handlers/prompts/workflow.ts +0 -361
- package/src/handlers/resources/core/briefing/context-section.ts +0 -182
- package/src/handlers/resources/core/briefing/github-section.ts +0 -354
- package/src/handlers/resources/core/briefing/index.ts +0 -106
- package/src/handlers/resources/core/briefing/user-message.ts +0 -114
- package/src/handlers/resources/core/health.ts +0 -75
- package/src/handlers/resources/core/index.ts +0 -31
- package/src/handlers/resources/core/instructions.ts +0 -45
- package/src/handlers/resources/core/utilities.ts +0 -310
- package/src/handlers/resources/github.ts +0 -340
- package/src/handlers/resources/graph.ts +0 -218
- package/src/handlers/resources/help.ts +0 -410
- package/src/handlers/resources/index.ts +0 -143
- package/src/handlers/resources/shared.ts +0 -219
- package/src/handlers/resources/team.ts +0 -134
- package/src/handlers/resources/templates.ts +0 -334
- package/src/handlers/tools/admin.ts +0 -351
- package/src/handlers/tools/analytics.ts +0 -346
- package/src/handlers/tools/backup.ts +0 -272
- package/src/handlers/tools/codemode.ts +0 -188
- package/src/handlers/tools/core.ts +0 -359
- package/src/handlers/tools/error-fields-mixin.ts +0 -10
- package/src/handlers/tools/export.ts +0 -150
- package/src/handlers/tools/github/copilot-tools.ts +0 -72
- package/src/handlers/tools/github/helpers.ts +0 -125
- package/src/handlers/tools/github/insights-tools.ts +0 -112
- package/src/handlers/tools/github/issue-tools.ts +0 -442
- package/src/handlers/tools/github/kanban-tools.ts +0 -153
- package/src/handlers/tools/github/milestone-tools.ts +0 -371
- package/src/handlers/tools/github/mutation-tools.ts +0 -17
- package/src/handlers/tools/github/read-tools.ts +0 -302
- package/src/handlers/tools/github/schemas.ts +0 -435
- package/src/handlers/tools/github.ts +0 -39
- package/src/handlers/tools/index.ts +0 -255
- package/src/handlers/tools/relationships.ts +0 -390
- package/src/handlers/tools/schemas.ts +0 -165
- package/src/handlers/tools/search.ts +0 -448
- package/src/handlers/tools/team/admin-tools.ts +0 -164
- package/src/handlers/tools/team/analytics-tools.ts +0 -233
- package/src/handlers/tools/team/backup-tools.ts +0 -83
- package/src/handlers/tools/team/core-tools.ts +0 -197
- package/src/handlers/tools/team/export-tools.ts +0 -130
- package/src/handlers/tools/team/helpers.ts +0 -66
- package/src/handlers/tools/team/index.ts +0 -45
- package/src/handlers/tools/team/relationship-tools.ts +0 -219
- package/src/handlers/tools/team/schemas.ts +0 -558
- package/src/handlers/tools/team/search-tools.ts +0 -145
- package/src/handlers/tools/team/vector-tools.ts +0 -261
- package/src/index.ts +0 -57
- package/src/server/mcp-server.ts +0 -446
- package/src/server/registration.ts +0 -141
- package/src/server/scheduler.ts +0 -283
- package/src/transports/http/handlers.ts +0 -78
- package/src/transports/http/index.ts +0 -8
- package/src/transports/http/security.ts +0 -147
- package/src/transports/http/server/index.ts +0 -397
- package/src/transports/http/server/legacy-sse.ts +0 -87
- package/src/transports/http/server/stateful.ts +0 -222
- package/src/transports/http/server/stateless.ts +0 -42
- package/src/transports/http/types.ts +0 -132
- package/src/types/entities.ts +0 -145
- package/src/types/error-types.ts +0 -92
- package/src/types/errors.ts +0 -200
- package/src/types/filtering.ts +0 -55
- package/src/types/github.ts +0 -216
- package/src/types/index.ts +0 -348
- package/src/utils/error-helpers.ts +0 -78
- package/src/utils/errors/error-response-fields.ts +0 -29
- package/src/utils/errors/suggestions.ts +0 -94
- package/src/utils/github-helpers.ts +0 -33
- package/src/utils/logger.ts +0 -107
- package/src/utils/mcp-logger.ts +0 -155
- package/src/utils/progress-utils.ts +0 -100
- package/src/utils/query-helpers.ts +0 -78
- package/src/utils/resource-annotations.ts +0 -75
- package/src/utils/security-utils.ts +0 -198
- package/src/utils/vector-index-helpers.ts +0 -24
- package/src/vector/vector-search-manager.ts +0 -409
- package/src/version.ts +0 -15
- package/test-server/README.md +0 -193
- package/test-server/code-map.md +0 -399
- package/test-server/test-agent-experience.md +0 -213
- package/test-server/test-filter-instructions.mjs +0 -295
- package/test-server/test-instruction-levels.mjs +0 -102
- package/test-server/test-preflight.md +0 -55
- package/test-server/test-prompts.mjs +0 -185
- package/test-server/test-scheduler.mjs +0 -174
- package/test-server/test-tool-annotations.mjs +0 -115
- package/test-server/test-tools-codemode.md +0 -632
- package/test-server/test-tools-codemode2.md +0 -1218
- package/test-server/test-tools-team.md +0 -215
- package/test-server/test-tools.md +0 -429
- package/test-server/test-tools2.md +0 -361
- package/test-server/test-tools3.md +0 -396
- package/test-server/tool-reference.md +0 -231
- package/tests/README.md +0 -54
- package/tests/auth/auth-context.test.ts +0 -162
- package/tests/auth/authorization-server-discovery.test.ts +0 -265
- package/tests/auth/errors.test.ts +0 -170
- package/tests/auth/middleware.test.ts +0 -585
- package/tests/auth/oauth-resource-server.test.ts +0 -173
- package/tests/auth/scope-map.test.ts +0 -66
- package/tests/auth/scopes.test.ts +0 -347
- package/tests/auth/token-validator.test.ts +0 -271
- package/tests/codemode/api.test.ts +0 -396
- package/tests/codemode/auto-return.test.ts +0 -167
- package/tests/codemode/codemode-tool-handlers.test.ts +0 -197
- package/tests/codemode/sandbox-factory.test.ts +0 -152
- package/tests/codemode/sandbox.test.ts +0 -190
- package/tests/codemode/security.test.ts +0 -242
- package/tests/codemode/worker-sandbox.test.ts +0 -106
- package/tests/constants/icons.test.ts +0 -101
- package/tests/constants/server-instructions.test.ts +0 -514
- package/tests/database/crud-workflow-branches.test.ts +0 -418
- package/tests/database/database-branches.test.ts +0 -132
- package/tests/database/entries-auth-branches.test.ts +0 -390
- package/tests/database/native-connection.test.ts +0 -249
- package/tests/database/shared-helpers.test.ts +0 -103
- package/tests/database/sqlite-adapter.bench.ts +0 -63
- package/tests/database/sqlite-adapter.test.ts +0 -690
- package/tests/database/tags.test.ts +0 -134
- package/tests/e2e/README.md +0 -39
- package/tests/e2e/auth.spec.ts +0 -106
- package/tests/e2e/codemode-abuse.spec.ts +0 -75
- package/tests/e2e/health.spec.ts +0 -63
- package/tests/e2e/helpers.ts +0 -139
- package/tests/e2e/oauth-discovery.spec.ts +0 -102
- package/tests/e2e/oauth-scopes.spec.ts +0 -222
- package/tests/e2e/payloads-admin.spec.ts +0 -76
- package/tests/e2e/payloads-analytics.spec.ts +0 -37
- package/tests/e2e/payloads-backup-restore.spec.ts +0 -102
- package/tests/e2e/payloads-backup.spec.ts +0 -44
- package/tests/e2e/payloads-codemode-api.spec.ts +0 -131
- package/tests/e2e/payloads-codemode-readonly.spec.ts +0 -116
- package/tests/e2e/payloads-codemode.spec.ts +0 -116
- package/tests/e2e/payloads-core.spec.ts +0 -82
- package/tests/e2e/payloads-error-contracts.spec.ts +0 -159
- package/tests/e2e/payloads-export.spec.ts +0 -46
- package/tests/e2e/payloads-github-degradation.spec.ts +0 -73
- package/tests/e2e/payloads-github.spec.ts +0 -176
- package/tests/e2e/payloads-relationships.spec.ts +0 -56
- package/tests/e2e/payloads-search.spec.ts +0 -64
- package/tests/e2e/payloads-team-happy.spec.ts +0 -231
- package/tests/e2e/payloads-team.spec.ts +0 -174
- package/tests/e2e/prompts-expanded.spec.ts +0 -137
- package/tests/e2e/prompts.spec.ts +0 -62
- package/tests/e2e/protocols.spec.ts +0 -134
- package/tests/e2e/rate-limiting.spec.ts +0 -291
- package/tests/e2e/resources-briefing-env.spec.ts +0 -106
- package/tests/e2e/resources-complete.spec.ts +0 -180
- package/tests/e2e/resources-expanded.spec.ts +0 -83
- package/tests/e2e/resources-instructions-levels.spec.ts +0 -145
- package/tests/e2e/resources-templates.spec.ts +0 -123
- package/tests/e2e/resources.spec.ts +0 -103
- package/tests/e2e/scheduler.spec.ts +0 -79
- package/tests/e2e/security.spec.ts +0 -112
- package/tests/e2e/session-advanced.spec.ts +0 -152
- package/tests/e2e/sessions.spec.ts +0 -95
- package/tests/e2e/stateless.spec.ts +0 -79
- package/tests/e2e/streaming.spec.ts +0 -176
- package/tests/e2e/tool-filtering-presets.spec.ts +0 -192
- package/tests/e2e/tool-filtering.spec.ts +0 -77
- package/tests/e2e/tools.spec.ts +0 -111
- package/tests/filtering/tool-filter.test.ts +0 -314
- package/tests/github/client-issues-errors.test.ts +0 -433
- package/tests/github/github-integration-branches.test.ts +0 -490
- package/tests/github/github-integration.test.ts +0 -1015
- package/tests/github/github-managers-branches.test.ts +0 -907
- package/tests/github/pull-requests.test.ts +0 -334
- package/tests/handlers/analytics-branches.test.ts +0 -222
- package/tests/handlers/backup-branches.test.ts +0 -270
- package/tests/handlers/briefing-context-section.test.ts +0 -388
- package/tests/handlers/briefing-github-section.test.ts +0 -392
- package/tests/handlers/briefing-user-message.test.ts +0 -405
- package/tests/handlers/codemode-tools.test.ts +0 -85
- package/tests/handlers/copilot-tools.test.ts +0 -126
- package/tests/handlers/error-path-coverage.test.ts +0 -324
- package/tests/handlers/export-tools.test.ts +0 -203
- package/tests/handlers/github-resource-handlers.test.ts +0 -929
- package/tests/handlers/github-tool-handlers.test.ts +0 -1452
- package/tests/handlers/handler-error-branches.test.ts +0 -346
- package/tests/handlers/help-resource.test.ts +0 -92
- package/tests/handlers/prompt-handler-coverage.test.ts +0 -108
- package/tests/handlers/prompt-handlers.test.ts +0 -131
- package/tests/handlers/resource-handler-coverage.test.ts +0 -281
- package/tests/handlers/resource-handlers.test.ts +0 -357
- package/tests/handlers/resource-prompt-branches.test.ts +0 -495
- package/tests/handlers/search-tool-handlers.test.ts +0 -379
- package/tests/handlers/targeted-gap-closure.test.ts +0 -387
- package/tests/handlers/team-admin.test.ts +0 -291
- package/tests/handlers/team-analytics.test.ts +0 -220
- package/tests/handlers/team-core.test.ts +0 -148
- package/tests/handlers/team-data.test.ts +0 -198
- package/tests/handlers/team-relationships.test.ts +0 -271
- package/tests/handlers/team-resource-handlers.test.ts +0 -161
- package/tests/handlers/team-search.test.ts +0 -134
- package/tests/handlers/team-tool-handlers.test.ts +0 -301
- package/tests/handlers/team-vector.test.ts +0 -213
- package/tests/handlers/template-github-branches.test.ts +0 -676
- package/tests/handlers/tool-annotations.test.ts +0 -90
- package/tests/handlers/tool-handler-coverage.test.ts +0 -514
- package/tests/handlers/tool-handlers.test.ts +0 -510
- package/tests/handlers/tool-output-schemas.test.ts +0 -116
- package/tests/handlers/vector-tool-handlers.test.ts +0 -238
- package/tests/security/sql-injection.test.ts +0 -284
- package/tests/server/mcp-server.bench.ts +0 -55
- package/tests/server/mcp-server.test.ts +0 -1326
- package/tests/server/scheduler.test.ts +0 -400
- package/tests/transports/http-legacy-sse.test.ts +0 -275
- package/tests/transports/http-security.test.ts +0 -322
- package/tests/transports/http-stateful.test.ts +0 -487
- package/tests/transports/http-transport-server.test.ts +0 -301
- package/tests/transports/http-transport.test.ts +0 -771
- package/tests/utils/github-helpers.test.ts +0 -58
- package/tests/utils/logger.test.ts +0 -180
- package/tests/utils/mcp-logger.test.ts +0 -211
- package/tests/utils/progress-utils.test.ts +0 -156
- package/tests/utils/query-helpers.test.ts +0 -80
- package/tests/utils/security-utils.test.ts +0 -82
- package/tests/vector/vector-search-branches.test.ts +0 -111
- package/tests/vector/vector-search-manager.test.ts +0 -375
- package/tests/vector/vector-search.bench.ts +0 -48
- package/tsconfig.json +0 -42
- package/tsup.config.ts +0 -19
- package/vitest.config.ts +0 -25
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { setDefaultSandboxMode, logger, getTools, callTool, ConfigurationError, sendProgress, ResourceNotFoundError, ConnectionError, QueryError, assertNoPathTraversal, ValidationError, execQuery, transformEntryRow, resolveGitHubRepo, isResourceError, milestoneCompletionPct, MemoryJournalMcpError, validateDateFormatPattern, DEFAULT_BRIEFING_CONFIG } from './chunk-
|
|
1
|
+
import { setDefaultSandboxMode, logger, getTools, callTool, ConfigurationError, sendProgress, ResourceNotFoundError, ConnectionError, QueryError, assertNoPathTraversal, ValidationError, execQuery, transformEntryRow, resolveGitHubRepo, isResourceError, milestoneCompletionPct, MemoryJournalMcpError, validateDateFormatPattern, DEFAULT_BRIEFING_CONFIG } from './chunk-BI4ZNSKA.js';
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
3
|
import { McpServer, ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
4
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
5
5
|
import DatabaseAdapter from 'better-sqlite3';
|
|
6
6
|
import * as fs2 from 'fs';
|
|
7
|
-
import * as
|
|
7
|
+
import * as path4 from 'path';
|
|
8
8
|
import { Octokit } from '@octokit/rest';
|
|
9
9
|
import { graphql } from '@octokit/graphql';
|
|
10
10
|
import * as simpleGitImport from 'simple-git';
|
|
11
|
+
import { fileURLToPath } from 'url';
|
|
11
12
|
import express from 'express';
|
|
12
13
|
import { timingSafeEqual, randomUUID } from 'crypto';
|
|
13
14
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
@@ -369,7 +370,7 @@ var NativeConnectionManager = class {
|
|
|
369
370
|
}
|
|
370
371
|
async initialize() {
|
|
371
372
|
if (this.initialized) return;
|
|
372
|
-
const dir =
|
|
373
|
+
const dir = path4.dirname(this.dbPath);
|
|
373
374
|
if (dir && !fs2.existsSync(dir)) {
|
|
374
375
|
await fs2.promises.mkdir(dir, { recursive: true });
|
|
375
376
|
}
|
|
@@ -533,7 +534,7 @@ var NativeConnectionManager = class {
|
|
|
533
534
|
return this.dbPath;
|
|
534
535
|
}
|
|
535
536
|
getBackupsDir() {
|
|
536
|
-
return
|
|
537
|
+
return path4.join(path4.dirname(this.dbPath), "backups");
|
|
537
538
|
}
|
|
538
539
|
closeDbBeforeRestore() {
|
|
539
540
|
this.close();
|
|
@@ -1327,7 +1328,7 @@ var BackupManager = class {
|
|
|
1327
1328
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
1328
1329
|
const sanitizedName = backupName ? backupName.replace(/[/\\:*?"<>|]/g, "_").slice(0, MAX_BACKUP_NAME_LENGTH) : `backup_${timestamp}`;
|
|
1329
1330
|
const filename = `${sanitizedName}.db`;
|
|
1330
|
-
const backupPath =
|
|
1331
|
+
const backupPath = path4.join(backupsDir, filename);
|
|
1331
1332
|
try {
|
|
1332
1333
|
this.ctx.pragma("wal_checkpoint(TRUNCATE)");
|
|
1333
1334
|
} catch (checkpointErr) {
|
|
@@ -1355,7 +1356,7 @@ var BackupManager = class {
|
|
|
1355
1356
|
const backups = [];
|
|
1356
1357
|
for (const filename of files) {
|
|
1357
1358
|
if (!filename.endsWith(".db")) continue;
|
|
1358
|
-
const filePath =
|
|
1359
|
+
const filePath = path4.join(backupsDir, filename);
|
|
1359
1360
|
try {
|
|
1360
1361
|
const stats = fs2.statSync(filePath);
|
|
1361
1362
|
if (stats.isFile()) {
|
|
@@ -1397,7 +1398,7 @@ var BackupManager = class {
|
|
|
1397
1398
|
async restoreFromFile(filename) {
|
|
1398
1399
|
assertNoPathTraversal(filename);
|
|
1399
1400
|
const backupsDir = this.ctx.getBackupsDir();
|
|
1400
|
-
const backupPath =
|
|
1401
|
+
const backupPath = path4.join(backupsDir, filename);
|
|
1401
1402
|
if (!fs2.existsSync(backupPath)) {
|
|
1402
1403
|
throw new ResourceNotFoundError("Backup", filename);
|
|
1403
1404
|
}
|
|
@@ -3568,7 +3569,7 @@ function buildRulesFileInfo(rulesFilePath) {
|
|
|
3568
3569
|
const agoStr = ageDays > 0 ? `${String(ageDays)}d ago` : ageHours > 0 ? `${String(ageHours)}h ago` : "just now";
|
|
3569
3570
|
return {
|
|
3570
3571
|
path: rulesFilePath,
|
|
3571
|
-
name:
|
|
3572
|
+
name: path4.basename(rulesFilePath),
|
|
3572
3573
|
sizeKB: Math.round(stat.size / 1024),
|
|
3573
3574
|
lastModified: agoStr
|
|
3574
3575
|
};
|
|
@@ -3849,65 +3850,18 @@ function buildQuickAccess(groups) {
|
|
|
3849
3850
|
return table;
|
|
3850
3851
|
}
|
|
3851
3852
|
var CODE_MODE_NAMESPACE_ROWS = [
|
|
3852
|
-
{
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
},
|
|
3858
|
-
{
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
namespace: "`mj.search.*`",
|
|
3862
|
-
example: '`mj.search.searchEntries("performance")`'
|
|
3863
|
-
},
|
|
3864
|
-
{
|
|
3865
|
-
group: "analytics",
|
|
3866
|
-
label: "Analytics",
|
|
3867
|
-
namespace: "`mj.analytics.*`",
|
|
3868
|
-
example: "`mj.analytics.getStatistics()`"
|
|
3869
|
-
},
|
|
3870
|
-
{
|
|
3871
|
-
group: "relationships",
|
|
3872
|
-
label: "Relationships",
|
|
3873
|
-
namespace: "`mj.relationships.*`",
|
|
3874
|
-
example: '`mj.relationships.linkEntries(1, 2, "implements")`'
|
|
3875
|
-
},
|
|
3876
|
-
{
|
|
3877
|
-
group: "export",
|
|
3878
|
-
label: "Export",
|
|
3879
|
-
namespace: "`mj.export.*`",
|
|
3880
|
-
example: '`mj.export.exportEntries("json")`'
|
|
3881
|
-
},
|
|
3882
|
-
{
|
|
3883
|
-
group: "admin",
|
|
3884
|
-
label: "Admin",
|
|
3885
|
-
namespace: "`mj.admin.*`",
|
|
3886
|
-
example: "`mj.admin.rebuildVectorIndex()`"
|
|
3887
|
-
},
|
|
3888
|
-
{
|
|
3889
|
-
group: "github",
|
|
3890
|
-
label: "GitHub",
|
|
3891
|
-
namespace: "`mj.github.*`",
|
|
3892
|
-
example: '`mj.github.getGithubIssues({ state: "open" })`'
|
|
3893
|
-
},
|
|
3894
|
-
{
|
|
3895
|
-
group: "backup",
|
|
3896
|
-
label: "Backup",
|
|
3897
|
-
namespace: "`mj.backup.*`",
|
|
3898
|
-
example: "`mj.backup.backupJournal()`"
|
|
3899
|
-
},
|
|
3900
|
-
{
|
|
3901
|
-
group: "team",
|
|
3902
|
-
label: "Team",
|
|
3903
|
-
namespace: "`mj.team.*`",
|
|
3904
|
-
example: '`mj.team.teamCreateEntry("Team update")`'
|
|
3905
|
-
}
|
|
3853
|
+
{ group: "core", label: "Core", namespace: "`mj.core.*`", example: '`mj.core.createEntry("Implemented feature X")`' },
|
|
3854
|
+
{ group: "search", label: "Search", namespace: "`mj.search.*`", example: '`mj.search.searchEntries("performance")`' },
|
|
3855
|
+
{ group: "analytics", label: "Analytics", namespace: "`mj.analytics.*`", example: "`mj.analytics.getStatistics()`" },
|
|
3856
|
+
{ group: "relationships", label: "Relationships", namespace: "`mj.relationships.*`", example: '`mj.relationships.linkEntries(1, 2, "implements")`' },
|
|
3857
|
+
{ group: "export", label: "Export", namespace: "`mj.export.*`", example: '`mj.export.exportEntries("json")`' },
|
|
3858
|
+
{ group: "admin", label: "Admin", namespace: "`mj.admin.*`", example: "`mj.admin.rebuildVectorIndex()`" },
|
|
3859
|
+
{ group: "github", label: "GitHub", namespace: "`mj.github.*`", example: '`mj.github.getGithubIssues({ state: "open" })`' },
|
|
3860
|
+
{ group: "backup", label: "Backup", namespace: "`mj.backup.*`", example: "`mj.backup.backupJournal()`" },
|
|
3861
|
+
{ group: "team", label: "Team", namespace: "`mj.team.*`", example: '`mj.team.teamCreateEntry("Team update")`' }
|
|
3906
3862
|
];
|
|
3907
3863
|
function buildCodeModeInstructions(groups) {
|
|
3908
|
-
const rows = CODE_MODE_NAMESPACE_ROWS.filter((r) => groups.has(r.group)).map(
|
|
3909
|
-
(r) => `| ${r.label.padEnd(13)} | ${r.namespace.padEnd(20)} | ${r.example.padEnd(50)} |`
|
|
3910
|
-
).join("\n");
|
|
3864
|
+
const rows = CODE_MODE_NAMESPACE_ROWS.filter((r) => groups.has(r.group)).map((r) => `| ${r.label.padEnd(13)} | ${r.namespace.padEnd(20)} | ${r.example.padEnd(50)} |`).join("\n");
|
|
3911
3865
|
const fullSection = CODE_MODE_FULL_TEXT;
|
|
3912
3866
|
const tableStart = fullSection.indexOf("| Group");
|
|
3913
3867
|
const tableEnd = fullSection.indexOf("\n\n**Features**");
|
|
@@ -3946,13 +3900,13 @@ This executes JavaScript in a sandboxed environment with all tools available as
|
|
|
3946
3900
|
\`\`\`js
|
|
3947
3901
|
// \u2705 Correct
|
|
3948
3902
|
const result = await mj.core.recent({ limit: 5 })
|
|
3949
|
-
return result.entries.map(e => e.id)
|
|
3903
|
+
return result.entries.map((e) => e.id)
|
|
3950
3904
|
|
|
3951
3905
|
// \u274C Wrong \u2014 returns a Promise object, not the entries
|
|
3952
3906
|
const result = mj.core.recent({ limit: 5 })
|
|
3953
3907
|
|
|
3954
3908
|
// \u2705 Discovery
|
|
3955
|
-
const help = await mj.help()
|
|
3909
|
+
const help = await mj.help() // { groups, totalMethods, usage }
|
|
3956
3910
|
const groupHelp = await mj.core.help() // { group, methods }
|
|
3957
3911
|
\`\`\`
|
|
3958
3912
|
|
|
@@ -3960,7 +3914,7 @@ const groupHelp = await mj.core.help() // { group, methods }
|
|
|
3960
3914
|
|
|
3961
3915
|
\`\`\`js
|
|
3962
3916
|
const { entries, count } = await mj.core.recent({ limit: 10 })
|
|
3963
|
-
return entries.map(e => ({ id: e.id, content: e.content.slice(0, 50) }))
|
|
3917
|
+
return entries.map((e) => ({ id: e.id, content: e.content.slice(0, 50) }))
|
|
3964
3918
|
\`\`\`
|
|
3965
3919
|
`;
|
|
3966
3920
|
var GITHUB_INSTRUCTIONS = `
|
|
@@ -4047,7 +4001,7 @@ var GOTCHAS_CONTENT = `# memory-journal-mcp \u2014 Field Notes & Gotchas
|
|
|
4047
4001
|
|
|
4048
4002
|
- **Team cross-database search**: \`search_entries\` and \`search_by_date_range\` automatically merge team DB results when \`TEAM_DB_PATH\` is configured. Results include a \`source\` field ("personal" or "team").
|
|
4049
4003
|
- **Team vector search**: Team has its own isolated vector index. Use \`team_rebuild_vector_index\` if the team index drifts. \`team_semantic_search\` works identically to personal \`semantic_search\`.
|
|
4050
|
-
- **Team tools without \`TEAM_DB_PATH\`**: All
|
|
4004
|
+
- **Team tools without \`TEAM_DB_PATH\`**: All ${TOOL_GROUPS.team.length} team tools return \`{ success: false, error: "Team collaboration is not configured..." }\` \u2014 no crash, no partial results.
|
|
4051
4005
|
`;
|
|
4052
4006
|
function generateInstructions(enabledTools, prompts, latestEntry, level = "standard", enabledGroups) {
|
|
4053
4007
|
const groups = enabledGroups ?? getEnabledGroups(enabledTools);
|
|
@@ -4965,67 +4919,100 @@ var workflowsResource = {
|
|
|
4965
4919
|
};
|
|
4966
4920
|
var cachedSkills = null;
|
|
4967
4921
|
var lastScanTime = 0;
|
|
4922
|
+
var lastScanDirs = null;
|
|
4968
4923
|
var SKILLS_CACHE_TTL_MS = 5 * 60 * 1e3;
|
|
4924
|
+
function getShippedSkillsDir() {
|
|
4925
|
+
try {
|
|
4926
|
+
const thisFile = fileURLToPath(import.meta.url);
|
|
4927
|
+
let dir = path4.dirname(thisFile);
|
|
4928
|
+
while (true) {
|
|
4929
|
+
const pkgJsonPath = path4.join(dir, "package.json");
|
|
4930
|
+
if (fs2.existsSync(pkgJsonPath)) {
|
|
4931
|
+
const shipped = path4.join(dir, "skills");
|
|
4932
|
+
return fs2.existsSync(shipped) ? shipped : void 0;
|
|
4933
|
+
}
|
|
4934
|
+
const parent = path4.dirname(dir);
|
|
4935
|
+
if (parent === dir) {
|
|
4936
|
+
break;
|
|
4937
|
+
}
|
|
4938
|
+
dir = parent;
|
|
4939
|
+
}
|
|
4940
|
+
return void 0;
|
|
4941
|
+
} catch {
|
|
4942
|
+
return void 0;
|
|
4943
|
+
}
|
|
4944
|
+
}
|
|
4945
|
+
function scanSkillsDir(dir, source) {
|
|
4946
|
+
if (!fs2.existsSync(dir)) return [];
|
|
4947
|
+
const entries = fs2.readdirSync(dir, { withFileTypes: true });
|
|
4948
|
+
const skills = [];
|
|
4949
|
+
for (const entry of entries) {
|
|
4950
|
+
if (!entry.isDirectory()) continue;
|
|
4951
|
+
const skillMdPath = path4.join(dir, entry.name, "SKILL.md");
|
|
4952
|
+
if (!fs2.existsSync(skillMdPath)) continue;
|
|
4953
|
+
const content = fs2.readFileSync(skillMdPath, "utf8");
|
|
4954
|
+
const lines = content.split("\n");
|
|
4955
|
+
const excerptLine = lines.find(
|
|
4956
|
+
(l) => l.trim().length > 0 && !l.startsWith("#") && !l.startsWith("---")
|
|
4957
|
+
);
|
|
4958
|
+
const excerpt = excerptLine ? excerptLine.trim().slice(0, 160) : "";
|
|
4959
|
+
skills.push({ name: entry.name, path: skillMdPath, excerpt, source });
|
|
4960
|
+
}
|
|
4961
|
+
return skills;
|
|
4962
|
+
}
|
|
4969
4963
|
var skillsResource = {
|
|
4970
4964
|
uri: "memory://skills",
|
|
4971
4965
|
name: "Skills",
|
|
4972
4966
|
title: "Agent Skills Index",
|
|
4973
|
-
description: "Index of available agent skills
|
|
4967
|
+
description: "Index of available agent skills (shipped + user-configured via SKILLS_DIR_PATH)",
|
|
4974
4968
|
mimeType: "application/json",
|
|
4975
4969
|
icons: [ICON_BRIEFING],
|
|
4976
4970
|
annotations: { ...MEDIUM_PRIORITY, audience: ["assistant"] },
|
|
4977
4971
|
handler: (_uri, _context) => {
|
|
4978
|
-
const
|
|
4979
|
-
|
|
4972
|
+
const userSkillsDir = process.env["SKILLS_DIR_PATH"];
|
|
4973
|
+
const shippedSkillsDir = getShippedSkillsDir();
|
|
4974
|
+
const hasAnySource = !!userSkillsDir || !!shippedSkillsDir;
|
|
4975
|
+
if (!hasAnySource) {
|
|
4980
4976
|
return {
|
|
4981
4977
|
data: {
|
|
4982
4978
|
configured: false,
|
|
4983
|
-
message: "
|
|
4979
|
+
message: "No skills available. Set SKILLS_DIR_PATH to index user skills."
|
|
4984
4980
|
}
|
|
4985
4981
|
};
|
|
4986
4982
|
}
|
|
4987
4983
|
try {
|
|
4988
|
-
|
|
4984
|
+
const currentDirs = `${userSkillsDir ?? ""}|${shippedSkillsDir ?? ""}`;
|
|
4985
|
+
if (cachedSkills && Date.now() - lastScanTime < SKILLS_CACHE_TTL_MS && lastScanDirs === currentDirs) {
|
|
4989
4986
|
return {
|
|
4990
4987
|
data: {
|
|
4991
4988
|
configured: true,
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
count: 0
|
|
4995
|
-
}
|
|
4996
|
-
};
|
|
4997
|
-
}
|
|
4998
|
-
if (cachedSkills && Date.now() - lastScanTime < SKILLS_CACHE_TTL_MS) {
|
|
4999
|
-
return {
|
|
5000
|
-
data: {
|
|
5001
|
-
configured: true,
|
|
5002
|
-
skillsDir,
|
|
4989
|
+
...userSkillsDir ? { skillsDir: userSkillsDir } : {},
|
|
4990
|
+
...shippedSkillsDir ? { shippedSkillsDir } : {},
|
|
5003
4991
|
skills: cachedSkills,
|
|
5004
4992
|
count: cachedSkills.length
|
|
5005
4993
|
}
|
|
5006
4994
|
};
|
|
5007
4995
|
}
|
|
5008
|
-
const
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
const
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
);
|
|
5019
|
-
const excerpt = excerptLine ? excerptLine.trim().slice(0, 160) : "";
|
|
5020
|
-
skills.push({ name: entry.name, path: skillMdPath, excerpt });
|
|
4996
|
+
const skillMap = /* @__PURE__ */ new Map();
|
|
4997
|
+
if (shippedSkillsDir) {
|
|
4998
|
+
for (const skill of scanSkillsDir(shippedSkillsDir, "shipped")) {
|
|
4999
|
+
skillMap.set(skill.name, skill);
|
|
5000
|
+
}
|
|
5001
|
+
}
|
|
5002
|
+
if (userSkillsDir) {
|
|
5003
|
+
for (const skill of scanSkillsDir(userSkillsDir, "user")) {
|
|
5004
|
+
skillMap.set(skill.name, skill);
|
|
5005
|
+
}
|
|
5021
5006
|
}
|
|
5022
|
-
skills.sort((a, b) => a.name.localeCompare(b.name));
|
|
5007
|
+
const skills = [...skillMap.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
5023
5008
|
cachedSkills = skills;
|
|
5024
5009
|
lastScanTime = Date.now();
|
|
5010
|
+
lastScanDirs = currentDirs;
|
|
5025
5011
|
return {
|
|
5026
5012
|
data: {
|
|
5027
5013
|
configured: true,
|
|
5028
|
-
skillsDir,
|
|
5014
|
+
...userSkillsDir ? { skillsDir: userSkillsDir } : {},
|
|
5015
|
+
...shippedSkillsDir ? { shippedSkillsDir } : {},
|
|
5029
5016
|
skills,
|
|
5030
5017
|
count: skills.length
|
|
5031
5018
|
}
|
|
@@ -6054,7 +6041,7 @@ function getHelpResourceDefinitions() {
|
|
|
6054
6041
|
var toolIndexModule = null;
|
|
6055
6042
|
async function getAllToolDefinitionsAsync(context) {
|
|
6056
6043
|
try {
|
|
6057
|
-
toolIndexModule ??= await import('./tools-
|
|
6044
|
+
toolIndexModule ??= await import('./tools-WPRY5MJ6.js');
|
|
6058
6045
|
if (toolIndexModule === null) return [];
|
|
6059
6046
|
const tools = toolIndexModule.getTools(context.db, null);
|
|
6060
6047
|
return tools.map((t) => ({
|
|
@@ -7806,7 +7793,17 @@ async function createServer(options) {
|
|
|
7806
7793
|
toolOptions["title"] = tool.title;
|
|
7807
7794
|
}
|
|
7808
7795
|
if (tool.inputSchema !== void 0) {
|
|
7809
|
-
|
|
7796
|
+
const schema = tool.inputSchema;
|
|
7797
|
+
if (typeof schema === "object" && schema !== null && "partial" in schema && typeof schema.partial === "function") {
|
|
7798
|
+
try {
|
|
7799
|
+
const relaxed = schema.partial();
|
|
7800
|
+
toolOptions["inputSchema"] = typeof relaxed.passthrough === "function" ? relaxed.passthrough() : schema;
|
|
7801
|
+
} catch {
|
|
7802
|
+
toolOptions["inputSchema"] = schema;
|
|
7803
|
+
}
|
|
7804
|
+
} else {
|
|
7805
|
+
toolOptions["inputSchema"] = schema;
|
|
7806
|
+
}
|
|
7810
7807
|
}
|
|
7811
7808
|
if (tool.outputSchema !== void 0) {
|
|
7812
7809
|
toolOptions["outputSchema"] = tool.outputSchema;
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VERSION, createServer } from './chunk-
|
|
2
|
-
import { logger } from './chunk-
|
|
1
|
+
import { VERSION, createServer } from './chunk-N6EBIDN7.js';
|
|
2
|
+
import { logger } from './chunk-BI4ZNSKA.js';
|
|
3
3
|
import './chunk-OKOVZ5QE.js';
|
|
4
4
|
import { Command } from 'commander';
|
|
5
5
|
import * as fs from 'fs';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { META_GROUPS, TOOL_GROUPS, VERSION, calculateTokenSavings, createServer, filterTools, getAllToolNames, getFilterSummary, getToolFilterFromEnv, getToolGroup, isToolEnabled, parseToolFilter } from './chunk-
|
|
2
|
-
export { logger } from './chunk-
|
|
1
|
+
export { META_GROUPS, TOOL_GROUPS, VERSION, calculateTokenSavings, createServer, filterTools, getAllToolNames, getFilterSummary, getToolFilterFromEnv, getToolGroup, isToolEnabled, parseToolFilter } from './chunk-N6EBIDN7.js';
|
|
2
|
+
export { logger } from './chunk-BI4ZNSKA.js';
|
|
3
3
|
import './chunk-OKOVZ5QE.js';
|
|
4
4
|
|
|
5
5
|
// src/types/index.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memory-journal-mcp",
|
|
3
|
-
"version": "6.1
|
|
3
|
+
"version": "6.2.1",
|
|
4
4
|
"description": "Project context management for AI-assisted development - Persistent knowledge graphs and intelligent context recall across fragmented AI threads",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
"bin": {
|
|
9
9
|
"memory-journal-mcp": "dist/cli.js"
|
|
10
10
|
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/",
|
|
13
|
+
"skills/",
|
|
14
|
+
"LICENSE",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
11
17
|
"scripts": {
|
|
12
18
|
"build": "tsup",
|
|
13
19
|
"dev": "tsc --watch",
|
|
@@ -66,6 +72,7 @@
|
|
|
66
72
|
},
|
|
67
73
|
"devDependencies": {
|
|
68
74
|
"@eslint/js": "^10.0.1",
|
|
75
|
+
"esbuild": "^0.25.0",
|
|
69
76
|
"@playwright/test": "^1.58.2",
|
|
70
77
|
"@types/better-sqlite3": "^7.6.13",
|
|
71
78
|
"@types/express": "^5.0.6",
|
|
@@ -82,6 +89,8 @@
|
|
|
82
89
|
"axios": "^1.13.6",
|
|
83
90
|
"brace-expansion": "^2.0.2",
|
|
84
91
|
"glob": "^11.1.0",
|
|
92
|
+
"onnxruntime-web": "npm:empty-npm-package@1.0.0",
|
|
93
|
+
"sharp": "npm:empty-npm-package@1.0.0",
|
|
85
94
|
"zod": "$zod",
|
|
86
95
|
"minimatch": "10.2.4",
|
|
87
96
|
"tar": "7.5.11",
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: github-commander
|
|
3
|
+
description: |
|
|
4
|
+
Structured workflows for triaging GitHub issues, reviewing PRs, sprinting
|
|
5
|
+
through milestones, and running security/quality/performance audits — with
|
|
6
|
+
configurable validation gates, auto-detected security scanning, journal audit
|
|
7
|
+
trails, and human-in-the-loop checkpoints. Use this skill whenever you are
|
|
8
|
+
working on a GitHub issue, reviewing or submitting a PR, running any kind of
|
|
9
|
+
code audit, updating dependencies, or working through a milestone. Also use
|
|
10
|
+
when the user mentions issue numbers, PR numbers, milestone names, or
|
|
11
|
+
asks you to "fix", "triage", "audit", "review", or "update deps".
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# GitHub Commander
|
|
15
|
+
|
|
16
|
+
Structured, configurable workflows that teach AI agents to triage GitHub issues,
|
|
17
|
+
review PRs, and sprint through milestones. Every action is journaled for full
|
|
18
|
+
audit trails, and human-in-the-loop checkpoints keep you in control.
|
|
19
|
+
|
|
20
|
+
The reason every step journals its results is that it creates a searchable audit
|
|
21
|
+
trail — future sessions can find exactly what was tried, what passed, and what
|
|
22
|
+
failed, without the human needing to remember or repeat context.
|
|
23
|
+
|
|
24
|
+
## When to Load
|
|
25
|
+
|
|
26
|
+
Load this skill when any of these apply:
|
|
27
|
+
|
|
28
|
+
- You are assigned or asked to fix a GitHub issue
|
|
29
|
+
- You need to review or submit a pull request
|
|
30
|
+
- You need to work through issues in a milestone
|
|
31
|
+
- You want to run dependency updates, security audits, or code quality audits
|
|
32
|
+
- The user mentions an issue number (e.g., "fix #42") or PR number
|
|
33
|
+
- The user says "triage", "audit", "review", "update deps", or similar
|
|
34
|
+
- You are about to push code and want a structured validation pipeline
|
|
35
|
+
|
|
36
|
+
## Quick Reference
|
|
37
|
+
|
|
38
|
+
| Workflow | File | Purpose |
|
|
39
|
+
| ----------------------- | --------------------------------- | ------------------------------------------- |
|
|
40
|
+
| **Issue Triage** | `workflows/issue-triage.md` | Fix a single GitHub issue end-to-end |
|
|
41
|
+
| **PR Review** | `workflows/pr-review.md` | Review a PR with validation pipeline |
|
|
42
|
+
| **Milestone Sprint** | `workflows/milestone-sprint.md` | Work through milestone issues sequentially |
|
|
43
|
+
| **Update Dependencies** | `workflows/update-deps.md` | Dependency update with audit trail |
|
|
44
|
+
| **Security Audit** | `workflows/security-audit.md` | Auto-detected security scanning |
|
|
45
|
+
| **Code Quality Audit** | `workflows/code-quality-audit.md` | Static code quality analysis |
|
|
46
|
+
| **Performance Audit** | `workflows/perf-audit.md` | Build, bundle, runtime, test speed analysis |
|
|
47
|
+
| **Full Audit** | `workflows/full-audit.md` | Unified quality + perf + security audit |
|
|
48
|
+
|
|
49
|
+
## Prerequisites
|
|
50
|
+
|
|
51
|
+
- `gh` CLI authenticated (`gh auth status`)
|
|
52
|
+
- `GITHUB_TOKEN` set for API access
|
|
53
|
+
- `GITHUB_REPO_PATH` set for repo auto-detection
|
|
54
|
+
- Project repo cloned locally
|
|
55
|
+
|
|
56
|
+
## Configuration
|
|
57
|
+
|
|
58
|
+
All commands are configurable via environment variables. Defaults assume a
|
|
59
|
+
Node.js project. Override for other ecosystems (Python, Rust, Go, etc.).
|
|
60
|
+
|
|
61
|
+
| Variable | Default | Description |
|
|
62
|
+
| ------------------------------- | ------------------- | ----------------------------------- |
|
|
63
|
+
| `PROJECT_LINT_CMD` | `npm run lint` | Lint command |
|
|
64
|
+
| `PROJECT_TYPECHECK_CMD` | `npm run typecheck` | Type-check command (empty = skip) |
|
|
65
|
+
| `PROJECT_BUILD_CMD` | `npm run build` | Build command (empty = skip) |
|
|
66
|
+
| `PROJECT_TEST_CMD` | `npm run test` | Unit/integration test command |
|
|
67
|
+
| `PROJECT_E2E_CMD` | _(empty = skip)_ | E2E test command |
|
|
68
|
+
| `PROJECT_PACKAGE_MANAGER` | _(auto-detect)_ | `npm`, `yarn`, `pnpm`, or `bun` |
|
|
69
|
+
| `PROJECT_HAS_DOCKERFILE` | _(auto-detect)_ | `true` to enable Docker audit steps |
|
|
70
|
+
| `COMMANDER_HITL_FILE_THRESHOLD` | `10` | HITL if changes touch > N files |
|
|
71
|
+
| `COMMANDER_SECURITY_TOOLS` | _(auto-detect)_ | Comma-separated override list |
|
|
72
|
+
| `COMMANDER_BRANCH_PREFIX` | `fix` | Branch naming prefix |
|
|
73
|
+
|
|
74
|
+
### Package Manager Auto-Detection
|
|
75
|
+
|
|
76
|
+
If `PROJECT_PACKAGE_MANAGER` is not set, detect by lockfile:
|
|
77
|
+
|
|
78
|
+
1. `bun.lockb` or `bun.lock` → `bun`
|
|
79
|
+
2. `pnpm-lock.yaml` → `pnpm`
|
|
80
|
+
3. `yarn.lock` → `yarn`
|
|
81
|
+
4. `package-lock.json` → `npm`
|
|
82
|
+
5. Fallback → `npm`
|
|
83
|
+
|
|
84
|
+
### Security Tool Auto-Detection
|
|
85
|
+
|
|
86
|
+
When `COMMANDER_SECURITY_TOOLS` is not set, each tool is detected independently:
|
|
87
|
+
|
|
88
|
+
| Tool | Detection | What It Scans |
|
|
89
|
+
| -------------- | ------------------------------- | ----------------------------- |
|
|
90
|
+
| `npm-audit` | Always (Node.js project) | Dependency vulnerabilities |
|
|
91
|
+
| `codeql` | `codeql` CLI or `gh codeql` | Static analysis (SAST) |
|
|
92
|
+
| `trivy` | `trivy --version` succeeds | Container images, filesystems |
|
|
93
|
+
| `docker-scout` | `docker scout version` succeeds | Docker image CVEs |
|
|
94
|
+
| `gitleaks` | `gitleaks version` succeeds | Secrets in git history |
|
|
95
|
+
| `trufflehog` | `trufflehog --version` succeeds | Secrets (verified only) |
|
|
96
|
+
|
|
97
|
+
Missing tools are skipped with a journal note — never a failure.
|
|
98
|
+
|
|
99
|
+
## Core Concepts
|
|
100
|
+
|
|
101
|
+
### Validation Gates
|
|
102
|
+
|
|
103
|
+
Every workflow uses sequential validation gates. Each gate must pass before the
|
|
104
|
+
next runs. On failure, the agent attempts to auto-fix (lint/type errors). If
|
|
105
|
+
auto-fix fails after 2 attempts, the agent requests human input.
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Gate 1: Lint + Typecheck → Gate 2: Build → Gate 3: Tests → Gate 4: E2E → Gate 5: Security
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Gates configured with empty commands are skipped automatically.
|
|
112
|
+
|
|
113
|
+
### Journal Audit Trail
|
|
114
|
+
|
|
115
|
+
Every significant action creates a journal entry with structured tags:
|
|
116
|
+
|
|
117
|
+
- **`commander`** — all entries from this skill
|
|
118
|
+
- **`triage`** / **`review`** / **`milestone`** — workflow type
|
|
119
|
+
- **`gate-pass`** / **`gate-fail`** — validation results
|
|
120
|
+
- **`security`** — security scan findings
|
|
121
|
+
|
|
122
|
+
Entries link to issues/PRs via `issue_number` and `pr_number` fields, connecting
|
|
123
|
+
to the knowledge graph automatically.
|
|
124
|
+
|
|
125
|
+
### Human-in-the-Loop Checkpoints
|
|
126
|
+
|
|
127
|
+
The agent pauses and requests human approval when:
|
|
128
|
+
|
|
129
|
+
1. **Before `git push`** — present diff summary, files changed
|
|
130
|
+
2. **Critical security findings** — any critical/high severity scan result
|
|
131
|
+
3. **Unfixable test failures** — after 2 auto-fix attempts
|
|
132
|
+
4. **Large changesets** — changes touch more files than `COMMANDER_HITL_FILE_THRESHOLD`
|
|
133
|
+
5. **Between milestone issues** — in milestone-sprint workflow
|
|
134
|
+
|
|
135
|
+
## Shipped Entry Types
|
|
136
|
+
|
|
137
|
+
These entry types are used by Commander workflows for structured audit trails:
|
|
138
|
+
|
|
139
|
+
| Type | Used By | Purpose |
|
|
140
|
+
| ------------------------ | ---------------- | ------------------------------------------- |
|
|
141
|
+
| `triage` | issue-triage | Issue context gathered, analysis complete |
|
|
142
|
+
| `implementation` | issue-triage | Fix implemented |
|
|
143
|
+
| `gate_pass` | all | Validation gate passed |
|
|
144
|
+
| `gate_fail` | all | Validation gate failed (with error details) |
|
|
145
|
+
| `security_finding` | security-audit | Security scan finding |
|
|
146
|
+
| `pr_submitted` | issue-triage | PR created and pushed |
|
|
147
|
+
| `review_start` | pr-review | PR review initiated |
|
|
148
|
+
| `review_complete` | pr-review | PR review completed |
|
|
149
|
+
| `milestone_sprint_start` | milestone-sprint | Sprint started |
|
|
150
|
+
| `deps_update` | update-deps | Dependency update completed |
|
|
151
|
+
| `audit_finding` | all audits | Code quality or perf finding |
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# GitHub Commander — Project Configuration
|
|
2
|
+
|
|
3
|
+
This file documents all environment variables used by the GitHub Commander skill.
|
|
4
|
+
Copy the relevant variables to your MCP server configuration.
|
|
5
|
+
|
|
6
|
+
## Quick Start (Node.js — defaults work out of the box)
|
|
7
|
+
|
|
8
|
+
```json
|
|
9
|
+
{
|
|
10
|
+
"mcpServers": {
|
|
11
|
+
"memory-journal-mcp": {
|
|
12
|
+
"command": "memory-journal-mcp",
|
|
13
|
+
"env": {
|
|
14
|
+
"GITHUB_TOKEN": "ghp_your_token",
|
|
15
|
+
"GITHUB_REPO_PATH": "/path/to/your/repo"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
No additional configuration needed — all defaults are Node.js with npm.
|
|
23
|
+
|
|
24
|
+
## Full Configuration Reference
|
|
25
|
+
|
|
26
|
+
### Project Commands
|
|
27
|
+
|
|
28
|
+
These define what commands the agent runs during validation gates.
|
|
29
|
+
Set any of them to an empty string to skip that gate.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Lint command (default: "npm run lint")
|
|
33
|
+
PROJECT_LINT_CMD="npm run lint"
|
|
34
|
+
|
|
35
|
+
# Type-check command (default: "npm run typecheck")
|
|
36
|
+
# Set empty to skip: PROJECT_TYPECHECK_CMD=""
|
|
37
|
+
PROJECT_TYPECHECK_CMD="npm run typecheck"
|
|
38
|
+
|
|
39
|
+
# Build command (default: "npm run build")
|
|
40
|
+
# Set empty to skip: PROJECT_BUILD_CMD=""
|
|
41
|
+
PROJECT_BUILD_CMD="npm run build"
|
|
42
|
+
|
|
43
|
+
# Unit/integration test command (default: "npm run test")
|
|
44
|
+
PROJECT_TEST_CMD="npm run test"
|
|
45
|
+
|
|
46
|
+
# E2E test command (default: empty = skip)
|
|
47
|
+
PROJECT_E2E_CMD="npm run test:e2e"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Package Manager
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Auto-detected from lockfile if not set
|
|
54
|
+
# Options: npm, yarn, pnpm, bun
|
|
55
|
+
PROJECT_PACKAGE_MANAGER="npm"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Docker Support
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Auto-detected from Dockerfile presence if not set
|
|
62
|
+
# Set explicitly to enable Docker-specific audit steps
|
|
63
|
+
PROJECT_HAS_DOCKERFILE="true"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Commander Behavior
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# HITL checkpoint if changes touch more than this many files (default: 10)
|
|
70
|
+
COMMANDER_HITL_FILE_THRESHOLD="10"
|
|
71
|
+
|
|
72
|
+
# Override auto-detected security tools (comma-separated)
|
|
73
|
+
# Options: npm-audit, codeql, trivy, docker-scout, gitleaks, trufflehog
|
|
74
|
+
# Default: auto-detect all available tools
|
|
75
|
+
COMMANDER_SECURITY_TOOLS="npm-audit,trivy,gitleaks"
|
|
76
|
+
|
|
77
|
+
# Branch naming prefix (default: "fix")
|
|
78
|
+
# Produces branches like: fix/issue-123
|
|
79
|
+
COMMANDER_BRANCH_PREFIX="fix"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Example: Python Project
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"env": {
|
|
87
|
+
"PROJECT_LINT_CMD": "ruff check .",
|
|
88
|
+
"PROJECT_TYPECHECK_CMD": "mypy .",
|
|
89
|
+
"PROJECT_BUILD_CMD": "",
|
|
90
|
+
"PROJECT_TEST_CMD": "pytest",
|
|
91
|
+
"PROJECT_E2E_CMD": "",
|
|
92
|
+
"PROJECT_PACKAGE_MANAGER": "pip"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Example: Rust Project
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"env": {
|
|
102
|
+
"PROJECT_LINT_CMD": "cargo clippy -- -D warnings",
|
|
103
|
+
"PROJECT_TYPECHECK_CMD": "",
|
|
104
|
+
"PROJECT_BUILD_CMD": "cargo build",
|
|
105
|
+
"PROJECT_TEST_CMD": "cargo test",
|
|
106
|
+
"PROJECT_E2E_CMD": "",
|
|
107
|
+
"PROJECT_PACKAGE_MANAGER": "cargo"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Example: Go Project
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"env": {
|
|
117
|
+
"PROJECT_LINT_CMD": "golangci-lint run",
|
|
118
|
+
"PROJECT_TYPECHECK_CMD": "",
|
|
119
|
+
"PROJECT_BUILD_CMD": "go build ./...",
|
|
120
|
+
"PROJECT_TEST_CMD": "go test ./...",
|
|
121
|
+
"PROJECT_E2E_CMD": "",
|
|
122
|
+
"PROJECT_PACKAGE_MANAGER": "go"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|