@cleocode/core 2026.3.38 → 2026.3.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +584 -0
- package/dist/index.js +4045 -15068
- package/dist/index.js.map +4 -4
- package/package.json +10 -2
- package/src/__tests__/audit-prune.test.d.ts +1 -1
- package/src/__tests__/audit-prune.test.js.map +1 -1
- package/src/__tests__/audit-prune.test.ts +1 -1
- package/src/__tests__/caamp-skill-install.test.d.ts +1 -1
- package/src/__tests__/cli-mcp-parity.integration.test.d.ts +1 -1
- package/src/__tests__/cli-parity.test.d.ts +1 -1
- package/src/__tests__/cli-parity.test.js +1 -1
- package/src/__tests__/cli-parity.test.js.map +1 -1
- package/src/__tests__/cli-parity.test.ts +1 -1
- package/src/__tests__/config.test.d.ts +1 -1
- package/src/__tests__/core-parity.test.d.ts +1 -1
- package/src/__tests__/error-catalog.test.d.ts +1 -1
- package/src/__tests__/error-catalog.test.js +1 -1
- package/src/__tests__/error-catalog.test.js.map +1 -1
- package/src/__tests__/error-catalog.test.ts +1 -1
- package/src/__tests__/golden-parity.test.d.ts +1 -1
- package/src/__tests__/hooks.test.d.ts +1 -1
- package/src/__tests__/hooks.test.js +15 -7
- package/src/__tests__/hooks.test.js.map +1 -1
- package/src/__tests__/hooks.test.ts +15 -7
- package/src/__tests__/human-output.test.d.ts +1 -1
- package/src/__tests__/human-output.test.js +1 -1
- package/src/__tests__/human-output.test.js.map +1 -1
- package/src/__tests__/human-output.test.ts +1 -1
- package/src/__tests__/index-api-compat.test.d.ts +1 -1
- package/src/__tests__/init-e2e.test.d.ts +1 -1
- package/src/__tests__/init-e2e.test.js +6 -0
- package/src/__tests__/init-e2e.test.js.map +1 -1
- package/src/__tests__/init-e2e.test.ts +7 -0
- package/src/__tests__/injection-chain.test.d.ts +1 -1
- package/src/__tests__/injection-mvi-tiers.test.d.ts +1 -1
- package/src/__tests__/injection-shared.test.d.ts +1 -1
- package/src/__tests__/lafs-conformance.test.d.ts +1 -1
- package/src/__tests__/logger.test.d.ts +1 -1
- package/src/__tests__/mcp-install-verify.test.d.ts +1 -1
- package/src/__tests__/paths.test.d.ts +1 -1
- package/src/__tests__/project-info.test.d.ts +1 -1
- package/src/__tests__/rcsd-pipeline-e2e.test.d.ts +1 -1
- package/src/__tests__/remote.test.d.ts +1 -1
- package/src/__tests__/scaffold.test.d.ts +1 -1
- package/src/__tests__/schema-management.test.d.ts +1 -1
- package/src/__tests__/schema.test.d.ts +1 -1
- package/src/__tests__/schema.test.js +4 -2
- package/src/__tests__/schema.test.js.map +1 -1
- package/src/__tests__/schema.test.ts +5 -2
- package/src/__tests__/sharing.test.d.ts +1 -1
- package/src/__tests__/snapshot.test.d.ts +1 -1
- package/src/__tests__/upgrade.test.d.ts +1 -1
- package/src/adapters/__tests__/discovery.test.d.ts +1 -1
- package/src/adapters/__tests__/manager.test.d.ts +1 -1
- package/src/adapters/adapter-registry.ts +1 -3
- package/src/admin/export-tasks.ts +5 -2
- package/src/admin/export.ts +1 -1
- package/src/admin/import-tasks.ts +1 -1
- package/src/admin/import.ts +3 -2
- package/src/admin/sync.ts +1 -1
- package/src/adrs/validate.ts +3 -1
- package/src/bootstrap.ts +1 -4
- package/src/caamp/adapter.ts +11 -12
- package/src/cleo.ts +169 -87
- package/src/compliance/__tests__/sync.test.d.ts +1 -1
- package/src/compliance/index.ts +1 -1
- package/src/config/build-config.ts +16 -16
- package/src/config.ts +1 -1
- package/src/error-catalog.ts +1 -1
- package/src/error-registry.ts +1 -1
- package/src/errors.ts +1 -1
- package/src/hooks/__tests__/provider-hooks.test.d.ts +1 -1
- package/src/hooks/__tests__/registry.test.d.ts +1 -1
- package/src/hooks/handlers/__tests__/error-hooks.test.d.ts +1 -1
- package/src/hooks/handlers/__tests__/file-hooks.test.d.ts +1 -1
- package/src/hooks/handlers/__tests__/mcp-hooks.test.d.ts +1 -1
- package/src/hooks/handlers/__tests__/session-hooks.test.d.ts +1 -1
- package/src/hooks/handlers/__tests__/task-hooks.test.d.ts +1 -1
- package/src/hooks/provider-hooks.ts +1 -1
- package/src/hooks.ts +1 -1
- package/src/index.ts +75 -98
- package/src/init.ts +2 -2
- package/src/inject/index.ts +1 -1
- package/src/internal.ts +269 -262
- package/src/issue/create.ts +1 -1
- package/src/json-schema-validator.ts +9 -5
- package/src/lifecycle/__tests__/chain-store.test.d.ts +1 -1
- package/src/lifecycle/__tests__/chain-store.test.js.map +1 -1
- package/src/lifecycle/__tests__/chain-store.test.ts +1 -1
- package/src/lifecycle/__tests__/consolidate-rcasd.test.d.ts +1 -1
- package/src/lifecycle/__tests__/default-chain.test.d.ts +1 -1
- package/src/lifecycle/__tests__/frontmatter.test.d.ts +1 -1
- package/src/lifecycle/__tests__/lifecycle.test.d.ts +1 -1
- package/src/lifecycle/__tests__/pipeline.integration.test.d.ts +1 -1
- package/src/lifecycle/__tests__/pipeline.integration.test.js +78 -78
- package/src/lifecycle/__tests__/pipeline.integration.test.js.map +1 -1
- package/src/lifecycle/__tests__/pipeline.integration.test.ts +82 -78
- package/src/lifecycle/__tests__/rcasd-paths.test.d.ts +1 -1
- package/src/lifecycle/__tests__/resume-schema-contract.test.d.ts +1 -1
- package/src/lifecycle/__tests__/resume-schema-contract.test.js +13 -4
- package/src/lifecycle/__tests__/resume-schema-contract.test.js.map +1 -1
- package/src/lifecycle/__tests__/resume-schema-contract.test.ts +19 -10
- package/src/lifecycle/__tests__/stage-record-provenance.integration.test.d.ts +1 -1
- package/src/lifecycle/__tests__/tessera-engine.test.d.ts +1 -1
- package/src/lifecycle/chain-composition.ts +1 -7
- package/src/lifecycle/chain-store.ts +1 -1
- package/src/lifecycle/evidence.ts +1 -1
- package/src/lifecycle/index.ts +2 -2
- package/src/lifecycle/pipeline.ts +3 -3
- package/src/lifecycle/rcasd-index.ts +1 -1
- package/src/lifecycle/tessera-engine.ts +2 -1
- package/src/memory/__tests__/auto-extract.test.d.ts +1 -1
- package/src/memory/__tests__/auto-extract.test.js +0 -1
- package/src/memory/__tests__/auto-extract.test.js.map +1 -1
- package/src/memory/__tests__/auto-extract.test.ts +2 -2
- package/src/memory/__tests__/brain-embedding.test.d.ts +1 -1
- package/src/memory/__tests__/brain-links.test.d.ts +1 -1
- package/src/memory/__tests__/brain-migration.test.d.ts +1 -1
- package/src/memory/__tests__/brain-retrieval.test.d.ts +1 -1
- package/src/memory/__tests__/brain-search.test.d.ts +1 -1
- package/src/memory/__tests__/claude-mem-migration.test.d.ts +1 -1
- package/src/memory/__tests__/decisions.test.d.ts +1 -1
- package/src/memory/__tests__/engine-compat.test.d.ts +1 -1
- package/src/memory/__tests__/memory-bridge.test.d.ts +1 -1
- package/src/memory/__tests__/pipeline-manifest-sqlite.test.d.ts +1 -1
- package/src/memory/__tests__/session-memory.test.d.ts +1 -1
- package/src/memory/brain-reasoning.ts +1 -1
- package/src/memory/brain-retrieval.ts +1 -1
- package/src/memory/brain-search.ts +1 -1
- package/src/memory/claude-mem-migration.ts +13 -4
- package/src/memory/engine-compat.ts +4 -11
- package/src/memory/index.ts +3 -3
- package/src/memory/memory-bridge.ts +18 -10
- package/src/memory/pipeline-manifest-sqlite.ts +2 -2
- package/src/metrics/__tests__/model-provider-registry.test.d.ts +1 -1
- package/src/metrics/__tests__/provider-detection.test.d.ts +1 -1
- package/src/metrics/token-service.ts +1 -1
- package/src/migration/__tests__/checksum.test.d.ts +1 -1
- package/src/migration/__tests__/logger.test.d.ts +1 -1
- package/src/migration/__tests__/migration-failure.integration.test.d.ts +1 -1
- package/src/migration/__tests__/migration.test.d.ts +1 -1
- package/src/migration/__tests__/state.test.d.ts +1 -1
- package/src/migration/__tests__/validate.test.d.ts +1 -1
- package/src/migration/index.ts +1 -1
- package/src/nexus/__tests__/deps.test.d.ts +1 -1
- package/src/nexus/__tests__/deps.test.js.map +1 -1
- package/src/nexus/__tests__/deps.test.ts +2 -10
- package/src/nexus/__tests__/permissions.test.d.ts +1 -1
- package/src/nexus/__tests__/query.test.d.ts +1 -1
- package/src/nexus/__tests__/reconcile.test.d.ts +1 -1
- package/src/nexus/__tests__/reconcile.test.js +1 -1
- package/src/nexus/__tests__/reconcile.test.js.map +1 -1
- package/src/nexus/__tests__/reconcile.test.ts +1 -1
- package/src/nexus/__tests__/registry.test.d.ts +1 -1
- package/src/nexus/__tests__/registry.test.js.map +1 -1
- package/src/nexus/__tests__/registry.test.ts +2 -9
- package/src/nexus/deps.ts +2 -2
- package/src/nexus/migrate-json-to-sqlite.ts +1 -1
- package/src/nexus/query.ts +2 -2
- package/src/nexus/registry.ts +4 -4
- package/src/observability/__tests__/index.test.d.ts +1 -1
- package/src/observability/__tests__/log-filter.test.d.ts +1 -1
- package/src/observability/__tests__/log-parser.test.d.ts +1 -1
- package/src/observability/__tests__/log-reader.test.d.ts +1 -1
- package/src/orchestration/__tests__/autonomous-spec.test.d.ts +1 -1
- package/src/orchestration/__tests__/autonomous-spec.test.js +1 -1
- package/src/orchestration/__tests__/autonomous-spec.test.js.map +1 -1
- package/src/orchestration/__tests__/autonomous-spec.test.ts +2 -6
- package/src/orchestration/__tests__/orchestration.test.d.ts +1 -1
- package/src/orchestration/__tests__/orchestration.test.js +1 -1
- package/src/orchestration/__tests__/orchestration.test.js.map +1 -1
- package/src/orchestration/__tests__/orchestration.test.ts +2 -6
- package/src/orchestration/__tests__/protocol-validators.test.d.ts +1 -1
- package/src/orchestration/__tests__/protocol-validators.test.js +1 -1
- package/src/orchestration/__tests__/protocol-validators.test.js.map +1 -1
- package/src/orchestration/__tests__/protocol-validators.test.ts +1 -1
- package/src/orchestration/bootstrap.ts +1 -1
- package/src/orchestration/index.ts +2 -2
- package/src/orchestration/parallel.ts +2 -2
- package/src/orchestration/unblock.ts +1 -1
- package/src/orchestration/waves.ts +1 -1
- package/src/output.ts +2 -2
- package/src/phases/__tests__/deps.test.d.ts +1 -1
- package/src/phases/__tests__/deps.test.js +1 -1
- package/src/phases/__tests__/deps.test.js.map +1 -1
- package/src/phases/__tests__/deps.test.ts +2 -6
- package/src/phases/__tests__/phases.test.d.ts +1 -1
- package/src/phases/__tests__/phases.test.js +1 -1
- package/src/phases/__tests__/phases.test.js.map +1 -1
- package/src/phases/__tests__/phases.test.ts +2 -6
- package/src/phases/deps.ts +2 -2
- package/src/phases/index.ts +34 -6
- package/src/pipeline/phase.ts +1 -1
- package/src/reconciliation/reconciliation-engine.ts +2 -7
- package/src/reconciliation/sync-state.ts +1 -4
- package/src/release/__tests__/artifacts.test.d.ts +1 -1
- package/src/release/__tests__/cancel-release.test.d.ts +1 -1
- package/src/release/__tests__/changelog-writer.test.d.ts +1 -1
- package/src/release/__tests__/push-policy.test.d.ts +1 -1
- package/src/release/__tests__/release.test.d.ts +1 -1
- package/src/release/guards.ts +1 -1
- package/src/release/release-manifest.ts +2 -4
- package/src/remote/index.ts +1 -5
- package/src/scaffold.ts +6 -2
- package/src/security/input-sanitization.ts +1 -1
- package/src/sequence/__tests__/allocate.test.d.ts +1 -1
- package/src/sequence/index.ts +7 -4
- package/src/sessions/__tests__/briefing-blocked.test.d.ts +1 -1
- package/src/sessions/__tests__/briefing.test.d.ts +1 -1
- package/src/sessions/__tests__/briefing.test.js +6 -2
- package/src/sessions/__tests__/briefing.test.js.map +1 -1
- package/src/sessions/__tests__/briefing.test.ts +6 -2
- package/src/sessions/__tests__/handoff-integration.test.d.ts +1 -1
- package/src/sessions/__tests__/handoff-integration.test.js +8 -3
- package/src/sessions/__tests__/handoff-integration.test.js.map +1 -1
- package/src/sessions/__tests__/handoff-integration.test.ts +15 -5
- package/src/sessions/__tests__/handoff.test.d.ts +1 -1
- package/src/sessions/__tests__/handoff.test.js +3 -1
- package/src/sessions/__tests__/handoff.test.js.map +1 -1
- package/src/sessions/__tests__/handoff.test.ts +4 -2
- package/src/sessions/__tests__/index.test.d.ts +1 -1
- package/src/sessions/__tests__/session-cleanup.test.d.ts +1 -1
- package/src/sessions/__tests__/session-cleanup.test.js +4 -2
- package/src/sessions/__tests__/session-cleanup.test.js.map +1 -1
- package/src/sessions/__tests__/session-cleanup.test.ts +5 -3
- package/src/sessions/__tests__/session-edge-cases.test.d.ts +1 -1
- package/src/sessions/__tests__/session-find.test.d.ts +1 -1
- package/src/sessions/__tests__/session-find.test.js.map +1 -1
- package/src/sessions/__tests__/session-find.test.ts +2 -2
- package/src/sessions/__tests__/session-grade.integration.test.d.ts +1 -1
- package/src/sessions/__tests__/session-grade.test.d.ts +1 -1
- package/src/sessions/__tests__/session-memory-bridge.test.d.ts +1 -1
- package/src/sessions/__tests__/sessions.test.d.ts +1 -1
- package/src/sessions/assumptions.ts +1 -1
- package/src/sessions/briefing.ts +2 -2
- package/src/sessions/find.ts +1 -1
- package/src/sessions/handoff.ts +2 -2
- package/src/sessions/index.ts +3 -3
- package/src/sessions/session-cleanup.ts +1 -1
- package/src/sessions/session-drift.ts +3 -6
- package/src/sessions/session-history.ts +1 -1
- package/src/sessions/session-show.ts +2 -2
- package/src/sessions/session-stats.ts +2 -2
- package/src/sessions/session-suspend.ts +2 -2
- package/src/sessions/session-switch.ts +4 -3
- package/src/sessions/types.ts +6 -2
- package/src/signaldock/__tests__/claude-code-transport.test.d.ts +1 -1
- package/src/signaldock/__tests__/factory.test.d.ts +1 -1
- package/src/signaldock/__tests__/signaldock-transport.test.d.ts +1 -1
- package/src/skills/__tests__/discovery.test.d.ts +1 -1
- package/src/skills/__tests__/dispatch.test.d.ts +1 -1
- package/src/skills/__tests__/dispatch.test.js.map +1 -1
- package/src/skills/__tests__/dispatch.test.ts +1 -1
- package/src/skills/__tests__/dynamic-skill-generator.test.d.ts +1 -1
- package/src/skills/__tests__/manifests.test.d.ts +1 -1
- package/src/skills/__tests__/precedence.test.d.ts +1 -1
- package/src/skills/__tests__/routing-table.test.d.ts +1 -1
- package/src/skills/__tests__/skill-paths.test.d.ts +1 -1
- package/src/skills/__tests__/test-utility.test.d.ts +1 -1
- package/src/skills/__tests__/token.test.d.ts +1 -1
- package/src/skills/__tests__/validation.test.d.ts +1 -1
- package/src/skills/__tests__/version.test.d.ts +1 -1
- package/src/skills/discovery.ts +1 -1
- package/src/skills/injection/__tests__/subagent.test.d.ts +1 -1
- package/src/skills/injection/subagent.ts +1 -1
- package/src/skills/manifests/research.ts +1 -2
- package/src/skills/orchestrator/__tests__/spawn-tier.test.d.ts +1 -1
- package/src/skills/orchestrator/__tests__/spawn-tier.test.js +6 -0
- package/src/skills/orchestrator/__tests__/spawn-tier.test.js.map +1 -1
- package/src/skills/orchestrator/__tests__/spawn-tier.test.ts +8 -2
- package/src/skills/orchestrator/spawn.ts +1 -1
- package/src/skills/orchestrator/startup.ts +1 -4
- package/src/skills/orchestrator/validator.ts +1 -1
- package/src/snapshot/index.ts +4 -2
- package/src/spawn/__tests__/adapter-registry.test.d.ts +1 -1
- package/src/spawn/__tests__/adapter-registry.test.js.map +1 -1
- package/src/spawn/__tests__/adapter-registry.test.ts +1 -1
- package/src/spawn/adapter-registry.ts +11 -8
- package/src/stats/__tests__/stats.test.d.ts +1 -1
- package/src/stats/__tests__/stats.test.js +3 -1
- package/src/stats/__tests__/stats.test.js.map +1 -1
- package/src/stats/__tests__/stats.test.ts +4 -4
- package/src/stats/index.ts +3 -3
- package/src/sticky/__tests__/purge.test.d.ts +1 -1
- package/src/sticky/__tests__/purge.test.js.map +1 -1
- package/src/sticky/__tests__/purge.test.ts +1 -4
- package/src/store/__tests__/atomic.test.d.ts +1 -1
- package/src/store/__tests__/backup.test.d.ts +1 -1
- package/src/store/__tests__/brain-accessor-pageindex.test.d.ts +1 -1
- package/src/store/__tests__/brain-accessor.test.d.ts +1 -1
- package/src/store/__tests__/brain-pageindex.test.d.ts +1 -1
- package/src/store/__tests__/brain-schema.test.d.ts +1 -1
- package/src/store/__tests__/brain-vec.test.d.ts +1 -1
- package/src/store/__tests__/brain-vec.test.js +1 -1
- package/src/store/__tests__/brain-vec.test.js.map +1 -1
- package/src/store/__tests__/brain-vec.test.ts +1 -1
- package/src/store/__tests__/collision-detection.test.d.ts +1 -1
- package/src/store/__tests__/collision-detection.test.js +7 -0
- package/src/store/__tests__/collision-detection.test.js.map +1 -1
- package/src/store/__tests__/collision-detection.test.ts +7 -0
- package/src/store/__tests__/data-safety-central.test.d.ts +1 -1
- package/src/store/__tests__/data-safety-central.test.js +51 -17
- package/src/store/__tests__/data-safety-central.test.js.map +1 -1
- package/src/store/__tests__/data-safety-central.test.ts +52 -18
- package/src/store/__tests__/db-helpers.test.d.ts +1 -1
- package/src/store/__tests__/e2e-safety-integration.test.d.ts +1 -1
- package/src/store/__tests__/e2e-safety-integration.test.js +6 -0
- package/src/store/__tests__/e2e-safety-integration.test.js.map +1 -1
- package/src/store/__tests__/e2e-safety-integration.test.ts +7 -3
- package/src/store/__tests__/git-checkpoint.test.d.ts +1 -1
- package/src/store/__tests__/git-checkpoint.test.js.map +1 -1
- package/src/store/__tests__/git-checkpoint.test.ts +12 -3
- package/src/store/__tests__/idempotent-migration.test.d.ts +1 -1
- package/src/store/__tests__/import-logging.test.d.ts +1 -1
- package/src/store/__tests__/import-sort.test.d.ts +1 -1
- package/src/store/__tests__/json.test.d.ts +1 -1
- package/src/store/__tests__/lifecycle-schema-parity.test.d.ts +1 -1
- package/src/store/__tests__/lifecycle-schema-parity.test.js +1 -2
- package/src/store/__tests__/lifecycle-schema-parity.test.js.map +1 -1
- package/src/store/__tests__/lifecycle-schema-parity.test.ts +5 -4
- package/src/store/__tests__/migration-integration.test.d.ts +1 -1
- package/src/store/__tests__/migration-retry.test.d.ts +1 -1
- package/src/store/__tests__/migration-safety.test.d.ts +1 -1
- package/src/store/__tests__/migration-safety.test.js +1 -1
- package/src/store/__tests__/migration-safety.test.js.map +1 -1
- package/src/store/__tests__/migration-safety.test.ts +5 -12
- package/src/store/__tests__/migration-sqlite.test.d.ts +1 -1
- package/src/store/__tests__/performance-safety.test.d.ts +1 -1
- package/src/store/__tests__/performance-safety.test.js +6 -0
- package/src/store/__tests__/performance-safety.test.js.map +1 -1
- package/src/store/__tests__/performance-safety.test.ts +6 -0
- package/src/store/__tests__/project-detect.test.d.ts +1 -1
- package/src/store/__tests__/project-detect.test.js +4 -2
- package/src/store/__tests__/project-detect.test.js.map +1 -1
- package/src/store/__tests__/project-detect.test.ts +4 -2
- package/src/store/__tests__/project-registry.test.d.ts +1 -1
- package/src/store/__tests__/provider.test.d.ts +1 -1
- package/src/store/__tests__/relations.test.d.ts +1 -1
- package/src/store/__tests__/relations.test.js.map +1 -1
- package/src/store/__tests__/relations.test.ts +1 -1
- package/src/store/__tests__/safety-accessor.test.d.ts +1 -1
- package/src/store/__tests__/safety-accessor.test.js +51 -17
- package/src/store/__tests__/safety-accessor.test.js.map +1 -1
- package/src/store/__tests__/safety-accessor.test.ts +52 -19
- package/src/store/__tests__/sequence-validation.test.d.ts +1 -1
- package/src/store/__tests__/sequence-validation.test.js +1 -0
- package/src/store/__tests__/sequence-validation.test.js.map +1 -1
- package/src/store/__tests__/sequence-validation.test.ts +1 -0
- package/src/store/__tests__/session-store.test.d.ts +1 -1
- package/src/store/__tests__/session-store.test.js.map +1 -1
- package/src/store/__tests__/session-store.test.ts +1 -1
- package/src/store/__tests__/sqlite-backup.test.d.ts +1 -1
- package/src/store/__tests__/sqlite-backup.test.js.map +1 -1
- package/src/store/__tests__/sqlite-backup.test.ts +1 -1
- package/src/store/__tests__/sqlite.test.d.ts +1 -1
- package/src/store/__tests__/task-store.test.d.ts +1 -1
- package/src/store/__tests__/task-store.test.js +1 -0
- package/src/store/__tests__/task-store.test.js.map +1 -1
- package/src/store/__tests__/task-store.test.ts +2 -1
- package/src/store/__tests__/test-db-helper.d.ts +24 -15
- package/src/store/__tests__/write-verification.test.d.ts +1 -1
- package/src/store/__tests__/write-verification.test.js +7 -0
- package/src/store/__tests__/write-verification.test.js.map +1 -1
- package/src/store/__tests__/write-verification.test.ts +7 -0
- package/src/store/atomic.ts +1 -1
- package/src/store/backup.ts +1 -1
- package/src/store/brain-sqlite.ts +4 -2
- package/src/store/converters.ts +10 -2
- package/src/store/data-safety-central.ts +1 -1
- package/src/store/data-safety.ts +1 -2
- package/src/store/db-helpers.ts +1 -2
- package/src/store/import-sort.ts +1 -1
- package/src/store/json.ts +1 -1
- package/src/store/lock.ts +1 -1
- package/src/store/migration-sqlite.ts +1 -2
- package/src/store/nexus-sqlite.ts +4 -2
- package/src/store/nexus-validation-schemas.ts +5 -7
- package/src/store/provider.ts +6 -7
- package/src/store/safety-data-accessor.ts +10 -4
- package/src/store/session-store.ts +1 -1
- package/src/store/sqlite-data-accessor.ts +37 -35
- package/src/store/sqlite.ts +5 -6
- package/src/store/status-registry.ts +12 -12
- package/src/store/task-store.ts +2 -2
- package/src/store/validation-schemas.ts +4 -2
- package/src/system/__tests__/cleanup.test.d.ts +1 -1
- package/src/system/__tests__/health.test.d.ts +1 -1
- package/src/system/archive-analytics.ts +1 -1
- package/src/system/health.ts +3 -5
- package/src/system/index.ts +1 -1
- package/src/system/inject-generate.ts +1 -1
- package/src/system/labels.ts +2 -2
- package/src/system/metrics.ts +1 -1
- package/src/system/migrate.ts +1 -1
- package/src/system/safestop.ts +7 -4
- package/src/task-work/__tests__/start-deps.test.d.ts +1 -1
- package/src/task-work/__tests__/start-deps.test.js +1 -1
- package/src/task-work/__tests__/start-deps.test.js.map +1 -1
- package/src/task-work/__tests__/start-deps.test.ts +1 -5
- package/src/task-work/index.ts +8 -8
- package/src/task-work/todowrite-merge.ts +4 -8
- package/src/tasks/__tests__/add.test.d.ts +1 -1
- package/src/tasks/__tests__/add.test.js.map +1 -1
- package/src/tasks/__tests__/add.test.ts +41 -9
- package/src/tasks/__tests__/archive.test.d.ts +1 -1
- package/src/tasks/__tests__/archive.test.js +1 -1
- package/src/tasks/__tests__/archive.test.js.map +1 -1
- package/src/tasks/__tests__/archive.test.ts +2 -6
- package/src/tasks/__tests__/atomicity.test.d.ts +5 -1
- package/src/tasks/__tests__/atomicity.test.d.ts.map +1 -1
- package/src/tasks/__tests__/atomicity.test.js.map +1 -1
- package/src/tasks/__tests__/atomicity.test.ts +2 -1
- package/src/tasks/__tests__/cancel-ops.test.d.ts +1 -1
- package/src/tasks/__tests__/cancel-ops.test.js.map +1 -1
- package/src/tasks/__tests__/cancel-ops.test.ts +1 -1
- package/src/tasks/__tests__/complete-unblocks.test.d.ts +1 -1
- package/src/tasks/__tests__/complete-unblocks.test.js +1 -1
- package/src/tasks/__tests__/complete-unblocks.test.js.map +1 -1
- package/src/tasks/__tests__/complete-unblocks.test.ts +1 -5
- package/src/tasks/__tests__/complete.test.d.ts +1 -1
- package/src/tasks/__tests__/complete.test.js +1 -1
- package/src/tasks/__tests__/complete.test.js.map +1 -1
- package/src/tasks/__tests__/complete.test.ts +1 -5
- package/src/tasks/__tests__/delete.test.d.ts +1 -1
- package/src/tasks/__tests__/delete.test.js +1 -1
- package/src/tasks/__tests__/delete.test.js.map +1 -1
- package/src/tasks/__tests__/delete.test.ts +1 -5
- package/src/tasks/__tests__/dependency-check.test.d.ts +1 -1
- package/src/tasks/__tests__/dependency-check.test.js.map +1 -1
- package/src/tasks/__tests__/dependency-check.test.ts +1 -1
- package/src/tasks/__tests__/deps-ready.test.d.ts +1 -1
- package/src/tasks/__tests__/find.test.d.ts +1 -1
- package/src/tasks/__tests__/find.test.js +1 -1
- package/src/tasks/__tests__/find.test.js.map +1 -1
- package/src/tasks/__tests__/find.test.ts +3 -7
- package/src/tasks/__tests__/graph-ops.test.d.ts +1 -1
- package/src/tasks/__tests__/graph-ops.test.js.map +1 -1
- package/src/tasks/__tests__/graph-ops.test.ts +1 -1
- package/src/tasks/__tests__/hierarchy-policy.test.d.ts +5 -1
- package/src/tasks/__tests__/hierarchy-policy.test.d.ts.map +1 -1
- package/src/tasks/__tests__/hierarchy-policy.test.js +9 -1
- package/src/tasks/__tests__/hierarchy-policy.test.js.map +1 -1
- package/src/tasks/__tests__/hierarchy-policy.test.ts +14 -6
- package/src/tasks/__tests__/hierarchy.test.d.ts +1 -1
- package/src/tasks/__tests__/hierarchy.test.js.map +1 -1
- package/src/tasks/__tests__/hierarchy.test.ts +1 -1
- package/src/tasks/__tests__/id-generator.test.d.ts +1 -1
- package/src/tasks/__tests__/labels.test.d.ts +1 -1
- package/src/tasks/__tests__/labels.test.js +1 -1
- package/src/tasks/__tests__/labels.test.js.map +1 -1
- package/src/tasks/__tests__/labels.test.ts +1 -5
- package/src/tasks/__tests__/list.test.d.ts +1 -1
- package/src/tasks/__tests__/list.test.js +1 -1
- package/src/tasks/__tests__/list.test.js.map +1 -1
- package/src/tasks/__tests__/list.test.ts +1 -5
- package/src/tasks/__tests__/phase-tracking.test.d.ts +1 -1
- package/src/tasks/__tests__/phase-tracking.test.js.map +1 -1
- package/src/tasks/__tests__/phase-tracking.test.ts +1 -1
- package/src/tasks/__tests__/plan-priority.test.d.ts +1 -1
- package/src/tasks/__tests__/priority-normalization.test.d.ts +1 -1
- package/src/tasks/__tests__/relates.test.d.ts +1 -1
- package/src/tasks/__tests__/relates.test.js.map +1 -1
- package/src/tasks/__tests__/relates.test.ts +1 -1
- package/src/tasks/__tests__/show-deps.test.d.ts +1 -1
- package/src/tasks/__tests__/show-deps.test.js +1 -1
- package/src/tasks/__tests__/show-deps.test.js.map +1 -1
- package/src/tasks/__tests__/show-deps.test.ts +1 -5
- package/src/tasks/__tests__/show.test.d.ts +1 -1
- package/src/tasks/__tests__/show.test.js +1 -1
- package/src/tasks/__tests__/show.test.js.map +1 -1
- package/src/tasks/__tests__/show.test.ts +1 -5
- package/src/tasks/__tests__/staleness.test.d.ts +1 -1
- package/src/tasks/__tests__/staleness.test.js.map +1 -1
- package/src/tasks/__tests__/staleness.test.ts +2 -2
- package/src/tasks/__tests__/task-ops-depends.test.d.ts +1 -1
- package/src/tasks/__tests__/task-ops-depends.test.js.map +1 -1
- package/src/tasks/__tests__/task-ops-depends.test.ts +1 -1
- package/src/tasks/__tests__/update.test.d.ts +1 -1
- package/src/tasks/__tests__/update.test.js +1 -1
- package/src/tasks/__tests__/update.test.js.map +1 -1
- package/src/tasks/__tests__/update.test.ts +1 -5
- package/src/tasks/add.ts +15 -9
- package/src/tasks/analyze.ts +1 -1
- package/src/tasks/archive.ts +1 -1
- package/src/tasks/complete.ts +3 -3
- package/src/tasks/delete.ts +3 -3
- package/src/tasks/find.ts +3 -3
- package/src/tasks/hierarchy-policy.ts +1 -2
- package/src/tasks/labels.ts +2 -2
- package/src/tasks/list.ts +3 -3
- package/src/tasks/plan.ts +1 -2
- package/src/tasks/relates.ts +3 -3
- package/src/tasks/reparent.ts +1 -1
- package/src/tasks/show.ts +3 -3
- package/src/tasks/task-ops.ts +15 -10
- package/src/tasks/update.ts +4 -4
- package/src/ui/__tests__/injection-registry.test.d.ts +1 -1
- package/src/upgrade.ts +1 -1
- package/src/validation/__tests__/chain-validation.test.d.ts +1 -1
- package/src/validation/__tests__/chain-validation.test.js.map +1 -1
- package/src/validation/__tests__/chain-validation.test.ts +1 -1
- package/src/validation/__tests__/compliance.test.d.ts +1 -1
- package/src/validation/__tests__/docs-sync.test.d.ts +1 -1
- package/src/validation/__tests__/doctor-gitignore.test.d.ts +1 -1
- package/src/validation/__tests__/doctor-injection.test.d.ts +1 -1
- package/src/validation/__tests__/doctor.test.d.ts +1 -1
- package/src/validation/__tests__/engine.test.d.ts +1 -1
- package/src/validation/__tests__/manifest.test.d.ts +1 -1
- package/src/validation/__tests__/protocol-common.test.d.ts +1 -1
- package/src/validation/__tests__/verification.test.d.ts +1 -1
- package/src/validation/engine.ts +1 -2
- package/src/validation/schema-validator.ts +8 -4
- package/src/validation/validate-ops.ts +7 -6
- package/dist/adapters/adapter-registry.d.ts +0 -29
- package/dist/adapters/adapter-registry.d.ts.map +0 -1
- package/dist/adapters/adapter-registry.js +0 -64
- package/dist/adapters/adapter-registry.js.map +0 -1
- package/dist/adapters/discovery.d.ts +0 -18
- package/dist/adapters/discovery.d.ts.map +0 -1
- package/dist/adapters/discovery.js +0 -83
- package/dist/adapters/discovery.js.map +0 -1
- package/dist/adapters/index.d.ts +0 -10
- package/dist/adapters/index.d.ts.map +0 -1
- package/dist/adapters/index.js +0 -9
- package/dist/adapters/index.js.map +0 -1
- package/dist/adapters/manager.d.ts +0 -81
- package/dist/adapters/manager.d.ts.map +0 -1
- package/dist/adapters/manager.js +0 -260
- package/dist/adapters/manager.js.map +0 -1
- package/dist/admin/export-tasks.d.ts +0 -30
- package/dist/admin/export-tasks.d.ts.map +0 -1
- package/dist/admin/export-tasks.js +0 -171
- package/dist/admin/export-tasks.js.map +0 -1
- package/dist/admin/export.d.ts +0 -28
- package/dist/admin/export.d.ts.map +0 -1
- package/dist/admin/export.js +0 -116
- package/dist/admin/export.js.map +0 -1
- package/dist/admin/help.d.ts +0 -74
- package/dist/admin/help.d.ts.map +0 -1
- package/dist/admin/help.js +0 -106
- package/dist/admin/help.js.map +0 -1
- package/dist/admin/import-tasks.d.ts +0 -43
- package/dist/admin/import-tasks.d.ts.map +0 -1
- package/dist/admin/import-tasks.js +0 -163
- package/dist/admin/import-tasks.js.map +0 -1
- package/dist/admin/import.d.ts +0 -33
- package/dist/admin/import.d.ts.map +0 -1
- package/dist/admin/import.js +0 -129
- package/dist/admin/import.js.map +0 -1
- package/dist/admin/index.d.ts +0 -14
- package/dist/admin/index.d.ts.map +0 -1
- package/dist/admin/index.js +0 -13
- package/dist/admin/index.js.map +0 -1
- package/dist/admin/sync.d.ts +0 -59
- package/dist/admin/sync.d.ts.map +0 -1
- package/dist/admin/sync.js +0 -118
- package/dist/admin/sync.js.map +0 -1
- package/dist/adrs/find.d.ts +0 -24
- package/dist/adrs/find.d.ts.map +0 -1
- package/dist/adrs/find.js +0 -134
- package/dist/adrs/find.js.map +0 -1
- package/dist/adrs/index.d.ts +0 -18
- package/dist/adrs/index.d.ts.map +0 -1
- package/dist/adrs/index.js +0 -15
- package/dist/adrs/index.js.map +0 -1
- package/dist/adrs/link-pipeline.d.ts +0 -35
- package/dist/adrs/link-pipeline.d.ts.map +0 -1
- package/dist/adrs/link-pipeline.js +0 -160
- package/dist/adrs/link-pipeline.js.map +0 -1
- package/dist/adrs/list.d.ts +0 -16
- package/dist/adrs/list.d.ts.map +0 -1
- package/dist/adrs/list.js +0 -43
- package/dist/adrs/list.js.map +0 -1
- package/dist/adrs/parse.d.ts +0 -18
- package/dist/adrs/parse.d.ts.map +0 -1
- package/dist/adrs/parse.js +0 -51
- package/dist/adrs/parse.js.map +0 -1
- package/dist/adrs/show.d.ts +0 -11
- package/dist/adrs/show.d.ts.map +0 -1
- package/dist/adrs/show.js +0 -22
- package/dist/adrs/show.js.map +0 -1
- package/dist/adrs/sync.d.ts +0 -20
- package/dist/adrs/sync.d.ts.map +0 -1
- package/dist/adrs/sync.js +0 -188
- package/dist/adrs/sync.js.map +0 -1
- package/dist/adrs/types.d.ts +0 -67
- package/dist/adrs/types.d.ts.map +0 -1
- package/dist/adrs/types.js +0 -9
- package/dist/adrs/types.js.map +0 -1
- package/dist/adrs/validate.d.ts +0 -24
- package/dist/adrs/validate.d.ts.map +0 -1
- package/dist/adrs/validate.js +0 -57
- package/dist/adrs/validate.js.map +0 -1
- package/dist/audit-prune.d.ts +0 -35
- package/dist/audit-prune.d.ts.map +0 -1
- package/dist/audit-prune.js +0 -94
- package/dist/audit-prune.js.map +0 -1
- package/dist/audit.d.ts +0 -49
- package/dist/audit.d.ts.map +0 -1
- package/dist/audit.js +0 -68
- package/dist/audit.js.map +0 -1
- package/dist/bootstrap.d.ts +0 -44
- package/dist/bootstrap.d.ts.map +0 -1
- package/dist/bootstrap.js +0 -228
- package/dist/bootstrap.js.map +0 -1
- package/dist/caamp/adapter.d.ts +0 -130
- package/dist/caamp/adapter.d.ts.map +0 -1
- package/dist/caamp/adapter.js +0 -437
- package/dist/caamp/adapter.js.map +0 -1
- package/dist/caamp/capability-check.d.ts +0 -27
- package/dist/caamp/capability-check.d.ts.map +0 -1
- package/dist/caamp/capability-check.js +0 -38
- package/dist/caamp/capability-check.js.map +0 -1
- package/dist/caamp/index.d.ts +0 -12
- package/dist/caamp/index.d.ts.map +0 -1
- package/dist/caamp/index.js +0 -23
- package/dist/caamp/index.js.map +0 -1
- package/dist/caamp-init.d.ts +0 -2
- package/dist/caamp-init.d.ts.map +0 -1
- package/dist/caamp-init.js +0 -16
- package/dist/caamp-init.js.map +0 -1
- package/dist/cleo.d.ts +0 -291
- package/dist/cleo.d.ts.map +0 -1
- package/dist/cleo.js +0 -224
- package/dist/cleo.js.map +0 -1
- package/dist/codebase-map/analyzers/architecture.d.ts +0 -7
- package/dist/codebase-map/analyzers/architecture.d.ts.map +0 -1
- package/dist/codebase-map/analyzers/architecture.js +0 -130
- package/dist/codebase-map/analyzers/architecture.js.map +0 -1
- package/dist/codebase-map/analyzers/concerns.d.ts +0 -6
- package/dist/codebase-map/analyzers/concerns.d.ts.map +0 -1
- package/dist/codebase-map/analyzers/concerns.js +0 -122
- package/dist/codebase-map/analyzers/concerns.js.map +0 -1
- package/dist/codebase-map/analyzers/conventions.d.ts +0 -8
- package/dist/codebase-map/analyzers/conventions.d.ts.map +0 -1
- package/dist/codebase-map/analyzers/conventions.js +0 -149
- package/dist/codebase-map/analyzers/conventions.js.map +0 -1
- package/dist/codebase-map/analyzers/integrations.d.ts +0 -7
- package/dist/codebase-map/analyzers/integrations.d.ts.map +0 -1
- package/dist/codebase-map/analyzers/integrations.js +0 -108
- package/dist/codebase-map/analyzers/integrations.js.map +0 -1
- package/dist/codebase-map/analyzers/stack.d.ts +0 -8
- package/dist/codebase-map/analyzers/stack.d.ts.map +0 -1
- package/dist/codebase-map/analyzers/stack.js +0 -117
- package/dist/codebase-map/analyzers/stack.js.map +0 -1
- package/dist/codebase-map/analyzers/structure.d.ts +0 -6
- package/dist/codebase-map/analyzers/structure.d.ts.map +0 -1
- package/dist/codebase-map/analyzers/structure.js +0 -137
- package/dist/codebase-map/analyzers/structure.js.map +0 -1
- package/dist/codebase-map/analyzers/testing.d.ts +0 -8
- package/dist/codebase-map/analyzers/testing.d.ts.map +0 -1
- package/dist/codebase-map/analyzers/testing.js +0 -118
- package/dist/codebase-map/analyzers/testing.js.map +0 -1
- package/dist/codebase-map/index.d.ts +0 -94
- package/dist/codebase-map/index.d.ts.map +0 -1
- package/dist/codebase-map/index.js +0 -57
- package/dist/codebase-map/index.js.map +0 -1
- package/dist/codebase-map/store.d.ts +0 -13
- package/dist/codebase-map/store.d.ts.map +0 -1
- package/dist/codebase-map/store.js +0 -122
- package/dist/codebase-map/store.js.map +0 -1
- package/dist/codebase-map/summary.d.ts +0 -7
- package/dist/codebase-map/summary.d.ts.map +0 -1
- package/dist/codebase-map/summary.js +0 -152
- package/dist/codebase-map/summary.js.map +0 -1
- package/dist/compliance/index.d.ts +0 -38
- package/dist/compliance/index.d.ts.map +0 -1
- package/dist/compliance/index.js +0 -288
- package/dist/compliance/index.js.map +0 -1
- package/dist/compliance/protocol-enforcement.d.ts +0 -106
- package/dist/compliance/protocol-enforcement.d.ts.map +0 -1
- package/dist/compliance/protocol-enforcement.js +0 -332
- package/dist/compliance/protocol-enforcement.js.map +0 -1
- package/dist/compliance/protocol-rules.d.ts +0 -55
- package/dist/compliance/protocol-rules.d.ts.map +0 -1
- package/dist/compliance/protocol-rules.js +0 -786
- package/dist/compliance/protocol-rules.js.map +0 -1
- package/dist/compliance/protocol-types.d.ts +0 -109
- package/dist/compliance/protocol-types.d.ts.map +0 -1
- package/dist/compliance/protocol-types.js +0 -80
- package/dist/compliance/protocol-types.js.map +0 -1
- package/dist/compliance/store.d.ts +0 -19
- package/dist/compliance/store.d.ts.map +0 -1
- package/dist/compliance/store.js +0 -53
- package/dist/compliance/store.js.map +0 -1
- package/dist/config/build-config.d.ts +0 -31
- package/dist/config/build-config.d.ts.map +0 -1
- package/dist/config/build-config.js +0 -29
- package/dist/config/build-config.js.map +0 -1
- package/dist/config.d.ts +0 -53
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -287
- package/dist/config.js.map +0 -1
- package/dist/constants.d.ts +0 -13
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -18
- package/dist/constants.js.map +0 -1
- package/dist/context/index.d.ts +0 -20
- package/dist/context/index.d.ts.map +0 -1
- package/dist/context/index.js +0 -137
- package/dist/context/index.js.map +0 -1
- package/dist/engine-result.d.ts +0 -31
- package/dist/engine-result.d.ts.map +0 -1
- package/dist/engine-result.js +0 -12
- package/dist/engine-result.js.map +0 -1
- package/dist/error-catalog.d.ts +0 -49
- package/dist/error-catalog.d.ts.map +0 -1
- package/dist/error-catalog.js +0 -404
- package/dist/error-catalog.js.map +0 -1
- package/dist/error-registry.d.ts +0 -58
- package/dist/error-registry.d.ts.map +0 -1
- package/dist/error-registry.js +0 -393
- package/dist/error-registry.js.map +0 -1
- package/dist/errors.d.ts +0 -66
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -167
- package/dist/errors.js.map +0 -1
- package/dist/hooks/handlers/error-hooks.d.ts +0 -18
- package/dist/hooks/handlers/error-hooks.d.ts.map +0 -1
- package/dist/hooks/handlers/error-hooks.js +0 -43
- package/dist/hooks/handlers/error-hooks.js.map +0 -1
- package/dist/hooks/handlers/file-hooks.d.ts +0 -20
- package/dist/hooks/handlers/file-hooks.d.ts.map +0 -1
- package/dist/hooks/handlers/file-hooks.js +0 -80
- package/dist/hooks/handlers/file-hooks.js.map +0 -1
- package/dist/hooks/handlers/index.d.ts +0 -17
- package/dist/hooks/handlers/index.d.ts.map +0 -1
- package/dist/hooks/handlers/index.js +0 -19
- package/dist/hooks/handlers/index.js.map +0 -1
- package/dist/hooks/handlers/mcp-hooks.d.ts +0 -22
- package/dist/hooks/handlers/mcp-hooks.d.ts.map +0 -1
- package/dist/hooks/handlers/mcp-hooks.js +0 -80
- package/dist/hooks/handlers/mcp-hooks.js.map +0 -1
- package/dist/hooks/handlers/session-hooks.d.ts +0 -16
- package/dist/hooks/handlers/session-hooks.d.ts.map +0 -1
- package/dist/hooks/handlers/session-hooks.js +0 -73
- package/dist/hooks/handlers/session-hooks.js.map +0 -1
- package/dist/hooks/handlers/task-hooks.d.ts +0 -16
- package/dist/hooks/handlers/task-hooks.d.ts.map +0 -1
- package/dist/hooks/handlers/task-hooks.js +0 -63
- package/dist/hooks/handlers/task-hooks.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -12
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js +0 -11
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/provider-hooks.d.ts +0 -27
- package/dist/hooks/provider-hooks.d.ts.map +0 -1
- package/dist/hooks/provider-hooks.js +0 -34
- package/dist/hooks/provider-hooks.js.map +0 -1
- package/dist/hooks/registry.d.ts +0 -111
- package/dist/hooks/registry.d.ts.map +0 -1
- package/dist/hooks/registry.js +0 -176
- package/dist/hooks/registry.js.map +0 -1
- package/dist/hooks/types.d.ts +0 -299
- package/dist/hooks/types.d.ts.map +0 -1
- package/dist/hooks/types.js +0 -62
- package/dist/hooks/types.js.map +0 -1
- package/dist/hooks.d.ts +0 -46
- package/dist/hooks.d.ts.map +0 -1
- package/dist/hooks.js +0 -136
- package/dist/hooks.js.map +0 -1
- package/dist/index.d.ts +0 -109
- package/dist/index.d.ts.map +0 -1
- package/dist/init.d.ts +0 -137
- package/dist/init.d.ts.map +0 -1
- package/dist/init.js +0 -664
- package/dist/init.js.map +0 -1
- package/dist/inject/index.d.ts +0 -24
- package/dist/inject/index.d.ts.map +0 -1
- package/dist/inject/index.js +0 -82
- package/dist/inject/index.js.map +0 -1
- package/dist/injection.d.ts +0 -69
- package/dist/injection.d.ts.map +0 -1
- package/dist/injection.js +0 -338
- package/dist/injection.js.map +0 -1
- package/dist/internal.d.ts +0 -213
- package/dist/internal.d.ts.map +0 -1
- package/dist/internal.js +0 -261
- package/dist/internal.js.map +0 -1
- package/dist/issue/create.d.ts +0 -43
- package/dist/issue/create.d.ts.map +0 -1
- package/dist/issue/create.js +0 -121
- package/dist/issue/create.js.map +0 -1
- package/dist/issue/diagnostics.d.ts +0 -18
- package/dist/issue/diagnostics.d.ts.map +0 -1
- package/dist/issue/diagnostics.js +0 -59
- package/dist/issue/diagnostics.js.map +0 -1
- package/dist/issue/index.d.ts +0 -12
- package/dist/issue/index.d.ts.map +0 -1
- package/dist/issue/index.js +0 -10
- package/dist/issue/index.js.map +0 -1
- package/dist/issue/template-parser.d.ts +0 -48
- package/dist/issue/template-parser.d.ts.map +0 -1
- package/dist/issue/template-parser.js +0 -213
- package/dist/issue/template-parser.js.map +0 -1
- package/dist/json-schema-validator.d.ts +0 -20
- package/dist/json-schema-validator.d.ts.map +0 -1
- package/dist/json-schema-validator.js +0 -76
- package/dist/json-schema-validator.js.map +0 -1
- package/dist/lifecycle/chain-composition.d.ts +0 -30
- package/dist/lifecycle/chain-composition.d.ts.map +0 -1
- package/dist/lifecycle/chain-composition.js +0 -152
- package/dist/lifecycle/chain-composition.js.map +0 -1
- package/dist/lifecycle/chain-store.d.ts +0 -70
- package/dist/lifecycle/chain-store.d.ts.map +0 -1
- package/dist/lifecycle/chain-store.js +0 -246
- package/dist/lifecycle/chain-store.js.map +0 -1
- package/dist/lifecycle/consolidate-rcasd.d.ts +0 -81
- package/dist/lifecycle/consolidate-rcasd.d.ts.map +0 -1
- package/dist/lifecycle/consolidate-rcasd.js +0 -352
- package/dist/lifecycle/consolidate-rcasd.js.map +0 -1
- package/dist/lifecycle/default-chain.d.ts +0 -33
- package/dist/lifecycle/default-chain.d.ts.map +0 -1
- package/dist/lifecycle/default-chain.js +0 -167
- package/dist/lifecycle/default-chain.js.map +0 -1
- package/dist/lifecycle/evidence.d.ts +0 -71
- package/dist/lifecycle/evidence.d.ts.map +0 -1
- package/dist/lifecycle/evidence.js +0 -180
- package/dist/lifecycle/evidence.js.map +0 -1
- package/dist/lifecycle/frontmatter.d.ts +0 -104
- package/dist/lifecycle/frontmatter.d.ts.map +0 -1
- package/dist/lifecycle/frontmatter.js +0 -363
- package/dist/lifecycle/frontmatter.js.map +0 -1
- package/dist/lifecycle/index.d.ts +0 -228
- package/dist/lifecycle/index.d.ts.map +0 -1
- package/dist/lifecycle/index.js +0 -753
- package/dist/lifecycle/index.js.map +0 -1
- package/dist/lifecycle/pipeline.d.ts +0 -335
- package/dist/lifecycle/pipeline.d.ts.map +0 -1
- package/dist/lifecycle/pipeline.js +0 -651
- package/dist/lifecycle/pipeline.js.map +0 -1
- package/dist/lifecycle/rcasd-index.d.ts +0 -168
- package/dist/lifecycle/rcasd-index.d.ts.map +0 -1
- package/dist/lifecycle/rcasd-index.js +0 -326
- package/dist/lifecycle/rcasd-index.js.map +0 -1
- package/dist/lifecycle/rcasd-paths.d.ts +0 -103
- package/dist/lifecycle/rcasd-paths.d.ts.map +0 -1
- package/dist/lifecycle/rcasd-paths.js +0 -220
- package/dist/lifecycle/rcasd-paths.js.map +0 -1
- package/dist/lifecycle/resume.d.ts +0 -501
- package/dist/lifecycle/resume.d.ts.map +0 -1
- package/dist/lifecycle/resume.js +0 -864
- package/dist/lifecycle/resume.js.map +0 -1
- package/dist/lifecycle/stage-artifacts.d.ts +0 -23
- package/dist/lifecycle/stage-artifacts.d.ts.map +0 -1
- package/dist/lifecycle/stage-artifacts.js +0 -94
- package/dist/lifecycle/stage-artifacts.js.map +0 -1
- package/dist/lifecycle/stages.d.ts +0 -323
- package/dist/lifecycle/stages.d.ts.map +0 -1
- package/dist/lifecycle/stages.js +0 -534
- package/dist/lifecycle/stages.js.map +0 -1
- package/dist/lifecycle/state-machine.d.ts +0 -327
- package/dist/lifecycle/state-machine.d.ts.map +0 -1
- package/dist/lifecycle/state-machine.js +0 -512
- package/dist/lifecycle/state-machine.js.map +0 -1
- package/dist/lifecycle/tessera-engine.d.ts +0 -49
- package/dist/lifecycle/tessera-engine.d.ts.map +0 -1
- package/dist/lifecycle/tessera-engine.js +0 -249
- package/dist/lifecycle/tessera-engine.js.map +0 -1
- package/dist/logger.d.ts +0 -54
- package/dist/logger.d.ts.map +0 -1
- package/dist/logger.js +0 -140
- package/dist/logger.js.map +0 -1
- package/dist/mcp/index.d.ts +0 -42
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/index.js +0 -146
- package/dist/mcp/index.js.map +0 -1
- package/dist/memory/auto-extract.d.ts +0 -34
- package/dist/memory/auto-extract.d.ts.map +0 -1
- package/dist/memory/auto-extract.js +0 -143
- package/dist/memory/auto-extract.js.map +0 -1
- package/dist/memory/brain-embedding.d.ts +0 -42
- package/dist/memory/brain-embedding.d.ts.map +0 -1
- package/dist/memory/brain-embedding.js +0 -49
- package/dist/memory/brain-embedding.js.map +0 -1
- package/dist/memory/brain-lifecycle.d.ts +0 -57
- package/dist/memory/brain-lifecycle.d.ts.map +0 -1
- package/dist/memory/brain-lifecycle.js +0 -298
- package/dist/memory/brain-lifecycle.js.map +0 -1
- package/dist/memory/brain-links.d.ts +0 -75
- package/dist/memory/brain-links.d.ts.map +0 -1
- package/dist/memory/brain-links.js +0 -148
- package/dist/memory/brain-links.js.map +0 -1
- package/dist/memory/brain-migration.d.ts +0 -30
- package/dist/memory/brain-migration.d.ts.map +0 -1
- package/dist/memory/brain-migration.js +0 -149
- package/dist/memory/brain-migration.js.map +0 -1
- package/dist/memory/brain-reasoning.d.ts +0 -54
- package/dist/memory/brain-reasoning.d.ts.map +0 -1
- package/dist/memory/brain-reasoning.js +0 -215
- package/dist/memory/brain-reasoning.js.map +0 -1
- package/dist/memory/brain-retrieval.d.ts +0 -157
- package/dist/memory/brain-retrieval.d.ts.map +0 -1
- package/dist/memory/brain-retrieval.js +0 -481
- package/dist/memory/brain-retrieval.js.map +0 -1
- package/dist/memory/brain-row-types.d.ts +0 -45
- package/dist/memory/brain-row-types.d.ts.map +0 -1
- package/dist/memory/brain-row-types.js +0 -10
- package/dist/memory/brain-row-types.js.map +0 -1
- package/dist/memory/brain-search.d.ts +0 -91
- package/dist/memory/brain-search.d.ts.map +0 -1
- package/dist/memory/brain-search.js +0 -534
- package/dist/memory/brain-search.js.map +0 -1
- package/dist/memory/brain-similarity.d.ts +0 -33
- package/dist/memory/brain-similarity.d.ts.map +0 -1
- package/dist/memory/brain-similarity.js +0 -145
- package/dist/memory/brain-similarity.js.map +0 -1
- package/dist/memory/claude-mem-migration.d.ts +0 -45
- package/dist/memory/claude-mem-migration.d.ts.map +0 -1
- package/dist/memory/claude-mem-migration.js +0 -277
- package/dist/memory/claude-mem-migration.js.map +0 -1
- package/dist/memory/decisions.d.ts +0 -72
- package/dist/memory/decisions.d.ts.map +0 -1
- package/dist/memory/decisions.js +0 -148
- package/dist/memory/decisions.js.map +0 -1
- package/dist/memory/engine-compat.d.ts +0 -144
- package/dist/memory/engine-compat.d.ts.map +0 -1
- package/dist/memory/engine-compat.js +0 -1030
- package/dist/memory/engine-compat.js.map +0 -1
- package/dist/memory/index.d.ts +0 -305
- package/dist/memory/index.d.ts.map +0 -1
- package/dist/memory/index.js +0 -773
- package/dist/memory/index.js.map +0 -1
- package/dist/memory/learnings.d.ts +0 -74
- package/dist/memory/learnings.d.ts.map +0 -1
- package/dist/memory/learnings.js +0 -121
- package/dist/memory/learnings.js.map +0 -1
- package/dist/memory/memory-bridge.d.ts +0 -50
- package/dist/memory/memory-bridge.d.ts.map +0 -1
- package/dist/memory/memory-bridge.js +0 -289
- package/dist/memory/memory-bridge.js.map +0 -1
- package/dist/memory/patterns.d.ts +0 -87
- package/dist/memory/patterns.d.ts.map +0 -1
- package/dist/memory/patterns.js +0 -122
- package/dist/memory/patterns.js.map +0 -1
- package/dist/memory/pipeline-manifest-sqlite.d.ts +0 -83
- package/dist/memory/pipeline-manifest-sqlite.d.ts.map +0 -1
- package/dist/memory/pipeline-manifest-sqlite.js +0 -975
- package/dist/memory/pipeline-manifest-sqlite.js.map +0 -1
- package/dist/memory/session-memory.d.ts +0 -88
- package/dist/memory/session-memory.d.ts.map +0 -1
- package/dist/memory/session-memory.js +0 -226
- package/dist/memory/session-memory.js.map +0 -1
- package/dist/metrics/ab-test.d.ts +0 -52
- package/dist/metrics/ab-test.d.ts.map +0 -1
- package/dist/metrics/ab-test.js +0 -260
- package/dist/metrics/ab-test.js.map +0 -1
- package/dist/metrics/aggregation.d.ts +0 -41
- package/dist/metrics/aggregation.d.ts.map +0 -1
- package/dist/metrics/aggregation.js +0 -363
- package/dist/metrics/aggregation.js.map +0 -1
- package/dist/metrics/common.d.ts +0 -30
- package/dist/metrics/common.d.ts.map +0 -1
- package/dist/metrics/common.js +0 -64
- package/dist/metrics/common.js.map +0 -1
- package/dist/metrics/enums.d.ts +0 -68
- package/dist/metrics/enums.d.ts.map +0 -1
- package/dist/metrics/enums.js +0 -78
- package/dist/metrics/enums.js.map +0 -1
- package/dist/metrics/index.d.ts +0 -17
- package/dist/metrics/index.d.ts.map +0 -1
- package/dist/metrics/index.js +0 -19
- package/dist/metrics/index.js.map +0 -1
- package/dist/metrics/model-provider-registry.d.ts +0 -17
- package/dist/metrics/model-provider-registry.d.ts.map +0 -1
- package/dist/metrics/model-provider-registry.js +0 -88
- package/dist/metrics/model-provider-registry.js.map +0 -1
- package/dist/metrics/otel-integration.d.ts +0 -49
- package/dist/metrics/otel-integration.d.ts.map +0 -1
- package/dist/metrics/otel-integration.js +0 -263
- package/dist/metrics/otel-integration.js.map +0 -1
- package/dist/metrics/provider-detection.d.ts +0 -20
- package/dist/metrics/provider-detection.d.ts.map +0 -1
- package/dist/metrics/provider-detection.js +0 -103
- package/dist/metrics/provider-detection.js.map +0 -1
- package/dist/metrics/token-estimation.d.ts +0 -70
- package/dist/metrics/token-estimation.d.ts.map +0 -1
- package/dist/metrics/token-estimation.js +0 -253
- package/dist/metrics/token-estimation.js.map +0 -1
- package/dist/metrics/token-service.d.ts +0 -107
- package/dist/metrics/token-service.d.ts.map +0 -1
- package/dist/metrics/token-service.js +0 -450
- package/dist/metrics/token-service.js.map +0 -1
- package/dist/migration/agent-outputs.d.ts +0 -70
- package/dist/migration/agent-outputs.d.ts.map +0 -1
- package/dist/migration/agent-outputs.js +0 -316
- package/dist/migration/agent-outputs.js.map +0 -1
- package/dist/migration/checksum.d.ts +0 -55
- package/dist/migration/checksum.d.ts.map +0 -1
- package/dist/migration/checksum.js +0 -92
- package/dist/migration/checksum.js.map +0 -1
- package/dist/migration/index.d.ts +0 -79
- package/dist/migration/index.d.ts.map +0 -1
- package/dist/migration/index.js +0 -282
- package/dist/migration/index.js.map +0 -1
- package/dist/migration/logger.d.ts +0 -161
- package/dist/migration/logger.d.ts.map +0 -1
- package/dist/migration/logger.js +0 -360
- package/dist/migration/logger.js.map +0 -1
- package/dist/migration/preflight.d.ts +0 -10
- package/dist/migration/preflight.d.ts.map +0 -1
- package/dist/migration/preflight.js +0 -9
- package/dist/migration/preflight.js.map +0 -1
- package/dist/migration/state.d.ts +0 -186
- package/dist/migration/state.d.ts.map +0 -1
- package/dist/migration/state.js +0 -421
- package/dist/migration/state.js.map +0 -1
- package/dist/migration/validate.d.ts +0 -57
- package/dist/migration/validate.d.ts.map +0 -1
- package/dist/migration/validate.js +0 -241
- package/dist/migration/validate.js.map +0 -1
- package/dist/nexus/deps.d.ts +0 -98
- package/dist/nexus/deps.d.ts.map +0 -1
- package/dist/nexus/deps.js +0 -375
- package/dist/nexus/deps.js.map +0 -1
- package/dist/nexus/discover.d.ts +0 -66
- package/dist/nexus/discover.d.ts.map +0 -1
- package/dist/nexus/discover.js +0 -287
- package/dist/nexus/discover.js.map +0 -1
- package/dist/nexus/hash.d.ts +0 -7
- package/dist/nexus/hash.d.ts.map +0 -1
- package/dist/nexus/hash.js +0 -10
- package/dist/nexus/hash.js.map +0 -1
- package/dist/nexus/index.d.ts +0 -17
- package/dist/nexus/index.d.ts.map +0 -1
- package/dist/nexus/index.js +0 -36
- package/dist/nexus/index.js.map +0 -1
- package/dist/nexus/migrate-json-to-sqlite.d.ts +0 -23
- package/dist/nexus/migrate-json-to-sqlite.d.ts.map +0 -1
- package/dist/nexus/migrate-json-to-sqlite.js +0 -115
- package/dist/nexus/migrate-json-to-sqlite.js.map +0 -1
- package/dist/nexus/permissions.d.ts +0 -60
- package/dist/nexus/permissions.d.ts.map +0 -1
- package/dist/nexus/permissions.js +0 -105
- package/dist/nexus/permissions.js.map +0 -1
- package/dist/nexus/query.d.ts +0 -53
- package/dist/nexus/query.d.ts.map +0 -1
- package/dist/nexus/query.js +0 -175
- package/dist/nexus/query.js.map +0 -1
- package/dist/nexus/registry.d.ts +0 -126
- package/dist/nexus/registry.d.ts.map +0 -1
- package/dist/nexus/registry.js +0 -584
- package/dist/nexus/registry.js.map +0 -1
- package/dist/nexus/sharing/index.d.ts +0 -39
- package/dist/nexus/sharing/index.d.ts.map +0 -1
- package/dist/nexus/sharing/index.js +0 -179
- package/dist/nexus/sharing/index.js.map +0 -1
- package/dist/observability/index.d.ts +0 -32
- package/dist/observability/index.d.ts.map +0 -1
- package/dist/observability/index.js +0 -103
- package/dist/observability/index.js.map +0 -1
- package/dist/observability/log-filter.d.ts +0 -31
- package/dist/observability/log-filter.d.ts.map +0 -1
- package/dist/observability/log-filter.js +0 -63
- package/dist/observability/log-filter.js.map +0 -1
- package/dist/observability/log-parser.d.ts +0 -26
- package/dist/observability/log-parser.d.ts.map +0 -1
- package/dist/observability/log-parser.js +0 -99
- package/dist/observability/log-parser.js.map +0 -1
- package/dist/observability/log-reader.d.ts +0 -35
- package/dist/observability/log-reader.d.ts.map +0 -1
- package/dist/observability/log-reader.js +0 -139
- package/dist/observability/log-reader.js.map +0 -1
- package/dist/observability/types.d.ts +0 -112
- package/dist/observability/types.d.ts.map +0 -1
- package/dist/observability/types.js +0 -19
- package/dist/observability/types.js.map +0 -1
- package/dist/orchestration/analyze.d.ts +0 -57
- package/dist/orchestration/analyze.d.ts.map +0 -1
- package/dist/orchestration/analyze.js +0 -107
- package/dist/orchestration/analyze.js.map +0 -1
- package/dist/orchestration/bootstrap.d.ts +0 -12
- package/dist/orchestration/bootstrap.d.ts.map +0 -1
- package/dist/orchestration/bootstrap.js +0 -136
- package/dist/orchestration/bootstrap.js.map +0 -1
- package/dist/orchestration/context.d.ts +0 -38
- package/dist/orchestration/context.d.ts.map +0 -1
- package/dist/orchestration/context.js +0 -56
- package/dist/orchestration/context.js.map +0 -1
- package/dist/orchestration/critical-path.d.ts +0 -22
- package/dist/orchestration/critical-path.d.ts.map +0 -1
- package/dist/orchestration/critical-path.js +0 -100
- package/dist/orchestration/critical-path.js.map +0 -1
- package/dist/orchestration/index.d.ts +0 -116
- package/dist/orchestration/index.d.ts.map +0 -1
- package/dist/orchestration/index.js +0 -286
- package/dist/orchestration/index.js.map +0 -1
- package/dist/orchestration/parallel.d.ts +0 -35
- package/dist/orchestration/parallel.d.ts.map +0 -1
- package/dist/orchestration/parallel.js +0 -89
- package/dist/orchestration/parallel.js.map +0 -1
- package/dist/orchestration/protocol-validators.d.ts +0 -96
- package/dist/orchestration/protocol-validators.d.ts.map +0 -1
- package/dist/orchestration/protocol-validators.js +0 -524
- package/dist/orchestration/protocol-validators.js.map +0 -1
- package/dist/orchestration/skill-ops.d.ts +0 -29
- package/dist/orchestration/skill-ops.d.ts.map +0 -1
- package/dist/orchestration/skill-ops.js +0 -81
- package/dist/orchestration/skill-ops.js.map +0 -1
- package/dist/orchestration/status.d.ts +0 -92
- package/dist/orchestration/status.d.ts.map +0 -1
- package/dist/orchestration/status.js +0 -107
- package/dist/orchestration/status.js.map +0 -1
- package/dist/orchestration/unblock.d.ts +0 -31
- package/dist/orchestration/unblock.d.ts.map +0 -1
- package/dist/orchestration/unblock.js +0 -103
- package/dist/orchestration/unblock.js.map +0 -1
- package/dist/orchestration/validate-spawn.d.ts +0 -19
- package/dist/orchestration/validate-spawn.d.ts.map +0 -1
- package/dist/orchestration/validate-spawn.js +0 -67
- package/dist/orchestration/validate-spawn.js.map +0 -1
- package/dist/orchestration/waves.d.ts +0 -26
- package/dist/orchestration/waves.d.ts.map +0 -1
- package/dist/orchestration/waves.js +0 -86
- package/dist/orchestration/waves.js.map +0 -1
- package/dist/otel/index.d.ts +0 -27
- package/dist/otel/index.d.ts.map +0 -1
- package/dist/otel/index.js +0 -126
- package/dist/otel/index.js.map +0 -1
- package/dist/output.d.ts +0 -66
- package/dist/output.d.ts.map +0 -1
- package/dist/output.js +0 -132
- package/dist/output.js.map +0 -1
- package/dist/pagination.d.ts +0 -45
- package/dist/pagination.d.ts.map +0 -1
- package/dist/pagination.js +0 -61
- package/dist/pagination.js.map +0 -1
- package/dist/paths.d.ts +0 -165
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js +0 -319
- package/dist/paths.js.map +0 -1
- package/dist/phases/deps.d.ts +0 -119
- package/dist/phases/deps.d.ts.map +0 -1
- package/dist/phases/deps.js +0 -369
- package/dist/phases/deps.js.map +0 -1
- package/dist/phases/index.d.ts +0 -123
- package/dist/phases/index.d.ts.map +0 -1
- package/dist/phases/index.js +0 -349
- package/dist/phases/index.js.map +0 -1
- package/dist/pipeline/index.d.ts +0 -10
- package/dist/pipeline/index.d.ts.map +0 -1
- package/dist/pipeline/index.js +0 -10
- package/dist/pipeline/index.js.map +0 -1
- package/dist/pipeline/phase.d.ts +0 -36
- package/dist/pipeline/phase.d.ts.map +0 -1
- package/dist/pipeline/phase.js +0 -45
- package/dist/pipeline/phase.js.map +0 -1
- package/dist/platform.d.ts +0 -103
- package/dist/platform.d.ts.map +0 -1
- package/dist/platform.js +0 -211
- package/dist/platform.js.map +0 -1
- package/dist/project-info.d.ts +0 -35
- package/dist/project-info.d.ts.map +0 -1
- package/dist/project-info.js +0 -70
- package/dist/project-info.js.map +0 -1
- package/dist/reconciliation/index.d.ts +0 -8
- package/dist/reconciliation/index.d.ts.map +0 -1
- package/dist/reconciliation/index.js +0 -8
- package/dist/reconciliation/index.js.map +0 -1
- package/dist/reconciliation/reconciliation-engine.d.ts +0 -22
- package/dist/reconciliation/reconciliation-engine.d.ts.map +0 -1
- package/dist/reconciliation/reconciliation-engine.js +0 -258
- package/dist/reconciliation/reconciliation-engine.js.map +0 -1
- package/dist/reconciliation/sync-state.d.ts +0 -22
- package/dist/reconciliation/sync-state.d.ts.map +0 -1
- package/dist/reconciliation/sync-state.js +0 -59
- package/dist/reconciliation/sync-state.js.map +0 -1
- package/dist/release/artifacts.d.ts +0 -71
- package/dist/release/artifacts.d.ts.map +0 -1
- package/dist/release/artifacts.js +0 -427
- package/dist/release/artifacts.js.map +0 -1
- package/dist/release/changelog-writer.d.ts +0 -26
- package/dist/release/changelog-writer.d.ts.map +0 -1
- package/dist/release/changelog-writer.js +0 -151
- package/dist/release/changelog-writer.js.map +0 -1
- package/dist/release/channel.d.ts +0 -54
- package/dist/release/channel.d.ts.map +0 -1
- package/dist/release/channel.js +0 -144
- package/dist/release/channel.js.map +0 -1
- package/dist/release/ci.d.ts +0 -35
- package/dist/release/ci.d.ts.map +0 -1
- package/dist/release/ci.js +0 -166
- package/dist/release/ci.js.map +0 -1
- package/dist/release/github-pr.d.ts +0 -63
- package/dist/release/github-pr.d.ts.map +0 -1
- package/dist/release/github-pr.js +0 -225
- package/dist/release/github-pr.js.map +0 -1
- package/dist/release/guards.d.ts +0 -44
- package/dist/release/guards.d.ts.map +0 -1
- package/dist/release/guards.js +0 -116
- package/dist/release/guards.js.map +0 -1
- package/dist/release/index.d.ts +0 -26
- package/dist/release/index.d.ts.map +0 -1
- package/dist/release/index.js +0 -22
- package/dist/release/index.js.map +0 -1
- package/dist/release/release-config.d.ts +0 -90
- package/dist/release/release-config.d.ts.map +0 -1
- package/dist/release/release-config.js +0 -158
- package/dist/release/release-config.js.map +0 -1
- package/dist/release/release-manifest.d.ts +0 -215
- package/dist/release/release-manifest.d.ts.map +0 -1
- package/dist/release/release-manifest.js +0 -978
- package/dist/release/release-manifest.js.map +0 -1
- package/dist/release/version-bump.d.ts +0 -51
- package/dist/release/version-bump.d.ts.map +0 -1
- package/dist/release/version-bump.js +0 -255
- package/dist/release/version-bump.js.map +0 -1
- package/dist/remote/index.d.ts +0 -81
- package/dist/remote/index.d.ts.map +0 -1
- package/dist/remote/index.js +0 -257
- package/dist/remote/index.js.map +0 -1
- package/dist/repair.d.ts +0 -30
- package/dist/repair.d.ts.map +0 -1
- package/dist/repair.js +0 -89
- package/dist/repair.js.map +0 -1
- package/dist/research/index.d.ts +0 -2
- package/dist/research/index.d.ts.map +0 -1
- package/dist/research/index.js +0 -2
- package/dist/research/index.js.map +0 -1
- package/dist/roadmap/index.d.ts +0 -13
- package/dist/roadmap/index.d.ts.map +0 -1
- package/dist/roadmap/index.js +0 -59
- package/dist/roadmap/index.js.map +0 -1
- package/dist/routing/capability-matrix.d.ts +0 -78
- package/dist/routing/capability-matrix.d.ts.map +0 -1
- package/dist/routing/capability-matrix.js +0 -318
- package/dist/routing/capability-matrix.js.map +0 -1
- package/dist/routing/index.d.ts +0 -10
- package/dist/routing/index.d.ts.map +0 -1
- package/dist/routing/index.js +0 -9
- package/dist/routing/index.js.map +0 -1
- package/dist/scaffold.d.ts +0 -215
- package/dist/scaffold.d.ts.map +0 -1
- package/dist/scaffold.js +0 -1080
- package/dist/scaffold.js.map +0 -1
- package/dist/schema-management.d.ts +0 -96
- package/dist/schema-management.d.ts.map +0 -1
- package/dist/schema-management.js +0 -295
- package/dist/schema-management.js.map +0 -1
- package/dist/security/index.d.ts +0 -10
- package/dist/security/index.d.ts.map +0 -1
- package/dist/security/index.js +0 -9
- package/dist/security/index.js.map +0 -1
- package/dist/security/input-sanitization.d.ts +0 -93
- package/dist/security/input-sanitization.d.ts.map +0 -1
- package/dist/security/input-sanitization.js +0 -321
- package/dist/security/input-sanitization.js.map +0 -1
- package/dist/sequence/index.d.ts +0 -34
- package/dist/sequence/index.d.ts.map +0 -1
- package/dist/sequence/index.js +0 -295
- package/dist/sequence/index.js.map +0 -1
- package/dist/sessions/assumptions.d.ts +0 -22
- package/dist/sessions/assumptions.d.ts.map +0 -1
- package/dist/sessions/assumptions.js +0 -54
- package/dist/sessions/assumptions.js.map +0 -1
- package/dist/sessions/briefing.d.ts +0 -113
- package/dist/sessions/briefing.d.ts.map +0 -1
- package/dist/sessions/briefing.js +0 -386
- package/dist/sessions/briefing.js.map +0 -1
- package/dist/sessions/context-alert.d.ts +0 -48
- package/dist/sessions/context-alert.d.ts.map +0 -1
- package/dist/sessions/context-alert.js +0 -222
- package/dist/sessions/context-alert.js.map +0 -1
- package/dist/sessions/context-inject.d.ts +0 -31
- package/dist/sessions/context-inject.d.ts.map +0 -1
- package/dist/sessions/context-inject.js +0 -61
- package/dist/sessions/context-inject.js.map +0 -1
- package/dist/sessions/context-monitor.d.ts +0 -33
- package/dist/sessions/context-monitor.d.ts.map +0 -1
- package/dist/sessions/context-monitor.js +0 -98
- package/dist/sessions/context-monitor.js.map +0 -1
- package/dist/sessions/decisions.d.ts +0 -29
- package/dist/sessions/decisions.d.ts.map +0 -1
- package/dist/sessions/decisions.js +0 -65
- package/dist/sessions/decisions.js.map +0 -1
- package/dist/sessions/find.d.ts +0 -38
- package/dist/sessions/find.d.ts.map +0 -1
- package/dist/sessions/find.js +0 -63
- package/dist/sessions/find.js.map +0 -1
- package/dist/sessions/handoff.d.ts +0 -137
- package/dist/sessions/handoff.d.ts.map +0 -1
- package/dist/sessions/handoff.js +0 -356
- package/dist/sessions/handoff.js.map +0 -1
- package/dist/sessions/hitl-warnings.d.ts +0 -58
- package/dist/sessions/hitl-warnings.d.ts.map +0 -1
- package/dist/sessions/hitl-warnings.js +0 -254
- package/dist/sessions/hitl-warnings.js.map +0 -1
- package/dist/sessions/index.d.ts +0 -107
- package/dist/sessions/index.d.ts.map +0 -1
- package/dist/sessions/index.js +0 -318
- package/dist/sessions/index.js.map +0 -1
- package/dist/sessions/session-archive.d.ts +0 -17
- package/dist/sessions/session-archive.d.ts.map +0 -1
- package/dist/sessions/session-archive.js +0 -40
- package/dist/sessions/session-archive.js.map +0 -1
- package/dist/sessions/session-cleanup.d.ts +0 -22
- package/dist/sessions/session-cleanup.d.ts.map +0 -1
- package/dist/sessions/session-cleanup.js +0 -59
- package/dist/sessions/session-cleanup.js.map +0 -1
- package/dist/sessions/session-drift.d.ts +0 -22
- package/dist/sessions/session-drift.d.ts.map +0 -1
- package/dist/sessions/session-drift.js +0 -134
- package/dist/sessions/session-drift.js.map +0 -1
- package/dist/sessions/session-enforcement.d.ts +0 -49
- package/dist/sessions/session-enforcement.d.ts.map +0 -1
- package/dist/sessions/session-enforcement.js +0 -137
- package/dist/sessions/session-enforcement.js.map +0 -1
- package/dist/sessions/session-grade.d.ts +0 -41
- package/dist/sessions/session-grade.d.ts.map +0 -1
- package/dist/sessions/session-grade.js +0 -253
- package/dist/sessions/session-grade.js.map +0 -1
- package/dist/sessions/session-history.d.ts +0 -32
- package/dist/sessions/session-history.d.ts.map +0 -1
- package/dist/sessions/session-history.js +0 -42
- package/dist/sessions/session-history.js.map +0 -1
- package/dist/sessions/session-id.d.ts +0 -34
- package/dist/sessions/session-id.d.ts.map +0 -1
- package/dist/sessions/session-id.js +0 -81
- package/dist/sessions/session-id.js.map +0 -1
- package/dist/sessions/session-memory-bridge.d.ts +0 -28
- package/dist/sessions/session-memory-bridge.d.ts.map +0 -1
- package/dist/sessions/session-memory-bridge.js +0 -52
- package/dist/sessions/session-memory-bridge.js.map +0 -1
- package/dist/sessions/session-show.d.ts +0 -14
- package/dist/sessions/session-show.d.ts.map +0 -1
- package/dist/sessions/session-show.js +0 -24
- package/dist/sessions/session-show.js.map +0 -1
- package/dist/sessions/session-stats.d.ts +0 -30
- package/dist/sessions/session-stats.d.ts.map +0 -1
- package/dist/sessions/session-stats.js +0 -69
- package/dist/sessions/session-stats.js.map +0 -1
- package/dist/sessions/session-suspend.d.ts +0 -14
- package/dist/sessions/session-suspend.d.ts.map +0 -1
- package/dist/sessions/session-suspend.js +0 -39
- package/dist/sessions/session-suspend.js.map +0 -1
- package/dist/sessions/session-switch.d.ts +0 -14
- package/dist/sessions/session-switch.d.ts.map +0 -1
- package/dist/sessions/session-switch.js +0 -51
- package/dist/sessions/session-switch.js.map +0 -1
- package/dist/sessions/session-view.d.ts +0 -41
- package/dist/sessions/session-view.d.ts.map +0 -1
- package/dist/sessions/session-view.js +0 -76
- package/dist/sessions/session-view.js.map +0 -1
- package/dist/sessions/statusline-setup.d.ts +0 -24
- package/dist/sessions/statusline-setup.d.ts.map +0 -1
- package/dist/sessions/statusline-setup.js +0 -85
- package/dist/sessions/statusline-setup.js.map +0 -1
- package/dist/sessions/types.d.ts +0 -144
- package/dist/sessions/types.d.ts.map +0 -1
- package/dist/sessions/types.js +0 -17
- package/dist/sessions/types.js.map +0 -1
- package/dist/signaldock/claude-code-transport.d.ts +0 -34
- package/dist/signaldock/claude-code-transport.d.ts.map +0 -1
- package/dist/signaldock/claude-code-transport.js +0 -107
- package/dist/signaldock/claude-code-transport.js.map +0 -1
- package/dist/signaldock/factory.d.ts +0 -22
- package/dist/signaldock/factory.d.ts.map +0 -1
- package/dist/signaldock/factory.js +0 -25
- package/dist/signaldock/factory.js.map +0 -1
- package/dist/signaldock/index.d.ts +0 -13
- package/dist/signaldock/index.d.ts.map +0 -1
- package/dist/signaldock/index.js +0 -9
- package/dist/signaldock/index.js.map +0 -1
- package/dist/signaldock/signaldock-transport.d.ts +0 -45
- package/dist/signaldock/signaldock-transport.d.ts.map +0 -1
- package/dist/signaldock/signaldock-transport.js +0 -119
- package/dist/signaldock/signaldock-transport.js.map +0 -1
- package/dist/signaldock/transport.d.ts +0 -49
- package/dist/signaldock/transport.d.ts.map +0 -1
- package/dist/signaldock/transport.js +0 -11
- package/dist/signaldock/transport.js.map +0 -1
- package/dist/signaldock/types.d.ts +0 -88
- package/dist/signaldock/types.d.ts.map +0 -1
- package/dist/signaldock/types.js +0 -11
- package/dist/signaldock/types.js.map +0 -1
- package/dist/skills/agents/config.d.ts +0 -39
- package/dist/skills/agents/config.d.ts.map +0 -1
- package/dist/skills/agents/config.js +0 -94
- package/dist/skills/agents/config.js.map +0 -1
- package/dist/skills/agents/install.d.ts +0 -33
- package/dist/skills/agents/install.d.ts.map +0 -1
- package/dist/skills/agents/install.js +0 -109
- package/dist/skills/agents/install.js.map +0 -1
- package/dist/skills/agents/registry.d.ts +0 -56
- package/dist/skills/agents/registry.d.ts.map +0 -1
- package/dist/skills/agents/registry.js +0 -161
- package/dist/skills/agents/registry.js.map +0 -1
- package/dist/skills/discovery.d.ts +0 -102
- package/dist/skills/discovery.d.ts.map +0 -1
- package/dist/skills/discovery.js +0 -333
- package/dist/skills/discovery.js.map +0 -1
- package/dist/skills/dispatch.d.ts +0 -67
- package/dist/skills/dispatch.d.ts.map +0 -1
- package/dist/skills/dispatch.js +0 -347
- package/dist/skills/dispatch.js.map +0 -1
- package/dist/skills/dynamic-skill-generator.d.ts +0 -42
- package/dist/skills/dynamic-skill-generator.d.ts.map +0 -1
- package/dist/skills/dynamic-skill-generator.js +0 -100
- package/dist/skills/dynamic-skill-generator.js.map +0 -1
- package/dist/skills/index.d.ts +0 -38
- package/dist/skills/index.d.ts.map +0 -1
- package/dist/skills/index.js +0 -44
- package/dist/skills/index.js.map +0 -1
- package/dist/skills/injection/subagent.d.ts +0 -60
- package/dist/skills/injection/subagent.d.ts.map +0 -1
- package/dist/skills/injection/subagent.js +0 -199
- package/dist/skills/injection/subagent.js.map +0 -1
- package/dist/skills/injection/token.d.ts +0 -121
- package/dist/skills/injection/token.d.ts.map +0 -1
- package/dist/skills/injection/token.js +0 -260
- package/dist/skills/injection/token.js.map +0 -1
- package/dist/skills/install.d.ts +0 -16
- package/dist/skills/install.d.ts.map +0 -1
- package/dist/skills/install.js +0 -40
- package/dist/skills/install.js.map +0 -1
- package/dist/skills/manifests/contribution.d.ts +0 -74
- package/dist/skills/manifests/contribution.d.ts.map +0 -1
- package/dist/skills/manifests/contribution.js +0 -180
- package/dist/skills/manifests/contribution.js.map +0 -1
- package/dist/skills/manifests/research.d.ts +0 -73
- package/dist/skills/manifests/research.d.ts.map +0 -1
- package/dist/skills/manifests/research.js +0 -282
- package/dist/skills/manifests/research.js.map +0 -1
- package/dist/skills/manifests/resolver.d.ts +0 -40
- package/dist/skills/manifests/resolver.d.ts.map +0 -1
- package/dist/skills/manifests/resolver.js +0 -146
- package/dist/skills/manifests/resolver.js.map +0 -1
- package/dist/skills/marketplace.d.ts +0 -45
- package/dist/skills/marketplace.d.ts.map +0 -1
- package/dist/skills/marketplace.js +0 -90
- package/dist/skills/marketplace.js.map +0 -1
- package/dist/skills/orchestrator/spawn.d.ts +0 -66
- package/dist/skills/orchestrator/spawn.d.ts.map +0 -1
- package/dist/skills/orchestrator/spawn.js +0 -188
- package/dist/skills/orchestrator/spawn.js.map +0 -1
- package/dist/skills/orchestrator/startup.d.ts +0 -85
- package/dist/skills/orchestrator/startup.d.ts.map +0 -1
- package/dist/skills/orchestrator/startup.js +0 -441
- package/dist/skills/orchestrator/startup.js.map +0 -1
- package/dist/skills/orchestrator/validator.d.ts +0 -40
- package/dist/skills/orchestrator/validator.d.ts.map +0 -1
- package/dist/skills/orchestrator/validator.js +0 -302
- package/dist/skills/orchestrator/validator.js.map +0 -1
- package/dist/skills/precedence-integration.d.ts +0 -46
- package/dist/skills/precedence-integration.d.ts.map +0 -1
- package/dist/skills/precedence-integration.js +0 -73
- package/dist/skills/precedence-integration.js.map +0 -1
- package/dist/skills/precedence-types.d.ts +0 -27
- package/dist/skills/precedence-types.d.ts.map +0 -1
- package/dist/skills/precedence-types.js +0 -8
- package/dist/skills/precedence-types.js.map +0 -1
- package/dist/skills/routing-table.d.ts +0 -58
- package/dist/skills/routing-table.d.ts.map +0 -1
- package/dist/skills/routing-table.js +0 -276
- package/dist/skills/routing-table.js.map +0 -1
- package/dist/skills/skill-paths.d.ts +0 -79
- package/dist/skills/skill-paths.d.ts.map +0 -1
- package/dist/skills/skill-paths.js +0 -219
- package/dist/skills/skill-paths.js.map +0 -1
- package/dist/skills/test-utility.d.ts +0 -39
- package/dist/skills/test-utility.d.ts.map +0 -1
- package/dist/skills/test-utility.js +0 -55
- package/dist/skills/test-utility.js.map +0 -1
- package/dist/skills/types.d.ts +0 -281
- package/dist/skills/types.d.ts.map +0 -1
- package/dist/skills/types.js +0 -86
- package/dist/skills/types.js.map +0 -1
- package/dist/skills/validation.d.ts +0 -46
- package/dist/skills/validation.d.ts.map +0 -1
- package/dist/skills/validation.js +0 -183
- package/dist/skills/validation.js.map +0 -1
- package/dist/skills/version.d.ts +0 -31
- package/dist/skills/version.d.ts.map +0 -1
- package/dist/skills/version.js +0 -57
- package/dist/skills/version.js.map +0 -1
- package/dist/snapshot/index.d.ts +0 -83
- package/dist/snapshot/index.d.ts.map +0 -1
- package/dist/snapshot/index.js +0 -188
- package/dist/snapshot/index.js.map +0 -1
- package/dist/spawn/adapter-registry.d.ts +0 -132
- package/dist/spawn/adapter-registry.d.ts.map +0 -1
- package/dist/spawn/adapter-registry.js +0 -247
- package/dist/spawn/adapter-registry.js.map +0 -1
- package/dist/spawn/index.d.ts +0 -11
- package/dist/spawn/index.d.ts.map +0 -1
- package/dist/spawn/index.js +0 -10
- package/dist/spawn/index.js.map +0 -1
- package/dist/stats/index.d.ts +0 -37
- package/dist/stats/index.d.ts.map +0 -1
- package/dist/stats/index.js +0 -339
- package/dist/stats/index.js.map +0 -1
- package/dist/sticky/archive.d.ts +0 -18
- package/dist/sticky/archive.d.ts.map +0 -1
- package/dist/sticky/archive.js +0 -47
- package/dist/sticky/archive.js.map +0 -1
- package/dist/sticky/convert.d.ts +0 -73
- package/dist/sticky/convert.d.ts.map +0 -1
- package/dist/sticky/convert.js +0 -235
- package/dist/sticky/convert.js.map +0 -1
- package/dist/sticky/create.d.ts +0 -18
- package/dist/sticky/create.d.ts.map +0 -1
- package/dist/sticky/create.js +0 -48
- package/dist/sticky/create.js.map +0 -1
- package/dist/sticky/id.d.ts +0 -18
- package/dist/sticky/id.d.ts.map +0 -1
- package/dist/sticky/id.js +0 -35
- package/dist/sticky/id.js.map +0 -1
- package/dist/sticky/index.d.ts +0 -17
- package/dist/sticky/index.d.ts.map +0 -1
- package/dist/sticky/index.js +0 -16
- package/dist/sticky/index.js.map +0 -1
- package/dist/sticky/list.d.ts +0 -18
- package/dist/sticky/list.d.ts.map +0 -1
- package/dist/sticky/list.js +0 -44
- package/dist/sticky/list.js.map +0 -1
- package/dist/sticky/purge.d.ts +0 -17
- package/dist/sticky/purge.d.ts.map +0 -1
- package/dist/sticky/purge.js +0 -45
- package/dist/sticky/purge.js.map +0 -1
- package/dist/sticky/show.d.ts +0 -18
- package/dist/sticky/show.d.ts.map +0 -1
- package/dist/sticky/show.js +0 -42
- package/dist/sticky/show.js.map +0 -1
- package/dist/sticky/types.d.ts +0 -87
- package/dist/sticky/types.d.ts.map +0 -1
- package/dist/sticky/types.js +0 -10
- package/dist/sticky/types.js.map +0 -1
- package/dist/store/atomic.d.ts +0 -75
- package/dist/store/atomic.d.ts.map +0 -1
- package/dist/store/atomic.js +0 -167
- package/dist/store/atomic.js.map +0 -1
- package/dist/store/backup.d.ts +0 -21
- package/dist/store/backup.d.ts.map +0 -1
- package/dist/store/backup.js +0 -94
- package/dist/store/backup.js.map +0 -1
- package/dist/store/brain-accessor.d.ts +0 -84
- package/dist/store/brain-accessor.d.ts.map +0 -1
- package/dist/store/brain-accessor.js +0 -397
- package/dist/store/brain-accessor.js.map +0 -1
- package/dist/store/brain-schema.d.ts +0 -1339
- package/dist/store/brain-schema.d.ts.map +0 -1
- package/dist/store/brain-schema.js +0 -212
- package/dist/store/brain-schema.js.map +0 -1
- package/dist/store/brain-sqlite.d.ts +0 -59
- package/dist/store/brain-sqlite.d.ts.map +0 -1
- package/dist/store/brain-sqlite.js +0 -265
- package/dist/store/brain-sqlite.js.map +0 -1
- package/dist/store/cache.d.ts +0 -67
- package/dist/store/cache.d.ts.map +0 -1
- package/dist/store/cache.js +0 -168
- package/dist/store/cache.js.map +0 -1
- package/dist/store/chain-schema.d.ts +0 -319
- package/dist/store/chain-schema.d.ts.map +0 -1
- package/dist/store/chain-schema.js +0 -51
- package/dist/store/chain-schema.js.map +0 -1
- package/dist/store/converters.d.ts +0 -20
- package/dist/store/converters.d.ts.map +0 -1
- package/dist/store/converters.js +0 -120
- package/dist/store/converters.js.map +0 -1
- package/dist/store/data-accessor.d.ts +0 -20
- package/dist/store/data-accessor.d.ts.map +0 -1
- package/dist/store/data-accessor.js +0 -26
- package/dist/store/data-accessor.js.map +0 -1
- package/dist/store/data-safety-central.d.ts +0 -101
- package/dist/store/data-safety-central.d.ts.map +0 -1
- package/dist/store/data-safety-central.js +0 -269
- package/dist/store/data-safety-central.js.map +0 -1
- package/dist/store/data-safety.d.ts +0 -93
- package/dist/store/data-safety.d.ts.map +0 -1
- package/dist/store/data-safety.js +0 -274
- package/dist/store/data-safety.js.map +0 -1
- package/dist/store/db-helpers.d.ts +0 -62
- package/dist/store/db-helpers.d.ts.map +0 -1
- package/dist/store/db-helpers.js +0 -221
- package/dist/store/db-helpers.js.map +0 -1
- package/dist/store/export.d.ts +0 -87
- package/dist/store/export.d.ts.map +0 -1
- package/dist/store/export.js +0 -153
- package/dist/store/export.js.map +0 -1
- package/dist/store/file-utils.d.ts +0 -72
- package/dist/store/file-utils.d.ts.map +0 -1
- package/dist/store/file-utils.js +0 -270
- package/dist/store/file-utils.js.map +0 -1
- package/dist/store/git-checkpoint.d.ts +0 -93
- package/dist/store/git-checkpoint.d.ts.map +0 -1
- package/dist/store/git-checkpoint.js +0 -365
- package/dist/store/git-checkpoint.js.map +0 -1
- package/dist/store/import-logging.d.ts +0 -58
- package/dist/store/import-logging.d.ts.map +0 -1
- package/dist/store/import-logging.js +0 -139
- package/dist/store/import-logging.js.map +0 -1
- package/dist/store/import-remap.d.ts +0 -50
- package/dist/store/import-remap.d.ts.map +0 -1
- package/dist/store/import-remap.js +0 -145
- package/dist/store/import-remap.js.map +0 -1
- package/dist/store/import-sort.d.ts +0 -35
- package/dist/store/import-sort.d.ts.map +0 -1
- package/dist/store/import-sort.js +0 -121
- package/dist/store/import-sort.js.map +0 -1
- package/dist/store/index.d.ts +0 -28
- package/dist/store/index.d.ts.map +0 -1
- package/dist/store/index.js +0 -28
- package/dist/store/index.js.map +0 -1
- package/dist/store/json.d.ts +0 -57
- package/dist/store/json.d.ts.map +0 -1
- package/dist/store/json.js +0 -208
- package/dist/store/json.js.map +0 -1
- package/dist/store/lifecycle-store.d.ts +0 -125
- package/dist/store/lifecycle-store.d.ts.map +0 -1
- package/dist/store/lifecycle-store.js +0 -249
- package/dist/store/lifecycle-store.js.map +0 -1
- package/dist/store/lock.d.ts +0 -29
- package/dist/store/lock.d.ts.map +0 -1
- package/dist/store/lock.js +0 -70
- package/dist/store/lock.js.map +0 -1
- package/dist/store/migration-sqlite.d.ts +0 -68
- package/dist/store/migration-sqlite.d.ts.map +0 -1
- package/dist/store/migration-sqlite.js +0 -671
- package/dist/store/migration-sqlite.js.map +0 -1
- package/dist/store/nexus-schema.d.ts +0 -503
- package/dist/store/nexus-schema.d.ts.map +0 -1
- package/dist/store/nexus-schema.js +0 -62
- package/dist/store/nexus-schema.js.map +0 -1
- package/dist/store/nexus-sqlite.d.ts +0 -58
- package/dist/store/nexus-sqlite.d.ts.map +0 -1
- package/dist/store/nexus-sqlite.js +0 -211
- package/dist/store/nexus-sqlite.js.map +0 -1
- package/dist/store/nexus-validation-schemas.d.ts +0 -970
- package/dist/store/nexus-validation-schemas.d.ts.map +0 -1
- package/dist/store/nexus-validation-schemas.js +0 -41
- package/dist/store/nexus-validation-schemas.js.map +0 -1
- package/dist/store/parsers.d.ts +0 -16
- package/dist/store/parsers.d.ts.map +0 -1
- package/dist/store/parsers.js +0 -37
- package/dist/store/parsers.js.map +0 -1
- package/dist/store/project-detect.d.ts +0 -56
- package/dist/store/project-detect.d.ts.map +0 -1
- package/dist/store/project-detect.js +0 -457
- package/dist/store/project-detect.js.map +0 -1
- package/dist/store/provider.d.ts +0 -148
- package/dist/store/provider.d.ts.map +0 -1
- package/dist/store/provider.js +0 -101
- package/dist/store/provider.js.map +0 -1
- package/dist/store/safety-data-accessor.d.ts +0 -124
- package/dist/store/safety-data-accessor.d.ts.map +0 -1
- package/dist/store/safety-data-accessor.js +0 -243
- package/dist/store/safety-data-accessor.js.map +0 -1
- package/dist/store/schema.d.ts +0 -7
- package/dist/store/schema.d.ts.map +0 -1
- package/dist/store/schema.js +0 -7
- package/dist/store/schema.js.map +0 -1
- package/dist/store/session-store.d.ts +0 -42
- package/dist/store/session-store.d.ts.map +0 -1
- package/dist/store/session-store.js +0 -219
- package/dist/store/session-store.js.map +0 -1
- package/dist/store/sqlite-backup.d.ts +0 -34
- package/dist/store/sqlite-backup.d.ts.map +0 -1
- package/dist/store/sqlite-backup.js +0 -105
- package/dist/store/sqlite-backup.js.map +0 -1
- package/dist/store/sqlite-data-accessor.d.ts +0 -26
- package/dist/store/sqlite-data-accessor.d.ts.map +0 -1
- package/dist/store/sqlite-data-accessor.js +0 -742
- package/dist/store/sqlite-data-accessor.js.map +0 -1
- package/dist/store/sqlite.d.ts +0 -106
- package/dist/store/sqlite.d.ts.map +0 -1
- package/dist/store/sqlite.js +0 -481
- package/dist/store/sqlite.js.map +0 -1
- package/dist/store/status-registry.d.ts +0 -9
- package/dist/store/status-registry.d.ts.map +0 -1
- package/dist/store/status-registry.js +0 -8
- package/dist/store/status-registry.js.map +0 -1
- package/dist/store/task-store.d.ts +0 -69
- package/dist/store/task-store.d.ts.map +0 -1
- package/dist/store/task-store.js +0 -344
- package/dist/store/task-store.js.map +0 -1
- package/dist/store/tasks-schema.d.ts +0 -3873
- package/dist/store/tasks-schema.d.ts.map +0 -1
- package/dist/store/tasks-schema.js +0 -496
- package/dist/store/tasks-schema.js.map +0 -1
- package/dist/store/validation-schemas.d.ts +0 -6670
- package/dist/store/validation-schemas.d.ts.map +0 -1
- package/dist/store/validation-schemas.js +0 -95
- package/dist/store/validation-schemas.js.map +0 -1
- package/dist/system/archive-analytics.d.ts +0 -148
- package/dist/system/archive-analytics.d.ts.map +0 -1
- package/dist/system/archive-analytics.js +0 -277
- package/dist/system/archive-analytics.js.map +0 -1
- package/dist/system/archive-stats.d.ts +0 -21
- package/dist/system/archive-stats.d.ts.map +0 -1
- package/dist/system/archive-stats.js +0 -64
- package/dist/system/archive-stats.js.map +0 -1
- package/dist/system/audit.d.ts +0 -25
- package/dist/system/audit.d.ts.map +0 -1
- package/dist/system/audit.js +0 -145
- package/dist/system/audit.js.map +0 -1
- package/dist/system/backup.d.ts +0 -28
- package/dist/system/backup.d.ts.map +0 -1
- package/dist/system/backup.js +0 -99
- package/dist/system/backup.js.map +0 -1
- package/dist/system/cleanup.d.ts +0 -20
- package/dist/system/cleanup.d.ts.map +0 -1
- package/dist/system/cleanup.js +0 -134
- package/dist/system/cleanup.js.map +0 -1
- package/dist/system/health.d.ts +0 -124
- package/dist/system/health.d.ts.map +0 -1
- package/dist/system/health.js +0 -1044
- package/dist/system/health.js.map +0 -1
- package/dist/system/index.d.ts +0 -31
- package/dist/system/index.d.ts.map +0 -1
- package/dist/system/index.js +0 -18
- package/dist/system/index.js.map +0 -1
- package/dist/system/inject-generate.d.ts +0 -13
- package/dist/system/inject-generate.d.ts.map +0 -1
- package/dist/system/inject-generate.js +0 -126
- package/dist/system/inject-generate.js.map +0 -1
- package/dist/system/labels.d.ts +0 -18
- package/dist/system/labels.d.ts.map +0 -1
- package/dist/system/labels.js +0 -38
- package/dist/system/labels.js.map +0 -1
- package/dist/system/metrics.d.ts +0 -30
- package/dist/system/metrics.d.ts.map +0 -1
- package/dist/system/metrics.js +0 -61
- package/dist/system/metrics.js.map +0 -1
- package/dist/system/migrate.d.ts +0 -19
- package/dist/system/migrate.d.ts.map +0 -1
- package/dist/system/migrate.js +0 -43
- package/dist/system/migrate.js.map +0 -1
- package/dist/system/platform-paths.d.ts +0 -61
- package/dist/system/platform-paths.d.ts.map +0 -1
- package/dist/system/platform-paths.js +0 -80
- package/dist/system/platform-paths.js.map +0 -1
- package/dist/system/runtime.d.ts +0 -38
- package/dist/system/runtime.d.ts.map +0 -1
- package/dist/system/runtime.js +0 -161
- package/dist/system/runtime.js.map +0 -1
- package/dist/system/safestop.d.ts +0 -35
- package/dist/system/safestop.d.ts.map +0 -1
- package/dist/system/safestop.js +0 -96
- package/dist/system/safestop.js.map +0 -1
- package/dist/system/storage-preflight.d.ts +0 -42
- package/dist/system/storage-preflight.d.ts.map +0 -1
- package/dist/system/storage-preflight.js +0 -123
- package/dist/system/storage-preflight.js.map +0 -1
- package/dist/task-work/index.d.ts +0 -60
- package/dist/task-work/index.d.ts.map +0 -1
- package/dist/task-work/index.js +0 -157
- package/dist/task-work/index.js.map +0 -1
- package/dist/task-work/todowrite-merge.d.ts +0 -80
- package/dist/task-work/todowrite-merge.d.ts.map +0 -1
- package/dist/task-work/todowrite-merge.js +0 -204
- package/dist/task-work/todowrite-merge.js.map +0 -1
- package/dist/tasks/add.d.ts +0 -123
- package/dist/tasks/add.d.ts.map +0 -1
- package/dist/tasks/add.js +0 -494
- package/dist/tasks/add.js.map +0 -1
- package/dist/tasks/analyze.d.ts +0 -16
- package/dist/tasks/analyze.d.ts.map +0 -1
- package/dist/tasks/analyze.js +0 -85
- package/dist/tasks/analyze.js.map +0 -1
- package/dist/tasks/archive.d.ts +0 -31
- package/dist/tasks/archive.d.ts.map +0 -1
- package/dist/tasks/archive.js +0 -90
- package/dist/tasks/archive.js.map +0 -1
- package/dist/tasks/atomicity.d.ts +0 -21
- package/dist/tasks/atomicity.d.ts.map +0 -1
- package/dist/tasks/atomicity.js +0 -83
- package/dist/tasks/atomicity.js.map +0 -1
- package/dist/tasks/cancel-ops.d.ts +0 -42
- package/dist/tasks/cancel-ops.d.ts.map +0 -1
- package/dist/tasks/cancel-ops.js +0 -83
- package/dist/tasks/cancel-ops.js.map +0 -1
- package/dist/tasks/complete.d.ts +0 -26
- package/dist/tasks/complete.d.ts.map +0 -1
- package/dist/tasks/complete.js +0 -224
- package/dist/tasks/complete.js.map +0 -1
- package/dist/tasks/crossref-extract.d.ts +0 -39
- package/dist/tasks/crossref-extract.d.ts.map +0 -1
- package/dist/tasks/crossref-extract.js +0 -73
- package/dist/tasks/crossref-extract.js.map +0 -1
- package/dist/tasks/delete-preview.d.ts +0 -69
- package/dist/tasks/delete-preview.d.ts.map +0 -1
- package/dist/tasks/delete-preview.js +0 -192
- package/dist/tasks/delete-preview.js.map +0 -1
- package/dist/tasks/delete.d.ts +0 -24
- package/dist/tasks/delete.d.ts.map +0 -1
- package/dist/tasks/delete.js +0 -120
- package/dist/tasks/delete.js.map +0 -1
- package/dist/tasks/deletion-strategy.d.ts +0 -46
- package/dist/tasks/deletion-strategy.d.ts.map +0 -1
- package/dist/tasks/deletion-strategy.js +0 -200
- package/dist/tasks/deletion-strategy.js.map +0 -1
- package/dist/tasks/dependency-check.d.ts +0 -82
- package/dist/tasks/dependency-check.d.ts.map +0 -1
- package/dist/tasks/dependency-check.js +0 -278
- package/dist/tasks/dependency-check.js.map +0 -1
- package/dist/tasks/deps-ready.d.ts +0 -22
- package/dist/tasks/deps-ready.d.ts.map +0 -1
- package/dist/tasks/deps-ready.js +0 -32
- package/dist/tasks/deps-ready.js.map +0 -1
- package/dist/tasks/find.d.ts +0 -48
- package/dist/tasks/find.d.ts.map +0 -1
- package/dist/tasks/find.js +0 -148
- package/dist/tasks/find.js.map +0 -1
- package/dist/tasks/graph-cache.d.ts +0 -70
- package/dist/tasks/graph-cache.d.ts.map +0 -1
- package/dist/tasks/graph-cache.js +0 -127
- package/dist/tasks/graph-cache.js.map +0 -1
- package/dist/tasks/graph-ops.d.ts +0 -36
- package/dist/tasks/graph-ops.d.ts.map +0 -1
- package/dist/tasks/graph-ops.js +0 -171
- package/dist/tasks/graph-ops.js.map +0 -1
- package/dist/tasks/graph-rag.d.ts +0 -49
- package/dist/tasks/graph-rag.d.ts.map +0 -1
- package/dist/tasks/graph-rag.js +0 -328
- package/dist/tasks/graph-rag.js.map +0 -1
- package/dist/tasks/hierarchy-policy.d.ts +0 -62
- package/dist/tasks/hierarchy-policy.d.ts.map +0 -1
- package/dist/tasks/hierarchy-policy.js +0 -149
- package/dist/tasks/hierarchy-policy.js.map +0 -1
- package/dist/tasks/hierarchy.d.ts +0 -85
- package/dist/tasks/hierarchy.d.ts.map +0 -1
- package/dist/tasks/hierarchy.js +0 -185
- package/dist/tasks/hierarchy.js.map +0 -1
- package/dist/tasks/id-generator.d.ts +0 -28
- package/dist/tasks/id-generator.d.ts.map +0 -1
- package/dist/tasks/id-generator.js +0 -65
- package/dist/tasks/id-generator.js.map +0 -1
- package/dist/tasks/index.d.ts +0 -14
- package/dist/tasks/index.d.ts.map +0 -1
- package/dist/tasks/index.js +0 -14
- package/dist/tasks/index.js.map +0 -1
- package/dist/tasks/labels.d.ts +0 -19
- package/dist/tasks/labels.d.ts.map +0 -1
- package/dist/tasks/labels.js +0 -52
- package/dist/tasks/labels.js.map +0 -1
- package/dist/tasks/list.d.ts +0 -49
- package/dist/tasks/list.d.ts.map +0 -1
- package/dist/tasks/list.js +0 -68
- package/dist/tasks/list.js.map +0 -1
- package/dist/tasks/phase-tracking.d.ts +0 -61
- package/dist/tasks/phase-tracking.d.ts.map +0 -1
- package/dist/tasks/phase-tracking.js +0 -133
- package/dist/tasks/phase-tracking.js.map +0 -1
- package/dist/tasks/plan.d.ts +0 -53
- package/dist/tasks/plan.d.ts.map +0 -1
- package/dist/tasks/plan.js +0 -268
- package/dist/tasks/plan.js.map +0 -1
- package/dist/tasks/relates.d.ts +0 -18
- package/dist/tasks/relates.d.ts.map +0 -1
- package/dist/tasks/relates.js +0 -89
- package/dist/tasks/relates.js.map +0 -1
- package/dist/tasks/reparent.d.ts +0 -38
- package/dist/tasks/reparent.d.ts.map +0 -1
- package/dist/tasks/reparent.js +0 -90
- package/dist/tasks/reparent.js.map +0 -1
- package/dist/tasks/show.d.ts +0 -23
- package/dist/tasks/show.d.ts.map +0 -1
- package/dist/tasks/show.js +0 -78
- package/dist/tasks/show.js.map +0 -1
- package/dist/tasks/size-weighting.d.ts +0 -38
- package/dist/tasks/size-weighting.d.ts.map +0 -1
- package/dist/tasks/size-weighting.js +0 -86
- package/dist/tasks/size-weighting.js.map +0 -1
- package/dist/tasks/staleness.d.ts +0 -56
- package/dist/tasks/staleness.d.ts.map +0 -1
- package/dist/tasks/staleness.js +0 -86
- package/dist/tasks/staleness.js.map +0 -1
- package/dist/tasks/task-ops.d.ts +0 -322
- package/dist/tasks/task-ops.d.ts.map +0 -1
- package/dist/tasks/task-ops.js +0 -1340
- package/dist/tasks/task-ops.js.map +0 -1
- package/dist/tasks/update.d.ts +0 -41
- package/dist/tasks/update.d.ts.map +0 -1
- package/dist/tasks/update.js +0 -234
- package/dist/tasks/update.js.map +0 -1
- package/dist/templates/index.d.ts +0 -11
- package/dist/templates/index.d.ts.map +0 -1
- package/dist/templates/index.js +0 -10
- package/dist/templates/index.js.map +0 -1
- package/dist/templates/parser.d.ts +0 -84
- package/dist/templates/parser.d.ts.map +0 -1
- package/dist/templates/parser.js +0 -254
- package/dist/templates/parser.js.map +0 -1
- package/dist/ui/aliases.d.ts +0 -43
- package/dist/ui/aliases.d.ts.map +0 -1
- package/dist/ui/aliases.js +0 -153
- package/dist/ui/aliases.js.map +0 -1
- package/dist/ui/changelog.d.ts +0 -58
- package/dist/ui/changelog.d.ts.map +0 -1
- package/dist/ui/changelog.js +0 -184
- package/dist/ui/changelog.js.map +0 -1
- package/dist/ui/command-registry.d.ts +0 -44
- package/dist/ui/command-registry.d.ts.map +0 -1
- package/dist/ui/command-registry.js +0 -168
- package/dist/ui/command-registry.js.map +0 -1
- package/dist/ui/flags.d.ts +0 -34
- package/dist/ui/flags.d.ts.map +0 -1
- package/dist/ui/flags.js +0 -94
- package/dist/ui/flags.js.map +0 -1
- package/dist/ui/index.d.ts +0 -16
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/ui/index.js +0 -26
- package/dist/ui/index.js.map +0 -1
- package/dist/ui/injection-legacy.d.ts +0 -26
- package/dist/ui/injection-legacy.d.ts.map +0 -1
- package/dist/ui/injection-legacy.js +0 -42
- package/dist/ui/injection-legacy.js.map +0 -1
- package/dist/upgrade.d.ts +0 -59
- package/dist/upgrade.d.ts.map +0 -1
- package/dist/upgrade.js +0 -862
- package/dist/upgrade.js.map +0 -1
- package/dist/validation/chain-validation.d.ts +0 -43
- package/dist/validation/chain-validation.d.ts.map +0 -1
- package/dist/validation/chain-validation.js +0 -146
- package/dist/validation/chain-validation.js.map +0 -1
- package/dist/validation/compliance.d.ts +0 -94
- package/dist/validation/compliance.d.ts.map +0 -1
- package/dist/validation/compliance.js +0 -155
- package/dist/validation/compliance.js.map +0 -1
- package/dist/validation/docs-sync.d.ts +0 -66
- package/dist/validation/docs-sync.d.ts.map +0 -1
- package/dist/validation/docs-sync.js +0 -212
- package/dist/validation/docs-sync.js.map +0 -1
- package/dist/validation/doctor/checks.d.ts +0 -125
- package/dist/validation/doctor/checks.d.ts.map +0 -1
- package/dist/validation/doctor/checks.js +0 -1046
- package/dist/validation/doctor/checks.js.map +0 -1
- package/dist/validation/doctor/index.d.ts +0 -9
- package/dist/validation/doctor/index.d.ts.map +0 -1
- package/dist/validation/doctor/index.js +0 -9
- package/dist/validation/doctor/index.js.map +0 -1
- package/dist/validation/doctor/project-cache.d.ts +0 -77
- package/dist/validation/doctor/project-cache.d.ts.map +0 -1
- package/dist/validation/doctor/project-cache.js +0 -160
- package/dist/validation/doctor/project-cache.js.map +0 -1
- package/dist/validation/doctor/utils.d.ts +0 -68
- package/dist/validation/doctor/utils.d.ts.map +0 -1
- package/dist/validation/doctor/utils.js +0 -155
- package/dist/validation/doctor/utils.js.map +0 -1
- package/dist/validation/engine.d.ts +0 -171
- package/dist/validation/engine.d.ts.map +0 -1
- package/dist/validation/engine.js +0 -903
- package/dist/validation/engine.js.map +0 -1
- package/dist/validation/gap-check.d.ts +0 -74
- package/dist/validation/gap-check.d.ts.map +0 -1
- package/dist/validation/gap-check.js +0 -175
- package/dist/validation/gap-check.js.map +0 -1
- package/dist/validation/index.d.ts +0 -18
- package/dist/validation/index.d.ts.map +0 -1
- package/dist/validation/index.js +0 -26
- package/dist/validation/index.js.map +0 -1
- package/dist/validation/manifest.d.ts +0 -81
- package/dist/validation/manifest.d.ts.map +0 -1
- package/dist/validation/manifest.js +0 -237
- package/dist/validation/manifest.js.map +0 -1
- package/dist/validation/operation-gate-validators.d.ts +0 -96
- package/dist/validation/operation-gate-validators.d.ts.map +0 -1
- package/dist/validation/operation-gate-validators.js +0 -724
- package/dist/validation/operation-gate-validators.js.map +0 -1
- package/dist/validation/operation-verification-gates.d.ts +0 -274
- package/dist/validation/operation-verification-gates.d.ts.map +0 -1
- package/dist/validation/operation-verification-gates.js +0 -532
- package/dist/validation/operation-verification-gates.js.map +0 -1
- package/dist/validation/param-utils.d.ts +0 -121
- package/dist/validation/param-utils.d.ts.map +0 -1
- package/dist/validation/param-utils.js +0 -139
- package/dist/validation/param-utils.js.map +0 -1
- package/dist/validation/protocol-common.d.ts +0 -77
- package/dist/validation/protocol-common.d.ts.map +0 -1
- package/dist/validation/protocol-common.js +0 -250
- package/dist/validation/protocol-common.js.map +0 -1
- package/dist/validation/protocols/consensus.d.ts +0 -28
- package/dist/validation/protocols/consensus.d.ts.map +0 -1
- package/dist/validation/protocols/consensus.js +0 -71
- package/dist/validation/protocols/consensus.js.map +0 -1
- package/dist/validation/protocols/contribution.d.ts +0 -26
- package/dist/validation/protocols/contribution.d.ts.map +0 -1
- package/dist/validation/protocols/contribution.js +0 -59
- package/dist/validation/protocols/contribution.js.map +0 -1
- package/dist/validation/protocols/decomposition.d.ts +0 -28
- package/dist/validation/protocols/decomposition.d.ts.map +0 -1
- package/dist/validation/protocols/decomposition.js +0 -59
- package/dist/validation/protocols/decomposition.js.map +0 -1
- package/dist/validation/protocols/implementation.d.ts +0 -26
- package/dist/validation/protocols/implementation.d.ts.map +0 -1
- package/dist/validation/protocols/implementation.js +0 -59
- package/dist/validation/protocols/implementation.js.map +0 -1
- package/dist/validation/protocols/release-protocol.d.ts +0 -27
- package/dist/validation/protocols/release-protocol.d.ts.map +0 -1
- package/dist/validation/protocols/release-protocol.js +0 -60
- package/dist/validation/protocols/release-protocol.js.map +0 -1
- package/dist/validation/protocols/research.d.ts +0 -26
- package/dist/validation/protocols/research.d.ts.map +0 -1
- package/dist/validation/protocols/research.js +0 -77
- package/dist/validation/protocols/research.js.map +0 -1
- package/dist/validation/protocols/specification.d.ts +0 -28
- package/dist/validation/protocols/specification.d.ts.map +0 -1
- package/dist/validation/protocols/specification.js +0 -84
- package/dist/validation/protocols/specification.js.map +0 -1
- package/dist/validation/protocols/testing-protocol.d.ts +0 -27
- package/dist/validation/protocols/testing-protocol.d.ts.map +0 -1
- package/dist/validation/protocols/testing-protocol.js +0 -70
- package/dist/validation/protocols/testing-protocol.js.map +0 -1
- package/dist/validation/protocols/validation-protocol.d.ts +0 -27
- package/dist/validation/protocols/validation-protocol.d.ts.map +0 -1
- package/dist/validation/protocols/validation-protocol.js +0 -70
- package/dist/validation/protocols/validation-protocol.js.map +0 -1
- package/dist/validation/schema-integrity.d.ts +0 -42
- package/dist/validation/schema-integrity.d.ts.map +0 -1
- package/dist/validation/schema-integrity.js +0 -170
- package/dist/validation/schema-integrity.js.map +0 -1
- package/dist/validation/schema-validator.d.ts +0 -52
- package/dist/validation/schema-validator.d.ts.map +0 -1
- package/dist/validation/schema-validator.js +0 -176
- package/dist/validation/schema-validator.js.map +0 -1
- package/dist/validation/validate-ops.d.ts +0 -247
- package/dist/validation/validate-ops.d.ts.map +0 -1
- package/dist/validation/validate-ops.js +0 -935
- package/dist/validation/validate-ops.js.map +0 -1
- package/dist/validation/validation-rules.d.ts +0 -85
- package/dist/validation/validation-rules.d.ts.map +0 -1
- package/dist/validation/validation-rules.js +0 -226
- package/dist/validation/validation-rules.js.map +0 -1
- package/dist/validation/verification.d.ts +0 -153
- package/dist/validation/verification.d.ts.map +0 -1
- package/dist/validation/verification.js +0 -321
- package/dist/validation/verification.js.map +0 -1
- package/src/adapters/__tests__/claude-code-adapter.test.d.ts +0 -10
- package/src/adapters/__tests__/claude-code-adapter.test.d.ts.map +0 -1
- package/src/adapters/__tests__/claude-code-adapter.test.js +0 -192
- package/src/adapters/__tests__/claude-code-adapter.test.js.map +0 -1
- package/src/adapters/__tests__/claude-code-adapter.test.ts +0 -235
- package/src/adapters/__tests__/cursor-adapter.test.d.ts +0 -10
- package/src/adapters/__tests__/cursor-adapter.test.d.ts.map +0 -1
- package/src/adapters/__tests__/cursor-adapter.test.js +0 -196
- package/src/adapters/__tests__/cursor-adapter.test.js.map +0 -1
- package/src/adapters/__tests__/cursor-adapter.test.ts +0 -246
- package/src/adapters/__tests__/opencode-adapter.test.d.ts +0 -10
- package/src/adapters/__tests__/opencode-adapter.test.d.ts.map +0 -1
- package/src/adapters/__tests__/opencode-adapter.test.js +0 -204
- package/src/adapters/__tests__/opencode-adapter.test.js.map +0 -1
- package/src/adapters/__tests__/opencode-adapter.test.ts +0 -250
package/dist/scaffold.js
DELETED
|
@@ -1,1080 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Directory & file scaffolding utilities.
|
|
3
|
-
*
|
|
4
|
-
* Shared ensure/check functions extracted from init.ts for reuse
|
|
5
|
-
* by init.ts, upgrade.ts, and doctor health checks.
|
|
6
|
-
*
|
|
7
|
-
* Rules:
|
|
8
|
-
* - All ensure functions are idempotent (safe to call multiple times)
|
|
9
|
-
* - All check functions are read-only (no side effects)
|
|
10
|
-
* - Uses imports from ./paths.js for path resolution
|
|
11
|
-
*/
|
|
12
|
-
import { execFile } from 'node:child_process';
|
|
13
|
-
import { randomUUID } from 'node:crypto';
|
|
14
|
-
import { existsSync, constants as fsConstants, readFileSync, statSync } from 'node:fs';
|
|
15
|
-
import { access, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
16
|
-
import { dirname, join, resolve } from 'node:path';
|
|
17
|
-
import { fileURLToPath } from 'node:url';
|
|
18
|
-
import { promisify } from 'node:util';
|
|
19
|
-
import { saveJson } from './store/json.js';
|
|
20
|
-
import { generateProjectHash } from './nexus/hash.js';
|
|
21
|
-
import { getCleoDirAbsolute, getCleoHome, getCleoTemplatesDir, getConfigPath } from './paths.js';
|
|
22
|
-
const execFileAsync = promisify(execFile);
|
|
23
|
-
// ── Constants ────────────────────────────────────────────────────────
|
|
24
|
-
/** Required subdirectories under .cleo/. */
|
|
25
|
-
export const REQUIRED_CLEO_SUBDIRS = [
|
|
26
|
-
'backups/operational',
|
|
27
|
-
'backups/safety',
|
|
28
|
-
'agent-outputs',
|
|
29
|
-
'logs',
|
|
30
|
-
'rcasd',
|
|
31
|
-
'adrs',
|
|
32
|
-
];
|
|
33
|
-
/** Embedded fallback for .cleo/.gitignore content (deny-by-default). */
|
|
34
|
-
export const CLEO_GITIGNORE_FALLBACK = `# .cleo/.gitignore — Deny-by-default for CLEO project data
|
|
35
|
-
# Ignore everything, then explicitly allow only tracked files.
|
|
36
|
-
|
|
37
|
-
# Step 1: Ignore everything
|
|
38
|
-
*
|
|
39
|
-
|
|
40
|
-
# Allow list
|
|
41
|
-
!.gitignore
|
|
42
|
-
!config.json
|
|
43
|
-
!project-context.json
|
|
44
|
-
!project-info.json
|
|
45
|
-
!setup-otel.sh
|
|
46
|
-
!DATA-SAFETY-IMPLEMENTATION-SUMMARY.md
|
|
47
|
-
!adrs/
|
|
48
|
-
!adrs/**
|
|
49
|
-
!rcasd/
|
|
50
|
-
!rcasd/**
|
|
51
|
-
!agent-outputs/
|
|
52
|
-
!agent-outputs/**
|
|
53
|
-
|
|
54
|
-
# Explicit deny safety net
|
|
55
|
-
*.db
|
|
56
|
-
*.db-shm
|
|
57
|
-
*.db-wal
|
|
58
|
-
*.db-journal
|
|
59
|
-
log.json
|
|
60
|
-
bypass-log.json
|
|
61
|
-
qa-log.json
|
|
62
|
-
.deps-cache/
|
|
63
|
-
.context-alert-state.json
|
|
64
|
-
.context-state*.json
|
|
65
|
-
context-states/
|
|
66
|
-
.git-checkpoint-state
|
|
67
|
-
.migration-state.json
|
|
68
|
-
migrations.json
|
|
69
|
-
sync/
|
|
70
|
-
metrics/
|
|
71
|
-
.backups/
|
|
72
|
-
backups/
|
|
73
|
-
`;
|
|
74
|
-
// ── Pure helpers ─────────────────────────────────────────────────────
|
|
75
|
-
/**
|
|
76
|
-
* Check if a file exists and is readable.
|
|
77
|
-
*/
|
|
78
|
-
export async function fileExists(path) {
|
|
79
|
-
try {
|
|
80
|
-
await access(path, fsConstants.R_OK);
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
catch {
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Strip legacy <!-- CLEO:START -->...<!-- CLEO:END --> blocks from a file.
|
|
89
|
-
* Called before CAAMP injection to prevent competing blocks.
|
|
90
|
-
*/
|
|
91
|
-
export async function stripCLEOBlocks(filePath) {
|
|
92
|
-
if (!existsSync(filePath))
|
|
93
|
-
return;
|
|
94
|
-
const content = await readFile(filePath, 'utf8');
|
|
95
|
-
const stripped = content.replace(/\n?<!-- CLEO:START -->[\s\S]*?<!-- CLEO:END -->\n?/g, '');
|
|
96
|
-
if (stripped !== content)
|
|
97
|
-
await writeFile(filePath, stripped, 'utf8');
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Remove .cleo/ or .cleo entries from the project root .gitignore.
|
|
101
|
-
*/
|
|
102
|
-
export async function removeCleoFromRootGitignore(projectRoot) {
|
|
103
|
-
const rootGitignorePath = join(projectRoot, '.gitignore');
|
|
104
|
-
if (!(await fileExists(rootGitignorePath))) {
|
|
105
|
-
return { removed: false };
|
|
106
|
-
}
|
|
107
|
-
const content = await readFile(rootGitignorePath, 'utf-8');
|
|
108
|
-
const lines = content.split('\n');
|
|
109
|
-
const filtered = lines.filter((line) => {
|
|
110
|
-
const trimmed = line.trim();
|
|
111
|
-
return !/^\/?\.cleo\/?(\*)?$/.test(trimmed);
|
|
112
|
-
});
|
|
113
|
-
if (filtered.length === lines.length) {
|
|
114
|
-
return { removed: false };
|
|
115
|
-
}
|
|
116
|
-
await writeFile(rootGitignorePath, filtered.join('\n'));
|
|
117
|
-
return { removed: true };
|
|
118
|
-
}
|
|
119
|
-
// generateProjectHash moved to src/core/nexus/hash.ts (canonical location)
|
|
120
|
-
export { generateProjectHash } from './nexus/hash.js';
|
|
121
|
-
/**
|
|
122
|
-
* Resolve the package root directory (where schemas/ and templates/ live).
|
|
123
|
-
* scaffold.ts lives in packages/core/src/, so 1 level up reaches the package root.
|
|
124
|
-
*/
|
|
125
|
-
export function getPackageRoot() {
|
|
126
|
-
const thisFile = fileURLToPath(import.meta.url);
|
|
127
|
-
return resolve(dirname(thisFile), '..');
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Load the gitignore template from the package's templates/ directory.
|
|
131
|
-
* Falls back to embedded content if file not found.
|
|
132
|
-
*/
|
|
133
|
-
export function getGitignoreContent() {
|
|
134
|
-
try {
|
|
135
|
-
const packageRoot = getPackageRoot();
|
|
136
|
-
const templatePath = join(packageRoot, 'templates', 'cleo-gitignore');
|
|
137
|
-
if (existsSync(templatePath)) {
|
|
138
|
-
return readFileSync(templatePath, 'utf-8');
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
catch {
|
|
142
|
-
// fallback
|
|
143
|
-
}
|
|
144
|
-
return CLEO_GITIGNORE_FALLBACK;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Read CLEO version from package.json.
|
|
148
|
-
*/
|
|
149
|
-
export function getCleoVersion() {
|
|
150
|
-
try {
|
|
151
|
-
const pkgPath = join(getPackageRoot(), 'package.json');
|
|
152
|
-
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
153
|
-
return pkg.version ?? '0.0.0';
|
|
154
|
-
}
|
|
155
|
-
catch {
|
|
156
|
-
return '0.0.0';
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Create default config.json content.
|
|
161
|
-
*/
|
|
162
|
-
/**
|
|
163
|
-
* Detect whether projectRoot is the CLEO source repository itself.
|
|
164
|
-
* Verified by fingerprinting the expected source layout and package identity.
|
|
165
|
-
* Only the canonical CLEO repository matches all criteria (ADR-029).
|
|
166
|
-
*/
|
|
167
|
-
function isCleoContributorProject(projectRoot) {
|
|
168
|
-
const exists = (p) => existsSync(join(projectRoot, p));
|
|
169
|
-
// Must have all three canonical source directories
|
|
170
|
-
if (!exists('src/mcp') || !exists('src/dispatch') || !exists('src/core'))
|
|
171
|
-
return false;
|
|
172
|
-
// Must have package.json identifying as @cleocode/cleo
|
|
173
|
-
try {
|
|
174
|
-
const pkg = JSON.parse(readFileSync(join(projectRoot, 'package.json'), 'utf-8'));
|
|
175
|
-
return pkg.name === '@cleocode/cleo';
|
|
176
|
-
}
|
|
177
|
-
catch {
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
export function createDefaultConfig() {
|
|
182
|
-
return {
|
|
183
|
-
version: '2.10.0',
|
|
184
|
-
output: {
|
|
185
|
-
defaultFormat: 'json',
|
|
186
|
-
showColor: true,
|
|
187
|
-
showUnicode: true,
|
|
188
|
-
dateFormat: 'relative',
|
|
189
|
-
},
|
|
190
|
-
backup: {
|
|
191
|
-
maxOperationalBackups: 10,
|
|
192
|
-
maxSafetyBackups: 5,
|
|
193
|
-
},
|
|
194
|
-
hierarchy: {
|
|
195
|
-
maxDepth: 3,
|
|
196
|
-
maxSiblings: 0,
|
|
197
|
-
},
|
|
198
|
-
session: {
|
|
199
|
-
autoStart: false,
|
|
200
|
-
multiSession: false,
|
|
201
|
-
},
|
|
202
|
-
lifecycle: {
|
|
203
|
-
mode: 'strict',
|
|
204
|
-
},
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
// ── ensure* functions (idempotent) ───────────────────────────────────
|
|
208
|
-
/**
|
|
209
|
-
* Create .cleo/ directory and all required subdirectories.
|
|
210
|
-
* Idempotent: skips directories that already exist.
|
|
211
|
-
*/
|
|
212
|
-
export async function ensureCleoStructure(projectRoot) {
|
|
213
|
-
// Guard: reject global home as project root to prevent project-level
|
|
214
|
-
// subdirectories (adrs/, rcasd/, backups/, etc.) from polluting ~/.cleo/
|
|
215
|
-
const resolvedRoot = resolve(projectRoot);
|
|
216
|
-
if (resolvedRoot === resolve(getCleoHome())) {
|
|
217
|
-
return {
|
|
218
|
-
action: 'skipped',
|
|
219
|
-
path: join(resolvedRoot, '.cleo'),
|
|
220
|
-
details: 'Refused to scaffold project structure inside global CLEO home',
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
224
|
-
const alreadyExists = existsSync(cleoDir);
|
|
225
|
-
await mkdir(cleoDir, { recursive: true });
|
|
226
|
-
for (const subdir of REQUIRED_CLEO_SUBDIRS) {
|
|
227
|
-
await mkdir(join(cleoDir, subdir), { recursive: true });
|
|
228
|
-
}
|
|
229
|
-
return {
|
|
230
|
-
action: alreadyExists ? 'skipped' : 'created',
|
|
231
|
-
path: cleoDir,
|
|
232
|
-
details: alreadyExists
|
|
233
|
-
? 'Directory already existed, ensured subdirs'
|
|
234
|
-
: `Created .cleo/ with ${REQUIRED_CLEO_SUBDIRS.length} subdirectories`,
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Create or repair .cleo/.gitignore from template.
|
|
239
|
-
* Idempotent: skips if file already exists with correct content.
|
|
240
|
-
*/
|
|
241
|
-
export async function ensureGitignore(projectRoot) {
|
|
242
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
243
|
-
const gitignorePath = join(cleoDir, '.gitignore');
|
|
244
|
-
const templateContent = getGitignoreContent();
|
|
245
|
-
if (existsSync(gitignorePath)) {
|
|
246
|
-
const existing = readFileSync(gitignorePath, 'utf-8');
|
|
247
|
-
const normalize = (s) => s.trim().replace(/\r\n/g, '\n');
|
|
248
|
-
if (normalize(existing) === normalize(templateContent)) {
|
|
249
|
-
return { action: 'skipped', path: gitignorePath, details: 'Already matches template' };
|
|
250
|
-
}
|
|
251
|
-
await writeFile(gitignorePath, templateContent);
|
|
252
|
-
return { action: 'repaired', path: gitignorePath, details: 'Updated to match template' };
|
|
253
|
-
}
|
|
254
|
-
await writeFile(gitignorePath, templateContent);
|
|
255
|
-
return { action: 'created', path: gitignorePath };
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Create default config.json if missing.
|
|
259
|
-
* Idempotent: skips if file already exists.
|
|
260
|
-
*/
|
|
261
|
-
export async function ensureConfig(projectRoot, opts) {
|
|
262
|
-
const configPath = getConfigPath(projectRoot);
|
|
263
|
-
if (existsSync(configPath) && !opts?.force) {
|
|
264
|
-
// Backfill contributor block for existing configs that predate ADR-029
|
|
265
|
-
try {
|
|
266
|
-
const existing = JSON.parse(readFileSync(configPath, 'utf-8'));
|
|
267
|
-
if (!existing['contributor'] && isCleoContributorProject(projectRoot)) {
|
|
268
|
-
existing['contributor'] = {
|
|
269
|
-
isContributorProject: true,
|
|
270
|
-
devCli: 'cleo-dev',
|
|
271
|
-
verifiedAt: new Date().toISOString(),
|
|
272
|
-
};
|
|
273
|
-
await writeFile(configPath, JSON.stringify(existing, null, 2));
|
|
274
|
-
return {
|
|
275
|
-
action: 'repaired',
|
|
276
|
-
path: configPath,
|
|
277
|
-
details: 'Added contributor block (ADR-029)',
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
catch {
|
|
282
|
-
/* non-fatal */
|
|
283
|
-
}
|
|
284
|
-
return { action: 'skipped', path: configPath, details: 'Config already exists' };
|
|
285
|
-
}
|
|
286
|
-
const config = createDefaultConfig();
|
|
287
|
-
if (isCleoContributorProject(projectRoot)) {
|
|
288
|
-
config['contributor'] = {
|
|
289
|
-
isContributorProject: true,
|
|
290
|
-
devCli: 'cleo-dev',
|
|
291
|
-
verifiedAt: new Date().toISOString(),
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
await saveJson(configPath, config);
|
|
295
|
-
return {
|
|
296
|
-
action: existsSync(configPath) ? 'repaired' : 'created',
|
|
297
|
-
path: configPath,
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Create or refresh project-info.json.
|
|
302
|
-
* Idempotent: skips if file already exists (unless force).
|
|
303
|
-
*/
|
|
304
|
-
export async function ensureProjectInfo(projectRoot, opts) {
|
|
305
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
306
|
-
const projectInfoPath = join(cleoDir, 'project-info.json');
|
|
307
|
-
// Backfill projectId on existing files that lack it (T5333)
|
|
308
|
-
if (existsSync(projectInfoPath) && !opts?.force) {
|
|
309
|
-
try {
|
|
310
|
-
const existing = JSON.parse(readFileSync(projectInfoPath, 'utf-8'));
|
|
311
|
-
if (typeof existing.projectId !== 'string' || existing.projectId.length === 0) {
|
|
312
|
-
existing.projectId = randomUUID();
|
|
313
|
-
existing.lastUpdated = new Date().toISOString();
|
|
314
|
-
await writeFile(projectInfoPath, JSON.stringify(existing, null, 2));
|
|
315
|
-
return { action: 'repaired', path: projectInfoPath, details: 'Added projectId' };
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
catch {
|
|
319
|
-
// If parse fails, fall through to regenerate
|
|
320
|
-
}
|
|
321
|
-
return { action: 'skipped', path: projectInfoPath, details: 'Already exists' };
|
|
322
|
-
}
|
|
323
|
-
const projectHash = generateProjectHash(projectRoot);
|
|
324
|
-
const cleoVersion = getCleoVersion();
|
|
325
|
-
const now = new Date().toISOString();
|
|
326
|
-
const { readSchemaVersionFromFile } = await import('./validation/schema-integrity.js');
|
|
327
|
-
const { SQLITE_SCHEMA_VERSION } = await import('./store/sqlite.js');
|
|
328
|
-
const configSchemaVersion = readSchemaVersionFromFile('config.schema.json') ?? cleoVersion;
|
|
329
|
-
const projectContextSchemaVersion = readSchemaVersionFromFile('project-context.schema.json') ?? '1.0.0';
|
|
330
|
-
const projectInfo = {
|
|
331
|
-
$schema: './schemas/project-info.schema.json',
|
|
332
|
-
schemaVersion: '1.0.0',
|
|
333
|
-
projectId: randomUUID(),
|
|
334
|
-
projectHash,
|
|
335
|
-
cleoVersion,
|
|
336
|
-
lastUpdated: now,
|
|
337
|
-
schemas: {
|
|
338
|
-
config: configSchemaVersion,
|
|
339
|
-
sqlite: SQLITE_SCHEMA_VERSION,
|
|
340
|
-
projectContext: projectContextSchemaVersion,
|
|
341
|
-
},
|
|
342
|
-
injection: {
|
|
343
|
-
'CLAUDE.md': null,
|
|
344
|
-
'AGENTS.md': null,
|
|
345
|
-
'GEMINI.md': null,
|
|
346
|
-
},
|
|
347
|
-
health: {
|
|
348
|
-
status: 'unknown',
|
|
349
|
-
lastCheck: null,
|
|
350
|
-
issues: [],
|
|
351
|
-
},
|
|
352
|
-
features: {
|
|
353
|
-
multiSession: false,
|
|
354
|
-
verification: false,
|
|
355
|
-
contextAlerts: false,
|
|
356
|
-
},
|
|
357
|
-
};
|
|
358
|
-
await writeFile(projectInfoPath, JSON.stringify(projectInfo, null, 2));
|
|
359
|
-
return { action: 'created', path: projectInfoPath };
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Ensure .mcp.json contains a cleo-dev server entry pointing to the local build.
|
|
363
|
-
* Only runs when isCleoContributorProject() is true (ADR-029).
|
|
364
|
-
*
|
|
365
|
-
* Writes the server entry:
|
|
366
|
-
* cleo-dev → node <projectRoot>/dist/mcp/index.js
|
|
367
|
-
*
|
|
368
|
-
* This ensures Claude Code loads the LOCAL dev build MCP server for this project,
|
|
369
|
-
* not the published @cleocode/cleo@latest. Idempotent: preserves other entries.
|
|
370
|
-
*/
|
|
371
|
-
export async function ensureContributorMcp(projectRoot) {
|
|
372
|
-
if (!isCleoContributorProject(projectRoot)) {
|
|
373
|
-
return {
|
|
374
|
-
action: 'skipped',
|
|
375
|
-
path: join(projectRoot, '.mcp.json'),
|
|
376
|
-
details: 'Not a contributor project',
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
const mcpJsonPath = join(projectRoot, '.mcp.json');
|
|
380
|
-
const mcpEntry = {
|
|
381
|
-
command: 'node',
|
|
382
|
-
args: ['--disable-warning=ExperimentalWarning', join(projectRoot, 'dist', 'mcp', 'index.js')],
|
|
383
|
-
env: {},
|
|
384
|
-
};
|
|
385
|
-
let config = { mcpServers: {} };
|
|
386
|
-
if (existsSync(mcpJsonPath)) {
|
|
387
|
-
try {
|
|
388
|
-
config = JSON.parse(readFileSync(mcpJsonPath, 'utf-8'));
|
|
389
|
-
}
|
|
390
|
-
catch {
|
|
391
|
-
/* start fresh */
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
const servers = (config['mcpServers'] ?? {});
|
|
395
|
-
const existing = servers['cleo-dev'];
|
|
396
|
-
// Skip if already pointing to the same dist path
|
|
397
|
-
const existingArgs = existing?.['args'];
|
|
398
|
-
const targetArg = join(projectRoot, 'dist', 'mcp', 'index.js');
|
|
399
|
-
if (existing && existingArgs?.includes(targetArg)) {
|
|
400
|
-
return { action: 'skipped', path: mcpJsonPath, details: 'cleo-dev MCP entry already current' };
|
|
401
|
-
}
|
|
402
|
-
servers['cleo-dev'] = mcpEntry;
|
|
403
|
-
// Remove production 'cleo' entry from project-level config — production cleo
|
|
404
|
-
// is global-only. Project-level .mcp.json for contributor projects should
|
|
405
|
-
// only contain cleo-dev (ADR-016 §2.3, ADR-029).
|
|
406
|
-
const removedProduction = 'cleo' in servers;
|
|
407
|
-
delete servers['cleo'];
|
|
408
|
-
config['mcpServers'] = servers;
|
|
409
|
-
await writeFile(mcpJsonPath, JSON.stringify(config, null, 2));
|
|
410
|
-
const details = [
|
|
411
|
-
`cleo-dev → node ${targetArg}`,
|
|
412
|
-
...(removedProduction ? ['removed production cleo entry (global-only per ADR-029)'] : []),
|
|
413
|
-
].join('; ');
|
|
414
|
-
return {
|
|
415
|
-
action: existing ? 'repaired' : 'created',
|
|
416
|
-
path: mcpJsonPath,
|
|
417
|
-
details,
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* Detect and write project-context.json.
|
|
422
|
-
* Idempotent: skips if file exists and is less than staleDays old (default: 30).
|
|
423
|
-
*/
|
|
424
|
-
export async function ensureProjectContext(projectRoot, opts) {
|
|
425
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
426
|
-
const contextPath = join(cleoDir, 'project-context.json');
|
|
427
|
-
const staleDays = opts?.staleDays ?? 30;
|
|
428
|
-
if (existsSync(contextPath) && !opts?.force) {
|
|
429
|
-
try {
|
|
430
|
-
const content = JSON.parse(readFileSync(contextPath, 'utf-8'));
|
|
431
|
-
if (content.detectedAt) {
|
|
432
|
-
const detectedAt = new Date(content.detectedAt);
|
|
433
|
-
const ageMs = Date.now() - detectedAt.getTime();
|
|
434
|
-
const ageDays = ageMs / (1000 * 60 * 60 * 24);
|
|
435
|
-
if (ageDays < staleDays) {
|
|
436
|
-
return {
|
|
437
|
-
action: 'skipped',
|
|
438
|
-
path: contextPath,
|
|
439
|
-
details: `Fresh (${Math.floor(ageDays)}d old)`,
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
catch {
|
|
445
|
-
// If we can't parse it, regenerate
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
const { detectProjectType } = await import('./store/project-detect.js');
|
|
449
|
-
const context = detectProjectType(projectRoot);
|
|
450
|
-
// Validate against schema before writing (best-effort, never blocks write)
|
|
451
|
-
try {
|
|
452
|
-
const schemaPath = join(dirname(fileURLToPath(import.meta.url)), '../../schemas/project-context.schema.json');
|
|
453
|
-
if (existsSync(schemaPath)) {
|
|
454
|
-
const AjvModule = await import('ajv');
|
|
455
|
-
const ajvMod = AjvModule;
|
|
456
|
-
const AjvClass = (typeof ajvMod.default === 'function' ? ajvMod.default : AjvModule.default);
|
|
457
|
-
const schema = JSON.parse(readFileSync(schemaPath, 'utf-8'));
|
|
458
|
-
const ajv = new AjvClass({ strict: false });
|
|
459
|
-
const valid = ajv.validate(schema, context);
|
|
460
|
-
if (!valid) {
|
|
461
|
-
// eslint-disable-next-line no-console
|
|
462
|
-
console.warn('[CLEO] project-context.json schema validation warnings:', ajv.errors);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
catch {
|
|
467
|
-
// Schema validation is best-effort — never block the write
|
|
468
|
-
}
|
|
469
|
-
await writeFile(contextPath, JSON.stringify(context, null, 2));
|
|
470
|
-
return {
|
|
471
|
-
action: existsSync(contextPath) ? 'repaired' : 'created',
|
|
472
|
-
path: contextPath,
|
|
473
|
-
};
|
|
474
|
-
}
|
|
475
|
-
/**
|
|
476
|
-
* Initialize isolated .cleo/.git checkpoint repository.
|
|
477
|
-
* Idempotent: skips if .cleo/.git already exists.
|
|
478
|
-
*/
|
|
479
|
-
export async function ensureCleoGitRepo(projectRoot) {
|
|
480
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
481
|
-
const cleoGitDir = join(cleoDir, '.git');
|
|
482
|
-
if (existsSync(cleoGitDir)) {
|
|
483
|
-
return { action: 'skipped', path: cleoGitDir, details: 'Already initialized' };
|
|
484
|
-
}
|
|
485
|
-
const gitEnv = {
|
|
486
|
-
...process.env,
|
|
487
|
-
GIT_DIR: cleoGitDir,
|
|
488
|
-
GIT_WORK_TREE: cleoDir,
|
|
489
|
-
};
|
|
490
|
-
await execFileAsync('git', ['init', '--quiet'], { cwd: cleoDir, env: gitEnv });
|
|
491
|
-
await execFileAsync('git', ['config', 'user.email', 'cleo@local'], { cwd: cleoDir, env: gitEnv });
|
|
492
|
-
await execFileAsync('git', ['config', 'user.name', 'CLEO'], { cwd: cleoDir, env: gitEnv });
|
|
493
|
-
return { action: 'created', path: cleoGitDir, details: 'Isolated checkpoint repository' };
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* Create SQLite database if missing.
|
|
497
|
-
* Idempotent: skips if tasks.db already exists.
|
|
498
|
-
*/
|
|
499
|
-
export async function ensureSqliteDb(projectRoot) {
|
|
500
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
501
|
-
const dbPath = join(cleoDir, 'tasks.db');
|
|
502
|
-
if (existsSync(dbPath)) {
|
|
503
|
-
return { action: 'skipped', path: dbPath, details: 'tasks.db already exists' };
|
|
504
|
-
}
|
|
505
|
-
try {
|
|
506
|
-
const { getDb } = await import('./store/sqlite.js');
|
|
507
|
-
await getDb(projectRoot);
|
|
508
|
-
return { action: 'created', path: dbPath, details: 'SQLite database initialized' };
|
|
509
|
-
}
|
|
510
|
-
catch (err) {
|
|
511
|
-
return {
|
|
512
|
-
action: 'skipped',
|
|
513
|
-
path: dbPath,
|
|
514
|
-
details: `Failed to initialize SQLite: ${err instanceof Error ? err.message : String(err)}`,
|
|
515
|
-
};
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
// ── check* functions (read-only) ─────────────────────────────────────
|
|
519
|
-
/**
|
|
520
|
-
* Verify all required .cleo/ subdirectories exist.
|
|
521
|
-
*/
|
|
522
|
-
export function checkCleoStructure(projectRoot) {
|
|
523
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
524
|
-
const missing = [];
|
|
525
|
-
if (!existsSync(cleoDir)) {
|
|
526
|
-
return {
|
|
527
|
-
id: 'cleo_structure',
|
|
528
|
-
category: 'scaffold',
|
|
529
|
-
status: 'failed',
|
|
530
|
-
message: '.cleo/ directory does not exist',
|
|
531
|
-
details: { path: cleoDir, exists: false },
|
|
532
|
-
fix: 'cleo init',
|
|
533
|
-
};
|
|
534
|
-
}
|
|
535
|
-
for (const subdir of REQUIRED_CLEO_SUBDIRS) {
|
|
536
|
-
if (!existsSync(join(cleoDir, subdir))) {
|
|
537
|
-
missing.push(subdir);
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
if (missing.length > 0) {
|
|
541
|
-
return {
|
|
542
|
-
id: 'cleo_structure',
|
|
543
|
-
category: 'scaffold',
|
|
544
|
-
status: 'warning',
|
|
545
|
-
message: `Missing subdirectories: ${missing.join(', ')}`,
|
|
546
|
-
details: { path: cleoDir, missing },
|
|
547
|
-
fix: 'cleo init',
|
|
548
|
-
};
|
|
549
|
-
}
|
|
550
|
-
return {
|
|
551
|
-
id: 'cleo_structure',
|
|
552
|
-
category: 'scaffold',
|
|
553
|
-
status: 'passed',
|
|
554
|
-
message: 'All required .cleo/ subdirectories exist',
|
|
555
|
-
details: { path: cleoDir, subdirs: [...REQUIRED_CLEO_SUBDIRS] },
|
|
556
|
-
fix: null,
|
|
557
|
-
};
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
* Verify .cleo/.gitignore exists and matches template.
|
|
561
|
-
*/
|
|
562
|
-
export function checkGitignore(projectRoot) {
|
|
563
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
564
|
-
const gitignorePath = join(cleoDir, '.gitignore');
|
|
565
|
-
if (!existsSync(gitignorePath)) {
|
|
566
|
-
return {
|
|
567
|
-
id: 'cleo_gitignore',
|
|
568
|
-
category: 'scaffold',
|
|
569
|
-
status: 'warning',
|
|
570
|
-
message: '.cleo/.gitignore not found',
|
|
571
|
-
details: { path: gitignorePath, exists: false },
|
|
572
|
-
fix: 'cleo init --force',
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
|
-
const installed = readFileSync(gitignorePath, 'utf-8');
|
|
576
|
-
const template = getGitignoreContent();
|
|
577
|
-
const normalize = (s) => s.trim().replace(/\r\n/g, '\n');
|
|
578
|
-
const matches = normalize(installed) === normalize(template);
|
|
579
|
-
return {
|
|
580
|
-
id: 'cleo_gitignore',
|
|
581
|
-
category: 'scaffold',
|
|
582
|
-
status: matches ? 'passed' : 'warning',
|
|
583
|
-
message: matches
|
|
584
|
-
? '.cleo/.gitignore matches template'
|
|
585
|
-
: '.cleo/.gitignore has drifted from template',
|
|
586
|
-
details: { path: gitignorePath, matchesTemplate: matches },
|
|
587
|
-
fix: matches ? null : 'cleo upgrade',
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
/**
|
|
591
|
-
* Verify config.json exists and is valid JSON.
|
|
592
|
-
*/
|
|
593
|
-
export function checkConfig(projectRoot) {
|
|
594
|
-
const configPath = getConfigPath(projectRoot);
|
|
595
|
-
if (!existsSync(configPath)) {
|
|
596
|
-
return {
|
|
597
|
-
id: 'cleo_config',
|
|
598
|
-
category: 'scaffold',
|
|
599
|
-
status: 'failed',
|
|
600
|
-
message: 'config.json not found',
|
|
601
|
-
details: { path: configPath, exists: false },
|
|
602
|
-
fix: 'cleo init',
|
|
603
|
-
};
|
|
604
|
-
}
|
|
605
|
-
try {
|
|
606
|
-
JSON.parse(readFileSync(configPath, 'utf-8'));
|
|
607
|
-
}
|
|
608
|
-
catch (err) {
|
|
609
|
-
return {
|
|
610
|
-
id: 'cleo_config',
|
|
611
|
-
category: 'scaffold',
|
|
612
|
-
status: 'failed',
|
|
613
|
-
message: `config.json is not valid JSON: ${err instanceof Error ? err.message : String(err)}`,
|
|
614
|
-
details: { path: configPath, valid: false },
|
|
615
|
-
fix: 'cleo init --force',
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
return {
|
|
619
|
-
id: 'cleo_config',
|
|
620
|
-
category: 'scaffold',
|
|
621
|
-
status: 'passed',
|
|
622
|
-
message: 'config.json exists and is valid JSON',
|
|
623
|
-
details: { path: configPath, valid: true },
|
|
624
|
-
fix: null,
|
|
625
|
-
};
|
|
626
|
-
}
|
|
627
|
-
/**
|
|
628
|
-
* Verify project-info.json exists with required fields.
|
|
629
|
-
*/
|
|
630
|
-
export function checkProjectInfo(projectRoot) {
|
|
631
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
632
|
-
const infoPath = join(cleoDir, 'project-info.json');
|
|
633
|
-
if (!existsSync(infoPath)) {
|
|
634
|
-
return {
|
|
635
|
-
id: 'cleo_project_info',
|
|
636
|
-
category: 'scaffold',
|
|
637
|
-
status: 'warning',
|
|
638
|
-
message: 'project-info.json not found',
|
|
639
|
-
details: { path: infoPath, exists: false },
|
|
640
|
-
fix: 'cleo init',
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
try {
|
|
644
|
-
const content = JSON.parse(readFileSync(infoPath, 'utf-8'));
|
|
645
|
-
const requiredFields = ['projectHash', 'cleoVersion', 'lastUpdated'];
|
|
646
|
-
const missing = requiredFields.filter((f) => !(f in content));
|
|
647
|
-
if (missing.length > 0) {
|
|
648
|
-
return {
|
|
649
|
-
id: 'cleo_project_info',
|
|
650
|
-
category: 'scaffold',
|
|
651
|
-
status: 'warning',
|
|
652
|
-
message: `project-info.json missing fields: ${missing.join(', ')}`,
|
|
653
|
-
details: { path: infoPath, missingFields: missing },
|
|
654
|
-
fix: 'cleo init --force',
|
|
655
|
-
};
|
|
656
|
-
}
|
|
657
|
-
return {
|
|
658
|
-
id: 'cleo_project_info',
|
|
659
|
-
category: 'scaffold',
|
|
660
|
-
status: 'passed',
|
|
661
|
-
message: 'project-info.json exists with all required fields',
|
|
662
|
-
details: { path: infoPath, valid: true },
|
|
663
|
-
fix: null,
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
catch (err) {
|
|
667
|
-
return {
|
|
668
|
-
id: 'cleo_project_info',
|
|
669
|
-
category: 'scaffold',
|
|
670
|
-
status: 'failed',
|
|
671
|
-
message: `project-info.json is not valid JSON: ${err instanceof Error ? err.message : String(err)}`,
|
|
672
|
-
details: { path: infoPath, valid: false },
|
|
673
|
-
fix: 'cleo init --force',
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
/**
|
|
678
|
-
* Verify project-context.json exists and is not stale (default: 30 days).
|
|
679
|
-
*/
|
|
680
|
-
export function checkProjectContext(projectRoot, staleDays = 30) {
|
|
681
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
682
|
-
const contextPath = join(cleoDir, 'project-context.json');
|
|
683
|
-
if (!existsSync(contextPath)) {
|
|
684
|
-
return {
|
|
685
|
-
id: 'cleo_project_context',
|
|
686
|
-
category: 'scaffold',
|
|
687
|
-
status: 'warning',
|
|
688
|
-
message: 'project-context.json not found',
|
|
689
|
-
details: { path: contextPath, exists: false },
|
|
690
|
-
fix: 'cleo init --detect',
|
|
691
|
-
};
|
|
692
|
-
}
|
|
693
|
-
try {
|
|
694
|
-
const content = JSON.parse(readFileSync(contextPath, 'utf-8'));
|
|
695
|
-
if (!content.detectedAt) {
|
|
696
|
-
return {
|
|
697
|
-
id: 'cleo_project_context',
|
|
698
|
-
category: 'scaffold',
|
|
699
|
-
status: 'warning',
|
|
700
|
-
message: 'project-context.json missing detectedAt timestamp',
|
|
701
|
-
details: { path: contextPath, hasTimestamp: false },
|
|
702
|
-
fix: 'cleo init --detect',
|
|
703
|
-
};
|
|
704
|
-
}
|
|
705
|
-
const detectedAt = new Date(content.detectedAt);
|
|
706
|
-
const ageMs = Date.now() - detectedAt.getTime();
|
|
707
|
-
const ageDays = ageMs / (1000 * 60 * 60 * 24);
|
|
708
|
-
if (ageDays > staleDays) {
|
|
709
|
-
return {
|
|
710
|
-
id: 'cleo_project_context',
|
|
711
|
-
category: 'scaffold',
|
|
712
|
-
status: 'warning',
|
|
713
|
-
message: `project-context.json is stale (${Math.floor(ageDays)} days old, threshold: ${staleDays})`,
|
|
714
|
-
details: { path: contextPath, ageDays: Math.floor(ageDays), staleDays },
|
|
715
|
-
fix: 'cleo init --detect',
|
|
716
|
-
};
|
|
717
|
-
}
|
|
718
|
-
return {
|
|
719
|
-
id: 'cleo_project_context',
|
|
720
|
-
category: 'scaffold',
|
|
721
|
-
status: 'passed',
|
|
722
|
-
message: `project-context.json is fresh (${Math.floor(ageDays)} days old)`,
|
|
723
|
-
details: { path: contextPath, ageDays: Math.floor(ageDays), staleDays },
|
|
724
|
-
fix: null,
|
|
725
|
-
};
|
|
726
|
-
}
|
|
727
|
-
catch (err) {
|
|
728
|
-
return {
|
|
729
|
-
id: 'cleo_project_context',
|
|
730
|
-
category: 'scaffold',
|
|
731
|
-
status: 'failed',
|
|
732
|
-
message: `project-context.json is not valid JSON: ${err instanceof Error ? err.message : String(err)}`,
|
|
733
|
-
details: { path: contextPath, valid: false },
|
|
734
|
-
fix: 'cleo init --detect',
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
/**
|
|
739
|
-
* Verify .cleo/.git checkpoint repository exists.
|
|
740
|
-
*/
|
|
741
|
-
export function checkCleoGitRepo(projectRoot) {
|
|
742
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
743
|
-
const cleoGitDir = join(cleoDir, '.git');
|
|
744
|
-
if (!existsSync(cleoGitDir)) {
|
|
745
|
-
return {
|
|
746
|
-
id: 'cleo_git_repo',
|
|
747
|
-
category: 'scaffold',
|
|
748
|
-
status: 'warning',
|
|
749
|
-
message: '.cleo/.git checkpoint repository not found',
|
|
750
|
-
details: { path: cleoGitDir, exists: false },
|
|
751
|
-
fix: 'cleo init',
|
|
752
|
-
};
|
|
753
|
-
}
|
|
754
|
-
return {
|
|
755
|
-
id: 'cleo_git_repo',
|
|
756
|
-
category: 'scaffold',
|
|
757
|
-
status: 'passed',
|
|
758
|
-
message: '.cleo/.git checkpoint repository exists',
|
|
759
|
-
details: { path: cleoGitDir, exists: true },
|
|
760
|
-
fix: null,
|
|
761
|
-
};
|
|
762
|
-
}
|
|
763
|
-
/**
|
|
764
|
-
* Verify .cleo/tasks.db exists and is non-empty.
|
|
765
|
-
*/
|
|
766
|
-
export function checkSqliteDb(projectRoot) {
|
|
767
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
768
|
-
const dbPath = join(cleoDir, 'tasks.db');
|
|
769
|
-
if (!existsSync(dbPath)) {
|
|
770
|
-
return {
|
|
771
|
-
id: 'sqlite_db',
|
|
772
|
-
category: 'scaffold',
|
|
773
|
-
status: 'failed',
|
|
774
|
-
message: 'tasks.db not found',
|
|
775
|
-
details: { path: dbPath, exists: false },
|
|
776
|
-
fix: 'cleo init',
|
|
777
|
-
};
|
|
778
|
-
}
|
|
779
|
-
const stat = statSync(dbPath);
|
|
780
|
-
if (stat.size === 0) {
|
|
781
|
-
return {
|
|
782
|
-
id: 'sqlite_db',
|
|
783
|
-
category: 'scaffold',
|
|
784
|
-
status: 'warning',
|
|
785
|
-
message: 'tasks.db exists but is empty (0 bytes)',
|
|
786
|
-
details: { path: dbPath, exists: true, size: 0 },
|
|
787
|
-
fix: 'cleo upgrade',
|
|
788
|
-
};
|
|
789
|
-
}
|
|
790
|
-
return {
|
|
791
|
-
id: 'sqlite_db',
|
|
792
|
-
category: 'scaffold',
|
|
793
|
-
status: 'passed',
|
|
794
|
-
message: `tasks.db exists (${stat.size} bytes)`,
|
|
795
|
-
details: { path: dbPath, exists: true, size: stat.size },
|
|
796
|
-
fix: null,
|
|
797
|
-
};
|
|
798
|
-
}
|
|
799
|
-
/**
|
|
800
|
-
* Create brain.db if missing.
|
|
801
|
-
* Idempotent: skips if brain.db already exists.
|
|
802
|
-
*/
|
|
803
|
-
export async function ensureBrainDb(projectRoot) {
|
|
804
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
805
|
-
const dbPath = join(cleoDir, 'brain.db');
|
|
806
|
-
if (existsSync(dbPath)) {
|
|
807
|
-
// Ensure FTS5 tables exist even for pre-existing brain.db (T5698)
|
|
808
|
-
try {
|
|
809
|
-
const { getBrainNativeDb } = await import('./store/brain-sqlite.js');
|
|
810
|
-
const nativeDb = getBrainNativeDb();
|
|
811
|
-
if (nativeDb) {
|
|
812
|
-
const { ensureFts5Tables } = await import('./memory/brain-search.js');
|
|
813
|
-
ensureFts5Tables(nativeDb);
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
catch {
|
|
817
|
-
// Non-fatal — FTS5 may not be available
|
|
818
|
-
}
|
|
819
|
-
return { action: 'skipped', path: dbPath, details: 'brain.db already exists' };
|
|
820
|
-
}
|
|
821
|
-
try {
|
|
822
|
-
const { getBrainDb, getBrainNativeDb } = await import('./store/brain-sqlite.js');
|
|
823
|
-
await getBrainDb(projectRoot);
|
|
824
|
-
// Create FTS5 virtual tables eagerly so search works immediately (T5698)
|
|
825
|
-
try {
|
|
826
|
-
const nativeDb = getBrainNativeDb();
|
|
827
|
-
if (nativeDb) {
|
|
828
|
-
const { ensureFts5Tables } = await import('./memory/brain-search.js');
|
|
829
|
-
ensureFts5Tables(nativeDb);
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
catch {
|
|
833
|
-
// FTS5 may not be available in all SQLite builds — non-fatal
|
|
834
|
-
}
|
|
835
|
-
return { action: 'created', path: dbPath, details: 'Brain database initialized with FTS5' };
|
|
836
|
-
}
|
|
837
|
-
catch (err) {
|
|
838
|
-
return {
|
|
839
|
-
action: 'skipped',
|
|
840
|
-
path: dbPath,
|
|
841
|
-
details: `Failed to initialize brain.db: ${err instanceof Error ? err.message : String(err)}`,
|
|
842
|
-
};
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
/**
|
|
846
|
-
* Verify .cleo/brain.db exists and is non-empty.
|
|
847
|
-
*/
|
|
848
|
-
export function checkBrainDb(projectRoot) {
|
|
849
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
850
|
-
const dbPath = join(cleoDir, 'brain.db');
|
|
851
|
-
if (!existsSync(dbPath)) {
|
|
852
|
-
return {
|
|
853
|
-
id: 'brain_db',
|
|
854
|
-
category: 'scaffold',
|
|
855
|
-
status: 'failed',
|
|
856
|
-
message: 'brain.db not found',
|
|
857
|
-
details: { path: dbPath, exists: false },
|
|
858
|
-
fix: 'cleo init',
|
|
859
|
-
};
|
|
860
|
-
}
|
|
861
|
-
const stat = statSync(dbPath);
|
|
862
|
-
if (stat.size === 0) {
|
|
863
|
-
return {
|
|
864
|
-
id: 'brain_db',
|
|
865
|
-
category: 'scaffold',
|
|
866
|
-
status: 'warning',
|
|
867
|
-
message: 'brain.db exists but is empty (0 bytes)',
|
|
868
|
-
details: { path: dbPath, exists: true, size: 0 },
|
|
869
|
-
fix: 'cleo upgrade',
|
|
870
|
-
};
|
|
871
|
-
}
|
|
872
|
-
return {
|
|
873
|
-
id: 'brain_db',
|
|
874
|
-
category: 'scaffold',
|
|
875
|
-
status: 'passed',
|
|
876
|
-
message: `brain.db exists (${stat.size} bytes)`,
|
|
877
|
-
details: { path: dbPath, exists: true, size: stat.size },
|
|
878
|
-
fix: null,
|
|
879
|
-
};
|
|
880
|
-
}
|
|
881
|
-
/**
|
|
882
|
-
* Verify .cleo/memory-bridge.md exists.
|
|
883
|
-
* Warning level if missing (not failure) — it is auto-generated.
|
|
884
|
-
*/
|
|
885
|
-
export function checkMemoryBridge(projectRoot) {
|
|
886
|
-
const cleoDir = getCleoDirAbsolute(projectRoot);
|
|
887
|
-
const bridgePath = join(cleoDir, 'memory-bridge.md');
|
|
888
|
-
if (!existsSync(bridgePath)) {
|
|
889
|
-
return {
|
|
890
|
-
id: 'memory_bridge',
|
|
891
|
-
category: 'scaffold',
|
|
892
|
-
status: 'warning',
|
|
893
|
-
message: 'memory-bridge.md not found',
|
|
894
|
-
details: { path: bridgePath, exists: false },
|
|
895
|
-
fix: 'cleo init or cleo refresh-memory',
|
|
896
|
-
};
|
|
897
|
-
}
|
|
898
|
-
return {
|
|
899
|
-
id: 'memory_bridge',
|
|
900
|
-
category: 'scaffold',
|
|
901
|
-
status: 'passed',
|
|
902
|
-
message: 'memory-bridge.md exists',
|
|
903
|
-
details: { path: bridgePath, exists: true },
|
|
904
|
-
fix: null,
|
|
905
|
-
};
|
|
906
|
-
}
|
|
907
|
-
// ── Global (~/.cleo) scaffold functions ──────────────────────────────
|
|
908
|
-
/**
|
|
909
|
-
* Required subdirectories under the global ~/.cleo/ home.
|
|
910
|
-
* These are infrastructure directories managed by CLEO itself,
|
|
911
|
-
* not project-specific data.
|
|
912
|
-
*/
|
|
913
|
-
export const REQUIRED_GLOBAL_SUBDIRS = ['schemas', 'templates'];
|
|
914
|
-
/**
|
|
915
|
-
* Ensure the global ~/.cleo/ home directory and its required
|
|
916
|
-
* subdirectories exist. Idempotent: skips directories that already exist.
|
|
917
|
-
*
|
|
918
|
-
* This is the SSoT for global home scaffolding, replacing raw mkdirSync
|
|
919
|
-
* calls that were previously scattered across global-bootstrap.ts.
|
|
920
|
-
*/
|
|
921
|
-
export async function ensureGlobalHome() {
|
|
922
|
-
const cleoHome = getCleoHome();
|
|
923
|
-
const alreadyExists = existsSync(cleoHome);
|
|
924
|
-
await mkdir(cleoHome, { recursive: true });
|
|
925
|
-
for (const subdir of REQUIRED_GLOBAL_SUBDIRS) {
|
|
926
|
-
await mkdir(join(cleoHome, subdir), { recursive: true });
|
|
927
|
-
}
|
|
928
|
-
return {
|
|
929
|
-
action: alreadyExists ? 'skipped' : 'created',
|
|
930
|
-
path: cleoHome,
|
|
931
|
-
details: alreadyExists
|
|
932
|
-
? 'Global home already existed, ensured subdirs'
|
|
933
|
-
: `Created ~/.cleo/ with ${REQUIRED_GLOBAL_SUBDIRS.length} subdirectories`,
|
|
934
|
-
};
|
|
935
|
-
}
|
|
936
|
-
/**
|
|
937
|
-
* Ensure the global CLEO injection template is installed.
|
|
938
|
-
* Delegates to injection.ts for the template content, but owns the
|
|
939
|
-
* filesystem write to maintain SSoT for scaffolding.
|
|
940
|
-
*
|
|
941
|
-
* Idempotent: skips if the template already exists with correct content.
|
|
942
|
-
*/
|
|
943
|
-
export async function ensureGlobalTemplates() {
|
|
944
|
-
// Lazy import to avoid circular dependency (injection imports scaffold)
|
|
945
|
-
const { getInjectionTemplateContent } = await import('./injection.js');
|
|
946
|
-
const templatesDir = getCleoTemplatesDir();
|
|
947
|
-
const injectionPath = join(templatesDir, 'CLEO-INJECTION.md');
|
|
948
|
-
// Ensure directory exists (idempotent via ensureGlobalHome, but defensive)
|
|
949
|
-
await mkdir(templatesDir, { recursive: true });
|
|
950
|
-
const templateContent = getInjectionTemplateContent();
|
|
951
|
-
if (!templateContent) {
|
|
952
|
-
return {
|
|
953
|
-
action: 'skipped',
|
|
954
|
-
path: injectionPath,
|
|
955
|
-
details: 'Bundled injection template not found; skipped',
|
|
956
|
-
};
|
|
957
|
-
}
|
|
958
|
-
if (existsSync(injectionPath)) {
|
|
959
|
-
const existing = readFileSync(injectionPath, 'utf-8');
|
|
960
|
-
if (existing === templateContent) {
|
|
961
|
-
return { action: 'skipped', path: injectionPath, details: 'Template already current' };
|
|
962
|
-
}
|
|
963
|
-
// Content differs — repair
|
|
964
|
-
await writeFile(injectionPath, templateContent, 'utf-8');
|
|
965
|
-
return {
|
|
966
|
-
action: 'repaired',
|
|
967
|
-
path: injectionPath,
|
|
968
|
-
details: 'Updated injection template to match bundled version',
|
|
969
|
-
};
|
|
970
|
-
}
|
|
971
|
-
await writeFile(injectionPath, templateContent, 'utf-8');
|
|
972
|
-
return { action: 'created', path: injectionPath };
|
|
973
|
-
}
|
|
974
|
-
/**
|
|
975
|
-
* Perform a complete global scaffold operation: ensure home, schemas,
|
|
976
|
-
* and templates are all present and current. This is the single entry
|
|
977
|
-
* point for global infrastructure scaffolding.
|
|
978
|
-
*
|
|
979
|
-
* Used by:
|
|
980
|
-
* - MCP startup (via startupHealthCheck in health.ts)
|
|
981
|
-
* - init (for first-time global setup)
|
|
982
|
-
* - upgrade (for global repair)
|
|
983
|
-
*/
|
|
984
|
-
export async function ensureGlobalScaffold() {
|
|
985
|
-
// Lazy import to avoid circular dependency
|
|
986
|
-
const { ensureGlobalSchemas } = await import('./schema-management.js');
|
|
987
|
-
const home = await ensureGlobalHome();
|
|
988
|
-
const schemas = ensureGlobalSchemas();
|
|
989
|
-
const templates = await ensureGlobalTemplates();
|
|
990
|
-
return { home, schemas, templates };
|
|
991
|
-
}
|
|
992
|
-
// ── Global check* functions (read-only diagnostics) ──────────────────
|
|
993
|
-
/**
|
|
994
|
-
* Check that the global ~/.cleo/ home and its required subdirectories exist.
|
|
995
|
-
* Read-only: no side effects.
|
|
996
|
-
*/
|
|
997
|
-
export function checkGlobalHome() {
|
|
998
|
-
const cleoHome = getCleoHome();
|
|
999
|
-
if (!existsSync(cleoHome)) {
|
|
1000
|
-
return {
|
|
1001
|
-
id: 'global_home',
|
|
1002
|
-
category: 'global',
|
|
1003
|
-
status: 'failed',
|
|
1004
|
-
message: 'Global ~/.cleo/ directory not found',
|
|
1005
|
-
details: { path: cleoHome, exists: false },
|
|
1006
|
-
fix: 'cleo init (or restart MCP server)',
|
|
1007
|
-
};
|
|
1008
|
-
}
|
|
1009
|
-
const missingDirs = REQUIRED_GLOBAL_SUBDIRS.filter((dir) => !existsSync(join(cleoHome, dir)));
|
|
1010
|
-
if (missingDirs.length > 0) {
|
|
1011
|
-
return {
|
|
1012
|
-
id: 'global_home',
|
|
1013
|
-
category: 'global',
|
|
1014
|
-
status: 'warning',
|
|
1015
|
-
message: `Global home exists but missing subdirs: ${missingDirs.join(', ')}`,
|
|
1016
|
-
details: { path: cleoHome, exists: true, missingDirs },
|
|
1017
|
-
fix: 'cleo upgrade --include-global',
|
|
1018
|
-
};
|
|
1019
|
-
}
|
|
1020
|
-
return {
|
|
1021
|
-
id: 'global_home',
|
|
1022
|
-
category: 'global',
|
|
1023
|
-
status: 'passed',
|
|
1024
|
-
message: 'Global ~/.cleo/ home and subdirectories present',
|
|
1025
|
-
details: { path: cleoHome, exists: true, subdirs: REQUIRED_GLOBAL_SUBDIRS.length },
|
|
1026
|
-
fix: null,
|
|
1027
|
-
};
|
|
1028
|
-
}
|
|
1029
|
-
/**
|
|
1030
|
-
* Check that the global injection template is present and current.
|
|
1031
|
-
* Read-only: no side effects.
|
|
1032
|
-
*/
|
|
1033
|
-
export function checkGlobalTemplates() {
|
|
1034
|
-
const templatesDir = getCleoTemplatesDir();
|
|
1035
|
-
const injectionPath = join(templatesDir, 'CLEO-INJECTION.md');
|
|
1036
|
-
if (!existsSync(injectionPath)) {
|
|
1037
|
-
return {
|
|
1038
|
-
id: 'global_templates',
|
|
1039
|
-
category: 'global',
|
|
1040
|
-
status: 'failed',
|
|
1041
|
-
message: 'CLEO-INJECTION.md template not found in global templates',
|
|
1042
|
-
details: { path: injectionPath, exists: false },
|
|
1043
|
-
fix: 'cleo init (or restart MCP server)',
|
|
1044
|
-
};
|
|
1045
|
-
}
|
|
1046
|
-
return {
|
|
1047
|
-
id: 'global_templates',
|
|
1048
|
-
category: 'global',
|
|
1049
|
-
status: 'passed',
|
|
1050
|
-
message: 'Global injection template present',
|
|
1051
|
-
details: { path: injectionPath, exists: true },
|
|
1052
|
-
fix: null,
|
|
1053
|
-
};
|
|
1054
|
-
}
|
|
1055
|
-
/**
|
|
1056
|
-
* Check that the project log directory exists.
|
|
1057
|
-
* Read-only: no side effects.
|
|
1058
|
-
*/
|
|
1059
|
-
export function checkLogDir(projectRoot) {
|
|
1060
|
-
const logDir = join(getCleoDirAbsolute(projectRoot), 'logs');
|
|
1061
|
-
if (!existsSync(logDir)) {
|
|
1062
|
-
return {
|
|
1063
|
-
id: 'log_dir',
|
|
1064
|
-
category: 'scaffold',
|
|
1065
|
-
status: 'warning',
|
|
1066
|
-
message: 'Log directory .cleo/logs/ not found',
|
|
1067
|
-
details: { path: logDir, exists: false },
|
|
1068
|
-
fix: 'cleo upgrade',
|
|
1069
|
-
};
|
|
1070
|
-
}
|
|
1071
|
-
return {
|
|
1072
|
-
id: 'log_dir',
|
|
1073
|
-
category: 'scaffold',
|
|
1074
|
-
status: 'passed',
|
|
1075
|
-
message: 'Log directory .cleo/logs/ present',
|
|
1076
|
-
details: { path: logDir, exists: true },
|
|
1077
|
-
fix: null,
|
|
1078
|
-
};
|
|
1079
|
-
}
|
|
1080
|
-
//# sourceMappingURL=scaffold.js.map
|