@agent-teams/document-authoring 0.0.0
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/CHANGELOG.md +5 -0
- package/LICENSE +201 -0
- package/README.md +11 -0
- package/dist/adapters/canonical-markdown.d.ts +14 -0
- package/dist/adapters/canonical-markdown.d.ts.map +1 -0
- package/dist/adapters/canonical-markdown.js +354 -0
- package/dist/adapters/canonical-markdown.js.map +1 -0
- package/dist/adapters/inbound/cli/document-command-renderer.d.ts +6 -0
- package/dist/adapters/inbound/cli/document-command-renderer.d.ts.map +1 -0
- package/dist/adapters/inbound/cli/document-command-renderer.js +123 -0
- package/dist/adapters/inbound/cli/document-command-renderer.js.map +1 -0
- package/dist/adapters/node/load-validated-document-authoring-profile-v2.d.ts +52 -0
- package/dist/adapters/node/load-validated-document-authoring-profile-v2.d.ts.map +1 -0
- package/dist/adapters/node/load-validated-document-authoring-profile-v2.js +103 -0
- package/dist/adapters/node/load-validated-document-authoring-profile-v2.js.map +1 -0
- package/dist/adapters/node/load-validated-document-authoring-profile.d.ts +33 -0
- package/dist/adapters/node/load-validated-document-authoring-profile.d.ts.map +1 -0
- package/dist/adapters/node/load-validated-document-authoring-profile.js +47 -0
- package/dist/adapters/node/load-validated-document-authoring-profile.js.map +1 -0
- package/dist/adapters/node/node-authoring-profile-reader-v2.d.ts +9 -0
- package/dist/adapters/node/node-authoring-profile-reader-v2.d.ts.map +1 -0
- package/dist/adapters/node/node-authoring-profile-reader-v2.js +42 -0
- package/dist/adapters/node/node-authoring-profile-reader-v2.js.map +1 -0
- package/dist/adapters/node/node-authoring-profile-reader.d.ts +9 -0
- package/dist/adapters/node/node-authoring-profile-reader.d.ts.map +1 -0
- package/dist/adapters/node/node-authoring-profile-reader.js +31 -0
- package/dist/adapters/node/node-authoring-profile-reader.js.map +1 -0
- package/dist/adapters/node/node-document-contract-validator.d.ts +7 -0
- package/dist/adapters/node/node-document-contract-validator.d.ts.map +1 -0
- package/dist/adapters/node/node-document-contract-validator.js +306 -0
- package/dist/adapters/node/node-document-contract-validator.js.map +1 -0
- package/dist/adapters/node/node-document-environment-inspector.d.ts +17 -0
- package/dist/adapters/node/node-document-environment-inspector.d.ts.map +1 -0
- package/dist/adapters/node/node-document-environment-inspector.js +49 -0
- package/dist/adapters/node/node-document-environment-inspector.js.map +1 -0
- package/dist/adapters/node/node-document-file-state.d.ts +21 -0
- package/dist/adapters/node/node-document-file-state.d.ts.map +1 -0
- package/dist/adapters/node/node-document-file-state.js +199 -0
- package/dist/adapters/node/node-document-file-state.js.map +1 -0
- package/dist/adapters/node/node-document-journal-store-faults.d.ts +36 -0
- package/dist/adapters/node/node-document-journal-store-faults.d.ts.map +1 -0
- package/dist/adapters/node/node-document-journal-store-faults.js +2 -0
- package/dist/adapters/node/node-document-journal-store-faults.js.map +1 -0
- package/dist/adapters/node/node-document-journal-store-private.d.ts +2 -0
- package/dist/adapters/node/node-document-journal-store-private.d.ts.map +1 -0
- package/dist/adapters/node/node-document-journal-store-private.js +2 -0
- package/dist/adapters/node/node-document-journal-store-private.js.map +1 -0
- package/dist/adapters/node/node-document-journal-store.d.ts +22 -0
- package/dist/adapters/node/node-document-journal-store.d.ts.map +1 -0
- package/dist/adapters/node/node-document-journal-store.js +235 -0
- package/dist/adapters/node/node-document-journal-store.js.map +1 -0
- package/dist/adapters/node/node-document-metadata-sidecar-reader.d.ts +9 -0
- package/dist/adapters/node/node-document-metadata-sidecar-reader.d.ts.map +1 -0
- package/dist/adapters/node/node-document-metadata-sidecar-reader.js +87 -0
- package/dist/adapters/node/node-document-metadata-sidecar-reader.js.map +1 -0
- package/dist/adapters/node/node-document-parent-materializer.d.ts +39 -0
- package/dist/adapters/node/node-document-parent-materializer.d.ts.map +1 -0
- package/dist/adapters/node/node-document-parent-materializer.js +269 -0
- package/dist/adapters/node/node-document-parent-materializer.js.map +1 -0
- package/dist/adapters/node/node-document-planning-profile-reader.d.ts +10 -0
- package/dist/adapters/node/node-document-planning-profile-reader.d.ts.map +1 -0
- package/dist/adapters/node/node-document-planning-profile-reader.js +85 -0
- package/dist/adapters/node/node-document-planning-profile-reader.js.map +1 -0
- package/dist/adapters/node/node-document-planning-state-reader.d.ts +11 -0
- package/dist/adapters/node/node-document-planning-state-reader.d.ts.map +1 -0
- package/dist/adapters/node/node-document-planning-state-reader.js +181 -0
- package/dist/adapters/node/node-document-planning-state-reader.js.map +1 -0
- package/dist/adapters/node/node-document-publisher-private.d.ts +2 -0
- package/dist/adapters/node/node-document-publisher-private.d.ts.map +1 -0
- package/dist/adapters/node/node-document-publisher-private.js +2 -0
- package/dist/adapters/node/node-document-publisher-private.js.map +1 -0
- package/dist/adapters/node/node-document-publisher.d.ts +54 -0
- package/dist/adapters/node/node-document-publisher.d.ts.map +1 -0
- package/dist/adapters/node/node-document-publisher.js +336 -0
- package/dist/adapters/node/node-document-publisher.js.map +1 -0
- package/dist/adapters/node/node-document-reachability-projector.d.ts +17 -0
- package/dist/adapters/node/node-document-reachability-projector.d.ts.map +1 -0
- package/dist/adapters/node/node-document-reachability-projector.js +43 -0
- package/dist/adapters/node/node-document-reachability-projector.js.map +1 -0
- package/dist/adapters/node/node-document-structure-verifier.d.ts +21 -0
- package/dist/adapters/node/node-document-structure-verifier.d.ts.map +1 -0
- package/dist/adapters/node/node-document-structure-verifier.js +80 -0
- package/dist/adapters/node/node-document-structure-verifier.js.map +1 -0
- package/dist/adapters/node/node-document-template-reader.d.ts +10 -0
- package/dist/adapters/node/node-document-template-reader.d.ts.map +1 -0
- package/dist/adapters/node/node-document-template-reader.js +32 -0
- package/dist/adapters/node/node-document-template-reader.js.map +1 -0
- package/dist/adapters/node/node-document-transaction-coordinator.d.ts +11 -0
- package/dist/adapters/node/node-document-transaction-coordinator.d.ts.map +1 -0
- package/dist/adapters/node/node-document-transaction-coordinator.js +60 -0
- package/dist/adapters/node/node-document-transaction-coordinator.js.map +1 -0
- package/dist/adapters/node/node-metadata-instance-validator.d.ts +9 -0
- package/dist/adapters/node/node-metadata-instance-validator.d.ts.map +1 -0
- package/dist/adapters/node/node-metadata-instance-validator.js +90 -0
- package/dist/adapters/node/node-metadata-instance-validator.js.map +1 -0
- package/dist/adapters/node/node-owner-membership-reader.d.ts +10 -0
- package/dist/adapters/node/node-owner-membership-reader.d.ts.map +1 -0
- package/dist/adapters/node/node-owner-membership-reader.js +62 -0
- package/dist/adapters/node/node-owner-membership-reader.js.map +1 -0
- package/dist/adapters/node/node-path-authority.d.ts +53 -0
- package/dist/adapters/node/node-path-authority.d.ts.map +1 -0
- package/dist/adapters/node/node-path-authority.js +186 -0
- package/dist/adapters/node/node-path-authority.js.map +1 -0
- package/dist/adapters/node/read-document-authority-file.d.ts +12 -0
- package/dist/adapters/node/read-document-authority-file.d.ts.map +1 -0
- package/dist/adapters/node/read-document-authority-file.js +78 -0
- package/dist/adapters/node/read-document-authority-file.js.map +1 -0
- package/dist/adapters/node/recapture-document-publication-paths.d.ts +17 -0
- package/dist/adapters/node/recapture-document-publication-paths.d.ts.map +1 -0
- package/dist/adapters/node/recapture-document-publication-paths.js +33 -0
- package/dist/adapters/node/recapture-document-publication-paths.js.map +1 -0
- package/dist/application/model/document-authoring-profile-description.d.ts +57 -0
- package/dist/application/model/document-authoring-profile-description.d.ts.map +1 -0
- package/dist/application/model/document-authoring-profile-description.js +2 -0
- package/dist/application/model/document-authoring-profile-description.js.map +1 -0
- package/dist/application/model/document-catalog.d.ts +88 -0
- package/dist/application/model/document-catalog.d.ts.map +1 -0
- package/dist/application/model/document-catalog.js +2 -0
- package/dist/application/model/document-catalog.js.map +1 -0
- package/dist/application/model/document-command.d.ts +69 -0
- package/dist/application/model/document-command.d.ts.map +1 -0
- package/dist/application/model/document-command.js +2 -0
- package/dist/application/model/document-command.js.map +1 -0
- package/dist/application/model/document-find.d.ts +22 -0
- package/dist/application/model/document-find.d.ts.map +1 -0
- package/dist/application/model/document-find.js +2 -0
- package/dist/application/model/document-find.js.map +1 -0
- package/dist/application/model/document-parent-materialization.d.ts +26 -0
- package/dist/application/model/document-parent-materialization.d.ts.map +1 -0
- package/dist/application/model/document-parent-materialization.js +2 -0
- package/dist/application/model/document-parent-materialization.js.map +1 -0
- package/dist/application/model/document-physical-identity.d.ts +10 -0
- package/dist/application/model/document-physical-identity.d.ts.map +1 -0
- package/dist/application/model/document-physical-identity.js +29 -0
- package/dist/application/model/document-physical-identity.js.map +1 -0
- package/dist/application/model/document-planning.d.ts +209 -0
- package/dist/application/model/document-planning.d.ts.map +1 -0
- package/dist/application/model/document-planning.js +2 -0
- package/dist/application/model/document-planning.js.map +1 -0
- package/dist/application/model/document-receipt.d.ts +101 -0
- package/dist/application/model/document-receipt.d.ts.map +1 -0
- package/dist/application/model/document-receipt.js +2 -0
- package/dist/application/model/document-receipt.js.map +1 -0
- package/dist/application/model/document-transaction-inspection.d.ts +66 -0
- package/dist/application/model/document-transaction-inspection.d.ts.map +1 -0
- package/dist/application/model/document-transaction-inspection.js +2 -0
- package/dist/application/model/document-transaction-inspection.js.map +1 -0
- package/dist/application/model/document-transaction.d.ts +169 -0
- package/dist/application/model/document-transaction.d.ts.map +1 -0
- package/dist/application/model/document-transaction.js +2 -0
- package/dist/application/model/document-transaction.js.map +1 -0
- package/dist/application/policies/assert-artifact-owner-allowed.d.ts +3 -0
- package/dist/application/policies/assert-artifact-owner-allowed.d.ts.map +1 -0
- package/dist/application/policies/assert-artifact-owner-allowed.js +8 -0
- package/dist/application/policies/assert-artifact-owner-allowed.js.map +1 -0
- package/dist/application/policies/assert-v2-planning-profile.d.ts +3 -0
- package/dist/application/policies/assert-v2-planning-profile.d.ts.map +1 -0
- package/dist/application/policies/assert-v2-planning-profile.js +7 -0
- package/dist/application/policies/assert-v2-planning-profile.js.map +1 -0
- package/dist/application/policies/authoring-profile-semantics.d.ts +42 -0
- package/dist/application/policies/authoring-profile-semantics.d.ts.map +1 -0
- package/dist/application/policies/authoring-profile-semantics.js +129 -0
- package/dist/application/policies/authoring-profile-semantics.js.map +1 -0
- package/dist/application/policies/classify-document-recovery.d.ts +81 -0
- package/dist/application/policies/classify-document-recovery.d.ts.map +1 -0
- package/dist/application/policies/classify-document-recovery.js +138 -0
- package/dist/application/policies/classify-document-recovery.js.map +1 -0
- package/dist/application/policies/document-authoring-semantic-digests.d.ts +31 -0
- package/dist/application/policies/document-authoring-semantic-digests.d.ts.map +1 -0
- package/dist/application/policies/document-authoring-semantic-digests.js +163 -0
- package/dist/application/policies/document-authoring-semantic-digests.js.map +1 -0
- package/dist/application/policies/document-catalog-authority-stability.d.ts +12 -0
- package/dist/application/policies/document-catalog-authority-stability.d.ts.map +1 -0
- package/dist/application/policies/document-catalog-authority-stability.js +16 -0
- package/dist/application/policies/document-catalog-authority-stability.js.map +1 -0
- package/dist/application/policies/document-catalog-diagnostics.d.ts +8 -0
- package/dist/application/policies/document-catalog-diagnostics.d.ts.map +1 -0
- package/dist/application/policies/document-catalog-diagnostics.js +44 -0
- package/dist/application/policies/document-catalog-diagnostics.js.map +1 -0
- package/dist/application/policies/document-catalog-fields.d.ts +18 -0
- package/dist/application/policies/document-catalog-fields.d.ts.map +1 -0
- package/dist/application/policies/document-catalog-fields.js +62 -0
- package/dist/application/policies/document-catalog-fields.js.map +1 -0
- package/dist/application/policies/document-catalog-sidecar.d.ts +10 -0
- package/dist/application/policies/document-catalog-sidecar.d.ts.map +1 -0
- package/dist/application/policies/document-catalog-sidecar.js +66 -0
- package/dist/application/policies/document-catalog-sidecar.js.map +1 -0
- package/dist/application/policies/document-command-consumer-root.d.ts +2 -0
- package/dist/application/policies/document-command-consumer-root.d.ts.map +1 -0
- package/dist/application/policies/document-command-consumer-root.js +15 -0
- package/dist/application/policies/document-command-consumer-root.js.map +1 -0
- package/dist/application/policies/document-command-projection.d.ts +20 -0
- package/dist/application/policies/document-command-projection.d.ts.map +1 -0
- package/dist/application/policies/document-command-projection.js +90 -0
- package/dist/application/policies/document-command-projection.js.map +1 -0
- package/dist/application/policies/document-contract-digests.d.ts +20 -0
- package/dist/application/policies/document-contract-digests.d.ts.map +1 -0
- package/dist/application/policies/document-contract-digests.js +329 -0
- package/dist/application/policies/document-contract-digests.js.map +1 -0
- package/dist/application/policies/document-logical-preimage.d.ts +14 -0
- package/dist/application/policies/document-logical-preimage.d.ts.map +1 -0
- package/dist/application/policies/document-logical-preimage.js +61 -0
- package/dist/application/policies/document-logical-preimage.js.map +1 -0
- package/dist/application/policies/document-planning-policy-error.d.ts +6 -0
- package/dist/application/policies/document-planning-policy-error.d.ts.map +1 -0
- package/dist/application/policies/document-planning-policy-error.js +9 -0
- package/dist/application/policies/document-planning-policy-error.js.map +1 -0
- package/dist/application/policies/document-receipt-policy.d.ts +5 -0
- package/dist/application/policies/document-receipt-policy.d.ts.map +1 -0
- package/dist/application/policies/document-receipt-policy.js +92 -0
- package/dist/application/policies/document-receipt-policy.js.map +1 -0
- package/dist/application/policies/document-repository-path.d.ts +3 -0
- package/dist/application/policies/document-repository-path.d.ts.map +1 -0
- package/dist/application/policies/document-repository-path.js +24 -0
- package/dist/application/policies/document-repository-path.js.map +1 -0
- package/dist/application/policies/document-temporary-path.d.ts +7 -0
- package/dist/application/policies/document-temporary-path.d.ts.map +1 -0
- package/dist/application/policies/document-temporary-path.js +34 -0
- package/dist/application/policies/document-temporary-path.js.map +1 -0
- package/dist/application/policies/document-transaction-digests.d.ts +5 -0
- package/dist/application/policies/document-transaction-digests.d.ts.map +1 -0
- package/dist/application/policies/document-transaction-digests.js +12 -0
- package/dist/application/policies/document-transaction-digests.js.map +1 -0
- package/dist/application/policies/document-transaction-envelope-body.d.ts +28 -0
- package/dist/application/policies/document-transaction-envelope-body.d.ts.map +1 -0
- package/dist/application/policies/document-transaction-envelope-body.js +140 -0
- package/dist/application/policies/document-transaction-envelope-body.js.map +1 -0
- package/dist/application/policies/document-transaction-envelope-policy.d.ts +4 -0
- package/dist/application/policies/document-transaction-envelope-policy.d.ts.map +1 -0
- package/dist/application/policies/document-transaction-envelope-policy.js +159 -0
- package/dist/application/policies/document-transaction-envelope-policy.js.map +1 -0
- package/dist/application/policies/inspect-catalog-document.d.ts +18 -0
- package/dist/application/policies/inspect-catalog-document.d.ts.map +1 -0
- package/dist/application/policies/inspect-catalog-document.js +126 -0
- package/dist/application/policies/inspect-catalog-document.js.map +1 -0
- package/dist/application/policies/normalize-document-intent.d.ts +3 -0
- package/dist/application/policies/normalize-document-intent.d.ts.map +1 -0
- package/dist/application/policies/normalize-document-intent.js +104 -0
- package/dist/application/policies/normalize-document-intent.js.map +1 -0
- package/dist/application/policies/project-catalog-metadata.d.ts +7 -0
- package/dist/application/policies/project-catalog-metadata.d.ts.map +1 -0
- package/dist/application/policies/project-catalog-metadata.js +165 -0
- package/dist/application/policies/project-catalog-metadata.js.map +1 -0
- package/dist/application/policies/project-document-reachability.d.ts +14 -0
- package/dist/application/policies/project-document-reachability.d.ts.map +1 -0
- package/dist/application/policies/project-document-reachability.js +57 -0
- package/dist/application/policies/project-document-reachability.js.map +1 -0
- package/dist/application/policies/project-similar-document-advice.d.ts +4 -0
- package/dist/application/policies/project-similar-document-advice.d.ts.map +1 -0
- package/dist/application/policies/project-similar-document-advice.js +17 -0
- package/dist/application/policies/project-similar-document-advice.js.map +1 -0
- package/dist/application/policies/resolve-document-authoring.d.ts +13 -0
- package/dist/application/policies/resolve-document-authoring.d.ts.map +1 -0
- package/dist/application/policies/resolve-document-authoring.js +154 -0
- package/dist/application/policies/resolve-document-authoring.js.map +1 -0
- package/dist/application/policies/same-document-catalog-snapshot.d.ts +3 -0
- package/dist/application/policies/same-document-catalog-snapshot.d.ts.map +1 -0
- package/dist/application/policies/same-document-catalog-snapshot.js +24 -0
- package/dist/application/policies/same-document-catalog-snapshot.js.map +1 -0
- package/dist/application/ports/authoring-profile-reader.d.ts +37 -0
- package/dist/application/ports/authoring-profile-reader.d.ts.map +1 -0
- package/dist/application/ports/authoring-profile-reader.js +2 -0
- package/dist/application/ports/authoring-profile-reader.js.map +1 -0
- package/dist/application/ports/canonical-document-renderer.d.ts +29 -0
- package/dist/application/ports/canonical-document-renderer.d.ts.map +1 -0
- package/dist/application/ports/canonical-document-renderer.js +2 -0
- package/dist/application/ports/canonical-document-renderer.js.map +1 -0
- package/dist/application/ports/document-authority-recompiler.d.ts +19 -0
- package/dist/application/ports/document-authority-recompiler.d.ts.map +1 -0
- package/dist/application/ports/document-authority-recompiler.js +2 -0
- package/dist/application/ports/document-authority-recompiler.js.map +1 -0
- package/dist/application/ports/document-contract-validator.d.ts +6 -0
- package/dist/application/ports/document-contract-validator.d.ts.map +1 -0
- package/dist/application/ports/document-contract-validator.js +2 -0
- package/dist/application/ports/document-contract-validator.js.map +1 -0
- package/dist/application/ports/document-environment-inspector.d.ts +12 -0
- package/dist/application/ports/document-environment-inspector.d.ts.map +1 -0
- package/dist/application/ports/document-environment-inspector.js +2 -0
- package/dist/application/ports/document-environment-inspector.js.map +1 -0
- package/dist/application/ports/document-file-state.d.ts +55 -0
- package/dist/application/ports/document-file-state.d.ts.map +1 -0
- package/dist/application/ports/document-file-state.js +2 -0
- package/dist/application/ports/document-file-state.js.map +1 -0
- package/dist/application/ports/document-journal-store.d.ts +31 -0
- package/dist/application/ports/document-journal-store.d.ts.map +1 -0
- package/dist/application/ports/document-journal-store.js +2 -0
- package/dist/application/ports/document-journal-store.js.map +1 -0
- package/dist/application/ports/document-metadata-sidecar-reader.d.ts +13 -0
- package/dist/application/ports/document-metadata-sidecar-reader.d.ts.map +1 -0
- package/dist/application/ports/document-metadata-sidecar-reader.js +2 -0
- package/dist/application/ports/document-metadata-sidecar-reader.js.map +1 -0
- package/dist/application/ports/document-parent-materializer.d.ts +24 -0
- package/dist/application/ports/document-parent-materializer.d.ts.map +1 -0
- package/dist/application/ports/document-parent-materializer.js +2 -0
- package/dist/application/ports/document-parent-materializer.js.map +1 -0
- package/dist/application/ports/document-planning-profile-reader.d.ts +9 -0
- package/dist/application/ports/document-planning-profile-reader.d.ts.map +1 -0
- package/dist/application/ports/document-planning-profile-reader.js +2 -0
- package/dist/application/ports/document-planning-profile-reader.js.map +1 -0
- package/dist/application/ports/document-planning-state-reader.d.ts +10 -0
- package/dist/application/ports/document-planning-state-reader.d.ts.map +1 -0
- package/dist/application/ports/document-planning-state-reader.js +2 -0
- package/dist/application/ports/document-planning-state-reader.js.map +1 -0
- package/dist/application/ports/document-publisher.d.ts +38 -0
- package/dist/application/ports/document-publisher.d.ts.map +1 -0
- package/dist/application/ports/document-publisher.js +2 -0
- package/dist/application/ports/document-publisher.js.map +1 -0
- package/dist/application/ports/document-reachability-projector.d.ts +13 -0
- package/dist/application/ports/document-reachability-projector.d.ts.map +1 -0
- package/dist/application/ports/document-reachability-projector.js +2 -0
- package/dist/application/ports/document-reachability-projector.js.map +1 -0
- package/dist/application/ports/document-structure-verifier.d.ts +17 -0
- package/dist/application/ports/document-structure-verifier.d.ts.map +1 -0
- package/dist/application/ports/document-structure-verifier.js +2 -0
- package/dist/application/ports/document-structure-verifier.js.map +1 -0
- package/dist/application/ports/document-template-reader.d.ts +9 -0
- package/dist/application/ports/document-template-reader.d.ts.map +1 -0
- package/dist/application/ports/document-template-reader.js +2 -0
- package/dist/application/ports/document-template-reader.js.map +1 -0
- package/dist/application/ports/document-transaction-coordinator.d.ts +21 -0
- package/dist/application/ports/document-transaction-coordinator.d.ts.map +1 -0
- package/dist/application/ports/document-transaction-coordinator.js +2 -0
- package/dist/application/ports/document-transaction-coordinator.js.map +1 -0
- package/dist/application/ports/documentation-catalog-reader-v2.d.ts +11 -0
- package/dist/application/ports/documentation-catalog-reader-v2.d.ts.map +1 -0
- package/dist/application/ports/documentation-catalog-reader-v2.js +2 -0
- package/dist/application/ports/documentation-catalog-reader-v2.js.map +1 -0
- package/dist/application/ports/documentation-catalog-reader.d.ts +11 -0
- package/dist/application/ports/documentation-catalog-reader.d.ts.map +1 -0
- package/dist/application/ports/documentation-catalog-reader.js +2 -0
- package/dist/application/ports/documentation-catalog-reader.js.map +1 -0
- package/dist/application/ports/documentation-search-catalog-reader-v2.d.ts +9 -0
- package/dist/application/ports/documentation-search-catalog-reader-v2.d.ts.map +1 -0
- package/dist/application/ports/documentation-search-catalog-reader-v2.js +2 -0
- package/dist/application/ports/documentation-search-catalog-reader-v2.js.map +1 -0
- package/dist/application/ports/documentation-search-catalog-reader.d.ts +10 -0
- package/dist/application/ports/documentation-search-catalog-reader.d.ts.map +1 -0
- package/dist/application/ports/documentation-search-catalog-reader.js +2 -0
- package/dist/application/ports/documentation-search-catalog-reader.js.map +1 -0
- package/dist/application/ports/metadata-instance-validator.d.ts +18 -0
- package/dist/application/ports/metadata-instance-validator.d.ts.map +1 -0
- package/dist/application/ports/metadata-instance-validator.js +2 -0
- package/dist/application/ports/metadata-instance-validator.js.map +1 -0
- package/dist/application/ports/owner-membership-reader.d.ts +14 -0
- package/dist/application/ports/owner-membership-reader.d.ts.map +1 -0
- package/dist/application/ports/owner-membership-reader.js +2 -0
- package/dist/application/ports/owner-membership-reader.js.map +1 -0
- package/dist/application/ports/similar-document-advisor.d.ts +17 -0
- package/dist/application/ports/similar-document-advisor.d.ts.map +1 -0
- package/dist/application/ports/similar-document-advisor.js +2 -0
- package/dist/application/ports/similar-document-advisor.js.map +1 -0
- package/dist/application/projections/document-catalog-projections.d.ts +3 -0
- package/dist/application/projections/document-catalog-projections.d.ts.map +1 -0
- package/dist/application/projections/document-catalog-projections.js +24 -0
- package/dist/application/projections/document-catalog-projections.js.map +1 -0
- package/dist/application/use-cases/apply-document-plan.d.ts +16 -0
- package/dist/application/use-cases/apply-document-plan.d.ts.map +1 -0
- package/dist/application/use-cases/apply-document-plan.js +311 -0
- package/dist/application/use-cases/apply-document-plan.js.map +1 -0
- package/dist/application/use-cases/apply-document-recovery-receipt.d.ts +14 -0
- package/dist/application/use-cases/apply-document-recovery-receipt.d.ts.map +1 -0
- package/dist/application/use-cases/apply-document-recovery-receipt.js +17 -0
- package/dist/application/use-cases/apply-document-recovery-receipt.js.map +1 -0
- package/dist/application/use-cases/build-documentation-catalog.d.ts +41 -0
- package/dist/application/use-cases/build-documentation-catalog.d.ts.map +1 -0
- package/dist/application/use-cases/build-documentation-catalog.js +259 -0
- package/dist/application/use-cases/build-documentation-catalog.js.map +1 -0
- package/dist/application/use-cases/compile-document-plan.d.ts +6 -0
- package/dist/application/use-cases/compile-document-plan.d.ts.map +1 -0
- package/dist/application/use-cases/compile-document-plan.js +200 -0
- package/dist/application/use-cases/compile-document-plan.js.map +1 -0
- package/dist/application/use-cases/document-journal-reconciliation.d.ts +18 -0
- package/dist/application/use-cases/document-journal-reconciliation.d.ts.map +1 -0
- package/dist/application/use-cases/document-journal-reconciliation.js +90 -0
- package/dist/application/use-cases/document-journal-reconciliation.js.map +1 -0
- package/dist/application/use-cases/document-parent-materialization-continuation.d.ts +3 -0
- package/dist/application/use-cases/document-parent-materialization-continuation.d.ts.map +1 -0
- package/dist/application/use-cases/document-parent-materialization-continuation.js +79 -0
- package/dist/application/use-cases/document-parent-materialization-continuation.js.map +1 -0
- package/dist/application/use-cases/document-transaction-continuation.d.ts +64 -0
- package/dist/application/use-cases/document-transaction-continuation.d.ts.map +1 -0
- package/dist/application/use-cases/document-transaction-continuation.js +283 -0
- package/dist/application/use-cases/document-transaction-continuation.js.map +1 -0
- package/dist/application/use-cases/document-transaction-error.d.ts +5 -0
- package/dist/application/use-cases/document-transaction-error.d.ts.map +1 -0
- package/dist/application/use-cases/document-transaction-error.js +9 -0
- package/dist/application/use-cases/document-transaction-error.js.map +1 -0
- package/dist/application/use-cases/document-transaction-execution.d.ts +9 -0
- package/dist/application/use-cases/document-transaction-execution.d.ts.map +1 -0
- package/dist/application/use-cases/document-transaction-execution.js +40 -0
- package/dist/application/use-cases/document-transaction-execution.js.map +1 -0
- package/dist/application/use-cases/document-transaction-receipts.d.ts +21 -0
- package/dist/application/use-cases/document-transaction-receipts.d.ts.map +1 -0
- package/dist/application/use-cases/document-transaction-receipts.js +180 -0
- package/dist/application/use-cases/document-transaction-receipts.js.map +1 -0
- package/dist/application/use-cases/find-documents.d.ts +20 -0
- package/dist/application/use-cases/find-documents.d.ts.map +1 -0
- package/dist/application/use-cases/find-documents.js +114 -0
- package/dist/application/use-cases/find-documents.js.map +1 -0
- package/dist/application/use-cases/load-v2-profile-description.d.ts +20 -0
- package/dist/application/use-cases/load-v2-profile-description.d.ts.map +1 -0
- package/dist/application/use-cases/load-v2-profile-description.js +14 -0
- package/dist/application/use-cases/load-v2-profile-description.js.map +1 -0
- package/dist/application/use-cases/plan-documentation-document.d.ts +74 -0
- package/dist/application/use-cases/plan-documentation-document.d.ts.map +1 -0
- package/dist/application/use-cases/plan-documentation-document.js +273 -0
- package/dist/application/use-cases/plan-documentation-document.js.map +1 -0
- package/dist/application/use-cases/recapture-directory-receipt-evidence.d.ts +8 -0
- package/dist/application/use-cases/recapture-directory-receipt-evidence.d.ts.map +1 -0
- package/dist/application/use-cases/recapture-directory-receipt-evidence.js +32 -0
- package/dist/application/use-cases/recapture-directory-receipt-evidence.js.map +1 -0
- package/dist/application/use-cases/recover-document-transaction.d.ts +10 -0
- package/dist/application/use-cases/recover-document-transaction.d.ts.map +1 -0
- package/dist/application/use-cases/recover-document-transaction.js +361 -0
- package/dist/application/use-cases/recover-document-transaction.js.map +1 -0
- package/dist/application/use-cases/run-document-doctor.d.ts +18 -0
- package/dist/application/use-cases/run-document-doctor.d.ts.map +1 -0
- package/dist/application/use-cases/run-document-doctor.js +171 -0
- package/dist/application/use-cases/run-document-doctor.js.map +1 -0
- package/dist/application/use-cases/run-document-new.d.ts +30 -0
- package/dist/application/use-cases/run-document-new.d.ts.map +1 -0
- package/dist/application/use-cases/run-document-new.js +221 -0
- package/dist/application/use-cases/run-document-new.js.map +1 -0
- package/dist/application/use-cases/run-document-recover.d.ts +21 -0
- package/dist/application/use-cases/run-document-recover.d.ts.map +1 -0
- package/dist/application/use-cases/run-document-recover.js +126 -0
- package/dist/application/use-cases/run-document-recover.js.map +1 -0
- package/dist/binary-string-comparator.d.ts +3 -0
- package/dist/binary-string-comparator.d.ts.map +1 -0
- package/dist/binary-string-comparator.js +12 -0
- package/dist/binary-string-comparator.js.map +1 -0
- package/dist/cancellation.d.ts +2 -0
- package/dist/cancellation.d.ts.map +1 -0
- package/dist/cancellation.js +12 -0
- package/dist/cancellation.js.map +1 -0
- package/dist/canonical-json.d.ts +3 -0
- package/dist/canonical-json.d.ts.map +1 -0
- package/dist/canonical-json.js +2 -0
- package/dist/canonical-json.js.map +1 -0
- package/dist/capability-runtime.d.ts +12 -0
- package/dist/capability-runtime.d.ts.map +1 -0
- package/dist/capability-runtime.js +10 -0
- package/dist/capability-runtime.js.map +1 -0
- package/dist/composition/describe-document-authoring-profile-v2.d.ts +14 -0
- package/dist/composition/describe-document-authoring-profile-v2.d.ts.map +1 -0
- package/dist/composition/describe-document-authoring-profile-v2.js +220 -0
- package/dist/composition/describe-document-authoring-profile-v2.js.map +1 -0
- package/dist/composition/inspect-document-authoring-environment-v1.d.ts +7 -0
- package/dist/composition/inspect-document-authoring-environment-v1.d.ts.map +1 -0
- package/dist/composition/inspect-document-authoring-environment-v1.js +10 -0
- package/dist/composition/inspect-document-authoring-environment-v1.js.map +1 -0
- package/dist/composition/inspect-document-transaction.d.ts +4 -0
- package/dist/composition/inspect-document-transaction.d.ts.map +1 -0
- package/dist/composition/inspect-document-transaction.js +179 -0
- package/dist/composition/inspect-document-transaction.js.map +1 -0
- package/dist/composition/node-document-authority-recompiler.d.ts +11 -0
- package/dist/composition/node-document-authority-recompiler.d.ts.map +1 -0
- package/dist/composition/node-document-authority-recompiler.js +81 -0
- package/dist/composition/node-document-authority-recompiler.js.map +1 -0
- package/dist/composition/node-document-planning.d.ts +7 -0
- package/dist/composition/node-document-planning.d.ts.map +1 -0
- package/dist/composition/node-document-planning.js +99 -0
- package/dist/composition/node-document-planning.js.map +1 -0
- package/dist/composition/node-document-writing-private.d.ts +15 -0
- package/dist/composition/node-document-writing-private.d.ts.map +1 -0
- package/dist/composition/node-document-writing-private.js +54 -0
- package/dist/composition/node-document-writing-private.js.map +1 -0
- package/dist/composition/node-document-writing.d.ts +8 -0
- package/dist/composition/node-document-writing.d.ts.map +1 -0
- package/dist/composition/node-document-writing.js +10 -0
- package/dist/composition/node-document-writing.js.map +1 -0
- package/dist/document-catalog-error.d.ts +6 -0
- package/dist/document-catalog-error.d.ts.map +1 -0
- package/dist/document-catalog-error.js +9 -0
- package/dist/document-catalog-error.js.map +1 -0
- package/dist/document-planning-error.d.ts +6 -0
- package/dist/document-planning-error.d.ts.map +1 -0
- package/dist/document-planning-error.js +9 -0
- package/dist/document-planning-error.js.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-document-reader.d.ts +14 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-document-reader.d.ts.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-document-reader.js +108 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-document-reader.js.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-filesystem.d.ts +14 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-filesystem.d.ts.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-filesystem.js +61 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-filesystem.js.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-paths.d.ts +8 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-paths.d.ts.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-paths.js +44 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-paths.js.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-reference-resolver.d.ts +6 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-reference-resolver.d.ts.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-reference-resolver.js +160 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-reference-resolver.js.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-repository.d.ts +8 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-repository.d.ts.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-repository.js +13 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-repository.js.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-tree-observer.d.ts +6 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-tree-observer.d.ts.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-tree-observer.js +260 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/filesystem-markdown-tree-observer.js.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/markdown-document-parser.d.ts +3 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/markdown-document-parser.d.ts.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/markdown-document-parser.js +260 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/markdown-document-parser.js.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/markdown-reference-target.d.ts +15 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/markdown-reference-target.d.ts.map +1 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/markdown-reference-target.js +59 -0
- package/dist/documentation-observation/adapters/outbound/filesystem/markdown-reference-target.js.map +1 -0
- package/dist/documentation-observation/application/model/markdown-document.d.ts +69 -0
- package/dist/documentation-observation/application/model/markdown-document.d.ts.map +1 -0
- package/dist/documentation-observation/application/model/markdown-document.js +10 -0
- package/dist/documentation-observation/application/model/markdown-document.js.map +1 -0
- package/dist/documentation-observation/application/ports/markdown-repository.d.ts +18 -0
- package/dist/documentation-observation/application/ports/markdown-repository.d.ts.map +1 -0
- package/dist/documentation-observation/application/ports/markdown-repository.js +2 -0
- package/dist/documentation-observation/application/ports/markdown-repository.js.map +1 -0
- package/dist/errors.d.ts +6 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +9 -0
- package/dist/errors.js.map +1 -0
- package/dist/filesystem-path-safety.d.ts +11 -0
- package/dist/filesystem-path-safety.d.ts.map +1 -0
- package/dist/filesystem-path-safety.js +122 -0
- package/dist/filesystem-path-safety.js.map +1 -0
- package/dist/find-command.d.ts +28 -0
- package/dist/find-command.d.ts.map +1 -0
- package/dist/find-command.js +146 -0
- package/dist/find-command.js.map +1 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +95 -0
- package/dist/index.js.map +1 -0
- package/dist/installed-artifact-identity.d.ts +2 -0
- package/dist/installed-artifact-identity.d.ts.map +1 -0
- package/dist/installed-artifact-identity.js +13 -0
- package/dist/installed-artifact-identity.js.map +1 -0
- package/dist/observation.d.ts +4 -0
- package/dist/observation.d.ts.map +1 -0
- package/dist/observation.js +3 -0
- package/dist/observation.js.map +1 -0
- package/dist/package-version.d.ts +2 -0
- package/dist/package-version.d.ts.map +1 -0
- package/dist/package-version.js +10 -0
- package/dist/package-version.js.map +1 -0
- package/dist/qualification/index.d.ts +27 -0
- package/dist/qualification/index.d.ts.map +1 -0
- package/dist/qualification/index.js +144 -0
- package/dist/qualification/index.js.map +1 -0
- package/dist/schema-catalog.d.ts +4 -0
- package/dist/schema-catalog.d.ts.map +1 -0
- package/dist/schema-catalog.js +70 -0
- package/dist/schema-catalog.js.map +1 -0
- package/dist/state-contract.d.ts +3 -0
- package/dist/state-contract.d.ts.map +1 -0
- package/dist/state-contract.js +4 -0
- package/dist/state-contract.js.map +1 -0
- package/dist/strict-json.d.ts +2 -0
- package/dist/strict-json.d.ts.map +1 -0
- package/dist/strict-json.js +2 -0
- package/dist/strict-json.js.map +1 -0
- package/dist/strict-yaml.d.ts +3 -0
- package/dist/strict-yaml.d.ts.map +1 -0
- package/dist/strict-yaml.js +37 -0
- package/dist/strict-yaml.js.map +1 -0
- package/package.json +66 -0
- package/schemas/document-authoring-profile/v1.schema.json +265 -0
- package/schemas/document-authoring-profile/v2.schema.json +168 -0
- package/schemas/document-authoring-profile/v3.schema.json +200 -0
- package/schemas/document-command-envelope/v1.schema.json +161 -0
- package/schemas/document-command-envelope/v2.schema.json +205 -0
- package/schemas/document-intent/v1.schema.json +102 -0
- package/schemas/document-parent-materialization/v2.schema.json +65 -0
- package/schemas/document-plan/v1.schema.json +162 -0
- package/schemas/document-plan/v2.schema.json +85 -0
- package/schemas/document-receipt/v1.schema.json +141 -0
- package/schemas/document-receipt/v2.schema.json +108 -0
- package/schemas/foundation-transaction-envelope/v3.schema.json +169 -0
- package/schemas/foundation-transaction-envelope/v4.schema.json +164 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { ContainedFileReadError, readContainedRegularFile } from "../../filesystem-path-safety.js";
|
|
4
|
+
import { isDocumentRepositoryPath } from "../../application/policies/document-repository-path.js";
|
|
5
|
+
import { DocumentCatalogError } from "../../document-catalog-error.js";
|
|
6
|
+
function inputInvalid(message, options) {
|
|
7
|
+
throw new DocumentCatalogError("DOCUMENT_CATALOG_INPUT_INVALID", message, options);
|
|
8
|
+
}
|
|
9
|
+
function assertPortableDocumentAuthorityPath(path) {
|
|
10
|
+
if (!isDocumentRepositoryPath(path)) {
|
|
11
|
+
inputInvalid("Document authority paths must use the portable repository-relative path grammar.");
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function decodeAuthoritySource(bytes, path) {
|
|
15
|
+
if (bytes.length >= 3 &&
|
|
16
|
+
bytes[0] === 0xef &&
|
|
17
|
+
bytes[1] === 0xbb &&
|
|
18
|
+
bytes[2] === 0xbf) {
|
|
19
|
+
inputInvalid(`Document authority must not contain a UTF-8 BOM: ${path}.`);
|
|
20
|
+
}
|
|
21
|
+
let source;
|
|
22
|
+
try {
|
|
23
|
+
source = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
inputInvalid(`Document authority must contain well-formed UTF-8: ${path}.`, {
|
|
27
|
+
cause: error
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
if (source.includes("\u0000")) {
|
|
31
|
+
inputInvalid(`Document authority must not contain NUL characters: ${path}.`);
|
|
32
|
+
}
|
|
33
|
+
return source;
|
|
34
|
+
}
|
|
35
|
+
function digest(bytes) {
|
|
36
|
+
return `sha256:${createHash("sha256").update(bytes).digest("hex")}`;
|
|
37
|
+
}
|
|
38
|
+
function unavailable(path, error) {
|
|
39
|
+
const detail = error.failure === "symlink"
|
|
40
|
+
? "cannot traverse a symbolic link"
|
|
41
|
+
: error.failure === "invalid"
|
|
42
|
+
? "must be a bounded regular file"
|
|
43
|
+
: error.failure === "escape"
|
|
44
|
+
? "escapes the repository"
|
|
45
|
+
: "is unavailable or changed while reading";
|
|
46
|
+
throw new DocumentCatalogError("DOCUMENT_CATALOG_AUTHORITY_UNAVAILABLE", `Document authority ${detail}: ${path}.`, { cause: error });
|
|
47
|
+
}
|
|
48
|
+
export async function readDocumentAuthorityFile(request) {
|
|
49
|
+
assertPortableDocumentAuthorityPath(request.path);
|
|
50
|
+
let bytes;
|
|
51
|
+
try {
|
|
52
|
+
bytes = await readContainedRegularFile({
|
|
53
|
+
candidate: resolve(request.consumerRoot, request.path),
|
|
54
|
+
maxBytes: request.maxBytes,
|
|
55
|
+
root: request.consumerRoot
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
if (error instanceof ContainedFileReadError) {
|
|
60
|
+
unavailable(request.path, error);
|
|
61
|
+
}
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
64
|
+
if (bytes.length === 0) {
|
|
65
|
+
inputInvalid(`Document authority must not be empty: ${request.path}.`);
|
|
66
|
+
}
|
|
67
|
+
const source = decodeAuthoritySource(bytes, request.path);
|
|
68
|
+
return Object.freeze({
|
|
69
|
+
bytes,
|
|
70
|
+
evidence: Object.freeze({
|
|
71
|
+
digest: digest(bytes),
|
|
72
|
+
path: request.path,
|
|
73
|
+
size: bytes.byteLength
|
|
74
|
+
}),
|
|
75
|
+
source
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=read-document-authority-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-document-authority-file.js","sourceRoot":"","sources":["../../../src/adapters/node/read-document-authority-file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAQvE,SAAS,YAAY,CAAC,OAAe,EAAE,OAAsB;IAC3D,MAAM,IAAI,oBAAoB,CAC5B,gCAAgC,EAChC,OAAO,EACP,OAAO,CACR,CAAC;AACJ,CAAC;AAED,SAAS,mCAAmC,CAAC,IAAY;IACvD,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,YAAY,CACV,kFAAkF,CACnF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAa,EAAE,IAAY;IACxD,IACE,KAAK,CAAC,MAAM,IAAI,CAAC;QACjB,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI;QACjB,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI;QACjB,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,EACjB,CAAC;QACD,YAAY,CAAC,oDAAoD,IAAI,GAAG,CAAC,CAAC;IAC5E,CAAC;IACD,IAAI,MAAc,CAAC;IACnB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,EAAE,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC;YACtD,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,IAAI,EAAE,OAAO,CAAC,YAAY;SAC3B,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,sBAAsB,EAAE,CAAC;YAC5C,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACnC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,YAAY,CAAC,yCAAyC,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC;IACzE,CAAC;IACD,MAAM,MAAM,GAAG,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,KAAK;QACL,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;YACtB,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;YACrB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,IAAI,EAAE,KAAK,CAAC,UAAU;SACvB,CAAC;QACF,MAAM;KACP,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PortablePathIdentity } from "@agent-teams/repository-mutation";
|
|
2
|
+
import { sameNodePathIdentity } from "./node-path-authority.js";
|
|
3
|
+
export interface RecapturedDocumentPublicationPaths {
|
|
4
|
+
readonly ancestryIdentities: readonly PortablePathIdentity[];
|
|
5
|
+
readonly destinationPath: string;
|
|
6
|
+
readonly parent: string;
|
|
7
|
+
readonly parentIdentity: PortablePathIdentity;
|
|
8
|
+
readonly root: string;
|
|
9
|
+
}
|
|
10
|
+
/** Recaptures strict real-directory ancestry; the result is valid only for the immediate operation. */
|
|
11
|
+
export declare function recaptureDocumentPublicationPaths(request: {
|
|
12
|
+
readonly consumerRoot: string;
|
|
13
|
+
readonly destination: string;
|
|
14
|
+
}): Promise<RecapturedDocumentPublicationPaths>;
|
|
15
|
+
export declare const sameDocumentPhysicalIdentity: typeof sameNodePathIdentity;
|
|
16
|
+
export declare function sameDocumentAncestry(left: readonly PortablePathIdentity[], right: readonly PortablePathIdentity[]): boolean;
|
|
17
|
+
//# sourceMappingURL=recapture-document-publication-paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recapture-document-publication-paths.d.ts","sourceRoot":"","sources":["../../../src/adapters/node/recapture-document-publication-paths.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAGL,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,kBAAkB,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC7D,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,EAAE,oBAAoB,CAAC;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAgBD,uGAAuG;AACvG,wBAAsB,iCAAiC,CAAC,OAAO,EAAE;IAC/D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,GAAG,OAAO,CAAC,kCAAkC,CAAC,CAkB9C;AAED,eAAO,MAAM,4BAA4B,6BAAuB,CAAC;AAEjE,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,SAAS,oBAAoB,EAAE,EACrC,KAAK,EAAE,SAAS,oBAAoB,EAAE,GACrC,OAAO,CAIT"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { readdir } from "node:fs/promises";
|
|
2
|
+
import { OWNED_TEMPORARY_CLEANUP_RESIDUE_MARKER } from "@agent-teams/repository-mutation/node";
|
|
3
|
+
import { captureNodeRepositoryPathAuthority, recaptureNodeRepositoryPathAuthority, sameNodePathIdentity } from "./node-path-authority.js";
|
|
4
|
+
async function assertNoOwnedCleanupResidue(directories) {
|
|
5
|
+
for (const directory of directories) {
|
|
6
|
+
const entries = await readdir(directory);
|
|
7
|
+
if (entries.some((entry) => entry.includes(OWNED_TEMPORARY_CLEANUP_RESIDUE_MARKER))) {
|
|
8
|
+
throw new Error("A document temporary cleanup residue was preserved for manual recovery.");
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/** Recaptures strict real-directory ancestry; the result is valid only for the immediate operation. */
|
|
13
|
+
export async function recaptureDocumentPublicationPaths(request) {
|
|
14
|
+
const authority = await captureNodeRepositoryPathAuthority({
|
|
15
|
+
consumerRoot: request.consumerRoot,
|
|
16
|
+
repositoryPath: request.destination
|
|
17
|
+
});
|
|
18
|
+
await assertNoOwnedCleanupResidue(authority.ancestry.map((entry) => entry.absolutePath));
|
|
19
|
+
const recaptured = await recaptureNodeRepositoryPathAuthority(authority);
|
|
20
|
+
return Object.freeze({
|
|
21
|
+
ancestryIdentities: Object.freeze(recaptured.ancestry.map((entry) => entry.identity)),
|
|
22
|
+
destinationPath: recaptured.destinationPath,
|
|
23
|
+
parent: recaptured.parent,
|
|
24
|
+
parentIdentity: recaptured.parentIdentity,
|
|
25
|
+
root: recaptured.root.canonicalRoot
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export const sameDocumentPhysicalIdentity = sameNodePathIdentity;
|
|
29
|
+
export function sameDocumentAncestry(left, right) {
|
|
30
|
+
return left.length === right.length &&
|
|
31
|
+
left.every((identity, index) => sameNodePathIdentity(identity, right[index]));
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=recapture-document-publication-paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recapture-document-publication-paths.js","sourceR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,CAAC,MAAM;QACzB,cAAc,EAAE,UAAU,CAAC,cAAc;QACzC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,aAAa;KACpC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG,oBAAoB,CAAC;AAEjE,MAAM,UAAU,oBAAoB,CAClC,IAAqC,EACrC,KAAsC;IAEtC,OAAO,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;QACjC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAC7B,oBAAoB,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAE,CAAC,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { DocumentAuthorityDigest, DocumentAuthorityEvidence } from "./document-catalog.js";
|
|
2
|
+
import type { DocumentCatalogCollection, DocumentIdentityStrategy, DocumentPlacementStrategy, DocumentReachabilityStrategy } from "./document-planning.js";
|
|
3
|
+
export type DocumentReachabilityStrategyV2 = Exclude<DocumentReachabilityStrategy, {
|
|
4
|
+
readonly kind: "not-required";
|
|
5
|
+
}> | {
|
|
6
|
+
readonly kind: "not-required";
|
|
7
|
+
readonly reason: string;
|
|
8
|
+
};
|
|
9
|
+
export interface DocumentAuthoringTypeDescriptionV2 {
|
|
10
|
+
readonly allowedOwnerIds: readonly string[];
|
|
11
|
+
readonly heading: {
|
|
12
|
+
readonly kind: "id-colon-title" | "title";
|
|
13
|
+
};
|
|
14
|
+
readonly identity: DocumentIdentityStrategy;
|
|
15
|
+
readonly initialStatus: string;
|
|
16
|
+
readonly placement: DocumentPlacementStrategy;
|
|
17
|
+
readonly reachability: DocumentReachabilityStrategyV2;
|
|
18
|
+
readonly requiredMetadata: readonly string[];
|
|
19
|
+
readonly template: {
|
|
20
|
+
readonly kind: "fenced-markdown-body";
|
|
21
|
+
readonly path: string;
|
|
22
|
+
};
|
|
23
|
+
readonly type: string;
|
|
24
|
+
}
|
|
25
|
+
export interface DocumentAuthoringProfileDescriptionV2 {
|
|
26
|
+
readonly authority: {
|
|
27
|
+
readonly metadataSchema: DocumentAuthorityEvidence;
|
|
28
|
+
readonly metadataSidecar?: DocumentAuthorityEvidence;
|
|
29
|
+
readonly ownerCatalog: DocumentAuthorityEvidence;
|
|
30
|
+
readonly profile: DocumentAuthorityEvidence;
|
|
31
|
+
readonly templates: readonly {
|
|
32
|
+
readonly evidence: DocumentAuthorityEvidence;
|
|
33
|
+
readonly type: string;
|
|
34
|
+
}[];
|
|
35
|
+
};
|
|
36
|
+
readonly authorityPaths: {
|
|
37
|
+
readonly metadataSchema: string;
|
|
38
|
+
readonly metadataSidecar?: string;
|
|
39
|
+
readonly ownerCatalog: string;
|
|
40
|
+
readonly profile: string;
|
|
41
|
+
};
|
|
42
|
+
readonly catalog: {
|
|
43
|
+
readonly collections: readonly DocumentCatalogCollection[];
|
|
44
|
+
readonly excludedPrefixes: readonly string[];
|
|
45
|
+
};
|
|
46
|
+
readonly ownerIds: readonly string[];
|
|
47
|
+
readonly projectId: string;
|
|
48
|
+
readonly profileSchemaVersion: 2;
|
|
49
|
+
readonly schemaVersion: 2;
|
|
50
|
+
readonly semanticDigest: DocumentAuthorityDigest;
|
|
51
|
+
readonly types: readonly DocumentAuthoringTypeDescriptionV2[];
|
|
52
|
+
}
|
|
53
|
+
export type DocumentAuthoringProfileDescriptionV3 = Omit<DocumentAuthoringProfileDescriptionV2, "profileSchemaVersion" | "schemaVersion"> & {
|
|
54
|
+
readonly profileSchemaVersion: 3;
|
|
55
|
+
readonly schemaVersion: 3;
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=document-authoring-profile-description.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-authoring-profile-description.d.ts","sourceRoot":"","sources":["../../../src/application/model/document-authoring-profile-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,yBAAyB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S,EAAE,SAAS;YAC3B,QAAQ,CAAC,QAAQ,EAAE,yBAAyB,CAAC;YAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;SACvB,EAAE,CAAC;KACL,CAAC;IACF,QAAQ,CAAC,cAAc,EAAE;QACvB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;QAChC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;QAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,WAAW,EAAE,SAAS,yBAAyB,EAAE,CAAC;QAC3D,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;KAC9C,CAAC;IACF,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,uBAAuB,CAAC;IACjD,QAAQ,CAAC,KAAK,EAAE,SAAS,kCAAkC,EAAE,CAAC;CAC/D;AAED,MAAM,MAAM,qCAAqC,GAAG,IAAI,CACtD,qCAAqC,EACrC,sBAAsB,GAAG,eAAe,CACzC,GAAG;IACF,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-authoring-profile-description.js","sourceRoot":"","sources":["../../../src/application/model/document-authoring-profile-description.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export type DocumentAuthorityDigest = `sha256:${string}`;
|
|
2
|
+
export interface DocumentAuthorityEvidence {
|
|
3
|
+
readonly digest: DocumentAuthorityDigest;
|
|
4
|
+
readonly path: string;
|
|
5
|
+
readonly size: number;
|
|
6
|
+
}
|
|
7
|
+
export interface DocumentDescriptor {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly owner: string;
|
|
10
|
+
readonly repositoryPath: string;
|
|
11
|
+
readonly source: "frontmatter-readme" | "markdown-tree";
|
|
12
|
+
readonly status: string;
|
|
13
|
+
readonly summary: string;
|
|
14
|
+
readonly title: string;
|
|
15
|
+
readonly type: string;
|
|
16
|
+
}
|
|
17
|
+
export type DocumentMetadataPrimitive = boolean | null | number | string;
|
|
18
|
+
export interface DocumentMetadataObject {
|
|
19
|
+
readonly [key: string]: DocumentMetadataValue;
|
|
20
|
+
}
|
|
21
|
+
export type DocumentMetadataValue = DocumentMetadataPrimitive | readonly DocumentMetadataValue[] | DocumentMetadataObject;
|
|
22
|
+
export interface DocumentDescriptorV2 extends DocumentDescriptor {
|
|
23
|
+
readonly metadata: DocumentMetadataObject;
|
|
24
|
+
}
|
|
25
|
+
export interface DocumentIdentityProjectionEntry {
|
|
26
|
+
readonly id: string;
|
|
27
|
+
readonly repositoryPath: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ReferencedDocumentProjection {
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly path: string;
|
|
32
|
+
}
|
|
33
|
+
export interface DocumentationCatalogDiagnostic {
|
|
34
|
+
readonly message: string;
|
|
35
|
+
readonly ruleId: string;
|
|
36
|
+
readonly severity: "error";
|
|
37
|
+
readonly subject: string;
|
|
38
|
+
}
|
|
39
|
+
export interface DocumentationCatalogAuthority {
|
|
40
|
+
readonly metadataSchema: DocumentAuthorityEvidence;
|
|
41
|
+
readonly ownerCatalog: DocumentAuthorityEvidence;
|
|
42
|
+
readonly profile: DocumentAuthorityEvidence;
|
|
43
|
+
}
|
|
44
|
+
export interface DocumentationCatalogAuthorityV2 extends DocumentationCatalogAuthority {
|
|
45
|
+
readonly metadataSidecar?: DocumentAuthorityEvidence;
|
|
46
|
+
}
|
|
47
|
+
export interface DocumentationCatalogSnapshot {
|
|
48
|
+
readonly authority: DocumentationCatalogAuthority;
|
|
49
|
+
readonly diagnostics: readonly DocumentationCatalogDiagnostic[];
|
|
50
|
+
readonly documents: readonly DocumentDescriptor[];
|
|
51
|
+
readonly identityProjection: readonly DocumentIdentityProjectionEntry[];
|
|
52
|
+
readonly ownerIds: readonly string[];
|
|
53
|
+
readonly projectId: string;
|
|
54
|
+
readonly status: "complete" | "partial";
|
|
55
|
+
}
|
|
56
|
+
export interface DocumentationCatalogSnapshotV2 extends Omit<DocumentationCatalogSnapshot, "authority" | "documents"> {
|
|
57
|
+
readonly authority: DocumentationCatalogAuthorityV2;
|
|
58
|
+
readonly documents: readonly DocumentDescriptorV2[];
|
|
59
|
+
readonly semanticDigest: DocumentAuthorityDigest;
|
|
60
|
+
}
|
|
61
|
+
export type DocumentationCatalogSnapshotContract = Omit<DocumentationCatalogSnapshot, "authority"> & {
|
|
62
|
+
readonly authority: DocumentationCatalogAuthority & {
|
|
63
|
+
readonly metadataSidecar?: DocumentAuthorityEvidence;
|
|
64
|
+
};
|
|
65
|
+
readonly semanticDigest?: DocumentAuthorityDigest;
|
|
66
|
+
};
|
|
67
|
+
export interface DocumentSearchCorpusEntry {
|
|
68
|
+
readonly body: string;
|
|
69
|
+
readonly descriptor: DocumentDescriptor;
|
|
70
|
+
readonly headings: readonly string[];
|
|
71
|
+
}
|
|
72
|
+
export interface DocumentationSearchCatalogSnapshot {
|
|
73
|
+
readonly catalog: DocumentationCatalogSnapshot;
|
|
74
|
+
readonly documents: readonly DocumentSearchCorpusEntry[];
|
|
75
|
+
}
|
|
76
|
+
export interface DocumentSearchCorpusEntryV2 extends Omit<DocumentSearchCorpusEntry, "descriptor"> {
|
|
77
|
+
readonly descriptor: DocumentDescriptorV2;
|
|
78
|
+
}
|
|
79
|
+
export interface DocumentationSearchCatalogSnapshotV2 {
|
|
80
|
+
readonly catalog: DocumentationCatalogSnapshotV2;
|
|
81
|
+
readonly documents: readonly DocumentSearchCorpusEntryV2[];
|
|
82
|
+
}
|
|
83
|
+
export interface ReferencedDocumentProjectionResult {
|
|
84
|
+
readonly documents: readonly ReferencedDocumentProjection[];
|
|
85
|
+
readonly missingIds: readonly string[];
|
|
86
|
+
readonly unresolvedIds: readonly string[];
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=document-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-catalog.d.ts","sourceRoot":"","sources":["../../../src/application/model/document-catalog.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAAG,UAAU,MAAM,EAAE,CAAC;AAEzD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,GAAG,eAAe,CAAC;IACxD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AACzE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAC;CAC/C;AACD,MAAM,MAAM,qBAAqB,GAC7B,yBAAyB,GACzB,SAAS,qB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,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-catalog.js","sourceRoot":"","sources":["../../../src/application/model/document-catalog.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { DocumentReceiptOutcome } from "./document-receipt.js";
|
|
2
|
+
export type DocumentCommandId = "docs.doctor" | "docs.new" | "docs.recover";
|
|
3
|
+
export type DocumentCommandOutcome = "authority-stale" | "cancelled" | "conflict" | "execution-failure" | "invalid-input" | "recovery-required" | "success" | "violation";
|
|
4
|
+
type DocumentCommandExitCode = 0 | 1 | 2 | 3 | 130;
|
|
5
|
+
export interface DocumentRecoveryCommand {
|
|
6
|
+
readonly commandId: "detach" | "docs.recover" | "scaffold-recover";
|
|
7
|
+
readonly args: Readonly<Record<string, string>>;
|
|
8
|
+
}
|
|
9
|
+
export type DocumentCommandRemediation = DocumentRecoveryCommand | {
|
|
10
|
+
readonly commandId: DocumentCommandId | "docs.find";
|
|
11
|
+
readonly args: Readonly<Record<string, string>>;
|
|
12
|
+
};
|
|
13
|
+
export interface DocumentCommandDiagnostic {
|
|
14
|
+
readonly ruleId: string;
|
|
15
|
+
readonly severity: "error" | "info" | "warning";
|
|
16
|
+
readonly phase: "apply" | "authority" | "input" | "planning" | "recovery";
|
|
17
|
+
readonly subject: string;
|
|
18
|
+
readonly message: string;
|
|
19
|
+
readonly remediation?: DocumentCommandRemediation;
|
|
20
|
+
}
|
|
21
|
+
interface DocumentCommandEnvelope<Result> {
|
|
22
|
+
readonly schemaVersion: 2;
|
|
23
|
+
readonly command: DocumentCommandId;
|
|
24
|
+
readonly outcome: DocumentCommandOutcome;
|
|
25
|
+
readonly diagnostics: readonly DocumentCommandDiagnostic[];
|
|
26
|
+
readonly result: Result;
|
|
27
|
+
}
|
|
28
|
+
export interface DocumentCommandExecution<Result> {
|
|
29
|
+
readonly envelope: DocumentCommandEnvelope<Result>;
|
|
30
|
+
readonly exitCode: DocumentCommandExitCode;
|
|
31
|
+
}
|
|
32
|
+
export interface DocumentReachabilityProjection {
|
|
33
|
+
readonly state: "managed" | "manual-required" | "not-required";
|
|
34
|
+
readonly indexPath?: string;
|
|
35
|
+
readonly markdownLink?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface DocumentNewResult {
|
|
38
|
+
readonly kind: "new";
|
|
39
|
+
readonly documentPath?: string;
|
|
40
|
+
readonly writeState?: "already-applied" | "applied" | "preview";
|
|
41
|
+
readonly reservation: "none";
|
|
42
|
+
readonly receiptOutcome?: DocumentReceiptOutcome;
|
|
43
|
+
readonly reachability?: DocumentReachabilityProjection;
|
|
44
|
+
}
|
|
45
|
+
export interface DocumentDoctorResult {
|
|
46
|
+
readonly kind: "doctor";
|
|
47
|
+
readonly installedFoundationVersion?: string;
|
|
48
|
+
readonly installedFoundationBuildIdentity?: string;
|
|
49
|
+
readonly filesystem?: {
|
|
50
|
+
readonly basis: "platform-contract";
|
|
51
|
+
readonly strictDirectoryDurability: "platform-supported" | "platform-unsupported";
|
|
52
|
+
};
|
|
53
|
+
readonly transactionState: "corrupt" | "document" | "local-mode" | "none" | "scaffold" | "transition-residue" | "unknown" | "version-mismatch";
|
|
54
|
+
readonly protocolKind?: "document-authoring" | "local-mode" | "scaffolding" | "unknown";
|
|
55
|
+
readonly foundationVersion?: string;
|
|
56
|
+
readonly foundationBuildIdentity?: string;
|
|
57
|
+
readonly recoveryClass: "auto-recoverable" | "manual" | "not-required";
|
|
58
|
+
readonly recoveryCommand?: DocumentRecoveryCommand;
|
|
59
|
+
}
|
|
60
|
+
export interface DocumentRecoverResult {
|
|
61
|
+
readonly kind: "recover";
|
|
62
|
+
readonly transactionState: "already-applied" | "manual-required" | "no-pending-transaction" | "recovered" | "recovery-required" | "cancelled" | "failed";
|
|
63
|
+
readonly writeState: "already-committed" | "committed" | "unchanged" | "unknown";
|
|
64
|
+
readonly recoveryRequired: boolean;
|
|
65
|
+
readonly receiptDigest?: string;
|
|
66
|
+
readonly recoveryCommand?: DocumentRecoveryCommand;
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=document-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-command.d.ts","sourceRoot":"","sources":["../../../src/application/model/document-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,MAAM,MAAM,iBAAiB,GACzB,aAAa,GACb,UAAU,GACV,cAAc,CAAC;AAEnB,MAAM,MAAM,sBAAsB,GAC9B,iBAAiB,GACjB,WAAW,GACX,UAAU,GACV,mBAAmB,GACnB,eAAe,GACf,mBAAmB,GACnB,SAAS,GACT,WAAW,CAAC;AAEhB,KAAK,uBAAuB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AAEnD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,EAAE,QAAQ,GAAG,cAAc,GAAG,kBAAkB,CAAC;IACnE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACjD;AAED,MAAM,MAAM,0BAA0B,GAAG,uBAAuB,GAAG;IACjE,QAAQ,CAAC,SAAS,EAAE,iBAAiB,GAAG,WAAW,CAAC;IACpD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACjD,CAAC;AAEF,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,KAAK,EACV,OAAO,GACP,WAAW,GACX,OAAO,GACP,UAAU,GACV,UAAU,CAAC;IACf,QAAQ,CAAC,OA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C7C,QAAQ,CAAC,gCAAgC,CAAC,EAAE,MAAM,CAAC;IACnD,QAAQ,CAAC,UAAU,CAAC,EAAE;QACpB,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;QACpC,QAAQ,CAAC,yBAAyB,EAC9B,oBAAoB,GACpB,sBAAsB,CAAC;KAC5B,CAAC;IACF,QAAQ,CAAC,gBAAgB,EACrB,SAAS,GACT,UAAU,GACV,YAAY,GACZ,MAAM,GACN,UAAU,GACV,oBAAoB,GACpB,SAAS,GACT,kBAAkB,CAAC;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,oBAAoB,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS,CAAC;IACxF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAC1C,QAAQ,CAAC,aAAa,EAAE,kBAAkB,GAAG,QAAQ,GAAG,cAAc,CAAC;IACvE,QAAQ,CAAC,eAAe,CAAC,EAAE,uBAAuB,CAAC;CACpD;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,gBAAgB,EACrB,iBAAiB,GACjB,iBAAiB,GACjB,wBAAwB,GACxB,WAAW,GACX,mBAAmB,GACnB,WAAW,GACX,QAAQ,CAAC;IACb,QAAQ,CAAC,UAAU,EAAE,mBAAmB,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC;IACjF,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,eAAe,CAAC,EAAE,uBAAuB,CAAC;CACpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-command.js","sourceRoot":"","sources":["../../../src/application/model/document-command.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DocumentAuthorityDigest, DocumentDescriptor, DocumentDescriptorV2, DocumentationCatalogDiagnostic } from "./document-catalog.js";
|
|
2
|
+
export interface DocumentFindFilters {
|
|
3
|
+
readonly id?: string;
|
|
4
|
+
readonly owner?: string;
|
|
5
|
+
readonly status?: string;
|
|
6
|
+
readonly type?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DocumentFindQuery {
|
|
9
|
+
readonly filters?: DocumentFindFilters;
|
|
10
|
+
readonly text?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface DocumentFindResult {
|
|
13
|
+
readonly catalogStatus: "complete" | "partial";
|
|
14
|
+
readonly diagnostics: readonly DocumentationCatalogDiagnostic[];
|
|
15
|
+
readonly documents: readonly DocumentDescriptor[];
|
|
16
|
+
readonly matches: number;
|
|
17
|
+
}
|
|
18
|
+
export interface DocumentFindResultV2 extends Omit<DocumentFindResult, "documents"> {
|
|
19
|
+
readonly catalogSemanticDigest: DocumentAuthorityDigest;
|
|
20
|
+
readonly documents: readonly DocumentDescriptorV2[];
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=document-find.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-find.d.ts","sourceRoot":"","sources":["../../../src/application/model/document-find.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,8BAA8B,EAC/B,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,aAAa,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,WAAW,EAAE,SAAS,8BAA8B,EAAE,CAAC;IAChE,QAAQ,CAAC,SAAS,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAClD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,WAAW,CAAC;IAC7C,QAAQ,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;IACxD,QAAQ,CAAC,SAAS,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-find.js","sourceRoot":"","sources":["../../../src/application/model/document-find.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DocumentPhysicalIdentity } from "./document-physical-identity.js";
|
|
2
|
+
export interface DocumentParentMaterializationPlanV2 {
|
|
3
|
+
readonly policy: "create-missing-real-directories";
|
|
4
|
+
readonly deepestExistingDirectory: string;
|
|
5
|
+
readonly missingDirectories: readonly string[];
|
|
6
|
+
readonly finalParent: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DocumentCreatedDirectoryEvidenceV2 {
|
|
9
|
+
readonly path: string;
|
|
10
|
+
readonly identity: DocumentPhysicalIdentity;
|
|
11
|
+
}
|
|
12
|
+
export interface DocumentParentMaterializationJournalV2 {
|
|
13
|
+
readonly schemaVersion: 2;
|
|
14
|
+
readonly plan: DocumentParentMaterializationPlanV2;
|
|
15
|
+
readonly anchorIdentity: DocumentPhysicalIdentity;
|
|
16
|
+
readonly createdDirectories: readonly DocumentCreatedDirectoryEvidenceV2[];
|
|
17
|
+
}
|
|
18
|
+
export type DocumentParentMaterializationInspectionV2 = {
|
|
19
|
+
readonly state: "current";
|
|
20
|
+
readonly nextDirectory?: string;
|
|
21
|
+
} | {
|
|
22
|
+
readonly state: "manual-recovery-required";
|
|
23
|
+
readonly reason: "anchor-changed" | "created-directory-changed" | "portable-name-collision" | "unbound-directory-exists";
|
|
24
|
+
readonly path: string;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=document-parent-materialization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-parent-materialization.d.ts","sourceRoot":"","sources":["../../../src/application/model/document-parent-materialization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAEhF,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,MAAM,EAAE,iCAAiC,CAAC;IACnD,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAC1C,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;CAC7C;AAED,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,mCAAmC,CAAC;IACnD,QAAQ,CAAC,cAAc,EAAE,wBAAwB,CAAC;IAClD,QAAQ,CAAC,kBAAkB,EAAE,SAAS,kCAAkC,EAAE,CAAC;CAC5E;AAED,MAAM,MAAM,yCAAyC,GACjD;IACE,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC,GACD;IACE,QAAQ,CAAC,KAAK,EAAE,0BAA0B,CAAC;IAC3C,QAAQ,CAAC,MAAM,EACX,gBAAgB,GAChB,2BAA2B,GAC3B,yBAAyB,GACzB,0BAA0B,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-parent-materialization.js","sourceRoot":"","sources":["../../../src/application/model/document-parent-materialization.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface DocumentPhysicalIdentity {
|
|
2
|
+
readonly adapter: "node-filesystem";
|
|
3
|
+
readonly version: 1;
|
|
4
|
+
readonly dev: string;
|
|
5
|
+
readonly ino: string;
|
|
6
|
+
readonly birthtimeNs: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function assertDocumentPhysicalIdentity(value: unknown): asserts value is DocumentPhysicalIdentity;
|
|
9
|
+
export declare function assertNonzeroDocumentPhysicalIdentity(value: unknown): asserts value is DocumentPhysicalIdentity;
|
|
10
|
+
//# sourceMappingURL=document-physical-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-physical-identity.d.ts","sourceRoot":"","sources":["../../../src/application/model/document-physical-identity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAID,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,KAAK,IAAI,wBAAwB,CAsB3C;AAED,wBAAgB,qCAAqC,CACnD,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,KAAK,IAAI,wBAAwB,CAW3C"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const DECIMAL_IDENTITY_COMPONENT = /^(?:0|[1-9][0-9]{0,31})$/u;
|
|
2
|
+
export function assertDocumentPhysicalIdentity(value) {
|
|
3
|
+
if (typeof value !== "object" ||
|
|
4
|
+
value === null ||
|
|
5
|
+
Array.isArray(value)) {
|
|
6
|
+
throw new Error("Document physical identity is not an object.");
|
|
7
|
+
}
|
|
8
|
+
const candidate = value;
|
|
9
|
+
if (Reflect.ownKeys(candidate).length !== 5 ||
|
|
10
|
+
candidate.adapter !== "node-filesystem" ||
|
|
11
|
+
candidate.version !== 1 ||
|
|
12
|
+
![
|
|
13
|
+
candidate.dev,
|
|
14
|
+
candidate.ino,
|
|
15
|
+
candidate.birthtimeNs
|
|
16
|
+
].every((part) => typeof part === "string" &&
|
|
17
|
+
DECIMAL_IDENTITY_COMPONENT.test(part))) {
|
|
18
|
+
throw new Error("Document physical identity wire evidence is invalid.");
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export function assertNonzeroDocumentPhysicalIdentity(value) {
|
|
22
|
+
assertDocumentPhysicalIdentity(value);
|
|
23
|
+
if (value.dev === "0" ||
|
|
24
|
+
value.ino === "0" ||
|
|
25
|
+
value.birthtimeNs === "0") {
|
|
26
|
+
throw new Error("Document physical identity contains zero and grants no mutation authority.");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=document-physical-identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-physical-identity.js","sourceRoot":"","sources":["../../../src/application/model/document-physical-identity.ts"],"names":[],"mappings":"AAQA,MAAM,0BAA0B,GAAG,2BAA2B,CAAC;AAE/D,MAAM,UAAU,8BAA8B,CAC5C,KAAc;IAEd,IACE,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EACpB,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;IACD,MAAM,SAAS,GAAG,KAAgC,CAAC;IACnD,IACE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC;QACvC,SAAS,CAAC,OAAO,KAAK,iBAAiB;QACvC,SAAS,CAAC,OAAO,KAAK,CAAC;QACvB,CAAC;YACC,SAAS,CAAC,GAAG;YACb,SAAS,CAAC,GAAG;YACb,SAAS,CAAC,WAAW;SACtB,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ;YACxC,0BAA0B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EACxC,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;AACH,CAAC;AAED,MAAM,UAAU,qCAAqC,CACnD,KAAc;IAEd,8BAA8B,CAAC,KAAK,CAAC,CAAC;IACtC,IACE,KAAK,CAAC,GAAG,KAAK,GAAG;QACjB,KAAK,CAAC,GAAG,KAAK,GAAG;QACjB,KAAK,CAAC,WAAW,KAAK,GAAG,EACzB,CAAC;QACD,MAAM,IAAI,KAAK,CACb,4EAA4E,CAC7E,CAAC;IACJ,CAAC;AACH,CAAC"}
|