@agent-teams/engineering-foundation 0.14.0 → 0.16.0-rc.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/README.md +66 -8
- package/dist/capability-runtime.d.ts +2 -1
- package/dist/capability-runtime.d.ts.map +1 -1
- package/dist/capability-runtime.js +1 -1
- package/dist/capability-runtime.js.map +1 -1
- package/dist/check-contract.d.ts +2 -1
- package/dist/check-contract.d.ts.map +1 -1
- package/dist/check-runner.d.ts.map +1 -1
- package/dist/check-runner.js +6 -2
- package/dist/check-runner.js.map +1 -1
- package/dist/cli-arguments.d.ts +6 -0
- package/dist/cli-arguments.d.ts.map +1 -1
- package/dist/cli-arguments.js +179 -49
- package/dist/cli-arguments.js.map +1 -1
- package/dist/cli.js +16 -10
- package/dist/cli.js.map +1 -1
- package/dist/command-error.d.ts +14 -0
- package/dist/command-error.d.ts.map +1 -0
- package/dist/command-error.js +98 -0
- package/dist/command-error.js.map +1 -0
- package/dist/document-authoring/adapters/inbound/cli/document-command-failure.d.ts +5 -0
- package/dist/document-authoring/adapters/inbound/cli/document-command-failure.d.ts.map +1 -0
- package/dist/document-authoring/adapters/inbound/cli/document-command-failure.js +36 -0
- package/dist/document-authoring/adapters/inbound/cli/document-command-failure.js.map +1 -0
- package/dist/document-authoring/adapters/inbound/cli/document-command-renderer.d.ts +6 -0
- package/dist/document-authoring/adapters/inbound/cli/document-command-renderer.d.ts.map +1 -0
- package/dist/document-authoring/adapters/inbound/cli/document-command-renderer.js +127 -0
- package/dist/document-authoring/adapters/inbound/cli/document-command-renderer.js.map +1 -0
- package/dist/document-authoring/adapters/node/load-validated-document-authoring-profile.d.ts +33 -0
- package/dist/document-authoring/adapters/node/load-validated-document-authoring-profile.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/load-validated-document-authoring-profile.js +47 -0
- package/dist/document-authoring/adapters/node/load-validated-document-authoring-profile.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-authoring-profile-reader.d.ts.map +1 -1
- package/dist/document-authoring/adapters/node/node-authoring-profile-reader.js +14 -39
- package/dist/document-authoring/adapters/node/node-authoring-profile-reader.js.map +1 -1
- package/dist/document-authoring/adapters/node/node-document-contract-validator.d.ts +7 -0
- package/dist/document-authoring/adapters/node/node-document-contract-validator.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-contract-validator.js +306 -0
- package/dist/document-authoring/adapters/node/node-document-contract-validator.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-environment-inspector.d.ts +17 -0
- package/dist/document-authoring/adapters/node/node-document-environment-inspector.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-environment-inspector.js +49 -0
- package/dist/document-authoring/adapters/node/node-document-environment-inspector.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-file-state.d.ts +21 -0
- package/dist/document-authoring/adapters/node/node-document-file-state.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-file-state.js +183 -0
- package/dist/document-authoring/adapters/node/node-document-file-state.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-journal-slot.d.ts +2 -0
- package/dist/document-authoring/adapters/node/node-document-journal-slot.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-journal-slot.js +18 -0
- package/dist/document-authoring/adapters/node/node-document-journal-slot.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-journal-store-faults.d.ts +36 -0
- package/dist/document-authoring/adapters/node/node-document-journal-store-faults.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-journal-store-faults.js +2 -0
- package/dist/document-authoring/adapters/node/node-document-journal-store-faults.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-journal-store-private.d.ts +2 -0
- package/dist/document-authoring/adapters/node/node-document-journal-store-private.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-journal-store-private.js +2 -0
- package/dist/document-authoring/adapters/node/node-document-journal-store-private.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-journal-store.d.ts +22 -0
- package/dist/document-authoring/adapters/node/node-document-journal-store.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-journal-store.js +339 -0
- package/dist/document-authoring/adapters/node/node-document-journal-store.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-planning-profile-reader.d.ts +10 -0
- package/dist/document-authoring/adapters/node/node-document-planning-profile-reader.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-planning-profile-reader.js +75 -0
- package/dist/document-authoring/adapters/node/node-document-planning-profile-reader.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-planning-state-reader.d.ts +10 -0
- package/dist/document-authoring/adapters/node/node-document-planning-state-reader.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-planning-state-reader.js +164 -0
- package/dist/document-authoring/adapters/node/node-document-planning-state-reader.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-publisher-private.d.ts +2 -0
- package/dist/document-authoring/adapters/node/node-document-publisher-private.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-publisher-private.js +2 -0
- package/dist/document-authoring/adapters/node/node-document-publisher-private.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-publisher.d.ts +54 -0
- package/dist/document-authoring/adapters/node/node-document-publisher.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-publisher.js +252 -0
- package/dist/document-authoring/adapters/node/node-document-publisher.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-reachability-projector.d.ts +17 -0
- package/dist/document-authoring/adapters/node/node-document-reachability-projector.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-reachability-projector.js +43 -0
- package/dist/document-authoring/adapters/node/node-document-reachability-projector.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-structure-verifier.d.ts +21 -0
- package/dist/document-authoring/adapters/node/node-document-structure-verifier.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-structure-verifier.js +80 -0
- package/dist/document-authoring/adapters/node/node-document-structure-verifier.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-template-reader.d.ts +10 -0
- package/dist/document-authoring/adapters/node/node-document-template-reader.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-template-reader.js +32 -0
- package/dist/document-authoring/adapters/node/node-document-template-reader.js.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-transaction-coordinator.d.ts +21 -0
- package/dist/document-authoring/adapters/node/node-document-transaction-coordinator.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/node-document-transaction-coordinator.js +89 -0
- package/dist/document-authoring/adapters/node/node-document-transaction-coordinator.js.map +1 -0
- package/dist/document-authoring/adapters/node/recapture-document-publication-paths.d.ts +16 -0
- package/dist/document-authoring/adapters/node/recapture-document-publication-paths.d.ts.map +1 -0
- package/dist/document-authoring/adapters/node/recapture-document-publication-paths.js +89 -0
- package/dist/document-authoring/adapters/node/recapture-document-publication-paths.js.map +1 -0
- package/dist/document-authoring/application/model/document-command.d.ts +69 -0
- package/dist/document-authoring/application/model/document-command.d.ts.map +1 -0
- package/dist/document-authoring/application/model/document-command.js +2 -0
- package/dist/document-authoring/application/model/document-command.js.map +1 -0
- package/dist/document-authoring/application/model/document-physical-identity.d.ts +10 -0
- package/dist/document-authoring/application/model/document-physical-identity.d.ts.map +1 -0
- package/dist/document-authoring/application/model/document-physical-identity.js +29 -0
- package/dist/document-authoring/application/model/document-physical-identity.js.map +1 -0
- package/dist/document-authoring/application/model/document-planning.d.ts +182 -0
- package/dist/document-authoring/application/model/document-planning.d.ts.map +1 -0
- package/dist/document-authoring/application/model/document-planning.js +2 -0
- package/dist/document-authoring/application/model/document-planning.js.map +1 -0
- package/dist/document-authoring/application/model/document-receipt.d.ts +74 -0
- package/dist/document-authoring/application/model/document-receipt.d.ts.map +1 -0
- package/dist/document-authoring/application/model/document-receipt.js +2 -0
- package/dist/document-authoring/application/model/document-receipt.js.map +1 -0
- package/dist/document-authoring/application/model/document-transaction-inspection.d.ts +43 -0
- package/dist/document-authoring/application/model/document-transaction-inspection.d.ts.map +1 -0
- package/dist/document-authoring/application/model/document-transaction-inspection.js +2 -0
- package/dist/document-authoring/application/model/document-transaction-inspection.js.map +1 -0
- package/dist/document-authoring/application/model/document-transaction.d.ts +81 -0
- package/dist/document-authoring/application/model/document-transaction.d.ts.map +1 -0
- package/dist/document-authoring/application/model/document-transaction.js +2 -0
- package/dist/document-authoring/application/model/document-transaction.js.map +1 -0
- package/dist/document-authoring/application/policies/authoring-profile-semantics.d.ts +5 -1
- package/dist/document-authoring/application/policies/authoring-profile-semantics.d.ts.map +1 -1
- package/dist/document-authoring/application/policies/authoring-profile-semantics.js +7 -0
- package/dist/document-authoring/application/policies/authoring-profile-semantics.js.map +1 -1
- package/dist/document-authoring/application/policies/classify-document-recovery.d.ts +81 -0
- package/dist/document-authoring/application/policies/classify-document-recovery.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/classify-document-recovery.js +138 -0
- package/dist/document-authoring/application/policies/classify-document-recovery.js.map +1 -0
- package/dist/document-authoring/application/policies/document-command-consumer-root.d.ts +2 -0
- package/dist/document-authoring/application/policies/document-command-consumer-root.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/document-command-consumer-root.js +15 -0
- package/dist/document-authoring/application/policies/document-command-consumer-root.js.map +1 -0
- package/dist/document-authoring/application/policies/document-command-projection.d.ts +20 -0
- package/dist/document-authoring/application/policies/document-command-projection.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/document-command-projection.js +90 -0
- package/dist/document-authoring/application/policies/document-command-projection.js.map +1 -0
- package/dist/document-authoring/application/policies/document-logical-preimage.d.ts +14 -0
- package/dist/document-authoring/application/policies/document-logical-preimage.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/document-logical-preimage.js +61 -0
- package/dist/document-authoring/application/policies/document-logical-preimage.js.map +1 -0
- package/dist/document-authoring/application/policies/document-planning-policy-error.d.ts +6 -0
- package/dist/document-authoring/application/policies/document-planning-policy-error.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/document-planning-policy-error.js +9 -0
- package/dist/document-authoring/application/policies/document-planning-policy-error.js.map +1 -0
- package/dist/document-authoring/application/policies/document-receipt-policy.d.ts +5 -0
- package/dist/document-authoring/application/policies/document-receipt-policy.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/document-receipt-policy.js +53 -0
- package/dist/document-authoring/application/policies/document-receipt-policy.js.map +1 -0
- package/dist/document-authoring/application/policies/document-transaction-digests.d.ts +5 -0
- package/dist/document-authoring/application/policies/document-transaction-digests.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/document-transaction-digests.js +12 -0
- package/dist/document-authoring/application/policies/document-transaction-digests.js.map +1 -0
- package/dist/document-authoring/application/policies/document-transaction-envelope-policy.d.ts +4 -0
- package/dist/document-authoring/application/policies/document-transaction-envelope-policy.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/document-transaction-envelope-policy.js +118 -0
- package/dist/document-authoring/application/policies/document-transaction-envelope-policy.js.map +1 -0
- package/dist/document-authoring/application/policies/normalize-document-intent.d.ts +3 -0
- package/dist/document-authoring/application/policies/normalize-document-intent.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/normalize-document-intent.js +104 -0
- package/dist/document-authoring/application/policies/normalize-document-intent.js.map +1 -0
- package/dist/document-authoring/application/policies/project-document-reachability.d.ts +14 -0
- package/dist/document-authoring/application/policies/project-document-reachability.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/project-document-reachability.js +57 -0
- package/dist/document-authoring/application/policies/project-document-reachability.js.map +1 -0
- package/dist/document-authoring/application/policies/project-similar-document-advice.d.ts +4 -0
- package/dist/document-authoring/application/policies/project-similar-document-advice.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/project-similar-document-advice.js +17 -0
- package/dist/document-authoring/application/policies/project-similar-document-advice.js.map +1 -0
- package/dist/document-authoring/application/policies/resolve-document-authoring.d.ts +13 -0
- package/dist/document-authoring/application/policies/resolve-document-authoring.d.ts.map +1 -0
- package/dist/document-authoring/application/policies/resolve-document-authoring.js +154 -0
- package/dist/document-authoring/application/policies/resolve-document-authoring.js.map +1 -0
- package/dist/document-authoring/application/ports/document-authority-recompiler.d.ts +19 -0
- package/dist/document-authoring/application/ports/document-authority-recompiler.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/document-authority-recompiler.js +2 -0
- package/dist/document-authoring/application/ports/document-authority-recompiler.js.map +1 -0
- package/dist/document-authoring/application/ports/document-contract-validator.d.ts +6 -0
- package/dist/document-authoring/application/ports/document-contract-validator.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/document-contract-validator.js +2 -0
- package/dist/document-authoring/application/ports/document-contract-validator.js.map +1 -0
- package/dist/document-authoring/application/ports/document-environment-inspector.d.ts +12 -0
- package/dist/document-authoring/application/ports/document-environment-inspector.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/document-environment-inspector.js +2 -0
- package/dist/document-authoring/application/ports/document-environment-inspector.js.map +1 -0
- package/dist/document-authoring/application/ports/document-file-state.d.ts +55 -0
- package/dist/document-authoring/application/ports/document-file-state.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/document-file-state.js +2 -0
- package/dist/document-authoring/application/ports/document-file-state.js.map +1 -0
- package/dist/document-authoring/application/ports/document-journal-store.d.ts +31 -0
- package/dist/document-authoring/application/ports/document-journal-store.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/document-journal-store.js +2 -0
- package/dist/document-authoring/application/ports/document-journal-store.js.map +1 -0
- package/dist/document-authoring/application/ports/document-planning-profile-reader.d.ts +9 -0
- package/dist/document-authoring/application/ports/document-planning-profile-reader.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/document-planning-profile-reader.js +2 -0
- package/dist/document-authoring/application/ports/document-planning-profile-reader.js.map +1 -0
- package/dist/document-authoring/application/ports/document-planning-state-reader.d.ts +9 -0
- package/dist/document-authoring/application/ports/document-planning-state-reader.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/document-planning-state-reader.js +2 -0
- package/dist/document-authoring/application/ports/document-planning-state-reader.js.map +1 -0
- package/dist/document-authoring/application/ports/document-publisher.d.ts +38 -0
- package/dist/document-authoring/application/ports/document-publisher.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/document-publisher.js +2 -0
- package/dist/document-authoring/application/ports/document-publisher.js.map +1 -0
- package/dist/document-authoring/application/ports/document-reachability-projector.d.ts +13 -0
- package/dist/document-authoring/application/ports/document-reachability-projector.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/document-reachability-projector.js +2 -0
- package/dist/document-authoring/application/ports/document-reachability-projector.js.map +1 -0
- package/dist/document-authoring/application/ports/document-structure-verifier.d.ts +17 -0
- package/dist/document-authoring/application/ports/document-structure-verifier.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/document-structure-verifier.js +2 -0
- package/dist/document-authoring/application/ports/document-structure-verifier.js.map +1 -0
- package/dist/document-authoring/application/ports/document-template-reader.d.ts +9 -0
- package/dist/document-authoring/application/ports/document-template-reader.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/document-template-reader.js +2 -0
- package/dist/document-authoring/application/ports/document-template-reader.js.map +1 -0
- package/dist/document-authoring/application/ports/document-transaction-coordinator.d.ts +21 -0
- package/dist/document-authoring/application/ports/document-transaction-coordinator.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/document-transaction-coordinator.js +2 -0
- package/dist/document-authoring/application/ports/document-transaction-coordinator.js.map +1 -0
- package/dist/document-authoring/application/ports/documentation-catalog-reader.d.ts +11 -0
- package/dist/document-authoring/application/ports/documentation-catalog-reader.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/documentation-catalog-reader.js +2 -0
- package/dist/document-authoring/application/ports/documentation-catalog-reader.js.map +1 -0
- package/dist/document-authoring/application/ports/similar-document-advisor.d.ts +17 -0
- package/dist/document-authoring/application/ports/similar-document-advisor.d.ts.map +1 -0
- package/dist/document-authoring/application/ports/similar-document-advisor.js +2 -0
- package/dist/document-authoring/application/ports/similar-document-advisor.js.map +1 -0
- package/dist/document-authoring/application/use-cases/apply-document-plan.d.ts +16 -0
- package/dist/document-authoring/application/use-cases/apply-document-plan.d.ts.map +1 -0
- package/dist/document-authoring/application/use-cases/apply-document-plan.js +215 -0
- package/dist/document-authoring/application/use-cases/apply-document-plan.js.map +1 -0
- package/dist/document-authoring/application/use-cases/build-documentation-catalog.d.ts +2 -1
- package/dist/document-authoring/application/use-cases/build-documentation-catalog.d.ts.map +1 -1
- package/dist/document-authoring/application/use-cases/build-documentation-catalog.js.map +1 -1
- package/dist/document-authoring/application/use-cases/compile-document-plan.d.ts +6 -0
- package/dist/document-authoring/application/use-cases/compile-document-plan.d.ts.map +1 -0
- package/dist/document-authoring/application/use-cases/compile-document-plan.js +156 -0
- package/dist/document-authoring/application/use-cases/compile-document-plan.js.map +1 -0
- package/dist/document-authoring/application/use-cases/document-journal-reconciliation.d.ts +18 -0
- package/dist/document-authoring/application/use-cases/document-journal-reconciliation.d.ts.map +1 -0
- package/dist/document-authoring/application/use-cases/document-journal-reconciliation.js +90 -0
- package/dist/document-authoring/application/use-cases/document-journal-reconciliation.js.map +1 -0
- package/dist/document-authoring/application/use-cases/document-transaction-continuation.d.ts +59 -0
- package/dist/document-authoring/application/use-cases/document-transaction-continuation.d.ts.map +1 -0
- package/dist/document-authoring/application/use-cases/document-transaction-continuation.js +360 -0
- package/dist/document-authoring/application/use-cases/document-transaction-continuation.js.map +1 -0
- package/dist/document-authoring/application/use-cases/document-transaction-error.d.ts +5 -0
- package/dist/document-authoring/application/use-cases/document-transaction-error.d.ts.map +1 -0
- package/dist/document-authoring/application/use-cases/document-transaction-error.js +9 -0
- package/dist/document-authoring/application/use-cases/document-transaction-error.js.map +1 -0
- package/dist/document-authoring/application/use-cases/document-transaction-execution.d.ts +9 -0
- package/dist/document-authoring/application/use-cases/document-transaction-execution.d.ts.map +1 -0
- package/dist/document-authoring/application/use-cases/document-transaction-execution.js +40 -0
- package/dist/document-authoring/application/use-cases/document-transaction-execution.js.map +1 -0
- package/dist/document-authoring/application/use-cases/plan-documentation-document.d.ts +66 -0
- package/dist/document-authoring/application/use-cases/plan-documentation-document.d.ts.map +1 -0
- package/dist/document-authoring/application/use-cases/plan-documentation-document.js +276 -0
- package/dist/document-authoring/application/use-cases/plan-documentation-document.js.map +1 -0
- package/dist/document-authoring/application/use-cases/recover-document-transaction.d.ts +10 -0
- package/dist/document-authoring/application/use-cases/recover-document-transaction.d.ts.map +1 -0
- package/dist/document-authoring/application/use-cases/recover-document-transaction.js +233 -0
- package/dist/document-authoring/application/use-cases/recover-document-transaction.js.map +1 -0
- package/dist/document-authoring/application/use-cases/run-document-doctor.d.ts +18 -0
- package/dist/document-authoring/application/use-cases/run-document-doctor.d.ts.map +1 -0
- package/dist/document-authoring/application/use-cases/run-document-doctor.js +171 -0
- package/dist/document-authoring/application/use-cases/run-document-doctor.js.map +1 -0
- package/dist/document-authoring/application/use-cases/run-document-new.d.ts +30 -0
- package/dist/document-authoring/application/use-cases/run-document-new.d.ts.map +1 -0
- package/dist/document-authoring/application/use-cases/run-document-new.js +221 -0
- package/dist/document-authoring/application/use-cases/run-document-new.js.map +1 -0
- package/dist/document-authoring/application/use-cases/run-document-recover.d.ts +21 -0
- package/dist/document-authoring/application/use-cases/run-document-recover.d.ts.map +1 -0
- package/dist/document-authoring/application/use-cases/run-document-recover.js +126 -0
- package/dist/document-authoring/application/use-cases/run-document-recover.js.map +1 -0
- package/dist/document-authoring/composition/document-command-cli.d.ts +7 -0
- package/dist/document-authoring/composition/document-command-cli.d.ts.map +1 -0
- package/dist/document-authoring/composition/document-command-cli.js +32 -0
- package/dist/document-authoring/composition/document-command-cli.js.map +1 -0
- package/dist/document-authoring/composition/inspect-document-transaction.d.ts +8 -0
- package/dist/document-authoring/composition/inspect-document-transaction.d.ts.map +1 -0
- package/dist/document-authoring/composition/inspect-document-transaction.js +177 -0
- package/dist/document-authoring/composition/inspect-document-transaction.js.map +1 -0
- package/dist/document-authoring/composition/node-document-authority-recompiler.d.ts +11 -0
- package/dist/document-authoring/composition/node-document-authority-recompiler.d.ts.map +1 -0
- package/dist/document-authoring/composition/node-document-authority-recompiler.js +62 -0
- package/dist/document-authoring/composition/node-document-authority-recompiler.js.map +1 -0
- package/dist/document-authoring/composition/node-document-commands.d.ts +10 -0
- package/dist/document-authoring/composition/node-document-commands.d.ts.map +1 -0
- package/dist/document-authoring/composition/node-document-commands.js +68 -0
- package/dist/document-authoring/composition/node-document-commands.js.map +1 -0
- package/dist/document-authoring/composition/node-document-planning.d.ts +7 -0
- package/dist/document-authoring/composition/node-document-planning.d.ts.map +1 -0
- package/dist/document-authoring/composition/node-document-planning.js +77 -0
- package/dist/document-authoring/composition/node-document-planning.js.map +1 -0
- package/dist/document-authoring/composition/node-document-writing-private.d.ts +15 -0
- package/dist/document-authoring/composition/node-document-writing-private.d.ts.map +1 -0
- package/dist/document-authoring/composition/node-document-writing-private.js +52 -0
- package/dist/document-authoring/composition/node-document-writing-private.js.map +1 -0
- package/dist/document-authoring/composition/node-document-writing.d.ts +8 -0
- package/dist/document-authoring/composition/node-document-writing.d.ts.map +1 -0
- package/dist/document-authoring/composition/node-document-writing.js +10 -0
- package/dist/document-authoring/composition/node-document-writing.js.map +1 -0
- package/dist/document-authoring/document-planning-error.d.ts +6 -0
- package/dist/document-authoring/document-planning-error.d.ts.map +1 -0
- package/dist/document-authoring/document-planning-error.js +9 -0
- package/dist/document-authoring/document-planning-error.js.map +1 -0
- package/dist/document-authoring/index.d.ts +22 -0
- package/dist/document-authoring/index.d.ts.map +1 -1
- package/dist/document-authoring/index.js +19 -0
- package/dist/document-authoring/index.js.map +1 -1
- package/dist/document-command.d.ts +9 -0
- package/dist/document-command.d.ts.map +1 -1
- package/dist/document-command.js +64 -3
- package/dist/document-command.js.map +1 -1
- package/dist/foundation-state-contract.d.ts +1 -0
- package/dist/foundation-state-contract.d.ts.map +1 -1
- package/dist/foundation-state-contract.js +1 -0
- package/dist/foundation-state-contract.js.map +1 -1
- package/dist/local-mode/inspection.d.ts.map +1 -1
- package/dist/local-mode/inspection.js +51 -3
- package/dist/local-mode/inspection.js.map +1 -1
- package/dist/package-self-check.d.ts +2 -1
- package/dist/package-self-check.d.ts.map +1 -1
- package/dist/package-self-check.js +30 -7
- package/dist/package-self-check.js.map +1 -1
- package/dist/report-renderer.d.ts.map +1 -1
- package/dist/report-renderer.js +1 -0
- package/dist/report-renderer.js.map +1 -1
- package/dist/repository-mutation/adapters/node/node-absent-file-publication-private.d.ts +19 -0
- package/dist/repository-mutation/adapters/node/node-absent-file-publication-private.d.ts.map +1 -0
- package/dist/repository-mutation/adapters/node/node-absent-file-publication-private.js +74 -0
- package/dist/repository-mutation/adapters/node/node-absent-file-publication-private.js.map +1 -0
- package/dist/repository-mutation/adapters/node/node-absent-file-publication.d.ts +2 -0
- package/dist/repository-mutation/adapters/node/node-absent-file-publication.d.ts.map +1 -1
- package/dist/repository-mutation/adapters/node/node-absent-file-publication.js +56 -154
- package/dist/repository-mutation/adapters/node/node-absent-file-publication.js.map +1 -1
- package/dist/repository-mutation/adapters/node/node-cleanup-owned-temporary.d.ts +26 -0
- package/dist/repository-mutation/adapters/node/node-cleanup-owned-temporary.d.ts.map +1 -0
- package/dist/repository-mutation/adapters/node/node-cleanup-owned-temporary.js +151 -0
- package/dist/repository-mutation/adapters/node/node-cleanup-owned-temporary.js.map +1 -0
- package/dist/repository-mutation/adapters/node/node-directory-durability.d.ts +6 -0
- package/dist/repository-mutation/adapters/node/node-directory-durability.d.ts.map +1 -1
- package/dist/repository-mutation/adapters/node/node-directory-durability.js +15 -0
- package/dist/repository-mutation/adapters/node/node-directory-durability.js.map +1 -1
- package/dist/repository-mutation/adapters/node/node-prepare-exact-sibling-temporary.d.ts +14 -0
- package/dist/repository-mutation/adapters/node/node-prepare-exact-sibling-temporary.d.ts.map +1 -0
- package/dist/repository-mutation/adapters/node/node-prepare-exact-sibling-temporary.js +26 -0
- package/dist/repository-mutation/adapters/node/node-prepare-exact-sibling-temporary.js.map +1 -0
- package/dist/repository-mutation/adapters/node/node-publish-prepared-absent-file.d.ts +28 -0
- package/dist/repository-mutation/adapters/node/node-publish-prepared-absent-file.d.ts.map +1 -0
- package/dist/repository-mutation/adapters/node/node-publish-prepared-absent-file.js +47 -0
- package/dist/repository-mutation/adapters/node/node-publish-prepared-absent-file.js.map +1 -0
- package/dist/repository-mutation/adapters/node/node-terminal-evidence-directory.d.ts +22 -0
- package/dist/repository-mutation/adapters/node/node-terminal-evidence-directory.d.ts.map +1 -0
- package/dist/repository-mutation/adapters/node/node-terminal-evidence-directory.js +59 -0
- package/dist/repository-mutation/adapters/node/node-terminal-evidence-directory.js.map +1 -0
- package/dist/repository-mutation/application/ports/owned-temporary-cleanup-transition.d.ts +7 -0
- package/dist/repository-mutation/application/ports/owned-temporary-cleanup-transition.d.ts.map +1 -0
- package/dist/repository-mutation/application/ports/owned-temporary-cleanup-transition.js +2 -0
- package/dist/repository-mutation/application/ports/owned-temporary-cleanup-transition.js.map +1 -0
- package/dist/scaffolding/adapters/node/filesystem-authority-workspace.d.ts +1 -1
- package/dist/scaffolding/adapters/node/filesystem-authority-workspace.d.ts.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-authority-workspace.js +74 -53
- package/dist/scaffolding/adapters/node/filesystem-authority-workspace.js.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-finalization.d.ts +9 -1
- package/dist/scaffolding/adapters/node/filesystem-finalization.d.ts.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-finalization.js +34 -6
- package/dist/scaffolding/adapters/node/filesystem-finalization.js.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-journal-state.d.ts.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-journal-state.js +2 -1
- package/dist/scaffolding/adapters/node/filesystem-journal-state.js.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-journal.d.ts +13 -5
- package/dist/scaffolding/adapters/node/filesystem-journal.d.ts.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-journal.js +112 -74
- package/dist/scaffolding/adapters/node/filesystem-journal.js.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-operation-state.d.ts +10 -1
- package/dist/scaffolding/adapters/node/filesystem-operation-state.d.ts.map +1 -1
- package/dist/scaffolding/adapters/node/filesystem-operation-state.js +40 -2
- package/dist/scaffolding/adapters/node/filesystem-operation-state.js.map +1 -1
- package/dist/scaffolding/adapters/node/node-scaffold-journal-evidence.d.ts +35 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-evidence.d.ts.map +1 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-evidence.js +137 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-evidence.js.map +1 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-gateway.d.ts +11 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-gateway.d.ts.map +1 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-gateway.js +95 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-gateway.js.map +1 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-reconciliation.d.ts +15 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-reconciliation.d.ts.map +1 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-reconciliation.js +29 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-reconciliation.js.map +1 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-store-faults.d.ts +46 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-store-faults.d.ts.map +1 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-store-faults.js +2 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-store-faults.js.map +1 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-store.d.ts +19 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-store.d.ts.map +1 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-store.js +288 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-store.js.map +1 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-transaction-evidence.d.ts +2 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-transaction-evidence.d.ts.map +1 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-transaction-evidence.js +34 -0
- package/dist/scaffolding/adapters/node/node-scaffold-journal-transaction-evidence.js.map +1 -0
- package/dist/schema-catalog.d.ts.map +1 -1
- package/dist/schema-catalog.js +4 -0
- package/dist/schema-catalog.js.map +1 -1
- package/dist/schema-ids.d.ts +1 -1
- package/dist/schema-ids.d.ts.map +1 -1
- package/dist/schema-ids.js +3 -0
- package/dist/schema-ids.js.map +1 -1
- package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.d.ts.map +1 -1
- package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.js +17 -10
- package/dist/source-inventory/adapters/outbound/filesystem/filesystem-source-tree-reader.js.map +1 -1
- package/dist/transaction-coordination/adapters/node/document-envelope-bindings.d.ts +22 -0
- package/dist/transaction-coordination/adapters/node/document-envelope-bindings.d.ts.map +1 -0
- package/dist/transaction-coordination/adapters/node/document-envelope-bindings.js +123 -0
- package/dist/transaction-coordination/adapters/node/document-envelope-bindings.js.map +1 -0
- package/dist/transaction-coordination/adapters/node/document-temporary-identity.d.ts +2 -2
- package/dist/transaction-coordination/adapters/node/document-temporary-identity.d.ts.map +1 -1
- package/dist/transaction-coordination/adapters/node/document-temporary-identity.js +4 -4
- package/dist/transaction-coordination/adapters/node/document-temporary-identity.js.map +1 -1
- package/dist/transaction-coordination/adapters/node/foundation-transition-evidence.d.ts +4 -0
- package/dist/transaction-coordination/adapters/node/foundation-transition-evidence.d.ts.map +1 -0
- package/dist/transaction-coordination/adapters/node/foundation-transition-evidence.js +58 -0
- package/dist/transaction-coordination/adapters/node/foundation-transition-evidence.js.map +1 -0
- package/dist/transaction-coordination/adapters/node/node-foundation-cleanup-transition.d.ts +17 -0
- package/dist/transaction-coordination/adapters/node/node-foundation-cleanup-transition.d.ts.map +1 -0
- package/dist/transaction-coordination/adapters/node/node-foundation-cleanup-transition.js +79 -0
- package/dist/transaction-coordination/adapters/node/node-foundation-cleanup-transition.js.map +1 -0
- package/dist/transaction-coordination/adapters/node/node-foundation-operation-lock.d.ts +9 -1
- package/dist/transaction-coordination/adapters/node/node-foundation-operation-lock.d.ts.map +1 -1
- package/dist/transaction-coordination/adapters/node/node-foundation-operation-lock.js +34 -11
- package/dist/transaction-coordination/adapters/node/node-foundation-operation-lock.js.map +1 -1
- package/dist/transaction-coordination/adapters/node/node-foundation-state-directory.d.ts +7 -0
- package/dist/transaction-coordination/adapters/node/node-foundation-state-directory.d.ts.map +1 -1
- package/dist/transaction-coordination/adapters/node/node-foundation-state-directory.js +15 -0
- package/dist/transaction-coordination/adapters/node/node-foundation-state-directory.js.map +1 -1
- package/dist/transaction-coordination/adapters/node/node-foundation-transaction-slot.d.ts +2 -2
- package/dist/transaction-coordination/adapters/node/node-foundation-transaction-slot.d.ts.map +1 -1
- package/dist/transaction-coordination/adapters/node/node-foundation-transaction-slot.js +123 -140
- package/dist/transaction-coordination/adapters/node/node-foundation-transaction-slot.js.map +1 -1
- package/dist/transaction-coordination/application/foundation-transaction-coordinator.d.ts +5 -4
- package/dist/transaction-coordination/application/foundation-transaction-coordinator.d.ts.map +1 -1
- package/dist/transaction-coordination/application/foundation-transaction-coordinator.js +14 -1
- package/dist/transaction-coordination/application/foundation-transaction-coordinator.js.map +1 -1
- package/dist/transaction-coordination/application/foundation-transaction-error.d.ts +4 -3
- package/dist/transaction-coordination/application/foundation-transaction-error.d.ts.map +1 -1
- package/dist/transaction-coordination/application/foundation-transaction-error.js.map +1 -1
- package/dist/transaction-coordination/application/model/internal-transaction-status.d.ts +26 -0
- package/dist/transaction-coordination/application/model/internal-transaction-status.d.ts.map +1 -0
- package/dist/transaction-coordination/application/model/internal-transaction-status.js +2 -0
- package/dist/transaction-coordination/application/model/internal-transaction-status.js.map +1 -0
- package/dist/transaction-coordination/application/ports/foundation-transaction-slot.d.ts +2 -2
- package/dist/transaction-coordination/application/ports/foundation-transaction-slot.d.ts.map +1 -1
- package/dist/workspace-inventory/adapters/outbound/pnpm/pnpm-workspace-inventory-reader.d.ts.map +1 -1
- package/dist/workspace-inventory/adapters/outbound/pnpm/pnpm-workspace-inventory-reader.js +13 -9
- package/dist/workspace-inventory/adapters/outbound/pnpm/pnpm-workspace-inventory-reader.js.map +1 -1
- package/package.json +12 -3
- package/schemas/document-authoring-profile/v1.schema.json +31 -1
- package/schemas/document-command-envelope/v2.schema.json +205 -0
- package/schemas/foundation-check-report/v1.schema.json +1 -1
- package/schemas/foundation-command-error/v1.schema.json +24 -0
- package/schemas/foundation-transaction-envelope/v3.schema.json +169 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { lstat, readdir, realpath } from "node:fs/promises";
|
|
2
|
+
import { isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
3
|
+
import { assertNotCancelled } from "../../../cancellation.js";
|
|
4
|
+
import { ContainedFileReadError, readContainedRegularFile } from "../../../filesystem-path-safety.js";
|
|
5
|
+
import { documentRepositoryParentPath, isDocumentRepositoryPath } from "../../application/policies/document-repository-path.js";
|
|
6
|
+
import { DocumentPlanningError } from "../../document-planning-error.js";
|
|
7
|
+
const MAX_EXISTING_DESTINATION_BYTES = 1024 * 1024;
|
|
8
|
+
function hasCode(error, code) {
|
|
9
|
+
return error instanceof Error && "code" in error &&
|
|
10
|
+
error.code === code;
|
|
11
|
+
}
|
|
12
|
+
function isMissing(error) {
|
|
13
|
+
return hasCode(error, "ENOENT") || hasCode(error, "ENOTDIR");
|
|
14
|
+
}
|
|
15
|
+
function contained(root, candidate) {
|
|
16
|
+
const relation = relative(root, candidate);
|
|
17
|
+
return relation === "" ||
|
|
18
|
+
(!isAbsolute(relation) && relation !== ".." && !relation.startsWith(`..${sep}`));
|
|
19
|
+
}
|
|
20
|
+
function portableNameIdentity(name) {
|
|
21
|
+
return name.normalize("NFC").replace(/[A-Z]/gu, (character) => character.toLowerCase());
|
|
22
|
+
}
|
|
23
|
+
async function hasPortableNameCollision(parent, requestedName) {
|
|
24
|
+
const requestedIdentity = portableNameIdentity(requestedName);
|
|
25
|
+
const entries = await readdir(parent);
|
|
26
|
+
return entries.some((entry) => entry !== requestedName && portableNameIdentity(entry) === requestedIdentity);
|
|
27
|
+
}
|
|
28
|
+
function parentUnavailable(message, cause) {
|
|
29
|
+
throw new DocumentPlanningError("DOCUMENT_PLANNING_PARENT_UNAVAILABLE", message, cause === undefined ? undefined : { cause });
|
|
30
|
+
}
|
|
31
|
+
function observationUnavailable(message, cause) {
|
|
32
|
+
throw new DocumentPlanningError("DOCUMENT_PLANNING_AUTHORITY_UNAVAILABLE", message, cause === undefined ? undefined : { cause });
|
|
33
|
+
}
|
|
34
|
+
async function observeRegularDestination(input) {
|
|
35
|
+
try {
|
|
36
|
+
const bytes = await readContainedRegularFile({
|
|
37
|
+
candidate: input.candidate,
|
|
38
|
+
maxBytes: MAX_EXISTING_DESTINATION_BYTES,
|
|
39
|
+
root: input.root
|
|
40
|
+
});
|
|
41
|
+
return Object.freeze({
|
|
42
|
+
bytes: new Uint8Array(bytes),
|
|
43
|
+
state: "regular-file"
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
if (error instanceof ContainedFileReadError &&
|
|
48
|
+
(error.failure === "invalid" || error.failure === "symlink")) {
|
|
49
|
+
return Object.freeze({ kind: "special-file", state: "conflict" });
|
|
50
|
+
}
|
|
51
|
+
if (error instanceof ContainedFileReadError) {
|
|
52
|
+
observationUnavailable(`Document destination changed or became unavailable: ${input.destination}.`, error);
|
|
53
|
+
}
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function observeRealParent(input) {
|
|
58
|
+
const lexicalRoot = resolve(input.consumerRoot);
|
|
59
|
+
let root;
|
|
60
|
+
try {
|
|
61
|
+
const rootMetadata = await lstat(lexicalRoot);
|
|
62
|
+
if (rootMetadata.isSymbolicLink() || !rootMetadata.isDirectory()) {
|
|
63
|
+
parentUnavailable("Document repository root must be a real directory.");
|
|
64
|
+
}
|
|
65
|
+
root = await realpath(lexicalRoot);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
if (error instanceof DocumentPlanningError) {
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
parentUnavailable("Document repository root is unavailable.", error);
|
|
72
|
+
}
|
|
73
|
+
let current = root;
|
|
74
|
+
const parentSegments = input.destination.split("/").slice(0, -1);
|
|
75
|
+
for (const segment of parentSegments) {
|
|
76
|
+
assertNotCancelled(input.signal);
|
|
77
|
+
try {
|
|
78
|
+
if (await hasPortableNameCollision(current, segment)) {
|
|
79
|
+
parentUnavailable(`Document destination parent has a portable name collision: ${segment}.`);
|
|
80
|
+
}
|
|
81
|
+
const next = join(current, segment);
|
|
82
|
+
const metadata = await lstat(next);
|
|
83
|
+
if (metadata.isSymbolicLink() || !metadata.isDirectory()) {
|
|
84
|
+
parentUnavailable(`Document destination parent ancestry must contain only real directories: ${segment}.`);
|
|
85
|
+
}
|
|
86
|
+
const canonical = await realpath(next);
|
|
87
|
+
if (!contained(root, canonical)) {
|
|
88
|
+
parentUnavailable("Document destination parent escapes the repository.");
|
|
89
|
+
}
|
|
90
|
+
current = canonical;
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (error instanceof DocumentPlanningError) {
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
if (isMissing(error)) {
|
|
97
|
+
parentUnavailable("Document destination parent must already exist.", error);
|
|
98
|
+
}
|
|
99
|
+
parentUnavailable("Document destination parent cannot be observed safely.", error);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return { parent: current, root };
|
|
103
|
+
}
|
|
104
|
+
export class NodeDocumentPlanningStateReader {
|
|
105
|
+
async observe(request) {
|
|
106
|
+
assertNotCancelled(request.signal);
|
|
107
|
+
if (!isDocumentRepositoryPath(request.destination)) {
|
|
108
|
+
throw new DocumentPlanningError("DOCUMENT_PLANNING_INPUT_INVALID", "Document destination must use the portable repository-relative path grammar.");
|
|
109
|
+
}
|
|
110
|
+
const { parent, root } = await observeRealParent(request);
|
|
111
|
+
assertNotCancelled(request.signal);
|
|
112
|
+
const basename = request.destination.split("/").at(-1) ?? "";
|
|
113
|
+
let destination;
|
|
114
|
+
try {
|
|
115
|
+
if (await hasPortableNameCollision(parent, basename)) {
|
|
116
|
+
destination = Object.freeze({
|
|
117
|
+
kind: "portable-name-collision",
|
|
118
|
+
state: "conflict"
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
const candidate = join(parent, basename);
|
|
123
|
+
const metadata = await lstat(candidate).catch((error) => {
|
|
124
|
+
if (isMissing(error)) {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
throw error;
|
|
128
|
+
});
|
|
129
|
+
if (metadata === null) {
|
|
130
|
+
destination = Object.freeze({ state: "absent" });
|
|
131
|
+
}
|
|
132
|
+
else if (metadata.isSymbolicLink() || !metadata.isFile()) {
|
|
133
|
+
destination = Object.freeze({
|
|
134
|
+
kind: metadata.isDirectory() ? "directory" : "special-file",
|
|
135
|
+
state: "conflict"
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
destination = await observeRegularDestination({
|
|
140
|
+
candidate,
|
|
141
|
+
destination: request.destination,
|
|
142
|
+
root
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
if (error instanceof DocumentPlanningError) {
|
|
149
|
+
throw error;
|
|
150
|
+
}
|
|
151
|
+
observationUnavailable(`Document destination cannot be observed safely: ${request.destination}.`, error);
|
|
152
|
+
}
|
|
153
|
+
assertNotCancelled(request.signal);
|
|
154
|
+
return Object.freeze({
|
|
155
|
+
destination,
|
|
156
|
+
expectedParent: Object.freeze({
|
|
157
|
+
ancestry: "real-directories",
|
|
158
|
+
path: documentRepositoryParentPath(request.destination),
|
|
159
|
+
state: "directory"
|
|
160
|
+
})
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=node-document-planning-state-reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-document-planning-state-reader.js","sourceRoot":"","sources":["../../../../src/document-authoring/adapters/node/node-document-planning-state-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACzB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,MAAM,8BAA8B,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnD,SAAS,OAAO,CAAC,KAAc,EAAE,IAAY;IAC3C,OAAO,KAAK,YAAY,KAAK,IAAI,MAAM,IAAI,KAAK;QAC7C,KAA+B,CAAC,IAAI,KAAK,IAAI,CAAC;AACnD,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,SAAS,CAAC,IAAY,EAAE,SAAiB;IAChD,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC3C,OAAO,QAAQ,KAAK,EAAE;QACpB,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,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ACnD,CAAC;qBAAM,IAAI,QAAQ,CAAC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC;oBAC3D,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;wBAC1B,IAAI,EAAE,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,cAAc;wBAC3D,KAAK,EAAE,UAAU;qBAClB,CAAC,CAAC;gBACL,CAAC;qBAAM,CAAC;oBACN,WAAW,GAAG,MAAM,yBAAyB,CAAC;wBAC5C,SAAS;wBACT,WAAW,EAAE,OAAO,CAAC,WAAW;wBAChC,IAAI;qBACL,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,qBAAqB,EAAE,CAAC;gBAC3C,MAAM,KAAK,CAAC;YACd,CAAC;YACD,sBAAsB,CACpB,mDAAmD,OAAO,CAAC,WAAW,GAAG,EACzE,KAAK,CACN,CAAC;QACJ,CAAC;QACD,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACnC,OAAO,MAAM,CAAC,MAAM,CAAC;YACnB,WAAW;YACX,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC;gBAC5B,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,4BAA4B,CAAC,OAAO,CAAC,WAAW,CAAC;gBACvD,KAAK,EAAE,WAAW;aACnB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-document-publisher-private.d.ts","sourceRoot":"","sources":["../../../../src/document-authoring/adapters/node/node-document-publisher-private.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACtB,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-document-publisher-private.js","sourceRoot":"","sources":["../../../../src/document-authoring/adapters/node/node-document-publisher-private.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACtB,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { link, open, rm } from "node:fs/promises";
|
|
2
|
+
import { syncDirectoryDurably, syncDirectoryStrictly } from "../../../repository-mutation/adapters/node/node-directory-durability.js";
|
|
3
|
+
import { type DocumentPhysicalIdentity } from "../../application/model/document-physical-identity.js";
|
|
4
|
+
import type { DocumentOwnedTemporary } from "../../application/model/document-transaction.js";
|
|
5
|
+
import type { DocumentPlan } from "../../application/model/document-planning.js";
|
|
6
|
+
import type { DocumentPublicationResult, DocumentPublisher } from "../../application/ports/document-publisher.js";
|
|
7
|
+
type NodeDocumentPublisherFaultPoint = {
|
|
8
|
+
readonly phase: "after-temporary-synced";
|
|
9
|
+
} | {
|
|
10
|
+
readonly phase: "after-hard-link";
|
|
11
|
+
} | {
|
|
12
|
+
readonly phase: "after-publication-synced";
|
|
13
|
+
} | {
|
|
14
|
+
readonly phase: "after-temporary-cleanup-synced";
|
|
15
|
+
};
|
|
16
|
+
type NodeDocumentPublisherFaultInjector = (point: NodeDocumentPublisherFaultPoint) => Promise<void> | void;
|
|
17
|
+
export interface NodeDocumentPublisherOperations {
|
|
18
|
+
readonly faultInjector?: NodeDocumentPublisherFaultInjector;
|
|
19
|
+
readonly link?: typeof link;
|
|
20
|
+
readonly open?: typeof open;
|
|
21
|
+
readonly remove?: typeof rm;
|
|
22
|
+
readonly syncDirectoryDurably?: typeof syncDirectoryDurably;
|
|
23
|
+
readonly syncDirectoryStrictly?: typeof syncDirectoryStrictly;
|
|
24
|
+
}
|
|
25
|
+
export declare class NodeDocumentPublisher implements DocumentPublisher {
|
|
26
|
+
#private;
|
|
27
|
+
constructor(operations?: NodeDocumentPublisherOperations);
|
|
28
|
+
prepare(request: {
|
|
29
|
+
readonly consumerRoot: string;
|
|
30
|
+
readonly plan: DocumentPlan;
|
|
31
|
+
readonly signal?: AbortSignal;
|
|
32
|
+
}): Promise<DocumentOwnedTemporary>;
|
|
33
|
+
publishPrepared(request: {
|
|
34
|
+
readonly consumerRoot: string;
|
|
35
|
+
readonly plan: DocumentPlan;
|
|
36
|
+
readonly signal?: AbortSignal;
|
|
37
|
+
readonly temporary: DocumentOwnedTemporary;
|
|
38
|
+
}): Promise<DocumentPublicationResult>;
|
|
39
|
+
completePublication(request: {
|
|
40
|
+
readonly consumerRoot: string;
|
|
41
|
+
readonly plan: DocumentPlan;
|
|
42
|
+
readonly signal?: AbortSignal;
|
|
43
|
+
readonly temporary: DocumentOwnedTemporary;
|
|
44
|
+
}): Promise<{
|
|
45
|
+
readonly publicationIdentity: DocumentPhysicalIdentity;
|
|
46
|
+
}>;
|
|
47
|
+
removeOwnedTemporary(request: {
|
|
48
|
+
readonly consumerRoot: string;
|
|
49
|
+
readonly signal?: AbortSignal;
|
|
50
|
+
readonly temporary: DocumentOwnedTemporary;
|
|
51
|
+
}): Promise<void>;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=node-document-publisher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-document-publisher.d.ts","sourceRoot":"","sources":["../../../../src/document-authoring/adapters/node/node-document-publisher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,yEAAyE,CAAC;AAKjF,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,uDAAuD,CAAC;AAC/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAC9F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,+CAA+C,CAAC;AAmEvD,KAAK,+BAA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AAC;KAC5C,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAkDrC;IAEK,mBAAmB,CAAC,OAAO,EAAE;QACjC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;QAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;QAC9B,QAAQ,CAAC,SAAS,EAAE,sBAAsB,CAAC;KAC5C,GAAG,OAAO,CAAC;QAAE,QAAQ,CAAC,mBAAmB,EAAE,wBAAwB,CAAA;KAAE,CAAC,CA+DtE;IAEK,oBAAoB,CAAC,OAAO,EAAE;QAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;QAC9B,QAAQ,CAAC,SAAS,EAAE,sBAAsB,CAAC;KAC5C,GAAG,OAAO,CAAC,IAAI,CAAC,CAiChB;CACF"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { link, open, rm } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { cleanupIdentityMatchingOwnedTemporary } from "../../../repository-mutation/adapters/node/node-cleanup-owned-temporary.js";
|
|
5
|
+
import { syncDirectoryDurably, syncDirectoryStrictly } from "../../../repository-mutation/adapters/node/node-directory-durability.js";
|
|
6
|
+
import { prepareExactSiblingTemporary } from "../../../repository-mutation/adapters/node/node-prepare-exact-sibling-temporary.js";
|
|
7
|
+
import { publishPreparedAbsentFile } from "../../../repository-mutation/adapters/node/node-publish-prepared-absent-file.js";
|
|
8
|
+
import { readBoundedRegularFile } from "../../../repository-mutation/adapters/node/node-bounded-regular-file.js";
|
|
9
|
+
import { assertDocumentPhysicalIdentity, assertNonzeroDocumentPhysicalIdentity } from "../../application/model/document-physical-identity.js";
|
|
10
|
+
import { documentTemporaryPath } from "../../application/policies/document-temporary-path.js";
|
|
11
|
+
import { recaptureDocumentPublicationPaths, sameDocumentAncestry, sameDocumentPhysicalIdentity } from "./recapture-document-publication-paths.js";
|
|
12
|
+
function postimage(plan) {
|
|
13
|
+
return {
|
|
14
|
+
bytes: Buffer.from(plan.output.contentBase64, "base64"),
|
|
15
|
+
digest: plan.output.digest,
|
|
16
|
+
mode: 0o644,
|
|
17
|
+
size: plan.output.size
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function wireIdentity(identity, authorityRequired) {
|
|
21
|
+
const result = {
|
|
22
|
+
adapter: "node-filesystem",
|
|
23
|
+
version: 1,
|
|
24
|
+
dev: identity.dev.toString(10),
|
|
25
|
+
ino: identity.ino.toString(10),
|
|
26
|
+
birthtimeNs: identity.birthtimeNs.toString(10)
|
|
27
|
+
};
|
|
28
|
+
assertDocumentPhysicalIdentity(result);
|
|
29
|
+
if (authorityRequired) {
|
|
30
|
+
assertNonzeroDocumentPhysicalIdentity(result);
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
function physicalIdentity(temporary) {
|
|
35
|
+
const value = temporary.identity;
|
|
36
|
+
assertNonzeroDocumentPhysicalIdentity(value);
|
|
37
|
+
const result = {
|
|
38
|
+
dev: BigInt(value.dev),
|
|
39
|
+
ino: BigInt(value.ino),
|
|
40
|
+
birthtimeNs: BigInt(value.birthtimeNs)
|
|
41
|
+
};
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
async function readExactPublicationIdentity(destinationPath, plan) {
|
|
45
|
+
const observed = await readBoundedRegularFile(destinationPath, plan.output.size);
|
|
46
|
+
if (observed.outcome !== "read" ||
|
|
47
|
+
observed.bytes.byteLength !== plan.output.size ||
|
|
48
|
+
`sha256:${createHash("sha256").update(observed.bytes).digest("hex")}` !== plan.output.digest ||
|
|
49
|
+
(process.platform !== "win32" && (observed.mode & 0o777) !== 0o644)) {
|
|
50
|
+
throw new Error("Published document identity could not be verified.");
|
|
51
|
+
}
|
|
52
|
+
return wireIdentity(observed.identity, true);
|
|
53
|
+
}
|
|
54
|
+
function assertTemporaryBinding(plan, temporary) {
|
|
55
|
+
if (temporary.path !== documentTemporaryPath(plan.destination, plan.planDigest) ||
|
|
56
|
+
temporary.digest !== plan.output.digest) {
|
|
57
|
+
throw new Error("Document temporary is not exactly bound to the supplied Plan.");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export class NodeDocumentPublisher {
|
|
61
|
+
#operations;
|
|
62
|
+
constructor(operations = {}) {
|
|
63
|
+
this.#operations = {
|
|
64
|
+
link: operations.link ?? link,
|
|
65
|
+
open: operations.open ?? open,
|
|
66
|
+
remove: operations.remove ?? rm,
|
|
67
|
+
syncDirectoryDurably: operations.syncDirectoryDurably ?? syncDirectoryDurably,
|
|
68
|
+
syncDirectoryStrictly: operations.syncDirectoryStrictly ?? syncDirectoryStrictly,
|
|
69
|
+
...(operations.faultInjector === undefined
|
|
70
|
+
? {}
|
|
71
|
+
: { faultInjector: operations.faultInjector })
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
async prepare(request) {
|
|
75
|
+
request.signal?.throwIfAborted();
|
|
76
|
+
const paths = await recaptureDocumentPublicationPaths({
|
|
77
|
+
consumerRoot: request.consumerRoot,
|
|
78
|
+
destination: request.plan.destination
|
|
79
|
+
});
|
|
80
|
+
const temporaryPath = documentTemporaryPath(request.plan.destination, request.plan.planDigest);
|
|
81
|
+
const temporaryAbsolutePath = join(paths.root, ...temporaryPath.split("/"));
|
|
82
|
+
await recaptureDocumentPublicationPaths({
|
|
83
|
+
consumerRoot: request.consumerRoot,
|
|
84
|
+
destination: temporaryPath
|
|
85
|
+
});
|
|
86
|
+
await this.#operations.syncDirectoryStrictly(paths.parent);
|
|
87
|
+
const recaptured = await recaptureDocumentPublicationPaths({
|
|
88
|
+
consumerRoot: request.consumerRoot,
|
|
89
|
+
destination: request.plan.destination
|
|
90
|
+
});
|
|
91
|
+
if (!sameDocumentAncestry(paths.ancestryIdentities, recaptured.ancestryIdentities)) {
|
|
92
|
+
throw new Error("Document publication parent changed during durability preflight.");
|
|
93
|
+
}
|
|
94
|
+
request.signal?.throwIfAborted();
|
|
95
|
+
const captured = await prepareExactSiblingTemporary({
|
|
96
|
+
displayPath: temporaryPath,
|
|
97
|
+
faultInjector: undefined,
|
|
98
|
+
onIdentityCaptured() { },
|
|
99
|
+
open: this.#operations.open,
|
|
100
|
+
postimage: postimage(request.plan),
|
|
101
|
+
temporaryPath: temporaryAbsolutePath
|
|
102
|
+
});
|
|
103
|
+
await this.#operations.syncDirectoryStrictly(recaptured.parent);
|
|
104
|
+
await this.#operations.faultInjector?.({ phase: "after-temporary-synced" });
|
|
105
|
+
const temporary = {
|
|
106
|
+
path: temporaryPath,
|
|
107
|
+
digest: request.plan.output.digest,
|
|
108
|
+
identity: wireIdentity(captured, false)
|
|
109
|
+
};
|
|
110
|
+
return Object.freeze({
|
|
111
|
+
...temporary,
|
|
112
|
+
identity: Object.freeze(temporary.identity)
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
async publishPrepared(request) {
|
|
116
|
+
request.signal?.throwIfAborted();
|
|
117
|
+
assertTemporaryBinding(request.plan, request.temporary);
|
|
118
|
+
const expectedIdentity = physicalIdentity(request.temporary);
|
|
119
|
+
const before = await recaptureDocumentPublicationPaths({
|
|
120
|
+
consumerRoot: request.consumerRoot,
|
|
121
|
+
destination: request.plan.destination
|
|
122
|
+
});
|
|
123
|
+
await this.#operations.syncDirectoryStrictly(before.parent);
|
|
124
|
+
const paths = await recaptureDocumentPublicationPaths({
|
|
125
|
+
consumerRoot: request.consumerRoot,
|
|
126
|
+
destination: request.plan.destination
|
|
127
|
+
});
|
|
128
|
+
if (!sameDocumentAncestry(before.ancestryIdentities, paths.ancestryIdentities)) {
|
|
129
|
+
throw new Error("Document publication parent changed during durability preflight.");
|
|
130
|
+
}
|
|
131
|
+
const temporaryPath = join(paths.root, ...request.temporary.path.split("/"));
|
|
132
|
+
request.signal?.throwIfAborted();
|
|
133
|
+
// No cancellation observation is allowed after this point: link may have
|
|
134
|
+
// succeeded even when a caller aborts while publication is in flight.
|
|
135
|
+
const outcome = await publishPreparedAbsentFile({
|
|
136
|
+
allowUnsupportedDirectoryDurability: false,
|
|
137
|
+
classifyBoundedRegularFile: readBoundedRegularFile,
|
|
138
|
+
destinationPath: paths.destinationPath,
|
|
139
|
+
displayPath: request.plan.destination,
|
|
140
|
+
expectedIdentity,
|
|
141
|
+
faultInjector: async () => this.#operations.faultInjector?.({
|
|
142
|
+
phase: "after-hard-link"
|
|
143
|
+
}),
|
|
144
|
+
link: this.#operations.link,
|
|
145
|
+
parent: paths.parent,
|
|
146
|
+
postimage: postimage(request.plan),
|
|
147
|
+
readBoundedRegularFile,
|
|
148
|
+
syncDirectory: this.#operations.syncDirectoryDurably,
|
|
149
|
+
temporaryPath
|
|
150
|
+
});
|
|
151
|
+
await this.#operations.faultInjector?.({ phase: "after-publication-synced" });
|
|
152
|
+
if (outcome === "published") {
|
|
153
|
+
return Object.freeze({
|
|
154
|
+
outcome,
|
|
155
|
+
publicationIdentity: Object.freeze(wireIdentity(expectedIdentity, true)),
|
|
156
|
+
identityEvidence: "owned-temporary"
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
return Object.freeze({
|
|
160
|
+
outcome,
|
|
161
|
+
publicationIdentity: Object.freeze(await readExactPublicationIdentity(paths.destinationPath, request.plan))
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
async completePublication(request) {
|
|
165
|
+
request.signal?.throwIfAborted();
|
|
166
|
+
assertTemporaryBinding(request.plan, request.temporary);
|
|
167
|
+
const expectedIdentity = physicalIdentity(request.temporary);
|
|
168
|
+
const before = await recaptureDocumentPublicationPaths({
|
|
169
|
+
consumerRoot: request.consumerRoot,
|
|
170
|
+
destination: request.plan.destination
|
|
171
|
+
});
|
|
172
|
+
const temporaryPath = join(before.root, ...request.temporary.path.split("/"));
|
|
173
|
+
request.signal?.throwIfAborted();
|
|
174
|
+
// From this point recovery completion is cancellation-masked: publication
|
|
175
|
+
// may already exist and its durability must reach a verified postcondition.
|
|
176
|
+
const publicationIdentity = await readExactPublicationIdentity(before.destinationPath, request.plan);
|
|
177
|
+
if (!sameDocumentPhysicalIdentity({
|
|
178
|
+
dev: BigInt(publicationIdentity.dev),
|
|
179
|
+
ino: BigInt(publicationIdentity.ino),
|
|
180
|
+
birthtimeNs: BigInt(publicationIdentity.birthtimeNs)
|
|
181
|
+
}, expectedIdentity)) {
|
|
182
|
+
throw new Error("Published document does not match its bound temporary identity.");
|
|
183
|
+
}
|
|
184
|
+
try {
|
|
185
|
+
const observedTemporary = await readBoundedRegularFile(temporaryPath, request.plan.output.size);
|
|
186
|
+
if (observedTemporary.outcome !== "read" ||
|
|
187
|
+
!sameDocumentPhysicalIdentity(observedTemporary.identity, expectedIdentity) ||
|
|
188
|
+
`sha256:${createHash("sha256").update(observedTemporary.bytes).digest("hex")}` !== request.plan.output.digest ||
|
|
189
|
+
(process.platform !== "win32" && (observedTemporary.mode & 0o777) !== 0o644)) {
|
|
190
|
+
throw new Error("Bound document temporary changed during publication completion.");
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
if (!(error instanceof Error && "code" in error &&
|
|
195
|
+
error.code === "ENOENT")) {
|
|
196
|
+
throw error;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
await this.#operations.syncDirectoryStrictly(before.parent);
|
|
200
|
+
const after = await recaptureDocumentPublicationPaths({
|
|
201
|
+
consumerRoot: request.consumerRoot,
|
|
202
|
+
destination: request.plan.destination
|
|
203
|
+
});
|
|
204
|
+
if (!sameDocumentAncestry(before.ancestryIdentities, after.ancestryIdentities)) {
|
|
205
|
+
throw new Error("Document publication parent changed during completion.");
|
|
206
|
+
}
|
|
207
|
+
const verifiedIdentity = await readExactPublicationIdentity(after.destinationPath, request.plan);
|
|
208
|
+
if (verifiedIdentity.dev !== publicationIdentity.dev ||
|
|
209
|
+
verifiedIdentity.ino !== publicationIdentity.ino ||
|
|
210
|
+
verifiedIdentity.birthtimeNs !== publicationIdentity.birthtimeNs) {
|
|
211
|
+
throw new Error("Published document identity changed during completion.");
|
|
212
|
+
}
|
|
213
|
+
return Object.freeze({
|
|
214
|
+
publicationIdentity: Object.freeze(verifiedIdentity)
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
async removeOwnedTemporary(request) {
|
|
218
|
+
request.signal?.throwIfAborted();
|
|
219
|
+
const expectedIdentity = physicalIdentity(request.temporary);
|
|
220
|
+
const paths = await recaptureDocumentPublicationPaths({
|
|
221
|
+
consumerRoot: request.consumerRoot,
|
|
222
|
+
destination: request.temporary.path
|
|
223
|
+
});
|
|
224
|
+
await this.#operations.syncDirectoryStrictly(paths.parent);
|
|
225
|
+
const recaptured = await recaptureDocumentPublicationPaths({
|
|
226
|
+
consumerRoot: request.consumerRoot,
|
|
227
|
+
destination: request.temporary.path
|
|
228
|
+
});
|
|
229
|
+
if (!sameDocumentAncestry(paths.ancestryIdentities, recaptured.ancestryIdentities)) {
|
|
230
|
+
throw new Error("Document temporary parent changed during durability preflight.");
|
|
231
|
+
}
|
|
232
|
+
request.signal?.throwIfAborted();
|
|
233
|
+
// Cleanup is an identity-authorized mutation. Once started, finish without
|
|
234
|
+
// observing cancellation so callers cannot receive a false pre-mutation view.
|
|
235
|
+
const outcome = await cleanupIdentityMatchingOwnedTemporary({
|
|
236
|
+
allowUnsupportedDirectoryDurability: false,
|
|
237
|
+
displayPath: request.temporary.path,
|
|
238
|
+
expectedIdentity,
|
|
239
|
+
parent: recaptured.parent,
|
|
240
|
+
rm: this.#operations.remove,
|
|
241
|
+
syncDirectory: this.#operations.syncDirectoryDurably,
|
|
242
|
+
temporaryPath: recaptured.destinationPath
|
|
243
|
+
});
|
|
244
|
+
if (outcome === "different") {
|
|
245
|
+
throw new Error("Document temporary was replaced and was preserved.");
|
|
246
|
+
}
|
|
247
|
+
await this.#operations.faultInjector?.({
|
|
248
|
+
phase: "after-temporary-cleanup-synced"
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
//# sourceMappingURL=node-document-publisher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-document-publisher.js","sourceRoot":"","sources":["../../../../src/document-authoring/adapters/node/node-document-publisher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,qCAAqC,EAAE,MAAM,4EAA4E,CAAC;AACnI,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,yEAAyE,CAAC;AACjF,OAAO,EAAE,4BAA4B,EAAE,MAAM,oFAAoF,CAAC;AAClI,OAAO,EAAE,yBAAyB,EAAE,MAAM,iFAAiF,CAAC;AAC5H,OAAO,EAAE,sBAAsB,EAAE,MAAM,yEAAyE,CAAC;AAEjH,OAAO,EACL,8BAA8B,EAC9B,qCAAqC,EAEtC,MAAM,uDAAuD,CAAC;AAO/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EACL,iCAAiC,EACjC,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,2CAA2C,CAAC;AAEnD,SAAS,SAAS,CAAC,IAAkB;IACnC,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,QAAQ,CAAC;QACvD,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;QAC1B,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI;KACvB,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CACnB,QAA8B,EAC9B,iBAA0B;IAE1B,MAAM,MAAM,GAA6B;QACvC,OA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AAU,CAAC,eAAe;SAC1C,CAAC,CAAC;QACH,IAAI,OAAO,KAAK,WAAW,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACxE,CAAC;QACD,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;YACrC,KAAK,EAAE,gCAAgC;SACxC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DocumentReachabilityProjection } from "../../application/model/document-command.js";
|
|
2
|
+
import type { DocumentPlan } from "../../application/model/document-planning.js";
|
|
3
|
+
import type { DocumentPlanningProfileReader } from "../../application/ports/document-planning-profile-reader.js";
|
|
4
|
+
import type { DocumentReachabilityProjector } from "../../application/ports/document-reachability-projector.js";
|
|
5
|
+
/**
|
|
6
|
+
* Projects the manual reachability action from the exact profile authority
|
|
7
|
+
* captured by the plan. It never infers a profile from repository layout.
|
|
8
|
+
*/
|
|
9
|
+
export declare class NodeDocumentReachabilityProjector implements DocumentReachabilityProjector {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(profiles: DocumentPlanningProfileReader);
|
|
12
|
+
project(input: {
|
|
13
|
+
readonly consumerRoot: string;
|
|
14
|
+
readonly plan: DocumentPlan;
|
|
15
|
+
}): Promise<DocumentReachabilityProjection>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=node-document-reachability-projector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-document-reachability-projector.d.ts","sourceRoot":"","sources":["../../../../src/document-authoring/adapters/node/node-document-reachability-projector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAIlG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6DAA6D,CAAC;AACjH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4DAA4D,CAAC;AAqBhH;;;GAGG;AACH,qBAAa,iCACb,YAAW,6BAA6B;;IAGtC,YAAY,QAAQ,EAAE,6BAA6B,EAElD;IAEK,OAAO,CAAC,KAAK,EAAE;QACnB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;KAC7B,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAwB1C;CACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { projectDocumentReachability } from "../../application/policies/project-document-reachability.js";
|
|
2
|
+
import { selectDocumentArtifact } from "../../application/policies/resolve-document-authoring.js";
|
|
3
|
+
import { DocumentPlanningError } from "../../document-planning-error.js";
|
|
4
|
+
function sameEvidence(observed, planned) {
|
|
5
|
+
return observed.path === planned.path &&
|
|
6
|
+
observed.digest === planned.digest &&
|
|
7
|
+
observed.size === planned.size;
|
|
8
|
+
}
|
|
9
|
+
function authorityMismatch(message) {
|
|
10
|
+
throw new DocumentPlanningError("DOCUMENT_PLANNING_AUTHORITY_CHANGED", message);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Projects the manual reachability action from the exact profile authority
|
|
14
|
+
* captured by the plan. It never infers a profile from repository layout.
|
|
15
|
+
*/
|
|
16
|
+
export class NodeDocumentReachabilityProjector {
|
|
17
|
+
#profiles;
|
|
18
|
+
constructor(profiles) {
|
|
19
|
+
this.#profiles = profiles;
|
|
20
|
+
}
|
|
21
|
+
async project(input) {
|
|
22
|
+
const profile = await this.#profiles.read({
|
|
23
|
+
consumerRoot: input.consumerRoot,
|
|
24
|
+
path: input.plan.authority.profile.path,
|
|
25
|
+
});
|
|
26
|
+
if (!sameEvidence(profile.evidence, input.plan.authority.profile)) {
|
|
27
|
+
authorityMismatch("Document authoring profile changed after the plan was compiled.");
|
|
28
|
+
}
|
|
29
|
+
if (profile.projectId !== input.plan.projectId) {
|
|
30
|
+
authorityMismatch("Document authoring profile no longer identifies the planned project.");
|
|
31
|
+
}
|
|
32
|
+
const artifact = selectDocumentArtifact(profile, input.plan.intent.type);
|
|
33
|
+
const heading = artifact.heading.kind === "title"
|
|
34
|
+
? input.plan.intent.title
|
|
35
|
+
: `${input.plan.intent.id}: ${input.plan.intent.title}`;
|
|
36
|
+
return projectDocumentReachability({
|
|
37
|
+
artifact,
|
|
38
|
+
destination: input.plan.destination,
|
|
39
|
+
heading,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=node-document-reachability-projector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-document-reachability-projector.js","sourceRoot":"","sources":["../../../../src/document-authoring/adapters/node/node-document-reachability-projector.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,2BAA2B,EAAE,MAAM,6DAA6D,CAAC;AAC1G,OAAO,EAAE,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,SAAS,YAAY,CACnB,QAAmC,EACnC,OAAkC;IAElC,OAAO,QAAQ,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI;QACnC,QAAQ,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM;QAClC,QAAQ,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC;AACnC,CAAC;AAED,SAAS,iBAAiB,CAAC,OAAe;IACxC,MAAM,IAAI,qBAAqB,CAC7B,qCAAqC,EACrC,OAAO,CACR,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,OAAO,iCAAiC;IAEnC,SAAS,CAAgC;IAElD,YAAY,QAAuC;QACjD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,KAGb;QACC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YACxC,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI;SACxC,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;YAClE,iBAAiB,CACf,iEAAiE,CAClE,CAAC;QACJ,CAAC;QACD,IAAI,OAAO,CAAC,SAAS,KAAK,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YAC/C,iBAAiB,CACf,sEAAsE,CACvE,CAAC;QACJ,CAAC;QACD,MAAM,QAAQ,GAAG,sBAAsB,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACzE,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,OAAO;YAC/C,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;YACzB,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAC1D,OAAO,2BAA2B,CAAC;YACjC,QAAQ;YACR,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW;YACnC,OAAO;SACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DocumentPlan } from "../../application/model/document-planning.js";
|
|
2
|
+
import type { DocumentStructureDiagnostic, DocumentStructureVerifier } from "../../application/ports/document-structure-verifier.js";
|
|
3
|
+
import type { DocumentPlanningProfileReader } from "../../application/ports/document-planning-profile-reader.js";
|
|
4
|
+
import type { DocumentationCatalogReader } from "../../application/ports/documentation-catalog-reader.js";
|
|
5
|
+
/** Rebuilds the catalog and proves that the applied document has one exact descriptor. */
|
|
6
|
+
export declare class NodeDocumentStructureVerifier implements DocumentStructureVerifier {
|
|
7
|
+
#private;
|
|
8
|
+
constructor(dependencies: {
|
|
9
|
+
readonly catalog: DocumentationCatalogReader;
|
|
10
|
+
readonly profiles: DocumentPlanningProfileReader;
|
|
11
|
+
});
|
|
12
|
+
verify(input: {
|
|
13
|
+
readonly consumerRoot: string;
|
|
14
|
+
readonly plan: DocumentPlan;
|
|
15
|
+
readonly signal?: AbortSignal;
|
|
16
|
+
}): Promise<{
|
|
17
|
+
readonly diagnostics: readonly DocumentStructureDiagnostic[];
|
|
18
|
+
readonly valid: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=node-document-structure-verifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-document-structure-verifier.d.ts","sourceRoot":"","sources":["../../../../src/document-authoring/adapters/node/node-document-structure-verifier.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,KAAK,EACV,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6DAA6D,CAAC;AACjH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AAuE1G,0FAA0F;AAC1F,qBAAa,6BAA8B,YAAW,yBAAyB;;IAI7E,YAAY,YAAY,EAAE;QACxB,QAAQ,CAAC,OAAO,EAAE,0BAA0B,CAAC;QAC7C,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAC;KAClD,EAGA;IAEK,MAAM,CAAC,KAAK,EAAE;QAClB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;QAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;KAC/B,GAAG,OAAO,CAAC;QACV,QAAQ,CAAC,WAAW,EAAE,SAAS,2BAA2B,EAAE,CAAC;QAC7D,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;KACzB,CAAC,CAwDD;CACF"}
|