@claudexor/daemon 3.24.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-resets.d.ts +39 -0
- package/dist/account-resets.d.ts.map +1 -0
- package/dist/account-resets.js +174 -0
- package/dist/account-resets.js.map +1 -0
- package/dist/client.d.ts +25 -6
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +55 -51
- package/dist/client.js.map +1 -1
- package/dist/command-authority.d.ts +11 -8
- package/dist/command-authority.d.ts.map +1 -1
- package/dist/command-authority.js +5 -6
- package/dist/command-authority.js.map +1 -1
- package/dist/command-list-projection.d.ts +0 -1
- package/dist/command-list-projection.d.ts.map +1 -1
- package/dist/command-list-projection.js +0 -6
- package/dist/command-list-projection.js.map +1 -1
- package/dist/command-list-select.d.ts +0 -4
- package/dist/command-list-select.d.ts.map +1 -1
- package/dist/command-list-select.js +1 -115
- package/dist/command-list-select.js.map +1 -1
- package/dist/command-retention.d.ts +7 -19
- package/dist/command-retention.d.ts.map +1 -1
- package/dist/command-retention.js +1 -117
- package/dist/command-retention.js.map +1 -1
- package/dist/command-rpc.d.ts +4 -1
- package/dist/command-rpc.d.ts.map +1 -1
- package/dist/command-rpc.js +12 -1
- package/dist/command-rpc.js.map +1 -1
- package/dist/command-store.d.ts +15 -52
- package/dist/command-store.d.ts.map +1 -1
- package/dist/command-store.js +5 -493
- package/dist/command-store.js.map +1 -1
- package/dist/daemon-health.d.ts +56 -8
- package/dist/daemon-health.d.ts.map +1 -1
- package/dist/daemon-health.js +44 -9
- package/dist/daemon-health.js.map +1 -1
- package/dist/daemon-local-client.d.ts +28 -0
- package/dist/daemon-local-client.d.ts.map +1 -0
- package/dist/daemon-local-client.js +55 -0
- package/dist/daemon-local-client.js.map +1 -0
- package/dist/delivery-command.d.ts +4 -4
- package/dist/delivery-command.d.ts.map +1 -1
- package/dist/delivery-command.js.map +1 -1
- package/dist/index.d.ts +24 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -8
- package/dist/index.js.map +1 -1
- package/dist/interactions.d.ts +12 -28
- package/dist/interactions.d.ts.map +1 -1
- package/dist/interactions.js +22 -123
- package/dist/interactions.js.map +1 -1
- package/dist/job-admission.d.ts +26 -0
- package/dist/job-admission.d.ts.map +1 -0
- package/dist/job-admission.js +67 -0
- package/dist/job-admission.js.map +1 -0
- package/dist/job-record.d.ts.map +1 -1
- package/dist/job-record.js +5 -1
- package/dist/job-record.js.map +1 -1
- package/dist/journal-fold-policy.d.ts +1 -1
- package/dist/journal-fold-policy.d.ts.map +1 -1
- package/dist/journal-fold-policy.js +26 -2
- package/dist/journal-fold-policy.js.map +1 -1
- package/dist/journal-recovery-files.d.ts +1 -41
- package/dist/journal-recovery-files.d.ts.map +1 -1
- package/dist/journal-recovery-files.js +2 -340
- package/dist/journal-recovery-files.js.map +1 -1
- package/dist/loop-facts.d.ts +28 -0
- package/dist/loop-facts.d.ts.map +1 -0
- package/dist/loop-facts.js +97 -0
- package/dist/loop-facts.js.map +1 -0
- package/dist/memory-facts.d.ts +2 -0
- package/dist/memory-facts.d.ts.map +1 -1
- package/dist/memory-facts.js +5 -0
- package/dist/memory-facts.js.map +1 -1
- package/dist/model-operations.d.ts +11 -4
- package/dist/model-operations.d.ts.map +1 -1
- package/dist/model-operations.js +68 -38
- package/dist/model-operations.js.map +1 -1
- package/dist/operator-decisions.d.ts +15 -25
- package/dist/operator-decisions.d.ts.map +1 -1
- package/dist/operator-decisions.js +5 -84
- package/dist/operator-decisions.js.map +1 -1
- package/dist/projects.d.ts +42 -41
- package/dist/projects.d.ts.map +1 -1
- package/dist/projects.js +46 -184
- package/dist/projects.js.map +1 -1
- package/dist/quota-poll-lanes.d.ts +5 -3
- package/dist/quota-poll-lanes.d.ts.map +1 -1
- package/dist/quota-poll-lanes.js +16 -6
- package/dist/quota-poll-lanes.js.map +1 -1
- package/dist/quota-refresh-batches.d.ts +26 -0
- package/dist/quota-refresh-batches.d.ts.map +1 -0
- package/dist/quota-refresh-batches.js +83 -0
- package/dist/quota-refresh-batches.js.map +1 -0
- package/dist/quota-registry-replay.d.ts +19 -0
- package/dist/quota-registry-replay.d.ts.map +1 -0
- package/dist/quota-registry-replay.js +106 -0
- package/dist/quota-registry-replay.js.map +1 -0
- package/dist/quota-registry-support.d.ts +4 -1
- package/dist/quota-registry-support.d.ts.map +1 -1
- package/dist/quota-registry-support.js +15 -2
- package/dist/quota-registry-support.js.map +1 -1
- package/dist/quota-registry.d.ts +381 -7
- package/dist/quota-registry.d.ts.map +1 -1
- package/dist/quota-registry.js +111 -149
- package/dist/quota-registry.js.map +1 -1
- package/dist/quota-resources.d.ts +105 -0
- package/dist/quota-resources.d.ts.map +1 -0
- package/dist/quota-resources.js +153 -0
- package/dist/quota-resources.js.map +1 -0
- package/dist/runless-turn-recovery.d.ts +2 -9
- package/dist/runless-turn-recovery.d.ts.map +1 -1
- package/dist/runless-turn-recovery.js +0 -14
- package/dist/runless-turn-recovery.js.map +1 -1
- package/dist/server.d.ts +23 -22
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +74 -84
- package/dist/server.js.map +1 -1
- package/dist/store/blob-files.d.ts +71 -0
- package/dist/store/blob-files.d.ts.map +1 -0
- package/dist/store/blob-files.js +160 -0
- package/dist/store/blob-files.js.map +1 -0
- package/dist/store/command-prune.d.ts +37 -0
- package/dist/store/command-prune.d.ts.map +1 -0
- package/dist/store/command-prune.js +123 -0
- package/dist/store/command-prune.js.map +1 -0
- package/dist/store/command-queries.d.ts +41 -0
- package/dist/store/command-queries.d.ts.map +1 -0
- package/dist/store/command-queries.js +186 -0
- package/dist/store/command-queries.js.map +1 -0
- package/dist/store/command-rows.d.ts +66 -0
- package/dist/store/command-rows.d.ts.map +1 -0
- package/dist/store/command-rows.js +141 -0
- package/dist/store/command-rows.js.map +1 -0
- package/dist/store/commands.d.ts +49 -0
- package/dist/store/commands.d.ts.map +1 -0
- package/dist/store/commands.js +247 -0
- package/dist/store/commands.js.map +1 -0
- package/dist/store/cursors.d.ts +33 -0
- package/dist/store/cursors.d.ts.map +1 -0
- package/dist/store/cursors.js +82 -0
- package/dist/store/cursors.js.map +1 -0
- package/dist/store/engine-recovery-files.d.ts +14 -0
- package/dist/store/engine-recovery-files.d.ts.map +1 -0
- package/dist/store/engine-recovery-files.js +53 -0
- package/dist/store/engine-recovery-files.js.map +1 -0
- package/dist/store/engine-state-recovery.d.ts +71 -0
- package/dist/store/engine-state-recovery.d.ts.map +1 -0
- package/dist/store/engine-state-recovery.js +318 -0
- package/dist/store/engine-state-recovery.js.map +1 -0
- package/dist/store/errors.d.ts +80 -0
- package/dist/store/errors.d.ts.map +1 -0
- package/dist/store/errors.js +130 -0
- package/dist/store/errors.js.map +1 -0
- package/dist/store/event-store.d.ts +52 -0
- package/dist/store/event-store.d.ts.map +1 -0
- package/dist/store/event-store.js +117 -0
- package/dist/store/event-store.js.map +1 -0
- package/dist/store/external-files.d.ts +40 -0
- package/dist/store/external-files.d.ts.map +1 -0
- package/dist/store/external-files.js +90 -0
- package/dist/store/external-files.js.map +1 -0
- package/dist/store/flusher-protocol.d.ts +82 -0
- package/dist/store/flusher-protocol.d.ts.map +1 -0
- package/dist/store/flusher-protocol.js +23 -0
- package/dist/store/flusher-protocol.js.map +1 -0
- package/dist/store/flusher-worker.d.ts +24 -0
- package/dist/store/flusher-worker.d.ts.map +1 -0
- package/dist/store/flusher-worker.js +185 -0
- package/dist/store/flusher-worker.js.map +1 -0
- package/dist/store/flusher.d.ts +87 -0
- package/dist/store/flusher.d.ts.map +1 -0
- package/dist/store/flusher.js +264 -0
- package/dist/store/flusher.js.map +1 -0
- package/dist/store/generations.d.ts +43 -0
- package/dist/store/generations.d.ts.map +1 -0
- package/dist/store/generations.js +143 -0
- package/dist/store/generations.js.map +1 -0
- package/dist/store/idempotency.d.ts +25 -0
- package/dist/store/idempotency.d.ts.map +1 -0
- package/dist/store/idempotency.js +53 -0
- package/dist/store/idempotency.js.map +1 -0
- package/dist/store/import-context.d.ts +22 -0
- package/dist/store/import-context.d.ts.map +1 -0
- package/dist/store/import-context.js +87 -0
- package/dist/store/import-context.js.map +1 -0
- package/dist/store/import-discovery.d.ts +6 -0
- package/dist/store/import-discovery.d.ts.map +1 -0
- package/dist/store/import-discovery.js +66 -0
- package/dist/store/import-discovery.js.map +1 -0
- package/dist/store/import-records.d.ts +6 -0
- package/dist/store/import-records.d.ts.map +1 -0
- package/dist/store/import-records.js +191 -0
- package/dist/store/import-records.js.map +1 -0
- package/dist/store/import-resources.d.ts +14 -0
- package/dist/store/import-resources.d.ts.map +1 -0
- package/dist/store/import-resources.js +197 -0
- package/dist/store/import-resources.js.map +1 -0
- package/dist/store/import-source.d.ts +24 -0
- package/dist/store/import-source.d.ts.map +1 -0
- package/dist/store/import-source.js +65 -0
- package/dist/store/import-source.js.map +1 -0
- package/dist/store/import-verify.d.ts +6 -0
- package/dist/store/import-verify.d.ts.map +1 -0
- package/dist/store/import-verify.js +97 -0
- package/dist/store/import-verify.js.map +1 -0
- package/dist/store/import-worker.d.ts +18 -0
- package/dist/store/import-worker.d.ts.map +1 -0
- package/dist/store/import-worker.js +69 -0
- package/dist/store/import-worker.js.map +1 -0
- package/dist/store/importer.d.ts +42 -0
- package/dist/store/importer.d.ts.map +1 -0
- package/dist/store/importer.js +239 -0
- package/dist/store/importer.js.map +1 -0
- package/dist/store/interactions.d.ts +22 -0
- package/dist/store/interactions.d.ts.map +1 -0
- package/dist/store/interactions.js +82 -0
- package/dist/store/interactions.js.map +1 -0
- package/dist/store/legacy-journal/frame-codec.d.ts +94 -0
- package/dist/store/legacy-journal/frame-codec.d.ts.map +1 -0
- package/dist/store/legacy-journal/frame-codec.js +352 -0
- package/dist/store/legacy-journal/frame-codec.js.map +1 -0
- package/dist/store/legacy-journal/frame-reader.d.ts +30 -0
- package/dist/store/legacy-journal/frame-reader.d.ts.map +1 -0
- package/dist/store/legacy-journal/frame-reader.js +97 -0
- package/dist/store/legacy-journal/frame-reader.js.map +1 -0
- package/dist/store/legacy-journal/journal-fold.d.ts +47 -0
- package/dist/store/legacy-journal/journal-fold.d.ts.map +1 -0
- package/dist/store/legacy-journal/journal-fold.js +81 -0
- package/dist/store/legacy-journal/journal-fold.js.map +1 -0
- package/dist/store/legacy-journal/journal-partition.d.ts +2 -0
- package/dist/store/legacy-journal/journal-partition.d.ts.map +1 -0
- package/dist/store/legacy-journal/journal-partition.js +10 -0
- package/dist/store/legacy-journal/journal-partition.js.map +1 -0
- package/dist/store/legacy-journal/read-only-preparation.d.ts +48 -0
- package/dist/store/legacy-journal/read-only-preparation.d.ts.map +1 -0
- package/dist/store/legacy-journal/read-only-preparation.js +430 -0
- package/dist/store/legacy-journal/read-only-preparation.js.map +1 -0
- package/dist/store/maintenance-worker.d.ts +5 -0
- package/dist/store/maintenance-worker.d.ts.map +1 -0
- package/dist/store/maintenance-worker.js +175 -0
- package/dist/store/maintenance-worker.js.map +1 -0
- package/dist/store/maintenance.d.ts +124 -0
- package/dist/store/maintenance.d.ts.map +1 -0
- package/dist/store/maintenance.js +197 -0
- package/dist/store/maintenance.js.map +1 -0
- package/dist/store/mutation.d.ts +34 -0
- package/dist/store/mutation.d.ts.map +1 -0
- package/dist/store/mutation.js +85 -0
- package/dist/store/mutation.js.map +1 -0
- package/dist/store/obligations.d.ts +101 -0
- package/dist/store/obligations.d.ts.map +1 -0
- package/dist/store/obligations.js +226 -0
- package/dist/store/obligations.js.map +1 -0
- package/dist/store/operator-decisions.d.ts +23 -0
- package/dist/store/operator-decisions.d.ts.map +1 -0
- package/dist/store/operator-decisions.js +68 -0
- package/dist/store/operator-decisions.js.map +1 -0
- package/dist/store/owner-generations.d.ts +33 -0
- package/dist/store/owner-generations.d.ts.map +1 -0
- package/dist/store/owner-generations.js +63 -0
- package/dist/store/owner-generations.js.map +1 -0
- package/dist/store/partitions.d.ts +37 -0
- package/dist/store/partitions.d.ts.map +1 -0
- package/dist/store/partitions.js +68 -0
- package/dist/store/partitions.js.map +1 -0
- package/dist/store/pragmas.d.ts +32 -0
- package/dist/store/pragmas.d.ts.map +1 -0
- package/dist/store/pragmas.js +65 -0
- package/dist/store/pragmas.js.map +1 -0
- package/dist/store/project-router.d.ts +325 -0
- package/dist/store/project-router.d.ts.map +1 -0
- package/dist/store/project-router.js +298 -0
- package/dist/store/project-router.js.map +1 -0
- package/dist/store/projects.d.ts +36 -0
- package/dist/store/projects.d.ts.map +1 -0
- package/dist/store/projects.js +238 -0
- package/dist/store/projects.js.map +1 -0
- package/dist/store/publish-blob.d.ts +20 -0
- package/dist/store/publish-blob.d.ts.map +1 -0
- package/dist/store/publish-blob.js +158 -0
- package/dist/store/publish-blob.js.map +1 -0
- package/dist/store/purge-files.d.ts +30 -0
- package/dist/store/purge-files.d.ts.map +1 -0
- package/dist/store/purge-files.js +79 -0
- package/dist/store/purge-files.js.map +1 -0
- package/dist/store/resource-rows.d.ts +40 -0
- package/dist/store/resource-rows.d.ts.map +1 -0
- package/dist/store/resource-rows.js +103 -0
- package/dist/store/resource-rows.js.map +1 -0
- package/dist/store/resources.d.ts +67 -0
- package/dist/store/resources.d.ts.map +1 -0
- package/dist/store/resources.js +147 -0
- package/dist/store/resources.js.map +1 -0
- package/dist/store/retention.d.ts +91 -0
- package/dist/store/retention.d.ts.map +1 -0
- package/dist/store/retention.js +169 -0
- package/dist/store/retention.js.map +1 -0
- package/dist/store/run-events.d.ts +14 -0
- package/dist/store/run-events.d.ts.map +1 -0
- package/dist/store/run-events.js +35 -0
- package/dist/store/run-events.js.map +1 -0
- package/dist/store/runtime.d.ts +24 -0
- package/dist/store/runtime.d.ts.map +1 -0
- package/dist/store/runtime.js +67 -0
- package/dist/store/runtime.js.map +1 -0
- package/dist/store/schema.d.ts +33 -0
- package/dist/store/schema.d.ts.map +1 -0
- package/dist/store/schema.js +187 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store/setup-bindings.d.ts +20 -0
- package/dist/store/setup-bindings.d.ts.map +1 -0
- package/dist/store/setup-bindings.js +52 -0
- package/dist/store/setup-bindings.js.map +1 -0
- package/dist/store/sql-command-router.d.ts +79 -0
- package/dist/store/sql-command-router.d.ts.map +1 -0
- package/dist/store/sql-command-router.js +92 -0
- package/dist/store/sql-command-router.js.map +1 -0
- package/dist/store/sql-daemon-services.d.ts +61 -0
- package/dist/store/sql-daemon-services.d.ts.map +1 -0
- package/dist/store/sql-daemon-services.js +124 -0
- package/dist/store/sql-daemon-services.js.map +1 -0
- package/dist/store/sql-recovery-export.d.ts +8 -0
- package/dist/store/sql-recovery-export.d.ts.map +1 -0
- package/dist/store/sql-recovery-export.js +110 -0
- package/dist/store/sql-recovery-export.js.map +1 -0
- package/dist/store/sql-recovery-inspection.d.ts +22 -0
- package/dist/store/sql-recovery-inspection.d.ts.map +1 -0
- package/dist/store/sql-recovery-inspection.js +88 -0
- package/dist/store/sql-recovery-inspection.js.map +1 -0
- package/dist/store/sql-recovery.d.ts +69 -0
- package/dist/store/sql-recovery.d.ts.map +1 -0
- package/dist/store/sql-recovery.js +169 -0
- package/dist/store/sql-recovery.js.map +1 -0
- package/dist/store/sql-validation.d.ts +9 -0
- package/dist/store/sql-validation.d.ts.map +1 -0
- package/dist/store/sql-validation.js +103 -0
- package/dist/store/sql-validation.js.map +1 -0
- package/dist/store/statement-observer.d.ts +7 -0
- package/dist/store/statement-observer.d.ts.map +1 -0
- package/dist/store/statement-observer.js +44 -0
- package/dist/store/statement-observer.js.map +1 -0
- package/dist/store/store.d.ts +110 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +296 -0
- package/dist/store/store.js.map +1 -0
- package/dist/store/terminal-files.d.ts +21 -0
- package/dist/store/terminal-files.d.ts.map +1 -0
- package/dist/store/terminal-files.js +115 -0
- package/dist/store/terminal-files.js.map +1 -0
- package/dist/store/thread-replay.d.ts +12 -0
- package/dist/store/thread-replay.d.ts.map +1 -0
- package/dist/store/thread-replay.js +49 -0
- package/dist/store/thread-replay.js.map +1 -0
- package/dist/store/thread-rows.d.ts +25 -0
- package/dist/store/thread-rows.d.ts.map +1 -0
- package/dist/store/thread-rows.js +141 -0
- package/dist/store/thread-rows.js.map +1 -0
- package/dist/store/threads.d.ts +105 -0
- package/dist/store/threads.d.ts.map +1 -0
- package/dist/store/threads.js +423 -0
- package/dist/store/threads.js.map +1 -0
- package/dist/store/upload-binding-retention.d.ts +26 -0
- package/dist/store/upload-binding-retention.d.ts.map +1 -0
- package/dist/store/upload-binding-retention.js +142 -0
- package/dist/store/upload-binding-retention.js.map +1 -0
- package/dist/store/uploads.d.ts +30 -0
- package/dist/store/uploads.d.ts.map +1 -0
- package/dist/store/uploads.js +238 -0
- package/dist/store/uploads.js.map +1 -0
- package/dist/store-contracts.d.ts +181 -0
- package/dist/store-contracts.d.ts.map +1 -0
- package/dist/store-contracts.js +2 -0
- package/dist/store-contracts.js.map +1 -0
- package/dist/terminal-authority.d.ts +9 -0
- package/dist/terminal-authority.d.ts.map +1 -1
- package/dist/terminal-authority.js +103 -1
- package/dist/terminal-authority.js.map +1 -1
- package/dist/thread-lane-checkpoints.d.ts +0 -2
- package/dist/thread-lane-checkpoints.d.ts.map +1 -1
- package/dist/thread-lane-checkpoints.js +0 -4
- package/dist/thread-lane-checkpoints.js.map +1 -1
- package/dist/thread-store-support.d.ts +1 -27
- package/dist/thread-store-support.d.ts.map +1 -1
- package/dist/thread-store-support.js +0 -63
- package/dist/thread-store-support.js.map +1 -1
- package/dist/threads.d.ts +1 -113
- package/dist/threads.d.ts.map +1 -1
- package/dist/threads.js +1 -379
- package/dist/threads.js.map +1 -1
- package/package.json +9 -7
- package/dist/command-activity.d.ts +0 -14
- package/dist/command-activity.d.ts.map +0 -1
- package/dist/command-activity.js +0 -16
- package/dist/command-activity.js.map +0 -1
- package/dist/journal-events.d.ts +0 -4
- package/dist/journal-events.d.ts.map +0 -1
- package/dist/journal-events.js +0 -23
- package/dist/journal-events.js.map +0 -1
- package/dist/journal-maintenance.d.ts +0 -50
- package/dist/journal-maintenance.d.ts.map +0 -1
- package/dist/journal-maintenance.js +0 -162
- package/dist/journal-maintenance.js.map +0 -1
- package/dist/journal-manager-journal.d.ts +0 -18
- package/dist/journal-manager-journal.d.ts.map +0 -1
- package/dist/journal-manager-journal.js +0 -25
- package/dist/journal-manager-journal.js.map +0 -1
- package/dist/journal-manager-lifecycle.d.ts +0 -11
- package/dist/journal-manager-lifecycle.d.ts.map +0 -1
- package/dist/journal-manager-lifecycle.js +0 -2
- package/dist/journal-manager-lifecycle.js.map +0 -1
- package/dist/journal-manager.d.ts +0 -99
- package/dist/journal-manager.d.ts.map +0 -1
- package/dist/journal-manager.js +0 -559
- package/dist/journal-manager.js.map +0 -1
- package/dist/journal-prepared-operation.d.ts +0 -53
- package/dist/journal-prepared-operation.d.ts.map +0 -1
- package/dist/journal-prepared-operation.js +0 -158
- package/dist/journal-prepared-operation.js.map +0 -1
- package/dist/journal-projection-slot.d.ts +0 -28
- package/dist/journal-projection-slot.d.ts.map +0 -1
- package/dist/journal-projection-slot.js +0 -71
- package/dist/journal-projection-slot.js.map +0 -1
- package/dist/journal-projection.d.ts +0 -13
- package/dist/journal-projection.d.ts.map +0 -1
- package/dist/journal-projection.js +0 -2
- package/dist/journal-projection.js.map +0 -1
- package/dist/partition-accounts.d.ts +0 -27
- package/dist/partition-accounts.d.ts.map +0 -1
- package/dist/partition-accounts.js +0 -21
- package/dist/partition-accounts.js.map +0 -1
- package/dist/project-partition-preparation.d.ts +0 -87
- package/dist/project-partition-preparation.d.ts.map +0 -1
- package/dist/project-partition-preparation.js +0 -273
- package/dist/project-partition-preparation.js.map +0 -1
- package/dist/project-partitions.d.ts +0 -214
- package/dist/project-partitions.d.ts.map +0 -1
- package/dist/project-partitions.js +0 -486
- package/dist/project-partitions.js.map +0 -1
- package/dist/project-remove.d.ts +0 -11
- package/dist/project-remove.d.ts.map +0 -1
- package/dist/project-remove.js +0 -65
- package/dist/project-remove.js.map +0 -1
- package/dist/project-thread-listing.d.ts +0 -14
- package/dist/project-thread-listing.d.ts.map +0 -1
- package/dist/project-thread-listing.js +0 -37
- package/dist/project-thread-listing.js.map +0 -1
- package/dist/quota-projection.d.ts +0 -11
- package/dist/quota-projection.d.ts.map +0 -1
- package/dist/quota-projection.js +0 -10
- package/dist/quota-projection.js.map +0 -1
- package/dist/resource-store.d.ts +0 -39
- package/dist/resource-store.d.ts.map +0 -1
- package/dist/resource-store.js +0 -464
- package/dist/resource-store.js.map +0 -1
- package/dist/run-event-terminal-index.d.ts +0 -13
- package/dist/run-event-terminal-index.d.ts.map +0 -1
- package/dist/run-event-terminal-index.js +0 -38
- package/dist/run-event-terminal-index.js.map +0 -1
- package/dist/run-events.d.ts +0 -17
- package/dist/run-events.d.ts.map +0 -1
- package/dist/run-events.js +0 -31
- package/dist/run-events.js.map +0 -1
- package/dist/thread-head-ping.d.ts +0 -35
- package/dist/thread-head-ping.d.ts.map +0 -1
- package/dist/thread-head-ping.js +0 -67
- package/dist/thread-head-ping.js.map +0 -1
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import { existsSync, readdirSync } from "node:fs";
|
|
3
|
-
import { dirname, join } from "node:path";
|
|
4
|
-
import { fingerprintPartition, requireStableFingerprint, requireStablePreparationIdentity, writeAtomicPrivateJson, } from "./journal-recovery-files.js";
|
|
5
|
-
import { matchingReceipt, readOperation, typedError, } from "./journal-recovery-operation.js";
|
|
6
|
-
export function inspectPreparedOperation(input) {
|
|
7
|
-
const operations = fingerprintPartition(input.operationsDir, input.rootDir);
|
|
8
|
-
const operationsIdentity = requireStablePreparationIdentity(operations, "journal recovery operations are unavailable");
|
|
9
|
-
if (!operations.exists) {
|
|
10
|
-
return { kind: "none", fingerprint: operationFingerprint(operationsIdentity, null) };
|
|
11
|
-
}
|
|
12
|
-
const prepared = readdirSync(input.operationsDir)
|
|
13
|
-
.filter((name) => /^[a-f0-9]{64}\.json$/.test(name))
|
|
14
|
-
.map((name) => {
|
|
15
|
-
const path = join(input.operationsDir, name);
|
|
16
|
-
return {
|
|
17
|
-
path,
|
|
18
|
-
operation: readOperation(path, input.quarantineDir, input.partition, input.artifactPrefix),
|
|
19
|
-
};
|
|
20
|
-
})
|
|
21
|
-
.filter((entry) => entry.operation?.status === "prepared");
|
|
22
|
-
if (prepared.length === 0) {
|
|
23
|
-
return { kind: "none", fingerprint: operationFingerprint(operationsIdentity, null) };
|
|
24
|
-
}
|
|
25
|
-
if (prepared.length !== 1)
|
|
26
|
-
throw new Error("multiple prepared recovery operations");
|
|
27
|
-
const pending = prepared[0];
|
|
28
|
-
const source = fingerprintPartition(input.partitionDir, input.rootDir);
|
|
29
|
-
const target = fingerprintPartition(pending.operation.quarantinePath, input.rootDir);
|
|
30
|
-
requireStableFingerprint(source, "journal recovery source is unavailable");
|
|
31
|
-
const stableTargetFingerprint = requireStableFingerprint(target, "journal recovery quarantine is unavailable");
|
|
32
|
-
const sourceExists = source.exists;
|
|
33
|
-
const targetExists = target.exists;
|
|
34
|
-
const fingerprint = operationFingerprint(operationsIdentity, requireStablePreparationIdentity(target, "journal recovery quarantine is unavailable"));
|
|
35
|
-
if (targetExists && stableTargetFingerprint !== pending.operation.expectedFingerprint) {
|
|
36
|
-
throw typedError("recovery_quarantine_mismatch", 503, "quarantined bytes changed");
|
|
37
|
-
}
|
|
38
|
-
if (sourceExists && !targetExists) {
|
|
39
|
-
return { kind: "source_intact", fingerprint, ...pending };
|
|
40
|
-
}
|
|
41
|
-
if (!sourceExists && targetExists) {
|
|
42
|
-
if (input.journal?.state().status === "ready") {
|
|
43
|
-
if (!input.journal.preparation().virtual || input.journal.records().length !== 0) {
|
|
44
|
-
throw typedError("recovery_operation_ambiguous", 503, "fresh journal is not empty");
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return { kind: "resume_after_activation", fingerprint, ...pending };
|
|
48
|
-
}
|
|
49
|
-
if (sourceExists && targetExists) {
|
|
50
|
-
assertExactReceipt(input.journal, pending.operation, input.partition, input.artifactPrefix);
|
|
51
|
-
return { kind: "complete_after_activation", fingerprint, ...pending };
|
|
52
|
-
}
|
|
53
|
-
throw typedError("recovery_operation_missing", 503, "recovery source and target are missing");
|
|
54
|
-
}
|
|
55
|
-
export function preparationFingerprint(journalFingerprint, operationFingerprint) {
|
|
56
|
-
return createHash("sha256")
|
|
57
|
-
.update(`${journalFingerprint}\0${operationFingerprint}\0`)
|
|
58
|
-
.digest("hex");
|
|
59
|
-
}
|
|
60
|
-
export function revalidatePreparedState(input) {
|
|
61
|
-
if (!input.journal)
|
|
62
|
-
throw new Error("journal is not prepared");
|
|
63
|
-
input.journal.revalidatePreparation();
|
|
64
|
-
const operation = inspectPreparedOperation(input);
|
|
65
|
-
const actual = preparationFingerprint(input.journal.preparation().preparationIdentity, operation.fingerprint);
|
|
66
|
-
if (actual !== input.expectedFingerprint) {
|
|
67
|
-
throw new Error("journal manager changed since read-only preparation");
|
|
68
|
-
}
|
|
69
|
-
return operation;
|
|
70
|
-
}
|
|
71
|
-
export function applyPreparedOperation(input) {
|
|
72
|
-
if (input.plan.kind === "none" || input.plan.kind === "source_intact")
|
|
73
|
-
return;
|
|
74
|
-
const currentFingerprint = operationFingerprint(requireStablePreparationIdentity(fingerprintPartition(dirname(input.plan.path), input.rootDir), "journal recovery operations changed"), requireStablePreparationIdentity(fingerprintPartition(input.plan.operation.quarantinePath, input.rootDir), "journal recovery quarantine changed"));
|
|
75
|
-
if (currentFingerprint !== input.plan.fingerprint) {
|
|
76
|
-
throw typedError("recovery_fingerprint_mismatch", 409, "prepared recovery input changed");
|
|
77
|
-
}
|
|
78
|
-
if (requireStableFingerprint(fingerprintPartition(input.plan.operation.quarantinePath, input.rootDir), "journal recovery quarantine changed") !== input.plan.operation.expectedFingerprint) {
|
|
79
|
-
throw typedError("recovery_quarantine_mismatch", 503, "quarantined bytes changed");
|
|
80
|
-
}
|
|
81
|
-
let receipt;
|
|
82
|
-
if (input.plan.kind === "resume_after_activation") {
|
|
83
|
-
if (input.journal.records().length !== 0) {
|
|
84
|
-
throw typedError("recovery_operation_ambiguous", 503, "fresh journal is not empty");
|
|
85
|
-
}
|
|
86
|
-
receipt = {
|
|
87
|
-
schemaVersion: 1,
|
|
88
|
-
operationId: input.plan.operation.operationId,
|
|
89
|
-
partition: input.partition,
|
|
90
|
-
previousFingerprint: input.plan.operation.expectedFingerprint,
|
|
91
|
-
quarantineArtifactId: `${input.artifactPrefix}-${input.plan.operation.operationId}`,
|
|
92
|
-
quarantinePath: input.plan.operation.quarantinePath,
|
|
93
|
-
newEpoch: input.journal.currentEpoch(),
|
|
94
|
-
completedAt: input.now().toISOString(),
|
|
95
|
-
};
|
|
96
|
-
input.journal.append("journal.partition_quarantined", receipt);
|
|
97
|
-
input.afterReceipt?.();
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
receipt = assertExactReceipt(input.journal, input.plan.operation, input.partition, input.artifactPrefix);
|
|
101
|
-
}
|
|
102
|
-
writeAtomicPrivateJson(input.plan.path, { ...input.plan.operation, status: "completed", receipt }, false);
|
|
103
|
-
}
|
|
104
|
-
export function completePreparedReceipt(input) {
|
|
105
|
-
if (requireStableFingerprint(fingerprintPartition(input.operation.quarantinePath, input.rootDir), "journal recovery quarantine changed") !== input.operation.expectedFingerprint) {
|
|
106
|
-
throw typedError("recovery_quarantine_mismatch", 503, "quarantined bytes changed");
|
|
107
|
-
}
|
|
108
|
-
const receipt = assertExactReceipt(input.journal, input.operation, input.partition, input.artifactPrefix);
|
|
109
|
-
writeAtomicPrivateJson(input.operationPath, { ...input.operation, status: "completed", receipt }, false);
|
|
110
|
-
return receipt;
|
|
111
|
-
}
|
|
112
|
-
export function reconcilePreparedOperationOnStart(input) {
|
|
113
|
-
if (!existsSync(input.operationsDir))
|
|
114
|
-
return false;
|
|
115
|
-
try {
|
|
116
|
-
const prepared = readdirSync(input.operationsDir)
|
|
117
|
-
.filter((name) => /^[a-f0-9]{64}\.json$/.test(name))
|
|
118
|
-
.map((name) => {
|
|
119
|
-
const path = join(input.operationsDir, name);
|
|
120
|
-
return {
|
|
121
|
-
path,
|
|
122
|
-
operation: readOperation(path, input.quarantineDir, input.partition, input.artifactPrefix),
|
|
123
|
-
};
|
|
124
|
-
})
|
|
125
|
-
.filter((entry) => entry.operation?.status === "prepared");
|
|
126
|
-
if (prepared.length === 0)
|
|
127
|
-
return false;
|
|
128
|
-
if (prepared.length !== 1)
|
|
129
|
-
throw new Error("multiple prepared recovery operations");
|
|
130
|
-
const pending = prepared[0];
|
|
131
|
-
if (existsSync(input.partitionDir) && !existsSync(pending.operation.quarantinePath)) {
|
|
132
|
-
input.openGeneration();
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
input.resume(pending.operation, pending.path);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
catch (error) {
|
|
139
|
-
input.failed(error);
|
|
140
|
-
}
|
|
141
|
-
return true;
|
|
142
|
-
}
|
|
143
|
-
function assertExactReceipt(journal, operation, partition, artifactPrefix) {
|
|
144
|
-
if (!journal || journal.state().status === "recovery_required") {
|
|
145
|
-
throw typedError("recovery_operation_ambiguous", 503, "fresh journal is unreadable");
|
|
146
|
-
}
|
|
147
|
-
const records = journal.records();
|
|
148
|
-
if (records.length !== 1 || records[0]?.type !== "journal.partition_quarantined") {
|
|
149
|
-
throw typedError("recovery_operation_ambiguous", 503, "fresh receipt is missing");
|
|
150
|
-
}
|
|
151
|
-
return matchingReceipt(operation, records[0].payload, partition, artifactPrefix);
|
|
152
|
-
}
|
|
153
|
-
function operationFingerprint(operations, quarantine) {
|
|
154
|
-
return createHash("sha256")
|
|
155
|
-
.update(`${operations}\0${quarantine ?? "missing"}\0`)
|
|
156
|
-
.digest("hex");
|
|
157
|
-
}
|
|
158
|
-
//# sourceMappingURL=journal-prepared-operation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-prepared-operation.js","sourceRoot":"","sources":["../src/journal-prepared-operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAA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G,UAAU,KAAK,UAAU,IAAI,SAAS,IAAI,CAAC;SACrD,MAAM,CAAC,KAAK,CAAC,CAAC;AACnB,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type DurableJournal, type JournalRecoveryState } from "@claudexor/journal";
|
|
2
|
-
import type { ControlJournalValidation } from "@claudexor/schema";
|
|
3
|
-
import type { JournalProjectionDescriptor, JournalProjectionSlot } from "./journal-projection.js";
|
|
4
|
-
export interface ProjectionRegistration<T = unknown> {
|
|
5
|
-
descriptor: JournalProjectionDescriptor<T>;
|
|
6
|
-
slot: ProjectionSlot<T>;
|
|
7
|
-
}
|
|
8
|
-
export declare function prepareProjectionSlots(registrations: Iterable<ProjectionRegistration>, journal: DurableJournal): {
|
|
9
|
-
status: ControlJournalValidation["projectionStatus"];
|
|
10
|
-
recovery: Extract<JournalRecoveryState, {
|
|
11
|
-
status: "recovery_required";
|
|
12
|
-
}> | null;
|
|
13
|
-
};
|
|
14
|
-
export declare class ProjectionSlot<T> implements JournalProjectionSlot<T> {
|
|
15
|
-
private readonly recovery;
|
|
16
|
-
private value;
|
|
17
|
-
private preparedValue;
|
|
18
|
-
private generationValue;
|
|
19
|
-
constructor(recovery: () => JournalRecoveryState);
|
|
20
|
-
current(): T;
|
|
21
|
-
prepared(): T;
|
|
22
|
-
generation(): number;
|
|
23
|
-
bind(value: T, generation: number): void;
|
|
24
|
-
bindPrepared(value: T): void;
|
|
25
|
-
activate(generation: number): void;
|
|
26
|
-
clear(): void;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=journal-projection-slot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-projection-slot.d.ts","sourceRoot":"","sources":["../src/journal-projection-slot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,oBAAoB,EAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGlG,MAAM,WAAW,sBAAsB,CAAC,CAAC,GAAG,OAAO;IACjD,UAAU,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC;IAC3C,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,QAAQ,CAAC,sBAAsB,CAAC,EAC/C,OAAO,EAAE,cAAc,GACtB;IACD,MAAM,EAAE,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;IACrD,QAAQ,EAAE,OAAO,CAAC,oBAAoB,EAAE;QAAE,MAAM,EAAE,mBAAmB,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;CACjF,CAqBA;AAED,qBAAa,cAAc,CAAC,CAAC,CAAE,YAAW,qBAAqB,CAAC,CAAC,CAAC;IAKpD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAJrC,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,aAAa,CAAkB;IACvC,OAAO,CAAC,eAAe,CAAK;IAE5B,YAA6B,QAAQ,EAAE,MAAM,oBAAoB,EAAI;IAErE,OAAO,IAAI,CAAC,CAQX;IAED,QAAQ,IAAI,CAAC,CAGZ;IAED,UAAU,IAAI,MAAM,CAEnB;IAED,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAGvC;IAED,YAAY,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAE3B;IAED,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAOjC;IAED,KAAK,IAAI,IAAI,CAGZ;CACF"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { JournalRecoveryRequiredError, } from "@claudexor/journal";
|
|
2
|
-
import { recoveryAt, recoveryFrom, safeMessage } from "./journal-recovery-files.js";
|
|
3
|
-
export function prepareProjectionSlots(registrations, journal) {
|
|
4
|
-
const status = [];
|
|
5
|
-
for (const registration of registrations) {
|
|
6
|
-
try {
|
|
7
|
-
const projection = registration.descriptor.create(journal);
|
|
8
|
-
registration.descriptor.validate(projection);
|
|
9
|
-
registration.slot.bindPrepared(projection);
|
|
10
|
-
status.push({ name: registration.descriptor.name, status: "valid", detail: null });
|
|
11
|
-
}
|
|
12
|
-
catch (error) {
|
|
13
|
-
status.push({
|
|
14
|
-
name: registration.descriptor.name,
|
|
15
|
-
status: "invalid",
|
|
16
|
-
detail: safeMessage(error),
|
|
17
|
-
});
|
|
18
|
-
return {
|
|
19
|
-
status,
|
|
20
|
-
recovery: recoveryFrom(error, `projection '${registration.descriptor.name}' failed`),
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return { status, recovery: null };
|
|
25
|
-
}
|
|
26
|
-
export class ProjectionSlot {
|
|
27
|
-
recovery;
|
|
28
|
-
value = null;
|
|
29
|
-
preparedValue = null;
|
|
30
|
-
generationValue = 0;
|
|
31
|
-
constructor(recovery) {
|
|
32
|
-
this.recovery = recovery;
|
|
33
|
-
}
|
|
34
|
-
current() {
|
|
35
|
-
if (this.value !== null)
|
|
36
|
-
return this.value;
|
|
37
|
-
const state = this.recovery();
|
|
38
|
-
throw new JournalRecoveryRequiredError(state.status === "recovery_required"
|
|
39
|
-
? state
|
|
40
|
-
: recoveryAt(0, "journal projection is unavailable"));
|
|
41
|
-
}
|
|
42
|
-
prepared() {
|
|
43
|
-
if (this.preparedValue !== null)
|
|
44
|
-
return this.preparedValue;
|
|
45
|
-
return this.current();
|
|
46
|
-
}
|
|
47
|
-
generation() {
|
|
48
|
-
return this.generationValue;
|
|
49
|
-
}
|
|
50
|
-
bind(value, generation) {
|
|
51
|
-
this.value = value;
|
|
52
|
-
this.generationValue = generation;
|
|
53
|
-
}
|
|
54
|
-
bindPrepared(value) {
|
|
55
|
-
this.preparedValue = value;
|
|
56
|
-
}
|
|
57
|
-
activate(generation) {
|
|
58
|
-
if (this.preparedValue === null) {
|
|
59
|
-
if (this.value !== null)
|
|
60
|
-
return;
|
|
61
|
-
throw new Error("journal projection is not prepared");
|
|
62
|
-
}
|
|
63
|
-
this.bind(this.preparedValue, generation);
|
|
64
|
-
this.preparedValue = null;
|
|
65
|
-
}
|
|
66
|
-
clear() {
|
|
67
|
-
this.value = null;
|
|
68
|
-
this.preparedValue = null;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=journal-projection-slot.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-projection-slot.js","sourceRoot":"","sources":["../src/journal-projection-slot.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,4BAA4B,GAE7B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAOpF,MAAM,UAAU,sBAAsB,CACpC,aAA+C,EAC/C,OAAuB;IAKvB,MAAM,MAAM,GAAiD,EAAE,CAAC;IAChE,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC3D,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YAC7C,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QACrF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,IAAI;gBAClC,MAAM,EAAE,SAAS;gBACjB,MAAM,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aAAa,KAAK,IAAI,EAAE,CAAC;YAChC,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI;gBAAE,OAAO;YAChC,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACxD,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;QAC1C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC5B,CAAC;IAED,KAAK;QACH,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { DurableJournal } from "@claudexor/journal";
|
|
2
|
-
export interface JournalProjectionDescriptor<T> {
|
|
3
|
-
name: string;
|
|
4
|
-
create(journal: DurableJournal): T;
|
|
5
|
-
validate(projection: T): void;
|
|
6
|
-
recover?(projection: T): void;
|
|
7
|
-
}
|
|
8
|
-
export interface JournalProjectionSlot<T> {
|
|
9
|
-
current(): T;
|
|
10
|
-
prepared(): T;
|
|
11
|
-
generation(): number;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=journal-projection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-projection.d.ts","sourceRoot":"","sources":["../src/journal-projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,WAAW,2BAA2B,CAAC,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,OAAO,EAAE,cAAc,GAAG,CAAC,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,CAAC;IAC9B,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,OAAO,IAAI,CAAC,CAAC;IACb,QAAQ,IAAI,CAAC,CAAC;IACd,UAAU,IAAI,MAAM,CAAC;CACtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-projection.js","sourceRoot":"","sources":["../src/journal-projection.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { ThreadStore } from "./threads.js";
|
|
2
|
-
/**
|
|
3
|
-
* Cross-partition account lifecycle helpers (INV-135/137), extracted from
|
|
4
|
-
* project-partitions.ts (INV-124). The unified-accounts migration and its
|
|
5
|
-
* rollback apply a continuity mutation across the global store and every
|
|
6
|
-
* HEALTHY project partition; quarantined partitions are skipped and DISCLOSED
|
|
7
|
-
* (their null-lane sessions migrate on a later start once recovered — a
|
|
8
|
-
* bounded disclosed residual, never silent loss).
|
|
9
|
-
*/
|
|
10
|
-
export interface ProfileContinuityResult {
|
|
11
|
-
sessions: number;
|
|
12
|
-
checkpoints: number;
|
|
13
|
-
skippedPartitions: string[];
|
|
14
|
-
}
|
|
15
|
-
export declare function applyProfileContinuityAcross(hosts: {
|
|
16
|
-
stores: ThreadStore[];
|
|
17
|
-
skippedPartitions: string[];
|
|
18
|
-
}, apply: (store: ThreadStore) => {
|
|
19
|
-
sessions: number;
|
|
20
|
-
checkpoints: number;
|
|
21
|
-
}): ProfileContinuityResult;
|
|
22
|
-
/** Credential-profile deletion invalidation summed across every store. */
|
|
23
|
-
export declare function invalidateCredentialProfileAcross(stores: ThreadStore[], harnessId: string, profileId: string): {
|
|
24
|
-
clearedThreads: number;
|
|
25
|
-
invalidatedSessions: number;
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=partition-accounts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"partition-accounts.d.ts","sourceRoot":"","sources":["../src/partition-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;;;;GAOG;AAEH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE;IAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAAC,iBAAiB,EAAE,MAAM,EAAE,CAAA;CAAE,EAC7D,KAAK,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACvE,uBAAuB,CASzB;AAED,0EAA0E;AAC1E,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,WAAW,EAAE,EACrB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAA;CAAE,CAWzD"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export function applyProfileContinuityAcross(hosts, apply) {
|
|
2
|
-
let sessions = 0;
|
|
3
|
-
let checkpoints = 0;
|
|
4
|
-
for (const store of hosts.stores) {
|
|
5
|
-
const result = apply(store);
|
|
6
|
-
sessions += result.sessions;
|
|
7
|
-
checkpoints += result.checkpoints;
|
|
8
|
-
}
|
|
9
|
-
return { sessions, checkpoints, skippedPartitions: hosts.skippedPartitions };
|
|
10
|
-
}
|
|
11
|
-
/** Credential-profile deletion invalidation summed across every store. */
|
|
12
|
-
export function invalidateCredentialProfileAcross(stores, harnessId, profileId) {
|
|
13
|
-
return stores.reduce((total, store) => {
|
|
14
|
-
const result = store.invalidateCredentialProfile(harnessId, profileId);
|
|
15
|
-
return {
|
|
16
|
-
clearedThreads: total.clearedThreads + result.clearedThreads,
|
|
17
|
-
invalidatedSessions: total.invalidatedSessions + result.invalidatedSessions,
|
|
18
|
-
};
|
|
19
|
-
}, { clearedThreads: 0, invalidatedSessions: 0 });
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=partition-accounts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"partition-accounts.js","sourceRoot":"","sources":["../src/partition-accounts.ts"],"names":[],"mappings":"AAiBA,MAAM,UAAU,4BAA4B,CAC1C,KAA6D,EAC7D,KAAwE;IAExE,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5B,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC;QAC5B,WAAW,IAAI,MAAM,CAAC,WAAW,CAAC;IACpC,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,EAAE,CAAC;AAC/E,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,iCAAiC,CAC/C,MAAqB,EACrB,SAAiB,EACjB,SAAiB;IAEjB,OAAO,MAAM,CAAC,MAAM,CAClB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACf,MAAM,MAAM,GAAG,KAAK,CAAC,2BAA2B,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QACvE,OAAO;YACL,cAAc,EAAE,KAAK,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc;YAC5D,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,GAAG,MAAM,CAAC,mBAAmB;SAC5E,CAAC;IACJ,CAAC,EACD,EAAE,cAAc,EAAE,CAAC,EAAE,mBAAmB,EAAE,CAAC,EAAE,CAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import type { Thread } from "@claudexor/schema";
|
|
2
|
-
import { type CommandStore } from "./command-store.js";
|
|
3
|
-
import { type InteractionStore } from "./interactions.js";
|
|
4
|
-
import { JournalManager, type JournalProjectionSlot } from "./journal-manager.js";
|
|
5
|
-
import type { JournalManagerOptions } from "./journal-manager-lifecycle.js";
|
|
6
|
-
import { type OperatorDecisionStore } from "./operator-decisions.js";
|
|
7
|
-
import type { ProjectStore } from "./projects.js";
|
|
8
|
-
import { type RunEventStore } from "./run-events.js";
|
|
9
|
-
import { type CreateThreadInput, type ThreadHeadPingSink, type ThreadStore } from "./threads.js";
|
|
10
|
-
export interface ProjectPartitionEntry {
|
|
11
|
-
manager: JournalManager;
|
|
12
|
-
commands: JournalProjectionSlot<CommandStore>;
|
|
13
|
-
interactions: JournalProjectionSlot<InteractionStore>;
|
|
14
|
-
decisions: JournalProjectionSlot<OperatorDecisionStore>;
|
|
15
|
-
runEvents: JournalProjectionSlot<RunEventStore>;
|
|
16
|
-
threads: JournalProjectionSlot<ThreadStore>;
|
|
17
|
-
}
|
|
18
|
-
export interface ProjectPartitionPreparationEntry {
|
|
19
|
-
projectId: string;
|
|
20
|
-
partition: string;
|
|
21
|
-
status: "ready" | "recovery_required";
|
|
22
|
-
virtual: boolean;
|
|
23
|
-
fingerprint: string;
|
|
24
|
-
manager: JournalManager;
|
|
25
|
-
}
|
|
26
|
-
export interface ProjectPartitionsPreparation {
|
|
27
|
-
coverage: "complete" | "global_registry_unavailable";
|
|
28
|
-
fingerprint: string | null;
|
|
29
|
-
registeredProjectIds: string[];
|
|
30
|
-
trustedProjectRoots: string[];
|
|
31
|
-
partitions: ProjectPartitionPreparationEntry[];
|
|
32
|
-
readyPartitions: string[];
|
|
33
|
-
recoveryRequiredPartitions: string[];
|
|
34
|
-
}
|
|
35
|
-
export interface PreparedProjectPartitions {
|
|
36
|
-
receipt: ProjectPartitionsPreparation;
|
|
37
|
-
entries: Map<string, ProjectPartitionEntry>;
|
|
38
|
-
}
|
|
39
|
-
export declare class ProjectPartitionCollection extends Map<string, ProjectPartitionEntry> {
|
|
40
|
-
private readonly rootDir;
|
|
41
|
-
private readonly projects;
|
|
42
|
-
private readonly headPing?;
|
|
43
|
-
private readonly requestMaintenance?;
|
|
44
|
-
constructor(rootDir: string, projects: JournalProjectionSlot<ProjectStore>, headPing?: ThreadHeadPingSink | undefined, requestMaintenance?: JournalManagerOptions["requestMaintenance"]);
|
|
45
|
-
sync(): void;
|
|
46
|
-
ensure(projectId: string): ProjectPartitionEntry;
|
|
47
|
-
findThreadCreation(input: CreateThreadInput & {
|
|
48
|
-
ephemeral?: boolean;
|
|
49
|
-
}, globalThreads: ThreadStore): Thread | null;
|
|
50
|
-
/** Caller-owned execution roots recorded by the prepared partition
|
|
51
|
-
* commands, for crash GC (a partition not prepared contributes nothing). */
|
|
52
|
-
preparedExecutionRoots(): string[];
|
|
53
|
-
healthy(): ProjectPartitionEntry[];
|
|
54
|
-
healthyRoots(): string[];
|
|
55
|
-
}
|
|
56
|
-
export declare function prepareProjectPartitions(input: {
|
|
57
|
-
rootDir: string;
|
|
58
|
-
projects: JournalProjectionSlot<ProjectStore>;
|
|
59
|
-
headPing?: ThreadHeadPingSink;
|
|
60
|
-
requestMaintenance?: JournalManagerOptions["requestMaintenance"];
|
|
61
|
-
}): PreparedProjectPartitions;
|
|
62
|
-
/**
|
|
63
|
-
* Live re-verdict for the in-process reopen (C6): recompute the stage-2
|
|
64
|
-
* receipt from CURRENT partition state. A partition the operator quarantined
|
|
65
|
-
* over the recovery route was reopened by its manager (openGeneration) and
|
|
66
|
-
* now inspects ready; a registry that became readable after a global reopen
|
|
67
|
-
* restores coverage. Read-only for everything still prepared — a registered
|
|
68
|
-
* project without an entry gets a read-only prepare, never a write.
|
|
69
|
-
*/
|
|
70
|
-
export declare function refreshProjectPartitionsPreparation(input: {
|
|
71
|
-
rootDir: string;
|
|
72
|
-
projects: JournalProjectionSlot<ProjectStore>;
|
|
73
|
-
headPing?: ThreadHeadPingSink;
|
|
74
|
-
requestMaintenance?: JournalManagerOptions["requestMaintenance"];
|
|
75
|
-
previous: ProjectPartitionsPreparation;
|
|
76
|
-
entries: ProjectPartitionCollection;
|
|
77
|
-
}): ProjectPartitionsPreparation;
|
|
78
|
-
export declare function activatePreparedProjectPartitions(input: {
|
|
79
|
-
rootDir: string;
|
|
80
|
-
projects: JournalProjectionSlot<ProjectStore>;
|
|
81
|
-
headPing?: ThreadHeadPingSink;
|
|
82
|
-
requestMaintenance?: JournalManagerOptions["requestMaintenance"];
|
|
83
|
-
receipt: ProjectPartitionsPreparation;
|
|
84
|
-
entries: ProjectPartitionCollection;
|
|
85
|
-
resetReceipt(receipt: ProjectPartitionsPreparation): void;
|
|
86
|
-
}): void;
|
|
87
|
-
//# sourceMappingURL=project-partition-preparation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-partition-preparation.d.ts","sourceRoot":"","sources":["../src/project-partition-preparation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAyB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE5E,OAAO,EAA8B,KAAK,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EACjB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC;IAC9C,YAAY,EAAE,qBAAqB,CAAC,gBAAgB,CAAC,C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