@cleocode/core 2026.3.76 → 2026.4.2
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/dist/agents/agent-schema.d.ts.map +1 -1
- package/dist/audit.d.ts +1 -1
- package/dist/audit.d.ts.map +1 -1
- package/dist/bootstrap.d.ts +2 -2
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/caamp/adapter.d.ts +6 -49
- package/dist/caamp/adapter.d.ts.map +1 -1
- package/dist/caamp/index.d.ts +2 -2
- package/dist/caamp/index.d.ts.map +1 -1
- package/dist/code/index.d.ts +10 -0
- package/dist/code/index.d.ts.map +1 -0
- package/dist/code/outline.d.ts +51 -0
- package/dist/code/outline.d.ts.map +1 -0
- package/dist/code/parser.d.ts +32 -0
- package/dist/code/parser.d.ts.map +1 -0
- package/dist/code/search.d.ts +42 -0
- package/dist/code/search.d.ts.map +1 -0
- package/dist/code/unfold.d.ts +44 -0
- package/dist/code/unfold.d.ts.map +1 -0
- package/dist/compliance/protocol-enforcement.d.ts +1 -1
- package/dist/compliance/protocol-rules.d.ts +1 -1
- package/dist/compliance/protocol-types.d.ts +2 -3
- package/dist/compliance/protocol-types.d.ts.map +1 -1
- package/dist/conduit/conduit-client.d.ts +14 -0
- package/dist/conduit/conduit-client.d.ts.map +1 -1
- package/dist/conduit/factory.d.ts +11 -1
- package/dist/conduit/factory.d.ts.map +1 -1
- package/dist/conduit/http-transport.d.ts +17 -5
- package/dist/conduit/http-transport.d.ts.map +1 -1
- package/dist/conduit/index.d.ts +5 -2
- package/dist/conduit/index.d.ts.map +1 -1
- package/dist/conduit/local-transport.d.ts +91 -0
- package/dist/conduit/local-transport.d.ts.map +1 -0
- package/dist/conduit/sse-transport.d.ts +68 -0
- package/dist/conduit/sse-transport.d.ts.map +1 -0
- package/dist/crypto/credentials.d.ts.map +1 -1
- package/dist/error-catalog.d.ts +3 -3
- package/dist/error-catalog.d.ts.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/hooks/handlers/index.d.ts +2 -2
- package/dist/hooks/handlers/index.d.ts.map +1 -1
- package/dist/hooks/handlers/notification-hooks.d.ts +31 -0
- package/dist/hooks/handlers/notification-hooks.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4646 -3476
- package/dist/index.js.map +4 -4
- package/dist/init.d.ts +6 -6
- package/dist/init.d.ts.map +1 -1
- package/dist/injection.d.ts.map +1 -1
- package/dist/internal.d.ts +7 -5
- package/dist/internal.d.ts.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/tree-sitter-languages.d.ts +29 -0
- package/dist/lib/tree-sitter-languages.d.ts.map +1 -0
- package/dist/logger.d.ts +3 -3
- package/dist/memory/brain-links.d.ts.map +1 -1
- package/dist/memory/brain-maintenance.d.ts +13 -0
- package/dist/memory/brain-maintenance.d.ts.map +1 -1
- package/dist/memory/brain-retrieval.d.ts +1 -1
- package/dist/memory/brain-retrieval.d.ts.map +1 -1
- package/dist/memory/decisions.d.ts.map +1 -1
- package/dist/memory/engine-compat.d.ts +392 -25
- package/dist/memory/engine-compat.d.ts.map +1 -1
- package/dist/memory/index.d.ts +416 -3
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/metrics/token-service.d.ts +3 -3
- package/dist/metrics/token-service.d.ts.map +1 -1
- package/dist/orchestration/hierarchy.d.ts +32 -0
- package/dist/orchestration/hierarchy.d.ts.map +1 -0
- package/dist/orchestration/index.d.ts +1 -0
- package/dist/orchestration/index.d.ts.map +1 -1
- package/dist/paths.d.ts +335 -2
- package/dist/paths.d.ts.map +1 -1
- package/dist/routing/capability-matrix.d.ts +3 -3
- package/dist/routing/capability-matrix.d.ts.map +1 -1
- package/dist/scaffold.d.ts +422 -11
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/security/input-sanitization.d.ts +2 -2
- package/dist/skills/dynamic-skill-generator.d.ts +3 -2
- package/dist/skills/dynamic-skill-generator.d.ts.map +1 -1
- package/dist/skills/routing-table.d.ts +4 -4
- package/dist/skills/routing-table.d.ts.map +1 -1
- package/dist/store/agent-registry-accessor.d.ts +10 -433
- package/dist/store/agent-registry-accessor.d.ts.map +1 -1
- package/dist/store/cross-db-cleanup.d.ts +34 -0
- package/dist/store/cross-db-cleanup.d.ts.map +1 -1
- package/dist/store/provider.d.ts +1 -1
- package/dist/store/signaldock-sqlite.d.ts.map +1 -1
- package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
- package/dist/store/sqlite.d.ts +1 -1
- package/dist/store/task-store.d.ts.map +1 -1
- package/dist/store/tasks-schema.d.ts +4 -228
- package/dist/store/tasks-schema.d.ts.map +1 -1
- package/dist/store/validation-schemas.d.ts +4 -5
- package/dist/store/validation-schemas.d.ts.map +1 -1
- package/dist/system/archive-analytics.d.ts +1 -1
- package/dist/system/health.d.ts +2 -2
- package/dist/system/health.d.ts.map +1 -1
- package/dist/system/runtime.d.ts +2 -1
- package/dist/system/runtime.d.ts.map +1 -1
- package/dist/tasks/list.d.ts +1 -1
- package/dist/tasks/list.d.ts.map +1 -1
- package/dist/tasks/task-ops.d.ts +415 -3
- package/dist/tasks/task-ops.d.ts.map +1 -1
- package/dist/templates/parser.d.ts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/upgrade.d.ts +1 -1
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/validation/operation-gate-validators.d.ts +1 -1
- package/dist/validation/operation-verification-gates.d.ts +3 -3
- package/dist/validation/param-utils.d.ts +6 -5
- package/dist/validation/param-utils.d.ts.map +1 -1
- package/dist/validation/validate-ops.d.ts +1 -1
- package/dist/validation/validate-ops.d.ts.map +1 -1
- package/package.json +19 -7
- package/src/__tests__/caamp-skill-install.test.js +0 -15
- package/src/__tests__/caamp-skill-install.test.js.map +1 -1
- package/src/__tests__/caamp-skill-install.test.ts +0 -16
- package/src/__tests__/injection-mvi-tiers.test.js +7 -7
- package/src/__tests__/injection-mvi-tiers.test.js.map +1 -1
- package/src/__tests__/injection-mvi-tiers.test.ts +55 -103
- package/src/agents/agent-schema.ts +2 -5
- package/src/audit.ts +2 -2
- package/src/bootstrap.ts +5 -39
- package/src/caamp/adapter.ts +3 -219
- package/src/caamp/index.ts +1 -13
- package/src/cant/__tests__/cant-agent-parse.test.d.ts.map +1 -0
- package/src/cant/__tests__/cant-agent-parse.test.js +77 -0
- package/src/cant/__tests__/cant-agent-parse.test.js.map +1 -0
- package/src/code/index.ts +10 -0
- package/src/code/outline.ts +214 -0
- package/src/code/parser.ts +331 -0
- package/src/code/search.ts +173 -0
- package/src/code/unfold.ts +204 -0
- package/src/codebase-map/analyzers/architecture.ts +2 -2
- package/src/compliance/protocol-enforcement.ts +1 -1
- package/src/compliance/protocol-rules.ts +1 -1
- package/src/compliance/protocol-types.ts +2 -3
- package/src/conduit/__tests__/dual-api-e2e.test.d.ts.map +1 -0
- package/src/conduit/__tests__/dual-api-e2e.test.js +178 -0
- package/src/conduit/__tests__/dual-api-e2e.test.js.map +1 -0
- package/src/conduit/__tests__/dual-api-e2e.test.ts +212 -0
- package/src/conduit/__tests__/local-credential-flow.test.d.ts.map +1 -0
- package/src/conduit/__tests__/local-credential-flow.test.js +185 -0
- package/src/conduit/__tests__/local-credential-flow.test.js.map +1 -0
- package/src/conduit/__tests__/local-credential-flow.test.ts +230 -0
- package/src/conduit/__tests__/local-transport.test.d.ts.map +1 -0
- package/src/conduit/__tests__/local-transport.test.js +404 -0
- package/src/conduit/__tests__/local-transport.test.js.map +1 -0
- package/src/conduit/__tests__/local-transport.test.ts +509 -0
- package/src/conduit/__tests__/sse-transport.test.d.ts.map +1 -0
- package/src/conduit/__tests__/sse-transport.test.js +291 -0
- package/src/conduit/__tests__/sse-transport.test.js.map +1 -0
- package/src/conduit/__tests__/sse-transport.test.ts +344 -0
- package/src/conduit/conduit-client.ts +14 -0
- package/src/conduit/factory.ts +29 -8
- package/src/conduit/http-transport.ts +78 -16
- package/src/conduit/index.ts +5 -2
- package/src/conduit/local-transport.ts +309 -0
- package/src/conduit/sse-transport.ts +382 -0
- package/src/crypto/credentials.ts +59 -13
- package/src/error-catalog.ts +3 -3
- package/src/errors.ts +1 -1
- package/src/hooks/__tests__/provider-hooks.test.js +4 -4
- package/src/hooks/__tests__/provider-hooks.test.js.map +1 -1
- package/src/hooks/__tests__/provider-hooks.test.ts +4 -4
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.js +2 -2
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.js.map +1 -1
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.ts +6 -4
- package/src/hooks/handlers/index.ts +2 -6
- package/src/hooks/handlers/notification-hooks.ts +65 -0
- package/src/index.ts +2 -1
- package/src/init.ts +14 -54
- package/src/injection.ts +4 -3
- package/src/internal.ts +7 -5
- package/src/lib/index.ts +8 -0
- package/src/lib/tree-sitter-languages.ts +88 -0
- package/src/logger.ts +5 -5
- package/src/memory/__tests__/brain-links.test.js +13 -0
- package/src/memory/__tests__/brain-links.test.js.map +1 -1
- package/src/memory/__tests__/brain-links.test.ts +14 -0
- package/src/memory/__tests__/brain-retrieval.test.js +9 -0
- package/src/memory/__tests__/brain-retrieval.test.js.map +1 -1
- package/src/memory/__tests__/brain-retrieval.test.ts +10 -0
- package/src/memory/__tests__/session-memory.test.js +16 -0
- package/src/memory/__tests__/session-memory.test.js.map +1 -1
- package/src/memory/__tests__/session-memory.test.ts +17 -0
- package/src/memory/brain-links.ts +17 -0
- package/src/memory/brain-maintenance.ts +33 -1
- package/src/memory/brain-retrieval.ts +19 -3
- package/src/memory/decisions.ts +18 -2
- package/src/memory/engine-compat.ts +392 -25
- package/src/memory/index.ts +417 -4
- package/src/metrics/token-service.ts +4 -4
- package/src/migration/index.ts +1 -1
- package/src/orchestration/hierarchy.ts +202 -0
- package/src/orchestration/index.ts +1 -0
- package/src/paths.ts +340 -5
- package/src/routing/capability-matrix.ts +49 -49
- package/src/scaffold.ts +428 -70
- package/src/security/input-sanitization.ts +4 -4
- package/src/sessions/__tests__/session-grade.integration.test.js +9 -9
- package/src/sessions/__tests__/session-grade.integration.test.ts +9 -9
- package/src/sessions/__tests__/session-grade.test.js +10 -10
- package/src/sessions/__tests__/session-grade.test.js.map +1 -1
- package/src/sessions/__tests__/session-grade.test.ts +10 -10
- package/src/sessions/session-grade.ts +4 -4
- package/src/skills/__tests__/dynamic-skill-generator.test.js +24 -26
- package/src/skills/__tests__/dynamic-skill-generator.test.js.map +1 -1
- package/src/skills/__tests__/dynamic-skill-generator.test.ts +24 -26
- package/src/skills/__tests__/routing-table.test.js +22 -22
- package/src/skills/__tests__/routing-table.test.js.map +1 -1
- package/src/skills/__tests__/routing-table.test.ts +23 -23
- package/src/skills/dynamic-skill-generator.ts +13 -24
- package/src/skills/routing-table.ts +4 -4
- package/src/store/__tests__/data-safety-central.test.js +8 -0
- package/src/store/__tests__/data-safety-central.test.js.map +1 -1
- package/src/store/__tests__/data-safety-central.test.ts +8 -0
- package/src/store/__tests__/safety-accessor.test.js +8 -0
- package/src/store/__tests__/safety-accessor.test.js.map +1 -1
- package/src/store/__tests__/safety-accessor.test.ts +8 -0
- package/src/store/agent-registry-accessor.ts +284 -108
- package/src/store/cross-db-cleanup.ts +175 -1
- package/src/store/provider.ts +2 -2
- package/src/store/signaldock-sqlite.ts +262 -60
- package/src/store/sqlite-data-accessor.ts +3 -0
- package/src/store/sqlite.ts +2 -2
- package/src/store/task-store.ts +8 -1
- package/src/store/tasks-schema.ts +5 -40
- package/src/system/__tests__/health.test.js +2 -2
- package/src/system/__tests__/health.test.js.map +1 -1
- package/src/system/__tests__/health.test.ts +2 -2
- package/src/system/archive-analytics.ts +1 -1
- package/src/system/health.ts +43 -19
- package/src/system/inject-generate.ts +20 -20
- package/src/system/runtime.ts +5 -4
- package/src/tasks/atomicity.ts +1 -1
- package/src/tasks/list.ts +1 -1
- package/src/tasks/task-ops.ts +415 -3
- package/src/templates/parser.ts +1 -1
- package/src/ui/index.ts +4 -4
- package/src/upgrade.ts +3 -14
- package/src/validation/operation-gate-validators.ts +1 -1
- package/src/validation/operation-verification-gates.ts +3 -3
- package/src/validation/param-utils.ts +11 -10
- package/src/validation/validate-ops.ts +6 -6
- package/templates/CLEO-INJECTION.md +38 -110
- package/dist/hooks/handlers/mcp-hooks.d.ts +0 -48
- package/dist/hooks/handlers/mcp-hooks.d.ts.map +0 -1
- package/dist/mcp/index.d.ts +0 -42
- package/dist/mcp/index.d.ts.map +0 -1
- package/src/__tests__/audit-prune.test.d.ts +0 -2
- package/src/__tests__/caamp-skill-install.test.d.ts +0 -14
- package/src/__tests__/cli-mcp-parity.integration.test.d.ts +0 -34
- package/src/__tests__/cli-mcp-parity.integration.test.d.ts.map +0 -1
- package/src/__tests__/cli-mcp-parity.integration.test.js +0 -898
- package/src/__tests__/cli-mcp-parity.integration.test.js.map +0 -1
- package/src/__tests__/cli-parity.test.d.ts +0 -9
- package/src/__tests__/config.test.d.ts +0 -7
- package/src/__tests__/core-parity.test.d.ts +0 -17
- package/src/__tests__/error-catalog.test.d.ts +0 -2
- package/src/__tests__/golden-parity.test.d.ts +0 -12
- package/src/__tests__/hooks.test.d.ts +0 -5
- package/src/__tests__/human-output.test.d.ts +0 -12
- package/src/__tests__/index-api-compat.test.d.ts +0 -2
- package/src/__tests__/init-e2e.test.d.ts +0 -12
- package/src/__tests__/injection-chain.test.d.ts +0 -18
- package/src/__tests__/injection-mvi-tiers.test.d.ts +0 -14
- package/src/__tests__/injection-shared.test.d.ts +0 -10
- package/src/__tests__/lafs-conformance.test.d.ts +0 -18
- package/src/__tests__/logger.test.d.ts +0 -2
- package/src/__tests__/mcp-install-verify.test.d.ts +0 -13
- package/src/__tests__/mcp-install-verify.test.d.ts.map +0 -1
- package/src/__tests__/mcp-install-verify.test.js +0 -177
- package/src/__tests__/mcp-install-verify.test.js.map +0 -1
- package/src/__tests__/mcp-install-verify.test.ts +0 -217
- package/src/__tests__/paths.test.d.ts +0 -7
- package/src/__tests__/project-info.test.d.ts +0 -2
- package/src/__tests__/rcsd-pipeline-e2e.test.d.ts +0 -14
- package/src/__tests__/remote.test.d.ts +0 -6
- package/src/__tests__/scaffold.test.d.ts +0 -6
- package/src/__tests__/schema-management.test.d.ts +0 -5
- package/src/__tests__/schema.test.d.ts +0 -2
- package/src/__tests__/sharing.test.d.ts +0 -6
- package/src/__tests__/snapshot.test.d.ts +0 -6
- package/src/__tests__/upgrade.test.d.ts +0 -7
- package/src/adapters/__tests__/discovery.test.d.ts +0 -6
- package/src/adapters/__tests__/manager.test.d.ts +0 -6
- package/src/agents/__tests__/agent-registry.test.d.ts +0 -12
- package/src/agents/__tests__/capacity.test.d.ts +0 -7
- package/src/agents/__tests__/execution-learning.test.d.ts +0 -14
- package/src/agents/__tests__/health-monitor.test.d.ts +0 -10
- package/src/agents/__tests__/registry.test.d.ts +0 -8
- package/src/agents/__tests__/retry.test.d.ts +0 -7
- package/src/compliance/__tests__/sync.test.d.ts +0 -5
- package/src/hooks/__tests__/provider-hooks.test.d.ts +0 -2
- package/src/hooks/__tests__/registry.test.d.ts +0 -2
- package/src/hooks/handlers/__tests__/error-hooks.test.d.ts +0 -2
- package/src/hooks/handlers/__tests__/file-hooks.test.d.ts +0 -2
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.d.ts +0 -13
- package/src/hooks/handlers/__tests__/mcp-hooks.test.d.ts +0 -2
- package/src/hooks/handlers/__tests__/mcp-hooks.test.d.ts.map +0 -1
- package/src/hooks/handlers/__tests__/mcp-hooks.test.js +0 -119
- package/src/hooks/handlers/__tests__/mcp-hooks.test.js.map +0 -1
- package/src/hooks/handlers/__tests__/mcp-hooks.test.ts +0 -150
- package/src/hooks/handlers/__tests__/session-hooks.test.d.ts +0 -2
- package/src/hooks/handlers/__tests__/task-hooks.test.d.ts +0 -2
- package/src/hooks/handlers/mcp-hooks.ts +0 -162
- package/src/intelligence/__tests__/adaptive-validation.test.d.ts +0 -11
- package/src/intelligence/__tests__/impact.test.d.ts +0 -16
- package/src/intelligence/__tests__/patterns.test.d.ts +0 -8
- package/src/intelligence/__tests__/prediction.test.d.ts +0 -8
- package/src/lib/__tests__/retry.test.d.ts +0 -7
- package/src/lifecycle/__tests__/chain-store.test.d.ts +0 -10
- package/src/lifecycle/__tests__/consolidate-rcasd.test.d.ts +0 -7
- package/src/lifecycle/__tests__/default-chain.test.d.ts +0 -7
- package/src/lifecycle/__tests__/frontmatter.test.d.ts +0 -7
- package/src/lifecycle/__tests__/lifecycle.test.d.ts +0 -7
- package/src/lifecycle/__tests__/pipeline.integration.test.d.ts +0 -19
- package/src/lifecycle/__tests__/rcasd-paths.test.d.ts +0 -7
- package/src/lifecycle/__tests__/resume-schema-contract.test.d.ts +0 -16
- package/src/lifecycle/__tests__/stage-record-provenance.integration.test.d.ts +0 -7
- package/src/lifecycle/__tests__/tessera-engine.test.d.ts +0 -10
- package/src/mcp/index.ts +0 -163
- package/src/memory/__tests__/auto-extract.test.d.ts +0 -7
- package/src/memory/__tests__/brain-automation.test.d.ts +0 -11
- package/src/memory/__tests__/brain-embedding.test.d.ts +0 -2
- package/src/memory/__tests__/brain-links.test.d.ts +0 -8
- package/src/memory/__tests__/brain-migration.test.d.ts +0 -8
- package/src/memory/__tests__/brain-retrieval.test.d.ts +0 -10
- package/src/memory/__tests__/brain-search.test.d.ts +0 -8
- package/src/memory/__tests__/claude-mem-migration.test.d.ts +0 -12
- package/src/memory/__tests__/decisions.test.d.ts +0 -8
- package/src/memory/__tests__/engine-compat.test.d.ts +0 -12
- package/src/memory/__tests__/memory-bridge.test.d.ts +0 -10
- package/src/memory/__tests__/pipeline-manifest-sqlite.test.d.ts +0 -13
- package/src/memory/__tests__/session-memory.test.d.ts +0 -9
- package/src/metrics/__tests__/model-provider-registry.test.d.ts +0 -2
- package/src/metrics/__tests__/provider-detection.test.d.ts +0 -2
- package/src/migration/__tests__/checksum.test.d.ts +0 -8
- package/src/migration/__tests__/logger.test.d.ts +0 -5
- package/src/migration/__tests__/migration-failure.integration.test.d.ts +0 -15
- package/src/migration/__tests__/migration.test.d.ts +0 -13
- package/src/migration/__tests__/state.test.d.ts +0 -8
- package/src/migration/__tests__/validate.test.d.ts +0 -8
- package/src/nexus/__tests__/deps.test.d.ts +0 -7
- package/src/nexus/__tests__/nexus-e2e.test.d.ts +0 -12
- package/src/nexus/__tests__/permissions.test.d.ts +0 -7
- package/src/nexus/__tests__/query.test.d.ts +0 -7
- package/src/nexus/__tests__/reconcile.test.d.ts +0 -7
- package/src/nexus/__tests__/registry.test.d.ts +0 -7
- package/src/nexus/__tests__/transfer.test.d.ts +0 -8
- package/src/observability/__tests__/index.test.d.ts +0 -7
- package/src/observability/__tests__/log-filter.test.d.ts +0 -7
- package/src/observability/__tests__/log-parser.test.d.ts +0 -7
- package/src/observability/__tests__/log-reader.test.d.ts +0 -7
- package/src/orchestration/__tests__/autonomous-spec.test.d.ts +0 -9
- package/src/orchestration/__tests__/orchestration.test.d.ts +0 -7
- package/src/orchestration/__tests__/protocol-validators.test.d.ts +0 -9
- package/src/phases/__tests__/deps.test.d.ts +0 -7
- package/src/phases/__tests__/phases.test.d.ts +0 -7
- package/src/release/__tests__/artifacts.test.d.ts +0 -7
- package/src/release/__tests__/cancel-release.test.d.ts +0 -10
- package/src/release/__tests__/changelog-writer.test.d.ts +0 -6
- package/src/release/__tests__/push-policy.test.d.ts +0 -14
- package/src/release/__tests__/release.test.d.ts +0 -11
- package/src/sequence/__tests__/allocate.test.d.ts +0 -6
- package/src/sessions/__tests__/briefing-blocked.test.d.ts +0 -6
- package/src/sessions/__tests__/briefing.test.d.ts +0 -11
- package/src/sessions/__tests__/handoff-integration.test.d.ts +0 -8
- package/src/sessions/__tests__/handoff.test.d.ts +0 -11
- package/src/sessions/__tests__/index.test.d.ts +0 -2
- package/src/sessions/__tests__/session-cleanup.test.d.ts +0 -7
- package/src/sessions/__tests__/session-edge-cases.test.d.ts +0 -9
- package/src/sessions/__tests__/session-find.test.d.ts +0 -9
- package/src/sessions/__tests__/session-grade.integration.test.d.ts +0 -11
- package/src/sessions/__tests__/session-grade.test.d.ts +0 -6
- package/src/sessions/__tests__/session-memory-bridge.test.d.ts +0 -2
- package/src/sessions/__tests__/sessions.test.d.ts +0 -7
- package/src/skills/__tests__/discovery.test.d.ts +0 -6
- package/src/skills/__tests__/dispatch.test.d.ts +0 -6
- package/src/skills/__tests__/dynamic-skill-generator.test.d.ts +0 -2
- package/src/skills/__tests__/manifests.test.d.ts +0 -6
- package/src/skills/__tests__/precedence.test.d.ts +0 -6
- package/src/skills/__tests__/routing-table.test.d.ts +0 -2
- package/src/skills/__tests__/skill-paths.test.d.ts +0 -7
- package/src/skills/__tests__/test-utility.test.d.ts +0 -7
- package/src/skills/__tests__/token.test.d.ts +0 -6
- package/src/skills/__tests__/validation.test.d.ts +0 -6
- package/src/skills/__tests__/version.test.d.ts +0 -5
- package/src/skills/injection/__tests__/subagent.test.d.ts +0 -2
- package/src/skills/orchestrator/__tests__/spawn-tier.test.d.ts +0 -2
- package/src/spawn/__tests__/adapter-registry.test.d.ts +0 -2
- package/src/stats/__tests__/stats.test.d.ts +0 -7
- package/src/sticky/__tests__/purge.test.d.ts +0 -9
- package/src/store/__tests__/atomic.test.d.ts +0 -7
- package/src/store/__tests__/backup.test.d.ts +0 -7
- package/src/store/__tests__/brain-accessor-pageindex.test.d.ts +0 -12
- package/src/store/__tests__/brain-accessor.test.d.ts +0 -10
- package/src/store/__tests__/brain-pageindex.test.d.ts +0 -11
- package/src/store/__tests__/brain-schema.test.d.ts +0 -11
- package/src/store/__tests__/brain-vec.test.d.ts +0 -11
- package/src/store/__tests__/collision-detection.test.d.ts +0 -11
- package/src/store/__tests__/data-safety-central.test.d.ts +0 -20
- package/src/store/__tests__/db-helpers.test.d.ts +0 -7
- package/src/store/__tests__/e2e-safety-integration.test.d.ts +0 -13
- package/src/store/__tests__/git-checkpoint.test.d.ts +0 -7
- package/src/store/__tests__/idempotent-migration.test.d.ts +0 -5
- package/src/store/__tests__/import-logging.test.d.ts +0 -7
- package/src/store/__tests__/import-sort.test.d.ts +0 -7
- package/src/store/__tests__/json.test.d.ts +0 -7
- package/src/store/__tests__/lifecycle-schema-parity.test.d.ts +0 -2
- package/src/store/__tests__/migration-integration.test.d.ts +0 -15
- package/src/store/__tests__/migration-retry.test.d.ts +0 -10
- package/src/store/__tests__/migration-safety.test.d.ts +0 -21
- package/src/store/__tests__/migration-sqlite.test.d.ts +0 -11
- package/src/store/__tests__/performance-safety.test.d.ts +0 -17
- package/src/store/__tests__/project-detect.test.d.ts +0 -6
- package/src/store/__tests__/project-registry.test.d.ts +0 -7
- package/src/store/__tests__/provider.test.d.ts +0 -9
- package/src/store/__tests__/relations.test.d.ts +0 -9
- package/src/store/__tests__/safety-accessor.test.d.ts +0 -18
- package/src/store/__tests__/sequence-validation.test.d.ts +0 -11
- package/src/store/__tests__/session-store.test.d.ts +0 -11
- package/src/store/__tests__/sqlite-backup.test.d.ts +0 -14
- package/src/store/__tests__/sqlite.test.d.ts +0 -11
- package/src/store/__tests__/task-store.test.d.ts +0 -11
- package/src/store/__tests__/test-db-helper.d.ts +0 -61
- package/src/store/__tests__/write-verification.test.d.ts +0 -11
- package/src/system/__tests__/cleanup.test.d.ts +0 -2
- package/src/system/__tests__/health.test.d.ts +0 -2
- package/src/task-work/__tests__/start-deps.test.d.ts +0 -6
- package/src/tasks/__tests__/add.test.d.ts +0 -7
- package/src/tasks/__tests__/archive.test.d.ts +0 -7
- package/src/tasks/__tests__/assignee.test.d.ts +0 -14
- package/src/tasks/__tests__/atomicity.test.d.ts +0 -6
- package/src/tasks/__tests__/cancel-ops.test.d.ts +0 -7
- package/src/tasks/__tests__/complete-unblocks.test.d.ts +0 -6
- package/src/tasks/__tests__/complete.test.d.ts +0 -7
- package/src/tasks/__tests__/delete.test.d.ts +0 -7
- package/src/tasks/__tests__/dependency-check.test.d.ts +0 -7
- package/src/tasks/__tests__/deps-ready.test.d.ts +0 -6
- package/src/tasks/__tests__/epic-enforcement.test.d.ts +0 -15
- package/src/tasks/__tests__/find.test.d.ts +0 -7
- package/src/tasks/__tests__/graph-ops.test.d.ts +0 -7
- package/src/tasks/__tests__/hierarchy-policy.test.d.ts +0 -6
- package/src/tasks/__tests__/hierarchy.test.d.ts +0 -7
- package/src/tasks/__tests__/id-generator.test.d.ts +0 -2
- package/src/tasks/__tests__/labels.test.d.ts +0 -7
- package/src/tasks/__tests__/list.test.d.ts +0 -7
- package/src/tasks/__tests__/minimal-test.test.d.ts +0 -2
- package/src/tasks/__tests__/phase-tracking.test.d.ts +0 -7
- package/src/tasks/__tests__/pipeline-stage.test.d.ts +0 -14
- package/src/tasks/__tests__/plan-priority.test.d.ts +0 -10
- package/src/tasks/__tests__/priority-normalization.test.d.ts +0 -7
- package/src/tasks/__tests__/relates.test.d.ts +0 -9
- package/src/tasks/__tests__/show-deps.test.d.ts +0 -6
- package/src/tasks/__tests__/show.test.d.ts +0 -7
- package/src/tasks/__tests__/staleness.test.d.ts +0 -7
- package/src/tasks/__tests__/task-ops-depends.test.d.ts +0 -6
- package/src/tasks/__tests__/update.test.d.ts +0 -7
- package/src/validation/__tests__/chain-validation.test.d.ts +0 -7
- package/src/validation/__tests__/compliance.test.d.ts +0 -7
- package/src/validation/__tests__/docs-sync.test.d.ts +0 -7
- package/src/validation/__tests__/doctor-gitignore.test.d.ts +0 -7
- package/src/validation/__tests__/doctor-injection.test.d.ts +0 -11
- package/src/validation/__tests__/doctor.test.d.ts +0 -7
- package/src/validation/__tests__/engine.test.d.ts +0 -7
- package/src/validation/__tests__/manifest.test.d.ts +0 -7
- package/src/validation/__tests__/protocol-common.test.d.ts +0 -7
- package/src/validation/__tests__/verification.test.d.ts +0 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Operation Verification Gate System for CLEO
|
|
3
3
|
*
|
|
4
|
-
* Implements 4-layer validation gate system for
|
|
4
|
+
* Implements 4-layer validation gate system for dispatch operations:
|
|
5
5
|
* Layer 1: Schema Validation (JSON Schema compliance)
|
|
6
6
|
* Layer 2: Semantic Validation (Business rules)
|
|
7
7
|
* Layer 3: Referential Validation (Cross-entity integrity)
|
|
8
8
|
* Layer 4: Protocol Validation (RCASD-IVTR+C lifecycle)
|
|
9
9
|
*
|
|
10
|
-
* Moved
|
|
10
|
+
* Moved to core for proper layering (formerly in dispatch).
|
|
11
11
|
*
|
|
12
12
|
* @task T2936
|
|
13
13
|
* @task T5707
|
|
@@ -341,7 +341,7 @@ export const GATE_SEQUENCE = [
|
|
|
341
341
|
// ============================================================================
|
|
342
342
|
|
|
343
343
|
/**
|
|
344
|
-
* Workflow gate names per
|
|
344
|
+
* Workflow gate names per protocol specification Section 7.1
|
|
345
345
|
*
|
|
346
346
|
* @task T3141
|
|
347
347
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Converts operation parameter definitions into the shapes required by:
|
|
5
5
|
* - Commander.js (CLI adapter): positionals + option strings
|
|
6
|
-
* -
|
|
6
|
+
* - JSON Schema (dispatch adapter): input_schema object
|
|
7
7
|
*
|
|
8
8
|
* Canonical location: src/core/validation/param-utils.ts
|
|
9
9
|
* Re-exported from: src/dispatch/lib/param-utils.ts (backward compat)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
// Inlined from dispatch layer — these types define operation/param shapes
|
|
17
|
-
// used for building CLI args and
|
|
17
|
+
// used for building CLI args and dispatch schemas. Kept here to avoid
|
|
18
18
|
// core depending on dispatch (wrong direction).
|
|
19
19
|
interface OperationDef {
|
|
20
20
|
gateway: string;
|
|
@@ -38,7 +38,7 @@ interface ParamCliDef {
|
|
|
38
38
|
[key: string]: unknown;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
interface
|
|
41
|
+
interface ParamSchemaDef {
|
|
42
42
|
name?: string;
|
|
43
43
|
description?: string;
|
|
44
44
|
enum?: string[];
|
|
@@ -55,11 +55,12 @@ interface ParamDef {
|
|
|
55
55
|
enum?: string[];
|
|
56
56
|
items?: { type: ParamType };
|
|
57
57
|
cli?: ParamCliDef;
|
|
58
|
-
|
|
58
|
+
/** Schema config for dispatch adapter. */
|
|
59
|
+
mcp?: ParamSchemaDef;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
// ---------------------------------------------------------------------------
|
|
62
|
-
// JSON Schema subset for
|
|
63
|
+
// JSON Schema subset for dispatch input_schema
|
|
63
64
|
// ---------------------------------------------------------------------------
|
|
64
65
|
|
|
65
66
|
export type JsonSchemaType = 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
@@ -78,7 +79,7 @@ export interface JSONSchemaObject {
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
// ---------------------------------------------------------------------------
|
|
81
|
-
// 1. buildMcpInputSchema
|
|
82
|
+
// 1. buildMcpInputSchema (name kept for backward compat)
|
|
82
83
|
// ---------------------------------------------------------------------------
|
|
83
84
|
|
|
84
85
|
/**
|
|
@@ -86,7 +87,7 @@ export interface JSONSchemaObject {
|
|
|
86
87
|
*
|
|
87
88
|
* Algorithm:
|
|
88
89
|
* 1. Iterate `def.params`
|
|
89
|
-
* 2. Skip params where `mcp.hidden === true`
|
|
90
|
+
* 2. Skip params where schema `mcp.hidden === true`
|
|
90
91
|
* 3. Map ParamType → JSON Schema type
|
|
91
92
|
* 4. Collect names where `required === true` into `required[]`
|
|
92
93
|
* 5. Return { type: 'object', properties, required }
|
|
@@ -96,7 +97,7 @@ export function buildMcpInputSchema(def: OperationDef): JSONSchemaObject {
|
|
|
96
97
|
const required: string[] = [];
|
|
97
98
|
|
|
98
99
|
for (const param of def.params ?? []) {
|
|
99
|
-
// Skip CLI-only params from
|
|
100
|
+
// Skip CLI-only params from dispatch schema
|
|
100
101
|
if (param.mcp?.hidden === true) continue;
|
|
101
102
|
|
|
102
103
|
const prop: JsonSchemaProperty = {
|
|
@@ -154,14 +155,14 @@ export interface CommanderArgSplit {
|
|
|
154
155
|
*
|
|
155
156
|
* - `cli.positional === true` → goes into `positionals[]`
|
|
156
157
|
* - everything else with a `cli` key → goes into `options[]`
|
|
157
|
-
* - Params with no `cli` key →
|
|
158
|
+
* - Params with no `cli` key → dispatch-only; excluded from both arrays
|
|
158
159
|
*/
|
|
159
160
|
export function buildCommanderArgs(def: OperationDef): CommanderArgSplit {
|
|
160
161
|
const positionals: ParamDef[] = [];
|
|
161
162
|
const options: ParamDef[] = [];
|
|
162
163
|
|
|
163
164
|
for (const param of def.params ?? []) {
|
|
164
|
-
// Params with no cli key are
|
|
165
|
+
// Params with no cli key are dispatch-only — skip for Commander
|
|
165
166
|
if (param.cli === undefined) continue;
|
|
166
167
|
|
|
167
168
|
if (param.cli.positional === true) {
|
|
@@ -865,23 +865,23 @@ export function coreComplianceRecord(
|
|
|
865
865
|
*/
|
|
866
866
|
export function coreTestStatus(projectRoot: string): {
|
|
867
867
|
batsTests: { available: boolean; directory: string | null };
|
|
868
|
-
|
|
868
|
+
dispatchTests: { available: boolean; directory: string | null };
|
|
869
869
|
message: string;
|
|
870
870
|
} {
|
|
871
871
|
const testDir = join(projectRoot, 'tests');
|
|
872
|
-
const
|
|
872
|
+
const dispatchTestDir = join(projectRoot, 'src', 'dispatch', '__tests__');
|
|
873
873
|
|
|
874
874
|
const hasBatsTests = existsSync(testDir);
|
|
875
|
-
const
|
|
875
|
+
const hasDispatchTests = existsSync(dispatchTestDir);
|
|
876
876
|
|
|
877
877
|
return {
|
|
878
878
|
batsTests: {
|
|
879
879
|
available: hasBatsTests,
|
|
880
880
|
directory: hasBatsTests ? 'tests/' : null,
|
|
881
881
|
},
|
|
882
|
-
|
|
883
|
-
available:
|
|
884
|
-
directory:
|
|
882
|
+
dispatchTests: {
|
|
883
|
+
available: hasDispatchTests,
|
|
884
|
+
directory: hasDispatchTests ? 'src/dispatch/__tests__/' : null,
|
|
885
885
|
},
|
|
886
886
|
message: 'Use validate.test.run to execute tests',
|
|
887
887
|
};
|
|
@@ -1,144 +1,72 @@
|
|
|
1
1
|
# CLEO Protocol
|
|
2
2
|
|
|
3
|
-
Version: 2.
|
|
4
|
-
Status: ACTIVE
|
|
3
|
+
Version: 2.4.0 | CLI-only dispatch | `cleo <command> [args]`
|
|
5
4
|
|
|
6
|
-
##
|
|
5
|
+
## Session Start (cheapest-first)
|
|
7
6
|
|
|
8
|
-
<!-- CleoOS injects CLEO_RUNTIME=cleoos when launching agents from a workspace -->
|
|
9
|
-
<!-- When this variable is absent, assume standalone CLI mode -->
|
|
10
|
-
|
|
11
|
-
**Mode**: `${CLEO_RUNTIME:-standalone}`
|
|
12
|
-
|
|
13
|
-
### Channel Preference
|
|
14
|
-
|
|
15
|
-
| Runtime | Primary Channel | Fallback | Rationale |
|
|
16
|
-
|---------|----------------|----------|-----------|
|
|
17
|
-
| `standalone` | CLI (`cleo <command>`) | MCP (query/mutate) | CLI is cheaper (fewer tokens), more reliable, and baked into core |
|
|
18
|
-
| `cleoos` | Workspace-provided | CLI | CleoOS workspace manages channel routing via capability matrix |
|
|
19
|
-
|
|
20
|
-
When running in **standalone** mode (the default):
|
|
21
|
-
- Prefer CLI commands over MCP tool calls for all CLEO operations
|
|
22
|
-
- CLI commands are shorter, use fewer tokens, and bypass the MCP dispatch layer
|
|
23
|
-
- Use MCP only when the provider does not support shell execution
|
|
24
|
-
|
|
25
|
-
When running in **CleoOS** mode:
|
|
26
|
-
- Follow the workspace-provided channel routing preferences
|
|
27
|
-
- CleoOS manages the capability matrix and optimal channel selection
|
|
28
|
-
- This mode is a work-in-progress — fall back to CLI if unsure
|
|
29
|
-
|
|
30
|
-
## CLEO Identity
|
|
31
|
-
|
|
32
|
-
You are a CLEO protocol agent. CLEO operations are available via CLI (primary) and MCP (fallback):
|
|
33
|
-
- CLI: `cleo <command> [args]` — preferred for token efficiency (flat commands, not domain-prefixed)
|
|
34
|
-
- MCP: `query`/`mutate` gateways with `{domain, operation, params}` — use when CLI is unavailable
|
|
35
|
-
|
|
36
|
-
## Mandatory Efficiency Sequence
|
|
37
|
-
|
|
38
|
-
Run cheapest-first at session start:
|
|
39
7
|
1. `cleo session status` — resume existing? (~200 tokens)
|
|
40
8
|
2. `cleo dash` — project overview (~500 tokens)
|
|
41
9
|
3. `cleo current` — active task? (~100 tokens)
|
|
42
10
|
4. `cleo next` — what to work on (~300 tokens)
|
|
43
11
|
5. `cleo show {id}` — full details for chosen task (~400 tokens)
|
|
44
12
|
|
|
45
|
-
##
|
|
13
|
+
## Work Loop
|
|
46
14
|
|
|
47
|
-
Repeat until session ends:
|
|
48
15
|
1. `cleo current` or `cleo next` → pick task
|
|
49
16
|
2. `cleo show {id}` → read requirements
|
|
50
17
|
3. Do the work (code, test, document)
|
|
51
18
|
4. `cleo complete {id}` → mark done
|
|
52
19
|
5. `cleo next` → continue or end session
|
|
53
20
|
|
|
54
|
-
## Context Ethics
|
|
55
|
-
|
|
56
|
-
Every MCP call costs tokens. Budget wisely:
|
|
57
|
-
|
|
58
|
-
| Operation | ~Tokens | When to Use |
|
|
59
|
-
|-----------|---------|-------------|
|
|
60
|
-
| `tasks find` | 200-400 | Discovery (NOT `tasks list`) |
|
|
61
|
-
| `tasks show` | 300-600 | After choosing a specific task |
|
|
62
|
-
| `tasks list` | 1000-5000 | ONLY for direct children of a known parent |
|
|
63
|
-
| `admin help` | 500-2000 | ONCE per session, at tier 0 first |
|
|
64
|
-
|
|
65
|
-
**Anti-patterns:**
|
|
66
|
-
- Calling `tasks list` without filters (returns ALL tasks with notes)
|
|
67
|
-
- Calling `admin help --tier 2` before trying tier 0
|
|
68
|
-
- Reading full task details for tasks you won't work on
|
|
69
|
-
|
|
70
|
-
## Error Handling
|
|
71
|
-
|
|
72
|
-
Always check `success` and exit code values. Treat non-zero exit code as failure.
|
|
73
|
-
|
|
74
21
|
## Task Discovery
|
|
75
22
|
|
|
76
|
-
**
|
|
77
|
-
|
|
78
|
-
- `tasks find` → minimal fields, fast, low context cost ✓
|
|
79
|
-
- `tasks list` → full notes arrays, huge, use only for direct children ✗
|
|
80
|
-
- `tasks show` → full details for a specific known task ID ✓
|
|
81
|
-
|
|
82
|
-
## Time Estimates Prohibited
|
|
83
|
-
|
|
84
|
-
Agents MUST NOT provide hours/days/week estimates. Use `small`, `medium`, `large` sizing.
|
|
23
|
+
**Use `cleo find` for discovery. NEVER `cleo list` for browsing.**
|
|
85
24
|
|
|
86
|
-
|
|
25
|
+
| Command | ~Tokens | Use |
|
|
26
|
+
|---------|---------|-----|
|
|
27
|
+
| `cleo find "query"` | 200-400 | Search tasks (default) |
|
|
28
|
+
| `cleo show <id>` | 300-600 | Full details for one task |
|
|
29
|
+
| `cleo list --parent <id>` | 1000-5000 | Direct children only |
|
|
87
30
|
|
|
88
|
-
|
|
89
|
-
|------|--------------|----------------|
|
|
90
|
-
| Check active session | `cleo session status` | `query session status` |
|
|
91
|
-
| Resume context | `cleo briefing` | `query session briefing.show` |
|
|
92
|
-
| Start working | `cleo session start --scope global` | `mutate session start {scope: "global"}` |
|
|
93
|
-
| Stop working | `cleo session end` | `mutate session end` |
|
|
31
|
+
## Session Commands
|
|
94
32
|
|
|
95
|
-
|
|
33
|
+
| Goal | Command |
|
|
34
|
+
|------|---------|
|
|
35
|
+
| Check session | `cleo session status` |
|
|
36
|
+
| Resume context | `cleo briefing` |
|
|
37
|
+
| Start session | `cleo session start --scope global` |
|
|
38
|
+
| End session | `cleo session end --note "..."` |
|
|
96
39
|
|
|
97
|
-
|
|
40
|
+
## Memory (BRAIN)
|
|
98
41
|
|
|
99
|
-
|
|
42
|
+
3-layer retrieval — search first, then fetch:
|
|
100
43
|
|
|
101
|
-
|
|
44
|
+
| Step | Command | ~Tokens |
|
|
45
|
+
|------|---------|---------|
|
|
46
|
+
| Search | `cleo memory find "query"` | 50/hit |
|
|
47
|
+
| Context | `cleo memory timeline <id>` | 200-500 |
|
|
48
|
+
| Details | `cleo memory fetch <id>` | 500/entry |
|
|
49
|
+
| Save | `cleo observe "text" --title "title"` | — |
|
|
102
50
|
|
|
103
|
-
|
|
104
|
-
|------|-----------|---------|---------|---------|
|
|
105
|
-
| 1 | `memory find` | query | 50/hit | Search index (IDs + titles) |
|
|
106
|
-
| 2 | `memory timeline` | query | 200-500 | Context around an anchor ID |
|
|
107
|
-
| 3 | `memory fetch` | query | 500/entry | Full details for filtered IDs |
|
|
108
|
-
| Save | `memory observe` | mutate | — | Save observation to brain.db |
|
|
51
|
+
Memory bridge (`.cleo/memory-bridge.md`) auto-refreshes on session end and task completion.
|
|
109
52
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
**Example** (CLI):
|
|
113
|
-
```
|
|
114
|
-
cleo memory find "authentication"
|
|
115
|
-
cleo memory fetch O-abc123
|
|
116
|
-
cleo observe "Found auth uses JWT" --title "Auth discovery"
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
**Anti-patterns:**
|
|
120
|
-
- Fetching all entries without searching first (expensive)
|
|
121
|
-
- Skipping memory find and going straight to memory fetch
|
|
122
|
-
|
|
123
|
-
## Memory Bridge
|
|
53
|
+
## Error Handling
|
|
124
54
|
|
|
125
|
-
|
|
126
|
-
in AGENTS.md so providers automatically load project memory context at session start.
|
|
55
|
+
Check exit code (`0` = success) and `"success"` in JSON output after every command.
|
|
127
56
|
|
|
128
|
-
|
|
57
|
+
| Exit | Code | Fix |
|
|
58
|
+
|:----:|------|-----|
|
|
59
|
+
| 4 | `E_NOT_FOUND` | `cleo find` to verify ID |
|
|
60
|
+
| 6 | `E_VALIDATION` | Check field lengths |
|
|
61
|
+
| 10 | `E_PARENT_NOT_FOUND` | `cleo exists <id>` |
|
|
129
62
|
|
|
130
|
-
|
|
63
|
+
## Rules
|
|
131
64
|
|
|
132
|
-
|
|
65
|
+
- No time estimates — use `small`, `medium`, `large` sizing
|
|
66
|
+
- Token budget: avoid `cleo list` without `--parent`, avoid `cleo help --tier 2` before tier 0
|
|
67
|
+
- Do not read full task details for tasks you won't work on
|
|
133
68
|
|
|
134
69
|
## Escalation
|
|
135
70
|
|
|
136
|
-
|
|
137
|
-
- **
|
|
138
|
-
- **Orchestration**: `query admin help --tier 2` or load `ct-orchestrator` skill
|
|
139
|
-
- **Operations reference**: `docs/specs/CLEO-OPERATIONS-REFERENCE.md`
|
|
140
|
-
|
|
141
|
-
## References
|
|
142
|
-
|
|
143
|
-
- `docs/specs/CLEO-OPERATIONS-REFERENCE.md`
|
|
144
|
-
- `docs/specs/VERB-STANDARDS.md`
|
|
71
|
+
- Load **ct-cleo** skill for full protocol details
|
|
72
|
+
- Load **ct-orchestrator** skill for multi-agent workflows
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Prompt/Response Hook Handlers - Wave 2 of T5237
|
|
3
|
-
*
|
|
4
|
-
* Handlers for onPromptSubmit, onResponseComplete, and system Notification
|
|
5
|
-
* events that capture ALL gateway operations (read and write) to BRAIN.
|
|
6
|
-
* By default, NO brain capture (too noisy). Enable via:
|
|
7
|
-
* - Config: brain.captureMcp = true (checked first)
|
|
8
|
-
* - Env: CLEO_BRAIN_CAPTURE_MCP=true (overrides config)
|
|
9
|
-
* Auto-registers on module load.
|
|
10
|
-
*
|
|
11
|
-
* Note: File-change Notification events (those with filePath + changeType) are
|
|
12
|
-
* handled by file-hooks.ts. This module handles message-bearing system
|
|
13
|
-
* notifications (Notification payloads with a message field).
|
|
14
|
-
*
|
|
15
|
-
* @task T166
|
|
16
|
-
*/
|
|
17
|
-
import type { NotificationPayload, PromptSubmitPayload, ResponseCompletePayload } from '../types.js';
|
|
18
|
-
/**
|
|
19
|
-
* Handle PromptSubmit - optionally capture ALL gateway prompt events to BRAIN.
|
|
20
|
-
*
|
|
21
|
-
* No-op by default. Enable via brain.captureMcp config or CLEO_BRAIN_CAPTURE_MCP env.
|
|
22
|
-
* For selective mutation-only capture, use work-capture-hooks.ts instead.
|
|
23
|
-
*/
|
|
24
|
-
export declare function handlePromptSubmit(projectRoot: string, payload: PromptSubmitPayload): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Handle ResponseComplete - optionally capture ALL gateway response events to BRAIN.
|
|
27
|
-
*
|
|
28
|
-
* No-op by default. Enable via brain.captureMcp config or CLEO_BRAIN_CAPTURE_MCP env.
|
|
29
|
-
* For selective mutation-only capture, use work-capture-hooks.ts instead.
|
|
30
|
-
*/
|
|
31
|
-
export declare function handleResponseComplete(projectRoot: string, payload: ResponseCompletePayload): Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* Handle Notification — capture system notifications as BRAIN observations.
|
|
34
|
-
*
|
|
35
|
-
* Only fires for Notification payloads that carry a message field (i.e. system
|
|
36
|
-
* notifications). File-change notifications (filePath + changeType) are
|
|
37
|
-
* handled exclusively by file-hooks.ts and are skipped here to avoid
|
|
38
|
-
* double-capture.
|
|
39
|
-
*
|
|
40
|
-
* Gated behind brain.autoCapture config. Never throws.
|
|
41
|
-
*
|
|
42
|
-
* @param projectRoot - Absolute path to the project root directory.
|
|
43
|
-
* @param payload - Notification event payload.
|
|
44
|
-
*
|
|
45
|
-
* @task T166
|
|
46
|
-
*/
|
|
47
|
-
export declare function handleSystemNotification(projectRoot: string, payload: NotificationPayload): Promise<void>;
|
|
48
|
-
//# sourceMappingURL=mcp-hooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-hooks.d.ts","sourceRoot":"","sources":["../../../src/hooks/handlers/mcp-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,aAAa,CAAC;AA0BrB;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAoBf"}
|
package/dist/mcp/index.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP environment detection - CLEO-specific runtime mode resolution.
|
|
3
|
-
*
|
|
4
|
-
* Detects dev-ts vs prod-npm mode by reading ~/.cleo/VERSION.
|
|
5
|
-
* This is the only CLEO-specific concern here — all provider detection,
|
|
6
|
-
* config writing, and MCP server installation is delegated to @cleocode/caamp.
|
|
7
|
-
*
|
|
8
|
-
* @task T4676
|
|
9
|
-
* @epic T4663
|
|
10
|
-
*/
|
|
11
|
-
/** Resolved environment mode for MCP server config. */
|
|
12
|
-
export interface McpEnvMode {
|
|
13
|
-
mode: 'dev-ts' | 'prod-npm' | 'unknown';
|
|
14
|
-
/** Absolute path to the source directory (dev-ts mode only). */
|
|
15
|
-
source: string | null;
|
|
16
|
-
/** Resolved install channel for npm package invocation. */
|
|
17
|
-
channel: 'stable' | 'beta' | 'dev' | 'unknown';
|
|
18
|
-
}
|
|
19
|
-
/** Resolve MCP server name by channel. */
|
|
20
|
-
export declare function getMcpServerName(env: McpEnvMode): string;
|
|
21
|
-
/**
|
|
22
|
-
* Detect the current CLEO environment mode by reading ~/.cleo/VERSION.
|
|
23
|
-
*
|
|
24
|
-
* The VERSION file format:
|
|
25
|
-
* Line 1: version number
|
|
26
|
-
* Lines 2+: key=value pairs (mode, source, etc.)
|
|
27
|
-
*
|
|
28
|
-
* @task T4584
|
|
29
|
-
*/
|
|
30
|
-
export declare function detectEnvMode(): McpEnvMode;
|
|
31
|
-
/**
|
|
32
|
-
* Generate the MCP server entry for the cleo server based on env mode.
|
|
33
|
-
*
|
|
34
|
-
* Returns a config object compatible with CAAMP's McpServerConfig:
|
|
35
|
-
* - dev-ts: { command: 'node', args: ['<source>/dist/mcp/index.js'] }
|
|
36
|
-
* - prod-npm stable: { command: 'npx', args: ['-y', '@cleocode/cleo@latest', 'mcp'] }
|
|
37
|
-
* - prod-npm beta: { command: 'npx', args: ['-y', '@cleocode/cleo@beta', 'mcp'] }
|
|
38
|
-
*
|
|
39
|
-
* @task T4584
|
|
40
|
-
*/
|
|
41
|
-
export declare function generateMcpServerEntry(env: McpEnvMode): Record<string, unknown>;
|
|
42
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/mcp/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,uDAAuD;AACvD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IACxC,gEAAgE;IAChE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,2DAA2D;IAC3D,OAAO,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;CAChD;AAED,0CAA0C;AAC1C,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAIxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAuF1C;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuB/E"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* T4718: Test CAAMP skill install + integrity check end-to-end.
|
|
3
|
-
*
|
|
4
|
-
* Verifies the full skill installation flow:
|
|
5
|
-
* 1. CAAMP adapter in src/core/caamp/ exists and exports correctly
|
|
6
|
-
* 2. Skill discovery via parseSkillFile
|
|
7
|
-
* 3. Skill installation to canonical paths
|
|
8
|
-
* 4. Integrity after install
|
|
9
|
-
*
|
|
10
|
-
* @task T4718
|
|
11
|
-
* @epic T4663
|
|
12
|
-
*/
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=caamp-skill-install.test.d.ts.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI/MCP Parity Integration Tests
|
|
3
|
-
*
|
|
4
|
-
* Verifies that the CLI and MCP paths produce identical results for shared
|
|
5
|
-
* operations. Both CLI and MCP ultimately route through the same domain
|
|
6
|
-
* handlers (TasksHandler, SessionHandler, etc.), which delegate to the same
|
|
7
|
-
* src/core/ functions.
|
|
8
|
-
*
|
|
9
|
-
* Test strategy:
|
|
10
|
-
* 1. Direct domain handler parity — call handler.query()/handler.mutate()
|
|
11
|
-
* and dispatchRaw() for the same operation; assert identical data.
|
|
12
|
-
* 2. CLI dispatch path — call dispatchRaw() and verify it reaches the same
|
|
13
|
-
* handler as MCP would via createDomainHandlers().
|
|
14
|
-
* 3. Cross-adapter data identity — same mock engine function is called with
|
|
15
|
-
* identical args from both CLI and MCP code paths.
|
|
16
|
-
* 4. MCP gateway normalization gap — document that handleMcpToolCall passes
|
|
17
|
-
* 'cleo_query' as gateway but the registry expects 'query' (a real gap).
|
|
18
|
-
*
|
|
19
|
-
* Architecture under test:
|
|
20
|
-
* CLI: dispatchRaw('query', domain, op, params)
|
|
21
|
-
* → getCliDispatcher() → Dispatcher (sanitizer mw)
|
|
22
|
-
* → TasksHandler.query(op, params)
|
|
23
|
-
* → task-engine fn → core/tasks/*
|
|
24
|
-
*
|
|
25
|
-
* MCP: handleMcpToolCall('cleo_query', domain, op, params)
|
|
26
|
-
* → getMcpDispatcher() → Dispatcher (sanitizer+rl+gates+protocol+audit mw)
|
|
27
|
-
* → same TasksHandler.query(op, params) [same handler instance via createDomainHandlers()]
|
|
28
|
-
* → same task-engine fn → same core/tasks/*
|
|
29
|
-
*
|
|
30
|
-
* @task T4796
|
|
31
|
-
* @epic T4654
|
|
32
|
-
*/
|
|
33
|
-
export {};
|
|
34
|
-
//# sourceMappingURL=cli-mcp-parity.integration.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-mcp-parity.integration.test.d.ts","sourceRoot":"","sources":["cli-mcp-parity.integration.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG"}
|