@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
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* smart_search — cross-codebase symbol search via tree-sitter.
|
|
3
|
+
*
|
|
4
|
+
* Walks a directory tree, batch-parses code files by language, and
|
|
5
|
+
* matches symbols against a query string with relevance scoring.
|
|
6
|
+
*
|
|
7
|
+
* @task T152
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { readdirSync } from 'node:fs';
|
|
11
|
+
import { join, relative } from 'node:path';
|
|
12
|
+
import type { CodeSymbol } from '@cleocode/contracts';
|
|
13
|
+
import { detectLanguage, type TreeSitterLanguage } from '../lib/tree-sitter-languages.js';
|
|
14
|
+
import { batchParse } from './parser.js';
|
|
15
|
+
|
|
16
|
+
/** A search result with relevance score. */
|
|
17
|
+
export interface SmartSearchResult {
|
|
18
|
+
/** The matched symbol. */
|
|
19
|
+
symbol: CodeSymbol;
|
|
20
|
+
/** Relevance score (higher = better match). */
|
|
21
|
+
score: number;
|
|
22
|
+
/** How the query matched (exact, substring, fuzzy, path). */
|
|
23
|
+
matchType: 'exact' | 'substring' | 'fuzzy' | 'path';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Options for smart_search. */
|
|
27
|
+
export interface SmartSearchOptions {
|
|
28
|
+
/** Maximum results to return (default: 20). */
|
|
29
|
+
maxResults?: number;
|
|
30
|
+
/** Glob-like file pattern filter (e.g. "*.ts", "src/**"). */
|
|
31
|
+
filePattern?: string;
|
|
32
|
+
/** Restrict to specific language. */
|
|
33
|
+
language?: TreeSitterLanguage;
|
|
34
|
+
/** Root directory to search (default: cwd). */
|
|
35
|
+
rootDir?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Walk a directory tree and collect source files.
|
|
40
|
+
*
|
|
41
|
+
* Respects common ignore patterns (node_modules, dist, .git, etc.)
|
|
42
|
+
* and optionally filters by file pattern and language.
|
|
43
|
+
*/
|
|
44
|
+
function collectSourceFiles(dir: string, options: SmartSearchOptions): string[] {
|
|
45
|
+
const IGNORE_DIRS = new Set([
|
|
46
|
+
'node_modules',
|
|
47
|
+
'dist',
|
|
48
|
+
'.git',
|
|
49
|
+
'.cleo',
|
|
50
|
+
'target',
|
|
51
|
+
'__pycache__',
|
|
52
|
+
'.next',
|
|
53
|
+
'.nuxt',
|
|
54
|
+
'build',
|
|
55
|
+
'coverage',
|
|
56
|
+
'.turbo',
|
|
57
|
+
'.cache',
|
|
58
|
+
]);
|
|
59
|
+
|
|
60
|
+
const files: string[] = [];
|
|
61
|
+
|
|
62
|
+
function walk(currentDir: string): void {
|
|
63
|
+
let entries: { isDirectory(): boolean; isFile(): boolean; name: string }[];
|
|
64
|
+
try {
|
|
65
|
+
entries = readdirSync(currentDir, { withFileTypes: true, encoding: 'utf-8' }) as {
|
|
66
|
+
isDirectory(): boolean;
|
|
67
|
+
isFile(): boolean;
|
|
68
|
+
name: string;
|
|
69
|
+
}[];
|
|
70
|
+
} catch {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
for (const entry of entries) {
|
|
75
|
+
if (entry.isDirectory()) {
|
|
76
|
+
if (!IGNORE_DIRS.has(entry.name) && !entry.name.startsWith('.')) {
|
|
77
|
+
walk(join(currentDir, entry.name));
|
|
78
|
+
}
|
|
79
|
+
} else if (entry.isFile()) {
|
|
80
|
+
const fullPath = join(currentDir, entry.name);
|
|
81
|
+
const lang = detectLanguage(entry.name);
|
|
82
|
+
if (!lang) continue;
|
|
83
|
+
|
|
84
|
+
// Language filter
|
|
85
|
+
if (options.language && lang !== options.language) continue;
|
|
86
|
+
|
|
87
|
+
// File pattern filter (simple glob: *.ext or dir/**)
|
|
88
|
+
if (options.filePattern) {
|
|
89
|
+
const relPath = relative(dir, fullPath);
|
|
90
|
+
if (options.filePattern.startsWith('*.')) {
|
|
91
|
+
const ext = options.filePattern.slice(1);
|
|
92
|
+
if (!entry.name.endsWith(ext)) continue;
|
|
93
|
+
} else if (!relPath.includes(options.filePattern.replace('/**', ''))) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
files.push(fullPath);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
walk(dir);
|
|
104
|
+
return files;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Score a symbol against a query string.
|
|
109
|
+
*
|
|
110
|
+
* Scoring: exact name match (10) > substring in name (5) >
|
|
111
|
+
* path match (3) > fuzzy (1).
|
|
112
|
+
*/
|
|
113
|
+
function scoreSymbol(
|
|
114
|
+
symbol: CodeSymbol,
|
|
115
|
+
query: string,
|
|
116
|
+
): { score: number; matchType: SmartSearchResult['matchType'] } {
|
|
117
|
+
const q = query.toLowerCase();
|
|
118
|
+
const name = symbol.name.toLowerCase();
|
|
119
|
+
const path = symbol.filePath.toLowerCase();
|
|
120
|
+
|
|
121
|
+
// Exact name match
|
|
122
|
+
if (name === q) return { score: 10, matchType: 'exact' };
|
|
123
|
+
|
|
124
|
+
// Substring in name
|
|
125
|
+
if (name.includes(q)) return { score: 5, matchType: 'substring' };
|
|
126
|
+
|
|
127
|
+
// Path match
|
|
128
|
+
if (path.includes(q)) return { score: 3, matchType: 'path' };
|
|
129
|
+
|
|
130
|
+
// Fuzzy: all query chars appear in order in the name
|
|
131
|
+
let qi = 0;
|
|
132
|
+
for (let ni = 0; ni < name.length && qi < q.length; ni++) {
|
|
133
|
+
if (name[ni] === q[qi]) qi++;
|
|
134
|
+
}
|
|
135
|
+
if (qi === q.length) return { score: 1, matchType: 'fuzzy' };
|
|
136
|
+
|
|
137
|
+
return { score: 0, matchType: 'fuzzy' };
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Search for symbols across a codebase.
|
|
142
|
+
*
|
|
143
|
+
* Walks the directory tree, batch-parses source files, and returns
|
|
144
|
+
* symbols matching the query ranked by relevance score.
|
|
145
|
+
*
|
|
146
|
+
* @param query - Search string to match against symbol names and paths
|
|
147
|
+
* @param options - Search options (maxResults, filePattern, language, rootDir)
|
|
148
|
+
* @returns Ranked array of search results
|
|
149
|
+
*/
|
|
150
|
+
export function smartSearch(query: string, options: SmartSearchOptions = {}): SmartSearchResult[] {
|
|
151
|
+
const rootDir = options.rootDir ?? process.cwd();
|
|
152
|
+
const maxResults = options.maxResults ?? 20;
|
|
153
|
+
|
|
154
|
+
// Collect and parse source files
|
|
155
|
+
const files = collectSourceFiles(rootDir, options);
|
|
156
|
+
const parsed = batchParse(files, rootDir);
|
|
157
|
+
|
|
158
|
+
// Score all symbols
|
|
159
|
+
const results: SmartSearchResult[] = [];
|
|
160
|
+
for (const fileResult of parsed.results) {
|
|
161
|
+
for (const symbol of fileResult.symbols) {
|
|
162
|
+
const { score, matchType } = scoreSymbol(symbol, query);
|
|
163
|
+
if (score > 0) {
|
|
164
|
+
results.push({ symbol, score, matchType });
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Sort by score descending, then by name
|
|
170
|
+
results.sort((a, b) => b.score - a.score || a.symbol.name.localeCompare(b.symbol.name));
|
|
171
|
+
|
|
172
|
+
return results.slice(0, maxResults);
|
|
173
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* smart_unfold — single symbol extraction from source files.
|
|
3
|
+
*
|
|
4
|
+
* Takes a file path + symbol name, parses the file via tree-sitter,
|
|
5
|
+
* finds the matching symbol node, and extracts complete source including
|
|
6
|
+
* JSDoc/docstring, decorators, and full body. AST node boundaries
|
|
7
|
+
* guarantee no truncation.
|
|
8
|
+
*
|
|
9
|
+
* @task T153
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { readFileSync } from 'node:fs';
|
|
13
|
+
import { relative } from 'node:path';
|
|
14
|
+
import type { CodeSymbol } from '@cleocode/contracts';
|
|
15
|
+
import { detectLanguage } from '../lib/tree-sitter-languages.js';
|
|
16
|
+
import { parseFile } from './parser.js';
|
|
17
|
+
|
|
18
|
+
/** Result of unfolding a single symbol. */
|
|
19
|
+
export interface SmartUnfoldResult {
|
|
20
|
+
/** Whether the symbol was found. */
|
|
21
|
+
found: boolean;
|
|
22
|
+
/** The matched symbol metadata. */
|
|
23
|
+
symbol?: CodeSymbol;
|
|
24
|
+
/** Complete source text including JSDoc, decorators, and body. */
|
|
25
|
+
source: string;
|
|
26
|
+
/** Start line (1-based, inclusive of leading doc comment). */
|
|
27
|
+
startLine: number;
|
|
28
|
+
/** End line (1-based). */
|
|
29
|
+
endLine: number;
|
|
30
|
+
/** Estimated token count for this extraction. */
|
|
31
|
+
estimatedTokens: number;
|
|
32
|
+
/** File path (relative). */
|
|
33
|
+
filePath: string;
|
|
34
|
+
/** Errors encountered. */
|
|
35
|
+
errors: string[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Find leading documentation comment (JSDoc, docstring, Rust doc) above a symbol.
|
|
40
|
+
*
|
|
41
|
+
* Scans backwards from the symbol's start line to find attached doc comments.
|
|
42
|
+
*/
|
|
43
|
+
function findLeadingDocStart(lines: string[], symbolStartLine: number, language: string): number {
|
|
44
|
+
const idx = symbolStartLine - 1; // 1-based to 0-based
|
|
45
|
+
if (idx <= 0) return symbolStartLine;
|
|
46
|
+
|
|
47
|
+
let docStart = idx;
|
|
48
|
+
|
|
49
|
+
if (language === 'python') {
|
|
50
|
+
// Python: look for decorator lines above
|
|
51
|
+
let i = idx - 1;
|
|
52
|
+
while (i >= 0 && lines[i]!.trimStart().startsWith('@')) {
|
|
53
|
+
docStart = i + 1; // back to 1-based
|
|
54
|
+
i--;
|
|
55
|
+
}
|
|
56
|
+
return docStart;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// C-family / Rust / JS/TS: look for block comments (/** ... */) or /// lines
|
|
60
|
+
let i = idx - 1;
|
|
61
|
+
|
|
62
|
+
// Skip blank lines immediately above
|
|
63
|
+
while (i >= 0 && lines[i]!.trim() === '') i--;
|
|
64
|
+
|
|
65
|
+
if (i < 0) return symbolStartLine;
|
|
66
|
+
|
|
67
|
+
const line = lines[i]!.trimStart();
|
|
68
|
+
|
|
69
|
+
// Block comment ending: */
|
|
70
|
+
if (line.endsWith('*/')) {
|
|
71
|
+
// Walk backwards to find opening /**
|
|
72
|
+
while (i >= 0) {
|
|
73
|
+
if (lines[i]!.trimStart().startsWith('/**') || lines[i]!.trimStart().startsWith('/*')) {
|
|
74
|
+
docStart = i + 1; // 1-based
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
i--;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
// Line comments: /// (Rust) or // (TS/JS decorators less common)
|
|
81
|
+
else if (line.startsWith('///') || line.startsWith('//!')) {
|
|
82
|
+
while (
|
|
83
|
+
i >= 0 &&
|
|
84
|
+
(lines[i]!.trimStart().startsWith('///') || lines[i]!.trimStart().startsWith('//!'))
|
|
85
|
+
) {
|
|
86
|
+
docStart = i + 1;
|
|
87
|
+
i--;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Also capture decorators (TS/Java) above the doc comment
|
|
92
|
+
i = docStart - 2; // 0-based, line above current docStart
|
|
93
|
+
while (i >= 0 && lines[i]!.trimStart().startsWith('@')) {
|
|
94
|
+
docStart = i + 1;
|
|
95
|
+
i--;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return docStart;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Extract a symbol's complete source from a file.
|
|
103
|
+
*
|
|
104
|
+
* Finds the symbol by name (supports "Class.method" dot notation),
|
|
105
|
+
* determines its full range including leading documentation, and
|
|
106
|
+
* returns the exact source text.
|
|
107
|
+
*
|
|
108
|
+
* @param filePath - Absolute path to source file
|
|
109
|
+
* @param symbolName - Symbol to extract (e.g. "parseFile" or "HttpTransport.connect")
|
|
110
|
+
* @param projectRoot - Project root for relative path computation
|
|
111
|
+
* @returns Unfold result with complete source text
|
|
112
|
+
*/
|
|
113
|
+
export function smartUnfold(
|
|
114
|
+
filePath: string,
|
|
115
|
+
symbolName: string,
|
|
116
|
+
projectRoot?: string,
|
|
117
|
+
): SmartUnfoldResult {
|
|
118
|
+
const root = projectRoot ?? process.cwd();
|
|
119
|
+
const relPath = relative(root, filePath);
|
|
120
|
+
const language = detectLanguage(filePath);
|
|
121
|
+
|
|
122
|
+
const empty: SmartUnfoldResult = {
|
|
123
|
+
found: false,
|
|
124
|
+
source: '',
|
|
125
|
+
startLine: 0,
|
|
126
|
+
endLine: 0,
|
|
127
|
+
estimatedTokens: 0,
|
|
128
|
+
filePath: relPath,
|
|
129
|
+
errors: [],
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
if (!language) {
|
|
133
|
+
return { ...empty, errors: ['Unsupported language'] };
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Parse the file
|
|
137
|
+
const parseResult = parseFile(filePath, root);
|
|
138
|
+
if (parseResult.symbols.length === 0) {
|
|
139
|
+
return {
|
|
140
|
+
...empty,
|
|
141
|
+
errors: parseResult.errors.length > 0 ? parseResult.errors : ['No symbols found'],
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Find the matching symbol
|
|
146
|
+
const parts = symbolName.split('.');
|
|
147
|
+
let match: CodeSymbol | undefined;
|
|
148
|
+
|
|
149
|
+
if (parts.length === 2) {
|
|
150
|
+
// Nested: "Class.method" — find method with matching parent range
|
|
151
|
+
const [parentName, childName] = parts;
|
|
152
|
+
const parent = parseResult.symbols.find(
|
|
153
|
+
(s) =>
|
|
154
|
+
s.name === parentName && (s.kind === 'class' || s.kind === 'struct' || s.kind === 'impl'),
|
|
155
|
+
);
|
|
156
|
+
if (parent) {
|
|
157
|
+
match = parseResult.symbols.find(
|
|
158
|
+
(s) =>
|
|
159
|
+
s.name === childName && s.startLine >= parent.startLine && s.endLine <= parent.endLine,
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
} else {
|
|
163
|
+
// Top-level: exact name match, prefer non-method over method
|
|
164
|
+
match = parseResult.symbols.find((s) => s.name === symbolName && s.kind !== 'method');
|
|
165
|
+
if (!match) {
|
|
166
|
+
match = parseResult.symbols.find((s) => s.name === symbolName);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (!match) {
|
|
171
|
+
return { ...empty, errors: [`Symbol "${symbolName}" not found in ${relPath}`] };
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Read source lines
|
|
175
|
+
let lines: string[];
|
|
176
|
+
try {
|
|
177
|
+
lines = readFileSync(filePath, 'utf-8').split('\n');
|
|
178
|
+
} catch (err) {
|
|
179
|
+
return {
|
|
180
|
+
...empty,
|
|
181
|
+
errors: [`Failed to read file: ${err instanceof Error ? err.message : String(err)}`],
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Determine full range including doc comment
|
|
186
|
+
const docStart = findLeadingDocStart(lines, match.startLine, language);
|
|
187
|
+
const startLine = Math.min(docStart, match.startLine);
|
|
188
|
+
const endLine = match.endLine;
|
|
189
|
+
|
|
190
|
+
// Extract source text
|
|
191
|
+
const source = lines.slice(startLine - 1, endLine).join('\n');
|
|
192
|
+
const estimatedTokens = Math.ceil(source.length / 4);
|
|
193
|
+
|
|
194
|
+
return {
|
|
195
|
+
found: true,
|
|
196
|
+
symbol: match,
|
|
197
|
+
source,
|
|
198
|
+
startLine,
|
|
199
|
+
endLine,
|
|
200
|
+
estimatedTokens,
|
|
201
|
+
filePath: relPath,
|
|
202
|
+
errors: [],
|
|
203
|
+
};
|
|
204
|
+
}
|
|
@@ -29,7 +29,7 @@ const LAYER_PURPOSE: Record<string, string> = {
|
|
|
29
29
|
hooks: 'React hooks',
|
|
30
30
|
composables: 'Vue composables',
|
|
31
31
|
cli: 'CLI interface',
|
|
32
|
-
mcp: '
|
|
32
|
+
mcp: 'Protocol server layer (legacy)',
|
|
33
33
|
dispatch: 'Dispatch / routing layer',
|
|
34
34
|
types: 'Type definitions',
|
|
35
35
|
schemas: 'Schema definitions',
|
|
@@ -64,7 +64,7 @@ const ARCH_PATTERNS: Record<string, string[]> = {
|
|
|
64
64
|
mvc: ['models', 'views', 'controllers'],
|
|
65
65
|
modular: ['modules'],
|
|
66
66
|
'clean-architecture': ['domain', 'application', 'infrastructure'],
|
|
67
|
-
'dispatch-first': ['dispatch', 'core', '
|
|
67
|
+
'dispatch-first': ['dispatch', 'core', 'cli'],
|
|
68
68
|
'component-based': ['components', 'pages'],
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Validates RCASD-IVTR+C lifecycle compliance with exit codes 60-70.
|
|
5
5
|
* Intercepts domain operations to enforce protocol requirements before execution.
|
|
6
6
|
*
|
|
7
|
-
* Moved
|
|
7
|
+
* Moved to core for proper layering (formerly in dispatch).
|
|
8
8
|
*
|
|
9
9
|
* @task T2918
|
|
10
10
|
* @task T5707
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Protocol Rule Definitions for CLEO
|
|
3
3
|
*
|
|
4
4
|
* Defines validation rules for all 9 RCASD-IVTR+C protocols.
|
|
5
|
-
* Moved
|
|
5
|
+
* Moved to core for proper layering (formerly in dispatch).
|
|
6
6
|
*
|
|
7
7
|
* @task T2918
|
|
8
8
|
* @task T5707
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* Protocol enforcement types used by the RCASD-IVTR+C protocol system.
|
|
3
3
|
*
|
|
4
4
|
* These types are used by protocol-enforcement.ts, protocol-rules.ts,
|
|
5
|
-
* verification-gates.ts, and gate-validators.ts.
|
|
6
|
-
* src/mcp/lib/exit-codes.ts (deprecated), now canonical in core.
|
|
5
|
+
* verification-gates.ts, and gate-validators.ts. Canonical location in core.
|
|
7
6
|
*
|
|
8
7
|
* @task T5707
|
|
9
8
|
* @epic T5701
|
|
@@ -39,7 +38,7 @@ export enum ErrorCategory {
|
|
|
39
38
|
* Protocol-specific exit codes used by the RCASD-IVTR+C enforcement system.
|
|
40
39
|
*
|
|
41
40
|
* These map to the protocol violation range (60-70) and lifecycle enforcement
|
|
42
|
-
* range (80-84) defined in the
|
|
41
|
+
* range (80-84) defined in the protocol specification. The values here
|
|
43
42
|
* align with the protocol enforcement layer's own exit code semantics,
|
|
44
43
|
* which differ from the canonical CLI exit codes in src/types/exit-codes.ts.
|
|
45
44
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dual-api-e2e.test.d.ts","sourceRoot":"","sources":["dual-api-e2e.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dual-API E2E test — verify messaging across both SignalDock endpoints.
|
|
3
|
+
*
|
|
4
|
+
* Tests that agents can exchange messages on:
|
|
5
|
+
* 1. api.signaldock.io (canonical)
|
|
6
|
+
* 2. api.clawmsgr.com (legacy)
|
|
7
|
+
* 3. Local signaldock.db (offline)
|
|
8
|
+
*
|
|
9
|
+
* These tests hit real APIs and require valid credentials.
|
|
10
|
+
* Set SKIP_E2E=1 to skip when running in CI without network.
|
|
11
|
+
*
|
|
12
|
+
* @task T226
|
|
13
|
+
*/
|
|
14
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
15
|
+
import { join } from 'node:path';
|
|
16
|
+
import { describe, expect, it } from 'vitest';
|
|
17
|
+
import { HttpTransport } from '../http-transport.js';
|
|
18
|
+
// ============================================================================
|
|
19
|
+
// Config helpers
|
|
20
|
+
// ============================================================================
|
|
21
|
+
const CLEO_DIR = join(process.cwd(), '.cleo');
|
|
22
|
+
const SKIP_E2E = process.env['SKIP_E2E'] === '1';
|
|
23
|
+
/** Load a ClawMsgr/SignalDock config file. */
|
|
24
|
+
function loadConfig(filename) {
|
|
25
|
+
const path = join(CLEO_DIR, filename);
|
|
26
|
+
if (!existsSync(path))
|
|
27
|
+
return null;
|
|
28
|
+
try {
|
|
29
|
+
return JSON.parse(readFileSync(path, 'utf-8'));
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Send a test message and verify it arrives. */
|
|
36
|
+
async function testMessageExchange(apiBaseUrl, senderConfig, receiverAgentId) {
|
|
37
|
+
const transport = new HttpTransport();
|
|
38
|
+
try {
|
|
39
|
+
await transport.connect({
|
|
40
|
+
agentId: senderConfig.agentId,
|
|
41
|
+
apiKey: senderConfig.apiKey,
|
|
42
|
+
apiBaseUrl,
|
|
43
|
+
});
|
|
44
|
+
const testContent = `/info @${receiverAgentId} #e2e-test T226 verification at ${new Date().toISOString()}`;
|
|
45
|
+
const result = await transport.push(receiverAgentId, testContent);
|
|
46
|
+
await transport.disconnect();
|
|
47
|
+
return { sent: true, messageId: result.messageId, error: null };
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
await transport.disconnect();
|
|
51
|
+
return { sent: false, messageId: null, error: String(err) };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// ============================================================================
|
|
55
|
+
// Test suite
|
|
56
|
+
// ============================================================================
|
|
57
|
+
describe('Dual-API E2E', () => {
|
|
58
|
+
// --------------------------------------------------------------------------
|
|
59
|
+
// Config verification
|
|
60
|
+
// --------------------------------------------------------------------------
|
|
61
|
+
describe('config files exist', () => {
|
|
62
|
+
it('has clawmsgr configs (legacy)', () => {
|
|
63
|
+
const config = loadConfig('clawmsgr-cleo-rust-lead.json');
|
|
64
|
+
if (!config) {
|
|
65
|
+
console.log('SKIP: clawmsgr config not found');
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
expect(config.agentId).toBe('cleo-rust-lead');
|
|
69
|
+
expect(config.apiBaseUrl).toContain('clawmsgr.com');
|
|
70
|
+
});
|
|
71
|
+
it('has signaldock configs (canonical)', () => {
|
|
72
|
+
const config = loadConfig('signaldock-cleo-rust-lead.json');
|
|
73
|
+
if (!config) {
|
|
74
|
+
console.log('SKIP: signaldock config not found');
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
expect(config.agentId).toBe('cleo-rust-lead');
|
|
78
|
+
expect(config.apiBaseUrl).toContain('signaldock.io');
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
// --------------------------------------------------------------------------
|
|
82
|
+
// API health checks
|
|
83
|
+
// --------------------------------------------------------------------------
|
|
84
|
+
describe('API health', () => {
|
|
85
|
+
it('api.signaldock.io is healthy', async () => {
|
|
86
|
+
if (SKIP_E2E)
|
|
87
|
+
return;
|
|
88
|
+
const response = await fetch('https://api.signaldock.io/health', {
|
|
89
|
+
signal: AbortSignal.timeout(10_000),
|
|
90
|
+
});
|
|
91
|
+
expect(response.ok).toBe(true);
|
|
92
|
+
const data = (await response.json());
|
|
93
|
+
expect(data.data?.status).toBe('ok');
|
|
94
|
+
});
|
|
95
|
+
it('api.clawmsgr.com is healthy', async () => {
|
|
96
|
+
if (SKIP_E2E)
|
|
97
|
+
return;
|
|
98
|
+
const response = await fetch('https://api.clawmsgr.com/health', {
|
|
99
|
+
signal: AbortSignal.timeout(10_000),
|
|
100
|
+
});
|
|
101
|
+
expect(response.ok).toBe(true);
|
|
102
|
+
const data = (await response.json());
|
|
103
|
+
expect(data.data?.status).toBe('ok');
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
// --------------------------------------------------------------------------
|
|
107
|
+
// Message exchange on api.signaldock.io
|
|
108
|
+
// --------------------------------------------------------------------------
|
|
109
|
+
describe('api.signaldock.io messaging', () => {
|
|
110
|
+
it('can send a message via signaldock.io', async () => {
|
|
111
|
+
if (SKIP_E2E)
|
|
112
|
+
return;
|
|
113
|
+
const config = loadConfig('signaldock-cleo-rust-lead.json');
|
|
114
|
+
if (!config) {
|
|
115
|
+
console.log('SKIP: no signaldock config');
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const result = await testMessageExchange('https://api.signaldock.io', { agentId: config.agentId, apiKey: config.apiKey }, 'cleo-dev');
|
|
119
|
+
expect(result.sent).toBe(true);
|
|
120
|
+
expect(result.messageId).toBeDefined();
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
// --------------------------------------------------------------------------
|
|
124
|
+
// Message exchange on api.clawmsgr.com
|
|
125
|
+
// --------------------------------------------------------------------------
|
|
126
|
+
describe('api.clawmsgr.com messaging', () => {
|
|
127
|
+
it('can send a message via clawmsgr.com', async () => {
|
|
128
|
+
if (SKIP_E2E)
|
|
129
|
+
return;
|
|
130
|
+
const config = loadConfig('clawmsgr-cleo-rust-lead.json');
|
|
131
|
+
if (!config) {
|
|
132
|
+
console.log('SKIP: no clawmsgr config');
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const result = await testMessageExchange('https://api.clawmsgr.com', { agentId: config.agentId, apiKey: config.apiKey }, 'cleo-dev');
|
|
136
|
+
expect(result.sent).toBe(true);
|
|
137
|
+
expect(result.messageId).toBeDefined();
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
// --------------------------------------------------------------------------
|
|
141
|
+
// Cross-API metadata consistency
|
|
142
|
+
// --------------------------------------------------------------------------
|
|
143
|
+
describe('cross-API consistency', () => {
|
|
144
|
+
it('agent profile exists on both APIs', async () => {
|
|
145
|
+
if (SKIP_E2E)
|
|
146
|
+
return;
|
|
147
|
+
const clawConfig = loadConfig('clawmsgr-cleo-rust-lead.json');
|
|
148
|
+
const sdConfig = loadConfig('signaldock-cleo-rust-lead.json');
|
|
149
|
+
if (!clawConfig || !sdConfig) {
|
|
150
|
+
console.log('SKIP: missing configs');
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
// Check agent exists on clawmsgr
|
|
154
|
+
const clawResp = await fetch('https://api.clawmsgr.com/agents/cleo-rust-lead', {
|
|
155
|
+
headers: {
|
|
156
|
+
Authorization: `Bearer ${clawConfig.apiKey}`,
|
|
157
|
+
'X-Agent-Id': 'cleo-rust-lead',
|
|
158
|
+
},
|
|
159
|
+
signal: AbortSignal.timeout(10_000),
|
|
160
|
+
});
|
|
161
|
+
// Check agent exists on signaldock
|
|
162
|
+
const sdResp = await fetch('https://api.signaldock.io/agents/cleo-rust-lead', {
|
|
163
|
+
headers: {
|
|
164
|
+
Authorization: `Bearer ${sdConfig.apiKey}`,
|
|
165
|
+
'X-Agent-Id': 'cleo-rust-lead',
|
|
166
|
+
},
|
|
167
|
+
signal: AbortSignal.timeout(10_000),
|
|
168
|
+
});
|
|
169
|
+
expect(clawResp.ok).toBe(true);
|
|
170
|
+
expect(sdResp.ok).toBe(true);
|
|
171
|
+
const clawData = (await clawResp.json());
|
|
172
|
+
const sdData = (await sdResp.json());
|
|
173
|
+
expect(clawData.data?.agent?.agentId).toBe('cleo-rust-lead');
|
|
174
|
+
expect(sdData.data?.agent?.agentId).toBe('cleo-rust-lead');
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
//# sourceMappingURL=dual-api-e2e.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dual-api-e2e.test.js","sourceRoot":"","sources":["dual-api-e2e.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;AAC9C,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC;AAEjD,8CAA8C;AAC9C,SAAS,UAAU,CACjB,QAAgB;IAEhB,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACtC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACnC,IAAI,CAAC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