@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,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Provider-aware token measurement and persistence.
|
|
3
3
|
*
|
|
4
|
-
* Central SSoT for CLI/
|
|
4
|
+
* Central SSoT for CLI/tooling token estimation with a three-layer chain:
|
|
5
5
|
* 1) OTel/provider telemetry when available
|
|
6
6
|
* 2) Exact tokenizer for supported models
|
|
7
7
|
* 3) Heuristic fallback calibrated for JSON vs text payloads
|
|
8
8
|
*
|
|
9
9
|
* @task T5618
|
|
10
10
|
* @why CLEO needs a provider-aware in-house token service instead of relying on a single external runtime.
|
|
11
|
-
* @what Adds central token measurement, persistence, CRUD, and summary helpers for CLI,
|
|
11
|
+
* @what Adds central token measurement, persistence, CRUD, and summary helpers for CLI, tests, and telemetry tooling.
|
|
12
12
|
*/
|
|
13
13
|
import { type TokenUsageRow } from '../store/tasks-schema.js';
|
|
14
14
|
export type TokenMethod = 'otel' | 'provider_api' | 'tokenizer' | 'heuristic';
|
|
15
15
|
export type TokenConfidence = 'real' | 'high' | 'estimated' | 'coarse';
|
|
16
|
-
export type TokenTransport = 'cli' | '
|
|
16
|
+
export type TokenTransport = 'cli' | 'api' | 'agent' | 'unknown';
|
|
17
17
|
export interface TokenExchangeInput {
|
|
18
18
|
requestPayload?: unknown;
|
|
19
19
|
responsePayload?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-service.d.ts","sourceRoot":"","sources":["../../src/metrics/token-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,EAAyB,KAAK,aAAa,EAAc,MAAM,0BAA0B,CAAC;AAIjG,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,cAAc,GAAG,WAAW,GAAG,WAAW,CAAC;AAC9E,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AACvE,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"token-service.d.ts","sourceRoot":"","sources":["../../src/metrics/token-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,EAAyB,KAAK,aAAa,EAAc,MAAM,0BAA0B,CAAC;AAIjG,MAAM,MAAM,WAAW,GAAG,MAAM,G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
2
|
+
* OrchestrationHierarchyImpl — Concrete implementation of the 5-level hierarchy.
|
|
3
|
+
*
|
|
4
|
+
* Loads the agent matrix from agent-matrix.json (if available) or uses
|
|
5
|
+
* the built-in default matrix. Provides escalation chain resolution,
|
|
6
|
+
* authority checks, and project scoping.
|
|
7
|
+
*
|
|
8
|
+
* @see docs/specs/CLEO-ORCH-PLAN.md
|
|
9
|
+
* @task T217
|
|
10
|
+
*/
|
|
11
|
+
import type { AgentHierarchy, AgentHierarchyEntry, EscalationChain, OrchestrationHierarchyAPI } from '@cleocode/contracts';
|
|
12
|
+
import { OrchestrationLevel } from '@cleocode/contracts';
|
|
13
|
+
/** Concrete implementation of OrchestrationHierarchyAPI. */
|
|
14
|
+
export declare class OrchestrationHierarchyImpl implements OrchestrationHierarchyAPI {
|
|
15
|
+
private hierarchy;
|
|
16
|
+
constructor(hierarchy?: AgentHierarchy);
|
|
17
|
+
/** Get the full hierarchy. */
|
|
18
|
+
getHierarchy(): AgentHierarchy;
|
|
19
|
+
/** Get a single agent's hierarchy entry. */
|
|
20
|
+
getAgent(agentId: string): AgentHierarchyEntry | null;
|
|
21
|
+
/** Get all agents at a specific level. */
|
|
22
|
+
getAgentsAtLevel(level: OrchestrationLevel): AgentHierarchyEntry[];
|
|
23
|
+
/** Get the escalation chain for an agent (nearest authority first). */
|
|
24
|
+
getEscalationChain(agentId: string): EscalationChain;
|
|
25
|
+
/** Get all agents directly managed by a specific agent. */
|
|
26
|
+
getDirectReports(agentId: string): AgentHierarchyEntry[];
|
|
27
|
+
/** Check if agent A has authority over agent B (A is in B's escalation chain). */
|
|
28
|
+
hasAuthority(agentIdA: string, agentIdB: string): boolean;
|
|
29
|
+
/** Get all agents scoped to a project. */
|
|
30
|
+
getProjectAgents(projectId: string): AgentHierarchyEntry[];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=hierarchy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hierarchy.d.ts","sourceRoot":"","sources":["../../src/orchestration/hierarchy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,yBAAyB,EAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AA4HzD,4DAA4D;AAC5D,qBAAa,0BAA2B,YAAW,yBAAyB;IAC1E,OAAO,CAAC,SAAS,CAAiB;gBAEtB,SAAS,CAAC,EAAE,cAAc;IAItC,8BAA8B;IAC9B,YAAY,IAAI,cAAc;IAI9B,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI;IAIrD,0CAA0C;IAC1C,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,mBAAmB,EAAE;IAIlE,uEAAuE;IACvE,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe;IAgBpD,2DAA2D;IAC3D,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,EAAE;IASxD,kFAAkF;IAClF,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO;IAKzD,0CAA0C;IAC1C,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,EAAE;CAG3D"}
|
|
@@ -9,6 +9,7 @@ export type { CircularDependency, DependencyAnalysis, MissingDependency } from '
|
|
|
9
9
|
export { analyzeDependencies, buildDependencyGraph, detectCircularDependencies, findMissingDependencies, } from './analyze.js';
|
|
10
10
|
export type { ContextEstimation } from './context.js';
|
|
11
11
|
export { countManifestEntries, estimateContext } from './context.js';
|
|
12
|
+
export { OrchestrationHierarchyImpl } from './hierarchy.js';
|
|
12
13
|
export type { EpicStatus, OverallStatus, ProgressMetrics, StartupSummary, StatusCounts, } from './status.js';
|
|
13
14
|
export { computeEpicStatus, computeOverallStatus, computeProgress, computeStartupSummary, countByStatus, } from './status.js';
|
|
14
15
|
/** Orchestrator session state. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/orchestration/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAIzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE9F,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrE,YAAY,EACV,UAAU,EACV,aAAa,EACb,eAAe,EACf,cAAc,EACd,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,aAAa,GACd,MAAM,aAAa,CAAC;AAErB,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,oCAAoC;AACpC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE;QACf,aAAa,EAAE,OAAO,CAAC;QACvB,gBAAgB,EAAE,MAAM,E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AAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,GACjD,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAY/C;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,YAAY,GACtB,OAAO,CAAC;IACT,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC,CAuBD;AAoCD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAuB/C;AAqDD;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAa5C"}
|
package/dist/paths.d.ts
CHANGED
|
@@ -11,6 +11,20 @@
|
|
|
11
11
|
/**
|
|
12
12
|
* Check if a CLEO project is initialized at the given root.
|
|
13
13
|
* Checks for tasks.db.
|
|
14
|
+
*
|
|
15
|
+
* @param projectRoot - Absolute path to check; defaults to the resolved project root
|
|
16
|
+
* @returns True if .cleo/ and tasks.db exist at the given root
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* A project is considered initialized when both the .cleo/ directory and
|
|
20
|
+
* the tasks.db SQLite database file are present.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* if (isProjectInitialized('/my/project')) {
|
|
25
|
+
* console.log('CLEO project found');
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
14
28
|
*/
|
|
15
29
|
export declare function isProjectInitialized(projectRoot?: string): boolean;
|
|
16
30
|
/**
|
|
@@ -18,37 +32,132 @@ export declare function isProjectInitialized(projectRoot?: string): boolean;
|
|
|
18
32
|
* Respects CLEO_HOME env var; otherwise uses the OS-appropriate data path
|
|
19
33
|
* via env-paths (XDG_DATA_HOME on Linux, Library/Application Support on macOS,
|
|
20
34
|
* %LOCALAPPDATA% on Windows).
|
|
35
|
+
*
|
|
36
|
+
* @returns Absolute path to the global CLEO data directory
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Delegates to `getPlatformPaths().data` which uses the `env-paths` package
|
|
40
|
+
* for XDG-compliant path resolution across operating systems.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const home = getCleoHome(); // e.g. "/home/user/.local/share/cleo"
|
|
45
|
+
* ```
|
|
21
46
|
*/
|
|
22
47
|
export declare function getCleoHome(): string;
|
|
23
48
|
/**
|
|
24
49
|
* Get the global CLEO templates directory.
|
|
50
|
+
*
|
|
51
|
+
* @returns Absolute path to the templates directory under CLEO home
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Returns `{cleoHome}/templates` where CLEO-INJECTION.md and other global
|
|
55
|
+
* templates are stored.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const dir = getCleoTemplatesDir(); // e.g. "/home/user/.local/share/cleo/templates"
|
|
60
|
+
* ```
|
|
25
61
|
*/
|
|
26
62
|
export declare function getCleoTemplatesDir(): string;
|
|
27
63
|
/**
|
|
28
64
|
* Get the global CLEO schemas directory.
|
|
65
|
+
*
|
|
66
|
+
* @returns Absolute path to the schemas directory under CLEO home
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* Returns `{cleoHome}/schemas`. Note that schemas are typically read at
|
|
70
|
+
* runtime from the npm package root, not this global directory.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```typescript
|
|
74
|
+
* const dir = getCleoSchemasDir();
|
|
75
|
+
* ```
|
|
29
76
|
*/
|
|
30
77
|
export declare function getCleoSchemasDir(): string;
|
|
31
78
|
/**
|
|
32
79
|
* Get the global CLEO docs directory.
|
|
80
|
+
*
|
|
81
|
+
* @returns Absolute path to the docs directory under CLEO home
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* Returns `{cleoHome}/docs` for global documentation storage.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* const dir = getCleoDocsDir();
|
|
89
|
+
* ```
|
|
33
90
|
*/
|
|
34
91
|
export declare function getCleoDocsDir(): string;
|
|
35
92
|
/**
|
|
36
93
|
* Get the project CLEO data directory (relative).
|
|
37
94
|
* Respects CLEO_DIR env var, defaults to ".cleo".
|
|
95
|
+
*
|
|
96
|
+
* @param cwd - Optional working directory; when provided, returns absolute path
|
|
97
|
+
* @returns Relative or absolute path to the project's .cleo directory
|
|
98
|
+
*
|
|
99
|
+
* @remarks
|
|
100
|
+
* If `cwd` is provided, delegates to `getCleoDirAbsolute`. Otherwise returns
|
|
101
|
+
* the `CLEO_DIR` env var or the default ".cleo" relative path.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* const rel = getCleoDir(); // ".cleo"
|
|
106
|
+
* const abs = getCleoDir('/project'); // "/project/.cleo"
|
|
107
|
+
* ```
|
|
38
108
|
*/
|
|
39
109
|
export declare function getCleoDir(cwd?: string): string;
|
|
40
110
|
/**
|
|
41
111
|
* Get the absolute path to the project CLEO directory.
|
|
112
|
+
*
|
|
113
|
+
* @param cwd - Optional working directory to resolve against; defaults to process.cwd()
|
|
114
|
+
* @returns Absolute path to the project's .cleo directory
|
|
115
|
+
*
|
|
116
|
+
* @remarks
|
|
117
|
+
* If CLEO_DIR is already absolute, returns it directly. Otherwise resolves
|
|
118
|
+
* it relative to the provided cwd or process.cwd().
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* const dir = getCleoDirAbsolute('/my/project'); // "/my/project/.cleo"
|
|
123
|
+
* ```
|
|
42
124
|
*/
|
|
43
125
|
export declare function getCleoDirAbsolute(cwd?: string): string;
|
|
44
126
|
/**
|
|
45
127
|
* Get the project root from the CLEO directory.
|
|
46
128
|
* Respects CLEO_ROOT env var, then derives from CLEO_DIR.
|
|
47
129
|
* If CLEO_DIR is ".cleo", the project root is its parent.
|
|
130
|
+
*
|
|
131
|
+
* @param cwd - Optional working directory hint
|
|
132
|
+
* @returns Absolute path to the project root
|
|
133
|
+
*
|
|
134
|
+
* @remarks
|
|
135
|
+
* Resolution order: CLEO_ROOT env var (if no cwd), parent of the resolved
|
|
136
|
+
* .cleo directory (if it ends with /.cleo), or the cwd/process.cwd() fallback.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```typescript
|
|
140
|
+
* const root = getProjectRoot(); // "/home/user/projects/myapp"
|
|
141
|
+
* ```
|
|
48
142
|
*/
|
|
49
143
|
export declare function getProjectRoot(cwd?: string): string;
|
|
50
144
|
/**
|
|
51
145
|
* Resolve a project-relative path to an absolute path.
|
|
146
|
+
*
|
|
147
|
+
* @param relativePath - Path to resolve (relative, absolute, or tilde-prefixed)
|
|
148
|
+
* @param cwd - Optional working directory for project root resolution
|
|
149
|
+
* @returns Absolute resolved path
|
|
150
|
+
*
|
|
151
|
+
* @remarks
|
|
152
|
+
* Returns absolute paths unchanged. Expands leading tilde (`~/`) to the user's
|
|
153
|
+
* home directory. Resolves other relative paths against the project root.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```typescript
|
|
157
|
+
* resolveProjectPath('src/index.ts'); // "/project/src/index.ts"
|
|
158
|
+
* resolveProjectPath('~/notes.md'); // "/home/user/notes.md"
|
|
159
|
+
* resolveProjectPath('/absolute/path'); // "/absolute/path"
|
|
160
|
+
* ```
|
|
52
161
|
*/
|
|
53
162
|
export declare function resolveProjectPath(relativePath: string, cwd?: string): string;
|
|
54
163
|
/**
|
|
@@ -63,32 +172,109 @@ export declare function resolveProjectPath(relativePath: string, cwd?: string):
|
|
|
63
172
|
* // NEW (correct):
|
|
64
173
|
* const accessor = await getAccessor(cwd);
|
|
65
174
|
* const data = await accessor.queryTasks({});
|
|
175
|
+
*
|
|
176
|
+
* @param cwd - Optional working directory for path resolution
|
|
177
|
+
* @returns Absolute path to the tasks.db file
|
|
178
|
+
*
|
|
179
|
+
* @remarks
|
|
180
|
+
* Returns `{cleoDir}/tasks.db`. Prefer `getAccessor()` for actual data access.
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```typescript
|
|
184
|
+
* const dbPath = getTaskPath('/project');
|
|
185
|
+
* ```
|
|
66
186
|
*/
|
|
67
187
|
export declare function getTaskPath(cwd?: string): string;
|
|
68
188
|
/**
|
|
69
189
|
* Get the path to the project's config.json file.
|
|
190
|
+
*
|
|
191
|
+
* @param cwd - Optional working directory for path resolution
|
|
192
|
+
* @returns Absolute path to the project config.json
|
|
193
|
+
*
|
|
194
|
+
* @remarks
|
|
195
|
+
* Returns `{cleoDir}/config.json`.
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```typescript
|
|
199
|
+
* const configPath = getConfigPath('/project');
|
|
200
|
+
* ```
|
|
70
201
|
*/
|
|
71
202
|
export declare function getConfigPath(cwd?: string): string;
|
|
72
203
|
/**
|
|
73
204
|
* Get the path to the project's sessions.json file.
|
|
205
|
+
*
|
|
206
|
+
* @param cwd - Optional working directory for path resolution
|
|
207
|
+
* @returns Absolute path to the sessions.json file
|
|
208
|
+
*
|
|
209
|
+
* @remarks
|
|
210
|
+
* Returns `{cleoDir}/sessions.json`.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```typescript
|
|
214
|
+
* const sessionsPath = getSessionsPath('/project');
|
|
215
|
+
* ```
|
|
74
216
|
*/
|
|
75
217
|
export declare function getSessionsPath(cwd?: string): string;
|
|
76
218
|
/**
|
|
77
219
|
* Get the path to the project's archive file.
|
|
220
|
+
*
|
|
221
|
+
* @param cwd - Optional working directory for path resolution
|
|
222
|
+
* @returns Absolute path to the tasks-archive.json file
|
|
223
|
+
*
|
|
224
|
+
* @remarks
|
|
225
|
+
* Returns `{cleoDir}/tasks-archive.json` where archived tasks are stored.
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```typescript
|
|
229
|
+
* const archivePath = getArchivePath('/project');
|
|
230
|
+
* ```
|
|
78
231
|
*/
|
|
79
232
|
export declare function getArchivePath(cwd?: string): string;
|
|
80
233
|
/**
|
|
81
234
|
* Get the path to the project's log file.
|
|
82
235
|
* Canonical structured runtime log path (pino).
|
|
236
|
+
*
|
|
237
|
+
* @param cwd - Optional working directory for path resolution
|
|
238
|
+
* @returns Absolute path to the cleo.log file
|
|
239
|
+
*
|
|
240
|
+
* @remarks
|
|
241
|
+
* Returns `{cleoDir}/logs/cleo.log`. Used by pino for structured JSON logging.
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* ```typescript
|
|
245
|
+
* const logPath = getLogPath('/project');
|
|
246
|
+
* ```
|
|
247
|
+
*
|
|
83
248
|
* @task T4644
|
|
84
249
|
*/
|
|
85
250
|
export declare function getLogPath(cwd?: string): string;
|
|
86
251
|
/**
|
|
87
252
|
* Get the backup directory for operational backups.
|
|
253
|
+
*
|
|
254
|
+
* @param cwd - Optional working directory for path resolution
|
|
255
|
+
* @returns Absolute path to the operational backups directory
|
|
256
|
+
*
|
|
257
|
+
* @remarks
|
|
258
|
+
* Returns `{cleoDir}/backups/operational`.
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* ```typescript
|
|
262
|
+
* const backupDir = getBackupDir('/project');
|
|
263
|
+
* ```
|
|
88
264
|
*/
|
|
89
265
|
export declare function getBackupDir(cwd?: string): string;
|
|
90
266
|
/**
|
|
91
267
|
* Get the global config file path.
|
|
268
|
+
*
|
|
269
|
+
* @returns Absolute path to the global config.json in CLEO home
|
|
270
|
+
*
|
|
271
|
+
* @remarks
|
|
272
|
+
* Returns `{cleoHome}/config.json` for global CLEO configuration.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```typescript
|
|
276
|
+
* const globalConfig = getGlobalConfigPath();
|
|
277
|
+
* ```
|
|
92
278
|
*/
|
|
93
279
|
export declare function getGlobalConfigPath(): string;
|
|
94
280
|
/**
|
|
@@ -100,11 +286,36 @@ export declare function getGlobalConfigPath(): string;
|
|
|
100
286
|
* 3. config.directories.agentOutputs (deprecated)
|
|
101
287
|
* 4. Default: '.cleo/agent-outputs'
|
|
102
288
|
*
|
|
289
|
+
* @param cwd - Optional working directory for path resolution
|
|
290
|
+
* @returns Relative or absolute path to the agent outputs directory
|
|
291
|
+
*
|
|
292
|
+
* @remarks
|
|
293
|
+
* Checks config fields in priority order: `agentOutputs.directory`, `research.outputDir`,
|
|
294
|
+
* `directories.agentOutputs`. Falls back to `.cleo/agent-outputs`.
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* ```typescript
|
|
298
|
+
* const dir = getAgentOutputsDir('/project');
|
|
299
|
+
* ```
|
|
300
|
+
*
|
|
103
301
|
* @task T4700
|
|
104
302
|
*/
|
|
105
303
|
export declare function getAgentOutputsDir(cwd?: string): string;
|
|
106
304
|
/**
|
|
107
305
|
* Get the absolute path to the agent outputs directory.
|
|
306
|
+
*
|
|
307
|
+
* @param cwd - Optional working directory for path resolution
|
|
308
|
+
* @returns Absolute path to the agent outputs directory
|
|
309
|
+
*
|
|
310
|
+
* @remarks
|
|
311
|
+
* Resolves the output of `getAgentOutputsDir()` against the project root
|
|
312
|
+
* if it is not already absolute.
|
|
313
|
+
*
|
|
314
|
+
* @example
|
|
315
|
+
* ```typescript
|
|
316
|
+
* const absDir = getAgentOutputsAbsolute('/project');
|
|
317
|
+
* ```
|
|
318
|
+
*
|
|
108
319
|
* @task T4700
|
|
109
320
|
*/
|
|
110
321
|
export declare function getAgentOutputsAbsolute(cwd?: string): string;
|
|
@@ -114,35 +325,113 @@ export declare function getAgentOutputsAbsolute(cwd?: string): string;
|
|
|
114
325
|
* Checks config.agentOutputs.manifestFile for custom filename,
|
|
115
326
|
* defaults to 'MANIFEST.jsonl'.
|
|
116
327
|
*
|
|
328
|
+
* @param cwd - Optional working directory for path resolution
|
|
329
|
+
* @returns Absolute path to the MANIFEST.jsonl file
|
|
330
|
+
*
|
|
331
|
+
* @remarks
|
|
332
|
+
* Checks `config.agentOutputs.manifestFile` for a custom filename,
|
|
333
|
+
* defaults to `MANIFEST.jsonl` in the agent outputs directory.
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* ```typescript
|
|
337
|
+
* const manifestPath = getManifestPath('/project');
|
|
338
|
+
* ```
|
|
339
|
+
*
|
|
117
340
|
* @task T4700
|
|
118
341
|
*/
|
|
119
342
|
export declare function getManifestPath(cwd?: string): string;
|
|
120
343
|
/**
|
|
121
344
|
* Get the absolute path to the MANIFEST.archive.jsonl file.
|
|
345
|
+
*
|
|
346
|
+
* @param cwd - Optional working directory for path resolution
|
|
347
|
+
* @returns Absolute path to the MANIFEST.archive.jsonl file
|
|
348
|
+
*
|
|
349
|
+
* @remarks
|
|
350
|
+
* Returns the archive manifest path in the agent outputs directory.
|
|
351
|
+
*
|
|
352
|
+
* @example
|
|
353
|
+
* ```typescript
|
|
354
|
+
* const archivePath = getManifestArchivePath('/project');
|
|
355
|
+
* ```
|
|
356
|
+
*
|
|
122
357
|
* @task T4700
|
|
123
358
|
*/
|
|
124
359
|
export declare function getManifestArchivePath(cwd?: string): string;
|
|
125
360
|
/**
|
|
126
361
|
* Check if a path is absolute (POSIX or Windows).
|
|
362
|
+
*
|
|
363
|
+
* @param path - Filesystem path to check
|
|
364
|
+
* @returns True if the path is absolute on any supported OS
|
|
365
|
+
*
|
|
366
|
+
* @remarks
|
|
367
|
+
* Recognizes POSIX absolute paths (`/...`), Windows drive letters (`C:\...`),
|
|
368
|
+
* and UNC paths (`\\...`).
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* ```typescript
|
|
372
|
+
* isAbsolutePath('/usr/bin'); // true
|
|
373
|
+
* isAbsolutePath('C:\\Users'); // true
|
|
374
|
+
* isAbsolutePath('./relative'); // false
|
|
375
|
+
* ```
|
|
127
376
|
*/
|
|
128
377
|
export declare function isAbsolutePath(path: string): boolean;
|
|
129
378
|
/**
|
|
130
379
|
* Get the OS log directory for CLEO global logs.
|
|
131
380
|
* Linux: ~/.local/state/cleo | macOS: ~/Library/Logs/cleo | Windows: %LOCALAPPDATA%\cleo\Log
|
|
381
|
+
*
|
|
382
|
+
* @returns Absolute path to the OS-appropriate log directory
|
|
383
|
+
*
|
|
384
|
+
* @remarks
|
|
385
|
+
* Delegates to `getPlatformPaths().log` for XDG-compliant resolution.
|
|
386
|
+
*
|
|
387
|
+
* @example
|
|
388
|
+
* ```typescript
|
|
389
|
+
* const logDir = getCleoLogDir();
|
|
390
|
+
* ```
|
|
132
391
|
*/
|
|
133
392
|
export declare function getCleoLogDir(): string;
|
|
134
393
|
/**
|
|
135
394
|
* Get the OS cache directory for CLEO.
|
|
136
395
|
* Linux: ~/.cache/cleo | macOS: ~/Library/Caches/cleo | Windows: %LOCALAPPDATA%\cleo\Cache
|
|
396
|
+
*
|
|
397
|
+
* @returns Absolute path to the OS-appropriate cache directory
|
|
398
|
+
*
|
|
399
|
+
* @remarks
|
|
400
|
+
* Delegates to `getPlatformPaths().cache` for XDG-compliant resolution.
|
|
401
|
+
*
|
|
402
|
+
* @example
|
|
403
|
+
* ```typescript
|
|
404
|
+
* const cacheDir = getCleoCacheDir();
|
|
405
|
+
* ```
|
|
137
406
|
*/
|
|
138
407
|
export declare function getCleoCacheDir(): string;
|
|
139
408
|
/**
|
|
140
409
|
* Get the OS temp directory for CLEO ephemeral files.
|
|
410
|
+
*
|
|
411
|
+
* @returns Absolute path to the OS-appropriate temp directory
|
|
412
|
+
*
|
|
413
|
+
* @remarks
|
|
414
|
+
* Delegates to `getPlatformPaths().temp` for platform-specific resolution.
|
|
415
|
+
*
|
|
416
|
+
* @example
|
|
417
|
+
* ```typescript
|
|
418
|
+
* const tempDir = getCleoTempDir();
|
|
419
|
+
* ```
|
|
141
420
|
*/
|
|
142
421
|
export declare function getCleoTempDir(): string;
|
|
143
422
|
/**
|
|
144
423
|
* Get the OS config directory for CLEO.
|
|
145
424
|
* Linux: ~/.config/cleo | macOS: ~/Library/Preferences/cleo | Windows: %APPDATA%\cleo\Config
|
|
425
|
+
*
|
|
426
|
+
* @returns Absolute path to the OS-appropriate config directory
|
|
427
|
+
*
|
|
428
|
+
* @remarks
|
|
429
|
+
* Delegates to `getPlatformPaths().config` for XDG-compliant resolution.
|
|
430
|
+
*
|
|
431
|
+
* @example
|
|
432
|
+
* ```typescript
|
|
433
|
+
* const configDir = getCleoConfigDir();
|
|
434
|
+
* ```
|
|
146
435
|
*/
|
|
147
436
|
export declare function getCleoConfigDir(): string;
|
|
148
437
|
/**
|
|
@@ -154,23 +443,67 @@ export declare function getCleoConfigDir(): string;
|
|
|
154
443
|
* Linux: ~/.local/share/cleo/templates
|
|
155
444
|
* macOS: ~/Library/Application Support/cleo/templates
|
|
156
445
|
* Windows: ~/AppData/Local/cleo/Data/templates (approximate)
|
|
446
|
+
*
|
|
447
|
+
* @returns Tilde-prefixed path like "~/.local/share/cleo/templates"
|
|
448
|
+
*
|
|
449
|
+
* @remarks
|
|
450
|
+
* Returns the absolute path if the home directory is not a prefix
|
|
451
|
+
* (unlikely but handled). Always uses forward slashes after the tilde
|
|
452
|
+
* for cross-platform compatibility in `@`-reference resolution.
|
|
453
|
+
*
|
|
454
|
+
* @example
|
|
455
|
+
* ```typescript
|
|
456
|
+
* const tildePath = getCleoTemplatesTildePath();
|
|
457
|
+
* // "~/.local/share/cleo/templates"
|
|
458
|
+
* ```
|
|
157
459
|
*/
|
|
158
460
|
export declare function getCleoTemplatesTildePath(): string;
|
|
159
461
|
/**
|
|
160
462
|
* Get the global agents hub directory.
|
|
161
463
|
* Respects AGENTS_HOME env var, defaults to ~/.agents.
|
|
464
|
+
*
|
|
465
|
+
* @returns Absolute path to the agents hub directory
|
|
466
|
+
*
|
|
467
|
+
* @remarks
|
|
468
|
+
* Returns `AGENTS_HOME` env var if set, otherwise `~/.agents`.
|
|
469
|
+
*
|
|
470
|
+
* @example
|
|
471
|
+
* ```typescript
|
|
472
|
+
* const agentsHome = getAgentsHome(); // "/home/user/.agents"
|
|
473
|
+
* ```
|
|
162
474
|
*/
|
|
163
475
|
export declare function getAgentsHome(): string;
|
|
164
476
|
/**
|
|
165
477
|
* Get the Claude Code agents directory (~/.claude/agents by default).
|
|
478
|
+
*
|
|
479
|
+
* @returns Absolute path to the Claude agents directory
|
|
480
|
+
*
|
|
481
|
+
* @remarks
|
|
482
|
+
* Respects `CLAUDE_HOME` env var for the parent directory.
|
|
483
|
+
*
|
|
484
|
+
* @example
|
|
485
|
+
* ```typescript
|
|
486
|
+
* const dir = getClaudeAgentsDir();
|
|
487
|
+
* ```
|
|
488
|
+
*
|
|
166
489
|
* @deprecated Use AdapterPathProvider.getAgentInstallDir() from the active adapter instead.
|
|
167
490
|
*/
|
|
168
491
|
export declare function getClaudeAgentsDir(): string;
|
|
169
492
|
/**
|
|
170
493
|
* Get the claude-mem SQLite database path.
|
|
171
|
-
*
|
|
172
|
-
*
|
|
494
|
+
*
|
|
495
|
+
* @returns Absolute path to the claude-mem.db file
|
|
496
|
+
*
|
|
497
|
+
* @remarks
|
|
498
|
+
* Respects `CLAUDE_MEM_DB` env var, defaults to `~/.claude-mem/claude-mem.db`.
|
|
173
499
|
* This is a third-party tool path; homedir() is correct here (no env-paths standard).
|
|
500
|
+
*
|
|
501
|
+
* @example
|
|
502
|
+
* ```typescript
|
|
503
|
+
* const dbPath = getClaudeMemDbPath();
|
|
504
|
+
* ```
|
|
505
|
+
*
|
|
506
|
+
* @deprecated Use AdapterPathProvider.getMemoryDbPath() from the active adapter instead.
|
|
174
507
|
*/
|
|
175
508
|
export declare function getClaudeMemDbPath(): string;
|
|
176
509
|
//# sourceMappingURL=paths.d.ts.map
|
package/dist/paths.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAIlE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAK/C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CASnD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,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,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CASlD;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAG3C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* - hybrid: Can run either way (prefers CLI when available)
|
|
11
11
|
*
|
|
12
12
|
* preferredChannel encodes token-efficiency routing (from routing-table.ts):
|
|
13
|
-
* - mcp: Lower overhead (no CLI startup), direct DB access, structured JSON
|
|
14
13
|
* - cli: Human-readable output, shell integration, interactive prompts
|
|
15
14
|
* - either: No significant difference or context-dependent
|
|
16
15
|
*
|
|
@@ -29,9 +28,10 @@ export type ExecutionMode = 'native' | 'cli' | 'hybrid';
|
|
|
29
28
|
export type GatewayType = 'query' | 'mutate';
|
|
30
29
|
/**
|
|
31
30
|
* Preferred communication channel for token efficiency.
|
|
32
|
-
*
|
|
31
|
+
* CLI is the only dispatch channel.
|
|
32
|
+
* @task T5240
|
|
33
33
|
*/
|
|
34
|
-
export type PreferredChannel = '
|
|
34
|
+
export type PreferredChannel = 'cli' | 'either';
|
|
35
35
|
export interface OperationCapability {
|
|
36
36
|
domain: string;
|
|
37
37
|
operation: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-matrix.d.ts","sourceRoot":"","sources":["../../src/routing/capability-matrix.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"capability-matrix.d.ts","sourceRoot":"","sources":["../../src/routing/capability-matrix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE7C;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEhD,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,gBAAgB,EAAE,gBAAgB,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CACb,MAAM,EACN;QACE,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,GAAG,EAAE,MAAM,EAAE,CAAC;QACd,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CACF,CAAC;CACH;AAs9CD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,WAAW,GACnB,aAAa,GAAG,SAAS,CAK3B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAG/F;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW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