@cleocode/core 2026.10.3 → 2026.10.5-rc.ci.672
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/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +7 -37
- package/dist/bootstrap.js.map +1 -1
- package/dist/build-provenance.json +2 -2
- package/dist/caamp/adapter.d.ts.map +1 -1
- package/dist/caamp/adapter.js +5 -2
- package/dist/caamp/adapter.js.map +1 -1
- package/dist/changesets/parse-frontmatter.d.ts +1 -1
- package/dist/changesets/parse-frontmatter.d.ts.map +1 -1
- package/dist/changesets/parse-frontmatter.js +2 -1
- package/dist/changesets/parse-frontmatter.js.map +1 -1
- package/dist/changesets/parser.d.ts +1 -1
- package/dist/changesets/parser.d.ts.map +1 -1
- package/dist/changesets/parser.js +2 -1
- package/dist/changesets/parser.js.map +1 -1
- package/dist/changesets/writer.d.ts +8 -1
- package/dist/changesets/writer.d.ts.map +1 -1
- package/dist/changesets/writer.js +56 -5
- package/dist/changesets/writer.js.map +1 -1
- package/dist/cloud/keys.d.ts +9 -0
- package/dist/cloud/keys.d.ts.map +1 -1
- package/dist/cloud/keys.js +11 -0
- package/dist/cloud/keys.js.map +1 -1
- package/dist/cloud/nexus-attach.d.ts +17 -0
- package/dist/cloud/nexus-attach.d.ts.map +1 -1
- package/dist/cloud/nexus-attach.js +30 -9
- package/dist/cloud/nexus-attach.js.map +1 -1
- package/dist/cloud/nexus-auth.d.ts +7 -1
- package/dist/cloud/nexus-auth.d.ts.map +1 -1
- package/dist/cloud/nexus-auth.js +7 -1
- package/dist/cloud/nexus-auth.js.map +1 -1
- package/dist/cloud/nexus-cloud-activity.d.ts.map +1 -1
- package/dist/cloud/nexus-cloud-activity.js +2 -1
- package/dist/cloud/nexus-cloud-activity.js.map +1 -1
- package/dist/cloud/nexus-cloud-conflicts.d.ts +48 -0
- package/dist/cloud/nexus-cloud-conflicts.d.ts.map +1 -0
- package/dist/cloud/nexus-cloud-conflicts.js +68 -0
- package/dist/cloud/nexus-cloud-conflicts.js.map +1 -0
- package/dist/cloud/nexus-cloud-status.d.ts +42 -6
- package/dist/cloud/nexus-cloud-status.d.ts.map +1 -1
- package/dist/cloud/nexus-cloud-status.js +233 -19
- package/dist/cloud/nexus-cloud-status.js.map +1 -1
- package/dist/cloud/nexus-cloud.d.ts +18 -1
- package/dist/cloud/nexus-cloud.d.ts.map +1 -1
- package/dist/cloud/nexus-cloud.js +56 -2
- package/dist/cloud/nexus-cloud.js.map +1 -1
- package/dist/cloud/nexus-credentials.d.ts +1 -1
- package/dist/cloud/nexus-credentials.d.ts.map +1 -1
- package/dist/cloud/nexus-credentials.js +1 -1
- package/dist/cloud/nexus-credentials.js.map +1 -1
- package/dist/cloud/nexus-enrol.d.ts +10 -1
- package/dist/cloud/nexus-enrol.d.ts.map +1 -1
- package/dist/cloud/nexus-enrol.js +47 -3
- package/dist/cloud/nexus-enrol.js.map +1 -1
- package/dist/cloud/nexus-first-run.d.ts +146 -0
- package/dist/cloud/nexus-first-run.d.ts.map +1 -0
- package/dist/cloud/nexus-first-run.js +358 -0
- package/dist/cloud/nexus-first-run.js.map +1 -0
- package/dist/cloud/nexus-link.d.ts +35 -4
- package/dist/cloud/nexus-link.d.ts.map +1 -1
- package/dist/cloud/nexus-link.js +172 -7
- package/dist/cloud/nexus-link.js.map +1 -1
- package/dist/cloud/nexus-presence-refresh.d.ts +65 -0
- package/dist/cloud/nexus-presence-refresh.d.ts.map +1 -0
- package/dist/cloud/nexus-presence-refresh.js +122 -0
- package/dist/cloud/nexus-presence-refresh.js.map +1 -0
- package/dist/cloud/nexus-project-history.d.ts +54 -0
- package/dist/cloud/nexus-project-history.d.ts.map +1 -0
- package/dist/cloud/nexus-project-history.js +108 -0
- package/dist/cloud/nexus-project-history.js.map +1 -0
- package/dist/cloud/nexus-project-names.d.ts +173 -0
- package/dist/cloud/nexus-project-names.d.ts.map +1 -0
- package/dist/cloud/nexus-project-names.js +314 -0
- package/dist/cloud/nexus-project-names.js.map +1 -0
- package/dist/cloud/nexus-vault-keys.d.ts +33 -2
- package/dist/cloud/nexus-vault-keys.d.ts.map +1 -1
- package/dist/cloud/nexus-vault-keys.js +144 -18
- package/dist/cloud/nexus-vault-keys.js.map +1 -1
- package/dist/cloud/nexus-vault.d.ts +7 -3
- package/dist/cloud/nexus-vault.d.ts.map +1 -1
- package/dist/cloud/nexus-vault.js +176 -29
- package/dist/cloud/nexus-vault.js.map +1 -1
- package/dist/cloud/presence.d.ts +1 -1
- package/dist/cloud/presence.d.ts.map +1 -1
- package/dist/cloud/presence.js +1 -1
- package/dist/cloud/presence.js.map +1 -1
- package/dist/cloud/projects.d.ts +7 -4
- package/dist/cloud/projects.d.ts.map +1 -1
- package/dist/cloud/projects.js +10 -1
- package/dist/cloud/projects.js.map +1 -1
- package/dist/cloud/signing.d.ts +14 -0
- package/dist/cloud/signing.d.ts.map +1 -1
- package/dist/cloud/signing.js +9 -0
- package/dist/cloud/signing.js.map +1 -1
- package/dist/conduit/cloud-endpoint.d.ts +96 -0
- package/dist/conduit/cloud-endpoint.d.ts.map +1 -0
- package/dist/conduit/cloud-endpoint.js +191 -0
- package/dist/conduit/cloud-endpoint.js.map +1 -0
- package/dist/conduit/conduit-client.d.ts.map +1 -1
- package/dist/conduit/conduit-client.js +2 -1
- package/dist/conduit/conduit-client.js.map +1 -1
- package/dist/conduit/factory.d.ts +4 -0
- package/dist/conduit/factory.d.ts.map +1 -1
- package/dist/conduit/factory.js +7 -1
- package/dist/conduit/factory.js.map +1 -1
- package/dist/conduit/http-transport.d.ts +12 -7
- package/dist/conduit/http-transport.d.ts.map +1 -1
- package/dist/conduit/http-transport.js +18 -11
- package/dist/conduit/http-transport.js.map +1 -1
- package/dist/conduit/index.d.ts +3 -1
- package/dist/conduit/index.d.ts.map +1 -1
- package/dist/conduit/index.js +3 -1
- package/dist/conduit/index.js.map +1 -1
- package/dist/conduit/sse-transport.d.ts +5 -1
- package/dist/conduit/sse-transport.d.ts.map +1 -1
- package/dist/conduit/sse-transport.js +10 -2
- package/dist/conduit/sse-transport.js.map +1 -1
- package/dist/config/registry.js +1 -1
- package/dist/config/registry.js.map +1 -1
- package/dist/core-paths.d.ts +13 -0
- package/dist/core-paths.d.ts.map +1 -0
- package/dist/core-paths.js +13 -0
- package/dist/core-paths.js.map +1 -0
- package/dist/decide/bench/source.js +1 -1
- package/dist/decide/bench/source.js.map +1 -1
- package/dist/decide/client.d.ts +1 -1
- package/dist/decide/client.d.ts.map +1 -1
- package/dist/decide/client.js +1 -1
- package/dist/decide/client.js.map +1 -1
- package/dist/decide/credentials.d.ts +1 -1
- package/dist/decide/credentials.d.ts.map +1 -1
- package/dist/decide/credentials.js +1 -1
- package/dist/decide/credentials.js.map +1 -1
- package/dist/decide/jev-wire.d.ts +1 -1
- package/dist/decide/jev-wire.d.ts.map +1 -1
- package/dist/decide/jev-wire.js +1 -1
- package/dist/decide/jev-wire.js.map +1 -1
- package/dist/decide/operations.d.ts +1 -1
- package/dist/decide/operations.d.ts.map +1 -1
- package/dist/decide/operations.js +1 -1
- package/dist/decide/operations.js.map +1 -1
- package/dist/decide/providers.d.ts +1 -1
- package/dist/decide/providers.d.ts.map +1 -1
- package/dist/decide/providers.js +1 -1
- package/dist/decide/providers.js.map +1 -1
- package/dist/decide/wizard.d.ts.map +1 -1
- package/dist/decide/wizard.js +1 -1
- package/dist/decide/wizard.js.map +1 -1
- package/dist/dispatch/config-domain-handler.d.ts +1 -1
- package/dist/dispatch/config-domain-handler.d.ts.map +1 -1
- package/dist/dispatch/config-domain-handler.js +1 -1
- package/dist/dispatch/config-domain-handler.js.map +1 -1
- package/dist/dispatch/contracts/derive-output-contract.d.ts +1 -1
- package/dist/dispatch/contracts/derive-output-contract.d.ts.map +1 -1
- package/dist/dispatch/contracts/derive-output-contract.js +2 -1
- package/dist/dispatch/contracts/derive-output-contract.js.map +1 -1
- package/dist/dispatch/contracts/ensures-schema.d.ts +1 -1
- package/dist/dispatch/contracts/ensures-schema.d.ts.map +1 -1
- package/dist/dispatch/contracts/ensures-schema.js +1 -1
- package/dist/dispatch/contracts/ensures-schema.js.map +1 -1
- package/dist/dispatch/contracts/input-contracts.d.ts +1 -1
- package/dist/dispatch/contracts/input-contracts.d.ts.map +1 -1
- package/dist/dispatch/contracts/input-contracts.js +3 -1
- package/dist/dispatch/contracts/input-contracts.js.map +1 -1
- package/dist/dispatch/contracts/output-contracts.d.ts +2 -1
- package/dist/dispatch/contracts/output-contracts.d.ts.map +1 -1
- package/dist/dispatch/contracts/output-contracts.js +1 -1
- package/dist/dispatch/contracts/output-contracts.js.map +1 -1
- package/dist/dispatch/describe-operation.d.ts +1 -1
- package/dist/dispatch/describe-operation.d.ts.map +1 -1
- package/dist/dispatch/describe-operation.js +1 -1
- package/dist/dispatch/describe-operation.js.map +1 -1
- package/dist/dispatch/mvi-projection.d.ts +1 -1
- package/dist/dispatch/mvi-projection.d.ts.map +1 -1
- package/dist/dispatch/mvi-projection.js +1 -1
- package/dist/dispatch/mvi-projection.js.map +1 -1
- package/dist/docs/display-alias.js +1 -1
- package/dist/docs/display-alias.js.map +1 -1
- package/dist/docs/docs-update.d.ts +1 -1
- package/dist/docs/docs-update.d.ts.map +1 -1
- package/dist/docs/docs-update.js +2 -1
- package/dist/docs/docs-update.js.map +1 -1
- package/dist/docs/export-document.js +14 -58410
- package/dist/docs/export-document.js.map +3 -3
- package/dist/docs/publish-pr.js +1 -1
- package/dist/docs/publish-pr.js.map +1 -1
- package/dist/docs/supersede.js +1 -1
- package/dist/docs/supersede.js.map +1 -1
- package/dist/docs/validate-body.d.ts +1 -1
- package/dist/docs/validate-body.d.ts.map +1 -1
- package/dist/docs/validate-body.js +1 -1
- package/dist/docs/validate-body.js.map +1 -1
- package/dist/docs/writer-registry.js +1 -1
- package/dist/docs/writer-registry.js.map +1 -1
- package/dist/doctor/acceptance-drift.js +1 -1
- package/dist/doctor/acceptance-drift.js.map +1 -1
- package/dist/doctor/db-substrate.d.ts +7 -10
- package/dist/doctor/db-substrate.d.ts.map +1 -1
- package/dist/doctor/db-substrate.js +11 -15
- package/dist/doctor/db-substrate.js.map +1 -1
- package/dist/doctor/invariant-audit.js +1 -1
- package/dist/doctor/invariant-audit.js.map +1 -1
- package/dist/doctor/malformed-task-ids.js +1 -1
- package/dist/doctor/malformed-task-ids.js.map +1 -1
- package/dist/doctor/migrations.d.ts +18 -0
- package/dist/doctor/migrations.d.ts.map +1 -1
- package/dist/doctor/migrations.js +54 -2
- package/dist/doctor/migrations.js.map +1 -1
- package/dist/doctor/row-identity-refill.d.ts +43 -0
- package/dist/doctor/row-identity-refill.d.ts.map +1 -0
- package/dist/doctor/row-identity-refill.js +186 -0
- package/dist/doctor/row-identity-refill.js.map +1 -0
- package/dist/doctor/superseded-store.d.ts.map +1 -1
- package/dist/doctor/superseded-store.js +51 -2
- package/dist/doctor/superseded-store.js.map +1 -1
- package/dist/doctor/sync-repair.d.ts +39 -0
- package/dist/doctor/sync-repair.d.ts.map +1 -0
- package/dist/doctor/sync-repair.js +71 -0
- package/dist/doctor/sync-repair.js.map +1 -0
- package/dist/doctor/sync-triggers.d.ts +63 -4
- package/dist/doctor/sync-triggers.d.ts.map +1 -1
- package/dist/doctor/sync-triggers.js +352 -9
- package/dist/doctor/sync-triggers.js.map +1 -1
- package/dist/doctor/twin-collapse.js +1 -1
- package/dist/doctor/twin-collapse.js.map +1 -1
- package/dist/engine/engine-ops.d.ts.map +1 -1
- package/dist/engine/engine-ops.js +7 -1
- package/dist/engine/engine-ops.js.map +1 -1
- package/dist/engine-result.d.ts +1 -1
- package/dist/engine-result.d.ts.map +1 -1
- package/dist/engine-result.js +1 -1
- package/dist/engine-result.js.map +1 -1
- package/dist/error-catalog.js +1 -1
- package/dist/error-catalog.js.map +1 -1
- package/dist/error-registry.d.ts +1 -1
- package/dist/error-registry.d.ts.map +1 -1
- package/dist/error-registry.js +1 -1
- package/dist/error-registry.js.map +1 -1
- package/dist/errors-to-engine.d.ts +20 -0
- package/dist/errors-to-engine.d.ts.map +1 -1
- package/dist/errors-to-engine.js +37 -0
- package/dist/errors-to-engine.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/gc/janitor.d.ts +23 -4
- package/dist/gc/janitor.d.ts.map +1 -1
- package/dist/gc/janitor.js +71 -11
- package/dist/gc/janitor.js.map +1 -1
- package/dist/goal/continuation.d.ts +1 -1
- package/dist/goal/continuation.d.ts.map +1 -1
- package/dist/goal/continuation.js +1 -1
- package/dist/goal/continuation.js.map +1 -1
- package/dist/goal/judge.d.ts.map +1 -1
- package/dist/goal/judge.js +2 -1
- package/dist/goal/judge.js.map +1 -1
- package/dist/hooks/handlers/session-hooks.d.ts.map +1 -1
- package/dist/hooks/handlers/session-hooks.js +1 -1
- package/dist/hooks/handlers/session-hooks.js.map +1 -1
- package/dist/init/engine-ops.js +1 -1
- package/dist/init/engine-ops.js.map +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +22 -37
- package/dist/init.js.map +1 -1
- package/dist/inject/index.js +1 -1
- package/dist/inject/index.js.map +1 -1
- package/dist/injection.d.ts.map +1 -1
- package/dist/injection.js +13 -0
- package/dist/injection.js.map +1 -1
- package/dist/internal.d.ts +4 -3
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +7 -4
- package/dist/internal.js.map +1 -1
- package/dist/issue/create.js +1 -1
- package/dist/issue/create.js.map +1 -1
- package/dist/json-schema-validator.js +1 -1
- package/dist/json-schema-validator.js.map +1 -1
- package/dist/lifecycle/index.d.ts +2 -23
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/index.js +5 -112
- package/dist/lifecycle/index.js.map +1 -1
- package/dist/lifecycle/kind-requirements.d.ts +1 -1
- package/dist/lifecycle/kind-requirements.d.ts.map +1 -1
- package/dist/lifecycle/kind-requirements.js +1 -1
- package/dist/lifecycle/kind-requirements.js.map +1 -1
- package/dist/lifecycle/pipeline.js +1 -1
- package/dist/lifecycle/pipeline.js.map +1 -1
- package/dist/lifecycle/resume.js +2 -2
- package/dist/lifecycle/resume.js.map +1 -1
- package/dist/lifecycle/state-machine.js +1 -1
- package/dist/lifecycle/state-machine.js.map +1 -1
- package/dist/lifecycle/status.d.ts +46 -0
- package/dist/lifecycle/status.d.ts.map +1 -0
- package/dist/lifecycle/status.js +147 -0
- package/dist/lifecycle/status.js.map +1 -0
- package/dist/lifecycle/verification/satisfies-validator.js +1 -1
- package/dist/lifecycle/verification/satisfies-validator.js.map +1 -1
- package/dist/llm/catalog-seeder.d.ts +1 -1
- package/dist/llm/catalog-seeder.d.ts.map +1 -1
- package/dist/llm/catalog-seeder.js +1 -1
- package/dist/llm/catalog-seeder.js.map +1 -1
- package/dist/llm/cli-ops.d.ts +1 -2
- package/dist/llm/cli-ops.d.ts.map +1 -1
- package/dist/llm/cli-ops.js +2 -1
- package/dist/llm/cli-ops.js.map +1 -1
- package/dist/llm/conversation.d.ts.map +1 -1
- package/dist/llm/conversation.js +15 -4
- package/dist/llm/conversation.js.map +1 -1
- package/dist/llm/credential-seeders/claude-code-seeder.js +1 -1
- package/dist/llm/credential-seeders/claude-code-seeder.js.map +1 -1
- package/dist/llm/credential-seeders/cleo-pkce-seeder.js +1 -1
- package/dist/llm/credential-seeders/cleo-pkce-seeder.js.map +1 -1
- package/dist/llm/credential-writeback.js +1 -1
- package/dist/llm/credential-writeback.js.map +1 -1
- package/dist/llm/entity-ops.d.ts +1 -1
- package/dist/llm/entity-ops.d.ts.map +1 -1
- package/dist/llm/entity-ops.js +2 -1
- package/dist/llm/entity-ops.js.map +1 -1
- package/dist/llm/llm-queue-admit.d.ts +1 -1
- package/dist/llm/llm-queue-admit.d.ts.map +1 -1
- package/dist/llm/llm-queue-admit.js +2 -1
- package/dist/llm/llm-queue-admit.js.map +1 -1
- package/dist/llm/onboarding/login-engine.js +1 -1
- package/dist/llm/onboarding/login-engine.js.map +1 -1
- package/dist/llm/pi/pi-errors.d.ts +1 -1
- package/dist/llm/pi/pi-errors.d.ts.map +1 -1
- package/dist/llm/pi/pi-errors.js +1 -1
- package/dist/llm/pi/pi-errors.js.map +1 -1
- package/dist/llm/plugin-facade.d.ts.map +1 -1
- package/dist/llm/plugin-facade.js +14 -93651
- package/dist/llm/plugin-facade.js.map +3 -3
- package/dist/llm/system-key.d.ts +1 -1
- package/dist/llm/system-key.d.ts.map +1 -1
- package/dist/llm/system-key.js +1 -1
- package/dist/llm/system-key.js.map +1 -1
- package/dist/llm/system-of-use-registry.d.ts +1 -1
- package/dist/llm/system-of-use-registry.d.ts.map +1 -1
- package/dist/llm/system-of-use-registry.js +1 -1
- package/dist/llm/system-of-use-registry.js.map +1 -1
- package/dist/llm/system-resolver.js +1 -1
- package/dist/llm/system-resolver.js.map +1 -1
- package/dist/llm/transports/bedrock.d.ts +1 -0
- package/dist/llm/transports/bedrock.d.ts.map +1 -1
- package/dist/llm/transports/bedrock.js +30 -12
- package/dist/llm/transports/bedrock.js.map +1 -1
- package/dist/memory/brain-host.d.ts +71 -0
- package/dist/memory/brain-host.d.ts.map +1 -0
- package/dist/memory/brain-host.js +84 -0
- package/dist/memory/brain-host.js.map +1 -0
- package/dist/memory/brain-writer-handlers.d.ts.map +1 -1
- package/dist/memory/brain-writer-handlers.js +24 -7
- package/dist/memory/brain-writer-handlers.js.map +1 -1
- package/dist/memory/brain-writer-thread.d.ts +66 -6
- package/dist/memory/brain-writer-thread.d.ts.map +1 -1
- package/dist/memory/brain-writer-thread.js +67 -10
- package/dist/memory/brain-writer-thread.js.map +1 -1
- package/dist/memory/brain-writer-worker.js +7 -0
- package/dist/memory/brain-writer-worker.js.map +1 -1
- package/dist/memory/decision-contradiction.d.ts.map +1 -1
- package/dist/memory/decision-contradiction.js +10 -5
- package/dist/memory/decision-contradiction.js.map +1 -1
- package/dist/memory/decisions.js +2 -1
- package/dist/memory/decisions.js.map +1 -1
- package/dist/memory/dialectic-evaluator.d.ts.map +1 -1
- package/dist/memory/dialectic-evaluator.js +4 -1
- package/dist/memory/dialectic-evaluator.js.map +1 -1
- package/dist/memory/embedding-backfill.d.ts +70 -0
- package/dist/memory/embedding-backfill.d.ts.map +1 -0
- package/dist/memory/embedding-backfill.js +110 -0
- package/dist/memory/embedding-backfill.js.map +1 -0
- package/dist/memory/index.js +1 -1
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/manifest-identity.js +1 -1
- package/dist/memory/manifest-identity.js.map +1 -1
- package/dist/memory/retrieval/observe.d.ts +23 -0
- package/dist/memory/retrieval/observe.d.ts.map +1 -1
- package/dist/memory/retrieval/observe.js +82 -36
- package/dist/memory/retrieval/observe.js.map +1 -1
- package/dist/memory/transcript-extractor.d.ts.map +1 -1
- package/dist/memory/transcript-extractor.js +3 -2
- package/dist/memory/transcript-extractor.js.map +1 -1
- package/dist/metrics/model-provider-registry.d.ts.map +1 -1
- package/dist/metrics/model-provider-registry.js +6 -0
- package/dist/metrics/model-provider-registry.js.map +1 -1
- package/dist/metrics/token-service.d.ts +33 -0
- package/dist/metrics/token-service.d.ts.map +1 -1
- package/dist/metrics/token-service.js +35 -0
- package/dist/metrics/token-service.js.map +1 -1
- package/dist/migration/index.js +1 -1
- package/dist/migration/index.js.map +1 -1
- package/dist/migration/manual/T10165-backfill-adr-index.js +1 -1
- package/dist/migration/manual/T10165-backfill-adr-index.js.map +1 -1
- package/dist/nexus/api-contracts.d.ts.map +1 -1
- package/dist/nexus/api-contracts.js +27 -11
- package/dist/nexus/api-contracts.js.map +1 -1
- package/dist/nexus/api-extractors/http-extractor.d.ts +2 -2
- 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/assessment-projection.d.ts +1 -1
- package/dist/nexus/assessment-projection.d.ts.map +1 -1
- package/dist/nexus/assessment-projection.js +1 -1
- package/dist/nexus/assessment-projection.js.map +1 -1
- package/dist/nexus/clusters.js +1 -1
- package/dist/nexus/clusters.js.map +1 -1
- package/dist/nexus/deps.d.ts +1 -1
- package/dist/nexus/deps.d.ts.map +1 -1
- package/dist/nexus/deps.js +1 -1
- package/dist/nexus/deps.js.map +1 -1
- package/dist/nexus/diff.d.ts +1 -1
- package/dist/nexus/diff.d.ts.map +1 -1
- package/dist/nexus/diff.js +3 -2
- package/dist/nexus/diff.js.map +1 -1
- package/dist/nexus/fleet-status.d.ts +1 -1
- package/dist/nexus/fleet-status.d.ts.map +1 -1
- package/dist/nexus/fleet-status.js +1 -1
- package/dist/nexus/fleet-status.js.map +1 -1
- package/dist/nexus/flows.js +1 -1
- package/dist/nexus/flows.js.map +1 -1
- package/dist/nexus/identity.d.ts +8 -0
- package/dist/nexus/identity.d.ts.map +1 -1
- package/dist/nexus/identity.js +17 -1
- package/dist/nexus/identity.js.map +1 -1
- package/dist/nexus/index.d.ts +1 -1
- package/dist/nexus/index.d.ts.map +1 -1
- package/dist/nexus/index.js +2 -2
- package/dist/nexus/index.js.map +1 -1
- package/dist/nexus/nexus-bridge.d.ts.map +1 -1
- package/dist/nexus/nexus-bridge.js +5 -5
- package/dist/nexus/nexus-bridge.js.map +1 -1
- package/dist/nexus/permissions.d.ts +1 -1
- package/dist/nexus/permissions.d.ts.map +1 -1
- package/dist/nexus/permissions.js +1 -1
- package/dist/nexus/permissions.js.map +1 -1
- package/dist/nexus/query-dsl.js +1 -1
- package/dist/nexus/query-dsl.js.map +1 -1
- package/dist/nexus/query.d.ts +1 -2
- package/dist/nexus/query.d.ts.map +1 -1
- package/dist/nexus/query.js +1 -1
- package/dist/nexus/query.js.map +1 -1
- package/dist/nexus/registry-errors.js +1 -1
- package/dist/nexus/registry-errors.js.map +1 -1
- package/dist/nexus/registry.d.ts +23 -1
- package/dist/nexus/registry.d.ts.map +1 -1
- package/dist/nexus/registry.js +77 -2
- package/dist/nexus/registry.js.map +1 -1
- package/dist/nexus/workspace.js +1 -1
- package/dist/nexus/workspace.js.map +1 -1
- package/dist/orchestrate/pivot.d.ts.map +1 -1
- package/dist/orchestrate/pivot.js +2 -1
- package/dist/orchestrate/pivot.js.map +1 -1
- package/dist/orchestrate/query-ops.js +1 -1
- package/dist/orchestrate/query-ops.js.map +1 -1
- package/dist/orchestrate/spawn-ops.js +1 -1
- package/dist/orchestrate/spawn-ops.js.map +1 -1
- package/dist/orchestration/atomicity.d.ts +1 -1
- package/dist/orchestration/atomicity.d.ts.map +1 -1
- package/dist/orchestration/atomicity.js +1 -1
- package/dist/orchestration/atomicity.js.map +1 -1
- package/dist/orchestration/classify.js +1 -1
- package/dist/orchestration/classify.js.map +1 -1
- package/dist/orchestration/index.js +1 -1
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/parallel.js +1 -1
- package/dist/orchestration/parallel.js.map +1 -1
- package/dist/orchestration/protocol-validators.d.ts +1 -1
- package/dist/orchestration/protocol-validators.d.ts.map +1 -1
- package/dist/orchestration/protocol-validators.js +1 -1
- package/dist/orchestration/protocol-validators.js.map +1 -1
- package/dist/orchestration/skill-ops.js +1 -1
- package/dist/orchestration/skill-ops.js.map +1 -1
- package/dist/orchestration/spawn-prompt.d.ts +9 -0
- package/dist/orchestration/spawn-prompt.d.ts.map +1 -1
- package/dist/orchestration/spawn-prompt.js +13 -2
- package/dist/orchestration/spawn-prompt.js.map +1 -1
- package/dist/orchestration/spawn.js +1 -1
- package/dist/orchestration/spawn.js.map +1 -1
- package/dist/paths.d.ts +3 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +4 -2
- package/dist/paths.js.map +1 -1
- package/dist/phases/deps.js +1 -1
- package/dist/phases/deps.js.map +1 -1
- package/dist/phases/index.js +1 -1
- package/dist/phases/index.js.map +1 -1
- package/dist/project-lifecycle.js +3 -3
- package/dist/project-lifecycle.js.map +1 -1
- package/dist/project-scope.js +1 -1
- package/dist/project-scope.js.map +1 -1
- package/dist/project-tombstone.js +1 -1
- package/dist/project-tombstone.js.map +1 -1
- package/dist/registrations.d.ts +30 -0
- package/dist/registrations.d.ts.map +1 -0
- package/dist/registrations.js +30 -0
- package/dist/registrations.js.map +1 -0
- package/dist/release/changesets-aggregator.js +1 -1
- package/dist/release/changesets-aggregator.js.map +1 -1
- package/dist/release/ci-evidence.d.ts +68 -2
- package/dist/release/ci-evidence.d.ts.map +1 -1
- package/dist/release/ci-evidence.js +203 -39
- package/dist/release/ci-evidence.js.map +1 -1
- package/dist/release/invariants/archive-reason-invariant.d.ts +1 -1
- package/dist/release/invariants/archive-reason-invariant.d.ts.map +1 -1
- package/dist/release/invariants/archive-reason-invariant.js +1 -1
- package/dist/release/invariants/archive-reason-invariant.js.map +1 -1
- package/dist/release/invariants/registry.d.ts +1 -1
- package/dist/release/invariants/registry.d.ts.map +1 -1
- package/dist/release/invariants/registry.js +1 -1
- package/dist/release/invariants/registry.js.map +1 -1
- package/dist/release/open.d.ts +4 -7
- package/dist/release/open.d.ts.map +1 -1
- package/dist/release/open.js +62 -24
- package/dist/release/open.js.map +1 -1
- package/dist/release/plan.d.ts +1 -2
- package/dist/release/plan.d.ts.map +1 -1
- package/dist/release/plan.js +4 -1
- package/dist/release/plan.js.map +1 -1
- package/dist/release/pr-evidence.d.ts +1 -1
- package/dist/release/pr-evidence.d.ts.map +1 -1
- package/dist/release/pr-evidence.js +2 -2
- package/dist/release/pr-evidence.js.map +1 -1
- package/dist/release/preflight-skip.d.ts +74 -10
- package/dist/release/preflight-skip.d.ts.map +1 -1
- package/dist/release/preflight-skip.js +254 -47
- package/dist/release/preflight-skip.js.map +1 -1
- package/dist/release/reconcile.d.ts +1 -1
- package/dist/release/reconcile.d.ts.map +1 -1
- package/dist/release/reconcile.js +19 -3
- package/dist/release/reconcile.js.map +1 -1
- package/dist/release/version-bump.d.ts +1 -1
- package/dist/release/version-bump.d.ts.map +1 -1
- package/dist/release/version-bump.js +1 -1
- package/dist/release/version-bump.js.map +1 -1
- package/dist/render/colors.js +1 -19
- package/dist/render/colors.js.map +1 -1
- package/dist/render/tasks/colors.js +1 -1
- package/dist/render/tasks/colors.js.map +1 -1
- package/dist/resources/admission-ledger.d.ts +587 -0
- package/dist/resources/admission-ledger.d.ts.map +1 -0
- package/dist/resources/admission-ledger.js +1401 -0
- package/dist/resources/admission-ledger.js.map +1 -0
- package/dist/resources/backend.d.ts +37 -1
- package/dist/resources/backend.d.ts.map +1 -1
- package/dist/resources/backend.js +1 -1
- package/dist/resources/darwin-backend.d.ts +152 -26
- package/dist/resources/darwin-backend.d.ts.map +1 -1
- package/dist/resources/darwin-backend.js +217 -34
- package/dist/resources/darwin-backend.js.map +1 -1
- package/dist/resources/governor.d.ts +36 -27
- package/dist/resources/governor.d.ts.map +1 -1
- package/dist/resources/governor.js +144 -49
- package/dist/resources/governor.js.map +1 -1
- package/dist/resources/heavy-command-hook-delivery.d.ts +144 -0
- package/dist/resources/heavy-command-hook-delivery.d.ts.map +1 -0
- package/dist/resources/heavy-command-hook-delivery.js +204 -0
- package/dist/resources/heavy-command-hook-delivery.js.map +1 -0
- package/dist/resources/heavy-command.d.ts +69 -0
- package/dist/resources/heavy-command.d.ts.map +1 -1
- package/dist/resources/heavy-command.js +479 -7
- package/dist/resources/heavy-command.js.map +1 -1
- package/dist/resources/pressure-gate.d.ts +148 -0
- package/dist/resources/pressure-gate.d.ts.map +1 -0
- package/dist/resources/pressure-gate.js +273 -0
- package/dist/resources/pressure-gate.js.map +1 -0
- package/dist/resources/run-admission.d.ts +33 -45
- package/dist/resources/run-admission.d.ts.map +1 -1
- package/dist/resources/run-admission.js +50 -118
- package/dist/resources/run-admission.js.map +1 -1
- package/dist/resources/run-class.d.ts +60 -4
- package/dist/resources/run-class.d.ts.map +1 -1
- package/dist/resources/run-class.js +474 -6
- package/dist/resources/run-class.js.map +1 -1
- package/dist/resources/run-governed.d.ts +43 -11
- package/dist/resources/run-governed.d.ts.map +1 -1
- package/dist/resources/run-governed.js +139 -99
- package/dist/resources/run-governed.js.map +1 -1
- package/dist/resources/slot-holder.d.ts +12 -4
- package/dist/resources/slot-holder.d.ts.map +1 -1
- package/dist/resources/slot-holder.js +19 -14
- package/dist/resources/slot-holder.js.map +1 -1
- package/dist/resources/spawn-wrapper.js +1 -1
- package/dist/resources/spawn-wrapper.js.map +1 -1
- package/dist/resources/supervisor-admit.d.ts +1 -1
- package/dist/resources/supervisor-admit.d.ts.map +1 -1
- package/dist/resources/supervisor-admit.js +2 -1
- package/dist/resources/supervisor-admit.js.map +1 -1
- package/dist/routing/build-command-groups.d.ts +1 -1
- package/dist/routing/build-command-groups.d.ts.map +1 -1
- package/dist/routing/build-command-groups.js +4 -1
- package/dist/routing/build-command-groups.js.map +1 -1
- package/dist/runtime/openapi/generate-openapi.d.ts +1 -1
- package/dist/runtime/openapi/generate-openapi.d.ts.map +1 -1
- package/dist/runtime/openapi/generate-openapi.js +1 -1
- package/dist/runtime/openapi/generate-openapi.js.map +1 -1
- package/dist/sagas/index.d.ts +3 -1
- package/dist/sagas/index.d.ts.map +1 -1
- package/dist/sagas/index.js +2 -5
- package/dist/sagas/index.js.map +1 -1
- package/dist/scaffold/ensure-skills.d.ts.map +1 -1
- package/dist/scaffold/ensure-skills.js +58 -2
- package/dist/scaffold/ensure-skills.js.map +1 -1
- package/dist/scaffold/project-identity.js +1 -1
- package/dist/scaffold/project-identity.js.map +1 -1
- package/dist/sdk/validator-attest.d.ts +1 -1
- package/dist/sdk/validator-attest.d.ts.map +1 -1
- package/dist/sdk/validator-attest.js +1 -1
- package/dist/sdk/validator-attest.js.map +1 -1
- package/dist/sdk/validator-reject.d.ts +1 -1
- package/dist/sdk/validator-reject.d.ts.map +1 -1
- package/dist/sdk/validator-reject.js +1 -1
- package/dist/sdk/validator-reject.js.map +1 -1
- package/dist/security/input-sanitization.js +2 -1
- package/dist/security/input-sanitization.js.map +1 -1
- package/dist/security/override-cap.js +1 -1
- package/dist/security/override-cap.js.map +1 -1
- package/dist/security/owner-override-auth.js +1 -1
- package/dist/security/owner-override-auth.js.map +1 -1
- package/dist/security/shared-evidence-tracker.js +1 -1
- package/dist/security/shared-evidence-tracker.js.map +1 -1
- package/dist/selfimprove/fix-gen.js +35 -93136
- package/dist/selfimprove/fix-gen.js.map +3 -3
- package/dist/sentient/daemon.d.ts.map +1 -1
- package/dist/sentient/daemon.js +3 -0
- package/dist/sentient/daemon.js.map +1 -1
- package/dist/sentient/tick.d.ts +7 -0
- package/dist/sentient/tick.d.ts.map +1 -1
- package/dist/sentient/tick.js +11 -0
- package/dist/sentient/tick.js.map +1 -1
- package/dist/sequence/index.js +1 -1
- package/dist/sequence/index.js.map +1 -1
- package/dist/session/engine-ops.d.ts +3 -45
- package/dist/session/engine-ops.d.ts.map +1 -1
- package/dist/session/engine-ops.js +63 -112
- package/dist/session/engine-ops.js.map +1 -1
- package/dist/session/status-op.d.ts +40 -0
- package/dist/session/status-op.d.ts.map +1 -0
- package/dist/session/status-op.js +71 -0
- package/dist/session/status-op.js.map +1 -0
- package/dist/session/task-current.d.ts +31 -0
- package/dist/session/task-current.d.ts.map +1 -0
- package/dist/session/task-current.js +59 -0
- package/dist/session/task-current.js.map +1 -0
- package/dist/sessions/assumptions.d.ts +1 -1
- package/dist/sessions/assumptions.d.ts.map +1 -1
- package/dist/sessions/assumptions.js +1 -1
- package/dist/sessions/assumptions.js.map +1 -1
- package/dist/sessions/briefing.d.ts.map +1 -1
- package/dist/sessions/briefing.js +11 -0
- package/dist/sessions/briefing.js.map +1 -1
- package/dist/sessions/context-inject.js +1 -1
- package/dist/sessions/context-inject.js.map +1 -1
- package/dist/sessions/decisions.d.ts +1 -1
- package/dist/sessions/decisions.d.ts.map +1 -1
- package/dist/sessions/decisions.js +1 -1
- package/dist/sessions/decisions.js.map +1 -1
- package/dist/sessions/focus-state-store.d.ts.map +1 -1
- package/dist/sessions/focus-state-store.js +2 -1
- package/dist/sessions/focus-state-store.js.map +1 -1
- package/dist/sessions/handoff.js +1 -1
- package/dist/sessions/handoff.js.map +1 -1
- package/dist/sessions/index.d.ts +1 -2
- package/dist/sessions/index.d.ts.map +1 -1
- package/dist/sessions/index.js +3 -2
- package/dist/sessions/index.js.map +1 -1
- package/dist/sessions/session-drift.js +1 -1
- package/dist/sessions/session-drift.js.map +1 -1
- package/dist/sessions/session-end-snapshot-entry.d.ts +4 -0
- package/dist/sessions/session-end-snapshot-entry.d.ts.map +1 -1
- package/dist/sessions/session-end-snapshot-entry.js +11 -0
- package/dist/sessions/session-end-snapshot-entry.js.map +1 -1
- package/dist/sessions/session-end-snapshot.d.ts.map +1 -1
- package/dist/sessions/session-end-snapshot.js +4 -0
- package/dist/sessions/session-end-snapshot.js.map +1 -1
- package/dist/sessions/session-enforcement.js +1 -1
- package/dist/sessions/session-enforcement.js.map +1 -1
- package/dist/sessions/session-show.d.ts +1 -2
- package/dist/sessions/session-show.d.ts.map +1 -1
- package/dist/sessions/session-show.js +1 -1
- package/dist/sessions/session-show.js.map +1 -1
- package/dist/sessions/session-stats.js +1 -1
- package/dist/sessions/session-stats.js.map +1 -1
- package/dist/sessions/session-suspend.d.ts +1 -2
- package/dist/sessions/session-suspend.d.ts.map +1 -1
- package/dist/sessions/session-suspend.js +1 -1
- package/dist/sessions/session-suspend.js.map +1 -1
- package/dist/sessions/session-switch.js +1 -1
- package/dist/sessions/session-switch.js.map +1 -1
- package/dist/sessions/snapshot.js +1 -1
- package/dist/sessions/snapshot.js.map +1 -1
- package/dist/sessions/terminal-identity.d.ts +1 -1
- package/dist/sessions/terminal-identity.d.ts.map +1 -1
- package/dist/sessions/terminal-identity.js +1 -1
- package/dist/sessions/terminal-identity.js.map +1 -1
- package/dist/setup/sections/integrations.d.ts.map +1 -1
- package/dist/setup/sections/integrations.js +9 -0
- package/dist/setup/sections/integrations.js.map +1 -1
- package/dist/setup/sections/models-roles.js +1 -1
- package/dist/setup/sections/models-roles.js.map +1 -1
- package/dist/setup/sections/verification.d.ts.map +1 -1
- package/dist/setup/sections/verification.js +8 -2
- package/dist/setup/sections/verification.js.map +1 -1
- package/dist/shutdown.d.ts +24 -0
- package/dist/shutdown.d.ts.map +1 -1
- package/dist/shutdown.js +30 -1
- package/dist/shutdown.js.map +1 -1
- package/dist/skills/agents/install.d.ts +46 -6
- package/dist/skills/agents/install.d.ts.map +1 -1
- package/dist/skills/agents/install.js +86 -17
- package/dist/skills/agents/install.js.map +1 -1
- package/dist/skills/injection/subagent.js +1 -1
- package/dist/skills/injection/subagent.js.map +1 -1
- package/dist/skills/manifests/research.d.ts.map +1 -1
- package/dist/skills/manifests/research.js +2 -1
- package/dist/skills/manifests/research.js.map +1 -1
- package/dist/skills/orchestrator/spawn.js +1 -1
- package/dist/skills/orchestrator/spawn.js.map +1 -1
- package/dist/skills/orchestrator/validator.js +1 -1
- package/dist/skills/orchestrator/validator.js.map +1 -1
- package/dist/snapshot/index.d.ts.map +1 -1
- package/dist/snapshot/index.js +13 -0
- package/dist/snapshot/index.js.map +1 -1
- package/dist/spawn/agent-identity.js +1 -1
- package/dist/spawn/agent-identity.js.map +1 -1
- package/dist/stats/index.d.ts.map +1 -1
- package/dist/stats/index.js +2 -1
- package/dist/stats/index.js.map +1 -1
- package/dist/store/agent-install.d.ts.map +1 -1
- package/dist/store/agent-install.js +2 -1
- package/dist/store/agent-install.js.map +1 -1
- package/dist/store/agent-registry-accessor.d.ts +1 -0
- package/dist/store/agent-registry-accessor.d.ts.map +1 -1
- package/dist/store/agent-registry-accessor.js +3 -1
- package/dist/store/agent-registry-accessor.js.map +1 -1
- package/dist/store/atomic.js +1 -1
- package/dist/store/atomic.js.map +1 -1
- package/dist/store/attachment-store.js +1 -1
- package/dist/store/attachment-store.js.map +1 -1
- package/dist/store/audit-log-schema.d.ts +645 -0
- package/dist/store/audit-log-schema.d.ts.map +1 -0
- package/dist/store/audit-log-schema.js +30 -0
- package/dist/store/audit-log-schema.js.map +1 -0
- package/dist/store/background-ops.d.ts +26 -0
- package/dist/store/background-ops.d.ts.map +1 -1
- package/dist/store/background-ops.js +46 -0
- package/dist/store/background-ops.js.map +1 -1
- package/dist/store/backup-recover.d.ts +36 -1
- package/dist/store/backup-recover.d.ts.map +1 -1
- package/dist/store/backup-recover.js +99 -1
- package/dist/store/backup-recover.js.map +1 -1
- package/dist/store/backup-verify.d.ts +1 -1
- package/dist/store/backup-verify.d.ts.map +1 -1
- package/dist/store/backup-verify.js +6 -1
- package/dist/store/backup-verify.js.map +1 -1
- package/dist/store/backup.js +1 -1
- package/dist/store/backup.js.map +1 -1
- package/dist/store/conduit-sqlite.d.ts.map +1 -1
- package/dist/store/conduit-sqlite.js +2 -26
- package/dist/store/conduit-sqlite.js.map +1 -1
- package/dist/store/converters.js +1 -1
- package/dist/store/converters.js.map +1 -1
- package/dist/store/db-helpers.js +1 -1
- package/dist/store/db-helpers.js.map +1 -1
- package/dist/store/dependency-cycles.js +1 -1
- package/dist/store/dependency-cycles.js.map +1 -1
- package/dist/store/display-id-alias.d.ts +2 -2
- package/dist/store/display-id-alias.d.ts.map +1 -1
- package/dist/store/display-id-alias.js +5 -28
- package/dist/store/display-id-alias.js.map +1 -1
- package/dist/store/drizzle-node-sqlite.d.ts +56 -0
- package/dist/store/drizzle-node-sqlite.d.ts.map +1 -0
- package/dist/store/drizzle-node-sqlite.js +87 -0
- package/dist/store/drizzle-node-sqlite.js.map +1 -0
- package/dist/store/dual-scope-db.d.ts +26 -33
- package/dist/store/dual-scope-db.d.ts.map +1 -1
- package/dist/store/dual-scope-db.js +416 -122
- package/dist/store/dual-scope-db.js.map +1 -1
- package/dist/store/exodus/abort-events.d.ts +134 -0
- package/dist/store/exodus/abort-events.d.ts.map +1 -1
- package/dist/store/exodus/abort-events.js +201 -0
- package/dist/store/exodus/abort-events.js.map +1 -1
- package/dist/store/exodus/migrate.d.ts +7 -0
- package/dist/store/exodus/migrate.d.ts.map +1 -1
- package/dist/store/exodus/migrate.js +156 -118
- package/dist/store/exodus/migrate.js.map +1 -1
- package/dist/store/exodus/on-open.d.ts +36 -0
- package/dist/store/exodus/on-open.d.ts.map +1 -1
- package/dist/store/exodus/on-open.js +102 -27
- package/dist/store/exodus/on-open.js.map +1 -1
- package/dist/store/exodus/prior-recoveries.d.ts +75 -0
- package/dist/store/exodus/prior-recoveries.d.ts.map +1 -0
- package/dist/store/exodus/prior-recoveries.js +122 -0
- package/dist/store/exodus/prior-recoveries.js.map +1 -0
- package/dist/store/exodus/reconcile.d.ts.map +1 -1
- package/dist/store/exodus/reconcile.js +188 -24
- package/dist/store/exodus/reconcile.js.map +1 -1
- package/dist/store/exodus/runtime-targets.d.ts +3 -3
- package/dist/store/exodus/runtime-targets.js +3 -3
- package/dist/store/exodus/task-id-collision-sql.d.ts +52 -0
- package/dist/store/exodus/task-id-collision-sql.d.ts.map +1 -0
- package/dist/store/exodus/task-id-collision-sql.js +97 -0
- package/dist/store/exodus/task-id-collision-sql.js.map +1 -0
- package/dist/store/exodus/task-id-remap.d.ts +113 -0
- package/dist/store/exodus/task-id-remap.d.ts.map +1 -0
- package/dist/store/exodus/task-id-remap.js +301 -0
- package/dist/store/exodus/task-id-remap.js.map +1 -0
- package/dist/store/exodus/verify-migration.js +1 -1
- package/dist/store/exodus/verify-migration.js.map +1 -1
- package/dist/store/exodus/write-guard.d.ts +136 -0
- package/dist/store/exodus/write-guard.d.ts.map +1 -0
- package/dist/store/exodus/write-guard.js +289 -0
- package/dist/store/exodus/write-guard.js.map +1 -0
- package/dist/store/identity-share.d.ts +31 -0
- package/dist/store/identity-share.d.ts.map +1 -0
- package/dist/store/identity-share.js +54 -0
- package/dist/store/identity-share.js.map +1 -0
- package/dist/store/import-remap.js +1 -1
- package/dist/store/import-remap.js.map +1 -1
- package/dist/store/import-sort.js +1 -1
- package/dist/store/import-sort.js.map +1 -1
- package/dist/store/json.js +1 -1
- package/dist/store/json.js.map +1 -1
- package/dist/store/legacy-tasks-lineage.js +3 -3
- package/dist/store/legacy-tasks-lineage.js.map +1 -1
- package/dist/store/lock.d.ts +17 -0
- package/dist/store/lock.d.ts.map +1 -1
- package/dist/store/lock.js +18 -1
- package/dist/store/lock.js.map +1 -1
- package/dist/store/memory-sqlite.d.ts.map +1 -1
- package/dist/store/memory-sqlite.js +2 -25
- package/dist/store/memory-sqlite.js.map +1 -1
- package/dist/store/migration-files.d.ts +30 -0
- package/dist/store/migration-files.d.ts.map +1 -0
- package/dist/store/migration-files.js +59 -0
- package/dist/store/migration-files.js.map +1 -0
- package/dist/store/migration-manager.d.ts.map +1 -1
- package/dist/store/migration-manager.js +14 -14
- package/dist/store/migration-manager.js.map +1 -1
- package/dist/store/migration-runner.d.ts.map +1 -1
- package/dist/store/migration-runner.js +2 -2
- package/dist/store/migration-runner.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 +290 -355
- package/dist/store/migration-sqlite.js.map +1 -1
- package/dist/store/open-cleo-db.d.ts.map +1 -1
- package/dist/store/open-cleo-db.js +4 -2
- package/dist/store/open-cleo-db.js.map +1 -1
- package/dist/store/pid-alive.d.ts +15 -0
- package/dist/store/pid-alive.d.ts.map +1 -0
- package/dist/store/pid-alive.js +24 -0
- package/dist/store/pid-alive.js.map +1 -0
- package/dist/store/portable-bundle-scan.d.ts +1 -1
- package/dist/store/portable-bundle-scan.d.ts.map +1 -1
- package/dist/store/portable-bundle-scan.js +1 -1
- package/dist/store/portable-bundle-scan.js.map +1 -1
- package/dist/store/portable-bundle.d.ts +10 -1
- package/dist/store/portable-bundle.d.ts.map +1 -1
- package/dist/store/portable-bundle.js +10 -1
- package/dist/store/portable-bundle.js.map +1 -1
- package/dist/store/recover-malformed-db.d.ts +1 -1
- package/dist/store/recover-malformed-db.d.ts.map +1 -1
- package/dist/store/recover-malformed-db.js +1 -1
- package/dist/store/recover-malformed-db.js.map +1 -1
- package/dist/store/repair-malformed-dbs.d.ts +1 -1
- package/dist/store/repair-malformed-dbs.d.ts.map +1 -1
- package/dist/store/repair-malformed-dbs.js +1 -1
- package/dist/store/repair-malformed-dbs.js.map +1 -1
- package/dist/store/restore-marker.d.ts +89 -0
- package/dist/store/restore-marker.d.ts.map +1 -0
- package/dist/store/restore-marker.js +197 -0
- package/dist/store/restore-marker.js.map +1 -0
- package/dist/store/restore-store.d.ts +85 -0
- package/dist/store/restore-store.d.ts.map +1 -0
- package/dist/store/restore-store.js +391 -0
- package/dist/store/restore-store.js.map +1 -0
- package/dist/store/row-identity.d.ts +123 -1
- package/dist/store/row-identity.d.ts.map +1 -1
- package/dist/store/row-identity.js +454 -80
- package/dist/store/row-identity.js.map +1 -1
- package/dist/store/schema/agent-registry-schema.d.ts +1 -1
- package/dist/store/schema/agent-registry-schema.d.ts.map +1 -1
- package/dist/store/schema/agent-registry-schema.js +5 -1
- package/dist/store/schema/agent-registry-schema.js.map +1 -1
- package/dist/store/schema/cleo-global/agent-registry.d.ts +1 -1
- package/dist/store/schema/cleo-global/agent-registry.d.ts.map +1 -1
- package/dist/store/schema/cleo-global/agent-registry.js +9 -5
- package/dist/store/schema/cleo-global/agent-registry.js.map +1 -1
- package/dist/store/schema/cleo-global/models-catalog.js +1 -1
- package/dist/store/schema/cleo-global/models-catalog.js.map +1 -1
- package/dist/store/schema/cleo-global/nexus.js +1 -1
- package/dist/store/schema/cleo-global/nexus.js.map +1 -1
- package/dist/store/schema/cleo-project/provenance-commits.d.ts +1 -1
- package/dist/store/schema/cleo-project/provenance-orphans.d.ts +1 -1
- package/dist/store/schema/cleo-project/provenance-orphans.d.ts.map +1 -1
- package/dist/store/schema/cleo-project/provenance-orphans.js +9 -2
- package/dist/store/schema/cleo-project/provenance-orphans.js.map +1 -1
- package/dist/store/schema/cleo-project/provenance-rest.d.ts +1 -1
- package/dist/store/schema/cleo-project/provenance-rest.js +1 -1
- package/dist/store/schema/cleo-project/provenance-rest.js.map +1 -1
- package/dist/store/schema/cleo-shared/brain.js +1 -1
- package/dist/store/schema/cleo-shared/brain.js.map +1 -1
- package/dist/store/schema/memory-schema.d.ts +1 -1
- package/dist/store/schema/memory-schema.d.ts.map +1 -1
- package/dist/store/schema/memory-schema.js +1 -1
- package/dist/store/schema/memory-schema.js.map +1 -1
- package/dist/store/schema/nexus-schema.js +1 -1
- package/dist/store/schema/nexus-schema.js.map +1 -1
- package/dist/store/service-host-matcher.d.ts +1 -1
- package/dist/store/service-host-matcher.d.ts.map +1 -1
- package/dist/store/service-host-matcher.js +1 -1
- package/dist/store/service-host-matcher.js.map +1 -1
- package/dist/store/service-oauth.js +1 -1
- package/dist/store/service-oauth.js.map +1 -1
- package/dist/store/session-store.d.ts.map +1 -1
- package/dist/store/session-store.js +7 -1
- package/dist/store/session-store.js.map +1 -1
- package/dist/store/sqlite-backup.d.ts +1 -1
- package/dist/store/sqlite-backup.d.ts.map +1 -1
- package/dist/store/sqlite-backup.js +1 -1
- package/dist/store/sqlite-backup.js.map +1 -1
- package/dist/store/sqlite-data-accessor.d.ts +52 -1
- package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
- package/dist/store/sqlite-data-accessor.js +95 -22
- package/dist/store/sqlite-data-accessor.js.map +1 -1
- package/dist/store/sqlite-native.d.ts.map +1 -1
- package/dist/store/sqlite-native.js +9 -9
- package/dist/store/sqlite-native.js.map +1 -1
- package/dist/store/sqlite-pragmas.d.ts +12 -5
- package/dist/store/sqlite-pragmas.d.ts.map +1 -1
- package/dist/store/sqlite-pragmas.js +13 -2
- package/dist/store/sqlite-pragmas.js.map +1 -1
- package/dist/store/sqlite.d.ts.map +1 -1
- package/dist/store/sqlite.js +7 -32
- package/dist/store/sqlite.js.map +1 -1
- package/dist/store/status-registry.d.ts +1 -1
- package/dist/store/status-registry.d.ts.map +1 -1
- package/dist/store/status-registry.js +1 -1
- package/dist/store/status-registry.js.map +1 -1
- package/dist/store/sync/apply/applier.d.ts +119 -0
- package/dist/store/sync/apply/applier.d.ts.map +1 -0
- package/dist/store/sync/apply/applier.js +1239 -0
- package/dist/store/sync/apply/applier.js.map +1 -0
- package/dist/store/sync/apply/fk.d.ts +47 -0
- package/dist/store/sync/apply/fk.d.ts.map +1 -0
- package/dist/store/sync/apply/fk.js +89 -0
- package/dist/store/sync/apply/fk.js.map +1 -0
- package/dist/store/sync/apply/footprints.d.ts +60 -0
- package/dist/store/sync/apply/footprints.d.ts.map +1 -0
- package/dist/store/sync/apply/footprints.js +235 -0
- package/dist/store/sync/apply/footprints.js.map +1 -0
- package/dist/store/sync/apply/frame.d.ts +80 -0
- package/dist/store/sync/apply/frame.d.ts.map +1 -0
- package/dist/store/sync/apply/frame.js +127 -0
- package/dist/store/sync/apply/frame.js.map +1 -0
- package/dist/store/sync/apply/index.d.ts +11 -0
- package/dist/store/sync/apply/index.d.ts.map +1 -0
- package/dist/store/sync/apply/index.js +11 -0
- package/dist/store/sync/apply/index.js.map +1 -0
- package/dist/store/sync/apply/parent-delete.d.ts +38 -0
- package/dist/store/sync/apply/parent-delete.d.ts.map +1 -0
- package/dist/store/sync/apply/parent-delete.js +41 -0
- package/dist/store/sync/apply/parent-delete.js.map +1 -0
- package/dist/store/sync/apply/post-apply.d.ts +67 -0
- package/dist/store/sync/apply/post-apply.d.ts.map +1 -0
- package/dist/store/sync/apply/post-apply.js +118 -0
- package/dist/store/sync/apply/post-apply.js.map +1 -0
- package/dist/store/sync/apply/refs.d.ts +60 -0
- package/dist/store/sync/apply/refs.d.ts.map +1 -0
- package/dist/store/sync/apply/refs.js +90 -0
- package/dist/store/sync/apply/refs.js.map +1 -0
- package/dist/store/sync/apply/write-api.d.ts +195 -0
- package/dist/store/sync/apply/write-api.d.ts.map +1 -0
- package/dist/store/sync/apply/write-api.js +416 -0
- package/dist/store/sync/apply/write-api.js.map +1 -0
- package/dist/store/sync/apply-intent.d.ts +117 -0
- package/dist/store/sync/apply-intent.d.ts.map +1 -0
- package/dist/store/sync/apply-intent.js +225 -0
- package/dist/store/sync/apply-intent.js.map +1 -0
- package/dist/store/sync/capture.d.ts +32 -2
- package/dist/store/sync/capture.d.ts.map +1 -1
- package/dist/store/sync/capture.js +47 -13
- package/dist/store/sync/capture.js.map +1 -1
- package/dist/store/sync/conflicts.d.ts +81 -0
- package/dist/store/sync/conflicts.d.ts.map +1 -0
- package/dist/store/sync/conflicts.js +98 -0
- package/dist/store/sync/conflicts.js.map +1 -0
- package/dist/store/sync/field-leave.d.ts +146 -0
- package/dist/store/sync/field-leave.d.ts.map +1 -0
- package/dist/store/sync/field-leave.js +241 -0
- package/dist/store/sync/field-leave.js.map +1 -0
- package/dist/store/sync/flags.d.ts +119 -0
- package/dist/store/sync/flags.d.ts.map +1 -1
- package/dist/store/sync/flags.js +360 -0
- package/dist/store/sync/flags.js.map +1 -1
- package/dist/store/sync/held.d.ts +197 -0
- package/dist/store/sync/held.d.ts.map +1 -0
- package/dist/store/sync/held.js +314 -0
- package/dist/store/sync/held.js.map +1 -0
- package/dist/store/sync/identity-fill.d.ts.map +1 -1
- package/dist/store/sync/identity-fill.js +10 -2
- package/dist/store/sync/identity-fill.js.map +1 -1
- package/dist/store/sync/inbox.d.ts +114 -0
- package/dist/store/sync/inbox.d.ts.map +1 -0
- package/dist/store/sync/inbox.js +222 -0
- package/dist/store/sync/inbox.js.map +1 -0
- package/dist/store/sync/inherit.d.ts +36 -0
- package/dist/store/sync/inherit.d.ts.map +1 -0
- package/dist/store/sync/inherit.js +38 -0
- package/dist/store/sync/inherit.js.map +1 -0
- package/dist/store/sync/merge/engine.d.ts +114 -0
- package/dist/store/sync/merge/engine.d.ts.map +1 -0
- package/dist/store/sync/merge/engine.js +698 -0
- package/dist/store/sync/merge/engine.js.map +1 -0
- package/dist/store/sync/merge/index.d.ts +11 -0
- package/dist/store/sync/merge/index.d.ts.map +1 -0
- package/dist/store/sync/merge/index.js +11 -0
- package/dist/store/sync/merge/index.js.map +1 -0
- package/dist/store/sync/merge/rules.d.ts +91 -0
- package/dist/store/sync/merge/rules.d.ts.map +1 -0
- package/dist/store/sync/merge/rules.js +151 -0
- package/dist/store/sync/merge/rules.js.map +1 -0
- package/dist/store/sync/merge/types.d.ts +206 -0
- package/dist/store/sync/merge/types.d.ts.map +1 -0
- package/dist/store/sync/merge/types.js +15 -0
- package/dist/store/sync/merge/types.js.map +1 -0
- package/dist/store/sync/migration-hooks.d.ts +47 -0
- package/dist/store/sync/migration-hooks.d.ts.map +1 -0
- package/dist/store/sync/migration-hooks.js +74 -0
- package/dist/store/sync/migration-hooks.js.map +1 -0
- package/dist/store/sync/netting.d.ts +5 -0
- package/dist/store/sync/netting.d.ts.map +1 -1
- package/dist/store/sync/netting.js +29 -2
- package/dist/store/sync/netting.js.map +1 -1
- package/dist/store/sync/remap.d.ts +72 -0
- package/dist/store/sync/remap.d.ts.map +1 -0
- package/dist/store/sync/remap.js +209 -0
- package/dist/store/sync/remap.js.map +1 -0
- package/dist/store/sync/repair.d.ts +180 -0
- package/dist/store/sync/repair.d.ts.map +1 -0
- package/dist/store/sync/repair.js +499 -0
- package/dist/store/sync/repair.js.map +1 -0
- package/dist/store/sync/replica-registry.d.ts +54 -0
- package/dist/store/sync/replica-registry.d.ts.map +1 -1
- package/dist/store/sync/replica-registry.js +72 -2
- package/dist/store/sync/replica-registry.js.map +1 -1
- package/dist/store/sync/replica.d.ts +71 -9
- package/dist/store/sync/replica.d.ts.map +1 -1
- package/dist/store/sync/replica.js +95 -11
- package/dist/store/sync/replica.js.map +1 -1
- package/dist/store/sync/row-meta.d.ts +148 -0
- package/dist/store/sync/row-meta.d.ts.map +1 -0
- package/dist/store/sync/row-meta.js +200 -0
- package/dist/store/sync/row-meta.js.map +1 -0
- package/dist/store/sync/schema.d.ts +13 -5
- package/dist/store/sync/schema.d.ts.map +1 -1
- package/dist/store/sync/schema.js +34 -7
- package/dist/store/sync/schema.js.map +1 -1
- package/dist/store/sync/sealer-values.d.ts.map +1 -1
- package/dist/store/sync/sealer-values.js +1 -0
- package/dist/store/sync/sealer-values.js.map +1 -1
- package/dist/store/sync/sealer.d.ts +96 -0
- package/dist/store/sync/sealer.d.ts.map +1 -1
- package/dist/store/sync/sealer.js +532 -58
- package/dist/store/sync/sealer.js.map +1 -1
- package/dist/store/sync/sequencing.d.ts +175 -0
- package/dist/store/sync/sequencing.d.ts.map +1 -0
- package/dist/store/sync/sequencing.js +295 -0
- package/dist/store/sync/sequencing.js.map +1 -0
- package/dist/store/sync/structural.d.ts +30 -2
- package/dist/store/sync/structural.d.ts.map +1 -1
- package/dist/store/sync/structural.js +64 -2
- package/dist/store/sync/structural.js.map +1 -1
- package/dist/store/sync/timestamp-canon.d.ts +44 -0
- package/dist/store/sync/timestamp-canon.d.ts.map +1 -0
- package/dist/store/sync/timestamp-canon.js +102 -0
- package/dist/store/sync/timestamp-canon.js.map +1 -0
- package/dist/store/sync/timestamps.d.ts +1 -30
- package/dist/store/sync/timestamps.d.ts.map +1 -1
- package/dist/store/sync/timestamps.js +2 -89
- package/dist/store/sync/timestamps.js.map +1 -1
- package/dist/store/sync/trigger-classes.d.ts +8 -0
- package/dist/store/sync/trigger-classes.d.ts.map +1 -1
- package/dist/store/sync/trigger-classes.js +13 -0
- package/dist/store/sync/trigger-classes.js.map +1 -1
- package/dist/store/sync/write-actor.d.ts +58 -0
- package/dist/store/sync/write-actor.d.ts.map +1 -0
- package/dist/store/sync/write-actor.js +67 -0
- package/dist/store/sync/write-actor.js.map +1 -0
- package/dist/store/table-classification.d.ts +27 -0
- package/dist/store/table-classification.d.ts.map +1 -1
- package/dist/store/table-classification.js +116 -0
- package/dist/store/table-classification.js.map +1 -1
- package/dist/store/task-claim.d.ts +1 -1
- package/dist/store/task-claim.d.ts.map +1 -1
- package/dist/store/task-claim.js +1 -1
- package/dist/store/task-claim.js.map +1 -1
- package/dist/store/task-reference-columns.d.ts +27 -0
- package/dist/store/task-reference-columns.d.ts.map +1 -0
- package/dist/store/task-reference-columns.js +65 -0
- package/dist/store/task-reference-columns.js.map +1 -0
- package/dist/store/task-version.d.ts +1 -1
- package/dist/store/task-version.d.ts.map +1 -1
- package/dist/store/task-version.js +1 -1
- package/dist/store/task-version.js.map +1 -1
- package/dist/store/tasks-schema.d.ts +2 -1
- package/dist/store/tasks-schema.d.ts.map +1 -1
- package/dist/store/tasks-schema.js +5 -4
- package/dist/store/tasks-schema.js.map +1 -1
- package/dist/store/tasks-sqlite.d.ts +1 -1
- package/dist/store/tasks-sqlite.d.ts.map +1 -1
- package/dist/store/tasks-sqlite.js +3 -1
- package/dist/store/tasks-sqlite.js.map +1 -1
- package/dist/store/twin-collapse.d.ts +43 -14
- package/dist/store/twin-collapse.d.ts.map +1 -1
- package/dist/store/twin-collapse.js +373 -32
- package/dist/store/twin-collapse.js.map +1 -1
- package/dist/store/validation-schemas.d.ts +44 -674
- package/dist/store/validation-schemas.d.ts.map +1 -1
- package/dist/store/validation-schemas.js +2 -22
- package/dist/store/validation-schemas.js.map +1 -1
- package/dist/store/vault-manifest.d.ts +6 -2
- package/dist/store/vault-manifest.d.ts.map +1 -1
- package/dist/store/vault-manifest.js +10 -3
- package/dist/store/vault-manifest.js.map +1 -1
- package/dist/store/worktree-build-guard.js +1 -1
- package/dist/store/worktree-build-guard.js.map +1 -1
- package/dist/store/worktree-isolation-guard.js +1 -1
- package/dist/store/worktree-isolation-guard.js.map +1 -1
- package/dist/store/writer-lease.d.ts.map +1 -1
- package/dist/store/writer-lease.js +1 -11
- package/dist/store/writer-lease.js.map +1 -1
- package/dist/store/zod-schema-factory.d.ts +16 -0
- package/dist/store/zod-schema-factory.d.ts.map +1 -0
- package/dist/store/zod-schema-factory.js +23 -0
- package/dist/store/zod-schema-factory.js.map +1 -0
- package/dist/system/backup.d.ts +106 -0
- package/dist/system/backup.d.ts.map +1 -1
- package/dist/system/backup.js +295 -19
- package/dist/system/backup.js.map +1 -1
- package/dist/system/cleanup.js +1 -1
- package/dist/system/cleanup.js.map +1 -1
- package/dist/system/health.d.ts +13 -0
- package/dist/system/health.d.ts.map +1 -1
- package/dist/system/health.js +96 -1
- package/dist/system/health.js.map +1 -1
- package/dist/system/labels.js +1 -1
- package/dist/system/labels.js.map +1 -1
- package/dist/system/migrate.js +1 -1
- package/dist/system/migrate.js.map +1 -1
- package/dist/system/safestop.d.ts.map +1 -1
- package/dist/system/safestop.js +1 -1
- package/dist/system/safestop.js.map +1 -1
- package/dist/task-work/current.d.ts +34 -0
- package/dist/task-work/current.d.ts.map +1 -0
- package/dist/task-work/current.js +34 -0
- package/dist/task-work/current.js.map +1 -0
- package/dist/task-work/index.d.ts +2 -19
- package/dist/task-work/index.d.ts.map +1 -1
- package/dist/task-work/index.js +6 -20
- package/dist/task-work/index.js.map +1 -1
- package/dist/tasks/ac-identity.d.ts +28 -0
- package/dist/tasks/ac-identity.d.ts.map +1 -0
- package/dist/tasks/ac-identity.js +43 -0
- package/dist/tasks/ac-identity.js.map +1 -0
- package/dist/tasks/ac-immutability.d.ts +1 -1
- package/dist/tasks/ac-immutability.d.ts.map +1 -1
- package/dist/tasks/ac-immutability.js +1 -1
- package/dist/tasks/ac-immutability.js.map +1 -1
- package/dist/tasks/ac-table.d.ts +2 -14
- package/dist/tasks/ac-table.d.ts.map +1 -1
- package/dist/tasks/ac-table.js +6 -29
- package/dist/tasks/ac-table.js.map +1 -1
- package/dist/tasks/acceptance-input.js +1 -1
- package/dist/tasks/acceptance-input.js.map +1 -1
- package/dist/tasks/add.d.ts.map +1 -1
- package/dist/tasks/add.js +3 -1
- package/dist/tasks/add.js.map +1 -1
- package/dist/tasks/affected-packages.d.ts +100 -19
- package/dist/tasks/affected-packages.d.ts.map +1 -1
- package/dist/tasks/affected-packages.js +169 -32
- package/dist/tasks/affected-packages.js.map +1 -1
- package/dist/tasks/affected-template.d.ts +93 -0
- package/dist/tasks/affected-template.d.ts.map +1 -0
- package/dist/tasks/affected-template.js +198 -0
- package/dist/tasks/affected-template.js.map +1 -0
- package/dist/tasks/archive.d.ts.map +1 -1
- package/dist/tasks/archive.js +1 -1
- package/dist/tasks/archive.js.map +1 -1
- package/dist/tasks/axis-filters.d.ts.map +1 -1
- package/dist/tasks/axis-filters.js +2 -1
- package/dist/tasks/axis-filters.js.map +1 -1
- package/dist/tasks/child-disposition.js +1 -1
- package/dist/tasks/child-disposition.js.map +1 -1
- package/dist/tasks/collection.js +1 -1
- package/dist/tasks/collection.js.map +1 -1
- package/dist/tasks/command-line.d.ts +4 -1
- package/dist/tasks/command-line.d.ts.map +1 -1
- package/dist/tasks/command-line.js +7 -2
- package/dist/tasks/command-line.js.map +1 -1
- package/dist/tasks/complete.d.ts.map +1 -1
- package/dist/tasks/complete.js +2 -1
- package/dist/tasks/complete.js.map +1 -1
- package/dist/tasks/decompose.js +1 -1
- package/dist/tasks/decompose.js.map +1 -1
- package/dist/tasks/delete.js +1 -1
- package/dist/tasks/delete.js.map +1 -1
- package/dist/tasks/done-plan.d.ts +2 -1
- package/dist/tasks/done-plan.d.ts.map +1 -1
- package/dist/tasks/done-plan.js +21 -21
- package/dist/tasks/done-plan.js.map +1 -1
- package/dist/tasks/done-record.d.ts +1 -1
- package/dist/tasks/done-record.d.ts.map +1 -1
- package/dist/tasks/done-record.js +1 -1
- package/dist/tasks/done-record.js.map +1 -1
- package/dist/tasks/duplicate-detector.d.ts.map +1 -1
- package/dist/tasks/duplicate-detector.js +11 -5
- package/dist/tasks/duplicate-detector.js.map +1 -1
- package/dist/tasks/enforcement.d.ts +2 -1
- package/dist/tasks/enforcement.d.ts.map +1 -1
- package/dist/tasks/enforcement.js +1 -1
- package/dist/tasks/enforcement.js.map +1 -1
- package/dist/tasks/engine-wrap-ops.js +1 -1
- package/dist/tasks/engine-wrap-ops.js.map +1 -1
- package/dist/tasks/engine-wrap.d.ts.map +1 -1
- package/dist/tasks/engine-wrap.js +7 -3
- package/dist/tasks/engine-wrap.js.map +1 -1
- package/dist/tasks/epic-enforcement.js +1 -1
- package/dist/tasks/epic-enforcement.js.map +1 -1
- package/dist/tasks/evidence.d.ts.map +1 -1
- package/dist/tasks/evidence.js +216 -20
- package/dist/tasks/evidence.js.map +1 -1
- package/dist/tasks/find.js +1 -1
- package/dist/tasks/find.js.map +1 -1
- package/dist/tasks/gate-result-cache.js +1 -1
- package/dist/tasks/gate-result-cache.js.map +1 -1
- package/dist/tasks/gate-runner.d.ts.map +1 -1
- package/dist/tasks/gate-runner.js +1 -1
- package/dist/tasks/gate-runner.js.map +1 -1
- package/dist/tasks/heavy-tool-env.d.ts +454 -19
- package/dist/tasks/heavy-tool-env.d.ts.map +1 -1
- package/dist/tasks/heavy-tool-env.js +818 -42
- package/dist/tasks/heavy-tool-env.js.map +1 -1
- package/dist/tasks/index.d.ts +3 -3
- package/dist/tasks/index.d.ts.map +1 -1
- package/dist/tasks/index.js +3 -3
- package/dist/tasks/index.js.map +1 -1
- package/dist/tasks/labels.js +1 -1
- package/dist/tasks/labels.js.map +1 -1
- package/dist/tasks/nexus-impact-gate.js +1 -1
- package/dist/tasks/nexus-impact-gate.js.map +1 -1
- package/dist/tasks/pipeline-stage.js +1 -1
- package/dist/tasks/pipeline-stage.js.map +1 -1
- package/dist/tasks/population.js +1 -1
- package/dist/tasks/population.js.map +1 -1
- package/dist/tasks/ranking-audit.js +1 -1
- package/dist/tasks/ranking-audit.js.map +1 -1
- package/dist/tasks/reconcile-scope.js +1 -1
- package/dist/tasks/reconcile-scope.js.map +1 -1
- package/dist/tasks/relates.js +1 -1
- package/dist/tasks/relates.js.map +1 -1
- package/dist/tasks/req.d.ts.map +1 -1
- package/dist/tasks/req.js +2 -1
- package/dist/tasks/req.js.map +1 -1
- package/dist/tasks/severity-attestation.d.ts +1 -1
- package/dist/tasks/severity-attestation.d.ts.map +1 -1
- package/dist/tasks/severity-attestation.js +1 -1
- package/dist/tasks/severity-attestation.js.map +1 -1
- package/dist/tasks/show.d.ts.map +1 -1
- package/dist/tasks/show.js +47 -3
- package/dist/tasks/show.js.map +1 -1
- package/dist/tasks/task-import.js +1 -1
- package/dist/tasks/task-import.js.map +1 -1
- package/dist/tasks/task-reparent.d.ts.map +1 -1
- package/dist/tasks/task-reparent.js +2 -1
- package/dist/tasks/task-reparent.js.map +1 -1
- package/dist/tasks/test-run-binding.d.ts.map +1 -1
- package/dist/tasks/test-run-binding.js +9 -2
- package/dist/tasks/test-run-binding.js.map +1 -1
- package/dist/tasks/tool-cache-env.d.ts +20 -13
- package/dist/tasks/tool-cache-env.d.ts.map +1 -1
- package/dist/tasks/tool-cache-env.js +27 -48
- package/dist/tasks/tool-cache-env.js.map +1 -1
- package/dist/tasks/tool-cache.d.ts +30 -7
- package/dist/tasks/tool-cache.d.ts.map +1 -1
- package/dist/tasks/tool-cache.js +74 -20
- package/dist/tasks/tool-cache.js.map +1 -1
- package/dist/tasks/tool-resolver.d.ts +8 -0
- package/dist/tasks/tool-resolver.d.ts.map +1 -1
- package/dist/tasks/tool-resolver.js +15 -1
- package/dist/tasks/tool-resolver.js.map +1 -1
- package/dist/tasks/tool-runner-guard.d.ts +131 -0
- package/dist/tasks/tool-runner-guard.d.ts.map +1 -0
- package/dist/tasks/tool-runner-guard.js +141 -0
- package/dist/tasks/tool-runner-guard.js.map +1 -0
- package/dist/tasks/tool-semaphore.d.ts +106 -302
- package/dist/tasks/tool-semaphore.d.ts.map +1 -1
- package/dist/tasks/tool-semaphore.js +132 -558
- package/dist/tasks/tool-semaphore.js.map +1 -1
- package/dist/tasks/update.d.ts.map +1 -1
- package/dist/tasks/update.js +2 -1
- package/dist/tasks/update.js.map +1 -1
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/upgrade.js +35 -31
- package/dist/upgrade.js.map +1 -1
- package/dist/validation/doctor/checks.d.ts +41 -0
- package/dist/validation/doctor/checks.d.ts.map +1 -1
- package/dist/validation/doctor/checks.js +251 -0
- 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/engine-ops.js +1 -1
- package/dist/validation/engine-ops.js.map +1 -1
- package/dist/validation/engine.d.ts +1 -1
- package/dist/validation/engine.d.ts.map +1 -1
- package/dist/validation/engine.js +2 -1
- package/dist/validation/engine.js.map +1 -1
- package/dist/validation/index.d.ts +1 -1
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +1 -1
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/operation-gate-validators.js +1 -1
- package/dist/validation/operation-gate-validators.js.map +1 -1
- package/dist/validation/protocol-common.js +1 -1
- package/dist/validation/protocol-common.js.map +1 -1
- package/dist/validation/protocols/_shared.js +1 -1
- package/dist/validation/protocols/_shared.js.map +1 -1
- package/dist/validation/validate-ops.js +1 -1
- package/dist/validation/validate-ops.js.map +1 -1
- package/dist/validation/verification.js +1 -1
- package/dist/validation/verification.js.map +1 -1
- package/dist/workgraph/index.d.ts +1 -1
- package/dist/workgraph/index.d.ts.map +1 -1
- package/dist/workgraph/index.js +1 -1
- package/dist/workgraph/index.js.map +1 -1
- package/dist/workgraph/reparent-preflight.d.ts +1 -2
- package/dist/workgraph/reparent-preflight.d.ts.map +1 -1
- package/dist/workgraph/reparent-preflight.js +1 -1
- package/dist/workgraph/reparent-preflight.js.map +1 -1
- package/dist/workgraph/scaffold-validate.js +1 -1
- package/dist/workgraph/scaffold-validate.js.map +1 -1
- package/dist/worktree/force-unlock.d.ts +1 -1
- package/dist/worktree/force-unlock.d.ts.map +1 -1
- package/dist/worktree/force-unlock.js +1 -1
- package/dist/worktree/force-unlock.js.map +1 -1
- package/dist/worktree/isolation.d.ts +1 -1
- package/dist/worktree/isolation.d.ts.map +1 -1
- package/dist/worktree/isolation.js +1 -1
- package/dist/worktree/isolation.js.map +1 -1
- package/dist/worktree/list.d.ts +1 -1
- package/dist/worktree/list.d.ts.map +1 -1
- package/dist/worktree/list.js +1 -1
- package/dist/worktree/list.js.map +1 -1
- package/dist/worktree/prune.d.ts +1 -1
- package/dist/worktree/prune.d.ts.map +1 -1
- package/dist/worktree/prune.js +1 -1
- package/dist/worktree/prune.js.map +1 -1
- package/dist/worktree/worktree-adopt.d.ts +1 -2
- package/dist/worktree/worktree-adopt.d.ts.map +1 -1
- package/dist/worktree/worktree-adopt.js +1 -1
- package/dist/worktree/worktree-adopt.js.map +1 -1
- package/migrations/sync-journal/20261004120000_t12757-apply-intent/migration.sql +21 -0
- package/migrations/sync-journal/20261005120000_t12344-inbox/migration.sql +67 -0
- package/migrations/sync-journal/20261006120000_t13193-rebase-undo/migration.sql +51 -0
- package/migrations/sync-journal/20261006130000_t13193-rebase-state/migration.sql +17 -0
- package/migrations/sync-journal/20261006140000_t13193-held-rows/migration.sql +24 -0
- package/package.json +13 -13
- package/schemas/project-context.schema.json +19 -1
- package/templates/CLEO-INJECTION.md +11 -11
- package/templates/CLEO-REFERENCE.md +2 -2
- package/templates/workflows/release-prepare.yml.tmpl +10 -10
|
@@ -52,22 +52,26 @@
|
|
|
52
52
|
import { existsSync, mkdirSync } from 'node:fs';
|
|
53
53
|
import { createRequire } from 'node:module';
|
|
54
54
|
import { dirname, join, resolve } from 'node:path';
|
|
55
|
-
import { ExitCode } from '@cleocode/contracts';
|
|
55
|
+
import { ExitCode } from '@cleocode/contracts/exit-codes.js';
|
|
56
56
|
import { isVaultRemotePath } from '@cleocode/paths';
|
|
57
57
|
import { CleoError } from '../errors.js';
|
|
58
58
|
import { getLogger } from '../logger.js';
|
|
59
59
|
import { getCleoHome, resolveCleoDir } from '../paths.js';
|
|
60
60
|
import { worktreeScope } from '../project-scope.js';
|
|
61
61
|
import { observeOperation } from './background-ops.js';
|
|
62
|
-
import {
|
|
62
|
+
import { loadNodeSqliteDrizzle } from './drizzle-node-sqlite.js';
|
|
63
|
+
import { EXODUS_DEFERRED_FIX, ExodusAbortWriteUnsafeError, ExodusGuardFailedError, ExodusRunInProgressError, exodusRefusalMessage, exodusRunActiveElsewhere, getRecordedExodusAbort, } from './exodus/abort-events.js';
|
|
64
|
+
import { installExodusWriteGuard, peekExodusWriteGuard } from './exodus/write-guard.js';
|
|
63
65
|
import { ForeignKeysNotRestoredError, migrateBracketed } from './migration-runner.js';
|
|
64
66
|
import { assertStoreNotRelocated } from './relocated-store-guard.js';
|
|
65
67
|
import { resolveConsolidatedJournalSiblings, resolveCorePackageMigrationsFolder, } from './resolve-migrations-folder.js';
|
|
66
|
-
import {
|
|
68
|
+
import { openUnlessRestoring } from './restore-marker.js';
|
|
69
|
+
import { healRowIdentitySchema, missingRowIdentitySchema, ROW_IDENTITY, registerRowUidFunction, rowIdentityFillPending, } from './row-identity.js';
|
|
67
70
|
import { rowUidFillEnabled } from './row-identity-flag.js';
|
|
68
71
|
import { applyPerfPragmas } from './sqlite-pragmas.js';
|
|
69
|
-
import {
|
|
72
|
+
import { syncCaptureOpenPass } from './sync/capture.js';
|
|
70
73
|
import { prepareRowIdentityUnderCapture } from './sync/identity-fill.js';
|
|
74
|
+
import { syncMigrationHooks } from './sync/migration-hooks.js';
|
|
71
75
|
import { ensureTriggerSuspendTable, verifyOwnedTriggers } from './sync/trigger-classes.js';
|
|
72
76
|
import { assertWriterVersion } from './sync/writer-version.js';
|
|
73
77
|
import { explainSchemaWriteDenial, installSchemaWriteGuard } from './worktree-build-guard.js';
|
|
@@ -95,48 +99,9 @@ export function getDualScopeNativeDb(handle) {
|
|
|
95
99
|
return db.$client;
|
|
96
100
|
throw new Error(`No native SQLite connection for ${handle.scope}::${handle.dbPath}`);
|
|
97
101
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
* ABORTED (T11828 · DHQ-059).
|
|
102
|
-
*
|
|
103
|
-
* The consolidated `cleo.db` is internally consistent but EMPTY: the user's real
|
|
104
|
-
* data is still in the legacy fleet (kept as the source of truth). Writing here
|
|
105
|
-
* would land in a DB that does not reflect that data, so the write is NOT durable
|
|
106
|
-
* against the source of truth. Read paths never raise this — they intentionally
|
|
107
|
-
* skip {@link assertWriteDurable} and operate on the empty-but-consistent DB.
|
|
108
|
-
*
|
|
109
|
-
* Self-contained (mirrors `BackupRecoverError`) rather than a `CleoError` subclass
|
|
110
|
-
* so the store layer does not need a new numeric `ExitCode` in `@cleocode/contracts`
|
|
111
|
-
* for a condition that is surfaced structurally on the handle.
|
|
112
|
-
*
|
|
113
|
-
* @task T11828
|
|
114
|
-
* @epic T11833
|
|
115
|
-
* @saga T11242
|
|
116
|
-
* @public
|
|
117
|
-
*/
|
|
118
|
-
export class ExodusAbortWriteUnsafeError extends Error {
|
|
119
|
-
/** Stable string error code for envelope `codeName` / log correlation. */
|
|
120
|
-
codeName = 'E_EXODUS_ABORT_WRITE_UNSAFE';
|
|
121
|
-
/** The structured abort detail carried by the handle. */
|
|
122
|
-
detail;
|
|
123
|
-
/** Remediation hint surfaced to the operator. */
|
|
124
|
-
fix;
|
|
125
|
-
/**
|
|
126
|
-
* @param detail - The {@link ExodusAbortDetail} stamped on the handle.
|
|
127
|
-
*/
|
|
128
|
-
constructor(detail) {
|
|
129
|
-
super(`Refusing to write to consolidated ${detail.scope} cleo.db — exodus-on-open ABORTED ` +
|
|
130
|
-
`(${detail.reason}). The DB is empty; legacy data is the source of truth. ` +
|
|
131
|
-
`Run \`cleo doctor exodus-health\` then \`cleo exodus migrate\` (or restore via ` +
|
|
132
|
-
`\`cleo doctor repair --role ${detail.scope === 'project' ? 'tasks' : 'nexus'}\`) before writing.`);
|
|
133
|
-
this.name = 'ExodusAbortWriteUnsafeError';
|
|
134
|
-
this.detail = detail;
|
|
135
|
-
this.fix =
|
|
136
|
-
'Resolve the aborted migration (`cleo doctor exodus-health` → `cleo exodus migrate`) ' +
|
|
137
|
-
'so the consolidated cleo.db carries your data before mutating it.';
|
|
138
|
-
}
|
|
139
|
-
}
|
|
102
|
+
// The refusal error lives with the abort records (exodus/abort-events.ts), a
|
|
103
|
+
// light module the CORE error converters can import (T13167).
|
|
104
|
+
export { ExodusAbortWriteUnsafeError };
|
|
140
105
|
/**
|
|
141
106
|
* Assert that a {@link DualScopeDbHandle} is safe to WRITE through.
|
|
142
107
|
*
|
|
@@ -171,23 +136,230 @@ export function assertWriteDurable(handle) {
|
|
|
171
136
|
}
|
|
172
137
|
}
|
|
173
138
|
/**
|
|
174
|
-
* Throw {@link ExodusAbortWriteUnsafeError} when
|
|
175
|
-
*
|
|
139
|
+
* Throw {@link ExodusAbortWriteUnsafeError} when the store behind `db` cannot be
|
|
140
|
+
* written durably: its exodus-on-open migration is deferred (an active guard on
|
|
141
|
+
* this connection) or aborted (a recorded abort for this store's path).
|
|
176
142
|
*
|
|
177
143
|
* Used by the consolidated-schema MUTATION primitives ({@link insertIdempotent} /
|
|
178
144
|
* {@link upsertIdempotent}) which do not receive the originating
|
|
179
|
-
* {@link DualScopeDbHandle}
|
|
180
|
-
*
|
|
181
|
-
*
|
|
145
|
+
* {@link DualScopeDbHandle}. T13158: matched to the store being written, so a
|
|
146
|
+
* deferral or abort on one store never refuses another. When the store cannot
|
|
147
|
+
* be identified, any recorded abort refuses (the T11828 behaviour). Read paths
|
|
148
|
+
* never call these primitives, so the guard is write-only.
|
|
182
149
|
*
|
|
183
|
-
* @
|
|
150
|
+
* @param db - The drizzle handle about to be written.
|
|
151
|
+
* @throws {ExodusAbortWriteUnsafeError} When that store cannot be written durably.
|
|
184
152
|
* @internal
|
|
185
153
|
* @task T11828
|
|
154
|
+
* @task T13158
|
|
186
155
|
*/
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
156
|
+
// biome-ignore lint/suspicious/noExplicitAny: accepts both project and global schema handles
|
|
157
|
+
async function assertNoExodusRefusal(db) {
|
|
158
|
+
const native = '$client' in db && db.$client instanceof getDatabaseSyncCtor() ? db.$client : null;
|
|
159
|
+
const path = native?.location() ?? null;
|
|
160
|
+
if (native === null || path === null) {
|
|
161
|
+
const detail = getRecordedExodusAbort();
|
|
162
|
+
// @sync-invariant none:local-only this store's own legacy migration aborted or is pending; never replicated
|
|
163
|
+
if (detail)
|
|
164
|
+
throw new ExodusAbortWriteUnsafeError(detail);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
await assertExodusWriteSafe(native);
|
|
168
|
+
for (const scope of ['project', 'global']) {
|
|
169
|
+
const detail = getRecordedExodusAbort(scope);
|
|
170
|
+
if (detail && detail.kind !== 'deferred' && resolve(detail.dbPath) === resolve(path)) {
|
|
171
|
+
// @sync-invariant none:local-only this store's own legacy migration aborted; never replicated
|
|
172
|
+
throw new ExodusAbortWriteUnsafeError(detail);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
// ── Deferred exodus-on-open (T13158) ─────────────────────────────────────────
|
|
177
|
+
/**
|
|
178
|
+
* Refuse a write through `nativeDb` while that store still owes its legacy
|
|
179
|
+
* migration: exodus-on-open was deferred or aborted while legacy rows wait
|
|
180
|
+
* (T13158, T13167).
|
|
181
|
+
*
|
|
182
|
+
* The production write chokepoints call this first (the task accessor's write
|
|
183
|
+
* transaction, session creation, {@link insertIdempotent},
|
|
184
|
+
* {@link upsertIdempotent}), so the caller gets the typed
|
|
185
|
+
* {@link ExodusAbortWriteUnsafeError} and its remedy rather than a wrapped
|
|
186
|
+
* SQLite trigger error. The guard is per connection, so one store's refusal
|
|
187
|
+
* never refuses another. Once the scope's anchor table has rows (the migration
|
|
188
|
+
* or a reconcile ran, in this process or another) the guard lifts and writes
|
|
189
|
+
* proceed. The temp triggers remain the backstop for every other write path.
|
|
190
|
+
*
|
|
191
|
+
* @param nativeDb - The connection about to be written.
|
|
192
|
+
* @throws {ExodusAbortWriteUnsafeError} When that store still owes its migration.
|
|
193
|
+
* @example
|
|
194
|
+
* ```ts
|
|
195
|
+
* await assertExodusWriteSafe(nativeDb);
|
|
196
|
+
* ```
|
|
197
|
+
* @task T13158
|
|
198
|
+
* @task T13167
|
|
199
|
+
*/
|
|
200
|
+
export async function assertExodusWriteSafe(nativeDb) {
|
|
201
|
+
const { activeExodusWriteGuard } = await import('./exodus/write-guard.js');
|
|
202
|
+
const guard = activeExodusWriteGuard(nativeDb);
|
|
203
|
+
if (guard !== undefined) {
|
|
204
|
+
// @sync-invariant none:local-only this store's own legacy migration is pending or aborted; never replicated
|
|
205
|
+
throw new ExodusAbortWriteUnsafeError(guard.detail);
|
|
206
|
+
}
|
|
207
|
+
// T12785: another process is copying legacy rows into this store.
|
|
208
|
+
const path = nativeDb.location();
|
|
209
|
+
if (path !== null && exodusRunActiveElsewhere(path)) {
|
|
210
|
+
// @sync-invariant none:local-only another local process runs this store's legacy migration or reconcile; never replicated
|
|
211
|
+
throw new ExodusRunInProgressError(path);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/** Default bound on how long an open waits for the exodus `db-heavy` slot. */
|
|
215
|
+
const EXODUS_ADMISSION_WAIT_MS = 5_000;
|
|
216
|
+
/**
|
|
217
|
+
* How long an open waits for `db-heavy` before deferring its exodus migration:
|
|
218
|
+
* `CLEO_EXODUS_ADMISSION_WAIT_MS` (0–60000), else 5 s. Memory pressure defers at
|
|
219
|
+
* once regardless; the wait covers a slot another heavy op holds.
|
|
220
|
+
*/
|
|
221
|
+
function exodusAdmissionWaitMs() {
|
|
222
|
+
const raw = process.env['CLEO_EXODUS_ADMISSION_WAIT_MS'];
|
|
223
|
+
if (raw === undefined || raw.trim() === '')
|
|
224
|
+
return EXODUS_ADMISSION_WAIT_MS;
|
|
225
|
+
const ms = Number(raw);
|
|
226
|
+
return Number.isInteger(ms) && ms >= 0 && ms <= 60_000 ? ms : EXODUS_ADMISSION_WAIT_MS;
|
|
227
|
+
}
|
|
228
|
+
/** The anchor table whose first row marks a scope's store as populated. */
|
|
229
|
+
function exodusAnchorTable(scope) {
|
|
230
|
+
return scope === 'project' ? 'tasks_tasks' : 'nexus_project_registry';
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Guard a store that owes its legacy migration (T13158, T13167).
|
|
234
|
+
*
|
|
235
|
+
* When this scope's legacy sources hold rows, every INSERT into a table the
|
|
236
|
+
* migration fills is refused on this connection while the anchor table is
|
|
237
|
+
* empty (`E_EXODUS_DEFERRED_WRITE_UNSAFE` or `E_EXODUS_ABORT_WRITE_UNSAFE`,
|
|
238
|
+
* remedy included), and the refusal is recorded. Every handle on the
|
|
239
|
+
* connection reports it as `exodusAbort`. Called before a pending migration's
|
|
240
|
+
* handle is published (`deferred`), and on an `aborted` outcome.
|
|
241
|
+
*
|
|
242
|
+
* @param nativeDb - The handle's native connection.
|
|
243
|
+
* @param scope - The scope.
|
|
244
|
+
* @param dbPath - The consolidated store.
|
|
245
|
+
* @param cwd - Working directory used to resolve the project root.
|
|
246
|
+
* @param kind - `deferred` (not run yet) or `aborted`.
|
|
247
|
+
* @param reason - Why no migration has run, or why it aborted.
|
|
248
|
+
* @returns `true` when a guard was installed (legacy rows wait).
|
|
249
|
+
*/
|
|
250
|
+
async function guardStrandedStore(nativeDb, scope, dbPath, cwd, kind, reason) {
|
|
251
|
+
const log = getLogger('dual-scope-db');
|
|
252
|
+
const { pendingExodusTargets } = await import('./exodus/write-guard.js');
|
|
253
|
+
let sources;
|
|
254
|
+
let tables;
|
|
255
|
+
let sentinels = {};
|
|
256
|
+
try {
|
|
257
|
+
({ sources, tables, sentinels } = await pendingExodusTargets(scope, cwd));
|
|
258
|
+
}
|
|
259
|
+
catch (err) {
|
|
260
|
+
// The legacy files could not be read: assume they hold rows and protect the
|
|
261
|
+
// anchor table, whose first row would stop the migration for good.
|
|
262
|
+
log.warn({ err, scope, kind }, 'exodus-on-open: legacy sources could not be assessed');
|
|
263
|
+
sources = ['legacy stores (unreadable)'];
|
|
264
|
+
tables = [exodusAnchorTable(scope)];
|
|
265
|
+
}
|
|
266
|
+
if (sources.length === 0)
|
|
267
|
+
return false;
|
|
268
|
+
const detail = strandedDetail(scope, dbPath, kind, reason, sources);
|
|
269
|
+
let markerPath = null;
|
|
270
|
+
try {
|
|
271
|
+
const { exodusMarkerPath } = await import('./exodus/archive.js');
|
|
272
|
+
markerPath = exodusMarkerPath(scope, cwd, dbPath);
|
|
273
|
+
}
|
|
274
|
+
catch {
|
|
275
|
+
// No marker location: the guard lifts on the anchor alone.
|
|
276
|
+
}
|
|
277
|
+
installExodusWriteGuard(nativeDb, {
|
|
278
|
+
anchor: exodusAnchorTable(scope),
|
|
279
|
+
tables: [...new Set([...tables, exodusAnchorTable(scope)])],
|
|
280
|
+
sentinels,
|
|
281
|
+
sources,
|
|
282
|
+
markerPath,
|
|
283
|
+
detail,
|
|
284
|
+
}, exodusRefusalMessage(scope, detail.reason, kind));
|
|
285
|
+
const { emitExodusAbort } = await import('./exodus/abort-events.js');
|
|
286
|
+
emitExodusAbort(detail);
|
|
287
|
+
return true;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Last-resort guard for a store that owes a migration, used when
|
|
291
|
+
* {@link guardStrandedStore} throws: refuse INSERTs into the scope's anchor
|
|
292
|
+
* table, whose first row would stop the migration for good. A guard that is
|
|
293
|
+
* already installed is kept, since it covers more tables.
|
|
294
|
+
*
|
|
295
|
+
* @param nativeDb - The handle's native connection.
|
|
296
|
+
* @param scope - The scope.
|
|
297
|
+
* @param dbPath - The consolidated store.
|
|
298
|
+
* @param kind - `deferred` (not run yet) or `aborted`.
|
|
299
|
+
* @param reason - Why no migration has run, or why it aborted.
|
|
300
|
+
* @throws {ExodusGuardFailedError} When not even the anchor trigger can be
|
|
301
|
+
* installed: the open is refused rather than publishing a store any write
|
|
302
|
+
* (raw SQL included) could strand (T13171).
|
|
303
|
+
*/
|
|
304
|
+
function guardAnchorOnly(nativeDb, scope, dbPath, kind, reason) {
|
|
305
|
+
if (peekExodusWriteGuard(nativeDb) !== undefined)
|
|
306
|
+
return;
|
|
307
|
+
const anchor = exodusAnchorTable(scope);
|
|
308
|
+
const sources = ['stores'];
|
|
309
|
+
const detail = strandedDetail(scope, dbPath, kind, reason, sources);
|
|
310
|
+
try {
|
|
311
|
+
installExodusWriteGuard(nativeDb, { anchor, tables: [anchor], sources, markerPath: null, detail }, exodusRefusalMessage(scope, detail.reason, kind));
|
|
312
|
+
}
|
|
313
|
+
catch (err) {
|
|
314
|
+
getLogger('dual-scope-db').error({ err, scope }, 'exodus-on-open: the store could not be guarded before its migration; refusing the open');
|
|
315
|
+
// @sync-invariant none:local-only this store's own legacy migration could not be guarded; never replicated
|
|
316
|
+
throw new ExodusGuardFailedError(scope, err);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
/** The refusal detail for a store that owes the migration of `sources`. */
|
|
320
|
+
function strandedDetail(scope, dbPath, kind, reason, sources) {
|
|
321
|
+
return {
|
|
322
|
+
scope,
|
|
323
|
+
dbPath,
|
|
324
|
+
reason: `${reason}; legacy ${sources.join(', ')} still hold rows`,
|
|
325
|
+
at: Date.now(),
|
|
326
|
+
kind,
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Record why a guarded store's migration was deferred this open (T13158):
|
|
331
|
+
* the refusal detail takes the governor's reason, the deferral is logged with
|
|
332
|
+
* it, and readers get a `W_EXODUS_DEFERRED` warning.
|
|
333
|
+
*
|
|
334
|
+
* @param nativeDb - The guarded connection.
|
|
335
|
+
* @param scope - The deferred scope.
|
|
336
|
+
* @param dbPath - The consolidated store.
|
|
337
|
+
* @param deferral - The governor's reason for deferring.
|
|
338
|
+
*/
|
|
339
|
+
async function announceDeferredExodus(nativeDb, scope, dbPath, deferral) {
|
|
340
|
+
const log = getLogger('dual-scope-db');
|
|
341
|
+
const { activeExodusWriteGuard } = await import('./exodus/write-guard.js');
|
|
342
|
+
const guard = activeExodusWriteGuard(nativeDb);
|
|
343
|
+
if (guard === undefined)
|
|
344
|
+
return;
|
|
345
|
+
const detail = strandedDetail(scope, dbPath, 'deferred', deferral, guard.sources);
|
|
346
|
+
guard.detail = detail;
|
|
347
|
+
const { emitExodusAbort } = await import('./exodus/abort-events.js');
|
|
348
|
+
emitExodusAbort(detail);
|
|
349
|
+
log.warn({ scope, dbPath, reason: deferral, sources: guard.sources, guardedTables: guard.tables.length }, 'exodus-on-open deferred: the store is empty while legacy rows wait; writes to the ' +
|
|
350
|
+
'tables the migration fills are refused until it runs (T13158)');
|
|
351
|
+
try {
|
|
352
|
+
const { pushWarning } = await import('../output.js');
|
|
353
|
+
pushWarning({
|
|
354
|
+
// @sync-invariant none:local-only a read warning about this store's pending legacy migration
|
|
355
|
+
code: 'W_EXODUS_DEFERRED',
|
|
356
|
+
message: `The ${scope} store has not been migrated from the legacy stores yet (${deferral}), so ` +
|
|
357
|
+
`results omit the data in ${guard.sources.join(', ')}. Writes are refused until it ` +
|
|
358
|
+
`runs. ${EXODUS_DEFERRED_FIX}`,
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
catch {
|
|
362
|
+
// A warning must never fail the open.
|
|
191
363
|
}
|
|
192
364
|
}
|
|
193
365
|
const _cache = new Map();
|
|
@@ -249,19 +421,10 @@ export function resolveDualScopeDbPath(scope, cwd, capturedGlobalHome) {
|
|
|
249
421
|
function migrationsSetName(scope) {
|
|
250
422
|
return scope === 'project' ? 'drizzle-cleo-project' : 'drizzle-cleo-global';
|
|
251
423
|
}
|
|
252
|
-
// ── Lazy
|
|
253
|
-
//
|
|
254
|
-
//
|
|
255
|
-
// the native binding at module-load time and breaking lazy-init assertions.
|
|
424
|
+
// ── Lazy native loading ──────────────────────────────────────────────────────
|
|
425
|
+
// drizzle's node-sqlite driver loads lazily through ./drizzle-node-sqlite.ts
|
|
426
|
+
// (T11280, T13126). DatabaseSync is lazy too, to avoid an eager node:sqlite pull.
|
|
256
427
|
const _require = createRequire(import.meta.url);
|
|
257
|
-
let _drizzle = null;
|
|
258
|
-
function getDrizzle() {
|
|
259
|
-
if (_drizzle === null) {
|
|
260
|
-
const mod = _require('drizzle-orm/node-sqlite');
|
|
261
|
-
_drizzle = mod.drizzle;
|
|
262
|
-
}
|
|
263
|
-
return _drizzle;
|
|
264
|
-
}
|
|
265
428
|
let _DatabaseSyncCtor = null;
|
|
266
429
|
function getDatabaseSyncCtor() {
|
|
267
430
|
if (_DatabaseSyncCtor === null) {
|
|
@@ -396,7 +559,7 @@ db, migrationsFolder, log, execution) {
|
|
|
396
559
|
}
|
|
397
560
|
}
|
|
398
561
|
execution?.assertActive();
|
|
399
|
-
migrateBracketed(db, nativeDb, migrationsFolder, existenceTable(scope), `dual-scope-db[${scope}]`, resolveConsolidatedJournalSiblings(migrationsSetName(scope)),
|
|
562
|
+
migrateBracketed(db, nativeDb, migrationsFolder, existenceTable(scope), `dual-scope-db[${scope}]`, resolveConsolidatedJournalSiblings(migrationsSetName(scope)), syncMigrationHooks(nativeDb, scope));
|
|
400
563
|
// NEW-6: the handle leaves the schema pass in its configured FK mode.
|
|
401
564
|
assertHandleForeignKeys(nativeDb);
|
|
402
565
|
execution?.assertActive();
|
|
@@ -431,13 +594,27 @@ db, migrationsFolder, log, execution) {
|
|
|
431
594
|
}
|
|
432
595
|
}
|
|
433
596
|
/**
|
|
434
|
-
* Whether
|
|
435
|
-
*
|
|
597
|
+
* Whether the schema pass has row-identity work: identity schema to heal
|
|
598
|
+
* (T12878). A scope with nothing declared has none. The fill is decided after
|
|
599
|
+
* the schema pass by {@link rowIdentityFillPending} (T12341 C1).
|
|
436
600
|
*/
|
|
437
601
|
function identityWorkOnOpen(nativeDb, scope) {
|
|
438
602
|
if (ROW_IDENTITY[scope].length === 0)
|
|
439
603
|
return false;
|
|
440
|
-
return
|
|
604
|
+
return missingRowIdentitySchema(nativeDb).length > 0;
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* The fill's pending work for this open, with the identity SQL functions
|
|
608
|
+
* registered. The chokepoint writers load only when there is work: a store the
|
|
609
|
+
* fill already completed opens without loading `sqlite-data-accessor` (T12341
|
|
610
|
+
* C1; it cost ~170 ms and ~15 MB on every open).
|
|
611
|
+
*/
|
|
612
|
+
async function prepareFillWriters(nativeDb, scope) {
|
|
613
|
+
registerRowUidFunction(nativeDb, scope);
|
|
614
|
+
const pending = rowIdentityFillPending(nativeDb, scope);
|
|
615
|
+
if (pending.length > 0)
|
|
616
|
+
await import('./sqlite-data-accessor.js');
|
|
617
|
+
return pending;
|
|
441
618
|
}
|
|
442
619
|
/**
|
|
443
620
|
* Open a DEDICATED, NON-cached consolidated dual-scope `cleo.db` connection
|
|
@@ -468,7 +645,8 @@ async function openDedicatedDualScopeDb(scope, dbPath, log, execution) {
|
|
|
468
645
|
}
|
|
469
646
|
execution?.assertActive();
|
|
470
647
|
const DatabaseSyncCtor = getDatabaseSyncCtor();
|
|
471
|
-
|
|
648
|
+
// T13258: never open a store file a restore is replacing (before and after the open).
|
|
649
|
+
const nativeDb = openUnlessRestoring(dbPath, () => new DatabaseSyncCtor(dbPath, { allowExtension: true }));
|
|
472
650
|
// Every operation after construction is wrapped so any exception —
|
|
473
651
|
// pragmas, Drizzle wrapping, migration-folder resolution, lease, or
|
|
474
652
|
// migration — closes the native handle before rethrow.
|
|
@@ -478,7 +656,7 @@ async function openDedicatedDualScopeDb(scope, dbPath, log, execution) {
|
|
|
478
656
|
// T12687: a worktree build may not change a foreign store's schema — deny
|
|
479
657
|
// every DDL on this handle before any schema code runs.
|
|
480
658
|
installSchemaWriteGuard(nativeDb);
|
|
481
|
-
const drizzle =
|
|
659
|
+
const drizzle = loadNodeSqliteDrizzle();
|
|
482
660
|
// biome-ignore lint/suspicious/noExplicitAny: dual-scope handle is untyped at construction; typed via DualScopeDbHandle<TScope>
|
|
483
661
|
const db = drizzle({ client: nativeDb });
|
|
484
662
|
const migrationsFolder = resolveCorePackageMigrationsFolder(migrationsSetName(scope));
|
|
@@ -496,9 +674,9 @@ async function openDedicatedDualScopeDb(scope, dbPath, log, execution) {
|
|
|
496
674
|
// writers were loaded there when the fill is on.
|
|
497
675
|
execution?.assertActive();
|
|
498
676
|
if (rowUidFillEnabled() && ROW_IDENTITY[scope].length > 0) {
|
|
499
|
-
await
|
|
677
|
+
const pending = await prepareFillWriters(nativeDb, scope);
|
|
500
678
|
// Uncaptured under sync capture, with its tables marked suspect.
|
|
501
|
-
prepareRowIdentityUnderCapture(nativeDb, scope, { triggers: false });
|
|
679
|
+
prepareRowIdentityUnderCapture(nativeDb, scope, { triggers: false, pending });
|
|
502
680
|
}
|
|
503
681
|
execution?.assertActive();
|
|
504
682
|
log.debug({ scope, dbPath }, 'DEDICATED dual-scope cleo.db ready (T11782 FIX D)');
|
|
@@ -663,6 +841,9 @@ exodusCwd, options) {
|
|
|
663
841
|
(async () => {
|
|
664
842
|
let openingNative = null;
|
|
665
843
|
let published = false;
|
|
844
|
+
// T13158: the exodus assessment, made BEFORE the handle is published (a
|
|
845
|
+
// holder object: the lease callback assigns it).
|
|
846
|
+
const exodusState = { preparation: null };
|
|
666
847
|
try {
|
|
667
848
|
execution?.assertActive();
|
|
668
849
|
log.debug({ scope, dbPath: normalizedPath }, 'opening dual-scope cleo.db');
|
|
@@ -682,7 +863,8 @@ exodusCwd, options) {
|
|
|
682
863
|
// single-keyed regardless of which domain opens the handle first.
|
|
683
864
|
execution?.assertActive();
|
|
684
865
|
const DatabaseSyncCtor = getDatabaseSyncCtor();
|
|
685
|
-
|
|
866
|
+
// T13258: never open a store file a restore is replacing (before and after the open).
|
|
867
|
+
const nativeDb = openUnlessRestoring(normalizedPath, () => new DatabaseSyncCtor(normalizedPath, { allowExtension: true }));
|
|
686
868
|
openingNative = nativeDb;
|
|
687
869
|
// Apply canonical pragma set (specs/sqlite-pragmas.json SSoT), bounding
|
|
688
870
|
// per-connection memory for one-shot/CLI opens (full SSoT for daemon) — T11829.
|
|
@@ -691,7 +873,7 @@ exodusCwd, options) {
|
|
|
691
873
|
// every DDL on this handle before any schema code runs.
|
|
692
874
|
installSchemaWriteGuard(nativeDb);
|
|
693
875
|
// Create the Drizzle ORM wrapper.
|
|
694
|
-
const drizzle =
|
|
876
|
+
const drizzle = loadNodeSqliteDrizzle();
|
|
695
877
|
// biome-ignore lint/suspicious/noExplicitAny: dual-scope handle is untyped at construction; typed via DualScopeDbHandle<TScope>
|
|
696
878
|
const db = drizzle({ client: nativeDb });
|
|
697
879
|
// Resolve the migrations folder for this scope.
|
|
@@ -732,9 +914,9 @@ exodusCwd, options) {
|
|
|
732
914
|
// once, and arm this connection's uid triggers. Never throws.
|
|
733
915
|
execution?.assertActive();
|
|
734
916
|
if (rowUidFillEnabled() && ROW_IDENTITY[scope].length > 0) {
|
|
735
|
-
await
|
|
917
|
+
const pending = await prepareFillWriters(nativeDb, scope);
|
|
736
918
|
// A derived rewrite: uncaptured, its tables marked suspect (S2).
|
|
737
|
-
prepareRowIdentityUnderCapture(nativeDb, scope);
|
|
919
|
+
prepareRowIdentityUnderCapture(nativeDb, scope, { pending });
|
|
738
920
|
}
|
|
739
921
|
execution?.assertActive();
|
|
740
922
|
log.debug({ scope, dbPath: normalizedPath }, 'dual-scope cleo.db ready');
|
|
@@ -748,6 +930,12 @@ exodusCwd, options) {
|
|
|
748
930
|
get isOpen() {
|
|
749
931
|
return nativeDb.isOpen;
|
|
750
932
|
},
|
|
933
|
+
// T13158 / T13167: the marker is the connection's write guard, so
|
|
934
|
+
// every in-process holder sees a deferral or abort set (or lifted)
|
|
935
|
+
// after publication.
|
|
936
|
+
get exodusAbort() {
|
|
937
|
+
return peekExodusWriteGuard(nativeDb)?.detail;
|
|
938
|
+
},
|
|
751
939
|
close() {
|
|
752
940
|
// Identity-guarded deletion: only evict from the singleton cache
|
|
753
941
|
// when the current entry still references THIS exact handle. A stale
|
|
@@ -765,6 +953,53 @@ exodusCwd, options) {
|
|
|
765
953
|
}
|
|
766
954
|
},
|
|
767
955
|
};
|
|
956
|
+
// T13158: never publish an unguarded handle for a store that still
|
|
957
|
+
// owes a migration. Publication hands this connection to every
|
|
958
|
+
// concurrent in-process open, and an INSERT through it before the
|
|
959
|
+
// migration (or its guard) would make the store look populated and
|
|
960
|
+
// strand the legacy rows. So assess first, and when a migration is
|
|
961
|
+
// pending, guard the connection before anyone else can see it.
|
|
962
|
+
// Populated stores cost one COUNT(*) here.
|
|
963
|
+
if (exodusCwd !== undefined &&
|
|
964
|
+
normalizedPath === resolveDualScopeDbPath(scope, exodusCwd)) {
|
|
965
|
+
try {
|
|
966
|
+
execution?.assertActive();
|
|
967
|
+
const { prepareExodusOnOpen } = await import('./exodus/on-open.js');
|
|
968
|
+
execution?.assertActive();
|
|
969
|
+
exodusState.preparation = await prepareExodusOnOpen(scope, normalizedPath, nativeDb, exodusCwd);
|
|
970
|
+
}
|
|
971
|
+
catch (err) {
|
|
972
|
+
execution?.assertActive();
|
|
973
|
+
exodusState.preparation = null;
|
|
974
|
+
log.warn({ err, scope }, 'exodus-on-open assessment unavailable (non-fatal)');
|
|
975
|
+
}
|
|
976
|
+
// An abort decided at assessment (unreadable marker, plan mismatch,
|
|
977
|
+
// assessment failure) owes the same protection before publication
|
|
978
|
+
// as a pending migration (#1839 review HIGH): the post-lease abort
|
|
979
|
+
// branch would guard only after concurrent opens could write.
|
|
980
|
+
const preparation = exodusState.preparation;
|
|
981
|
+
const stranded = preparation?.kind === 'pending'
|
|
982
|
+
? { kind: 'deferred', reason: 'its migration has not run yet' }
|
|
983
|
+
: preparation?.kind === 'decided' && preparation.result.outcome === 'aborted'
|
|
984
|
+
? { kind: 'aborted', reason: preparation.result.reason }
|
|
985
|
+
: null;
|
|
986
|
+
if (stranded !== null) {
|
|
987
|
+
try {
|
|
988
|
+
execution?.assertActive();
|
|
989
|
+
await guardStrandedStore(nativeDb, scope, normalizedPath, exodusCwd, stranded.kind, stranded.reason);
|
|
990
|
+
}
|
|
991
|
+
catch (err) {
|
|
992
|
+
execution?.assertActive();
|
|
993
|
+
// A failed guard must cost neither the migration nor the
|
|
994
|
+
// protection (#1836 review LOW-a): the preparation stays
|
|
995
|
+
// pending, so the migration still runs after the lease, and the
|
|
996
|
+
// anchor table is guarded at the least. If even that fails, the
|
|
997
|
+
// open is refused (E_EXODUS_GUARD_FAILED, T13171).
|
|
998
|
+
log.warn({ err, scope }, 'exodus-on-open: the store could not be fully guarded before its migration');
|
|
999
|
+
guardAnchorOnly(nativeDb, scope, normalizedPath, stranded.kind, stranded.reason);
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
768
1003
|
execution?.assertActive();
|
|
769
1004
|
// Update the cache entry to mark init complete.
|
|
770
1005
|
const entry = _cache.get(key);
|
|
@@ -803,46 +1038,73 @@ exodusCwd, options) {
|
|
|
803
1038
|
execution?.assertActive();
|
|
804
1039
|
let finalHandle = handle;
|
|
805
1040
|
if (exodusCwd !== undefined && normalizedPath === resolveDualScopeDbPath(scope, exodusCwd)) {
|
|
806
|
-
// ──
|
|
807
|
-
//
|
|
808
|
-
//
|
|
809
|
-
//
|
|
810
|
-
//
|
|
811
|
-
//
|
|
812
|
-
//
|
|
813
|
-
//
|
|
814
|
-
//
|
|
1041
|
+
// ── Exodus-on-open admission (T12001 · T13158) ──────────────────────────
|
|
1042
|
+
// Decide first, without a lock or the governor, whether this open needs
|
|
1043
|
+
// a migration at all: a populated store costs one COUNT(*), and only a
|
|
1044
|
+
// PENDING migration (empty store, this scope's legacy sources present)
|
|
1045
|
+
// asks for admission. The migration (reconcile + parity verify + copy)
|
|
1046
|
+
// is a heavy DB op, so it runs in the governor's machine-wide `db-heavy`
|
|
1047
|
+
// class, waiting a bounded time for the slot (T13158): `db-heavy` has one
|
|
1048
|
+
// slot machine-wide, so a sentient tick, a `cleo run --class db` job,
|
|
1049
|
+
// another project's exodus or a second `cleo` racing this first open
|
|
1050
|
+
// would otherwise defer it. Memory pressure still defers it at once
|
|
1051
|
+
// (CPU saturation never does: db-heavy is budgeted on memory alone, T13170).
|
|
1052
|
+
//
|
|
1053
|
+
// A migration still deferred after the wait does not run this open, and
|
|
1054
|
+
// the command gets the EMPTY store. While legacy rows wait, a write there
|
|
1055
|
+
// would strand them (a populated store never migrates), so the store
|
|
1056
|
+
// refuses INSERTs into every table the migration fills and readers are
|
|
1057
|
+
// warned (`guardStrandedStore`). The next open admits it again.
|
|
1058
|
+
// Fail-open: a governor error proceeds un-gated, as before T12001.
|
|
815
1059
|
let releaseDbHeavy = null;
|
|
816
|
-
let
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
1060
|
+
let deferral = null;
|
|
1061
|
+
const preparation = exodusState.preparation;
|
|
1062
|
+
if (preparation?.kind === 'pending') {
|
|
1063
|
+
// The connection was guarded before publication (above). The guard
|
|
1064
|
+
// stays up through the admission wait AND the migration: the copy runs
|
|
1065
|
+
// on dedicated connections that never see its temp triggers, and the
|
|
1066
|
+
// triggers stop refusing on their own once the copy commits the anchor.
|
|
1067
|
+
try {
|
|
1068
|
+
execution?.assertActive();
|
|
1069
|
+
const { governor } = await import('../resources/governor.js');
|
|
1070
|
+
execution?.assertActive();
|
|
1071
|
+
const admit = await governor.acquire('db-heavy', {
|
|
1072
|
+
blocking: true,
|
|
1073
|
+
timeoutMs: exodusAdmissionWaitMs(),
|
|
1074
|
+
});
|
|
1075
|
+
if (admit.deferred) {
|
|
1076
|
+
deferral = admit.reason;
|
|
1077
|
+
}
|
|
1078
|
+
else {
|
|
1079
|
+
releaseDbHeavy = admit.release;
|
|
1080
|
+
}
|
|
824
1081
|
}
|
|
825
|
-
|
|
826
|
-
|
|
1082
|
+
catch {
|
|
1083
|
+
execution?.assertActive();
|
|
1084
|
+
// Governor unavailable — fail open (proceed un-gated).
|
|
1085
|
+
}
|
|
1086
|
+
if (deferral !== null) {
|
|
1087
|
+
await announceDeferredExodus(nativeDb, scope, normalizedPath, deferral);
|
|
827
1088
|
}
|
|
828
1089
|
}
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
//
|
|
832
|
-
}
|
|
833
|
-
if (dbHeavyDeferred) {
|
|
834
|
-
execution?.assertActive();
|
|
835
|
-
log.debug({ scope, dbPath: normalizedPath }, 'exodus-on-open skipped this open — db-heavy deferred under memory pressure ' +
|
|
836
|
-
'(re-runs idempotently on a calmer open)');
|
|
1090
|
+
if (preparation === null || deferral !== null) {
|
|
1091
|
+
// Assessment unavailable, or the migration deferred: the published
|
|
1092
|
+
// handle (guarded when legacy rows wait) is returned as opened.
|
|
837
1093
|
}
|
|
838
1094
|
else {
|
|
1095
|
+
const ready = preparation;
|
|
839
1096
|
try {
|
|
840
1097
|
execution?.assertActive();
|
|
841
|
-
const
|
|
842
|
-
execution?.assertActive();
|
|
843
|
-
const result = await maybeRunExodusOnOpen(scope, normalizedPath, nativeDb, exodusCwd);
|
|
1098
|
+
const result = ready.kind === 'decided' ? ready.result : await ready.run();
|
|
844
1099
|
execution?.assertActive();
|
|
845
1100
|
if (result.outcome === 'migrated' || result.outcome === 'aborted') {
|
|
1101
|
+
if (result.outcome === 'migrated') {
|
|
1102
|
+
// The store now holds the legacy data: the pre-publication guard
|
|
1103
|
+
// (if this connection is still open and cached) comes down (T13158).
|
|
1104
|
+
// On `aborted` it stays: the store is still empty while legacy rows wait.
|
|
1105
|
+
const { liftExodusWriteGuard } = await import('./exodus/write-guard.js');
|
|
1106
|
+
liftExodusWriteGuard(nativeDb);
|
|
1107
|
+
}
|
|
846
1108
|
// The migrate engine closed our handle — re-open fresh (un-armed) so the
|
|
847
1109
|
// caller receives a valid, live handle bound to the now-(de)populated DB.
|
|
848
1110
|
const reopened = scope === 'project'
|
|
@@ -855,17 +1117,43 @@ exodusCwd, options) {
|
|
|
855
1117
|
// structured marker on the returned handle and (b) broadcasting a typed
|
|
856
1118
|
// event. The non-zero error itself is raised on the write path via
|
|
857
1119
|
// `assertWriteDurable(handle)` — NOT here, so read opens never throw.
|
|
858
|
-
const abort = {
|
|
859
|
-
scope,
|
|
860
|
-
dbPath: normalizedPath,
|
|
861
|
-
reason: result.reason,
|
|
862
|
-
at: Date.now(),
|
|
863
|
-
};
|
|
864
1120
|
log.warn({ scope, reason: result.reason }, 'exodus-on-open aborted; consolidated cleo.db left empty, legacy kept as source — ' +
|
|
865
|
-
'
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
1121
|
+
'writes to the tables the migration fills are refused (T11828, T13167)');
|
|
1122
|
+
// T13167: while legacy rows wait, guard the store the caller gets
|
|
1123
|
+
// exactly as a deferral is guarded: every INSERT into a table the
|
|
1124
|
+
// migration fills refuses, and the typed write checks and the
|
|
1125
|
+
// handle's `exodusAbort` marker report the abort.
|
|
1126
|
+
const guarded = await guardStrandedStore(getDualScopeNativeDb(reopened), scope, normalizedPath, exodusCwd, 'aborted', result.reason);
|
|
1127
|
+
if (guarded) {
|
|
1128
|
+
finalHandle = reopened;
|
|
1129
|
+
try {
|
|
1130
|
+
const { pushWarning } = await import('../output.js');
|
|
1131
|
+
pushWarning({
|
|
1132
|
+
// @sync-invariant none:local-only a read warning about this store's aborted legacy migration
|
|
1133
|
+
code: 'W_EXODUS_ABORTED',
|
|
1134
|
+
message: `The ${scope} store's migration from the legacy stores aborted ` +
|
|
1135
|
+
`(${result.reason}), so results omit the legacy data. Writes are refused ` +
|
|
1136
|
+
'until it is resolved: run `cleo doctor exodus-health`, then ' +
|
|
1137
|
+
'`cleo exodus migrate`.',
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
1140
|
+
catch {
|
|
1141
|
+
// A warning must never fail the open.
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
else {
|
|
1145
|
+
// No legacy rows at risk: record and mark the abort as before.
|
|
1146
|
+
const abort = {
|
|
1147
|
+
scope,
|
|
1148
|
+
dbPath: normalizedPath,
|
|
1149
|
+
reason: result.reason,
|
|
1150
|
+
at: Date.now(),
|
|
1151
|
+
kind: 'aborted',
|
|
1152
|
+
};
|
|
1153
|
+
const { emitExodusAbort } = await import('./exodus/abort-events.js');
|
|
1154
|
+
emitExodusAbort(abort);
|
|
1155
|
+
finalHandle = { ...reopened, exodusAbort: abort };
|
|
1156
|
+
}
|
|
869
1157
|
}
|
|
870
1158
|
else {
|
|
871
1159
|
// A subsequent SUCCESSFUL migration resolves any prior abort recorded
|
|
@@ -875,6 +1163,12 @@ exodusCwd, options) {
|
|
|
875
1163
|
finalHandle = reopened;
|
|
876
1164
|
}
|
|
877
1165
|
}
|
|
1166
|
+
else if (ready.kind === 'pending') {
|
|
1167
|
+
// Skipped after all (a concurrent process migrated it first): the
|
|
1168
|
+
// store owes nothing more, so the guard comes down (T13158).
|
|
1169
|
+
const { liftExodusWriteGuard } = await import('./exodus/write-guard.js');
|
|
1170
|
+
liftExodusWriteGuard(nativeDb);
|
|
1171
|
+
}
|
|
878
1172
|
}
|
|
879
1173
|
catch (err) {
|
|
880
1174
|
execution?.assertActive();
|
|
@@ -1385,7 +1679,7 @@ export async function insertIdempotent(
|
|
|
1385
1679
|
db, table, row,
|
|
1386
1680
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1387
1681
|
_keyColumn) {
|
|
1388
|
-
|
|
1682
|
+
await assertNoExodusRefusal(db);
|
|
1389
1683
|
const identity = resolveDbIdentity(db);
|
|
1390
1684
|
return withWriterLease(identity.scope, 'tasks', async () => {
|
|
1391
1685
|
const result = await db.insert(table).values(row).onConflictDoNothing().returning();
|
|
@@ -1435,7 +1729,7 @@ db, table, row,
|
|
|
1435
1729
|
_keyColumn,
|
|
1436
1730
|
// biome-ignore lint/suspicious/noExplicitAny: column reference type varies by table
|
|
1437
1731
|
conflictTarget, set) {
|
|
1438
|
-
|
|
1732
|
+
await assertNoExodusRefusal(db);
|
|
1439
1733
|
const identity = resolveDbIdentity(db);
|
|
1440
1734
|
return withWriterLease(identity.scope, 'tasks', async () => {
|
|
1441
1735
|
const updateSet = set ?? row;
|