@cleocode/cleo 2026.3.37 → 2026.3.39
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/LICENSE +21 -0
- package/README.md +565 -0
- package/bin/postinstall.js +0 -0
- package/completions/bash-completion.sh +0 -0
- package/completions/zsh-completion.zsh +0 -0
- package/dist/cli/index.js +3507 -3631
- package/dist/cli/index.js.map +4 -4
- package/dist/mcp/index.js +3311 -3215
- package/dist/mcp/index.js.map +4 -4
- package/migrations/drizzle-brain/20260318205549_initial/migration.sql +0 -0
- package/migrations/drizzle-brain/20260318205549_initial/snapshot.json +0 -0
- package/migrations/drizzle-nexus/20260318205558_initial/migration.sql +0 -0
- package/migrations/drizzle-nexus/20260318205558_initial/snapshot.json +0 -0
- package/migrations/drizzle-tasks/20260318205539_initial/migration.sql +0 -0
- package/migrations/drizzle-tasks/20260318205539_initial/snapshot.json +0 -0
- package/package.json +17 -12
- package/dist/cli/commander-shim.d.ts +0 -108
- package/dist/cli/commander-shim.d.ts.map +0 -1
- package/dist/cli/commander-shim.js +0 -229
- package/dist/cli/commander-shim.js.map +0 -1
- package/dist/cli/commands/add.d.ts +0 -12
- package/dist/cli/commands/add.d.ts.map +0 -1
- package/dist/cli/commands/add.js +0 -91
- package/dist/cli/commands/add.js.map +0 -1
- package/dist/cli/commands/adr.d.ts +0 -27
- package/dist/cli/commands/adr.d.ts.map +0 -1
- package/dist/cli/commands/adr.js +0 -79
- package/dist/cli/commands/adr.js.map +0 -1
- package/dist/cli/commands/analyze.d.ts +0 -12
- package/dist/cli/commands/analyze.d.ts.map +0 -1
- package/dist/cli/commands/analyze.js +0 -20
- package/dist/cli/commands/analyze.js.map +0 -1
- package/dist/cli/commands/archive-stats.d.ts +0 -18
- package/dist/cli/commands/archive-stats.d.ts.map +0 -1
- package/dist/cli/commands/archive-stats.js +0 -49
- package/dist/cli/commands/archive-stats.js.map +0 -1
- package/dist/cli/commands/archive.d.ts +0 -12
- package/dist/cli/commands/archive.d.ts.map +0 -1
- package/dist/cli/commands/archive.js +0 -32
- package/dist/cli/commands/archive.js.map +0 -1
- package/dist/cli/commands/backup.d.ts +0 -8
- package/dist/cli/commands/backup.d.ts.map +0 -1
- package/dist/cli/commands/backup.js +0 -35
- package/dist/cli/commands/backup.js.map +0 -1
- package/dist/cli/commands/blockers.d.ts +0 -7
- package/dist/cli/commands/blockers.d.ts.map +0 -1
- package/dist/cli/commands/blockers.js +0 -16
- package/dist/cli/commands/blockers.js.map +0 -1
- package/dist/cli/commands/briefing.d.ts +0 -22
- package/dist/cli/commands/briefing.d.ts.map +0 -1
- package/dist/cli/commands/briefing.js +0 -45
- package/dist/cli/commands/briefing.js.map +0 -1
- package/dist/cli/commands/bug.d.ts +0 -12
- package/dist/cli/commands/bug.d.ts.map +0 -1
- package/dist/cli/commands/bug.js +0 -81
- package/dist/cli/commands/bug.js.map +0 -1
- package/dist/cli/commands/checkpoint.d.ts +0 -15
- package/dist/cli/commands/checkpoint.d.ts.map +0 -1
- package/dist/cli/commands/checkpoint.js +0 -92
- package/dist/cli/commands/checkpoint.js.map +0 -1
- package/dist/cli/commands/commands.d.ts +0 -13
- package/dist/cli/commands/commands.d.ts.map +0 -1
- package/dist/cli/commands/commands.js +0 -30
- package/dist/cli/commands/commands.js.map +0 -1
- package/dist/cli/commands/complete.d.ts +0 -12
- package/dist/cli/commands/complete.d.ts.map +0 -1
- package/dist/cli/commands/complete.js +0 -43
- package/dist/cli/commands/complete.js.map +0 -1
- package/dist/cli/commands/compliance.d.ts +0 -8
- package/dist/cli/commands/compliance.d.ts.map +0 -1
- package/dist/cli/commands/compliance.js +0 -85
- package/dist/cli/commands/compliance.js.map +0 -1
- package/dist/cli/commands/config.d.ts +0 -9
- package/dist/cli/commands/config.d.ts.map +0 -1
- package/dist/cli/commands/config.js +0 -43
- package/dist/cli/commands/config.js.map +0 -1
- package/dist/cli/commands/consensus.d.ts +0 -13
- package/dist/cli/commands/consensus.d.ts.map +0 -1
- package/dist/cli/commands/consensus.js +0 -45
- package/dist/cli/commands/consensus.js.map +0 -1
- package/dist/cli/commands/context.d.ts +0 -8
- package/dist/cli/commands/context.d.ts.map +0 -1
- package/dist/cli/commands/context.js +0 -40
- package/dist/cli/commands/context.js.map +0 -1
- package/dist/cli/commands/contribution.d.ts +0 -13
- package/dist/cli/commands/contribution.d.ts.map +0 -1
- package/dist/cli/commands/contribution.js +0 -41
- package/dist/cli/commands/contribution.js.map +0 -1
- package/dist/cli/commands/current.d.ts +0 -13
- package/dist/cli/commands/current.d.ts.map +0 -1
- package/dist/cli/commands/current.js +0 -20
- package/dist/cli/commands/current.js.map +0 -1
- package/dist/cli/commands/dash.d.ts +0 -12
- package/dist/cli/commands/dash.d.ts.map +0 -1
- package/dist/cli/commands/dash.js +0 -24
- package/dist/cli/commands/dash.js.map +0 -1
- package/dist/cli/commands/decomposition.d.ts +0 -13
- package/dist/cli/commands/decomposition.d.ts.map +0 -1
- package/dist/cli/commands/decomposition.js +0 -45
- package/dist/cli/commands/decomposition.js.map +0 -1
- package/dist/cli/commands/delete.d.ts +0 -12
- package/dist/cli/commands/delete.d.ts.map +0 -1
- package/dist/cli/commands/delete.js +0 -37
- package/dist/cli/commands/delete.js.map +0 -1
- package/dist/cli/commands/deps.d.ts +0 -9
- package/dist/cli/commands/deps.d.ts.map +0 -1
- package/dist/cli/commands/deps.js +0 -73
- package/dist/cli/commands/deps.js.map +0 -1
- package/dist/cli/commands/detect-drift.d.ts +0 -15
- package/dist/cli/commands/detect-drift.d.ts.map +0 -1
- package/dist/cli/commands/detect-drift.js +0 -385
- package/dist/cli/commands/detect-drift.js.map +0 -1
- package/dist/cli/commands/docs.d.ts +0 -13
- package/dist/cli/commands/docs.d.ts.map +0 -1
- package/dist/cli/commands/docs.js +0 -170
- package/dist/cli/commands/docs.js.map +0 -1
- package/dist/cli/commands/doctor.d.ts +0 -11
- package/dist/cli/commands/doctor.d.ts.map +0 -1
- package/dist/cli/commands/doctor.js +0 -54
- package/dist/cli/commands/doctor.js.map +0 -1
- package/dist/cli/commands/dynamic.d.ts +0 -24
- package/dist/cli/commands/dynamic.d.ts.map +0 -1
- package/dist/cli/commands/dynamic.js +0 -27
- package/dist/cli/commands/dynamic.js.map +0 -1
- package/dist/cli/commands/env.d.ts +0 -12
- package/dist/cli/commands/env.d.ts.map +0 -1
- package/dist/cli/commands/env.js +0 -44
- package/dist/cli/commands/env.js.map +0 -1
- package/dist/cli/commands/exists.d.ts +0 -7
- package/dist/cli/commands/exists.d.ts.map +0 -1
- package/dist/cli/commands/exists.js +0 -33
- package/dist/cli/commands/exists.js.map +0 -1
- package/dist/cli/commands/export-tasks.d.ts +0 -10
- package/dist/cli/commands/export-tasks.d.ts.map +0 -1
- package/dist/cli/commands/export-tasks.js +0 -47
- package/dist/cli/commands/export-tasks.js.map +0 -1
- package/dist/cli/commands/export.d.ts +0 -9
- package/dist/cli/commands/export.d.ts.map +0 -1
- package/dist/cli/commands/export.js +0 -46
- package/dist/cli/commands/export.js.map +0 -1
- package/dist/cli/commands/extract.d.ts +0 -16
- package/dist/cli/commands/extract.d.ts.map +0 -1
- package/dist/cli/commands/extract.js +0 -43
- package/dist/cli/commands/extract.js.map +0 -1
- package/dist/cli/commands/find.d.ts +0 -14
- package/dist/cli/commands/find.d.ts.map +0 -1
- package/dist/cli/commands/find.js +0 -70
- package/dist/cli/commands/find.js.map +0 -1
- package/dist/cli/commands/generate-changelog.d.ts +0 -14
- package/dist/cli/commands/generate-changelog.d.ts.map +0 -1
- package/dist/cli/commands/generate-changelog.js +0 -252
- package/dist/cli/commands/generate-changelog.js.map +0 -1
- package/dist/cli/commands/grade.d.ts +0 -13
- package/dist/cli/commands/grade.d.ts.map +0 -1
- package/dist/cli/commands/grade.js +0 -16
- package/dist/cli/commands/grade.js.map +0 -1
- package/dist/cli/commands/history.d.ts +0 -9
- package/dist/cli/commands/history.d.ts.map +0 -1
- package/dist/cli/commands/history.js +0 -30
- package/dist/cli/commands/history.js.map +0 -1
- package/dist/cli/commands/implementation.d.ts +0 -13
- package/dist/cli/commands/implementation.d.ts.map +0 -1
- package/dist/cli/commands/implementation.js +0 -41
- package/dist/cli/commands/implementation.js.map +0 -1
- package/dist/cli/commands/import-tasks.d.ts +0 -10
- package/dist/cli/commands/import-tasks.d.ts.map +0 -1
- package/dist/cli/commands/import-tasks.js +0 -38
- package/dist/cli/commands/import-tasks.js.map +0 -1
- package/dist/cli/commands/import.d.ts +0 -9
- package/dist/cli/commands/import.d.ts.map +0 -1
- package/dist/cli/commands/import.js +0 -28
- package/dist/cli/commands/import.js.map +0 -1
- package/dist/cli/commands/init.d.ts +0 -34
- package/dist/cli/commands/init.d.ts.map +0 -1
- package/dist/cli/commands/init.js +0 -94
- package/dist/cli/commands/init.js.map +0 -1
- package/dist/cli/commands/inject.d.ts +0 -8
- package/dist/cli/commands/inject.d.ts.map +0 -1
- package/dist/cli/commands/inject.js +0 -28
- package/dist/cli/commands/inject.js.map +0 -1
- package/dist/cli/commands/install-global.d.ts +0 -19
- package/dist/cli/commands/install-global.d.ts.map +0 -1
- package/dist/cli/commands/install-global.js +0 -54
- package/dist/cli/commands/install-global.js.map +0 -1
- package/dist/cli/commands/issue.d.ts +0 -14
- package/dist/cli/commands/issue.d.ts.map +0 -1
- package/dist/cli/commands/issue.js +0 -105
- package/dist/cli/commands/issue.js.map +0 -1
- package/dist/cli/commands/labels.d.ts +0 -13
- package/dist/cli/commands/labels.d.ts.map +0 -1
- package/dist/cli/commands/labels.js +0 -44
- package/dist/cli/commands/labels.js.map +0 -1
- package/dist/cli/commands/lifecycle.d.ts +0 -8
- package/dist/cli/commands/lifecycle.d.ts.map +0 -1
- package/dist/cli/commands/lifecycle.js +0 -72
- package/dist/cli/commands/lifecycle.js.map +0 -1
- package/dist/cli/commands/list.d.ts +0 -14
- package/dist/cli/commands/list.d.ts.map +0 -1
- package/dist/cli/commands/list.js +0 -71
- package/dist/cli/commands/list.js.map +0 -1
- package/dist/cli/commands/log.d.ts +0 -12
- package/dist/cli/commands/log.d.ts.map +0 -1
- package/dist/cli/commands/log.js +0 -30
- package/dist/cli/commands/log.js.map +0 -1
- package/dist/cli/commands/map.d.ts +0 -10
- package/dist/cli/commands/map.d.ts.map +0 -1
- package/dist/cli/commands/map.js +0 -23
- package/dist/cli/commands/map.js.map +0 -1
- package/dist/cli/commands/mcp-install.d.ts +0 -17
- package/dist/cli/commands/mcp-install.d.ts.map +0 -1
- package/dist/cli/commands/mcp-install.js +0 -128
- package/dist/cli/commands/mcp-install.js.map +0 -1
- package/dist/cli/commands/memory-brain.d.ts +0 -14
- package/dist/cli/commands/memory-brain.d.ts.map +0 -1
- package/dist/cli/commands/memory-brain.js +0 -151
- package/dist/cli/commands/memory-brain.js.map +0 -1
- package/dist/cli/commands/migrate-claude-mem.d.ts +0 -18
- package/dist/cli/commands/migrate-claude-mem.d.ts.map +0 -1
- package/dist/cli/commands/migrate-claude-mem.js +0 -60
- package/dist/cli/commands/migrate-claude-mem.js.map +0 -1
- package/dist/cli/commands/next.d.ts +0 -9
- package/dist/cli/commands/next.d.ts.map +0 -1
- package/dist/cli/commands/next.js +0 -20
- package/dist/cli/commands/next.js.map +0 -1
- package/dist/cli/commands/nexus.d.ts +0 -16
- package/dist/cli/commands/nexus.d.ts.map +0 -1
- package/dist/cli/commands/nexus.js +0 -155
- package/dist/cli/commands/nexus.js.map +0 -1
- package/dist/cli/commands/observe.d.ts +0 -9
- package/dist/cli/commands/observe.d.ts.map +0 -1
- package/dist/cli/commands/observe.js +0 -39
- package/dist/cli/commands/observe.js.map +0 -1
- package/dist/cli/commands/ops.d.ts +0 -10
- package/dist/cli/commands/ops.d.ts.map +0 -1
- package/dist/cli/commands/ops.js +0 -19
- package/dist/cli/commands/ops.js.map +0 -1
- package/dist/cli/commands/orchestrate.d.ts +0 -8
- package/dist/cli/commands/orchestrate.d.ts.map +0 -1
- package/dist/cli/commands/orchestrate.js +0 -58
- package/dist/cli/commands/orchestrate.js.map +0 -1
- package/dist/cli/commands/otel.d.ts +0 -12
- package/dist/cli/commands/otel.d.ts.map +0 -1
- package/dist/cli/commands/otel.js +0 -128
- package/dist/cli/commands/otel.js.map +0 -1
- package/dist/cli/commands/phase.d.ts +0 -12
- package/dist/cli/commands/phase.d.ts.map +0 -1
- package/dist/cli/commands/phase.js +0 -88
- package/dist/cli/commands/phase.js.map +0 -1
- package/dist/cli/commands/phases.d.ts +0 -12
- package/dist/cli/commands/phases.d.ts.map +0 -1
- package/dist/cli/commands/phases.js +0 -37
- package/dist/cli/commands/phases.js.map +0 -1
- package/dist/cli/commands/plan.d.ts +0 -8
- package/dist/cli/commands/plan.d.ts.map +0 -1
- package/dist/cli/commands/plan.js +0 -15
- package/dist/cli/commands/plan.js.map +0 -1
- package/dist/cli/commands/promote.d.ts +0 -7
- package/dist/cli/commands/promote.d.ts.map +0 -1
- package/dist/cli/commands/promote.js +0 -15
- package/dist/cli/commands/promote.js.map +0 -1
- package/dist/cli/commands/refresh-memory.d.ts +0 -9
- package/dist/cli/commands/refresh-memory.d.ts.map +0 -1
- package/dist/cli/commands/refresh-memory.js +0 -24
- package/dist/cli/commands/refresh-memory.js.map +0 -1
- package/dist/cli/commands/relates.d.ts +0 -12
- package/dist/cli/commands/relates.d.ts.map +0 -1
- package/dist/cli/commands/relates.js +0 -53
- package/dist/cli/commands/relates.js.map +0 -1
- package/dist/cli/commands/release.d.ts +0 -8
- package/dist/cli/commands/release.d.ts.map +0 -1
- package/dist/cli/commands/release.js +0 -72
- package/dist/cli/commands/release.js.map +0 -1
- package/dist/cli/commands/remote.d.ts +0 -12
- package/dist/cli/commands/remote.d.ts.map +0 -1
- package/dist/cli/commands/remote.js +0 -207
- package/dist/cli/commands/remote.js.map +0 -1
- package/dist/cli/commands/reorder.d.ts +0 -7
- package/dist/cli/commands/reorder.d.ts.map +0 -1
- package/dist/cli/commands/reorder.js +0 -20
- package/dist/cli/commands/reorder.js.map +0 -1
- package/dist/cli/commands/reparent.d.ts +0 -10
- package/dist/cli/commands/reparent.d.ts.map +0 -1
- package/dist/cli/commands/reparent.js +0 -19
- package/dist/cli/commands/reparent.js.map +0 -1
- package/dist/cli/commands/research.d.ts +0 -8
- package/dist/cli/commands/research.d.ts.map +0 -1
- package/dist/cli/commands/research.js +0 -129
- package/dist/cli/commands/research.js.map +0 -1
- package/dist/cli/commands/restore.d.ts +0 -11
- package/dist/cli/commands/restore.d.ts.map +0 -1
- package/dist/cli/commands/restore.js +0 -225
- package/dist/cli/commands/restore.js.map +0 -1
- package/dist/cli/commands/roadmap.d.ts +0 -8
- package/dist/cli/commands/roadmap.d.ts.map +0 -1
- package/dist/cli/commands/roadmap.js +0 -21
- package/dist/cli/commands/roadmap.js.map +0 -1
- package/dist/cli/commands/safestop.d.ts +0 -14
- package/dist/cli/commands/safestop.d.ts.map +0 -1
- package/dist/cli/commands/safestop.js +0 -32
- package/dist/cli/commands/safestop.js.map +0 -1
- package/dist/cli/commands/self-update.d.ts +0 -15
- package/dist/cli/commands/self-update.d.ts.map +0 -1
- package/dist/cli/commands/self-update.js +0 -332
- package/dist/cli/commands/self-update.js.map +0 -1
- package/dist/cli/commands/sequence.d.ts +0 -8
- package/dist/cli/commands/sequence.d.ts.map +0 -1
- package/dist/cli/commands/sequence.js +0 -30
- package/dist/cli/commands/sequence.js.map +0 -1
- package/dist/cli/commands/session.d.ts +0 -12
- package/dist/cli/commands/session.d.ts.map +0 -1
- package/dist/cli/commands/session.js +0 -160
- package/dist/cli/commands/session.js.map +0 -1
- package/dist/cli/commands/show.d.ts +0 -13
- package/dist/cli/commands/show.d.ts.map +0 -1
- package/dist/cli/commands/show.js +0 -20
- package/dist/cli/commands/show.js.map +0 -1
- package/dist/cli/commands/skills.d.ts +0 -13
- package/dist/cli/commands/skills.d.ts.map +0 -1
- package/dist/cli/commands/skills.js +0 -131
- package/dist/cli/commands/skills.js.map +0 -1
- package/dist/cli/commands/snapshot.d.ts +0 -9
- package/dist/cli/commands/snapshot.d.ts.map +0 -1
- package/dist/cli/commands/snapshot.js +0 -50
- package/dist/cli/commands/snapshot.js.map +0 -1
- package/dist/cli/commands/specification.d.ts +0 -13
- package/dist/cli/commands/specification.d.ts.map +0 -1
- package/dist/cli/commands/specification.js +0 -45
- package/dist/cli/commands/specification.js.map +0 -1
- package/dist/cli/commands/start.d.ts +0 -13
- package/dist/cli/commands/start.d.ts.map +0 -1
- package/dist/cli/commands/start.js +0 -20
- package/dist/cli/commands/start.js.map +0 -1
- package/dist/cli/commands/stats.d.ts +0 -12
- package/dist/cli/commands/stats.d.ts.map +0 -1
- package/dist/cli/commands/stats.js +0 -23
- package/dist/cli/commands/stats.js.map +0 -1
- package/dist/cli/commands/sticky.d.ts +0 -16
- package/dist/cli/commands/sticky.d.ts.map +0 -1
- package/dist/cli/commands/sticky.js +0 -211
- package/dist/cli/commands/sticky.js.map +0 -1
- package/dist/cli/commands/stop.d.ts +0 -13
- package/dist/cli/commands/stop.d.ts.map +0 -1
- package/dist/cli/commands/stop.js +0 -20
- package/dist/cli/commands/stop.js.map +0 -1
- package/dist/cli/commands/sync.d.ts +0 -13
- package/dist/cli/commands/sync.d.ts.map +0 -1
- package/dist/cli/commands/sync.js +0 -48
- package/dist/cli/commands/sync.js.map +0 -1
- package/dist/cli/commands/testing.d.ts +0 -13
- package/dist/cli/commands/testing.d.ts.map +0 -1
- package/dist/cli/commands/testing.js +0 -64
- package/dist/cli/commands/testing.js.map +0 -1
- package/dist/cli/commands/token.d.ts +0 -10
- package/dist/cli/commands/token.d.ts.map +0 -1
- package/dist/cli/commands/token.js +0 -135
- package/dist/cli/commands/token.js.map +0 -1
- package/dist/cli/commands/update.d.ts +0 -12
- package/dist/cli/commands/update.d.ts.map +0 -1
- package/dist/cli/commands/update.js +0 -77
- package/dist/cli/commands/update.js.map +0 -1
- package/dist/cli/commands/upgrade.d.ts +0 -16
- package/dist/cli/commands/upgrade.d.ts.map +0 -1
- package/dist/cli/commands/upgrade.js +0 -74
- package/dist/cli/commands/upgrade.js.map +0 -1
- package/dist/cli/commands/validate.d.ts +0 -12
- package/dist/cli/commands/validate.d.ts.map +0 -1
- package/dist/cli/commands/validate.js +0 -23
- package/dist/cli/commands/validate.js.map +0 -1
- package/dist/cli/commands/verify.d.ts +0 -8
- package/dist/cli/commands/verify.d.ts.map +0 -1
- package/dist/cli/commands/verify.js +0 -28
- package/dist/cli/commands/verify.js.map +0 -1
- package/dist/cli/commands/web.d.ts +0 -13
- package/dist/cli/commands/web.d.ts.map +0 -1
- package/dist/cli/commands/web.js +0 -264
- package/dist/cli/commands/web.js.map +0 -1
- package/dist/cli/field-context.d.ts +0 -32
- package/dist/cli/field-context.d.ts.map +0 -1
- package/dist/cli/field-context.js +0 -47
- package/dist/cli/field-context.js.map +0 -1
- package/dist/cli/format-context.d.ts +0 -32
- package/dist/cli/format-context.d.ts.map +0 -1
- package/dist/cli/format-context.js +0 -50
- package/dist/cli/format-context.js.map +0 -1
- package/dist/cli/index.d.ts +0 -12
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/logger-bootstrap.d.ts +0 -6
- package/dist/cli/logger-bootstrap.d.ts.map +0 -1
- package/dist/cli/logger-bootstrap.js +0 -10
- package/dist/cli/logger-bootstrap.js.map +0 -1
- package/dist/cli/middleware/output-format.d.ts +0 -30
- package/dist/cli/middleware/output-format.d.ts.map +0 -1
- package/dist/cli/middleware/output-format.js +0 -35
- package/dist/cli/middleware/output-format.js.map +0 -1
- package/dist/cli/progress.d.ts +0 -84
- package/dist/cli/progress.d.ts.map +0 -1
- package/dist/cli/progress.js +0 -169
- package/dist/cli/progress.js.map +0 -1
- package/dist/cli/renderers/colors.d.ts +0 -32
- package/dist/cli/renderers/colors.d.ts.map +0 -1
- package/dist/cli/renderers/colors.js +0 -141
- package/dist/cli/renderers/colors.js.map +0 -1
- package/dist/cli/renderers/error.d.ts +0 -13
- package/dist/cli/renderers/error.d.ts.map +0 -1
- package/dist/cli/renderers/error.js +0 -42
- package/dist/cli/renderers/error.js.map +0 -1
- package/dist/cli/renderers/index.d.ts +0 -59
- package/dist/cli/renderers/index.d.ts.map +0 -1
- package/dist/cli/renderers/index.js +0 -184
- package/dist/cli/renderers/index.js.map +0 -1
- package/dist/cli/renderers/normalizer.d.ts +0 -21
- package/dist/cli/renderers/normalizer.d.ts.map +0 -1
- package/dist/cli/renderers/normalizer.js +0 -106
- package/dist/cli/renderers/normalizer.js.map +0 -1
- package/dist/cli/renderers/system.d.ts +0 -25
- package/dist/cli/renderers/system.d.ts.map +0 -1
- package/dist/cli/renderers/system.js +0 -416
- package/dist/cli/renderers/system.js.map +0 -1
- package/dist/cli/renderers/tasks.d.ts +0 -28
- package/dist/cli/renderers/tasks.d.ts.map +0 -1
- package/dist/cli/renderers/tasks.js +0 -308
- package/dist/cli/renderers/tasks.js.map +0 -1
- package/dist/dispatch/adapters/cli.d.ts +0 -67
- package/dist/dispatch/adapters/cli.d.ts.map +0 -1
- package/dist/dispatch/adapters/cli.js +0 -205
- package/dist/dispatch/adapters/cli.js.map +0 -1
- package/dist/dispatch/adapters/mcp.d.ts +0 -37
- package/dist/dispatch/adapters/mcp.d.ts.map +0 -1
- package/dist/dispatch/adapters/mcp.js +0 -122
- package/dist/dispatch/adapters/mcp.js.map +0 -1
- package/dist/dispatch/context/session-context.d.ts +0 -54
- package/dist/dispatch/context/session-context.d.ts.map +0 -1
- package/dist/dispatch/context/session-context.js +0 -61
- package/dist/dispatch/context/session-context.js.map +0 -1
- package/dist/dispatch/dispatcher.d.ts +0 -23
- package/dist/dispatch/dispatcher.d.ts.map +0 -1
- package/dist/dispatch/dispatcher.js +0 -84
- package/dist/dispatch/dispatcher.js.map +0 -1
- package/dist/dispatch/domains/_base.d.ts +0 -59
- package/dist/dispatch/domains/_base.d.ts.map +0 -1
- package/dist/dispatch/domains/_base.js +0 -77
- package/dist/dispatch/domains/_base.js.map +0 -1
- package/dist/dispatch/domains/_meta.d.ts +0 -23
- package/dist/dispatch/domains/_meta.d.ts.map +0 -1
- package/dist/dispatch/domains/_meta.js +0 -25
- package/dist/dispatch/domains/_meta.js.map +0 -1
- package/dist/dispatch/domains/_routing.d.ts +0 -8
- package/dist/dispatch/domains/_routing.d.ts.map +0 -1
- package/dist/dispatch/domains/_routing.js +0 -20
- package/dist/dispatch/domains/_routing.js.map +0 -1
- package/dist/dispatch/domains/admin.d.ts +0 -27
- package/dist/dispatch/domains/admin.d.ts.map +0 -1
- package/dist/dispatch/domains/admin.js +0 -672
- package/dist/dispatch/domains/admin.js.map +0 -1
- package/dist/dispatch/domains/check.d.ts +0 -24
- package/dist/dispatch/domains/check.d.ts.map +0 -1
- package/dist/dispatch/domains/check.js +0 -281
- package/dist/dispatch/domains/check.js.map +0 -1
- package/dist/dispatch/domains/index.d.ts +0 -26
- package/dist/dispatch/domains/index.d.ts.map +0 -1
- package/dist/dispatch/domains/index.js +0 -38
- package/dist/dispatch/domains/index.js.map +0 -1
- package/dist/dispatch/domains/memory.d.ts +0 -24
- package/dist/dispatch/domains/memory.d.ts.map +0 -1
- package/dist/dispatch/domains/memory.js +0 -305
- package/dist/dispatch/domains/memory.js.map +0 -1
- package/dist/dispatch/domains/nexus.d.ts +0 -24
- package/dist/dispatch/domains/nexus.d.ts.map +0 -1
- package/dist/dispatch/domains/nexus.js +0 -252
- package/dist/dispatch/domains/nexus.js.map +0 -1
- package/dist/dispatch/domains/orchestrate.d.ts +0 -21
- package/dist/dispatch/domains/orchestrate.d.ts.map +0 -1
- package/dist/dispatch/domains/orchestrate.js +0 -261
- package/dist/dispatch/domains/orchestrate.js.map +0 -1
- package/dist/dispatch/domains/pipeline.d.ts +0 -36
- package/dist/dispatch/domains/pipeline.d.ts.map +0 -1
- package/dist/dispatch/domains/pipeline.js +0 -554
- package/dist/dispatch/domains/pipeline.js.map +0 -1
- package/dist/dispatch/domains/session.d.ts +0 -24
- package/dist/dispatch/domains/session.d.ts.map +0 -1
- package/dist/dispatch/domains/session.js +0 -257
- package/dist/dispatch/domains/session.js.map +0 -1
- package/dist/dispatch/domains/sticky.d.ts +0 -22
- package/dist/dispatch/domains/sticky.d.ts.map +0 -1
- package/dist/dispatch/domains/sticky.js +0 -166
- package/dist/dispatch/domains/sticky.js.map +0 -1
- package/dist/dispatch/domains/tasks.d.ts +0 -26
- package/dist/dispatch/domains/tasks.d.ts.map +0 -1
- package/dist/dispatch/domains/tasks.js +0 -352
- package/dist/dispatch/domains/tasks.js.map +0 -1
- package/dist/dispatch/domains/tools.d.ts +0 -40
- package/dist/dispatch/domains/tools.d.ts.map +0 -1
- package/dist/dispatch/domains/tools.js +0 -497
- package/dist/dispatch/domains/tools.js.map +0 -1
- package/dist/dispatch/engines/_error.d.ts +0 -42
- package/dist/dispatch/engines/_error.d.ts.map +0 -1
- package/dist/dispatch/engines/_error.js +0 -201
- package/dist/dispatch/engines/_error.js.map +0 -1
- package/dist/dispatch/engines/codebase-map-engine.d.ts +0 -17
- package/dist/dispatch/engines/codebase-map-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/codebase-map-engine.js +0 -29
- package/dist/dispatch/engines/codebase-map-engine.js.map +0 -1
- package/dist/dispatch/engines/config-engine.d.ts +0 -21
- package/dist/dispatch/engines/config-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/config-engine.js +0 -45
- package/dist/dispatch/engines/config-engine.js.map +0 -1
- package/dist/dispatch/engines/hooks-engine.d.ts +0 -47
- package/dist/dispatch/engines/hooks-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/hooks-engine.js +0 -57
- package/dist/dispatch/engines/hooks-engine.js.map +0 -1
- package/dist/dispatch/engines/init-engine.d.ts +0 -43
- package/dist/dispatch/engines/init-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/init-engine.js +0 -73
- package/dist/dispatch/engines/init-engine.js.map +0 -1
- package/dist/dispatch/engines/lifecycle-engine.d.ts +0 -66
- package/dist/dispatch/engines/lifecycle-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/lifecycle-engine.js +0 -213
- package/dist/dispatch/engines/lifecycle-engine.js.map +0 -1
- package/dist/dispatch/engines/memory-engine.d.ts +0 -10
- package/dist/dispatch/engines/memory-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/memory-engine.js +0 -10
- package/dist/dispatch/engines/memory-engine.js.map +0 -1
- package/dist/dispatch/engines/nexus-engine.d.ts +0 -159
- package/dist/dispatch/engines/nexus-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/nexus-engine.js +0 -329
- package/dist/dispatch/engines/nexus-engine.js.map +0 -1
- package/dist/dispatch/engines/orchestrate-engine.d.ts +0 -133
- package/dist/dispatch/engines/orchestrate-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/orchestrate-engine.js +0 -770
- package/dist/dispatch/engines/orchestrate-engine.js.map +0 -1
- package/dist/dispatch/engines/pipeline-engine.d.ts +0 -51
- package/dist/dispatch/engines/pipeline-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/pipeline-engine.js +0 -192
- package/dist/dispatch/engines/pipeline-engine.js.map +0 -1
- package/dist/dispatch/engines/release-engine.d.ts +0 -94
- package/dist/dispatch/engines/release-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/release-engine.js +0 -670
- package/dist/dispatch/engines/release-engine.js.map +0 -1
- package/dist/dispatch/engines/session-engine.d.ts +0 -326
- package/dist/dispatch/engines/session-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/session-engine.js +0 -869
- package/dist/dispatch/engines/session-engine.js.map +0 -1
- package/dist/dispatch/engines/sticky-engine.d.ts +0 -100
- package/dist/dispatch/engines/sticky-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/sticky-engine.js +0 -181
- package/dist/dispatch/engines/sticky-engine.js.map +0 -1
- package/dist/dispatch/engines/system-engine.d.ts +0 -377
- package/dist/dispatch/engines/system-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/system-engine.js +0 -980
- package/dist/dispatch/engines/system-engine.js.map +0 -1
- package/dist/dispatch/engines/task-engine.d.ts +0 -584
- package/dist/dispatch/engines/task-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/task-engine.js +0 -881
- package/dist/dispatch/engines/task-engine.js.map +0 -1
- package/dist/dispatch/engines/template-parser.d.ts +0 -34
- package/dist/dispatch/engines/template-parser.d.ts.map +0 -1
- package/dist/dispatch/engines/template-parser.js +0 -57
- package/dist/dispatch/engines/template-parser.js.map +0 -1
- package/dist/dispatch/engines/tools-engine.d.ts +0 -285
- package/dist/dispatch/engines/tools-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/tools-engine.js +0 -676
- package/dist/dispatch/engines/tools-engine.js.map +0 -1
- package/dist/dispatch/engines/validate-engine.d.ts +0 -154
- package/dist/dispatch/engines/validate-engine.d.ts.map +0 -1
- package/dist/dispatch/engines/validate-engine.js +0 -527
- package/dist/dispatch/engines/validate-engine.js.map +0 -1
- package/dist/dispatch/index.d.ts +0 -20
- package/dist/dispatch/index.d.ts.map +0 -1
- package/dist/dispatch/index.js +0 -19
- package/dist/dispatch/index.js.map +0 -1
- package/dist/dispatch/lib/capability-matrix.d.ts +0 -11
- package/dist/dispatch/lib/capability-matrix.d.ts.map +0 -1
- package/dist/dispatch/lib/capability-matrix.js +0 -10
- package/dist/dispatch/lib/capability-matrix.js.map +0 -1
- package/dist/dispatch/lib/config.d.ts +0 -16
- package/dist/dispatch/lib/config.d.ts.map +0 -1
- package/dist/dispatch/lib/config.js +0 -15
- package/dist/dispatch/lib/config.js.map +0 -1
- package/dist/dispatch/lib/engine.d.ts +0 -25
- package/dist/dispatch/lib/engine.d.ts.map +0 -1
- package/dist/dispatch/lib/engine.js +0 -44
- package/dist/dispatch/lib/engine.js.map +0 -1
- package/dist/dispatch/lib/meta.d.ts +0 -26
- package/dist/dispatch/lib/meta.d.ts.map +0 -1
- package/dist/dispatch/lib/meta.js +0 -37
- package/dist/dispatch/lib/meta.js.map +0 -1
- package/dist/dispatch/lib/param-utils.d.ts +0 -11
- package/dist/dispatch/lib/param-utils.d.ts.map +0 -1
- package/dist/dispatch/lib/param-utils.js +0 -10
- package/dist/dispatch/lib/param-utils.js.map +0 -1
- package/dist/dispatch/lib/projections.d.ts +0 -23
- package/dist/dispatch/lib/projections.d.ts.map +0 -1
- package/dist/dispatch/lib/projections.js +0 -48
- package/dist/dispatch/lib/projections.js.map +0 -1
- package/dist/dispatch/lib/schema-utils.d.ts +0 -42
- package/dist/dispatch/lib/schema-utils.d.ts.map +0 -1
- package/dist/dispatch/lib/schema-utils.js +0 -93
- package/dist/dispatch/lib/schema-utils.js.map +0 -1
- package/dist/dispatch/lib/security.d.ts +0 -12
- package/dist/dispatch/lib/security.d.ts.map +0 -1
- package/dist/dispatch/lib/security.js +0 -10
- package/dist/dispatch/lib/security.js.map +0 -1
- package/dist/dispatch/middleware/audit.d.ts +0 -23
- package/dist/dispatch/middleware/audit.d.ts.map +0 -1
- package/dist/dispatch/middleware/audit.js +0 -169
- package/dist/dispatch/middleware/audit.js.map +0 -1
- package/dist/dispatch/middleware/field-filter.d.ts +0 -24
- package/dist/dispatch/middleware/field-filter.d.ts.map +0 -1
- package/dist/dispatch/middleware/field-filter.js +0 -65
- package/dist/dispatch/middleware/field-filter.js.map +0 -1
- package/dist/dispatch/middleware/pipeline.d.ts +0 -20
- package/dist/dispatch/middleware/pipeline.d.ts.map +0 -1
- package/dist/dispatch/middleware/pipeline.js +0 -47
- package/dist/dispatch/middleware/pipeline.js.map +0 -1
- package/dist/dispatch/middleware/projection.d.ts +0 -35
- package/dist/dispatch/middleware/projection.d.ts.map +0 -1
- package/dist/dispatch/middleware/projection.js +0 -145
- package/dist/dispatch/middleware/projection.js.map +0 -1
- package/dist/dispatch/middleware/protocol-enforcement.d.ts +0 -12
- package/dist/dispatch/middleware/protocol-enforcement.d.ts.map +0 -1
- package/dist/dispatch/middleware/protocol-enforcement.js +0 -30
- package/dist/dispatch/middleware/protocol-enforcement.js.map +0 -1
- package/dist/dispatch/middleware/rate-limiter.d.ts +0 -30
- package/dist/dispatch/middleware/rate-limiter.d.ts.map +0 -1
- package/dist/dispatch/middleware/rate-limiter.js +0 -101
- package/dist/dispatch/middleware/rate-limiter.js.map +0 -1
- package/dist/dispatch/middleware/sanitizer.d.ts +0 -10
- package/dist/dispatch/middleware/sanitizer.d.ts.map +0 -1
- package/dist/dispatch/middleware/sanitizer.js +0 -42
- package/dist/dispatch/middleware/sanitizer.js.map +0 -1
- package/dist/dispatch/middleware/session-resolver.d.ts +0 -26
- package/dist/dispatch/middleware/session-resolver.d.ts.map +0 -1
- package/dist/dispatch/middleware/session-resolver.js +0 -65
- package/dist/dispatch/middleware/session-resolver.js.map +0 -1
- package/dist/dispatch/middleware/verification-gates.d.ts +0 -3
- package/dist/dispatch/middleware/verification-gates.d.ts.map +0 -1
- package/dist/dispatch/middleware/verification-gates.js +0 -40
- package/dist/dispatch/middleware/verification-gates.js.map +0 -1
- package/dist/dispatch/registry.d.ts +0 -91
- package/dist/dispatch/registry.d.ts.map +0 -1
- package/dist/dispatch/registry.js +0 -2693
- package/dist/dispatch/registry.js.map +0 -1
- package/dist/dispatch/types.d.ts +0 -218
- package/dist/dispatch/types.d.ts.map +0 -1
- package/dist/dispatch/types.js +0 -25
- package/dist/dispatch/types.js.map +0 -1
- package/dist/mcp/gateways/mutate.d.ts +0 -146
- package/dist/mcp/gateways/mutate.d.ts.map +0 -1
- package/dist/mcp/gateways/mutate.js +0 -1016
- package/dist/mcp/gateways/mutate.js.map +0 -1
- package/dist/mcp/gateways/query.d.ts +0 -138
- package/dist/mcp/gateways/query.d.ts.map +0 -1
- package/dist/mcp/gateways/query.js +0 -186
- package/dist/mcp/gateways/query.js.map +0 -1
- package/dist/mcp/index.d.ts +0 -16
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/lib/background-jobs.d.ts +0 -86
- package/dist/mcp/lib/background-jobs.d.ts.map +0 -1
- package/dist/mcp/lib/background-jobs.js +0 -183
- package/dist/mcp/lib/background-jobs.js.map +0 -1
- package/dist/mcp/lib/budget.d.ts +0 -35
- package/dist/mcp/lib/budget.d.ts.map +0 -1
- package/dist/mcp/lib/budget.js +0 -102
- package/dist/mcp/lib/budget.js.map +0 -1
- package/dist/mcp/lib/cache.d.ts +0 -78
- package/dist/mcp/lib/cache.d.ts.map +0 -1
- package/dist/mcp/lib/cache.js +0 -207
- package/dist/mcp/lib/cache.js.map +0 -1
- package/dist/mcp/lib/config.d.ts +0 -42
- package/dist/mcp/lib/config.d.ts.map +0 -1
- package/dist/mcp/lib/config.js +0 -241
- package/dist/mcp/lib/config.js.map +0 -1
- package/dist/mcp/lib/defaults.d.ts +0 -115
- package/dist/mcp/lib/defaults.d.ts.map +0 -1
- package/dist/mcp/lib/defaults.js +0 -61
- package/dist/mcp/lib/defaults.js.map +0 -1
- package/dist/mcp/lib/exit-codes.d.ts +0 -197
- package/dist/mcp/lib/exit-codes.d.ts.map +0 -1
- package/dist/mcp/lib/exit-codes.js +0 -1016
- package/dist/mcp/lib/exit-codes.js.map +0 -1
- package/dist/mcp/lib/gate-validators.d.ts +0 -13
- package/dist/mcp/lib/gate-validators.d.ts.map +0 -1
- package/dist/mcp/lib/gate-validators.js +0 -13
- package/dist/mcp/lib/gate-validators.js.map +0 -1
- package/dist/mcp/lib/gateway-meta.d.ts +0 -37
- package/dist/mcp/lib/gateway-meta.d.ts.map +0 -1
- package/dist/mcp/lib/gateway-meta.js +0 -50
- package/dist/mcp/lib/gateway-meta.js.map +0 -1
- package/dist/mcp/lib/job-manager-accessor.d.ts +0 -10
- package/dist/mcp/lib/job-manager-accessor.d.ts.map +0 -1
- package/dist/mcp/lib/job-manager-accessor.js +0 -14
- package/dist/mcp/lib/job-manager-accessor.js.map +0 -1
- package/dist/mcp/lib/protocol-enforcement.d.ts +0 -12
- package/dist/mcp/lib/protocol-enforcement.d.ts.map +0 -1
- package/dist/mcp/lib/protocol-enforcement.js +0 -12
- package/dist/mcp/lib/protocol-enforcement.js.map +0 -1
- package/dist/mcp/lib/protocol-rules.d.ts +0 -12
- package/dist/mcp/lib/protocol-rules.d.ts.map +0 -1
- package/dist/mcp/lib/protocol-rules.js +0 -12
- package/dist/mcp/lib/protocol-rules.js.map +0 -1
- package/dist/mcp/lib/rate-limiter.d.ts +0 -110
- package/dist/mcp/lib/rate-limiter.d.ts.map +0 -1
- package/dist/mcp/lib/rate-limiter.js +0 -208
- package/dist/mcp/lib/rate-limiter.js.map +0 -1
- package/dist/mcp/lib/router.d.ts +0 -58
- package/dist/mcp/lib/router.d.ts.map +0 -1
- package/dist/mcp/lib/router.js +0 -12
- package/dist/mcp/lib/router.js.map +0 -1
- package/dist/mcp/lib/security.d.ts +0 -161
- package/dist/mcp/lib/security.d.ts.map +0 -1
- package/dist/mcp/lib/security.js +0 -361
- package/dist/mcp/lib/security.js.map +0 -1
- package/dist/mcp/lib/verification-gates.d.ts +0 -13
- package/dist/mcp/lib/verification-gates.d.ts.map +0 -1
- package/dist/mcp/lib/verification-gates.js +0 -12
- package/dist/mcp/lib/verification-gates.js.map +0 -1
- package/dist/mcp/resources/budget.d.ts +0 -22
- package/dist/mcp/resources/budget.d.ts.map +0 -1
- package/dist/mcp/resources/budget.js +0 -46
- package/dist/mcp/resources/budget.js.map +0 -1
- package/dist/mcp/resources/index.d.ts +0 -53
- package/dist/mcp/resources/index.d.ts.map +0 -1
- package/dist/mcp/resources/index.js +0 -278
- package/dist/mcp/resources/index.js.map +0 -1
package/dist/mcp/lib/router.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Legacy Domain Router Types
|
|
3
|
-
*
|
|
4
|
-
* This file retains only the DomainRequest / DomainResponse interfaces
|
|
5
|
-
* used by the gateway tool definitions (query.ts and mutate.ts) and
|
|
6
|
-
* protocol enforcement. The DomainRouter class has been removed —
|
|
7
|
-
* all routing now goes through the dispatch layer.
|
|
8
|
-
*
|
|
9
|
-
* @task T2911
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Request from MCP gateway
|
|
13
|
-
*/
|
|
14
|
-
export interface DomainRequest {
|
|
15
|
-
gateway: 'query' | 'mutate';
|
|
16
|
-
domain: string;
|
|
17
|
-
operation: string;
|
|
18
|
-
params?: Record<string, unknown>;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Response from domain handler
|
|
22
|
-
*/
|
|
23
|
-
export interface DomainResponse {
|
|
24
|
-
_meta: {
|
|
25
|
-
gateway: string;
|
|
26
|
-
domain: string;
|
|
27
|
-
operation: string;
|
|
28
|
-
timestamp: string;
|
|
29
|
-
duration_ms: number;
|
|
30
|
-
[key: string]: unknown;
|
|
31
|
-
};
|
|
32
|
-
success: boolean;
|
|
33
|
-
data?: unknown;
|
|
34
|
-
partial?: boolean;
|
|
35
|
-
error?: {
|
|
36
|
-
code: string;
|
|
37
|
-
exitCode?: number;
|
|
38
|
-
message: string;
|
|
39
|
-
details?: Record<string, unknown>;
|
|
40
|
-
fix?: string;
|
|
41
|
-
alternatives?: Array<{
|
|
42
|
-
action: string;
|
|
43
|
-
command: string;
|
|
44
|
-
}>;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Domain handler interface (legacy - retained for type compatibility)
|
|
49
|
-
*/
|
|
50
|
-
export interface DomainHandler {
|
|
51
|
-
query(operation: string, params?: Record<string, unknown>): Promise<DomainResponse>;
|
|
52
|
-
mutate(operation: string, params?: Record<string, unknown>): Promise<DomainResponse>;
|
|
53
|
-
getSupportedOperations(): {
|
|
54
|
-
query: string[];
|
|
55
|
-
mutate: string[];
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=router.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../src/mcp/lib/router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,M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1
|
-
/**
|
|
2
|
-
* Legacy Domain Router Types
|
|
3
|
-
*
|
|
4
|
-
* This file retains only the DomainRequest / DomainResponse interfaces
|
|
5
|
-
* used by the gateway tool definitions (query.ts and mutate.ts) and
|
|
6
|
-
* protocol enforcement. The DomainRouter class has been removed —
|
|
7
|
-
* all routing now goes through the dispatch layer.
|
|
8
|
-
*
|
|
9
|
-
* @task T2911
|
|
10
|
-
*/
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=router.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../../src/mcp/lib/router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Security Hardening and Input Sanitization for CLEO MCP Server
|
|
3
|
-
*
|
|
4
|
-
* Provides input validation, path sanitization, content filtering,
|
|
5
|
-
* enum checking, and rate limiting for all MCP operations.
|
|
6
|
-
*
|
|
7
|
-
* @task T3144
|
|
8
|
-
* @epic T3125
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Security validation error thrown when input fails sanitization
|
|
12
|
-
*/
|
|
13
|
-
export declare class SecurityError extends Error {
|
|
14
|
-
code: string;
|
|
15
|
-
field?: string | undefined;
|
|
16
|
-
constructor(message: string, code?: string, field?: string | undefined);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Sanitize and validate a task ID
|
|
20
|
-
*
|
|
21
|
-
* Validates format: ^T[0-9]+$
|
|
22
|
-
* Rejects empty, malformed, or excessively large IDs
|
|
23
|
-
*
|
|
24
|
-
* @param id - Raw task ID input
|
|
25
|
-
* @returns Sanitized task ID
|
|
26
|
-
* @throws SecurityError if ID is invalid
|
|
27
|
-
*/
|
|
28
|
-
export declare function sanitizeTaskId(value: unknown): string;
|
|
29
|
-
/**
|
|
30
|
-
* Sanitize and validate a file path
|
|
31
|
-
*
|
|
32
|
-
* Prevents path traversal attacks by ensuring the resolved path
|
|
33
|
-
* stays within the project root directory.
|
|
34
|
-
*
|
|
35
|
-
* @param path - Raw path input
|
|
36
|
-
* @param projectRoot - Project root directory (absolute path)
|
|
37
|
-
* @returns Sanitized absolute path within project root
|
|
38
|
-
* @throws SecurityError if path escapes project root or is invalid
|
|
39
|
-
*/
|
|
40
|
-
export declare function sanitizePath(path: string, projectRoot: string): string;
|
|
41
|
-
/**
|
|
42
|
-
* Sanitize content string
|
|
43
|
-
*
|
|
44
|
-
* Enforces size limits and strips control characters (except newline, tab, CR).
|
|
45
|
-
*
|
|
46
|
-
* @param content - Raw content string
|
|
47
|
-
* @param maxLength - Maximum allowed length (default: 64KB)
|
|
48
|
-
* @returns Sanitized content string
|
|
49
|
-
* @throws SecurityError if content exceeds size limit
|
|
50
|
-
*/
|
|
51
|
-
export declare function sanitizeContent(content: string, maxLength?: number): string;
|
|
52
|
-
/**
|
|
53
|
-
* Validate that a value is in an allowed enum set
|
|
54
|
-
*
|
|
55
|
-
* @param value - Value to validate
|
|
56
|
-
* @param allowed - Array of allowed values
|
|
57
|
-
* @param fieldName - Name of the field (for error messages)
|
|
58
|
-
* @returns The validated value
|
|
59
|
-
* @throws SecurityError if value is not in allowed set
|
|
60
|
-
*/
|
|
61
|
-
export declare function validateEnum(value: string, allowed: string[], fieldName: string): string;
|
|
62
|
-
/**
|
|
63
|
-
* Known enum values for CLEO domains
|
|
64
|
-
*/
|
|
65
|
-
export declare const VALID_DOMAINS: readonly ["tasks", "session", "orchestrate", "research", "lifecycle", "validate", "release", "system"];
|
|
66
|
-
export declare const VALID_GATEWAYS: readonly ["query", "mutate"];
|
|
67
|
-
export declare const VALID_MANIFEST_STATUSES: readonly ["completed", "partial", "blocked", "archived"];
|
|
68
|
-
export declare const VALID_LIFECYCLE_STAGE_STATUSES: readonly ["not_started", "in_progress", "blocked", "completed", "skipped", "failed"];
|
|
69
|
-
export declare const ALL_VALID_STATUSES: readonly ["pending", "active", "blocked", "done", "cancelled", "archived", "completed", "partial", "blocked", "archived"];
|
|
70
|
-
export declare const VALID_PRIORITIES: readonly ["critical", "high", "medium", "low"];
|
|
71
|
-
/**
|
|
72
|
-
* Rate limiter configuration
|
|
73
|
-
*/
|
|
74
|
-
export interface RateLimitConfig {
|
|
75
|
-
/** Maximum requests allowed in the window */
|
|
76
|
-
maxRequests: number;
|
|
77
|
-
/** Time window in milliseconds */
|
|
78
|
-
windowMs: number;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Rate limit check result
|
|
82
|
-
*/
|
|
83
|
-
export interface RateLimitResult {
|
|
84
|
-
/** Whether the request is allowed */
|
|
85
|
-
allowed: boolean;
|
|
86
|
-
/** Remaining requests in current window */
|
|
87
|
-
remaining: number;
|
|
88
|
-
/** Milliseconds until window resets */
|
|
89
|
-
resetMs: number;
|
|
90
|
-
/** Total limit for the window */
|
|
91
|
-
limit: number;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Default rate limit configurations per operation type
|
|
95
|
-
*/
|
|
96
|
-
export declare const DEFAULT_RATE_LIMITS: Record<string, RateLimitConfig>;
|
|
97
|
-
/**
|
|
98
|
-
* In-memory sliding window rate limiter
|
|
99
|
-
*
|
|
100
|
-
* Tracks request timestamps per key and enforces configurable limits.
|
|
101
|
-
*/
|
|
102
|
-
export declare class RateLimiter {
|
|
103
|
-
private windows;
|
|
104
|
-
private configs;
|
|
105
|
-
constructor(configs?: Record<string, RateLimitConfig>);
|
|
106
|
-
/**
|
|
107
|
-
* Check if a request is allowed under rate limits
|
|
108
|
-
*
|
|
109
|
-
* @param key - Rate limit bucket key (e.g., 'query', 'mutate', 'spawn')
|
|
110
|
-
* @returns Rate limit check result
|
|
111
|
-
*/
|
|
112
|
-
check(key: string): RateLimitResult;
|
|
113
|
-
/**
|
|
114
|
-
* Record a request (call after check returns allowed: true)
|
|
115
|
-
*
|
|
116
|
-
* @param key - Rate limit bucket key
|
|
117
|
-
*/
|
|
118
|
-
record(key: string): void;
|
|
119
|
-
/**
|
|
120
|
-
* Check and record in one step
|
|
121
|
-
*
|
|
122
|
-
* @param key - Rate limit bucket key
|
|
123
|
-
* @returns Rate limit check result (recorded if allowed)
|
|
124
|
-
*/
|
|
125
|
-
consume(key: string): RateLimitResult;
|
|
126
|
-
/**
|
|
127
|
-
* Reset rate limit state for a specific key or all keys
|
|
128
|
-
*
|
|
129
|
-
* @param key - Optional key to reset (resets all if omitted)
|
|
130
|
-
*/
|
|
131
|
-
reset(key?: string): void;
|
|
132
|
-
/**
|
|
133
|
-
* Get current configuration for a key
|
|
134
|
-
*/
|
|
135
|
-
getConfig(key: string): RateLimitConfig | undefined;
|
|
136
|
-
/**
|
|
137
|
-
* Update configuration for a key
|
|
138
|
-
*/
|
|
139
|
-
setConfig(key: string, config: RateLimitConfig): void;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Sanitize all params in a DomainRequest before routing
|
|
143
|
-
*
|
|
144
|
-
* Applies appropriate sanitization based on known field names:
|
|
145
|
-
* - taskId, parent, epicId -> sanitizeTaskId
|
|
146
|
-
* - path, file -> sanitizePath (if projectRoot provided)
|
|
147
|
-
* - title, description, notes, content -> sanitizeContent
|
|
148
|
-
* - status -> validateEnum(TASK_STATUSES)
|
|
149
|
-
* - priority -> validateEnum(VALID_PRIORITIES)
|
|
150
|
-
* - domain -> validateEnum(VALID_DOMAINS)
|
|
151
|
-
*
|
|
152
|
-
* @param params - Raw request parameters
|
|
153
|
-
* @param projectRoot - Project root for path sanitization
|
|
154
|
-
* @returns Sanitized parameters
|
|
155
|
-
* @throws SecurityError on validation failure
|
|
156
|
-
*/
|
|
157
|
-
export declare function sanitizeParams(params: Record<string, unknown> | undefined, projectRoot?: string, context?: {
|
|
158
|
-
domain?: string;
|
|
159
|
-
operation?: string;
|
|
160
|
-
}): Record<string, unknown> | undefined;
|
|
161
|
-
//# sourceMappingURL=security.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"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;IAClB,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAI/D,CAAC;AAEF;;;;GAIG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,OAAO,CAA2C;gBAE9C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;IAQrD;;;;;OAKG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe;IAiCnC;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMzB;;;;;OAKG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe;IAUrC;;;;OAIG;IACH,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI;IAQzB;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAInD;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI;CAGtD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC3C,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CA6FrC"}
|
package/dist/mcp/lib/security.js
DELETED
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Security Hardening and Input Sanitization for CLEO MCP Server
|
|
3
|
-
*
|
|
4
|
-
* Provides input validation, path sanitization, content filtering,
|
|
5
|
-
* enum checking, and rate limiting for all MCP operations.
|
|
6
|
-
*
|
|
7
|
-
* @task T3144
|
|
8
|
-
* @epic T3125
|
|
9
|
-
*/
|
|
10
|
-
import { normalizeTaskId } from '@cleocode/core/internal';
|
|
11
|
-
import { isAbsolute, normalize, relative, resolve } from 'path';
|
|
12
|
-
import { LIFECYCLE_STAGE_STATUSES, MANIFEST_STATUSES, TASK_STATUSES, } from '@cleocode/contracts';
|
|
13
|
-
import { TASK_PRIORITIES } from '@cleocode/core/internal';
|
|
14
|
-
/**
|
|
15
|
-
* Security validation error thrown when input fails sanitization
|
|
16
|
-
*/
|
|
17
|
-
export class SecurityError extends Error {
|
|
18
|
-
code;
|
|
19
|
-
field;
|
|
20
|
-
constructor(message, code = 'E_SECURITY_VIOLATION', field) {
|
|
21
|
-
super(message);
|
|
22
|
-
this.code = code;
|
|
23
|
-
this.field = field;
|
|
24
|
-
this.name = 'SecurityError';
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Maximum task ID numeric value (prevent absurdly large IDs)
|
|
29
|
-
*/
|
|
30
|
-
const MAX_TASK_ID_NUMBER = 999999;
|
|
31
|
-
/**
|
|
32
|
-
* Control character pattern (C0 and C1 control chars, excluding newline/tab/cr)
|
|
33
|
-
*/
|
|
34
|
-
const CONTROL_CHAR_PATTERN = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/g;
|
|
35
|
-
/**
|
|
36
|
-
* Default maximum content length (64KB)
|
|
37
|
-
*/
|
|
38
|
-
const DEFAULT_MAX_CONTENT_LENGTH = 64 * 1024;
|
|
39
|
-
/**
|
|
40
|
-
* Sanitize and validate a task ID
|
|
41
|
-
*
|
|
42
|
-
* Validates format: ^T[0-9]+$
|
|
43
|
-
* Rejects empty, malformed, or excessively large IDs
|
|
44
|
-
*
|
|
45
|
-
* @param id - Raw task ID input
|
|
46
|
-
* @returns Sanitized task ID
|
|
47
|
-
* @throws SecurityError if ID is invalid
|
|
48
|
-
*/
|
|
49
|
-
export function sanitizeTaskId(value) {
|
|
50
|
-
if (typeof value !== 'string') {
|
|
51
|
-
throw new SecurityError('Task ID must be a string', 'E_INVALID_TASK_ID', 'taskId');
|
|
52
|
-
}
|
|
53
|
-
const normalized = normalizeTaskId(value);
|
|
54
|
-
if (normalized === null) {
|
|
55
|
-
throw new SecurityError(`Invalid task ID format: ${value}`, 'E_INVALID_TASK_ID', 'taskId');
|
|
56
|
-
}
|
|
57
|
-
// Validate numeric value isn't absurdly large
|
|
58
|
-
const numericPart = parseInt(normalized.slice(1), 10);
|
|
59
|
-
if (numericPart > MAX_TASK_ID_NUMBER) {
|
|
60
|
-
throw new SecurityError(`Task ID exceeds maximum value: ${value}`, 'E_INVALID_TASK_ID', 'taskId');
|
|
61
|
-
}
|
|
62
|
-
return normalized;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Sanitize and validate a file path
|
|
66
|
-
*
|
|
67
|
-
* Prevents path traversal attacks by ensuring the resolved path
|
|
68
|
-
* stays within the project root directory.
|
|
69
|
-
*
|
|
70
|
-
* @param path - Raw path input
|
|
71
|
-
* @param projectRoot - Project root directory (absolute path)
|
|
72
|
-
* @returns Sanitized absolute path within project root
|
|
73
|
-
* @throws SecurityError if path escapes project root or is invalid
|
|
74
|
-
*/
|
|
75
|
-
export function sanitizePath(path, projectRoot) {
|
|
76
|
-
if (typeof path !== 'string') {
|
|
77
|
-
throw new SecurityError('Path must be a string', 'E_INVALID_PATH', 'path');
|
|
78
|
-
}
|
|
79
|
-
if (typeof projectRoot !== 'string' || projectRoot.length === 0) {
|
|
80
|
-
throw new SecurityError('Project root must be a non-empty string', 'E_INVALID_PATH', 'projectRoot');
|
|
81
|
-
}
|
|
82
|
-
const trimmedPath = path.trim();
|
|
83
|
-
if (trimmedPath.length === 0) {
|
|
84
|
-
throw new SecurityError('Path cannot be empty', 'E_INVALID_PATH', 'path');
|
|
85
|
-
}
|
|
86
|
-
// Check for null bytes (common injection vector)
|
|
87
|
-
if (trimmedPath.includes('\0')) {
|
|
88
|
-
throw new SecurityError('Path contains null bytes', 'E_PATH_TRAVERSAL', 'path');
|
|
89
|
-
}
|
|
90
|
-
// Normalize the project root
|
|
91
|
-
const normalizedRoot = resolve(projectRoot);
|
|
92
|
-
// Resolve the path relative to project root
|
|
93
|
-
let resolvedPath;
|
|
94
|
-
if (isAbsolute(trimmedPath)) {
|
|
95
|
-
resolvedPath = normalize(trimmedPath);
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
resolvedPath = resolve(normalizedRoot, trimmedPath);
|
|
99
|
-
}
|
|
100
|
-
// Ensure the resolved path is within the project root
|
|
101
|
-
const relativePath = relative(normalizedRoot, resolvedPath);
|
|
102
|
-
// If relative path starts with '..' or is absolute, it escapes the root
|
|
103
|
-
if (relativePath.startsWith('..') || isAbsolute(relativePath)) {
|
|
104
|
-
throw new SecurityError(`Path traversal detected: "${path}" resolves outside project root`, 'E_PATH_TRAVERSAL', 'path');
|
|
105
|
-
}
|
|
106
|
-
return resolvedPath;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Sanitize content string
|
|
110
|
-
*
|
|
111
|
-
* Enforces size limits and strips control characters (except newline, tab, CR).
|
|
112
|
-
*
|
|
113
|
-
* @param content - Raw content string
|
|
114
|
-
* @param maxLength - Maximum allowed length (default: 64KB)
|
|
115
|
-
* @returns Sanitized content string
|
|
116
|
-
* @throws SecurityError if content exceeds size limit
|
|
117
|
-
*/
|
|
118
|
-
export function sanitizeContent(content, maxLength = DEFAULT_MAX_CONTENT_LENGTH) {
|
|
119
|
-
if (typeof content !== 'string') {
|
|
120
|
-
throw new SecurityError('Content must be a string', 'E_INVALID_CONTENT', 'content');
|
|
121
|
-
}
|
|
122
|
-
if (content.length > maxLength) {
|
|
123
|
-
throw new SecurityError(`Content exceeds maximum length (${maxLength} characters): got ${content.length}`, 'E_CONTENT_TOO_LARGE', 'content');
|
|
124
|
-
}
|
|
125
|
-
// Strip control characters (preserve \n, \t, \r)
|
|
126
|
-
return content.replace(CONTROL_CHAR_PATTERN, '');
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Validate that a value is in an allowed enum set
|
|
130
|
-
*
|
|
131
|
-
* @param value - Value to validate
|
|
132
|
-
* @param allowed - Array of allowed values
|
|
133
|
-
* @param fieldName - Name of the field (for error messages)
|
|
134
|
-
* @returns The validated value
|
|
135
|
-
* @throws SecurityError if value is not in allowed set
|
|
136
|
-
*/
|
|
137
|
-
export function validateEnum(value, allowed, fieldName) {
|
|
138
|
-
if (typeof value !== 'string') {
|
|
139
|
-
throw new SecurityError(`${fieldName} must be a string`, 'E_INVALID_ENUM', fieldName);
|
|
140
|
-
}
|
|
141
|
-
const trimmed = value.trim();
|
|
142
|
-
if (!allowed.includes(trimmed)) {
|
|
143
|
-
throw new SecurityError(`Invalid ${fieldName}: "${trimmed}". Allowed values: ${allowed.join(', ')}`, 'E_INVALID_ENUM', fieldName);
|
|
144
|
-
}
|
|
145
|
-
return trimmed;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Known enum values for CLEO domains
|
|
149
|
-
*/
|
|
150
|
-
export const VALID_DOMAINS = [
|
|
151
|
-
'tasks',
|
|
152
|
-
'session',
|
|
153
|
-
'orchestrate',
|
|
154
|
-
'research',
|
|
155
|
-
'lifecycle',
|
|
156
|
-
'validate',
|
|
157
|
-
'release',
|
|
158
|
-
'system',
|
|
159
|
-
];
|
|
160
|
-
export const VALID_GATEWAYS = ['query', 'mutate'];
|
|
161
|
-
export const VALID_MANIFEST_STATUSES = MANIFEST_STATUSES;
|
|
162
|
-
export const VALID_LIFECYCLE_STAGE_STATUSES = LIFECYCLE_STAGE_STATUSES;
|
|
163
|
-
export const ALL_VALID_STATUSES = [...TASK_STATUSES, ...MANIFEST_STATUSES];
|
|
164
|
-
export const VALID_PRIORITIES = TASK_PRIORITIES;
|
|
165
|
-
/**
|
|
166
|
-
* Default rate limit configurations per operation type
|
|
167
|
-
*/
|
|
168
|
-
export const DEFAULT_RATE_LIMITS = {
|
|
169
|
-
query: { maxRequests: 100, windowMs: 60_000 },
|
|
170
|
-
mutate: { maxRequests: 30, windowMs: 60_000 },
|
|
171
|
-
spawn: { maxRequests: 10, windowMs: 60_000 },
|
|
172
|
-
};
|
|
173
|
-
/**
|
|
174
|
-
* In-memory sliding window rate limiter
|
|
175
|
-
*
|
|
176
|
-
* Tracks request timestamps per key and enforces configurable limits.
|
|
177
|
-
*/
|
|
178
|
-
export class RateLimiter {
|
|
179
|
-
windows = new Map();
|
|
180
|
-
configs = new Map();
|
|
181
|
-
constructor(configs) {
|
|
182
|
-
// Initialize with provided or default configs
|
|
183
|
-
const effectiveConfigs = configs ?? DEFAULT_RATE_LIMITS;
|
|
184
|
-
for (const [key, config] of Object.entries(effectiveConfigs)) {
|
|
185
|
-
this.configs.set(key, config);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Check if a request is allowed under rate limits
|
|
190
|
-
*
|
|
191
|
-
* @param key - Rate limit bucket key (e.g., 'query', 'mutate', 'spawn')
|
|
192
|
-
* @returns Rate limit check result
|
|
193
|
-
*/
|
|
194
|
-
check(key) {
|
|
195
|
-
const config = this.configs.get(key);
|
|
196
|
-
if (!config) {
|
|
197
|
-
// No config for this key - allow by default
|
|
198
|
-
return { allowed: true, remaining: Infinity, resetMs: 0, limit: Infinity };
|
|
199
|
-
}
|
|
200
|
-
const now = Date.now();
|
|
201
|
-
const windowStart = now - config.windowMs;
|
|
202
|
-
// Get or create window
|
|
203
|
-
let timestamps = this.windows.get(key);
|
|
204
|
-
if (!timestamps) {
|
|
205
|
-
timestamps = [];
|
|
206
|
-
this.windows.set(key, timestamps);
|
|
207
|
-
}
|
|
208
|
-
// Prune expired timestamps
|
|
209
|
-
const validTimestamps = timestamps.filter((t) => t > windowStart);
|
|
210
|
-
this.windows.set(key, validTimestamps);
|
|
211
|
-
const remaining = Math.max(0, config.maxRequests - validTimestamps.length);
|
|
212
|
-
const oldestInWindow = validTimestamps.length > 0 ? validTimestamps[0] : now;
|
|
213
|
-
const resetMs = Math.max(0, oldestInWindow + config.windowMs - now);
|
|
214
|
-
return {
|
|
215
|
-
allowed: validTimestamps.length < config.maxRequests,
|
|
216
|
-
remaining,
|
|
217
|
-
resetMs,
|
|
218
|
-
limit: config.maxRequests,
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Record a request (call after check returns allowed: true)
|
|
223
|
-
*
|
|
224
|
-
* @param key - Rate limit bucket key
|
|
225
|
-
*/
|
|
226
|
-
record(key) {
|
|
227
|
-
const timestamps = this.windows.get(key) ?? [];
|
|
228
|
-
timestamps.push(Date.now());
|
|
229
|
-
this.windows.set(key, timestamps);
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Check and record in one step
|
|
233
|
-
*
|
|
234
|
-
* @param key - Rate limit bucket key
|
|
235
|
-
* @returns Rate limit check result (recorded if allowed)
|
|
236
|
-
*/
|
|
237
|
-
consume(key) {
|
|
238
|
-
const result = this.check(key);
|
|
239
|
-
if (result.allowed) {
|
|
240
|
-
this.record(key);
|
|
241
|
-
// Adjust remaining after recording
|
|
242
|
-
result.remaining = Math.max(0, result.remaining - 1);
|
|
243
|
-
}
|
|
244
|
-
return result;
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Reset rate limit state for a specific key or all keys
|
|
248
|
-
*
|
|
249
|
-
* @param key - Optional key to reset (resets all if omitted)
|
|
250
|
-
*/
|
|
251
|
-
reset(key) {
|
|
252
|
-
if (key) {
|
|
253
|
-
this.windows.delete(key);
|
|
254
|
-
}
|
|
255
|
-
else {
|
|
256
|
-
this.windows.clear();
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Get current configuration for a key
|
|
261
|
-
*/
|
|
262
|
-
getConfig(key) {
|
|
263
|
-
return this.configs.get(key);
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Update configuration for a key
|
|
267
|
-
*/
|
|
268
|
-
setConfig(key, config) {
|
|
269
|
-
this.configs.set(key, config);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Sanitize all params in a DomainRequest before routing
|
|
274
|
-
*
|
|
275
|
-
* Applies appropriate sanitization based on known field names:
|
|
276
|
-
* - taskId, parent, epicId -> sanitizeTaskId
|
|
277
|
-
* - path, file -> sanitizePath (if projectRoot provided)
|
|
278
|
-
* - title, description, notes, content -> sanitizeContent
|
|
279
|
-
* - status -> validateEnum(TASK_STATUSES)
|
|
280
|
-
* - priority -> validateEnum(VALID_PRIORITIES)
|
|
281
|
-
* - domain -> validateEnum(VALID_DOMAINS)
|
|
282
|
-
*
|
|
283
|
-
* @param params - Raw request parameters
|
|
284
|
-
* @param projectRoot - Project root for path sanitization
|
|
285
|
-
* @returns Sanitized parameters
|
|
286
|
-
* @throws SecurityError on validation failure
|
|
287
|
-
*/
|
|
288
|
-
export function sanitizeParams(params, projectRoot, context) {
|
|
289
|
-
if (!params) {
|
|
290
|
-
return params;
|
|
291
|
-
}
|
|
292
|
-
const sanitized = { ...params };
|
|
293
|
-
for (const [key, value] of Object.entries(sanitized)) {
|
|
294
|
-
if (value === undefined || value === null) {
|
|
295
|
-
continue;
|
|
296
|
-
}
|
|
297
|
-
// Task ID fields
|
|
298
|
-
if (typeof value === 'string' &&
|
|
299
|
-
(key === 'taskId' ||
|
|
300
|
-
key === 'parent' ||
|
|
301
|
-
key === 'epicId' ||
|
|
302
|
-
key === 'parentId' ||
|
|
303
|
-
key === 'newParentId' ||
|
|
304
|
-
key === 'relatedId' ||
|
|
305
|
-
key === 'targetId')) {
|
|
306
|
-
// Allow empty string for 'parent' field (means "promote to root" / remove parent)
|
|
307
|
-
if (key === 'parent' && value === '') {
|
|
308
|
-
continue;
|
|
309
|
-
}
|
|
310
|
-
sanitized[key] = sanitizeTaskId(value);
|
|
311
|
-
continue;
|
|
312
|
-
}
|
|
313
|
-
// Task ID arrays (depends, addDepends, removeDepends)
|
|
314
|
-
if ((key === 'depends' || key === 'addDepends' || key === 'removeDepends') &&
|
|
315
|
-
Array.isArray(value)) {
|
|
316
|
-
sanitized[key] = value.map((v) => {
|
|
317
|
-
if (typeof v === 'string') {
|
|
318
|
-
return sanitizeTaskId(v);
|
|
319
|
-
}
|
|
320
|
-
return v;
|
|
321
|
-
});
|
|
322
|
-
continue;
|
|
323
|
-
}
|
|
324
|
-
// Path fields
|
|
325
|
-
if (typeof value === 'string' && (key === 'path' || key === 'file') && projectRoot) {
|
|
326
|
-
sanitized[key] = sanitizePath(value, projectRoot);
|
|
327
|
-
continue;
|
|
328
|
-
}
|
|
329
|
-
// Content fields (with size limits)
|
|
330
|
-
if (typeof value === 'string' &&
|
|
331
|
-
(key === 'title' || key === 'description' || key === 'content')) {
|
|
332
|
-
const maxLen = key === 'title' ? 200 : DEFAULT_MAX_CONTENT_LENGTH;
|
|
333
|
-
sanitized[key] = sanitizeContent(value, maxLen);
|
|
334
|
-
continue;
|
|
335
|
-
}
|
|
336
|
-
// Notes can be string or array of strings
|
|
337
|
-
if (key === 'notes') {
|
|
338
|
-
if (typeof value === 'string') {
|
|
339
|
-
sanitized[key] = sanitizeContent(value);
|
|
340
|
-
}
|
|
341
|
-
else if (Array.isArray(value)) {
|
|
342
|
-
sanitized[key] = value.map((v) => (typeof v === 'string' ? sanitizeContent(v) : v));
|
|
343
|
-
}
|
|
344
|
-
continue;
|
|
345
|
-
}
|
|
346
|
-
// Status enum - accept both task statuses and manifest statuses
|
|
347
|
-
if (typeof value === 'string' && key === 'status') {
|
|
348
|
-
const isLifecycleStageStatus = context?.domain === 'pipeline' && context?.operation === 'stage.record';
|
|
349
|
-
sanitized[key] = validateEnum(value, isLifecycleStageStatus
|
|
350
|
-
? [...LIFECYCLE_STAGE_STATUSES]
|
|
351
|
-
: [...TASK_STATUSES, ...MANIFEST_STATUSES], 'status');
|
|
352
|
-
continue;
|
|
353
|
-
}
|
|
354
|
-
// Priority enum
|
|
355
|
-
if (typeof value === 'string' && key === 'priority') {
|
|
356
|
-
sanitized[key] = validateEnum(value, [...VALID_PRIORITIES], 'priority');
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
return sanitized;
|
|
360
|
-
}
|
|
361
|
-
//# sourceMappingURL=security.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"security.js","sourceRoot":"","sources":["../../../src/mcp/lib/security.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAChE,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK;IAG7B;IACA;IAHT,YACE,OAAe,EACR,OAAe,sBAAsB,EACrC,KAAc;QAErB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,SAAI,GAAJ,IAAI,CAAiC;QACrC,UAAK,GAAL,KAAK,CAAS;QAGrB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC;;GAEG;AACH,MAAM,oBAAoB,GAAG,wCAAwC,CAAC;AAEtE;;GAEG;AACH,MAAM,0BAA0B,GAAG,EAAE,GAAG,IAAI,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,aAAa,CAAC,0BAA0B,EAAE,mBAAmB,EAAE,QAAQ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AC;YAC1C,CAAC;iBAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBAChC,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACtF,CAAC;YACD,SAAS;QACX,CAAC;QAED,gEAAgE;QAChE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,GAAG,KAAK,QAAQ,EAAE,CAAC;YAClD,MAAM,sBAAsB,GAC1B,OAAO,EAAE,MAAM,KAAK,UAAU,IAAI,OAAO,EAAE,SAAS,KAAK,cAAc,CAAC;YAE1E,SAAS,CAAC,GAAG,CAAC,GAAG,YAAY,CAC3B,KAAK,EACL,sBAAsB;gBACpB,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC;gBAC/B,CAAC,CAAC,CAAC,GAAG,aAAa,EAAE,GAAG,iBAAiB,CAAC,EAC5C,QAAQ,CACT,CAAC;YACF,SAAS;QACX,CAAC;QAED,gBAAgB;QAChB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,GAAG,KAAK,UAAU,EAAE,CAAC;YACpD,SAAS,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,GAAG,gBAAgB,CAAC,EAAE,UAAU,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Verification Gate System for CLEO MCP Server
|
|
3
|
-
*
|
|
4
|
-
* Re-exports from canonical location at src/core/validation/operation-verification-gates.ts.
|
|
5
|
-
* Retained for backward compatibility.
|
|
6
|
-
*
|
|
7
|
-
* @task T2936
|
|
8
|
-
* @task T5707
|
|
9
|
-
* @epic T2908
|
|
10
|
-
*/
|
|
11
|
-
export { createVerificationGate, GATE_SEQUENCE, GateLayer, GateStatus, getWorkflowGateDefinition, isValidWorkflowGateName, VerificationGate, WORKFLOW_GATE_DEFINITIONS, WORKFLOW_GATE_SEQUENCE, WorkflowGateName, WorkflowGateTracker, } from '@cleocode/core/internal';
|
|
12
|
-
export type { GateViolation, LayerResult, OperationContext, VerificationResult, WorkflowGateAgent, WorkflowGateDefinition, WorkflowGateState, WorkflowGateStatus, } from '@cleocode/core/internal';
|
|
13
|
-
//# sourceMappingURL=verification-gates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verification-gates.d.ts","sourceRoot":"","sources":["../../../src/mcp/lib/verification-gates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,SAAS,EACT,UAAU,EACV,yBAAyB,EACzB,uBAAuB,EACvB,gBAAgB,EAChB,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Verification Gate System for CLEO MCP Server
|
|
3
|
-
*
|
|
4
|
-
* Re-exports from canonical location at src/core/validation/operation-verification-gates.ts.
|
|
5
|
-
* Retained for backward compatibility.
|
|
6
|
-
*
|
|
7
|
-
* @task T2936
|
|
8
|
-
* @task T5707
|
|
9
|
-
* @epic T2908
|
|
10
|
-
*/
|
|
11
|
-
export { createVerificationGate, GATE_SEQUENCE, GateLayer, GateStatus, getWorkflowGateDefinition, isValidWorkflowGateName, VerificationGate, WORKFLOW_GATE_DEFINITIONS, WORKFLOW_GATE_SEQUENCE, WorkflowGateName, WorkflowGateTracker, } from '@cleocode/core/internal';
|
|
12
|
-
//# sourceMappingURL=verification-gates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verification-gates.js","sourceRoot":"","sources":["../../../src/mcp/lib/verification-gates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,SAAS,EACT,UAAU,EACV,yBAAyB,EACzB,uBAAuB,EACvB,gBAAgB,EAChB,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC"}
|