@cleocode/core 2026.5.133 → 2026.6.0
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/binaries/README.md +49 -27
- package/dist/agents/{agent-registry.d.ts → agent-capacity-tracker.d.ts} +2 -2
- package/dist/agents/agent-capacity-tracker.d.ts.map +1 -0
- package/dist/agents/{agent-registry.js → agent-capacity-tracker.js} +2 -2
- package/dist/agents/agent-capacity-tracker.js.map +1 -0
- package/dist/agents/index.d.ts +1 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +4 -2
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/seed-install.d.ts +1 -1
- package/dist/agents/seed-install.d.ts.map +1 -1
- package/dist/agents/seed-install.js +42 -36
- package/dist/agents/seed-install.js.map +1 -1
- package/dist/caamp-export.d.ts +18 -0
- package/dist/caamp-export.d.ts.map +1 -0
- package/dist/caamp-export.js +18 -0
- package/dist/caamp-export.js.map +1 -0
- package/dist/conduit/local-transport.d.ts +1 -1
- package/dist/conduit/local-transport.d.ts.map +1 -1
- package/dist/conduit/local-transport.js +69 -43
- package/dist/conduit/local-transport.js.map +1 -1
- package/dist/dispatch/mutate-projection.d.ts.map +1 -1
- package/dist/dispatch/mutate-projection.js +11 -0
- package/dist/dispatch/mutate-projection.js.map +1 -1
- package/dist/docs/docs-read-model.d.ts +7 -0
- package/dist/docs/docs-read-model.d.ts.map +1 -1
- package/dist/docs/docs-read-model.js +5 -0
- package/dist/docs/docs-read-model.js.map +1 -1
- package/dist/docs/supersede.d.ts.map +1 -1
- package/dist/docs/supersede.js +12 -7
- package/dist/docs/supersede.js.map +1 -1
- package/dist/doctor/db-substrate.d.ts.map +1 -1
- package/dist/doctor/db-substrate.js +10 -9
- package/dist/doctor/db-substrate.js.map +1 -1
- package/dist/git-shim-export.d.ts +18 -0
- package/dist/git-shim-export.d.ts.map +1 -0
- package/dist/git-shim-export.js +18 -0
- package/dist/git-shim-export.js.map +1 -0
- package/dist/hooks/payload-schemas.d.ts +2 -2
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +39 -32
- package/dist/init.js.map +1 -1
- package/dist/internal.d.ts +11 -3
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +14 -5
- package/dist/internal.js.map +1 -1
- package/dist/lafs-export.d.ts +18 -0
- package/dist/lafs-export.d.ts.map +1 -0
- package/dist/lafs-export.js +18 -0
- package/dist/lafs-export.js.map +1 -0
- package/dist/lifecycle/effective-stage.js +1 -1
- package/dist/lifecycle/index.js +1 -1
- package/dist/lifecycle/index.js.map +1 -1
- package/dist/lifecycle/rollup.js +1 -1
- package/dist/llm/credential-pool.d.ts +17 -0
- package/dist/llm/credential-pool.d.ts.map +1 -1
- package/dist/llm/credential-pool.js +40 -1
- package/dist/llm/credential-pool.js.map +1 -1
- package/dist/llm/plugin-facade.d.ts.map +1 -1
- package/dist/llm/plugin-facade.js +11 -19
- package/dist/llm/plugin-facade.js.map +1 -1
- package/dist/llm/role-executor.d.ts +8 -0
- package/dist/llm/role-executor.d.ts.map +1 -1
- package/dist/llm/role-executor.js +96 -4
- package/dist/llm/role-executor.js.map +1 -1
- package/dist/llm/role-resolver.d.ts.map +1 -1
- package/dist/llm/role-resolver.js +56 -1
- package/dist/llm/role-resolver.js.map +1 -1
- package/dist/llm/transports/codex-oauth-headers.d.ts +51 -0
- package/dist/llm/transports/codex-oauth-headers.d.ts.map +1 -0
- package/dist/llm/transports/codex-oauth-headers.js +89 -0
- package/dist/llm/transports/codex-oauth-headers.js.map +1 -0
- package/dist/memory/claude-mem-migration.d.ts.map +1 -1
- package/dist/memory/claude-mem-migration.js +1 -3
- package/dist/memory/claude-mem-migration.js.map +1 -1
- package/dist/memory/decisions.d.ts.map +1 -1
- package/dist/memory/decisions.js +77 -23
- package/dist/memory/decisions.js.map +1 -1
- package/dist/memory/graph-memory-bridge.d.ts.map +1 -1
- package/dist/memory/graph-memory-bridge.js +12 -6
- package/dist/memory/graph-memory-bridge.js.map +1 -1
- package/dist/memory/learnings.d.ts +2 -2
- package/dist/memory/nexus-plasticity.d.ts +21 -9
- package/dist/memory/nexus-plasticity.d.ts.map +1 -1
- package/dist/memory/nexus-plasticity.js +44 -22
- package/dist/memory/nexus-plasticity.js.map +1 -1
- package/dist/memory/patterns.d.ts +2 -2
- package/dist/memory/redaction.d.ts +19 -3
- package/dist/memory/redaction.d.ts.map +1 -1
- package/dist/memory/redaction.js +22 -94
- package/dist/memory/redaction.js.map +1 -1
- package/dist/metrics/token-service.d.ts +8 -2
- package/dist/metrics/token-service.d.ts.map +1 -1
- package/dist/metrics/token-service.js +1 -1
- package/dist/metrics/token-service.js.map +1 -1
- package/dist/nexus/analyze-orchestrator.d.ts.map +1 -1
- package/dist/nexus/analyze-orchestrator.js +6 -8
- package/dist/nexus/analyze-orchestrator.js.map +1 -1
- package/dist/nexus/api-extractors/http-extractor.d.ts.map +1 -1
- package/dist/nexus/api-extractors/http-extractor.js +3 -3
- package/dist/nexus/api-extractors/http-extractor.js.map +1 -1
- package/dist/nexus/clusters.d.ts.map +1 -1
- package/dist/nexus/clusters.js +3 -2
- package/dist/nexus/clusters.js.map +1 -1
- package/dist/nexus/context.d.ts.map +1 -1
- package/dist/nexus/context.js +10 -16
- package/dist/nexus/context.js.map +1 -1
- package/dist/nexus/diff.d.ts.map +1 -1
- package/dist/nexus/diff.js +6 -4
- package/dist/nexus/diff.js.map +1 -1
- package/dist/nexus/export.d.ts.map +1 -1
- package/dist/nexus/export.js +7 -4
- package/dist/nexus/export.js.map +1 -1
- package/dist/nexus/flows.d.ts.map +1 -1
- package/dist/nexus/flows.js +3 -1
- package/dist/nexus/flows.js.map +1 -1
- package/dist/nexus/impact.d.ts +1 -1
- package/dist/nexus/impact.d.ts.map +1 -1
- package/dist/nexus/impact.js +31 -17
- package/dist/nexus/impact.js.map +1 -1
- package/dist/nexus/living-brain.d.ts.map +1 -1
- package/dist/nexus/living-brain.js +27 -15
- package/dist/nexus/living-brain.js.map +1 -1
- package/dist/nexus/nexus-bridge.d.ts.map +1 -1
- package/dist/nexus/nexus-bridge.js +28 -29
- package/dist/nexus/nexus-bridge.js.map +1 -1
- package/dist/nexus/plasticity-queries.d.ts +4 -2
- package/dist/nexus/plasticity-queries.d.ts.map +1 -1
- package/dist/nexus/plasticity-queries.js +27 -15
- package/dist/nexus/plasticity-queries.js.map +1 -1
- package/dist/nexus/query.d.ts.map +1 -1
- package/dist/nexus/query.js +6 -2
- package/dist/nexus/query.js.map +1 -1
- package/dist/nexus/registry.d.ts.map +1 -1
- package/dist/nexus/registry.js +65 -30
- package/dist/nexus/registry.js.map +1 -1
- package/dist/nexus/route-analysis.d.ts +3 -2
- package/dist/nexus/route-analysis.d.ts.map +1 -1
- package/dist/nexus/route-analysis.js +11 -10
- package/dist/nexus/route-analysis.js.map +1 -1
- package/dist/nexus/sigil.d.ts.map +1 -1
- package/dist/nexus/sigil.js +60 -13
- package/dist/nexus/sigil.js.map +1 -1
- package/dist/nexus/user-profile.d.ts +2 -1
- package/dist/nexus/user-profile.d.ts.map +1 -1
- package/dist/nexus/user-profile.js +8 -4
- package/dist/nexus/user-profile.js.map +1 -1
- package/dist/orchestrate/index.d.ts +1 -1
- package/dist/orchestrate/index.d.ts.map +1 -1
- package/dist/orchestrate/index.js +1 -1
- package/dist/orchestrate/index.js.map +1 -1
- package/dist/orchestrate/plan.d.ts +3 -3
- package/dist/orchestrate/plan.d.ts.map +1 -1
- package/dist/orchestrate/plan.js +7 -7
- package/dist/orchestrate/plan.js.map +1 -1
- package/dist/orchestrate/spawn-ops.js +2 -2
- package/dist/orchestrate/spawn-ops.js.map +1 -1
- package/dist/orchestration/classify.d.ts +2 -2
- package/dist/orchestration/classify.js +3 -3
- package/dist/orchestration/classify.js.map +1 -1
- package/dist/orchestration/validate-spawn.d.ts.map +1 -1
- package/dist/orchestration/validate-spawn.js +5 -5
- package/dist/orchestration/validate-spawn.js.map +1 -1
- package/dist/paths-export.d.ts +18 -0
- package/dist/paths-export.d.ts.map +1 -0
- package/dist/paths-export.js +18 -0
- package/dist/paths-export.js.map +1 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +24 -11
- package/dist/paths.js.map +1 -1
- package/dist/playbooks/index.d.ts +1 -0
- package/dist/playbooks/index.d.ts.map +1 -1
- package/dist/playbooks/index.js +4 -0
- package/dist/playbooks/index.js.map +1 -1
- package/dist/playbooks/skill-node-executor.d.ts +155 -0
- package/dist/playbooks/skill-node-executor.d.ts.map +1 -0
- package/dist/playbooks/skill-node-executor.js +156 -0
- package/dist/playbooks/skill-node-executor.js.map +1 -0
- package/dist/repair.d.ts +3 -7
- package/dist/repair.d.ts.map +1 -1
- package/dist/repair.js +5 -43
- package/dist/repair.js.map +1 -1
- package/dist/sagas/migrate-containment.js +7 -7
- package/dist/sagas/migrate-containment.js.map +1 -1
- package/dist/scaffold/ensure-dirs.d.ts +8 -2
- package/dist/scaffold/ensure-dirs.d.ts.map +1 -1
- package/dist/scaffold/ensure-dirs.js +24 -11
- package/dist/scaffold/ensure-dirs.js.map +1 -1
- package/dist/scaffold/project-detection.d.ts +5 -1
- package/dist/scaffold/project-detection.d.ts.map +1 -1
- package/dist/scaffold/project-detection.js +9 -5
- package/dist/scaffold/project-detection.js.map +1 -1
- package/dist/sentient/hygiene-scan.js +6 -6
- package/dist/sentient/hygiene-scan.js.map +1 -1
- package/dist/sentient/proposal-dedup.js +2 -2
- package/dist/sentient/proposal-rate-limiter.js +1 -1
- package/dist/sentient/propose-tick.js +5 -5
- package/dist/sentient/propose-tick.js.map +1 -1
- package/dist/sentient/stage-drift-tick.js +3 -3
- package/dist/sentient/stage-drift-tick.js.map +1 -1
- package/dist/sequence/index.d.ts.map +1 -1
- package/dist/sequence/index.js +6 -2
- package/dist/sequence/index.js.map +1 -1
- package/dist/setup/sections/verification.js +2 -2
- package/dist/setup/sections/verification.js.map +1 -1
- package/dist/shutdown.d.ts +81 -0
- package/dist/shutdown.d.ts.map +1 -0
- package/dist/shutdown.js +105 -0
- package/dist/shutdown.js.map +1 -0
- package/dist/skills/index.d.ts +2 -0
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +1 -0
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/skill-executor-adapter.d.ts +136 -0
- package/dist/skills/skill-executor-adapter.d.ts.map +1 -0
- package/dist/skills/skill-executor-adapter.js +137 -0
- package/dist/skills/skill-executor-adapter.js.map +1 -0
- package/dist/skills/usage-recorder.d.ts.map +1 -1
- package/dist/skills/usage-recorder.js +30 -0
- package/dist/skills/usage-recorder.js.map +1 -1
- package/dist/skills-export.d.ts +23 -0
- package/dist/skills-export.d.ts.map +1 -0
- package/dist/skills-export.js +23 -0
- package/dist/skills-export.js.map +1 -0
- package/dist/stats/index.d.ts.map +1 -1
- package/dist/stats/index.js +8 -3
- package/dist/stats/index.js.map +1 -1
- package/dist/store/agent-doctor.d.ts +3 -3
- package/dist/store/agent-doctor.d.ts.map +1 -1
- package/dist/store/agent-doctor.js +18 -13
- package/dist/store/agent-doctor.js.map +1 -1
- package/dist/store/agent-install.d.ts +6 -5
- package/dist/store/agent-install.d.ts.map +1 -1
- package/dist/store/agent-install.js +20 -16
- package/dist/store/agent-install.js.map +1 -1
- package/dist/store/agent-registry-accessor.d.ts +66 -28
- package/dist/store/agent-registry-accessor.d.ts.map +1 -1
- package/dist/store/agent-registry-accessor.js +248 -167
- package/dist/store/agent-registry-accessor.js.map +1 -1
- package/dist/store/agent-registry-store.d.ts +242 -0
- package/dist/store/agent-registry-store.d.ts.map +1 -0
- package/dist/store/agent-registry-store.js +501 -0
- package/dist/store/agent-registry-store.js.map +1 -0
- package/dist/store/agent-resolver.d.ts +8 -8
- package/dist/store/agent-resolver.d.ts.map +1 -1
- package/dist/store/agent-resolver.js +19 -17
- package/dist/store/agent-resolver.js.map +1 -1
- package/dist/store/backup-pack.d.ts.map +1 -1
- package/dist/store/backup-pack.js +24 -8
- package/dist/store/backup-pack.js.map +1 -1
- package/dist/store/conduit-sqlite.d.ts +181 -74
- package/dist/store/conduit-sqlite.d.ts.map +1 -1
- package/dist/store/conduit-sqlite.js +307 -528
- package/dist/store/conduit-sqlite.js.map +1 -1
- package/dist/store/cross-db-cleanup.d.ts +5 -5
- package/dist/store/cross-db-cleanup.d.ts.map +1 -1
- package/dist/store/cross-db-cleanup.js +12 -10
- package/dist/store/cross-db-cleanup.js.map +1 -1
- package/dist/store/data-accessor.d.ts +4 -4
- package/dist/store/data-accessor.js +5 -5
- package/dist/store/data-accessor.js.map +1 -1
- package/dist/store/data-safety-central.d.ts +83 -1
- package/dist/store/data-safety-central.d.ts.map +1 -1
- package/dist/store/data-safety-central.js +257 -0
- package/dist/store/data-safety-central.js.map +1 -1
- package/dist/store/db-helpers.d.ts +8 -2
- package/dist/store/db-helpers.d.ts.map +1 -1
- package/dist/store/db-helpers.js +6 -2
- package/dist/store/db-helpers.js.map +1 -1
- package/dist/store/dual-scope-db.d.ts +46 -4
- package/dist/store/dual-scope-db.d.ts.map +1 -1
- package/dist/store/dual-scope-db.js +103 -9
- package/dist/store/dual-scope-db.js.map +1 -1
- package/dist/store/exodus/__fixtures__/representative-fixture.d.ts +116 -0
- package/dist/store/exodus/__fixtures__/representative-fixture.d.ts.map +1 -0
- package/dist/store/exodus/__fixtures__/representative-fixture.js +274 -0
- package/dist/store/exodus/__fixtures__/representative-fixture.js.map +1 -0
- package/dist/store/exodus/index.d.ts +18 -0
- package/dist/store/exodus/index.d.ts.map +1 -0
- package/dist/store/exodus/index.js +18 -0
- package/dist/store/exodus/index.js.map +1 -0
- package/dist/store/exodus/migrate.d.ts +160 -0
- package/dist/store/exodus/migrate.d.ts.map +1 -0
- package/dist/store/exodus/migrate.js +1220 -0
- package/dist/store/exodus/migrate.js.map +1 -0
- package/dist/store/exodus/on-open.d.ts +189 -0
- package/dist/store/exodus/on-open.d.ts.map +1 -0
- package/dist/store/exodus/on-open.js +464 -0
- package/dist/store/exodus/on-open.js.map +1 -0
- package/dist/store/exodus/plan.d.ts +44 -0
- package/dist/store/exodus/plan.d.ts.map +1 -0
- package/dist/store/exodus/plan.js +178 -0
- package/dist/store/exodus/plan.js.map +1 -0
- package/dist/store/exodus/status.d.ts +22 -0
- package/dist/store/exodus/status.d.ts.map +1 -0
- package/dist/store/exodus/status.js +88 -0
- package/dist/store/exodus/status.js.map +1 -0
- package/dist/store/exodus/table-name-map.d.ts +173 -0
- package/dist/store/exodus/table-name-map.d.ts.map +1 -0
- package/dist/store/exodus/table-name-map.js +660 -0
- package/dist/store/exodus/table-name-map.js.map +1 -0
- package/dist/store/exodus/types.d.ts +169 -0
- package/dist/store/exodus/types.d.ts.map +1 -0
- package/dist/store/exodus/types.js +21 -0
- package/dist/store/exodus/types.js.map +1 -0
- package/dist/store/exodus/verify-migration.d.ts +72 -0
- package/dist/store/exodus/verify-migration.d.ts.map +1 -0
- package/dist/store/exodus/verify-migration.js +678 -0
- package/dist/store/exodus/verify-migration.js.map +1 -0
- package/dist/store/exodus/verify.d.ts +58 -0
- package/dist/store/exodus/verify.d.ts.map +1 -0
- package/dist/store/exodus/verify.js +74 -0
- package/dist/store/exodus/verify.js.map +1 -0
- package/dist/store/index.d.ts +2 -3
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +2 -3
- package/dist/store/index.js.map +1 -1
- package/dist/store/memory-accessor.d.ts +31 -0
- package/dist/store/memory-accessor.d.ts.map +1 -1
- package/dist/store/memory-accessor.js +38 -0
- package/dist/store/memory-accessor.js.map +1 -1
- package/dist/store/memory-sqlite.d.ts +86 -13
- package/dist/store/memory-sqlite.d.ts.map +1 -1
- package/dist/store/memory-sqlite.js +326 -528
- package/dist/store/memory-sqlite.js.map +1 -1
- package/dist/store/migrate-signaldock-to-conduit.d.ts +1 -1
- package/dist/store/migrate-signaldock-to-conduit.d.ts.map +1 -1
- package/dist/store/migrate-signaldock-to-conduit.js +126 -35
- package/dist/store/migrate-signaldock-to-conduit.js.map +1 -1
- package/dist/store/migration-manager.d.ts +49 -0
- package/dist/store/migration-manager.d.ts.map +1 -1
- package/dist/store/migration-manager.js +167 -67
- package/dist/store/migration-manager.js.map +1 -1
- package/dist/store/migration-sqlite.d.ts +1 -1
- package/dist/store/migration-sqlite.d.ts.map +1 -1
- package/dist/store/migration-sqlite.js +32 -3
- package/dist/store/migration-sqlite.js.map +1 -1
- package/dist/store/nexus-sqlite.d.ts +152 -29
- package/dist/store/nexus-sqlite.d.ts.map +1 -1
- package/dist/store/nexus-sqlite.js +496 -177
- package/dist/store/nexus-sqlite.js.map +1 -1
- package/dist/store/nexus-validation-schemas.d.ts +32 -32
- package/dist/store/open-cleo-db.d.ts +37 -40
- package/dist/store/open-cleo-db.d.ts.map +1 -1
- package/dist/store/open-cleo-db.js +76 -153
- package/dist/store/open-cleo-db.js.map +1 -1
- package/dist/store/role-accessors-impl.d.ts +4 -4
- package/dist/store/role-accessors-impl.d.ts.map +1 -1
- package/dist/store/role-accessors-impl.js +18 -15
- package/dist/store/role-accessors-impl.js.map +1 -1
- package/dist/store/schema/{signaldock-schema.d.ts → agent-registry-schema.d.ts} +15 -5
- package/dist/store/schema/agent-registry-schema.d.ts.map +1 -0
- package/dist/store/schema/{signaldock-schema.js → agent-registry-schema.js} +15 -5
- package/dist/store/schema/agent-registry-schema.js.map +1 -0
- package/dist/store/schema/agent-schema.d.ts +1 -1
- package/dist/store/schema/agent-schema.js +4 -4
- package/dist/store/schema/agent-schema.js.map +1 -1
- package/dist/store/schema/attachments.d.ts +1 -1
- package/dist/store/schema/audit.d.ts +15 -5
- package/dist/store/schema/audit.d.ts.map +1 -1
- package/dist/store/schema/audit.js +12 -2
- package/dist/store/schema/audit.js.map +1 -1
- package/dist/store/schema/background-jobs.d.ts +1 -1
- package/dist/store/schema/cleo-global/{signaldock.d.ts → agent-registry.d.ts} +277 -271
- package/dist/store/schema/cleo-global/agent-registry.d.ts.map +1 -0
- package/dist/store/schema/cleo-global/{signaldock.js → agent-registry.js} +136 -125
- package/dist/store/schema/cleo-global/agent-registry.js.map +1 -0
- package/dist/store/schema/cleo-global/index.d.ts +29 -22
- package/dist/store/schema/cleo-global/index.d.ts.map +1 -1
- package/dist/store/schema/cleo-global/index.js +29 -22
- package/dist/store/schema/cleo-global/index.js.map +1 -1
- package/dist/store/schema/cleo-global/nexus.d.ts +36 -1034
- package/dist/store/schema/cleo-global/nexus.d.ts.map +1 -1
- package/dist/store/schema/cleo-global/nexus.js +32 -337
- package/dist/store/schema/cleo-global/nexus.js.map +1 -1
- package/dist/store/schema/cleo-global/skills.d.ts +16 -0
- package/dist/store/schema/cleo-global/skills.d.ts.map +1 -1
- package/dist/store/schema/cleo-global/skills.js +11 -0
- package/dist/store/schema/cleo-global/skills.js.map +1 -1
- package/dist/store/schema/{cleo-project → cleo-global}/telemetry.d.ts +33 -17
- package/dist/store/schema/cleo-global/telemetry.d.ts.map +1 -0
- package/dist/store/schema/{cleo-project → cleo-global}/telemetry.js +30 -18
- package/dist/store/schema/cleo-global/telemetry.js.map +1 -0
- package/dist/store/schema/cleo-project/audit.d.ts +8 -8
- package/dist/store/schema/cleo-project/audit.d.ts.map +1 -1
- package/dist/store/schema/cleo-project/audit.js +2 -6
- package/dist/store/schema/cleo-project/audit.js.map +1 -1
- package/dist/store/schema/cleo-project/docs.d.ts +1 -1
- package/dist/store/schema/cleo-project/index.d.ts +29 -12
- package/dist/store/schema/cleo-project/index.d.ts.map +1 -1
- package/dist/store/schema/cleo-project/index.js +29 -12
- package/dist/store/schema/cleo-project/index.js.map +1 -1
- package/dist/store/schema/cleo-project/lifecycle.d.ts +2 -2
- package/dist/store/schema/cleo-project/nexus-graph.d.ts +1067 -0
- package/dist/store/schema/cleo-project/nexus-graph.d.ts.map +1 -0
- package/dist/store/schema/cleo-project/nexus-graph.js +407 -0
- package/dist/store/schema/cleo-project/nexus-graph.js.map +1 -0
- package/dist/store/schema/cleo-project/provenance-orphans.d.ts +385 -0
- package/dist/store/schema/cleo-project/provenance-orphans.d.ts.map +1 -0
- package/dist/store/schema/cleo-project/provenance-orphans.js +142 -0
- package/dist/store/schema/cleo-project/provenance-orphans.js.map +1 -0
- package/dist/store/schema/cleo-project/provenance-rest.d.ts +1 -1
- package/dist/store/schema/cleo-project/runtime.d.ts +1 -1
- package/dist/store/schema/cleo-project/tasks-core-batch2.d.ts +1 -1
- package/dist/store/schema/cleo-project/tasks-core.d.ts +3 -3
- package/dist/store/schema/cleo-shared/brain.d.ts +711 -494
- package/dist/store/schema/cleo-shared/brain.d.ts.map +1 -1
- package/dist/store/schema/cleo-shared/brain.js +215 -134
- package/dist/store/schema/cleo-shared/brain.js.map +1 -1
- package/dist/store/schema/conduit-schema.d.ts +63 -51
- package/dist/store/schema/conduit-schema.d.ts.map +1 -1
- package/dist/store/schema/conduit-schema.js +23 -11
- package/dist/store/schema/conduit-schema.js.map +1 -1
- package/dist/store/schema/goal.d.ts +3 -2
- package/dist/store/schema/goal.d.ts.map +1 -1
- package/dist/store/schema/goal.js +3 -2
- package/dist/store/schema/goal.js.map +1 -1
- package/dist/store/schema/index.d.ts +1 -0
- package/dist/store/schema/index.d.ts.map +1 -1
- package/dist/store/schema/index.js +1 -0
- package/dist/store/schema/index.js.map +1 -1
- package/dist/store/schema/lifecycle.d.ts +2 -2
- package/dist/store/schema/memory-schema.d.ts +2 -2
- package/dist/store/schema/nexus-schema.d.ts +174 -115
- package/dist/store/schema/nexus-schema.d.ts.map +1 -1
- package/dist/store/schema/nexus-schema.js +175 -55
- package/dist/store/schema/nexus-schema.js.map +1 -1
- package/dist/store/schema/provenance/releases.d.ts +1 -1
- package/dist/store/schema/schema-utils.d.ts +78 -0
- package/dist/store/schema/schema-utils.d.ts.map +1 -0
- package/dist/store/schema/schema-utils.js +49 -0
- package/dist/store/schema/schema-utils.js.map +1 -0
- package/dist/store/schema/skills-schema.d.ts +81 -44
- package/dist/store/schema/skills-schema.d.ts.map +1 -1
- package/dist/store/schema/skills-schema.js +49 -16
- package/dist/store/schema/skills-schema.js.map +1 -1
- package/dist/store/schema/tasks.d.ts +3 -3
- package/dist/store/skills-db.d.ts +90 -50
- package/dist/store/skills-db.d.ts.map +1 -1
- package/dist/store/skills-db.js +132 -146
- package/dist/store/skills-db.js.map +1 -1
- package/dist/store/sqlite-backup.d.ts +2 -2
- package/dist/store/sqlite-backup.d.ts.map +1 -1
- package/dist/store/sqlite-backup.js +11 -10
- package/dist/store/sqlite-backup.js.map +1 -1
- package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
- package/dist/store/sqlite-data-accessor.js +25 -18
- package/dist/store/sqlite-data-accessor.js.map +1 -1
- package/dist/store/sqlite.d.ts +72 -12
- package/dist/store/sqlite.d.ts.map +1 -1
- package/dist/store/sqlite.js +153 -89
- package/dist/store/sqlite.js.map +1 -1
- package/dist/store/tasks-schema.d.ts +4 -0
- package/dist/store/tasks-schema.d.ts.map +1 -1
- package/dist/store/tasks-schema.js +60 -0
- package/dist/store/tasks-schema.js.map +1 -1
- package/dist/store/tasks-sqlite.d.ts +2 -2
- package/dist/store/tasks-sqlite.d.ts.map +1 -1
- package/dist/store/tasks-sqlite.js +10 -5
- package/dist/store/tasks-sqlite.js.map +1 -1
- package/dist/store/umbrella-data-accessor.d.ts +17 -6
- package/dist/store/umbrella-data-accessor.d.ts.map +1 -1
- package/dist/store/umbrella-data-accessor.js +8 -8
- package/dist/store/umbrella-data-accessor.js.map +1 -1
- package/dist/store/validation-schemas.d.ts +241 -208
- package/dist/store/validation-schemas.d.ts.map +1 -1
- package/dist/system/health.d.ts.map +1 -1
- package/dist/system/health.js +11 -6
- package/dist/system/health.js.map +1 -1
- package/dist/system/project-health.d.ts.map +1 -1
- package/dist/system/project-health.js +58 -12
- package/dist/system/project-health.js.map +1 -1
- package/dist/tasks/add.d.ts +8 -0
- package/dist/tasks/add.d.ts.map +1 -1
- package/dist/tasks/add.js +101 -0
- package/dist/tasks/add.js.map +1 -1
- package/dist/tasks/cancelled-child-waiver-audit.d.ts +47 -0
- package/dist/tasks/cancelled-child-waiver-audit.d.ts.map +1 -0
- package/dist/tasks/cancelled-child-waiver-audit.js +34 -0
- package/dist/tasks/cancelled-child-waiver-audit.js.map +1 -0
- package/dist/tasks/complete.d.ts +22 -2
- package/dist/tasks/complete.d.ts.map +1 -1
- package/dist/tasks/complete.js +71 -6
- package/dist/tasks/complete.js.map +1 -1
- package/dist/tasks/compute-task-view.js +1 -1
- package/dist/tasks/session-scope.d.ts +5 -0
- package/dist/tasks/session-scope.d.ts.map +1 -1
- package/dist/tasks/session-scope.js +4 -0
- package/dist/tasks/session-scope.js.map +1 -1
- package/dist/tools/guard.d.ts +71 -1
- package/dist/tools/guard.d.ts.map +1 -1
- package/dist/tools/guard.js +73 -1
- package/dist/tools/guard.js.map +1 -1
- package/dist/tools/index.d.ts +21 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +25 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/upgrade.js +22 -13
- package/dist/upgrade.js.map +1 -1
- package/dist/workgraph/containment.js +18 -18
- package/dist/workgraph/relations.js +2 -2
- package/dist/worktree/list.d.ts +1 -1
- package/dist/worktree/list.d.ts.map +1 -1
- package/dist/worktree/list.js +19 -21
- package/dist/worktree/list.js.map +1 -1
- package/dist/worktree-export.d.ts +18 -0
- package/dist/worktree-export.d.ts.map +1 -0
- package/dist/worktree-export.js +18 -0
- package/dist/worktree-export.js.map +1 -0
- package/migrations/drizzle-agent-registry/20260412000000_initial-global-agent-registry/migration.sql +29 -0
- package/migrations/drizzle-brain/20260601000001_t11522-brain-task-observations/migration.sql +28 -0
- package/migrations/drizzle-brain/20260601000002_t11522-inline-only-brain-tables/migration.sql +75 -0
- package/migrations/drizzle-cleo-global/20260531000001_t11363-consolidation-cleo-global/migration.sql +49 -144
- package/migrations/drizzle-cleo-global/20260531000001_t11363-consolidation-cleo-global/snapshot.json +8 -8
- package/migrations/drizzle-cleo-global/20260531000002_t11546-brain-usage-log/migration.sql +16 -0
- package/migrations/drizzle-cleo-global/20260601000001_t11544-skills-usage-project-id/migration.sql +12 -0
- package/migrations/drizzle-cleo-global/20260602000001_t11622-agent-registry-rename/migration.sql +80 -0
- package/migrations/drizzle-cleo-project/20260531000001_t11363-consolidation-cleo-project/migration.sql +26 -167
- package/migrations/drizzle-cleo-project/20260531000001_t11363-consolidation-cleo-project/snapshot.json +8 -8
- package/migrations/drizzle-cleo-project/20260531000002_t11546-brain-usage-log/migration.sql +21 -0
- package/migrations/drizzle-cleo-project/20260601000001_t11549-agent-credentials-brain-release-links/migration.sql +49 -0
- package/migrations/drizzle-cleo-project/20260601000002_t11538-project-nexus-graph/migration.sql +140 -0
- package/migrations/drizzle-cleo-project/20260602000002_t11649-token-usage-transport-mcp/migration.sql +146 -0
- package/migrations/drizzle-conduit/20260601000003_t11523-conduit-inline-schema/migration.sql +82 -0
- package/migrations/drizzle-nexus/20260421200001_t1165-baseline-reset/migration.sql +26 -8
- package/migrations/drizzle-nexus/20260601000001_t11545-nexus-relation-weights-partition/migration.sql +97 -0
- package/package.json +43 -11
- package/scripts/install-supervisor-binary.mjs +50 -201
- package/scripts/napi-binary-picker.mjs +267 -0
- package/dist/agents/agent-registry.d.ts.map +0 -1
- package/dist/agents/agent-registry.js.map +0 -1
- package/dist/store/data-safety.d.ts +0 -92
- 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/schema/cleo-global/signaldock.d.ts.map +0 -1
- package/dist/store/schema/cleo-global/signaldock.js.map +0 -1
- package/dist/store/schema/cleo-project/telemetry.d.ts.map +0 -1
- package/dist/store/schema/cleo-project/telemetry.js.map +0 -1
- package/dist/store/schema/signaldock-schema.d.ts.map +0 -1
- package/dist/store/schema/signaldock-schema.js.map +0 -1
- package/dist/store/signaldock-sqlite.d.ts +0 -173
- package/dist/store/signaldock-sqlite.d.ts.map +0 -1
- package/dist/store/signaldock-sqlite.js +0 -445
- package/dist/store/signaldock-sqlite.js.map +0 -1
- package/migrations/drizzle-nexus/20260318205558_initial/migration.sql +0 -46
- package/migrations/drizzle-nexus/20260412000001_t529-nexus-graph-tables/migration.sql +0 -49
- package/migrations/drizzle-nexus/20260415000001_t622-project-registry-paths/migration.sql +0 -12
- package/migrations/drizzle-nexus/20260419000001_t998-nexus-plasticity/migration.sql +0 -13
- package/migrations/drizzle-nexus/20260423052640_t1077-add-user-profile-table/migration.sql +0 -16
- package/migrations/drizzle-nexus/20260423052640_t1077-add-user-profile-table/snapshot.json +0 -1531
- package/migrations/drizzle-nexus/20260424140538_t1148-add-sigils-table/migration.sql +0 -13
- package/migrations/drizzle-nexus/20260424140538_t1148-add-sigils-table/snapshot.json +0 -1652
- package/migrations/drizzle-nexus/20260504000001_t1839-fts5-nexus-symbols/migration.sql +0 -68
- package/migrations/drizzle-nexus/20260507135519_t9163-nexus-is-external/migration.sql +0 -20
- package/migrations/drizzle-nexus/20260507135519_t9163-nexus-is-external/snapshot.json +0 -1652
- package/migrations/drizzle-nexus/20260526222449_t11025-project-id-aliases/migration.sql +0 -16
- package/migrations/drizzle-signaldock/20260412000000_initial-global-signaldock/migration.sql +0 -209
- package/migrations/drizzle-signaldock/20260412000000_initial-global-signaldock/snapshot.json +0 -2060
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/playbooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,eAAe,EAEf,mBAAmB,EAEnB,qBAAqB,EAGrB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EACL,aAAa,EACb,qBAAqB,EAIrB,eAAe,GAChB,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/playbooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,eAAe,EAEf,mBAAmB,EAEnB,qBAAqB,EAGrB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EACL,aAAa,EACb,qBAAqB,EAIrB,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAEhC,2EAA2E;AAC3E,6EAA6E;AAC7E,0BAA0B;AAC1B,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,GAIpB,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill-node executor factory — wires the in-process {@link SkillExecutorAdapter}
|
|
3
|
+
* into `CoreAgentDispatcherOptions.executor` while RETAINING the subprocess-spawn
|
|
4
|
+
* path for isolation nodes (T11477 · epic T11391 · saga T11387).
|
|
5
|
+
*
|
|
6
|
+
* ## The routing decision (AC2 + AC3)
|
|
7
|
+
*
|
|
8
|
+
* `CoreAgentDispatcher` resolves `agentId = node.agent ?? node.skill` and then
|
|
9
|
+
* calls its injected `executor` to perform the actual work. This factory builds
|
|
10
|
+
* that executor so it routes on the node's nature:
|
|
11
|
+
*
|
|
12
|
+
* - **In-process skill node** — the `agentId` names a `ct-*` skill that
|
|
13
|
+
* resolves via {@link findSkill}, AND the dispatch context does not request
|
|
14
|
+
* isolation. These run through {@link SkillExecutorAdapter} **in-process**:
|
|
15
|
+
* the skill→tool joint is a function call over the injected
|
|
16
|
+
* {@link GuardedToolSurface}, NOT a process boundary (AC1, AC4). This is the
|
|
17
|
+
* DEFAULT for in-process skill nodes, REPLACING `orchestrateSpawnExecute`
|
|
18
|
+
* for them (AC2).
|
|
19
|
+
*
|
|
20
|
+
* - **Isolation / agent node** — anything else (an `agent`-backed node, a node
|
|
21
|
+
* whose context requests `isolation`, or a skill that does not resolve
|
|
22
|
+
* in-process). These delegate to the INJECTED {@link SubprocessSpawnExecutor}
|
|
23
|
+
* — typically the runtime's `orchestrateSpawnExecute`, which provisions a git
|
|
24
|
+
* worktree and spawns a real subagent (AC3). The fallback is injected, not
|
|
25
|
+
* imported, so `@cleocode/core` keeps its no-dependency-on-`@cleocode/runtime`
|
|
26
|
+
* invariant (DIP again — the worktree mechanism is a detail core depends on
|
|
27
|
+
* through an abstraction).
|
|
28
|
+
*
|
|
29
|
+
* ## Why the fallback is injected
|
|
30
|
+
*
|
|
31
|
+
* `orchestrateSpawnExecute` lives in `@cleocode/runtime/gateway`. `core` must not
|
|
32
|
+
* import it (directed layering `contracts → core → runtime`). The CLI/runtime
|
|
33
|
+
* layer that already imports the gateway supplies it via
|
|
34
|
+
* {@link SkillNodeExecutorOptions.subprocessSpawn}; when omitted, isolation nodes
|
|
35
|
+
* report a structured failure rather than silently degrading.
|
|
36
|
+
*
|
|
37
|
+
* @epic T11391
|
|
38
|
+
* @task T11477
|
|
39
|
+
* @saga T11387
|
|
40
|
+
*/
|
|
41
|
+
import type { ResolvedAgent } from '@cleocode/contracts';
|
|
42
|
+
import type { GuardedToolSurface } from '@cleocode/contracts/tools/skill-executor';
|
|
43
|
+
import { type SkillRunner } from '../skills/skill-executor-adapter.js';
|
|
44
|
+
import type { DispatchContext, DispatchResult } from './agent-dispatcher.js';
|
|
45
|
+
/**
|
|
46
|
+
* Context-binding key the playbook author / dispatcher uses to FORCE the
|
|
47
|
+
* subprocess-spawn (isolation) path even when the node names a resolvable
|
|
48
|
+
* `ct-*` skill. Truthy → isolation; absent/falsy → in-process skill execution.
|
|
49
|
+
*/
|
|
50
|
+
export declare const ISOLATION_CONTEXT_KEY = "isolation";
|
|
51
|
+
/**
|
|
52
|
+
* Subprocess-spawn fallback for isolation / agent nodes. Mirrors the shape the
|
|
53
|
+
* runtime's `orchestrateSpawnExecute` is adapted to: given the resolved agent
|
|
54
|
+
* and dispatch context, perform a real (worktree-isolated) spawn and return a
|
|
55
|
+
* dispatch envelope.
|
|
56
|
+
*
|
|
57
|
+
* Injected (not imported) so `core` never depends on `@cleocode/runtime`.
|
|
58
|
+
*
|
|
59
|
+
* @param agent - The resolved agent/skill envelope from the dispatcher.
|
|
60
|
+
* @param context - The dispatch context (run id, node id, agent id, bindings).
|
|
61
|
+
* @returns The terminal {@link DispatchResult} for the subprocess spawn.
|
|
62
|
+
*/
|
|
63
|
+
export type SubprocessSpawnExecutor = (agent: ResolvedAgent, context: DispatchContext) => Promise<DispatchResult>;
|
|
64
|
+
/**
|
|
65
|
+
* Options accepted by {@link createSkillNodeExecutor}.
|
|
66
|
+
*
|
|
67
|
+
* @task T11477
|
|
68
|
+
*/
|
|
69
|
+
export interface SkillNodeExecutorOptions {
|
|
70
|
+
/**
|
|
71
|
+
* The deny-first guarded tool surface handed to every in-process skill
|
|
72
|
+
* execution. Typically the result of `createToolGuard({ allowedRoots: [...] })`.
|
|
73
|
+
* Injected (DIP) — the executor never constructs its own guard.
|
|
74
|
+
*/
|
|
75
|
+
readonly tools: GuardedToolSurface;
|
|
76
|
+
/**
|
|
77
|
+
* The subprocess-spawn fallback used for isolation / agent nodes (AC3). When
|
|
78
|
+
* omitted, isolation nodes return a structured failure instead of silently
|
|
79
|
+
* running in-process — refusing to weaken the isolation guarantee.
|
|
80
|
+
*/
|
|
81
|
+
readonly subprocessSpawn?: SubprocessSpawnExecutor;
|
|
82
|
+
/**
|
|
83
|
+
* Working directory used to resolve `ct-*` skills. Defaults to the process
|
|
84
|
+
* cwd via {@link findSkill}.
|
|
85
|
+
*/
|
|
86
|
+
readonly cwd?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Optional in-process runner strategy forwarded to the
|
|
89
|
+
* {@link SkillExecutorAdapter} (the GenKit-phase model runner plugs in here).
|
|
90
|
+
*/
|
|
91
|
+
readonly runner?: SkillRunner;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Build a `CoreAgentDispatcherOptions.executor` that runs in-process skill nodes
|
|
95
|
+
* through {@link SkillExecutorAdapter} and routes isolation / agent nodes to the
|
|
96
|
+
* injected subprocess-spawn fallback.
|
|
97
|
+
*
|
|
98
|
+
* Inject the result as `executor` when constructing a `CoreAgentDispatcher`:
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```ts
|
|
102
|
+
* import { createToolGuard } from '@cleocode/core/tools/guard';
|
|
103
|
+
* import { orchestrateSpawnExecute } from '@cleocode/runtime/gateway';
|
|
104
|
+
*
|
|
105
|
+
* const tools = createToolGuard({ allowedRoots: [projectRoot] });
|
|
106
|
+
* const dispatcher = new CoreAgentDispatcher({
|
|
107
|
+
* db,
|
|
108
|
+
* projectRoot,
|
|
109
|
+
* executor: createSkillNodeExecutor({
|
|
110
|
+
* tools,
|
|
111
|
+
* cwd: projectRoot,
|
|
112
|
+
* subprocessSpawn: async (agent, ctx) => adaptOrchestrateSpawn(agent, ctx),
|
|
113
|
+
* }),
|
|
114
|
+
* });
|
|
115
|
+
* ```
|
|
116
|
+
*
|
|
117
|
+
* @param opts - Injected tool surface + subprocess-spawn fallback + cwd/runner.
|
|
118
|
+
* @returns An executor suitable for `CoreAgentDispatcherOptions.executor`.
|
|
119
|
+
* @task T11477
|
|
120
|
+
*/
|
|
121
|
+
export declare function createSkillNodeExecutor(opts: SkillNodeExecutorOptions): (agent: ResolvedAgent, context: DispatchContext) => Promise<DispatchResult>;
|
|
122
|
+
/**
|
|
123
|
+
* Minimal projection of the playbook runtime's `AgentDispatchInput` that the
|
|
124
|
+
* routing helper needs. Declared structurally so `core` does NOT import
|
|
125
|
+
* `@cleocode/playbooks` (preserves the directed layering `contracts → core →
|
|
126
|
+
* playbooks`) — the CLI passes its runtime input through unchanged.
|
|
127
|
+
*/
|
|
128
|
+
export interface SkillNodeDispatchInput {
|
|
129
|
+
/** Node identifier within the run graph. */
|
|
130
|
+
readonly nodeId: string;
|
|
131
|
+
/** Agent identity resolved from `node.agent ?? node.skill`. */
|
|
132
|
+
readonly agentId: string;
|
|
133
|
+
/** Accumulated bindings at dispatch time (may carry an `isolation` flag). */
|
|
134
|
+
readonly context: Record<string, unknown>;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Route a single agentic dispatch: run it in-process via
|
|
138
|
+
* {@link SkillExecutorAdapter} when it is a resolvable `ct-*` skill node, else
|
|
139
|
+
* delegate to the injected subprocess-spawn fallback (isolation/agent nodes).
|
|
140
|
+
*
|
|
141
|
+
* This is the runtime-input-shaped companion to {@link createSkillNodeExecutor},
|
|
142
|
+
* used by the CLI's default `cleo playbook run` dispatcher so the in-process
|
|
143
|
+
* skill path becomes the DEFAULT, REPLACING `orchestrateSpawnExecute` for skill
|
|
144
|
+
* nodes (AC2) while RETAINING it for isolation nodes (AC3). Keeping the routing
|
|
145
|
+
* decision here keeps the CLI dispatcher a thin adapter (CLI package boundary).
|
|
146
|
+
*
|
|
147
|
+
* @param input - The runtime dispatch input (node id, agent id, context).
|
|
148
|
+
* @param opts - Injected tool surface, cwd/runner, and subprocess-spawn fallback.
|
|
149
|
+
* @returns The terminal {@link DispatchResult} envelope.
|
|
150
|
+
* @task T11477
|
|
151
|
+
*/
|
|
152
|
+
export declare function runSkillNodeOrSpawn(input: SkillNodeDispatchInput, opts: SkillNodeExecutorOptions & {
|
|
153
|
+
subprocessSpawn: () => Promise<DispatchResult>;
|
|
154
|
+
}): Promise<DispatchResult>;
|
|
155
|
+
//# sourceMappingURL=skill-node-executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-node-executor.d.ts","sourceRoot":"","sources":["../../src/playbooks/skill-node-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAEnF,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAC7F,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE7E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,cAAc,CAAC;AAEjD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,eAAe,KACrB,OAAO,CAAC,cAAc,CAAC,CAAC;AAE7B;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,uBAAuB,CAAC;IACnD;;;OAGG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAoBD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,wBAAwB,GAC7B,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,cAAc,CAAC,CAgC7E;AAMD;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,sBAAsB,EAC7B,IAAI,EAAE,wBAAwB,GAAG;IAAE,eAAe,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,CAAA;CAAE,GAClF,OAAO,CAAC,cAAc,CAAC,CAkBzB"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill-node executor factory — wires the in-process {@link SkillExecutorAdapter}
|
|
3
|
+
* into `CoreAgentDispatcherOptions.executor` while RETAINING the subprocess-spawn
|
|
4
|
+
* path for isolation nodes (T11477 · epic T11391 · saga T11387).
|
|
5
|
+
*
|
|
6
|
+
* ## The routing decision (AC2 + AC3)
|
|
7
|
+
*
|
|
8
|
+
* `CoreAgentDispatcher` resolves `agentId = node.agent ?? node.skill` and then
|
|
9
|
+
* calls its injected `executor` to perform the actual work. This factory builds
|
|
10
|
+
* that executor so it routes on the node's nature:
|
|
11
|
+
*
|
|
12
|
+
* - **In-process skill node** — the `agentId` names a `ct-*` skill that
|
|
13
|
+
* resolves via {@link findSkill}, AND the dispatch context does not request
|
|
14
|
+
* isolation. These run through {@link SkillExecutorAdapter} **in-process**:
|
|
15
|
+
* the skill→tool joint is a function call over the injected
|
|
16
|
+
* {@link GuardedToolSurface}, NOT a process boundary (AC1, AC4). This is the
|
|
17
|
+
* DEFAULT for in-process skill nodes, REPLACING `orchestrateSpawnExecute`
|
|
18
|
+
* for them (AC2).
|
|
19
|
+
*
|
|
20
|
+
* - **Isolation / agent node** — anything else (an `agent`-backed node, a node
|
|
21
|
+
* whose context requests `isolation`, or a skill that does not resolve
|
|
22
|
+
* in-process). These delegate to the INJECTED {@link SubprocessSpawnExecutor}
|
|
23
|
+
* — typically the runtime's `orchestrateSpawnExecute`, which provisions a git
|
|
24
|
+
* worktree and spawns a real subagent (AC3). The fallback is injected, not
|
|
25
|
+
* imported, so `@cleocode/core` keeps its no-dependency-on-`@cleocode/runtime`
|
|
26
|
+
* invariant (DIP again — the worktree mechanism is a detail core depends on
|
|
27
|
+
* through an abstraction).
|
|
28
|
+
*
|
|
29
|
+
* ## Why the fallback is injected
|
|
30
|
+
*
|
|
31
|
+
* `orchestrateSpawnExecute` lives in `@cleocode/runtime/gateway`. `core` must not
|
|
32
|
+
* import it (directed layering `contracts → core → runtime`). The CLI/runtime
|
|
33
|
+
* layer that already imports the gateway supplies it via
|
|
34
|
+
* {@link SkillNodeExecutorOptions.subprocessSpawn}; when omitted, isolation nodes
|
|
35
|
+
* report a structured failure rather than silently degrading.
|
|
36
|
+
*
|
|
37
|
+
* @epic T11391
|
|
38
|
+
* @task T11477
|
|
39
|
+
* @saga T11387
|
|
40
|
+
*/
|
|
41
|
+
import { findSkill } from '../skills/discovery.js';
|
|
42
|
+
import { SkillExecutorAdapter } from '../skills/skill-executor-adapter.js';
|
|
43
|
+
/**
|
|
44
|
+
* Context-binding key the playbook author / dispatcher uses to FORCE the
|
|
45
|
+
* subprocess-spawn (isolation) path even when the node names a resolvable
|
|
46
|
+
* `ct-*` skill. Truthy → isolation; absent/falsy → in-process skill execution.
|
|
47
|
+
*/
|
|
48
|
+
export const ISOLATION_CONTEXT_KEY = 'isolation';
|
|
49
|
+
/**
|
|
50
|
+
* `true` when this dispatch should take the in-process skill path: the agentId
|
|
51
|
+
* names a `ct-*`-resolvable skill AND the context does not request isolation.
|
|
52
|
+
*
|
|
53
|
+
* @param agentId - The resolved agent/skill id (`node.agent ?? node.skill`).
|
|
54
|
+
* @param context - The dispatch context whose bindings may request isolation.
|
|
55
|
+
* @param cwd - Skill-resolution cwd.
|
|
56
|
+
* @returns Whether the in-process {@link SkillExecutorAdapter} should handle it.
|
|
57
|
+
*/
|
|
58
|
+
function isInProcessSkillNode(agentId, context, cwd) {
|
|
59
|
+
if (context.context[ISOLATION_CONTEXT_KEY])
|
|
60
|
+
return false;
|
|
61
|
+
return findSkill(agentId, cwd) !== null;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Build a `CoreAgentDispatcherOptions.executor` that runs in-process skill nodes
|
|
65
|
+
* through {@link SkillExecutorAdapter} and routes isolation / agent nodes to the
|
|
66
|
+
* injected subprocess-spawn fallback.
|
|
67
|
+
*
|
|
68
|
+
* Inject the result as `executor` when constructing a `CoreAgentDispatcher`:
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* import { createToolGuard } from '@cleocode/core/tools/guard';
|
|
73
|
+
* import { orchestrateSpawnExecute } from '@cleocode/runtime/gateway';
|
|
74
|
+
*
|
|
75
|
+
* const tools = createToolGuard({ allowedRoots: [projectRoot] });
|
|
76
|
+
* const dispatcher = new CoreAgentDispatcher({
|
|
77
|
+
* db,
|
|
78
|
+
* projectRoot,
|
|
79
|
+
* executor: createSkillNodeExecutor({
|
|
80
|
+
* tools,
|
|
81
|
+
* cwd: projectRoot,
|
|
82
|
+
* subprocessSpawn: async (agent, ctx) => adaptOrchestrateSpawn(agent, ctx),
|
|
83
|
+
* }),
|
|
84
|
+
* });
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* @param opts - Injected tool surface + subprocess-spawn fallback + cwd/runner.
|
|
88
|
+
* @returns An executor suitable for `CoreAgentDispatcherOptions.executor`.
|
|
89
|
+
* @task T11477
|
|
90
|
+
*/
|
|
91
|
+
export function createSkillNodeExecutor(opts) {
|
|
92
|
+
const adapter = new SkillExecutorAdapter({
|
|
93
|
+
...(opts.cwd !== undefined ? { cwd: opts.cwd } : {}),
|
|
94
|
+
...(opts.runner !== undefined ? { runner: opts.runner } : {}),
|
|
95
|
+
});
|
|
96
|
+
return async (agent, context) => {
|
|
97
|
+
// In-process skill node (default; replaces orchestrateSpawnExecute) — AC1/AC2/AC4.
|
|
98
|
+
if (isInProcessSkillNode(context.agentId, context, opts.cwd)) {
|
|
99
|
+
const result = await adapter.execute({
|
|
100
|
+
skillId: context.agentId,
|
|
101
|
+
context: context.context,
|
|
102
|
+
tools: opts.tools,
|
|
103
|
+
});
|
|
104
|
+
// SkillExecuteResult and DispatchResult are structurally identical envelopes.
|
|
105
|
+
return result.error !== undefined
|
|
106
|
+
? { status: result.status, output: { ...result.output }, error: result.error }
|
|
107
|
+
: { status: result.status, output: { ...result.output } };
|
|
108
|
+
}
|
|
109
|
+
// Isolation / agent node — RETAIN the subprocess-spawn path (AC3).
|
|
110
|
+
if (opts.subprocessSpawn !== undefined) {
|
|
111
|
+
return opts.subprocessSpawn(agent, context);
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
status: 'failure',
|
|
115
|
+
output: {},
|
|
116
|
+
error: `node "${context.nodeId}" requires subprocess-spawn (isolation/agent "${context.agentId}") ` +
|
|
117
|
+
'but no subprocessSpawn executor was injected',
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Route a single agentic dispatch: run it in-process via
|
|
123
|
+
* {@link SkillExecutorAdapter} when it is a resolvable `ct-*` skill node, else
|
|
124
|
+
* delegate to the injected subprocess-spawn fallback (isolation/agent nodes).
|
|
125
|
+
*
|
|
126
|
+
* This is the runtime-input-shaped companion to {@link createSkillNodeExecutor},
|
|
127
|
+
* used by the CLI's default `cleo playbook run` dispatcher so the in-process
|
|
128
|
+
* skill path becomes the DEFAULT, REPLACING `orchestrateSpawnExecute` for skill
|
|
129
|
+
* nodes (AC2) while RETAINING it for isolation nodes (AC3). Keeping the routing
|
|
130
|
+
* decision here keeps the CLI dispatcher a thin adapter (CLI package boundary).
|
|
131
|
+
*
|
|
132
|
+
* @param input - The runtime dispatch input (node id, agent id, context).
|
|
133
|
+
* @param opts - Injected tool surface, cwd/runner, and subprocess-spawn fallback.
|
|
134
|
+
* @returns The terminal {@link DispatchResult} envelope.
|
|
135
|
+
* @task T11477
|
|
136
|
+
*/
|
|
137
|
+
export async function runSkillNodeOrSpawn(input, opts) {
|
|
138
|
+
const isolationRequested = Boolean(input.context[ISOLATION_CONTEXT_KEY]);
|
|
139
|
+
if (!isolationRequested && findSkill(input.agentId, opts.cwd) !== null) {
|
|
140
|
+
const adapter = new SkillExecutorAdapter({
|
|
141
|
+
...(opts.cwd !== undefined ? { cwd: opts.cwd } : {}),
|
|
142
|
+
...(opts.runner !== undefined ? { runner: opts.runner } : {}),
|
|
143
|
+
});
|
|
144
|
+
const result = await adapter.execute({
|
|
145
|
+
skillId: input.agentId,
|
|
146
|
+
context: input.context,
|
|
147
|
+
tools: opts.tools,
|
|
148
|
+
});
|
|
149
|
+
return result.error !== undefined
|
|
150
|
+
? { status: result.status, output: { ...result.output }, error: result.error }
|
|
151
|
+
: { status: result.status, output: { ...result.output } };
|
|
152
|
+
}
|
|
153
|
+
// Isolation / agent node — RETAIN the subprocess-spawn path (AC3).
|
|
154
|
+
return opts.subprocessSpawn();
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=skill-node-executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-node-executor.js","sourceRoot":"","sources":["../../src/playbooks/skill-node-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAoB,MAAM,qCAAqC,CAAC;AAG7F;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAiDjD;;;;;;;;GAQG;AACH,SAAS,oBAAoB,CAC3B,OAAe,EACf,OAAwB,EACxB,GAAuB;IAEvB,IAAI,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC;QAAE,OAAO,KAAK,CAAC;IACzD,OAAO,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;AAC1C,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,uBAAuB,CACrC,IAA8B;IAE9B,MAAM,OAAO,GAAG,IAAI,oBAAoB,CAAC;QACvC,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACpD,GAAG,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9D,CAAC,CAAC;IAEH,OAAO,KAAK,EAAE,KAAoB,EAAE,OAAwB,EAA2B,EAAE;QACvF,mFAAmF;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AAG,CAAC,KAAK,IAAI,EAAE,CAAC;QACvE,MAAM,OAAO,GAAG,IAAI,oBAAoB,CAAC;YACvC,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACpD,GAAG,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9D,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC;YACnC,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,KAAK,KAAK,SAAS;YAC/B,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE;YAC9E,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;IAC9D,CAAC;IACD,mEAAmE;IACnE,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;AAChC,CAAC"}
|
package/dist/repair.d.ts
CHANGED
|
@@ -22,16 +22,12 @@ export declare function repairMissingSizes(cwd: string | undefined, dryRun: bool
|
|
|
22
22
|
* Operates directly on the SQLite tasks table.
|
|
23
23
|
*/
|
|
24
24
|
export declare function repairMissingCompletedAt(cwd: string | undefined, dryRun: boolean): Promise<RepairAction>;
|
|
25
|
-
/**
|
|
26
|
-
* Detect and add missing required columns on the tasks table.
|
|
27
|
-
* Uses PRAGMA table_info to check actual schema vs required columns.
|
|
28
|
-
*
|
|
29
|
-
* @see https://github.com/anthropics/cleo/issues/63
|
|
30
|
-
*/
|
|
31
|
-
export declare function repairMissingColumns(cwd: string | undefined, dryRun: boolean): Promise<RepairAction>;
|
|
32
25
|
/**
|
|
33
26
|
* Run all repair functions.
|
|
34
27
|
* Returns all actions taken (or previewed in dry-run mode).
|
|
28
|
+
*
|
|
29
|
+
* Note: column-level schema repair was removed in T11527 — DDL is now owned
|
|
30
|
+
* exclusively by the forward Drizzle migrations, not post-hoc `ensureColumns`.
|
|
35
31
|
*/
|
|
36
32
|
export declare function runAllRepairs(cwd: string | undefined, dryRun: boolean): Promise<RepairAction[]>;
|
|
37
33
|
//# sourceMappingURL=repair.d.ts.map
|
package/dist/repair.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repair.d.ts","sourceRoot":"","sources":["../src/repair.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,0CAA0C;AAC1C,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,YAAY,CAAC,CA+BvB;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,YAAY,CAAC,CA0CvB;AAED
|
|
1
|
+
{"version":3,"file":"repair.d.ts","sourceRoot":"","sources":["../src/repair.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,0CAA0C;AAC1C,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,YAAY,CAAC,CA+BvB;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,YAAY,CAAC,CA0CvB;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,YAAY,EAAE,CAAC,CAMzB"}
|
package/dist/repair.js
CHANGED
|
@@ -75,56 +75,18 @@ export async function repairMissingCompletedAt(cwd, dryRun) {
|
|
|
75
75
|
details: `Set completedAt for ${affected.length} done/cancelled task(s)`,
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
/**
|
|
79
|
-
* Detect and add missing required columns on the tasks table.
|
|
80
|
-
* Uses PRAGMA table_info to check actual schema vs required columns.
|
|
81
|
-
*
|
|
82
|
-
* @see https://github.com/anthropics/cleo/issues/63
|
|
83
|
-
*/
|
|
84
|
-
export async function repairMissingColumns(cwd, dryRun) {
|
|
85
|
-
const { getDb } = await import('./store/sqlite.js');
|
|
86
|
-
const db = await getDb(cwd);
|
|
87
|
-
// getDb() already calls ensureRequiredColumns(), so if we get here
|
|
88
|
-
// the column should exist. But we still report the action for visibility.
|
|
89
|
-
const { sql } = await import('drizzle-orm');
|
|
90
|
-
const columns = db.all(sql `PRAGMA table_info(tasks)`);
|
|
91
|
-
const existingCols = new Set(columns.map((c) => c.name));
|
|
92
|
-
const missingCols = ['pipeline_stage'].filter((c) => !existingCols.has(c));
|
|
93
|
-
if (missingCols.length === 0) {
|
|
94
|
-
return {
|
|
95
|
-
action: 'fix_missing_columns',
|
|
96
|
-
status: 'skipped',
|
|
97
|
-
details: 'All required columns present on tasks table',
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
if (dryRun) {
|
|
101
|
-
return {
|
|
102
|
-
action: 'fix_missing_columns',
|
|
103
|
-
status: 'preview',
|
|
104
|
-
details: `Would add missing column(s): ${missingCols.join(', ')}`,
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
// Columns should already be added by ensureRequiredColumns() in getDb(),
|
|
108
|
-
// but apply again defensively.
|
|
109
|
-
for (const col of missingCols) {
|
|
110
|
-
db.run(sql.raw(`ALTER TABLE tasks ADD COLUMN ${col} text`));
|
|
111
|
-
}
|
|
112
|
-
return {
|
|
113
|
-
action: 'fix_missing_columns',
|
|
114
|
-
status: 'applied',
|
|
115
|
-
details: `Added missing column(s): ${missingCols.join(', ')}`,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
78
|
/**
|
|
119
79
|
* Run all repair functions.
|
|
120
80
|
* Returns all actions taken (or previewed in dry-run mode).
|
|
81
|
+
*
|
|
82
|
+
* Note: column-level schema repair was removed in T11527 — DDL is now owned
|
|
83
|
+
* exclusively by the forward Drizzle migrations, not post-hoc `ensureColumns`.
|
|
121
84
|
*/
|
|
122
85
|
export async function runAllRepairs(cwd, dryRun) {
|
|
123
|
-
const [sizes, completedAt
|
|
86
|
+
const [sizes, completedAt] = await Promise.all([
|
|
124
87
|
repairMissingSizes(cwd, dryRun),
|
|
125
88
|
repairMissingCompletedAt(cwd, dryRun),
|
|
126
|
-
repairMissingColumns(cwd, dryRun),
|
|
127
89
|
]);
|
|
128
|
-
return [sizes, completedAt
|
|
90
|
+
return [sizes, completedAt];
|
|
129
91
|
}
|
|
130
92
|
//# sourceMappingURL=repair.js.map
|
package/dist/repair.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repair.js","sourceRoot":"","sources":["../src/repair.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH;;;GAGG;AACH,MAAM,CAAC,KA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KAAK,CAAC;SACb,GAAG,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC;SACzB,KAAK,CACJ,GAAG,CAAA,IAAI,KAAK,CAAC,MAAM,gBAAgB,KAAK,CAAC,MAAM,uBAAuB,KAAK,CAAC,WAAW,UAAU,CAClG,CAAC;IAEJ,OAAO;QACL,MAAM,EAAE,kBAAkB;QAC1B,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,uBAAuB,QAAQ,CAAC,MAAM,yBAAyB;KACzE,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,GAAuB,EACvB,MAAe;IAEf,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC7C,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC;QAC/B,wBAAwB,CAAC,GAAG,EAAE,MAAM,CAAC;KACtC,CAAC,CAAC;IACH,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -70,7 +70,7 @@ export async function migrateSagaContainment(projectRoot, params = {}) {
|
|
|
70
70
|
// 1. Find sagas to scan.
|
|
71
71
|
const sagaFilter = sagaId ? `AND p.id = ?` : '';
|
|
72
72
|
const sagaArgs = sagaId ? [sagaId] : [];
|
|
73
|
-
const sagas = db.all(`SELECT DISTINCT p.id, p.title FROM
|
|
73
|
+
const sagas = db.all(`SELECT DISTINCT p.id, p.title FROM tasks_tasks p WHERE p.type = 'saga' ${sagaFilter} ORDER BY p.id`, ...sagaArgs);
|
|
74
74
|
if (sagas.length === 0) {
|
|
75
75
|
return engineSuccess({
|
|
76
76
|
sagasScanned: 0,
|
|
@@ -85,9 +85,9 @@ export async function migrateSagaContainment(projectRoot, params = {}) {
|
|
|
85
85
|
const sagaIds = sagas.map((s) => s.id);
|
|
86
86
|
const sagaPlaceholders = sagaIds.map(() => '?').join(',');
|
|
87
87
|
const epics = db.all(`SELECT t.id, t.title, t.parent_id as parentId, p.id as sagaId
|
|
88
|
-
FROM
|
|
89
|
-
JOIN
|
|
90
|
-
JOIN
|
|
88
|
+
FROM tasks_task_relations r
|
|
89
|
+
JOIN tasks_tasks p ON r.task_id = p.id
|
|
90
|
+
JOIN tasks_tasks t ON r.related_to = t.id
|
|
91
91
|
WHERE r.relation_type = 'groups'
|
|
92
92
|
AND p.type = 'saga'
|
|
93
93
|
AND t.type = 'epic'
|
|
@@ -95,9 +95,9 @@ export async function migrateSagaContainment(projectRoot, params = {}) {
|
|
|
95
95
|
ORDER BY t.id`, ...sagaIds);
|
|
96
96
|
// 3. Find legacy groups relations whose target is not an Epic (conflicts).
|
|
97
97
|
const tasks = db.all(`SELECT t.id, t.title, t.type, t.parent_id as parentId, p.id as sagaId
|
|
98
|
-
FROM
|
|
99
|
-
JOIN
|
|
100
|
-
JOIN
|
|
98
|
+
FROM tasks_task_relations r
|
|
99
|
+
JOIN tasks_tasks p ON r.task_id = p.id
|
|
100
|
+
JOIN tasks_tasks t ON r.related_to = t.id
|
|
101
101
|
WHERE r.relation_type = 'groups'
|
|
102
102
|
AND p.type = 'saga'
|
|
103
103
|
AND t.type != 'epic'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-containment.js","sourceRoot":"","sources":["../../src/sagas/migrate-containment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAqB,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,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AE,IAAI,CAAC,MAAM;gBACjB,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,IAAI,EAAE,oBAAoB;aAC3B;SACF,CAAC;QACF,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7B,SAAS,CAAC;YACR,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YAC5B,MAAM,EAAE,SAAS;YACjB,GAAG,QAAQ;SACZ,CAAC,CAAC;IACL,CAAC;IAED,8CAA8C;IAC9C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,SAAS,CAAC,IAAI,CAAC;YACb,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,IAAI;YACnB,SAAS,EAAE,IAAI,CAAC,KAAK;YACrB,MAAM,EAAE,uBAAuB,IAAI,CAAC,IAAI,0CAA0C,IAAI,CAAC,MAAM,wDAAwD;SACtJ,CAAC,CAAC;IACL,CAAC;IAED,OAAO,aAAa,CAAC;QACnB,YAAY,EAAE,KAAK,CAAC,MAAM;QAC1B,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM;QAC9D,OAAO;QACP,aAAa;QACb,SAAS;QACT,MAAM;KACP,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -43,8 +43,14 @@ export declare function ensureProjectGitInitialCommit(projectRoot: string): Prom
|
|
|
43
43
|
*/
|
|
44
44
|
export declare function ensureSqliteDb(projectRoot: string): Promise<ScaffoldResult>;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
46
|
+
* Initialize the brain domain if missing.
|
|
47
|
+
*
|
|
48
|
+
* ## E6-L2 (T11522)
|
|
49
|
+
*
|
|
50
|
+
* The brain domain now lives inside the consolidated project `cleo.db`
|
|
51
|
+
* (`getBrainDb` → `openDualScopeDb('project')`), not a standalone `brain.db`.
|
|
52
|
+
* The idempotency probe therefore targets the consolidated `cleo.db` path so a
|
|
53
|
+
* second scaffold run correctly reports `skipped` rather than always `created`.
|
|
48
54
|
*
|
|
49
55
|
* @param projectRoot - Absolute path to the project root directory
|
|
50
56
|
* @returns Scaffold result indicating the action taken
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensure-dirs.d.ts","sourceRoot":"","sources":["../../src/scaffold/ensure-dirs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAK/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,4CAA4C;AAC5C,eAAO,MAAM,qBAAqB,8FAOxB,CAAC;AAEX;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA0BtF;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA0BpF;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,6BAA6B,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA+DhG;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"ensure-dirs.d.ts","sourceRoot":"","sources":["../../src/scaffold/ensure-dirs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAK/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,4CAA4C;AAC5C,eAAO,MAAM,qBAAqB,8FAOxB,CAAC;AAEX;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA0BtF;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA0BpF;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,6BAA6B,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA+DhG;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAuBjF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA6ChF"}
|
|
@@ -160,9 +160,13 @@ export async function ensureProjectGitInitialCommit(projectRoot) {
|
|
|
160
160
|
*/
|
|
161
161
|
export async function ensureSqliteDb(projectRoot) {
|
|
162
162
|
const cleoDir = resolveScaffoldCleoDir(projectRoot);
|
|
163
|
-
|
|
163
|
+
// E6-L1 (T11521): getDb() now opens the consolidated project `cleo.db` via
|
|
164
|
+
// openDualScopeDb('project'), not the legacy `tasks.db`. The idempotency probe
|
|
165
|
+
// must check the file getDb actually creates, otherwise a second scaffold pass
|
|
166
|
+
// re-reports the DB as freshly `created`.
|
|
167
|
+
const dbPath = join(cleoDir, 'cleo.db');
|
|
164
168
|
if (existsSync(dbPath)) {
|
|
165
|
-
return { action: 'skipped', path: dbPath, details: '
|
|
169
|
+
return { action: 'skipped', path: dbPath, details: 'cleo.db already exists' };
|
|
166
170
|
}
|
|
167
171
|
try {
|
|
168
172
|
const { getDb } = await import('../store/sqlite.js');
|
|
@@ -178,18 +182,24 @@ export async function ensureSqliteDb(projectRoot) {
|
|
|
178
182
|
}
|
|
179
183
|
}
|
|
180
184
|
/**
|
|
181
|
-
*
|
|
182
|
-
*
|
|
185
|
+
* Initialize the brain domain if missing.
|
|
186
|
+
*
|
|
187
|
+
* ## E6-L2 (T11522)
|
|
188
|
+
*
|
|
189
|
+
* The brain domain now lives inside the consolidated project `cleo.db`
|
|
190
|
+
* (`getBrainDb` → `openDualScopeDb('project')`), not a standalone `brain.db`.
|
|
191
|
+
* The idempotency probe therefore targets the consolidated `cleo.db` path so a
|
|
192
|
+
* second scaffold run correctly reports `skipped` rather than always `created`.
|
|
183
193
|
*
|
|
184
194
|
* @param projectRoot - Absolute path to the project root directory
|
|
185
195
|
* @returns Scaffold result indicating the action taken
|
|
186
196
|
*/
|
|
187
197
|
export async function ensureBrainDb(projectRoot) {
|
|
188
|
-
const
|
|
189
|
-
|
|
198
|
+
const { getBrainDbPath, getBrainDb, getBrainNativeDb } = await import('../store/memory-sqlite.js');
|
|
199
|
+
// E6-L2: getBrainDbPath resolves to the consolidated `cleo.db`.
|
|
200
|
+
const dbPath = getBrainDbPath(projectRoot);
|
|
190
201
|
if (existsSync(dbPath)) {
|
|
191
202
|
try {
|
|
192
|
-
const { getBrainNativeDb } = await import('../store/memory-sqlite.js');
|
|
193
203
|
const nativeDb = getBrainNativeDb();
|
|
194
204
|
if (nativeDb) {
|
|
195
205
|
const { ensureFts5Tables } = await import('../memory/brain-search.js');
|
|
@@ -199,10 +209,9 @@ export async function ensureBrainDb(projectRoot) {
|
|
|
199
209
|
catch {
|
|
200
210
|
// Non-fatal
|
|
201
211
|
}
|
|
202
|
-
return { action: 'skipped', path: dbPath, details: 'brain.db already exists' };
|
|
212
|
+
return { action: 'skipped', path: dbPath, details: 'brain domain (cleo.db) already exists' };
|
|
203
213
|
}
|
|
204
214
|
try {
|
|
205
|
-
const { getBrainDb, getBrainNativeDb } = await import('../store/memory-sqlite.js');
|
|
206
215
|
await getBrainDb(projectRoot);
|
|
207
216
|
try {
|
|
208
217
|
const nativeDb = getBrainNativeDb();
|
|
@@ -214,13 +223,17 @@ export async function ensureBrainDb(projectRoot) {
|
|
|
214
223
|
catch {
|
|
215
224
|
// FTS5 may not be available — non-fatal
|
|
216
225
|
}
|
|
217
|
-
return {
|
|
226
|
+
return {
|
|
227
|
+
action: 'created',
|
|
228
|
+
path: dbPath,
|
|
229
|
+
details: 'Brain domain initialized in cleo.db with FTS5',
|
|
230
|
+
};
|
|
218
231
|
}
|
|
219
232
|
catch (err) {
|
|
220
233
|
return {
|
|
221
234
|
action: 'skipped',
|
|
222
235
|
path: dbPath,
|
|
223
|
-
details: `Failed to initialize brain
|
|
236
|
+
details: `Failed to initialize brain domain: ${err instanceof Error ? err.message : String(err)}`,
|
|
224
237
|
};
|
|
225
238
|
}
|
|
226
239
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensure-dirs.js","sourceRoot":"","sources":["../../src/scaffold/ensure-dirs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C,4CAA4C;AAC5C,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,qBAAqB;IACrB,gBAAgB;IAChB,eAAe;IACf,MAAM;IACN,OAAO;IACP,MAAM;CACE,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,WAAmB;IAC3D,MAAM,YAAY,GAAG,OAAO,CAAC,WAAW,CA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