@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
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
-- T11649 — Widen `tasks_token_usage.transport` CHECK to preserve 'mcp'.
|
|
2
|
+
--
|
|
3
|
+
-- Background:
|
|
4
|
+
-- The consolidation migration (20260531000001_t11363) created
|
|
5
|
+
-- `tasks_token_usage` with `CHECK ("transport" IN ('cli','api','agent','unknown'))`.
|
|
6
|
+
-- `'mcp'` was NOT in the enum, so the exodus migrate layer coerced
|
|
7
|
+
-- `transport = 'mcp'` → `'agent'` (T11548) to satisfy the CHECK. The full
|
|
8
|
+
-- cutover dry-run flagged this as a SILENT SEMANTIC ALTERATION: ~194 real
|
|
9
|
+
-- telemetry rows had their true origin (MCP-gateway, `source: "mcp"`) rewritten
|
|
10
|
+
-- to `'agent'`, with no preserving column capturing the lost value. Count was
|
|
11
|
+
-- preserved; integrity was not.
|
|
12
|
+
--
|
|
13
|
+
-- Owner directive (T11649): 100% data integrity. `'mcp'` is a first-class
|
|
14
|
+
-- transport origin, distinct from `'agent'`, and MUST be stored verbatim.
|
|
15
|
+
--
|
|
16
|
+
-- Change:
|
|
17
|
+
-- Old CHECK: transport IN ('cli','api','agent','unknown')
|
|
18
|
+
-- New CHECK: transport IN ('cli','api','agent','mcp','unknown')
|
|
19
|
+
--
|
|
20
|
+
-- The widened enum is the canonical `TOKEN_USAGE_TRANSPORTS` SSoT in
|
|
21
|
+
-- packages/core/src/store/schema/audit.ts. The exodus `tasks_token_usage.transport`
|
|
22
|
+
-- normalization rule is removed in the same change so `'mcp'` lands unmodified.
|
|
23
|
+
--
|
|
24
|
+
-- SQLite cannot ALTER a CHECK constraint in place, so this migration follows the
|
|
25
|
+
-- canonical "table rebuild" recipe (same pattern as drizzle-tasks T9073 / T1408):
|
|
26
|
+
--
|
|
27
|
+
-- 1. Create `__new_tasks_token_usage` with the widened CHECK (every other
|
|
28
|
+
-- column / default / CHECK preserved verbatim from the T11363 DDL).
|
|
29
|
+
-- 2. INSERT … SELECT every row (no data transformation — existing values are
|
|
30
|
+
-- all valid under the wider constraint).
|
|
31
|
+
-- 3. DROP `tasks_token_usage`; RENAME `__new_tasks_token_usage` TO it.
|
|
32
|
+
-- 4. Recreate all nine indexes.
|
|
33
|
+
--
|
|
34
|
+
-- This migration is purely additive at the schema level (the enum only GROWS),
|
|
35
|
+
-- runs AFTER the consolidation CREATE, and leaves every other table untouched.
|
|
36
|
+
--
|
|
37
|
+
-- @task T11649
|
|
38
|
+
-- @epic T11245
|
|
39
|
+
-- @saga T11242
|
|
40
|
+
|
|
41
|
+
PRAGMA foreign_keys = OFF;
|
|
42
|
+
--> statement-breakpoint
|
|
43
|
+
|
|
44
|
+
-- --------------------------------------------------------------------------
|
|
45
|
+
-- Step 1 — Drop the nine indexes attached to `tasks_token_usage`
|
|
46
|
+
-- (they are recreated against the rebuilt table in Step 4).
|
|
47
|
+
-- --------------------------------------------------------------------------
|
|
48
|
+
DROP INDEX IF EXISTS `idx_tasks_token_usage_created_at`;
|
|
49
|
+
--> statement-breakpoint
|
|
50
|
+
DROP INDEX IF EXISTS `idx_tasks_token_usage_request_id`;
|
|
51
|
+
--> statement-breakpoint
|
|
52
|
+
DROP INDEX IF EXISTS `idx_tasks_token_usage_session_id`;
|
|
53
|
+
--> statement-breakpoint
|
|
54
|
+
DROP INDEX IF EXISTS `idx_tasks_token_usage_task_id`;
|
|
55
|
+
--> statement-breakpoint
|
|
56
|
+
DROP INDEX IF EXISTS `idx_tasks_token_usage_provider`;
|
|
57
|
+
--> statement-breakpoint
|
|
58
|
+
DROP INDEX IF EXISTS `idx_tasks_token_usage_transport`;
|
|
59
|
+
--> statement-breakpoint
|
|
60
|
+
DROP INDEX IF EXISTS `idx_tasks_token_usage_domain_operation`;
|
|
61
|
+
--> statement-breakpoint
|
|
62
|
+
DROP INDEX IF EXISTS `idx_tasks_token_usage_method`;
|
|
63
|
+
--> statement-breakpoint
|
|
64
|
+
DROP INDEX IF EXISTS `idx_tasks_token_usage_gateway`;
|
|
65
|
+
--> statement-breakpoint
|
|
66
|
+
|
|
67
|
+
-- --------------------------------------------------------------------------
|
|
68
|
+
-- Step 2 — Create `__new_tasks_token_usage` with the widened transport CHECK.
|
|
69
|
+
-- All other columns / constraints / defaults are byte-identical to the
|
|
70
|
+
-- T11363 consolidation DDL — the only change is the transport enum.
|
|
71
|
+
-- --------------------------------------------------------------------------
|
|
72
|
+
CREATE TABLE `__new_tasks_token_usage` (
|
|
73
|
+
`id` text PRIMARY KEY,
|
|
74
|
+
`created_at` text DEFAULT (datetime('now')) NOT NULL,
|
|
75
|
+
`provider` text DEFAULT 'unknown' NOT NULL,
|
|
76
|
+
`model` text,
|
|
77
|
+
`transport` text DEFAULT 'unknown' NOT NULL,
|
|
78
|
+
`gateway` text,
|
|
79
|
+
`domain` text,
|
|
80
|
+
`operation` text,
|
|
81
|
+
`session_id` text,
|
|
82
|
+
`task_id` text,
|
|
83
|
+
`request_id` text,
|
|
84
|
+
`input_chars` integer DEFAULT 0 NOT NULL,
|
|
85
|
+
`output_chars` integer DEFAULT 0 NOT NULL,
|
|
86
|
+
`input_tokens` integer DEFAULT 0 NOT NULL,
|
|
87
|
+
`output_tokens` integer DEFAULT 0 NOT NULL,
|
|
88
|
+
`total_tokens` integer DEFAULT 0 NOT NULL,
|
|
89
|
+
`method` text DEFAULT 'heuristic' NOT NULL,
|
|
90
|
+
`confidence` text DEFAULT 'coarse' NOT NULL,
|
|
91
|
+
`request_hash` text,
|
|
92
|
+
`response_hash` text,
|
|
93
|
+
`metadata_json` text DEFAULT '{}' NOT NULL,
|
|
94
|
+
-- consolidation CHECK constraints (T11363) — transport widened to include 'mcp' (T11649)
|
|
95
|
+
CHECK ("created_at" IS NULL OR "created_at" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]*'),
|
|
96
|
+
CHECK ("transport" IN ('cli', 'api', 'agent', 'mcp', 'unknown')),
|
|
97
|
+
CHECK ("method" IN ('otel', 'provider_api', 'tokenizer', 'heuristic')),
|
|
98
|
+
CHECK ("confidence" IN ('real', 'high', 'estimated', 'coarse'))
|
|
99
|
+
);
|
|
100
|
+
--> statement-breakpoint
|
|
101
|
+
|
|
102
|
+
-- --------------------------------------------------------------------------
|
|
103
|
+
-- Step 3 — Copy every row (no transformation; every value is valid under the
|
|
104
|
+
-- wider constraint) then swap tables.
|
|
105
|
+
-- --------------------------------------------------------------------------
|
|
106
|
+
INSERT INTO `__new_tasks_token_usage` (
|
|
107
|
+
`id`, `created_at`, `provider`, `model`, `transport`, `gateway`, `domain`,
|
|
108
|
+
`operation`, `session_id`, `task_id`, `request_id`, `input_chars`,
|
|
109
|
+
`output_chars`, `input_tokens`, `output_tokens`, `total_tokens`, `method`,
|
|
110
|
+
`confidence`, `request_hash`, `response_hash`, `metadata_json`
|
|
111
|
+
)
|
|
112
|
+
SELECT
|
|
113
|
+
`id`, `created_at`, `provider`, `model`, `transport`, `gateway`, `domain`,
|
|
114
|
+
`operation`, `session_id`, `task_id`, `request_id`, `input_chars`,
|
|
115
|
+
`output_chars`, `input_tokens`, `output_tokens`, `total_tokens`, `method`,
|
|
116
|
+
`confidence`, `request_hash`, `response_hash`, `metadata_json`
|
|
117
|
+
FROM `tasks_token_usage`;
|
|
118
|
+
--> statement-breakpoint
|
|
119
|
+
DROP TABLE `tasks_token_usage`;
|
|
120
|
+
--> statement-breakpoint
|
|
121
|
+
ALTER TABLE `__new_tasks_token_usage` RENAME TO `tasks_token_usage`;
|
|
122
|
+
--> statement-breakpoint
|
|
123
|
+
|
|
124
|
+
-- --------------------------------------------------------------------------
|
|
125
|
+
-- Step 4 — Recreate all nine indexes (verbatim from the T11363 DDL).
|
|
126
|
+
-- --------------------------------------------------------------------------
|
|
127
|
+
CREATE INDEX `idx_tasks_token_usage_created_at` ON `tasks_token_usage` (`created_at`);
|
|
128
|
+
--> statement-breakpoint
|
|
129
|
+
CREATE INDEX `idx_tasks_token_usage_request_id` ON `tasks_token_usage` (`request_id`);
|
|
130
|
+
--> statement-breakpoint
|
|
131
|
+
CREATE INDEX `idx_tasks_token_usage_session_id` ON `tasks_token_usage` (`session_id`);
|
|
132
|
+
--> statement-breakpoint
|
|
133
|
+
CREATE INDEX `idx_tasks_token_usage_task_id` ON `tasks_token_usage` (`task_id`);
|
|
134
|
+
--> statement-breakpoint
|
|
135
|
+
CREATE INDEX `idx_tasks_token_usage_provider` ON `tasks_token_usage` (`provider`);
|
|
136
|
+
--> statement-breakpoint
|
|
137
|
+
CREATE INDEX `idx_tasks_token_usage_transport` ON `tasks_token_usage` (`transport`);
|
|
138
|
+
--> statement-breakpoint
|
|
139
|
+
CREATE INDEX `idx_tasks_token_usage_domain_operation` ON `tasks_token_usage` (`domain`,`operation`);
|
|
140
|
+
--> statement-breakpoint
|
|
141
|
+
CREATE INDEX `idx_tasks_token_usage_method` ON `tasks_token_usage` (`method`);
|
|
142
|
+
--> statement-breakpoint
|
|
143
|
+
CREATE INDEX `idx_tasks_token_usage_gateway` ON `tasks_token_usage` (`gateway`);
|
|
144
|
+
--> statement-breakpoint
|
|
145
|
+
|
|
146
|
+
PRAGMA foreign_keys = ON;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
-- T11523 (E6-L3) → T11578 (AC4 · COMPLETE-CUTOVER): conduit FTS5 quartet over the
|
|
2
|
+
-- consolidated `conduit_*` tables.
|
|
3
|
+
--
|
|
4
|
+
-- ## History
|
|
5
|
+
--
|
|
6
|
+
-- E6-L3 (T11523) routed `ensureConduitDb()` through `openDualScopeDb('project')`
|
|
7
|
+
-- (the consolidated `cleo.db` chokepoint, ADR-068/069) and reproduced the legacy
|
|
8
|
+
-- BARE-table conduit shape (`conversations`, `messages`, `delivery_jobs`, …) here
|
|
9
|
+
-- as a forward migration so the runtime writers kept working unchanged. The bare
|
|
10
|
+
-- tables co-existed (disjoint names) with the consolidated `conduit_*` tables the
|
|
11
|
+
-- exodus migration (T11248 / T11553) renames into.
|
|
12
|
+
--
|
|
13
|
+
-- ## AC4 cutover (T11578)
|
|
14
|
+
--
|
|
15
|
+
-- The conduit runtime READ + WRITE path now targets the PREFIXED consolidated
|
|
16
|
+
-- tables (`conduit_conversations`, `conduit_messages`, `conduit_topics`, …) that
|
|
17
|
+
-- the consolidated cleo-project migration
|
|
18
|
+
-- (`drizzle-cleo-project/20260531000001_t11363-consolidation-cleo-project`)
|
|
19
|
+
-- creates. Those 14 prefixed tables are therefore NO LONGER created here — the
|
|
20
|
+
-- consolidated migration owns them (single SSoT; CHECK constraints + ISO-8601
|
|
21
|
+
-- TEXT timestamp affinity are injected by T11363). This migration's sole
|
|
22
|
+
-- remaining responsibility is the FTS5 full-text index over `conduit_messages`,
|
|
23
|
+
-- which drizzle-orm sqlite-core cannot model (FTS5 virtual tables) and which the
|
|
24
|
+
-- consolidated migration therefore omits.
|
|
25
|
+
--
|
|
26
|
+
-- ## FTS5 rename: `messages_fts` → `conduit_messages_fts` (T11578 decision)
|
|
27
|
+
--
|
|
28
|
+
-- The full-text index and its three sync triggers are renamed with the `conduit_`
|
|
29
|
+
-- domain prefix for clarity and to stay disjoint inside the shared `cleo.db`
|
|
30
|
+
-- (which also holds `brain_*_fts` indexes). The index content table is
|
|
31
|
+
-- `conduit_messages` and `content_rowid='rowid'` is preserved. The exodus
|
|
32
|
+
-- migration skips `*_fts` tables (rebuilt post-migration from their content
|
|
33
|
+
-- table — see exodus/table-name-map.ts `isDerivedFtsTable`), so the
|
|
34
|
+
-- `INSERT INTO conduit_messages_fts(conduit_messages_fts) VALUES('rebuild')` seed
|
|
35
|
+
-- below reindexes whatever rows the consolidated migration + exodus already
|
|
36
|
+
-- placed in `conduit_messages`. Every statement is `IF NOT EXISTS`, so re-running
|
|
37
|
+
-- on a DB that already has the FTS index is idempotent.
|
|
38
|
+
|
|
39
|
+
-- -------------------------------------------------------------------------
|
|
40
|
+
-- FTS5 virtual table for full-text search on conduit_messages content.
|
|
41
|
+
-- The INSERT … VALUES('rebuild') is idempotent — safe to run on every open;
|
|
42
|
+
-- it (re)indexes the existing conduit_messages rows.
|
|
43
|
+
-- -------------------------------------------------------------------------
|
|
44
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS conduit_messages_fts
|
|
45
|
+
USING fts5(content, from_agent_id, content='conduit_messages', content_rowid='rowid');
|
|
46
|
+
--> statement-breakpoint
|
|
47
|
+
INSERT INTO conduit_messages_fts(conduit_messages_fts) VALUES('rebuild');
|
|
48
|
+
--> statement-breakpoint
|
|
49
|
+
CREATE TRIGGER IF NOT EXISTS conduit_messages_ai AFTER INSERT ON conduit_messages BEGIN
|
|
50
|
+
INSERT INTO conduit_messages_fts(rowid, content, from_agent_id)
|
|
51
|
+
VALUES (new.rowid, new.content, new.from_agent_id);
|
|
52
|
+
END;
|
|
53
|
+
--> statement-breakpoint
|
|
54
|
+
CREATE TRIGGER IF NOT EXISTS conduit_messages_ad AFTER DELETE ON conduit_messages BEGIN
|
|
55
|
+
INSERT INTO conduit_messages_fts(conduit_messages_fts, rowid, content, from_agent_id)
|
|
56
|
+
VALUES('delete', old.rowid, old.content, old.from_agent_id);
|
|
57
|
+
END;
|
|
58
|
+
--> statement-breakpoint
|
|
59
|
+
CREATE TRIGGER IF NOT EXISTS conduit_messages_au AFTER UPDATE ON conduit_messages BEGIN
|
|
60
|
+
INSERT INTO conduit_messages_fts(conduit_messages_fts, rowid, content, from_agent_id)
|
|
61
|
+
VALUES('delete', old.rowid, old.content, old.from_agent_id);
|
|
62
|
+
INSERT INTO conduit_messages_fts(rowid, content, from_agent_id)
|
|
63
|
+
VALUES (new.rowid, new.content, new.from_agent_id);
|
|
64
|
+
END;
|
|
65
|
+
--> statement-breakpoint
|
|
66
|
+
|
|
67
|
+
-- -------------------------------------------------------------------------
|
|
68
|
+
-- Legacy meta tracking tables — retained for backwards-compatible health
|
|
69
|
+
-- probes (`checkConduitDbHealth` reads `_conduit_meta.schema_version`).
|
|
70
|
+
-- `__drizzle_migrations` is the canonical migration journal; these are kept
|
|
71
|
+
-- only for the pre-T1407 health-check consumers.
|
|
72
|
+
-- -------------------------------------------------------------------------
|
|
73
|
+
CREATE TABLE IF NOT EXISTS _conduit_meta (
|
|
74
|
+
key TEXT PRIMARY KEY,
|
|
75
|
+
value TEXT NOT NULL,
|
|
76
|
+
updated_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now'))
|
|
77
|
+
);
|
|
78
|
+
--> statement-breakpoint
|
|
79
|
+
CREATE TABLE IF NOT EXISTS _conduit_migrations (
|
|
80
|
+
name TEXT PRIMARY KEY,
|
|
81
|
+
applied_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now'))
|
|
82
|
+
);
|
|
@@ -1,8 +1,26 @@
|
|
|
1
|
-
-- BASELINE MARKER — T1165 Hybrid Path A+ (ADR-054).
|
|
2
|
-
--
|
|
3
|
-
--
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--
|
|
1
|
+
-- BASELINE MARKER — T1165 Hybrid Path A+ (ADR-054) · rewritten for T11578 · AC3.
|
|
2
|
+
-- No DDL to apply here (comment-only marker).
|
|
3
|
+
--
|
|
4
|
+
-- ## COMPLETE-CUTOVER (T11578 · AC3)
|
|
5
|
+
--
|
|
6
|
+
-- The nexus runtime now reads + writes the PREFIXED consolidated `nexus_*`
|
|
7
|
+
-- tables that the consolidated cleo-global migration
|
|
8
|
+
-- (`drizzle-cleo-global/…t11363-consolidation-cleo-global`) creates — it OWNS
|
|
9
|
+
-- the 10 prefixed base tables (single SSoT). The former base-table-creating
|
|
10
|
+
-- migrations in THIS folder (initial / t529 graph / t622 registry-paths /
|
|
11
|
+
-- t998 plasticity / t1077 user_profile / t1148 sigils / t1839 fts5 / t9163
|
|
12
|
+
-- is_external / t11025 aliases) were REMOVED — the consolidated migration
|
|
13
|
+
-- supersedes them. This folder now carries ONLY the FTS5 quartet over
|
|
14
|
+
-- `nexus_nodes` + the plasticity-partition CREATE (the delta drizzle-orm
|
|
15
|
+
-- sqlite-core cannot model / the consolidated migration omits), see the
|
|
16
|
+
-- T11545 forward migration alongside this marker.
|
|
17
|
+
--
|
|
18
|
+
-- On existing DBs the old per-table migration hashes are removed from disk,
|
|
19
|
+
-- so reconcileJournal Scenario 2 (Sub-case B) treats them as true orphans,
|
|
20
|
+
-- deletes the orphaned journal rows, and re-probes the surviving migrations.
|
|
21
|
+
-- The col-drop half of the plasticity partition is handled idempotently in
|
|
22
|
+
-- `nexus-sqlite.ts` (`ensureNexusRelationWeights`) so a destructive ALTER never
|
|
23
|
+
-- sits in the journaled SQL.
|
|
24
|
+
--
|
|
25
|
+
-- Snapshot.json is retained as the drizzle-kit generate anchor; it is ignored
|
|
26
|
+
-- at runtime (`readMigrationFiles` reads only migration.sql bodies).
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
-- T11545 (ADR-090 §5.3) → T11578 (AC3 · COMPLETE-CUTOVER): nexus delta over the
|
|
2
|
+
-- consolidated `nexus_*` tables.
|
|
3
|
+
--
|
|
4
|
+
-- ## History
|
|
5
|
+
--
|
|
6
|
+
-- T11545 partitioned the Hebbian plasticity columns (`weight`,
|
|
7
|
+
-- `last_accessed_at`, `co_accessed_count`) out of `nexus_relations` into the
|
|
8
|
+
-- sibling 1:1 `nexus_relation_weights` table.
|
|
9
|
+
--
|
|
10
|
+
-- ## AC3 cutover (T11578)
|
|
11
|
+
--
|
|
12
|
+
-- The nexus runtime READ + WRITE path now targets the PREFIXED consolidated
|
|
13
|
+
-- tables (`nexus_project_registry`, `nexus_user_profile`, `nexus_sigils`,
|
|
14
|
+
-- `nexus_project_id_aliases`, `nexus_nodes`, `nexus_relations`, …) that the
|
|
15
|
+
-- consolidated cleo-global migration
|
|
16
|
+
-- (`drizzle-cleo-global/…t11363-consolidation-cleo-global`) creates. Those 10
|
|
17
|
+
-- prefixed base tables are therefore NO LONGER created here — the consolidated
|
|
18
|
+
-- migration owns them (single SSoT; CHECK constraints + ISO-8601 TEXT timestamp
|
|
19
|
+
-- affinity are injected by T11363). This migration's remaining responsibility is:
|
|
20
|
+
--
|
|
21
|
+
-- 1. the `nexus_relation_weights` sibling table (the consolidated GLOBAL
|
|
22
|
+
-- migration's `nexus_relations` still carries the inline plasticity columns
|
|
23
|
+
-- — the matching column-DROP is applied idempotently in `nexus-sqlite.ts`
|
|
24
|
+
-- `ensureNexusRelationWeights`, never as a non-idempotent journaled ALTER);
|
|
25
|
+
-- 2. the `nexus_symbols_fts` FTS5 virtual table + its three `nexus_nodes` sync
|
|
26
|
+
-- triggers — drizzle-orm sqlite-core cannot model FTS5, so the consolidated
|
|
27
|
+
-- migration omits them;
|
|
28
|
+
-- 3. the legacy `_nexus_meta` health-probe table — pinned as the reconcile
|
|
29
|
+
-- sentinel (a table THIS migration creates, NOT a consolidated-owned one) so
|
|
30
|
+
-- `reconcileJournal` Scenario 2 stays dormant until the nexus set is
|
|
31
|
+
-- journaled (mirrors the conduit `_conduit_meta` sentinel, T11578 · AC4).
|
|
32
|
+
--
|
|
33
|
+
-- Every statement is `IF NOT EXISTS` / `DROP … IF EXISTS` — idempotent across
|
|
34
|
+
-- repeated opens and the orphan re-probe path.
|
|
35
|
+
|
|
36
|
+
-- -------------------------------------------------------------------------
|
|
37
|
+
-- 1. Plasticity weights sibling (1:1 with nexus_relations.id).
|
|
38
|
+
-- -------------------------------------------------------------------------
|
|
39
|
+
CREATE TABLE IF NOT EXISTS `nexus_relation_weights` (
|
|
40
|
+
`relation_id` text PRIMARY KEY NOT NULL,
|
|
41
|
+
`weight` real DEFAULT 0.0 NOT NULL,
|
|
42
|
+
`last_accessed_at` text,
|
|
43
|
+
`co_accessed_count` integer DEFAULT 0 NOT NULL
|
|
44
|
+
);
|
|
45
|
+
--> statement-breakpoint
|
|
46
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_relation_weights_last_accessed` ON `nexus_relation_weights` (`last_accessed_at`);
|
|
47
|
+
--> statement-breakpoint
|
|
48
|
+
CREATE INDEX IF NOT EXISTS `idx_nexus_relation_weights_weight` ON `nexus_relation_weights` (`weight`);
|
|
49
|
+
--> statement-breakpoint
|
|
50
|
+
|
|
51
|
+
-- -------------------------------------------------------------------------
|
|
52
|
+
-- 2. FTS5 full-text index over nexus_nodes (label + file_path) + triggers.
|
|
53
|
+
-- The consolidated migration cannot model FTS5 virtual tables.
|
|
54
|
+
-- -------------------------------------------------------------------------
|
|
55
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS nexus_symbols_fts USING fts5(
|
|
56
|
+
node_id UNINDEXED,
|
|
57
|
+
label,
|
|
58
|
+
file_path,
|
|
59
|
+
tokenize = 'unicode61 remove_diacritics 1'
|
|
60
|
+
);
|
|
61
|
+
--> statement-breakpoint
|
|
62
|
+
DROP TRIGGER IF EXISTS nexus_nodes_fts_ai;
|
|
63
|
+
--> statement-breakpoint
|
|
64
|
+
CREATE TRIGGER nexus_nodes_fts_ai
|
|
65
|
+
AFTER INSERT ON nexus_nodes
|
|
66
|
+
BEGIN
|
|
67
|
+
INSERT INTO nexus_symbols_fts(rowid, node_id, label, file_path)
|
|
68
|
+
VALUES (new.rowid, new.id, new.label, new.file_path);
|
|
69
|
+
END;
|
|
70
|
+
--> statement-breakpoint
|
|
71
|
+
DROP TRIGGER IF EXISTS nexus_nodes_fts_ad;
|
|
72
|
+
--> statement-breakpoint
|
|
73
|
+
CREATE TRIGGER nexus_nodes_fts_ad
|
|
74
|
+
AFTER DELETE ON nexus_nodes
|
|
75
|
+
BEGIN
|
|
76
|
+
DELETE FROM nexus_symbols_fts WHERE rowid = old.rowid;
|
|
77
|
+
END;
|
|
78
|
+
--> statement-breakpoint
|
|
79
|
+
DROP TRIGGER IF EXISTS nexus_nodes_fts_au;
|
|
80
|
+
--> statement-breakpoint
|
|
81
|
+
CREATE TRIGGER nexus_nodes_fts_au
|
|
82
|
+
AFTER UPDATE ON nexus_nodes
|
|
83
|
+
BEGIN
|
|
84
|
+
DELETE FROM nexus_symbols_fts WHERE rowid = old.rowid;
|
|
85
|
+
INSERT INTO nexus_symbols_fts(rowid, node_id, label, file_path)
|
|
86
|
+
VALUES (new.rowid, new.id, new.label, new.file_path);
|
|
87
|
+
END;
|
|
88
|
+
--> statement-breakpoint
|
|
89
|
+
|
|
90
|
+
-- -------------------------------------------------------------------------
|
|
91
|
+
-- 3. Legacy meta health-probe table + reconcile sentinel (T11578 · AC3).
|
|
92
|
+
-- -------------------------------------------------------------------------
|
|
93
|
+
CREATE TABLE IF NOT EXISTS _nexus_meta (
|
|
94
|
+
key TEXT PRIMARY KEY,
|
|
95
|
+
value TEXT NOT NULL,
|
|
96
|
+
updated_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now'))
|
|
97
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleocode/core",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.6.0",
|
|
4
4
|
"description": "CLEO core business logic kernel — tasks, sessions, memory, orchestration, lifecycle, with bundled SQLite store",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -360,6 +360,36 @@
|
|
|
360
360
|
"types": "./dist/llm/*.d.ts",
|
|
361
361
|
"import": "./dist/llm/*.js",
|
|
362
362
|
"require": "./dist/llm/*.js"
|
|
363
|
+
},
|
|
364
|
+
"./paths": {
|
|
365
|
+
"types": "./dist/paths-export.d.ts",
|
|
366
|
+
"import": "./dist/paths-export.js",
|
|
367
|
+
"require": "./dist/paths-export.js"
|
|
368
|
+
},
|
|
369
|
+
"./lafs": {
|
|
370
|
+
"types": "./dist/lafs-export.d.ts",
|
|
371
|
+
"import": "./dist/lafs-export.js",
|
|
372
|
+
"require": "./dist/lafs-export.js"
|
|
373
|
+
},
|
|
374
|
+
"./skills-lib": {
|
|
375
|
+
"types": "./dist/skills-export.d.ts",
|
|
376
|
+
"import": "./dist/skills-export.js",
|
|
377
|
+
"require": "./dist/skills-export.js"
|
|
378
|
+
},
|
|
379
|
+
"./caamp": {
|
|
380
|
+
"types": "./dist/caamp-export.d.ts",
|
|
381
|
+
"import": "./dist/caamp-export.js",
|
|
382
|
+
"require": "./dist/caamp-export.js"
|
|
383
|
+
},
|
|
384
|
+
"./worktree": {
|
|
385
|
+
"types": "./dist/worktree-export.d.ts",
|
|
386
|
+
"import": "./dist/worktree-export.js",
|
|
387
|
+
"require": "./dist/worktree-export.js"
|
|
388
|
+
},
|
|
389
|
+
"./git-shim": {
|
|
390
|
+
"types": "./dist/git-shim-export.d.ts",
|
|
391
|
+
"import": "./dist/git-shim-export.js",
|
|
392
|
+
"require": "./dist/git-shim-export.js"
|
|
363
393
|
}
|
|
364
394
|
},
|
|
365
395
|
"dependencies": {
|
|
@@ -399,16 +429,17 @@
|
|
|
399
429
|
"write-file-atomic": "^7.0.1",
|
|
400
430
|
"yaml": "^2.8.3",
|
|
401
431
|
"zod": "^4.3.6",
|
|
402
|
-
"@cleocode/adapters": "2026.
|
|
403
|
-
"@cleocode/
|
|
404
|
-
"@cleocode/contracts": "2026.
|
|
405
|
-
"@cleocode/
|
|
406
|
-
"@cleocode/
|
|
407
|
-
"@cleocode/
|
|
408
|
-
"@cleocode/paths": "2026.
|
|
409
|
-
"@cleocode/
|
|
432
|
+
"@cleocode/adapters": "2026.6.0",
|
|
433
|
+
"@cleocode/agents": "2026.6.0",
|
|
434
|
+
"@cleocode/contracts": "2026.6.0",
|
|
435
|
+
"@cleocode/git-shim": "2026.6.0",
|
|
436
|
+
"@cleocode/caamp": "2026.6.0",
|
|
437
|
+
"@cleocode/lafs": "2026.6.0",
|
|
438
|
+
"@cleocode/paths": "2026.6.0",
|
|
439
|
+
"@cleocode/nexus": "2026.6.0",
|
|
440
|
+
"@cleocode/skills": "2026.6.0",
|
|
410
441
|
"@cleocode/utils": "2026.5.122",
|
|
411
|
-
"@cleocode/worktree": "2026.
|
|
442
|
+
"@cleocode/worktree": "2026.6.0"
|
|
412
443
|
},
|
|
413
444
|
"engines": {
|
|
414
445
|
"node": ">=24.16.0"
|
|
@@ -424,6 +455,7 @@
|
|
|
424
455
|
"templates",
|
|
425
456
|
"binaries",
|
|
426
457
|
"scripts/install-supervisor-binary.mjs",
|
|
458
|
+
"scripts/napi-binary-picker.mjs",
|
|
427
459
|
"README.md",
|
|
428
460
|
"STABILITY.md"
|
|
429
461
|
],
|
|
@@ -440,7 +472,7 @@
|
|
|
440
472
|
},
|
|
441
473
|
"optionalDependencies": {
|
|
442
474
|
"llmtxt": "^2026.5.15",
|
|
443
|
-
"@cleocode/studio": "^2026.
|
|
475
|
+
"@cleocode/studio": "^2026.6.0"
|
|
444
476
|
},
|
|
445
477
|
"scripts": {
|
|
446
478
|
"build": "tsc",
|