@cleocode/core 2026.3.59 → 2026.3.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/adapter-registry.js +64 -0
- package/dist/adapters/adapter-registry.js.map +1 -0
- package/dist/adapters/discovery.js +83 -0
- package/dist/adapters/discovery.js.map +1 -0
- package/dist/adapters/index.js +9 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/manager.js +260 -0
- package/dist/adapters/manager.js.map +1 -0
- package/dist/admin/export-tasks.js +171 -0
- package/dist/admin/export-tasks.js.map +1 -0
- package/dist/admin/export.js +103 -0
- package/dist/admin/export.js.map +1 -0
- package/dist/admin/help.js +106 -0
- package/dist/admin/help.js.map +1 -0
- package/dist/admin/import-tasks.js +182 -0
- package/dist/admin/import-tasks.js.map +1 -0
- package/dist/admin/import.js +129 -0
- package/dist/admin/import.js.map +1 -0
- package/dist/admin/index.js +13 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/adrs/find.js +134 -0
- package/dist/adrs/find.js.map +1 -0
- package/dist/adrs/index.js +15 -0
- package/dist/adrs/index.js.map +1 -0
- package/dist/adrs/link-pipeline.js +160 -0
- package/dist/adrs/link-pipeline.js.map +1 -0
- package/dist/adrs/list.js +43 -0
- package/dist/adrs/list.js.map +1 -0
- package/dist/adrs/parse.js +51 -0
- package/dist/adrs/parse.js.map +1 -0
- package/dist/adrs/show.js +22 -0
- package/dist/adrs/show.js.map +1 -0
- package/dist/adrs/sync.js +188 -0
- package/dist/adrs/sync.js.map +1 -0
- package/dist/adrs/types.js +9 -0
- package/dist/adrs/types.js.map +1 -0
- package/dist/adrs/validate.js +57 -0
- package/dist/adrs/validate.js.map +1 -0
- package/dist/agents/agent-registry.js +288 -0
- package/dist/agents/agent-registry.js.map +1 -0
- package/dist/agents/agent-schema.js +85 -0
- package/dist/agents/agent-schema.js.map +1 -0
- package/dist/agents/capacity.js +116 -0
- package/dist/agents/capacity.js.map +1 -0
- package/dist/agents/execution-learning.js +474 -0
- package/dist/agents/execution-learning.js.map +1 -0
- package/dist/agents/health-monitor.js +217 -0
- package/dist/agents/health-monitor.js.map +1 -0
- package/dist/agents/index.js +29 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/registry.js +314 -0
- package/dist/agents/registry.js.map +1 -0
- package/dist/agents/retry.js +229 -0
- package/dist/agents/retry.js.map +1 -0
- package/dist/audit-prune.js +94 -0
- package/dist/audit-prune.js.map +1 -0
- package/dist/audit.js +68 -0
- package/dist/audit.js.map +1 -0
- package/dist/backfill/index.js +229 -0
- package/dist/backfill/index.js.map +1 -0
- package/dist/bootstrap.d.ts +2 -1
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +367 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/caamp/adapter.js +434 -0
- package/dist/caamp/adapter.js.map +1 -0
- package/dist/caamp/capability-check.js +38 -0
- package/dist/caamp/capability-check.js.map +1 -0
- package/dist/caamp/index.js +23 -0
- package/dist/caamp/index.js.map +1 -0
- package/dist/caamp-init.js +16 -0
- package/dist/caamp-init.js.map +1 -0
- package/dist/cleo.d.ts +40 -0
- package/dist/cleo.d.ts.map +1 -1
- package/dist/cleo.js +267 -0
- package/dist/cleo.js.map +1 -0
- package/dist/codebase-map/analyzers/architecture.js +130 -0
- package/dist/codebase-map/analyzers/architecture.js.map +1 -0
- package/dist/codebase-map/analyzers/concerns.js +122 -0
- package/dist/codebase-map/analyzers/concerns.js.map +1 -0
- package/dist/codebase-map/analyzers/conventions.js +149 -0
- package/dist/codebase-map/analyzers/conventions.js.map +1 -0
- package/dist/codebase-map/analyzers/integrations.js +108 -0
- package/dist/codebase-map/analyzers/integrations.js.map +1 -0
- package/dist/codebase-map/analyzers/stack.js +117 -0
- package/dist/codebase-map/analyzers/stack.js.map +1 -0
- package/dist/codebase-map/analyzers/structure.js +137 -0
- package/dist/codebase-map/analyzers/structure.js.map +1 -0
- package/dist/codebase-map/analyzers/testing.js +118 -0
- package/dist/codebase-map/analyzers/testing.js.map +1 -0
- package/dist/codebase-map/index.js +57 -0
- package/dist/codebase-map/index.js.map +1 -0
- package/dist/codebase-map/store.js +122 -0
- package/dist/codebase-map/store.js.map +1 -0
- package/dist/codebase-map/summary.js +152 -0
- package/dist/codebase-map/summary.js.map +1 -0
- package/dist/compliance/index.js +288 -0
- package/dist/compliance/index.js.map +1 -0
- package/dist/compliance/protocol-enforcement.js +332 -0
- package/dist/compliance/protocol-enforcement.js.map +1 -0
- package/dist/compliance/protocol-rules.js +786 -0
- package/dist/compliance/protocol-rules.js.map +1 -0
- package/dist/compliance/protocol-types.js +80 -0
- package/dist/compliance/protocol-types.js.map +1 -0
- package/dist/compliance/store.js +53 -0
- package/dist/compliance/store.js.map +1 -0
- package/dist/config/build-config.js +29 -0
- package/dist/config/build-config.js.map +1 -0
- package/dist/config.js +370 -0
- package/dist/config.js.map +1 -0
- package/dist/constants.js +18 -0
- package/dist/constants.js.map +1 -0
- package/dist/context/index.js +137 -0
- package/dist/context/index.js.map +1 -0
- package/dist/engine-result.js +12 -0
- package/dist/engine-result.js.map +1 -0
- package/dist/error-catalog.js +404 -0
- package/dist/error-catalog.js.map +1 -0
- package/dist/error-registry.js +393 -0
- package/dist/error-registry.js.map +1 -0
- package/dist/errors.js +167 -0
- package/dist/errors.js.map +1 -0
- package/dist/hooks/handlers/error-hooks.js +43 -0
- package/dist/hooks/handlers/error-hooks.js.map +1 -0
- package/dist/hooks/handlers/file-hooks.js +80 -0
- package/dist/hooks/handlers/file-hooks.js.map +1 -0
- package/dist/hooks/handlers/index.js +19 -0
- package/dist/hooks/handlers/index.js.map +1 -0
- package/dist/hooks/handlers/mcp-hooks.js +80 -0
- package/dist/hooks/handlers/mcp-hooks.js.map +1 -0
- package/dist/hooks/handlers/session-hooks.js +73 -0
- package/dist/hooks/handlers/session-hooks.js.map +1 -0
- package/dist/hooks/handlers/task-hooks.js +63 -0
- package/dist/hooks/handlers/task-hooks.js.map +1 -0
- package/dist/hooks/index.js +13 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/payload-schemas.js +163 -0
- package/dist/hooks/payload-schemas.js.map +1 -0
- package/dist/hooks/provider-hooks.js +34 -0
- package/dist/hooks/provider-hooks.js.map +1 -0
- package/dist/hooks/registry.js +176 -0
- package/dist/hooks/registry.js.map +1 -0
- package/dist/hooks/types.js +62 -0
- package/dist/hooks/types.js.map +1 -0
- package/dist/hooks.js +136 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.js +193 -35
- package/dist/index.js.map +3 -3
- package/dist/init.js +711 -0
- package/dist/init.js.map +1 -0
- package/dist/inject/index.js +82 -0
- package/dist/inject/index.js.map +1 -0
- package/dist/injection.js +343 -0
- package/dist/injection.js.map +1 -0
- package/dist/intelligence/adaptive-validation.js +497 -0
- package/dist/intelligence/adaptive-validation.js.map +1 -0
- package/dist/intelligence/impact.js +675 -0
- package/dist/intelligence/impact.js.map +1 -0
- package/dist/intelligence/index.js +22 -0
- package/dist/intelligence/index.js.map +1 -0
- package/dist/intelligence/patterns.js +492 -0
- package/dist/intelligence/patterns.js.map +1 -0
- package/dist/intelligence/prediction.js +499 -0
- package/dist/intelligence/prediction.js.map +1 -0
- package/dist/intelligence/types.js +13 -0
- package/dist/intelligence/types.js.map +1 -0
- package/dist/internal.d.ts +1 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +267 -0
- package/dist/internal.js.map +1 -0
- package/dist/issue/create.js +121 -0
- package/dist/issue/create.js.map +1 -0
- package/dist/issue/diagnostics.js +59 -0
- package/dist/issue/diagnostics.js.map +1 -0
- package/dist/issue/index.js +10 -0
- package/dist/issue/index.js.map +1 -0
- package/dist/issue/template-parser.js +267 -0
- package/dist/issue/template-parser.js.map +1 -0
- package/dist/json-schema-validator.js +76 -0
- package/dist/json-schema-validator.js.map +1 -0
- package/dist/lib/index.js +10 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/retry.js +152 -0
- package/dist/lib/retry.js.map +1 -0
- package/dist/lifecycle/chain-composition.js +152 -0
- package/dist/lifecycle/chain-composition.js.map +1 -0
- package/dist/lifecycle/chain-store.js +246 -0
- package/dist/lifecycle/chain-store.js.map +1 -0
- package/dist/lifecycle/consolidate-rcasd.js +352 -0
- package/dist/lifecycle/consolidate-rcasd.js.map +1 -0
- package/dist/lifecycle/default-chain.js +167 -0
- package/dist/lifecycle/default-chain.js.map +1 -0
- package/dist/lifecycle/evidence.js +180 -0
- package/dist/lifecycle/evidence.js.map +1 -0
- package/dist/lifecycle/frontmatter.js +363 -0
- package/dist/lifecycle/frontmatter.js.map +1 -0
- package/dist/lifecycle/index.js +753 -0
- package/dist/lifecycle/index.js.map +1 -0
- package/dist/lifecycle/pipeline.js +656 -0
- package/dist/lifecycle/pipeline.js.map +1 -0
- package/dist/lifecycle/rcasd-index.js +326 -0
- package/dist/lifecycle/rcasd-index.js.map +1 -0
- package/dist/lifecycle/rcasd-paths.js +220 -0
- package/dist/lifecycle/rcasd-paths.js.map +1 -0
- package/dist/lifecycle/resume.js +864 -0
- package/dist/lifecycle/resume.js.map +1 -0
- package/dist/lifecycle/stage-artifacts.js +94 -0
- package/dist/lifecycle/stage-artifacts.js.map +1 -0
- package/dist/lifecycle/stages.js +534 -0
- package/dist/lifecycle/stages.js.map +1 -0
- package/dist/lifecycle/state-machine.js +516 -0
- package/dist/lifecycle/state-machine.js.map +1 -0
- package/dist/lifecycle/tessera-engine.js +249 -0
- package/dist/lifecycle/tessera-engine.js.map +1 -0
- package/dist/logger.js +140 -0
- package/dist/logger.js.map +1 -0
- package/dist/mcp/index.js +146 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/memory/auto-extract.js +143 -0
- package/dist/memory/auto-extract.js.map +1 -0
- package/dist/memory/brain-embedding.js +49 -0
- package/dist/memory/brain-embedding.js.map +1 -0
- package/dist/memory/brain-lifecycle.js +298 -0
- package/dist/memory/brain-lifecycle.js.map +1 -0
- package/dist/memory/brain-links.js +148 -0
- package/dist/memory/brain-links.js.map +1 -0
- package/dist/memory/brain-migration.js +149 -0
- package/dist/memory/brain-migration.js.map +1 -0
- package/dist/memory/brain-reasoning.js +215 -0
- package/dist/memory/brain-reasoning.js.map +1 -0
- package/dist/memory/brain-retrieval.js +474 -0
- package/dist/memory/brain-retrieval.js.map +1 -0
- package/dist/memory/brain-row-types.js +10 -0
- package/dist/memory/brain-row-types.js.map +1 -0
- package/dist/memory/brain-search.js +519 -0
- package/dist/memory/brain-search.js.map +1 -0
- package/dist/memory/brain-similarity.js +145 -0
- package/dist/memory/brain-similarity.js.map +1 -0
- package/dist/memory/claude-mem-migration.js +277 -0
- package/dist/memory/claude-mem-migration.js.map +1 -0
- package/dist/memory/decisions.js +148 -0
- package/dist/memory/decisions.js.map +1 -0
- package/dist/memory/engine-compat.js +1030 -0
- package/dist/memory/engine-compat.js.map +1 -0
- package/dist/memory/index.js +773 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/learnings.js +121 -0
- package/dist/memory/learnings.js.map +1 -0
- package/dist/memory/memory-bridge.js +289 -0
- package/dist/memory/memory-bridge.js.map +1 -0
- package/dist/memory/patterns.js +122 -0
- package/dist/memory/patterns.js.map +1 -0
- package/dist/memory/pipeline-manifest-sqlite.js +975 -0
- package/dist/memory/pipeline-manifest-sqlite.js.map +1 -0
- package/dist/memory/session-memory.js +226 -0
- package/dist/memory/session-memory.js.map +1 -0
- package/dist/metrics/ab-test.js +260 -0
- package/dist/metrics/ab-test.js.map +1 -0
- package/dist/metrics/aggregation.js +363 -0
- package/dist/metrics/aggregation.js.map +1 -0
- package/dist/metrics/common.js +64 -0
- package/dist/metrics/common.js.map +1 -0
- package/dist/metrics/enums.js +78 -0
- package/dist/metrics/enums.js.map +1 -0
- package/dist/metrics/index.js +19 -0
- package/dist/metrics/index.js.map +1 -0
- package/dist/metrics/model-provider-registry.js +88 -0
- package/dist/metrics/model-provider-registry.js.map +1 -0
- package/dist/metrics/otel-integration.js +263 -0
- package/dist/metrics/otel-integration.js.map +1 -0
- package/dist/metrics/provider-detection.js +103 -0
- package/dist/metrics/provider-detection.js.map +1 -0
- package/dist/metrics/token-estimation.js +253 -0
- package/dist/metrics/token-estimation.js.map +1 -0
- package/dist/metrics/token-service.js +450 -0
- package/dist/metrics/token-service.js.map +1 -0
- package/dist/migration/agent-outputs.js +316 -0
- package/dist/migration/agent-outputs.js.map +1 -0
- package/dist/migration/checksum.js +92 -0
- package/dist/migration/checksum.js.map +1 -0
- package/dist/migration/index.js +282 -0
- package/dist/migration/index.js.map +1 -0
- package/dist/migration/logger.js +360 -0
- package/dist/migration/logger.js.map +1 -0
- package/dist/migration/preflight.js +9 -0
- package/dist/migration/preflight.js.map +1 -0
- package/dist/migration/state.js +421 -0
- package/dist/migration/state.js.map +1 -0
- package/dist/migration/validate.js +241 -0
- package/dist/migration/validate.js.map +1 -0
- package/dist/nexus/deps.js +375 -0
- package/dist/nexus/deps.js.map +1 -0
- package/dist/nexus/discover.js +288 -0
- package/dist/nexus/discover.js.map +1 -0
- package/dist/nexus/hash.js +10 -0
- package/dist/nexus/hash.js.map +1 -0
- package/dist/nexus/index.js +38 -0
- package/dist/nexus/index.js.map +1 -0
- package/dist/nexus/migrate-json-to-sqlite.js +115 -0
- package/dist/nexus/migrate-json-to-sqlite.js.map +1 -0
- package/dist/nexus/permissions.js +105 -0
- package/dist/nexus/permissions.js.map +1 -0
- package/dist/nexus/query.js +175 -0
- package/dist/nexus/query.js.map +1 -0
- package/dist/nexus/registry.js +584 -0
- package/dist/nexus/registry.js.map +1 -0
- package/dist/nexus/sharing/index.js +288 -0
- package/dist/nexus/sharing/index.js.map +1 -0
- package/dist/nexus/transfer-types.js +8 -0
- package/dist/nexus/transfer-types.js.map +1 -0
- package/dist/nexus/transfer.js +263 -0
- package/dist/nexus/transfer.js.map +1 -0
- package/dist/observability/index.js +103 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/log-filter.js +63 -0
- package/dist/observability/log-filter.js.map +1 -0
- package/dist/observability/log-parser.js +99 -0
- package/dist/observability/log-parser.js.map +1 -0
- package/dist/observability/log-reader.js +139 -0
- package/dist/observability/log-reader.js.map +1 -0
- package/dist/observability/types.js +19 -0
- package/dist/observability/types.js.map +1 -0
- package/dist/orchestration/analyze.js +107 -0
- package/dist/orchestration/analyze.js.map +1 -0
- package/dist/orchestration/bootstrap.js +132 -0
- package/dist/orchestration/bootstrap.js.map +1 -0
- package/dist/orchestration/context.js +56 -0
- package/dist/orchestration/context.js.map +1 -0
- package/dist/orchestration/critical-path.js +100 -0
- package/dist/orchestration/critical-path.js.map +1 -0
- package/dist/orchestration/index.js +286 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/parallel.js +89 -0
- package/dist/orchestration/parallel.js.map +1 -0
- package/dist/orchestration/protocol-validators.js +524 -0
- package/dist/orchestration/protocol-validators.js.map +1 -0
- package/dist/orchestration/skill-ops.js +98 -0
- package/dist/orchestration/skill-ops.js.map +1 -0
- package/dist/orchestration/status.js +107 -0
- package/dist/orchestration/status.js.map +1 -0
- package/dist/orchestration/unblock.js +103 -0
- package/dist/orchestration/unblock.js.map +1 -0
- package/dist/orchestration/validate-spawn.js +67 -0
- package/dist/orchestration/validate-spawn.js.map +1 -0
- package/dist/orchestration/waves.js +86 -0
- package/dist/orchestration/waves.js.map +1 -0
- package/dist/otel/index.js +163 -0
- package/dist/otel/index.js.map +1 -0
- package/dist/output.js +132 -0
- package/dist/output.js.map +1 -0
- package/dist/pagination.js +61 -0
- package/dist/pagination.js.map +1 -0
- package/dist/paths.js +337 -0
- package/dist/paths.js.map +1 -0
- package/dist/phases/deps.js +369 -0
- package/dist/phases/deps.js.map +1 -0
- package/dist/phases/index.js +349 -0
- package/dist/phases/index.js.map +1 -0
- package/dist/pipeline/index.js +10 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/phase.js +45 -0
- package/dist/pipeline/phase.js.map +1 -0
- package/dist/platform.js +211 -0
- package/dist/platform.js.map +1 -0
- package/dist/project-info.js +84 -0
- package/dist/project-info.js.map +1 -0
- package/dist/reconciliation/index.js +10 -0
- package/dist/reconciliation/index.js.map +1 -0
- package/dist/reconciliation/link-store.js +129 -0
- package/dist/reconciliation/link-store.js.map +1 -0
- package/dist/reconciliation/reconciliation-engine.js +298 -0
- package/dist/reconciliation/reconciliation-engine.js.map +1 -0
- package/dist/release/artifacts.js +427 -0
- package/dist/release/artifacts.js.map +1 -0
- package/dist/release/changelog-writer.js +151 -0
- package/dist/release/changelog-writer.js.map +1 -0
- package/dist/release/channel.js +144 -0
- package/dist/release/channel.js.map +1 -0
- package/dist/release/ci.js +166 -0
- package/dist/release/ci.js.map +1 -0
- package/dist/release/github-pr.js +225 -0
- package/dist/release/github-pr.js.map +1 -0
- package/dist/release/guards.js +116 -0
- package/dist/release/guards.js.map +1 -0
- package/dist/release/index.js +22 -0
- package/dist/release/index.js.map +1 -0
- package/dist/release/release-config.js +158 -0
- package/dist/release/release-config.js.map +1 -0
- package/dist/release/release-manifest.js +1019 -0
- package/dist/release/release-manifest.js.map +1 -0
- package/dist/release/version-bump.js +255 -0
- package/dist/release/version-bump.js.map +1 -0
- package/dist/remote/index.js +257 -0
- package/dist/remote/index.js.map +1 -0
- package/dist/repair.d.ts +7 -0
- package/dist/repair.d.ts.map +1 -1
- package/dist/repair.js +89 -0
- package/dist/repair.js.map +1 -0
- package/dist/research/index.js +2 -0
- package/dist/research/index.js.map +1 -0
- package/dist/roadmap/index.js +59 -0
- package/dist/roadmap/index.js.map +1 -0
- package/dist/routing/capability-matrix.js +1550 -0
- package/dist/routing/capability-matrix.js.map +1 -0
- package/dist/routing/index.js +9 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +1178 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/schema-management.js +295 -0
- package/dist/schema-management.js.map +1 -0
- package/dist/security/index.js +9 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/input-sanitization.js +321 -0
- package/dist/security/input-sanitization.js.map +1 -0
- package/dist/sequence/index.js +295 -0
- package/dist/sequence/index.js.map +1 -0
- package/dist/sessions/assumptions.js +54 -0
- package/dist/sessions/assumptions.js.map +1 -0
- package/dist/sessions/briefing.js +377 -0
- package/dist/sessions/briefing.js.map +1 -0
- package/dist/sessions/context-alert.js +222 -0
- package/dist/sessions/context-alert.js.map +1 -0
- package/dist/sessions/context-inject.js +61 -0
- package/dist/sessions/context-inject.js.map +1 -0
- package/dist/sessions/context-monitor.js +98 -0
- package/dist/sessions/context-monitor.js.map +1 -0
- package/dist/sessions/decisions.js +65 -0
- package/dist/sessions/decisions.js.map +1 -0
- package/dist/sessions/find.js +63 -0
- package/dist/sessions/find.js.map +1 -0
- package/dist/sessions/handoff.js +328 -0
- package/dist/sessions/handoff.js.map +1 -0
- package/dist/sessions/hitl-warnings.js +254 -0
- package/dist/sessions/hitl-warnings.js.map +1 -0
- package/dist/sessions/index.js +318 -0
- package/dist/sessions/index.js.map +1 -0
- package/dist/sessions/session-archive.js +40 -0
- package/dist/sessions/session-archive.js.map +1 -0
- package/dist/sessions/session-cleanup.js +59 -0
- package/dist/sessions/session-cleanup.js.map +1 -0
- package/dist/sessions/session-drift.js +134 -0
- package/dist/sessions/session-drift.js.map +1 -0
- package/dist/sessions/session-enforcement.js +144 -0
- package/dist/sessions/session-enforcement.js.map +1 -0
- package/dist/sessions/session-grade.js +253 -0
- package/dist/sessions/session-grade.js.map +1 -0
- package/dist/sessions/session-history.js +42 -0
- package/dist/sessions/session-history.js.map +1 -0
- package/dist/sessions/session-id.js +81 -0
- package/dist/sessions/session-id.js.map +1 -0
- package/dist/sessions/session-memory-bridge.js +52 -0
- package/dist/sessions/session-memory-bridge.js.map +1 -0
- package/dist/sessions/session-show.js +24 -0
- package/dist/sessions/session-show.js.map +1 -0
- package/dist/sessions/session-stats.js +69 -0
- package/dist/sessions/session-stats.js.map +1 -0
- package/dist/sessions/session-suspend.js +39 -0
- package/dist/sessions/session-suspend.js.map +1 -0
- package/dist/sessions/session-switch.js +51 -0
- package/dist/sessions/session-switch.js.map +1 -0
- package/dist/sessions/session-view.js +76 -0
- package/dist/sessions/session-view.js.map +1 -0
- package/dist/sessions/statusline-setup.js +85 -0
- package/dist/sessions/statusline-setup.js.map +1 -0
- package/dist/sessions/types.js +8 -0
- package/dist/sessions/types.js.map +1 -0
- package/dist/signaldock/claude-code-transport.js +107 -0
- package/dist/signaldock/claude-code-transport.js.map +1 -0
- package/dist/signaldock/factory.js +25 -0
- package/dist/signaldock/factory.js.map +1 -0
- package/dist/signaldock/index.js +9 -0
- package/dist/signaldock/index.js.map +1 -0
- package/dist/signaldock/signaldock-transport.js +122 -0
- package/dist/signaldock/signaldock-transport.js.map +1 -0
- package/dist/signaldock/transport.js +11 -0
- package/dist/signaldock/transport.js.map +1 -0
- package/dist/signaldock/types.js +11 -0
- package/dist/signaldock/types.js.map +1 -0
- package/dist/skills/agents/config.js +94 -0
- package/dist/skills/agents/config.js.map +1 -0
- package/dist/skills/agents/install.js +116 -0
- package/dist/skills/agents/install.js.map +1 -0
- package/dist/skills/agents/registry.js +161 -0
- package/dist/skills/agents/registry.js.map +1 -0
- package/dist/skills/discovery.js +333 -0
- package/dist/skills/discovery.js.map +1 -0
- package/dist/skills/dispatch.js +347 -0
- package/dist/skills/dispatch.js.map +1 -0
- package/dist/skills/dynamic-skill-generator.js +100 -0
- package/dist/skills/dynamic-skill-generator.js.map +1 -0
- package/dist/skills/index.js +44 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/injection/subagent.js +195 -0
- package/dist/skills/injection/subagent.js.map +1 -0
- package/dist/skills/injection/token.js +260 -0
- package/dist/skills/injection/token.js.map +1 -0
- package/dist/skills/install.js +40 -0
- package/dist/skills/install.js.map +1 -0
- package/dist/skills/manifests/contribution.js +175 -0
- package/dist/skills/manifests/contribution.js.map +1 -0
- package/dist/skills/manifests/research.js +281 -0
- package/dist/skills/manifests/research.js.map +1 -0
- package/dist/skills/manifests/resolver.js +146 -0
- package/dist/skills/manifests/resolver.js.map +1 -0
- package/dist/skills/marketplace.js +90 -0
- package/dist/skills/marketplace.js.map +1 -0
- package/dist/skills/orchestrator/spawn.js +178 -0
- package/dist/skills/orchestrator/spawn.js.map +1 -0
- package/dist/skills/orchestrator/startup.js +451 -0
- package/dist/skills/orchestrator/startup.js.map +1 -0
- package/dist/skills/orchestrator/validator.js +301 -0
- package/dist/skills/orchestrator/validator.js.map +1 -0
- package/dist/skills/precedence-integration.js +73 -0
- package/dist/skills/precedence-integration.js.map +1 -0
- package/dist/skills/precedence-types.js +16 -0
- package/dist/skills/precedence-types.js.map +1 -0
- package/dist/skills/routing-table.js +63 -0
- package/dist/skills/routing-table.js.map +1 -0
- package/dist/skills/skill-paths.js +220 -0
- package/dist/skills/skill-paths.js.map +1 -0
- package/dist/skills/test-utility.js +55 -0
- package/dist/skills/test-utility.js.map +1 -0
- package/dist/skills/types.js +118 -0
- package/dist/skills/types.js.map +1 -0
- package/dist/skills/validation.js +183 -0
- package/dist/skills/validation.js.map +1 -0
- package/dist/skills/version.js +57 -0
- package/dist/skills/version.js.map +1 -0
- package/dist/snapshot/index.js +188 -0
- package/dist/snapshot/index.js.map +1 -0
- package/dist/spawn/adapter-registry.js +246 -0
- package/dist/spawn/adapter-registry.js.map +1 -0
- package/dist/spawn/index.js +10 -0
- package/dist/spawn/index.js.map +1 -0
- package/dist/stats/index.js +341 -0
- package/dist/stats/index.js.map +1 -0
- package/dist/stats/workflow-telemetry.js +400 -0
- package/dist/stats/workflow-telemetry.js.map +1 -0
- package/dist/sticky/archive.js +47 -0
- package/dist/sticky/archive.js.map +1 -0
- package/dist/sticky/convert.js +235 -0
- package/dist/sticky/convert.js.map +1 -0
- package/dist/sticky/create.js +48 -0
- package/dist/sticky/create.js.map +1 -0
- package/dist/sticky/id.js +35 -0
- package/dist/sticky/id.js.map +1 -0
- package/dist/sticky/index.js +16 -0
- package/dist/sticky/index.js.map +1 -0
- package/dist/sticky/list.js +44 -0
- package/dist/sticky/list.js.map +1 -0
- package/dist/sticky/purge.js +45 -0
- package/dist/sticky/purge.js.map +1 -0
- package/dist/sticky/show.js +42 -0
- package/dist/sticky/show.js.map +1 -0
- package/dist/sticky/types.js +10 -0
- package/dist/sticky/types.js.map +1 -0
- package/dist/store/atomic.js +167 -0
- package/dist/store/atomic.js.map +1 -0
- package/dist/store/backup.js +94 -0
- package/dist/store/backup.js.map +1 -0
- package/dist/store/brain-accessor.js +397 -0
- package/dist/store/brain-accessor.js.map +1 -0
- package/dist/store/brain-schema.js +215 -0
- package/dist/store/brain-schema.js.map +1 -0
- package/dist/store/brain-sqlite.js +271 -0
- package/dist/store/brain-sqlite.js.map +1 -0
- package/dist/store/cache.js +168 -0
- package/dist/store/cache.js.map +1 -0
- package/dist/store/chain-schema.js +51 -0
- package/dist/store/chain-schema.js.map +1 -0
- package/dist/store/converters.js +122 -0
- package/dist/store/converters.js.map +1 -0
- package/dist/store/cross-db-cleanup.js +169 -0
- package/dist/store/cross-db-cleanup.js.map +1 -0
- package/dist/store/data-accessor.js +26 -0
- package/dist/store/data-accessor.js.map +1 -0
- package/dist/store/data-safety-central.js +269 -0
- package/dist/store/data-safety-central.js.map +1 -0
- package/dist/store/data-safety.js +274 -0
- package/dist/store/data-safety.js.map +1 -0
- package/dist/store/db-helpers.js +223 -0
- package/dist/store/db-helpers.js.map +1 -0
- package/dist/store/export.js +155 -0
- package/dist/store/export.js.map +1 -0
- package/dist/store/file-utils.js +270 -0
- package/dist/store/file-utils.js.map +1 -0
- package/dist/store/git-checkpoint.js +365 -0
- package/dist/store/git-checkpoint.js.map +1 -0
- package/dist/store/import-logging.js +139 -0
- package/dist/store/import-logging.js.map +1 -0
- package/dist/store/import-remap.js +145 -0
- package/dist/store/import-remap.js.map +1 -0
- package/dist/store/import-sort.js +121 -0
- package/dist/store/import-sort.js.map +1 -0
- package/dist/store/index.js +28 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/json.js +208 -0
- package/dist/store/json.js.map +1 -0
- package/dist/store/lifecycle-store.js +249 -0
- package/dist/store/lifecycle-store.js.map +1 -0
- package/dist/store/lock.js +70 -0
- package/dist/store/lock.js.map +1 -0
- package/dist/store/migration-sqlite.js +676 -0
- package/dist/store/migration-sqlite.js.map +1 -0
- package/dist/store/nexus-schema.js +62 -0
- package/dist/store/nexus-schema.js.map +1 -0
- package/dist/store/nexus-sqlite.js +217 -0
- package/dist/store/nexus-sqlite.js.map +1 -0
- package/dist/store/nexus-validation-schemas.js +40 -0
- package/dist/store/nexus-validation-schemas.js.map +1 -0
- package/dist/store/parsers.js +37 -0
- package/dist/store/parsers.js.map +1 -0
- package/dist/store/project-detect.js +457 -0
- package/dist/store/project-detect.js.map +1 -0
- package/dist/store/provider.js +101 -0
- package/dist/store/provider.js.map +1 -0
- package/dist/store/safety-data-accessor.js +243 -0
- package/dist/store/safety-data-accessor.js.map +1 -0
- package/dist/store/schema.js +7 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store/session-store.js +219 -0
- package/dist/store/session-store.js.map +1 -0
- package/dist/store/sqlite-backup.js +105 -0
- package/dist/store/sqlite-backup.js.map +1 -0
- package/dist/store/sqlite-data-accessor.js +734 -0
- package/dist/store/sqlite-data-accessor.js.map +1 -0
- package/dist/store/sqlite.d.ts.map +1 -1
- package/dist/store/sqlite.js +500 -0
- package/dist/store/sqlite.js.map +1 -0
- package/dist/store/status-registry.js +8 -0
- package/dist/store/status-registry.js.map +1 -0
- package/dist/store/task-store.js +348 -0
- package/dist/store/task-store.js.map +1 -0
- package/dist/store/tasks-schema.js +604 -0
- package/dist/store/tasks-schema.js.map +1 -0
- package/dist/store/typed-query.js +15 -0
- package/dist/store/typed-query.js.map +1 -0
- package/dist/store/validation-schemas.js +278 -0
- package/dist/store/validation-schemas.js.map +1 -0
- package/dist/system/archive-analytics.js +277 -0
- package/dist/system/archive-analytics.js.map +1 -0
- package/dist/system/archive-stats.js +64 -0
- package/dist/system/archive-stats.js.map +1 -0
- package/dist/system/audit.js +145 -0
- package/dist/system/audit.js.map +1 -0
- package/dist/system/backup.js +99 -0
- package/dist/system/backup.js.map +1 -0
- package/dist/system/cleanup.js +134 -0
- package/dist/system/cleanup.js.map +1 -0
- package/dist/system/health.js +1054 -0
- package/dist/system/health.js.map +1 -0
- package/dist/system/index.js +18 -0
- package/dist/system/index.js.map +1 -0
- package/dist/system/inject-generate.js +122 -0
- package/dist/system/inject-generate.js.map +1 -0
- package/dist/system/labels.js +38 -0
- package/dist/system/labels.js.map +1 -0
- package/dist/system/metrics.js +61 -0
- package/dist/system/metrics.js.map +1 -0
- package/dist/system/migrate.js +43 -0
- package/dist/system/migrate.js.map +1 -0
- package/dist/system/platform-paths.js +80 -0
- package/dist/system/platform-paths.js.map +1 -0
- package/dist/system/runtime.js +161 -0
- package/dist/system/runtime.js.map +1 -0
- package/dist/system/safestop.js +99 -0
- package/dist/system/safestop.js.map +1 -0
- package/dist/system/storage-preflight.js +123 -0
- package/dist/system/storage-preflight.js.map +1 -0
- package/dist/task-work/index.js +155 -0
- package/dist/task-work/index.js.map +1 -0
- package/dist/tasks/add.js +594 -0
- package/dist/tasks/add.js.map +1 -0
- package/dist/tasks/analyze.js +85 -0
- package/dist/tasks/analyze.js.map +1 -0
- package/dist/tasks/archive.js +90 -0
- package/dist/tasks/archive.js.map +1 -0
- package/dist/tasks/atomicity.js +83 -0
- package/dist/tasks/atomicity.js.map +1 -0
- package/dist/tasks/cancel-ops.js +83 -0
- package/dist/tasks/cancel-ops.js.map +1 -0
- package/dist/tasks/complete.js +235 -0
- package/dist/tasks/complete.js.map +1 -0
- package/dist/tasks/crossref-extract.js +73 -0
- package/dist/tasks/crossref-extract.js.map +1 -0
- package/dist/tasks/delete-preview.js +192 -0
- package/dist/tasks/delete-preview.js.map +1 -0
- package/dist/tasks/delete.js +120 -0
- package/dist/tasks/delete.js.map +1 -0
- package/dist/tasks/deletion-strategy.js +200 -0
- package/dist/tasks/deletion-strategy.js.map +1 -0
- package/dist/tasks/dependency-check.js +278 -0
- package/dist/tasks/dependency-check.js.map +1 -0
- package/dist/tasks/deps-ready.js +32 -0
- package/dist/tasks/deps-ready.js.map +1 -0
- package/dist/tasks/enforcement.js +89 -0
- package/dist/tasks/enforcement.js.map +1 -0
- package/dist/tasks/epic-enforcement.js +294 -0
- package/dist/tasks/epic-enforcement.js.map +1 -0
- package/dist/tasks/find.js +148 -0
- package/dist/tasks/find.js.map +1 -0
- package/dist/tasks/graph-cache.js +127 -0
- package/dist/tasks/graph-cache.js.map +1 -0
- package/dist/tasks/graph-ops.js +171 -0
- package/dist/tasks/graph-ops.js.map +1 -0
- package/dist/tasks/graph-rag.js +328 -0
- package/dist/tasks/graph-rag.js.map +1 -0
- package/dist/tasks/hierarchy-policy.js +149 -0
- package/dist/tasks/hierarchy-policy.js.map +1 -0
- package/dist/tasks/hierarchy.js +185 -0
- package/dist/tasks/hierarchy.js.map +1 -0
- package/dist/tasks/id-generator.js +65 -0
- package/dist/tasks/id-generator.js.map +1 -0
- package/dist/tasks/index.js +14 -0
- package/dist/tasks/index.js.map +1 -0
- package/dist/tasks/labels.js +52 -0
- package/dist/tasks/labels.js.map +1 -0
- package/dist/tasks/list.js +68 -0
- package/dist/tasks/list.js.map +1 -0
- package/dist/tasks/phase-tracking.js +133 -0
- package/dist/tasks/phase-tracking.js.map +1 -0
- package/dist/tasks/pipeline-stage.js +248 -0
- package/dist/tasks/pipeline-stage.js.map +1 -0
- package/dist/tasks/plan.js +268 -0
- package/dist/tasks/plan.js.map +1 -0
- package/dist/tasks/relates.js +89 -0
- package/dist/tasks/relates.js.map +1 -0
- package/dist/tasks/reparent.d.ts +38 -0
- package/dist/tasks/reparent.d.ts.map +1 -0
- package/dist/tasks/show.js +78 -0
- package/dist/tasks/show.js.map +1 -0
- package/dist/tasks/size-weighting.js +86 -0
- package/dist/tasks/size-weighting.js.map +1 -0
- package/dist/tasks/staleness.js +86 -0
- package/dist/tasks/staleness.js.map +1 -0
- package/dist/tasks/task-ops.js +1340 -0
- package/dist/tasks/task-ops.js.map +1 -0
- package/dist/tasks/update.js +271 -0
- package/dist/tasks/update.js.map +1 -0
- package/dist/templates/index.js +10 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/parser.js +254 -0
- package/dist/templates/parser.js.map +1 -0
- package/dist/ui/aliases.js +153 -0
- package/dist/ui/aliases.js.map +1 -0
- package/dist/ui/changelog.js +184 -0
- package/dist/ui/changelog.js.map +1 -0
- package/dist/ui/command-registry.js +168 -0
- package/dist/ui/command-registry.js.map +1 -0
- package/dist/ui/flags.js +94 -0
- package/dist/ui/flags.js.map +1 -0
- package/dist/ui/index.js +24 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/injection-legacy.d.ts +26 -0
- package/dist/ui/injection-legacy.d.ts.map +1 -0
- package/dist/ui/injection-legacy.js +42 -0
- package/dist/ui/injection-legacy.js.map +1 -0
- package/dist/upgrade.js +901 -0
- package/dist/upgrade.js.map +1 -0
- package/dist/validation/chain-validation.js +146 -0
- package/dist/validation/chain-validation.js.map +1 -0
- package/dist/validation/compliance.js +155 -0
- package/dist/validation/compliance.js.map +1 -0
- package/dist/validation/docs-sync.js +212 -0
- package/dist/validation/docs-sync.js.map +1 -0
- package/dist/validation/doctor/checks.js +1069 -0
- package/dist/validation/doctor/checks.js.map +1 -0
- package/dist/validation/doctor/index.js +9 -0
- package/dist/validation/doctor/index.js.map +1 -0
- package/dist/validation/doctor/project-cache.js +160 -0
- package/dist/validation/doctor/project-cache.js.map +1 -0
- package/dist/validation/doctor/utils.js +155 -0
- package/dist/validation/doctor/utils.js.map +1 -0
- package/dist/validation/engine.js +902 -0
- package/dist/validation/engine.js.map +1 -0
- package/dist/validation/gap-check.js +175 -0
- package/dist/validation/gap-check.js.map +1 -0
- package/dist/validation/index.js +40 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/manifest.js +237 -0
- package/dist/validation/manifest.js.map +1 -0
- package/dist/validation/operation-gate-validators.js +724 -0
- package/dist/validation/operation-gate-validators.js.map +1 -0
- package/dist/validation/operation-verification-gates.js +532 -0
- package/dist/validation/operation-verification-gates.js.map +1 -0
- package/dist/validation/param-utils.js +139 -0
- package/dist/validation/param-utils.js.map +1 -0
- package/dist/validation/protocol-common.js +300 -0
- package/dist/validation/protocol-common.js.map +1 -0
- package/dist/validation/protocols/consensus.js +71 -0
- package/dist/validation/protocols/consensus.js.map +1 -0
- package/dist/validation/protocols/contribution.js +59 -0
- package/dist/validation/protocols/contribution.js.map +1 -0
- package/dist/validation/protocols/decomposition.js +59 -0
- package/dist/validation/protocols/decomposition.js.map +1 -0
- package/dist/validation/protocols/implementation.js +59 -0
- package/dist/validation/protocols/implementation.js.map +1 -0
- package/dist/validation/protocols/release-protocol.js +60 -0
- package/dist/validation/protocols/release-protocol.js.map +1 -0
- package/dist/validation/protocols/research.js +77 -0
- package/dist/validation/protocols/research.js.map +1 -0
- package/dist/validation/protocols/specification.js +84 -0
- package/dist/validation/protocols/specification.js.map +1 -0
- package/dist/validation/protocols/testing-protocol.js +70 -0
- package/dist/validation/protocols/testing-protocol.js.map +1 -0
- package/dist/validation/protocols/validation-protocol.js +70 -0
- package/dist/validation/protocols/validation-protocol.js.map +1 -0
- package/dist/validation/schema-integrity.js +170 -0
- package/dist/validation/schema-integrity.js.map +1 -0
- package/dist/validation/schema-validator.js +176 -0
- package/dist/validation/schema-validator.js.map +1 -0
- package/dist/validation/validate-ops.js +937 -0
- package/dist/validation/validate-ops.js.map +1 -0
- package/dist/validation/validation-rules.js +226 -0
- package/dist/validation/validation-rules.js.map +1 -0
- package/dist/validation/verification.js +321 -0
- package/dist/validation/verification.js.map +1 -0
- package/package.json +5 -5
- package/src/agents/__tests__/agent-registry.test.ts +1 -1
- package/src/bootstrap.ts +171 -30
- package/src/cleo.ts +103 -2
- package/src/internal.ts +1 -1
- package/src/repair.ts +53 -2
- package/src/scaffold.ts +24 -2
- package/src/store/sqlite.ts +72 -5
package/dist/index.js
CHANGED
|
@@ -11225,16 +11225,33 @@ function runMigrations(nativeDb, db) {
|
|
|
11225
11225
|
);
|
|
11226
11226
|
}
|
|
11227
11227
|
}
|
|
11228
|
-
|
|
11228
|
+
if (tableExists3(nativeDb, "__drizzle_migrations") && tableExists3(nativeDb, "tasks")) {
|
|
11229
|
+
const localMigrations = readMigrationFiles({ migrationsFolder });
|
|
11230
|
+
const localHashes = new Set(localMigrations.map((m) => m.hash));
|
|
11231
|
+
const dbEntries = nativeDb.prepare('SELECT hash FROM "__drizzle_migrations"').all();
|
|
11232
|
+
const hasOrphanedEntries = dbEntries.some((e) => !localHashes.has(e.hash));
|
|
11233
|
+
if (hasOrphanedEntries) {
|
|
11234
|
+
const log9 = getLogger("sqlite");
|
|
11235
|
+
log9.warn(
|
|
11236
|
+
{ orphaned: dbEntries.filter((e) => !localHashes.has(e.hash)).length },
|
|
11237
|
+
"Detected stale migration journal entries from a previous CLEO version. Reconciling."
|
|
11238
|
+
);
|
|
11239
|
+
nativeDb.exec('DELETE FROM "__drizzle_migrations"');
|
|
11240
|
+
for (const m of localMigrations) {
|
|
11241
|
+
nativeDb.exec(
|
|
11242
|
+
`INSERT INTO "__drizzle_migrations" ("hash", "created_at") VALUES ('${m.hash}', ${m.folderMillis})`
|
|
11243
|
+
);
|
|
11244
|
+
}
|
|
11245
|
+
}
|
|
11246
|
+
}
|
|
11229
11247
|
for (let attempt = 1; attempt <= MAX_MIGRATION_RETRIES; attempt++) {
|
|
11230
11248
|
try {
|
|
11231
11249
|
migrate(db, { migrationsFolder });
|
|
11232
|
-
|
|
11250
|
+
break;
|
|
11233
11251
|
} catch (err) {
|
|
11234
11252
|
if (!isSqliteBusy(err) || attempt === MAX_MIGRATION_RETRIES) {
|
|
11235
11253
|
throw err;
|
|
11236
11254
|
}
|
|
11237
|
-
lastError = err;
|
|
11238
11255
|
const delay = Math.min(
|
|
11239
11256
|
MIGRATION_RETRY_BASE_DELAY_MS * 2 ** (attempt - 1) * (1 + Math.random() * 0.5),
|
|
11240
11257
|
MIGRATION_RETRY_MAX_DELAY_MS
|
|
@@ -11242,7 +11259,19 @@ function runMigrations(nativeDb, db) {
|
|
|
11242
11259
|
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, Math.round(delay));
|
|
11243
11260
|
}
|
|
11244
11261
|
}
|
|
11245
|
-
|
|
11262
|
+
ensureRequiredColumns(nativeDb);
|
|
11263
|
+
}
|
|
11264
|
+
function ensureRequiredColumns(nativeDb) {
|
|
11265
|
+
if (!tableExists3(nativeDb, "tasks")) return;
|
|
11266
|
+
const columns = nativeDb.prepare("PRAGMA table_info(tasks)").all();
|
|
11267
|
+
const existingCols = new Set(columns.map((c) => c.name));
|
|
11268
|
+
for (const req of REQUIRED_TASK_COLUMNS) {
|
|
11269
|
+
if (!existingCols.has(req.name)) {
|
|
11270
|
+
const log9 = getLogger("sqlite");
|
|
11271
|
+
log9.warn({ column: req.name }, `Adding missing column tasks.${req.name} via ALTER TABLE`);
|
|
11272
|
+
nativeDb.exec(`ALTER TABLE tasks ADD COLUMN ${req.name} ${req.ddl}`);
|
|
11273
|
+
}
|
|
11274
|
+
}
|
|
11246
11275
|
}
|
|
11247
11276
|
function closeDb() {
|
|
11248
11277
|
if (_nativeDb2) {
|
|
@@ -11299,7 +11328,7 @@ async function closeAllDatabases() {
|
|
|
11299
11328
|
} catch {
|
|
11300
11329
|
}
|
|
11301
11330
|
}
|
|
11302
|
-
var _require2, DatabaseSync2, DB_FILENAME3, SQLITE_SCHEMA_VERSION, SCHEMA_VERSION, _db2, _nativeDb2, _dbPath2, _initPromise2, _gitTrackingChecked, MIN_BACKUP_TASK_COUNT, MAX_MIGRATION_RETRIES, MIGRATION_RETRY_BASE_DELAY_MS, MIGRATION_RETRY_MAX_DELAY_MS;
|
|
11331
|
+
var _require2, DatabaseSync2, DB_FILENAME3, SQLITE_SCHEMA_VERSION, SCHEMA_VERSION, _db2, _nativeDb2, _dbPath2, _initPromise2, _gitTrackingChecked, MIN_BACKUP_TASK_COUNT, MAX_MIGRATION_RETRIES, MIGRATION_RETRY_BASE_DELAY_MS, MIGRATION_RETRY_MAX_DELAY_MS, REQUIRED_TASK_COLUMNS;
|
|
11303
11332
|
var init_sqlite2 = __esm({
|
|
11304
11333
|
"packages/core/src/store/sqlite.ts"() {
|
|
11305
11334
|
"use strict";
|
|
@@ -11324,6 +11353,9 @@ var init_sqlite2 = __esm({
|
|
|
11324
11353
|
MAX_MIGRATION_RETRIES = 5;
|
|
11325
11354
|
MIGRATION_RETRY_BASE_DELAY_MS = 100;
|
|
11326
11355
|
MIGRATION_RETRY_MAX_DELAY_MS = 2e3;
|
|
11356
|
+
REQUIRED_TASK_COLUMNS = [
|
|
11357
|
+
{ name: "pipeline_stage", ddl: "text" }
|
|
11358
|
+
];
|
|
11327
11359
|
}
|
|
11328
11360
|
});
|
|
11329
11361
|
|
|
@@ -19102,6 +19134,7 @@ import { execFile as execFile3 } from "node:child_process";
|
|
|
19102
19134
|
import { randomUUID } from "node:crypto";
|
|
19103
19135
|
import { existsSync as existsSync33, constants as fsConstants3, readFileSync as readFileSync22, statSync as statSync8 } from "node:fs";
|
|
19104
19136
|
import { access as access3, mkdir as mkdir5, readFile as readFile6, rm as rm2, writeFile as writeFile5 } from "node:fs/promises";
|
|
19137
|
+
import { homedir as getHomedir } from "node:os";
|
|
19105
19138
|
import { dirname as dirname8, join as join37, resolve as resolve5 } from "node:path";
|
|
19106
19139
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
19107
19140
|
import { promisify as promisify3 } from "node:util";
|
|
@@ -19913,12 +19946,30 @@ function checkGlobalTemplates() {
|
|
|
19913
19946
|
fix: "cleo init (or restart MCP server)"
|
|
19914
19947
|
};
|
|
19915
19948
|
}
|
|
19949
|
+
const xdgContent = readFileSync22(injectionPath, "utf-8");
|
|
19950
|
+
const xdgVersion = xdgContent.match(/^Version:\s*(.+)$/m)?.[1]?.trim();
|
|
19951
|
+
const home = getHomedir();
|
|
19952
|
+
const legacyPath = join37(home, ".cleo", "templates", "CLEO-INJECTION.md");
|
|
19953
|
+
if (existsSync33(legacyPath)) {
|
|
19954
|
+
const legacyContent = readFileSync22(legacyPath, "utf-8");
|
|
19955
|
+
const legacyVersion = legacyContent.match(/^Version:\s*(.+)$/m)?.[1]?.trim();
|
|
19956
|
+
if (legacyVersion && xdgVersion && legacyVersion !== xdgVersion) {
|
|
19957
|
+
return {
|
|
19958
|
+
id: "global_templates",
|
|
19959
|
+
category: "global",
|
|
19960
|
+
status: "warning",
|
|
19961
|
+
message: `Legacy template version (${legacyVersion}) out of sync with XDG (${xdgVersion})`,
|
|
19962
|
+
details: { path: injectionPath, exists: true, xdgVersion, legacyVersion, legacyPath },
|
|
19963
|
+
fix: "npm install -g @cleocode/cleo (reinstall syncs both paths)"
|
|
19964
|
+
};
|
|
19965
|
+
}
|
|
19966
|
+
}
|
|
19916
19967
|
return {
|
|
19917
19968
|
id: "global_templates",
|
|
19918
19969
|
category: "global",
|
|
19919
19970
|
status: "passed",
|
|
19920
|
-
message:
|
|
19921
|
-
details: { path: injectionPath, exists: true },
|
|
19971
|
+
message: `Global injection template present (v${xdgVersion ?? "unknown"})`,
|
|
19972
|
+
details: { path: injectionPath, exists: true, version: xdgVersion },
|
|
19922
19973
|
fix: null
|
|
19923
19974
|
};
|
|
19924
19975
|
}
|
|
@@ -64457,46 +64508,68 @@ async function bootstrapGlobalCleo(options) {
|
|
|
64457
64508
|
await installSkillsGlobally(ctx);
|
|
64458
64509
|
await installAgentDefinitionGlobally(ctx);
|
|
64459
64510
|
await installProviderAdapters(ctx, options?.packageRoot);
|
|
64511
|
+
await verifyBootstrapHealth(ctx);
|
|
64460
64512
|
return ctx;
|
|
64461
64513
|
}
|
|
64514
|
+
async function writeTemplateTo(content, destPath, isDryRun) {
|
|
64515
|
+
if (isDryRun) return false;
|
|
64516
|
+
const { dirname: dirname20 } = await import("node:path");
|
|
64517
|
+
await mkdir17(dirname20(destPath), { recursive: true });
|
|
64518
|
+
await writeFile12(destPath, content);
|
|
64519
|
+
return true;
|
|
64520
|
+
}
|
|
64462
64521
|
async function ensureGlobalTemplatesBootstrap(ctx, packageRootOverride) {
|
|
64463
64522
|
const globalTemplatesDir = getCleoTemplatesDir();
|
|
64464
64523
|
if (!ctx.isDryRun) {
|
|
64465
64524
|
await mkdir17(globalTemplatesDir, { recursive: true });
|
|
64466
64525
|
}
|
|
64526
|
+
let templateContent = null;
|
|
64467
64527
|
try {
|
|
64468
64528
|
const pkgRoot = packageRootOverride ?? getPackageRoot();
|
|
64469
64529
|
const templatePath = join104(pkgRoot, "templates", "CLEO-INJECTION.md");
|
|
64470
64530
|
if (existsSync103(templatePath)) {
|
|
64471
|
-
|
|
64472
|
-
const destPath = join104(globalTemplatesDir, "CLEO-INJECTION.md");
|
|
64473
|
-
if (!ctx.isDryRun) {
|
|
64474
|
-
await writeFile12(destPath, content);
|
|
64475
|
-
}
|
|
64476
|
-
ctx.created.push(
|
|
64477
|
-
`~/.cleo/templates/CLEO-INJECTION.md (${ctx.isDryRun ? "would refresh" : "refreshed"})`
|
|
64478
|
-
);
|
|
64479
|
-
} else {
|
|
64480
|
-
try {
|
|
64481
|
-
const { getInjectionTemplateContent: getInjectionTemplateContent2 } = await Promise.resolve().then(() => (init_injection(), injection_exports));
|
|
64482
|
-
const content = getInjectionTemplateContent2();
|
|
64483
|
-
if (content) {
|
|
64484
|
-
const destPath = join104(globalTemplatesDir, "CLEO-INJECTION.md");
|
|
64485
|
-
if (!ctx.isDryRun) {
|
|
64486
|
-
await writeFile12(destPath, content);
|
|
64487
|
-
}
|
|
64488
|
-
ctx.created.push(
|
|
64489
|
-
`~/.cleo/templates/CLEO-INJECTION.md (${ctx.isDryRun ? "would refresh" : "refreshed"} from embedded)`
|
|
64490
|
-
);
|
|
64491
|
-
}
|
|
64492
|
-
} catch {
|
|
64493
|
-
ctx.warnings.push("Could not refresh CLEO-INJECTION.md template");
|
|
64494
|
-
}
|
|
64531
|
+
templateContent = readFileSync77(templatePath, "utf-8");
|
|
64495
64532
|
}
|
|
64496
64533
|
} catch {
|
|
64534
|
+
}
|
|
64535
|
+
if (!templateContent) {
|
|
64536
|
+
try {
|
|
64537
|
+
const { getInjectionTemplateContent: getInjectionTemplateContent2 } = await Promise.resolve().then(() => (init_injection(), injection_exports));
|
|
64538
|
+
templateContent = getInjectionTemplateContent2() ?? null;
|
|
64539
|
+
} catch {
|
|
64540
|
+
ctx.warnings.push("Could not refresh CLEO-INJECTION.md template");
|
|
64541
|
+
return;
|
|
64542
|
+
}
|
|
64543
|
+
}
|
|
64544
|
+
if (!templateContent) {
|
|
64497
64545
|
ctx.warnings.push("Could not refresh CLEO-INJECTION.md template");
|
|
64546
|
+
return;
|
|
64547
|
+
}
|
|
64548
|
+
const xdgDest = join104(globalTemplatesDir, "CLEO-INJECTION.md");
|
|
64549
|
+
const xdgWritten = await writeTemplateTo(templateContent, xdgDest, ctx.isDryRun);
|
|
64550
|
+
ctx.created.push(
|
|
64551
|
+
`${getCleoTemplatesTildePath()}/CLEO-INJECTION.md (${xdgWritten ? "refreshed" : "would refresh"})`
|
|
64552
|
+
);
|
|
64553
|
+
const home = homedir6();
|
|
64554
|
+
const legacyTemplatesDir = join104(home, ".cleo", "templates");
|
|
64555
|
+
if (legacyTemplatesDir !== globalTemplatesDir && existsSync103(join104(home, ".cleo"))) {
|
|
64556
|
+
const legacyDest = join104(legacyTemplatesDir, "CLEO-INJECTION.md");
|
|
64557
|
+
const legacyWritten = await writeTemplateTo(templateContent, legacyDest, ctx.isDryRun);
|
|
64558
|
+
if (legacyWritten) {
|
|
64559
|
+
ctx.created.push("~/.cleo/templates/CLEO-INJECTION.md (legacy sync)");
|
|
64560
|
+
}
|
|
64498
64561
|
}
|
|
64499
64562
|
}
|
|
64563
|
+
function sanitizeCaampFile(content) {
|
|
64564
|
+
let cleaned = content.replace(/(<!-- CAAMP:END -->)\s*(<!-- CAAMP:END -->)/g, "$1");
|
|
64565
|
+
cleaned = cleaned.replace(
|
|
64566
|
+
/<!-- CAAMP:END -->\s*[A-Z][A-Za-z-]*\.md\s*(?:<!-- CAAMP:END -->)?/g,
|
|
64567
|
+
"<!-- CAAMP:END -->"
|
|
64568
|
+
);
|
|
64569
|
+
cleaned = cleaned.replace(/^[A-Z][A-Za-z-]*\.md\s*$/gm, "");
|
|
64570
|
+
cleaned = cleaned.replace(/\n{3,}/g, "\n\n");
|
|
64571
|
+
return cleaned.trim() + "\n";
|
|
64572
|
+
}
|
|
64500
64573
|
async function injectAgentsHub(ctx) {
|
|
64501
64574
|
const globalAgentsDir = getAgentsHome();
|
|
64502
64575
|
const globalAgentsMd = join104(globalAgentsDir, "AGENTS.md");
|
|
@@ -64510,13 +64583,23 @@ async function injectAgentsHub(ctx) {
|
|
|
64510
64583
|
/\n?<!-- CLEO:START[^>]*-->[\s\S]*?<!-- CLEO:END -->\n?/g,
|
|
64511
64584
|
""
|
|
64512
64585
|
);
|
|
64513
|
-
|
|
64514
|
-
|
|
64586
|
+
const sanitized = sanitizeCaampFile(stripped);
|
|
64587
|
+
if (sanitized !== content) {
|
|
64588
|
+
await writeFile12(globalAgentsMd, sanitized, "utf8");
|
|
64589
|
+
ctx.created.push("~/.agents/AGENTS.md (sanitized CAAMP corruption)");
|
|
64515
64590
|
}
|
|
64516
64591
|
}
|
|
64517
64592
|
const templateRef = `@${getCleoTemplatesTildePath()}/CLEO-INJECTION.md`;
|
|
64518
64593
|
const action = await inject2(globalAgentsMd, templateRef);
|
|
64519
64594
|
ctx.created.push(`~/.agents/AGENTS.md (${action})`);
|
|
64595
|
+
const postContent = await readFile19(globalAgentsMd, "utf8");
|
|
64596
|
+
const caampBlocks = postContent.match(/<!-- CAAMP:START -->/g);
|
|
64597
|
+
const caampEnds = postContent.match(/<!-- CAAMP:END -->/g);
|
|
64598
|
+
if (caampBlocks && caampEnds && caampBlocks.length !== caampEnds.length) {
|
|
64599
|
+
ctx.warnings.push(
|
|
64600
|
+
`~/.agents/AGENTS.md has mismatched CAAMP markers (${caampBlocks.length} START vs ${caampEnds.length} END)`
|
|
64601
|
+
);
|
|
64602
|
+
}
|
|
64520
64603
|
} else {
|
|
64521
64604
|
ctx.created.push("~/.agents/AGENTS.md (would create/update CAAMP block)");
|
|
64522
64605
|
}
|
|
@@ -64650,6 +64733,45 @@ async function installProviderAdapters(ctx, packageRootOverride) {
|
|
|
64650
64733
|
);
|
|
64651
64734
|
}
|
|
64652
64735
|
}
|
|
64736
|
+
async function verifyBootstrapHealth(ctx) {
|
|
64737
|
+
if (ctx.isDryRun) return;
|
|
64738
|
+
try {
|
|
64739
|
+
const xdgTemplatePath = join104(getCleoTemplatesDir(), "CLEO-INJECTION.md");
|
|
64740
|
+
const agentsMd = join104(getAgentsHome(), "AGENTS.md");
|
|
64741
|
+
if (!existsSync103(xdgTemplatePath)) {
|
|
64742
|
+
ctx.warnings.push("Health: XDG template missing after bootstrap");
|
|
64743
|
+
return;
|
|
64744
|
+
}
|
|
64745
|
+
const xdgContent = await readFile19(xdgTemplatePath, "utf8");
|
|
64746
|
+
const xdgVersion = xdgContent.match(/^Version:\s*(.+)$/m)?.[1]?.trim();
|
|
64747
|
+
const home = homedir6();
|
|
64748
|
+
const legacyTemplatePath = join104(home, ".cleo", "templates", "CLEO-INJECTION.md");
|
|
64749
|
+
if (existsSync103(legacyTemplatePath)) {
|
|
64750
|
+
const legacyContent = await readFile19(legacyTemplatePath, "utf8");
|
|
64751
|
+
const legacyVersion = legacyContent.match(/^Version:\s*(.+)$/m)?.[1]?.trim();
|
|
64752
|
+
if (legacyVersion !== xdgVersion) {
|
|
64753
|
+
ctx.warnings.push(
|
|
64754
|
+
`Health: Legacy template version (${legacyVersion}) != XDG version (${xdgVersion})`
|
|
64755
|
+
);
|
|
64756
|
+
}
|
|
64757
|
+
}
|
|
64758
|
+
if (existsSync103(agentsMd)) {
|
|
64759
|
+
const agentsContent = await readFile19(agentsMd, "utf8");
|
|
64760
|
+
const expectedRef = `@${getCleoTemplatesTildePath()}/CLEO-INJECTION.md`;
|
|
64761
|
+
if (!agentsContent.includes(expectedRef)) {
|
|
64762
|
+
ctx.warnings.push(`Health: ~/.agents/AGENTS.md does not reference ${expectedRef}`);
|
|
64763
|
+
}
|
|
64764
|
+
const outsideCaamp = agentsContent.replace(
|
|
64765
|
+
/<!-- CAAMP:START -->[\s\S]*?<!-- CAAMP:END -->/g,
|
|
64766
|
+
""
|
|
64767
|
+
);
|
|
64768
|
+
if (/[A-Z][A-Za-z-]*\.md/.test(outsideCaamp)) {
|
|
64769
|
+
ctx.warnings.push("Health: ~/.agents/AGENTS.md has orphaned content outside CAAMP blocks");
|
|
64770
|
+
}
|
|
64771
|
+
}
|
|
64772
|
+
} catch {
|
|
64773
|
+
}
|
|
64774
|
+
}
|
|
64653
64775
|
|
|
64654
64776
|
// packages/core/src/cleo.ts
|
|
64655
64777
|
import path from "node:path";
|
|
@@ -64724,7 +64846,10 @@ var Cleo = class _Cleo {
|
|
|
64724
64846
|
),
|
|
64725
64847
|
complete: (p) => completeTask({ taskId: p.taskId, notes: p.notes }, root, store),
|
|
64726
64848
|
delete: (p) => deleteTask({ taskId: p.taskId, force: p.force }, root, store),
|
|
64727
|
-
archive: (p) => archiveTasks({ before: p?.before, taskIds: p?.taskIds, dryRun: p?.dryRun }, root, store)
|
|
64849
|
+
archive: (p) => archiveTasks({ before: p?.before, taskIds: p?.taskIds, dryRun: p?.dryRun }, root, store),
|
|
64850
|
+
start: (taskId) => startTask(taskId, root, store),
|
|
64851
|
+
stop: () => stopTask(root, store),
|
|
64852
|
+
current: () => currentTask(root, store)
|
|
64728
64853
|
};
|
|
64729
64854
|
}
|
|
64730
64855
|
// === Sessions ===
|
|
@@ -64732,7 +64857,11 @@ var Cleo = class _Cleo {
|
|
|
64732
64857
|
const root = this.projectRoot;
|
|
64733
64858
|
const store = this._store ?? void 0;
|
|
64734
64859
|
return {
|
|
64735
|
-
start: (p) => startSession(
|
|
64860
|
+
start: (p) => startSession(
|
|
64861
|
+
{ name: p.name, scope: p.scope, agent: p.agent, startTask: p.startTask },
|
|
64862
|
+
root,
|
|
64863
|
+
store
|
|
64864
|
+
),
|
|
64736
64865
|
end: (p) => endSession({ note: p?.note }, root, store),
|
|
64737
64866
|
status: () => sessionStatus(root, store),
|
|
64738
64867
|
resume: (id) => resumeSession(id, root, store),
|
|
@@ -64870,6 +64999,35 @@ var Cleo = class _Cleo {
|
|
|
64870
64999
|
sharingStatus: () => getSharingStatus()
|
|
64871
65000
|
};
|
|
64872
65001
|
}
|
|
65002
|
+
// === Agents ===
|
|
65003
|
+
get agents() {
|
|
65004
|
+
const root = this.projectRoot;
|
|
65005
|
+
return {
|
|
65006
|
+
register: (opts) => registerAgent(opts, root),
|
|
65007
|
+
deregister: (agentId) => deregisterAgent(agentId, root),
|
|
65008
|
+
health: (agentId) => checkAgentHealth2(agentId, void 0, root),
|
|
65009
|
+
detectCrashed: (thresholdMs) => detectCrashedAgents(thresholdMs, root),
|
|
65010
|
+
recordHeartbeat: (agentId) => heartbeat(agentId, root),
|
|
65011
|
+
capacity: (agentId) => getAgentCapacity(agentId, root),
|
|
65012
|
+
isOverloaded: (threshold) => isOverloaded(threshold, root),
|
|
65013
|
+
list: (p) => listAgentInstances(
|
|
65014
|
+
{
|
|
65015
|
+
status: p?.status,
|
|
65016
|
+
agentType: p?.agentType
|
|
65017
|
+
},
|
|
65018
|
+
root
|
|
65019
|
+
)
|
|
65020
|
+
};
|
|
65021
|
+
}
|
|
65022
|
+
// === Intelligence ===
|
|
65023
|
+
get intelligence() {
|
|
65024
|
+
const root = this.projectRoot;
|
|
65025
|
+
const store = this._store ?? void 0;
|
|
65026
|
+
return {
|
|
65027
|
+
predictImpact: (change) => predictImpact(change, root, store ?? void 0),
|
|
65028
|
+
blastRadius: (taskId) => calculateBlastRadius(taskId, store ?? void 0, root)
|
|
65029
|
+
};
|
|
65030
|
+
}
|
|
64873
65031
|
// === Sync (Task Reconciliation) ===
|
|
64874
65032
|
get sync() {
|
|
64875
65033
|
const root = this.projectRoot;
|