@superbee/core 0.2.0-pre.9 → 0.4.10-pre.11
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/LICENSE +202 -0
- package/README.md +1339 -6
- package/dist/backend.d.ts +50 -2
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js +311 -33
- 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-pages.d.ts +20 -0
- package/dist/body-pages.d.ts.map +1 -0
- package/dist/body-pages.js +56 -0
- package/dist/body-pages.js.map +1 -0
- package/dist/body-replace-guards.d.ts +81 -0
- package/dist/body-replace-guards.d.ts.map +1 -0
- package/dist/body-replace-guards.js +271 -0
- package/dist/body-replace-guards.js.map +1 -0
- package/dist/bounded-yaml.d.ts +28 -0
- package/dist/bounded-yaml.d.ts.map +1 -0
- package/dist/bounded-yaml.js +182 -0
- package/dist/bounded-yaml.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/site.d.ts +5 -0
- package/dist/builtin-recipes/site.d.ts.map +1 -0
- package/dist/builtin-recipes/site.js +83 -0
- package/dist/builtin-recipes/site.js.map +1 -0
- package/dist/builtin-recipes.d.ts +13 -0
- package/dist/builtin-recipes.d.ts.map +1 -0
- package/dist/builtin-recipes.js +123 -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 +45 -0
- package/dist/bundle-health/kind-findings.d.ts.map +1 -0
- package/dist/bundle-health/kind-findings.js +67 -0
- package/dist/bundle-health/kind-findings.js.map +1 -0
- package/dist/bundle-health/legacy-page.d.ts +21 -0
- package/dist/bundle-health/legacy-page.d.ts.map +1 -0
- package/dist/bundle-health/legacy-page.js +25 -0
- package/dist/bundle-health/legacy-page.js.map +1 -0
- package/dist/bundle-health/report.d.ts +191 -0
- package/dist/bundle-health/report.d.ts.map +1 -0
- package/dist/bundle-health/report.js +419 -0
- package/dist/bundle-health/report.js.map +1 -0
- package/dist/bundle-ops.d.ts +10 -4
- package/dist/bundle-ops.d.ts.map +1 -1
- package/dist/bundle-ops.js +15 -8
- package/dist/bundle-ops.js.map +1 -1
- package/dist/bundle.d.ts +2 -4
- package/dist/bundle.d.ts.map +1 -1
- package/dist/bundle.js +3 -12
- 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/convention-record.d.ts +9 -0
- package/dist/convention-record.d.ts.map +1 -0
- package/dist/convention-record.js +13 -0
- package/dist/convention-record.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 +208 -0
- package/dist/dependencies.d.ts.map +1 -0
- package/dist/dependencies.js +367 -0
- package/dist/dependencies.js.map +1 -0
- package/dist/document-codec.d.ts +4 -1
- package/dist/document-codec.d.ts.map +1 -1
- package/dist/document-codec.js +3 -1
- package/dist/document-codec.js.map +1 -1
- package/dist/document-field-actions.d.ts +21 -3
- package/dist/document-field-actions.d.ts.map +1 -1
- package/dist/document-field-actions.js +105 -40
- package/dist/document-field-actions.js.map +1 -1
- package/dist/document-mutation.d.ts +44 -18
- package/dist/document-mutation.d.ts.map +1 -1
- package/dist/document-mutation.js +192 -86
- package/dist/document-mutation.js.map +1 -1
- package/dist/document-persistence.d.ts +12 -0
- package/dist/document-persistence.d.ts.map +1 -0
- package/dist/document-persistence.js +44 -0
- package/dist/document-persistence.js.map +1 -0
- package/dist/document-replace-rules.d.ts +44 -0
- package/dist/document-replace-rules.d.ts.map +1 -0
- package/dist/document-replace-rules.js +41 -0
- package/dist/document-replace-rules.js.map +1 -0
- package/dist/document-scan.d.ts +26 -0
- package/dist/document-scan.d.ts.map +1 -0
- package/dist/document-scan.js +70 -0
- package/dist/document-scan.js.map +1 -0
- package/dist/document-transfer.d.ts +312 -0
- package/dist/document-transfer.d.ts.map +1 -0
- package/dist/document-transfer.js +1400 -0
- package/dist/document-transfer.js.map +1 -0
- package/dist/document-write-policy.d.ts +15 -4
- package/dist/document-write-policy.d.ts.map +1 -1
- package/dist/document-write-policy.js +41 -27
- 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/edge-harness/corpus.d.ts +9 -0
- package/dist/edge-harness/corpus.d.ts.map +1 -0
- package/dist/edge-harness/corpus.js +57 -0
- package/dist/edge-harness/corpus.js.map +1 -0
- package/dist/edge-harness/index.d.ts +21 -0
- package/dist/edge-harness/index.d.ts.map +1 -0
- package/dist/edge-harness/index.js +537 -0
- package/dist/edge-harness/index.js.map +1 -0
- package/dist/edges/find.d.ts +14 -0
- package/dist/edges/find.d.ts.map +1 -0
- package/dist/edges/find.js +46 -0
- package/dist/edges/find.js.map +1 -0
- package/dist/edges/index.d.ts +13 -0
- package/dist/edges/index.d.ts.map +1 -0
- package/dist/edges/index.js +5 -0
- package/dist/edges/index.js.map +1 -0
- package/dist/edges/memory-source.d.ts +8 -0
- package/dist/edges/memory-source.d.ts.map +1 -0
- package/dist/edges/memory-source.js +164 -0
- package/dist/edges/memory-source.js.map +1 -0
- package/dist/edges/read-bounds.d.ts +6 -0
- package/dist/edges/read-bounds.d.ts.map +1 -0
- package/dist/edges/read-bounds.js +13 -0
- package/dist/edges/read-bounds.js.map +1 -0
- package/dist/edges/source.d.ts +123 -0
- package/dist/edges/source.d.ts.map +1 -0
- package/dist/edges/source.js +2 -0
- package/dist/edges/source.js.map +1 -0
- package/dist/edges/walk.d.ts +7 -0
- package/dist/edges/walk.d.ts.map +1 -0
- package/dist/edges/walk.js +14 -0
- package/dist/edges/walk.js.map +1 -0
- package/dist/engine.d.ts +54 -18
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +137 -108
- package/dist/engine.js.map +1 -1
- package/dist/errors.d.ts +37 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +75 -3
- package/dist/errors.js.map +1 -1
- package/dist/file-journaled-backend-internal.d.ts +2 -0
- package/dist/file-journaled-backend-internal.d.ts.map +1 -1
- package/dist/file-journaled-backend-internal.js +2 -0
- package/dist/file-journaled-backend-internal.js.map +1 -1
- package/dist/file-journaled-backend.d.ts +38 -40
- package/dist/file-journaled-backend.d.ts.map +1 -1
- package/dist/file-journaled-backend.js +284 -52
- package/dist/file-journaled-backend.js.map +1 -1
- package/dist/filesystem-identity.d.ts +116 -17
- package/dist/filesystem-identity.d.ts.map +1 -1
- package/dist/filesystem-identity.js +532 -51
- package/dist/filesystem-identity.js.map +1 -1
- package/dist/filesystem-lock.d.ts +9 -2
- package/dist/filesystem-lock.d.ts.map +1 -1
- package/dist/filesystem-lock.js +134 -17
- package/dist/filesystem-lock.js.map +1 -1
- package/dist/filesystem-temp-name.d.ts +9 -0
- package/dist/filesystem-temp-name.d.ts.map +1 -0
- package/dist/filesystem-temp-name.js +20 -0
- package/dist/filesystem-temp-name.js.map +1 -0
- package/dist/filesystem.d.ts +6 -0
- package/dist/filesystem.d.ts.map +1 -1
- package/dist/filesystem.js +2 -1
- package/dist/filesystem.js.map +1 -1
- package/dist/freshness.d.ts +16 -1
- package/dist/freshness.d.ts.map +1 -1
- package/dist/freshness.js +47 -17
- package/dist/freshness.js.map +1 -1
- package/dist/frontmatter-contract.d.ts +14 -0
- package/dist/frontmatter-contract.d.ts.map +1 -1
- package/dist/frontmatter-contract.js +22 -0
- package/dist/frontmatter-contract.js.map +1 -1
- package/dist/frontmatter-splitter.d.ts +6 -0
- package/dist/frontmatter-splitter.d.ts.map +1 -1
- package/dist/frontmatter-splitter.js +8 -0
- package/dist/frontmatter-splitter.js.map +1 -1
- package/dist/frontmatter.d.ts +17 -7
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +52 -11
- package/dist/frontmatter.js.map +1 -1
- package/dist/governed-body-write.d.ts.map +1 -1
- package/dist/governed-body-write.js +13 -6
- 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/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 +249 -0
- package/dist/hosted-client/client.d.ts.map +1 -0
- package/dist/hosted-client/client.js +381 -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 +31 -0
- package/dist/hosted-client/index.d.ts.map +1 -0
- package/dist/hosted-client/index.js +33 -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/view-content.d.ts +184 -0
- package/dist/hosted-client/view-content.d.ts.map +1 -0
- package/dist/hosted-client/view-content.js +268 -0
- package/dist/hosted-client/view-content.js.map +1 -0
- package/dist/hosted-client/write.d.ts +219 -0
- package/dist/hosted-client/write.d.ts.map +1 -0
- package/dist/hosted-client/write.js +419 -0
- package/dist/hosted-client/write.js.map +1 -0
- package/dist/hosted-transport/answer-rows.d.ts +132 -4
- package/dist/hosted-transport/answer-rows.d.ts.map +1 -1
- package/dist/hosted-transport/answer-rows.js +211 -11
- package/dist/hosted-transport/answer-rows.js.map +1 -1
- package/dist/hosted-transport/attribution.d.ts +32 -0
- package/dist/hosted-transport/attribution.d.ts.map +1 -0
- package/dist/hosted-transport/attribution.js +38 -0
- package/dist/hosted-transport/attribution.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 +35 -11
- package/dist/hosted-transport/carrier.d.ts.map +1 -1
- package/dist/hosted-transport/carrier.js +101 -57
- package/dist/hosted-transport/carrier.js.map +1 -1
- package/dist/hosted-transport/document-backend.d.ts +74 -0
- package/dist/hosted-transport/document-backend.d.ts.map +1 -0
- package/dist/hosted-transport/document-backend.js +160 -0
- package/dist/hosted-transport/document-backend.js.map +1 -0
- package/dist/hosted-transport/index.d.ts +7 -4
- package/dist/hosted-transport/index.d.ts.map +1 -1
- package/dist/hosted-transport/index.js +7 -4
- package/dist/hosted-transport/index.js.map +1 -1
- package/dist/hosted-transport/operations.d.ts +6 -0
- package/dist/hosted-transport/operations.d.ts.map +1 -1
- package/dist/hosted-transport/operations.js +2 -1
- package/dist/hosted-transport/operations.js.map +1 -1
- package/dist/hosted-transport/port-run.d.ts +41 -0
- package/dist/hosted-transport/port-run.d.ts.map +1 -0
- package/dist/hosted-transport/port-run.js +92 -0
- package/dist/hosted-transport/port-run.js.map +1 -0
- package/dist/hosted-transport/read-adapter.d.ts +19 -3
- package/dist/hosted-transport/read-adapter.d.ts.map +1 -1
- package/dist/hosted-transport/read-adapter.js +18 -5
- package/dist/hosted-transport/read-adapter.js.map +1 -1
- package/dist/hosted-transport/root-write.d.ts.map +1 -1
- package/dist/hosted-transport/root-write.js +5 -2
- package/dist/hosted-transport/root-write.js.map +1 -1
- package/dist/hosted-transport/whole-document-transport.d.ts +56 -7
- package/dist/hosted-transport/whole-document-transport.d.ts.map +1 -1
- package/dist/hosted-transport/whole-document-transport.js +120 -31
- package/dist/hosted-transport/whole-document-transport.js.map +1 -1
- package/dist/identity-fold.d.ts +16 -0
- package/dist/identity-fold.d.ts.map +1 -0
- package/dist/identity-fold.js +24 -0
- package/dist/identity-fold.js.map +1 -0
- package/dist/index-projection.d.ts +2 -1
- package/dist/index-projection.d.ts.map +1 -1
- package/dist/index-projection.js +38 -28
- package/dist/index-projection.js.map +1 -1
- package/dist/index.d.ts +59 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +49 -20
- package/dist/index.js.map +1 -1
- package/dist/indexeddb-backend.d.ts +0 -31
- package/dist/indexeddb-backend.d.ts.map +1 -1
- package/dist/indexeddb-backend.js +5 -2
- 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 +14 -4
- package/dist/journaled-backend.d.ts.map +1 -1
- package/dist/journaled-backend.js +19 -78
- package/dist/journaled-backend.js.map +1 -1
- package/dist/json-data.d.ts +3 -0
- package/dist/json-data.d.ts.map +1 -0
- package/dist/json-data.js +19 -0
- package/dist/json-data.js.map +1 -0
- package/dist/kind-authoring.d.ts +188 -0
- package/dist/kind-authoring.d.ts.map +1 -0
- package/dist/kind-authoring.js +520 -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 +16 -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 +100 -0
- package/dist/kind-coverage.d.ts.map +1 -0
- package/dist/kind-coverage.js +185 -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 +7 -2
- 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/kind-undeclared-fields.d.ts +72 -0
- package/dist/kind-undeclared-fields.d.ts.map +1 -0
- package/dist/kind-undeclared-fields.js +124 -0
- package/dist/kind-undeclared-fields.js.map +1 -0
- package/dist/kinds-load.d.ts.map +1 -1
- package/dist/kinds-load.js +8 -5
- package/dist/kinds-load.js.map +1 -1
- package/dist/kinds.d.ts +105 -13
- package/dist/kinds.d.ts.map +1 -1
- package/dist/kinds.js +369 -30
- package/dist/kinds.js.map +1 -1
- package/dist/link-add.d.ts +81 -0
- package/dist/link-add.d.ts.map +1 -0
- package/dist/link-add.js +94 -0
- package/dist/link-add.js.map +1 -0
- 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-findings.d.ts +132 -0
- package/dist/link-findings.d.ts.map +1 -0
- package/dist/link-findings.js +263 -0
- package/dist/link-findings.js.map +1 -0
- package/dist/link-types.d.ts +34 -0
- package/dist/link-types.d.ts.map +1 -0
- package/dist/link-types.js +79 -0
- package/dist/link-types.js.map +1 -0
- package/dist/links.d.ts +68 -9
- package/dist/links.d.ts.map +1 -1
- package/dist/links.js +370 -57
- package/dist/links.js.map +1 -1
- package/dist/local-search-index.d.ts +86 -0
- package/dist/local-search-index.d.ts.map +1 -0
- package/dist/local-search-index.js +1055 -0
- package/dist/local-search-index.js.map +1 -0
- package/dist/managed-document-metadata.d.ts +5 -0
- package/dist/managed-document-metadata.d.ts.map +1 -0
- package/dist/managed-document-metadata.js +10 -0
- package/dist/managed-document-metadata.js.map +1 -0
- package/dist/markdown-syntax.d.ts +39 -0
- package/dist/markdown-syntax.d.ts.map +1 -0
- package/dist/markdown-syntax.js +10170 -0
- package/dist/markdown-syntax.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 +40 -2
- package/dist/memory-backend.js.map +1 -1
- package/dist/mutation-attribution.d.ts +2 -1
- package/dist/mutation-attribution.d.ts.map +1 -1
- package/dist/mutation-attribution.js.map +1 -1
- package/dist/okf-actor.d.ts +14 -3
- package/dist/okf-actor.d.ts.map +1 -1
- package/dist/okf-actor.js +25 -4
- package/dist/okf-actor.js.map +1 -1
- package/dist/okf-authored-values.d.ts +2 -0
- package/dist/okf-authored-values.d.ts.map +1 -1
- package/dist/okf-authored-values.js +4 -0
- package/dist/okf-authored-values.js.map +1 -1
- package/dist/okf-authoring.d.ts +7 -0
- package/dist/okf-authoring.d.ts.map +1 -0
- package/dist/okf-authoring.js +30 -0
- package/dist/okf-authoring.js.map +1 -0
- package/dist/okf-standard-fields.d.ts +4 -0
- package/dist/okf-standard-fields.d.ts.map +1 -1
- package/dist/okf-standard-fields.js +24 -14
- package/dist/okf-standard-fields.js.map +1 -1
- package/dist/okf-timestamps.d.ts +2 -2
- package/dist/okf-timestamps.d.ts.map +1 -1
- package/dist/okf-timestamps.js +25 -15
- package/dist/okf-timestamps.js.map +1 -1
- package/dist/page.d.ts +3 -7
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +3 -7
- package/dist/page.js.map +1 -1
- package/dist/path-fold.d.ts +67 -0
- package/dist/path-fold.d.ts.map +1 -0
- package/dist/path-fold.js +107 -0
- package/dist/path-fold.js.map +1 -0
- package/dist/paths.d.ts +46 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +114 -1
- package/dist/paths.js.map +1 -1
- package/dist/platform.d.ts +13 -0
- 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-contract.d.ts +17 -0
- package/dist/portable-export-contract.d.ts.map +1 -0
- package/dist/portable-export-contract.js +59 -0
- package/dist/portable-export-contract.js.map +1 -0
- package/dist/portable-export.d.ts +115 -0
- package/dist/portable-export.d.ts.map +1 -0
- package/dist/portable-export.js +452 -0
- package/dist/portable-export.js.map +1 -0
- package/dist/portable-frontmatter.d.ts +17 -0
- package/dist/portable-frontmatter.d.ts.map +1 -1
- package/dist/portable-frontmatter.js +42 -5
- package/dist/portable-frontmatter.js.map +1 -1
- 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 +121 -0
- package/dist/qualified-links.js.map +1 -0
- package/dist/query-filter.d.ts +11 -4
- package/dist/query-filter.d.ts.map +1 -1
- package/dist/query-filter.js +25 -6
- package/dist/query-filter.js.map +1 -1
- package/dist/query-order.d.ts.map +1 -1
- package/dist/query-order.js +2 -1
- package/dist/query-order.js.map +1 -1
- 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 +134 -0
- package/dist/recipe-lifecycle/evolution.d.ts.map +1 -0
- package/dist/recipe-lifecycle/evolution.js +1047 -0
- package/dist/recipe-lifecycle/evolution.js.map +1 -0
- package/dist/recipe-lifecycle/index.d.ts +38 -0
- package/dist/recipe-lifecycle/index.d.ts.map +1 -0
- package/dist/recipe-lifecycle/index.js +31 -0
- package/dist/recipe-lifecycle/index.js.map +1 -0
- package/dist/recipe-lifecycle/install.d.ts +172 -0
- package/dist/recipe-lifecycle/install.d.ts.map +1 -0
- package/dist/recipe-lifecycle/install.js +652 -0
- package/dist/recipe-lifecycle/install.js.map +1 -0
- package/dist/recipe-lifecycle/legacy-aliases.d.ts +4 -0
- package/dist/recipe-lifecycle/legacy-aliases.d.ts.map +1 -0
- package/dist/recipe-lifecycle/legacy-aliases.js +22 -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/set-commit.d.ts +31 -0
- package/dist/recipe-lifecycle/set-commit.d.ts.map +1 -0
- package/dist/recipe-lifecycle/set-commit.js +37 -0
- package/dist/recipe-lifecycle/set-commit.js.map +1 -0
- package/dist/recipe-lifecycle/stamp.d.ts +146 -0
- package/dist/recipe-lifecycle/stamp.d.ts.map +1 -0
- package/dist/recipe-lifecycle/stamp.js +361 -0
- package/dist/recipe-lifecycle/stamp.js.map +1 -0
- package/dist/recipe-qualify.d.ts +80 -0
- package/dist/recipe-qualify.d.ts.map +1 -0
- package/dist/recipe-qualify.js +352 -0
- package/dist/recipe-qualify.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/recipe-sources.d.ts +209 -0
- package/dist/recipe-sources.d.ts.map +1 -0
- package/dist/recipe-sources.js +607 -0
- package/dist/recipe-sources.js.map +1 -0
- package/dist/recipes.d.ts +45 -1
- package/dist/recipes.d.ts.map +1 -1
- package/dist/recipes.js +138 -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 +523 -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 +86 -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 +52 -0
- package/dist/record-overlay/signal-text.d.ts.map +1 -0
- package/dist/record-overlay/signal-text.js +126 -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/relationships.d.ts +71 -0
- package/dist/relationships.d.ts.map +1 -0
- package/dist/relationships.js +87 -0
- package/dist/relationships.js.map +1 -0
- package/dist/remote-backend.d.ts +11 -21
- package/dist/remote-backend.d.ts.map +1 -1
- package/dist/remote-backend.js +20 -15
- 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-operations.d.ts +0 -41
- package/dist/remote-operations.d.ts.map +1 -1
- package/dist/remote-operations.js +14 -2
- package/dist/remote-operations.js.map +1 -1
- package/dist/remote-parsers.d.ts +19 -0
- package/dist/remote-parsers.d.ts.map +1 -1
- package/dist/remote-parsers.js.map +1 -1
- package/dist/remote.d.ts +2 -4
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +2 -3
- package/dist/remote.js.map +1 -1
- package/dist/reserved-write.d.ts +9 -0
- package/dist/reserved-write.d.ts.map +1 -0
- package/dist/reserved-write.js +15 -0
- package/dist/reserved-write.js.map +1 -0
- 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 +57 -0
- package/dist/search/backend-source.js.map +1 -0
- package/dist/search/contract.d.ts +162 -0
- package/dist/search/contract.d.ts.map +1 -0
- package/dist/search/contract.js +82 -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 +238 -0
- package/dist/search/memory-source.js.map +1 -0
- package/dist/search/rank.d.ts +29 -0
- package/dist/search/rank.d.ts.map +1 -0
- package/dist/search/rank.js +132 -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 +265 -0
- package/dist/search/search.js.map +1 -0
- package/dist/search/source.d.ts +70 -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 +49 -0
- package/dist/search/text.d.ts.map +1 -0
- package/dist/search/text.js +165 -0
- package/dist/search/text.js.map +1 -0
- package/dist/search-index.d.ts +9 -0
- package/dist/search-index.d.ts.map +1 -0
- package/dist/search-index.js +9 -0
- package/dist/search-index.js.map +1 -0
- package/dist/sha256.d.ts.map +1 -1
- package/dist/sha256.js +3 -2
- package/dist/sha256.js.map +1 -1
- 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/site-manifest.d.ts +51 -0
- package/dist/site-manifest.d.ts.map +1 -0
- package/dist/site-manifest.js +115 -0
- package/dist/site-manifest.js.map +1 -0
- package/dist/skip-reasons.d.ts +12 -0
- package/dist/skip-reasons.d.ts.map +1 -0
- package/dist/skip-reasons.js +15 -0
- package/dist/skip-reasons.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 +513 -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 +35 -0
- package/dist/source-engine/index.d.ts.map +1 -0
- package/dist/source-engine/index.js +27 -0
- package/dist/source-engine/index.js.map +1 -0
- package/dist/source-engine/machine-state.d.ts +87 -0
- package/dist/source-engine/machine-state.d.ts.map +1 -0
- package/dist/source-engine/machine-state.js +94 -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 +276 -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/target-consumer.d.ts +12 -0
- package/dist/source-engine/target-consumer.d.ts.map +1 -0
- package/dist/source-engine/target-consumer.js +15 -0
- package/dist/source-engine/target-consumer.js.map +1 -0
- package/dist/source-engine/target-descriptor.d.ts +3 -0
- package/dist/source-engine/target-descriptor.d.ts.map +1 -0
- package/dist/source-engine/target-descriptor.js +26 -0
- package/dist/source-engine/target-descriptor.js.map +1 -0
- package/dist/source-engine/target.d.ts +82 -0
- package/dist/source-engine/target.d.ts.map +1 -0
- package/dist/source-engine/target.js +213 -0
- package/dist/source-engine/target.js.map +1 -0
- package/dist/source-engine/types.d.ts +296 -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-harness/contract.d.ts +109 -0
- package/dist/storage-harness/contract.d.ts.map +1 -0
- package/dist/storage-harness/contract.js +853 -0
- package/dist/storage-harness/contract.js.map +1 -0
- package/dist/storage-harness/index.d.ts +39 -0
- package/dist/storage-harness/index.d.ts.map +1 -0
- package/dist/storage-harness/index.js +55 -0
- package/dist/storage-harness/index.js.map +1 -0
- package/dist/storage.d.ts +10 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +10 -2
- 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 +78 -0
- package/dist/string-identity-agreement.js.map +1 -0
- package/dist/system-documents.d.ts +82 -0
- package/dist/system-documents.d.ts.map +1 -0
- package/dist/system-documents.js +127 -0
- package/dist/system-documents.js.map +1 -0
- package/dist/types.d.ts +28 -4
- 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 +119 -6
- package/dist/uncertain-write.d.ts.map +1 -1
- package/dist/uncertain-write.js +67 -32
- package/dist/uncertain-write.js.map +1 -1
- package/dist/validation.d.ts +5 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/verification.d.ts +22 -10
- package/dist/verification.d.ts.map +1 -1
- package/dist/verification.js +87 -39
- package/dist/verification.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 +184 -10
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one answer to "which data in a bundle is Superbee's own?". A bundle holds people's documents
|
|
3
|
+
* and Superbee's own records side by side; {@link OWNED_LOCATIONS} is the only list of the latter.
|
|
4
|
+
* Every document belongs to exactly one {@link BundleSection}, answered by {@link sectionOf}.
|
|
5
|
+
*
|
|
6
|
+
* Each entry names where a kind of record lives (an exact id or a folder prefix) and its marker
|
|
7
|
+
* type. A record is Superbee's when it sits at its location AND carries its marker, so a person's
|
|
8
|
+
* `docs/bundle` of another type, or a non-Convention under `conventions/`, stays a document. Only
|
|
9
|
+
* a View (or retired Page) type claims its section wherever it appears: a misplaced View is a
|
|
10
|
+
* broken registration, not a person's document. Anything no entry claims is a document: a miss may
|
|
11
|
+
* show something, but it never hides a person's content.
|
|
12
|
+
*
|
|
13
|
+
* Two older questions read the same entries:
|
|
14
|
+
*
|
|
15
|
+
* - {@link isGraphDefinitionDocument}: a missing inbound link is intended, so `status` never
|
|
16
|
+
* calls the document an orphan.
|
|
17
|
+
* - {@link isSystemDocument}: no bundle Kind governs the document, so writing one never suggests
|
|
18
|
+
* a missing or misspelled Kind.
|
|
19
|
+
*
|
|
20
|
+
* Where a question reaches past an entry's location, the entry says so in `typeReach`.
|
|
21
|
+
*
|
|
22
|
+
* The format rule: existing locations are grandfathered; any NEW kind of Superbee-owned data lives
|
|
23
|
+
* under {@link SUPERBEE_RESERVED_ROOT_PREFIX}, which one entry already covers. A test walks core's
|
|
24
|
+
* exported location and marker constants and fails on any that no entry covers.
|
|
25
|
+
*
|
|
26
|
+
* This module stays small and browser-safe: entries are plain, serializable data, so another
|
|
27
|
+
* runtime (a database filter, for one) can render the same rule and test that it agrees. Large
|
|
28
|
+
* owners (connectors, document transfer) take their constants from here and re-export them; small
|
|
29
|
+
* owners are imported. The Site entry spells `site-manifest`'s constants as literals, pinned by a
|
|
30
|
+
* test: that module's typings ship alone in the publication package, and it builds a TextEncoder
|
|
31
|
+
* when loaded, which the global-free recipe bundles must not pull in.
|
|
32
|
+
*/
|
|
33
|
+
import { LEGACY_PAGE_TYPE_NAME } from "./bundle-health/legacy-page.js";
|
|
34
|
+
import { CONVENTION_TYPE, CONVENTIONS_PREFIX } from "./convention-record.js";
|
|
35
|
+
import { BUNDLE_NAME_DOC_ID, BUNDLE_NAME_DOC_TYPE, DEPENDENCIES_DOC_ID, DEPENDENCIES_DOC_TYPE } from "./dependencies.js";
|
|
36
|
+
import { PAGE_ENTRY_PREFIX, PAGE_REGISTRY_PREFIX, PAGE_TYPE_NAMES, VIEW_ENTRY_PREFIX, VIEW_REGISTRY_PREFIX } from "./page.js";
|
|
37
|
+
/** The marker type of a Connector declaration; re-exported by `connectors`. */
|
|
38
|
+
export const CONNECTOR_TYPE = "Connector";
|
|
39
|
+
/** Where Connector declarations live; re-exported by `connectors`. */
|
|
40
|
+
export const CONNECTORS_PREFIX = "connectors/";
|
|
41
|
+
/** The `type` of the record each document transfer writes; re-exported by `document-transfer`. */
|
|
42
|
+
export const PROMOTION_TYPE = "Promotion";
|
|
43
|
+
/** Where document transfer writes its records; re-exported by `document-transfer`. */
|
|
44
|
+
export const PROMOTIONS_PREFIX = "promotions/";
|
|
45
|
+
/** The marker type of an authoring reference a recipe installs. */
|
|
46
|
+
export const REFERENCE_TYPE = "Reference";
|
|
47
|
+
/** Where recipes install authoring references. */
|
|
48
|
+
export const REFERENCES_PREFIX = "references/";
|
|
49
|
+
/** Recipe sources, in a bundle that publishes recipes. */
|
|
50
|
+
export const RECIPES_PREFIX = "recipes/";
|
|
51
|
+
/**
|
|
52
|
+
* The reserved root for every NEW kind of Superbee-owned data. Nothing lives here yet. A leading
|
|
53
|
+
* underscore keeps it apart from folders people name (`superbee/` is a plausible folder of notes
|
|
54
|
+
* about Superbee); a leading dot would hide it from the filesystem walk, so it could hold no
|
|
55
|
+
* documents.
|
|
56
|
+
*/
|
|
57
|
+
export const SUPERBEE_RESERVED_ROOT_PREFIX = "_superbee/";
|
|
58
|
+
/** An OKF standard type. It is a person's document; no bundle Kind governs it. */
|
|
59
|
+
const ATTESTED_COMPUTATION_TYPE = "Attested Computation";
|
|
60
|
+
/** Every section, in display order. */
|
|
61
|
+
export const BUNDLE_SECTIONS = Object.freeze(["documents", "conventions", "views", "superbee"]);
|
|
62
|
+
const REACH_ORDER = ["kinds", "links", "section"];
|
|
63
|
+
const entry = (value) => Object.freeze(value);
|
|
64
|
+
/**
|
|
65
|
+
* Superbee's own records, first match wins. The only list: every surface that separates people's
|
|
66
|
+
* documents from Superbee's own reads this, or a rendering of it checked to agree.
|
|
67
|
+
*/
|
|
68
|
+
export const OWNED_LOCATIONS = Object.freeze([
|
|
69
|
+
entry({ name: "convention", section: "conventions", prefix: CONVENTIONS_PREFIX, type: CONVENTION_TYPE, typeReach: "links" }),
|
|
70
|
+
entry({ name: "view", section: "views", prefix: VIEW_REGISTRY_PREFIX, type: PAGE_TYPE_NAMES[0], blobPrefix: VIEW_ENTRY_PREFIX, typeReach: "section" }),
|
|
71
|
+
entry({ name: "legacy-view-location", section: "views", prefix: PAGE_REGISTRY_PREFIX, type: PAGE_TYPE_NAMES[0], blobPrefix: PAGE_ENTRY_PREFIX }),
|
|
72
|
+
entry({ name: "legacy-page", section: "views", prefix: PAGE_REGISTRY_PREFIX, type: LEGACY_PAGE_TYPE_NAME, typeReach: "section" }),
|
|
73
|
+
entry({ name: "connector", section: "superbee", prefix: CONNECTORS_PREFIX, type: CONNECTOR_TYPE, typeReach: "kinds" }),
|
|
74
|
+
entry({ name: "site", section: "superbee", prefix: "sites/", type: "Site", typeReach: "kinds" }),
|
|
75
|
+
entry({ name: "promotion", section: "superbee", prefix: PROMOTIONS_PREFIX, type: PROMOTION_TYPE, typeReach: "kinds" }),
|
|
76
|
+
// A recipe's authoring guides sit with its definitions; a Reference anywhere else is a person's document.
|
|
77
|
+
entry({ name: "reference", section: "conventions", prefix: REFERENCES_PREFIX, type: REFERENCE_TYPE }),
|
|
78
|
+
entry({ name: "recipe-source", section: "superbee", prefix: RECIPES_PREFIX }),
|
|
79
|
+
entry({ name: "bundle-name", section: "superbee", id: BUNDLE_NAME_DOC_ID, type: BUNDLE_NAME_DOC_TYPE }),
|
|
80
|
+
entry({ name: "bundle-dependencies", section: "superbee", id: DEPENDENCIES_DOC_ID, type: DEPENDENCIES_DOC_TYPE }),
|
|
81
|
+
entry({ name: "reserved-root", section: "superbee", prefix: SUPERBEE_RESERVED_ROOT_PREFIX }),
|
|
82
|
+
// Not Superbee's data: listed only because no bundle Kind governs this OKF standard type.
|
|
83
|
+
entry({ name: "attested-computation", section: "documents", type: ATTESTED_COMPUTATION_TYPE, typeReach: "kinds" }),
|
|
84
|
+
]);
|
|
85
|
+
/**
|
|
86
|
+
* The top-level folders that hold only Superbee's own files, so an ordinary blob write never
|
|
87
|
+
* changes them: the first segment of every entry's folder and blob folder. An entry at an exact id
|
|
88
|
+
* (`docs/bundle`) claims no folder.
|
|
89
|
+
*/
|
|
90
|
+
export const OWNED_BLOB_ROOTS = Object.freeze([...new Set(OWNED_LOCATIONS.flatMap((owned) => [owned.prefix, owned.blobPrefix].flatMap((prefix) => prefix === undefined ? [] : [prefix.split("/")[0]])))]);
|
|
91
|
+
function typeOf(doc) {
|
|
92
|
+
return typeof doc.frontmatter.type === "string" ? doc.frontmatter.type : undefined;
|
|
93
|
+
}
|
|
94
|
+
/** True when the document sits at the entry's location and carries its marker. Type-only entries have no location. */
|
|
95
|
+
function atLocation(owned, doc) {
|
|
96
|
+
const placed = owned.id !== undefined ? doc.id === owned.id : owned.prefix !== undefined && doc.id.startsWith(owned.prefix);
|
|
97
|
+
return placed && (owned.type === undefined || typeOf(doc) === owned.type);
|
|
98
|
+
}
|
|
99
|
+
/** True when the entry's marker type reaches the document wherever it lives, at least as far as `reach`. */
|
|
100
|
+
function reaches(owned, doc, reach) {
|
|
101
|
+
return owned.typeReach !== undefined && owned.type === typeOf(doc) &&
|
|
102
|
+
REACH_ORDER.indexOf(owned.typeReach) >= REACH_ORDER.indexOf(reach);
|
|
103
|
+
}
|
|
104
|
+
function claimedAs(doc, reach) {
|
|
105
|
+
return OWNED_LOCATIONS.find((owned) => atLocation(owned, doc) || reaches(owned, doc, reach));
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The entry that places a document in its section, or undefined for a person's document. Its
|
|
109
|
+
* `name` tells kinds apart inside one section (a Convention from a Reference, say).
|
|
110
|
+
*/
|
|
111
|
+
export function ownedLocationOf(doc) {
|
|
112
|
+
const owned = claimedAs(doc, "section");
|
|
113
|
+
return owned?.section === "documents" ? undefined : owned;
|
|
114
|
+
}
|
|
115
|
+
/** The one section a document belongs to; anything no entry claims is `documents`. */
|
|
116
|
+
export function sectionOf(doc) {
|
|
117
|
+
return ownedLocationOf(doc)?.section ?? "documents";
|
|
118
|
+
}
|
|
119
|
+
/** A document whose missing inbound link is intended: any owned record at its location, or a type that reaches links. */
|
|
120
|
+
export function isGraphDefinitionDocument(doc) {
|
|
121
|
+
return claimedAs(doc, "links") !== undefined;
|
|
122
|
+
}
|
|
123
|
+
/** A document no bundle Kind governs: a graph definition, or a type reserved from Kinds. */
|
|
124
|
+
export function isSystemDocument(doc) {
|
|
125
|
+
return claimedAs(doc, "kinds") !== undefined;
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=system-documents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-documents.js","sourceRoot":"","sources":["../src/system-documents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACzH,OAAO,EAAE,iBAAiB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CAAC,GAAqB;IAC7D,OAAO,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,SAAS,CAAC;AAC/C,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,gBAAgB,CAAC,GAAqB;IACpD,OAAO,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,SAAS,CAAC;AAC/C,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { BodyReplacePosture } from "./body-replace-guards.js";
|
|
2
|
+
import type { WalkPathClass } from "./paths.js";
|
|
1
3
|
/**
|
|
2
4
|
* Shared type shapes for the OKF store engine.
|
|
3
5
|
*
|
|
@@ -5,7 +7,7 @@
|
|
|
5
7
|
* here so the implementation modules can import them without a cycle, and are
|
|
6
8
|
* re-exported verbatim from `index.ts` to keep the public contract stable.
|
|
7
9
|
*
|
|
8
|
-
* @see OKF spec — GoogleCloudPlatform/knowledge-
|
|
10
|
+
* @see OKF spec — GoogleCloudPlatform/open-knowledge-format, `SPEC.md`
|
|
9
11
|
* @packageDocumentation
|
|
10
12
|
*/
|
|
11
13
|
/**
|
|
@@ -140,7 +142,8 @@ export interface ReadBlobResult {
|
|
|
140
142
|
export interface VersionInfo {
|
|
141
143
|
/** Opaque content-addressed version token for this revision. */
|
|
142
144
|
version: Version;
|
|
143
|
-
/** Who wrote this revision.
|
|
145
|
+
/** Who wrote this revision. History-keeping backends default at write time to a local identity.
|
|
146
|
+
* FilesystemBackend reports `unattributed` when document bytes carry no mutation attribution. */
|
|
144
147
|
actor: string;
|
|
145
148
|
/** ISO-8601 instant this revision was recorded. */
|
|
146
149
|
timestamp: string;
|
|
@@ -155,6 +158,10 @@ export interface VersionInfo {
|
|
|
155
158
|
}
|
|
156
159
|
/** Options controlling a conditional / attributed {@link StorageBackend.write}. */
|
|
157
160
|
export interface WriteOptions {
|
|
161
|
+
/** Explicit per-document replacement intent carried by RemoteBackend to the wire authority.
|
|
162
|
+
* Raw storage adapters ignore it; it grants no metadata/Kind policy bypass.
|
|
163
|
+
*/
|
|
164
|
+
bodyReplace?: BodyReplacePosture;
|
|
158
165
|
/**
|
|
159
166
|
* Compare-and-swap guard. When set to a {@link Version} token, the write succeeds
|
|
160
167
|
* ONLY if the backend's current version for `id` equals that token; otherwise it
|
|
@@ -247,6 +254,8 @@ export interface StorageCapabilities {
|
|
|
247
254
|
* identity of the returned document even when the input document carries a different `id`.
|
|
248
255
|
*/
|
|
249
256
|
export interface StorageBackend {
|
|
257
|
+
/** Optional exact-store cooperating-writer inventory comparison plus one concept write. */
|
|
258
|
+
readonly inventoryGuard?: import("./inventory-guard.js").InventoryGuard;
|
|
250
259
|
/** Read + parse the concept document at `id`, with its version token. Rejects (ENOENT-shaped) if absent. */
|
|
251
260
|
read(id: ConceptId): Promise<ReadResult>;
|
|
252
261
|
/**
|
|
@@ -329,6 +338,12 @@ export interface StorageBackend {
|
|
|
329
338
|
existsBlob(key: BlobKey): Promise<boolean>;
|
|
330
339
|
/** Blob keys, optionally restricted to a bundle-relative `prefix`, sorted. Never includes concept documents or reserved files. */
|
|
331
340
|
listBlobs(prefix?: string): Promise<BlobKey[]>;
|
|
341
|
+
/**
|
|
342
|
+
* Optional: where a root-relative path reported by a native directory watcher sits relative to
|
|
343
|
+
* what this backend reads. A backend with no walkable file layout omits it, and a watcher then
|
|
344
|
+
* treats every notification as relevant.
|
|
345
|
+
*/
|
|
346
|
+
classifyChangedPath?(relPath: string): WalkPathClass;
|
|
332
347
|
/**
|
|
333
348
|
* Hard-delete the blob at `key` (no tombstone, no history to purge — blobs never
|
|
334
349
|
* carried one). Returns `true` when a blob existed and was removed, `false` when it
|
|
@@ -371,6 +386,8 @@ export interface StorageBackend {
|
|
|
371
386
|
* cross-process CAS and retained history are now intentionally different capabilities.
|
|
372
387
|
*/
|
|
373
388
|
capabilities?(): StorageCapabilities;
|
|
389
|
+
/** Derived authored links and endpoint titles at the filesystem scan's current observations. */
|
|
390
|
+
relationshipSources?(options?: import("./document-scan.js").QueryOptions): Promise<import("./relationships.js").RelationshipSource[] | undefined>;
|
|
374
391
|
}
|
|
375
392
|
/** Options for {@link initBundle}. */
|
|
376
393
|
export interface InitBundleOptions {
|
|
@@ -385,6 +402,8 @@ export interface InitBundleOptions {
|
|
|
385
402
|
}
|
|
386
403
|
/** Filter for {@link query}. Provided facets are ANDed; reserved files are always excluded. */
|
|
387
404
|
export interface QueryFilter {
|
|
405
|
+
/** Exclude records of type Convention under the canonical conventions/ prefix. */
|
|
406
|
+
excludeConventions?: boolean;
|
|
388
407
|
/** Restrict to concepts whose frontmatter `type` equals this value. */
|
|
389
408
|
type?: string;
|
|
390
409
|
/** Restrict to concepts carrying ALL of these tags. */
|
|
@@ -428,6 +447,11 @@ export interface Link {
|
|
|
428
447
|
text: string;
|
|
429
448
|
/** The raw target as written in the markdown, before resolution (e.g. `/a/b.md`, `./x.md`). */
|
|
430
449
|
href: string;
|
|
450
|
+
/**
|
|
451
|
+
* Set only on a cross-bundle edge (`okf://<alias>/<path>.md`): the declared alias of the bundle
|
|
452
|
+
* `to` lives in. Absent on every local link, so local edge output is unchanged.
|
|
453
|
+
*/
|
|
454
|
+
bundle?: string;
|
|
431
455
|
}
|
|
432
456
|
/**
|
|
433
457
|
* Filter for {@link queryEdges} — the whole-bundle derived edge list, filtered. `from`/`to` each
|
|
@@ -453,7 +477,7 @@ export type FreshnessVerdict = "fresh" | "stale" | "empty";
|
|
|
453
477
|
export interface FreshnessOptions {
|
|
454
478
|
/** Instant to compare against; defaults to "now". */
|
|
455
479
|
now?: Date;
|
|
456
|
-
/** Bundle edition; v0.2
|
|
480
|
+
/** Bundle edition; v0.2 and v0.3 interpret the standard `stale_after` field. */
|
|
457
481
|
okfVersion?: string;
|
|
458
482
|
/** Maximum age before a concept is judged `stale`. */
|
|
459
483
|
maxAgeMs?: number;
|
|
@@ -462,7 +486,7 @@ export interface FreshnessOptions {
|
|
|
462
486
|
}
|
|
463
487
|
/** The outcome of a {@link freshness} judgment. */
|
|
464
488
|
export interface FreshnessResult {
|
|
465
|
-
/** `
|
|
489
|
+
/** `empty` means freshness is unknown because a usable clock is missing or an explicit deadline is invalid. */
|
|
466
490
|
verdict: FreshnessVerdict;
|
|
467
491
|
/** Age in milliseconds relative to the comparison instant, when a meaningful-change time was present. */
|
|
468
492
|
ageMs?: number;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;;;;;;GAOG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,uJAAuJ;IACvJ,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iHAAiH;IACjH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iFAAiF;IACjF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,qFAAqF;AACrF,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,EAAE,EAAE,SAAS,CAAC;IACd,+BAA+B;IAC/B,WAAW,EAAE,WAAW,CAAC;IACzB,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;CACd;AAED,+EAA+E;AAC/E,MAAM,WAAW,MAAM;IACrB,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,OAAO,CAAC,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gB;IAC/B,qDAAqD;IACrD,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iGAAiG;IACjG,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,mDAAmD;AACnD,MAAM,WAAW,eAAe;IAC9B,+GAA+G;IAC/G,OAAO,EAAE,gBAAgB,CAAC;IAC1B,yGAAyG;IACzG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/dist/types.js
CHANGED
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared type shapes for the OKF store engine.
|
|
3
|
-
*
|
|
4
|
-
* These are the contract types originally sketched in `index.ts`; they are kept
|
|
5
|
-
* here so the implementation modules can import them without a cycle, and are
|
|
6
|
-
* re-exported verbatim from `index.ts` to keep the public contract stable.
|
|
7
|
-
*
|
|
8
|
-
* @see OKF spec — GoogleCloudPlatform/knowledge-catalog, `okf/SPEC.md`
|
|
9
|
-
* @packageDocumentation
|
|
10
|
-
*/
|
|
11
1
|
export {};
|
|
12
2
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* `sleep` used for the submission deadline and the delay between lookups; there is no
|
|
16
16
|
* injectable clock, and a transport's own latency is real.
|
|
17
17
|
*/
|
|
18
|
+
import type { BodyReplacePosture } from "./body-replace-guards.js";
|
|
18
19
|
import type { Version } from "./types.js";
|
|
19
20
|
/**
|
|
20
21
|
* The operation an intent performs: a whole-document write, or `document.delete` (the document
|
|
@@ -32,6 +33,10 @@ export interface OperationIntent {
|
|
|
32
33
|
/** Durable request identity: minted once at record time, reused verbatim on every retry. */
|
|
33
34
|
requestId: string;
|
|
34
35
|
kind: OperationKind;
|
|
36
|
+
/** Explicit whole-document edit intent, captured durably with this request identity.
|
|
37
|
+
* Absent on legacy/automatic writes, which retain body-replacement protection.
|
|
38
|
+
*/
|
|
39
|
+
readonly bodyReplace?: Readonly<BodyReplacePosture>;
|
|
35
40
|
/** The target the operation applies to; a concept id for `document.write`. */
|
|
36
41
|
target: string;
|
|
37
42
|
/**
|
|
@@ -43,6 +48,13 @@ export interface OperationIntent {
|
|
|
43
48
|
* conflict.
|
|
44
49
|
*/
|
|
45
50
|
recreates?: Version;
|
|
51
|
+
/**
|
|
52
|
+
* The content producer a whole-document write names to the authority (a hosted push's
|
|
53
|
+
* `X-Superbee-Producer`): recorded with the intent when it is queued and sent as recorded on
|
|
54
|
+
* every submission and lookup, never recomputed from `content`, so a lookup names what its
|
|
55
|
+
* write named. Absent: the authority records its own producer.
|
|
56
|
+
*/
|
|
57
|
+
producer?: string;
|
|
46
58
|
/** The shared version the local edit was made against, or `null` for a create. */
|
|
47
59
|
base: Version | null;
|
|
48
60
|
/** The content-addressed version of `content`. */
|
|
@@ -73,21 +85,98 @@ export type Outcome = {
|
|
|
73
85
|
kind: "conflict";
|
|
74
86
|
actual: Version | null;
|
|
75
87
|
tombstone?: Version;
|
|
76
|
-
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* `executed` is present only on a refusal that is not the identity's recorded answer: `false`
|
|
91
|
+
* when this attempt was refused before it could execute (nothing was sent, or the authority
|
|
92
|
+
* refused it before dispatch), `"unknown"` when the authority's answer does not say. Such a
|
|
93
|
+
* refusal is evidence about this attempt only, never about an earlier delivery of the identity.
|
|
94
|
+
*/
|
|
95
|
+
| {
|
|
77
96
|
kind: "refused";
|
|
78
97
|
code: string;
|
|
79
98
|
message: string;
|
|
80
|
-
|
|
99
|
+
executed?: false | "unknown";
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* `refusal` names the attempt-only refusal that ended the call, when one did: a resend refused
|
|
103
|
+
* before execution while an earlier delivery may still be held. The identity stays unknown;
|
|
104
|
+
* the refusal says why it could not be settled now (for example, access withdrawn).
|
|
105
|
+
*/
|
|
106
|
+
| {
|
|
81
107
|
kind: "unknown";
|
|
108
|
+
refusal?: {
|
|
109
|
+
code: string;
|
|
110
|
+
message: string;
|
|
111
|
+
};
|
|
82
112
|
};
|
|
113
|
+
/**
|
|
114
|
+
* A lookup's answer that the authority holds the identity without a result yet: a delivery of
|
|
115
|
+
* it was admitted and may still commit. Distinct from `null`, which says it was never admitted.
|
|
116
|
+
*/
|
|
117
|
+
export interface LookupPending {
|
|
118
|
+
kind: "pending";
|
|
119
|
+
}
|
|
120
|
+
/** The one {@link LookupPending} answer. */
|
|
121
|
+
export declare const LOOKUP_PENDING: LookupPending;
|
|
83
122
|
/** A transport to a shared authority that records outcomes by request identity. */
|
|
84
123
|
export interface OperationTransport {
|
|
85
124
|
/** Deliver the intent once; a repeated `requestId` must return the recorded outcome unchanged. */
|
|
86
125
|
submit(intent: OperationIntent, options?: {
|
|
87
126
|
signal?: AbortSignal;
|
|
88
127
|
}): Promise<Outcome>;
|
|
89
|
-
/**
|
|
90
|
-
|
|
128
|
+
/**
|
|
129
|
+
* The recorded outcome for `requestId`; {@link LookupPending} when the authority holds it
|
|
130
|
+
* unanswered; or `null` when the authority never recorded it. A transport that cannot tell
|
|
131
|
+
* pending from absent answers `null` for both.
|
|
132
|
+
*/
|
|
133
|
+
lookup(requestId: string): Promise<Outcome | LookupPending | null>;
|
|
134
|
+
}
|
|
135
|
+
/** Minimal classification for recorded-only delivery. A commit need not invent a new-head
|
|
136
|
+
* version (for example, an identified blob delete can carry its complete absence receipt). */
|
|
137
|
+
export interface NonExecutedAttempt {
|
|
138
|
+
kind: "not-executed";
|
|
139
|
+
attempts: number;
|
|
140
|
+
details: unknown;
|
|
141
|
+
}
|
|
142
|
+
export type RecordedWriteOutcome = NonExecutedAttempt | {
|
|
143
|
+
kind: "committed";
|
|
144
|
+
} | {
|
|
145
|
+
kind: "conflict";
|
|
146
|
+
} | {
|
|
147
|
+
kind: "refused";
|
|
148
|
+
code: string;
|
|
149
|
+
message: string;
|
|
150
|
+
} | {
|
|
151
|
+
kind: "unknown";
|
|
152
|
+
};
|
|
153
|
+
export type RecordedWriteIntent = Pick<OperationIntent, "requestId" | "kind" | "target" | "createdAt" | "attempts" | "state"> & {
|
|
154
|
+
/** Opt-in qualification; old no-prefix explicit callers retain their contract. */
|
|
155
|
+
notAppliedThrough?: number;
|
|
156
|
+
};
|
|
157
|
+
export interface RecordedWriteTransport<I extends RecordedWriteIntent, O extends RecordedWriteOutcome> {
|
|
158
|
+
submit(intent: I, options?: {
|
|
159
|
+
signal?: AbortSignal;
|
|
160
|
+
}): Promise<O>;
|
|
161
|
+
/** Null/absence is inconclusive and NEVER grants this path permission to submit. */
|
|
162
|
+
lookup(requestId: string): Promise<O | null>;
|
|
163
|
+
}
|
|
164
|
+
/** Explicit starts are for callers that own persistence, not proof minted by this primitive.
|
|
165
|
+
* submit-claimed requires a freshly successful durable in_flight CAS, held under the checkout
|
|
166
|
+
* lock, immediately before this call; its counted attempt is sent at most once. After reopening,
|
|
167
|
+
* or when that freshness cannot be established, use lookup. Replaying a stored claim is NOT a
|
|
168
|
+
* fresh CAS. Nor does a new CAS prove an earlier unclear delivery cannot still commit: those
|
|
169
|
+
* identities must use lookup. This function creates no ticket or journal persistence itself. */
|
|
170
|
+
export type RecordedWriteOptions = Omit<UncertainWriteOptions, "settlement" | "maxSubmissions" | "earlierDeliveryUnclear"> & {
|
|
171
|
+
settlement: "recorded-only";
|
|
172
|
+
start: "submit-claimed" | "lookup";
|
|
173
|
+
};
|
|
174
|
+
export interface RecordedWriteResult<I extends RecordedWriteIntent, O extends RecordedWriteOutcome> {
|
|
175
|
+
intent: Omit<I, "attempts" | "state"> & Pick<RecordedWriteIntent, "attempts" | "state">;
|
|
176
|
+
outcome: O | {
|
|
177
|
+
kind: "unknown";
|
|
178
|
+
};
|
|
179
|
+
lookups: number;
|
|
91
180
|
}
|
|
92
181
|
/** Wait `ms`, resolving early and harmlessly when `signal` aborts. Injected by tests. */
|
|
93
182
|
export type Sleep = (ms: number, signal?: AbortSignal) => Promise<void>;
|
|
@@ -104,6 +193,20 @@ export interface UncertainWriteOptions {
|
|
|
104
193
|
maxSubmissions?: number;
|
|
105
194
|
/** Timer; defaults to a `setTimeout` sleep. */
|
|
106
195
|
sleep?: Sleep;
|
|
196
|
+
/**
|
|
197
|
+
* Ends the call early once aborted: no further lookup or resubmission starts, the wait between
|
|
198
|
+
* lookups is cut short, and the outcome is `unknown` unless one was already known. Absent, the
|
|
199
|
+
* call runs every lookup and submission it is permitted.
|
|
200
|
+
*/
|
|
201
|
+
signal?: AbortSignal;
|
|
202
|
+
/**
|
|
203
|
+
* The intent's earlier submission, made by an earlier call, ended without a definitive answer
|
|
204
|
+
* (its outcome was unknown, or the call stopped while it was in flight). A resubmission refused
|
|
205
|
+
* before execution is then `unknown`, as one after an unclear submission in this call is.
|
|
206
|
+
* Default false: an earlier submission answered with such a refusal (a paused intent requeued)
|
|
207
|
+
* may be resent and refused again definitively.
|
|
208
|
+
*/
|
|
209
|
+
earlierDeliveryUnclear?: boolean;
|
|
107
210
|
}
|
|
108
211
|
export interface UncertainWriteResult {
|
|
109
212
|
/** The intent with `attempts` and `state` advanced to reflect this call. */
|
|
@@ -119,9 +222,9 @@ export interface UncertainWriteResult {
|
|
|
119
222
|
*/
|
|
120
223
|
export declare const AUTHORIZATION_REFUSAL_CODES: ReadonlySet<string>;
|
|
121
224
|
/** True when a refusal reports lost permission, which pauses further shared operations. */
|
|
122
|
-
export declare function isAuthorizationRefusal(outcome: Outcome): boolean;
|
|
225
|
+
export declare function isAuthorizationRefusal(outcome: Outcome | RecordedWriteOutcome): boolean;
|
|
123
226
|
/** The journal state an outcome settles an intent into. */
|
|
124
|
-
export declare function stateForOutcome(outcome: Outcome): OperationState;
|
|
227
|
+
export declare function stateForOutcome(outcome: Outcome | RecordedWriteOutcome): OperationState;
|
|
125
228
|
/** The longest request identity the wire accepts as `Idempotency-Key`. */
|
|
126
229
|
export declare const REQUEST_ID_MAX_LENGTH = 128;
|
|
127
230
|
/**
|
|
@@ -171,8 +274,18 @@ export declare function settleAgainstIntent(outcome: Outcome, intent: OperationI
|
|
|
171
274
|
* transport never answers `null` for an absent record once the intent is older than the host's
|
|
172
275
|
* stated retention window, less a skew margin, so it does not resubmit there.
|
|
173
276
|
*
|
|
277
|
+
* A refusal before execution ({@link isAuthorizationRefusal}) of a resubmission that follows an
|
|
278
|
+
* unclear submission (in this call, or an earlier one per `earlierDeliveryUnclear`) is `unknown`,
|
|
279
|
+
* carrying that refusal, not settled: a `null` lookup cannot prove an earlier delivery will not
|
|
280
|
+
* still arrive, and the delivery can still commit. After a {@link LookupPending} answer, which
|
|
281
|
+
* says a delivery is held, the same holds for every refusal the transport marks `executed`
|
|
282
|
+
* (a gateway's `400` included). A pending lookup still permits the resubmission.
|
|
283
|
+
*
|
|
174
284
|
* By default every outcome passes through {@link settleAgainstIntent}, so a conflict naming the
|
|
175
285
|
* intent's own version is committed. `recorded-only` preserves the recorded outcome instead.
|
|
176
286
|
*/
|
|
287
|
+
export declare function performUncertainWrite<I extends RecordedWriteIntent, O extends RecordedWriteOutcome>(transport: RecordedWriteTransport<I, O>, intent: I, options: RecordedWriteOptions): Promise<RecordedWriteResult<I, O>>;
|
|
288
|
+
/** Compatibility path: a complete document intent, with the existing counters/resubmission
|
|
289
|
+
* defaults. Body delivery's recorded-only call without start remains on this path. */
|
|
177
290
|
export declare function performUncertainWrite(transport: OperationTransport, intent: OperationIntent, options?: UncertainWriteOptions): Promise<UncertainWriteResult>;
|
|
178
291
|
//# sourceMappingURL=uncertain-write.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uncertain-write.d.ts","sourceRoot":"","sources":["../src/uncertain-write.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEjF;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAE3G,wDAAwD;AACxD,MAAM,WAAW,eAAe;IAC9B,4FAA4F;IAC5F,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC;IACpB,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kFAAkF;IAClF,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,kDAAkD;IAClD,KAAK,EAAE,OAAO,CAAC;IACf,kFAAkF;IAClF,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,cAAc,CAAC;CACvB;AAED,uDAAuD;AACvD,MAAM,MAAM,OAAO,GACf;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE;AACzC;;;;;GAKG;GACD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE
|
|
1
|
+
{"version":3,"file":"uncertain-write.d.ts","sourceRoot":"","sources":["../src/uncertain-write.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE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