@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
|
@@ -1,607 +1,181 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Machine-wide admission for evidence-tool runs (T1534 / ADR-061, T13133).
|
|
3
3
|
*
|
|
4
4
|
* The cache layer ({@link runToolCached}) coalesces *identical* parallel runs
|
|
5
|
-
* via a per-key file lock
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* the
|
|
32
|
-
* `scoped-build`), so evidence runs and other governed heavy work share one
|
|
33
|
-
* machine-wide budget.
|
|
34
|
-
*
|
|
35
|
-
* T12091: `test`/`build` were `max(1, cpus/4)` — 6 slots on a 24-core box. Since
|
|
36
|
-
* each `pnpm run test` is itself allowed 6 vitest forks × 4 GiB, the two bounds
|
|
37
|
-
* composed to 144 GiB of permitted heap on 62 GiB of RAM. Neither layer was
|
|
38
|
-
* individually violated, which is exactly why the machine froze without any
|
|
39
|
-
* guard firing. Heavy tools are now bounded by the dimension that actually
|
|
40
|
-
* limits them — see {@link defaultMaxConcurrent}.
|
|
41
|
-
*
|
|
42
|
-
* Override via `CLEO_TOOL_CONCURRENCY_<CANONICAL>` (e.g.
|
|
43
|
-
* `CLEO_TOOL_CONCURRENCY_TEST=2`). Set to `0` or a negative number to
|
|
44
|
-
* disable the limit for that tool — which also disables the RAM bound, so it is
|
|
45
|
-
* the one setting that can still oversubscribe the machine.
|
|
5
|
+
* via a per-key file lock. Orchestrator-spawned worktree agents each operate
|
|
6
|
+
* on a *different* HEAD, so their cache keys differ and the per-key lock does
|
|
7
|
+
* not coalesce them; without a machine-wide bound, N worktree agents would
|
|
8
|
+
* each spawn the full toolchain, multiplying CPU and resident memory by N.
|
|
9
|
+
*
|
|
10
|
+
* Since T13133 that bound is the admission ledger (`resources/admission-ledger.ts`):
|
|
11
|
+
* one budget in bytes and one FIFO queue shared by every evidence run, every
|
|
12
|
+
* `cleo run` job and the vitest project probe, machine-wide. An evidence run
|
|
13
|
+
* asks for its footprint (`footprintForTool`: a heavy test/build run is
|
|
14
|
+
* charged its worker count × 6 GiB, typecheck and lint their planned heap plus
|
|
15
|
+
* 2 GiB, audit and scans 1 GiB),
|
|
16
|
+
* waits its turn, and exports the grant's `CLEO_ADMISSION` token to the tool
|
|
17
|
+
* it spawns, so a `cleo verify` or `cleo run` the tool starts rides the grant
|
|
18
|
+
* instead of waiting for the budget its own ancestor holds.
|
|
19
|
+
*
|
|
20
|
+
* What it replaced: per-tool slot directories under `<cleoHome>/locks/tool-*`,
|
|
21
|
+
* core- and RAM-derived slot counts (`defaultMaxConcurrent`), PSI slot scaling
|
|
22
|
+
* (`pressureScaleSlots`), the darwin one-slot rule (T12963) and a second,
|
|
23
|
+
* separate governor slot taken after the tool slot, the order that could
|
|
24
|
+
* deadlock against `cleo run` (T13133). Memory pressure now narrows the one
|
|
25
|
+
* budget, and the memory gate (T13127) refuses heavy work outright while
|
|
26
|
+
* memory is short; a waiting run says so on stderr with the readings.
|
|
27
|
+
*
|
|
28
|
+
* `CLEO_TOOL_CONCURRENCY_<TOOL>` no longer counts runs: `0` (or below) still
|
|
29
|
+
* bypasses admission for that tool, any other value is ignored, and either
|
|
30
|
+
* prints one deprecation line per process on stderr. `CLEO_RESOURCES_MODE=off`
|
|
31
|
+
* is the supported switch.
|
|
46
32
|
*
|
|
47
33
|
* @task T1534
|
|
48
34
|
* @task T12091
|
|
49
35
|
* @task T12963
|
|
36
|
+
* @task T13123
|
|
37
|
+
* @task T13127
|
|
38
|
+
* @task T13133
|
|
50
39
|
* @adr ADR-061
|
|
51
40
|
*/
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
import { governor } from '../resources/governor.js';
|
|
58
|
-
import { ResourceMonitor } from '../resources/monitor.js';
|
|
59
|
-
import { assessSlotHolder, currentLockId, ownProcessStartedAt, reapSlotIfHolderDead, recordToolGroupsWhileHeld, SLOT_LOCK_STALE_MS, writeHolderRecord, } from '../resources/slot-holder.js';
|
|
60
|
-
import { isHeavyTool } from './heavy-tool-env.js';
|
|
61
|
-
// ---------------------------------------------------------------------------
|
|
62
|
-
// Concurrency-limit defaults + override resolution
|
|
63
|
-
// ---------------------------------------------------------------------------
|
|
64
|
-
/**
|
|
65
|
-
* Worst-case resident footprint of ONE `tool:test` / `tool:build` invocation,
|
|
66
|
-
* in GiB.
|
|
67
|
-
*
|
|
68
|
-
* This is not a guess. `vitest.memory-safe.ts` permits
|
|
69
|
-
* `MEMORY_SAFE_MAX_WORKERS` forks (up to 6) each capped at `FORK_HEAP_MB`
|
|
70
|
-
* (4096), so a single `pnpm run test` may legitimately hold ~24 GiB before any
|
|
71
|
-
* guard fires. Keep this in step with that file if either bound changes.
|
|
72
|
-
*
|
|
73
|
-
* @task T12091
|
|
74
|
-
*/
|
|
75
|
-
export const HEAVY_TOOL_FOOTPRINT_GIB = 24;
|
|
76
|
-
/**
|
|
77
|
-
* Compute the default max-concurrency for a canonical tool.
|
|
78
|
-
*
|
|
79
|
-
* ## Why this is RAM-derived, not core-derived (T12091)
|
|
80
|
-
*
|
|
81
|
-
* This returned `floor(cpus / 4)` for `test`/`build`, which on a 24-core box is
|
|
82
|
-
* **6 concurrent full test suites**. Each of those is itself allowed 6 vitest
|
|
83
|
-
* forks × a 4 GiB heap cap, so the composed permission was
|
|
84
|
-
*
|
|
85
|
-
* 6 runs × 6 forks × 4 GiB = 144 GiB
|
|
86
|
-
*
|
|
87
|
-
* on a 62 GiB machine. Both layers were individually "bounded" and their
|
|
88
|
-
* composition was 2.3× the hardware — which is precisely how this box froze
|
|
89
|
-
* repeatedly: no single guard was violated. The per-invocation cap (T12087) and
|
|
90
|
-
* this cross-invocation cap were written independently and never multiplied out.
|
|
91
|
-
*
|
|
92
|
-
* The dimensional error is the root of it: what limits a test run is MEMORY, and
|
|
93
|
-
* core count says nothing about memory. A 24-core/16 GiB VM got the same 6 slots
|
|
94
|
-
* as a 24-core/256 GiB server. So heavy tools now divide TOTAL RAM by
|
|
95
|
-
* {@link HEAVY_TOOL_FOOTPRINT_GIB} and are additionally capped by cores, never
|
|
96
|
-
* exceeding what the machine can actually hold.
|
|
97
|
-
*
|
|
98
|
-
* Reactive pressure scaling ({@link pressureScaleSlots}) is not a substitute:
|
|
99
|
-
* PSI `some avg10` is a ten-second average, and a fork fleet can exhaust RAM
|
|
100
|
-
* faster than that window can report it. Admission has to be right up front.
|
|
101
|
-
*
|
|
102
|
-
* Light tools (lint, typecheck, audit, security-scan) are single-process and
|
|
103
|
-
* short, and keep the core-derived half-of-cores budget.
|
|
104
|
-
*
|
|
105
|
-
* ## Why darwin gets one heavy slot (T12963)
|
|
106
|
-
*
|
|
107
|
-
* Linux shrinks the heavy budget under memory pressure through PSI
|
|
108
|
-
* ({@link pressureScaleSlots}). macOS exposes no PSI, so that reactive layer
|
|
109
|
-
* never fires there, and a 64 GiB Mac would admit two full suites with nothing
|
|
110
|
-
* to back them off. Concurrent agents on a laptop are the common case, so the
|
|
111
|
-
* default is one heavy run at a time; `CLEO_TOOL_CONCURRENCY_TEST` /
|
|
112
|
-
* `_BUILD` still raise it.
|
|
113
|
-
*
|
|
114
|
-
* @param canonical - the canonical tool class.
|
|
115
|
-
* @param cpuCount - logical cores available.
|
|
116
|
-
* @param totalRamGib - total machine RAM in GiB; defaults to a live reading.
|
|
117
|
-
* @param platform - OS platform; defaults to `process.platform`.
|
|
118
|
-
* @returns the machine-wide slot count, always ≥ 1.
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* ```ts
|
|
122
|
-
* // 24 cores, 62 GiB → floor(62/24) = 2 (was 6, permitting 144 GiB of heap)
|
|
123
|
-
* defaultMaxConcurrent('test', 24, 62); // → 2
|
|
124
|
-
* // 24 cores, 16 GiB → 1: one suite is already more than this box can hold
|
|
125
|
-
* defaultMaxConcurrent('test', 24, 16); // → 1
|
|
126
|
-
* // macOS: no PSI to back off with, so one heavy run at a time
|
|
127
|
-
* defaultMaxConcurrent('test', 12, 64, 'darwin'); // → 1
|
|
128
|
-
* ```
|
|
129
|
-
*
|
|
130
|
-
* @task T1534
|
|
131
|
-
* @task T12091
|
|
132
|
-
* @task T12963
|
|
133
|
-
*/
|
|
134
|
-
export function defaultMaxConcurrent(canonical, cpuCount, totalRamGib = totalmem() / 1024 ** 3, platform = process.platform) {
|
|
135
|
-
const cpus = Math.max(1, cpuCount);
|
|
136
|
-
switch (canonical) {
|
|
137
|
-
case 'test':
|
|
138
|
-
case 'build': {
|
|
139
|
-
if (platform === 'darwin')
|
|
140
|
-
return 1;
|
|
141
|
-
const byRam = Math.floor(totalRamGib / HEAVY_TOOL_FOOTPRINT_GIB);
|
|
142
|
-
const byCpu = Math.floor(cpus / 4);
|
|
143
|
-
return Math.max(1, Math.min(byRam, byCpu));
|
|
144
|
-
}
|
|
145
|
-
case 'lint':
|
|
146
|
-
case 'typecheck':
|
|
147
|
-
case 'audit':
|
|
148
|
-
case 'security-scan':
|
|
149
|
-
return Math.max(2, Math.floor(cpus / 2));
|
|
150
|
-
default:
|
|
151
|
-
return 1;
|
|
152
|
-
}
|
|
41
|
+
import { admissionCapacityBytes, admit, describeAdmissionIoError, footprintForTool, } from '../resources/admission-ledger.js';
|
|
42
|
+
import { memoryGateReporter } from '../resources/pressure-gate.js';
|
|
43
|
+
/** The default {@link AcquireSlotOptions.notice}: one stderr line. */
|
|
44
|
+
function stderrNotice(line) {
|
|
45
|
+
process.stderr.write(`[cleo] ${line}\n`); // json-stream-hygiene-allowed: progress while waiting; stdout carries the envelope
|
|
153
46
|
}
|
|
47
|
+
/** Tools whose deprecated `CLEO_TOOL_CONCURRENCY_<TOOL>` notice was printed in this process. */
|
|
48
|
+
const _deprecationNoticed = new Set();
|
|
154
49
|
/**
|
|
155
|
-
*
|
|
156
|
-
* `
|
|
157
|
-
*
|
|
158
|
-
* `Number.POSITIVE_INFINITY`, in which case {@link acquireGlobalSlot}
|
|
159
|
-
* returns a no-op release.
|
|
50
|
+
* The deprecated `CLEO_TOOL_CONCURRENCY_<TOOL>` override: `bypass` for `0` or
|
|
51
|
+
* below, `ignored` for any other number, `null` when unset. Prints one
|
|
52
|
+
* deprecation line per tool per process on stderr, never on stdout.
|
|
160
53
|
*
|
|
161
|
-
* @
|
|
162
|
-
* @
|
|
163
|
-
|
|
164
|
-
export function resolveMaxConcurrent(canonical, cpuCount, totalRamGib, platform) {
|
|
165
|
-
const envKey = `CLEO_TOOL_CONCURRENCY_${canonical.toUpperCase().replace(/-/g, '_')}`;
|
|
166
|
-
const raw = process.env[envKey];
|
|
167
|
-
if (raw !== undefined && raw !== '') {
|
|
168
|
-
const parsed = Number.parseInt(raw, 10);
|
|
169
|
-
if (Number.isFinite(parsed)) {
|
|
170
|
-
if (parsed <= 0)
|
|
171
|
-
return Number.POSITIVE_INFINITY;
|
|
172
|
-
return parsed;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
return defaultMaxConcurrent(canonical, cpuCount ?? availableParallelism(), totalRamGib ?? totalmem() / 1024 ** 3, platform ?? process.platform);
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Whether a canonical tool's slot budget shrinks under memory pressure.
|
|
179
|
-
* Only the heavy `test`/`build` classes scale; lint/typecheck/audit are light
|
|
180
|
-
* and single-threaded, so they keep their static budget.
|
|
181
|
-
*/
|
|
182
|
-
function isPressureSensitive(canonical) {
|
|
183
|
-
// Delegates rather than repeating the literal. This was the third
|
|
184
|
-
// independent definition of "heavy"; all three agreed by coincidence, and a
|
|
185
|
-
// fifth heavy tool would have needed three coordinated edits — with a missed
|
|
186
|
-
// one producing a SILENT asymmetry (a tool granted the long deadline and the
|
|
187
|
-
// worker caps but not a semaphore slot, or the reverse).
|
|
188
|
-
return isHeavyTool(canonical);
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Scale a static slot budget down under memory pressure (T12001 · choke-point
|
|
192
|
-
* #6). Mirrors the governor's `test-run` budget: halve when `some avg10` exceeds
|
|
193
|
-
* the hold threshold, floor to 1 when it exceeds the backoff/floor threshold.
|
|
194
|
-
* Recovers automatically as pressure clears. `full-build` is not represented as
|
|
195
|
-
* a canonical tool here; the dedicated `full-build` governor class (T11999)
|
|
196
|
-
* pins that to one machine-wide slot.
|
|
54
|
+
* @param canonical - the canonical tool.
|
|
55
|
+
* @param notice - where the line goes.
|
|
56
|
+
* @returns what the override does now.
|
|
197
57
|
*
|
|
198
|
-
* @task
|
|
199
|
-
*/
|
|
200
|
-
export function pressureScaleSlots(canonical, staticMax, sample, thresholds = {}) {
|
|
201
|
-
if (!Number.isFinite(staticMax) || !isPressureSensitive(canonical))
|
|
202
|
-
return staticMax;
|
|
203
|
-
const hold = thresholds.holdSomeAvg10 ?? 10;
|
|
204
|
-
const floor = thresholds.floorSomeAvg10 ?? 25;
|
|
205
|
-
const some = sample.globalPressure?.some?.avg10 ?? sample.slicePressure?.some?.avg10 ?? 0;
|
|
206
|
-
if (some > floor)
|
|
207
|
-
return 1;
|
|
208
|
-
if (some > hold)
|
|
209
|
-
return Math.max(1, Math.floor(staticMax / 2));
|
|
210
|
-
return staticMax;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Best-effort point-sample for slot scaling. NEVER throws — on any error (no
|
|
214
|
-
* `/proc`, non-Linux, read failure) returns `null` so the caller fails open to
|
|
215
|
-
* the static slot count. The PSI + meminfo reads are sub-5ms.
|
|
58
|
+
* @task T13133
|
|
216
59
|
*/
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
catch {
|
|
60
|
+
export function legacyConcurrencyOverride(canonical, notice = stderrNotice) {
|
|
61
|
+
const key = `CLEO_TOOL_CONCURRENCY_${canonical.toUpperCase().replace(/-/g, '_')}`;
|
|
62
|
+
const raw = process.env[key];
|
|
63
|
+
if (raw === undefined || raw === '')
|
|
222
64
|
return null;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Whether an explicit `CLEO_TOOL_CONCURRENCY_<TOOL>` override is set — when so,
|
|
227
|
-
* the operator's intent is authoritative and pressure scaling is bypassed.
|
|
228
|
-
*/
|
|
229
|
-
function hasConcurrencyOverride(canonical) {
|
|
230
|
-
const raw = process.env[`CLEO_TOOL_CONCURRENCY_${canonical.toUpperCase().replace(/-/g, '_')}`];
|
|
231
|
-
return raw !== undefined && raw !== '';
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* The {@link ResourceGovernor} class a heavy tool run is admitted under, or
|
|
235
|
-
* `null` for light tools. `test` and `build` are the classes the governor
|
|
236
|
-
* budgets as `test-run` / `scoped-build` (T12963).
|
|
237
|
-
*/
|
|
238
|
-
export function governorClassFor(canonical) {
|
|
239
|
-
if (canonical === 'test')
|
|
240
|
-
return 'test-run';
|
|
241
|
-
if (canonical === 'build')
|
|
242
|
-
return 'scoped-build';
|
|
243
|
-
return null;
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* Take the governor slot for a heavy run that already holds its tool slot.
|
|
247
|
-
* Returns the grant's release, a no-op when no admission applies, or throws
|
|
248
|
-
* when the governor defers within the remaining wait budget.
|
|
249
|
-
*
|
|
250
|
-
* Skipped under an explicit `CLEO_TOOL_CONCURRENCY_<TOOL>` override: the
|
|
251
|
-
* operator's count is authoritative, and the governor's own budget would
|
|
252
|
-
* silently cap it.
|
|
253
|
-
*/
|
|
254
|
-
async function admitThroughGovernor(canonical, opts, remainingMs) {
|
|
255
|
-
const cls = governorClassFor(canonical);
|
|
256
|
-
if (cls === null || opts.skipGovernor === true || hasConcurrencyOverride(canonical)) {
|
|
257
|
-
return NOOP_RELEASE;
|
|
258
|
-
}
|
|
259
|
-
const admission = await governor.acquire(cls, {
|
|
260
|
-
timeoutMs: Math.max(1, remainingMs),
|
|
261
|
-
...(opts.pollMs !== undefined ? { pollMs: opts.pollMs } : {}),
|
|
262
|
-
...(opts.cpuCount !== undefined ? { cpuCount: opts.cpuCount } : {}),
|
|
263
|
-
...(opts.totalRamGib !== undefined ? { totalMemBytes: opts.totalRamGib * 1024 ** 3 } : {}),
|
|
264
|
-
...(opts.pressureSample ? { sample: opts.pressureSample } : {}),
|
|
265
|
-
});
|
|
266
|
-
if (admission.deferred) {
|
|
267
|
-
// @sync-invariant none:local-only machine-wide admission timeout; no store write
|
|
268
|
-
throw new Error(`Timed out waiting for the '${cls}' resource budget for a '${canonical}' run: ` +
|
|
269
|
-
`${admission.reason}. Override with ` +
|
|
270
|
-
`CLEO_TOOL_CONCURRENCY_${canonical.toUpperCase().replace(/-/g, '_')}=<n>.`);
|
|
271
|
-
}
|
|
272
|
-
return admission.release;
|
|
273
|
-
}
|
|
274
|
-
// ---------------------------------------------------------------------------
|
|
275
|
-
// Slot-directory layout
|
|
276
|
-
// ---------------------------------------------------------------------------
|
|
277
|
-
/**
|
|
278
|
-
* Path to the global slot directory for a canonical tool. Sits under
|
|
279
|
-
* `getCleoHome()/locks/tool-<canonical>/` so all CLEO-driven processes
|
|
280
|
-
* on a machine share the same semaphore — across projects, worktrees,
|
|
281
|
-
* and PIDs.
|
|
282
|
-
*
|
|
283
|
-
* @task T1534
|
|
284
|
-
*/
|
|
285
|
-
export function semaphoreDir(canonical) {
|
|
286
|
-
return join(getCleoHome(), 'locks', `tool-${canonical}`);
|
|
287
|
-
}
|
|
288
|
-
/**
|
|
289
|
-
* Path of the sidecar holder record for a slot.
|
|
290
|
-
*
|
|
291
|
-
* Deliberately a SIBLING of the lock rather than a file inside it:
|
|
292
|
-
* `proper-lockfile` removes its lock directory with `rmdir`, which fails if we
|
|
293
|
-
* have put anything inside it.
|
|
294
|
-
*
|
|
295
|
-
* @internal
|
|
296
|
-
* @task T12113 (gh#1222)
|
|
297
|
-
*/
|
|
298
|
-
function holderPath(slotPath) {
|
|
299
|
-
return `${slotPath}.holder.json`;
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* Record who holds a slot, and keep the record listing every tool group this
|
|
303
|
-
* process starts while it holds the slot (T12963). Best-effort: a failure here
|
|
304
|
-
* must never fail an acquire that has already succeeded, because the slot IS
|
|
305
|
-
* held at that point and throwing would leak it.
|
|
306
|
-
*
|
|
307
|
-
* @returns Stops recording tool groups; call it on release.
|
|
308
|
-
*
|
|
309
|
-
* @internal
|
|
310
|
-
* @task T12113 (gh#1222)
|
|
311
|
-
* @task T12963
|
|
312
|
-
*/
|
|
313
|
-
function writeHolder(slotPath, canonical) {
|
|
314
|
-
let holder;
|
|
315
|
-
const recording = recordToolGroupsWhileHeld(slotPath, () => holder);
|
|
316
|
-
holder = {
|
|
317
|
-
pid: process.pid,
|
|
318
|
-
host: hostname(),
|
|
319
|
-
acquiredAt: new Date().toISOString(),
|
|
320
|
-
canonical,
|
|
321
|
-
slot: slotPath,
|
|
322
|
-
startedAt: ownProcessStartedAt(),
|
|
323
|
-
lockId: currentLockId(slotPath),
|
|
324
|
-
toolGroups: [...recording.groups],
|
|
325
|
-
};
|
|
326
|
-
writeHolderRecord(slotPath, holder);
|
|
327
|
-
return recording.stop;
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* Read a slot's holder record. Returns `null` when absent or unparseable —
|
|
331
|
-
* both mean "we cannot say who holds this", which is treated as alive.
|
|
332
|
-
*
|
|
333
|
-
* @internal
|
|
334
|
-
* @task T12113 (gh#1222)
|
|
335
|
-
*/
|
|
336
|
-
export function readHolder(slotPath) {
|
|
337
|
-
try {
|
|
338
|
-
const parsed = JSON.parse(readFileSync(holderPath(slotPath), 'utf-8'));
|
|
339
|
-
if (typeof parsed.pid !== 'number' || typeof parsed.host !== 'string')
|
|
340
|
-
return null;
|
|
341
|
-
return parsed;
|
|
342
|
-
}
|
|
343
|
-
catch {
|
|
65
|
+
const parsed = Number.parseInt(raw, 10);
|
|
66
|
+
if (!Number.isFinite(parsed))
|
|
344
67
|
return null;
|
|
68
|
+
const effect = parsed <= 0 ? 'bypass' : 'ignored';
|
|
69
|
+
if (!_deprecationNoticed.has(key)) {
|
|
70
|
+
_deprecationNoticed.add(key);
|
|
71
|
+
notice(`${key} is deprecated: heavy runs now share one machine-wide memory budget and no ` +
|
|
72
|
+
`longer count slots (T13133). ${effect === 'bypass' ? `${key}=${raw} still bypasses admission for now;` : `${key}=${raw} is ignored;`} ` +
|
|
73
|
+
'use CLEO_RESOURCES_MODE=off to turn admission off.');
|
|
345
74
|
}
|
|
75
|
+
return effect;
|
|
346
76
|
}
|
|
347
|
-
/**
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
* Fails SAFE: an unknown holder, a holder on another host, or any error is
|
|
351
|
-
* reported as ALIVE. Reaping a live holder's slot would let two heavy suites
|
|
352
|
-
* run against one bound — the exact oversubscription the semaphore exists to
|
|
353
|
-
* prevent — so uncertainty must never authorise a reap. A holder whose pid is
|
|
354
|
-
* gone but whose tool group still has a member is ALIVE (T12963).
|
|
355
|
-
*
|
|
356
|
-
* @param holder - Holder record, or `null` when none could be read.
|
|
357
|
-
* @param slotPath - The slot the record belongs to. With it, a record that
|
|
358
|
-
* does not describe the slot's current lock (or one written before T12963,
|
|
359
|
-
* which names no lock) is alive, and a recycled pid is dead.
|
|
360
|
-
* @returns `true` when the slot must be treated as legitimately held.
|
|
361
|
-
*
|
|
362
|
-
* @task T12113 (gh#1222)
|
|
363
|
-
* @task T12963
|
|
364
|
-
*/
|
|
365
|
-
export function isHolderAlive(holder, slotPath) {
|
|
366
|
-
return assessSlotHolder(holder, slotPath) !== 'dead';
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
369
|
-
* Release a slot whose recorded holder is gone.
|
|
370
|
-
*
|
|
371
|
-
* Removes `proper-lockfile`'s lock directory directly — the same thing its own
|
|
372
|
-
* stale recovery does, but decided by process liveness instead of by a 10
|
|
373
|
-
* minute mtime timeout. Since T12963 the holder's tool groups must be gone
|
|
374
|
-
* too, the record must describe the current lock, and the reap runs under a
|
|
375
|
-
* per-slot guard ({@link reapSlotIfHolderDead}).
|
|
376
|
-
*
|
|
377
|
-
* @param slotPath - Slot lock file path.
|
|
378
|
-
* @param staleMs - The slot's `proper-lockfile` stale threshold.
|
|
379
|
-
* @returns `true` when an orphaned slot was actually reaped.
|
|
380
|
-
*
|
|
381
|
-
* @task T12113 (gh#1222)
|
|
382
|
-
* @task T12963
|
|
383
|
-
*/
|
|
384
|
-
export function reapSlotIfOrphaned(slotPath, staleMs = SLOT_LOCK_STALE_MS) {
|
|
385
|
-
return reapSlotIfHolderDead(slotPath, readHolder, { staleMs });
|
|
386
|
-
}
|
|
387
|
-
/**
|
|
388
|
-
* Enumerate every slot of a canonical tool with its holder and liveness.
|
|
389
|
-
*
|
|
390
|
-
* Backs the operator-facing lock inspection surface requested in gh#1222 —
|
|
391
|
-
* "who is holding this, and is it even alive?" — which previously required
|
|
392
|
-
* reading `~/.local/share/cleo/locks/` by hand.
|
|
393
|
-
*
|
|
394
|
-
* @param canonical - Canonical tool name.
|
|
395
|
-
* @returns One row per existing slot file.
|
|
396
|
-
*
|
|
397
|
-
* @task T12113 (gh#1222)
|
|
398
|
-
*/
|
|
399
|
-
export function listSlotHolders(canonical) {
|
|
400
|
-
const dir = semaphoreDir(canonical);
|
|
401
|
-
if (!existsSync(dir))
|
|
402
|
-
return [];
|
|
403
|
-
const rows = [];
|
|
404
|
-
for (let i = 0;; i++) {
|
|
405
|
-
const slotPath = join(dir, `slot-${i}.lock`);
|
|
406
|
-
if (!existsSync(slotPath))
|
|
407
|
-
break;
|
|
408
|
-
const holder = readHolder(slotPath);
|
|
409
|
-
rows.push({
|
|
410
|
-
slot: slotPath,
|
|
411
|
-
held: existsSync(`${slotPath}.lock`),
|
|
412
|
-
holder,
|
|
413
|
-
alive: isHolderAlive(holder, slotPath),
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
return rows;
|
|
77
|
+
/** Forget which deprecation notices were printed. Tests only. @internal */
|
|
78
|
+
export function _resetToolSemaphoreForTest() {
|
|
79
|
+
_deprecationNoticed.clear();
|
|
417
80
|
}
|
|
418
81
|
/**
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
* @returns Paths of the slots actually reaped.
|
|
82
|
+
* {@link acquireGlobalSlot} gave up: the run was not admitted within its
|
|
83
|
+
* timeout. `refusal` says why (memory pressure, or the budget in use) and who
|
|
84
|
+
* holds the budget.
|
|
423
85
|
*
|
|
424
|
-
* @task
|
|
86
|
+
* @task T13133
|
|
425
87
|
*/
|
|
426
|
-
export
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
88
|
+
export class AdmissionTimeoutError extends Error {
|
|
89
|
+
/** Why the run was not admitted, with the holders. */
|
|
90
|
+
refusal;
|
|
91
|
+
/**
|
|
92
|
+
* @param canonical - the tool whose run waited.
|
|
93
|
+
* @param refusal - the ledger's refusal.
|
|
94
|
+
*/
|
|
95
|
+
constructor(canonical, refusal) {
|
|
96
|
+
super(`Timed out waiting for admission of a '${canonical}' run: ${refusal.reason}.` +
|
|
97
|
+
(refusal.holders.length > 0 ? ` Current holders — ${refusal.holders.join('; ')}.` : '') +
|
|
98
|
+
' Use CI as test evidence (ci:<pr>), narrow the run, or set CLEO_RESOURCES_MODE=off to turn admission off.');
|
|
99
|
+
this.name = 'AdmissionTimeoutError';
|
|
100
|
+
this.refusal = refusal;
|
|
431
101
|
}
|
|
432
|
-
return reaped;
|
|
433
102
|
}
|
|
434
|
-
function
|
|
435
|
-
|
|
436
|
-
mkdirSync(dir, { recursive: true });
|
|
437
|
-
}
|
|
438
|
-
const paths = [];
|
|
439
|
-
for (let i = 0; i < count; i++) {
|
|
440
|
-
const p = join(dir, `slot-${i}.lock`);
|
|
441
|
-
if (!existsSync(p)) {
|
|
442
|
-
writeFileSync(p, '', 'utf-8');
|
|
443
|
-
}
|
|
444
|
-
paths.push(p);
|
|
445
|
-
}
|
|
446
|
-
return paths;
|
|
103
|
+
function withAdmission(release, admission) {
|
|
104
|
+
return Object.assign(release, { admission });
|
|
447
105
|
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
const NOOP_RELEASE = async () => {
|
|
452
|
-
/* no-op when concurrency is disabled */
|
|
453
|
-
};
|
|
106
|
+
const NOOP_RELEASE = withAdmission(async () => {
|
|
107
|
+
/* nothing was admitted */
|
|
108
|
+
}, '');
|
|
454
109
|
/**
|
|
455
|
-
*
|
|
456
|
-
* until
|
|
110
|
+
* Wait for admission of one evidence run of a canonical tool, machine-wide.
|
|
111
|
+
* Blocks until the ledger admits it or `timeoutMs` elapses.
|
|
457
112
|
*
|
|
458
|
-
*
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
*
|
|
113
|
+
* Re-entrant: inside an admitted run's process tree (a `cleo verify` that a
|
|
114
|
+
* `cleo run` job or another evidence run started) it is admitted at once on
|
|
115
|
+
* that grant. While it waits on memory pressure it says so through
|
|
116
|
+
* {@link AcquireSlotOptions.notice}, and after a minute it names the holders.
|
|
462
117
|
*
|
|
463
118
|
* @param canonical - Canonical tool name from the resolver.
|
|
464
119
|
* @param opts - Acquisition options.
|
|
465
|
-
* @returns A release function. Idempotent.
|
|
466
|
-
* @throws When `timeoutMs` elapses without
|
|
120
|
+
* @returns A release function carrying the `CLEO_ADMISSION` token. Idempotent.
|
|
121
|
+
* @throws When `timeoutMs` elapses without admission, naming the reason and
|
|
122
|
+
* the holders.
|
|
467
123
|
*
|
|
468
124
|
* @example
|
|
469
125
|
* ```ts
|
|
470
126
|
* const release = await acquireGlobalSlot('test');
|
|
471
127
|
* try {
|
|
472
|
-
* await runTheTool();
|
|
128
|
+
* await runTheTool({ env: { CLEO_ADMISSION: release.admission } });
|
|
473
129
|
* } finally {
|
|
474
130
|
* await release();
|
|
475
131
|
* }
|
|
476
132
|
* ```
|
|
477
133
|
*
|
|
478
134
|
* @task T1534
|
|
135
|
+
* @task T13133
|
|
479
136
|
*/
|
|
480
137
|
export async function acquireGlobalSlot(canonical, opts = {}) {
|
|
481
|
-
const
|
|
482
|
-
if (
|
|
138
|
+
const notice = opts.notice ?? stderrNotice;
|
|
139
|
+
if (opts.skipAdmission === true || legacyConcurrencyOverride(canonical, notice) === 'bypass') {
|
|
483
140
|
return NOOP_RELEASE;
|
|
484
141
|
}
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
142
|
+
const totalBytes = opts.totalRamGib !== undefined ? opts.totalRamGib * 1024 ** 3 : undefined;
|
|
143
|
+
const fixed = opts.pressureSample;
|
|
144
|
+
const outcome = await admit({
|
|
145
|
+
label: `tool:${canonical}`,
|
|
146
|
+
footprintBytes: opts.footprintBytes ?? footprintForTool(canonical, totalBytes, opts.heapMb),
|
|
147
|
+
// T13237: an evidence build is the project's whole build (`pnpm run
|
|
148
|
+
// build`): it takes the machine-wide full-build slot, like
|
|
149
|
+
// `cleo run --class full-build`.
|
|
150
|
+
...(canonical === 'build' ? { exclusive: true } : {}),
|
|
151
|
+
...(opts.scope !== undefined ? { scope: opts.scope } : {}),
|
|
152
|
+
...(opts.task !== undefined ? { task: opts.task } : {}),
|
|
153
|
+
}, {
|
|
154
|
+
wait: true,
|
|
155
|
+
timeoutMs: opts.timeoutMs ?? 3_600_000,
|
|
156
|
+
...(opts.pollMs !== undefined ? { pollMs: opts.pollMs } : {}),
|
|
157
|
+
...(totalBytes !== undefined ? { capacityBytes: admissionCapacityBytes(totalBytes) } : {}),
|
|
158
|
+
// A fixed sample (or none) when given; otherwise the ledger's default.
|
|
159
|
+
...(fixed === undefined
|
|
160
|
+
? {}
|
|
161
|
+
: {
|
|
162
|
+
sample: async () => {
|
|
163
|
+
if (fixed === null)
|
|
164
|
+
throw new Error('pressure disabled');
|
|
165
|
+
return fixed;
|
|
166
|
+
},
|
|
167
|
+
}),
|
|
168
|
+
memoryPressure: memoryGateReporter(notice, `'${canonical}' run`),
|
|
169
|
+
notice,
|
|
170
|
+
});
|
|
171
|
+
if (!outcome.admitted) {
|
|
172
|
+
// @sync-invariant none:local-only machine-wide admission timeout; no store write
|
|
173
|
+
throw new AdmissionTimeoutError(canonical, outcome.refusal);
|
|
517
174
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
if (!path)
|
|
522
|
-
continue;
|
|
523
|
-
let acquired = null;
|
|
524
|
-
try {
|
|
525
|
-
acquired = await lockfile.lock(path, { retries: 0, stale: staleMs, realpath: false });
|
|
526
|
-
}
|
|
527
|
-
catch {
|
|
528
|
-
// gh#1222: the slot is held — but by whom? proper-lockfile decides
|
|
529
|
-
// staleness from mtime, so a process that died without releasing
|
|
530
|
-
// holds the slot for the full staleMs (10 min) and is
|
|
531
|
-
// indistinguishable from a legitimately slow suite. Ask the holder
|
|
532
|
-
// record instead: a dead pid on this host is orphaned NOW. Fails
|
|
533
|
-
// safe — an unknown or remote holder is treated as alive.
|
|
534
|
-
if (reapSlotIfOrphaned(path, staleMs)) {
|
|
535
|
-
try {
|
|
536
|
-
acquired = await lockfile.lock(path, { retries: 0, stale: staleMs, realpath: false });
|
|
537
|
-
}
|
|
538
|
-
catch {
|
|
539
|
-
acquired = null; // someone else won the race for the reaped slot
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
if (acquired) {
|
|
544
|
-
const release = acquired;
|
|
545
|
-
const stopRecording = writeHolder(path, canonical);
|
|
546
|
-
const releaseSlot = async () => {
|
|
547
|
-
stopRecording();
|
|
548
|
-
// Record first, lock second: once the lock is gone the next holder
|
|
549
|
-
// writes its own record, which ours must not delete (T12963).
|
|
550
|
-
try {
|
|
551
|
-
rmSync(holderPath(path), { force: true });
|
|
552
|
-
}
|
|
553
|
-
catch {
|
|
554
|
-
/* best-effort — a stale holder record is only ever advisory */
|
|
555
|
-
}
|
|
556
|
-
try {
|
|
557
|
-
await release();
|
|
558
|
-
}
|
|
559
|
-
catch {
|
|
560
|
-
// proper-lockfile throws if the lock was already released
|
|
561
|
-
// (e.g. via stale recovery). Swallow — the post-condition
|
|
562
|
-
// is "slot is free", which is true either way.
|
|
563
|
-
}
|
|
564
|
-
};
|
|
565
|
-
// T12963: the governor slot is taken AFTER the tool slot, so a run
|
|
566
|
-
// queued on the tool semaphore holds no governor budget while it waits.
|
|
567
|
-
let releaseGrant;
|
|
568
|
-
try {
|
|
569
|
-
releaseGrant = await admitThroughGovernor(canonical, opts, timeoutMs - (Date.now() - startedAt));
|
|
570
|
-
}
|
|
571
|
-
catch (err) {
|
|
572
|
-
await releaseSlot();
|
|
573
|
-
throw err;
|
|
574
|
-
}
|
|
575
|
-
let released = false;
|
|
576
|
-
return async () => {
|
|
577
|
-
if (released)
|
|
578
|
-
return;
|
|
579
|
-
released = true;
|
|
580
|
-
await releaseGrant();
|
|
581
|
-
await releaseSlot();
|
|
582
|
-
};
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
// All slots busy — sleep and retry.
|
|
586
|
-
await sleep(pollMs);
|
|
175
|
+
const { grant } = outcome;
|
|
176
|
+
if (grant.ungoverned) {
|
|
177
|
+
notice(`${describeAdmissionIoError(grant.ungoverned)}: running the '${canonical}' run ungoverned`);
|
|
587
178
|
}
|
|
588
|
-
|
|
589
|
-
// what made an orphaned slot look like a broken semaphore.
|
|
590
|
-
const holders = listSlotHolders(canonical)
|
|
591
|
-
.filter((r) => r.held)
|
|
592
|
-
.map((r) => {
|
|
593
|
-
const h = r.holder;
|
|
594
|
-
if (!h)
|
|
595
|
-
return `${r.slot}: holder unknown`;
|
|
596
|
-
const groups = h.toolGroups?.length ? ` with tool group(s) ${h.toolGroups.join(',')}` : '';
|
|
597
|
-
return `${r.slot}: pid ${h.pid} on ${h.host}${groups} since ${h.acquiredAt}${r.alive ? '' : ' (DEAD)'}`;
|
|
598
|
-
});
|
|
599
|
-
throw new Error(`Timed out after ${timeoutMs}ms waiting for a free '${canonical}' tool slot ` +
|
|
600
|
-
`(max ${max} concurrent).` +
|
|
601
|
-
(holders.length > 0 ? ` Current holders — ${holders.join('; ')}.` : '') +
|
|
602
|
-
` Override with CLEO_TOOL_CONCURRENCY_${canonical.toUpperCase().replace(/-/g, '_')}=<n>.`);
|
|
603
|
-
}
|
|
604
|
-
function sleep(ms) {
|
|
605
|
-
return new Promise((r) => setTimeout(r, ms));
|
|
179
|
+
return withAdmission(() => grant.release(), grant.token);
|
|
606
180
|
}
|
|
607
181
|
//# sourceMappingURL=tool-semaphore.js.map
|