@cleocode/core 2026.9.20 → 2026.9.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/discovery.d.ts.map +1 -1
- package/dist/adapters/discovery.js +3 -10
- package/dist/adapters/discovery.js.map +1 -1
- package/dist/adrs/link-pipeline.js +2 -2
- package/dist/adrs/link-pipeline.js.map +1 -1
- package/dist/adrs/parse.js +3 -3
- package/dist/adrs/parse.js.map +1 -1
- package/dist/agents/invoke-meta-agent.d.ts.map +1 -1
- package/dist/agents/invoke-meta-agent.js +8 -4
- package/dist/agents/invoke-meta-agent.js.map +1 -1
- package/dist/agents/scaffold.d.ts.map +1 -1
- package/dist/agents/scaffold.js +0 -1
- package/dist/agents/scaffold.js.map +1 -1
- package/dist/bootstrap.d.ts +5 -1
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +45 -21
- package/dist/bootstrap.js.map +1 -1
- package/dist/cloud/crypto.d.ts +47 -0
- package/dist/cloud/crypto.d.ts.map +1 -0
- package/dist/cloud/crypto.js +223 -0
- package/dist/cloud/crypto.js.map +1 -0
- package/dist/cloud/http.d.ts +52 -0
- package/dist/cloud/http.d.ts.map +1 -0
- package/dist/cloud/http.js +98 -0
- package/dist/cloud/http.js.map +1 -0
- package/dist/cloud/index.d.ts +19 -0
- package/dist/cloud/index.d.ts.map +1 -0
- package/dist/cloud/index.js +19 -0
- package/dist/cloud/index.js.map +1 -0
- package/dist/cloud/journal.d.ts +169 -0
- package/dist/cloud/journal.d.ts.map +1 -0
- package/dist/cloud/journal.js +428 -0
- package/dist/cloud/journal.js.map +1 -0
- package/dist/cloud/keys.d.ts +213 -0
- package/dist/cloud/keys.d.ts.map +1 -0
- package/dist/cloud/keys.js +362 -0
- package/dist/cloud/keys.js.map +1 -0
- package/dist/cloud/manifest-check.d.ts +36 -0
- package/dist/cloud/manifest-check.d.ts.map +1 -0
- package/dist/cloud/manifest-check.js +70 -0
- package/dist/cloud/manifest-check.js.map +1 -0
- package/dist/cloud/projects.d.ts +13 -0
- package/dist/cloud/projects.d.ts.map +1 -0
- package/dist/cloud/projects.js +11 -0
- package/dist/cloud/projects.js.map +1 -0
- package/dist/cloud/signing.d.ts +105 -0
- package/dist/cloud/signing.d.ts.map +1 -0
- package/dist/cloud/signing.js +117 -0
- package/dist/cloud/signing.js.map +1 -0
- package/dist/cloud/streams.d.ts +6 -0
- package/dist/cloud/streams.d.ts.map +1 -0
- package/dist/cloud/streams.js +5 -0
- package/dist/cloud/streams.js.map +1 -0
- package/dist/decide/audit.d.ts +131 -0
- package/dist/decide/audit.d.ts.map +1 -0
- package/dist/decide/audit.js +98 -0
- package/dist/decide/audit.js.map +1 -0
- package/dist/decide/budget.d.ts +91 -0
- package/dist/decide/budget.d.ts.map +1 -0
- package/dist/decide/budget.js +194 -0
- package/dist/decide/budget.js.map +1 -0
- package/dist/decide/cache.d.ts +49 -0
- package/dist/decide/cache.d.ts.map +1 -0
- package/dist/decide/cache.js +87 -0
- package/dist/decide/cache.js.map +1 -0
- package/dist/decide/client.d.ts +103 -0
- package/dist/decide/client.d.ts.map +1 -0
- package/dist/decide/client.js +262 -0
- package/dist/decide/client.js.map +1 -0
- package/dist/decide/credentials.d.ts +159 -0
- package/dist/decide/credentials.d.ts.map +1 -0
- package/dist/decide/credentials.js +383 -0
- package/dist/decide/credentials.js.map +1 -0
- package/dist/decide/index.d.ts +18 -0
- package/dist/decide/index.d.ts.map +1 -0
- package/dist/decide/index.js +18 -0
- package/dist/decide/index.js.map +1 -0
- package/dist/decide/jev-wire.d.ts +155 -0
- package/dist/decide/jev-wire.d.ts.map +1 -0
- package/dist/decide/jev-wire.js +420 -0
- package/dist/decide/jev-wire.js.map +1 -0
- package/dist/decide/operations.d.ts +152 -0
- package/dist/decide/operations.d.ts.map +1 -0
- package/dist/decide/operations.js +199 -0
- package/dist/decide/operations.js.map +1 -0
- package/dist/decide/provider.d.ts +90 -0
- package/dist/decide/provider.d.ts.map +1 -0
- package/dist/decide/provider.js +43 -0
- package/dist/decide/provider.js.map +1 -0
- package/dist/decide/site.d.ts +148 -0
- package/dist/decide/site.d.ts.map +1 -0
- package/dist/decide/site.js +181 -0
- package/dist/decide/site.js.map +1 -0
- package/dist/decide/transport.d.ts +67 -0
- package/dist/decide/transport.d.ts.map +1 -0
- package/dist/decide/transport.js +350 -0
- package/dist/decide/transport.js.map +1 -0
- package/dist/dispatch/mutate-projection.d.ts.map +1 -1
- package/dist/dispatch/mutate-projection.js +5 -0
- package/dist/dispatch/mutate-projection.js.map +1 -1
- package/dist/docs/docs-update.d.ts.map +1 -1
- package/dist/docs/docs-update.js +25 -9
- package/dist/docs/docs-update.js.map +1 -1
- package/dist/docs/export-document.js +5963 -2406
- package/dist/docs/export-document.js.map +3 -3
- package/dist/docs/index.d.ts +2 -2
- package/dist/docs/index.d.ts.map +1 -1
- package/dist/docs/index.js +1 -1
- package/dist/docs/index.js.map +1 -1
- package/dist/docs/projection.d.ts.map +1 -1
- package/dist/docs/projection.js +2 -3
- package/dist/docs/projection.js.map +1 -1
- package/dist/docs/publish-pr.d.ts +69 -1
- package/dist/docs/publish-pr.d.ts.map +1 -1
- package/dist/docs/publish-pr.js +112 -10
- package/dist/docs/publish-pr.js.map +1 -1
- package/dist/doctor/db-substrate.d.ts +13 -8
- package/dist/doctor/db-substrate.d.ts.map +1 -1
- package/dist/doctor/db-substrate.js +39 -26
- package/dist/doctor/db-substrate.js.map +1 -1
- package/dist/doctor/index.d.ts +2 -0
- package/dist/doctor/index.d.ts.map +1 -1
- package/dist/doctor/index.js +1 -0
- package/dist/doctor/index.js.map +1 -1
- package/dist/doctor/knowledge.d.ts +16 -1
- package/dist/doctor/knowledge.d.ts.map +1 -1
- package/dist/doctor/knowledge.js +58 -32
- package/dist/doctor/knowledge.js.map +1 -1
- package/dist/doctor/nexus-schema-residency.d.ts +1 -1
- package/dist/doctor/nexus-schema-residency.d.ts.map +1 -1
- package/dist/doctor/nexus-schema-residency.js +3 -0
- package/dist/doctor/nexus-schema-residency.js.map +1 -1
- package/dist/doctor/project-identity.d.ts +44 -1
- package/dist/doctor/project-identity.d.ts.map +1 -1
- package/dist/doctor/project-identity.js +237 -10
- package/dist/doctor/project-identity.js.map +1 -1
- package/dist/doctor/projects.d.ts +170 -0
- package/dist/doctor/projects.d.ts.map +1 -0
- package/dist/doctor/projects.js +1075 -0
- package/dist/doctor/projects.js.map +1 -0
- package/dist/doctor/twin-collapse.d.ts +97 -0
- package/dist/doctor/twin-collapse.d.ts.map +1 -0
- package/dist/doctor/twin-collapse.js +168 -0
- package/dist/doctor/twin-collapse.js.map +1 -0
- package/dist/doctor/worktree-orphans.d.ts.map +1 -1
- package/dist/doctor/worktree-orphans.js +13 -29
- package/dist/doctor/worktree-orphans.js.map +1 -1
- package/dist/doctor/worktree-stores.d.ts +128 -0
- package/dist/doctor/worktree-stores.d.ts.map +1 -0
- package/dist/doctor/worktree-stores.js +374 -0
- package/dist/doctor/worktree-stores.js.map +1 -0
- package/dist/engine/engine-ops.d.ts +36 -6
- package/dist/engine/engine-ops.d.ts.map +1 -1
- package/dist/engine/engine-ops.js +115 -14
- package/dist/engine/engine-ops.js.map +1 -1
- package/dist/error-catalog.d.ts.map +1 -1
- package/dist/error-catalog.js +21 -0
- package/dist/error-catalog.js.map +1 -1
- package/dist/error-registry.d.ts.map +1 -1
- package/dist/error-registry.js +40 -0
- package/dist/error-registry.js.map +1 -1
- package/dist/gateway-client/generated/types.gen.d.ts +1 -1
- package/dist/gc/cleanup.d.ts.map +1 -1
- package/dist/gc/cleanup.js +32 -19
- package/dist/gc/cleanup.js.map +1 -1
- package/dist/git/bounded-git.d.ts +170 -0
- package/dist/git/bounded-git.d.ts.map +1 -0
- package/dist/git/bounded-git.js +371 -0
- package/dist/git/bounded-git.js.map +1 -0
- package/dist/git/work-tree.d.ts +20 -0
- package/dist/git/work-tree.d.ts.map +1 -1
- package/dist/git/work-tree.js +20 -2
- package/dist/git/work-tree.js.map +1 -1
- package/dist/hooks/handlers/session-hooks.d.ts +11 -26
- package/dist/hooks/handlers/session-hooks.d.ts.map +1 -1
- package/dist/hooks/handlers/session-hooks.js +18 -47
- package/dist/hooks/handlers/session-hooks.js.map +1 -1
- package/dist/hooks/payload-schemas.d.ts +2 -2
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/init/engine-ops.d.ts.map +1 -1
- package/dist/init/engine-ops.js +23 -1
- package/dist/init/engine-ops.js.map +1 -1
- package/dist/init.d.ts +158 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +578 -53
- package/dist/init.js.map +1 -1
- package/dist/inject/index.d.ts.map +1 -1
- package/dist/inject/index.js +8 -3
- package/dist/inject/index.js.map +1 -1
- package/dist/injection.d.ts +55 -0
- package/dist/injection.d.ts.map +1 -1
- package/dist/injection.js +102 -6
- package/dist/injection.js.map +1 -1
- package/dist/internal.d.ts +11 -7
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +9 -5
- package/dist/internal.js.map +1 -1
- package/dist/issue/diagnostics.d.ts.map +1 -1
- package/dist/issue/diagnostics.js +2 -1
- package/dist/issue/diagnostics.js.map +1 -1
- package/dist/lib/concurrency.d.ts +25 -0
- package/dist/lib/concurrency.d.ts.map +1 -0
- package/dist/lib/concurrency.js +43 -0
- package/dist/lib/concurrency.js.map +1 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +1 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lifecycle/engine-ops.d.ts.map +1 -1
- package/dist/lifecycle/engine-ops.js +4 -2
- package/dist/lifecycle/engine-ops.js.map +1 -1
- package/dist/lifecycle/stage-guidance.d.ts +5 -0
- package/dist/lifecycle/stage-guidance.d.ts.map +1 -1
- package/dist/lifecycle/stage-guidance.js +14 -4
- package/dist/lifecycle/stage-guidance.js.map +1 -1
- package/dist/llm/catalog-cache.d.ts +3 -2
- package/dist/llm/catalog-cache.d.ts.map +1 -1
- package/dist/llm/catalog-cache.js +5 -5
- package/dist/llm/catalog-cache.js.map +1 -1
- package/dist/llm/credentials.d.ts +4 -4
- package/dist/llm/credentials.js +6 -6
- package/dist/llm/credentials.js.map +1 -1
- package/dist/llm/plugin-facade.js +4400 -1801
- package/dist/llm/plugin-facade.js.map +3 -3
- package/dist/llm/stable-device-id.d.ts.map +1 -1
- package/dist/llm/stable-device-id.js +3 -5
- package/dist/llm/stable-device-id.js.map +1 -1
- package/dist/memory/attention.js +31 -31
- package/dist/memory/attention.js.map +1 -1
- package/dist/memory/decision-contradiction.d.ts +152 -0
- package/dist/memory/decision-contradiction.d.ts.map +1 -0
- package/dist/memory/decision-contradiction.js +273 -0
- package/dist/memory/decision-contradiction.js.map +1 -0
- package/dist/memory/decisions.d.ts +42 -11
- package/dist/memory/decisions.d.ts.map +1 -1
- package/dist/memory/decisions.js +153 -56
- package/dist/memory/decisions.js.map +1 -1
- package/dist/memory/dialectic-evaluator.d.ts +7 -0
- package/dist/memory/dialectic-evaluator.d.ts.map +1 -1
- package/dist/memory/dialectic-evaluator.js +23 -8
- package/dist/memory/dialectic-evaluator.js.map +1 -1
- package/dist/memory/dispatch-trace-format.d.ts +39 -0
- package/dist/memory/dispatch-trace-format.d.ts.map +1 -0
- package/dist/memory/dispatch-trace-format.js +54 -0
- package/dist/memory/dispatch-trace-format.js.map +1 -0
- package/dist/memory/dispatch-trace.d.ts.map +1 -1
- package/dist/memory/dispatch-trace.js +1 -27
- package/dist/memory/dispatch-trace.js.map +1 -1
- package/dist/memory/engine-compat.d.ts +2 -0
- package/dist/memory/engine-compat.d.ts.map +1 -1
- package/dist/memory/engine-compat.js +1 -0
- package/dist/memory/engine-compat.js.map +1 -1
- package/dist/memory/import-from-provider.js +3 -3
- package/dist/memory/import-from-provider.js.map +1 -1
- package/dist/memory/learnings.d.ts +2 -2
- package/dist/memory/observation-type-decision.d.ts +96 -0
- package/dist/memory/observation-type-decision.d.ts.map +1 -0
- package/dist/memory/observation-type-decision.js +218 -0
- package/dist/memory/observation-type-decision.js.map +1 -0
- package/dist/memory/redaction.js +2 -0
- package/dist/memory/redaction.js.map +1 -1
- package/dist/memory/retrieval/build-retrieval-bundle.d.ts +9 -2
- package/dist/memory/retrieval/build-retrieval-bundle.d.ts.map +1 -1
- package/dist/memory/retrieval/build-retrieval-bundle.js +42 -11
- package/dist/memory/retrieval/build-retrieval-bundle.js.map +1 -1
- package/dist/memory/retrieval/get-current-session-id.d.ts +5 -0
- package/dist/memory/retrieval/get-current-session-id.d.ts.map +1 -1
- package/dist/memory/retrieval/get-current-session-id.js +7 -2
- package/dist/memory/retrieval/get-current-session-id.js.map +1 -1
- package/dist/memory/retrieval/observe.d.ts.map +1 -1
- package/dist/memory/retrieval/observe.js +30 -29
- package/dist/memory/retrieval/observe.js.map +1 -1
- package/dist/nexus/analyze-orchestrator.d.ts +38 -0
- package/dist/nexus/analyze-orchestrator.d.ts.map +1 -1
- package/dist/nexus/analyze-orchestrator.js +136 -48
- package/dist/nexus/analyze-orchestrator.js.map +1 -1
- package/dist/nexus/assessment-projection.d.ts +76 -0
- package/dist/nexus/assessment-projection.d.ts.map +1 -0
- package/dist/nexus/assessment-projection.js +143 -0
- package/dist/nexus/assessment-projection.js.map +1 -0
- package/dist/nexus/assessment-store.d.ts +14 -2
- package/dist/nexus/assessment-store.d.ts.map +1 -1
- package/dist/nexus/assessment-store.js +21 -3
- package/dist/nexus/assessment-store.js.map +1 -1
- package/dist/nexus/checkout-nonce.d.ts +48 -0
- package/dist/nexus/checkout-nonce.d.ts.map +1 -0
- package/dist/nexus/checkout-nonce.js +84 -0
- package/dist/nexus/checkout-nonce.js.map +1 -0
- package/dist/nexus/devices.d.ts +93 -0
- package/dist/nexus/devices.d.ts.map +1 -0
- package/dist/nexus/devices.js +141 -0
- package/dist/nexus/devices.js.map +1 -0
- package/dist/nexus/freshness.d.ts.map +1 -1
- package/dist/nexus/freshness.js +25 -6
- package/dist/nexus/freshness.js.map +1 -1
- package/dist/nexus/git-state.d.ts +225 -0
- package/dist/nexus/git-state.d.ts.map +1 -0
- package/dist/nexus/git-state.js +677 -0
- package/dist/nexus/git-state.js.map +1 -0
- package/dist/nexus/graph-manifest.d.ts +20 -4
- package/dist/nexus/graph-manifest.d.ts.map +1 -1
- package/dist/nexus/graph-manifest.js +40 -5
- package/dist/nexus/graph-manifest.js.map +1 -1
- package/dist/nexus/identity.d.ts +68 -23
- package/dist/nexus/identity.d.ts.map +1 -1
- package/dist/nexus/identity.js +99 -22
- package/dist/nexus/identity.js.map +1 -1
- package/dist/nexus/index.d.ts +5 -2
- package/dist/nexus/index.d.ts.map +1 -1
- package/dist/nexus/index.js +10 -4
- package/dist/nexus/index.js.map +1 -1
- package/dist/nexus/knowledge.d.ts +5 -0
- package/dist/nexus/knowledge.d.ts.map +1 -1
- package/dist/nexus/knowledge.js +40 -5
- package/dist/nexus/knowledge.js.map +1 -1
- package/dist/nexus/legacy-alias.d.ts +60 -0
- package/dist/nexus/legacy-alias.d.ts.map +1 -0
- package/dist/nexus/legacy-alias.js +68 -0
- package/dist/nexus/legacy-alias.js.map +1 -0
- package/dist/nexus/migrate-json-to-sqlite.js +2 -2
- package/dist/nexus/migrate-json-to-sqlite.js.map +1 -1
- package/dist/nexus/ops.d.ts +1 -0
- package/dist/nexus/ops.d.ts.map +1 -1
- package/dist/nexus/path-map.d.ts +264 -20
- package/dist/nexus/path-map.d.ts.map +1 -1
- package/dist/nexus/path-map.js +580 -44
- package/dist/nexus/path-map.js.map +1 -1
- package/dist/nexus/projects-clean.d.ts +9 -1
- package/dist/nexus/projects-clean.d.ts.map +1 -1
- package/dist/nexus/projects-clean.js +126 -14
- package/dist/nexus/projects-clean.js.map +1 -1
- package/dist/nexus/projects-scan.d.ts +56 -1
- package/dist/nexus/projects-scan.d.ts.map +1 -1
- package/dist/nexus/projects-scan.js +144 -3
- package/dist/nexus/projects-scan.js.map +1 -1
- package/dist/nexus/registry-hygiene.d.ts +18 -2
- package/dist/nexus/registry-hygiene.d.ts.map +1 -1
- package/dist/nexus/registry-hygiene.js +37 -11
- package/dist/nexus/registry-hygiene.js.map +1 -1
- package/dist/nexus/registry-roots.d.ts +47 -0
- package/dist/nexus/registry-roots.d.ts.map +1 -0
- package/dist/nexus/registry-roots.js +79 -0
- package/dist/nexus/registry-roots.js.map +1 -0
- package/dist/nexus/registry.d.ts +50 -9
- package/dist/nexus/registry.d.ts.map +1 -1
- package/dist/nexus/registry.js +311 -156
- package/dist/nexus/registry.js.map +1 -1
- package/dist/nexus/stored-roots.d.ts +171 -0
- package/dist/nexus/stored-roots.d.ts.map +1 -0
- package/dist/nexus/stored-roots.js +253 -0
- package/dist/nexus/stored-roots.js.map +1 -0
- package/dist/nexus/transfer.d.ts.map +1 -1
- package/dist/nexus/transfer.js +3 -0
- package/dist/nexus/transfer.js.map +1 -1
- package/dist/nexus/user-profile-hygiene.d.ts +168 -0
- package/dist/nexus/user-profile-hygiene.d.ts.map +1 -0
- package/dist/nexus/user-profile-hygiene.js +305 -0
- package/dist/nexus/user-profile-hygiene.js.map +1 -0
- package/dist/nexus/user-profile.d.ts +53 -2
- package/dist/nexus/user-profile.d.ts.map +1 -1
- package/dist/nexus/user-profile.js +106 -4
- package/dist/nexus/user-profile.js.map +1 -1
- package/dist/orchestrate/lifecycle-ops.d.ts.map +1 -1
- package/dist/orchestrate/lifecycle-ops.js +4 -1
- package/dist/orchestrate/lifecycle-ops.js.map +1 -1
- package/dist/orchestrate/pivot.d.ts.map +1 -1
- package/dist/orchestrate/pivot.js +5 -1
- package/dist/orchestrate/pivot.js.map +1 -1
- package/dist/orchestrate/plan.d.ts.map +1 -1
- package/dist/orchestrate/plan.js +5 -2
- package/dist/orchestrate/plan.js.map +1 -1
- package/dist/orchestrate/query-ops.d.ts +7 -2
- package/dist/orchestrate/query-ops.d.ts.map +1 -1
- package/dist/orchestrate/query-ops.js +17 -6
- package/dist/orchestrate/query-ops.js.map +1 -1
- package/dist/orchestrate/spawn-ops.d.ts +12 -0
- package/dist/orchestrate/spawn-ops.d.ts.map +1 -1
- package/dist/orchestrate/spawn-ops.js +157 -71
- package/dist/orchestrate/spawn-ops.js.map +1 -1
- package/dist/orchestration/bootstrap.d.ts.map +1 -1
- package/dist/orchestration/bootstrap.js +4 -2
- package/dist/orchestration/bootstrap.js.map +1 -1
- package/dist/orchestration/classify-readiness.d.ts +37 -1
- package/dist/orchestration/classify-readiness.d.ts.map +1 -1
- package/dist/orchestration/classify-readiness.js +48 -19
- package/dist/orchestration/classify-readiness.js.map +1 -1
- package/dist/orchestration/index.d.ts +4 -2
- package/dist/orchestration/index.d.ts.map +1 -1
- package/dist/orchestration/index.js +6 -4
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/lead-rollup.d.ts +8 -5
- package/dist/orchestration/lead-rollup.d.ts.map +1 -1
- package/dist/orchestration/lead-rollup.js +32 -15
- package/dist/orchestration/lead-rollup.js.map +1 -1
- package/dist/orchestration/owner-decision-readiness.d.ts +88 -0
- package/dist/orchestration/owner-decision-readiness.d.ts.map +1 -0
- package/dist/orchestration/owner-decision-readiness.js +152 -0
- package/dist/orchestration/owner-decision-readiness.js.map +1 -0
- package/dist/orchestration/parallel.d.ts.map +1 -1
- package/dist/orchestration/parallel.js +10 -17
- package/dist/orchestration/parallel.js.map +1 -1
- package/dist/orchestration/psyche-memory-budget.d.ts +105 -0
- package/dist/orchestration/psyche-memory-budget.d.ts.map +1 -0
- package/dist/orchestration/psyche-memory-budget.js +383 -0
- package/dist/orchestration/psyche-memory-budget.js.map +1 -0
- package/dist/orchestration/spawn-prompt.d.ts +16 -2
- package/dist/orchestration/spawn-prompt.d.ts.map +1 -1
- package/dist/orchestration/spawn-prompt.js +144 -181
- package/dist/orchestration/spawn-prompt.js.map +1 -1
- package/dist/orchestration/spawn.d.ts +7 -0
- package/dist/orchestration/spawn.d.ts.map +1 -1
- package/dist/orchestration/spawn.js +1 -0
- package/dist/orchestration/spawn.js.map +1 -1
- package/dist/orchestration/status.d.ts +8 -3
- package/dist/orchestration/status.d.ts.map +1 -1
- package/dist/orchestration/status.js +9 -6
- package/dist/orchestration/status.js.map +1 -1
- package/dist/orchestration/wave-topic.d.ts +54 -0
- package/dist/orchestration/wave-topic.d.ts.map +1 -0
- package/dist/orchestration/wave-topic.js +68 -0
- package/dist/orchestration/wave-topic.js.map +1 -0
- package/dist/orchestration/waves.d.ts +47 -8
- package/dist/orchestration/waves.d.ts.map +1 -1
- package/dist/orchestration/waves.js +152 -43
- package/dist/orchestration/waves.js.map +1 -1
- package/dist/paths.d.ts +24 -8
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +135 -71
- package/dist/paths.js.map +1 -1
- package/dist/phases/index.d.ts.map +1 -1
- package/dist/phases/index.js +6 -2
- package/dist/phases/index.js.map +1 -1
- package/dist/platform.d.ts +6 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +8 -19
- package/dist/platform.js.map +1 -1
- package/dist/project-info.d.ts +18 -0
- package/dist/project-info.d.ts.map +1 -1
- package/dist/project-info.js +29 -1
- package/dist/project-info.js.map +1 -1
- package/dist/project-lifecycle.d.ts +91 -32
- package/dist/project-lifecycle.d.ts.map +1 -1
- package/dist/project-lifecycle.js +639 -75
- package/dist/project-lifecycle.js.map +1 -1
- package/dist/project-scope.d.ts +104 -4
- package/dist/project-scope.d.ts.map +1 -1
- package/dist/project-scope.js +263 -13
- package/dist/project-scope.js.map +1 -1
- package/dist/project-tombstone.d.ts +111 -0
- package/dist/project-tombstone.d.ts.map +1 -0
- package/dist/project-tombstone.js +220 -0
- package/dist/project-tombstone.js.map +1 -0
- package/dist/release/artifacts.d.ts.map +1 -1
- package/dist/release/artifacts.js +14 -9
- package/dist/release/artifacts.js.map +1 -1
- package/dist/release/ci-evidence.d.ts +233 -0
- package/dist/release/ci-evidence.d.ts.map +1 -0
- package/dist/release/ci-evidence.js +668 -0
- package/dist/release/ci-evidence.js.map +1 -0
- package/dist/release/engine-ops.d.ts.map +1 -1
- package/dist/release/engine-ops.js +3 -3
- package/dist/release/engine-ops.js.map +1 -1
- package/dist/release/github-pr.d.ts +30 -0
- package/dist/release/github-pr.d.ts.map +1 -1
- package/dist/release/github-pr.js +40 -0
- package/dist/release/github-pr.js.map +1 -1
- package/dist/release/plan.d.ts.map +1 -1
- package/dist/release/plan.js +11 -7
- package/dist/release/plan.js.map +1 -1
- package/dist/release/pr-evidence.d.ts +38 -0
- package/dist/release/pr-evidence.d.ts.map +1 -1
- package/dist/release/pr-evidence.js +79 -15
- package/dist/release/pr-evidence.js.map +1 -1
- package/dist/release/reconcile.d.ts.map +1 -1
- package/dist/release/reconcile.js +3 -2
- package/dist/release/reconcile.js.map +1 -1
- package/dist/release/release-manifest.d.ts +2 -1
- package/dist/release/release-manifest.d.ts.map +1 -1
- package/dist/release/release-manifest.js +6 -5
- package/dist/release/release-manifest.js.map +1 -1
- package/dist/render/nexus/graph/index.d.ts +4 -0
- package/dist/render/nexus/graph/index.d.ts.map +1 -1
- package/dist/render/nexus/graph/index.js +57 -0
- package/dist/render/nexus/graph/index.js.map +1 -1
- package/dist/resources/spawn-wrapper.d.ts +8 -1
- package/dist/resources/spawn-wrapper.d.ts.map +1 -1
- package/dist/resources/spawn-wrapper.js +42 -5
- package/dist/resources/spawn-wrapper.js.map +1 -1
- package/dist/routing/build-command-groups.d.ts.map +1 -1
- package/dist/routing/build-command-groups.js +1 -0
- package/dist/routing/build-command-groups.js.map +1 -1
- package/dist/sagas/index.d.ts +1 -1
- package/dist/sagas/index.d.ts.map +1 -1
- package/dist/sagas/index.js +1 -1
- package/dist/sagas/index.js.map +1 -1
- package/dist/sagas/reconcile.d.ts +24 -4
- package/dist/sagas/reconcile.d.ts.map +1 -1
- package/dist/sagas/reconcile.js +226 -100
- package/dist/sagas/reconcile.js.map +1 -1
- package/dist/scaffold/ensure-config.d.ts.map +1 -1
- package/dist/scaffold/ensure-config.js +31 -1
- package/dist/scaffold/ensure-config.js.map +1 -1
- package/dist/scaffold/project-identity.d.ts +2 -8
- package/dist/scaffold/project-identity.d.ts.map +1 -1
- package/dist/scaffold/project-identity.js +5 -21
- package/dist/scaffold/project-identity.js.map +1 -1
- package/dist/security/input-sanitization.d.ts +9 -1
- package/dist/security/input-sanitization.d.ts.map +1 -1
- package/dist/security/input-sanitization.js +20 -3
- package/dist/security/input-sanitization.js.map +1 -1
- package/dist/selfimprove/fix-gen.js +4409 -1810
- package/dist/selfimprove/fix-gen.js.map +3 -3
- package/dist/sentient/propose-tick.d.ts.map +1 -1
- package/dist/sentient/propose-tick.js +4 -2
- package/dist/sentient/propose-tick.js.map +1 -1
- package/dist/sequence/index.d.ts.map +1 -1
- package/dist/sequence/index.js +6 -23
- package/dist/sequence/index.js.map +1 -1
- package/dist/session/engine-ops.d.ts +15 -0
- package/dist/session/engine-ops.d.ts.map +1 -1
- package/dist/session/engine-ops.js +146 -22
- package/dist/session/engine-ops.js.map +1 -1
- package/dist/sessions/assumptions.d.ts.map +1 -1
- package/dist/sessions/assumptions.js +7 -4
- package/dist/sessions/assumptions.js.map +1 -1
- package/dist/sessions/briefing.d.ts +23 -0
- package/dist/sessions/briefing.d.ts.map +1 -1
- package/dist/sessions/briefing.js +59 -9
- package/dist/sessions/briefing.js.map +1 -1
- package/dist/sessions/decisions.d.ts +38 -3
- package/dist/sessions/decisions.d.ts.map +1 -1
- package/dist/sessions/decisions.js +235 -21
- package/dist/sessions/decisions.js.map +1 -1
- package/dist/sessions/drift-watchdog.d.ts.map +1 -1
- package/dist/sessions/drift-watchdog.js +8 -5
- package/dist/sessions/drift-watchdog.js.map +1 -1
- package/dist/sessions/focus-state-store.d.ts +89 -1
- package/dist/sessions/focus-state-store.d.ts.map +1 -1
- package/dist/sessions/focus-state-store.js +97 -1
- package/dist/sessions/focus-state-store.js.map +1 -1
- package/dist/sessions/index.d.ts +2 -2
- package/dist/sessions/index.d.ts.map +1 -1
- package/dist/sessions/index.js +34 -5
- package/dist/sessions/index.js.map +1 -1
- package/dist/sessions/session-drift.d.ts.map +1 -1
- package/dist/sessions/session-drift.js +4 -3
- package/dist/sessions/session-drift.js.map +1 -1
- package/dist/sessions/session-end-snapshot-entry.d.ts +26 -0
- package/dist/sessions/session-end-snapshot-entry.d.ts.map +1 -0
- package/dist/sessions/session-end-snapshot-entry.js +59 -0
- package/dist/sessions/session-end-snapshot-entry.js.map +1 -0
- package/dist/sessions/session-end-snapshot.d.ts +114 -0
- package/dist/sessions/session-end-snapshot.d.ts.map +1 -0
- package/dist/sessions/session-end-snapshot.js +446 -0
- package/dist/sessions/session-end-snapshot.js.map +1 -0
- package/dist/sessions/session-manifest-mirror.d.ts.map +1 -1
- package/dist/sessions/session-manifest-mirror.js +10 -17
- package/dist/sessions/session-manifest-mirror.js.map +1 -1
- package/dist/sessions/session-switch.d.ts.map +1 -1
- package/dist/sessions/session-switch.js +5 -3
- package/dist/sessions/session-switch.js.map +1 -1
- package/dist/sessions/snapshot.d.ts.map +1 -1
- package/dist/sessions/snapshot.js +5 -4
- package/dist/sessions/snapshot.js.map +1 -1
- package/dist/sessions/terminal-identity.d.ts +169 -0
- package/dist/sessions/terminal-identity.d.ts.map +1 -0
- package/dist/sessions/terminal-identity.js +273 -0
- package/dist/sessions/terminal-identity.js.map +1 -0
- package/dist/setup/sections/verification.d.ts +1 -1
- package/dist/setup/sections/verification.d.ts.map +1 -1
- package/dist/setup/sections/verification.js +11 -15
- package/dist/setup/sections/verification.js.map +1 -1
- package/dist/skills/discovery.d.ts +20 -3
- package/dist/skills/discovery.d.ts.map +1 -1
- package/dist/skills/discovery.js +41 -4
- package/dist/skills/discovery.js.map +1 -1
- package/dist/skills/dispatch.d.ts +5 -2
- package/dist/skills/dispatch.d.ts.map +1 -1
- package/dist/skills/dispatch.js +5 -2
- package/dist/skills/dispatch.js.map +1 -1
- package/dist/skills/doctor.d.ts.map +1 -1
- package/dist/skills/doctor.js +5 -1
- package/dist/skills/doctor.js.map +1 -1
- package/dist/skills/federated-search.js +2 -2
- package/dist/skills/federated-search.js.map +1 -1
- package/dist/skills/index.d.ts +3 -3
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/migration.d.ts +5 -5
- package/dist/skills/migration.d.ts.map +1 -1
- package/dist/skills/migration.js +7 -9
- package/dist/skills/migration.js.map +1 -1
- package/dist/skills/orchestrator/startup.d.ts.map +1 -1
- package/dist/skills/orchestrator/startup.js +14 -7
- package/dist/skills/orchestrator/startup.js.map +1 -1
- package/dist/skills/prune-bundled.d.ts +267 -0
- package/dist/skills/prune-bundled.d.ts.map +1 -0
- package/dist/skills/prune-bundled.js +536 -0
- package/dist/skills/prune-bundled.js.map +1 -0
- package/dist/skills/skill-paths.d.ts +30 -3
- package/dist/skills/skill-paths.d.ts.map +1 -1
- package/dist/skills/skill-paths.js +28 -9
- package/dist/skills/skill-paths.js.map +1 -1
- package/dist/skills/skill-root.d.ts +60 -11
- package/dist/skills/skill-root.d.ts.map +1 -1
- package/dist/skills/skill-root.js +100 -14
- package/dist/skills/skill-root.js.map +1 -1
- package/dist/skills/skills-guard.js +5 -5
- package/dist/skills/skills-guard.js.map +1 -1
- package/dist/skills/types.d.ts +32 -1
- package/dist/skills/types.d.ts.map +1 -1
- package/dist/skills/types.js +17 -34
- package/dist/skills/types.js.map +1 -1
- package/dist/spawn/agent-identity.d.ts +51 -2
- package/dist/spawn/agent-identity.d.ts.map +1 -1
- package/dist/spawn/agent-identity.js +89 -26
- package/dist/spawn/agent-identity.js.map +1 -1
- package/dist/spawn/branch-lock.d.ts.map +1 -1
- package/dist/spawn/branch-lock.js +80 -79
- package/dist/spawn/branch-lock.js.map +1 -1
- package/dist/spawn/index.d.ts +2 -2
- package/dist/spawn/index.d.ts.map +1 -1
- package/dist/spawn/index.js +1 -1
- package/dist/spawn/index.js.map +1 -1
- package/dist/spawn/worktree-lock-holder.d.ts +37 -0
- package/dist/spawn/worktree-lock-holder.d.ts.map +1 -0
- package/dist/spawn/worktree-lock-holder.js +41 -0
- package/dist/spawn/worktree-lock-holder.js.map +1 -0
- package/dist/stats/index.d.ts.map +1 -1
- package/dist/stats/index.js +4 -2
- package/dist/stats/index.js.map +1 -1
- package/dist/sticky/convert.d.ts.map +1 -1
- package/dist/sticky/convert.js +16 -4
- package/dist/sticky/convert.js.map +1 -1
- package/dist/store/attachment-store.d.ts +14 -0
- package/dist/store/attachment-store.d.ts.map +1 -1
- package/dist/store/attachment-store.js +11 -1
- package/dist/store/attachment-store.js.map +1 -1
- package/dist/store/backup-inspect.d.ts +7 -3
- package/dist/store/backup-inspect.d.ts.map +1 -1
- package/dist/store/backup-inspect.js +18 -7
- package/dist/store/backup-inspect.js.map +1 -1
- package/dist/store/backup-sidecar.d.ts +60 -0
- package/dist/store/backup-sidecar.d.ts.map +1 -0
- package/dist/store/backup-sidecar.js +96 -0
- package/dist/store/backup-sidecar.js.map +1 -0
- package/dist/store/data-accessor.d.ts +1 -1
- package/dist/store/data-accessor.d.ts.map +1 -1
- package/dist/store/data-accessor.js +6 -6
- package/dist/store/data-accessor.js.map +1 -1
- package/dist/store/data-safety-central.d.ts +13 -4
- package/dist/store/data-safety-central.d.ts.map +1 -1
- package/dist/store/data-safety-central.js +31 -4
- package/dist/store/data-safety-central.js.map +1 -1
- package/dist/store/dual-scope-db.d.ts.map +1 -1
- package/dist/store/dual-scope-db.js +10 -0
- package/dist/store/dual-scope-db.js.map +1 -1
- package/dist/store/exodus/__fixtures__/representative-fixture.d.ts.map +1 -1
- package/dist/store/exodus/__fixtures__/representative-fixture.js +4 -0
- package/dist/store/exodus/__fixtures__/representative-fixture.js.map +1 -1
- package/dist/store/exodus/migrate.js +1 -1
- package/dist/store/exodus/migrate.js.map +1 -1
- package/dist/store/exodus/reconcile.js +1 -1
- package/dist/store/exodus/reconcile.js.map +1 -1
- package/dist/store/exodus/runtime-targets.d.ts +4 -3
- package/dist/store/exodus/runtime-targets.d.ts.map +1 -1
- package/dist/store/exodus/runtime-targets.js +4 -3
- package/dist/store/exodus/runtime-targets.js.map +1 -1
- package/dist/store/import-logging.d.ts.map +1 -1
- package/dist/store/import-logging.js +5 -4
- package/dist/store/import-logging.js.map +1 -1
- package/dist/store/legacy-tasks-lineage.d.ts.map +1 -1
- package/dist/store/legacy-tasks-lineage.js +2 -7
- package/dist/store/legacy-tasks-lineage.js.map +1 -1
- package/dist/store/lock.d.ts +1 -0
- package/dist/store/lock.d.ts.map +1 -1
- package/dist/store/lock.js +1 -0
- package/dist/store/lock.js.map +1 -1
- package/dist/store/memory-accessor.d.ts +8 -3
- package/dist/store/memory-accessor.d.ts.map +1 -1
- package/dist/store/memory-accessor.js +29 -13
- package/dist/store/memory-accessor.js.map +1 -1
- package/dist/store/memory-sqlite.d.ts.map +1 -1
- package/dist/store/memory-sqlite.js +5 -0
- package/dist/store/memory-sqlite.js.map +1 -1
- package/dist/store/open-cleo-db.d.ts.map +1 -1
- package/dist/store/open-cleo-db.js +11 -6
- package/dist/store/open-cleo-db.js.map +1 -1
- package/dist/store/portable-bundle-relocate.d.ts +13 -8
- package/dist/store/portable-bundle-relocate.d.ts.map +1 -1
- package/dist/store/portable-bundle-relocate.js +75 -31
- package/dist/store/portable-bundle-relocate.js.map +1 -1
- package/dist/store/portable-bundle-scan.d.ts.map +1 -1
- package/dist/store/portable-bundle-scan.js +2 -1
- package/dist/store/portable-bundle-scan.js.map +1 -1
- package/dist/store/portable-bundle.d.ts.map +1 -1
- package/dist/store/portable-bundle.js +7 -3
- package/dist/store/portable-bundle.js.map +1 -1
- package/dist/store/pre-repair-snapshot.d.ts +77 -0
- package/dist/store/pre-repair-snapshot.d.ts.map +1 -0
- package/dist/store/pre-repair-snapshot.js +122 -0
- package/dist/store/pre-repair-snapshot.js.map +1 -0
- package/dist/store/regenerators.d.ts +2 -1
- package/dist/store/regenerators.d.ts.map +1 -1
- package/dist/store/regenerators.js +17 -3
- package/dist/store/regenerators.js.map +1 -1
- package/dist/store/relocated-store-guard.d.ts +71 -0
- package/dist/store/relocated-store-guard.d.ts.map +1 -0
- package/dist/store/relocated-store-guard.js +138 -0
- package/dist/store/relocated-store-guard.js.map +1 -0
- package/dist/store/safety-data-accessor.d.ts +2 -2
- package/dist/store/safety-data-accessor.d.ts.map +1 -1
- package/dist/store/safety-data-accessor.js +2 -2
- package/dist/store/safety-data-accessor.js.map +1 -1
- package/dist/store/schema/attachments.d.ts +2 -2
- package/dist/store/schema/audit.d.ts +5 -5
- package/dist/store/schema/background-jobs.d.ts +1 -1
- package/dist/store/schema/cleo-global/models-catalog.d.ts +1 -1
- package/dist/store/schema/cleo-global/nexus.d.ts +686 -0
- package/dist/store/schema/cleo-global/nexus.d.ts.map +1 -1
- package/dist/store/schema/cleo-global/nexus.js +175 -7
- package/dist/store/schema/cleo-global/nexus.js.map +1 -1
- package/dist/store/schema/cleo-global/skills.d.ts +2 -2
- package/dist/store/schema/cleo-project/audit.d.ts +5 -5
- package/dist/store/schema/cleo-project/docs.d.ts +3 -3
- package/dist/store/schema/cleo-project/lifecycle.d.ts +3 -3
- package/dist/store/schema/cleo-project/provenance-commits.d.ts +2 -2
- package/dist/store/schema/cleo-project/provenance-rest.d.ts +3 -3
- package/dist/store/schema/cleo-project/tasks-core-batch2.d.ts +1 -1
- package/dist/store/schema/cleo-project/tasks-core.d.ts +6 -6
- package/dist/store/schema/cleo-shared/brain.d.ts +26 -26
- package/dist/store/schema/lifecycle.d.ts +3 -3
- package/dist/store/schema/manifest.d.ts +1 -1
- package/dist/store/schema/memory-schema.d.ts +26 -26
- package/dist/store/schema/nexus-schema.d.ts +696 -2
- package/dist/store/schema/nexus-schema.d.ts.map +1 -1
- package/dist/store/schema/nexus-schema.js +175 -19
- package/dist/store/schema/nexus-schema.js.map +1 -1
- package/dist/store/schema/provenance/releases.d.ts +1 -1
- package/dist/store/schema/skills-schema.d.ts +2 -2
- package/dist/store/schema/tasks.d.ts +5 -5
- package/dist/store/session-binding-schema.d.ts +132 -0
- package/dist/store/session-binding-schema.d.ts.map +1 -0
- package/dist/store/session-binding-schema.js +53 -0
- package/dist/store/session-binding-schema.js.map +1 -0
- package/dist/store/session-store.d.ts +262 -4
- package/dist/store/session-store.d.ts.map +1 -1
- package/dist/store/session-store.js +486 -26
- package/dist/store/session-store.js.map +1 -1
- package/dist/store/skills-db.d.ts +17 -0
- package/dist/store/skills-db.d.ts.map +1 -1
- package/dist/store/skills-db.js +30 -0
- package/dist/store/skills-db.js.map +1 -1
- package/dist/store/snapshot-gate.d.ts +239 -0
- package/dist/store/snapshot-gate.d.ts.map +1 -0
- package/dist/store/snapshot-gate.js +401 -0
- package/dist/store/snapshot-gate.js.map +1 -0
- package/dist/store/split-brain-import.js +2 -2
- package/dist/store/split-brain-import.js.map +1 -1
- package/dist/store/sqlite-backup.d.ts +55 -13
- package/dist/store/sqlite-backup.d.ts.map +1 -1
- package/dist/store/sqlite-backup.js +414 -106
- package/dist/store/sqlite-backup.js.map +1 -1
- package/dist/store/sqlite-data-accessor.d.ts +15 -0
- package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
- package/dist/store/sqlite-data-accessor.js +73 -4
- package/dist/store/sqlite-data-accessor.js.map +1 -1
- package/dist/store/sqlite.d.ts +15 -1
- package/dist/store/sqlite.d.ts.map +1 -1
- package/dist/store/sqlite.js +75 -5
- package/dist/store/sqlite.js.map +1 -1
- package/dist/store/store-write-guard.d.ts +28 -0
- package/dist/store/store-write-guard.d.ts.map +1 -0
- package/dist/store/store-write-guard.js +50 -0
- package/dist/store/store-write-guard.js.map +1 -0
- package/dist/store/table-classification.d.ts +143 -0
- package/dist/store/table-classification.d.ts.map +1 -0
- package/dist/store/table-classification.js +1866 -0
- package/dist/store/table-classification.js.map +1 -0
- package/dist/store/task-version.d.ts +72 -0
- package/dist/store/task-version.d.ts.map +1 -0
- package/dist/store/task-version.js +93 -0
- package/dist/store/task-version.js.map +1 -0
- package/dist/store/tasks-schema.d.ts +1 -0
- package/dist/store/tasks-schema.d.ts.map +1 -1
- package/dist/store/tasks-schema.js +13 -0
- package/dist/store/tasks-schema.js.map +1 -1
- package/dist/store/tasks-sqlite.d.ts +10 -3
- package/dist/store/tasks-sqlite.d.ts.map +1 -1
- package/dist/store/tasks-sqlite.js +12 -3
- package/dist/store/tasks-sqlite.js.map +1 -1
- package/dist/store/twin-collapse.d.ts +320 -0
- package/dist/store/twin-collapse.d.ts.map +1 -0
- package/dist/store/twin-collapse.js +931 -0
- package/dist/store/twin-collapse.js.map +1 -0
- package/dist/store/umbrella-data-accessor.d.ts +2 -2
- package/dist/store/umbrella-data-accessor.d.ts.map +1 -1
- package/dist/store/umbrella-data-accessor.js +2 -2
- package/dist/store/umbrella-data-accessor.js.map +1 -1
- package/dist/store/validation-schemas.d.ts +63 -63
- package/dist/store/worktree-isolation-guard.d.ts +46 -24
- package/dist/store/worktree-isolation-guard.d.ts.map +1 -1
- package/dist/store/worktree-isolation-guard.js +71 -50
- package/dist/store/worktree-isolation-guard.js.map +1 -1
- package/dist/system/backup.d.ts.map +1 -1
- package/dist/system/backup.js +3 -67
- package/dist/system/backup.js.map +1 -1
- package/dist/system/cleo-link.d.ts +163 -0
- package/dist/system/cleo-link.d.ts.map +1 -0
- package/dist/system/cleo-link.js +246 -0
- package/dist/system/cleo-link.js.map +1 -0
- package/dist/system/dependencies.d.ts.map +1 -1
- package/dist/system/dependencies.js +3 -6
- package/dist/system/dependencies.js.map +1 -1
- package/dist/system/global-delivery.d.ts +205 -0
- package/dist/system/global-delivery.d.ts.map +1 -0
- package/dist/system/global-delivery.js +320 -0
- package/dist/system/global-delivery.js.map +1 -0
- package/dist/system/health.d.ts.map +1 -1
- package/dist/system/health.js +29 -6
- package/dist/system/health.js.map +1 -1
- package/dist/system/inject-generate.d.ts.map +1 -1
- package/dist/system/inject-generate.js +4 -4
- package/dist/system/inject-generate.js.map +1 -1
- package/dist/system/project-health.d.ts.map +1 -1
- package/dist/system/project-health.js +1 -20
- package/dist/system/project-health.js.map +1 -1
- package/dist/system/runtime.d.ts.map +1 -1
- package/dist/system/runtime.js +2 -12
- package/dist/system/runtime.js.map +1 -1
- package/dist/system/safestop.d.ts.map +1 -1
- package/dist/system/safestop.js +5 -2
- package/dist/system/safestop.js.map +1 -1
- package/dist/system/skill-fixtures.d.ts +200 -0
- package/dist/system/skill-fixtures.d.ts.map +1 -0
- package/dist/system/skill-fixtures.js +331 -0
- package/dist/system/skill-fixtures.js.map +1 -0
- package/dist/task-work/index.d.ts +6 -0
- package/dist/task-work/index.d.ts.map +1 -1
- package/dist/task-work/index.js +6 -3
- package/dist/task-work/index.js.map +1 -1
- package/dist/tasks/add.d.ts.map +1 -1
- package/dist/tasks/add.js +4 -2
- package/dist/tasks/add.js.map +1 -1
- package/dist/tasks/affected-packages.d.ts +218 -0
- package/dist/tasks/affected-packages.d.ts.map +1 -0
- package/dist/tasks/affected-packages.js +496 -0
- package/dist/tasks/affected-packages.js.map +1 -0
- package/dist/tasks/affected-scope.d.ts +59 -0
- package/dist/tasks/affected-scope.d.ts.map +1 -0
- package/dist/tasks/affected-scope.js +81 -0
- package/dist/tasks/affected-scope.js.map +1 -0
- package/dist/tasks/analyze.d.ts.map +1 -1
- package/dist/tasks/analyze.js +7 -2
- package/dist/tasks/analyze.js.map +1 -1
- package/dist/tasks/change-set.d.ts +175 -0
- package/dist/tasks/change-set.d.ts.map +1 -0
- package/dist/tasks/change-set.js +753 -0
- package/dist/tasks/change-set.js.map +1 -0
- package/dist/tasks/complete.d.ts +10 -0
- package/dist/tasks/complete.d.ts.map +1 -1
- package/dist/tasks/complete.js +59 -5
- package/dist/tasks/complete.js.map +1 -1
- package/dist/tasks/component-pr.d.ts +106 -0
- package/dist/tasks/component-pr.d.ts.map +1 -0
- package/dist/tasks/component-pr.js +190 -0
- package/dist/tasks/component-pr.js.map +1 -0
- package/dist/tasks/done-plan.d.ts +123 -0
- package/dist/tasks/done-plan.d.ts.map +1 -0
- package/dist/tasks/done-plan.js +696 -0
- package/dist/tasks/done-plan.js.map +1 -0
- package/dist/tasks/done-record.d.ts +127 -0
- package/dist/tasks/done-record.d.ts.map +1 -0
- package/dist/tasks/done-record.js +302 -0
- package/dist/tasks/done-record.js.map +1 -0
- package/dist/tasks/duplicate-detector.d.ts +68 -11
- package/dist/tasks/duplicate-detector.d.ts.map +1 -1
- package/dist/tasks/duplicate-detector.js +314 -58
- package/dist/tasks/duplicate-detector.js.map +1 -1
- package/dist/tasks/evidence-paths.d.ts +78 -0
- package/dist/tasks/evidence-paths.d.ts.map +1 -0
- package/dist/tasks/evidence-paths.js +150 -0
- package/dist/tasks/evidence-paths.js.map +1 -0
- package/dist/tasks/evidence.d.ts +101 -1
- package/dist/tasks/evidence.d.ts.map +1 -1
- package/dist/tasks/evidence.js +278 -31
- package/dist/tasks/evidence.js.map +1 -1
- package/dist/tasks/gate-preview.d.ts +5 -0
- package/dist/tasks/gate-preview.d.ts.map +1 -1
- package/dist/tasks/gate-preview.js +25 -21
- package/dist/tasks/gate-preview.js.map +1 -1
- package/dist/tasks/gate-result-cache.d.ts +205 -0
- package/dist/tasks/gate-result-cache.d.ts.map +1 -0
- package/dist/tasks/gate-result-cache.js +285 -0
- package/dist/tasks/gate-result-cache.js.map +1 -0
- package/dist/tasks/gate-runner.d.ts +126 -3
- package/dist/tasks/gate-runner.d.ts.map +1 -1
- package/dist/tasks/gate-runner.js +483 -28
- package/dist/tasks/gate-runner.js.map +1 -1
- package/dist/tasks/session-scope.d.ts +3 -1
- package/dist/tasks/session-scope.d.ts.map +1 -1
- package/dist/tasks/session-scope.js +18 -3
- package/dist/tasks/session-scope.js.map +1 -1
- package/dist/tasks/task-next.d.ts +4 -0
- package/dist/tasks/task-next.d.ts.map +1 -1
- package/dist/tasks/task-next.js +32 -28
- package/dist/tasks/task-next.js.map +1 -1
- package/dist/tasks/tool-resolver.d.ts +23 -6
- package/dist/tasks/tool-resolver.d.ts.map +1 -1
- package/dist/tasks/tool-resolver.js +146 -8
- package/dist/tasks/tool-resolver.js.map +1 -1
- package/dist/tasks/tool-vacuity.d.ts +71 -0
- package/dist/tasks/tool-vacuity.d.ts.map +1 -0
- package/dist/tasks/tool-vacuity.js +334 -0
- package/dist/tasks/tool-vacuity.js.map +1 -0
- package/dist/tasks/update.d.ts +8 -0
- package/dist/tasks/update.d.ts.map +1 -1
- package/dist/tasks/update.js +159 -78
- package/dist/tasks/update.js.map +1 -1
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/upgrade.js +18 -2
- package/dist/upgrade.js.map +1 -1
- package/dist/validation/doctor/checks.d.ts +20 -2
- package/dist/validation/doctor/checks.d.ts.map +1 -1
- package/dist/validation/doctor/checks.js +64 -4
- package/dist/validation/doctor/checks.js.map +1 -1
- package/dist/validation/doctor/index.d.ts +1 -1
- package/dist/validation/doctor/index.d.ts.map +1 -1
- package/dist/validation/doctor/index.js +1 -1
- package/dist/validation/doctor/index.js.map +1 -1
- package/dist/validation/doctor/utils.d.ts.map +1 -1
- package/dist/validation/doctor/utils.js +7 -2
- package/dist/validation/doctor/utils.js.map +1 -1
- package/dist/validation/engine-ops.d.ts +24 -1
- package/dist/validation/engine-ops.d.ts.map +1 -1
- package/dist/validation/engine-ops.js +272 -98
- package/dist/validation/engine-ops.js.map +1 -1
- package/dist/validation/validate-ops.d.ts.map +1 -1
- package/dist/validation/validate-ops.js +9 -3
- package/dist/validation/validate-ops.js.map +1 -1
- package/dist/worktree/worktree-adopt.d.ts.map +1 -1
- package/dist/worktree/worktree-adopt.js +5 -2
- package/dist/worktree/worktree-adopt.js.map +1 -1
- package/migrations/drizzle-cleo-global/20260927000000_t12469-project-locations/migration.sql +121 -0
- package/migrations/drizzle-cleo-global/20260927010000_t12543-user-profile-project-scope/migration.sql +23 -0
- package/migrations/drizzle-cleo-global/20260928010000_t12470-location-candidates/migration.sql +72 -0
- package/migrations/drizzle-cleo-global/20260928020000_t12510-nexus-devices/migration.sql +34 -0
- package/migrations/drizzle-cleo-global/20260928030000_t12511-project-git-state/migration.sql +62 -0
- package/migrations/drizzle-cleo-project/20260927000000_t12499-session-terminal-bindings/migration.sql +34 -0
- package/migrations/drizzle-cleo-project/20260928000000_t12500-binding-provider-flag/migration.sql +15 -0
- package/package.json +23 -13
- package/schemas/config.schema.json +54 -0
- package/schemas/project-context.schema.json +51 -3
- package/schemas/project-info.schema.json +28 -1
- package/templates/CLEO-INJECTION.md +40 -332
- package/templates/CLEO-REFERENCE.md +303 -0
- package/templates/workflows/README.md +36 -14
package/dist/nexus/registry.js
CHANGED
|
@@ -11,12 +11,13 @@
|
|
|
11
11
|
* @epic T4540
|
|
12
12
|
*/
|
|
13
13
|
import { randomUUID } from 'node:crypto';
|
|
14
|
+
import { existsSync } from 'node:fs';
|
|
14
15
|
import { mkdir, readFile, realpath, stat } from 'node:fs/promises';
|
|
15
16
|
import { basename, join, resolve } from 'node:path';
|
|
16
17
|
import { ExitCode, } from '@cleocode/contracts';
|
|
17
18
|
import { pushWarning } from '@cleocode/lafs';
|
|
18
19
|
import { readPortableProjectId } from '@cleocode/paths';
|
|
19
|
-
import { eq,
|
|
20
|
+
import { desc, eq, inArray } from 'drizzle-orm';
|
|
20
21
|
import { z } from 'zod';
|
|
21
22
|
import { engineError, engineSuccess } from '../engine-result.js';
|
|
22
23
|
import { CleoError } from '../errors.js';
|
|
@@ -26,11 +27,14 @@ import { getCleoHome, worktreeScope } from '../paths.js';
|
|
|
26
27
|
import { getTaskAccessor } from '../store/data-accessor.js';
|
|
27
28
|
// Re-export only: resetNexusDbState used by tests and index barrel.
|
|
28
29
|
import { resetNexusDbState } from '../store/nexus-sqlite.js';
|
|
29
|
-
import { nexusAuditLog, projectIdAliases, projectPaths, projectRegistry, } from '../store/schema/nexus-schema.js';
|
|
30
|
+
import { nexusAuditLog, projectGitState, projectIdAliases, projectLocations, projectPaths, projectRegistry, } from '../store/schema/nexus-schema.js';
|
|
31
|
+
import { ensureCheckoutNonce } from './checkout-nonce.js';
|
|
32
|
+
import { listNexusDevices } from './devices.js';
|
|
30
33
|
import { generateProjectHash } from './hash.js';
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
+
import { collectCheckoutEvidence, legacyProjectId, projectPathFingerprint } from './identity.js';
|
|
35
|
+
import { registryAliasClaimants, resolveProjectAlias } from './legacy-alias.js';
|
|
36
|
+
import { isSupersededRegistryPath, recordCandidateLocation, recordProjectCheckout, } from './path-map.js';
|
|
37
|
+
import { registryStorePath } from './registry-hygiene.js';
|
|
34
38
|
// ── Path helpers ─────────────────────────────────────────────────────
|
|
35
39
|
/** Get path to the NEXUS home directory (cache, etc.). */
|
|
36
40
|
export function getNexusHome() {
|
|
@@ -82,9 +86,14 @@ function rowToProject(row) {
|
|
|
82
86
|
lastSync: row.lastSync,
|
|
83
87
|
taskCount: row.taskCount,
|
|
84
88
|
labels,
|
|
85
|
-
//
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
// T12469: derived from the path at runtime; the stored columns are a
|
|
90
|
+
// legacy mirror for older binaries and are never read.
|
|
91
|
+
brainDbPath: isSupersededRegistryPath(row.projectPath)
|
|
92
|
+
? null
|
|
93
|
+
: registryStorePath(row.projectPath),
|
|
94
|
+
tasksDbPath: isSupersededRegistryPath(row.projectPath)
|
|
95
|
+
? null
|
|
96
|
+
: registryStorePath(row.projectPath),
|
|
88
97
|
lastIndexed: row.lastIndexed ?? null,
|
|
89
98
|
stats,
|
|
90
99
|
};
|
|
@@ -236,6 +245,10 @@ async function readProjectId(projectPath) {
|
|
|
236
245
|
const read = readPortableProjectId(projectPath);
|
|
237
246
|
return read.status === 'valid' ? read.projectId : '';
|
|
238
247
|
};
|
|
248
|
+
// T12470: the tracked `.cleo/project-id` outranks project-info.json.
|
|
249
|
+
const trackedId = tracked();
|
|
250
|
+
if (trackedId)
|
|
251
|
+
return trackedId;
|
|
239
252
|
try {
|
|
240
253
|
return (z
|
|
241
254
|
.object({ projectId: z.string().min(1).optional() })
|
|
@@ -247,14 +260,29 @@ async function readProjectId(projectPath) {
|
|
|
247
260
|
throw new CleoError(ExitCode.CONFIG_ERROR, `Cannot read project identity at ${infoPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
248
261
|
}
|
|
249
262
|
}
|
|
250
|
-
/**
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
263
|
+
/**
|
|
264
|
+
* Return the id a project root declares, adopting one first when it declares
|
|
265
|
+
* none (T12470).
|
|
266
|
+
*
|
|
267
|
+
* A path — or any hash of it — is never a project identity. A root with
|
|
268
|
+
* neither `.cleo/project-id` nor a `project-info.json` id gets one the same
|
|
269
|
+
* way `cleo init` does: re-linked from the registry when exactly one
|
|
270
|
+
* registered identity matches, otherwise freshly minted — and recorded
|
|
271
|
+
* write-once in `.cleo/project-id`, so every later resolution returns it.
|
|
272
|
+
*
|
|
273
|
+
* @throws {CleoError} `CONFIG_ERROR` when no identity can be recorded.
|
|
274
|
+
*/
|
|
275
|
+
async function adoptDeclaredProjectId(projectPath) {
|
|
276
|
+
const declaredId = await readProjectId(projectPath);
|
|
277
|
+
if (declaredId)
|
|
278
|
+
return declaredId;
|
|
279
|
+
const { decideProjectIdentity, ensurePortableProjectId } = await import('../scaffold/project-identity.js');
|
|
280
|
+
const decision = await decideProjectIdentity(projectPath, undefined);
|
|
281
|
+
await ensurePortableProjectId(projectPath, decision.projectId);
|
|
282
|
+
const recorded = await readProjectId(projectPath);
|
|
283
|
+
if (recorded)
|
|
284
|
+
return recorded;
|
|
285
|
+
throw new CleoError(ExitCode.CONFIG_ERROR, `Project at ${projectPath} declares no identity and none could be recorded in .cleo/project-id; refusing to derive one from its path`, { fix: `Run \`cleo init\` in ${projectPath} to record the project's identity` });
|
|
258
286
|
}
|
|
259
287
|
/** Record alternate project identity tokens as aliases for registry lookup. */
|
|
260
288
|
async function recordProjectIdAliases(projectId, aliases, createdAt) {
|
|
@@ -264,6 +292,9 @@ async function recordProjectIdAliases(projectId, aliases, createdAt) {
|
|
|
264
292
|
if (!legacyId)
|
|
265
293
|
continue;
|
|
266
294
|
try {
|
|
295
|
+
// T12589: never record a key another project also claims.
|
|
296
|
+
if (registryAliasClaimants(db, legacyId).some((id) => id !== projectId))
|
|
297
|
+
continue;
|
|
267
298
|
await db
|
|
268
299
|
.insert(projectIdAliases)
|
|
269
300
|
.values({ legacyId, canonicalId: projectId, createdAt })
|
|
@@ -308,13 +339,15 @@ export async function nexusRegister(projectRootOrPath, paramsOrName, permissions
|
|
|
308
339
|
if (!(await stat(join(resolvedPath, '.cleo'))).isDirectory()) {
|
|
309
340
|
throw new CleoError(ExitCode.NOT_FOUND, `Path missing .cleo directory: ${resolvedPath}`);
|
|
310
341
|
}
|
|
311
|
-
const declaredId = await
|
|
312
|
-
const
|
|
342
|
+
const declaredId = await adoptDeclaredProjectId(resolvedPath);
|
|
343
|
+
const pathFingerprint = await projectPathFingerprint(resolvedPath);
|
|
344
|
+
const evidence = await collectCheckoutEvidence(resolvedPath);
|
|
313
345
|
await nexusInit();
|
|
314
346
|
const { getNexusDb } = await import('../store/nexus-sqlite.js');
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
347
|
+
// T12469 · T12470: ownership is the DECLARED id alone — never the path or
|
|
348
|
+
// a hash of it. The path fingerprint is recorded below only as an alias.
|
|
349
|
+
const ownerId = declaredId;
|
|
350
|
+
const ownershipFilter = eq(projectRegistry.projectId, ownerId);
|
|
318
351
|
// The accessor may auto-register this path. Never carry an absence observation
|
|
319
352
|
// across this await into the write transaction.
|
|
320
353
|
const meta = await readProjectMeta(resolvedPath);
|
|
@@ -326,8 +359,9 @@ export async function nexusRegister(projectRootOrPath, paramsOrName, permissions
|
|
|
326
359
|
const legacyAlias = legacyProjectId(resolvedPath);
|
|
327
360
|
const skippedAliases = [];
|
|
328
361
|
const projectId = db.transaction((tx) => {
|
|
329
|
-
|
|
330
|
-
const
|
|
362
|
+
// Keyed by the primary key, so at most one row: no owner conflict exists.
|
|
363
|
+
const existing = tx.select().from(projectRegistry).where(ownershipFilter).get();
|
|
364
|
+
const immutableId = ownerId;
|
|
331
365
|
const projectName = name || existing?.name || basename(resolvedPath) || 'unnamed';
|
|
332
366
|
const nameOwner = tx
|
|
333
367
|
.select()
|
|
@@ -344,6 +378,9 @@ export async function nexusRegister(projectRootOrPath, paramsOrName, permissions
|
|
|
344
378
|
taskCount: meta.taskCount,
|
|
345
379
|
labelsJson: JSON.stringify(meta.labels),
|
|
346
380
|
lastSeen: now,
|
|
381
|
+
// The row names the checkout encountered most recently (T12469).
|
|
382
|
+
projectPath: resolvedPath,
|
|
383
|
+
projectHash,
|
|
347
384
|
brainDbPath: registryStorePath(resolvedPath),
|
|
348
385
|
tasksDbPath: registryStorePath(resolvedPath),
|
|
349
386
|
};
|
|
@@ -357,21 +394,21 @@ export async function nexusRegister(projectRootOrPath, paramsOrName, permissions
|
|
|
357
394
|
.values({
|
|
358
395
|
...metadata,
|
|
359
396
|
projectId: immutableId,
|
|
360
|
-
projectHash,
|
|
361
|
-
projectPath: resolvedPath,
|
|
362
397
|
registeredAt: now,
|
|
363
398
|
healthStatus: 'unknown',
|
|
364
399
|
statsJson: '{}',
|
|
365
400
|
})
|
|
366
401
|
.run();
|
|
367
|
-
// T12354: record this checkout
|
|
402
|
+
// T12354 · T12469: record this checkout as a live location.
|
|
368
403
|
recordProjectCheckout(tx, {
|
|
369
404
|
projectId: immutableId,
|
|
370
405
|
projectPath: resolvedPath,
|
|
371
406
|
projectHash,
|
|
372
407
|
now,
|
|
408
|
+
evidence,
|
|
409
|
+
checkoutNonce: ensureCheckoutNonce(resolvedPath),
|
|
373
410
|
});
|
|
374
|
-
for (const alias of new Set([
|
|
411
|
+
for (const alias of new Set([pathFingerprint.id, legacyAlias])) {
|
|
375
412
|
if (alias === immutableId)
|
|
376
413
|
continue;
|
|
377
414
|
const aliasOwner = tx
|
|
@@ -379,6 +416,11 @@ export async function nexusRegister(projectRootOrPath, paramsOrName, permissions
|
|
|
379
416
|
.from(projectIdAliases)
|
|
380
417
|
.where(eq(projectIdAliases.legacyId, alias))
|
|
381
418
|
.get();
|
|
419
|
+
// T12589: a legacy key shared by several projects names none of them;
|
|
420
|
+
// it is not recorded again and is not a conflict worth reporting.
|
|
421
|
+
if (alias === legacyAlias &&
|
|
422
|
+
registryAliasClaimants(tx, alias, aliasOwner?.canonicalId).some((id) => id !== immutableId))
|
|
423
|
+
continue;
|
|
382
424
|
const directOwner = tx
|
|
383
425
|
.select()
|
|
384
426
|
.from(projectRegistry)
|
|
@@ -386,13 +428,12 @@ export async function nexusRegister(projectRootOrPath, paramsOrName, permissions
|
|
|
386
428
|
.get();
|
|
387
429
|
if ((aliasOwner && aliasOwner.canonicalId !== immutableId) ||
|
|
388
430
|
(directOwner && directOwner.projectId !== immutableId)) {
|
|
389
|
-
//
|
|
390
|
-
// the
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
throw new CleoError(ExitCode.NEXUS_PROJECT_EXISTS, `Project identity alias already belongs to another project: ${alias}`);
|
|
431
|
+
// Both aliases are derived from the PATH (base64url path, git-root
|
|
432
|
+
// hash), so another owner means the path changed hands, not an
|
|
433
|
+
// identity conflict (T12469). Preserve its owner and disclose the
|
|
434
|
+
// omitted compatibility alias; never redirect another project.
|
|
435
|
+
skippedAliases.push(alias);
|
|
436
|
+
continue;
|
|
396
437
|
}
|
|
397
438
|
tx.insert(projectIdAliases)
|
|
398
439
|
.values({ legacyId: alias, canonicalId: immutableId, createdAt: now })
|
|
@@ -430,8 +471,13 @@ export async function nexusUnregister(projectRootOrNameOrHash, paramsOrUndefined
|
|
|
430
471
|
const { getNexusDb } = await import('../store/nexus-sqlite.js');
|
|
431
472
|
const { eq } = await import('drizzle-orm');
|
|
432
473
|
const db = await getNexusDb();
|
|
433
|
-
await db.delete(projectRegistry).where(eq(projectRegistry.
|
|
434
|
-
//
|
|
474
|
+
await db.delete(projectRegistry).where(eq(projectRegistry.projectId, project.projectId));
|
|
475
|
+
// T12469: an explicitly unregistered project keeps no locations. (A vanished
|
|
476
|
+
// directory is marked `missing` instead; only this owner action deletes.)
|
|
477
|
+
await db.delete(projectLocations).where(eq(projectLocations.projectId, project.projectId));
|
|
478
|
+
// T12511: its probed git state goes with it.
|
|
479
|
+
await db.delete(projectGitState).where(eq(projectGitState.projectId, project.projectId));
|
|
480
|
+
// Legacy path map, still dual-written for older binaries (T12469).
|
|
435
481
|
await db.delete(projectPaths).where(eq(projectPaths.projectId, project.projectId));
|
|
436
482
|
await writeNexusAudit({
|
|
437
483
|
action: 'unregister',
|
|
@@ -453,38 +499,99 @@ export async function nexusList(_projectRoot = '', _params = {}) {
|
|
|
453
499
|
return [];
|
|
454
500
|
}
|
|
455
501
|
}
|
|
502
|
+
/**
|
|
503
|
+
* A project NAME matched more than one registry row (T12510). Names are not
|
|
504
|
+
* unique — two checkouts or two unrelated projects can share one — so the
|
|
505
|
+
* lookup refuses to pick one and lists every candidate id instead.
|
|
506
|
+
*
|
|
507
|
+
* @example
|
|
508
|
+
* ```ts
|
|
509
|
+
* try { await nexusGetProject('', { name: 'api' }); }
|
|
510
|
+
* catch (e) { if (e instanceof NexusProjectAmbiguityError) console.error(e.candidates); }
|
|
511
|
+
* ```
|
|
512
|
+
*/
|
|
513
|
+
export class NexusProjectAmbiguityError extends CleoError {
|
|
514
|
+
/** Stable machine-readable error code. */
|
|
515
|
+
codeName = 'E_NEXUS_PROJECT_AMBIGUOUS';
|
|
516
|
+
/** Every matching project, most recently seen first. */
|
|
517
|
+
candidates;
|
|
518
|
+
/**
|
|
519
|
+
* @param name - The ambiguous project name, or alias key (T12589).
|
|
520
|
+
* @param rows - Every registry row that matches it.
|
|
521
|
+
* @param field - What `name` is: a project name, or an alias key that more
|
|
522
|
+
* than one project claims.
|
|
523
|
+
*/
|
|
524
|
+
constructor(name, rows, field = 'name') {
|
|
525
|
+
const candidates = rows.map((r) => ({
|
|
526
|
+
projectId: r.projectId,
|
|
527
|
+
name: r.name,
|
|
528
|
+
path: r.projectPath,
|
|
529
|
+
lastSeen: r.lastSeen,
|
|
530
|
+
}));
|
|
531
|
+
super(ExitCode.INVALID_INPUT, `${field === 'name' ? 'Project name' : 'Legacy project alias'} '${name}' is ambiguous: ${candidates.length} projects match (${candidates
|
|
532
|
+
.map((c) => c.projectId)
|
|
533
|
+
.join(', ')}). Use a project id.`, {
|
|
534
|
+
fix: `Pass one of the candidate project ids instead of the ${field}.`,
|
|
535
|
+
details: {
|
|
536
|
+
field,
|
|
537
|
+
expected: 'a unique project name, id or hash',
|
|
538
|
+
actual: name,
|
|
539
|
+
candidates,
|
|
540
|
+
},
|
|
541
|
+
});
|
|
542
|
+
this.name = 'NexusProjectAmbiguityError';
|
|
543
|
+
this.candidates = candidates;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
456
546
|
export async function nexusGetProject(projectRootOrNameOrHash, paramsOrUndefined) {
|
|
457
547
|
const nameOrHash = paramsOrUndefined !== undefined ? paramsOrUndefined.name : projectRootOrNameOrHash;
|
|
458
548
|
try {
|
|
459
|
-
const { eq
|
|
549
|
+
const { eq } = await import('drizzle-orm');
|
|
460
550
|
// ADR-090 · T11648: run on a LIVE handle with retry — the registry lives in
|
|
461
551
|
// the GLOBAL ATTACH of the shared project handle, which a concurrent
|
|
462
552
|
// cross-project open can close mid-query.
|
|
463
553
|
const row = await withLiveNexusDb(async (db) => {
|
|
464
|
-
//
|
|
554
|
+
// T12469: the immutable id is the key, so it wins; a path hash is not
|
|
555
|
+
// unique, so among hash/name matches the most recently seen row wins.
|
|
465
556
|
let rows = await db
|
|
466
557
|
.select()
|
|
467
558
|
.from(projectRegistry)
|
|
468
|
-
.where(
|
|
559
|
+
.where(eq(projectRegistry.projectId, nameOrHash));
|
|
469
560
|
if (rows.length === 0) {
|
|
470
|
-
// Try direct projectId match
|
|
471
561
|
rows = await db
|
|
472
562
|
.select()
|
|
473
563
|
.from(projectRegistry)
|
|
474
|
-
.where(eq(projectRegistry.
|
|
564
|
+
.where(eq(projectRegistry.projectHash, nameOrHash))
|
|
565
|
+
.orderBy(desc(projectRegistry.lastSeen));
|
|
475
566
|
}
|
|
476
567
|
if (rows.length === 0) {
|
|
477
|
-
//
|
|
478
|
-
|
|
568
|
+
// T12510: a name is not unique. One match resolves; several are
|
|
569
|
+
// ambiguous and the caller must choose by id — never rows[0].
|
|
570
|
+
rows = await db
|
|
479
571
|
.select()
|
|
480
|
-
.from(
|
|
481
|
-
.where(eq(
|
|
482
|
-
.
|
|
483
|
-
if (
|
|
572
|
+
.from(projectRegistry)
|
|
573
|
+
.where(eq(projectRegistry.name, nameOrHash))
|
|
574
|
+
.orderBy(desc(projectRegistry.lastSeen));
|
|
575
|
+
if (rows.length > 1)
|
|
576
|
+
throw new NexusProjectAmbiguityError(nameOrHash, rows);
|
|
577
|
+
}
|
|
578
|
+
if (rows.length === 0) {
|
|
579
|
+
// Try alias resolution: legacyId → canonicalId lookup (T11025). An
|
|
580
|
+
// alias several projects claim is refused, never rows[0] (T12589).
|
|
581
|
+
const alias = resolveProjectAlias(db, nameOrHash);
|
|
582
|
+
if (alias.status === 'ambiguous') {
|
|
583
|
+
const claimed = await db
|
|
584
|
+
.select()
|
|
585
|
+
.from(projectRegistry)
|
|
586
|
+
.where(inArray(projectRegistry.projectId, [...alias.claimants]))
|
|
587
|
+
.orderBy(desc(projectRegistry.lastSeen));
|
|
588
|
+
throw new NexusProjectAmbiguityError(nameOrHash, claimed, 'alias');
|
|
589
|
+
}
|
|
590
|
+
if (alias.status === 'resolved') {
|
|
484
591
|
rows = await db
|
|
485
592
|
.select()
|
|
486
593
|
.from(projectRegistry)
|
|
487
|
-
.where(eq(projectRegistry.projectId,
|
|
594
|
+
.where(eq(projectRegistry.projectId, alias.canonicalId));
|
|
488
595
|
}
|
|
489
596
|
}
|
|
490
597
|
return rows[0] ?? null;
|
|
@@ -493,7 +600,9 @@ export async function nexusGetProject(projectRootOrNameOrHash, paramsOrUndefined
|
|
|
493
600
|
return null;
|
|
494
601
|
return rowToProject(row);
|
|
495
602
|
}
|
|
496
|
-
catch {
|
|
603
|
+
catch (error) {
|
|
604
|
+
if (error instanceof NexusProjectAmbiguityError)
|
|
605
|
+
throw error;
|
|
497
606
|
return null;
|
|
498
607
|
}
|
|
499
608
|
}
|
|
@@ -526,7 +635,7 @@ export async function nexusSync(projectRootOrName, paramsOrUndefined) {
|
|
|
526
635
|
lastSync: now,
|
|
527
636
|
lastSeen: now,
|
|
528
637
|
})
|
|
529
|
-
.where(eq(projectRegistry.
|
|
638
|
+
.where(eq(projectRegistry.projectId, project.projectId));
|
|
530
639
|
await writeNexusAudit({
|
|
531
640
|
action: 'sync',
|
|
532
641
|
projectHash: project.hash,
|
|
@@ -565,7 +674,7 @@ export async function nexusSyncAll() {
|
|
|
565
674
|
lastSync: now,
|
|
566
675
|
lastSeen: now,
|
|
567
676
|
})
|
|
568
|
-
.where(eq(projectRegistry.
|
|
677
|
+
.where(eq(projectRegistry.projectId, project.projectId));
|
|
569
678
|
synced++;
|
|
570
679
|
}
|
|
571
680
|
catch {
|
|
@@ -599,27 +708,39 @@ export async function nexusUpdateIndexStats(projectPath, stats) {
|
|
|
599
708
|
const { getNexusDb } = await import('../store/nexus-sqlite.js');
|
|
600
709
|
const { eq } = await import('drizzle-orm');
|
|
601
710
|
const db = await getNexusDb();
|
|
602
|
-
|
|
603
|
-
|
|
711
|
+
// T12469: a path hash is not unique; the most recently seen row for this
|
|
712
|
+
// checkout is the one being indexed, and it is updated by its id.
|
|
713
|
+
const ownerAt = async () => (await db
|
|
714
|
+
.select({ projectId: projectRegistry.projectId })
|
|
604
715
|
.from(projectRegistry)
|
|
605
|
-
.where(eq(projectRegistry.projectHash, projectHash))
|
|
606
|
-
|
|
607
|
-
|
|
716
|
+
.where(eq(projectRegistry.projectHash, projectHash))
|
|
717
|
+
.orderBy(desc(projectRegistry.lastSeen))
|
|
718
|
+
.limit(1))[0];
|
|
719
|
+
let owner = await ownerAt();
|
|
720
|
+
if (!owner) {
|
|
721
|
+
// Not yet registered — record the encounter (best effort). T12470: never
|
|
722
|
+
// `nexusRegister` here: analyze is not an explicit registration, so it
|
|
723
|
+
// must neither mint/write `.cleo/project-id` nor repoint an existing
|
|
724
|
+
// project's row to this path. The encounter records an unconfirmed
|
|
725
|
+
// checkout as a candidate, which owns no row and gets no stats.
|
|
608
726
|
try {
|
|
609
|
-
await
|
|
727
|
+
const { recordProjectEncounter } = await import('../paths.js');
|
|
728
|
+
await recordProjectEncounter(projectPath);
|
|
610
729
|
}
|
|
611
730
|
catch {
|
|
612
|
-
//
|
|
731
|
+
// Cannot record — ignore; stats are best effort.
|
|
613
732
|
}
|
|
733
|
+
owner = await ownerAt();
|
|
614
734
|
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
735
|
+
if (owner)
|
|
736
|
+
await db
|
|
737
|
+
.update(projectRegistry)
|
|
738
|
+
.set({
|
|
739
|
+
lastIndexed: now,
|
|
740
|
+
statsJson: JSON.stringify(stats),
|
|
741
|
+
lastSeen: now,
|
|
742
|
+
})
|
|
743
|
+
.where(eq(projectRegistry.projectId, owner.projectId));
|
|
623
744
|
await writeNexusAudit({
|
|
624
745
|
action: 'update-index-stats',
|
|
625
746
|
projectHash,
|
|
@@ -663,7 +784,7 @@ export async function nexusSetPermission(projectRoot, params) {
|
|
|
663
784
|
await db
|
|
664
785
|
.update(projectRegistry)
|
|
665
786
|
.set({ permissions: permission })
|
|
666
|
-
.where(eq(projectRegistry.
|
|
787
|
+
.where(eq(projectRegistry.projectId, project.projectId));
|
|
667
788
|
await writeNexusAudit({
|
|
668
789
|
action: 'set-permission',
|
|
669
790
|
projectHash: project.hash,
|
|
@@ -676,18 +797,19 @@ export async function nexusSetPermission(projectRoot, params) {
|
|
|
676
797
|
/**
|
|
677
798
|
* Reconcile the current project's identity with the global nexus registry.
|
|
678
799
|
*
|
|
679
|
-
*
|
|
800
|
+
* 3-scenario policy, keyed by the immutable project id alone (ADR-094 · T12469):
|
|
680
801
|
* 1. projectId in registry + path matches → update lastSeen, return {status:'ok'}
|
|
681
802
|
* 2. projectId in registry + path changed → update path+hash, return {status:'path_updated'}
|
|
682
803
|
* 3. projectId not in registry → auto-register, return {status:'auto_registered'}
|
|
683
|
-
* 4. projectHash matches but different projectId → throw CleoError (identity conflict)
|
|
684
804
|
*
|
|
685
|
-
*
|
|
686
|
-
*
|
|
805
|
+
* The former scenario 4 (a row at this path hash under another id → identity
|
|
806
|
+
* conflict) is gone: a path is a location, not an identity. That row is a
|
|
807
|
+
* stale location of another project, recorded as `superseded` in
|
|
808
|
+
* `nexus_project_locations` when this project is recorded.
|
|
687
809
|
*
|
|
688
810
|
* @task T5368
|
|
689
811
|
*/
|
|
690
|
-
export async function nexusReconcile(projectRoot,
|
|
812
|
+
export async function nexusReconcile(projectRoot, params = {}) {
|
|
691
813
|
if (!projectRoot) {
|
|
692
814
|
throw new CleoError(ExitCode.INVALID_INPUT, 'Project root path required');
|
|
693
815
|
}
|
|
@@ -695,114 +817,105 @@ export async function nexusReconcile(projectRoot, _params = {}) {
|
|
|
695
817
|
const { getNexusDb } = await import('../store/nexus-sqlite.js');
|
|
696
818
|
const { eq } = await import('drizzle-orm');
|
|
697
819
|
const db = await getNexusDb();
|
|
820
|
+
// T12470: reconcile never mints or writes an identity — that is `cleo init`
|
|
821
|
+
// / `cleo nexus register` / `cleo doctor project-identity --resolve`.
|
|
698
822
|
const projectId = await readProjectId(projectRoot);
|
|
823
|
+
if (!projectId)
|
|
824
|
+
throw new CleoError(ExitCode.CONFIG_ERROR, `Project at ${projectRoot} declares no identity (.cleo/project-id or project-info.json projectId); refusing to derive one from its path`, { fix: `Run \`cleo init\` in ${projectRoot} to record the project's identity` });
|
|
699
825
|
const currentHash = generateProjectHash(projectRoot);
|
|
700
|
-
const
|
|
701
|
-
const
|
|
702
|
-
//
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
826
|
+
const pathFingerprint = await projectPathFingerprint(projectRoot);
|
|
827
|
+
const evidence = await collectCheckoutEvidence(projectRoot);
|
|
828
|
+
// T12470: the declared id alone; the path fingerprint is an alias only.
|
|
829
|
+
const stableProjectId = projectId;
|
|
830
|
+
// Look up by the immutable id (stable across moves). T12469: the path and
|
|
831
|
+
// its hash are never consulted — a row at this path under another id is a
|
|
832
|
+
// stale location of another project, superseded when this one is recorded.
|
|
833
|
+
const idRows = await db
|
|
834
|
+
.select()
|
|
835
|
+
.from(projectRegistry)
|
|
836
|
+
.where(eq(projectRegistry.projectId, stableProjectId));
|
|
837
|
+
const existing = idRows[0];
|
|
838
|
+
if (existing) {
|
|
839
|
+
const now = new Date().toISOString();
|
|
840
|
+
if (existing.projectPath === projectRoot) {
|
|
841
|
+
// Scenario 1: path matches — just update lastSeen
|
|
842
|
+
await db
|
|
843
|
+
.update(projectRegistry)
|
|
844
|
+
.set({ lastSeen: now })
|
|
845
|
+
.where(eq(projectRegistry.projectId, stableProjectId));
|
|
846
|
+
recordProjectCheckout(db, {
|
|
847
|
+
projectId: stableProjectId,
|
|
848
|
+
projectPath: projectRoot,
|
|
849
|
+
projectHash: currentHash,
|
|
850
|
+
now,
|
|
851
|
+
evidence,
|
|
852
|
+
checkoutNonce: ensureCheckoutNonce(projectRoot),
|
|
853
|
+
});
|
|
710
854
|
await writeNexusAudit({
|
|
711
855
|
action: 'reconcile',
|
|
712
856
|
projectHash: currentHash,
|
|
713
|
-
projectId,
|
|
857
|
+
projectId: stableProjectId,
|
|
714
858
|
operation: 'reconcile',
|
|
715
|
-
success:
|
|
716
|
-
|
|
859
|
+
success: true,
|
|
860
|
+
details: { status: 'ok' },
|
|
717
861
|
});
|
|
718
|
-
|
|
862
|
+
await recordProjectIdAliases(stableProjectId, [stableProjectId, pathFingerprint.id, legacyProjectId(projectRoot)], now);
|
|
863
|
+
return { status: 'ok' };
|
|
719
864
|
}
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
const now = new Date().toISOString();
|
|
730
|
-
if (existing.projectPath === projectRoot) {
|
|
731
|
-
// Scenario 1: path matches — just update lastSeen
|
|
732
|
-
await db
|
|
733
|
-
.update(projectRegistry)
|
|
734
|
-
.set({ lastSeen: now })
|
|
735
|
-
.where(eq(projectRegistry.projectId, projectId));
|
|
736
|
-
recordProjectCheckout(db, {
|
|
737
|
-
projectId,
|
|
738
|
-
projectPath: projectRoot,
|
|
739
|
-
projectHash: currentHash,
|
|
740
|
-
now,
|
|
741
|
-
});
|
|
742
|
-
await writeNexusAudit({
|
|
743
|
-
action: 'reconcile',
|
|
744
|
-
projectHash: currentHash,
|
|
745
|
-
projectId,
|
|
746
|
-
operation: 'reconcile',
|
|
747
|
-
success: true,
|
|
748
|
-
details: { status: 'ok' },
|
|
749
|
-
});
|
|
750
|
-
await recordProjectIdAliases(stableProjectId, [stableProjectId, canonicalIdentity.id, legacyProjectId(projectRoot)], now);
|
|
751
|
-
return { status: 'ok' };
|
|
752
|
-
}
|
|
753
|
-
// Scenario 2: path changed — update path, hash, lastSeen, and DB paths
|
|
754
|
-
const oldPath = existing.projectPath;
|
|
755
|
-
const newBrainDbPath = registryStorePath(projectRoot);
|
|
756
|
-
const newTasksDbPath = registryStorePath(projectRoot);
|
|
757
|
-
await db
|
|
758
|
-
.update(projectRegistry)
|
|
759
|
-
.set({
|
|
760
|
-
projectPath: projectRoot,
|
|
761
|
-
projectHash: currentHash,
|
|
762
|
-
lastSeen: now,
|
|
763
|
-
brainDbPath: newBrainDbPath,
|
|
764
|
-
tasksDbPath: newTasksDbPath,
|
|
765
|
-
})
|
|
766
|
-
.where(eq(projectRegistry.projectId, projectId));
|
|
767
|
-
recordProjectCheckout(db, {
|
|
768
|
-
projectId,
|
|
865
|
+
// Scenario 2: path changed — update path, hash, lastSeen, and DB paths
|
|
866
|
+
const oldPath = existing.projectPath;
|
|
867
|
+
// T12470: even an explicit reconcile never takes the row (and its
|
|
868
|
+
// permissions) away from a location that still exists on this device —
|
|
869
|
+
// that is a second checkout or a clone, not a move. It is recorded as a
|
|
870
|
+
// candidate unless the caller explicitly asks to rebind.
|
|
871
|
+
if (!params.forceRebind && !isSupersededRegistryPath(oldPath) && existsSync(oldPath)) {
|
|
872
|
+
recordCandidateLocation(db, {
|
|
873
|
+
projectId: stableProjectId,
|
|
769
874
|
projectPath: projectRoot,
|
|
770
875
|
projectHash: currentHash,
|
|
771
876
|
now,
|
|
877
|
+
evidence,
|
|
772
878
|
});
|
|
773
879
|
await writeNexusAudit({
|
|
774
880
|
action: 'reconcile',
|
|
775
881
|
projectHash: currentHash,
|
|
776
|
-
projectId,
|
|
882
|
+
projectId: stableProjectId,
|
|
777
883
|
operation: 'reconcile',
|
|
778
884
|
success: true,
|
|
779
|
-
details: { status: '
|
|
885
|
+
details: { status: 'candidate', oldPath, newPath: projectRoot },
|
|
780
886
|
});
|
|
781
|
-
|
|
782
|
-
return { status: 'path_updated', oldPath, newPath: projectRoot };
|
|
887
|
+
return { status: 'candidate', oldPath, newPath: projectRoot };
|
|
783
888
|
}
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
const hashRows = await db
|
|
787
|
-
.select()
|
|
788
|
-
.from(projectRegistry)
|
|
789
|
-
.where(eq(projectRegistry.projectHash, currentHash));
|
|
790
|
-
const hashMatch = hashRows[0];
|
|
791
|
-
if (hashMatch) {
|
|
792
|
-
const now = new Date().toISOString();
|
|
889
|
+
const newBrainDbPath = registryStorePath(projectRoot);
|
|
890
|
+
const newTasksDbPath = registryStorePath(projectRoot);
|
|
793
891
|
await db
|
|
794
892
|
.update(projectRegistry)
|
|
795
|
-
.set({
|
|
796
|
-
|
|
893
|
+
.set({
|
|
894
|
+
projectPath: projectRoot,
|
|
895
|
+
projectHash: currentHash,
|
|
896
|
+
lastSeen: now,
|
|
897
|
+
brainDbPath: newBrainDbPath,
|
|
898
|
+
tasksDbPath: newTasksDbPath,
|
|
899
|
+
})
|
|
900
|
+
.where(eq(projectRegistry.projectId, stableProjectId));
|
|
901
|
+
recordProjectCheckout(db, {
|
|
902
|
+
projectId: stableProjectId,
|
|
903
|
+
projectPath: projectRoot,
|
|
904
|
+
projectHash: currentHash,
|
|
905
|
+
now,
|
|
906
|
+
evidence,
|
|
907
|
+
checkoutNonce: ensureCheckoutNonce(projectRoot),
|
|
908
|
+
});
|
|
797
909
|
await writeNexusAudit({
|
|
798
910
|
action: 'reconcile',
|
|
799
911
|
projectHash: currentHash,
|
|
912
|
+
projectId: stableProjectId,
|
|
800
913
|
operation: 'reconcile',
|
|
801
914
|
success: true,
|
|
802
|
-
details: { status: '
|
|
915
|
+
details: { status: 'path_updated', oldPath, newPath: projectRoot },
|
|
803
916
|
});
|
|
804
|
-
await recordProjectIdAliases(
|
|
805
|
-
return { status: '
|
|
917
|
+
await recordProjectIdAliases(stableProjectId, [stableProjectId, pathFingerprint.id, legacyProjectId(projectRoot)], now);
|
|
918
|
+
return { status: 'path_updated', oldPath, newPath: projectRoot };
|
|
806
919
|
}
|
|
807
920
|
// Scenario 3: not in registry — auto-register
|
|
808
921
|
try {
|
|
@@ -860,6 +973,9 @@ export async function nexusMoveProject(projectId, newPath) {
|
|
|
860
973
|
tasksDbPath: newTasksDbPath,
|
|
861
974
|
})
|
|
862
975
|
.where(eq(projectRegistry.projectId, projectId));
|
|
976
|
+
// Record the location (and re-home any row displaced from the new path)
|
|
977
|
+
// immediately, so two rows never share a path (T12469).
|
|
978
|
+
recordProjectCheckout(db, { projectId, projectPath: resolvedPath, projectHash: newHash, now });
|
|
863
979
|
await writeNexusAudit({
|
|
864
980
|
action: 'move',
|
|
865
981
|
projectHash: newHash,
|
|
@@ -932,6 +1048,22 @@ export { resetNexusDbState };
|
|
|
932
1048
|
* Convert a caught error to an EngineResult failure.
|
|
933
1049
|
*/
|
|
934
1050
|
function caughtToEngineError(error, fallbackMsg) {
|
|
1051
|
+
if (error instanceof NexusProjectAmbiguityError) {
|
|
1052
|
+
return engineError(error.codeName, error.message, {
|
|
1053
|
+
exitCode: error.code,
|
|
1054
|
+
details: error.details,
|
|
1055
|
+
fix: error.fix,
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
// T12558: a refusal at a relocated root keeps its typed code, exit class,
|
|
1059
|
+
// fix and details (`movedTo`) instead of collapsing to E_INTERNAL.
|
|
1060
|
+
if (error instanceof CleoError && error.code === ExitCode.PROJECT_MOVED) {
|
|
1061
|
+
return engineError('E_PROJECT_MOVED', error.message, {
|
|
1062
|
+
exitCode: error.code,
|
|
1063
|
+
details: error.details,
|
|
1064
|
+
fix: error.fix,
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
935
1067
|
const e = error instanceof Error ? error : null;
|
|
936
1068
|
return engineError('E_INTERNAL', e?.message ?? fallbackMsg);
|
|
937
1069
|
}
|
|
@@ -1070,9 +1202,9 @@ export async function nexusSyncProject(name) {
|
|
|
1070
1202
|
* @task T1569
|
|
1071
1203
|
*/
|
|
1072
1204
|
// SSoT-EXEMPT:engine-migration-T1569
|
|
1073
|
-
export async function nexusReconcileProject(projectRoot) {
|
|
1205
|
+
export async function nexusReconcileProject(projectRoot, params = {}) {
|
|
1074
1206
|
try {
|
|
1075
|
-
const result = await nexusReconcile(projectRoot,
|
|
1207
|
+
const result = await nexusReconcile(projectRoot, params);
|
|
1076
1208
|
return engineSuccess(result);
|
|
1077
1209
|
}
|
|
1078
1210
|
catch (error) {
|
|
@@ -1088,12 +1220,35 @@ export async function nexusReconcileProject(projectRoot) {
|
|
|
1088
1220
|
export async function nexusProjectsList() {
|
|
1089
1221
|
try {
|
|
1090
1222
|
const list = await nexusList('', {});
|
|
1091
|
-
|
|
1223
|
+
const { getNexusRegistryDb } = await import('../store/nexus-sqlite.js');
|
|
1224
|
+
const devices = listNexusDevices(await getNexusRegistryDb(getCleoHome()));
|
|
1225
|
+
return engineSuccess({ projects: list, count: list.length, devices });
|
|
1092
1226
|
}
|
|
1093
1227
|
catch (error) {
|
|
1094
1228
|
return caughtToEngineError(error, 'Failed to list nexus projects');
|
|
1095
1229
|
}
|
|
1096
1230
|
}
|
|
1231
|
+
/**
|
|
1232
|
+
* Probe and record the git state of every project location on this device
|
|
1233
|
+
* (`nexus.projects.status`, T12511). Bounded concurrency, a per-location
|
|
1234
|
+
* timeout, no network unless `fetch` — see `nexus/git-state.ts`.
|
|
1235
|
+
*
|
|
1236
|
+
* @param _projectRoot - Unused: the probe covers every location on this device
|
|
1237
|
+
* (uniform ADR-057 signature).
|
|
1238
|
+
* @param params - Fetch, concurrency, timeout and staleness.
|
|
1239
|
+
* @returns Fresh rows for this device plus recorded rows of other devices.
|
|
1240
|
+
* @task T12511
|
|
1241
|
+
*/
|
|
1242
|
+
export async function nexusProjectsStatus(_projectRoot, params) {
|
|
1243
|
+
try {
|
|
1244
|
+
const { getNexusRegistryDb } = await import('../store/nexus-sqlite.js');
|
|
1245
|
+
const { runProjectsGitStatus } = await import('./git-state.js');
|
|
1246
|
+
return engineSuccess(await runProjectsGitStatus(await getNexusRegistryDb(getCleoHome()), params));
|
|
1247
|
+
}
|
|
1248
|
+
catch (error) {
|
|
1249
|
+
return caughtToEngineError(error, 'Failed to probe project git state');
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1097
1252
|
/**
|
|
1098
1253
|
* Register a project in the global nexus registry (Phase 2 dispatch op).
|
|
1099
1254
|
*
|