@cleocode/core 2026.9.23 → 2026.9.25
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/admin/import-tasks.d.ts.map +1 -1
- package/dist/admin/import-tasks.js +35 -6
- package/dist/admin/import-tasks.js.map +1 -1
- package/dist/admin/import.d.ts.map +1 -1
- package/dist/admin/import.js +25 -6
- package/dist/admin/import.js.map +1 -1
- package/dist/audit-prune.d.ts +32 -0
- package/dist/audit-prune.d.ts.map +1 -1
- package/dist/audit-prune.js +37 -3
- package/dist/audit-prune.js.map +1 -1
- package/dist/build-provenance.json +2 -2
- package/dist/cloud/crypto.d.ts +1 -2
- package/dist/cloud/crypto.d.ts.map +1 -1
- package/dist/cloud/crypto.js +1 -11
- package/dist/cloud/crypto.js.map +1 -1
- package/dist/cloud/http.d.ts +8 -0
- package/dist/cloud/http.d.ts.map +1 -1
- package/dist/cloud/http.js +8 -1
- package/dist/cloud/http.js.map +1 -1
- package/dist/cloud/index.d.ts +6 -1
- package/dist/cloud/index.d.ts.map +1 -1
- package/dist/cloud/index.js +6 -1
- package/dist/cloud/index.js.map +1 -1
- package/dist/cloud/nexus-auth.d.ts +169 -0
- package/dist/cloud/nexus-auth.d.ts.map +1 -0
- package/dist/cloud/nexus-auth.js +372 -0
- package/dist/cloud/nexus-auth.js.map +1 -0
- package/dist/cloud/nexus-credentials.d.ts +188 -0
- package/dist/cloud/nexus-credentials.d.ts.map +1 -0
- package/dist/cloud/nexus-credentials.js +323 -0
- package/dist/cloud/nexus-credentials.js.map +1 -0
- package/dist/cloud/nexus-link.d.ts +85 -0
- package/dist/cloud/nexus-link.d.ts.map +1 -0
- package/dist/cloud/nexus-link.js +226 -0
- package/dist/cloud/nexus-link.js.map +1 -0
- package/dist/cloud/presence.d.ts +88 -0
- package/dist/cloud/presence.d.ts.map +1 -0
- package/dist/cloud/presence.js +137 -0
- package/dist/cloud/presence.js.map +1 -0
- package/dist/cloud/projects.d.ts +3 -1
- package/dist/cloud/projects.d.ts.map +1 -1
- package/dist/cloud/projects.js +4 -2
- package/dist/cloud/projects.js.map +1 -1
- package/dist/cloud/uuidv7.d.ts +9 -0
- package/dist/cloud/uuidv7.d.ts.map +1 -0
- package/dist/cloud/uuidv7.js +19 -0
- package/dist/cloud/uuidv7.js.map +1 -0
- package/dist/crypto/credentials.d.ts +14 -4
- package/dist/crypto/credentials.d.ts.map +1 -1
- package/dist/crypto/credentials.js +15 -1
- package/dist/crypto/credentials.js.map +1 -1
- package/dist/decide/bench/dataset.d.ts +125 -0
- package/dist/decide/bench/dataset.d.ts.map +1 -0
- package/dist/decide/bench/dataset.js +457 -0
- package/dist/decide/bench/dataset.js.map +1 -0
- package/dist/decide/bench/index.d.ts +23 -0
- package/dist/decide/bench/index.d.ts.map +1 -0
- package/dist/decide/bench/index.js +23 -0
- package/dist/decide/bench/index.js.map +1 -0
- package/dist/decide/bench/metrics.d.ts +55 -0
- package/dist/decide/bench/metrics.d.ts.map +1 -0
- package/dist/decide/bench/metrics.js +100 -0
- package/dist/decide/bench/metrics.js.map +1 -0
- package/dist/decide/bench/operation.d.ts +119 -0
- package/dist/decide/bench/operation.d.ts.map +1 -0
- package/dist/decide/bench/operation.js +171 -0
- package/dist/decide/bench/operation.js.map +1 -0
- package/dist/decide/bench/profiles.d.ts +102 -0
- package/dist/decide/bench/profiles.d.ts.map +1 -0
- package/dist/decide/bench/profiles.js +175 -0
- package/dist/decide/bench/profiles.js.map +1 -0
- package/dist/decide/bench/questions.d.ts +40 -0
- package/dist/decide/bench/questions.d.ts.map +1 -0
- package/dist/decide/bench/questions.js +107 -0
- package/dist/decide/bench/questions.js.map +1 -0
- package/dist/decide/bench/report.d.ts +21 -0
- package/dist/decide/bench/report.d.ts.map +1 -0
- package/dist/decide/bench/report.js +125 -0
- package/dist/decide/bench/report.js.map +1 -0
- package/dist/decide/bench/runner.d.ts +208 -0
- package/dist/decide/bench/runner.d.ts.map +1 -0
- package/dist/decide/bench/runner.js +336 -0
- package/dist/decide/bench/runner.js.map +1 -0
- package/dist/decide/bench/source.d.ts +21 -0
- package/dist/decide/bench/source.d.ts.map +1 -0
- package/dist/decide/bench/source.js +67 -0
- package/dist/decide/bench/source.js.map +1 -0
- package/dist/decide/bench/spot-check.d.ts +117 -0
- package/dist/decide/bench/spot-check.d.ts.map +1 -0
- package/dist/decide/bench/spot-check.js +221 -0
- package/dist/decide/bench/spot-check.js.map +1 -0
- package/dist/decide/bench/stats.d.ts +57 -0
- package/dist/decide/bench/stats.d.ts.map +1 -0
- package/dist/decide/bench/stats.js +82 -0
- package/dist/decide/bench/stats.js.map +1 -0
- package/dist/decide/bench/types.d.ts +216 -0
- package/dist/decide/bench/types.d.ts.map +1 -0
- package/dist/decide/bench/types.js +104 -0
- package/dist/decide/bench/types.js.map +1 -0
- package/dist/decide/client.d.ts +35 -1
- package/dist/decide/client.d.ts.map +1 -1
- package/dist/decide/client.js +135 -35
- package/dist/decide/client.js.map +1 -1
- package/dist/decide/credentials.d.ts +177 -17
- package/dist/decide/credentials.d.ts.map +1 -1
- package/dist/decide/credentials.js +505 -41
- package/dist/decide/credentials.js.map +1 -1
- package/dist/decide/index.d.ts +8 -8
- package/dist/decide/index.d.ts.map +1 -1
- package/dist/decide/index.js +8 -8
- package/dist/decide/index.js.map +1 -1
- package/dist/decide/jev-wire.d.ts +55 -19
- package/dist/decide/jev-wire.d.ts.map +1 -1
- package/dist/decide/jev-wire.js +116 -37
- package/dist/decide/jev-wire.js.map +1 -1
- package/dist/decide/operations.d.ts +63 -12
- package/dist/decide/operations.d.ts.map +1 -1
- package/dist/decide/operations.js +116 -58
- package/dist/decide/operations.js.map +1 -1
- package/dist/decide/provider-state.d.ts +85 -12
- package/dist/decide/provider-state.d.ts.map +1 -1
- package/dist/decide/provider-state.js +154 -21
- package/dist/decide/provider-state.js.map +1 -1
- package/dist/decide/provider.d.ts +5 -0
- package/dist/decide/provider.d.ts.map +1 -1
- package/dist/decide/provider.js.map +1 -1
- package/dist/decide/providers.d.ts +15 -2
- package/dist/decide/providers.d.ts.map +1 -1
- package/dist/decide/providers.js +22 -6
- package/dist/decide/providers.js.map +1 -1
- package/dist/decide/sites/registry.d.ts +22 -0
- package/dist/decide/sites/registry.d.ts.map +1 -1
- package/dist/decide/sites/registry.js +23 -0
- package/dist/decide/sites/registry.js.map +1 -1
- package/dist/decide/wizard.d.ts +12 -4
- package/dist/decide/wizard.d.ts.map +1 -1
- package/dist/decide/wizard.js +79 -26
- package/dist/decide/wizard.js.map +1 -1
- package/dist/dispatch/mvi-projection.d.ts +15 -2
- package/dist/dispatch/mvi-projection.d.ts.map +1 -1
- package/dist/dispatch/mvi-projection.js +73 -12
- package/dist/dispatch/mvi-projection.js.map +1 -1
- package/dist/docs/adr-allocator.d.ts +2 -2
- package/dist/docs/adr-allocator.d.ts.map +1 -1
- package/dist/docs/adr-allocator.js +17 -4
- package/dist/docs/adr-allocator.js.map +1 -1
- package/dist/docs/blob-consolidation.js +1 -1
- package/dist/docs/blob-consolidation.js.map +1 -1
- package/dist/docs/display-alias.d.ts +1 -1
- package/dist/docs/display-alias.d.ts.map +1 -1
- package/dist/docs/display-alias.js +7 -4
- package/dist/docs/display-alias.js.map +1 -1
- package/dist/docs/docs-inconsistency-detector.js +1 -1
- package/dist/docs/docs-inconsistency-detector.js.map +1 -1
- package/dist/docs/docs-update.d.ts.map +1 -1
- package/dist/docs/docs-update.js +6 -1
- package/dist/docs/docs-update.js.map +1 -1
- package/dist/docs/export-document.js +18058 -14538
- package/dist/docs/export-document.js.map +3 -3
- package/dist/docs/numbering.js +1 -1
- package/dist/docs/numbering.js.map +1 -1
- package/dist/docs/supersede.d.ts.map +1 -1
- package/dist/docs/supersede.js +6 -3
- package/dist/docs/supersede.js.map +1 -1
- package/dist/docs/version-ssot.js +1 -1
- package/dist/docs/version-ssot.js.map +1 -1
- package/dist/doctor/db-substrate.d.ts.map +1 -1
- package/dist/doctor/db-substrate.js +39 -24
- package/dist/doctor/db-substrate.js.map +1 -1
- package/dist/doctor/knowledge-summary.d.ts +10 -3
- package/dist/doctor/knowledge-summary.d.ts.map +1 -1
- package/dist/doctor/knowledge-summary.js +10 -3
- package/dist/doctor/knowledge-summary.js.map +1 -1
- package/dist/doctor/orphan-ac-bindings.d.ts +64 -0
- package/dist/doctor/orphan-ac-bindings.d.ts.map +1 -0
- package/dist/doctor/orphan-ac-bindings.js +59 -0
- package/dist/doctor/orphan-ac-bindings.js.map +1 -0
- package/dist/doctor/project-identity.d.ts +128 -37
- package/dist/doctor/project-identity.d.ts.map +1 -1
- package/dist/doctor/project-identity.js +476 -63
- package/dist/doctor/project-identity.js.map +1 -1
- package/dist/doctor/projects.d.ts.map +1 -1
- package/dist/doctor/projects.js +43 -29
- package/dist/doctor/projects.js.map +1 -1
- package/dist/doctor/row-identity.d.ts +31 -0
- package/dist/doctor/row-identity.d.ts.map +1 -0
- package/dist/doctor/row-identity.js +93 -0
- package/dist/doctor/row-identity.js.map +1 -0
- package/dist/doctor/twin-collapse.d.ts +108 -2
- package/dist/doctor/twin-collapse.d.ts.map +1 -1
- package/dist/doctor/twin-collapse.js +309 -7
- package/dist/doctor/twin-collapse.js.map +1 -1
- package/dist/error-catalog.js +2 -2
- package/dist/error-catalog.js.map +1 -1
- package/dist/error-registry.js +1 -1
- package/dist/error-registry.js.map +1 -1
- package/dist/gateway-client/generated/types.gen.d.ts +22 -2
- package/dist/gateway-client/generated/types.gen.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +20 -11
- package/dist/init.js.map +1 -1
- package/dist/inject/index.d.ts.map +1 -1
- package/dist/inject/index.js +2 -3
- package/dist/inject/index.js.map +1 -1
- package/dist/internal.d.ts +5 -4
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +6 -4
- package/dist/internal.js.map +1 -1
- package/dist/lifecycle/verification/satisfies-validator.d.ts.map +1 -1
- package/dist/lifecycle/verification/satisfies-validator.js +10 -0
- package/dist/lifecycle/verification/satisfies-validator.js.map +1 -1
- package/dist/llm/credential-remove-entry.d.ts +59 -0
- package/dist/llm/credential-remove-entry.d.ts.map +1 -0
- package/dist/llm/credential-remove-entry.js +101 -0
- package/dist/llm/credential-remove-entry.js.map +1 -0
- package/dist/llm/oauth/device-code.d.ts +26 -6
- package/dist/llm/oauth/device-code.d.ts.map +1 -1
- package/dist/llm/oauth/device-code.js +44 -12
- package/dist/llm/oauth/device-code.js.map +1 -1
- package/dist/llm/plugin-facade.js +18202 -14682
- package/dist/llm/plugin-facade.js.map +3 -3
- package/dist/memory/attention.d.ts.map +1 -1
- package/dist/memory/attention.js +5 -3
- package/dist/memory/attention.js.map +1 -1
- package/dist/memory/decisions.d.ts +48 -3
- package/dist/memory/decisions.d.ts.map +1 -1
- package/dist/memory/decisions.js +98 -14
- package/dist/memory/decisions.js.map +1 -1
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +19 -10
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/learnings.d.ts +6 -6
- package/dist/memory/manifest-identity.d.ts +171 -0
- package/dist/memory/manifest-identity.d.ts.map +1 -0
- package/dist/memory/manifest-identity.js +345 -0
- package/dist/memory/manifest-identity.js.map +1 -0
- package/dist/memory/mental-model-queue.d.ts +14 -4
- package/dist/memory/mental-model-queue.d.ts.map +1 -1
- package/dist/memory/mental-model-queue.js +64 -35
- package/dist/memory/mental-model-queue.js.map +1 -1
- package/dist/memory/patterns.d.ts +4 -4
- package/dist/memory/pipeline-manifest-sqlite.d.ts +47 -5
- package/dist/memory/pipeline-manifest-sqlite.d.ts.map +1 -1
- package/dist/memory/pipeline-manifest-sqlite.js +130 -14
- package/dist/memory/pipeline-manifest-sqlite.js.map +1 -1
- package/dist/memory/retrieval/observe.d.ts.map +1 -1
- package/dist/memory/retrieval/observe.js +2 -0
- package/dist/memory/retrieval/observe.js.map +1 -1
- package/dist/memory/transcript-scanner.js +1 -1
- package/dist/migration/manual/T10165-backfill-adr-index.d.ts.map +1 -1
- package/dist/migration/manual/T10165-backfill-adr-index.js +5 -1
- package/dist/migration/manual/T10165-backfill-adr-index.js.map +1 -1
- package/dist/nexus/deps.d.ts.map +1 -1
- package/dist/nexus/deps.js +7 -14
- package/dist/nexus/deps.js.map +1 -1
- package/dist/nexus/discover.d.ts.map +1 -1
- package/dist/nexus/discover.js +6 -9
- package/dist/nexus/discover.js.map +1 -1
- package/dist/nexus/fleet-status.d.ts +83 -0
- package/dist/nexus/fleet-status.d.ts.map +1 -0
- package/dist/nexus/fleet-status.js +414 -0
- package/dist/nexus/fleet-status.js.map +1 -0
- package/dist/nexus/git-state.d.ts +15 -0
- package/dist/nexus/git-state.d.ts.map +1 -1
- package/dist/nexus/git-state.js +77 -3
- package/dist/nexus/git-state.js.map +1 -1
- package/dist/nexus/identity.d.ts.map +1 -1
- package/dist/nexus/identity.js +4 -0
- package/dist/nexus/identity.js.map +1 -1
- package/dist/nexus/index.d.ts +4 -1
- package/dist/nexus/index.d.ts.map +1 -1
- package/dist/nexus/index.js +7 -1
- package/dist/nexus/index.js.map +1 -1
- package/dist/nexus/migrate-json-to-sqlite.d.ts +3 -2
- package/dist/nexus/migrate-json-to-sqlite.d.ts.map +1 -1
- package/dist/nexus/migrate-json-to-sqlite.js +9 -17
- package/dist/nexus/migrate-json-to-sqlite.js.map +1 -1
- package/dist/nexus/ops.d.ts +1 -0
- package/dist/nexus/ops.d.ts.map +1 -1
- package/dist/nexus/project-activity.d.ts +104 -0
- package/dist/nexus/project-activity.d.ts.map +1 -0
- package/dist/nexus/project-activity.js +150 -0
- package/dist/nexus/project-activity.js.map +1 -0
- package/dist/nexus/projects-clean.d.ts.map +1 -1
- package/dist/nexus/projects-clean.js +22 -11
- package/dist/nexus/projects-clean.js.map +1 -1
- package/dist/nexus/projects-scan.d.ts.map +1 -1
- package/dist/nexus/projects-scan.js +8 -13
- package/dist/nexus/projects-scan.js.map +1 -1
- package/dist/nexus/query.d.ts +2 -2
- package/dist/nexus/query.d.ts.map +1 -1
- package/dist/nexus/query.js +8 -31
- package/dist/nexus/query.js.map +1 -1
- package/dist/nexus/registry-errors.d.ts +61 -0
- package/dist/nexus/registry-errors.d.ts.map +1 -0
- package/dist/nexus/registry-errors.js +85 -0
- package/dist/nexus/registry-errors.js.map +1 -0
- package/dist/nexus/registry-roots.d.ts +5 -2
- package/dist/nexus/registry-roots.d.ts.map +1 -1
- package/dist/nexus/registry-roots.js +8 -10
- package/dist/nexus/registry-roots.js.map +1 -1
- package/dist/nexus/registry.d.ts +48 -5
- package/dist/nexus/registry.d.ts.map +1 -1
- package/dist/nexus/registry.js +151 -85
- package/dist/nexus/registry.js.map +1 -1
- package/dist/orchestrate/pivot.d.ts +4 -0
- package/dist/orchestrate/pivot.d.ts.map +1 -1
- package/dist/orchestrate/pivot.js +75 -12
- package/dist/orchestrate/pivot.js.map +1 -1
- package/dist/orchestrate/query-ops.d.ts.map +1 -1
- package/dist/orchestrate/query-ops.js +29 -27
- package/dist/orchestrate/query-ops.js.map +1 -1
- package/dist/orchestrate/spawn-ops.d.ts.map +1 -1
- package/dist/orchestrate/spawn-ops.js +29 -3
- package/dist/orchestrate/spawn-ops.js.map +1 -1
- package/dist/orchestrate/worktree-complete.d.ts.map +1 -1
- package/dist/orchestrate/worktree-complete.js +40 -2
- package/dist/orchestrate/worktree-complete.js.map +1 -1
- package/dist/orchestration/bootstrap.d.ts.map +1 -1
- package/dist/orchestration/bootstrap.js +20 -14
- package/dist/orchestration/bootstrap.js.map +1 -1
- package/dist/orchestration/index.d.ts +15 -1
- package/dist/orchestration/index.d.ts.map +1 -1
- package/dist/orchestration/index.js +25 -6
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/lead-rollup.d.ts +7 -1
- package/dist/orchestration/lead-rollup.d.ts.map +1 -1
- package/dist/orchestration/lead-rollup.js +6 -3
- package/dist/orchestration/lead-rollup.js.map +1 -1
- package/dist/orchestration/spawn-prompt.d.ts +26 -0
- package/dist/orchestration/spawn-prompt.d.ts.map +1 -1
- package/dist/orchestration/spawn-prompt.js +63 -92
- package/dist/orchestration/spawn-prompt.js.map +1 -1
- package/dist/orchestration/waves.d.ts +21 -10
- package/dist/orchestration/waves.d.ts.map +1 -1
- package/dist/orchestration/waves.js +38 -35
- package/dist/orchestration/waves.js.map +1 -1
- package/dist/paths.d.ts +9 -2
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +30 -13
- package/dist/paths.js.map +1 -1
- package/dist/phases/index.d.ts +1 -1
- package/dist/phases/index.d.ts.map +1 -1
- package/dist/phases/index.js +3 -4
- package/dist/phases/index.js.map +1 -1
- package/dist/project-info.d.ts +40 -3
- package/dist/project-info.d.ts.map +1 -1
- package/dist/project-info.js +74 -6
- package/dist/project-info.js.map +1 -1
- package/dist/project-lifecycle.d.ts +28 -7
- package/dist/project-lifecycle.d.ts.map +1 -1
- package/dist/project-lifecycle.js +114 -47
- package/dist/project-lifecycle.js.map +1 -1
- package/dist/project-scope.d.ts +70 -3
- package/dist/project-scope.d.ts.map +1 -1
- package/dist/project-scope.js +154 -15
- package/dist/project-scope.js.map +1 -1
- package/dist/release/ci-evidence.d.ts +190 -0
- package/dist/release/ci-evidence.d.ts.map +1 -1
- package/dist/release/ci-evidence.js +436 -4
- package/dist/release/ci-evidence.js.map +1 -1
- package/dist/release/open.d.ts +12 -2
- package/dist/release/open.d.ts.map +1 -1
- package/dist/release/open.js +32 -3
- package/dist/release/open.js.map +1 -1
- package/dist/release/preflight-skip.d.ts +73 -0
- package/dist/release/preflight-skip.d.ts.map +1 -0
- package/dist/release/preflight-skip.js +254 -0
- package/dist/release/preflight-skip.js.map +1 -0
- package/dist/render/decide/index.d.ts +51 -0
- package/dist/render/decide/index.d.ts.map +1 -0
- package/dist/render/decide/index.js +289 -0
- package/dist/render/decide/index.js.map +1 -0
- package/dist/render/index.d.ts +1 -0
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +1 -0
- package/dist/render/index.js.map +1 -1
- package/dist/render/nexus/graph/index.d.ts +5 -0
- package/dist/render/nexus/graph/index.d.ts.map +1 -1
- package/dist/render/nexus/graph/index.js +53 -0
- package/dist/render/nexus/graph/index.js.map +1 -1
- package/dist/scaffold/ensure-config.d.ts +14 -6
- package/dist/scaffold/ensure-config.d.ts.map +1 -1
- package/dist/scaffold/ensure-config.js +39 -17
- package/dist/scaffold/ensure-config.js.map +1 -1
- package/dist/scaffold/project-identity.d.ts +115 -23
- package/dist/scaffold/project-identity.d.ts.map +1 -1
- package/dist/scaffold/project-identity.js +196 -44
- package/dist/scaffold/project-identity.js.map +1 -1
- package/dist/sdk/validator-ac-pull.d.ts.map +1 -1
- package/dist/sdk/validator-ac-pull.js +2 -1
- package/dist/sdk/validator-ac-pull.js.map +1 -1
- package/dist/selfimprove/fix-gen.js +18221 -14701
- package/dist/selfimprove/fix-gen.js.map +3 -3
- package/dist/sentient/cross-project-hygiene.d.ts +17 -6
- package/dist/sentient/cross-project-hygiene.d.ts.map +1 -1
- package/dist/sentient/cross-project-hygiene.js +22 -11
- package/dist/sentient/cross-project-hygiene.js.map +1 -1
- package/dist/sentient/propose-tick.d.ts.map +1 -1
- package/dist/sentient/propose-tick.js +2 -3
- package/dist/sentient/propose-tick.js.map +1 -1
- package/dist/sentient/stage-drift-tick.d.ts.map +1 -1
- package/dist/sentient/stage-drift-tick.js +2 -3
- package/dist/sentient/stage-drift-tick.js.map +1 -1
- package/dist/session/engine-ops.d.ts +13 -4
- package/dist/session/engine-ops.d.ts.map +1 -1
- package/dist/session/engine-ops.js +38 -45
- package/dist/session/engine-ops.js.map +1 -1
- package/dist/sessions/briefing.d.ts +7 -3
- package/dist/sessions/briefing.d.ts.map +1 -1
- package/dist/sessions/briefing.js +10 -10
- package/dist/sessions/briefing.js.map +1 -1
- package/dist/sessions/drift-watchdog.d.ts.map +1 -1
- package/dist/sessions/drift-watchdog.js +11 -19
- package/dist/sessions/drift-watchdog.js.map +1 -1
- package/dist/sessions/focus-state-store.d.ts +103 -26
- package/dist/sessions/focus-state-store.d.ts.map +1 -1
- package/dist/sessions/focus-state-store.js +166 -37
- package/dist/sessions/focus-state-store.js.map +1 -1
- package/dist/sessions/handoff.d.ts.map +1 -1
- package/dist/sessions/handoff.js +9 -18
- package/dist/sessions/handoff.js.map +1 -1
- package/dist/sessions/index.d.ts +4 -2
- package/dist/sessions/index.d.ts.map +1 -1
- package/dist/sessions/index.js +35 -6
- package/dist/sessions/index.js.map +1 -1
- package/dist/sessions/session-drift.d.ts.map +1 -1
- package/dist/sessions/session-drift.js +4 -2
- package/dist/sessions/session-drift.js.map +1 -1
- package/dist/sessions/session-view.d.ts +8 -1
- package/dist/sessions/session-view.d.ts.map +1 -1
- package/dist/sessions/session-view.js +9 -2
- package/dist/sessions/session-view.js.map +1 -1
- package/dist/setup/config-json-merge.d.ts.map +1 -1
- package/dist/setup/config-json-merge.js +1 -0
- package/dist/setup/config-json-merge.js.map +1 -1
- package/dist/setup/index.d.ts +4 -2
- package/dist/setup/index.d.ts.map +1 -1
- package/dist/setup/index.js +6 -2
- package/dist/setup/index.js.map +1 -1
- package/dist/setup/sections/nexus-account.d.ts +32 -0
- package/dist/setup/sections/nexus-account.d.ts.map +1 -0
- package/dist/setup/sections/nexus-account.js +64 -0
- package/dist/setup/sections/nexus-account.js.map +1 -0
- package/dist/setup/wizard.d.ts +1 -1
- package/dist/setup/wizard.d.ts.map +1 -1
- package/dist/setup/wizard.js.map +1 -1
- package/dist/skills/manifests/research.js +2 -0
- package/dist/skills/manifests/research.js.map +1 -1
- package/dist/skills/orchestrator/startup.d.ts.map +1 -1
- package/dist/skills/orchestrator/startup.js +18 -31
- package/dist/skills/orchestrator/startup.js.map +1 -1
- package/dist/skills/orchestrator/validator.d.ts.map +1 -1
- package/dist/skills/orchestrator/validator.js +9 -2
- package/dist/skills/orchestrator/validator.js.map +1 -1
- package/dist/skills/validation.d.ts +4 -1
- package/dist/skills/validation.d.ts.map +1 -1
- package/dist/skills/validation.js +11 -3
- package/dist/skills/validation.js.map +1 -1
- package/dist/snapshot/index.d.ts.map +1 -1
- package/dist/snapshot/index.js +60 -53
- package/dist/snapshot/index.js.map +1 -1
- package/dist/spawn/agent-identity.d.ts +33 -1
- package/dist/spawn/agent-identity.d.ts.map +1 -1
- package/dist/spawn/agent-identity.js +53 -1
- package/dist/spawn/agent-identity.js.map +1 -1
- package/dist/spawn/branch-lock.d.ts +111 -7
- package/dist/spawn/branch-lock.d.ts.map +1 -1
- package/dist/spawn/branch-lock.js +296 -8
- package/dist/spawn/branch-lock.js.map +1 -1
- package/dist/spawn/index.d.ts +1 -1
- package/dist/spawn/index.d.ts.map +1 -1
- package/dist/spawn/index.js +1 -1
- package/dist/spawn/index.js.map +1 -1
- package/dist/stats/index.d.ts.map +1 -1
- package/dist/stats/index.js +3 -4
- package/dist/stats/index.js.map +1 -1
- package/dist/status/index.d.ts +12 -3
- package/dist/status/index.d.ts.map +1 -1
- package/dist/status/index.js +47 -5
- package/dist/status/index.js.map +1 -1
- package/dist/store/ac-binding-prune.d.ts +144 -0
- package/dist/store/ac-binding-prune.d.ts.map +1 -0
- package/dist/store/ac-binding-prune.js +293 -0
- package/dist/store/ac-binding-prune.js.map +1 -0
- package/dist/store/agent-registry-store.d.ts.map +1 -1
- package/dist/store/agent-registry-store.js +3 -2
- package/dist/store/agent-registry-store.js.map +1 -1
- package/dist/store/attachment-repair.d.ts.map +1 -1
- package/dist/store/attachment-repair.js +42 -3
- package/dist/store/attachment-repair.js.map +1 -1
- package/dist/store/attachment-store.d.ts.map +1 -1
- package/dist/store/attachment-store.js +30 -46
- package/dist/store/attachment-store.js.map +1 -1
- package/dist/store/backup-recover-brain.d.ts +4 -0
- package/dist/store/backup-recover-brain.d.ts.map +1 -1
- package/dist/store/backup-recover-brain.js +2 -0
- package/dist/store/backup-recover-brain.js.map +1 -1
- package/dist/store/backup-recover.d.ts +9 -0
- package/dist/store/backup-recover.d.ts.map +1 -1
- package/dist/store/backup-recover.js +28 -1
- package/dist/store/backup-recover.js.map +1 -1
- package/dist/store/backup-sidecar.d.ts +115 -2
- package/dist/store/backup-sidecar.d.ts.map +1 -1
- package/dist/store/backup-sidecar.js +263 -3
- package/dist/store/backup-sidecar.js.map +1 -1
- package/dist/store/blob-keep.d.ts +135 -0
- package/dist/store/blob-keep.d.ts.map +1 -0
- package/dist/store/blob-keep.js +283 -0
- package/dist/store/blob-keep.js.map +1 -0
- package/dist/store/conduit-sqlite.d.ts.map +1 -1
- package/dist/store/conduit-sqlite.js +3 -2
- package/dist/store/conduit-sqlite.js.map +1 -1
- package/dist/store/converters.d.ts.map +1 -1
- package/dist/store/converters.js +11 -0
- package/dist/store/converters.js.map +1 -1
- package/dist/store/credential-transfer.d.ts +37 -5
- package/dist/store/credential-transfer.d.ts.map +1 -1
- package/dist/store/credential-transfer.js +76 -18
- package/dist/store/credential-transfer.js.map +1 -1
- package/dist/store/data-accessor.d.ts +1 -1
- package/dist/store/data-accessor.d.ts.map +1 -1
- package/dist/store/data-accessor.js.map +1 -1
- package/dist/store/db-helpers.d.ts +35 -11
- package/dist/store/db-helpers.d.ts.map +1 -1
- package/dist/store/db-helpers.js +107 -38
- package/dist/store/db-helpers.js.map +1 -1
- package/dist/store/display-id-alias.d.ts +529 -0
- package/dist/store/display-id-alias.d.ts.map +1 -0
- package/dist/store/display-id-alias.js +1063 -0
- package/dist/store/display-id-alias.js.map +1 -0
- package/dist/store/dual-scope-db.d.ts.map +1 -1
- package/dist/store/dual-scope-db.js +21 -0
- package/dist/store/dual-scope-db.js.map +1 -1
- package/dist/store/exodus/on-open.d.ts.map +1 -1
- package/dist/store/exodus/on-open.js +35 -0
- package/dist/store/exodus/on-open.js.map +1 -1
- package/dist/store/exodus/reconcile.d.ts.map +1 -1
- package/dist/store/exodus/reconcile.js +7 -2
- package/dist/store/exodus/reconcile.js.map +1 -1
- package/dist/store/exodus/recovery.d.ts.map +1 -1
- package/dist/store/exodus/recovery.js +20 -1
- package/dist/store/exodus/recovery.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/import-remap.d.ts +12 -1
- package/dist/store/import-remap.d.ts.map +1 -1
- package/dist/store/import-remap.js +14 -0
- package/dist/store/import-remap.js.map +1 -1
- package/dist/store/legacy-tasks-lineage.d.ts +3 -1
- package/dist/store/legacy-tasks-lineage.d.ts.map +1 -1
- package/dist/store/legacy-tasks-lineage.js +22 -3
- package/dist/store/legacy-tasks-lineage.js.map +1 -1
- package/dist/store/memory-accessor.js +1 -1
- package/dist/store/memory-accessor.js.map +1 -1
- package/dist/store/migration-manager.d.ts +61 -0
- package/dist/store/migration-manager.d.ts.map +1 -1
- package/dist/store/migration-manager.js +102 -4
- package/dist/store/migration-manager.js.map +1 -1
- package/dist/store/nexus-validation-schemas.d.ts +64 -0
- package/dist/store/nexus-validation-schemas.d.ts.map +1 -1
- package/dist/store/portable-bundle-import.d.ts +8 -0
- package/dist/store/portable-bundle-import.d.ts.map +1 -1
- package/dist/store/portable-bundle-import.js +10 -0
- package/dist/store/portable-bundle-import.js.map +1 -1
- package/dist/store/portable-bundle-scan.d.ts.map +1 -1
- package/dist/store/portable-bundle-scan.js +1 -0
- package/dist/store/portable-bundle-scan.js.map +1 -1
- package/dist/store/portable-bundle.d.ts.map +1 -1
- package/dist/store/portable-bundle.js +15 -14
- package/dist/store/portable-bundle.js.map +1 -1
- package/dist/store/pre-repair-snapshot.d.ts +4 -1
- package/dist/store/pre-repair-snapshot.d.ts.map +1 -1
- package/dist/store/pre-repair-snapshot.js +5 -1
- package/dist/store/pre-repair-snapshot.js.map +1 -1
- package/dist/store/regenerators.d.ts +4 -2
- package/dist/store/regenerators.d.ts.map +1 -1
- package/dist/store/regenerators.js +7 -3
- package/dist/store/regenerators.js.map +1 -1
- package/dist/store/repair-malformed-dbs.d.ts +4 -0
- package/dist/store/repair-malformed-dbs.d.ts.map +1 -1
- package/dist/store/repair-malformed-dbs.js +3 -0
- package/dist/store/repair-malformed-dbs.js.map +1 -1
- package/dist/store/row-identity-flag.d.ts +26 -0
- package/dist/store/row-identity-flag.d.ts.map +1 -0
- package/dist/store/row-identity-flag.js +31 -0
- package/dist/store/row-identity-flag.js.map +1 -0
- package/dist/store/row-identity-registry.d.ts +61 -0
- package/dist/store/row-identity-registry.d.ts.map +1 -0
- package/dist/store/row-identity-registry.js +198 -0
- package/dist/store/row-identity-registry.js.map +1 -0
- package/dist/store/row-identity.d.ts +390 -0
- package/dist/store/row-identity.d.ts.map +1 -0
- package/dist/store/row-identity.js +1240 -0
- package/dist/store/row-identity.js.map +1 -0
- package/dist/store/safety-data-accessor.d.ts +10 -3
- package/dist/store/safety-data-accessor.d.ts.map +1 -1
- package/dist/store/safety-data-accessor.js +15 -4
- package/dist/store/safety-data-accessor.js.map +1 -1
- package/dist/store/schema/attachments.d.ts +1 -1
- package/dist/store/schema/audit.d.ts +4 -4
- package/dist/store/schema/background-jobs.d.ts +1 -1
- package/dist/store/schema/cleo-global/nexus.d.ts +49 -1
- package/dist/store/schema/cleo-global/nexus.d.ts.map +1 -1
- package/dist/store/schema/cleo-global/nexus.js +17 -0
- package/dist/store/schema/cleo-global/nexus.js.map +1 -1
- package/dist/store/schema/cleo-global/skills.d.ts +2 -2
- package/dist/store/schema/cleo-project/audit.d.ts +4 -4
- package/dist/store/schema/cleo-project/docs.d.ts +17 -1
- package/dist/store/schema/cleo-project/docs.d.ts.map +1 -1
- package/dist/store/schema/cleo-project/docs.js +10 -0
- package/dist/store/schema/cleo-project/docs.js.map +1 -1
- package/dist/store/schema/cleo-project/lifecycle.d.ts +4 -4
- package/dist/store/schema/cleo-project/nexus-graph.d.ts +3 -3
- package/dist/store/schema/cleo-project/provenance-commits.d.ts +2 -2
- package/dist/store/schema/cleo-project/provenance-rest.d.ts +3 -3
- package/dist/store/schema/cleo-project/runtime.d.ts +3 -3
- package/dist/store/schema/cleo-project/tasks-core-batch2.d.ts +87 -1
- package/dist/store/schema/cleo-project/tasks-core-batch2.d.ts.map +1 -1
- package/dist/store/schema/cleo-project/tasks-core-batch2.js +35 -0
- package/dist/store/schema/cleo-project/tasks-core-batch2.js.map +1 -1
- package/dist/store/schema/cleo-project/tasks-core.d.ts +263 -7
- package/dist/store/schema/cleo-project/tasks-core.d.ts.map +1 -1
- package/dist/store/schema/cleo-project/tasks-core.js +77 -2
- package/dist/store/schema/cleo-project/tasks-core.js.map +1 -1
- package/dist/store/schema/cleo-shared/brain.d.ts +7 -7
- package/dist/store/schema/lifecycle.d.ts +4 -4
- package/dist/store/schema/manifest.d.ts +1 -1
- package/dist/store/schema/memory-schema.d.ts +6 -6
- package/dist/store/schema/nexus-schema.d.ts +51 -3
- package/dist/store/schema/nexus-schema.d.ts.map +1 -1
- package/dist/store/schema/nexus-schema.js +28 -7
- package/dist/store/schema/nexus-schema.js.map +1 -1
- package/dist/store/schema/provenance/releases.d.ts +1 -1
- package/dist/store/schema/skills-schema.d.ts +2 -2
- package/dist/store/schema/tasks.d.ts +6 -6
- package/dist/store/session-store.d.ts +65 -0
- package/dist/store/session-store.d.ts.map +1 -1
- package/dist/store/session-store.js +108 -7
- package/dist/store/session-store.js.map +1 -1
- package/dist/store/split-brain-import.d.ts +2 -14
- package/dist/store/split-brain-import.d.ts.map +1 -1
- package/dist/store/split-brain-import.js +4 -19
- package/dist/store/split-brain-import.js.map +1 -1
- package/dist/store/sqlite-data-accessor.d.ts +279 -2
- package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
- package/dist/store/sqlite-data-accessor.js +789 -91
- package/dist/store/sqlite-data-accessor.js.map +1 -1
- package/dist/store/sqlite.d.ts +15 -3
- package/dist/store/sqlite.d.ts.map +1 -1
- package/dist/store/sqlite.js +52 -20
- package/dist/store/sqlite.js.map +1 -1
- package/dist/store/store-write-guard.d.ts +9 -3
- package/dist/store/store-write-guard.d.ts.map +1 -1
- package/dist/store/store-write-guard.js +25 -4
- package/dist/store/store-write-guard.js.map +1 -1
- package/dist/store/sync/clock-store.d.ts +67 -0
- package/dist/store/sync/clock-store.d.ts.map +1 -0
- package/dist/store/sync/clock-store.js +117 -0
- package/dist/store/sync/clock-store.js.map +1 -0
- package/dist/store/sync/flags.d.ts +51 -0
- package/dist/store/sync/flags.d.ts.map +1 -0
- package/dist/store/sync/flags.js +81 -0
- package/dist/store/sync/flags.js.map +1 -0
- package/dist/store/sync/hlc.d.ts +115 -0
- package/dist/store/sync/hlc.d.ts.map +1 -0
- package/dist/store/sync/hlc.js +172 -0
- package/dist/store/sync/hlc.js.map +1 -0
- package/dist/store/sync/index.d.ts +20 -0
- package/dist/store/sync/index.d.ts.map +1 -0
- package/dist/store/sync/index.js +20 -0
- package/dist/store/sync/index.js.map +1 -0
- package/dist/store/sync/replica-registry.d.ts +85 -0
- package/dist/store/sync/replica-registry.d.ts.map +1 -0
- package/dist/store/sync/replica-registry.js +147 -0
- package/dist/store/sync/replica-registry.js.map +1 -0
- package/dist/store/sync/replica.d.ts +181 -0
- package/dist/store/sync/replica.d.ts.map +1 -0
- package/dist/store/sync/replica.js +305 -0
- package/dist/store/sync/replica.js.map +1 -0
- package/dist/store/sync/schema.d.ts +68 -0
- package/dist/store/sync/schema.d.ts.map +1 -0
- package/dist/store/sync/schema.js +130 -0
- package/dist/store/sync/schema.js.map +1 -0
- package/dist/store/sync/skew-hold.d.ts +71 -0
- package/dist/store/sync/skew-hold.d.ts.map +1 -0
- package/dist/store/sync/skew-hold.js +89 -0
- package/dist/store/sync/skew-hold.js.map +1 -0
- package/dist/store/table-classification.d.ts +11 -9
- package/dist/store/table-classification.d.ts.map +1 -1
- package/dist/store/table-classification.js +127 -33
- package/dist/store/table-classification.js.map +1 -1
- package/dist/store/task-claim.d.ts +144 -0
- package/dist/store/task-claim.d.ts.map +1 -0
- package/dist/store/task-claim.js +195 -0
- package/dist/store/task-claim.js.map +1 -0
- package/dist/store/task-version.d.ts +43 -5
- package/dist/store/task-version.d.ts.map +1 -1
- package/dist/store/task-version.js +113 -17
- package/dist/store/task-version.js.map +1 -1
- package/dist/store/tasks-schema.d.ts +2 -0
- package/dist/store/tasks-schema.d.ts.map +1 -1
- package/dist/store/tasks-schema.js +1 -0
- package/dist/store/tasks-schema.js.map +1 -1
- package/dist/store/tasks-sqlite.d.ts.map +1 -1
- package/dist/store/tasks-sqlite.js +10 -2
- package/dist/store/tasks-sqlite.js.map +1 -1
- package/dist/store/twin-collapse.d.ts +450 -22
- package/dist/store/twin-collapse.d.ts.map +1 -1
- package/dist/store/twin-collapse.js +1552 -49
- package/dist/store/twin-collapse.js.map +1 -1
- package/dist/store/umbrella-data-accessor.d.ts +10 -3
- package/dist/store/umbrella-data-accessor.d.ts.map +1 -1
- package/dist/store/umbrella-data-accessor.js +14 -4
- package/dist/store/umbrella-data-accessor.js.map +1 -1
- package/dist/store/validation-schemas.d.ts +402 -50
- package/dist/store/validation-schemas.d.ts.map +1 -1
- package/dist/store/with-retry.d.ts +36 -0
- package/dist/store/with-retry.d.ts.map +1 -1
- package/dist/store/with-retry.js +51 -0
- package/dist/store/with-retry.js.map +1 -1
- package/dist/store/worktree-build-guard.d.ts +13 -4
- package/dist/store/worktree-build-guard.d.ts.map +1 -1
- package/dist/store/worktree-build-guard.js +21 -10
- package/dist/store/worktree-build-guard.js.map +1 -1
- package/dist/store/worktree-isolation-guard.d.ts +121 -10
- package/dist/store/worktree-isolation-guard.d.ts.map +1 -1
- package/dist/store/worktree-isolation-guard.js +155 -34
- package/dist/store/worktree-isolation-guard.js.map +1 -1
- package/dist/system/backup.d.ts +7 -0
- package/dist/system/backup.d.ts.map +1 -1
- package/dist/system/backup.js +5 -0
- package/dist/system/backup.js.map +1 -1
- package/dist/system/health.d.ts.map +1 -1
- package/dist/system/health.js +6 -1
- package/dist/system/health.js.map +1 -1
- package/dist/system/inject-generate.d.ts.map +1 -1
- package/dist/system/inject-generate.js +23 -10
- package/dist/system/inject-generate.js.map +1 -1
- package/dist/system/project-health.d.ts +17 -2
- package/dist/system/project-health.d.ts.map +1 -1
- package/dist/system/project-health.js +19 -6
- package/dist/system/project-health.js.map +1 -1
- package/dist/task-tools/index.d.ts +1 -1
- package/dist/task-tools/index.d.ts.map +1 -1
- package/dist/task-tools/index.js +1 -1
- package/dist/task-tools/index.js.map +1 -1
- package/dist/task-tools/score-task-priority.d.ts +38 -0
- package/dist/task-tools/score-task-priority.d.ts.map +1 -1
- package/dist/task-tools/score-task-priority.js +51 -0
- package/dist/task-tools/score-task-priority.js.map +1 -1
- package/dist/task-work/claims.d.ts +215 -0
- package/dist/task-work/claims.d.ts.map +1 -0
- package/dist/task-work/claims.js +272 -0
- package/dist/task-work/claims.js.map +1 -0
- package/dist/task-work/index.d.ts +47 -3
- package/dist/task-work/index.d.ts.map +1 -1
- package/dist/task-work/index.js +74 -41
- package/dist/task-work/index.js.map +1 -1
- package/dist/tasks/ac-coverage-gate.d.ts.map +1 -1
- package/dist/tasks/ac-coverage-gate.js +3 -0
- package/dist/tasks/ac-coverage-gate.js.map +1 -1
- package/dist/tasks/ac-table.d.ts +35 -7
- package/dist/tasks/ac-table.d.ts.map +1 -1
- package/dist/tasks/ac-table.js +119 -14
- package/dist/tasks/ac-table.js.map +1 -1
- package/dist/tasks/add.d.ts.map +1 -1
- package/dist/tasks/add.js +51 -4
- package/dist/tasks/add.js.map +1 -1
- package/dist/tasks/analyze.d.ts.map +1 -1
- package/dist/tasks/analyze.js +3 -4
- package/dist/tasks/analyze.js.map +1 -1
- package/dist/tasks/backfill-child-projections.js +47 -6
- package/dist/tasks/backfill-child-projections.js.map +1 -1
- package/dist/tasks/change-set.d.ts +5 -0
- package/dist/tasks/change-set.d.ts.map +1 -1
- package/dist/tasks/change-set.js +59 -3
- package/dist/tasks/change-set.js.map +1 -1
- package/dist/tasks/complete.d.ts +16 -0
- package/dist/tasks/complete.d.ts.map +1 -1
- package/dist/tasks/complete.js +33 -8
- package/dist/tasks/complete.js.map +1 -1
- package/dist/tasks/completion-evaluation.d.ts.map +1 -1
- package/dist/tasks/completion-evaluation.js +3 -0
- package/dist/tasks/completion-evaluation.js.map +1 -1
- package/dist/tasks/component-pr.d.ts +162 -1
- package/dist/tasks/component-pr.d.ts.map +1 -1
- package/dist/tasks/component-pr.js +560 -59
- package/dist/tasks/component-pr.js.map +1 -1
- package/dist/tasks/done-record.d.ts +14 -1
- package/dist/tasks/done-record.d.ts.map +1 -1
- package/dist/tasks/done-record.js +37 -0
- package/dist/tasks/done-record.js.map +1 -1
- package/dist/tasks/duplicate-detector.d.ts +20 -1
- package/dist/tasks/duplicate-detector.d.ts.map +1 -1
- package/dist/tasks/duplicate-detector.js +10 -2
- package/dist/tasks/duplicate-detector.js.map +1 -1
- package/dist/tasks/engine-wrap-ops.d.ts +19 -10
- package/dist/tasks/engine-wrap-ops.d.ts.map +1 -1
- package/dist/tasks/engine-wrap-ops.js +38 -10
- package/dist/tasks/engine-wrap-ops.js.map +1 -1
- package/dist/tasks/evidence.d.ts.map +1 -1
- package/dist/tasks/evidence.js +14 -3
- package/dist/tasks/evidence.js.map +1 -1
- package/dist/tasks/graph-ops.d.ts +9 -2
- package/dist/tasks/graph-ops.d.ts.map +1 -1
- package/dist/tasks/graph-ops.js +24 -32
- package/dist/tasks/graph-ops.js.map +1 -1
- package/dist/tasks/plan.d.ts.map +1 -1
- package/dist/tasks/plan.js +16 -60
- package/dist/tasks/plan.js.map +1 -1
- package/dist/tasks/task-context.d.ts.map +1 -1
- package/dist/tasks/task-context.js +13 -0
- package/dist/tasks/task-context.js.map +1 -1
- package/dist/tasks/task-import.d.ts.map +1 -1
- package/dist/tasks/task-import.js +21 -12
- package/dist/tasks/task-import.js.map +1 -1
- package/dist/tasks/task-next.d.ts +25 -2
- package/dist/tasks/task-next.d.ts.map +1 -1
- package/dist/tasks/task-next.js +32 -13
- package/dist/tasks/task-next.js.map +1 -1
- package/dist/tasks/update.d.ts.map +1 -1
- package/dist/tasks/update.js +7 -5
- package/dist/tasks/update.js.map +1 -1
- package/dist/upgrade.d.ts +1 -1
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/upgrade.js +48 -9
- package/dist/upgrade.js.map +1 -1
- package/dist/validation/compliance.d.ts +5 -1
- package/dist/validation/compliance.d.ts.map +1 -1
- package/dist/validation/compliance.js +24 -3
- package/dist/validation/compliance.js.map +1 -1
- package/dist/validation/doctor/checks.d.ts +20 -6
- package/dist/validation/doctor/checks.d.ts.map +1 -1
- package/dist/validation/doctor/checks.js +51 -8
- package/dist/validation/doctor/checks.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/protocol-common.d.ts +47 -2
- package/dist/validation/protocol-common.d.ts.map +1 -1
- package/dist/validation/protocol-common.js +86 -21
- package/dist/validation/protocol-common.js.map +1 -1
- package/dist/validation/validate-ops.d.ts.map +1 -1
- package/dist/validation/validate-ops.js +2 -3
- package/dist/validation/validate-ops.js.map +1 -1
- package/migrations/README.md +12 -0
- package/migrations/drizzle-cleo-global/20260929010000_t12512-registry-probed-opened/migration.sql +35 -0
- package/migrations/drizzle-cleo-global/20260929020000_t12721-git-state-head-committed-at/migration.sql +25 -0
- package/migrations/drizzle-cleo-project/20260928120000_t12341-row-uids/migration.sql +169 -0
- package/migrations/drizzle-cleo-project/20260929000000_t12535-docs-attachments-union-shape/migration.sql +21 -0
- package/migrations/drizzle-cleo-project/20260929120000_t12502-task-claim-leases/migration.sql +77 -0
- package/migrations/drizzle-cleo-project/20260929130000_t12736-claim-lease-iso-repair/migration.sql +37 -0
- package/migrations/sync-journal/20260929140000_t12342-sync-clock/migration.sql +42 -0
- package/package.json +23 -13
- package/schemas/project-info.schema.json +10 -4
- package/templates/CLEO-INJECTION.md +1 -1
- package/templates/CLEO-REFERENCE.md +7 -3
- package/templates/cleo-gitignore +11 -0
- package/templates/workflows/release-prepare.yml.tmpl +156 -10
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hybrid logical clock (HLC) for the change journal.
|
|
3
|
+
*
|
|
4
|
+
* Wire format (fixed by the cloud contract, `Hlc` in `@cleocode/contracts`):
|
|
5
|
+
* `PPPPPPPPPPPPP-CCCCCC-<replica uuid>`, where `P` is physical milliseconds
|
|
6
|
+
* since the Unix epoch zero-padded to 13 digits, `C` is the logical counter
|
|
7
|
+
* zero-padded to 6 digits, and the replica id is the lowercase UUIDv7 of the
|
|
8
|
+
* store that issued the timestamp. Tuple order `(phys, ctr, replica)` is
|
|
9
|
+
* exactly the lexical order of the encoded string, so SQL `ORDER BY hlc` and
|
|
10
|
+
* `MAX(hlc)` are correct.
|
|
11
|
+
*
|
|
12
|
+
* This module is pure. The persisted clock row lives in `clock-store.ts`.
|
|
13
|
+
*
|
|
14
|
+
* It never reads time from a uid (journal spec R7, T12341 §5.2): a backfilled
|
|
15
|
+
* uid's timestamp is the row's birth, or 0, not the time of a change. The
|
|
16
|
+
* module therefore imports nothing, and a test pins that.
|
|
17
|
+
*
|
|
18
|
+
* @task T12342
|
|
19
|
+
* @module store/sync/hlc
|
|
20
|
+
*/
|
|
21
|
+
/** The largest counter the 6-digit field can hold. */
|
|
22
|
+
export const MAX_COUNTER = 999_999;
|
|
23
|
+
/** The largest physical time the 13-digit field can hold (year 2286). */
|
|
24
|
+
export const MAX_PHYS = 9_999_999_999_999;
|
|
25
|
+
/**
|
|
26
|
+
* Default skew bound: a received HLC more than this far ahead of the local
|
|
27
|
+
* wall clock is held, never applied or dropped (journal spec §1.3, Q6).
|
|
28
|
+
*/
|
|
29
|
+
export const MAX_DRIFT_MS = 5 * 60 * 1000;
|
|
30
|
+
const HLC_RE = /^(\d{13})-(\d{6})-([0-9a-f-]{36})$/;
|
|
31
|
+
const REPLICA_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
32
|
+
/** Thrown for a malformed HLC, replica id or physical time. */
|
|
33
|
+
export class HlcError extends Error {
|
|
34
|
+
constructor(message) {
|
|
35
|
+
super(message);
|
|
36
|
+
this.name = 'HlcError';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function assertParts(phys, ctr, replica) {
|
|
40
|
+
if (!Number.isSafeInteger(phys) || phys < 0 || phys > MAX_PHYS) {
|
|
41
|
+
throw new HlcError(`HLC physical time out of range: ${phys}`);
|
|
42
|
+
}
|
|
43
|
+
if (!Number.isSafeInteger(ctr) || ctr < 0 || ctr > MAX_COUNTER) {
|
|
44
|
+
throw new HlcError(`HLC counter out of range: ${ctr}`);
|
|
45
|
+
}
|
|
46
|
+
if (!REPLICA_RE.test(replica)) {
|
|
47
|
+
throw new HlcError(`HLC replica id is not a lowercase UUID: ${replica}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Encode an HLC to its wire form.
|
|
52
|
+
*
|
|
53
|
+
* @param h - The clock value.
|
|
54
|
+
* @returns `PPPPPPPPPPPPP-CCCCCC-<replica>`.
|
|
55
|
+
* @throws {HlcError} When a part is out of range or the replica id is malformed.
|
|
56
|
+
*/
|
|
57
|
+
export function encodeHlc(h) {
|
|
58
|
+
assertParts(h.phys, h.ctr, h.replica);
|
|
59
|
+
return `${String(h.phys).padStart(13, '0')}-${String(h.ctr).padStart(6, '0')}-${h.replica}`;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Decode an HLC from its wire form.
|
|
63
|
+
*
|
|
64
|
+
* @param s - An encoded HLC.
|
|
65
|
+
* @returns The decoded parts.
|
|
66
|
+
* @throws {HlcError} When `s` is not an encoded HLC.
|
|
67
|
+
*/
|
|
68
|
+
export function parseHlc(s) {
|
|
69
|
+
const m = HLC_RE.exec(s);
|
|
70
|
+
if (!m)
|
|
71
|
+
throw new HlcError(`not an encoded HLC: ${s}`);
|
|
72
|
+
const h = { phys: Number(m[1]), ctr: Number(m[2]), replica: m[3] };
|
|
73
|
+
assertParts(h.phys, h.ctr, h.replica);
|
|
74
|
+
return h;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Total order on HLCs: `(phys, ctr, replica)`. The replica tiebreak is
|
|
78
|
+
* arbitrary but deterministic, so every replica orders identically.
|
|
79
|
+
*
|
|
80
|
+
* @returns Negative, zero or positive, like a sort comparator.
|
|
81
|
+
*/
|
|
82
|
+
export function compareHlc(a, b) {
|
|
83
|
+
if (a.phys !== b.phys)
|
|
84
|
+
return a.phys < b.phys ? -1 : 1;
|
|
85
|
+
if (a.ctr !== b.ctr)
|
|
86
|
+
return a.ctr < b.ctr ? -1 : 1;
|
|
87
|
+
if (a.replica === b.replica)
|
|
88
|
+
return 0;
|
|
89
|
+
return a.replica < b.replica ? -1 : 1;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The clock of a replica that has issued nothing yet.
|
|
93
|
+
*
|
|
94
|
+
* @param replica - The replica id.
|
|
95
|
+
*/
|
|
96
|
+
export function genesisHlc(replica) {
|
|
97
|
+
assertParts(0, 0, replica);
|
|
98
|
+
return { phys: 0, ctr: 0, replica };
|
|
99
|
+
}
|
|
100
|
+
/** Carry a counter overflow into the physical part. */
|
|
101
|
+
function carry(phys, ctr, replica) {
|
|
102
|
+
if (ctr > MAX_COUNTER)
|
|
103
|
+
return { phys: phys + 1, ctr: 0, replica };
|
|
104
|
+
return { phys, ctr, replica };
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Issue the next local HLC.
|
|
108
|
+
*
|
|
109
|
+
* `phys' = max(last.phys, wall)`; the counter increments when the physical
|
|
110
|
+
* part did not move and resets to 0 when it did; a counter past
|
|
111
|
+
* {@link MAX_COUNTER} carries into `phys`. HLCs therefore increase strictly
|
|
112
|
+
* per replica, even when the wall clock steps backwards or a batch issues
|
|
113
|
+
* 10^6 timestamps in one millisecond.
|
|
114
|
+
*
|
|
115
|
+
* @param last - The replica's current clock.
|
|
116
|
+
* @param wallMs - The physical candidate (a capture's `at_ms`, or `Date.now()`).
|
|
117
|
+
* @returns The new clock value, which is also the issued timestamp.
|
|
118
|
+
*/
|
|
119
|
+
export function tick(last, wallMs) {
|
|
120
|
+
const wall = Math.floor(wallMs);
|
|
121
|
+
assertParts(Math.max(0, wall), 0, last.replica);
|
|
122
|
+
const phys = Math.max(last.phys, wall);
|
|
123
|
+
const ctr = phys === last.phys ? last.ctr + 1 : 0;
|
|
124
|
+
return carry(phys, ctr, last.replica);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Merge a received HLC into the local clock (standard HLC receive rule).
|
|
128
|
+
*
|
|
129
|
+
* `phys' = max(last.phys, remote.phys, now)`. The counter is
|
|
130
|
+
* `max(last.ctr, remote.ctr) + 1` when all three agree, `last.ctr + 1` or
|
|
131
|
+
* `remote.ctr + 1` when `phys'` equals only that one, and 0 otherwise. The
|
|
132
|
+
* result keeps the LOCAL replica id.
|
|
133
|
+
*
|
|
134
|
+
* Callers apply the skew bound first ({@link isWithinSkew}): a remote HLC too
|
|
135
|
+
* far ahead must be held, never merged.
|
|
136
|
+
*
|
|
137
|
+
* @param last - The local clock.
|
|
138
|
+
* @param remote - The received timestamp.
|
|
139
|
+
* @param nowMs - The local wall clock.
|
|
140
|
+
* @returns The new local clock value.
|
|
141
|
+
*/
|
|
142
|
+
export function receive(last, remote, nowMs) {
|
|
143
|
+
const now = Math.floor(nowMs);
|
|
144
|
+
const phys = Math.max(last.phys, remote.phys, now);
|
|
145
|
+
let ctr;
|
|
146
|
+
if (phys === last.phys && phys === remote.phys)
|
|
147
|
+
ctr = Math.max(last.ctr, remote.ctr) + 1;
|
|
148
|
+
else if (phys === last.phys)
|
|
149
|
+
ctr = last.ctr + 1;
|
|
150
|
+
else if (phys === remote.phys)
|
|
151
|
+
ctr = remote.ctr + 1;
|
|
152
|
+
else
|
|
153
|
+
ctr = 0;
|
|
154
|
+
return carry(phys, ctr, last.replica);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Whether a received HLC is inside the skew bound: `phys <= now + maxDrift`.
|
|
158
|
+
*
|
|
159
|
+
* @param remote - The received timestamp.
|
|
160
|
+
* @param nowMs - The local wall clock.
|
|
161
|
+
* @param maxDriftMs - The bound; defaults to {@link MAX_DRIFT_MS}.
|
|
162
|
+
*/
|
|
163
|
+
export function isWithinSkew(remote, nowMs, maxDriftMs = MAX_DRIFT_MS) {
|
|
164
|
+
return remote.phys <= Math.floor(nowMs) + maxDriftMs;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* The larger of two HLCs (by {@link compareHlc}).
|
|
168
|
+
*/
|
|
169
|
+
export function maxHlc(a, b) {
|
|
170
|
+
return compareHlc(a, b) >= 0 ? a : b;
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=hlc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hlc.js","sourceRoot":"","sources":["../../../src/store/sync/hlc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAYH,sDAAsD;AACtD,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC,yEAAyE;AACzE,MAAM,CAAC,MAAM,QAAQ,GAAG,iBAAiB,CAAC;AAE1C;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAE1C,MAAM,MAAM,GAAG,oCAAoC,CAAC;AACpD,MAAM,UAAU,GAAG,gEAAgE,CAAC;AAEpF,+DAA+D;AAC/D,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF;AAED,SAAS,WAAW,CAAC,IAAY,EAAE,GAAW,EAAE,OAAe;IAC7D,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,QAAQ,EA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C;IACb,OAAO,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,MAAW,EAAE,KAAa,EAAE,UAAU,GAAG,YAAY;IAChF,OAAO,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,CAAM,EAAE,CAAM;IACnC,OAAO,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The change journal's foundation (T12342, slice S1): the hybrid logical
|
|
3
|
+
* clock, its persisted row, the store-level `sync.*` flags, the lazily
|
|
4
|
+
* applied sync schema, replica binding and the device replica registry.
|
|
5
|
+
*
|
|
6
|
+
* Nothing here runs on a hot path yet, and every write is behind a flag that
|
|
7
|
+
* is off by default. Capture (S2), sealing (S3), push (S4) and pull (S5)
|
|
8
|
+
* build on these modules.
|
|
9
|
+
*
|
|
10
|
+
* @task T12342
|
|
11
|
+
* @module store/sync
|
|
12
|
+
*/
|
|
13
|
+
export * from './clock-store.js';
|
|
14
|
+
export * from './flags.js';
|
|
15
|
+
export * from './hlc.js';
|
|
16
|
+
export * from './replica.js';
|
|
17
|
+
export * from './replica-registry.js';
|
|
18
|
+
export * from './schema.js';
|
|
19
|
+
export * from './skew-hold.js';
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/sync/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The change journal's foundation (T12342, slice S1): the hybrid logical
|
|
3
|
+
* clock, its persisted row, the store-level `sync.*` flags, the lazily
|
|
4
|
+
* applied sync schema, replica binding and the device replica registry.
|
|
5
|
+
*
|
|
6
|
+
* Nothing here runs on a hot path yet, and every write is behind a flag that
|
|
7
|
+
* is off by default. Capture (S2), sealing (S3), push (S4) and pull (S5)
|
|
8
|
+
* build on these modules.
|
|
9
|
+
*
|
|
10
|
+
* @task T12342
|
|
11
|
+
* @module store/sync
|
|
12
|
+
*/
|
|
13
|
+
export * from './clock-store.js';
|
|
14
|
+
export * from './flags.js';
|
|
15
|
+
export * from './hlc.js';
|
|
16
|
+
export * from './replica.js';
|
|
17
|
+
export * from './replica-registry.js';
|
|
18
|
+
export * from './schema.js';
|
|
19
|
+
export * from './skew-hold.js';
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/sync/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The device's replica registry (journal spec §1.5, N6).
|
|
3
|
+
*
|
|
4
|
+
* A JSON file of device state, never inside a store and never synced: its
|
|
5
|
+
* path comes from `@cleocode/paths` ({@link resolveSyncReplicaRegistryPath}),
|
|
6
|
+
* in the machine-local state dir, keyed by the stable device id. Per replica
|
|
7
|
+
* id it records the store's nonce, where the store lives, and the device-side
|
|
8
|
+
* high-water mark (`hwm`): the last `replicaSeq` this device persisted per
|
|
9
|
+
* stream. A store whose own persisted sequence is BELOW the hwm was rolled
|
|
10
|
+
* back (restored into the same file), which the open pass turns into a
|
|
11
|
+
* rebind.
|
|
12
|
+
*
|
|
13
|
+
* Losing the file (a new device, a wiped state dir) or finding it unreadable
|
|
14
|
+
* is treated as an empty registry: the open pass re-registers the store and
|
|
15
|
+
* does not rebind for that alone. The server's sequence check (S4) is the
|
|
16
|
+
* authority that catches what a lost registry cannot.
|
|
17
|
+
*
|
|
18
|
+
* Writes use the file-then-rename pattern, so a crash leaves the old or the
|
|
19
|
+
* new file, never a torn one.
|
|
20
|
+
*
|
|
21
|
+
* @task T12342
|
|
22
|
+
* @module store/sync/replica-registry
|
|
23
|
+
*/
|
|
24
|
+
/** One replica this device has bound. */
|
|
25
|
+
export interface ReplicaRegistryEntry {
|
|
26
|
+
/** The nonce minted with the replica and stored in its `_sync_replica` row. */
|
|
27
|
+
readonly nonce: string;
|
|
28
|
+
/** `project` or `global`. */
|
|
29
|
+
readonly scope: string;
|
|
30
|
+
/** Real path of the store file when last opened here. */
|
|
31
|
+
readonly dbRealpath: string;
|
|
32
|
+
/** Last persisted `replicaSeq` per stream. */
|
|
33
|
+
readonly hwm: Readonly<Record<string, number>>;
|
|
34
|
+
/** When this replica was retired on this device, if it was. */
|
|
35
|
+
readonly retiredAt?: string;
|
|
36
|
+
/** The replica that replaced it. */
|
|
37
|
+
readonly successor?: string;
|
|
38
|
+
readonly updatedAt: string;
|
|
39
|
+
}
|
|
40
|
+
/** The registry file. */
|
|
41
|
+
export interface ReplicaRegistryFile {
|
|
42
|
+
readonly version: 1;
|
|
43
|
+
readonly deviceId: string;
|
|
44
|
+
readonly replicas: Readonly<Record<string, ReplicaRegistryEntry>>;
|
|
45
|
+
}
|
|
46
|
+
/** Reads and writes one device's registry file. */
|
|
47
|
+
export declare class ReplicaRegistry {
|
|
48
|
+
readonly path: string;
|
|
49
|
+
readonly deviceId: string;
|
|
50
|
+
/**
|
|
51
|
+
* @param path - The registry file.
|
|
52
|
+
* @param deviceId - The device the file belongs to.
|
|
53
|
+
*/
|
|
54
|
+
constructor(path: string, deviceId: string);
|
|
55
|
+
/** The registry at its canonical path for `deviceId`. */
|
|
56
|
+
static forDevice(deviceId: string): ReplicaRegistry;
|
|
57
|
+
private empty;
|
|
58
|
+
/**
|
|
59
|
+
* The registry contents. A missing, unreadable or foreign file (another
|
|
60
|
+
* device id) reads as empty.
|
|
61
|
+
*/
|
|
62
|
+
read(): ReplicaRegistryFile;
|
|
63
|
+
/** One replica's entry, if registered. */
|
|
64
|
+
get(replicaId: string): ReplicaRegistryEntry | undefined;
|
|
65
|
+
/** Replace the whole file (file-then-rename). */
|
|
66
|
+
write(file: ReplicaRegistryFile): void;
|
|
67
|
+
/**
|
|
68
|
+
* Insert or update one replica's entry. The hwm only moves up.
|
|
69
|
+
*
|
|
70
|
+
* @returns Whether the file changed.
|
|
71
|
+
*/
|
|
72
|
+
upsert(replicaId: string, patch: Omit<ReplicaRegistryEntry, 'updatedAt' | 'hwm'> & {
|
|
73
|
+
hwm?: Readonly<Record<string, number>>;
|
|
74
|
+
}, now?: Date): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Advance a replica's hwm for one stream after a segment persist committed
|
|
77
|
+
* (S4 calls this right after the store transaction, §2.8). If the process
|
|
78
|
+
* dies in between, the store is ahead of the registry, which is the safe
|
|
79
|
+
* direction: only a store BEHIND the registry rebinds.
|
|
80
|
+
*
|
|
81
|
+
* @returns Whether the file changed.
|
|
82
|
+
*/
|
|
83
|
+
advanceHwm(replicaId: string, stream: string, seq: number, now?: Date): boolean;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=replica-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replica-registry.d.ts","sourceRoot":"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iD;IACjD,KAAK,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI;IAYtC;;;;OAIG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,KAAK,CAAC,GAAG;QACvD,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;KACxC,EACD,GAAG,GAAE,IAAiB,GACrB,OAAO;IAwBV;;;;;;;OAOG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,IAAiB,GAAG,OAAO;CAO5F"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The device's replica registry (journal spec §1.5, N6).
|
|
3
|
+
*
|
|
4
|
+
* A JSON file of device state, never inside a store and never synced: its
|
|
5
|
+
* path comes from `@cleocode/paths` ({@link resolveSyncReplicaRegistryPath}),
|
|
6
|
+
* in the machine-local state dir, keyed by the stable device id. Per replica
|
|
7
|
+
* id it records the store's nonce, where the store lives, and the device-side
|
|
8
|
+
* high-water mark (`hwm`): the last `replicaSeq` this device persisted per
|
|
9
|
+
* stream. A store whose own persisted sequence is BELOW the hwm was rolled
|
|
10
|
+
* back (restored into the same file), which the open pass turns into a
|
|
11
|
+
* rebind.
|
|
12
|
+
*
|
|
13
|
+
* Losing the file (a new device, a wiped state dir) or finding it unreadable
|
|
14
|
+
* is treated as an empty registry: the open pass re-registers the store and
|
|
15
|
+
* does not rebind for that alone. The server's sequence check (S4) is the
|
|
16
|
+
* authority that catches what a lost registry cannot.
|
|
17
|
+
*
|
|
18
|
+
* Writes use the file-then-rename pattern, so a crash leaves the old or the
|
|
19
|
+
* new file, never a torn one.
|
|
20
|
+
*
|
|
21
|
+
* @task T12342
|
|
22
|
+
* @module store/sync/replica-registry
|
|
23
|
+
*/
|
|
24
|
+
import { randomBytes } from 'node:crypto';
|
|
25
|
+
import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs';
|
|
26
|
+
import { dirname } from 'node:path';
|
|
27
|
+
import { resolveSyncReplicaRegistryPath } from '@cleocode/paths';
|
|
28
|
+
/** Reads and writes one device's registry file. */
|
|
29
|
+
export class ReplicaRegistry {
|
|
30
|
+
path;
|
|
31
|
+
deviceId;
|
|
32
|
+
/**
|
|
33
|
+
* @param path - The registry file.
|
|
34
|
+
* @param deviceId - The device the file belongs to.
|
|
35
|
+
*/
|
|
36
|
+
constructor(path, deviceId) {
|
|
37
|
+
this.path = path;
|
|
38
|
+
this.deviceId = deviceId;
|
|
39
|
+
}
|
|
40
|
+
/** The registry at its canonical path for `deviceId`. */
|
|
41
|
+
static forDevice(deviceId) {
|
|
42
|
+
return new ReplicaRegistry(resolveSyncReplicaRegistryPath(deviceId), deviceId);
|
|
43
|
+
}
|
|
44
|
+
empty() {
|
|
45
|
+
return { version: 1, deviceId: this.deviceId, replicas: {} };
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The registry contents. A missing, unreadable or foreign file (another
|
|
49
|
+
* device id) reads as empty.
|
|
50
|
+
*/
|
|
51
|
+
read() {
|
|
52
|
+
let raw;
|
|
53
|
+
try {
|
|
54
|
+
raw = readFileSync(this.path, 'utf8');
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return this.empty();
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
const parsed = JSON.parse(raw);
|
|
61
|
+
if (parsed.version !== 1 ||
|
|
62
|
+
parsed.deviceId !== this.deviceId ||
|
|
63
|
+
typeof parsed.replicas !== 'object' ||
|
|
64
|
+
parsed.replicas === null) {
|
|
65
|
+
return this.empty();
|
|
66
|
+
}
|
|
67
|
+
return { version: 1, deviceId: this.deviceId, replicas: parsed.replicas };
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return this.empty();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/** One replica's entry, if registered. */
|
|
74
|
+
get(replicaId) {
|
|
75
|
+
const replicas = this.read().replicas;
|
|
76
|
+
return Object.hasOwn(replicas, replicaId) ? replicas[replicaId] : undefined;
|
|
77
|
+
}
|
|
78
|
+
/** Replace the whole file (file-then-rename). */
|
|
79
|
+
write(file) {
|
|
80
|
+
mkdirSync(dirname(this.path), { recursive: true });
|
|
81
|
+
const tmp = `${this.path}.${process.pid}.${randomBytes(4).toString('hex')}.tmp`;
|
|
82
|
+
try {
|
|
83
|
+
writeFileSync(tmp, `${JSON.stringify(file, null, 2)}\n`, { mode: 0o600 });
|
|
84
|
+
renameSync(tmp, this.path);
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
rmSync(tmp, { force: true });
|
|
88
|
+
throw err;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Insert or update one replica's entry. The hwm only moves up.
|
|
93
|
+
*
|
|
94
|
+
* @returns Whether the file changed.
|
|
95
|
+
*/
|
|
96
|
+
upsert(replicaId, patch, now = new Date()) {
|
|
97
|
+
const file = this.read();
|
|
98
|
+
const prev = Object.hasOwn(file.replicas, replicaId) ? file.replicas[replicaId] : undefined;
|
|
99
|
+
const hwm = { ...(prev?.hwm ?? {}) };
|
|
100
|
+
for (const [stream, seq] of Object.entries(patch.hwm ?? {})) {
|
|
101
|
+
hwm[stream] = Math.max(hwm[stream] ?? 0, seq);
|
|
102
|
+
}
|
|
103
|
+
const next = {
|
|
104
|
+
nonce: patch.nonce,
|
|
105
|
+
scope: patch.scope,
|
|
106
|
+
dbRealpath: patch.dbRealpath,
|
|
107
|
+
hwm,
|
|
108
|
+
...(patch.retiredAt !== undefined ? { retiredAt: patch.retiredAt } : {}),
|
|
109
|
+
...(patch.successor !== undefined ? { successor: patch.successor } : {}),
|
|
110
|
+
updatedAt: prev?.updatedAt ?? now.toISOString(),
|
|
111
|
+
};
|
|
112
|
+
if (prev && sameEntry(prev, next))
|
|
113
|
+
return false;
|
|
114
|
+
this.write({
|
|
115
|
+
...file,
|
|
116
|
+
replicas: { ...file.replicas, [replicaId]: { ...next, updatedAt: now.toISOString() } },
|
|
117
|
+
});
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Advance a replica's hwm for one stream after a segment persist committed
|
|
122
|
+
* (S4 calls this right after the store transaction, §2.8). If the process
|
|
123
|
+
* dies in between, the store is ahead of the registry, which is the safe
|
|
124
|
+
* direction: only a store BEHIND the registry rebinds.
|
|
125
|
+
*
|
|
126
|
+
* @returns Whether the file changed.
|
|
127
|
+
*/
|
|
128
|
+
advanceHwm(replicaId, stream, seq, now = new Date()) {
|
|
129
|
+
const prev = this.get(replicaId);
|
|
130
|
+
if (!prev) {
|
|
131
|
+
throw new Error(`replica ${replicaId} is not registered on device ${this.deviceId}`);
|
|
132
|
+
}
|
|
133
|
+
return this.upsert(replicaId, { ...prev, hwm: { [stream]: seq } }, now);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function sameEntry(a, b) {
|
|
137
|
+
const keys = new Set([...Object.keys(a.hwm), ...Object.keys(b.hwm)]);
|
|
138
|
+
for (const k of keys)
|
|
139
|
+
if (a.hwm[k] !== b.hwm[k])
|
|
140
|
+
return false;
|
|
141
|
+
return (a.nonce === b.nonce &&
|
|
142
|
+
a.scope === b.scope &&
|
|
143
|
+
a.dbRealpath === b.dbRealpath &&
|
|
144
|
+
a.retiredAt === b.retiredAt &&
|
|
145
|
+
a.successor === b.successor);
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=replica-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replica-registry.js","sourceRoot":"","sources":["../../../src/store/sync/replica-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,E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SAAS,CAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replica identity: binding a store file to its replica, and rebinding a
|
|
3
|
+
* copy (journal spec §1.5, H3, N5, N6).
|
|
4
|
+
*
|
|
5
|
+
* A replica is one physical store file, not a machine: a worktree copy or a
|
|
6
|
+
* restored file is a separate replica. The binding is
|
|
7
|
+
* `(st_ino, st_birthtime, nonce)` plus the stable device id and the device
|
|
8
|
+
* registry's high-water mark. `st_dev` is NOT used: external volumes, OS
|
|
9
|
+
* updates, overlay and network mounts renumber it.
|
|
10
|
+
*
|
|
11
|
+
* Birthtime (N5): a birthtime of 0, or one equal to the ctime at bind (the
|
|
12
|
+
* libuv fallback where the filesystem has no birthtime), is stored as NULL,
|
|
13
|
+
* and birthtimes are compared only when both are non-NULL.
|
|
14
|
+
*
|
|
15
|
+
* The open pass rebinds when:
|
|
16
|
+
* - `file-identity`: the inode differs, or both birthtimes are known and
|
|
17
|
+
* differ (a copy, `VACUUM INTO` output, a restore to a new file);
|
|
18
|
+
* - `foreign-device`: the store was bound on another device;
|
|
19
|
+
* - `nonce-mismatch`: this device registered the replica id with another
|
|
20
|
+
* nonce;
|
|
21
|
+
* - `rollback`: for some stream the store's persisted `replicaSeq` is below
|
|
22
|
+
* the registry's hwm (a restore into the same inode, e.g. `.backup()`).
|
|
23
|
+
* A store missing from the registry is re-registered, never rebound for that
|
|
24
|
+
* alone (N6). The server's "seq exists, hash differs" answer is the authority
|
|
25
|
+
* behind that; S4 reports it through {@link rebindReplica}.
|
|
26
|
+
*
|
|
27
|
+
* A rebind retires the old row, mints a new replica id and nonce, carries the
|
|
28
|
+
* clock forward, and runs the registered {@link RebindHook}s in the same
|
|
29
|
+
* transaction. Marking inherited journal rows, discarding the pull cursor,
|
|
30
|
+
* pausing push, the reconcile and the signed retire transaction arrive with
|
|
31
|
+
* those tables (S4); they plug in as hooks.
|
|
32
|
+
*
|
|
33
|
+
* Everything here is behind the store-level `sync.*` flags: with every flag
|
|
34
|
+
* off, {@link syncOpenPass} reads and writes nothing.
|
|
35
|
+
*
|
|
36
|
+
* @task T12342
|
|
37
|
+
* @module store/sync/replica
|
|
38
|
+
*/
|
|
39
|
+
import type { DatabaseSync } from 'node:sqlite';
|
|
40
|
+
import { ReplicaRegistry, type ReplicaRegistryEntry } from './replica-registry.js';
|
|
41
|
+
/** Which store a replica is. */
|
|
42
|
+
export type ReplicaScope = 'project' | 'global';
|
|
43
|
+
/**
|
|
44
|
+
* How an open treats sync (§1.5). `off` for every non-canonical open
|
|
45
|
+
* (backups, snapshots, scratch copies, bundle staging): nothing is read or
|
|
46
|
+
* written. `live` for the canonical project and global stores. `test` for a
|
|
47
|
+
* scratch-bound replica that must never touch the device registry: the
|
|
48
|
+
* caller passes its own registry.
|
|
49
|
+
*/
|
|
50
|
+
export type SyncOpenMode = 'off' | 'live' | 'test';
|
|
51
|
+
/** Why a store was rebound. */
|
|
52
|
+
export type RebindReason = 'file-identity' | 'foreign-device' | 'nonce-mismatch' | 'rollback' | 'server-seq-conflict';
|
|
53
|
+
/** What `stat` reports about a store file, in nanoseconds. */
|
|
54
|
+
export interface FileStat {
|
|
55
|
+
readonly ino: bigint;
|
|
56
|
+
readonly birthtimeNs: bigint;
|
|
57
|
+
readonly ctimeNs: bigint;
|
|
58
|
+
}
|
|
59
|
+
/** Reads a file's stat. Injectable so tests can simulate filesystems. */
|
|
60
|
+
export type StatFn = (path: string) => FileStat;
|
|
61
|
+
/** The part of a file's identity the binding compares. */
|
|
62
|
+
export interface FileIdentity {
|
|
63
|
+
readonly ino: bigint;
|
|
64
|
+
/** Birthtime in ns, or null when unknown (N5). */
|
|
65
|
+
readonly birth: bigint | null;
|
|
66
|
+
}
|
|
67
|
+
/** A `_sync_replica` row. */
|
|
68
|
+
export interface ReplicaRow {
|
|
69
|
+
readonly replicaId: string;
|
|
70
|
+
readonly scope: ReplicaScope;
|
|
71
|
+
readonly nonce: string;
|
|
72
|
+
readonly deviceId: string;
|
|
73
|
+
readonly fileIno: bigint;
|
|
74
|
+
readonly fileBirth: bigint | null;
|
|
75
|
+
readonly boundAt: string;
|
|
76
|
+
readonly boundWhy: string;
|
|
77
|
+
readonly retiredAt: string | null;
|
|
78
|
+
readonly successor: string | null;
|
|
79
|
+
}
|
|
80
|
+
/** Context handed to a {@link RebindHook}. */
|
|
81
|
+
export interface RebindContext {
|
|
82
|
+
readonly previous: ReplicaRow;
|
|
83
|
+
readonly current: ReplicaRow;
|
|
84
|
+
readonly reasons: readonly RebindReason[];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Runs inside the rebind transaction, after the new replica is bound. S4
|
|
88
|
+
* registers the hooks that mark inherited rows, discard the cursor and pause
|
|
89
|
+
* push. A throw rolls the whole rebind back.
|
|
90
|
+
*/
|
|
91
|
+
export type RebindHook = (db: DatabaseSync, ctx: RebindContext) => void;
|
|
92
|
+
/**
|
|
93
|
+
* Register a hook that runs on every rebind.
|
|
94
|
+
*
|
|
95
|
+
* @returns A function that unregisters it.
|
|
96
|
+
*/
|
|
97
|
+
export declare function registerRebindHook(hook: RebindHook): () => void;
|
|
98
|
+
/** `fs.statSync` in bigint mode. */
|
|
99
|
+
export declare const defaultStat: StatFn;
|
|
100
|
+
/**
|
|
101
|
+
* The binding identity of a store file. A birthtime of 0 or equal to the
|
|
102
|
+
* ctime is the filesystem saying "unknown", so it reads as null (N5).
|
|
103
|
+
*/
|
|
104
|
+
export declare function fileIdentity(path: string, stat?: StatFn): FileIdentity;
|
|
105
|
+
/** The active (not retired) replica of a store, if bound. Read-only. */
|
|
106
|
+
export declare function activeReplica(db: DatabaseSync, scope: ReplicaScope): ReplicaRow | undefined;
|
|
107
|
+
/** Every replica row of a store, oldest first. Read-only. */
|
|
108
|
+
export declare function listReplicas(db: DatabaseSync): ReplicaRow[];
|
|
109
|
+
/**
|
|
110
|
+
* The store-side high-water mark: the last `replicaSeq` this store persisted
|
|
111
|
+
* per stream for a replica. Read-only.
|
|
112
|
+
*/
|
|
113
|
+
export declare function storeHwm(db: DatabaseSync, replicaId: string): Record<string, number>;
|
|
114
|
+
/**
|
|
115
|
+
* Record, in the caller's transaction, that a segment with `seq` was
|
|
116
|
+
* persisted for `stream`. S4 calls this in the segment-persist transaction,
|
|
117
|
+
* then {@link ReplicaRegistry.advanceHwm} after it commits. The value only
|
|
118
|
+
* moves up.
|
|
119
|
+
*/
|
|
120
|
+
export declare function persistStoreSeq(db: DatabaseSync, replicaId: string, stream: string, seq: number, now?: Date): void;
|
|
121
|
+
/**
|
|
122
|
+
* Why a bound store must rebind, if at all. Pure.
|
|
123
|
+
*
|
|
124
|
+
* @param row - The store's active replica row.
|
|
125
|
+
* @param identity - The file's identity now.
|
|
126
|
+
* @param deviceId - This device.
|
|
127
|
+
* @param entry - This device's registry entry for the replica, if any.
|
|
128
|
+
* @param hwm - The store-side hwm for the replica ({@link storeHwm}).
|
|
129
|
+
*/
|
|
130
|
+
export declare function rebindReasons(row: ReplicaRow, identity: FileIdentity, deviceId: string, entry: ReplicaRegistryEntry | undefined, hwm: Readonly<Record<string, number>>): RebindReason[];
|
|
131
|
+
/** Options for {@link syncOpenPass} and {@link rebindReplica}. */
|
|
132
|
+
export interface SyncOpenOptions {
|
|
133
|
+
/** Path of the store file the handle has open. */
|
|
134
|
+
readonly dbPath: string;
|
|
135
|
+
readonly scope: ReplicaScope;
|
|
136
|
+
readonly mode: SyncOpenMode;
|
|
137
|
+
/** This device. Defaults to `getStableDeviceId()` (live mode only). */
|
|
138
|
+
readonly deviceId?: string;
|
|
139
|
+
/** The device registry. Required in `test` mode; defaults to the device's in `live` mode. */
|
|
140
|
+
readonly registry?: ReplicaRegistry;
|
|
141
|
+
readonly stat?: StatFn;
|
|
142
|
+
readonly now?: () => Date;
|
|
143
|
+
/** Sync schema folder override (tests). */
|
|
144
|
+
readonly schemaRoot?: string;
|
|
145
|
+
}
|
|
146
|
+
/** What an open pass did. */
|
|
147
|
+
export type SyncOpenResult = {
|
|
148
|
+
readonly status: 'off' | 'disabled';
|
|
149
|
+
} | {
|
|
150
|
+
readonly status: 'bound' | 'rebound';
|
|
151
|
+
readonly replicaId: string;
|
|
152
|
+
readonly previousReplicaId?: string;
|
|
153
|
+
readonly reasons: readonly RebindReason[];
|
|
154
|
+
/** Whether the device registry file was written. */
|
|
155
|
+
readonly registryWritten: boolean;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* The sync open pass for a canonical store open.
|
|
159
|
+
*
|
|
160
|
+
* With `mode: 'off'`, or with every `sync.*` flag off on the store, it reads
|
|
161
|
+
* nothing beyond the flags and writes nothing. Otherwise, under
|
|
162
|
+
* `BEGIN IMMEDIATE`: it binds an unbound store, rebinds a copy, a rolled-back
|
|
163
|
+
* or a foreign store, and heals the clock. Then it brings the device registry
|
|
164
|
+
* up to date (re-registering a store the registry lost, recording a rename).
|
|
165
|
+
*
|
|
166
|
+
* Not yet called by `openDualScopeDb`: the capture slice (S2) wires it in.
|
|
167
|
+
*/
|
|
168
|
+
export declare function syncOpenPass(db: DatabaseSync, opts: SyncOpenOptions): SyncOpenResult;
|
|
169
|
+
/**
|
|
170
|
+
* Force a rebind of a bound store: the hook S4 uses when the server answers a
|
|
171
|
+
* push with "seq exists, hash differs" (N6: the server hwm is authoritative).
|
|
172
|
+
*
|
|
173
|
+
* @throws {Error} When the store has no active replica.
|
|
174
|
+
*/
|
|
175
|
+
export declare function rebindReplica(db: DatabaseSync, opts: SyncOpenOptions, reason?: RebindReason): {
|
|
176
|
+
replicaId: string;
|
|
177
|
+
previousReplicaId: string;
|
|
178
|
+
};
|
|
179
|
+
/** The current clock of the store's active replica, for diagnostics. Read-only. */
|
|
180
|
+
export declare function currentClock(db: DatabaseSync, scope: ReplicaScope): string | undefined;
|
|
181
|
+
//# sourceMappingURL=replica.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replica.d.ts","sourceRoot":"","sources":["../../../src/store/sync/replica.ts"],"names":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