@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,162 +0,0 @@
|
|
|
1
|
-
import { lstat, readdir, unlink } from "node:fs/promises";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { setImmediate } from "node:timers/promises";
|
|
4
|
-
import { ensureCanonicalPrivateDirectory } from "@claudexor/util";
|
|
5
|
-
/** One cancelable maintenance flight under the daemon's existing root writer.
|
|
6
|
-
* A manager creates a new journal object per generation and closes the old one;
|
|
7
|
-
* those exact objects are the dedupe keys, never another durable authority. */
|
|
8
|
-
export class JournalMaintenance {
|
|
9
|
-
log;
|
|
10
|
-
pending = new Set();
|
|
11
|
-
controller = new AbortController();
|
|
12
|
-
flight = null;
|
|
13
|
-
armed = false;
|
|
14
|
-
stopped = false;
|
|
15
|
-
cleaned = false;
|
|
16
|
-
stagingDir;
|
|
17
|
-
constructor(rootDir,
|
|
18
|
-
/** One sink for failures, typed declines and `journal.records_retired`
|
|
19
|
-
* receipts (the daemon log plus startup diagnostics in the composition root). */
|
|
20
|
-
log) {
|
|
21
|
-
this.log = log;
|
|
22
|
-
this.stagingDir = join(rootDir, "journal-compaction");
|
|
23
|
-
}
|
|
24
|
-
/** Request one pass for this generation. Requests coalesce while pending; a
|
|
25
|
-
* request that arrives during the generation's own flight runs one more pass
|
|
26
|
-
* after it — the journal's threshold hook is edge-triggered, so that request
|
|
27
|
-
* means the file crossed the threshold again. */
|
|
28
|
-
request = (journal) => {
|
|
29
|
-
if (this.stopped)
|
|
30
|
-
return;
|
|
31
|
-
this.pending.add(journal);
|
|
32
|
-
this.startFlight();
|
|
33
|
-
};
|
|
34
|
-
/** Called only after normal admission, including recovery-route reopen. */
|
|
35
|
-
arm() {
|
|
36
|
-
if (this.armed || this.stopped)
|
|
37
|
-
return;
|
|
38
|
-
try {
|
|
39
|
-
// A sibling of journal/, so candidate churn never changes a concurrently
|
|
40
|
-
// prepared partition's journal-root directory fingerprint.
|
|
41
|
-
ensureCanonicalPrivateDirectory(this.stagingDir);
|
|
42
|
-
this.armed = true;
|
|
43
|
-
this.startFlight();
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
this.warnFailure(error);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/** Synchronous prefix revokes new work and aborts bulk I/O. The existing
|
|
50
|
-
* daemon stop wrapper awaits cleanup before journals/root authority close. */
|
|
51
|
-
stop() {
|
|
52
|
-
this.stopped = true;
|
|
53
|
-
this.pending.clear();
|
|
54
|
-
this.controller.abort();
|
|
55
|
-
return this.flight ?? Promise.resolve();
|
|
56
|
-
}
|
|
57
|
-
startFlight() {
|
|
58
|
-
if (!this.armed || this.stopped || this.flight)
|
|
59
|
-
return;
|
|
60
|
-
const flight = this.run()
|
|
61
|
-
.catch((error) => {
|
|
62
|
-
if (!this.controller.signal.aborted)
|
|
63
|
-
this.warnFailure(error);
|
|
64
|
-
})
|
|
65
|
-
.finally(() => {
|
|
66
|
-
if (this.flight === flight)
|
|
67
|
-
this.flight = null;
|
|
68
|
-
if (this.pending.size > 0)
|
|
69
|
-
this.startFlight();
|
|
70
|
-
});
|
|
71
|
-
this.flight = flight;
|
|
72
|
-
}
|
|
73
|
-
async run() {
|
|
74
|
-
await setImmediate(undefined, { signal: this.controller.signal });
|
|
75
|
-
if (!this.cleaned) {
|
|
76
|
-
this.cleaned = true;
|
|
77
|
-
await this.removeCrashCandidates();
|
|
78
|
-
}
|
|
79
|
-
while (!this.stopped && this.pending.size > 0) {
|
|
80
|
-
const journal = this.pending.values().next().value;
|
|
81
|
-
this.pending.delete(journal);
|
|
82
|
-
try {
|
|
83
|
-
if (journal.state().status !== "ready")
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
catch {
|
|
87
|
-
continue;
|
|
88
|
-
} // the manager retired this exact generation
|
|
89
|
-
try {
|
|
90
|
-
const outcome = await journal.compactInBackground({
|
|
91
|
-
stagingDir: this.stagingDir,
|
|
92
|
-
signal: this.controller.signal,
|
|
93
|
-
});
|
|
94
|
-
const line = describeCompactionOutcome(journal.options.partition, outcome, journal.retiredAtReplay());
|
|
95
|
-
if (line)
|
|
96
|
-
this.log(line);
|
|
97
|
-
}
|
|
98
|
-
catch (error) {
|
|
99
|
-
this.warnFailure(error);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
async removeCrashCandidates() {
|
|
104
|
-
for (const name of await readdir(this.stagingDir)) {
|
|
105
|
-
this.controller.signal.throwIfAborted();
|
|
106
|
-
// Only this producer's UUID-shaped scratch files, never journal.bin,
|
|
107
|
-
// append.pending.json, recovery receipts, archives or unrelated entries.
|
|
108
|
-
if (!/^journal-compaction-[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}\.compact$/.test(name))
|
|
109
|
-
continue;
|
|
110
|
-
const path = join(this.stagingDir, name);
|
|
111
|
-
const stat = await lstat(path);
|
|
112
|
-
if (stat.isFile() && stat.nlink === 1)
|
|
113
|
-
await unlink(path);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
warnFailure(error) {
|
|
117
|
-
this.log(`journal maintenance failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
/** The process footprint as log-line fields (`rssMb=… heapUsedMb=… externalMb=…`,
|
|
121
|
-
* whole mebibytes). The daemon's retained journal set lives on its heap, so
|
|
122
|
-
* the lines that already exist — the normal-admission line and every journal
|
|
123
|
-
* maintenance receipt — carry it, and the memory class stays observable on
|
|
124
|
-
* every install without a new mechanism. */
|
|
125
|
-
export function processMemoryFields(usage = process.memoryUsage()) {
|
|
126
|
-
const mb = (bytes) => Math.round(bytes / (1024 * 1024));
|
|
127
|
-
return `rssMb=${mb(usage.rss)} heapUsedMb=${mb(usage.heapUsed)} externalMb=${mb(usage.external)}`;
|
|
128
|
-
}
|
|
129
|
-
/** One log line per maintenance outcome: the typed decline with its reason and
|
|
130
|
-
* bounds, or the `journal.records_retired` receipt — compaction-time counts
|
|
131
|
-
* beside what the fold already retired while replaying this generation at
|
|
132
|
-
* open (`retiredAtReplay`). Both end with the process memory fields. The quiet
|
|
133
|
-
* no-ops (below the threshold, an empty journal) produce no line. */
|
|
134
|
-
export function describeCompactionOutcome(partition, outcome, replay = { count: 0, bytes: 0 }, memory = processMemoryFields()) {
|
|
135
|
-
if ("declined" in outcome) {
|
|
136
|
-
if (outcome.reason === "below_threshold" || outcome.reason === "empty")
|
|
137
|
-
return null;
|
|
138
|
-
const bounds = [];
|
|
139
|
-
if (outcome.compressedBytes !== undefined)
|
|
140
|
-
bounds.push(`compressedBytes=${outcome.compressedBytes}`);
|
|
141
|
-
// Only a capacity decline names a cap that fired; a no-reclaim decline's
|
|
142
|
-
// cap is the current file size, which `compressedBytes` already exceeds.
|
|
143
|
-
if (outcome.reason === "capacity" && outcome.cap !== undefined)
|
|
144
|
-
bounds.push(`cap=${outcome.cap}`);
|
|
145
|
-
return ["journal.compaction_declined", `partition=${partition}`, `reason=${outcome.reason}`]
|
|
146
|
-
.concat(bounds, memory)
|
|
147
|
-
.join(" ");
|
|
148
|
-
}
|
|
149
|
-
return [
|
|
150
|
-
"journal.records_retired",
|
|
151
|
-
`partition=${partition}`,
|
|
152
|
-
`retainedCount=${outcome.retainedCount}`,
|
|
153
|
-
`retiredCount=${outcome.retiredCount}`,
|
|
154
|
-
`retiredBytes=${outcome.retiredBytes}`,
|
|
155
|
-
`retiredAtReplayCount=${replay.count}`,
|
|
156
|
-
`retiredAtReplayBytes=${replay.bytes}`,
|
|
157
|
-
`beforeBytes=${outcome.beforeBytes}`,
|
|
158
|
-
`afterBytes=${outcome.afterBytes}`,
|
|
159
|
-
memory,
|
|
160
|
-
].join(" ");
|
|
161
|
-
}
|
|
162
|
-
//# sourceMappingURL=journal-maintenance.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-maintenance.js","sourceRoot":"","sources":["../src/journal-maintenance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAElE;;+EAE+E;AAC/E,MAAM,OAAO,kBAAkB;IAaV,GAAG;IAZL,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;IACpC,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IAC5C,MAAM,GAAyB,IAAI,CAAC;IACpC,KAAK,GAAG,KAAK,CAAC;IACd,OAAO,GAAG,KAAK,CAAC;IAChB,OAAO,GAAG,KAAK,CAAC;IACP,UAAU,CAAS;IAEpC,YACE,OAAe;IACf;qFACiF;IAChE,GAA8B;mBAA9B,GAAG;QAEpB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;IACxD,CAAC;IAED;;;qDAGiD;IACjD,OAAO,GAAG,CAAC,OAAu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AACd,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { DurableJournal, DurableJournalOptions } from "@claudexor/journal";
|
|
2
|
-
/**
|
|
3
|
-
* The daemon's journal options for one manager: every partition replays and
|
|
4
|
-
* compacts through the daemon fold policy (one frozen policy shared by every
|
|
5
|
-
* manager and every pass), opts into deferred maintenance
|
|
6
|
-
* whenever a maintenance callback exists, and re-requests maintenance for the
|
|
7
|
-
* live generation when an append crosses the compaction threshold — the
|
|
8
|
-
* journal fires that hook once per crossing and re-arms it when the pass
|
|
9
|
-
* settles (install, typed decline or a failed pass).
|
|
10
|
-
*/
|
|
11
|
-
export declare function daemonJournalOptions(input: {
|
|
12
|
-
rootDir: string;
|
|
13
|
-
partition: string;
|
|
14
|
-
now: () => Date;
|
|
15
|
-
requestMaintenance: ((journal: DurableJournal) => void) | undefined;
|
|
16
|
-
current: () => DurableJournal | null;
|
|
17
|
-
}): DurableJournalOptions;
|
|
18
|
-
//# sourceMappingURL=journal-manager-journal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-manager-journal.d.ts","sourceRoot":"","sources":["../src/journal-manager-journal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAGhF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,IAAI,CAAC;IAChB,kBAAkB,EAAE,CAAC,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACpE,OAAO,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;CACtC,GAAG,qBAAqB,CAYxB"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { journalFoldPolicy } from "./journal-fold-policy.js";
|
|
2
|
-
/**
|
|
3
|
-
* The daemon's journal options for one manager: every partition replays and
|
|
4
|
-
* compacts through the daemon fold policy (one frozen policy shared by every
|
|
5
|
-
* manager and every pass), opts into deferred maintenance
|
|
6
|
-
* whenever a maintenance callback exists, and re-requests maintenance for the
|
|
7
|
-
* live generation when an append crosses the compaction threshold — the
|
|
8
|
-
* journal fires that hook once per crossing and re-arms it when the pass
|
|
9
|
-
* settles (install, typed decline or a failed pass).
|
|
10
|
-
*/
|
|
11
|
-
export function daemonJournalOptions(input) {
|
|
12
|
-
return {
|
|
13
|
-
rootDir: input.rootDir,
|
|
14
|
-
partition: input.partition,
|
|
15
|
-
now: input.now,
|
|
16
|
-
deferCompaction: input.requestMaintenance !== undefined,
|
|
17
|
-
fold: journalFoldPolicy,
|
|
18
|
-
onCompactionThreshold: () => {
|
|
19
|
-
const journal = input.current();
|
|
20
|
-
if (journal)
|
|
21
|
-
input.requestMaintenance?.(journal);
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=journal-manager-journal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-manager-journal.js","sourceRoot":"","sources":["../src/journal-manager-journal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAMpC;IACC,OAAO;QACL,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,eAAe,EAAE,KAAK,CAAC,kBAAkB,KAAK,SAAS;QACvD,IAAI,EAAE,iBAAiB;QACvB,qBAAqB,EAAE,GAAG,EAAE;YAC1B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;YAChC,IAAI,OAAO;gBAAE,KAAK,CAAC,kBAAkB,EAAE,CAAC,OAAO,CAAC,CAAC;QACnD,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { DurableJournal } from "@claudexor/journal";
|
|
2
|
-
export type JournalManagerFault = "afterQuarantineRename" | "afterQuarantineReceipt" | "beforeArchiveRename" | "beforeProjectionActivation";
|
|
3
|
-
export type JournalManagerLifecycle = "idle" | "prepared" | "active" | "recovery_required" | "closed";
|
|
4
|
-
export interface JournalManagerOptions {
|
|
5
|
-
partition?: string;
|
|
6
|
-
now?: () => Date;
|
|
7
|
-
faults?: Partial<Record<JournalManagerFault, () => void>>;
|
|
8
|
-
/** Called after projection recovery; the exact journal object owns this generation. */
|
|
9
|
-
requestMaintenance?: (journal: DurableJournal) => void;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=journal-manager-lifecycle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-manager-lifecycle.d.ts","sourceRoot":"","sources":["../src/journal-manager-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,MAAM,mBAAmB,GAC3B,uBAAuB,GACvB,wBAAwB,GACxB,qBAAqB,GACrB,4BAA4B,CAAC;AAEjC,MAAM,MAAM,uBAAuB,GACjC,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,mBAAmB,GAAG,QAAQ,CAAC;AAElE,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,mBAAmB,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC;IAC1D,uFAAuF;IACvF,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;CACxD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-manager-lifecycle.js","sourceRoot":"","sources":["../src/journal-manager-lifecycle.ts"],"names":[],"mappings":""}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { type ControlJournalExportReceipt, type ControlJournalInspection, type ControlJournalQuarantineReceipt, type ControlJournalValidation } from "@claudexor/schema";
|
|
2
|
-
import { type JournalQuarantineRequest } from "./journal-recovery-operation.js";
|
|
3
|
-
import type { JournalProjectionDescriptor, JournalProjectionSlot } from "./journal-projection.js";
|
|
4
|
-
import type { JournalManagerOptions } from "./journal-manager-lifecycle.js";
|
|
5
|
-
export type { JournalProjectionDescriptor, JournalProjectionSlot } from "./journal-projection.js";
|
|
6
|
-
export type { JournalManagerOptions } from "./journal-manager-lifecycle.js";
|
|
7
|
-
export type { JournalQuarantineRequest } from "./journal-recovery-operation.js";
|
|
8
|
-
export interface JournalManagerPreparation {
|
|
9
|
-
partition: string;
|
|
10
|
-
coverage: "complete";
|
|
11
|
-
inspection: ControlJournalInspection;
|
|
12
|
-
validation: ControlJournalValidation;
|
|
13
|
-
preparationFingerprint: string;
|
|
14
|
-
virtual: boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare class JournalManager {
|
|
17
|
-
private readonly options;
|
|
18
|
-
readonly rootDir: string;
|
|
19
|
-
readonly partition: string;
|
|
20
|
-
readonly journalRoot: string;
|
|
21
|
-
readonly partitionDir: string;
|
|
22
|
-
private readonly operationsDir;
|
|
23
|
-
private readonly quarantineDir;
|
|
24
|
-
private readonly artifactPrefix;
|
|
25
|
-
private readonly now;
|
|
26
|
-
private readonly faults;
|
|
27
|
-
private readonly registrations;
|
|
28
|
-
private readonly journalOptions;
|
|
29
|
-
private journal;
|
|
30
|
-
private recovery;
|
|
31
|
-
private generationValue;
|
|
32
|
-
private preparedOperation;
|
|
33
|
-
private preparationResult;
|
|
34
|
-
private lifecycle;
|
|
35
|
-
constructor(rootDir: string, options?: JournalManagerOptions);
|
|
36
|
-
registerProjection<T>(descriptor: JournalProjectionDescriptor<T>): JournalProjectionSlot<T>;
|
|
37
|
-
start(): ControlJournalInspection;
|
|
38
|
-
prepare(): JournalManagerPreparation;
|
|
39
|
-
revalidatePreparation(): void;
|
|
40
|
-
activatePrepared(): void;
|
|
41
|
-
recoverAfterStartup(): void;
|
|
42
|
-
inspect(): ControlJournalInspection;
|
|
43
|
-
ready(): boolean;
|
|
44
|
-
validate(): ControlJournalValidation;
|
|
45
|
-
events(afterCursor?: string): {
|
|
46
|
-
schemaVersion: 1;
|
|
47
|
-
cursor: string;
|
|
48
|
-
partition: string;
|
|
49
|
-
type: string;
|
|
50
|
-
observedAt: string;
|
|
51
|
-
payload?: unknown;
|
|
52
|
-
}[];
|
|
53
|
-
exportRecovery(): ControlJournalExportReceipt;
|
|
54
|
-
preflightQuarantine(input: JournalQuarantineRequest): {
|
|
55
|
-
disposition: string;
|
|
56
|
-
receipt: {
|
|
57
|
-
schemaVersion: 1;
|
|
58
|
-
operationId: string;
|
|
59
|
-
partition: string;
|
|
60
|
-
previousFingerprint: string;
|
|
61
|
-
quarantineArtifactId: string;
|
|
62
|
-
quarantinePath: string;
|
|
63
|
-
newEpoch: string;
|
|
64
|
-
completedAt: string;
|
|
65
|
-
};
|
|
66
|
-
} | {
|
|
67
|
-
disposition: string;
|
|
68
|
-
receipt: null;
|
|
69
|
-
};
|
|
70
|
-
quarantineAndStartFresh(input: JournalQuarantineRequest): ControlJournalQuarantineReceipt;
|
|
71
|
-
close(): void;
|
|
72
|
-
/**
|
|
73
|
-
* Close the partition's generation and rename it into journal-archived/, never
|
|
74
|
-
* delete history. Missing source returns an existing archive path or null;
|
|
75
|
-
* a pre-existing archive for a re-registered id is preserved under a suffix.
|
|
76
|
-
*/
|
|
77
|
-
archivePartition(): string | null;
|
|
78
|
-
/**
|
|
79
|
-
* Roll a just-archived partition back into the active journal tree — the
|
|
80
|
-
* removeProject rollback when the durable registry `unregister` fails AFTER a
|
|
81
|
-
* successful archive (Ф2 finding 4). Moves `archivedPath` back to
|
|
82
|
-
* `partitionDir` and reopens a fresh generation so the partition is usable
|
|
83
|
-
* again. Throws (leaving the archive in place) when the active slot is already
|
|
84
|
-
* occupied, so the caller can disclose the unrecoverable partial state.
|
|
85
|
-
*/
|
|
86
|
-
restoreArchivedPartition(archivedPath: string): void;
|
|
87
|
-
private openGeneration;
|
|
88
|
-
private resume;
|
|
89
|
-
private completeFromReceipt;
|
|
90
|
-
private reconcilePrepared;
|
|
91
|
-
private inspection;
|
|
92
|
-
private enterRecovery;
|
|
93
|
-
private observeFingerprint;
|
|
94
|
-
private stableFingerprint;
|
|
95
|
-
private clearSlots;
|
|
96
|
-
private assertStarted;
|
|
97
|
-
private assertOpen;
|
|
98
|
-
}
|
|
99
|
-
//# sourceMappingURL=journal-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"journal-manager.d.ts","sourceRoot":"","sources":["../src/journal-manager.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAC9B,MAAM,mBAAmB,CAAC;AAa3B,OAAO,EAOL,KAAK,wBAAwB,EAE9B,MAAM,iCAAiC,CAAC;AAYzC,OAAO,KAAK,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAMlG,OAAO,KAAK,EAGV,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AACxC,YAAY,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAClG,YAAY,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE5E,YAAY,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAEhF,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,UAAU,CAAC;IACrB,UAAU,EAAE,wBAAwB,CAAC;IACrC,UAAU,EAAE,wBAAwB,CAAC;IACrC,sBAAsB,EAAE,MAA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