@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,360 @@
|
|
|
1
|
+
// Matches the bounded native/renderer source-record transport, not an external URL.
|
|
2
|
+
export const MAX_CLAUDE_SOURCE_BYTES = 32 * 1024 * 1024;
|
|
3
|
+
export class ClaudeSourceRecordError extends Error {
|
|
4
|
+
}
|
|
5
|
+
function reject(detail) {
|
|
6
|
+
throw new ClaudeSourceRecordError(detail);
|
|
7
|
+
}
|
|
8
|
+
function object(value) {
|
|
9
|
+
return value !== null && typeof value === "object" && !Array.isArray(value)
|
|
10
|
+
? value
|
|
11
|
+
: null;
|
|
12
|
+
}
|
|
13
|
+
function string(value) {
|
|
14
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
15
|
+
}
|
|
16
|
+
function identity(value) {
|
|
17
|
+
const uuid = string(value.uuid), id = string(value.id);
|
|
18
|
+
if (uuid && id && uuid !== id)
|
|
19
|
+
reject("ambiguous_source_identity");
|
|
20
|
+
return uuid ?? id ?? reject("missing_source_identity");
|
|
21
|
+
}
|
|
22
|
+
function safeText(value, limit) {
|
|
23
|
+
const text = string(value)?.slice(0, limit) ?? null;
|
|
24
|
+
if (text !== null &&
|
|
25
|
+
/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/u.test(text)) {
|
|
26
|
+
reject("unsafe_source_text");
|
|
27
|
+
}
|
|
28
|
+
return text;
|
|
29
|
+
}
|
|
30
|
+
function time(value) {
|
|
31
|
+
const text = string(value);
|
|
32
|
+
return text && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(text)
|
|
33
|
+
? text
|
|
34
|
+
: null;
|
|
35
|
+
}
|
|
36
|
+
function boolean(value) {
|
|
37
|
+
return typeof value === "boolean" ? value : null;
|
|
38
|
+
}
|
|
39
|
+
/** Shape validation runs before loading potentially large bytes into the snapshot. */
|
|
40
|
+
export function claudeBlobReference(data) {
|
|
41
|
+
const ref = object(data.blob_ref);
|
|
42
|
+
if (!ref ||
|
|
43
|
+
Object.keys(ref).sort().join(",") !==
|
|
44
|
+
"blob_id,mime_type,sha256,size_bytes" ||
|
|
45
|
+
typeof ref.blob_id !== "string" ||
|
|
46
|
+
!/^sha256:[0-9a-f]{64}$/.test(ref.blob_id) ||
|
|
47
|
+
ref.sha256 !== ref.blob_id.slice(7) ||
|
|
48
|
+
ref.sha256 === "0".repeat(64) ||
|
|
49
|
+
ref.mime_type !== "application/json" ||
|
|
50
|
+
!Number.isSafeInteger(ref.size_bytes) ||
|
|
51
|
+
ref.size_bytes < 1 ||
|
|
52
|
+
ref.size_bytes > MAX_CLAUDE_SOURCE_BYTES) {
|
|
53
|
+
reject("invalid_blob_reference");
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
blobId: ref.blob_id,
|
|
57
|
+
sha256: ref.sha256,
|
|
58
|
+
size: ref.size_bytes,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/** Only the reviewed source envelope and mapped Claude fields are accepted. No source I/O. */
|
|
62
|
+
export async function decodeClaudeSourceRecord(row, contents) {
|
|
63
|
+
if (row.stream !== "conversations" && row.stream !== "projects")
|
|
64
|
+
reject("unsupported_blob_stream");
|
|
65
|
+
const stream = row.stream;
|
|
66
|
+
const ref = claudeBlobReference(row.data);
|
|
67
|
+
const { meta, bytes } = contents;
|
|
68
|
+
if (!meta || !bytes)
|
|
69
|
+
reject("blob_missing_or_corrupt");
|
|
70
|
+
if (meta.blobId !== ref.blobId ||
|
|
71
|
+
meta.mimeType !== "application/json" ||
|
|
72
|
+
meta.sha256 !== ref.sha256 ||
|
|
73
|
+
meta.sizeBytes !== ref.size ||
|
|
74
|
+
bytes.byteLength !== ref.size)
|
|
75
|
+
reject("blob_metadata_mismatch");
|
|
76
|
+
const digest = new Uint8Array(await crypto.subtle.digest("SHA-256", bytes));
|
|
77
|
+
if ([...digest].map((byte) => byte.toString(16).padStart(2, "0")).join("") !==
|
|
78
|
+
ref.sha256)
|
|
79
|
+
reject("blob_digest_mismatch");
|
|
80
|
+
let envelope;
|
|
81
|
+
try {
|
|
82
|
+
envelope = object(JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes)));
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return reject("invalid_source_json");
|
|
86
|
+
}
|
|
87
|
+
if (!envelope ||
|
|
88
|
+
envelope.format !== "anthropic-source-record-v1" ||
|
|
89
|
+
envelope.stream !== stream ||
|
|
90
|
+
envelope.record_key !== row.recordKey ||
|
|
91
|
+
row.data.id !== row.recordKey)
|
|
92
|
+
reject("source_envelope_mismatch");
|
|
93
|
+
const payload = object(envelope.payload);
|
|
94
|
+
if (!payload || identity(payload) !== row.recordKey)
|
|
95
|
+
reject("source_identity_mismatch");
|
|
96
|
+
const childKey = stream === "conversations" ? "chat_messages" : "docs";
|
|
97
|
+
// Multipart project metadata can omit docs; the canonical document stream
|
|
98
|
+
// then supplies the detail. A missing conversation body is not an empty chat.
|
|
99
|
+
const separateDocuments = stream === "projects" && payload.docs === undefined;
|
|
100
|
+
// The source parser emits [] for omitted docs. A present nonempty/malformed
|
|
101
|
+
// declared summary cannot describe this metadata-only source record.
|
|
102
|
+
if (separateDocuments &&
|
|
103
|
+
Object.hasOwn(row.data, "raw_docs") &&
|
|
104
|
+
(!Array.isArray(row.data.raw_docs) || row.data.raw_docs.length !== 0))
|
|
105
|
+
reject("parent_blob_conflict");
|
|
106
|
+
if (!separateDocuments && !Array.isArray(payload[childKey]))
|
|
107
|
+
reject("source_children_unknown");
|
|
108
|
+
const rawChildren = separateDocuments ? [] : payload[childKey];
|
|
109
|
+
const children = [];
|
|
110
|
+
const childIds = new Set();
|
|
111
|
+
for (const raw of rawChildren) {
|
|
112
|
+
const child = object(raw);
|
|
113
|
+
if (!child)
|
|
114
|
+
reject("malformed_source_child");
|
|
115
|
+
const id = identity(child);
|
|
116
|
+
if (stream === "conversations" && !string(child.uuid))
|
|
117
|
+
reject("missing_source_identity");
|
|
118
|
+
if (childIds.has(id))
|
|
119
|
+
reject("duplicate_source_child");
|
|
120
|
+
childIds.add(id);
|
|
121
|
+
children.push({
|
|
122
|
+
stream: stream === "conversations" ? "messages" : "project_documents",
|
|
123
|
+
data: stream === "conversations"
|
|
124
|
+
? message(child, id, row.recordKey)
|
|
125
|
+
: document(child, id, row.recordKey),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
const parent = stream === "conversations"
|
|
129
|
+
? conversation(payload, row.recordKey, children.length)
|
|
130
|
+
: project(payload, row.recordKey, separateDocuments ? undefined : rawChildren);
|
|
131
|
+
// The inline summary must describe these same bytes, never a different parent revision.
|
|
132
|
+
for (const key of Object.keys(parent)) {
|
|
133
|
+
if (Object.hasOwn(row.data, key) && !sameJson(row.data[key], parent[key]))
|
|
134
|
+
reject("parent_blob_conflict");
|
|
135
|
+
}
|
|
136
|
+
return [{ stream, data: parent }, ...children];
|
|
137
|
+
}
|
|
138
|
+
function flattenMessage(raw) {
|
|
139
|
+
if (typeof raw.text === "string" && raw.text.length > 0)
|
|
140
|
+
return raw.text;
|
|
141
|
+
if (typeof raw.content === "string")
|
|
142
|
+
return raw.content;
|
|
143
|
+
if (Array.isArray(raw.content))
|
|
144
|
+
return raw.content
|
|
145
|
+
.map((part) => {
|
|
146
|
+
if (typeof part === "string")
|
|
147
|
+
return part;
|
|
148
|
+
const block = object(part);
|
|
149
|
+
return typeof block?.text === "string"
|
|
150
|
+
? block.text
|
|
151
|
+
: typeof block?.content === "string"
|
|
152
|
+
? block.content
|
|
153
|
+
: "";
|
|
154
|
+
})
|
|
155
|
+
.filter(Boolean)
|
|
156
|
+
.join("\n");
|
|
157
|
+
return typeof object(raw.content)?.text === "string"
|
|
158
|
+
? object(raw.content).text
|
|
159
|
+
: "";
|
|
160
|
+
}
|
|
161
|
+
function safeAttachmentJson(value, depth = 0) {
|
|
162
|
+
if (depth > 64)
|
|
163
|
+
reject("source_attachment_too_deep");
|
|
164
|
+
if (typeof value === "string") {
|
|
165
|
+
safeText(value, Number.MAX_SAFE_INTEGER);
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
if (typeof value === "number")
|
|
169
|
+
return Number.isFinite(value);
|
|
170
|
+
if (value === null || typeof value === "boolean")
|
|
171
|
+
return true;
|
|
172
|
+
if (Array.isArray(value))
|
|
173
|
+
return value.every((item) => safeAttachmentJson(item, depth + 1));
|
|
174
|
+
const record = object(value);
|
|
175
|
+
return (!!record &&
|
|
176
|
+
Object.entries(record).every(([key, item]) => {
|
|
177
|
+
safeText(key, Number.MAX_SAFE_INTEGER);
|
|
178
|
+
return safeAttachmentJson(item, depth + 1);
|
|
179
|
+
}));
|
|
180
|
+
}
|
|
181
|
+
function message(raw, id, conversationId) {
|
|
182
|
+
const attachments = raw.attachments === undefined || raw.attachments === null
|
|
183
|
+
? null
|
|
184
|
+
: raw.attachments;
|
|
185
|
+
if (attachments !== null &&
|
|
186
|
+
(!Array.isArray(attachments) ||
|
|
187
|
+
attachments.some((item) => !object(item) || !safeAttachmentJson(item))))
|
|
188
|
+
reject("invalid_source_attachments");
|
|
189
|
+
return {
|
|
190
|
+
id,
|
|
191
|
+
conversation_id: conversationId,
|
|
192
|
+
role: string(raw.sender),
|
|
193
|
+
parent_id: string(raw.parent_message_uuid),
|
|
194
|
+
content: safeText(flattenMessage(raw), 10_000_000),
|
|
195
|
+
model: null,
|
|
196
|
+
create_time: time(raw.created_at),
|
|
197
|
+
update_time: time(raw.updated_at),
|
|
198
|
+
attachments,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
function conversation(raw, id, count) {
|
|
202
|
+
return {
|
|
203
|
+
id,
|
|
204
|
+
title: safeText(string(raw.name) ?? string(raw.summary), 4000),
|
|
205
|
+
create_time: time(raw.created_at),
|
|
206
|
+
update_time: time(raw.updated_at),
|
|
207
|
+
project_id: string(raw.project_uuid),
|
|
208
|
+
model: null,
|
|
209
|
+
message_count: count,
|
|
210
|
+
is_starred: boolean(raw.is_starred),
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
function document(raw, id, projectId) {
|
|
214
|
+
return {
|
|
215
|
+
id,
|
|
216
|
+
project_id: projectId,
|
|
217
|
+
filename: safeText(string(raw.filename) ??
|
|
218
|
+
string(raw.file_name) ??
|
|
219
|
+
string(raw.name) ??
|
|
220
|
+
string(raw.title), 1024),
|
|
221
|
+
content: safeText(string(raw.content) ??
|
|
222
|
+
string(raw.text) ??
|
|
223
|
+
string(raw.body) ??
|
|
224
|
+
string(raw.filedata), 10_000_000),
|
|
225
|
+
create_time: time(raw.created_at),
|
|
226
|
+
update_time: time(raw.updated_at),
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
function project(raw, id, docs) {
|
|
230
|
+
const creator = object(raw.creator);
|
|
231
|
+
if (raw.creator !== undefined && raw.creator !== null && !creator)
|
|
232
|
+
reject("invalid_source_creator");
|
|
233
|
+
const name = safeText(string(raw.name) ?? "Untitled project", 2000);
|
|
234
|
+
return {
|
|
235
|
+
id,
|
|
236
|
+
name,
|
|
237
|
+
description: safeText(raw.description, 65_000),
|
|
238
|
+
create_time: time(raw.created_at),
|
|
239
|
+
update_time: time(raw.updated_at),
|
|
240
|
+
is_archived: raw.archived_at != null,
|
|
241
|
+
prompt_template: safeText(raw.prompt_template, 65_000),
|
|
242
|
+
creator: creator
|
|
243
|
+
? Object.fromEntries([
|
|
244
|
+
["uuid", string(creator.uuid)],
|
|
245
|
+
["full_name", safeText(creator.full_name, 2000)],
|
|
246
|
+
].filter(([, value]) => value !== null))
|
|
247
|
+
: null,
|
|
248
|
+
is_private: boolean(raw.is_private),
|
|
249
|
+
is_starter_project: boolean(raw.is_starter_project),
|
|
250
|
+
archived_at: safeText(raw.archived_at, 128),
|
|
251
|
+
...(docs === undefined
|
|
252
|
+
? {}
|
|
253
|
+
: {
|
|
254
|
+
raw_docs: docs.map((rawDoc) => {
|
|
255
|
+
const doc = object(rawDoc);
|
|
256
|
+
return Object.fromEntries([
|
|
257
|
+
["uuid", safeText(doc.uuid, 128)],
|
|
258
|
+
["filename", safeText(doc.filename, 1024)],
|
|
259
|
+
["content", safeText(doc.content, 10_000_000)],
|
|
260
|
+
["created_at", safeText(doc.created_at, 128)],
|
|
261
|
+
["updated_at", safeText(doc.updated_at, 128)],
|
|
262
|
+
].filter(([, value]) => value !== null));
|
|
263
|
+
}),
|
|
264
|
+
}),
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
/** JSON object field order is irrelevant; array order is part of the source value. */
|
|
268
|
+
function sameJson(left, right) {
|
|
269
|
+
if (left === right)
|
|
270
|
+
return true;
|
|
271
|
+
if (Array.isArray(left) && Array.isArray(right))
|
|
272
|
+
return (left.length === right.length &&
|
|
273
|
+
left.every((value, index) => sameJson(value, right[index])));
|
|
274
|
+
const a = object(left), b = object(right);
|
|
275
|
+
return (!!a &&
|
|
276
|
+
!!b &&
|
|
277
|
+
Object.keys(a).length === Object.keys(b).length &&
|
|
278
|
+
Object.keys(a).every((key) => Object.hasOwn(b, key) && sameJson(a[key], b[key])));
|
|
279
|
+
}
|
|
280
|
+
/** Deduplicate matching inline detail, but never conceal a conflicting body or relationship. */
|
|
281
|
+
export function mergeClaudeSourceRecords(records, expanded) {
|
|
282
|
+
const merged = new Map();
|
|
283
|
+
const blobParents = new Set(expanded
|
|
284
|
+
.filter((record) => record.stream === "projects" || record.stream === "conversations")
|
|
285
|
+
.map((record) => String(record.data.id)));
|
|
286
|
+
for (const record of records) {
|
|
287
|
+
if (record.stream === "project_documents" &&
|
|
288
|
+
blobParents.has(String(record.data.project_id))) {
|
|
289
|
+
const data = record.data;
|
|
290
|
+
if (!string(data.id) ||
|
|
291
|
+
["filename", "content", "create_time", "update_time"].some((field) => !Object.hasOwn(data, field) ||
|
|
292
|
+
!(typeof data[field] === "string" || data[field] === null)))
|
|
293
|
+
reject("invalid_inline_document");
|
|
294
|
+
safeText(data.filename, 1024);
|
|
295
|
+
safeText(data.content, 10_000_000);
|
|
296
|
+
}
|
|
297
|
+
const key = `${record.stream}\u0000${String(record.data.id)}`;
|
|
298
|
+
if (merged.has(key))
|
|
299
|
+
reject("duplicate_inline_identity");
|
|
300
|
+
merged.set(key, record);
|
|
301
|
+
}
|
|
302
|
+
const sourceIdentities = new Set();
|
|
303
|
+
for (const record of expanded) {
|
|
304
|
+
const key = `${record.stream}\u0000${String(record.data.id)}`;
|
|
305
|
+
if (sourceIdentities.has(key))
|
|
306
|
+
reject("duplicate_source_identity");
|
|
307
|
+
sourceIdentities.add(key);
|
|
308
|
+
const existing = merged.get(key);
|
|
309
|
+
if ((record.stream === "messages" || record.stream === "project_documents") &&
|
|
310
|
+
!existing)
|
|
311
|
+
reject("source_child_missing_inline");
|
|
312
|
+
if (existing) {
|
|
313
|
+
const required = record.stream === "messages"
|
|
314
|
+
? [
|
|
315
|
+
"id",
|
|
316
|
+
"conversation_id",
|
|
317
|
+
"role",
|
|
318
|
+
"parent_id",
|
|
319
|
+
"content",
|
|
320
|
+
"create_time",
|
|
321
|
+
"update_time",
|
|
322
|
+
"attachments",
|
|
323
|
+
]
|
|
324
|
+
: record.stream === "project_documents"
|
|
325
|
+
? [
|
|
326
|
+
"id",
|
|
327
|
+
"project_id",
|
|
328
|
+
"filename",
|
|
329
|
+
"content",
|
|
330
|
+
"create_time",
|
|
331
|
+
"update_time",
|
|
332
|
+
]
|
|
333
|
+
: [];
|
|
334
|
+
if (required.some((field) => !Object.hasOwn(existing.data, field)))
|
|
335
|
+
reject("inline_child_fields_missing");
|
|
336
|
+
for (const field of Object.keys(record.data)) {
|
|
337
|
+
if (Object.hasOwn(existing.data, field) &&
|
|
338
|
+
!sameJson(existing.data[field], record.data[field]))
|
|
339
|
+
reject("inline_blob_conflict");
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
merged.set(key, record);
|
|
343
|
+
}
|
|
344
|
+
// Inline children of a blob parent must occur in its explicit source list.
|
|
345
|
+
const parentIds = new Set(expanded
|
|
346
|
+
.filter((record) => (record.stream === "projects" &&
|
|
347
|
+
Object.hasOwn(record.data, "raw_docs")) ||
|
|
348
|
+
record.stream === "conversations")
|
|
349
|
+
.map((record) => String(record.data.id)));
|
|
350
|
+
for (const record of records) {
|
|
351
|
+
if (((record.stream === "messages" &&
|
|
352
|
+
parentIds.has(String(record.data.conversation_id))) ||
|
|
353
|
+
(record.stream === "project_documents" &&
|
|
354
|
+
parentIds.has(String(record.data.project_id)))) &&
|
|
355
|
+
!sourceIdentities.has(`${record.stream}\u0000${String(record.data.id)}`))
|
|
356
|
+
reject("inline_child_absent_from_blob");
|
|
357
|
+
}
|
|
358
|
+
return [...merged.values()];
|
|
359
|
+
}
|
|
360
|
+
//# sourceMappingURL=claude-source-record.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-source-record.js","sourceRoot":"","sources":["../../src/legacy-projection/claude-source-record.ts"],"names":[],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,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACnD,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;YAExE,MAAM,CAAC,+BAA+B,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { PdppRecord, ProjectionDiagnostic, ProjectionError } from "./types.js";
|
|
2
|
+
import type { PdppBlobMeta } from "../storage/pdpp-records/types.js";
|
|
3
|
+
export type StreamSchemas = Readonly<Record<string, Record<string, unknown>>>;
|
|
4
|
+
type ObjectValue = Record<string, unknown>;
|
|
5
|
+
export declare class DeclaredTextError extends Error {
|
|
6
|
+
readonly kind: "invalid_encoded_text" | "message_content_omitted" | "unresolved_blob";
|
|
7
|
+
readonly stream: string;
|
|
8
|
+
readonly field: string;
|
|
9
|
+
constructor(kind: "invalid_encoded_text" | "message_content_omitted" | "unresolved_blob", stream: string, field: string);
|
|
10
|
+
projectionError(scope: string): ProjectionError;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* data-connectors ChatGPT 0.2.53 codec, supplied with the implementation
|
|
14
|
+
* assignment. This is one replacement pass, never recursive unescaping.
|
|
15
|
+
* Ordinary and unmatched backslash-u text is valid source text.
|
|
16
|
+
*/
|
|
17
|
+
export declare function decodePdppSafeText(text: string): string;
|
|
18
|
+
export declare function declaredBlobField(schema: ObjectValue | undefined): string | undefined;
|
|
19
|
+
/** Copies only changed rows. Blob-derived source text must never enter this decoder. */
|
|
20
|
+
export declare function decodeDeclaredRecords(records: PdppRecord[], schemas?: StreamSchemas, allowUnresolvedBlobs?: boolean): PdppRecord[];
|
|
21
|
+
/**
|
|
22
|
+
* A bad encoded row follows the projector's drop-and-count policy. Missing
|
|
23
|
+
* blob resolution is still a caller error. Each rejected row counts once,
|
|
24
|
+
* under the first failing field, without exposing its contents.
|
|
25
|
+
*/
|
|
26
|
+
export declare function decodeDeclaredRecordsForProjection(records: PdppRecord[], schemas: StreamSchemas | undefined, scope: string, allowUnresolvedBlobs?: boolean): {
|
|
27
|
+
records: PdppRecord[];
|
|
28
|
+
diagnostics: ProjectionDiagnostic[];
|
|
29
|
+
};
|
|
30
|
+
export declare function declaredBlobReference(data: ObjectValue, field: string): {
|
|
31
|
+
blobId: string;
|
|
32
|
+
sha256: string;
|
|
33
|
+
size: number;
|
|
34
|
+
};
|
|
35
|
+
/** UTF-8 JSON string bytes contain exact source text, with no PDPP escaping. */
|
|
36
|
+
export declare function decodeDeclaredBlob(data: ObjectValue, field: string, contents: {
|
|
37
|
+
meta: PdppBlobMeta | undefined;
|
|
38
|
+
bytes: Uint8Array<ArrayBuffer> | undefined;
|
|
39
|
+
}): Promise<ObjectValue>;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=declared-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declared-text.d.ts","sourceRoot":"","sources":["../../src/legacy-projection/declared-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;AAC9E,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAM3C,qBAAa,iBAAkB,SAAQ,KAAK;IAExC,QAAQ,CAAC,IAAI,EACX,sBAAsB,GAAG,yBAAyB,GAAG,iBAAiB;IACxE,QAAQ,CAAC,MAAM,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object = (value) => value !== null && typeof value === "object" && !Array.isArray(value)
|
|
2
|
+
? value
|
|
3
|
+
: undefined;
|
|
4
|
+
export class DeclaredTextError extends Error {
|
|
5
|
+
kind;
|
|
6
|
+
stream;
|
|
7
|
+
field;
|
|
8
|
+
constructor(kind, stream, field) {
|
|
9
|
+
super(kind);
|
|
10
|
+
this.kind = kind;
|
|
11
|
+
this.stream = stream;
|
|
12
|
+
this.field = field;
|
|
13
|
+
}
|
|
14
|
+
projectionError(scope) {
|
|
15
|
+
return { kind: this.kind, scope, stream: this.stream, field: this.field };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* data-connectors ChatGPT 0.2.53 codec, supplied with the implementation
|
|
20
|
+
* assignment. This is one replacement pass, never recursive unescaping.
|
|
21
|
+
* Ordinary and unmatched backslash-u text is valid source text.
|
|
22
|
+
*/
|
|
23
|
+
export function decodePdppSafeText(text) {
|
|
24
|
+
if (/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/u.test(text)) {
|
|
25
|
+
throw new Error("raw_forbidden_code_unit");
|
|
26
|
+
}
|
|
27
|
+
return text.replace(/\\u([0-9a-fA-F]{4})/g, (escape, hex) => {
|
|
28
|
+
const unit = Number.parseInt(hex, 16);
|
|
29
|
+
return unit === 0x5c ||
|
|
30
|
+
unit <= 8 ||
|
|
31
|
+
unit === 11 ||
|
|
32
|
+
unit === 12 ||
|
|
33
|
+
(unit >= 14 && unit <= 31) ||
|
|
34
|
+
(unit >= 127 && unit <= 159) ||
|
|
35
|
+
(unit >= 0xd800 && unit <= 0xdfff)
|
|
36
|
+
? String.fromCharCode(unit)
|
|
37
|
+
: escape;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export function declaredBlobField(schema) {
|
|
41
|
+
const properties = object(schema?.properties);
|
|
42
|
+
const ref = object(properties?.blob_ref);
|
|
43
|
+
const field = ref?.x_pdpp_blob_projects_field;
|
|
44
|
+
return ref?.x_pdpp_blob_codec === "json-string-v1" &&
|
|
45
|
+
typeof field === "string" &&
|
|
46
|
+
field.length > 0 &&
|
|
47
|
+
field !== "blob_ref" &&
|
|
48
|
+
properties &&
|
|
49
|
+
Object.hasOwn(properties, field)
|
|
50
|
+
? field
|
|
51
|
+
: undefined;
|
|
52
|
+
}
|
|
53
|
+
/** Decode content strings and keys once, copying only changed containers. */
|
|
54
|
+
function decodeDeclaredValue(value) {
|
|
55
|
+
if (typeof value === "string")
|
|
56
|
+
return decodePdppSafeText(value);
|
|
57
|
+
if (Array.isArray(value)) {
|
|
58
|
+
const decoded = value.map(decodeDeclaredValue);
|
|
59
|
+
return decoded.some((item, index) => item !== value[index])
|
|
60
|
+
? decoded
|
|
61
|
+
: value;
|
|
62
|
+
}
|
|
63
|
+
const row = object(value);
|
|
64
|
+
if (!row)
|
|
65
|
+
return value;
|
|
66
|
+
const keys = new Set();
|
|
67
|
+
let changed = false;
|
|
68
|
+
const entries = Object.entries(row).map(([key, item]) => {
|
|
69
|
+
const decodedKey = decodePdppSafeText(key);
|
|
70
|
+
if (keys.has(decodedKey))
|
|
71
|
+
throw new Error("decoded_key_collision");
|
|
72
|
+
keys.add(decodedKey);
|
|
73
|
+
const decoded = decodeDeclaredValue(item);
|
|
74
|
+
changed ||= decodedKey !== key || decoded !== item;
|
|
75
|
+
return [decodedKey, decoded];
|
|
76
|
+
});
|
|
77
|
+
// CreateDataProperty preserves __proto__/constructor as ordinary own keys.
|
|
78
|
+
return changed ? Object.fromEntries(entries) : value;
|
|
79
|
+
}
|
|
80
|
+
/** Copies only changed rows. Blob-derived source text must never enter this decoder. */
|
|
81
|
+
export function decodeDeclaredRecords(records, schemas = {}, allowUnresolvedBlobs = false) {
|
|
82
|
+
return records.map((record) => decodeDeclaredRecord(record, schemas, allowUnresolvedBlobs));
|
|
83
|
+
}
|
|
84
|
+
function decodeDeclaredRecord(record, schemas, allowUnresolvedBlobs) {
|
|
85
|
+
const schema = schemas[record.stream];
|
|
86
|
+
const properties = object(schema?.properties);
|
|
87
|
+
if (!properties || !object(record.data))
|
|
88
|
+
return record;
|
|
89
|
+
let data = record.data;
|
|
90
|
+
const blobField = declaredBlobField(schema);
|
|
91
|
+
if (blobField && Object.hasOwn(data, "blob_ref") && !allowUnresolvedBlobs) {
|
|
92
|
+
throw new DeclaredTextError("unresolved_blob", record.stream, blobField);
|
|
93
|
+
}
|
|
94
|
+
if (blobField &&
|
|
95
|
+
Array.isArray(schema?.required) &&
|
|
96
|
+
schema.required.includes(blobField) &&
|
|
97
|
+
!Object.hasOwn(data, blobField) &&
|
|
98
|
+
!Object.hasOwn(data, "blob_ref")) {
|
|
99
|
+
throw new DeclaredTextError("message_content_omitted", record.stream, blobField);
|
|
100
|
+
}
|
|
101
|
+
for (const [field, declaration] of Object.entries(properties)) {
|
|
102
|
+
if (object(declaration)?.x_pdpp_text_encoding !== "pdpp-safe-escape-v1" ||
|
|
103
|
+
!Object.hasOwn(data, field) ||
|
|
104
|
+
data[field] === null)
|
|
105
|
+
continue;
|
|
106
|
+
let decoded;
|
|
107
|
+
try {
|
|
108
|
+
decoded = decodeDeclaredValue(data[field]);
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
throw new DeclaredTextError("invalid_encoded_text", record.stream, field);
|
|
112
|
+
}
|
|
113
|
+
if (decoded !== data[field])
|
|
114
|
+
data = { ...data, [field]: decoded };
|
|
115
|
+
}
|
|
116
|
+
return data === record.data ? record : { ...record, data };
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A bad encoded row follows the projector's drop-and-count policy. Missing
|
|
120
|
+
* blob resolution is still a caller error. Each rejected row counts once,
|
|
121
|
+
* under the first failing field, without exposing its contents.
|
|
122
|
+
*/
|
|
123
|
+
export function decodeDeclaredRecordsForProjection(records, schemas, scope, allowUnresolvedBlobs = false) {
|
|
124
|
+
const decoded = [];
|
|
125
|
+
const dropped = new Map();
|
|
126
|
+
for (const record of records) {
|
|
127
|
+
try {
|
|
128
|
+
decoded.push(decodeDeclaredRecord(record, schemas ?? {}, allowUnresolvedBlobs));
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
if (!(error instanceof DeclaredTextError) ||
|
|
132
|
+
error.kind === "unresolved_blob")
|
|
133
|
+
throw error;
|
|
134
|
+
const reason = `${error.kind}: ${error.field}`;
|
|
135
|
+
const key = JSON.stringify([error.stream, reason]);
|
|
136
|
+
const diagnostic = dropped.get(key);
|
|
137
|
+
if (diagnostic)
|
|
138
|
+
diagnostic.count += 1;
|
|
139
|
+
else
|
|
140
|
+
dropped.set(key, {
|
|
141
|
+
kind: "records_dropped",
|
|
142
|
+
scope,
|
|
143
|
+
stream: error.stream,
|
|
144
|
+
count: 1,
|
|
145
|
+
reasons: [reason],
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return { records: decoded, diagnostics: [...dropped.values()] };
|
|
150
|
+
}
|
|
151
|
+
export function declaredBlobReference(data, field) {
|
|
152
|
+
const ref = object(data.blob_ref);
|
|
153
|
+
if ((Object.hasOwn(data, field) && data[field] !== null) ||
|
|
154
|
+
!ref ||
|
|
155
|
+
typeof ref.blob_id !== "string" ||
|
|
156
|
+
!/^sha256:[0-9a-f]{64}$/.test(ref.blob_id) ||
|
|
157
|
+
ref.sha256 !== ref.blob_id.slice(7) ||
|
|
158
|
+
ref.mime_type !== "application/json" ||
|
|
159
|
+
!Number.isSafeInteger(ref.size_bytes) ||
|
|
160
|
+
ref.size_bytes < 2) {
|
|
161
|
+
throw new Error("invalid_blob_reference");
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
blobId: ref.blob_id,
|
|
165
|
+
sha256: ref.sha256,
|
|
166
|
+
size: ref.size_bytes,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
/** UTF-8 JSON string bytes contain exact source text, with no PDPP escaping. */
|
|
170
|
+
export async function decodeDeclaredBlob(data, field, contents) {
|
|
171
|
+
const ref = declaredBlobReference(data, field);
|
|
172
|
+
const { meta, bytes } = contents;
|
|
173
|
+
if (!meta || !bytes)
|
|
174
|
+
throw new Error("blob_missing_or_corrupt");
|
|
175
|
+
if (meta.blobId !== ref.blobId ||
|
|
176
|
+
meta.sha256 !== ref.sha256 ||
|
|
177
|
+
meta.mimeType !== "application/json" ||
|
|
178
|
+
meta.sizeBytes !== ref.size ||
|
|
179
|
+
bytes.length !== ref.size) {
|
|
180
|
+
throw new Error("blob_metadata_mismatch");
|
|
181
|
+
}
|
|
182
|
+
const digest = new Uint8Array(await crypto.subtle.digest("SHA-256", bytes));
|
|
183
|
+
if ([...digest].map((b) => b.toString(16).padStart(2, "0")).join("") !==
|
|
184
|
+
ref.sha256) {
|
|
185
|
+
throw new Error("blob_digest_mismatch");
|
|
186
|
+
}
|
|
187
|
+
let value;
|
|
188
|
+
try {
|
|
189
|
+
value = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
throw new Error("invalid_blob_json_string");
|
|
193
|
+
}
|
|
194
|
+
if (typeof value !== "string")
|
|
195
|
+
throw new Error("invalid_blob_json_string");
|
|
196
|
+
const { blob_ref: _ref, ...rest } = data;
|
|
197
|
+
return { ...rest, [field]: value };
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=declared-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declared-text.js","sourceRoot":"","sources":["../../src/legacy-projection/declared-text.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,GAAG,CAAC,KAAc,EAA2B,EAAE,CACzD,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;IAClE,CAAC,CAAE,KAAqB;IACxB,CAAC,CAAC,SAAS,CAAC;AAEhB,MAAM,OAAO,iBA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