@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,112 +1,183 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SQLite store for
|
|
2
|
+
* SQLite store for the project-scope CONDUIT domain — agent-to-agent messaging,
|
|
3
|
+
* delivery queue, attachments, A2A topics, and per-project agent refs.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
+
* ## E6-L3 — thin-facade migration (T11523)
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
7
|
+
* `ensureConduitDb()` is now a thin facade that delegates the database open to
|
|
8
|
+
* {@link openDualScopeDb}('project', cwd) — the canonical dual-scope chokepoint
|
|
9
|
+
* introduced by E3/E4 (T11512/T11517) and already adopted by the tasks domain
|
|
10
|
+
* (E6-L1, T11521) and brain domain (E6-L2, T11522). This ensures:
|
|
11
|
+
*
|
|
12
|
+
* - Every conduit-domain open flows through the single pragma SSoT (ADR-068/069).
|
|
13
|
+
* - The conduit tables now live inside the consolidated project `cleo.db` — NOT a
|
|
14
|
+
* separate `conduit.db` file — co-existing with `tasks_*` / `brain_*` / etc.
|
|
15
|
+
* - DB Open Guard Gate 3 (`scripts/lint-no-direct-db-open.mjs`) stays green: the
|
|
16
|
+
* only native open is inside `dual-scope-db.ts`.
|
|
17
|
+
*
|
|
18
|
+
* ## COMPLETE-CUTOVER to prefixed `conduit_*` tables (T11578 · AC4)
|
|
19
|
+
*
|
|
20
|
+
* The conduit runtime READ + WRITE path now targets the PREFIXED consolidated
|
|
21
|
+
* tables (`conduit_conversations`, `conduit_messages`, `conduit_topics`, …) that
|
|
22
|
+
* the consolidated cleo-project migration creates — NOT the legacy BARE tables
|
|
23
|
+
* (`conversations`, `messages`, …). The schema barrel imported below is therefore
|
|
24
|
+
* `schema/cleo-project/conduit.ts` (the prefixed target shape, TEXT ISO-8601
|
|
25
|
+
* timestamps + CHECK constraints), replacing the legacy `schema/conduit-schema.ts`
|
|
26
|
+
* bare shape. The drizzle journal `runConduitMigrations` reconciles now only needs
|
|
27
|
+
* the FTS5 quartet that the consolidated migration omits (drizzle-orm sqlite-core
|
|
28
|
+
* does not model FTS5 virtual tables).
|
|
29
|
+
*
|
|
30
|
+
* ## Inline DDL → forward migration (T11523 → T11578)
|
|
31
|
+
*
|
|
32
|
+
* The legacy 16-table inline `CONDUIT_SCHEMA_SQL` blob was first converted to a
|
|
33
|
+
* forward Drizzle migration under
|
|
34
|
+
* `migrations/drizzle-conduit/20260601000003_t11523-conduit-inline-schema`
|
|
35
|
+
* (T11523, bare runtime shape). The AC4 cutover (T11578) rewrote that migration to
|
|
36
|
+
* carry ONLY the `conduit_messages_fts` FTS5 virtual table + its 3 sync triggers
|
|
37
|
+
* (`conduit_messages_ai/ad/au`) + the two legacy `_conduit_meta` /
|
|
38
|
+
* `_conduit_migrations` health-probe tables. The 14 prefixed `conduit_*` tables
|
|
39
|
+
* are owned by the consolidated cleo-project migration (single SSoT) — this
|
|
40
|
+
* migration no longer creates them.
|
|
41
|
+
*
|
|
42
|
+
* ## Single physical shape (consolidated owns the tables)
|
|
43
|
+
*
|
|
44
|
+
* After AC4 the runtime writes the SAME prefixed `conduit_*` tables the
|
|
45
|
+
* consolidated schema (`cleo-project/conduit.ts`) declares — there is no longer a
|
|
46
|
+
* disjoint bare runtime shape. The exodus migration (T11248 / T11553) still
|
|
47
|
+
* renames any LEGACY bare data (`messages` → `conduit_messages`) from a
|
|
48
|
+
* pre-cutover DB into those same prefixed tables; the FTS index is rebuilt
|
|
49
|
+
* post-migration from `conduit_messages` (exodus skips `*_fts` tables).
|
|
14
50
|
*
|
|
15
51
|
* Architecture (ADR-037):
|
|
16
|
-
* conduit
|
|
52
|
+
* conduit (this module) — project-scoped — messaging, delivery, attachments,
|
|
17
53
|
* project_agent_refs
|
|
18
54
|
* signaldock.db — global-scoped (T346) — agents, capabilities, cloud-sync tables
|
|
19
55
|
*
|
|
20
56
|
* @task T344
|
|
21
57
|
* @task T1407
|
|
58
|
+
* @task T11523 - E6-L3: route ensureConduitDb through openDualScopeDb (SG-DB-SUBSTRATE-V2)
|
|
22
59
|
* @epic T310
|
|
23
|
-
* @
|
|
60
|
+
* @epic T11249
|
|
61
|
+
* @why ADR-037 splits single signaldock.db into project-tier conduit
|
|
24
62
|
* (this module) and global-tier signaldock.db (T346). T1407 unifies
|
|
25
|
-
* conduit
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
63
|
+
* conduit under the canonical Drizzle migration runner; T11523 routes it
|
|
64
|
+
* through the consolidated `cleo.db` dual-scope chokepoint.
|
|
65
|
+
* @what Path helper, database initializer (dual-scope facade), Drizzle migration
|
|
66
|
+
* runner wiring, health check, native DB accessor, and project_agent_refs
|
|
67
|
+
* CRUD accessors.
|
|
29
68
|
*/
|
|
30
69
|
import type { DatabaseSync as _DatabaseSyncType } from 'node:sqlite';
|
|
31
70
|
import type { ProjectAgentRef } from '@cleocode/contracts';
|
|
32
71
|
type DatabaseSync = _DatabaseSyncType;
|
|
33
72
|
declare const DatabaseSync: new (path: import("fs").PathLike, options?: import("node:sqlite").DatabaseSyncOptions | undefined) => DatabaseSync;
|
|
34
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Legacy database file name. Retained as an export for backwards compatibility
|
|
75
|
+
* with callers that still reference the constant; the conduit domain now lives
|
|
76
|
+
* inside the consolidated project `cleo.db` (E6-L3, T11523).
|
|
77
|
+
*
|
|
78
|
+
* @deprecated The conduit domain no longer has a standalone `conduit.db` file —
|
|
79
|
+
* it is served from the project `cleo.db`. Use {@link getConduitDbPath}.
|
|
80
|
+
*/
|
|
35
81
|
export declare const CONDUIT_DB_FILENAME = "conduit.db";
|
|
36
82
|
/**
|
|
37
|
-
* Schema version for conduit.
|
|
83
|
+
* Schema version for the conduit domain.
|
|
38
84
|
*
|
|
39
|
-
* Bumped only when the Drizzle schema changes.
|
|
40
|
-
*
|
|
41
|
-
*
|
|
85
|
+
* Bumped only when the conduit Drizzle schema changes. Pinned at the post-T1252
|
|
86
|
+
* A2A topics value; retained for backwards compatibility with pre-T1407 health
|
|
87
|
+
* checks that read `_conduit_meta.schema_version`.
|
|
42
88
|
*/
|
|
43
89
|
export declare const CONDUIT_SCHEMA_VERSION = "2026.4.23";
|
|
44
90
|
/**
|
|
45
|
-
* Returns the project-
|
|
91
|
+
* Returns the project-scope conduit database path.
|
|
46
92
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* `
|
|
93
|
+
* ## E6-L3 (T11523)
|
|
94
|
+
*
|
|
95
|
+
* After the dual-scope migration, `ensureConduitDb()` opens the consolidated
|
|
96
|
+
* project `cleo.db` via {@link openDualScopeDb} — not the legacy standalone
|
|
97
|
+
* `conduit.db`. This function therefore returns the dual-scope `cleo.db` path so
|
|
98
|
+
* that callers checking for the file `ensureConduitDb()` created (existence /
|
|
99
|
+
* backup / health probes) point at the correct file.
|
|
100
|
+
*
|
|
101
|
+
* The supplied `projectRoot` is passed through as the `cwd` for the SSoT
|
|
102
|
+
* resolver, which walks up to find the `.cleo/` directory.
|
|
50
103
|
*
|
|
51
104
|
* @task T344
|
|
105
|
+
* @task T11523
|
|
52
106
|
* @epic T310
|
|
53
107
|
* @param projectRoot - Absolute path to the project root directory.
|
|
54
|
-
* @returns Absolute path to
|
|
108
|
+
* @returns Absolute path to the project `cleo.db`.
|
|
55
109
|
*/
|
|
56
110
|
export declare function getConduitDbPath(projectRoot: string): string;
|
|
57
111
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* Used as a bootstrap path for fresh conduit.db files BEFORE the Drizzle
|
|
61
|
-
* migration runner takes over. The DDL is `CREATE TABLE IF NOT EXISTS` /
|
|
62
|
-
* `CREATE INDEX IF NOT EXISTS` / `CREATE TRIGGER IF NOT EXISTS` /
|
|
63
|
-
* `CREATE VIRTUAL TABLE IF NOT EXISTS` for full idempotency, so calling this
|
|
64
|
-
* on an already-populated DB is a no-op.
|
|
112
|
+
* Resolve the absolute path to the drizzle-conduit migrations folder inside
|
|
113
|
+
* `@cleocode/core`, using ESM-native module resolution (T1177 pattern).
|
|
65
114
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
115
|
+
* @task T1407
|
|
116
|
+
* @epic T310
|
|
117
|
+
*/
|
|
118
|
+
export declare function resolveConduitMigrationsFolder(): string;
|
|
119
|
+
/**
|
|
120
|
+
* Apply the conduit-domain schema to an arbitrary open `DatabaseSync` handle by
|
|
121
|
+
* running the `drizzle-conduit` migration set against it.
|
|
68
122
|
*
|
|
69
|
-
*
|
|
70
|
-
* virtual tables or AFTER INSERT/DELETE/UPDATE triggers. The
|
|
71
|
-
* `messages_fts` virtual table and its 3 triggers can only live in
|
|
72
|
-
* raw SQL. They MUST be present after init for full-text message
|
|
73
|
-
* search to work.
|
|
123
|
+
* ## E6-L3 (T11523)
|
|
74
124
|
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
125
|
+
* Previously this executed the inline `CONDUIT_SCHEMA_SQL` blob directly. That
|
|
126
|
+
* blob has been moved into the forward migration
|
|
127
|
+
* `20260601000003_t11523-conduit-inline-schema`, so this helper now reconciles
|
|
128
|
+
* the journal and runs the conduit migrations — the same path `ensureConduitDb`
|
|
129
|
+
* uses internally. It remains exported for the signaldock→conduit migration
|
|
130
|
+
* executor (T358) and characterization tests that need to seed the conduit schema
|
|
131
|
+
* onto a caller-owned handle.
|
|
82
132
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* migration. Also called internally by `ensureConduitDb` on every open.
|
|
133
|
+
* Idempotent: every migration statement uses `IF NOT EXISTS`, so applying it onto
|
|
134
|
+
* an already-populated DB is a no-op (the journal reconciler marks it applied).
|
|
86
135
|
*
|
|
87
136
|
* @task T344
|
|
88
137
|
* @task T1407
|
|
138
|
+
* @task T11523
|
|
89
139
|
* @epic T310
|
|
90
140
|
* @param db - An open node:sqlite DatabaseSync instance.
|
|
91
141
|
*/
|
|
92
142
|
export declare function applyConduitSchema(db: DatabaseSync): void;
|
|
93
143
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
144
|
+
* Initialize the project-scope CONDUIT domain SQLite database (lazy, singleton).
|
|
145
|
+
*
|
|
146
|
+
* ## E6-L3 façade (T11523)
|
|
147
|
+
*
|
|
148
|
+
* Delegates the physical DB open to {@link openDualScopeDb}('project', cwd) — the
|
|
149
|
+
* canonical dual-scope chokepoint. openDualScopeDb applies the pragma SSoT,
|
|
150
|
+
* creates the directory, runs the consolidated cleo-project migrations (which
|
|
151
|
+
* create the prefixed `conduit_*` tables), and manages the singleton cache. We
|
|
152
|
+
* extract its native handle (`$client`) and run the `drizzle-conduit` migration on
|
|
153
|
+
* it to (idempotently) create the `conduit_messages_fts` FTS5 quartet that the
|
|
154
|
+
* consolidated migration omits. After the AC4 cutover (T11578) the LocalTransport +
|
|
155
|
+
* accessor writers query the SAME prefixed `conduit_*` tables — the exodus
|
|
156
|
+
* migration (T11248 / T11553) renames any pre-cutover BARE data into them.
|
|
157
|
+
*
|
|
158
|
+
* On subsequent calls the existing singleton is returned immediately if the
|
|
159
|
+
* resolved path matches AND the shared handle is still live (liveness guard);
|
|
160
|
+
* otherwise it re-derives from the live dual-scope cache.
|
|
96
161
|
*
|
|
162
|
+
* Uses a promise guard so concurrent callers wait for the same initialization to
|
|
163
|
+
* complete (the dual-scope open is async).
|
|
164
|
+
*
|
|
165
|
+
* @task T344
|
|
97
166
|
* @task T1407
|
|
167
|
+
* @task T11523
|
|
98
168
|
* @epic T310
|
|
169
|
+
* @param projectRoot - Absolute path to the project root directory.
|
|
170
|
+
* @returns Object with `action` (`'created'` | `'exists'`) and `path`.
|
|
99
171
|
*/
|
|
100
|
-
export declare function
|
|
101
|
-
export declare function ensureConduitDb(projectRoot: string): {
|
|
172
|
+
export declare function ensureConduitDb(projectRoot: string): Promise<{
|
|
102
173
|
action: 'created' | 'exists';
|
|
103
174
|
path: string;
|
|
104
|
-
}
|
|
175
|
+
}>;
|
|
105
176
|
/**
|
|
106
|
-
* Returns the live node:sqlite DatabaseSync handle for conduit.
|
|
177
|
+
* Returns the live node:sqlite DatabaseSync handle for the conduit domain.
|
|
107
178
|
*
|
|
108
|
-
* Returns `null` if `ensureConduitDb` has not been called yet for this
|
|
109
|
-
*
|
|
179
|
+
* Returns `null` if `ensureConduitDb` has not been called yet for this process,
|
|
180
|
+
* or if the shared handle has been closed since the last open.
|
|
110
181
|
*
|
|
111
182
|
* @task T344
|
|
112
183
|
* @epic T310
|
|
@@ -114,20 +185,44 @@ export declare function ensureConduitDb(projectRoot: string): {
|
|
|
114
185
|
*/
|
|
115
186
|
export declare function getConduitNativeDb(): DatabaseSync | null;
|
|
116
187
|
/**
|
|
117
|
-
*
|
|
188
|
+
* Close the conduit-domain database connection and reset the module singleton.
|
|
118
189
|
*
|
|
119
|
-
*
|
|
190
|
+
* ## E6-L3 (T11523)
|
|
191
|
+
*
|
|
192
|
+
* The conduit domain now SHARES the consolidated project `cleo.db` handle with
|
|
193
|
+
* the tasks + brain domains (all open it via {@link openDualScopeDb}, same cache
|
|
194
|
+
* key). This function therefore must NOT close the underlying `DatabaseSync` nor
|
|
195
|
+
* evict the dual-scope cache — doing so would break in-flight tasks/brain-domain
|
|
196
|
+
* queries with "database is not open". It only drops the conduit-domain singleton
|
|
197
|
+
* references; the shared handle's lifecycle is owned by `openDualScopeDb` and torn
|
|
198
|
+
* down by a coordinated reset (`closeAllDatabases` → `_resetDualScopeDbCache`).
|
|
199
|
+
*
|
|
200
|
+
* Safe to call multiple times.
|
|
120
201
|
*
|
|
121
202
|
* @task T344
|
|
203
|
+
* @task T11523
|
|
122
204
|
* @epic T310
|
|
123
205
|
*/
|
|
124
206
|
export declare function closeConduitDb(): void;
|
|
207
|
+
/**
|
|
208
|
+
* Reset conduit-domain singleton state without saving.
|
|
209
|
+
*
|
|
210
|
+
* Used during tests or when the shared database handle is recreated. Drops only
|
|
211
|
+
* the conduit-domain singleton references — does NOT close the shared dual-scope
|
|
212
|
+
* `cleo.db` handle nor evict the dual-scope cache (that handle is shared with the
|
|
213
|
+
* tasks + brain domains). Mirrors {@link closeConduitDb}. Safe to call multiple
|
|
214
|
+
* times.
|
|
215
|
+
*
|
|
216
|
+
* @task T11523
|
|
217
|
+
* @epic T310
|
|
218
|
+
*/
|
|
219
|
+
export declare function resetConduitDbState(): void;
|
|
125
220
|
/**
|
|
126
221
|
* Attaches an agent to the current project. If a row exists with enabled=0,
|
|
127
222
|
* re-enables it (update attached_at timestamp). If a row exists with enabled=1,
|
|
128
223
|
* no-op. Inserts a new row otherwise.
|
|
129
224
|
*
|
|
130
|
-
* @param db - conduit
|
|
225
|
+
* @param db - conduit handle (from ensureConduitDb).
|
|
131
226
|
* @param agentId - Global signaldock.db:agents.id (soft FK, not validated here).
|
|
132
227
|
* @param opts - Optional role and capabilities override.
|
|
133
228
|
* @task T353
|
|
@@ -141,7 +236,7 @@ export declare function attachAgentToProject(db: DatabaseSync, agentId: string,
|
|
|
141
236
|
* Detaches an agent from the current project by setting enabled=0.
|
|
142
237
|
* Does NOT delete the row (preserves attachment history for audit).
|
|
143
238
|
*
|
|
144
|
-
* @param db - conduit
|
|
239
|
+
* @param db - conduit handle (from ensureConduitDb).
|
|
145
240
|
* @param agentId - Agent ID to detach.
|
|
146
241
|
* @task T353
|
|
147
242
|
* @epic T310
|
|
@@ -151,7 +246,7 @@ export declare function detachAgentFromProject(db: DatabaseSync, agentId: string
|
|
|
151
246
|
* Lists project_agent_refs rows. By default returns only enabled=1 rows.
|
|
152
247
|
* Pass enabledOnly=false to return all rows regardless of enabled state.
|
|
153
248
|
*
|
|
154
|
-
* @param db - conduit
|
|
249
|
+
* @param db - conduit handle (from ensureConduitDb).
|
|
155
250
|
* @param opts - Filter options. Defaults to `{ enabledOnly: true }`.
|
|
156
251
|
* @returns Array of ProjectAgentRef rows ordered by attached_at DESC.
|
|
157
252
|
* @task T353
|
|
@@ -163,7 +258,7 @@ export declare function listProjectAgentRefs(db: DatabaseSync, opts?: {
|
|
|
163
258
|
/**
|
|
164
259
|
* Returns a single project_agent_refs row by agentId, or null if not found.
|
|
165
260
|
*
|
|
166
|
-
* @param db - conduit
|
|
261
|
+
* @param db - conduit handle (from ensureConduitDb).
|
|
167
262
|
* @param agentId - Agent ID to look up.
|
|
168
263
|
* @returns The ProjectAgentRef row, or null if the agent is not attached.
|
|
169
264
|
* @task T353
|
|
@@ -174,23 +269,28 @@ export declare function getProjectAgentRef(db: DatabaseSync, agentId: string): P
|
|
|
174
269
|
* Updates the last_used_at timestamp for an agent to now.
|
|
175
270
|
* No-op if the agent_id does not exist in project_agent_refs.
|
|
176
271
|
*
|
|
177
|
-
* @param db - conduit
|
|
272
|
+
* @param db - conduit handle (from ensureConduitDb).
|
|
178
273
|
* @param agentId - Agent ID to update.
|
|
179
274
|
* @task T353
|
|
180
275
|
* @epic T310
|
|
181
276
|
*/
|
|
182
277
|
export declare function updateProjectAgentLastUsed(db: DatabaseSync, agentId: string): void;
|
|
183
278
|
/**
|
|
184
|
-
* Checks conduit
|
|
279
|
+
* Checks conduit-domain health — table count, WAL mode, schema version, and
|
|
185
280
|
* foreign keys status.
|
|
186
281
|
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
282
|
+
* ## E6-L3 (T11523)
|
|
283
|
+
*
|
|
284
|
+
* The conduit domain now lives in the consolidated project `cleo.db`. This probe
|
|
285
|
+
* opens that file (read-only inspection of pragma + sqlite_master state) — it does
|
|
286
|
+
* NOT require `ensureConduitDb` to have been called and opens/closes its own
|
|
287
|
+
* short-lived connection. Used by `cleo doctor` to verify conduit integrity.
|
|
189
288
|
*
|
|
190
289
|
* @task T344
|
|
290
|
+
* @task T11523
|
|
191
291
|
* @epic T310
|
|
192
292
|
* @param projectRoot - Absolute path to the project root directory.
|
|
193
|
-
* @returns Health report object. `exists: false` when
|
|
293
|
+
* @returns Health report object. `exists: false` when the DB is absent.
|
|
194
294
|
*/
|
|
195
295
|
export declare function checkConduitDbHealth(projectRoot: string): {
|
|
196
296
|
exists: boolean;
|
|
@@ -201,17 +301,24 @@ export declare function checkConduitDbHealth(projectRoot: string): {
|
|
|
201
301
|
foreignKeysEnabled: boolean;
|
|
202
302
|
};
|
|
203
303
|
/**
|
|
204
|
-
* Open a fresh (non-singleton) conduit
|
|
304
|
+
* Open a fresh (non-singleton) connection to the conduit-domain DB with pragmas
|
|
305
|
+
* applied.
|
|
306
|
+
*
|
|
307
|
+
* ## E6-L3 (T11523)
|
|
205
308
|
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
309
|
+
* The conduit domain now lives in the consolidated project `cleo.db`. This opens
|
|
310
|
+
* an independent connection to that file (WAL mode permits concurrent
|
|
311
|
+
* connections) that the caller owns and must close. Intended for callers that
|
|
312
|
+
* manage connection lifecycle explicitly (e.g. LocalTransport connect/disconnect
|
|
313
|
+
* cycle). The caller is responsible for ensuring `ensureConduitDb` has run first
|
|
314
|
+
* so the bare conduit tables exist.
|
|
209
315
|
*
|
|
210
316
|
* Applies the pragma SSoT from `specs/sqlite-pragmas.json` (T9047, T9189).
|
|
211
317
|
*
|
|
212
|
-
* @param projectRoot - Project root for resolving conduit
|
|
318
|
+
* @param projectRoot - Project root for resolving the conduit DB path.
|
|
213
319
|
* @returns An open DatabaseSync connection (caller must close).
|
|
214
320
|
* @task T9189
|
|
321
|
+
* @task T11523
|
|
215
322
|
*/
|
|
216
323
|
export declare function openFreshConduitDb(projectRoot: string): DatabaseSync;
|
|
217
324
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conduit-sqlite.d.ts","sourceRoot":"","sources":["../../src/store/conduit-sqlite.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"conduit-sqlite.d.ts","sourceRoot":"","sources":["../../src/store/conduit-sqlite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAQH,OAAO,KAAK,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAkB3D,KAAK,YAAY,GAAG,iBAAiB,CAAC;AACtC,QAAA,MAAQ,YAAY,wGAC8D,YACjF,CAAC;AA6BF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAEhD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,cAAc,CAAC;AAelD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,IAAI,MAAM,CAEvD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAEzD;AA6CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IAAE,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAoEzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,GAAG,IAAI,CAExD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAMrC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAI1C;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,YAAY,EAChB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACpE,IAAI,CAWN;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE9E;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,YAAY,EAChB,IAAI,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,GAC/B,eAAe,EAAE,CAyBnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAyB5F;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAKlF;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG;IACzD,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAmDA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,CAKpE"}
|