@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,182 @@
|
|
|
1
|
+
/** The one runtime-neutral YAML loader for frontmatter and other untrusted YAML values. */
|
|
2
|
+
import yaml from "js-yaml";
|
|
3
|
+
import { FrontmatterLimitError } from "./frontmatter-contract.js";
|
|
4
|
+
/**
|
|
5
|
+
* Limits every YAML load applies, all measured on the loaded value with aliases expanded.
|
|
6
|
+
* `sourceChars` counts UTF-16 code units of the YAML source. `depth` counts nested mappings and
|
|
7
|
+
* sequences, the root included, whether written in block or flow style. `aliases` counts alias
|
|
8
|
+
* uses of any node. `expandedNodes` counts every node and `expandedChars` the string and mapping
|
|
9
|
+
* key characters a full traversal visits. A loaded value never contains a cycle.
|
|
10
|
+
*/
|
|
11
|
+
export const FRONTMATTER_LIMITS = Object.freeze({
|
|
12
|
+
sourceChars: 256 * 1024,
|
|
13
|
+
depth: 32,
|
|
14
|
+
aliases: 1_000,
|
|
15
|
+
expandedNodes: 100_000,
|
|
16
|
+
expandedChars: 1024 * 1024,
|
|
17
|
+
});
|
|
18
|
+
/** Parser nesting allowed before the value can be measured; a stack guard, not the depth rule. */
|
|
19
|
+
const PARSE_NESTING_GUARD = FRONTMATTER_LIMITS.depth * 4;
|
|
20
|
+
function tooDeep() {
|
|
21
|
+
return new FrontmatterLimitError("FRONTMATTER_TOO_DEEP", `YAML nesting is deeper than ${FRONTMATTER_LIMITS.depth} levels`);
|
|
22
|
+
}
|
|
23
|
+
function tooLarge() {
|
|
24
|
+
return new FrontmatterLimitError("FRONTMATTER_ALIAS_LIMIT", `YAML aliases expand to more than ${FRONTMATTER_LIMITS.expandedNodes} nodes or ${FRONTMATTER_LIMITS.expandedChars} characters`);
|
|
25
|
+
}
|
|
26
|
+
function cycle() {
|
|
27
|
+
return new FrontmatterLimitError("FRONTMATTER_CYCLE", "YAML aliases form a cycle");
|
|
28
|
+
}
|
|
29
|
+
function scalarExtent(value) {
|
|
30
|
+
// Binary scalars serialize at least one character per byte, so they count against the same cap.
|
|
31
|
+
const chars = typeof value === "string" ? value.length : ArrayBuffer.isView(value) ? value.byteLength : 0;
|
|
32
|
+
return { nodes: 1, chars, depth: 0 };
|
|
33
|
+
}
|
|
34
|
+
function isCollection(value) {
|
|
35
|
+
if (Array.isArray(value))
|
|
36
|
+
return true;
|
|
37
|
+
if (value === null || typeof value !== "object")
|
|
38
|
+
return false;
|
|
39
|
+
const prototype = Object.getPrototypeOf(value);
|
|
40
|
+
return prototype === Object.prototype || prototype === null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Measures values with aliases expanded, reusing the extent of a collection that is referenced
|
|
44
|
+
* more than once. Mapping keys count toward characters. A reference to a collection on the current
|
|
45
|
+
* path, or to an anchored collection the parser is still filling, is a cycle and is refused.
|
|
46
|
+
*/
|
|
47
|
+
class ExtentMeter {
|
|
48
|
+
known = new Map();
|
|
49
|
+
path = new Set();
|
|
50
|
+
unfinished;
|
|
51
|
+
constructor(unfinished = new Set()) {
|
|
52
|
+
this.unfinished = unfinished;
|
|
53
|
+
}
|
|
54
|
+
measure(value) {
|
|
55
|
+
if (!isCollection(value))
|
|
56
|
+
return scalarExtent(value);
|
|
57
|
+
const known = this.known.get(value);
|
|
58
|
+
if (known !== undefined)
|
|
59
|
+
return known;
|
|
60
|
+
if (this.path.has(value) || this.unfinished.has(value))
|
|
61
|
+
throw cycle();
|
|
62
|
+
return this.walk(value);
|
|
63
|
+
}
|
|
64
|
+
walk(value) {
|
|
65
|
+
if (this.path.size >= FRONTMATTER_LIMITS.depth)
|
|
66
|
+
throw tooDeep();
|
|
67
|
+
this.path.add(value);
|
|
68
|
+
const keyed = !Array.isArray(value);
|
|
69
|
+
const extent = { nodes: 1, chars: 0, depth: 1 };
|
|
70
|
+
for (const [key, child] of Object.entries(value)) {
|
|
71
|
+
const inner = this.measure(child);
|
|
72
|
+
extent.nodes += inner.nodes;
|
|
73
|
+
extent.chars += inner.chars + (keyed ? key.length : 0);
|
|
74
|
+
extent.depth = Math.max(extent.depth, inner.depth + 1);
|
|
75
|
+
if (extent.nodes > FRONTMATTER_LIMITS.expandedNodes || extent.chars > FRONTMATTER_LIMITS.expandedChars)
|
|
76
|
+
throw tooLarge();
|
|
77
|
+
if (extent.depth > FRONTMATTER_LIMITS.depth)
|
|
78
|
+
throw tooDeep();
|
|
79
|
+
}
|
|
80
|
+
this.path.delete(value);
|
|
81
|
+
this.known.set(value, extent);
|
|
82
|
+
return extent;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Charges each alias as the parser resolves it, so expansion work done while parsing (merge keys,
|
|
87
|
+
* collection keys) stays within the same budget as the loaded value.
|
|
88
|
+
*/
|
|
89
|
+
class AliasBudget {
|
|
90
|
+
unfinished = new Set();
|
|
91
|
+
finished = new Set();
|
|
92
|
+
meter = new ExtentMeter(this.unfinished);
|
|
93
|
+
aliases = 0;
|
|
94
|
+
nodes = 0;
|
|
95
|
+
chars = 0;
|
|
96
|
+
/** Wrap the parser's anchor table; the parser reads it only to resolve an alias. */
|
|
97
|
+
watch(state) {
|
|
98
|
+
state.anchorMap = new Proxy(state.anchorMap, {
|
|
99
|
+
get: (target, name, receiver) => {
|
|
100
|
+
const value = Reflect.get(target, name, receiver);
|
|
101
|
+
if (typeof name === "string")
|
|
102
|
+
this.charge(name, value);
|
|
103
|
+
return value;
|
|
104
|
+
},
|
|
105
|
+
set: (target, name, value, receiver) => {
|
|
106
|
+
if (typeof name === "string") {
|
|
107
|
+
this.finished.delete(name);
|
|
108
|
+
if (isCollection(value))
|
|
109
|
+
this.unfinished.add(value);
|
|
110
|
+
}
|
|
111
|
+
return Reflect.set(target, name, value, receiver);
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/** Called when an anchored node closes: its anchor now names a complete value. */
|
|
116
|
+
close(anchor, value) {
|
|
117
|
+
this.finished.add(anchor);
|
|
118
|
+
if (isCollection(value))
|
|
119
|
+
this.unfinished.delete(value);
|
|
120
|
+
}
|
|
121
|
+
charge(name, value) {
|
|
122
|
+
this.aliases += 1;
|
|
123
|
+
if (this.aliases > FRONTMATTER_LIMITS.aliases) {
|
|
124
|
+
throw new FrontmatterLimitError("FRONTMATTER_ALIAS_LIMIT", `YAML aliases are used more than ${FRONTMATTER_LIMITS.aliases} times`);
|
|
125
|
+
}
|
|
126
|
+
// An alias to an anchor still being filled names one of its own ancestors.
|
|
127
|
+
if (!this.finished.has(name) && isCollection(value))
|
|
128
|
+
throw cycle();
|
|
129
|
+
const extent = this.meter.measure(value);
|
|
130
|
+
this.nodes += extent.nodes;
|
|
131
|
+
this.chars += extent.chars;
|
|
132
|
+
if (this.nodes > FRONTMATTER_LIMITS.expandedNodes || this.chars > FRONTMATTER_LIMITS.expandedChars)
|
|
133
|
+
throw tooLarge();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const MERGE_KEY_LIMIT_REASON = "merge keys exceeded maxTotalMergeKeys";
|
|
137
|
+
/**
|
|
138
|
+
* Load one YAML document within {@link FRONTMATTER_LIMITS}. A refusal throws
|
|
139
|
+
* {@link FrontmatterLimitError}; other YAML errors propagate from js-yaml unchanged.
|
|
140
|
+
*/
|
|
141
|
+
export function loadBoundedYaml(source, options = {}) {
|
|
142
|
+
if (source.length > FRONTMATTER_LIMITS.sourceChars) {
|
|
143
|
+
throw new FrontmatterLimitError("FRONTMATTER_TOO_LARGE", `YAML source is longer than ${FRONTMATTER_LIMITS.sourceChars} characters`);
|
|
144
|
+
}
|
|
145
|
+
const schema = options.schema === "json" ? yaml.JSON_SCHEMA : options.schema;
|
|
146
|
+
const budget = new AliasBudget();
|
|
147
|
+
let watched;
|
|
148
|
+
let nesting = 0;
|
|
149
|
+
let value;
|
|
150
|
+
try {
|
|
151
|
+
value = yaml.safeLoad(source, {
|
|
152
|
+
...(schema ? { schema } : {}),
|
|
153
|
+
listener(event, rawState) {
|
|
154
|
+
const state = rawState;
|
|
155
|
+
if (state.anchorMap !== watched) {
|
|
156
|
+
budget.watch(state);
|
|
157
|
+
watched = state.anchorMap;
|
|
158
|
+
}
|
|
159
|
+
if (event === "open") {
|
|
160
|
+
nesting += 1;
|
|
161
|
+
if (nesting > PARSE_NESTING_GUARD)
|
|
162
|
+
throw tooDeep();
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
nesting -= 1;
|
|
166
|
+
if (state.anchor !== null)
|
|
167
|
+
budget.close(state.anchor, state.result);
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
catch (error) {
|
|
173
|
+
const reason = error.reason;
|
|
174
|
+
if (typeof reason === "string" && reason.startsWith(MERGE_KEY_LIMIT_REASON)) {
|
|
175
|
+
throw new FrontmatterLimitError("FRONTMATTER_ALIAS_LIMIT", reason);
|
|
176
|
+
}
|
|
177
|
+
throw error;
|
|
178
|
+
}
|
|
179
|
+
new ExtentMeter().measure(value);
|
|
180
|
+
return value;
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=bounded-yaml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bounded-yaml.js","sourceRoot":"","sources":["../src/bounded-yaml.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAE3F,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,WAAW,EAAE,GAAG,GAAG,IAAI;IACvB,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,KAAK;IACd,aAAa,EAAE,OAAO;IACtB,aAAa,EAAE,IAAI,GAAG,IAAI;CAC3B,CAAC,CAAC;AAEH,kGAAkG;AAClG,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,KAAK,GAAG,CAAC,CAAC;AAqBzD,SAAS,OAAO;IACd,OAAO,IAAI,qBAAqB,CAAC,sB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AAO,IAAI,CAAC,CAAC;oBACb,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI;wBAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBACtE,CAAC;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,MAAM,GAAI,KAA8B,CAAC,MAAM,CAAC;QACtD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE,CAAC;YAC5E,MAAM,IAAI,qBAAqB,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;QACrE,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;IACD,IAAI,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACjC,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/** Optional shipped recipe content; generic bundle creation never imports this module. */
|
|
2
|
+
import { type KindConvention } from "../kinds.js";
|
|
3
|
+
/**
|
|
4
|
+
* The `Context Note` kind convention (moved VERBATIM from core's `CONTEXT_NOTE_KIND`, Recipes Unit
|
|
5
|
+
* A). `governs`/`title` are stamped from the locally-defined `CONTEXT_NOTE_TYPE` above — the type
|
|
6
|
+
* this recipe governs, authored via the GENERIC path (`new "Context Note" <id>` + `doc read`/`doc
|
|
7
|
+
* update`/`doc write`; there is no bespoke note command or codec anymore). `description` is
|
|
8
|
+
* declared OPTIONAL (not required) because a `new "Context Note"` instance can legitimately carry
|
|
9
|
+
* an empty one, and a kind must not fail its own convention's producer. `sections` declares ONLY
|
|
10
|
+
* `Summary` — the one heading the recipe SCAFFOLDS on every `new "Context Note"` create — for the
|
|
11
|
+
* same producer-must-pass reason: a summary-only note is the most common legitimate shape, and
|
|
12
|
+
* declaring additional headings would make `status` flag every minimal note with
|
|
13
|
+
* KIND_SECTION_MISSING noise — alert fatigue on the primary path. The seed's BODY carries a worked
|
|
14
|
+
* multi-section/`fields.values` example for authors of OTHER kinds to copy.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CONTEXT_NOTE_KIND: KindConvention;
|
|
17
|
+
/**
|
|
18
|
+
* The seed's prose body (`conventions/context-note.md`) is deliberately doubled up as the
|
|
19
|
+
* IN-BUNDLE authoring reference for kind conventions: every produced bundle that applies this
|
|
20
|
+
* recipe (via `init`'s default, or an explicit `recipe add context-notes`) ships one worked
|
|
21
|
+
* example of the ONE correct shape, right where an agent discovering `conventions/` will find it —
|
|
22
|
+
* not just in a doc an agent may never read. Bodies are prose (the registry only parses
|
|
23
|
+
* frontmatter, per `parseConventionDoc`), so a fenced YAML example here is inert to the parser
|
|
24
|
+
* and purely illustrative. The source uses one explicit logical-field token so the recipe
|
|
25
|
+
* materializer (core's `materializeRecipeForEdition`, which owns the token's interpretation) can
|
|
26
|
+
* teach the physical workflow coordinate appropriate to the target OKF edition; `recipes.test.ts`
|
|
27
|
+
* pins that an installed body equals `CONTEXT_NOTE_SEED_BODY` and carries no token.
|
|
28
|
+
*/
|
|
29
|
+
export declare const CONTEXT_NOTE_SEED_BODY_LOGICAL: string;
|
|
30
|
+
/** V0.1 materialization retained for tests and direct recipe-content consumers. */
|
|
31
|
+
export declare const CONTEXT_NOTE_SEED_BODY: string;
|
|
32
|
+
/** One-line description, shown by `recipes` and the command reference — the built-in `context-notes`
|
|
33
|
+
* recipe's `recipe.md` manifest `summary:`. */
|
|
34
|
+
export declare const CONTEXT_NOTES_SUMMARY = "Declares the built-in Context Note kind convention (title/timestamp required, 24h freshness horizon)";
|
|
35
|
+
/** The prose body of the built-in `context-notes` recipe's `recipe.md` manifest doc — NOT parsed by
|
|
36
|
+
* `parseRecipeFiles` (only the manifest's frontmatter is read), purely descriptive for a human or
|
|
37
|
+
* agent who reads the recipe folder directly (built-in or, via a future `eject`, on disk). */
|
|
38
|
+
export declare const RECIPE_DESC_BODY: string;
|
|
39
|
+
/**
|
|
40
|
+
* The `Task` kind convention — the first DOMAIN recipe on the pluggable-recipe foundation
|
|
41
|
+
* (Recipes Unit B was the plumbing; this is the first thing built on it). The built-in now carries
|
|
42
|
+
* agent-readable purpose and field guidance; recipe application remains expect-absent, so an
|
|
43
|
+
* existing hand-authored Task convention is preserved rather than upgraded in place. No `sections`
|
|
44
|
+
* — unlike Context Note, a Task instance is not scaffolded around a fixed body shape; its body is
|
|
45
|
+
* free-form task description, and declaring expected headings here would just be lint noise on
|
|
46
|
+
* the common one-line task.
|
|
47
|
+
*/
|
|
48
|
+
export declare const TASK_KIND: KindConvention;
|
|
49
|
+
/**
|
|
50
|
+
* The seed's prose body (`conventions/task.md`) explains how the generic primitives compose into
|
|
51
|
+
* task tracking. Composed entirely from EXISTING lite primitives (link graph as DAG, CAS write as claim,
|
|
52
|
+
* `list --type`/`status` as query/lint) — no bespoke task engine, no new verb. The CLI's task-aware
|
|
53
|
+
* columns, claim, and runnable/blocked projections are a separate concern, not part of this recipe.
|
|
54
|
+
*/
|
|
55
|
+
export declare const TASK_SEED_BODY: string;
|
|
56
|
+
/** One-line description, shown by `recipes` and the command reference — the built-in
|
|
57
|
+
* `work-tracking` recipe's `recipe.md` manifest `summary:`. */
|
|
58
|
+
export declare const WORK_TRACKING_SUMMARY = "Declares the built-in Task kind convention (title/progress_status required, workflow enum, 'depends on' link type, 30d freshness horizon)";
|
|
59
|
+
/** The prose body of the built-in `work-tracking` recipe's `recipe.md` manifest doc — NOT parsed
|
|
60
|
+
* by `parseRecipeFiles` (only the manifest's frontmatter is read), purely descriptive. */
|
|
61
|
+
export declare const WORK_TRACKING_DESC_BODY: string;
|
|
62
|
+
/**
|
|
63
|
+
* The `Roadmap` kind convention — the SPINE: a single top-level roadmap doc that `contains` the
|
|
64
|
+
* bundle's Roadmap Items via typed links. Frontmatter faithful to the board's hand-authored
|
|
65
|
+
* `conventions/roadmap` (no `path` — the spine is one doc, conventionally the bundle-root
|
|
66
|
+
* `roadmap`, not a scaffolded family; no freshness horizon; `title` is the only required field).
|
|
67
|
+
*/
|
|
68
|
+
export declare const ROADMAP_KIND: KindConvention;
|
|
69
|
+
/** The `conventions/roadmap.md` prose body. */
|
|
70
|
+
export declare const ROADMAP_SEED_BODY: string;
|
|
71
|
+
/**
|
|
72
|
+
* The `Roadmap Item` kind convention — a durable line of work spanning multiple tasks.
|
|
73
|
+
* Frontmatter faithful to the board's hand-authored `conventions/roadmap-item`: scaffolded under
|
|
74
|
+
* `roadmap-items/`, `contains` its Tasks, `status` is the three-state item lifecycle (coarser than
|
|
75
|
+
* Task's five-state enum on purpose — an item's granular progress is the derived task rollup, not
|
|
76
|
+
* a stored field).
|
|
77
|
+
*/
|
|
78
|
+
export declare const ROADMAP_ITEM_KIND: KindConvention;
|
|
79
|
+
/** The `conventions/roadmap-item.md` prose body. */
|
|
80
|
+
export declare const ROADMAP_ITEM_SEED_BODY: string;
|
|
81
|
+
/** One-line description, shown by `recipes` and the command reference — the built-in `roadmap`
|
|
82
|
+
* recipe's `recipe.md` manifest `summary:`. */
|
|
83
|
+
export declare const ROADMAP_SUMMARY = "Declares the Roadmap + Roadmap Item kind conventions (typed 'contains' links, roadmap \u2192 item \u2192 task; item progress_status enum queued/active/done) \u2014 work-tracking's companion";
|
|
84
|
+
/** The prose body of the built-in `roadmap` recipe's `recipe.md` manifest doc — NOT parsed by
|
|
85
|
+
* `parseRecipeFiles` (only the manifest's frontmatter is read), purely descriptive. Its "Pairing
|
|
86
|
+
* the Task kind" section is the RECORDED resolution of this unit's expects_inbound design
|
|
87
|
+
* question: recipes apply via expect-absent CAS and can never patch an EXISTING `conventions/task`
|
|
88
|
+
* doc, and `kind field` edits only `fields.{required,optional,values}` — so the Task-side
|
|
89
|
+
* `expects_inbound` pairing is a documented one-step opt-in (pull → edit → promote, the
|
|
90
|
+
* CLI's one sanctioned convention-schema edit route), not a silent recipe patch. The chain below
|
|
91
|
+
* is pinned by a test that literally executes it (recipes.test.ts). */
|
|
92
|
+
export declare const ROADMAP_DESC_BODY: string;
|
|
93
|
+
//# sourceMappingURL=content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../src/builtin-recipes/content.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAMzE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAmB/B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8BAA8B,QA+ClC,CAAC;AAMV,mFAAmF;AACnF,eAAO,MAAM,sBAAsB,QAGlC,CAAC;AAEF;+CAC+C;AAC/C,eAAO,MAAM,qBAAqB,yGACsE,CAAC;AAEzG;;8FAE8F;AAC9F,eAAO,MAAM,gBAAgB,QAMI,CAAC;AAMlC;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,cAkCvB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,QAQe,CAAC;AAE3C;+DAC+D;AAC/D,eAAO,MAAM,qBAAqB,8IAC2G,CAAC;AAE9I;0FAC0F;AAC1F,eAAO,MAAM,uBAAuB,QAQb,CAAC;AAQxB;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,cAW1B,CAAC;AAEF,+CAA+C;AAC/C,eAAO,MAAM,iBAAiB,QAMgB,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAiB/B,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,sBAAsB,QAOmB,CAAC;AAEvD;+CAC+C;AAC/C,eAAO,MAAM,eAAe,kMACsJ,CAAC;AAEnL;;;;;;;uEAOuE;AACvE,eAAO,MAAM,iBAAiB,QAyBd,CAAC"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/** Optional shipped recipe content; generic bundle creation never imports this module. */
|
|
2
|
+
import { PROGRESS_STATUS_FIELD } from "../kinds.js";
|
|
3
|
+
import { RECIPE_PROGRESS_STATUS_TOKEN } from "../recipes.js";
|
|
4
|
+
/** The recipe defines the type it governs; generic engine operations do not special-case it. */
|
|
5
|
+
const CONTEXT_NOTE_TYPE = "Context Note";
|
|
6
|
+
/**
|
|
7
|
+
* The `Context Note` kind convention (moved VERBATIM from core's `CONTEXT_NOTE_KIND`, Recipes Unit
|
|
8
|
+
* A). `governs`/`title` are stamped from the locally-defined `CONTEXT_NOTE_TYPE` above — the type
|
|
9
|
+
* this recipe governs, authored via the GENERIC path (`new "Context Note" <id>` + `doc read`/`doc
|
|
10
|
+
* update`/`doc write`; there is no bespoke note command or codec anymore). `description` is
|
|
11
|
+
* declared OPTIONAL (not required) because a `new "Context Note"` instance can legitimately carry
|
|
12
|
+
* an empty one, and a kind must not fail its own convention's producer. `sections` declares ONLY
|
|
13
|
+
* `Summary` — the one heading the recipe SCAFFOLDS on every `new "Context Note"` create — for the
|
|
14
|
+
* same producer-must-pass reason: a summary-only note is the most common legitimate shape, and
|
|
15
|
+
* declaring additional headings would make `status` flag every minimal note with
|
|
16
|
+
* KIND_SECTION_MISSING noise — alert fatigue on the primary path. The seed's BODY carries a worked
|
|
17
|
+
* multi-section/`fields.values` example for authors of OTHER kinds to copy.
|
|
18
|
+
*/
|
|
19
|
+
export const CONTEXT_NOTE_KIND = {
|
|
20
|
+
id: "conventions/context-note",
|
|
21
|
+
title: CONTEXT_NOTE_TYPE,
|
|
22
|
+
governs: CONTEXT_NOTE_TYPE,
|
|
23
|
+
path: "context-notes/",
|
|
24
|
+
fields: {
|
|
25
|
+
required: ["title", "timestamp"],
|
|
26
|
+
optional: ["description", "tags"],
|
|
27
|
+
values: {},
|
|
28
|
+
valueDescriptions: {},
|
|
29
|
+
terminal: {},
|
|
30
|
+
descriptions: {},
|
|
31
|
+
},
|
|
32
|
+
sections: ["Summary"],
|
|
33
|
+
freshnessHorizon: "24h",
|
|
34
|
+
// Context Notes are transient cross-session scratch — collapse them by default in browse listings
|
|
35
|
+
// so they never swamp durable knowledge (designs/document-discovery Decision 1). Per-bundle
|
|
36
|
+
// overridable by dropping the key; every other kind stays expanded.
|
|
37
|
+
browseCollapsed: true,
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* The seed's prose body (`conventions/context-note.md`) is deliberately doubled up as the
|
|
41
|
+
* IN-BUNDLE authoring reference for kind conventions: every produced bundle that applies this
|
|
42
|
+
* recipe (via `init`'s default, or an explicit `recipe add context-notes`) ships one worked
|
|
43
|
+
* example of the ONE correct shape, right where an agent discovering `conventions/` will find it —
|
|
44
|
+
* not just in a doc an agent may never read. Bodies are prose (the registry only parses
|
|
45
|
+
* frontmatter, per `parseConventionDoc`), so a fenced YAML example here is inert to the parser
|
|
46
|
+
* and purely illustrative. The source uses one explicit logical-field token so the recipe
|
|
47
|
+
* materializer (core's `materializeRecipeForEdition`, which owns the token's interpretation) can
|
|
48
|
+
* teach the physical workflow coordinate appropriate to the target OKF edition; `recipes.test.ts`
|
|
49
|
+
* pins that an installed body equals `CONTEXT_NOTE_SEED_BODY` and carries no token.
|
|
50
|
+
*/
|
|
51
|
+
export const CONTEXT_NOTE_SEED_BODY_LOGICAL = "# Context Note\n\n" +
|
|
52
|
+
"An agent's cross-session orientation note: what happened, what was decided, and what's " +
|
|
53
|
+
"still open. Create one with `new \"Context Note\" <id>` (scaffolds the `# Summary` section " +
|
|
54
|
+
"under `context-notes/`), read it with `doc read`, and edit it with `doc update` / `doc " +
|
|
55
|
+
"write`. This recipe retains `timestamp` as an explicit compatibility field and uses the " +
|
|
56
|
+
"Superbee-specific `freshness_horizon` Kind extension so `superbee status` can surface notes " +
|
|
57
|
+
"older than 24h. In an OKF v0.2 bundle, `generated.at` remains the standard meaningful-change " +
|
|
58
|
+
"clock when provenance is present.\n\n" +
|
|
59
|
+
"## Declaring a kind convention\n\n" +
|
|
60
|
+
"A kind convention is a plain OKF doc (`type: Convention`) living under `conventions/`. Its " +
|
|
61
|
+
"FRONTMATTER is the only part core parses (this prose is not). Supported frontmatter keys:\n\n" +
|
|
62
|
+
"- `governs` (required, non-empty) — the `type` value this convention governs.\n" +
|
|
63
|
+
"- `title` (optional) — display title; defaults to `governs`.\n" +
|
|
64
|
+
"- `description` (optional) — the kind's purpose and intended use.\n" +
|
|
65
|
+
"- `path` (optional) — canonical bundle-relative path prefix instances are scaffolded under " +
|
|
66
|
+
"(e.g. `roadmap/`).\n" +
|
|
67
|
+
"- `fields.required` — list of field names an instance MUST carry (non-empty).\n" +
|
|
68
|
+
"- `fields.optional` — list of field names an instance MAY carry.\n" +
|
|
69
|
+
"- `fields.descriptions` — a MAP of `field name -> human guidance` for declared fields.\n" +
|
|
70
|
+
"- `fields.values` — a MAP of `field name -> list of allowed values`. This is the ONLY place " +
|
|
71
|
+
"an enum constraint goes — never a top-level `enum:`/`enums:`/`values:`/`constraints:` key, " +
|
|
72
|
+
"and never a field named directly at the top level either.\n" +
|
|
73
|
+
"- `sections` — list of expected level-1 (`# Heading`) body-section names. Declare only the " +
|
|
74
|
+
"headings EVERY instance must carry (this Context Note kind declares just `Summary`, the one " +
|
|
75
|
+
"section `new \"Context Note\"` scaffolds and every instance carries).\n" +
|
|
76
|
+
"- `freshness_horizon` — a Superbee Kind extension using `<n>(m|h|d)`, e.g. `24h`, `30d`, `15m`.\n\n" +
|
|
77
|
+
"Worked example (a `Roadmap Item` kind, with an enum-restricted field and expected sections):\n\n" +
|
|
78
|
+
"```yaml\n" +
|
|
79
|
+
"---\n" +
|
|
80
|
+
"type: Convention\n" +
|
|
81
|
+
"title: Roadmap Item\n" +
|
|
82
|
+
"governs: Roadmap Item\n" +
|
|
83
|
+
"description: A durable line of work that groups related tasks.\n" +
|
|
84
|
+
"path: roadmap/\n" +
|
|
85
|
+
"fields:\n" +
|
|
86
|
+
` required: [title, ${RECIPE_PROGRESS_STATUS_TOKEN}]\n` +
|
|
87
|
+
" optional: [horizon]\n" +
|
|
88
|
+
" values:\n" +
|
|
89
|
+
` ${RECIPE_PROGRESS_STATUS_TOKEN}: [planned, active, done]\n` +
|
|
90
|
+
" descriptions:\n" +
|
|
91
|
+
" title: A concise summary of the outcome.\n" +
|
|
92
|
+
` ${RECIPE_PROGRESS_STATUS_TOKEN}: The roadmap item's current workflow progress.\n` +
|
|
93
|
+
" horizon: The expected delivery window.\n" +
|
|
94
|
+
"sections: [Why, \"Done when\"]\n" +
|
|
95
|
+
"freshness_horizon: 30d\n" +
|
|
96
|
+
"---\n" +
|
|
97
|
+
"```\n";
|
|
98
|
+
function materializeRecipeBody(body, storageField) {
|
|
99
|
+
return body.replaceAll(RECIPE_PROGRESS_STATUS_TOKEN, storageField);
|
|
100
|
+
}
|
|
101
|
+
/** V0.1 materialization retained for tests and direct recipe-content consumers. */
|
|
102
|
+
export const CONTEXT_NOTE_SEED_BODY = materializeRecipeBody(CONTEXT_NOTE_SEED_BODY_LOGICAL, "status");
|
|
103
|
+
/** One-line description, shown by `recipes` and the command reference — the built-in `context-notes`
|
|
104
|
+
* recipe's `recipe.md` manifest `summary:`. */
|
|
105
|
+
export const CONTEXT_NOTES_SUMMARY = "Declares the built-in Context Note kind convention (title/timestamp required, 24h freshness horizon)";
|
|
106
|
+
/** The prose body of the built-in `context-notes` recipe's `recipe.md` manifest doc — NOT parsed by
|
|
107
|
+
* `parseRecipeFiles` (only the manifest's frontmatter is read), purely descriptive for a human or
|
|
108
|
+
* agent who reads the recipe folder directly (built-in or, via a future `eject`, on disk). */
|
|
109
|
+
export const RECIPE_DESC_BODY = "# Context Notes\n\n" +
|
|
110
|
+
"Installs the `Context Note` kind convention: a lightweight cross-session orientation note — " +
|
|
111
|
+
"what happened, what was decided, what's still open. Declares the `Context Note` type's " +
|
|
112
|
+
"required fields, the `# Summary` scaffold section, and a 24h freshness horizon.\n\n" +
|
|
113
|
+
"Applied by default on `init` (opt out with `init --recipe none`), or on demand with " +
|
|
114
|
+
"`recipe add context-notes`.\n";
|
|
115
|
+
/** The `type` value the work-tracking recipe governs — mirrors `CONTEXT_NOTE_TYPE`'s pattern (a
|
|
116
|
+
* recipe is exactly the thing that DEFINES the type it governs). */
|
|
117
|
+
const TASK_TYPE = "Task";
|
|
118
|
+
/**
|
|
119
|
+
* The `Task` kind convention — the first DOMAIN recipe on the pluggable-recipe foundation
|
|
120
|
+
* (Recipes Unit B was the plumbing; this is the first thing built on it). The built-in now carries
|
|
121
|
+
* agent-readable purpose and field guidance; recipe application remains expect-absent, so an
|
|
122
|
+
* existing hand-authored Task convention is preserved rather than upgraded in place. No `sections`
|
|
123
|
+
* — unlike Context Note, a Task instance is not scaffolded around a fixed body shape; its body is
|
|
124
|
+
* free-form task description, and declaring expected headings here would just be lint noise on
|
|
125
|
+
* the common one-line task.
|
|
126
|
+
*/
|
|
127
|
+
export const TASK_KIND = {
|
|
128
|
+
id: "conventions/task",
|
|
129
|
+
title: TASK_TYPE,
|
|
130
|
+
governs: TASK_TYPE,
|
|
131
|
+
description: "A concrete unit of work that can be claimed, prioritized, assigned, and completed.",
|
|
132
|
+
path: "tasks/",
|
|
133
|
+
// The typed-edge vocabulary (decisions/typed-links-carrier): a task's dependency edge is a
|
|
134
|
+
// link whose display text is exactly "depends on", targeting another Task. Declared here so
|
|
135
|
+
// `kinds` teaches the vocabulary to any agent that orients — discovery shipped; validation
|
|
136
|
+
// is a future consumer.
|
|
137
|
+
links: { "depends on": TASK_TYPE },
|
|
138
|
+
// The claim coordinates (research/atomic-shared-task-claim-design): declaring them is what
|
|
139
|
+
// lets sync's converge report a lost claim as ownership and withdraw the re-apply route,
|
|
140
|
+
// instead of presenting the race as an ordinary content conflict. Logical names; the
|
|
141
|
+
// edition's coordinate policy resolves them onto storage keys.
|
|
142
|
+
claim: { ownerField: "assignee", stateField: "progress_status" },
|
|
143
|
+
fields: {
|
|
144
|
+
required: ["title", PROGRESS_STATUS_FIELD],
|
|
145
|
+
optional: ["priority", "assignee", "description"],
|
|
146
|
+
values: { [PROGRESS_STATUS_FIELD]: ["todo", "in_progress", "blocked", "done", "canceled"] },
|
|
147
|
+
valueDescriptions: {},
|
|
148
|
+
// The terminal declaration (tasks/status-terminal-declaration.md): done/canceled are the
|
|
149
|
+
// states past which a Task is no longer open — machinery (list --open, the status sweep's
|
|
150
|
+
// exclusion + sort) ships together with the declaration for every new bundle.
|
|
151
|
+
terminal: { [PROGRESS_STATUS_FIELD]: ["done", "canceled"] },
|
|
152
|
+
descriptions: {
|
|
153
|
+
title: "A concise human-readable summary of the work.",
|
|
154
|
+
[PROGRESS_STATUS_FIELD]: "The task's current workflow state.",
|
|
155
|
+
priority: "Relative urgency used to order the work; follow the bundle's adopted priority scale.",
|
|
156
|
+
assignee: "The person or agent currently responsible for the task.",
|
|
157
|
+
description: "The task's scope, context, acceptance criteria, and other working details.",
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
freshnessHorizon: "30d",
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* The seed's prose body (`conventions/task.md`) explains how the generic primitives compose into
|
|
164
|
+
* task tracking. Composed entirely from EXISTING lite primitives (link graph as DAG, CAS write as claim,
|
|
165
|
+
* `list --type`/`status` as query/lint) — no bespoke task engine, no new verb. The CLI's task-aware
|
|
166
|
+
* columns, claim, and runnable/blocked projections are a separate concern, not part of this recipe.
|
|
167
|
+
*/
|
|
168
|
+
export const TASK_SEED_BODY = "# Task\n\n" +
|
|
169
|
+
"A unit of work, composed entirely from lite primitives — no bespoke task engine.\n" +
|
|
170
|
+
"A task is a `type: Task` doc; its logical `progress_status` is a validated enum; its DEPENDENCIES are\n" +
|
|
171
|
+
"typed `depends on` cross-links to prerequisite task docs (the declared link type —\n" +
|
|
172
|
+
"the link graph IS the DAG, and `link show <id> --text \"depends on\"` shows both\n" +
|
|
173
|
+
"directions); an atomic CLAIM is a compare-and-swap write flipping `progress_status` to\n" +
|
|
174
|
+
"`in_progress` (a second claimer gets a VersionConflict). Query with `list --type Task`;\n" +
|
|
175
|
+
"lint/orphans/staleness via `status`.\n";
|
|
176
|
+
/** One-line description, shown by `recipes` and the command reference — the built-in
|
|
177
|
+
* `work-tracking` recipe's `recipe.md` manifest `summary:`. */
|
|
178
|
+
export const WORK_TRACKING_SUMMARY = "Declares the built-in Task kind convention (title/progress_status required, workflow enum, 'depends on' link type, 30d freshness horizon)";
|
|
179
|
+
/** The prose body of the built-in `work-tracking` recipe's `recipe.md` manifest doc — NOT parsed
|
|
180
|
+
* by `parseRecipeFiles` (only the manifest's frontmatter is read), purely descriptive. */
|
|
181
|
+
export const WORK_TRACKING_DESC_BODY = "# Work Tracking\n\n" +
|
|
182
|
+
"Installs the `Task` kind convention: a unit of work with a validated logical `progress_status` enum " +
|
|
183
|
+
"(todo/in_progress/blocked/done/canceled), scaffolded under `tasks/`. Status/priority/assignee " +
|
|
184
|
+
"are FIELDS of Task, not separate conventions or a bespoke task verb — dependencies, claiming, " +
|
|
185
|
+
"and querying all compose from existing generic primitives (`link add`, CAS `doc update`, " +
|
|
186
|
+
"`list --type Task`, `status`).\n\n" +
|
|
187
|
+
"Applied on demand with `recipe add work-tracking` (not part of `init`'s default — that stays " +
|
|
188
|
+
"`context-notes`).\n";
|
|
189
|
+
/** The `type` values the roadmap recipe governs — extracted from the project's own board (the
|
|
190
|
+
* hand-authored `conventions/roadmap` + `conventions/roadmap-item` docs), the same
|
|
191
|
+
* dogfood-then-package path work-tracking took. */
|
|
192
|
+
const ROADMAP_TYPE = "Roadmap";
|
|
193
|
+
const ROADMAP_ITEM_TYPE = "Roadmap Item";
|
|
194
|
+
/**
|
|
195
|
+
* The `Roadmap` kind convention — the SPINE: a single top-level roadmap doc that `contains` the
|
|
196
|
+
* bundle's Roadmap Items via typed links. Frontmatter faithful to the board's hand-authored
|
|
197
|
+
* `conventions/roadmap` (no `path` — the spine is one doc, conventionally the bundle-root
|
|
198
|
+
* `roadmap`, not a scaffolded family; no freshness horizon; `title` is the only required field).
|
|
199
|
+
*/
|
|
200
|
+
export const ROADMAP_KIND = {
|
|
201
|
+
id: "conventions/roadmap",
|
|
202
|
+
title: ROADMAP_TYPE,
|
|
203
|
+
governs: ROADMAP_TYPE,
|
|
204
|
+
// The typed-edge vocabulary: the spine's ownership edge is a link whose display text is exactly
|
|
205
|
+
// "contains", targeting a Roadmap Item — declared so `kinds` teaches it and `link add`'s graph
|
|
206
|
+
// lint validates it.
|
|
207
|
+
links: { contains: ROADMAP_ITEM_TYPE },
|
|
208
|
+
// No status field on the spine, so nothing to declare terminal (Brian's ruling on the
|
|
209
|
+
// task board's `tasks/status-terminal-declaration.md`).
|
|
210
|
+
fields: { required: ["title"], optional: [], values: {}, valueDescriptions: {}, terminal: {}, descriptions: {} },
|
|
211
|
+
};
|
|
212
|
+
/** The `conventions/roadmap.md` prose body. */
|
|
213
|
+
export const ROADMAP_SEED_BODY = "# Roadmap\n\n" +
|
|
214
|
+
"The spine document: a single top-level roadmap doc that CONTAINS the bundle's Roadmap\n" +
|
|
215
|
+
"Items via typed links carrying the text `contains` (`link add <roadmap> <item> --text\n" +
|
|
216
|
+
"contains`), making the whole roadmap → item → task chain one filtered query per hop\n" +
|
|
217
|
+
"(`link show <id> --text contains`). Progress is DERIVED, never stored: list the\n" +
|
|
218
|
+
"contained items and read their statuses.\n";
|
|
219
|
+
/**
|
|
220
|
+
* The `Roadmap Item` kind convention — a durable line of work spanning multiple tasks.
|
|
221
|
+
* Frontmatter faithful to the board's hand-authored `conventions/roadmap-item`: scaffolded under
|
|
222
|
+
* `roadmap-items/`, `contains` its Tasks, `status` is the three-state item lifecycle (coarser than
|
|
223
|
+
* Task's five-state enum on purpose — an item's granular progress is the derived task rollup, not
|
|
224
|
+
* a stored field).
|
|
225
|
+
*/
|
|
226
|
+
export const ROADMAP_ITEM_KIND = {
|
|
227
|
+
id: "conventions/roadmap-item",
|
|
228
|
+
title: ROADMAP_ITEM_TYPE,
|
|
229
|
+
governs: ROADMAP_ITEM_TYPE,
|
|
230
|
+
path: "roadmap-items/",
|
|
231
|
+
links: { contains: "Task" },
|
|
232
|
+
linkDescriptions: { contains: "Tasks whose delivery is governed by this roadmap commitment." },
|
|
233
|
+
fields: {
|
|
234
|
+
required: ["title", PROGRESS_STATUS_FIELD],
|
|
235
|
+
optional: ["description", "sequence"],
|
|
236
|
+
values: { [PROGRESS_STATUS_FIELD]: ["queued", "active", "done"] },
|
|
237
|
+
valueDescriptions: {},
|
|
238
|
+
// Brian's ruling (task board `tasks/status-terminal-declaration.md`): a done Roadmap Item
|
|
239
|
+
// hides from `list --open`, consistent with Task's done/canceled.
|
|
240
|
+
terminal: { [PROGRESS_STATUS_FIELD]: ["done"] },
|
|
241
|
+
descriptions: {},
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
/** The `conventions/roadmap-item.md` prose body. */
|
|
245
|
+
export const ROADMAP_ITEM_SEED_BODY = "# Roadmap Item\n\n" +
|
|
246
|
+
"A durable line of work spanning multiple tasks — the granular form of the single\n" +
|
|
247
|
+
"roadmap spine doc. An item CONTAINS its tasks via links carrying the text `contains`;\n" +
|
|
248
|
+
"backlinks from a task answer \"which item owns this\". An item's progress is DERIVED,\n" +
|
|
249
|
+
"never stored: list its contained tasks and read their workflow states (the rollup). `progress_status`\n" +
|
|
250
|
+
"tracks the item itself: `queued` (not started) → `active` (any contained task moving)\n" +
|
|
251
|
+
"→ `done` (all contained tasks done or canceled).\n";
|
|
252
|
+
/** One-line description, shown by `recipes` and the command reference — the built-in `roadmap`
|
|
253
|
+
* recipe's `recipe.md` manifest `summary:`. */
|
|
254
|
+
export const ROADMAP_SUMMARY = "Declares the Roadmap + Roadmap Item kind conventions (typed 'contains' links, roadmap → item → task; item progress_status enum queued/active/done) — work-tracking's companion";
|
|
255
|
+
/** The prose body of the built-in `roadmap` recipe's `recipe.md` manifest doc — NOT parsed by
|
|
256
|
+
* `parseRecipeFiles` (only the manifest's frontmatter is read), purely descriptive. Its "Pairing
|
|
257
|
+
* the Task kind" section is the RECORDED resolution of this unit's expects_inbound design
|
|
258
|
+
* question: recipes apply via expect-absent CAS and can never patch an EXISTING `conventions/task`
|
|
259
|
+
* doc, and `kind field` edits only `fields.{required,optional,values}` — so the Task-side
|
|
260
|
+
* `expects_inbound` pairing is a documented one-step opt-in (pull → edit → promote, the
|
|
261
|
+
* CLI's one sanctioned convention-schema edit route), not a silent recipe patch. The chain below
|
|
262
|
+
* is pinned by a test that literally executes it (recipes.test.ts). */
|
|
263
|
+
export const ROADMAP_DESC_BODY = "# Roadmap\n\n" +
|
|
264
|
+
"Installs the `Roadmap` and `Roadmap Item` kind conventions: roadmap-items-as-docs. A single\n" +
|
|
265
|
+
"`Roadmap` spine doc CONTAINS `Roadmap Item` docs; each item CONTAINS its `Task` docs — all\n" +
|
|
266
|
+
"via typed links carrying the text `contains`, so the whole roadmap → item → task chain is\n" +
|
|
267
|
+
"one filtered query per hop (`link show <id> --text contains`). An item's progress is derived\n" +
|
|
268
|
+
"from its contained tasks' statuses, never stored.\n\n" +
|
|
269
|
+
"Applied on demand with `recipe add roadmap` (not part of `init`'s default — that stays\n" +
|
|
270
|
+
"`context-notes`). Composes with the `work-tracking` recipe (the `Task` kind this recipe's\n" +
|
|
271
|
+
"`contains` vocabulary points at) — apply both for the full chain.\n\n" +
|
|
272
|
+
"## Pairing the Task kind (opt-in, one documented step)\n\n" +
|
|
273
|
+
"The graph lint that answers \"which tasks have no owning Roadmap Item\" reads\n" +
|
|
274
|
+
"`expects_inbound` on the TASK kind's convention (`status` then reports\n" +
|
|
275
|
+
"`missing_expected_links`). A recipe applies via expect-absent CAS and never touches a doc\n" +
|
|
276
|
+
"that already exists, so this recipe cannot patch your bundle's `conventions/task` — the\n" +
|
|
277
|
+
"pairing is a deliberate one-step opt-in on the adopting bundle:\n\n" +
|
|
278
|
+
"```\n" +
|
|
279
|
+
"superbee pull --doc-key conventions/task.md --out task.md\n" +
|
|
280
|
+
"# edit task.md — add to the frontmatter:\n" +
|
|
281
|
+
"# expects_inbound:\n" +
|
|
282
|
+
"# contains: Roadmap Item\n" +
|
|
283
|
+
"superbee promote task.md --doc-key conventions/task.md --expected-version <version from the pull receipt>\n" +
|
|
284
|
+
"```\n\n" +
|
|
285
|
+
"Without this step everything else still works (the `contains` vocabulary and its link-type\n" +
|
|
286
|
+
"validation come from THIS recipe's conventions); only the \"task lacks an owning item\" lint\n" +
|
|
287
|
+
"stays off.\n";
|
|
288
|
+
//# sourceMappingURL=content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../src/builtin-recipes/content.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAE,qBAAqB,EAAuB,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAE7D,gGAAgG;AAChG,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAEzC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAmB;IAC/C,EAAE,EAAE,0BAA0B;IAC9B,KAAK,EAAE,iBAAiB;IACxB,OAAO,EAAE,iBAAiB;IAC1B,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE;QACN,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;QAChC,QAAQ,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC;QACjC,MAAM,EAAE,EAAE;QACV,iBAAiB,EAAE,EAAE;QACrB,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,EAAE;KACjB;IACD,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,gBAAgB,EAAE,KAAK;IACvB,kGAAkG;IAClG,4FAA4F;IAC5F,oEAAoE;IACpE,eAAe,EAAE,IAAI;CACtB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,8BAA8B,GACzC,oBAAoB;IACpB,yFAAyF;IACzF,6FAA6F;IAC7F,yFAAyF;IACzF,0FAA0F;IAC1F,8FAA8F;IAC9F,+FAA+F;IAC/F,uCAAuC;IACvC,oCAAoC;IACpC,6FAA6F;IAC7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M,CAAC,EAAE;QACjE,iBAAiB,EAAE,EAAE;QACrB,0FAA0F;QAC1F,kEAAkE;QAClE,QAAQ,EAAE,EAAE,CAAC,qBAAqB,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;QAC/C,YAAY,EAAE,EAAE;KACjB;CACF,CAAC;AAEF,oDAAoD;AACpD,MAAM,CAAC,MAAM,sBAAsB,GACjC,oBAAoB;IACpB,oFAAoF;IACpF,yFAAyF;IACzF,yFAAyF;IACzF,yGAAyG;IACzG,yFAAyF;IACzF,oDAAoD,CAAC;AAEvD;+CAC+C;AAC/C,MAAM,CAAC,MAAM,eAAe,GAC1B,gLAAgL,CAAC;AAEnL;;;;;;;uEAOuE;AACvE,MAAM,CAAC,MAAM,iBAAiB,GAC5B,eAAe;IACf,+FAA+F;IAC/F,8FAA8F;IAC9F,6FAA6F;IAC7F,gGAAgG;IAChG,uDAAuD;IACvD,0FAA0F;IAC1F,6FAA6F;IAC7F,uEAAuE;IACvE,4DAA4D;IAC5D,iFAAiF;IACjF,0EAA0E;IAC1E,6FAA6F;IAC7F,2FAA2F;IAC3F,qEAAqE;IACrE,OAAO;IACP,6DAA6D;IAC7D,4CAA4C;IAC5C,wBAAwB;IACxB,gCAAgC;IAChC,6GAA6G;IAC7G,SAAS;IACT,8FAA8F;IAC9F,gGAAgG;IAChG,cAAc,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { KindConvention } from "../kinds.js";
|
|
2
|
+
export declare const SITE_KIND: KindConvention;
|
|
3
|
+
export declare const SITE_CONVENTION_BODY = "# Site\n\nDescribe one private content site at sites/<site>, with the site label matching the hosting contract.\nThis convention helps author and inspect declarations. The portable Site validator owns the full\ngrammar and frozen-publication reference checks; editing this convention cannot relax that contract.\nReader grants, builder authorization and activation are separate hosting decisions.\n\nSee [Site authoring](../references/site-authoring.md) for a complete no-View declaration.\n";
|
|
4
|
+
export declare const SITE_AUTHORING_BODY = "# Site authoring\n\nIn a local or Git bundle, install this recipe with `superbee recipe add site`.\nIt installs a convention and this reference, not a Site instance, builder, reader grant or running\nsite. Writing or syncing a declaration is\nnot, by itself, proof that a builder published it or that a recipient can read it.\n\nHosted checkouts do not install this recipe: the Site Kind is reserved by the platform, and\ncheckout recipes do not install References. A Hosted author instead writes a complete Site\ndocument and syncs it, without installing a Kind. The host requires current model-write permission;\nrecipe installation is not a prerequisite or permission grant.\n\nAuthor a complete document at `sites/<site>.md`, using the site's label and one exact presentation\nversion. For example, a declaration at `sites/example.md` can contain:\n\n```yaml\n---\ntype: Site\ntitle: Example briefing\npresentation: \"@superbee/portal-document@0.1.1\"\naudience: restricted\nviews: []\ncapabilities: []\noptions: {}\n---\n```\n\nFor Hosted, write this complete YAML to the canonical checkout file, then run `superbee sync`.\nAlternatively use `superbee promote <file.md> --doc-key sites/<site>.md` in the selected checkout,\nthen sync. A new promote is create-only; for updates use the observed expected-version token or\nedit the tracked checkout file through its existing sync conflict flow. Pull/promote also preserves\nstructured YAML. `doc import` transfers between local/Git bundles and refuses Hosted targets.\nDo not pass `[]` as a string-list CLI flag: that is a string item, not an empty list.\nThe convention leaves views optional because generic Kind-required arrays must be nonempty;\nthe trusted Site validator still requires an explicit list, including `views: []` for no Views.\n\n`superbee/publication/site-manifest` exposes the shared declaration validator and the frozen\npublication reference validator. A declaration requires one Site at `sites/<site>`, an exact\npackage version or repository presentation reference, and the restricted audience. Views, the\noptional landing document and optional brand blobs must resolve in that publication. The selected\npresentation validates its own options; declaring a package does not install or execute it.\n\nDo not put credentials, reader lists, origins or builder settings in the declaration. Hosted\nmodel-write permissions, trusted builder admission, grants, entitlements and release checks remain\nauthoritative. Local creation never registers an app or grants publication or recipient access.\n";
|
|
5
|
+
//# sourceMappingURL=site.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../../src/builtin-recipes/site.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,eAAO,MAAM,SAAS,EAAE,cAyBvB,CAAC;AAEF,eAAO,MAAM,oBAAoB,gfAQhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,8gFA6C/B,CAAC"}
|