@opendatalabs/personal-server-ts-core 0.0.1-canary.052d47e → 0.0.1-canary.05cdd81
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/additions/budget.d.ts +34 -0
- package/dist/additions/budget.d.ts.map +1 -0
- package/dist/additions/budget.js +144 -0
- package/dist/additions/budget.js.map +1 -0
- package/dist/additions/durable.d.ts +94 -0
- package/dist/additions/durable.d.ts.map +1 -0
- package/dist/additions/durable.js +823 -0
- package/dist/additions/durable.js.map +1 -0
- package/dist/additions/first-added.d.ts +204 -0
- package/dist/additions/first-added.d.ts.map +1 -0
- package/dist/additions/first-added.js +598 -0
- package/dist/additions/first-added.js.map +1 -0
- package/dist/additions/index.d.ts +9 -0
- package/dist/additions/index.d.ts.map +1 -0
- package/dist/additions/index.js +9 -0
- package/dist/additions/index.js.map +1 -0
- package/dist/additions/ledger-store.d.ts +69 -0
- package/dist/additions/ledger-store.d.ts.map +1 -0
- package/dist/additions/ledger-store.js +407 -0
- package/dist/additions/ledger-store.js.map +1 -0
- package/dist/additions/record-rules.d.ts +54 -0
- package/dist/additions/record-rules.d.ts.map +1 -0
- package/dist/additions/record-rules.js +198 -0
- package/dist/additions/record-rules.js.map +1 -0
- package/dist/additions/scope-lock.d.ts +14 -0
- package/dist/additions/scope-lock.d.ts.map +1 -0
- package/dist/additions/scope-lock.js +32 -0
- package/dist/additions/scope-lock.js.map +1 -0
- package/dist/additions/summary.d.ts +143 -0
- package/dist/additions/summary.d.ts.map +1 -0
- package/dist/additions/summary.js +279 -0
- package/dist/additions/summary.js.map +1 -0
- package/dist/additions/version-inventory.d.ts +86 -0
- package/dist/additions/version-inventory.d.ts.map +1 -0
- package/dist/additions/version-inventory.js +244 -0
- package/dist/additions/version-inventory.js.map +1 -0
- package/dist/api/account-storage-mode.d.ts +77 -0
- package/dist/api/account-storage-mode.d.ts.map +1 -0
- package/dist/api/account-storage-mode.js +72 -0
- package/dist/api/account-storage-mode.js.map +1 -0
- package/dist/api/index.d.ts +320 -10
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1758 -181
- package/dist/api/index.js.map +1 -1
- package/dist/api/legacy-write-gate.d.ts +51 -0
- package/dist/api/legacy-write-gate.d.ts.map +1 -0
- package/dist/api/legacy-write-gate.js +88 -0
- package/dist/api/legacy-write-gate.js.map +1 -0
- package/dist/api/oura-collection-requirements.d.ts +16 -0
- package/dist/api/oura-collection-requirements.d.ts.map +1 -0
- package/dist/api/oura-collection-requirements.js +70 -0
- package/dist/api/oura-collection-requirements.js.map +1 -0
- package/dist/api/owner-connector-delete.d.ts +79 -0
- package/dist/api/owner-connector-delete.d.ts.map +1 -0
- package/dist/api/owner-connector-delete.js +109 -0
- package/dist/api/owner-connector-delete.js.map +1 -0
- package/dist/api/raw-envelope.d.ts +3 -0
- package/dist/api/raw-envelope.d.ts.map +1 -0
- package/dist/api/raw-envelope.js +215 -0
- package/dist/api/raw-envelope.js.map +1 -0
- package/dist/api/scope-upload-batches.d.ts +18 -0
- package/dist/api/scope-upload-batches.d.ts.map +1 -0
- package/dist/api/scope-upload-batches.js +71 -0
- package/dist/api/scope-upload-batches.js.map +1 -0
- package/dist/api/scope-uploads.d.ts +112 -0
- package/dist/api/scope-uploads.d.ts.map +1 -0
- package/dist/api/scope-uploads.js +369 -0
- package/dist/api/scope-uploads.js.map +1 -0
- package/dist/api/switched-delete-refusal.d.ts +16 -0
- package/dist/api/switched-delete-refusal.d.ts.map +1 -0
- package/dist/api/switched-delete-refusal.js +30 -0
- package/dist/api/switched-delete-refusal.js.map +1 -0
- package/dist/auth/index.d.ts +3 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +3 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/proof-id.d.ts +8 -0
- package/dist/auth/proof-id.d.ts.map +1 -0
- package/dist/auth/proof-id.js +29 -0
- package/dist/auth/proof-id.js.map +1 -0
- package/dist/auth/request.d.ts +24 -0
- package/dist/auth/request.d.ts.map +1 -1
- package/dist/auth/request.js +99 -4
- package/dist/auth/request.js.map +1 -1
- package/dist/client.d.ts +78 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1 -0
- package/dist/client.js.map +1 -1
- package/dist/contracts/auth-device.d.ts +10 -0
- package/dist/contracts/auth-device.d.ts.map +1 -1
- package/dist/contracts/auth-device.js +2 -0
- package/dist/contracts/auth-device.js.map +1 -1
- package/dist/contracts/data.d.ts +102 -8
- package/dist/contracts/data.d.ts.map +1 -1
- package/dist/contracts/data.js +326 -47
- package/dist/contracts/data.js.map +1 -1
- package/dist/contracts/grants.d.ts.map +1 -1
- package/dist/contracts/grants.js +7 -0
- package/dist/contracts/grants.js.map +1 -1
- package/dist/contracts/index.d.ts +4 -2
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +3 -1
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/oura-collection-requirements.d.ts +17 -0
- package/dist/contracts/oura-collection-requirements.d.ts.map +1 -0
- package/dist/contracts/oura-collection-requirements.js +49 -0
- package/dist/contracts/oura-collection-requirements.js.map +1 -0
- package/dist/contracts/sync.d.ts +9 -1
- package/dist/contracts/sync.d.ts.map +1 -1
- package/dist/contracts/sync.js +7 -2
- package/dist/contracts/sync.js.map +1 -1
- package/dist/derivatives/answer-shape.d.ts +83 -0
- package/dist/derivatives/answer-shape.d.ts.map +1 -0
- package/dist/derivatives/answer-shape.js +320 -0
- package/dist/derivatives/answer-shape.js.map +1 -0
- package/dist/derivatives/api.d.ts +1 -1
- package/dist/derivatives/api.d.ts.map +1 -1
- package/dist/derivatives/api.js +8 -0
- package/dist/derivatives/api.js.map +1 -1
- package/dist/derivatives/compute.d.ts +9 -3
- package/dist/derivatives/compute.d.ts.map +1 -1
- package/dist/derivatives/compute.js +87 -6
- package/dist/derivatives/compute.js.map +1 -1
- package/dist/derivatives/index.d.ts +2 -1
- package/dist/derivatives/index.d.ts.map +1 -1
- package/dist/derivatives/index.js +2 -1
- package/dist/derivatives/index.js.map +1 -1
- package/dist/derivatives/prompt.d.ts +35 -0
- package/dist/derivatives/prompt.d.ts.map +1 -1
- package/dist/derivatives/prompt.js +96 -8
- package/dist/derivatives/prompt.js.map +1 -1
- package/dist/derivatives/registration.d.ts +6 -9
- package/dist/derivatives/registration.d.ts.map +1 -1
- package/dist/derivatives/registration.js +14 -6
- package/dist/derivatives/registration.js.map +1 -1
- package/dist/derivatives/scheduler.d.ts +39 -9
- package/dist/derivatives/scheduler.d.ts.map +1 -1
- package/dist/derivatives/scheduler.js +99 -8
- package/dist/derivatives/scheduler.js.map +1 -1
- package/dist/derivatives/store.d.ts.map +1 -1
- package/dist/derivatives/store.js +2 -0
- package/dist/derivatives/store.js.map +1 -1
- package/dist/derivatives/types.d.ts +13 -3
- package/dist/derivatives/types.d.ts.map +1 -1
- package/dist/derivatives/types.js +2 -0
- package/dist/derivatives/types.js.map +1 -1
- package/dist/errors/pdpp-catalog.d.ts +36 -0
- package/dist/errors/pdpp-catalog.d.ts.map +1 -0
- package/dist/errors/pdpp-catalog.js +92 -0
- package/dist/errors/pdpp-catalog.js.map +1 -0
- package/dist/grants/index.d.ts +2 -0
- package/dist/grants/index.d.ts.map +1 -1
- package/dist/grants/index.js +4 -0
- package/dist/grants/index.js.map +1 -1
- package/dist/grants/pdpp-binding-store.d.ts +89 -0
- package/dist/grants/pdpp-binding-store.d.ts.map +1 -0
- package/dist/grants/pdpp-binding-store.js +112 -0
- package/dist/grants/pdpp-binding-store.js.map +1 -0
- package/dist/grants/pdpp-binding.d.ts +169 -0
- package/dist/grants/pdpp-binding.d.ts.map +1 -0
- package/dist/grants/pdpp-binding.js +236 -0
- package/dist/grants/pdpp-binding.js.map +1 -0
- package/dist/keys/index.d.ts +1 -0
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +1 -0
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/owner-master-key.d.ts +37 -0
- package/dist/keys/owner-master-key.d.ts.map +1 -0
- package/dist/keys/owner-master-key.js +45 -0
- package/dist/keys/owner-master-key.js.map +1 -0
- package/dist/legacy-projection/bindings.d.ts +31 -0
- package/dist/legacy-projection/bindings.d.ts.map +1 -0
- package/dist/legacy-projection/bindings.js +4512 -0
- package/dist/legacy-projection/bindings.js.map +1 -0
- package/dist/legacy-projection/claude-source-record.d.ts +22 -0
- package/dist/legacy-projection/claude-source-record.d.ts.map +1 -0
- package/dist/legacy-projection/claude-source-record.js +360 -0
- package/dist/legacy-projection/claude-source-record.js.map +1 -0
- package/dist/legacy-projection/declared-text.d.ts +41 -0
- package/dist/legacy-projection/declared-text.d.ts.map +1 -0
- package/dist/legacy-projection/declared-text.js +199 -0
- package/dist/legacy-projection/declared-text.js.map +1 -0
- package/dist/legacy-projection/erase-connector.d.ts +18 -0
- package/dist/legacy-projection/erase-connector.d.ts.map +1 -0
- package/dist/legacy-projection/erase-connector.js +29 -0
- package/dist/legacy-projection/erase-connector.js.map +1 -0
- package/dist/legacy-projection/github-browser-bindings.d.ts +3 -0
- package/dist/legacy-projection/github-browser-bindings.d.ts.map +1 -0
- package/dist/legacy-projection/github-browser-bindings.js +212 -0
- package/dist/legacy-projection/github-browser-bindings.js.map +1 -0
- package/dist/legacy-projection/github-legacy-fields.d.ts +6 -0
- package/dist/legacy-projection/github-legacy-fields.d.ts.map +1 -0
- package/dist/legacy-projection/github-legacy-fields.js +202 -0
- package/dist/legacy-projection/github-legacy-fields.js.map +1 -0
- package/dist/legacy-projection/index.d.ts +48 -0
- package/dist/legacy-projection/index.d.ts.map +1 -0
- package/dist/legacy-projection/index.js +255 -0
- package/dist/legacy-projection/index.js.map +1 -0
- package/dist/legacy-projection/meta-040-bindings.d.ts +3 -0
- package/dist/legacy-projection/meta-040-bindings.d.ts.map +1 -0
- package/dist/legacy-projection/meta-040-bindings.js +112 -0
- package/dist/legacy-projection/meta-040-bindings.js.map +1 -0
- package/dist/legacy-projection/oura-browser-bindings.d.ts +5 -0
- package/dist/legacy-projection/oura-browser-bindings.d.ts.map +1 -0
- package/dist/legacy-projection/oura-browser-bindings.js +141 -0
- package/dist/legacy-projection/oura-browser-bindings.js.map +1 -0
- package/dist/legacy-projection/provenance.d.ts +57 -0
- package/dist/legacy-projection/provenance.d.ts.map +1 -0
- package/dist/legacy-projection/provenance.js +2 -0
- package/dist/legacy-projection/provenance.js.map +1 -0
- package/dist/legacy-projection/strava-browser-bindings.d.ts +3 -0
- package/dist/legacy-projection/strava-browser-bindings.d.ts.map +1 -0
- package/dist/legacy-projection/strava-browser-bindings.js +32 -0
- package/dist/legacy-projection/strava-browser-bindings.js.map +1 -0
- package/dist/legacy-projection/test-debris.d.ts +2 -0
- package/dist/legacy-projection/test-debris.d.ts.map +1 -0
- package/dist/legacy-projection/test-debris.js +49 -0
- package/dist/legacy-projection/test-debris.js.map +1 -0
- package/dist/legacy-projection/types.d.ts +235 -0
- package/dist/legacy-projection/types.d.ts.map +1 -0
- package/dist/legacy-projection/types.js +2 -0
- package/dist/legacy-projection/types.js.map +1 -0
- package/dist/lineage/gateway.d.ts +3 -1
- package/dist/lineage/gateway.d.ts.map +1 -1
- package/dist/lineage/gateway.js +2 -1
- package/dist/lineage/gateway.js.map +1 -1
- package/dist/localdb/apply.d.ts +13 -0
- package/dist/localdb/apply.d.ts.map +1 -0
- package/dist/localdb/apply.js +565 -0
- package/dist/localdb/apply.js.map +1 -0
- package/dist/localdb/batch-commit.d.ts +67 -0
- package/dist/localdb/batch-commit.d.ts.map +1 -0
- package/dist/localdb/batch-commit.js +121 -0
- package/dist/localdb/batch-commit.js.map +1 -0
- package/dist/localdb/blobs.d.ts +71 -0
- package/dist/localdb/blobs.d.ts.map +1 -0
- package/dist/localdb/blobs.js +306 -0
- package/dist/localdb/blobs.js.map +1 -0
- package/dist/localdb/bootstrap.d.ts +20 -0
- package/dist/localdb/bootstrap.d.ts.map +1 -0
- package/dist/localdb/bootstrap.js +157 -0
- package/dist/localdb/bootstrap.js.map +1 -0
- package/dist/localdb/connection-link.d.ts +12 -0
- package/dist/localdb/connection-link.d.ts.map +1 -0
- package/dist/localdb/connection-link.js +72 -0
- package/dist/localdb/connection-link.js.map +1 -0
- package/dist/localdb/cycle.d.ts +32 -0
- package/dist/localdb/cycle.d.ts.map +1 -0
- package/dist/localdb/cycle.js +46 -0
- package/dist/localdb/cycle.js.map +1 -0
- package/dist/localdb/delete-batch.d.ts +51 -0
- package/dist/localdb/delete-batch.d.ts.map +1 -0
- package/dist/localdb/delete-batch.js +132 -0
- package/dist/localdb/delete-batch.js.map +1 -0
- package/dist/localdb/delete.d.ts +81 -0
- package/dist/localdb/delete.d.ts.map +1 -0
- package/dist/localdb/delete.js +736 -0
- package/dist/localdb/delete.js.map +1 -0
- package/dist/localdb/deps.d.ts +54 -0
- package/dist/localdb/deps.d.ts.map +1 -0
- package/dist/localdb/deps.js +10 -0
- package/dist/localdb/deps.js.map +1 -0
- package/dist/localdb/driver.d.ts +67 -0
- package/dist/localdb/driver.d.ts.map +1 -0
- package/dist/localdb/driver.js +3 -0
- package/dist/localdb/driver.js.map +1 -0
- package/dist/localdb/encode.d.ts +217 -0
- package/dist/localdb/encode.d.ts.map +1 -0
- package/dist/localdb/encode.js +502 -0
- package/dist/localdb/encode.js.map +1 -0
- package/dist/localdb/fence.d.ts +31 -0
- package/dist/localdb/fence.d.ts.map +1 -0
- package/dist/localdb/fence.js +69 -0
- package/dist/localdb/fence.js.map +1 -0
- package/dist/localdb/history.d.ts +74 -0
- package/dist/localdb/history.d.ts.map +1 -0
- package/dist/localdb/history.js +266 -0
- package/dist/localdb/history.js.map +1 -0
- package/dist/localdb/import-fingerprint.d.ts +8 -0
- package/dist/localdb/import-fingerprint.d.ts.map +1 -0
- package/dist/localdb/import-fingerprint.js +35 -0
- package/dist/localdb/import-fingerprint.js.map +1 -0
- package/dist/localdb/import-ledger.d.ts +27 -0
- package/dist/localdb/import-ledger.d.ts.map +1 -0
- package/dist/localdb/import-ledger.js +197 -0
- package/dist/localdb/import-ledger.js.map +1 -0
- package/dist/localdb/import-readback.d.ts +8 -0
- package/dist/localdb/import-readback.d.ts.map +1 -0
- package/dist/localdb/import-readback.js +69 -0
- package/dist/localdb/import-readback.js.map +1 -0
- package/dist/localdb/import-snapshot.d.ts +21 -0
- package/dist/localdb/import-snapshot.d.ts.map +1 -0
- package/dist/localdb/import-snapshot.js +94 -0
- package/dist/localdb/import-snapshot.js.map +1 -0
- package/dist/localdb/index.d.ts +39 -0
- package/dist/localdb/index.d.ts.map +1 -0
- package/dist/localdb/index.js +36 -0
- package/dist/localdb/index.js.map +1 -0
- package/dist/localdb/legacy-import-types.d.ts +110 -0
- package/dist/localdb/legacy-import-types.d.ts.map +1 -0
- package/dist/localdb/legacy-import-types.js +2 -0
- package/dist/localdb/legacy-import-types.js.map +1 -0
- package/dist/localdb/legacy-import.d.ts +36 -0
- package/dist/localdb/legacy-import.d.ts.map +1 -0
- package/dist/localdb/legacy-import.js +288 -0
- package/dist/localdb/legacy-import.js.map +1 -0
- package/dist/localdb/legacy-retire.d.ts +26 -0
- package/dist/localdb/legacy-retire.d.ts.map +1 -0
- package/dist/localdb/legacy-retire.js +93 -0
- package/dist/localdb/legacy-retire.js.map +1 -0
- package/dist/localdb/lifetime-boundary.d.ts +49 -0
- package/dist/localdb/lifetime-boundary.d.ts.map +1 -0
- package/dist/localdb/lifetime-boundary.js +74 -0
- package/dist/localdb/lifetime-boundary.js.map +1 -0
- package/dist/localdb/listing.d.ts +51 -0
- package/dist/localdb/listing.d.ts.map +1 -0
- package/dist/localdb/listing.js +231 -0
- package/dist/localdb/listing.js.map +1 -0
- package/dist/localdb/merge.d.ts +95 -0
- package/dist/localdb/merge.d.ts.map +1 -0
- package/dist/localdb/merge.js +282 -0
- package/dist/localdb/merge.js.map +1 -0
- package/dist/localdb/migrate.d.ts +10 -0
- package/dist/localdb/migrate.d.ts.map +1 -0
- package/dist/localdb/migrate.js +27 -0
- package/dist/localdb/migrate.js.map +1 -0
- package/dist/localdb/name.d.ts +3 -0
- package/dist/localdb/name.d.ts.map +1 -0
- package/dist/localdb/name.js +8 -0
- package/dist/localdb/name.js.map +1 -0
- package/dist/localdb/older-versions.d.ts +49 -0
- package/dist/localdb/older-versions.d.ts.map +1 -0
- package/dist/localdb/older-versions.js +172 -0
- package/dist/localdb/older-versions.js.map +1 -0
- package/dist/localdb/open.d.ts +19 -0
- package/dist/localdb/open.d.ts.map +1 -0
- package/dist/localdb/open.js +46 -0
- package/dist/localdb/open.js.map +1 -0
- package/dist/localdb/part-layout.d.ts +74 -0
- package/dist/localdb/part-layout.d.ts.map +1 -0
- package/dist/localdb/part-layout.js +203 -0
- package/dist/localdb/part-layout.js.map +1 -0
- package/dist/localdb/publish-meter.d.ts +45 -0
- package/dist/localdb/publish-meter.d.ts.map +1 -0
- package/dist/localdb/publish-meter.js +62 -0
- package/dist/localdb/publish-meter.js.map +1 -0
- package/dist/localdb/publish.d.ts +47 -0
- package/dist/localdb/publish.d.ts.map +1 -0
- package/dist/localdb/publish.js +2100 -0
- package/dist/localdb/publish.js.map +1 -0
- package/dist/localdb/purge.d.ts +23 -0
- package/dist/localdb/purge.d.ts.map +1 -0
- package/dist/localdb/purge.js +75 -0
- package/dist/localdb/purge.js.map +1 -0
- package/dist/localdb/query.d.ts +69 -0
- package/dist/localdb/query.d.ts.map +1 -0
- package/dist/localdb/query.js +306 -0
- package/dist/localdb/query.js.map +1 -0
- package/dist/localdb/queue.d.ts +10 -0
- package/dist/localdb/queue.d.ts.map +1 -0
- package/dist/localdb/queue.js +31 -0
- package/dist/localdb/queue.js.map +1 -0
- package/dist/localdb/read-selection.d.ts +103 -0
- package/dist/localdb/read-selection.d.ts.map +1 -0
- package/dist/localdb/read-selection.js +141 -0
- package/dist/localdb/read-selection.js.map +1 -0
- package/dist/localdb/registry-view.d.ts +65 -0
- package/dist/localdb/registry-view.d.ts.map +1 -0
- package/dist/localdb/registry-view.js +73 -0
- package/dist/localdb/registry-view.js.map +1 -0
- package/dist/localdb/replace.d.ts +33 -0
- package/dist/localdb/replace.d.ts.map +1 -0
- package/dist/localdb/replace.js +22 -0
- package/dist/localdb/replace.js.map +1 -0
- package/dist/localdb/requirements.d.ts +35 -0
- package/dist/localdb/requirements.d.ts.map +1 -0
- package/dist/localdb/requirements.js +66 -0
- package/dist/localdb/requirements.js.map +1 -0
- package/dist/localdb/resolve.d.ts +43 -0
- package/dist/localdb/resolve.d.ts.map +1 -0
- package/dist/localdb/resolve.js +265 -0
- package/dist/localdb/resolve.js.map +1 -0
- package/dist/localdb/run-end.d.ts +19 -0
- package/dist/localdb/run-end.d.ts.map +1 -0
- package/dist/localdb/run-end.js +283 -0
- package/dist/localdb/run-end.js.map +1 -0
- package/dist/localdb/run-intake.d.ts +16 -0
- package/dist/localdb/run-intake.d.ts.map +1 -0
- package/dist/localdb/run-intake.js +441 -0
- package/dist/localdb/run-intake.js.map +1 -0
- package/dist/localdb/run-receipts.d.ts +19 -0
- package/dist/localdb/run-receipts.d.ts.map +1 -0
- package/dist/localdb/run-receipts.js +151 -0
- package/dist/localdb/run-receipts.js.map +1 -0
- package/dist/localdb/schema.d.ts +7 -0
- package/dist/localdb/schema.d.ts.map +1 -0
- package/dist/localdb/schema.js +312 -0
- package/dist/localdb/schema.js.map +1 -0
- package/dist/localdb/seed.d.ts +39 -0
- package/dist/localdb/seed.d.ts.map +1 -0
- package/dist/localdb/seed.js +188 -0
- package/dist/localdb/seed.js.map +1 -0
- package/dist/localdb/slot.d.ts +9 -0
- package/dist/localdb/slot.d.ts.map +1 -0
- package/dist/localdb/slot.js +15 -0
- package/dist/localdb/slot.js.map +1 -0
- package/dist/localdb/sync.d.ts +53 -0
- package/dist/localdb/sync.d.ts.map +1 -0
- package/dist/localdb/sync.js +211 -0
- package/dist/localdb/sync.js.map +1 -0
- package/dist/localdb/transfer-memory.d.ts +17 -0
- package/dist/localdb/transfer-memory.d.ts.map +1 -0
- package/dist/localdb/transfer-memory.js +17 -0
- package/dist/localdb/transfer-memory.js.map +1 -0
- package/dist/localdb/unwrite.d.ts +22 -0
- package/dist/localdb/unwrite.d.ts.map +1 -0
- package/dist/localdb/unwrite.js +46 -0
- package/dist/localdb/unwrite.js.map +1 -0
- package/dist/localdb/upload-wave.d.ts +34 -0
- package/dist/localdb/upload-wave.d.ts.map +1 -0
- package/dist/localdb/upload-wave.js +30 -0
- package/dist/localdb/upload-wave.js.map +1 -0
- package/dist/localdb/verified-heads.d.ts +13 -0
- package/dist/localdb/verified-heads.d.ts.map +1 -0
- package/dist/localdb/verified-heads.js +56 -0
- package/dist/localdb/verified-heads.js.map +1 -0
- package/dist/localdb/view-changes.d.ts +58 -0
- package/dist/localdb/view-changes.d.ts.map +1 -0
- package/dist/localdb/view-changes.js +174 -0
- package/dist/localdb/view-changes.js.map +1 -0
- package/dist/mcp/approval-url.d.ts +100 -0
- package/dist/mcp/approval-url.d.ts.map +1 -0
- package/dist/mcp/approval-url.js +171 -0
- package/dist/mcp/approval-url.js.map +1 -0
- package/dist/mcp/connection-api.d.ts +239 -3
- package/dist/mcp/connection-api.d.ts.map +1 -1
- package/dist/mcp/connection-api.js +792 -27
- package/dist/mcp/connection-api.js.map +1 -1
- package/dist/mcp/grant-registration.d.ts +15 -0
- package/dist/mcp/grant-registration.d.ts.map +1 -0
- package/dist/mcp/grant-registration.js +44 -0
- package/dist/mcp/grant-registration.js.map +1 -0
- package/dist/mcp/grantee.d.ts +1 -1
- package/dist/mcp/grantee.d.ts.map +1 -1
- package/dist/mcp/index.d.ts +5 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +5 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/oauth-redirect.d.ts +14 -0
- package/dist/mcp/oauth-redirect.d.ts.map +1 -0
- package/dist/mcp/oauth-redirect.js +51 -0
- package/dist/mcp/oauth-redirect.js.map +1 -0
- package/dist/mcp/read-client.d.ts +27 -3
- package/dist/mcp/read-client.d.ts.map +1 -1
- package/dist/mcp/read-client.js +325 -19
- package/dist/mcp/read-client.js.map +1 -1
- package/dist/mcp/resources.d.ts +3 -1
- package/dist/mcp/resources.d.ts.map +1 -1
- package/dist/mcp/resources.js +14 -2
- package/dist/mcp/resources.js.map +1 -1
- package/dist/mcp/server.d.ts +47 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +219 -17
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/session.d.ts +3 -1
- package/dist/mcp/session.d.ts.map +1 -1
- package/dist/mcp/session.js +58 -11
- package/dist/mcp/session.js.map +1 -1
- package/dist/mcp/store.d.ts +23 -1
- package/dist/mcp/store.d.ts.map +1 -1
- package/dist/mcp/store.js +102 -1
- package/dist/mcp/store.js.map +1 -1
- package/dist/mcp/token-expiry.d.ts +48 -0
- package/dist/mcp/token-expiry.d.ts.map +1 -0
- package/dist/mcp/token-expiry.js +69 -0
- package/dist/mcp/token-expiry.js.map +1 -0
- package/dist/mcp/tools.d.ts +154 -3
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +660 -39
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/types.d.ts +105 -4
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/mcp/types.js +13 -1
- package/dist/mcp/types.js.map +1 -1
- package/dist/mcp/write-client.d.ts +81 -0
- package/dist/mcp/write-client.d.ts.map +1 -0
- package/dist/mcp/write-client.js +140 -0
- package/dist/mcp/write-client.js.map +1 -0
- package/dist/oura/history-policy.d.ts +12 -0
- package/dist/oura/history-policy.d.ts.map +1 -0
- package/dist/oura/history-policy.js +54 -0
- package/dist/oura/history-policy.js.map +1 -0
- package/dist/oura/index.d.ts +51 -0
- package/dist/oura/index.d.ts.map +1 -0
- package/dist/oura/index.js +330 -0
- package/dist/oura/index.js.map +1 -0
- package/dist/payment/own-app.d.ts +8 -0
- package/dist/payment/own-app.d.ts.map +1 -0
- package/dist/payment/own-app.js +47 -0
- package/dist/payment/own-app.js.map +1 -0
- package/dist/pdpp/approval.d.ts +271 -0
- package/dist/pdpp/approval.d.ts.map +1 -0
- package/dist/pdpp/approval.js +486 -0
- package/dist/pdpp/approval.js.map +1 -0
- package/dist/pdpp/client-identity.d.ts +88 -0
- package/dist/pdpp/client-identity.d.ts.map +1 -0
- package/dist/pdpp/client-identity.js +196 -0
- package/dist/pdpp/client-identity.js.map +1 -0
- package/dist/pdpp/client-metadata.d.ts +95 -0
- package/dist/pdpp/client-metadata.d.ts.map +1 -0
- package/dist/pdpp/client-metadata.js +96 -0
- package/dist/pdpp/client-metadata.js.map +1 -0
- package/dist/pdpp/commitments.d.ts +75 -0
- package/dist/pdpp/commitments.d.ts.map +1 -0
- package/dist/pdpp/commitments.js +113 -0
- package/dist/pdpp/commitments.js.map +1 -0
- package/dist/pdpp/declaration-limits.d.ts +7 -0
- package/dist/pdpp/declaration-limits.d.ts.map +1 -0
- package/dist/pdpp/declaration-limits.js +7 -0
- package/dist/pdpp/declaration-limits.js.map +1 -0
- package/dist/pdpp/declaration.d.ts +119 -0
- package/dist/pdpp/declaration.d.ts.map +1 -0
- package/dist/pdpp/declaration.js +837 -0
- package/dist/pdpp/declaration.js.map +1 -0
- package/dist/pdpp/index.d.ts +38 -0
- package/dist/pdpp/index.d.ts.map +1 -0
- package/dist/pdpp/index.js +24 -0
- package/dist/pdpp/index.js.map +1 -0
- package/dist/pdpp/issuance.d.ts +126 -0
- package/dist/pdpp/issuance.d.ts.map +1 -0
- package/dist/pdpp/issuance.js +184 -0
- package/dist/pdpp/issuance.js.map +1 -0
- package/dist/pdpp/pkce.d.ts +53 -0
- package/dist/pdpp/pkce.d.ts.map +1 -0
- package/dist/pdpp/pkce.js +109 -0
- package/dist/pdpp/pkce.js.map +1 -0
- package/dist/pdpp/redirect.d.ts +60 -0
- package/dist/pdpp/redirect.d.ts.map +1 -0
- package/dist/pdpp/redirect.js +125 -0
- package/dist/pdpp/redirect.js.map +1 -0
- package/dist/pdpp/resolve.d.ts +120 -0
- package/dist/pdpp/resolve.d.ts.map +1 -0
- package/dist/pdpp/resolve.js +491 -0
- package/dist/pdpp/resolve.js.map +1 -0
- package/dist/pdpp/review.d.ts +280 -0
- package/dist/pdpp/review.d.ts.map +1 -0
- package/dist/pdpp/review.js +205 -0
- package/dist/pdpp/review.js.map +1 -0
- package/dist/pdpp/selection.d.ts +79 -0
- package/dist/pdpp/selection.d.ts.map +1 -0
- package/dist/pdpp/selection.js +493 -0
- package/dist/pdpp/selection.js.map +1 -0
- package/dist/pdpp/store.d.ts +228 -0
- package/dist/pdpp/store.d.ts.map +1 -0
- package/dist/pdpp/store.js +542 -0
- package/dist/pdpp/store.js.map +1 -0
- package/dist/pdpp/time.d.ts +39 -0
- package/dist/pdpp/time.d.ts.map +1 -0
- package/dist/pdpp/time.js +173 -0
- package/dist/pdpp/time.js.map +1 -0
- package/dist/pdpp/tokens.d.ts +181 -0
- package/dist/pdpp/tokens.d.ts.map +1 -0
- package/dist/pdpp/tokens.js +421 -0
- package/dist/pdpp/tokens.js.map +1 -0
- package/dist/pdpp/types.d.ts +457 -0
- package/dist/pdpp/types.d.ts.map +1 -0
- package/dist/pdpp/types.js +68 -0
- package/dist/pdpp/types.js.map +1 -0
- package/dist/pdpp-version.d.ts +28 -0
- package/dist/pdpp-version.d.ts.map +1 -0
- package/dist/pdpp-version.js +28 -0
- package/dist/pdpp-version.js.map +1 -0
- package/dist/policy/data-read.d.ts +52 -1
- package/dist/policy/data-read.d.ts.map +1 -1
- package/dist/policy/data-read.js +157 -3
- package/dist/policy/data-read.js.map +1 -1
- package/dist/policy/data-write.d.ts.map +1 -1
- package/dist/policy/data-write.js +18 -1
- package/dist/policy/data-write.js.map +1 -1
- package/dist/policy/index.d.ts +2 -1
- package/dist/policy/index.d.ts.map +1 -1
- package/dist/policy/index.js +2 -1
- package/dist/policy/index.js.map +1 -1
- package/dist/policy/reserved-scopes.d.ts +10 -0
- package/dist/policy/reserved-scopes.d.ts.map +1 -0
- package/dist/policy/reserved-scopes.js +19 -0
- package/dist/policy/reserved-scopes.js.map +1 -0
- package/dist/ports/index.d.ts +323 -10
- package/dist/ports/index.d.ts.map +1 -1
- package/dist/ports/index.js.map +1 -1
- package/dist/ports/pdpp-auth.d.ts +119 -0
- package/dist/ports/pdpp-auth.d.ts.map +1 -0
- package/dist/ports/pdpp-auth.js +46 -0
- package/dist/ports/pdpp-auth.js.map +1 -0
- package/dist/ports/pdpp-auth.test-utils.d.ts +9 -0
- package/dist/ports/pdpp-auth.test-utils.d.ts.map +1 -0
- package/dist/ports/pdpp-auth.test-utils.js +18 -0
- package/dist/ports/pdpp-auth.test-utils.js.map +1 -0
- package/dist/publication/publish.d.ts +137 -0
- package/dist/publication/publish.d.ts.map +1 -0
- package/dist/publication/publish.js +278 -0
- package/dist/publication/publish.js.map +1 -0
- package/dist/replication/completion.d.ts +20 -0
- package/dist/replication/completion.d.ts.map +1 -0
- package/dist/replication/completion.js +73 -0
- package/dist/replication/completion.js.map +1 -0
- package/dist/replication/coordinator-state.d.ts +29 -0
- package/dist/replication/coordinator-state.d.ts.map +1 -0
- package/dist/replication/coordinator-state.js +88 -0
- package/dist/replication/coordinator-state.js.map +1 -0
- package/dist/replication/coordinator-state.test-utils.d.ts +32 -0
- package/dist/replication/coordinator-state.test-utils.d.ts.map +1 -0
- package/dist/replication/coordinator-state.test-utils.js +113 -0
- package/dist/replication/coordinator-state.test-utils.js.map +1 -0
- package/dist/replication/coordinator.d.ts +264 -0
- package/dist/replication/coordinator.d.ts.map +1 -0
- package/dist/replication/coordinator.js +499 -0
- package/dist/replication/coordinator.js.map +1 -0
- package/dist/replication/copies.d.ts +126 -0
- package/dist/replication/copies.d.ts.map +1 -0
- package/dist/replication/copies.js +437 -0
- package/dist/replication/copies.js.map +1 -0
- package/dist/replication/copy-promotion.d.ts +132 -0
- package/dist/replication/copy-promotion.d.ts.map +1 -0
- package/dist/replication/copy-promotion.js +126 -0
- package/dist/replication/copy-promotion.js.map +1 -0
- package/dist/replication/door.d.ts +33 -0
- package/dist/replication/door.d.ts.map +1 -0
- package/dist/replication/door.js +10 -0
- package/dist/replication/door.js.map +1 -0
- package/dist/replication/dpv2.d.ts +141 -0
- package/dist/replication/dpv2.d.ts.map +1 -0
- package/dist/replication/dpv2.js +320 -0
- package/dist/replication/dpv2.js.map +1 -0
- package/dist/replication/effects.d.ts +68 -0
- package/dist/replication/effects.d.ts.map +1 -0
- package/dist/replication/effects.js +89 -0
- package/dist/replication/effects.js.map +1 -0
- package/dist/replication/engine.d.ts +378 -0
- package/dist/replication/engine.d.ts.map +1 -0
- package/dist/replication/engine.js +3197 -0
- package/dist/replication/engine.js.map +1 -0
- package/dist/replication/envelope.d.ts +481 -0
- package/dist/replication/envelope.d.ts.map +1 -0
- package/dist/replication/envelope.js +192 -0
- package/dist/replication/envelope.js.map +1 -0
- package/dist/replication/evidence.d.ts +118 -0
- package/dist/replication/evidence.d.ts.map +1 -0
- package/dist/replication/evidence.js +198 -0
- package/dist/replication/evidence.js.map +1 -0
- package/dist/replication/finality.d.ts +16 -0
- package/dist/replication/finality.d.ts.map +1 -0
- package/dist/replication/finality.js +11 -0
- package/dist/replication/finality.js.map +1 -0
- package/dist/replication/fixtures.d.ts +16 -0
- package/dist/replication/fixtures.d.ts.map +1 -0
- package/dist/replication/fixtures.js +47 -0
- package/dist/replication/fixtures.js.map +1 -0
- package/dist/replication/host-config.d.ts +52 -0
- package/dist/replication/host-config.d.ts.map +1 -0
- package/dist/replication/host-config.js +111 -0
- package/dist/replication/host-config.js.map +1 -0
- package/dist/replication/host-driver.d.ts +95 -0
- package/dist/replication/host-driver.d.ts.map +1 -0
- package/dist/replication/host-driver.js +202 -0
- package/dist/replication/host-driver.js.map +1 -0
- package/dist/replication/host-ports.d.ts +48 -0
- package/dist/replication/host-ports.d.ts.map +1 -0
- package/dist/replication/host-ports.js +69 -0
- package/dist/replication/host-ports.js.map +1 -0
- package/dist/replication/identity.d.ts +13 -0
- package/dist/replication/identity.d.ts.map +1 -0
- package/dist/replication/identity.js +22 -0
- package/dist/replication/identity.js.map +1 -0
- package/dist/replication/limits.d.ts +124 -0
- package/dist/replication/limits.d.ts.map +1 -0
- package/dist/replication/limits.js +182 -0
- package/dist/replication/limits.js.map +1 -0
- package/dist/replication/merge-plan.d.ts +92 -0
- package/dist/replication/merge-plan.d.ts.map +1 -0
- package/dist/replication/merge-plan.js +229 -0
- package/dist/replication/merge-plan.js.map +1 -0
- package/dist/replication/namespace.d.ts +4 -0
- package/dist/replication/namespace.d.ts.map +1 -0
- package/dist/replication/namespace.js +7 -0
- package/dist/replication/namespace.js.map +1 -0
- package/dist/replication/outcome.d.ts +178 -0
- package/dist/replication/outcome.d.ts.map +1 -0
- package/dist/replication/outcome.js +83 -0
- package/dist/replication/outcome.js.map +1 -0
- package/dist/replication/payload.d.ts +39 -0
- package/dist/replication/payload.d.ts.map +1 -0
- package/dist/replication/payload.js +137 -0
- package/dist/replication/payload.js.map +1 -0
- package/dist/replication/preparation.d.ts +42 -0
- package/dist/replication/preparation.d.ts.map +1 -0
- package/dist/replication/preparation.js +118 -0
- package/dist/replication/preparation.js.map +1 -0
- package/dist/replication/rebaseline.d.ts +33 -0
- package/dist/replication/rebaseline.d.ts.map +1 -0
- package/dist/replication/rebaseline.js +40 -0
- package/dist/replication/rebaseline.js.map +1 -0
- package/dist/replication/rebinding.d.ts +43 -0
- package/dist/replication/rebinding.d.ts.map +1 -0
- package/dist/replication/rebinding.js +52 -0
- package/dist/replication/rebinding.js.map +1 -0
- package/dist/replication/receive.d.ts +57 -0
- package/dist/replication/receive.d.ts.map +1 -0
- package/dist/replication/receive.js +114 -0
- package/dist/replication/receive.js.map +1 -0
- package/dist/replication/record-reducer.d.ts +16 -0
- package/dist/replication/record-reducer.d.ts.map +1 -0
- package/dist/replication/record-reducer.js +52 -0
- package/dist/replication/record-reducer.js.map +1 -0
- package/dist/replication/revision.d.ts +24 -0
- package/dist/replication/revision.d.ts.map +1 -0
- package/dist/replication/revision.js +35 -0
- package/dist/replication/revision.js.map +1 -0
- package/dist/replication/roster.d.ts +53 -0
- package/dist/replication/roster.d.ts.map +1 -0
- package/dist/replication/roster.js +115 -0
- package/dist/replication/roster.js.map +1 -0
- package/dist/replication/schedule.d.ts +73 -0
- package/dist/replication/schedule.d.ts.map +1 -0
- package/dist/replication/schedule.js +182 -0
- package/dist/replication/schedule.js.map +1 -0
- package/dist/replication/stream.d.ts +73 -0
- package/dist/replication/stream.d.ts.map +1 -0
- package/dist/replication/stream.js +542 -0
- package/dist/replication/stream.js.map +1 -0
- package/dist/replication/transport.d.ts +236 -0
- package/dist/replication/transport.d.ts.map +1 -0
- package/dist/replication/transport.js +440 -0
- package/dist/replication/transport.js.map +1 -0
- package/dist/replication/visibility-engine.d.ts +337 -0
- package/dist/replication/visibility-engine.d.ts.map +1 -0
- package/dist/replication/visibility-engine.js +602 -0
- package/dist/replication/visibility-engine.js.map +1 -0
- package/dist/replication/visibility-policy.d.ts +26 -0
- package/dist/replication/visibility-policy.d.ts.map +1 -0
- package/dist/replication/visibility-policy.js +33 -0
- package/dist/replication/visibility-policy.js.map +1 -0
- package/dist/replication/writer-identity-store.d.ts +100 -0
- package/dist/replication/writer-identity-store.d.ts.map +1 -0
- package/dist/replication/writer-identity-store.js +218 -0
- package/dist/replication/writer-identity-store.js.map +1 -0
- package/dist/replication/writer-identity.d.ts +252 -0
- package/dist/replication/writer-identity.d.ts.map +1 -0
- package/dist/replication/writer-identity.js +281 -0
- package/dist/replication/writer-identity.js.map +1 -0
- package/dist/replication/writer-identity.test-utils.d.ts +24 -0
- package/dist/replication/writer-identity.test-utils.d.ts.map +1 -0
- package/dist/replication/writer-identity.test-utils.js +86 -0
- package/dist/replication/writer-identity.test-utils.js.map +1 -0
- package/dist/schemas/server-config.d.ts +81 -0
- package/dist/schemas/server-config.d.ts.map +1 -1
- package/dist/schemas/server-config.js +179 -0
- package/dist/schemas/server-config.js.map +1 -1
- package/dist/signing/request-signer.d.ts +2 -0
- package/dist/signing/request-signer.d.ts.map +1 -1
- package/dist/signing/request-signer.js +1 -0
- package/dist/signing/request-signer.js.map +1 -1
- package/dist/storage/adapters/index.d.ts +3 -1
- package/dist/storage/adapters/index.d.ts.map +1 -1
- package/dist/storage/adapters/index.js +2 -0
- package/dist/storage/adapters/index.js.map +1 -1
- package/dist/storage/adapters/interface.d.ts +33 -3
- package/dist/storage/adapters/interface.d.ts.map +1 -1
- package/dist/storage/adapters/interface.js +13 -1
- package/dist/storage/adapters/interface.js.map +1 -1
- package/dist/storage/adapters/rate-limit-policy.d.ts +66 -0
- package/dist/storage/adapters/rate-limit-policy.d.ts.map +1 -0
- package/dist/storage/adapters/rate-limit-policy.js +103 -0
- package/dist/storage/adapters/rate-limit-policy.js.map +1 -0
- package/dist/storage/adapters/sdk.d.ts +9 -1
- package/dist/storage/adapters/sdk.d.ts.map +1 -1
- package/dist/storage/adapters/sdk.js +32 -8
- package/dist/storage/adapters/sdk.js.map +1 -1
- package/dist/storage/adapters/throttle.d.ts +30 -0
- package/dist/storage/adapters/throttle.d.ts.map +1 -0
- package/dist/storage/adapters/throttle.js +94 -0
- package/dist/storage/adapters/throttle.js.map +1 -0
- package/dist/storage/adapters/vana-audience.d.ts +27 -0
- package/dist/storage/adapters/vana-audience.d.ts.map +1 -0
- package/dist/storage/adapters/vana-audience.js +99 -0
- package/dist/storage/adapters/vana-audience.js.map +1 -0
- package/dist/storage/adapters/vana.d.ts +5 -3
- package/dist/storage/adapters/vana.d.ts.map +1 -1
- package/dist/storage/adapters/vana.js +128 -18
- package/dist/storage/adapters/vana.js.map +1 -1
- package/dist/storage/blocks/cursor.d.ts +5 -1
- package/dist/storage/blocks/cursor.d.ts.map +1 -1
- package/dist/storage/blocks/cursor.js +13 -1
- package/dist/storage/blocks/cursor.js.map +1 -1
- package/dist/storage/blocks/page.d.ts +18 -0
- package/dist/storage/blocks/page.d.ts.map +1 -0
- package/dist/storage/blocks/page.js +113 -0
- package/dist/storage/blocks/page.js.map +1 -0
- package/dist/storage/canonical-legacy-projection.d.ts +262 -0
- package/dist/storage/canonical-legacy-projection.d.ts.map +1 -0
- package/dist/storage/canonical-legacy-projection.js +759 -0
- package/dist/storage/canonical-legacy-projection.js.map +1 -0
- package/dist/storage/hierarchy/paths.d.ts.map +1 -1
- package/dist/storage/hierarchy/paths.js +9 -2
- package/dist/storage/hierarchy/paths.js.map +1 -1
- package/dist/storage/index/manager.d.ts +46 -5
- package/dist/storage/index/manager.d.ts.map +1 -1
- package/dist/storage/index/schema.d.ts +1 -1
- package/dist/storage/index/schema.js +1 -1
- package/dist/storage/index/types.d.ts +7 -1
- package/dist/storage/index/types.d.ts.map +1 -1
- package/dist/storage/legacy-projection.d.ts +88 -0
- package/dist/storage/legacy-projection.d.ts.map +1 -0
- package/dist/storage/legacy-projection.js +755 -0
- package/dist/storage/legacy-projection.js.map +1 -0
- package/dist/storage/legacy-scope-coverage-exceptions.d.ts +13 -0
- package/dist/storage/legacy-scope-coverage-exceptions.d.ts.map +1 -0
- package/dist/storage/legacy-scope-coverage-exceptions.js +14 -0
- package/dist/storage/legacy-scope-coverage-exceptions.js.map +1 -0
- package/dist/storage/legacy-scope-coverage.d.ts +53 -0
- package/dist/storage/legacy-scope-coverage.d.ts.map +1 -0
- package/dist/storage/legacy-scope-coverage.js +416 -0
- package/dist/storage/legacy-scope-coverage.js.map +1 -0
- package/dist/storage/legacy-scope-entity-keys.d.ts +17 -0
- package/dist/storage/legacy-scope-entity-keys.d.ts.map +1 -0
- package/dist/storage/legacy-scope-entity-keys.js +109 -0
- package/dist/storage/legacy-scope-entity-keys.js.map +1 -0
- package/dist/storage/legacy-scope-view.d.ts +201 -0
- package/dist/storage/legacy-scope-view.d.ts.map +1 -0
- package/dist/storage/legacy-scope-view.js +1044 -0
- package/dist/storage/legacy-scope-view.js.map +1 -0
- package/dist/storage/legacy-write-seal.d.ts +73 -0
- package/dist/storage/legacy-write-seal.d.ts.map +1 -0
- package/dist/storage/legacy-write-seal.js +71 -0
- package/dist/storage/legacy-write-seal.js.map +1 -0
- package/dist/storage/pdpp-records/completion.d.ts +91 -0
- package/dist/storage/pdpp-records/completion.d.ts.map +1 -0
- package/dist/storage/pdpp-records/completion.js +170 -0
- package/dist/storage/pdpp-records/completion.js.map +1 -0
- package/dist/storage/pdpp-records/cursor.d.ts +86 -0
- package/dist/storage/pdpp-records/cursor.d.ts.map +1 -0
- package/dist/storage/pdpp-records/cursor.js +56 -0
- package/dist/storage/pdpp-records/cursor.js.map +1 -0
- package/dist/storage/pdpp-records/declaration-witness.d.ts +58 -0
- package/dist/storage/pdpp-records/declaration-witness.d.ts.map +1 -0
- package/dist/storage/pdpp-records/declaration-witness.js +230 -0
- package/dist/storage/pdpp-records/declaration-witness.js.map +1 -0
- package/dist/storage/pdpp-records/enforcement.d.ts +39 -0
- package/dist/storage/pdpp-records/enforcement.d.ts.map +1 -0
- package/dist/storage/pdpp-records/enforcement.js +143 -0
- package/dist/storage/pdpp-records/enforcement.js.map +1 -0
- package/dist/storage/pdpp-records/index.d.ts +7 -0
- package/dist/storage/pdpp-records/index.d.ts.map +1 -0
- package/dist/storage/pdpp-records/index.js +6 -0
- package/dist/storage/pdpp-records/index.js.map +1 -0
- package/dist/storage/pdpp-records/ingest-plan.d.ts +39 -0
- package/dist/storage/pdpp-records/ingest-plan.d.ts.map +1 -0
- package/dist/storage/pdpp-records/ingest-plan.js +103 -0
- package/dist/storage/pdpp-records/ingest-plan.js.map +1 -0
- package/dist/storage/pdpp-records/interface.d.ts +111 -0
- package/dist/storage/pdpp-records/interface.d.ts.map +1 -0
- package/dist/storage/pdpp-records/interface.js +2 -0
- package/dist/storage/pdpp-records/interface.js.map +1 -0
- package/dist/storage/pdpp-records/list-page.d.ts +35 -0
- package/dist/storage/pdpp-records/list-page.d.ts.map +1 -0
- package/dist/storage/pdpp-records/list-page.js +106 -0
- package/dist/storage/pdpp-records/list-page.js.map +1 -0
- package/dist/storage/pdpp-records/memory-store.d.ts +9 -0
- package/dist/storage/pdpp-records/memory-store.d.ts.map +1 -0
- package/dist/storage/pdpp-records/memory-store.js +462 -0
- package/dist/storage/pdpp-records/memory-store.js.map +1 -0
- package/dist/storage/pdpp-records/portable.d.ts +12 -0
- package/dist/storage/pdpp-records/portable.d.ts.map +1 -0
- package/dist/storage/pdpp-records/portable.js +11 -0
- package/dist/storage/pdpp-records/portable.js.map +1 -0
- package/dist/storage/pdpp-records/read-port.d.ts +44 -0
- package/dist/storage/pdpp-records/read-port.d.ts.map +1 -0
- package/dist/storage/pdpp-records/read-port.js +22 -0
- package/dist/storage/pdpp-records/read-port.js.map +1 -0
- package/dist/storage/pdpp-records/record-key.d.ts +52 -0
- package/dist/storage/pdpp-records/record-key.d.ts.map +1 -0
- package/dist/storage/pdpp-records/record-key.js +97 -0
- package/dist/storage/pdpp-records/record-key.js.map +1 -0
- package/dist/storage/pdpp-records/replication-journal.d.ts +20 -0
- package/dist/storage/pdpp-records/replication-journal.d.ts.map +1 -0
- package/dist/storage/pdpp-records/replication-journal.js +2 -0
- package/dist/storage/pdpp-records/replication-journal.js.map +1 -0
- package/dist/storage/pdpp-records/schema.d.ts +41 -0
- package/dist/storage/pdpp-records/schema.d.ts.map +1 -0
- package/dist/storage/pdpp-records/schema.js +153 -0
- package/dist/storage/pdpp-records/schema.js.map +1 -0
- package/dist/storage/pdpp-records/stream-declaration.d.ts +86 -0
- package/dist/storage/pdpp-records/stream-declaration.d.ts.map +1 -0
- package/dist/storage/pdpp-records/stream-declaration.js +48 -0
- package/dist/storage/pdpp-records/stream-declaration.js.map +1 -0
- package/dist/storage/pdpp-records/sync-selection.d.ts +4 -0
- package/dist/storage/pdpp-records/sync-selection.d.ts.map +1 -0
- package/dist/storage/pdpp-records/sync-selection.js +37 -0
- package/dist/storage/pdpp-records/sync-selection.js.map +1 -0
- package/dist/storage/pdpp-records/types.d.ts +204 -0
- package/dist/storage/pdpp-records/types.d.ts.map +1 -0
- package/dist/storage/pdpp-records/types.js +38 -0
- package/dist/storage/pdpp-records/types.js.map +1 -0
- package/dist/stream-sync/artifacts.d.ts +38 -0
- package/dist/stream-sync/artifacts.d.ts.map +1 -0
- package/dist/stream-sync/artifacts.js +141 -0
- package/dist/stream-sync/artifacts.js.map +1 -0
- package/dist/stream-sync/blobs.d.ts +18 -0
- package/dist/stream-sync/blobs.d.ts.map +1 -0
- package/dist/stream-sync/blobs.js +83 -0
- package/dist/stream-sync/blobs.js.map +1 -0
- package/dist/stream-sync/crypto-port.d.ts +20 -0
- package/dist/stream-sync/crypto-port.d.ts.map +1 -0
- package/dist/stream-sync/crypto-port.js +19 -0
- package/dist/stream-sync/crypto-port.js.map +1 -0
- package/dist/stream-sync/crypto.d.ts +27 -0
- package/dist/stream-sync/crypto.d.ts.map +1 -0
- package/dist/stream-sync/crypto.js +67 -0
- package/dist/stream-sync/crypto.js.map +1 -0
- package/dist/stream-sync/delete-metadata.d.ts +23 -0
- package/dist/stream-sync/delete-metadata.d.ts.map +1 -0
- package/dist/stream-sync/delete-metadata.js +40 -0
- package/dist/stream-sync/delete-metadata.js.map +1 -0
- package/dist/stream-sync/index.d.ts +13 -0
- package/dist/stream-sync/index.d.ts.map +1 -0
- package/dist/stream-sync/index.js +13 -0
- package/dist/stream-sync/index.js.map +1 -0
- package/dist/stream-sync/intake.d.ts +185 -0
- package/dist/stream-sync/intake.d.ts.map +1 -0
- package/dist/stream-sync/intake.js +36 -0
- package/dist/stream-sync/intake.js.map +1 -0
- package/dist/stream-sync/memory-registry.d.ts +58 -0
- package/dist/stream-sync/memory-registry.d.ts.map +1 -0
- package/dist/stream-sync/memory-registry.js +119 -0
- package/dist/stream-sync/memory-registry.js.map +1 -0
- package/dist/stream-sync/ports.d.ts +363 -0
- package/dist/stream-sync/ports.d.ts.map +1 -0
- package/dist/stream-sync/ports.js +68 -0
- package/dist/stream-sync/ports.js.map +1 -0
- package/dist/stream-sync/publish-plan.d.ts +157 -0
- package/dist/stream-sync/publish-plan.d.ts.map +1 -0
- package/dist/stream-sync/publish-plan.js +217 -0
- package/dist/stream-sync/publish-plan.js.map +1 -0
- package/dist/stream-sync/registry.d.ts +24 -0
- package/dist/stream-sync/registry.d.ts.map +1 -0
- package/dist/stream-sync/registry.js +389 -0
- package/dist/stream-sync/registry.js.map +1 -0
- package/dist/stream-sync/scope-routing.d.ts +17 -0
- package/dist/stream-sync/scope-routing.d.ts.map +1 -0
- package/dist/stream-sync/scope-routing.js +24 -0
- package/dist/stream-sync/scope-routing.js.map +1 -0
- package/dist/stream-sync/seed-staging.d.ts +85 -0
- package/dist/stream-sync/seed-staging.d.ts.map +1 -0
- package/dist/stream-sync/seed-staging.js +325 -0
- package/dist/stream-sync/seed-staging.js.map +1 -0
- package/dist/stream-sync/send-gate.d.ts +149 -0
- package/dist/stream-sync/send-gate.d.ts.map +1 -0
- package/dist/stream-sync/send-gate.js +382 -0
- package/dist/stream-sync/send-gate.js.map +1 -0
- package/dist/stream-sync/storage-retry.d.ts +210 -0
- package/dist/stream-sync/storage-retry.d.ts.map +1 -0
- package/dist/stream-sync/storage-retry.js +314 -0
- package/dist/stream-sync/storage-retry.js.map +1 -0
- package/dist/stream-sync/stream-aead.d.ts +33 -0
- package/dist/stream-sync/stream-aead.d.ts.map +1 -0
- package/dist/stream-sync/stream-aead.js +183 -0
- package/dist/stream-sync/stream-aead.js.map +1 -0
- package/dist/stream-sync-read/index.d.ts +4 -0
- package/dist/stream-sync-read/index.d.ts.map +1 -0
- package/dist/stream-sync-read/index.js +3 -0
- package/dist/stream-sync-read/index.js.map +1 -0
- package/dist/stream-sync-read/routing.d.ts +27 -0
- package/dist/stream-sync-read/routing.d.ts.map +1 -0
- package/dist/stream-sync-read/routing.js +49 -0
- package/dist/stream-sync-read/routing.js.map +1 -0
- package/dist/stream-sync-read/service.d.ts +196 -0
- package/dist/stream-sync-read/service.d.ts.map +1 -0
- package/dist/stream-sync-read/service.js +17 -0
- package/dist/stream-sync-read/service.js.map +1 -0
- package/dist/sync/account-mode/authority.d.ts +56 -0
- package/dist/sync/account-mode/authority.d.ts.map +1 -0
- package/dist/sync/account-mode/authority.js +145 -0
- package/dist/sync/account-mode/authority.js.map +1 -0
- package/dist/sync/account-mode/evidence-wire.d.ts +23 -0
- package/dist/sync/account-mode/evidence-wire.d.ts.map +1 -0
- package/dist/sync/account-mode/evidence-wire.js +37 -0
- package/dist/sync/account-mode/evidence-wire.js.map +1 -0
- package/dist/sync/account-mode/import-waker.d.ts +36 -0
- package/dist/sync/account-mode/import-waker.d.ts.map +1 -0
- package/dist/sync/account-mode/import-waker.js +55 -0
- package/dist/sync/account-mode/import-waker.js.map +1 -0
- package/dist/sync/account-mode/index.d.ts +10 -0
- package/dist/sync/account-mode/index.d.ts.map +1 -0
- package/dist/sync/account-mode/index.js +10 -0
- package/dist/sync/account-mode/index.js.map +1 -0
- package/dist/sync/account-mode/port.d.ts +11 -0
- package/dist/sync/account-mode/port.d.ts.map +1 -0
- package/dist/sync/account-mode/port.js +21 -0
- package/dist/sync/account-mode/port.js.map +1 -0
- package/dist/sync/account-mode/record.d.ts +52 -0
- package/dist/sync/account-mode/record.d.ts.map +1 -0
- package/dist/sync/account-mode/record.js +60 -0
- package/dist/sync/account-mode/record.js.map +1 -0
- package/dist/sync/account-mode/rw-lock.d.ts +14 -0
- package/dist/sync/account-mode/rw-lock.d.ts.map +1 -0
- package/dist/sync/account-mode/rw-lock.js +59 -0
- package/dist/sync/account-mode/rw-lock.js.map +1 -0
- package/dist/sync/cancellable-gateway.d.ts +25 -0
- package/dist/sync/cancellable-gateway.d.ts.map +1 -0
- package/dist/sync/cancellable-gateway.js +64 -0
- package/dist/sync/cancellable-gateway.js.map +1 -0
- package/dist/sync/data-point-feed.d.ts +3 -0
- package/dist/sync/data-point-feed.d.ts.map +1 -1
- package/dist/sync/data-point-feed.js +20 -1
- package/dist/sync/data-point-feed.js.map +1 -1
- package/dist/sync/delete-data-port.d.ts +19 -0
- package/dist/sync/delete-data-port.d.ts.map +1 -1
- package/dist/sync/delete-data-port.js +42 -9
- package/dist/sync/delete-data-port.js.map +1 -1
- package/dist/sync/engine/change-probe.d.ts +42 -0
- package/dist/sync/engine/change-probe.d.ts.map +1 -0
- package/dist/sync/engine/change-probe.js +79 -0
- package/dist/sync/engine/change-probe.js.map +1 -0
- package/dist/sync/engine/change-push.d.ts +53 -0
- package/dist/sync/engine/change-push.d.ts.map +1 -0
- package/dist/sync/engine/change-push.js +153 -0
- package/dist/sync/engine/change-push.js.map +1 -0
- package/dist/sync/engine/sync-manager.d.ts +181 -2
- package/dist/sync/engine/sync-manager.d.ts.map +1 -1
- package/dist/sync/engine/sync-manager.js +642 -19
- package/dist/sync/engine/sync-manager.js.map +1 -1
- package/dist/sync/index.d.ts +11 -3
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +11 -1
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/pdpp-import.d.ts +202 -0
- package/dist/sync/pdpp-import.d.ts.map +1 -0
- package/dist/sync/pdpp-import.js +466 -0
- package/dist/sync/pdpp-import.js.map +1 -0
- package/dist/sync/pending-blob-deletions.d.ts +18 -2
- package/dist/sync/pending-blob-deletions.d.ts.map +1 -1
- package/dist/sync/pending-blob-deletions.js +97 -23
- package/dist/sync/pending-blob-deletions.js.map +1 -1
- package/dist/sync/scope-deletions.d.ts +12 -0
- package/dist/sync/scope-deletions.d.ts.map +1 -1
- package/dist/sync/scope-deletions.js +99 -25
- package/dist/sync/scope-deletions.js.map +1 -1
- package/dist/sync/tombstone-finality.d.ts +36 -0
- package/dist/sync/tombstone-finality.d.ts.map +1 -0
- package/dist/sync/tombstone-finality.js +142 -0
- package/dist/sync/tombstone-finality.js.map +1 -0
- package/dist/sync/tombstone-resubmits.d.ts +61 -0
- package/dist/sync/tombstone-resubmits.d.ts.map +1 -0
- package/dist/sync/tombstone-resubmits.js +85 -0
- package/dist/sync/tombstone-resubmits.js.map +1 -0
- package/dist/sync/types.d.ts +26 -0
- package/dist/sync/types.d.ts.map +1 -1
- package/dist/sync/upload-attempts.d.ts +218 -0
- package/dist/sync/upload-attempts.d.ts.map +1 -0
- package/dist/sync/upload-attempts.js +500 -0
- package/dist/sync/upload-attempts.js.map +1 -0
- package/dist/sync/upload-state.d.ts +163 -0
- package/dist/sync/upload-state.d.ts.map +1 -0
- package/dist/sync/upload-state.js +239 -0
- package/dist/sync/upload-state.js.map +1 -0
- package/dist/sync/workers/delete.d.ts +63 -6
- package/dist/sync/workers/delete.d.ts.map +1 -1
- package/dist/sync/workers/delete.js +621 -168
- package/dist/sync/workers/delete.js.map +1 -1
- package/dist/sync/workers/download.d.ts +27 -1
- package/dist/sync/workers/download.d.ts.map +1 -1
- package/dist/sync/workers/download.js +368 -27
- package/dist/sync/workers/download.js.map +1 -1
- package/dist/sync/workers/lost-data-points.d.ts +38 -0
- package/dist/sync/workers/lost-data-points.d.ts.map +1 -0
- package/dist/sync/workers/lost-data-points.js +72 -0
- package/dist/sync/workers/lost-data-points.js.map +1 -0
- package/dist/sync/workers/upload.d.ts +97 -8
- package/dist/sync/workers/upload.d.ts.map +1 -1
- package/dist/sync/workers/upload.js +498 -277
- package/dist/sync/workers/upload.js.map +1 -1
- package/dist/test-support/memory-oracle.calibration.d.ts +16 -0
- package/dist/test-support/memory-oracle.calibration.d.ts.map +1 -0
- package/dist/test-support/memory-oracle.calibration.js +43 -0
- package/dist/test-support/memory-oracle.calibration.js.map +1 -0
- package/dist/test-support/memory-oracle.d.ts +82 -0
- package/dist/test-support/memory-oracle.d.ts.map +1 -0
- package/dist/test-support/memory-oracle.js +104 -0
- package/dist/test-support/memory-oracle.js.map +1 -0
- package/dist/test-utils/account-mode.d.ts +36 -0
- package/dist/test-utils/account-mode.d.ts.map +1 -0
- package/dist/test-utils/account-mode.js +77 -0
- package/dist/test-utils/account-mode.js.map +1 -0
- package/dist/test-utils/index.d.ts +2 -0
- package/dist/test-utils/index.d.ts.map +1 -1
- package/dist/test-utils/index.js +2 -0
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/legacy-write-seal.d.ts +16 -0
- package/dist/test-utils/legacy-write-seal.d.ts.map +1 -0
- package/dist/test-utils/legacy-write-seal.js +20 -0
- package/dist/test-utils/legacy-write-seal.js.map +1 -0
- package/dist/test-utils/live-grants.d.ts +24 -0
- package/dist/test-utils/live-grants.d.ts.map +1 -0
- package/dist/test-utils/live-grants.js +6 -0
- package/dist/test-utils/live-grants.js.map +1 -0
- package/dist/test-utils/memory-storage.d.ts +18 -2
- package/dist/test-utils/memory-storage.d.ts.map +1 -1
- package/dist/test-utils/memory-storage.js +156 -42
- package/dist/test-utils/memory-storage.js.map +1 -1
- package/dist/write/attribution.d.ts.map +1 -1
- package/dist/write/attribution.js +8 -4
- package/dist/write/attribution.js.map +1 -1
- package/dist/write/route.d.ts.map +1 -1
- package/dist/write/route.js +9 -10
- package/dist/write/route.js.map +1 -1
- package/dist/write/session.d.ts.map +1 -1
- package/dist/write/session.js +13 -0
- package/dist/write/session.js.map +1 -1
- package/dist-test/localdb/conformance.d.ts +13 -0
- package/dist-test/localdb/conformance.d.ts.map +1 -0
- package/dist-test/localdb/conformance.js +292 -0
- package/dist-test/localdb/conformance.js.map +1 -0
- package/dist-test/tsconfig.tsbuildinfo +1 -0
- package/package.json +131 -5
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one answer to "has this account moved to stream sync?".
|
|
3
|
+
*
|
|
4
|
+
* The answer comes from exactly one place: the shared mode module
|
|
5
|
+
* (`sync/account-mode`), which holds a durable per-owner record fed by the
|
|
6
|
+
* Account's answers that hosts forward as evidence. `accountStorageModeOf`
|
|
7
|
+
* turns that module into the `AccountStorageMode` port below, and a host hands
|
|
8
|
+
* the same port to everything that needs the answer: the legacy write gate,
|
|
9
|
+
* the read selector and the MCP engines. Two consumers can never disagree,
|
|
10
|
+
* because there is one record. No consumer derives the mode from config.
|
|
11
|
+
*
|
|
12
|
+
* Three values:
|
|
13
|
+
* - `switched`: the Account has said On for this owner. Permanent: a later Off
|
|
14
|
+
* at the same generation does not reopen legacy storage.
|
|
15
|
+
* - `unswitched`: the Account said Off and has never said On. No expiry.
|
|
16
|
+
* - `unknown`: no answer yet for this owner (a new owner, or another owner).
|
|
17
|
+
* Reads and legacy writes pause with a
|
|
18
|
+
* retryable 503 until the first answer. It is never permission to write.
|
|
19
|
+
*
|
|
20
|
+
* Reader presence is never the mode. Whether a stream reader is wired says what
|
|
21
|
+
* this runtime can do; the mode says what the account has chosen.
|
|
22
|
+
*
|
|
23
|
+
* The owner is never optional. `read` takes the owner the caller acts for, so
|
|
24
|
+
* a call without one does not type-check. Consumers do not hold the raw mode:
|
|
25
|
+
* the host binds it to its own server owner once (`accountStorageModeFor`) and
|
|
26
|
+
* hands consumers the bound view, whose `read()` cannot be asked about another
|
|
27
|
+
* account.
|
|
28
|
+
*/
|
|
29
|
+
export type AccountStorageModeValue = "switched" | "unswitched" | "unknown";
|
|
30
|
+
export interface AccountStorageMode {
|
|
31
|
+
/**
|
|
32
|
+
* The mode right now, for the account `requestOwner`. Required: an empty
|
|
33
|
+
* owner is `unknown`.
|
|
34
|
+
*/
|
|
35
|
+
read(requestOwner: string): AccountStorageModeValue;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A mode bound to the owner of the runtime that holds it. This is what every
|
|
39
|
+
* consumer receives: its `read()` always asks about `owner` and nothing else,
|
|
40
|
+
* so a consumer cannot drop the owner or ask about another account.
|
|
41
|
+
*/
|
|
42
|
+
export interface OwnedAccountStorageMode {
|
|
43
|
+
readonly owner: string;
|
|
44
|
+
read(): AccountStorageModeValue;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Bind `mode` to the runtime's own server owner. A missing owner binds to the
|
|
48
|
+
* empty string, which the mode answers `unknown`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function accountStorageModeFor(mode: AccountStorageMode, owner: string | undefined): OwnedAccountStorageMode;
|
|
51
|
+
/** What a read of this account must use. */
|
|
52
|
+
export type StorageSelection =
|
|
53
|
+
/** The account is switched: every read is answered from stream data only. */
|
|
54
|
+
{
|
|
55
|
+
readonly kind: "streams";
|
|
56
|
+
}
|
|
57
|
+
/** Explicit Off: reads behave as before the switch. */
|
|
58
|
+
| {
|
|
59
|
+
readonly kind: "legacy";
|
|
60
|
+
} | {
|
|
61
|
+
readonly kind: "unknown";
|
|
62
|
+
};
|
|
63
|
+
export declare const ACCOUNT_MODE_UNKNOWN_CODE = "ACCOUNT_MODE_UNKNOWN";
|
|
64
|
+
export declare const ACCOUNT_MODE_UNKNOWN_STATUS = 503;
|
|
65
|
+
export declare const ACCOUNT_MODE_RETRY_AFTER_SECONDS = 5;
|
|
66
|
+
/** The retryable 503 a legacy write gets before the owner's first answer. */
|
|
67
|
+
export declare function accountModeUnknownResponse(): Response;
|
|
68
|
+
/** The slice of the data API deps the selector reads. */
|
|
69
|
+
export interface StorageSelectionDeps {
|
|
70
|
+
readonly accountStorageMode?: OwnedAccountStorageMode;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The one decision a read makes before it touches any store. Only a switched
|
|
74
|
+
* account reads streams; only explicit Off reads legacy. Unknown is refused. Depends only on the account mode.
|
|
75
|
+
*/
|
|
76
|
+
export declare function selectAccountStorageMode(deps: StorageSelectionDeps): StorageSelection;
|
|
77
|
+
//# sourceMappingURL=account-storage-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-storage-mode.d.ts","sourceRoot":"","sources":["../../src/api/account-storage-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;AAE5E,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,uBAAuB,CAAC;CACrD;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,IAAI,IAAI,uBAAuB,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,uBAAuB,CAGzB;AAED,4CAA4C;AAC5C,MAAM,MAAM,gBAAgB;AAC1B,6EAA6E;AAC3E;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE;AAC9B,uDAAuD;GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEjC,eAAO,MAAM,yBAAyB,yBAAyB,CAAC;AAChE,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAElD,6EAA6E;AAC7E,wBAAgB,0BAA0B,IAAI,QAAQ,CAoBrD;AAED,yDAAyD;AACzD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,uBAAuB,CAAC;CACvD;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,oBAAoB,GACzB,gBAAgB,CAUlB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one answer to "has this account moved to stream sync?".
|
|
3
|
+
*
|
|
4
|
+
* The answer comes from exactly one place: the shared mode module
|
|
5
|
+
* (`sync/account-mode`), which holds a durable per-owner record fed by the
|
|
6
|
+
* Account's answers that hosts forward as evidence. `accountStorageModeOf`
|
|
7
|
+
* turns that module into the `AccountStorageMode` port below, and a host hands
|
|
8
|
+
* the same port to everything that needs the answer: the legacy write gate,
|
|
9
|
+
* the read selector and the MCP engines. Two consumers can never disagree,
|
|
10
|
+
* because there is one record. No consumer derives the mode from config.
|
|
11
|
+
*
|
|
12
|
+
* Three values:
|
|
13
|
+
* - `switched`: the Account has said On for this owner. Permanent: a later Off
|
|
14
|
+
* at the same generation does not reopen legacy storage.
|
|
15
|
+
* - `unswitched`: the Account said Off and has never said On. No expiry.
|
|
16
|
+
* - `unknown`: no answer yet for this owner (a new owner, or another owner).
|
|
17
|
+
* Reads and legacy writes pause with a
|
|
18
|
+
* retryable 503 until the first answer. It is never permission to write.
|
|
19
|
+
*
|
|
20
|
+
* Reader presence is never the mode. Whether a stream reader is wired says what
|
|
21
|
+
* this runtime can do; the mode says what the account has chosen.
|
|
22
|
+
*
|
|
23
|
+
* The owner is never optional. `read` takes the owner the caller acts for, so
|
|
24
|
+
* a call without one does not type-check. Consumers do not hold the raw mode:
|
|
25
|
+
* the host binds it to its own server owner once (`accountStorageModeFor`) and
|
|
26
|
+
* hands consumers the bound view, whose `read()` cannot be asked about another
|
|
27
|
+
* account.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Bind `mode` to the runtime's own server owner. A missing owner binds to the
|
|
31
|
+
* empty string, which the mode answers `unknown`.
|
|
32
|
+
*/
|
|
33
|
+
export function accountStorageModeFor(mode, owner) {
|
|
34
|
+
const bound = owner ?? "";
|
|
35
|
+
return { owner: bound, read: () => mode.read(bound) };
|
|
36
|
+
}
|
|
37
|
+
export const ACCOUNT_MODE_UNKNOWN_CODE = "ACCOUNT_MODE_UNKNOWN";
|
|
38
|
+
export const ACCOUNT_MODE_UNKNOWN_STATUS = 503;
|
|
39
|
+
export const ACCOUNT_MODE_RETRY_AFTER_SECONDS = 5;
|
|
40
|
+
/** The retryable 503 a legacy write gets before the owner's first answer. */
|
|
41
|
+
export function accountModeUnknownResponse() {
|
|
42
|
+
const message = "This server has not heard from the account yet, so legacy writes are paused. Retry shortly.";
|
|
43
|
+
return new Response(JSON.stringify({
|
|
44
|
+
error: {
|
|
45
|
+
code: ACCOUNT_MODE_UNKNOWN_STATUS,
|
|
46
|
+
errorCode: ACCOUNT_MODE_UNKNOWN_CODE,
|
|
47
|
+
message,
|
|
48
|
+
},
|
|
49
|
+
}), {
|
|
50
|
+
status: ACCOUNT_MODE_UNKNOWN_STATUS,
|
|
51
|
+
headers: {
|
|
52
|
+
"content-type": "application/json",
|
|
53
|
+
"cache-control": "no-store",
|
|
54
|
+
"retry-after": String(ACCOUNT_MODE_RETRY_AFTER_SECONDS),
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The one decision a read makes before it touches any store. Only a switched
|
|
60
|
+
* account reads streams; only explicit Off reads legacy. Unknown is refused. Depends only on the account mode.
|
|
61
|
+
*/
|
|
62
|
+
export function selectAccountStorageMode(deps) {
|
|
63
|
+
const mode = deps.accountStorageMode?.read() ?? "unknown";
|
|
64
|
+
return {
|
|
65
|
+
kind: mode === "switched"
|
|
66
|
+
? "streams"
|
|
67
|
+
: mode === "unswitched"
|
|
68
|
+
? "legacy"
|
|
69
|
+
: "unknown",
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=account-storage-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-storage-mode.js","sourceRoot":"","sources":["../../src/api/account-storage-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAsBH;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,IAAwB,EACxB,KAAyB;IAEzB,MAAM,KAAK,GAAG,KAAK,IAAI,EAAE,CAAC;IAC1B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;AACxD,CAAC;AAUD,MAAM,CAAC,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAChE,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAC/C,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC;AAElD,6EAA6E;AAC7E,MAAM,UAAU,0BAA0B;IACxC,MAAM,OAAO,GACX,6FAA6F,CAAC;IAChG,OAAO,IAAI,QAAQ,CACjB,IAAI,CAAC,SAAS,CAAC;QACb,KAAK,EAAE;YACL,IAAI,EAAE,2BAA2B;YACjC,SAAS,EAAE,yBAAyB;YACpC,OAAO;SACR;KACF,CAAC,EACF;QACE,MAAM,EAAE,2BAA2B;QACnC,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,eAAe,EAAE,UAAU;YAC3B,aAAa,EAAE,MAAM,CAAC,gCAAgC,CAAC;SACxD;KACF,CACF,CAAC;AACJ,CAAC;AAOD;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CACtC,IAA0B;IAE1B,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;IAC1D,OAAO;QACL,IAAI,EACF,IAAI,KAAK,UAAU;YACjB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,IAAI,KAAK,YAAY;gBACrB,CAAC,CAAC,QAAQ;gBACV,CAAC,CAAC,SAAS;KAClB,CAAC;AACJ,CAAC"}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import type { LocalListing } from "../localdb/listing.js";
|
|
2
|
+
import type { OlderVersions } from "../localdb/older-versions.js";
|
|
3
|
+
import type { DurableAdditionsService } from "../additions/durable.js";
|
|
4
|
+
import { type LocalHistory } from "../localdb/history.js";
|
|
1
5
|
import type { AccessLogWriter } from "../logging/access-log.js";
|
|
2
6
|
import type { AccessLogReader } from "../logging/access-reader.js";
|
|
3
7
|
import { type DataStoragePort, type RuntimeAvailabilityPort } from "../ports/index.js";
|
|
@@ -5,12 +9,20 @@ import type { DataReadPolicyPorts } from "../policy/index.js";
|
|
|
5
9
|
import type { SyncManager } from "../sync/index.js";
|
|
6
10
|
import { type ScopeDeletionTracker } from "../sync/scope-deletions.js";
|
|
7
11
|
import type { IndexEntry } from "../storage/index/types.js";
|
|
12
|
+
import { type PdppImporter } from "../sync/pdpp-import.js";
|
|
8
13
|
import { type DeleteScopeResult } from "../sync/workers/delete.js";
|
|
9
14
|
import { type OAuthDeviceSessionLookup, type OAuthTokenStorePort } from "../contracts/index.js";
|
|
10
15
|
import type { DataFileEnvelope, DataPortabilityGatewayConfig, GatewayClient } from "@opendatalabs/vana-sdk/browser";
|
|
11
16
|
import type { ServerSigner } from "../signing/index.js";
|
|
12
17
|
import { type WriterAttribution } from "../write/attribution.js";
|
|
13
18
|
import type { LineageGatewayPort } from "../lineage/gateway.js";
|
|
19
|
+
import { type ScopeUploadRegistry } from "./scope-uploads.js";
|
|
20
|
+
import type { ReadDecision, ResolveInput, StreamSyncReadStatus } from "../stream-sync-read/service.js";
|
|
21
|
+
import type { PreparedScopeUploadBatch } from "./scope-upload-batches.js";
|
|
22
|
+
import { type OwnedAccountStorageMode } from "./account-storage-mode.js";
|
|
23
|
+
import type { StorageModeRead } from "./owner-connector-delete.js";
|
|
24
|
+
import type { LegacyWriteSeal } from "../storage/legacy-write-seal.js";
|
|
25
|
+
import { type LegacyScopeViewPort } from "../storage/legacy-scope-view.js";
|
|
14
26
|
import { type X402Challenge } from "../payment/index.js";
|
|
15
27
|
export interface PersonalServerReadAuthInput {
|
|
16
28
|
request: Request;
|
|
@@ -23,6 +35,23 @@ export interface PersonalServerReadAuthInput {
|
|
|
23
35
|
* x402 challenge/settlement to the exact version served, not the latest.
|
|
24
36
|
*/
|
|
25
37
|
at?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The registered data point version the body comes from, when it is not
|
|
40
|
+
* the stored entry of `scope`: a stream view serves a stream head. Taken
|
|
41
|
+
* unchanged from the read decision, so settlement names the head that was
|
|
42
|
+
* validated and served. When present, `fileId` and `at` select no
|
|
43
|
+
* settlement entry.
|
|
44
|
+
*/
|
|
45
|
+
servedEntry?: {
|
|
46
|
+
scope: string;
|
|
47
|
+
version: number;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* The read serves no block values, only a scope's table of contents (block
|
|
51
|
+
* ids, paths, sizes). Grant policy still applies; payment-enforcing auth
|
|
52
|
+
* ports do not charge it, the same way search is free discovery.
|
|
53
|
+
*/
|
|
54
|
+
metadataOnly?: boolean;
|
|
26
55
|
}
|
|
27
56
|
export interface PersonalServerReadAuthResult {
|
|
28
57
|
builder?: `0x${string}` | string;
|
|
@@ -34,6 +63,13 @@ export interface PersonalServerWriteAuthInput {
|
|
|
34
63
|
* same precedence as the owner write path). */
|
|
35
64
|
scope: string;
|
|
36
65
|
}
|
|
66
|
+
export interface PersonalServerScopeAuthInput {
|
|
67
|
+
request: Request;
|
|
68
|
+
/** Raw scope path param; auth ports that need scope binding validate it. */
|
|
69
|
+
scope: string;
|
|
70
|
+
/** The unsigned grant hint a read also takes; see `authorizeBuilderList`. */
|
|
71
|
+
grantId?: string;
|
|
72
|
+
}
|
|
37
73
|
/**
|
|
38
74
|
* Result of authorizing a DELEGATED (write-session) write. A void return
|
|
39
75
|
* means the request was authorized as the owner instead — the ingest then
|
|
@@ -70,22 +106,77 @@ export interface PersonalServerWriteSessionResult {
|
|
|
70
106
|
/** Rolls back the per-call proof reservation; see the write result. */
|
|
71
107
|
releaseProof?: () => Promise<void>;
|
|
72
108
|
}
|
|
109
|
+
/** A read the server actually served, or one it refused. */
|
|
110
|
+
export type PersonalServerReadOutcome = "served" | "denied";
|
|
111
|
+
/** Which surface the read came in on. */
|
|
112
|
+
export type PersonalServerReadSource = "mcp" | "api";
|
|
113
|
+
/**
|
|
114
|
+
* Stand-in for a grant/grantee that does not exist on a denial — a scope that
|
|
115
|
+
* no grant covers has no grant id and no builder to attribute the read to.
|
|
116
|
+
*/
|
|
117
|
+
export declare const READ_FULFILLMENT_NONE = "none";
|
|
73
118
|
export interface PersonalServerReadFulfillment {
|
|
119
|
+
/** Grantee address, or `READ_FULFILLMENT_NONE` on a denial. */
|
|
74
120
|
builder: string;
|
|
121
|
+
/** Deny code (e.g. `scope_not_granted`); only set when outcome is denied. */
|
|
122
|
+
denyReason?: string;
|
|
75
123
|
fileId?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Grant id. A denial names the grant the refused call arrived on: the
|
|
126
|
+
* Gateway stores a 32-byte id, so `READ_FULFILLMENT_NONE` is refused there.
|
|
127
|
+
*/
|
|
76
128
|
grantId: string;
|
|
77
|
-
|
|
129
|
+
/** Absent on surfaces that carry no request metadata (MCP tool calls). */
|
|
130
|
+
ipAddress?: string;
|
|
78
131
|
logId: string;
|
|
132
|
+
outcome: PersonalServerReadOutcome;
|
|
79
133
|
scope: string;
|
|
80
134
|
servedAt: string;
|
|
81
|
-
|
|
135
|
+
source: PersonalServerReadSource;
|
|
136
|
+
/** MCP tool name; absent on the plain HTTP read path. */
|
|
137
|
+
tool?: string;
|
|
138
|
+
userAgent?: string;
|
|
82
139
|
}
|
|
83
140
|
export interface PersonalServerReadFulfillmentReporter {
|
|
84
141
|
report(event: PersonalServerReadFulfillment): Promise<void>;
|
|
142
|
+
/**
|
|
143
|
+
* Optional: reporters that only settle served reads (relay-gated Lite) can
|
|
144
|
+
* omit it and denials are simply not recorded.
|
|
145
|
+
*/
|
|
146
|
+
reportDenied?(event: PersonalServerReadFulfillment): Promise<void>;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* What a non-owner caller may see in a data listing: the scope patterns of
|
|
150
|
+
* the grants it holds from this server's owner. Only scopes they cover are
|
|
151
|
+
* listed, and versions of any other scope are refused.
|
|
152
|
+
*/
|
|
153
|
+
export interface PersonalServerListAuthResult {
|
|
154
|
+
grantedScopes: readonly string[];
|
|
85
155
|
}
|
|
86
156
|
export interface PersonalServerApiAuthPort {
|
|
87
157
|
authorizeOwner(request: Request): Promise<void>;
|
|
88
|
-
|
|
158
|
+
/**
|
|
159
|
+
* Authorize `GET /v1/data` and `GET /v1/data/:scope/versions`.
|
|
160
|
+
*
|
|
161
|
+
* Returning void means a FULL listing: every scope, and versions of any
|
|
162
|
+
* scope, exactly as the owner sees them. Return void only for the owner or
|
|
163
|
+
* an owner-equivalent credential (dev token, control-plane token, owner
|
|
164
|
+
* session token, PS-Lite's bearer `builderToken`, which is owner-equivalent
|
|
165
|
+
* by design). Any other caller must get a result naming its granted scopes
|
|
166
|
+
* (possibly `[]`), or the call must throw.
|
|
167
|
+
* `grantId` is the unsigned hint a read also takes (`?grantId=` /
|
|
168
|
+
* `X-PS-Grant-Id`); a signed `grantId` claim takes precedence.
|
|
169
|
+
*/
|
|
170
|
+
authorizeBuilderList(request: Request, options?: {
|
|
171
|
+
grantId?: string;
|
|
172
|
+
}): Promise<PersonalServerListAuthResult | void>;
|
|
173
|
+
/**
|
|
174
|
+
* Authorize listing versions for one legacy scope. Optional so auth ports
|
|
175
|
+
* without scoped owner-token support keep the `authorizeBuilderList` gate.
|
|
176
|
+
* Returns what `authorizeBuilderList` does: void is a full listing, a
|
|
177
|
+
* result names the scopes a non-owner may see.
|
|
178
|
+
*/
|
|
179
|
+
authorizeScopeVersions?(input: PersonalServerScopeAuthInput): Promise<PersonalServerListAuthResult | void>;
|
|
89
180
|
authorizeBuilderRead(input: PersonalServerReadAuthInput): Promise<PersonalServerReadAuthResult | void>;
|
|
90
181
|
/**
|
|
91
182
|
* Authorize a data ingest (POST /v1/data/:scope). Optional — auth ports
|
|
@@ -121,11 +212,52 @@ export interface PersonalServerIngestSyncManager {
|
|
|
121
212
|
* Durable scope deletion (gateway tombstone -> storage blobs -> local).
|
|
122
213
|
* When absent the DELETE route deletes the local copy only and reports
|
|
123
214
|
* `durable: false`.
|
|
215
|
+
*
|
|
216
|
+
* `within` is the legacy-write seal's `commit`. The manager runs its delete
|
|
217
|
+
* inside it, AFTER it has taken its own mutation queue: the seal must be the
|
|
218
|
+
* innermost lock (a sync cycle holds the queue and asks for the seal, so
|
|
219
|
+
* asking for the seal first would wait on a cycle that waits on the seal).
|
|
220
|
+
* Pass it on every call that must refuse on a switched account.
|
|
124
221
|
*/
|
|
125
|
-
deleteScope?(scope: string): Promise<DeleteScopeResult>;
|
|
222
|
+
deleteScope?(scope: string, within?: LegacyWriteSeal["commit"]): Promise<DeleteScopeResult>;
|
|
223
|
+
}
|
|
224
|
+
/** The read side of stream sync, as the data API uses it. */
|
|
225
|
+
export interface StreamSyncReadPort {
|
|
226
|
+
resolve(input: ResolveInput): Promise<ReadDecision>;
|
|
227
|
+
/** Per-stream counts and open import problems, for owner diagnostics. */
|
|
228
|
+
status?(): StreamSyncReadStatus;
|
|
229
|
+
listScopes?: LocalListing["listScopes"];
|
|
230
|
+
olderVersions?: OlderVersions;
|
|
126
231
|
}
|
|
127
232
|
export interface PersonalServerDataApiDeps {
|
|
233
|
+
/**
|
|
234
|
+
* The account's storage mode: the one answer the write gate and the read
|
|
235
|
+
* selector share (see `account-storage-mode.ts`). Absent = unknown: every
|
|
236
|
+
* legacy write is refused with a retryable 503.
|
|
237
|
+
*/
|
|
238
|
+
accountStorageMode?: OwnedAccountStorageMode;
|
|
239
|
+
/**
|
|
240
|
+
* The account's storage mode, sampled once per data request. Switched
|
|
241
|
+
* accounts read stream data from the database. Absent preserves the legacy path.
|
|
242
|
+
*/
|
|
243
|
+
accountMode?: StorageModeRead;
|
|
244
|
+
additions?: DurableAdditionsService;
|
|
245
|
+
/** Database history, constructed by the host for this owner and network. */
|
|
246
|
+
history?: LocalHistory;
|
|
128
247
|
storage: DataStoragePort;
|
|
248
|
+
/**
|
|
249
|
+
* Latest bodies of connector scopes the owner collects into the canonical
|
|
250
|
+
* record store. Absent = every scope is read from `storage`, as before.
|
|
251
|
+
* Explicit versions (`fileId`, `at`) always read from `storage`.
|
|
252
|
+
*/
|
|
253
|
+
legacyScopeView?: LegacyScopeViewPort;
|
|
254
|
+
/**
|
|
255
|
+
* Stream-sync reads (`streamSync.read`). Absent = every read takes the
|
|
256
|
+
* existing path, unchanged. Present: a latest read of a name a stream view
|
|
257
|
+
* can serve is answered from the view (§2.10); a deleted connector's
|
|
258
|
+
* names are refused at every version.
|
|
259
|
+
*/
|
|
260
|
+
streamSyncRead?: StreamSyncReadPort;
|
|
129
261
|
auth: PersonalServerApiAuthPort;
|
|
130
262
|
accessLogWriter: AccessLogWriter;
|
|
131
263
|
syncManager?: PersonalServerIngestSyncManager | null;
|
|
@@ -187,6 +319,8 @@ export interface PersonalServerDataApiDeps {
|
|
|
187
319
|
* serve. When false (default), reads bypass payment entirely.
|
|
188
320
|
*/
|
|
189
321
|
paymentEnabled?: boolean;
|
|
322
|
+
/** Operator-selected Account authority. Never taken from a read request. */
|
|
323
|
+
ownAppAccountUrl?: string;
|
|
190
324
|
/**
|
|
191
325
|
* Test seam for the gateway forwarding fetch. Defaults to the global
|
|
192
326
|
* `fetch`; tests inject a mock that returns specific gateway statuses.
|
|
@@ -212,8 +346,8 @@ export interface PersonalServerDataApiDeps {
|
|
|
212
346
|
/**
|
|
213
347
|
* Called after a write is committed (owner or builder, JSON or binary).
|
|
214
348
|
* The derivative compute layer uses it to mark questions that read the
|
|
215
|
-
* scope stale
|
|
216
|
-
* swallowed, the write already succeeded.
|
|
349
|
+
* scope stale; the recompute itself waits for a reader (see onDataRead).
|
|
350
|
+
* Best-effort: a throwing hook is swallowed, the write already succeeded.
|
|
217
351
|
*/
|
|
218
352
|
onDataWritten?: (event: {
|
|
219
353
|
scope: string;
|
|
@@ -221,6 +355,44 @@ export interface PersonalServerDataApiDeps {
|
|
|
221
355
|
/** The stamped `$lineage.sources` of the written record, if any. */
|
|
222
356
|
lineageSources?: string[];
|
|
223
357
|
}) => void;
|
|
358
|
+
/**
|
|
359
|
+
* Open streamed writes behind `/v1/data/:scope/uploads` (see
|
|
360
|
+
* `scope-uploads.ts`). Absent = those routes answer 501 and owners write
|
|
361
|
+
* a scope as one JSON body.
|
|
362
|
+
*/
|
|
363
|
+
scopeUploads?: ScopeUploadRegistry;
|
|
364
|
+
/**
|
|
365
|
+
* Import a locally-ingested envelope into the PDPP record store, when the
|
|
366
|
+
* deployment mounted one.
|
|
367
|
+
*
|
|
368
|
+
* The same importer, the same envelope shape and the same best-effort
|
|
369
|
+
* contract as the download worker's (`sync/workers/download.ts`). It is
|
|
370
|
+
* here because a `$pdpp`-annotated envelope can reach this server two ways
|
|
371
|
+
* — pulled from the gateway by sync, or POSTed to `/v1/data/:scope` by a
|
|
372
|
+
* local owner-authenticated producer — and only the first offered it to the
|
|
373
|
+
* importer. A record that arrived by the second route was stored and
|
|
374
|
+
* indexed but never became readable over the PDPP resource surface, which
|
|
375
|
+
* made a local producer's write silently half-land.
|
|
376
|
+
*
|
|
377
|
+
* Runs AFTER the legacy write and index, never in place of them, and a
|
|
378
|
+
* failure is logged and swallowed: the record is already durable by the
|
|
379
|
+
* time this runs, so throwing would turn a committed write into a 500 and
|
|
380
|
+
* invite a duplicate on retry.
|
|
381
|
+
*/
|
|
382
|
+
pdppImporter?: PdppImporter;
|
|
383
|
+
/**
|
|
384
|
+
* Called on GET /v1/data/:scope once the read is authorized (a live grant
|
|
385
|
+
* covering the scope, or the owner) and the scope is not tombstoned, and
|
|
386
|
+
* before anything is served. The derivative compute layer uses it to run
|
|
387
|
+
* a question whose answer is stale just in time: a source refresh only
|
|
388
|
+
* marks the answer stale, and this is the demand that pays for the
|
|
389
|
+
* recompute. Called for every scope — the compute layer decides whether a
|
|
390
|
+
* question is behind it. Best-effort and non-blocking: a throwing hook is
|
|
391
|
+
* swallowed and the read is never delayed by inference.
|
|
392
|
+
*/
|
|
393
|
+
onDataRead?: (event: {
|
|
394
|
+
scope: string;
|
|
395
|
+
}) => void;
|
|
224
396
|
}
|
|
225
397
|
export interface PersonalServerAccessLogsApiDeps {
|
|
226
398
|
auth: Pick<PersonalServerApiAuthPort, "authorizeOwner">;
|
|
@@ -228,7 +400,7 @@ export interface PersonalServerAccessLogsApiDeps {
|
|
|
228
400
|
}
|
|
229
401
|
export interface PersonalServerSyncApiDeps {
|
|
230
402
|
auth: Pick<PersonalServerApiAuthPort, "authorizeOwner">;
|
|
231
|
-
syncManager: Pick<SyncManager, "trigger" | "getStatus"> | null;
|
|
403
|
+
syncManager: (Pick<SyncManager, "trigger" | "getStatus"> & Partial<Pick<SyncManager, "requestPull">>) | null;
|
|
232
404
|
logger?: PersonalServerApiLogger;
|
|
233
405
|
}
|
|
234
406
|
export interface PersonalServerGrantsApiDeps {
|
|
@@ -254,6 +426,75 @@ export interface PersonalServerOauthTokenApiDeps {
|
|
|
254
426
|
}
|
|
255
427
|
export interface PersonalServerApiDispatchOptions {
|
|
256
428
|
basePath?: string;
|
|
429
|
+
/**
|
|
430
|
+
* In-process only, never set from an HTTP request. A same-process caller
|
|
431
|
+
* that answers a read for itself (the MCP read client) states how the
|
|
432
|
+
* handler treats that read. Absent, the handler behaves as it does for HTTP.
|
|
433
|
+
*/
|
|
434
|
+
inProcess?: PersonalServerInProcessRead;
|
|
435
|
+
}
|
|
436
|
+
/** A read the handler served, in the terms a fulfilment report needs. */
|
|
437
|
+
export interface PersonalServerServedRead {
|
|
438
|
+
scope: string;
|
|
439
|
+
builder: string;
|
|
440
|
+
grantId: string;
|
|
441
|
+
fileId?: string;
|
|
442
|
+
logId: string;
|
|
443
|
+
ipAddress: string;
|
|
444
|
+
servedAt: string;
|
|
445
|
+
userAgent: string;
|
|
446
|
+
}
|
|
447
|
+
export interface PersonalServerInProcessRead {
|
|
448
|
+
/** Ask the auth port for a metadata read: grant policy applies, nothing is charged. */
|
|
449
|
+
metadataOnly?: boolean;
|
|
450
|
+
/** Write the grant-gated access-log line. Defaults to true. */
|
|
451
|
+
logAccess?: boolean;
|
|
452
|
+
/**
|
|
453
|
+
* Receives the served read in place of the HTTP fulfilment report. The
|
|
454
|
+
* caller decides whether the read completes a scope.
|
|
455
|
+
*/
|
|
456
|
+
onServed: (served: PersonalServerServedRead) => void;
|
|
457
|
+
/**
|
|
458
|
+
* Checks the body the handler is about to serve, before the read is charged
|
|
459
|
+
* or logged. Throwing refuses the read: nothing is charged, logged or served.
|
|
460
|
+
* `fromStreamView` says whether the body came from a stream view.
|
|
461
|
+
*/
|
|
462
|
+
validateBody?: (body: unknown, served: {
|
|
463
|
+
fromStreamView: boolean;
|
|
464
|
+
}) => Promise<void>;
|
|
465
|
+
/**
|
|
466
|
+
* Receives the legacy file a raw read selected, before the read is charged.
|
|
467
|
+
* The bytes served are that file's, so its identity is the one to report.
|
|
468
|
+
*/
|
|
469
|
+
onRawSelected?: (selected: {
|
|
470
|
+
fileId?: string;
|
|
471
|
+
collectedAt: string;
|
|
472
|
+
}) => void;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* What a 500 out of this layer must leave behind.
|
|
476
|
+
*
|
|
477
|
+
* These handlers run INSIDE the Hono app, so an error they catch never
|
|
478
|
+
* reaches the framework's `onError` — which is the one place that used to
|
|
479
|
+
* log. The result was that any unexpected fault on `/v1/data` answered a
|
|
480
|
+
* bare `INTERNAL_ERROR` and left nothing in stdout, nothing in the access
|
|
481
|
+
* log, and nothing for an operator to work from. Diagnosing one meant
|
|
482
|
+
* patching the server.
|
|
483
|
+
*
|
|
484
|
+
* Deliberately no request body, no headers, no query string and no
|
|
485
|
+
* authorization material: the route and method are the diagnostic value, and
|
|
486
|
+
* a grant id or signed header in a log file is a credential at rest. The
|
|
487
|
+
* request id is minted here when the caller did not supply one so the log
|
|
488
|
+
* line and the response can always be correlated.
|
|
489
|
+
*/
|
|
490
|
+
export interface ApiErrorLogContext {
|
|
491
|
+
logger?: PersonalServerApiLogger;
|
|
492
|
+
/** Stable route label, e.g. `GET /v1/data/:scope`. Never the raw path. */
|
|
493
|
+
route: string;
|
|
494
|
+
/** Correlates the log line with the response. Minted if absent. */
|
|
495
|
+
requestId?: string;
|
|
496
|
+
/** Non-secret route parameters worth having in the line (e.g. scope). */
|
|
497
|
+
detail?: Record<string, string | undefined>;
|
|
257
498
|
}
|
|
258
499
|
/**
|
|
259
500
|
* The grant the caller nominates for a read: `?grantId=` or the
|
|
@@ -269,6 +510,14 @@ export interface X402CycleInput {
|
|
|
269
510
|
scope: string;
|
|
270
511
|
fileIdParam?: string;
|
|
271
512
|
atParam?: string;
|
|
513
|
+
/**
|
|
514
|
+
* The registered data point version the served body comes from, when it
|
|
515
|
+
* is not the stored entry of `scope`: a stream view serves a stream head.
|
|
516
|
+
*/
|
|
517
|
+
servedEntry?: {
|
|
518
|
+
scope: string;
|
|
519
|
+
version: number;
|
|
520
|
+
};
|
|
272
521
|
grantId: string;
|
|
273
522
|
builder: `0x${string}`;
|
|
274
523
|
gateway: Pick<GatewayClient, "getGrant">;
|
|
@@ -317,7 +566,7 @@ export declare function handleX402Cycle(input: X402CycleInput): Promise<X402Cycl
|
|
|
317
566
|
* Gateway unreachability never fails the read: the tracker answers from its
|
|
318
567
|
* last known state, which is the documented offline behaviour.
|
|
319
568
|
*/
|
|
320
|
-
export declare function resolveReadDeletion(deps: Pick<PersonalServerDataApiDeps, "scopeDeletions" | "serverOwner">, scope: string, entry: ReadDeletionEntry | null | undefined): Promise<{
|
|
569
|
+
export declare function resolveReadDeletion(deps: Pick<PersonalServerDataApiDeps, "scopeDeletions" | "serverOwner">, scope: string, entry: ReadDeletionEntry | null | undefined, body?: "file" | "canonical", gatewayTimeoutMs?: number): Promise<{
|
|
321
570
|
scope: string;
|
|
322
571
|
dataPointId: string | null;
|
|
323
572
|
deletedAt: string;
|
|
@@ -327,10 +576,17 @@ export declare function resolveReadDeletion(deps: Pick<PersonalServerDataApiDeps
|
|
|
327
576
|
* served. Call it before any payment step: a builder must never be charged
|
|
328
577
|
* for a scope the owner deleted.
|
|
329
578
|
*/
|
|
330
|
-
export declare function assertScopeNotDeleted(deps: Pick<PersonalServerDataApiDeps, "scopeDeletions" | "serverOwner">, scope: string, entry: ReadDeletionEntry | null | undefined): Promise<void>;
|
|
579
|
+
export declare function assertScopeNotDeleted(deps: Pick<PersonalServerDataApiDeps, "scopeDeletions" | "serverOwner">, scope: string, entry: ReadDeletionEntry | null | undefined, body?: "file" | "canonical"): Promise<void>;
|
|
331
580
|
/** The index fields the deletion gate needs from the entry a read would serve. */
|
|
332
581
|
export type ReadDeletionEntry = Pick<IndexEntry, "version" | "dataPointId" | "afterTombstoneVersion">;
|
|
333
|
-
|
|
582
|
+
/** Everything the fulfillment reporters need; see the MCP tool wrapper. */
|
|
583
|
+
export type PersonalServerReadReporterDeps = Pick<PersonalServerDataApiDeps, "logger" | "readFulfillmentReporter">;
|
|
584
|
+
export declare function reportPersonalServerReadFulfillment(deps: PersonalServerReadReporterDeps, event: PersonalServerReadFulfillment): void;
|
|
585
|
+
/**
|
|
586
|
+
* Denials mirror fulfillments but skip the grant filter: a refused read has no
|
|
587
|
+
* grant to filter on, and the record is what proves the refusal happened.
|
|
588
|
+
*/
|
|
589
|
+
export declare function reportPersonalServerReadDenial(deps: PersonalServerReadReporterDeps, event: PersonalServerReadFulfillment): void;
|
|
334
590
|
/**
|
|
335
591
|
* True when a read auth result entitles the caller to the owner's view of a
|
|
336
592
|
* record — the same convention as resolveLineageGrantView: no result, or the
|
|
@@ -351,6 +607,57 @@ export declare function isOwnerView(authResult: PersonalServerReadAuthResult | v
|
|
|
351
607
|
* dataHash commitment, and the owner's view are unchanged.
|
|
352
608
|
*/
|
|
353
609
|
export declare function redactEnvelopeForGrantee(envelope: DataFileEnvelope): DataFileEnvelope;
|
|
610
|
+
export { redactJsonEnvelopeBytesForGrantee } from "./raw-envelope.js";
|
|
611
|
+
export { ACCOUNT_MODE_RETRY_AFTER_SECONDS, ACCOUNT_MODE_UNKNOWN_CODE, ACCOUNT_MODE_UNKNOWN_STATUS, accountModeUnknownResponse, accountStorageModeFor, selectAccountStorageMode, type AccountStorageMode, type AccountStorageModeValue, type OwnedAccountStorageMode, type StorageSelection, type StorageSelectionDeps, } from "./account-storage-mode.js";
|
|
612
|
+
export { USE_CONNECTOR_DELETE_CODE, USE_CONNECTOR_DELETE_MESSAGE, USE_CONNECTOR_DELETE_STATUS, switchedDeleteRefusalResponse, } from "./switched-delete-refusal.js";
|
|
613
|
+
export { STREAM_SYNC_CLIENT_HEADER, UPDATE_REQUIRED_CODE, UPDATE_REQUIRED_MESSAGE, UPDATE_REQUIRED_STATUS, LegacyWriteRefusedError, legacyWriteRefusedErrorFor, refuseLegacyWrite, updateRequiredResponse, type LegacyWriteMode, type LegacyWriteVerdict, } from "./legacy-write-gate.js";
|
|
614
|
+
export { handleOwnerConnectorDelete, ownerConnectorRefusal, type ConnectionDeletePort, type OwnerConnectorDeleteDeps, type StorageModeRead, } from "./owner-connector-delete.js";
|
|
615
|
+
/**
|
|
616
|
+
* In-process bulk transport, deliberately not dispatched by the HTTP router.
|
|
617
|
+
* The Request carries only a signed digest commitment, not the item envelope.
|
|
618
|
+
* It authenticates the same method, URI and owner as a remote append.
|
|
619
|
+
*/
|
|
620
|
+
export declare function handlePersonalServerScopeUploadAppend(request: Request, deps: PersonalServerDataApiDeps, batch: PreparedScopeUploadBatch): Promise<Response>;
|
|
621
|
+
/**
|
|
622
|
+
* Receives the grantee label of an authorized data read: the first 12 hex
|
|
623
|
+
* chars of sha256(lowercased builder address), "owner" for owner reads, or
|
|
624
|
+
* undefined. This is a pseudonym, not an anonymous id: builders are a small
|
|
625
|
+
* public set, so anyone holding their addresses can map it back.
|
|
626
|
+
*/
|
|
627
|
+
export type PersonalServerReadGranteeObserver = (granteeRef: Promise<string | undefined>) => void;
|
|
628
|
+
/**
|
|
629
|
+
* In-process only: asks the data read handler to report the grantee label
|
|
630
|
+
* for this exact Request object. Used by the PS-Lite relay for telemetry; the
|
|
631
|
+
* Node server never attaches one, so no requester can switch it on.
|
|
632
|
+
*/
|
|
633
|
+
export declare function attachPersonalServerReadGranteeObserver(request: Request, observer: PersonalServerReadGranteeObserver): void;
|
|
634
|
+
/**
|
|
635
|
+
* One owner-listed scope. A `ScopeSummary` satisfies it; a stream listing row
|
|
636
|
+
* is mapped to it. `dataStatus: "ready"` means bounded read can serve it.
|
|
637
|
+
*/
|
|
638
|
+
export interface OwnerScopeSummary {
|
|
639
|
+
scope: string;
|
|
640
|
+
latestCollectedAt?: string;
|
|
641
|
+
dataStatus?: "ready" | "indexing";
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* One page of every scope this server holds data for, under the filters the
|
|
645
|
+
* `GET /v1/data` listing applies (tombstones, canonical-only scopes, system
|
|
646
|
+
* scopes) but with no grant filter. In-process only: the caller must itself
|
|
647
|
+
* decide who may see the result (MCP exposes it only through `notShared`).
|
|
648
|
+
*
|
|
649
|
+
* It takes the same account-mode decision as that listing: a switched account
|
|
650
|
+
* lists from the stream port and never touches legacy storage; an unknown
|
|
651
|
+
* account, or a switched one with no stream listing, throws rather than
|
|
652
|
+
* answering with an empty page.
|
|
653
|
+
*/
|
|
654
|
+
export declare function listOwnerVisibleScopes(deps: PersonalServerDataApiDeps, page: {
|
|
655
|
+
limit: number;
|
|
656
|
+
offset: number;
|
|
657
|
+
}): Promise<{
|
|
658
|
+
scopes: OwnerScopeSummary[];
|
|
659
|
+
total: number;
|
|
660
|
+
}>;
|
|
354
661
|
export declare function handlePersonalServerDataRequest(request: Request, deps: PersonalServerDataApiDeps, options?: PersonalServerApiDispatchOptions): Promise<Response>;
|
|
355
662
|
export declare function handlePersonalServerAccessLogsRequest(request: Request, deps: PersonalServerAccessLogsApiDeps, options?: PersonalServerApiDispatchOptions): Promise<Response>;
|
|
356
663
|
export declare function handlePersonalServerSyncRequest(request: Request, deps: PersonalServerSyncApiDeps, options?: PersonalServerApiDispatchOptions): Promise<Response>;
|
|
@@ -358,4 +665,7 @@ export declare function handlePersonalServerGrantsRequest(request: Request, deps
|
|
|
358
665
|
export declare function handlePersonalServerConfigRequest(request: Request, deps: PersonalServerConfigApiDeps): Promise<Response>;
|
|
359
666
|
export declare function handlePersonalServerOauthTokenRequest(request: Request, deps: PersonalServerOauthTokenApiDeps): Promise<Response>;
|
|
360
667
|
export type { DataReadPolicyPorts };
|
|
668
|
+
export { handleOuraCollectionRequirementsRequest, readOuraCollectionRequirements, OURA_LEGACY_TAKEOVER_CONTRACT, } from "./oura-collection-requirements.js";
|
|
669
|
+
export { createScopeUploadRegistry, ScopeUploadError, SCOPE_UPLOAD_MAX_BATCH_BYTES, SCOPE_UPLOAD_IDLE_TIMEOUT_MS, type ScopeUploadRegistry, type ScopeUploadRegistryOptions, } from "./scope-uploads.js";
|
|
670
|
+
export { prepareScopeUploadBatches, type PreparedScopeUploadBatch, } from "./scope-upload-batches.js";
|
|
361
671
|
//# sourceMappingURL=index.d.ts.map
|