@superbee/core 0.2.0-pre.4 → 0.2.0-pre.40
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/README.md +1209 -0
- package/dist/artifact-contract.d.ts +90 -0
- package/dist/artifact-contract.d.ts.map +1 -0
- package/dist/artifact-contract.js +205 -0
- package/dist/artifact-contract.js.map +1 -0
- package/dist/backend.d.ts +22 -2
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js +153 -38
- package/dist/backend.js.map +1 -1
- package/dist/blob-contract.d.ts +82 -0
- package/dist/blob-contract.d.ts.map +1 -0
- package/dist/blob-contract.js +134 -0
- package/dist/blob-contract.js.map +1 -0
- package/dist/blob-journal.d.ts +303 -0
- package/dist/blob-journal.d.ts.map +1 -0
- package/dist/blob-journal.js +541 -0
- package/dist/blob-journal.js.map +1 -0
- package/dist/body-replace-guards.d.ts +52 -0
- package/dist/body-replace-guards.d.ts.map +1 -0
- package/dist/body-replace-guards.js +176 -0
- package/dist/body-replace-guards.js.map +1 -0
- package/dist/builtin-recipes/content.d.ts +93 -0
- package/dist/builtin-recipes/content.d.ts.map +1 -0
- package/dist/builtin-recipes/content.js +288 -0
- package/dist/builtin-recipes/content.js.map +1 -0
- package/dist/builtin-recipes.d.ts +10 -0
- package/dist/builtin-recipes.d.ts.map +1 -0
- package/dist/builtin-recipes.js +97 -0
- package/dist/builtin-recipes.js.map +1 -0
- package/dist/bundle-health/index.d.ts +14 -0
- package/dist/bundle-health/index.d.ts.map +1 -0
- package/dist/bundle-health/index.js +12 -0
- package/dist/bundle-health/index.js.map +1 -0
- package/dist/bundle-health/kind-findings.d.ts +44 -0
- package/dist/bundle-health/kind-findings.d.ts.map +1 -0
- package/dist/bundle-health/kind-findings.js +68 -0
- package/dist/bundle-health/kind-findings.js.map +1 -0
- package/dist/bundle-health/legacy-page.d.ts +39 -0
- package/dist/bundle-health/legacy-page.d.ts.map +1 -0
- package/dist/bundle-health/legacy-page.js +50 -0
- package/dist/bundle-health/legacy-page.js.map +1 -0
- package/dist/bundle-health/report.d.ts +207 -0
- package/dist/bundle-health/report.d.ts.map +1 -0
- package/dist/bundle-health/report.js +454 -0
- package/dist/bundle-health/report.js.map +1 -0
- package/dist/bundle-ops.d.ts +3 -2
- package/dist/bundle-ops.d.ts.map +1 -1
- package/dist/bundle-ops.js +4 -4
- package/dist/bundle-ops.js.map +1 -1
- package/dist/bundle.d.ts +3 -4
- package/dist/bundle.d.ts.map +1 -1
- package/dist/bundle.js +5 -14
- package/dist/bundle.js.map +1 -1
- package/dist/code-point-order.d.ts +8 -0
- package/dist/code-point-order.d.ts.map +1 -0
- package/dist/code-point-order.js +20 -0
- package/dist/code-point-order.js.map +1 -0
- package/dist/code-unit-order.d.ts +15 -0
- package/dist/code-unit-order.d.ts.map +1 -0
- package/dist/code-unit-order.js +17 -0
- package/dist/code-unit-order.js.map +1 -0
- package/dist/connector-request.d.ts +112 -0
- package/dist/connector-request.d.ts.map +1 -0
- package/dist/connector-request.js +495 -0
- package/dist/connector-request.js.map +1 -0
- package/dist/connectors.d.ts +297 -0
- package/dist/connectors.d.ts.map +1 -0
- package/dist/connectors.js +1233 -0
- package/dist/connectors.js.map +1 -0
- package/dist/cross-bundle.d.ts +135 -0
- package/dist/cross-bundle.d.ts.map +1 -0
- package/dist/cross-bundle.js +191 -0
- package/dist/cross-bundle.js.map +1 -0
- package/dist/dependencies.d.ts +94 -0
- package/dist/dependencies.d.ts.map +1 -0
- package/dist/dependencies.js +180 -0
- package/dist/dependencies.js.map +1 -0
- package/dist/document-codec.d.ts +7 -2
- package/dist/document-codec.d.ts.map +1 -1
- package/dist/document-codec.js +8 -5
- package/dist/document-codec.js.map +1 -1
- package/dist/document-field-actions.d.ts +31 -1
- package/dist/document-field-actions.d.ts.map +1 -1
- package/dist/document-field-actions.js +137 -34
- package/dist/document-field-actions.js.map +1 -1
- package/dist/document-mutation.d.ts +35 -13
- package/dist/document-mutation.d.ts.map +1 -1
- package/dist/document-mutation.js +124 -60
- package/dist/document-mutation.js.map +1 -1
- package/dist/document-transfer.d.ts +208 -0
- package/dist/document-transfer.d.ts.map +1 -0
- package/dist/document-transfer.js +928 -0
- package/dist/document-transfer.js.map +1 -0
- package/dist/document-write-policy.d.ts.map +1 -1
- package/dist/document-write-policy.js +4 -2
- package/dist/document-write-policy.js.map +1 -1
- package/dist/domain-model.d.ts +73 -0
- package/dist/domain-model.d.ts.map +1 -0
- package/dist/domain-model.js +169 -0
- package/dist/domain-model.js.map +1 -0
- package/dist/engine.d.ts +21 -9
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +72 -14
- package/dist/engine.js.map +1 -1
- package/dist/file-journaled-backend-internal.d.ts +21 -0
- package/dist/file-journaled-backend-internal.d.ts.map +1 -0
- package/dist/file-journaled-backend-internal.js +12 -0
- package/dist/file-journaled-backend-internal.js.map +1 -0
- package/dist/file-journaled-backend.d.ts +160 -0
- package/dist/file-journaled-backend.d.ts.map +1 -0
- package/dist/file-journaled-backend.js +1345 -0
- package/dist/file-journaled-backend.js.map +1 -0
- package/dist/filesystem-host.d.ts +15 -0
- package/dist/filesystem-host.d.ts.map +1 -0
- package/dist/filesystem-host.js +20 -0
- package/dist/filesystem-host.js.map +1 -0
- package/dist/filesystem-identity.d.ts +97 -21
- package/dist/filesystem-identity.d.ts.map +1 -1
- package/dist/filesystem-identity.js +398 -119
- package/dist/filesystem-identity.js.map +1 -1
- package/dist/filesystem-lock.d.ts +16 -3
- package/dist/filesystem-lock.d.ts.map +1 -1
- package/dist/filesystem-lock.js +323 -77
- package/dist/filesystem-lock.js.map +1 -1
- package/dist/filesystem-push-role.d.ts +77 -0
- package/dist/filesystem-push-role.d.ts.map +1 -0
- package/dist/filesystem-push-role.js +165 -0
- package/dist/filesystem-push-role.js.map +1 -0
- package/dist/filesystem.d.ts +17 -0
- package/dist/filesystem.d.ts.map +1 -0
- package/dist/filesystem.js +18 -0
- package/dist/filesystem.js.map +1 -0
- package/dist/frontmatter.d.ts +8 -6
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +5 -4
- package/dist/frontmatter.js.map +1 -1
- package/dist/governed-body-write.d.ts +8 -1
- package/dist/governed-body-write.d.ts.map +1 -1
- package/dist/governed-body-write.js +9 -2
- package/dist/governed-body-write.js.map +1 -1
- package/dist/heads-digest.d.ts.map +1 -1
- package/dist/heads-digest.js +2 -1
- package/dist/heads-digest.js.map +1 -1
- package/dist/host-policy-snapshot.d.ts +9 -0
- package/dist/host-policy-snapshot.d.ts.map +1 -0
- package/dist/host-policy-snapshot.js +33 -0
- package/dist/host-policy-snapshot.js.map +1 -0
- package/dist/host-text.d.ts +31 -0
- package/dist/host-text.d.ts.map +1 -0
- package/dist/host-text.js +77 -0
- package/dist/host-text.js.map +1 -0
- package/dist/hosted-client/binding.d.ts +7 -0
- package/dist/hosted-client/binding.d.ts.map +1 -0
- package/dist/hosted-client/binding.js +10 -0
- package/dist/hosted-client/binding.js.map +1 -0
- package/dist/hosted-client/blob-delivery.d.ts +68 -0
- package/dist/hosted-client/blob-delivery.d.ts.map +1 -0
- package/dist/hosted-client/blob-delivery.js +170 -0
- package/dist/hosted-client/blob-delivery.js.map +1 -0
- package/dist/hosted-client/blob-write.d.ts +387 -0
- package/dist/hosted-client/blob-write.d.ts.map +1 -0
- package/dist/hosted-client/blob-write.js +770 -0
- package/dist/hosted-client/blob-write.js.map +1 -0
- package/dist/hosted-client/bundle-listing.d.ts +46 -0
- package/dist/hosted-client/bundle-listing.d.ts.map +1 -0
- package/dist/hosted-client/bundle-listing.js +36 -0
- package/dist/hosted-client/bundle-listing.js.map +1 -0
- package/dist/hosted-client/client.d.ts +219 -0
- package/dist/hosted-client/client.d.ts.map +1 -0
- package/dist/hosted-client/client.js +309 -0
- package/dist/hosted-client/client.js.map +1 -0
- package/dist/hosted-client/directory.d.ts +46 -0
- package/dist/hosted-client/directory.d.ts.map +1 -0
- package/dist/hosted-client/directory.js +74 -0
- package/dist/hosted-client/directory.js.map +1 -0
- package/dist/hosted-client/errors.d.ts +26 -0
- package/dist/hosted-client/errors.d.ts.map +1 -0
- package/dist/hosted-client/errors.js +35 -0
- package/dist/hosted-client/errors.js.map +1 -0
- package/dist/hosted-client/inbox.d.ts +320 -0
- package/dist/hosted-client/inbox.d.ts.map +1 -0
- package/dist/hosted-client/inbox.js +379 -0
- package/dist/hosted-client/inbox.js.map +1 -0
- package/dist/hosted-client/index.d.ts +30 -0
- package/dist/hosted-client/index.d.ts.map +1 -0
- package/dist/hosted-client/index.js +32 -0
- package/dist/hosted-client/index.js.map +1 -0
- package/dist/hosted-client/journal.d.ts +103 -0
- package/dist/hosted-client/journal.d.ts.map +1 -0
- package/dist/hosted-client/journal.js +464 -0
- package/dist/hosted-client/journal.js.map +1 -0
- package/dist/hosted-client/node.d.ts +74 -0
- package/dist/hosted-client/node.d.ts.map +1 -0
- package/dist/hosted-client/node.js +219 -0
- package/dist/hosted-client/node.js.map +1 -0
- package/dist/hosted-client/reference.d.ts +12 -0
- package/dist/hosted-client/reference.d.ts.map +1 -0
- package/dist/hosted-client/reference.js +29 -0
- package/dist/hosted-client/reference.js.map +1 -0
- package/dist/hosted-client/write.d.ts +217 -0
- package/dist/hosted-client/write.d.ts.map +1 -0
- package/dist/hosted-client/write.js +418 -0
- package/dist/hosted-client/write.js.map +1 -0
- package/dist/hosted-transport/answer-rows.d.ts +243 -0
- package/dist/hosted-transport/answer-rows.d.ts.map +1 -0
- package/dist/hosted-transport/answer-rows.js +457 -0
- package/dist/hosted-transport/answer-rows.js.map +1 -0
- package/dist/hosted-transport/blob-reads.d.ts +35 -0
- package/dist/hosted-transport/blob-reads.d.ts.map +1 -0
- package/dist/hosted-transport/blob-reads.js +179 -0
- package/dist/hosted-transport/blob-reads.js.map +1 -0
- package/dist/hosted-transport/blob-write.d.ts +34 -0
- package/dist/hosted-transport/blob-write.d.ts.map +1 -0
- package/dist/hosted-transport/blob-write.js +115 -0
- package/dist/hosted-transport/blob-write.js.map +1 -0
- package/dist/hosted-transport/carrier.d.ts +151 -0
- package/dist/hosted-transport/carrier.d.ts.map +1 -0
- package/dist/hosted-transport/carrier.js +260 -0
- package/dist/hosted-transport/carrier.js.map +1 -0
- package/dist/hosted-transport/history-pages.d.ts +55 -0
- package/dist/hosted-transport/history-pages.d.ts.map +1 -0
- package/dist/hosted-transport/history-pages.js +69 -0
- package/dist/hosted-transport/history-pages.js.map +1 -0
- package/dist/hosted-transport/index.d.ts +18 -0
- package/dist/hosted-transport/index.d.ts.map +1 -0
- package/dist/hosted-transport/index.js +18 -0
- package/dist/hosted-transport/index.js.map +1 -0
- package/dist/hosted-transport/operations.d.ts +85 -0
- package/dist/hosted-transport/operations.d.ts.map +1 -0
- package/dist/hosted-transport/operations.js +128 -0
- package/dist/hosted-transport/operations.js.map +1 -0
- package/dist/hosted-transport/paged-reads.d.ts +87 -0
- package/dist/hosted-transport/paged-reads.d.ts.map +1 -0
- package/dist/hosted-transport/paged-reads.js +238 -0
- package/dist/hosted-transport/paged-reads.js.map +1 -0
- package/dist/hosted-transport/read-adapter.d.ts +256 -0
- package/dist/hosted-transport/read-adapter.d.ts.map +1 -0
- package/dist/hosted-transport/read-adapter.js +568 -0
- package/dist/hosted-transport/read-adapter.js.map +1 -0
- package/dist/hosted-transport/root-write.d.ts +114 -0
- package/dist/hosted-transport/root-write.d.ts.map +1 -0
- package/dist/hosted-transport/root-write.js +171 -0
- package/dist/hosted-transport/root-write.js.map +1 -0
- package/dist/hosted-transport/whole-document-transport.d.ts +204 -0
- package/dist/hosted-transport/whole-document-transport.d.ts.map +1 -0
- package/dist/hosted-transport/whole-document-transport.js +447 -0
- package/dist/hosted-transport/whole-document-transport.js.map +1 -0
- package/dist/identity-fold.d.ts +18 -0
- package/dist/identity-fold.d.ts.map +1 -0
- package/dist/identity-fold.js +22 -0
- package/dist/identity-fold.js.map +1 -0
- package/dist/index.d.ts +41 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -9
- package/dist/index.js.map +1 -1
- package/dist/indexeddb-backend.d.ts +25 -33
- package/dist/indexeddb-backend.d.ts.map +1 -1
- package/dist/indexeddb-backend.js +264 -8
- package/dist/indexeddb-backend.js.map +1 -1
- package/dist/inventory-guard.d.ts +58 -0
- package/dist/inventory-guard.d.ts.map +1 -0
- package/dist/inventory-guard.js +169 -0
- package/dist/inventory-guard.js.map +1 -0
- package/dist/journaled-backend.d.ts +149 -9
- package/dist/journaled-backend.d.ts.map +1 -1
- package/dist/journaled-backend.js +64 -58
- package/dist/journaled-backend.js.map +1 -1
- package/dist/kind-authoring.d.ts +170 -0
- package/dist/kind-authoring.d.ts.map +1 -0
- package/dist/kind-authoring.js +452 -0
- package/dist/kind-authoring.js.map +1 -0
- package/dist/kind-changes.d.ts +45 -0
- package/dist/kind-changes.d.ts.map +1 -0
- package/dist/kind-changes.js +96 -0
- package/dist/kind-changes.js.map +1 -0
- package/dist/kind-conformance-error.d.ts +15 -0
- package/dist/kind-conformance-error.d.ts.map +1 -0
- package/dist/kind-conformance-error.js +20 -0
- package/dist/kind-conformance-error.js.map +1 -0
- package/dist/kind-coverage.d.ts +99 -0
- package/dist/kind-coverage.d.ts.map +1 -0
- package/dist/kind-coverage.js +186 -0
- package/dist/kind-coverage.js.map +1 -0
- package/dist/kind-deprecation.d.ts +32 -0
- package/dist/kind-deprecation.d.ts.map +1 -0
- package/dist/kind-deprecation.js +141 -0
- package/dist/kind-deprecation.js.map +1 -0
- package/dist/kind-field-mutation.d.ts +4 -0
- package/dist/kind-field-mutation.d.ts.map +1 -1
- package/dist/kind-field-mutation.js +28 -3
- package/dist/kind-field-mutation.js.map +1 -1
- package/dist/kinds-load.js +4 -4
- package/dist/kinds-load.js.map +1 -1
- package/dist/kinds.d.ts +111 -2
- package/dist/kinds.d.ts.map +1 -1
- package/dist/kinds.js +386 -20
- package/dist/kinds.js.map +1 -1
- package/dist/link-emit.d.ts +29 -0
- package/dist/link-emit.d.ts.map +1 -0
- package/dist/link-emit.js +39 -0
- package/dist/link-emit.js.map +1 -0
- package/dist/link-types.d.ts +27 -0
- package/dist/link-types.d.ts.map +1 -0
- package/dist/link-types.js +60 -0
- package/dist/link-types.js.map +1 -0
- package/dist/links.d.ts +52 -3
- package/dist/links.d.ts.map +1 -1
- package/dist/links.js +259 -18
- package/dist/links.js.map +1 -1
- package/dist/managed-document-metadata.d.ts +2 -0
- package/dist/managed-document-metadata.d.ts.map +1 -0
- package/dist/managed-document-metadata.js +9 -0
- package/dist/managed-document-metadata.js.map +1 -0
- package/dist/memory-backend.d.ts +3 -0
- package/dist/memory-backend.d.ts.map +1 -1
- package/dist/memory-backend.js +44 -2
- package/dist/memory-backend.js.map +1 -1
- package/dist/okf-actor.d.ts +1 -0
- package/dist/okf-actor.d.ts.map +1 -1
- package/dist/okf-actor.js +1 -0
- package/dist/okf-actor.js.map +1 -1
- package/dist/okf-authoring.d.ts +4 -0
- package/dist/okf-authoring.d.ts.map +1 -0
- package/dist/okf-authoring.js +12 -0
- package/dist/okf-authoring.js.map +1 -0
- package/dist/okf-standard-fields.d.ts +3 -0
- package/dist/okf-standard-fields.d.ts.map +1 -1
- package/dist/okf-standard-fields.js +3 -0
- package/dist/okf-standard-fields.js.map +1 -1
- package/dist/path-fold.d.ts +39 -0
- package/dist/path-fold.d.ts.map +1 -0
- package/dist/path-fold.js +41 -0
- package/dist/path-fold.js.map +1 -0
- package/dist/paths.d.ts +18 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +32 -0
- package/dist/paths.js.map +1 -1
- package/dist/platform.d.ts +13 -2
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +16 -0
- package/dist/platform.js.map +1 -1
- package/dist/portable-export.d.ts +119 -0
- package/dist/portable-export.d.ts.map +1 -0
- package/dist/portable-export.js +501 -0
- package/dist/portable-export.js.map +1 -0
- package/dist/publication-filesystem.d.ts +1 -1
- package/dist/publication-filesystem.d.ts.map +1 -1
- package/dist/publication-filesystem.js +1 -1
- package/dist/publication-filesystem.js.map +1 -1
- package/dist/qualified-links.d.ts +67 -0
- package/dist/qualified-links.d.ts.map +1 -0
- package/dist/qualified-links.js +117 -0
- package/dist/qualified-links.js.map +1 -0
- package/dist/query-filter.d.ts +16 -2
- package/dist/query-filter.d.ts.map +1 -1
- package/dist/query-filter.js +40 -1
- package/dist/query-filter.js.map +1 -1
- package/dist/query-order.d.ts +22 -0
- package/dist/query-order.d.ts.map +1 -0
- package/dist/query-order.js +43 -0
- package/dist/query-order.js.map +1 -0
- package/dist/recipe-lifecycle/errors.d.ts +96 -0
- package/dist/recipe-lifecycle/errors.d.ts.map +1 -0
- package/dist/recipe-lifecycle/errors.js +122 -0
- package/dist/recipe-lifecycle/errors.js.map +1 -0
- package/dist/recipe-lifecycle/evolution.d.ts +124 -0
- package/dist/recipe-lifecycle/evolution.d.ts.map +1 -0
- package/dist/recipe-lifecycle/evolution.js +993 -0
- package/dist/recipe-lifecycle/evolution.js.map +1 -0
- package/dist/recipe-lifecycle/index.d.ts +34 -0
- package/dist/recipe-lifecycle/index.d.ts.map +1 -0
- package/dist/recipe-lifecycle/index.js +28 -0
- package/dist/recipe-lifecycle/index.js.map +1 -0
- package/dist/recipe-lifecycle/install.d.ts +155 -0
- package/dist/recipe-lifecycle/install.d.ts.map +1 -0
- package/dist/recipe-lifecycle/install.js +604 -0
- package/dist/recipe-lifecycle/install.js.map +1 -0
- package/dist/recipe-lifecycle/legacy-aliases.d.ts +16 -0
- package/dist/recipe-lifecycle/legacy-aliases.d.ts.map +1 -0
- package/dist/recipe-lifecycle/legacy-aliases.js +51 -0
- package/dist/recipe-lifecycle/legacy-aliases.js.map +1 -0
- package/dist/recipe-lifecycle/retirement-apply.d.ts +59 -0
- package/dist/recipe-lifecycle/retirement-apply.d.ts.map +1 -0
- package/dist/recipe-lifecycle/retirement-apply.js +165 -0
- package/dist/recipe-lifecycle/retirement-apply.js.map +1 -0
- package/dist/recipe-lifecycle/retirement.d.ts +89 -0
- package/dist/recipe-lifecycle/retirement.d.ts.map +1 -0
- package/dist/recipe-lifecycle/retirement.js +347 -0
- package/dist/recipe-lifecycle/retirement.js.map +1 -0
- package/dist/recipe-lifecycle/stamp.d.ts +151 -0
- package/dist/recipe-lifecycle/stamp.d.ts.map +1 -0
- package/dist/recipe-lifecycle/stamp.js +364 -0
- package/dist/recipe-lifecycle/stamp.js.map +1 -0
- package/dist/recipe-set-preflight.d.ts +139 -0
- package/dist/recipe-set-preflight.d.ts.map +1 -0
- package/dist/recipe-set-preflight.js +536 -0
- package/dist/recipe-set-preflight.js.map +1 -0
- package/dist/recipes.d.ts +29 -1
- package/dist/recipes.d.ts.map +1 -1
- package/dist/recipes.js +137 -1
- package/dist/recipes.js.map +1 -1
- package/dist/record-overlay/apply.d.ts +43 -0
- package/dist/record-overlay/apply.d.ts.map +1 -0
- package/dist/record-overlay/apply.js +527 -0
- package/dist/record-overlay/apply.js.map +1 -0
- package/dist/record-overlay/canonical.d.ts +22 -0
- package/dist/record-overlay/canonical.d.ts.map +1 -0
- package/dist/record-overlay/canonical.js +47 -0
- package/dist/record-overlay/canonical.js.map +1 -0
- package/dist/record-overlay/digest.d.ts +4 -0
- package/dist/record-overlay/digest.d.ts.map +1 -0
- package/dist/record-overlay/digest.js +11 -0
- package/dist/record-overlay/digest.js.map +1 -0
- package/dist/record-overlay/errors.d.ts +44 -0
- package/dist/record-overlay/errors.d.ts.map +1 -0
- package/dist/record-overlay/errors.js +55 -0
- package/dist/record-overlay/errors.js.map +1 -0
- package/dist/record-overlay/findings.d.ts +5 -0
- package/dist/record-overlay/findings.d.ts.map +1 -0
- package/dist/record-overlay/findings.js +83 -0
- package/dist/record-overlay/findings.js.map +1 -0
- package/dist/record-overlay/index.d.ts +23 -0
- package/dist/record-overlay/index.d.ts.map +1 -0
- package/dist/record-overlay/index.js +21 -0
- package/dist/record-overlay/index.js.map +1 -0
- package/dist/record-overlay/plan.d.ts +12 -0
- package/dist/record-overlay/plan.d.ts.map +1 -0
- package/dist/record-overlay/plan.js +285 -0
- package/dist/record-overlay/plan.js.map +1 -0
- package/dist/record-overlay/policy.d.ts +74 -0
- package/dist/record-overlay/policy.d.ts.map +1 -0
- package/dist/record-overlay/policy.js +235 -0
- package/dist/record-overlay/policy.js.map +1 -0
- package/dist/record-overlay/redact.d.ts +3 -0
- package/dist/record-overlay/redact.d.ts.map +1 -0
- package/dist/record-overlay/redact.js +27 -0
- package/dist/record-overlay/redact.js.map +1 -0
- package/dist/record-overlay/signal-kind.d.ts +30 -0
- package/dist/record-overlay/signal-kind.d.ts.map +1 -0
- package/dist/record-overlay/signal-kind.js +38 -0
- package/dist/record-overlay/signal-kind.js.map +1 -0
- package/dist/record-overlay/signal-text.d.ts +45 -0
- package/dist/record-overlay/signal-text.d.ts.map +1 -0
- package/dist/record-overlay/signal-text.js +116 -0
- package/dist/record-overlay/signal-text.js.map +1 -0
- package/dist/record-overlay/source-index.d.ts +19 -0
- package/dist/record-overlay/source-index.d.ts.map +1 -0
- package/dist/record-overlay/source-index.js +102 -0
- package/dist/record-overlay/source-index.js.map +1 -0
- package/dist/record-overlay/types.d.ts +291 -0
- package/dist/record-overlay/types.d.ts.map +1 -0
- package/dist/record-overlay/types.js +2 -0
- package/dist/record-overlay/types.js.map +1 -0
- package/dist/remote-backend.d.ts +58 -13
- package/dist/remote-backend.d.ts.map +1 -1
- package/dist/remote-backend.js +156 -36
- package/dist/remote-backend.js.map +1 -1
- package/dist/remote-document-codec.d.ts +2 -1
- package/dist/remote-document-codec.d.ts.map +1 -1
- package/dist/remote-document-codec.js +3 -2
- package/dist/remote-document-codec.js.map +1 -1
- package/dist/remote-error.d.ts +17 -1
- package/dist/remote-error.d.ts.map +1 -1
- package/dist/remote-error.js +32 -2
- package/dist/remote-error.js.map +1 -1
- package/dist/remote-operations.d.ts +0 -40
- package/dist/remote-operations.d.ts.map +1 -1
- package/dist/remote-operations.js +26 -6
- package/dist/remote-operations.js.map +1 -1
- package/dist/remote-parsers.d.ts +1 -1
- package/dist/remote-parsers.js +1 -1
- package/dist/search/backend-source.d.ts +6 -0
- package/dist/search/backend-source.d.ts.map +1 -0
- package/dist/search/backend-source.js +33 -0
- package/dist/search/backend-source.js.map +1 -0
- package/dist/search/contract.d.ts +151 -0
- package/dist/search/contract.d.ts.map +1 -0
- package/dist/search/contract.js +78 -0
- package/dist/search/contract.js.map +1 -0
- package/dist/search/errors.d.ts +30 -0
- package/dist/search/errors.d.ts.map +1 -0
- package/dist/search/errors.js +50 -0
- package/dist/search/errors.js.map +1 -0
- package/dist/search/identity.d.ts +12 -0
- package/dist/search/identity.d.ts.map +1 -0
- package/dist/search/identity.js +90 -0
- package/dist/search/identity.js.map +1 -0
- package/dist/search/index.d.ts +16 -0
- package/dist/search/index.d.ts.map +1 -0
- package/dist/search/index.js +15 -0
- package/dist/search/index.js.map +1 -0
- package/dist/search/memory-source.d.ts +36 -0
- package/dist/search/memory-source.d.ts.map +1 -0
- package/dist/search/memory-source.js +235 -0
- package/dist/search/memory-source.js.map +1 -0
- package/dist/search/rank.d.ts +34 -0
- package/dist/search/rank.d.ts.map +1 -0
- package/dist/search/rank.js +129 -0
- package/dist/search/rank.js.map +1 -0
- package/dist/search/row-text.d.ts +38 -0
- package/dist/search/row-text.d.ts.map +1 -0
- package/dist/search/row-text.js +88 -0
- package/dist/search/row-text.js.map +1 -0
- package/dist/search/search.d.ts +28 -0
- package/dist/search/search.d.ts.map +1 -0
- package/dist/search/search.js +257 -0
- package/dist/search/search.js.map +1 -0
- package/dist/search/source.d.ts +67 -0
- package/dist/search/source.d.ts.map +1 -0
- package/dist/search/source.js +2 -0
- package/dist/search/source.js.map +1 -0
- package/dist/search/text.d.ts +47 -0
- package/dist/search/text.d.ts.map +1 -0
- package/dist/search/text.js +150 -0
- package/dist/search/text.js.map +1 -0
- package/dist/site-capabilities.d.ts +345 -0
- package/dist/site-capabilities.d.ts.map +1 -0
- package/dist/site-capabilities.js +724 -0
- package/dist/site-capabilities.js.map +1 -0
- package/dist/source-engine/driver.d.ts +40 -0
- package/dist/source-engine/driver.d.ts.map +1 -0
- package/dist/source-engine/driver.js +392 -0
- package/dist/source-engine/driver.js.map +1 -0
- package/dist/source-engine/evidence.d.ts +39 -0
- package/dist/source-engine/evidence.d.ts.map +1 -0
- package/dist/source-engine/evidence.js +54 -0
- package/dist/source-engine/evidence.js.map +1 -0
- package/dist/source-engine/guard.d.ts +87 -0
- package/dist/source-engine/guard.d.ts.map +1 -0
- package/dist/source-engine/guard.js +427 -0
- package/dist/source-engine/guard.js.map +1 -0
- package/dist/source-engine/index.d.ts +33 -0
- package/dist/source-engine/index.d.ts.map +1 -0
- package/dist/source-engine/index.js +26 -0
- package/dist/source-engine/index.js.map +1 -0
- package/dist/source-engine/machine-state.d.ts +74 -0
- package/dist/source-engine/machine-state.d.ts.map +1 -0
- package/dist/source-engine/machine-state.js +48 -0
- package/dist/source-engine/machine-state.js.map +1 -0
- package/dist/source-engine/observe.d.ts +10 -0
- package/dist/source-engine/observe.d.ts.map +1 -0
- package/dist/source-engine/observe.js +270 -0
- package/dist/source-engine/observe.js.map +1 -0
- package/dist/source-engine/overlay.d.ts +50 -0
- package/dist/source-engine/overlay.d.ts.map +1 -0
- package/dist/source-engine/overlay.js +114 -0
- package/dist/source-engine/overlay.js.map +1 -0
- package/dist/source-engine/robots.d.ts +53 -0
- package/dist/source-engine/robots.d.ts.map +1 -0
- package/dist/source-engine/robots.js +158 -0
- package/dist/source-engine/robots.js.map +1 -0
- package/dist/source-engine/snapshot.d.ts +104 -0
- package/dist/source-engine/snapshot.d.ts.map +1 -0
- package/dist/source-engine/snapshot.js +240 -0
- package/dist/source-engine/snapshot.js.map +1 -0
- package/dist/source-engine/types.d.ts +292 -0
- package/dist/source-engine/types.d.ts.map +1 -0
- package/dist/source-engine/types.js +2 -0
- package/dist/source-engine/types.js.map +1 -0
- package/dist/source-harness/conformance.d.ts +16 -0
- package/dist/source-harness/conformance.d.ts.map +1 -0
- package/dist/source-harness/conformance.js +266 -0
- package/dist/source-harness/conformance.js.map +1 -0
- package/dist/source-harness/fixture.d.ts +97 -0
- package/dist/source-harness/fixture.d.ts.map +1 -0
- package/dist/source-harness/fixture.js +276 -0
- package/dist/source-harness/fixture.js.map +1 -0
- package/dist/source-harness/index.d.ts +22 -0
- package/dist/source-harness/index.d.ts.map +1 -0
- package/dist/source-harness/index.js +19 -0
- package/dist/source-harness/index.js.map +1 -0
- package/dist/source-harness/peer.d.ts +74 -0
- package/dist/source-harness/peer.d.ts.map +1 -0
- package/dist/source-harness/peer.js +106 -0
- package/dist/source-harness/peer.js.map +1 -0
- package/dist/source-profiles/index.d.ts +31 -0
- package/dist/source-profiles/index.d.ts.map +1 -0
- package/dist/source-profiles/index.js +206 -0
- package/dist/source-profiles/index.js.map +1 -0
- package/dist/source-profiles/link-header.d.ts +6 -0
- package/dist/source-profiles/link-header.d.ts.map +1 -0
- package/dist/source-profiles/link-header.js +131 -0
- package/dist/source-profiles/link-header.js.map +1 -0
- package/dist/storage.d.ts +9 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +6 -1
- package/dist/storage.js.map +1 -1
- package/dist/string-identity-agreement.d.ts +35 -0
- package/dist/string-identity-agreement.d.ts.map +1 -0
- package/dist/string-identity-agreement.js +72 -0
- package/dist/string-identity-agreement.js.map +1 -0
- package/dist/types.d.ts +41 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -10
- package/dist/types.js.map +1 -1
- package/dist/uncertain-write.d.ts +157 -17
- package/dist/uncertain-write.d.ts.map +1 -1
- package/dist/uncertain-write.js +86 -30
- package/dist/uncertain-write.js.map +1 -1
- package/dist/versioning.d.ts +9 -4
- package/dist/versioning.d.ts.map +1 -1
- package/dist/versioning.js +9 -4
- package/dist/versioning.js.map +1 -1
- package/dist/view-launch-contract.d.ts +14 -0
- package/dist/view-launch-contract.d.ts.map +1 -0
- package/dist/view-launch-contract.js +23 -0
- package/dist/view-launch-contract.js.map +1 -0
- package/dist/write-identity.d.ts +5 -0
- package/dist/write-identity.d.ts.map +1 -0
- package/dist/write-identity.js +9 -0
- package/dist/write-identity.js.map +1 -0
- package/package.json +140 -3
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/** Types of `@superbee/core/record-overlay`. Step and result rows keep the record-bridge keys. */
|
|
2
|
+
import type { DocumentMutationCandidate } from "../document-mutation.js";
|
|
3
|
+
import type { KindConvention, KindRegistry } from "../kinds.js";
|
|
4
|
+
import type { Bundle, ConceptId, Frontmatter, OkfDocument, Version } from "../types.js";
|
|
5
|
+
import type { RefusalCode } from "./errors.js";
|
|
6
|
+
import type { SourceIndex } from "./source-index.js";
|
|
7
|
+
/** One bundle as the overlay reads and writes it. */
|
|
8
|
+
export interface OverlayBundle {
|
|
9
|
+
bundle: Bundle;
|
|
10
|
+
registry: KindRegistry;
|
|
11
|
+
okfVersion: "0.1" | "0.2";
|
|
12
|
+
}
|
|
13
|
+
/** The generic Source Feed policy: which fields a feed owns and what each change kind may do. */
|
|
14
|
+
export interface OverlayPolicy {
|
|
15
|
+
feed: ConceptId;
|
|
16
|
+
/** The provider identity (`url`), as `sources[].resource` names it. */
|
|
17
|
+
provider: string;
|
|
18
|
+
/** The Kind of the overlay documents. Absent for a record-only or presentation-only feed. */
|
|
19
|
+
target_kind?: string;
|
|
20
|
+
owned_fields: string[];
|
|
21
|
+
auto_apply: string[];
|
|
22
|
+
needs_review: string[];
|
|
23
|
+
missing_threshold?: number;
|
|
24
|
+
completeness?: "complete" | "partial";
|
|
25
|
+
/** The feed's wall-time zone, validated by whoever owns the interval hook. */
|
|
26
|
+
time_zone?: string;
|
|
27
|
+
exclude?: RegExp | null;
|
|
28
|
+
exclude_ids?: ReadonlySet<string> | null;
|
|
29
|
+
/**
|
|
30
|
+
* The target Kind's `string-list` and `https-url-list` fields, which change detection compares as
|
|
31
|
+
* sets. Present only when the reader was given a target Kind that declares one.
|
|
32
|
+
*/
|
|
33
|
+
list_fields?: string[];
|
|
34
|
+
}
|
|
35
|
+
/** Field checks for the reader: the target Kind's declared fields, or a presentation kind's fields. */
|
|
36
|
+
export type PolicyContext = {
|
|
37
|
+
targetKind?: KindConvention;
|
|
38
|
+
presentationFields?: never;
|
|
39
|
+
} | {
|
|
40
|
+
presentationFields: readonly string[];
|
|
41
|
+
targetKind?: never;
|
|
42
|
+
};
|
|
43
|
+
/** One change the caller's diff observed for one external record. */
|
|
44
|
+
export interface RecordChange {
|
|
45
|
+
external_id: string;
|
|
46
|
+
change_kind: string;
|
|
47
|
+
changed_fields: string[];
|
|
48
|
+
before: Record<string, unknown> | null;
|
|
49
|
+
after: Record<string, unknown> | null;
|
|
50
|
+
content_digest: string;
|
|
51
|
+
occurs_at?: string;
|
|
52
|
+
missing_count?: number;
|
|
53
|
+
first_missing_at?: string;
|
|
54
|
+
collapse_with?: string[];
|
|
55
|
+
signal_priority?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface Tell {
|
|
58
|
+
code: string;
|
|
59
|
+
match: string;
|
|
60
|
+
[property: string]: unknown;
|
|
61
|
+
}
|
|
62
|
+
/** A publication text gate: the text as it may be written, and whether it may be written at all. */
|
|
63
|
+
export type TextGate = (text: string, context: {
|
|
64
|
+
field: string;
|
|
65
|
+
kind: string | undefined;
|
|
66
|
+
}) => {
|
|
67
|
+
text: string;
|
|
68
|
+
ok: boolean;
|
|
69
|
+
tells: Tell[];
|
|
70
|
+
changed?: boolean;
|
|
71
|
+
};
|
|
72
|
+
/** `[startMs, endMs)` of a record's last known occurrence, or null when its dates are unknown. */
|
|
73
|
+
export type IntervalHook = (fields: Record<string, unknown>, timeZone: string | undefined) => readonly [number, number] | null;
|
|
74
|
+
export type DisappearedPhase = "ended" | "before-start" | "ongoing" | null;
|
|
75
|
+
export interface CorrelateHook {
|
|
76
|
+
kind: string;
|
|
77
|
+
match: (fields: Record<string, unknown>, frontmatter: Frontmatter, externalId: string) => null | undefined | {
|
|
78
|
+
reason: string;
|
|
79
|
+
priority?: string;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/** Runs on every fresh candidate through `mutateDocument`, after the core-owned guards. */
|
|
83
|
+
export type AssertCandidate = (existing: OkfDocument | undefined, candidate: DocumentMutationCandidate) => void | Promise<void>;
|
|
84
|
+
export interface OverlayHooks {
|
|
85
|
+
textGate?: TextGate;
|
|
86
|
+
interval?: IntervalHook;
|
|
87
|
+
correlate?: CorrelateHook;
|
|
88
|
+
/** Scalar properties for the `sources` entry of an applied record; none means no upsert. */
|
|
89
|
+
sourceProperties?: (change: RecordChange) => Record<string, string | number | boolean> | undefined;
|
|
90
|
+
/** Site rules, run after the core-owned guards on the same fresh read. */
|
|
91
|
+
assertCandidate?: (existing: OkfDocument | undefined, candidate: DocumentMutationCandidate, context: {
|
|
92
|
+
step: OverlayStep["op"];
|
|
93
|
+
bundle: "content" | "ops";
|
|
94
|
+
}) => void | Promise<void>;
|
|
95
|
+
/** Fields derived in the same write as the owned fields (for example `updated_at`). */
|
|
96
|
+
deriveFields?: {
|
|
97
|
+
fields: readonly string[];
|
|
98
|
+
derive: (existing: OkfDocument, next: DocumentMutationCandidate) => Record<string, unknown>;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
export interface ChangeDecision {
|
|
102
|
+
apply: Record<string, {
|
|
103
|
+
from: unknown;
|
|
104
|
+
to: unknown;
|
|
105
|
+
}>;
|
|
106
|
+
conflicts: Array<{
|
|
107
|
+
field: string;
|
|
108
|
+
doc_value: unknown;
|
|
109
|
+
feed_before: unknown;
|
|
110
|
+
feed_after: unknown;
|
|
111
|
+
}>;
|
|
112
|
+
editorFields: string[];
|
|
113
|
+
wording: Array<{
|
|
114
|
+
field: string;
|
|
115
|
+
text: string;
|
|
116
|
+
tells: Tell[];
|
|
117
|
+
}>;
|
|
118
|
+
signal: null | {
|
|
119
|
+
priority: string;
|
|
120
|
+
reasons: string[];
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
export interface PlanInput {
|
|
124
|
+
content: OverlayBundle;
|
|
125
|
+
ops: OverlayBundle;
|
|
126
|
+
policy: OverlayPolicy;
|
|
127
|
+
changes: readonly RecordChange[];
|
|
128
|
+
observedAt: string;
|
|
129
|
+
/** Next store records, for titles. */
|
|
130
|
+
records?: Record<string, {
|
|
131
|
+
fields?: Record<string, unknown>;
|
|
132
|
+
}>;
|
|
133
|
+
observation?: {
|
|
134
|
+
baseline?: boolean;
|
|
135
|
+
replay?: boolean;
|
|
136
|
+
stats?: Record<string, unknown>;
|
|
137
|
+
};
|
|
138
|
+
/** A per-run identity index; without one the plan builds its own for this provider and Kind. */
|
|
139
|
+
overlays?: SourceIndex;
|
|
140
|
+
timeZone?: string;
|
|
141
|
+
/** Ops and content are one bundle, so typed `about` links are possible. */
|
|
142
|
+
sameBundle?: boolean;
|
|
143
|
+
/** Attention and feed Kind names; default `Signal` and `Source Feed`. */
|
|
144
|
+
signals?: {
|
|
145
|
+
kind?: string;
|
|
146
|
+
feedKind?: string;
|
|
147
|
+
};
|
|
148
|
+
hooks?: OverlayHooks;
|
|
149
|
+
}
|
|
150
|
+
export interface Finding {
|
|
151
|
+
key: string;
|
|
152
|
+
title: string;
|
|
153
|
+
summary?: string;
|
|
154
|
+
priority?: string;
|
|
155
|
+
about_doc?: string;
|
|
156
|
+
related?: string[];
|
|
157
|
+
facts?: unknown;
|
|
158
|
+
sources?: Array<{
|
|
159
|
+
resource: string;
|
|
160
|
+
id?: string;
|
|
161
|
+
title?: string;
|
|
162
|
+
[property: string]: unknown;
|
|
163
|
+
}>;
|
|
164
|
+
external_id?: string;
|
|
165
|
+
expires_at?: string;
|
|
166
|
+
change_kind?: string;
|
|
167
|
+
}
|
|
168
|
+
export interface FindingsInput {
|
|
169
|
+
ops: OverlayBundle;
|
|
170
|
+
/** Signal `provider`: a feed URL or a tool name. */
|
|
171
|
+
provider: string;
|
|
172
|
+
/** Source Feed id for the `from feed` link; absent for tool-raised findings. */
|
|
173
|
+
feed?: ConceptId;
|
|
174
|
+
/** Signal id prefix after the attention Kind's path. */
|
|
175
|
+
slug: string;
|
|
176
|
+
findings: readonly Finding[] | null | undefined;
|
|
177
|
+
observedAt: string;
|
|
178
|
+
signals?: {
|
|
179
|
+
kind?: string;
|
|
180
|
+
feedKind?: string;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
export interface ApplyContext {
|
|
184
|
+
content: OverlayBundle;
|
|
185
|
+
ops: OverlayBundle;
|
|
186
|
+
policy: Pick<OverlayPolicy, "owned_fields" | "provider" | "target_kind">;
|
|
187
|
+
actor: string;
|
|
188
|
+
overlays?: SourceIndex;
|
|
189
|
+
/** Attention and feed Kind names, as the plan was made with; default `Signal` and `Source Feed`. */
|
|
190
|
+
signals?: {
|
|
191
|
+
kind?: string;
|
|
192
|
+
feedKind?: string;
|
|
193
|
+
};
|
|
194
|
+
hooks?: Pick<OverlayHooks, "assertCandidate" | "deriveFields">;
|
|
195
|
+
}
|
|
196
|
+
export interface ApplyOwnedFieldsStep {
|
|
197
|
+
op: "apply-owned-fields";
|
|
198
|
+
target: ConceptId;
|
|
199
|
+
expected_version: Version;
|
|
200
|
+
external_id: string;
|
|
201
|
+
change_kind: string;
|
|
202
|
+
fields: Record<string, {
|
|
203
|
+
from: unknown;
|
|
204
|
+
to: unknown;
|
|
205
|
+
}>;
|
|
206
|
+
/** Grouped shape: properties upserted on the record's `sources` entry in the same write. */
|
|
207
|
+
sources?: Record<string, string | number | boolean>;
|
|
208
|
+
}
|
|
209
|
+
export interface CreateSignalStep {
|
|
210
|
+
op: "create-signal";
|
|
211
|
+
target: ConceptId;
|
|
212
|
+
external_id: string;
|
|
213
|
+
content_digest: string;
|
|
214
|
+
finding?: string;
|
|
215
|
+
reasons: string[];
|
|
216
|
+
candidate: {
|
|
217
|
+
frontmatter: Frontmatter;
|
|
218
|
+
body: string;
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
export interface CollapseSignalStep {
|
|
222
|
+
op: "collapse-signal";
|
|
223
|
+
target: ConceptId;
|
|
224
|
+
expected_version: Version;
|
|
225
|
+
external_id: string;
|
|
226
|
+
content_digest: string;
|
|
227
|
+
finding?: string;
|
|
228
|
+
progress_field: string;
|
|
229
|
+
observation_line: string;
|
|
230
|
+
set: Record<string, unknown>;
|
|
231
|
+
}
|
|
232
|
+
export interface SignalDuplicateStep {
|
|
233
|
+
op: "signal-duplicate";
|
|
234
|
+
target: ConceptId;
|
|
235
|
+
external_id: string;
|
|
236
|
+
content_digest: string;
|
|
237
|
+
finding?: string;
|
|
238
|
+
}
|
|
239
|
+
export interface RecordOnlyStep {
|
|
240
|
+
op: "record-only";
|
|
241
|
+
target?: undefined;
|
|
242
|
+
external_id: string;
|
|
243
|
+
change_kind?: string;
|
|
244
|
+
superseded?: true;
|
|
245
|
+
ended?: true;
|
|
246
|
+
reason?: string;
|
|
247
|
+
last_known_end?: string;
|
|
248
|
+
excluded?: true;
|
|
249
|
+
collapsed_into?: ConceptId;
|
|
250
|
+
}
|
|
251
|
+
export type OverlayStep = ApplyOwnedFieldsStep | CreateSignalStep | CollapseSignalStep | SignalDuplicateStep | RecordOnlyStep;
|
|
252
|
+
export interface RefusalRow {
|
|
253
|
+
code: RefusalCode;
|
|
254
|
+
external_id: string;
|
|
255
|
+
target?: ConceptId;
|
|
256
|
+
targets?: ConceptId[];
|
|
257
|
+
field?: string;
|
|
258
|
+
message: string;
|
|
259
|
+
}
|
|
260
|
+
export interface OverlayPlan {
|
|
261
|
+
feed: ConceptId | null;
|
|
262
|
+
provider: string;
|
|
263
|
+
observed_at: string;
|
|
264
|
+
baseline?: boolean;
|
|
265
|
+
replay?: boolean;
|
|
266
|
+
stats?: Record<string, unknown>;
|
|
267
|
+
steps: OverlayStep[];
|
|
268
|
+
refusals: RefusalRow[];
|
|
269
|
+
diagnostics?: unknown[];
|
|
270
|
+
}
|
|
271
|
+
export interface StepResult {
|
|
272
|
+
op: OverlayStep["op"];
|
|
273
|
+
target: ConceptId | null;
|
|
274
|
+
external_id: string;
|
|
275
|
+
outcome: "applied" | "unchanged" | "skipped" | "refused";
|
|
276
|
+
version?: Version;
|
|
277
|
+
code?: RefusalCode;
|
|
278
|
+
message?: string;
|
|
279
|
+
details?: Record<string, unknown>;
|
|
280
|
+
reason?: string;
|
|
281
|
+
last_known_end?: string;
|
|
282
|
+
}
|
|
283
|
+
export interface OverlayReceipt {
|
|
284
|
+
feed: ConceptId | null;
|
|
285
|
+
provider: string;
|
|
286
|
+
observed_at: string;
|
|
287
|
+
results: StepResult[];
|
|
288
|
+
refusals: RefusalRow[];
|
|
289
|
+
diagnostics: unknown[];
|
|
290
|
+
}
|
|
291
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/record-overlay/types.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,qDAAqD;AACrD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,YAAY,CAAC;IACvB,UAAU,EAAE,KAAK,GAAG,KAAK,CAAC;CAC3B;AAED,iGAAiG;AACjG,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;IACjB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,iBAAi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,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,WAAW,EAAE,OAAO,EAAE,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/record-overlay/types.ts"],"names":[],"mappings":""}
|
package/dist/remote-backend.d.ts
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* `RemoteBackend` — a {@link StorageBackend} implemented over the wire-protocol v0
|
|
3
3
|
* reference contract (`docs/WIRE-PROTOCOL.md`, `@superbee/server`).
|
|
4
4
|
*
|
|
5
|
-
* This is the client half of the seam over HTTP: every method maps directly to a wire endpoint
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* This is the client half of the seam over HTTP: every method maps directly to a wire endpoint
|
|
6
|
+
* (a guarded document write may first ask `GET /v0/capabilities` whether the host records
|
|
7
|
+
* outcomes; see {@link RemoteBackendOptions.maxRetries}), and response versions remain the same
|
|
8
|
+
* content-addressed {@link Version} tokens local backends produce. Tri-backend contract tests pin
|
|
9
|
+
* that invariant.
|
|
8
10
|
*
|
|
9
11
|
* Zero new dependencies: it calls an injectable {@link FetchLike} transport
|
|
10
|
-
* (defaulting to the global `fetch`, available
|
|
12
|
+
* (defaulting to the global `fetch`, available in every supported Node runtime) with a constructed
|
|
11
13
|
* `Request`. That means the SAME adapter runs against a real HTTP server, or — in
|
|
12
14
|
* tests — directly against an in-process `createRouter(bundle)` function with no
|
|
13
15
|
* sockets: `createRouter` returns exactly the `(req: Request) => Promise<Response>`
|
|
@@ -55,7 +57,7 @@ export interface RemoteBackendOptions {
|
|
|
55
57
|
baseUrl: string;
|
|
56
58
|
/** Bundle name segment in the `/v0/bundles/{bundle}/…` path. */
|
|
57
59
|
bundle: string;
|
|
58
|
-
/** Transport override; defaults to the global `fetch`
|
|
60
|
+
/** Transport override; defaults to the global `fetch` in supported Node runtimes. Tests inject a router directly. */
|
|
59
61
|
fetchImpl?: FetchLike;
|
|
60
62
|
/**
|
|
61
63
|
* Optional bearer token sent as `Authorization: Bearer <token>` on EVERY request. The
|
|
@@ -69,9 +71,24 @@ export interface RemoteBackendOptions {
|
|
|
69
71
|
* e.g. a Cloudflare D1 cold-start's 500 "storage caused object to be reset" when a hibernated
|
|
70
72
|
* database is first hit) or a network/transport error. Each retry backs off exponentially with
|
|
71
73
|
* jitter. A 4xx (incl. 412 VersionConflict), 401, or any 2xx is a REAL result, never retried.
|
|
72
|
-
* Default 3; set 0 to disable.
|
|
73
|
-
*
|
|
74
|
-
*
|
|
74
|
+
* Default 3; set 0 to disable. A retried read is idempotent.
|
|
75
|
+
*
|
|
76
|
+
* A guarded document write (`write` with `expectedVersion`, or `delete` with a content-version
|
|
77
|
+
* `expectedVersion`) travels with an `Idempotency-Key`: the caller's `requestId`, or else, when
|
|
78
|
+
* the host's capabilities report `operations`, one minted for that call. Every retry of the
|
|
79
|
+
* request carries the same key, so while the host keeps the record a retry is answered from the
|
|
80
|
+
* recorded outcome and cannot apply the write a second time.
|
|
81
|
+
*
|
|
82
|
+
* Other guarded writes retry as a plain resubmission: a guarded document write sent without a key
|
|
83
|
+
* (to a host without `operations`, after a capability question that ended in a transient status,
|
|
84
|
+
* or resent after the host refused a key minted under a stale answer), a `delete` whose
|
|
85
|
+
* `expectedVersion` is not a content version, and every guarded reserved-file and blob write,
|
|
86
|
+
* none of which the wire identifies. Such a retry lands the same version or a conflict, possibly
|
|
87
|
+
* SPURIOUS if a prior attempt committed before its response was lost. It is not free of lost
|
|
88
|
+
* updates: versions are content hashes, so if another writer returns the document to the exact
|
|
89
|
+
* state the premise names before a retry arrives, the retry applies the write again over that
|
|
90
|
+
* change and reports success. An unconditional write carries no minted key and can simply be
|
|
91
|
+
* repeated.
|
|
75
92
|
*/
|
|
76
93
|
maxRetries?: number;
|
|
77
94
|
}
|
|
@@ -106,6 +123,8 @@ export declare class RemoteBackend implements StorageBackend {
|
|
|
106
123
|
private readonly fetchImpl;
|
|
107
124
|
private readonly authToken?;
|
|
108
125
|
private readonly maxRetries;
|
|
126
|
+
/** The pending or settled answer to whether this host records outcomes; see {@link recordsOutcomes}. */
|
|
127
|
+
private operationsSupport?;
|
|
109
128
|
constructor(options: RemoteBackendOptions);
|
|
110
129
|
/** The authority's base URL as configured, without a trailing slash. */
|
|
111
130
|
get origin(): string;
|
|
@@ -119,12 +138,33 @@ export declare class RemoteBackend implements StorageBackend {
|
|
|
119
138
|
write(id: ConceptId, doc: OkfDocument, options?: WriteOptions): Promise<Version>;
|
|
120
139
|
/**
|
|
121
140
|
* `GET /v0/capabilities`, deployment-scoped: what this authority implements. `operations` says
|
|
122
|
-
* whether it records outcomes by request identity.
|
|
123
|
-
* and
|
|
124
|
-
*
|
|
125
|
-
*
|
|
141
|
+
* whether it records outcomes by request identity. The reference router without it refuses any
|
|
142
|
+
* request carrying `Idempotency-Key`, and the lookup route, with `400 USAGE`; a host that lacks
|
|
143
|
+
* the lookup route altogether answers it with a route-miss `404`, which {@link lookupOperation}
|
|
144
|
+
* cannot tell from "never recorded". A consumer that relies on identity checks this once before
|
|
145
|
+
* it sends any intent. Missing booleans read as `false`.
|
|
126
146
|
*/
|
|
127
147
|
wireCapabilities(): Promise<WireCapabilities>;
|
|
148
|
+
/**
|
|
149
|
+
* Whether this host records outcomes by request identity, asked through `GET /v0/capabilities`
|
|
150
|
+
* and shared by concurrent callers. A host that answers anything but a `2xx` with
|
|
151
|
+
* `operations: true` is treated as not recording them, since a host that does not record them
|
|
152
|
+
* refuses a key with `400`. That answer is kept for the backend's lifetime, except that a
|
|
153
|
+
* transient status still returned after `send`'s retries, or a transport failure, is not kept:
|
|
154
|
+
* the former sends this write unidentified, and the latter rejects the write before it is sent.
|
|
155
|
+
* A kept yes is also dropped when a minted key meets the host's identity refusal; see
|
|
156
|
+
* {@link sendDocWrite}.
|
|
157
|
+
*/
|
|
158
|
+
private recordsOutcomes;
|
|
159
|
+
private probeOperations;
|
|
160
|
+
/**
|
|
161
|
+
* Send a document `PUT` or `DELETE`. When its `Idempotency-Key` was minted here, a kept
|
|
162
|
+
* `operations` answer may be stale: a host that has since lost its outcome store refuses every
|
|
163
|
+
* key with the wire's `400` {@link IDENTITY_UNSUPPORTED} before applying anything. That answer
|
|
164
|
+
* is dropped and the write is sent once more without a key, as to any host without
|
|
165
|
+
* `operations`. A caller's own `requestId` is never dropped, so its refusal is the answer.
|
|
166
|
+
*/
|
|
167
|
+
private sendDocWrite;
|
|
128
168
|
/**
|
|
129
169
|
* `GET /heads`: every document id and version the authority holds, under one digest, or
|
|
130
170
|
* `null` when `ifNoneMatch` named the digest it still holds (a `304`: nothing changed). A
|
|
@@ -174,7 +214,12 @@ export declare class RemoteBackend implements StorageBackend {
|
|
|
174
214
|
* `docs/WIRE-PROTOCOL.md`); the engine's `queryHeads` re-filter covers it, per the
|
|
175
215
|
* seam contract (over-returning is fine; semantics live in core).
|
|
176
216
|
*/
|
|
177
|
-
queryHeads(filter?: QueryFilter
|
|
217
|
+
queryHeads(filter?: QueryFilter, options?: {
|
|
218
|
+
onSkip?: (skip: {
|
|
219
|
+
id: ConceptId;
|
|
220
|
+
reason: string;
|
|
221
|
+
}) => void;
|
|
222
|
+
}): Promise<HeadResult[]>;
|
|
178
223
|
versions(id: ConceptId): Promise<VersionInfo[]>;
|
|
179
224
|
readReserved(dir: string, name: ReservedFilename): Promise<ReservedReadResult | null>;
|
|
180
225
|
writeReserved(dir: string, name: ReservedFilename, content: string, options?: WriteOptions): Promise<Version>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-backend.d.ts","sourceRoot":"","sources":["../src/remote-backend.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"remote-backend.d.ts","sourceRoot":"","sources":["../src/remote-backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAOH,OAAO,EAA4D,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEtI,OAAO,EAAoC,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEtF,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,aAAa,EAEb,UAAU,EACV,WAAW,EACX,WAAW,EACX,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,OAAO,EACP,WAAW,EACX,YAAY,EACb,MAAM,YAAY,CAAC;AAgBpB;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEhE,sDAAsD;AACtD,MAAM,WAAW,oBAAoB;IACnC,yGAAyG;IACzG,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,qHAAqH;IACrH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAID,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,oGAAoG;AACpG,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,8FAA8F;IAC9F,UAAU,EAAE,OAAO,CAAC;IACpB,+FAA+F;IAC/F,KAA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