@automovie/template 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +37 -2
- package/build/resolveTemplateVersions.ts +92 -0
- package/build/syncScaffoldInstructions.ts +28 -0
- package/lib/AUTOMOVIE_TEMPLATE_CATALOGS.d.ts +14 -0
- package/lib/AUTOMOVIE_TEMPLATE_CATALOGS.js +52 -0
- package/lib/AUTOMOVIE_TEMPLATE_CATALOGS.js.map +1 -0
- package/lib/AUTOMOVIE_TEMPLATE_VERSIONS.d.ts +2 -0
- package/lib/AUTOMOVIE_TEMPLATE_VERSIONS.js +42 -0
- package/lib/AUTOMOVIE_TEMPLATE_VERSIONS.js.map +1 -0
- package/lib/AutoMovieScaffoldLayer.d.ts +15 -0
- package/lib/AutoMovieScaffoldLayer.js +3 -0
- package/lib/AutoMovieScaffoldLayer.js.map +1 -0
- package/lib/FILE_ATTRIBUTE_DIRECTORY.d.ts +2 -0
- package/lib/FILE_ATTRIBUTE_DIRECTORY.js +6 -0
- package/lib/FILE_ATTRIBUTE_DIRECTORY.js.map +1 -0
- package/lib/IAutoMovieCatalogVersionProps.d.ts +16 -0
- package/lib/IAutoMovieCatalogVersionProps.js +3 -0
- package/lib/IAutoMovieCatalogVersionProps.js.map +1 -0
- package/lib/IAutoMovieScaffoldProps.d.ts +14 -0
- package/lib/IAutoMovieScaffoldProps.js +3 -0
- package/lib/IAutoMovieScaffoldProps.js.map +1 -0
- package/lib/IAutoMovieScaffoldSourceEntry.d.ts +18 -0
- package/lib/IAutoMovieScaffoldSourceEntry.js +3 -0
- package/lib/IAutoMovieScaffoldSourceEntry.js.map +1 -0
- package/lib/IAutoMovieTemplateDependencyVersionsProps.d.ts +17 -0
- package/lib/IAutoMovieTemplateDependencyVersionsProps.js +3 -0
- package/lib/IAutoMovieTemplateDependencyVersionsProps.js.map +1 -0
- package/lib/IAutoMovieWorkspacePackageVersions.d.ts +34 -0
- package/lib/IAutoMovieWorkspacePackageVersions.js +3 -0
- package/lib/IAutoMovieWorkspacePackageVersions.js.map +1 -0
- package/lib/IBoundChild.d.ts +71 -0
- package/lib/IBoundChild.js +3 -0
- package/lib/IBoundChild.js.map +1 -0
- package/lib/IBoundChildStatus.d.ts +20 -0
- package/lib/IBoundChildStatus.js +3 -0
- package/lib/IBoundChildStatus.js.map +1 -0
- package/lib/IBoundParent.d.ts +61 -0
- package/lib/IBoundParent.js +3 -0
- package/lib/IBoundParent.js.map +1 -0
- package/lib/IBoundParentStatus.d.ts +14 -0
- package/lib/IBoundParentStatus.js +3 -0
- package/lib/IBoundParentStatus.js.map +1 -0
- package/lib/ICreateResult.d.ts +27 -0
- package/lib/ICreateResult.js +3 -0
- package/lib/ICreateResult.js.map +1 -0
- package/lib/IScaffoldCompletedFilePublicationOutcome.d.ts +16 -0
- package/lib/IScaffoldCompletedFilePublicationOutcome.js +3 -0
- package/lib/IScaffoldCompletedFilePublicationOutcome.js.map +1 -0
- package/lib/IScaffoldCompletedPublication.d.ts +15 -0
- package/lib/IScaffoldCompletedPublication.js +3 -0
- package/lib/IScaffoldCompletedPublication.js.map +1 -0
- package/lib/IScaffoldFileSnapshot.d.ts +24 -0
- package/lib/IScaffoldFileSnapshot.js +3 -0
- package/lib/IScaffoldFileSnapshot.js.map +1 -0
- package/lib/IScaffoldParentPublicationRequest.d.ts +26 -0
- package/lib/IScaffoldParentPublicationRequest.js +3 -0
- package/lib/IScaffoldParentPublicationRequest.js.map +1 -0
- package/lib/IScaffoldPartialFilePublicationOutcome.d.ts +22 -0
- package/lib/IScaffoldPartialFilePublicationOutcome.js +3 -0
- package/lib/IScaffoldPartialFilePublicationOutcome.js.map +1 -0
- package/lib/IScaffoldPhysicalDirectory.d.ts +20 -0
- package/lib/IScaffoldPhysicalDirectory.js +3 -0
- package/lib/IScaffoldPhysicalDirectory.js.map +1 -0
- package/lib/IScaffoldPosixConstants.d.ts +24 -0
- package/lib/IScaffoldPosixConstants.js +3 -0
- package/lib/IScaffoldPosixConstants.js.map +1 -0
- package/lib/IScaffoldPublicationEntry.d.ts +20 -0
- package/lib/IScaffoldPublicationEntry.js +3 -0
- package/lib/IScaffoldPublicationEntry.js.map +1 -0
- package/lib/IScaffoldPublicationFailure.d.ts +18 -0
- package/lib/IScaffoldPublicationFailure.js +3 -0
- package/lib/IScaffoldPublicationFailure.js.map +1 -0
- package/lib/IScaffoldPublicationOptions.d.ts +17 -0
- package/lib/IScaffoldPublicationOptions.js +3 -0
- package/lib/IScaffoldPublicationOptions.js.map +1 -0
- package/lib/IScaffoldPublicationReceipt.d.ts +25 -0
- package/lib/IScaffoldPublicationReceipt.js +3 -0
- package/lib/IScaffoldPublicationReceipt.js.map +1 -0
- package/lib/IScaffoldRefusedFilePublicationOutcome.d.ts +18 -0
- package/lib/IScaffoldRefusedFilePublicationOutcome.js +3 -0
- package/lib/IScaffoldRefusedFilePublicationOutcome.js.map +1 -0
- package/lib/IScaffoldSyncPlan.d.ts +25 -0
- package/lib/IScaffoldSyncPlan.js +3 -0
- package/lib/IScaffoldSyncPlan.js.map +1 -0
- package/lib/IScaffoldSyncProps.d.ts +16 -0
- package/lib/IScaffoldSyncProps.js +3 -0
- package/lib/IScaffoldSyncProps.js.map +1 -0
- package/lib/IWindowsFileInformation.d.ts +20 -0
- package/lib/IWindowsFileInformation.js +3 -0
- package/lib/IWindowsFileInformation.js.map +1 -0
- package/lib/IWindowsLibrary.d.ts +127 -0
- package/lib/IWindowsLibrary.js +3 -0
- package/lib/IWindowsLibrary.js.map +1 -0
- package/lib/SCAFFOLD_SYNC_STATE_FILE.d.ts +4 -0
- package/lib/SCAFFOLD_SYNC_STATE_FILE.js +8 -0
- package/lib/SCAFFOLD_SYNC_STATE_FILE.js.map +1 -0
- package/lib/ScaffoldFilePublicationOutcome.d.ts +14 -0
- package/lib/ScaffoldFilePublicationOutcome.js +3 -0
- package/lib/ScaffoldFilePublicationOutcome.js.map +1 -0
- package/lib/ScaffoldParentChangedError.d.ts +11 -0
- package/lib/ScaffoldParentChangedError.js +19 -0
- package/lib/ScaffoldParentChangedError.js.map +1 -0
- package/lib/ScaffoldPublicationError.d.ts +17 -0
- package/lib/ScaffoldPublicationError.js +46 -0
- package/lib/ScaffoldPublicationError.js.map +1 -0
- package/lib/assertOrdinaryFile.d.ts +13 -0
- package/lib/assertOrdinaryFile.js +20 -0
- package/lib/assertOrdinaryFile.js.map +1 -0
- package/lib/assertOrdinarySingleLinkFile.d.ts +13 -0
- package/lib/assertOrdinarySingleLinkFile.js +22 -0
- package/lib/assertOrdinarySingleLinkFile.js.map +1 -0
- package/lib/assertScaffoldOwnership.d.ts +13 -0
- package/lib/assertScaffoldOwnership.js +24 -0
- package/lib/assertScaffoldOwnership.js.map +1 -0
- package/lib/assertScaffoldPhysicalDirectory.d.ts +16 -0
- package/lib/assertScaffoldPhysicalDirectory.js +26 -0
- package/lib/assertScaffoldPhysicalDirectory.js.map +1 -0
- package/lib/assertScaffoldProjectName.d.ts +18 -0
- package/lib/assertScaffoldProjectName.js +34 -0
- package/lib/assertScaffoldProjectName.js.map +1 -0
- package/lib/attachScaffoldSyncState.d.ts +18 -0
- package/lib/attachScaffoldSyncState.js +30 -0
- package/lib/attachScaffoldSyncState.js.map +1 -0
- package/lib/captureEmptyScaffoldPhysicalDirectory.d.ts +13 -0
- package/lib/captureEmptyScaffoldPhysicalDirectory.js +69 -0
- package/lib/captureEmptyScaffoldPhysicalDirectory.js.map +1 -0
- package/lib/captureScaffoldFile.d.ts +13 -0
- package/lib/captureScaffoldFile.js +67 -0
- package/lib/captureScaffoldFile.js.map +1 -0
- package/lib/captureScaffoldPhysicalDirectory.d.ts +13 -0
- package/lib/captureScaffoldPhysicalDirectory.js +63 -0
- package/lib/captureScaffoldPhysicalDirectory.js.map +1 -0
- package/lib/combineScaffoldFailures.d.ts +19 -0
- package/lib/combineScaffoldFailures.js +32 -0
- package/lib/combineScaffoldFailures.js.map +1 -0
- package/lib/createAutoMovieCatalogVersionResolver.d.ts +17 -0
- package/lib/createAutoMovieCatalogVersionResolver.js +64 -0
- package/lib/createAutoMovieCatalogVersionResolver.js.map +1 -0
- package/lib/createScaffoldSyncState.d.ts +12 -0
- package/lib/createScaffoldSyncState.js +26 -0
- package/lib/createScaffoldSyncState.js.map +1 -0
- package/lib/createScaffoldVariables.d.ts +25 -0
- package/lib/createScaffoldVariables.js +41 -0
- package/lib/createScaffoldVariables.js.map +1 -0
- package/lib/ensureScaffoldBaseDirectory.d.ts +19 -0
- package/lib/ensureScaffoldBaseDirectory.js +89 -0
- package/lib/ensureScaffoldBaseDirectory.js.map +1 -0
- package/lib/ensureScaffoldFileDirectory.d.ts +25 -0
- package/lib/ensureScaffoldFileDirectory.js +103 -0
- package/lib/ensureScaffoldFileDirectory.js.map +1 -0
- package/lib/index.d.ts +47 -0
- package/lib/index.js +64 -0
- package/lib/index.js.map +1 -0
- package/lib/inside.d.ts +12 -0
- package/lib/inside.js +57 -0
- package/lib/inside.js.map +1 -0
- package/lib/isScaffoldInstruction.d.ts +12 -0
- package/lib/isScaffoldInstruction.js +29 -0
- package/lib/isScaffoldInstruction.js.map +1 -0
- package/lib/listAutoMovieScaffoldFiles.d.ts +17 -0
- package/lib/listAutoMovieScaffoldFiles.js +87 -0
- package/lib/listAutoMovieScaffoldFiles.js.map +1 -0
- package/lib/loadWindowsLibrary.d.ts +13 -0
- package/lib/loadWindowsLibrary.js +180 -0
- package/lib/loadWindowsLibrary.js.map +1 -0
- package/lib/mergeScaffoldFiles.d.ts +18 -0
- package/lib/mergeScaffoldFiles.js +37 -0
- package/lib/mergeScaffoldFiles.js.map +1 -0
- package/lib/missingPath.d.ts +12 -0
- package/lib/missingPath.js +18 -0
- package/lib/missingPath.js.map +1 -0
- package/lib/nativeError.d.ts +12 -0
- package/lib/nativeError.js +17 -0
- package/lib/nativeError.js.map +1 -0
- package/lib/openPosixParent.d.ts +13 -0
- package/lib/openPosixParent.js +135 -0
- package/lib/openPosixParent.js.map +1 -0
- package/lib/openWindowsParent.d.ts +13 -0
- package/lib/openWindowsParent.js +224 -0
- package/lib/openWindowsParent.js.map +1 -0
- package/lib/overwriteScaffoldFile.d.ts +22 -0
- package/lib/overwriteScaffoldFile.js +214 -0
- package/lib/overwriteScaffoldFile.js.map +1 -0
- package/lib/physicalDirectoryIdentity.d.ts +15 -0
- package/lib/physicalDirectoryIdentity.js +65 -0
- package/lib/physicalDirectoryIdentity.js.map +1 -0
- package/lib/physicalVersion.d.ts +13 -0
- package/lib/physicalVersion.js +18 -0
- package/lib/physicalVersion.js.map +1 -0
- package/lib/planScaffoldPublication.d.ts +22 -0
- package/lib/planScaffoldPublication.js +100 -0
- package/lib/planScaffoldPublication.js.map +1 -0
- package/lib/planScaffoldSync.d.ts +14 -0
- package/lib/planScaffoldSync.js +102 -0
- package/lib/planScaffoldSync.js.map +1 -0
- package/lib/publishFiles.d.ts +23 -0
- package/lib/publishFiles.js +124 -0
- package/lib/publishFiles.js.map +1 -0
- package/lib/publishNativeScaffoldFile.d.ts +21 -0
- package/lib/publishNativeScaffoldFile.js +211 -0
- package/lib/publishNativeScaffoldFile.js.map +1 -0
- package/lib/publishScaffoldCandidate.d.ts +24 -0
- package/lib/publishScaffoldCandidate.js +70 -0
- package/lib/publishScaffoldCandidate.js.map +1 -0
- package/lib/readAutoMovieScaffoldSources.d.ts +20 -0
- package/lib/readAutoMovieScaffoldSources.js +103 -0
- package/lib/readAutoMovieScaffoldSources.js.map +1 -0
- package/lib/readScaffoldSyncFile.d.ts +16 -0
- package/lib/readScaffoldSyncFile.js +64 -0
- package/lib/readScaffoldSyncFile.js.map +1 -0
- package/lib/renderScaffold.d.ts +19 -0
- package/lib/renderScaffold.js +33 -0
- package/lib/renderScaffold.js.map +1 -0
- package/lib/renderScaffoldEntries.d.ts +20 -0
- package/lib/renderScaffoldEntries.js +106 -0
- package/lib/renderScaffoldEntries.js.map +1 -0
- package/lib/renderScaffoldInstructions.d.ts +17 -0
- package/lib/renderScaffoldInstructions.js +23 -0
- package/lib/renderScaffoldInstructions.js.map +1 -0
- package/lib/renderScaffoldLayer.d.ts +20 -0
- package/lib/renderScaffoldLayer.js +28 -0
- package/lib/renderScaffoldLayer.js.map +1 -0
- package/lib/renderTemplate.d.ts +19 -0
- package/lib/renderTemplate.js +56 -0
- package/lib/renderTemplate.js.map +1 -0
- package/lib/renderWorkspaceProductionScaffold.d.ts +19 -0
- package/lib/renderWorkspaceProductionScaffold.js +30 -0
- package/lib/renderWorkspaceProductionScaffold.js.map +1 -0
- package/lib/renderWorkspaceScaffold.d.ts +19 -0
- package/lib/renderWorkspaceScaffold.js +33 -0
- package/lib/renderWorkspaceScaffold.js.map +1 -0
- package/lib/replaceSharedScaffoldFile.d.ts +30 -0
- package/lib/replaceSharedScaffoldFile.js +106 -0
- package/lib/replaceSharedScaffoldFile.js.map +1 -0
- package/lib/resolveAutoMovieCatalogVersion.d.ts +19 -0
- package/lib/resolveAutoMovieCatalogVersion.js +24 -0
- package/lib/resolveAutoMovieCatalogVersion.js.map +1 -0
- package/lib/resolveAutoMovieTemplateDependencyVersions.d.ts +19 -0
- package/lib/resolveAutoMovieTemplateDependencyVersions.js +62 -0
- package/lib/resolveAutoMovieTemplateDependencyVersions.js.map +1 -0
- package/lib/resolveScaffoldPosixConstants.d.ts +13 -0
- package/lib/resolveScaffoldPosixConstants.js +44 -0
- package/lib/resolveScaffoldPosixConstants.js.map +1 -0
- package/lib/scaffoldAssetDirectory.d.ts +19 -0
- package/lib/scaffoldAssetDirectory.js +63 -0
- package/lib/scaffoldAssetDirectory.js.map +1 -0
- package/lib/scaffoldPhysicalIdentity.d.ts +18 -0
- package/lib/scaffoldPhysicalIdentity.js +22 -0
- package/lib/scaffoldPhysicalIdentity.js.map +1 -0
- package/lib/scaffoldSharedSkillDirectory.d.ts +17 -0
- package/lib/scaffoldSharedSkillDirectory.js +62 -0
- package/lib/scaffoldSharedSkillDirectory.js.map +1 -0
- package/lib/scaffoldSharedSkillPath.d.ts +17 -0
- package/lib/scaffoldSharedSkillPath.js +66 -0
- package/lib/scaffoldSharedSkillPath.js.map +1 -0
- package/lib/skills/3d-modeling/conditioning.md +82 -0
- package/lib/skills/3d-modeling/crafting.md +82 -0
- package/lib/skills/3d-modeling/diffusion.md +34 -0
- package/lib/skills/3d-modeling/inspection.md +54 -0
- package/lib/skills/3d-modeling/lofting.md +43 -0
- package/lib/skills/3d-modeling/modularization.md +31 -0
- package/lib/skills/3d-modeling/recovery.md +29 -0
- package/lib/skills/3d-modeling/rigging.md +97 -0
- package/lib/skills/3d-modeling/sources.md +29 -0
- package/lib/skills/contracts/development/common.md +13 -0
- package/lib/skills/contracts/development/design.md +28 -0
- package/lib/skills/contracts/development/implementation.md +49 -0
- package/lib/skills/contracts/development/testing.md +27 -0
- package/lib/skills/development/repair.md +13 -0
- package/lib/skills/documentation/SKILL.md +25 -0
- package/lib/skills/documentation/writing.md +51 -0
- package/lib/skills/motion/authoring.md +51 -0
- package/lib/skills/motion/contacts.md +39 -0
- package/lib/skills/motion/laws.md +23 -0
- package/lib/skills/motion/layers.md +7 -0
- package/lib/skills/motion/transitions.md +27 -0
- package/lib/skills/motion/variation.md +23 -0
- package/lib/skills/motion/verification.md +36 -0
- package/lib/skills/prompting/SKILL.md +80 -0
- package/lib/skills/visual-debugging/capture.md +60 -0
- package/lib/skills/visual-debugging/comparison.md +35 -0
- package/lib/skills/visual-debugging/correction-rounds.md +34 -0
- package/lib/skills/visual-debugging/passes.md +29 -0
- package/lib/skills/visual-debugging/rendering-cost.md +5 -0
- package/lib/syncScaffold.d.ts +19 -0
- package/lib/syncScaffold.js +28 -0
- package/lib/syncScaffold.js.map +1 -0
- package/lib/writeFiles.d.ts +20 -0
- package/lib/writeFiles.js +33 -0
- package/lib/writeFiles.js.map +1 -0
- package/lib/writeScaffoldFile.d.ts +35 -0
- package/lib/writeScaffoldFile.js +107 -0
- package/lib/writeScaffoldFile.js.map +1 -0
- package/lib/writtenVersion.d.ts +13 -0
- package/lib/writtenVersion.js +18 -0
- package/lib/writtenVersion.js.map +1 -0
- package/package.json +59 -3
- package/scaffold/instructions/.agents/skills/$documentation +0 -0
- package/scaffold/instructions/.agents/skills/$prompting +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$conditioning.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$crafting.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$diffusion.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$inspection.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$lofting.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$modularization.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$recovery.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$rigging.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$sources.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/SKILL.md +32 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/coarse-forms.md +25 -0
- package/scaffold/instructions/.agents/skills/audio/SKILL.md +28 -0
- package/scaffold/instructions/.agents/skills/audio/acquisition.md +25 -0
- package/scaffold/instructions/.agents/skills/audio/local-speech.md +11 -0
- package/scaffold/instructions/.agents/skills/audio/sound-effects.md +29 -0
- package/scaffold/instructions/.agents/skills/contracts/SKILL.md +41 -0
- package/scaffold/instructions/.agents/skills/contracts/development/$common.md +0 -0
- package/scaffold/instructions/.agents/skills/contracts/development/$design.md +0 -0
- package/scaffold/instructions/.agents/skills/contracts/development/$implementation.md +0 -0
- package/scaffold/instructions/.agents/skills/contracts/development/$testing.md +0 -0
- package/scaffold/instructions/.agents/skills/contracts/development/SKILL.md +22 -0
- package/scaffold/instructions/.agents/skills/contracts/development/behaviors.md +25 -0
- package/scaffold/instructions/.agents/skills/contracts/development/composition.md +29 -0
- package/scaffold/instructions/.agents/skills/contracts/development/entities.md +27 -0
- package/scaffold/instructions/.agents/skills/contracts/development/statements/behaviors.md +42 -0
- package/scaffold/instructions/.agents/skills/contracts/development/statements/composition.md +32 -0
- package/scaffold/instructions/.agents/skills/contracts/development/statements/entities.md +34 -0
- package/scaffold/instructions/.agents/skills/contracts/story/SKILL.md +44 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/brief.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/common.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/narratives.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/screenplay.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/scripts.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/settings.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/treatments.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/common.md +17 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/common.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/realized.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/screenplay.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/scripts.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/realized.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/screenplay.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/scripts.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/brief.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/common.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/index.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/narratives.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/review.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/screenplay.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/scripts.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/settings.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/treatments.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/brief.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/common.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/index.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/narratives.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/realized.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/research.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/review.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/screenplay.md +17 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/scripts.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/settings.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/treatments.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/brief.md +21 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/common.md +42 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/narratives.md +8 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/screenplay.md +15 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/scripts.md +11 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/settings.md +25 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/treatments.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/common.md +94 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/common.md +20 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/realized.md +15 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/screenplay.md +11 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/scripts.md +17 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/realized.md +19 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/screenplay.md +25 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/scripts.md +19 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/brief.md +17 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/common.md +31 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/index.md +15 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/narratives.md +43 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/review.md +37 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/screenplay.md +26 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/scripts.md +26 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/settings.md +38 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/treatments.md +31 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/brief.md +21 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/common.md +15 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/index.md +17 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/narratives.md +41 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/realized.md +17 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/research.md +34 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/review.md +37 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/screenplay.md +82 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/scripts.md +45 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/settings.md +34 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/treatments.md +27 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/screenplay.md +14 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/scripts.md +12 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/treatments.md +10 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/screenplay.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/scripts.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/treatments.md +9 -0
- package/scaffold/instructions/.agents/skills/development/$repair.md +0 -0
- package/scaffold/instructions/.agents/skills/development/SKILL.md +33 -0
- package/scaffold/instructions/.agents/skills/development/entities.md +43 -0
- package/scaffold/instructions/.agents/skills/development/reuse.md +47 -0
- package/scaffold/instructions/.agents/skills/development/source-layout.md +69 -0
- package/scaffold/instructions/.agents/skills/development/testing.md +27 -0
- package/scaffold/instructions/.agents/skills/evidence/SKILL.md +16 -0
- package/scaffold/instructions/.agents/skills/evidence/adoption.md +11 -0
- package/scaffold/instructions/.agents/skills/evidence/answering.md +11 -0
- package/scaffold/instructions/.agents/skills/evidence/configuration.md +23 -0
- package/scaffold/instructions/.agents/skills/image/SKILL.md +69 -0
- package/scaffold/instructions/.agents/skills/motion/$authoring.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/$contacts.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/$laws.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/$layers.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/$transitions.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/$variation.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/$verification.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/SKILL.md +55 -0
- package/scaffold/instructions/.agents/skills/motion/catalog-cases.md +11 -0
- package/scaffold/instructions/.agents/skills/motion/control-channels.md +19 -0
- package/scaffold/instructions/.agents/skills/motion/frame-evaluation.md +25 -0
- package/scaffold/instructions/.agents/skills/motion/method-references.md +23 -0
- package/scaffold/instructions/.agents/skills/motion/physical-feedback.md +31 -0
- package/scaffold/instructions/.agents/skills/motion/retargeting.md +23 -0
- package/scaffold/instructions/.agents/skills/motion/segment-review.md +17 -0
- package/scaffold/instructions/.agents/skills/motion/staging.md +29 -0
- package/scaffold/instructions/.agents/skills/production/SKILL.md +45 -0
- package/scaffold/instructions/.agents/skills/production/assembly.md +30 -0
- package/scaffold/instructions/.agents/skills/production/media-records.md +29 -0
- package/scaffold/instructions/.agents/skills/production/project-context.md +25 -0
- package/scaffold/instructions/.agents/skills/production/stage-caches.md +30 -0
- package/scaffold/instructions/.agents/skills/production/sustained-runs.md +21 -0
- package/scaffold/instructions/.agents/skills/production/sync-and-reorganization.md +21 -0
- package/scaffold/instructions/.agents/skills/review/SKILL.md +24 -0
- package/scaffold/instructions/.agents/skills/review/delivery-review.md +65 -0
- package/scaffold/instructions/.agents/skills/review/estimation.md +48 -0
- package/scaffold/instructions/.agents/skills/review/independent-reading.md +39 -0
- package/scaffold/instructions/.agents/skills/review/narrative-rounds.md +53 -0
- package/scaffold/instructions/.agents/skills/review/source-review.md +31 -0
- package/scaffold/instructions/.agents/skills/story/SKILL.md +20 -0
- package/scaffold/instructions/.agents/skills/story/correction/SKILL.md +13 -0
- package/scaffold/instructions/.agents/skills/story/correction/inspection.md +29 -0
- package/scaffold/instructions/.agents/skills/story/correction/repair.md +35 -0
- package/scaffold/instructions/.agents/skills/story/document-layout.md +38 -0
- package/scaffold/instructions/.agents/skills/story/evidence/SKILL.md +13 -0
- package/scaffold/instructions/.agents/skills/story/evidence/answer-placement.md +13 -0
- package/scaffold/instructions/.agents/skills/story/evidence/answer-writing.md +23 -0
- package/scaffold/instructions/.agents/skills/story/layers/SKILL.md +17 -0
- package/scaffold/instructions/.agents/skills/story/layers/brief.md +29 -0
- package/scaffold/instructions/.agents/skills/story/layers/notation.md +34 -0
- package/scaffold/instructions/.agents/skills/story/layers/screenplay.md +15 -0
- package/scaffold/instructions/.agents/skills/story/layers/scripts.md +11 -0
- package/scaffold/instructions/.agents/skills/story/layers/settings.md +39 -0
- package/scaffold/instructions/.agents/skills/story/layers/treatments.md +9 -0
- package/scaffold/instructions/.agents/skills/story/naturalness/SKILL.md +13 -0
- package/scaffold/instructions/.agents/skills/story/naturalness/rewriting.md +17 -0
- package/scaffold/instructions/.agents/skills/story/naturalness/transfer.md +11 -0
- package/scaffold/instructions/.agents/skills/story/planning/SKILL.md +15 -0
- package/scaffold/instructions/.agents/skills/story/planning/direction.md +14 -0
- package/scaffold/instructions/.agents/skills/story/planning/discovery.md +20 -0
- package/scaffold/instructions/.agents/skills/story/planning/requirements.md +25 -0
- package/scaffold/instructions/.agents/skills/story/planning/research.md +25 -0
- package/scaffold/instructions/.agents/skills/story/workflow.md +61 -0
- package/scaffold/instructions/.agents/skills/video/SKILL.md +29 -0
- package/scaffold/instructions/.agents/skills/video/diffusion.md +33 -0
- package/scaffold/instructions/.agents/skills/video/generation.md +27 -0
- package/scaffold/instructions/.agents/skills/video/prompts.md +51 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/$capture.md +0 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/$comparison.md +0 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/$correction-rounds.md +0 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/$passes.md +0 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/$rendering-cost.md +0 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/SKILL.md +30 -0
- package/scaffold/instructions/AGENTS.md +96 -0
- package/scaffold/instructions/CLAUDE.md +1 -0
- package/scaffold/production/PROJECT.md +3 -0
- package/scaffold/production/README.md +146 -0
- package/scaffold/production/_gitignore +20 -0
- package/scaffold/production/evidence.config.ts +12 -0
- package/scaffold/production/index.html +20 -0
- package/scaffold/production/lint.config.ts +46 -0
- package/scaffold/production/package.json +54 -0
- package/scaffold/production/src/IFilm.ts +41 -0
- package/scaffold/production/src/IFilmProduction.ts +80 -0
- package/scaffold/production/src/clampProductionSeconds.ts +21 -0
- package/scaffold/production/src/composition/films/index.ts +10 -0
- package/scaffold/production/src/composition/films/starter.ts +45 -0
- package/scaffold/production/src/executable/capture.ts +487 -0
- package/scaffold/production/src/executable/physics.ts +48 -0
- package/scaffold/production/src/executable/planCaptureStills.ts +65 -0
- package/scaffold/production/src/executable/recovery/node/artifact/archiveAutoMovieRecoveryModel.ts +171 -0
- package/scaffold/production/src/executable/recovery/node/artifact/createAutoMovieRecoveryArtifact.ts +268 -0
- package/scaffold/production/src/executable/recovery/node/artifact/index.ts +3 -0
- package/scaffold/production/src/executable/recovery/node/artifact/writeAutoMovieRecoveryArtifact.ts +303 -0
- package/scaffold/production/src/executable/recovery/node/cli.ts +12 -0
- package/scaffold/production/src/executable/recovery/node/index.ts +9 -0
- package/scaffold/production/src/executable/recovery/node/internal/IAutoMovieRecoveryMemoryUsage.ts +25 -0
- package/scaffold/production/src/executable/recovery/node/internal/RecoveryFileVectorTable.ts +95 -0
- package/scaffold/production/src/executable/recovery/node/internal/RecoveryFileVectorTableInput.ts +50 -0
- package/scaffold/production/src/executable/recovery/node/internal/createRecoveryFileVectorTable.ts +181 -0
- package/scaffold/production/src/executable/recovery/node/internal/observeRecoveryAtlas.ts +492 -0
- package/scaffold/production/src/executable/recovery/node/internal/readAutoMovieRecoveryBoundedFile.ts +57 -0
- package/scaffold/production/src/executable/recovery/node/internal/readRecoveryCameraImages.ts +80 -0
- package/scaffold/production/src/executable/recovery/node/internal/readRecoveryFixedReference.ts +26 -0
- package/scaffold/production/src/executable/recovery/node/internal/recovery.ts +272 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryAtlas.ts +152 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameraMap.ts +113 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameraScene.ts +117 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameras.ts +158 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryContourPath.ts +185 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryImages.ts +176 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryLocal.ts +151 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryOpen.ts +237 -0
- package/scaffold/production/src/executable/recovery/node/mesh/createAutoMovieRecoveryContourFileMesh.ts +265 -0
- package/scaffold/production/src/executable/recovery/node/mesh/createAutoMovieRecoveryMeshSpool.ts +252 -0
- package/scaffold/production/src/executable/recovery/node/mesh/index.ts +3 -0
- package/scaffold/production/src/executable/recovery/node/mesh/readAutoMovieRecoveryMeshFrontier.ts +239 -0
- package/scaffold/production/src/executable/recovery/node/publishAutoMovieRecoveryArtifact.ts +63 -0
- package/scaffold/production/src/executable/recovery/node/reconstruction/index.ts +1 -0
- package/scaffold/production/src/executable/recovery/node/reconstruction/reconstructAutoMovieRecoveryLocal.ts +473 -0
- package/scaffold/production/src/executable/recovery/node/runAutoMovieRecoveryCommand.ts +148 -0
- package/scaffold/production/src/executable/render/headlessCapture/AutoMovieHeadlessCaptureError.ts +1 -0
- package/scaffold/production/src/executable/render/headlessCapture/AutoMovieHeadlessCaptureErrorCode.ts +1 -0
- package/scaffold/production/src/executable/render/headlessCapture/AutoMovieHeadlessWaitUntil.ts +1 -0
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessCaptureOptions.ts +79 -0
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessCaptureSession.ts +39 -0
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessFrameWriter.ts +20 -0
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessLocator.ts +1 -0
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessPage.ts +1 -0
- package/scaffold/production/src/executable/render/headlessCapture/createHeadlessCaptureAdapter.ts +92 -0
- package/scaffold/production/src/executable/render/headlessCapture/index.ts +9 -0
- package/scaffold/production/src/executable/render/node/IAutoMovieViewerVideoOptions.ts +128 -0
- package/scaffold/production/src/executable/render/node/IAutoMovieViewerVideoResult.ts +43 -0
- package/scaffold/production/src/executable/render/node/IProductionRenditionClip.ts +44 -0
- package/scaffold/production/src/executable/render/node/acquireViewerBrowser.ts +24 -0
- package/scaffold/production/src/executable/render/node/addProductionMp4Sample.ts +89 -0
- package/scaffold/production/src/executable/render/node/appendLosslessVideoClip.ts +62 -0
- package/scaffold/production/src/executable/render/node/assembleProductionChunkVideoMp4.ts +167 -0
- package/scaffold/production/src/executable/render/node/assertProductionFeatureUsesRenditionClips.ts +184 -0
- package/scaffold/production/src/executable/render/node/assertProductionFeatureUsesRenditionVideo.ts +127 -0
- package/scaffold/production/src/executable/render/node/assertProductionRenditionClipDelivery.ts +102 -0
- package/scaffold/production/src/executable/render/node/cache/IAutoMovieDirectoryArtifactStore.ts +59 -0
- package/scaffold/production/src/executable/render/node/cache/IAutoMovieViewerFrameCacheReport.ts +30 -0
- package/scaffold/production/src/executable/render/node/cache/cacheViewerCaptureSession.ts +187 -0
- package/scaffold/production/src/executable/render/node/cache/composeViewerFrameKeys.ts +55 -0
- package/scaffold/production/src/executable/render/node/cache/createAutoMovieArtifactMiddleware.ts +107 -0
- package/scaffold/production/src/executable/render/node/cache/createAutoMovieDirectoryArtifactStore.ts +203 -0
- package/scaffold/production/src/executable/render/node/cache/digestAutoMovieSourceTree.ts +66 -0
- package/scaffold/production/src/executable/render/node/cache/readViewerFrameStates.ts +95 -0
- package/scaffold/production/src/executable/render/node/capture/DEFAULT_CHROME_EXECUTABLE.ts +11 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageOperationFailure.ts +13 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageRenderAndSeeArtifact.ts +30 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageRenderAndSeeOptions.ts +51 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageSequenceMetadata.ts +27 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageSequenceRenderArtifact.ts +44 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageSequenceRenderOptions.ts +43 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMovieSequenceDissolvePixelCheck.ts +39 -0
- package/scaffold/production/src/executable/render/node/capture/captureRenderAndSee.ts +233 -0
- package/scaffold/production/src/executable/render/node/capture/captureSequenceRenderAndSee.ts +377 -0
- package/scaffold/production/src/executable/render/node/capture/index.ts +14 -0
- package/scaffold/production/src/executable/render/node/capture/preserveCleanupFailure.ts +34 -0
- package/scaffold/production/src/executable/render/node/capture/renderAndSeeCommand.ts +169 -0
- package/scaffold/production/src/executable/render/node/capture/renderSequenceAndSeeCommand.ts +165 -0
- package/scaffold/production/src/executable/render/node/capture/verifySequenceDissolvePixels.ts +179 -0
- package/scaffold/production/src/executable/render/node/conformProductionRenditionVideoMp4.ts +86 -0
- package/scaffold/production/src/executable/render/node/conformProductionVisualDeliveryVideoMp4.ts +230 -0
- package/scaffold/production/src/executable/render/node/decodeAutoMovieDelivery.ts +253 -0
- package/scaffold/production/src/executable/render/node/equalRational.ts +36 -0
- package/scaffold/production/src/executable/render/node/exactProductionClockProduct.ts +26 -0
- package/scaffold/production/src/executable/render/node/exportModelToGLB.ts +267 -0
- package/scaffold/production/src/executable/render/node/index.ts +27 -0
- package/scaffold/production/src/executable/render/node/loadModelGltfCore.ts +18 -0
- package/scaffold/production/src/executable/render/node/mixAutoMovieAudioCues.ts +74 -0
- package/scaffold/production/src/executable/render/node/muxProductionFeatureMp4.ts +170 -0
- package/scaffold/production/src/executable/render/node/neutralTrackPresentation.ts +59 -0
- package/scaffold/production/src/executable/render/node/normalizeProductionH264Mp4.ts +110 -0
- package/scaffold/production/src/executable/render/node/openLosslessVideoTrack.ts +81 -0
- package/scaffold/production/src/executable/render/node/parseMp4.ts +46 -0
- package/scaffold/production/src/executable/render/node/parseProductionMp4Output.ts +70 -0
- package/scaffold/production/src/executable/render/node/parseProductionRenditionClip.ts +92 -0
- package/scaffold/production/src/executable/render/node/planViewerVideo.ts +140 -0
- package/scaffold/production/src/executable/render/node/probeParsedProductionVideoMp4.ts +48 -0
- package/scaffold/production/src/executable/render/node/probeProductionPngPicture.ts +223 -0
- package/scaffold/production/src/executable/render/node/probeProductionRenderedMedia.ts +355 -0
- package/scaffold/production/src/executable/render/node/probeProductionVideoMp4.ts +27 -0
- package/scaffold/production/src/executable/render/node/probeVideoTrack.ts +220 -0
- package/scaffold/production/src/executable/render/node/productionRenditionVideoPlan.ts +149 -0
- package/scaffold/production/src/executable/render/node/recordViewerPlayback.ts +137 -0
- package/scaffold/production/src/executable/render/node/renderViewerFrames.ts +139 -0
- package/scaffold/production/src/executable/render/node/renderViewerVideo.ts +301 -0
- package/scaffold/production/src/executable/render/node/renderViewerVideoSession.ts +75 -0
- package/scaffold/production/src/executable/render/node/residentMp4Box.ts +36 -0
- package/scaffold/production/src/executable/render/node/residentPngJs.ts +26 -0
- package/scaffold/production/src/executable/render/node/runViewerVideoEncoder.ts +58 -0
- package/scaffold/production/src/executable/render/node/sameSampleDescription.ts +43 -0
- package/scaffold/production/src/executable/render/node/sameSampleFlags.ts +28 -0
- package/scaffold/production/src/executable/render/node/sampleBytes.ts +46 -0
- package/scaffold/production/src/executable/render/node/sampleDescription.ts +40 -0
- package/scaffold/production/src/executable/render/node/sampleOptions.ts +37 -0
- package/scaffold/production/src/executable/render/node/serializeDescriptionBox.ts +29 -0
- package/scaffold/production/src/executable/render/node/trimProductionAudioPresentation.ts +115 -0
- package/scaffold/production/src/executable/render/node/verifySampleStorage.ts +86 -0
- package/scaffold/production/src/executable/render/node/writeViewerFrameSheet.ts +101 -0
- package/scaffold/production/src/executable/render.ts +92 -0
- package/scaffold/production/src/executable/review.ts +54 -0
- package/scaffold/production/src/executable/viewer/inspection/createViewerDiskSource.ts +119 -0
- package/scaffold/production/src/executable/viewer/inspection/readViewerMaintainedSourceFiles.ts +64 -0
- package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessCaptureError.ts +41 -0
- package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessCaptureErrorCode.ts +22 -0
- package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessWaitUntil.ts +18 -0
- package/scaffold/production/src/executable/viewer/node/capture/IAutoMovieHeadlessLocator.ts +32 -0
- package/scaffold/production/src/executable/viewer/node/capture/IAutoMovieHeadlessPage.ts +130 -0
- package/scaffold/production/src/executable/viewer/node/capture/IViewerCaptureOptions.ts +38 -0
- package/scaffold/production/src/executable/viewer/node/capture/IViewerCaptureSession.ts +41 -0
- package/scaffold/production/src/executable/viewer/node/capture/createViewerCaptureSession.ts +154 -0
- package/scaffold/production/src/executable/viewer/node/capture/index.ts +8 -0
- package/scaffold/production/src/executable/viewer/node/index.ts +2 -0
- package/scaffold/production/src/executable/viewer/node/raster/AutoMovieRasterLighting.ts +221 -0
- package/scaffold/production/src/executable/viewer/node/raster/AutoMovieRasterSheet.ts +175 -0
- package/scaffold/production/src/executable/viewer/node/raster/AutoMovieRasterTarget.ts +282 -0
- package/scaffold/production/src/executable/viewer/node/raster/IAutoMovieSceneRaster.ts +62 -0
- package/scaffold/production/src/executable/viewer/node/raster/IRasterizeAutoMovieSceneProps.ts +34 -0
- package/scaffold/production/src/executable/viewer/node/raster/encodeAutoMovieRasterPng.ts +77 -0
- package/scaffold/production/src/executable/viewer/node/raster/index.ts +8 -0
- package/scaffold/production/src/executable/viewer/node/raster/rasterizeAutoMovieScene.ts +594 -0
- package/scaffold/production/src/executable/viewer/node/raster/stampAutoMovieRasterLabel.ts +120 -0
- package/scaffold/production/src/executable/viewer/process/ProcessOwnership.ts +102 -0
- package/scaffold/production/src/executable/viewer/process/internal/IProcessChildObservation.ts +18 -0
- package/scaffold/production/src/executable/viewer/process/internal/IProcessOwnershipHost.ts +70 -0
- package/scaffold/production/src/executable/viewer/process/internal/ProcessOwnershipController.ts +125 -0
- package/scaffold/production/src/executable/viewer/process/internal/WindowsProcessOwnershipPrograms.ts +52 -0
- package/scaffold/production/src/executable/viewer/process/internal/createNodeProcessOwnershipHost.ts +41 -0
- package/scaffold/production/src/executable/viewer/process/internal/decodeLinuxProcessIdentity.ts +22 -0
- package/scaffold/production/src/executable/viewer/process/internal/decodePosixProcessIdentity.ts +24 -0
- package/scaffold/production/src/executable/viewer/process/internal/decodeWindowsProcessResult.ts +24 -0
- package/scaffold/production/src/executable/viewer/process/internal/readNativeProcessIdentity.ts +45 -0
- package/scaffold/production/src/executable/viewer/process/internal/requireProcessId.ts +15 -0
- package/scaffold/production/src/executable/viewer/process/internal/resolveProcessIdentityReadError.ts +15 -0
- package/scaffold/production/src/executable/viewer/process/internal/runWindowsProcessOperation.ts +41 -0
- package/scaffold/production/src/executable/viewer/process/internal/selectProcessOwnershipTree.ts +68 -0
- package/scaffold/production/src/main.ts +197 -0
- package/scaffold/production/src/selectFilm.ts +34 -0
- package/scaffold/production/test/features/executable/test_plan_capture_stills.ts +75 -0
- package/scaffold/production/test/features/test_clamp_production_seconds.ts +39 -0
- package/scaffold/production/test/features/test_select_film.ts +59 -0
- package/scaffold/production/test/features/testing/test_test_execution.ts +57 -0
- package/scaffold/production/test/features/testing/test_test_selection.ts +78 -0
- package/scaffold/production/test/helpers/assessTestExecution.ts +22 -0
- package/scaffold/production/test/helpers/selectTestFiles.ts +79 -0
- package/scaffold/production/test/index.ts +64 -0
- package/scaffold/production/test/tsconfig.json +6 -0
- package/scaffold/production/tsconfig.json +34 -0
- package/scaffold/production/tsconfig.test.json +9 -0
- package/scaffold/production/vite.config.ts +35 -0
- package/scaffold/workspace/README.md +42 -0
- package/scaffold/workspace/_gitignore +9 -0
- package/scaffold/workspace/package.json +19 -0
- package/scaffold/workspace/pnpm-workspace.yaml +46 -0
- package/src/AUTOMOVIE_TEMPLATE_CATALOGS.ts +48 -0
- package/src/AUTOMOVIE_TEMPLATE_VERSIONS.ts +39 -0
- package/src/AutoMovieScaffoldLayer.ts +18 -0
- package/src/FILE_ATTRIBUTE_DIRECTORY.ts +2 -0
- package/src/IAutoMovieCatalogVersionProps.ts +18 -0
- package/src/IAutoMovieScaffoldProps.ts +14 -0
- package/src/IAutoMovieScaffoldSourceEntry.ts +19 -0
- package/src/IAutoMovieTemplateDependencyVersionsProps.ts +19 -0
- package/src/IAutoMovieWorkspacePackageVersions.ts +44 -0
- package/src/IBoundChild.ts +86 -0
- package/src/IBoundChildStatus.ts +24 -0
- package/src/IBoundParent.ts +65 -0
- package/src/IBoundParentStatus.ts +15 -0
- package/src/ICreateResult.ts +35 -0
- package/src/IScaffoldCompletedFilePublicationOutcome.ts +17 -0
- package/src/IScaffoldCompletedPublication.ts +17 -0
- package/src/IScaffoldFileSnapshot.ts +28 -0
- package/src/IScaffoldParentPublicationRequest.ts +29 -0
- package/src/IScaffoldPartialFilePublicationOutcome.ts +25 -0
- package/src/IScaffoldPhysicalDirectory.ts +22 -0
- package/src/IScaffoldPosixConstants.ts +30 -0
- package/src/IScaffoldPublicationEntry.ts +22 -0
- package/src/IScaffoldPublicationFailure.ts +18 -0
- package/src/IScaffoldPublicationOptions.ts +19 -0
- package/src/IScaffoldPublicationReceipt.ts +29 -0
- package/src/IScaffoldRefusedFilePublicationOutcome.ts +20 -0
- package/src/IScaffoldSyncPlan.ts +26 -0
- package/src/IScaffoldSyncProps.ts +16 -0
- package/src/IWindowsFileInformation.ts +24 -0
- package/src/IWindowsLibrary.ts +148 -0
- package/src/SCAFFOLD_SYNC_STATE_FILE.ts +5 -0
- package/src/ScaffoldFilePublicationOutcome.ts +18 -0
- package/src/ScaffoldParentChangedError.ts +14 -0
- package/src/ScaffoldPublicationError.ts +58 -0
- package/src/assertOrdinaryFile.ts +20 -0
- package/src/assertOrdinarySingleLinkFile.ts +26 -0
- package/src/assertScaffoldOwnership.ts +29 -0
- package/src/assertScaffoldPhysicalDirectory.ts +29 -0
- package/src/assertScaffoldProjectName.ts +34 -0
- package/src/attachScaffoldSyncState.ts +30 -0
- package/src/captureEmptyScaffoldPhysicalDirectory.ts +45 -0
- package/src/captureScaffoldFile.ts +34 -0
- package/src/captureScaffoldPhysicalDirectory.ts +34 -0
- package/src/combineScaffoldFailures.ts +35 -0
- package/src/createAutoMovieCatalogVersionResolver.ts +117 -0
- package/src/createScaffoldSyncState.ts +33 -0
- package/src/createScaffoldVariables.ts +50 -0
- package/src/ensureScaffoldBaseDirectory.ts +55 -0
- package/src/ensureScaffoldFileDirectory.ts +75 -0
- package/src/index.ts +48 -0
- package/src/inside.ts +25 -0
- package/src/isScaffoldInstruction.ts +29 -0
- package/src/listAutoMovieScaffoldFiles.ts +56 -0
- package/src/loadWindowsLibrary.ts +277 -0
- package/src/mergeScaffoldFiles.ts +39 -0
- package/src/missingPath.ts +16 -0
- package/src/nativeError.ts +15 -0
- package/src/openPosixParent.ts +155 -0
- package/src/openWindowsParent.ts +305 -0
- package/src/overwriteScaffoldFile.ts +262 -0
- package/src/physicalDirectoryIdentity.ts +33 -0
- package/src/physicalVersion.ts +18 -0
- package/src/planScaffoldPublication.ts +100 -0
- package/src/planScaffoldSync.ts +122 -0
- package/src/publishFiles.ts +120 -0
- package/src/publishNativeScaffoldFile.ts +287 -0
- package/src/publishScaffoldCandidate.ts +94 -0
- package/src/readAutoMovieScaffoldSources.ts +82 -0
- package/src/readScaffoldSyncFile.ts +66 -0
- package/src/renderScaffold.ts +43 -0
- package/src/renderScaffoldEntries.ts +110 -0
- package/src/renderScaffoldInstructions.ts +22 -0
- package/src/renderScaffoldLayer.ts +38 -0
- package/src/renderTemplate.ts +62 -0
- package/src/renderWorkspaceProductionScaffold.ts +35 -0
- package/src/renderWorkspaceScaffold.ts +43 -0
- package/src/replaceSharedScaffoldFile.ts +88 -0
- package/src/resolveAutoMovieCatalogVersion.ts +27 -0
- package/src/resolveAutoMovieTemplateDependencyVersions.ts +70 -0
- package/src/resolveScaffoldPosixConstants.ts +50 -0
- package/src/scaffoldAssetDirectory.ts +30 -0
- package/src/scaffoldPhysicalIdentity.ts +21 -0
- package/src/scaffoldSharedSkillDirectory.ts +25 -0
- package/src/scaffoldSharedSkillPath.ts +31 -0
- package/src/syncScaffold.ts +38 -0
- package/src/writeFiles.ts +48 -0
- package/src/writeScaffoldFile.ts +88 -0
- package/src/writtenVersion.ts +19 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IAutoMovieScaffoldSourceEntry } from "./IAutoMovieScaffoldSourceEntry";
|
|
2
|
+
/**
|
|
3
|
+
* Render a list of scaffold sources into a `{ posixPath: content }` map, refusing the whole list when two sources render to the same path.
|
|
4
|
+
*
|
|
5
|
+
* Each content has CRLF normalized to LF and its tokens rendered; each path is rendered the same way, with `/` separators, and a root `_gitignore` becomes `.gitignore`, so a scaffold that ships both is refused as a collision. The collision error names the first colliding path in code-unit order and both source paths, independent of the input order. The returned object has no prototype, so a key such as `__proto__` is an ordinary file path.
|
|
6
|
+
*
|
|
7
|
+
* @param entries Source paths relative to the scaffold root, with their text.
|
|
8
|
+
* @param variables Token values, as for {@link renderTemplate}.
|
|
9
|
+
* @returns The rendered file map.
|
|
10
|
+
* @throws On a collision or on any token error from {@link renderTemplate}.
|
|
11
|
+
*
|
|
12
|
+
* @evidence contracts/development/implementation.md#principled-implementation Collisions are found by sorting rendered entries by output path, then source path, and comparing neighbours, which detects a duplicate whenever one exists and reports the smallest colliding path regardless of input order; string relational operators compare UTF-16 code units, so the order does not depend on the host locale; `Object.defineProperty` on a null-prototype object stores `__proto__` as data instead of invoking the setter.
|
|
13
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The function owns line endings, path rendering, the `.gitignore` rename, and collision refusal for an explicit source list, while `renderScaffold` owns reading the scaffold from disk, so this step works on any list without file-system access.
|
|
14
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The `_gitignore` rename is the one path special case, and its basis is npm's documented renaming of `.gitignore` in packed packages; a collision is refused rather than resolved by keeping either source.
|
|
15
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the normalization, the path rules and the rename, what a collision reports and that it is order independent, the null prototype, and what throws.
|
|
16
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Each content and path is rendered once with renderTemplate's token-search and string-construction costs. Collision reporting sorts a copy of n rendered entries, using n log n path comparisons whose cost depends on shared path prefixes, then scans neighbours once to choose the smallest collision deterministically.
|
|
17
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Every entry renders distinct text once; there is no repeated computation within a call, and a new call receives a new source list.
|
|
18
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The rendered list and its sorted copy live only for the call; the returned map holds one string per entry and is owned by the caller.
|
|
19
|
+
*/
|
|
20
|
+
export declare const renderScaffoldEntries: (entries: readonly IAutoMovieScaffoldSourceEntry[], variables: Readonly<Record<string, string>>) => Record<string, string>;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.renderScaffoldEntries = void 0;
|
|
37
|
+
const path = __importStar(require("node:path"));
|
|
38
|
+
const renderTemplate_1 = require("./renderTemplate");
|
|
39
|
+
/**
|
|
40
|
+
* Normalize `\r\n` to `\n` so the scaffold emits identical bytes on every host: a Windows checkout with `core.autocrlf` would otherwise ship CRLF. The tree is text only, so the replacement cannot corrupt binary content.
|
|
41
|
+
*/
|
|
42
|
+
const normalizeLineEndings = (content) => content.replaceAll("\r\n", "\n");
|
|
43
|
+
/** Join path segments with `/` so map keys do not depend on the host. */
|
|
44
|
+
const toPosix = (value) => value.split(path.sep).join("/");
|
|
45
|
+
/**
|
|
46
|
+
* The rendered key for one scaffold-relative path.
|
|
47
|
+
*
|
|
48
|
+
* Path segments get the same strict substitution and unknown-token failure as file contents, so a templated path cannot ship verbatim. The root `_gitignore` stand-in becomes `.gitignore` only here, because npm pack renames a packed `.gitignore` to `.npmignore`; nested files of that name stay ordinary paths.
|
|
49
|
+
*/
|
|
50
|
+
const renderKey = (relative, variables) => {
|
|
51
|
+
const dir = path.dirname(relative);
|
|
52
|
+
const base = path.basename(relative);
|
|
53
|
+
const outputBase = dir === "." && base === "_gitignore" ? ".gitignore" : base;
|
|
54
|
+
return (0, renderTemplate_1.renderTemplate)(toPosix(dir === "." ? outputBase : path.join(dir, outputBase)), variables);
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Render a list of scaffold sources into a `{ posixPath: content }` map, refusing the whole list when two sources render to the same path.
|
|
58
|
+
*
|
|
59
|
+
* Each content has CRLF normalized to LF and its tokens rendered; each path is rendered the same way, with `/` separators, and a root `_gitignore` becomes `.gitignore`, so a scaffold that ships both is refused as a collision. The collision error names the first colliding path in code-unit order and both source paths, independent of the input order. The returned object has no prototype, so a key such as `__proto__` is an ordinary file path.
|
|
60
|
+
*
|
|
61
|
+
* @param entries Source paths relative to the scaffold root, with their text.
|
|
62
|
+
* @param variables Token values, as for {@link renderTemplate}.
|
|
63
|
+
* @returns The rendered file map.
|
|
64
|
+
* @throws On a collision or on any token error from {@link renderTemplate}.
|
|
65
|
+
*
|
|
66
|
+
* @evidence contracts/development/implementation.md#principled-implementation Collisions are found by sorting rendered entries by output path, then source path, and comparing neighbours, which detects a duplicate whenever one exists and reports the smallest colliding path regardless of input order; string relational operators compare UTF-16 code units, so the order does not depend on the host locale; `Object.defineProperty` on a null-prototype object stores `__proto__` as data instead of invoking the setter.
|
|
67
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The function owns line endings, path rendering, the `.gitignore` rename, and collision refusal for an explicit source list, while `renderScaffold` owns reading the scaffold from disk, so this step works on any list without file-system access.
|
|
68
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The `_gitignore` rename is the one path special case, and its basis is npm's documented renaming of `.gitignore` in packed packages; a collision is refused rather than resolved by keeping either source.
|
|
69
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the normalization, the path rules and the rename, what a collision reports and that it is order independent, the null prototype, and what throws.
|
|
70
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Each content and path is rendered once with renderTemplate's token-search and string-construction costs. Collision reporting sorts a copy of n rendered entries, using n log n path comparisons whose cost depends on shared path prefixes, then scans neighbours once to choose the smallest collision deterministically.
|
|
71
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Every entry renders distinct text once; there is no repeated computation within a call, and a new call receives a new source list.
|
|
72
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The rendered list and its sorted copy live only for the call; the returned map holds one string per entry and is owned by the caller.
|
|
73
|
+
*/
|
|
74
|
+
const renderScaffoldEntries = (entries, variables) => {
|
|
75
|
+
const rendered = entries.map((entry) => ({
|
|
76
|
+
content: (0, renderTemplate_1.renderTemplate)(normalizeLineEndings(entry.content), variables),
|
|
77
|
+
relative: renderKey(entry.relative, variables),
|
|
78
|
+
source: toPosix(entry.relative),
|
|
79
|
+
}));
|
|
80
|
+
const ordered = [...rendered].sort((left, right) => left.relative < right.relative
|
|
81
|
+
? -1
|
|
82
|
+
: left.relative > right.relative
|
|
83
|
+
? 1
|
|
84
|
+
: left.source < right.source
|
|
85
|
+
? -1
|
|
86
|
+
: left.source > right.source
|
|
87
|
+
? 1
|
|
88
|
+
: 0);
|
|
89
|
+
for (let index = 1; index < ordered.length; index++) {
|
|
90
|
+
const previous = ordered[index - 1];
|
|
91
|
+
const current = ordered[index];
|
|
92
|
+
if (previous.relative === current.relative)
|
|
93
|
+
throw new Error(`scaffold sources collide at rendered path "${current.relative}": "${previous.source}", "${current.source}"`);
|
|
94
|
+
}
|
|
95
|
+
const files = Object.create(null);
|
|
96
|
+
for (const entry of rendered)
|
|
97
|
+
Object.defineProperty(files, entry.relative, {
|
|
98
|
+
configurable: true,
|
|
99
|
+
enumerable: true,
|
|
100
|
+
value: entry.content,
|
|
101
|
+
writable: true,
|
|
102
|
+
});
|
|
103
|
+
return files;
|
|
104
|
+
};
|
|
105
|
+
exports.renderScaffoldEntries = renderScaffoldEntries;
|
|
106
|
+
//# sourceMappingURL=renderScaffoldEntries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderScaffoldEntries.js","sourceRoot":"","sources":["../src/renderScaffoldEntries.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,IAAI,sCAAkB;AAGlC,qDAAkD;AASlD;;GAEG;AACH,MAAM,oBAAoB,GAAgC,CACxD,OAAe,EACP,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAE9C,yEAAyE;AACzE,MAAM,OAAO,GAA8B,CAAC,KAAa,EAAU,EAAE,CACnE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAElC;;;;GAIG;AACH,MAAM,SAAS,GAGD,CACZ,QAAgB,EAChB,SAA2C,EACnC,EAAE;IACV,MAAM,GAAG,GAAW,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3C,MAAM,IAAI,GAAW,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,UAAU,GACd,GAAG,KAAK,GAAG,IAAI,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7D,OAAO,IAAA,+BAAc,EACnB,OAAO,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,EAC9D,SAAS,CACV,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,qBAAqB,GAGJ,CAC5B,OAAiD,EACjD,SAA2C,EACnB,EAAE;IAC1B,MAAM,QAAQ,GAA6B,OAAO,CAAC,GAAG,CACpD,CAAC,KAAoC,EAA0B,EAAE,CAAC,CAAC;QACjE,OAAO,EAAE,IAAA,+BAAc,EAAC,oBAAoB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;QACvE,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC;QAC9C,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;KAChC,CAAC,CACH,CAAC;IACF,MAAM,OAAO,GAA6B,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,CAC1D,CAAC,IAA4B,EAAE,KAA6B,EAAU,EAAE,CACtE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ;QAC5B,CAAC,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ;YAC9B,CAAC,CAAC,CAAC;YACH,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM;gBAC1B,CAAC,CAAC,CAAC,CAAC;gBACJ,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM;oBAC1B,CAAC,CAAC,CAAC;oBACH,CAAC,CAAC,CAAC,CACd,CAAC;IACF,KAAK,IAAI,KAAK,GAAW,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QAC5D,MAAM,QAAQ,GAA2B,OAAO,CAAC,KAAK,GAAG,CAAC,CAAE,CAAC;QAC7D,MAAM,OAAO,GAA2B,OAAO,CAAC,KAAK,CAAE,CAAC;QACxD,IAAI,QAAQ,CAAC,QAAQ,KAAK,OAAO,CAAC,QAAQ;YACxC,MAAM,IAAI,KAAK,CACb,8CAA8C,OAAO,CAAC,QAAQ,OAAO,QAAQ,CAAC,MAAM,OAAO,OAAO,CAAC,MAAM,GAAG,CAC7G,CAAC;IACN,CAAC;IACD,MAAM,KAAK,GAA2B,MAAM,CAAC,MAAM,CAAC,IAAI,CAGvD,CAAC;IACF,KAAK,MAAM,KAAK,IAAI,QAAQ;QAC1B,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE;YAC3C,YAAY,EAAE,IAAI;YAClB,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,KAAK,CAAC,OAAO;YACpB,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;IACL,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AA9CW,QAAA,qBAAqB,GAArB,qBAAqB,CA8ChC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render the shared instruction surface: `AGENTS.md`, `CLAUDE.md` and `.agents/skills`, with every `$<name>` placeholder expanded.
|
|
3
|
+
*
|
|
4
|
+
* The layer is rendered with no tokens, so its bytes are identical for a single production and a workspace root, and explicit sync can compare either against one bundle. A token in an instruction file fails the render.
|
|
5
|
+
*
|
|
6
|
+
* @returns The instruction files, relative to the directory holding `AGENTS.md`.
|
|
7
|
+
* @throws As {@link renderScaffoldLayer} does.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/development/implementation.md#principled-implementation An empty token table makes the instruction bytes independent of the project name and layout, which is what lets one sync plan serve both installations.
|
|
10
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Creation and sync obtain the instruction surface from this one function.
|
|
11
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No installation-specific value reaches the instructions; a layout difference belongs to the production or workspace layer.
|
|
12
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the content, why no tokens are supplied, and what fails.
|
|
13
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One layer render, with the costs of the reader and renderer.
|
|
14
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call reads the installed bundle as it is now.
|
|
15
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned map is owned by the caller.
|
|
16
|
+
*/
|
|
17
|
+
export declare const renderScaffoldInstructions: () => Record<string, string>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderScaffoldInstructions = void 0;
|
|
4
|
+
const renderScaffoldLayer_1 = require("./renderScaffoldLayer");
|
|
5
|
+
/**
|
|
6
|
+
* Render the shared instruction surface: `AGENTS.md`, `CLAUDE.md` and `.agents/skills`, with every `$<name>` placeholder expanded.
|
|
7
|
+
*
|
|
8
|
+
* The layer is rendered with no tokens, so its bytes are identical for a single production and a workspace root, and explicit sync can compare either against one bundle. A token in an instruction file fails the render.
|
|
9
|
+
*
|
|
10
|
+
* @returns The instruction files, relative to the directory holding `AGENTS.md`.
|
|
11
|
+
* @throws As {@link renderScaffoldLayer} does.
|
|
12
|
+
*
|
|
13
|
+
* @evidence contracts/development/implementation.md#principled-implementation An empty token table makes the instruction bytes independent of the project name and layout, which is what lets one sync plan serve both installations.
|
|
14
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Creation and sync obtain the instruction surface from this one function.
|
|
15
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No installation-specific value reaches the instructions; a layout difference belongs to the production or workspace layer.
|
|
16
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the content, why no tokens are supplied, and what fails.
|
|
17
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One layer render, with the costs of the reader and renderer.
|
|
18
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call reads the installed bundle as it is now.
|
|
19
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned map is owned by the caller.
|
|
20
|
+
*/
|
|
21
|
+
const renderScaffoldInstructions = () => (0, renderScaffoldLayer_1.renderScaffoldLayer)("instructions", {});
|
|
22
|
+
exports.renderScaffoldInstructions = renderScaffoldInstructions;
|
|
23
|
+
//# sourceMappingURL=renderScaffoldInstructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderScaffoldInstructions.js","sourceRoot":"","sources":["../src/renderScaffoldInstructions.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAE5D;;;;;;;;;;;;;;;GAeG;AACI,MAAM,0BAA0B,GAGnC,GAA2B,EAAE,CAAC,IAAA,yCAAmB,EAAC,cAAc,EAAE,EAAE,CAAC,CAAC;AAH7D,QAAA,0BAA0B,GAA1B,0BAA0B,CAGmC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AutoMovieScaffoldLayer } from "./AutoMovieScaffoldLayer";
|
|
2
|
+
/**
|
|
3
|
+
* Render one bundled scaffold layer into a `{ posixPath: content }` map relative to the directory it installs into.
|
|
4
|
+
*
|
|
5
|
+
* The layer's files are read with each `$<name>` placeholder expanded by {@link readAutoMovieScaffoldSources}, then rendered by {@link renderScaffoldEntries}: LF line endings, tokens replaced from `variables`, the layer-root `_gitignore` returned as `.gitignore`, and colliding paths refused.
|
|
6
|
+
*
|
|
7
|
+
* @param layer The layer to render.
|
|
8
|
+
* @param variables Token values; a token absent from them fails the render.
|
|
9
|
+
* @returns The rendered layer.
|
|
10
|
+
* @throws When the layer or shared-skill directory is missing, on a placeholder refusal, or on a token error or path collision.
|
|
11
|
+
*
|
|
12
|
+
* @evidence contracts/development/implementation.md#principled-implementation Each layer is an ordinary scaffold root, so the existing reader and renderer apply unchanged, including the root `_gitignore` rename per installed directory.
|
|
13
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The function only joins location, reading and rendering; composition and naming stay with the public renderers.
|
|
14
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No layer or file is special-cased here; any failure throws instead of returning part of a layer.
|
|
15
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states what is read, how it is rendered, and what throws.
|
|
16
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms The layer is walked and each file read and rendered once, with the costs of the reader and renderer it calls.
|
|
17
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call reads the layer as installed now; a render reads each layer at most once.
|
|
18
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Reads close before returning, and the returned map is owned by the caller.
|
|
19
|
+
*/
|
|
20
|
+
export declare const renderScaffoldLayer: (layer: AutoMovieScaffoldLayer, variables: Readonly<Record<string, string>>) => Record<string, string>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderScaffoldLayer = void 0;
|
|
4
|
+
const readAutoMovieScaffoldSources_1 = require("./readAutoMovieScaffoldSources");
|
|
5
|
+
const renderScaffoldEntries_1 = require("./renderScaffoldEntries");
|
|
6
|
+
const scaffoldAssetDirectory_1 = require("./scaffoldAssetDirectory");
|
|
7
|
+
const scaffoldSharedSkillDirectory_1 = require("./scaffoldSharedSkillDirectory");
|
|
8
|
+
/**
|
|
9
|
+
* Render one bundled scaffold layer into a `{ posixPath: content }` map relative to the directory it installs into.
|
|
10
|
+
*
|
|
11
|
+
* The layer's files are read with each `$<name>` placeholder expanded by {@link readAutoMovieScaffoldSources}, then rendered by {@link renderScaffoldEntries}: LF line endings, tokens replaced from `variables`, the layer-root `_gitignore` returned as `.gitignore`, and colliding paths refused.
|
|
12
|
+
*
|
|
13
|
+
* @param layer The layer to render.
|
|
14
|
+
* @param variables Token values; a token absent from them fails the render.
|
|
15
|
+
* @returns The rendered layer.
|
|
16
|
+
* @throws When the layer or shared-skill directory is missing, on a placeholder refusal, or on a token error or path collision.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/development/implementation.md#principled-implementation Each layer is an ordinary scaffold root, so the existing reader and renderer apply unchanged, including the root `_gitignore` rename per installed directory.
|
|
19
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The function only joins location, reading and rendering; composition and naming stay with the public renderers.
|
|
20
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No layer or file is special-cased here; any failure throws instead of returning part of a layer.
|
|
21
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states what is read, how it is rendered, and what throws.
|
|
22
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms The layer is walked and each file read and rendered once, with the costs of the reader and renderer it calls.
|
|
23
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call reads the layer as installed now; a render reads each layer at most once.
|
|
24
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Reads close before returning, and the returned map is owned by the caller.
|
|
25
|
+
*/
|
|
26
|
+
const renderScaffoldLayer = (layer, variables) => (0, renderScaffoldEntries_1.renderScaffoldEntries)((0, readAutoMovieScaffoldSources_1.readAutoMovieScaffoldSources)((0, scaffoldAssetDirectory_1.scaffoldAssetDirectory)(layer), (0, scaffoldSharedSkillDirectory_1.scaffoldSharedSkillDirectory)()), variables);
|
|
27
|
+
exports.renderScaffoldLayer = renderScaffoldLayer;
|
|
28
|
+
//# sourceMappingURL=renderScaffoldLayer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderScaffoldLayer.js","sourceRoot":"","sources":["../src/renderScaffoldLayer.ts"],"names":[],"mappings":";;;AACA,iFAA8E;AAC9E,mEAAgE;AAChE,qEAAkE;AAClE,iFAA8E;AAE9E;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,mBAAmB,GAGF,CAC5B,KAA6B,EAC7B,SAA2C,EACnB,EAAE,CAC1B,IAAA,6CAAqB,EACnB,IAAA,2DAA4B,EAC1B,IAAA,+CAAsB,EAAC,KAAK,CAAC,EAC7B,IAAA,2DAA4B,GAAE,CAC/B,EACD,SAAS,CACV,CAAC;AAbS,QAAA,mBAAmB,GAAnB,mBAAmB,CAa5B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replace every `{{key}}` token in `content` with `variables[key]`.
|
|
3
|
+
*
|
|
4
|
+
* A key is one or more of `A-Z`, `a-z`, `0-9`, `:`, `_`, `@`, `.`, `/`, and `-`, such as `name` or `version:engine`. Everything else is an error, so a mistyped placeholder fails the render instead of shipping a broken file: a `{{` without a later `}}`, a `}}` before any `{{`, an empty, blank, or malformed key, a key that is not an own property of `variables`, and a value that itself contains `{{` or `}}`. A replaced value is never scanned again.
|
|
5
|
+
*
|
|
6
|
+
* @param content Template text.
|
|
7
|
+
* @param variables Values by key; inherited properties are not keys.
|
|
8
|
+
* @returns The rendered text.
|
|
9
|
+
* @throws On any of the errors listed above, naming the token or offset.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/development/implementation.md#principled-implementation A left-to-right cursor finds delimiter pairs with indexOf and appends intervening text and selected values. The key pattern excludes braces and each value is checked for delimiters, so substituted values are never rescanned and malformed input throws before a result is returned.
|
|
12
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One function serves both file contents and path segments in `renderScaffoldEntries`, so paths and payloads follow the same token rules.
|
|
13
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An unknown key throws rather than being left in place or blanked, and the own-property check keeps `__proto__` or `constructor` from resolving through the prototype.
|
|
14
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the key alphabet, every refusal with its reason, that inherited properties are not keys, and that values are not rescanned.
|
|
15
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Delimiter searches advance with the cursor and examine input spans a bounded number of times; key and value checks add their visited lengths. Output uses repeated string concatenation, whose allocation and copying cost depends on the JavaScript engine's string representation, so this owner does not guarantee linear output construction.
|
|
16
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call renders one distinct text; `renderScaffoldEntries` calls it once per file content and once per path.
|
|
17
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The function builds one output string and retains nothing after returning.
|
|
18
|
+
*/
|
|
19
|
+
export declare const renderTemplate: (content: string, variables: Readonly<Record<string, string>>) => string;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderTemplate = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Replace every `{{key}}` token in `content` with `variables[key]`.
|
|
6
|
+
*
|
|
7
|
+
* A key is one or more of `A-Z`, `a-z`, `0-9`, `:`, `_`, `@`, `.`, `/`, and `-`, such as `name` or `version:engine`. Everything else is an error, so a mistyped placeholder fails the render instead of shipping a broken file: a `{{` without a later `}}`, a `}}` before any `{{`, an empty, blank, or malformed key, a key that is not an own property of `variables`, and a value that itself contains `{{` or `}}`. A replaced value is never scanned again.
|
|
8
|
+
*
|
|
9
|
+
* @param content Template text.
|
|
10
|
+
* @param variables Values by key; inherited properties are not keys.
|
|
11
|
+
* @returns The rendered text.
|
|
12
|
+
* @throws On any of the errors listed above, naming the token or offset.
|
|
13
|
+
*
|
|
14
|
+
* @evidence contracts/development/implementation.md#principled-implementation A left-to-right cursor finds delimiter pairs with indexOf and appends intervening text and selected values. The key pattern excludes braces and each value is checked for delimiters, so substituted values are never rescanned and malformed input throws before a result is returned.
|
|
15
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One function serves both file contents and path segments in `renderScaffoldEntries`, so paths and payloads follow the same token rules.
|
|
16
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An unknown key throws rather than being left in place or blanked, and the own-property check keeps `__proto__` or `constructor` from resolving through the prototype.
|
|
17
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the key alphabet, every refusal with its reason, that inherited properties are not keys, and that values are not rescanned.
|
|
18
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Delimiter searches advance with the cursor and examine input spans a bounded number of times; key and value checks add their visited lengths. Output uses repeated string concatenation, whose allocation and copying cost depends on the JavaScript engine's string representation, so this owner does not guarantee linear output construction.
|
|
19
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call renders one distinct text; `renderScaffoldEntries` calls it once per file content and once per path.
|
|
20
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The function builds one output string and retains nothing after returning.
|
|
21
|
+
*/
|
|
22
|
+
const renderTemplate = (content, variables) => {
|
|
23
|
+
let cursor = 0;
|
|
24
|
+
let rendered = "";
|
|
25
|
+
while (cursor < content.length) {
|
|
26
|
+
const opening = content.indexOf("{{", cursor);
|
|
27
|
+
const closing = content.indexOf("}}", cursor);
|
|
28
|
+
if (closing !== -1 && (opening === -1 || closing < opening))
|
|
29
|
+
throw new Error(`unmatched scaffold placeholder closing delimiter at offset ${closing}`);
|
|
30
|
+
if (opening === -1) {
|
|
31
|
+
rendered += content.slice(cursor);
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
rendered += content.slice(cursor, opening);
|
|
35
|
+
const end = content.indexOf("}}", opening + 2);
|
|
36
|
+
if (end === -1)
|
|
37
|
+
throw new Error(`unmatched scaffold placeholder opening delimiter at offset ${opening}`);
|
|
38
|
+
const key = content.slice(opening + 2, end);
|
|
39
|
+
if (key.length === 0)
|
|
40
|
+
throw new Error("empty scaffold placeholder: {{}}");
|
|
41
|
+
if (key.trim().length === 0)
|
|
42
|
+
throw new Error(`whitespace scaffold placeholder: {{${key}}}`);
|
|
43
|
+
if (/^[A-Za-z0-9:_@./-]+$/u.test(key) === false)
|
|
44
|
+
throw new Error(`malformed scaffold placeholder: {{${key}}}`);
|
|
45
|
+
if (Object.prototype.hasOwnProperty.call(variables, key) === false)
|
|
46
|
+
throw new Error(`unknown scaffold variable: {{${key}}}`);
|
|
47
|
+
const value = variables[key];
|
|
48
|
+
if (value.includes("{{") || value.includes("}}"))
|
|
49
|
+
throw new Error(`scaffold variable {{${key}}} expands to placeholder syntax`);
|
|
50
|
+
rendered += value;
|
|
51
|
+
cursor = end + 2;
|
|
52
|
+
}
|
|
53
|
+
return rendered;
|
|
54
|
+
};
|
|
55
|
+
exports.renderTemplate = renderTemplate;
|
|
56
|
+
//# sourceMappingURL=renderTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderTemplate.js","sourceRoot":"","sources":["../src/renderTemplate.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,cAAc,GAGb,CACZ,OAAe,EACf,SAA2C,EACnC,EAAE;IACV,IAAI,MAAM,GAAW,CAAC,CAAC;IACvB,IAAI,QAAQ,GAAW,EAAE,CAAC;IAC1B,OAAO,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QAC/B,MAAM,OAAO,GAAW,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACtD,MAAM,OAAO,GAAW,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACtD,IAAI,OAAO,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,CAAC,IAAI,OAAO,GAAG,OAAO,CAAC;YACzD,MAAM,IAAI,KAAK,CACb,8DAA8D,OAAO,EAAE,CACxE,CAAC;QACJ,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC;YACnB,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAClC,MAAM;QACR,CAAC;QACD,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC3C,MAAM,GAAG,GAAW,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC;QACvD,IAAI,GAAG,KAAK,CAAC,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,8DAA8D,OAAO,EAAE,CACxE,CAAC;QACJ,MAAM,GAAG,GAAW,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;QACpD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAC1E,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,sCAAsC,GAAG,IAAI,CAAC,CAAC;QACjE,IAAI,uBAAuB,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK;YAC7C,MAAM,IAAI,KAAK,CAAC,qCAAqC,GAAG,IAAI,CAAC,CAAC;QAChE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,KAAK,KAAK;YAChE,MAAM,IAAI,KAAK,CAAC,gCAAgC,GAAG,IAAI,CAAC,CAAC;QAC3D,MAAM,KAAK,GAAW,SAAS,CAAC,GAAG,CAAE,CAAC;QACtC,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC9C,MAAM,IAAI,KAAK,CACb,uBAAuB,GAAG,kCAAkC,CAC7D,CAAC;QACJ,QAAQ,IAAI,KAAK,CAAC;QAClB,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AA3CW,QAAA,cAAc,GAAd,cAAc,CA2CzB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IAutoMovieScaffoldProps } from "./IAutoMovieScaffoldProps";
|
|
2
|
+
/**
|
|
3
|
+
* Render one production for a workspace from {@link renderWorkspaceScaffold}, into an in-memory `{ posixPath: content }` map relative to its directory `movies/<shorts|series>/<directory>`.
|
|
4
|
+
*
|
|
5
|
+
* Only the `production` layer is rendered: the instructions and their sync state stay at the workspace root. `{{name}}` is the admitted package name, `{{skills}}` is `../../../.agents/skills`, the workspace root's shared tree three directories up, and every `{{version:<key>}}` is `catalog:<name>` of its `AUTOMOVIE_TEMPLATE_CATALOGS` group, resolved by the root's `pnpm-workspace.yaml`. Nothing is written.
|
|
6
|
+
*
|
|
7
|
+
* @param props The production's package name, admitted by {@link assertScaffoldProjectName}.
|
|
8
|
+
* @returns The rendered file map.
|
|
9
|
+
* @throws When the name is refused, when the layer or the shared-skill directory is missing, or on a token error or path collision.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/development/implementation.md#principled-implementation The fixed depth of `movies/<family>/<directory>` makes the shared skills exactly three directories up, and pnpm resolves `catalog:` through the workspace root's catalog.
|
|
12
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The same production layer serves a single production and a workspace production; only the skills path and dependency mode differ.
|
|
13
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The workspace root is never searched for or inspected; the caller chooses the target, and the layout is documented instead of detected.
|
|
14
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the target directory, what is excluded, every token value, and what throws.
|
|
15
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One layer render with the reader's and renderer's costs.
|
|
16
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call reads the scaffold as installed now and is made once per CLI run.
|
|
17
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Reads close before returning, and the returned map is owned by the caller.
|
|
18
|
+
*/
|
|
19
|
+
export declare const renderWorkspaceProductionScaffold: (props: IAutoMovieScaffoldProps) => Record<string, string>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderWorkspaceProductionScaffold = void 0;
|
|
4
|
+
const assertScaffoldProjectName_1 = require("./assertScaffoldProjectName");
|
|
5
|
+
const createScaffoldVariables_1 = require("./createScaffoldVariables");
|
|
6
|
+
const renderScaffoldLayer_1 = require("./renderScaffoldLayer");
|
|
7
|
+
/**
|
|
8
|
+
* Render one production for a workspace from {@link renderWorkspaceScaffold}, into an in-memory `{ posixPath: content }` map relative to its directory `movies/<shorts|series>/<directory>`.
|
|
9
|
+
*
|
|
10
|
+
* Only the `production` layer is rendered: the instructions and their sync state stay at the workspace root. `{{name}}` is the admitted package name, `{{skills}}` is `../../../.agents/skills`, the workspace root's shared tree three directories up, and every `{{version:<key>}}` is `catalog:<name>` of its `AUTOMOVIE_TEMPLATE_CATALOGS` group, resolved by the root's `pnpm-workspace.yaml`. Nothing is written.
|
|
11
|
+
*
|
|
12
|
+
* @param props The production's package name, admitted by {@link assertScaffoldProjectName}.
|
|
13
|
+
* @returns The rendered file map.
|
|
14
|
+
* @throws When the name is refused, when the layer or the shared-skill directory is missing, or on a token error or path collision.
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/development/implementation.md#principled-implementation The fixed depth of `movies/<family>/<directory>` makes the shared skills exactly three directories up, and pnpm resolves `catalog:` through the workspace root's catalog.
|
|
17
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The same production layer serves a single production and a workspace production; only the skills path and dependency mode differ.
|
|
18
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The workspace root is never searched for or inspected; the caller chooses the target, and the layout is documented instead of detected.
|
|
19
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the target directory, what is excluded, every token value, and what throws.
|
|
20
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One layer render with the reader's and renderer's costs.
|
|
21
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call reads the scaffold as installed now and is made once per CLI run.
|
|
22
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Reads close before returning, and the returned map is owned by the caller.
|
|
23
|
+
*/
|
|
24
|
+
const renderWorkspaceProductionScaffold = (props) => (0, renderScaffoldLayer_1.renderScaffoldLayer)("production", (0, createScaffoldVariables_1.createScaffoldVariables)({
|
|
25
|
+
name: (0, assertScaffoldProjectName_1.assertScaffoldProjectName)(props.name),
|
|
26
|
+
skills: "../../../.agents/skills",
|
|
27
|
+
dependencies: "catalog",
|
|
28
|
+
}));
|
|
29
|
+
exports.renderWorkspaceProductionScaffold = renderWorkspaceProductionScaffold;
|
|
30
|
+
//# sourceMappingURL=renderWorkspaceProductionScaffold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderWorkspaceProductionScaffold.js","sourceRoot":"","sources":["../src/renderWorkspaceProductionScaffold.ts"],"names":[],"mappings":";;;AACA,2EAAwE;AACxE,uEAAoE;AACpE,+DAA4D;AAE5D;;;;;;;;;;;;;;;;GAgBG;AACI,MAAM,iCAAiC,GAEhB,CAC5B,KAA8B,EACN,EAAE,CAC1B,IAAA,yCAAmB,EACjB,YAAY,EACZ,IAAA,iDAAuB,EAAC;IACtB,IAAI,EAAE,IAAA,qDAAyB,EAAC,KAAK,CAAC,IAAI,CAAC;IAC3C,MAAM,EAAE,yBAAyB;IACjC,YAAY,EAAE,SAAS;CACxB,CAAC,CACH,CAAC;AAZS,QAAA,iCAAiC,GAAjC,iCAAiC,CAY1C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IAutoMovieScaffoldProps } from "./IAutoMovieScaffoldProps";
|
|
2
|
+
/**
|
|
3
|
+
* Render a pnpm workspace root that holds several productions, into an in-memory `{ posixPath: content }` map.
|
|
4
|
+
*
|
|
5
|
+
* The map joins the shared instruction surface from {@link renderScaffoldInstructions} with the `workspace` layer: `pnpm-workspace.yaml` listing `movies/shorts/*`, `movies/series/*` and `packages/*` with named `catalogs` of the build-time `AUTOMOVIE_TEMPLATE_VERSIONS` ranges, grouped by `AUTOMOVIE_TEMPLATE_CATALOGS` with one anchor per release group, a root `package.json` named by the admitted name with the `automovie` CLI as a development dependency, its README and `.gitignore`. The generated instruction digests are added for explicit later sync. No production is included; {@link renderWorkspaceProductionScaffold} renders each one. Nothing is written.
|
|
6
|
+
*
|
|
7
|
+
* @param props The workspace's name, admitted by {@link assertScaffoldProjectName}.
|
|
8
|
+
* @returns The rendered file map.
|
|
9
|
+
* @throws When the name is refused, when a layer or the shared-skill directory is missing, on a placeholder refusal, on a token error, or on a path collision within or between layers.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/development/implementation.md#principled-implementation The root catalog is rendered from the same version table that a single production's dependencies use, so a workspace production's `catalog:` specifiers resolve to the ranges this package was built with.
|
|
12
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The function chooses the layers and token values; name admission, layer rendering, joining and sync state each have one owner.
|
|
13
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The workspace layer is ordinary scaffold content rendered with the shared tokens; nothing is generated by string assembly here.
|
|
14
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the joined layers, what the workspace layer contains, the added state, what is excluded, and what throws.
|
|
15
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Two layer renders, one join pass and one digest per instruction file.
|
|
16
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call reads the scaffold as installed now and is made once per CLI run.
|
|
17
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Reads close before returning, and the returned map is owned by the caller.
|
|
18
|
+
*/
|
|
19
|
+
export declare const renderWorkspaceScaffold: (props: IAutoMovieScaffoldProps) => Record<string, string>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderWorkspaceScaffold = void 0;
|
|
4
|
+
const assertScaffoldProjectName_1 = require("./assertScaffoldProjectName");
|
|
5
|
+
const attachScaffoldSyncState_1 = require("./attachScaffoldSyncState");
|
|
6
|
+
const createScaffoldVariables_1 = require("./createScaffoldVariables");
|
|
7
|
+
const mergeScaffoldFiles_1 = require("./mergeScaffoldFiles");
|
|
8
|
+
const renderScaffoldInstructions_1 = require("./renderScaffoldInstructions");
|
|
9
|
+
const renderScaffoldLayer_1 = require("./renderScaffoldLayer");
|
|
10
|
+
/**
|
|
11
|
+
* Render a pnpm workspace root that holds several productions, into an in-memory `{ posixPath: content }` map.
|
|
12
|
+
*
|
|
13
|
+
* The map joins the shared instruction surface from {@link renderScaffoldInstructions} with the `workspace` layer: `pnpm-workspace.yaml` listing `movies/shorts/*`, `movies/series/*` and `packages/*` with named `catalogs` of the build-time `AUTOMOVIE_TEMPLATE_VERSIONS` ranges, grouped by `AUTOMOVIE_TEMPLATE_CATALOGS` with one anchor per release group, a root `package.json` named by the admitted name with the `automovie` CLI as a development dependency, its README and `.gitignore`. The generated instruction digests are added for explicit later sync. No production is included; {@link renderWorkspaceProductionScaffold} renders each one. Nothing is written.
|
|
14
|
+
*
|
|
15
|
+
* @param props The workspace's name, admitted by {@link assertScaffoldProjectName}.
|
|
16
|
+
* @returns The rendered file map.
|
|
17
|
+
* @throws When the name is refused, when a layer or the shared-skill directory is missing, on a placeholder refusal, on a token error, or on a path collision within or between layers.
|
|
18
|
+
*
|
|
19
|
+
* @evidence contracts/development/implementation.md#principled-implementation The root catalog is rendered from the same version table that a single production's dependencies use, so a workspace production's `catalog:` specifiers resolve to the ranges this package was built with.
|
|
20
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The function chooses the layers and token values; name admission, layer rendering, joining and sync state each have one owner.
|
|
21
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The workspace layer is ordinary scaffold content rendered with the shared tokens; nothing is generated by string assembly here.
|
|
22
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the joined layers, what the workspace layer contains, the added state, what is excluded, and what throws.
|
|
23
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Two layer renders, one join pass and one digest per instruction file.
|
|
24
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call reads the scaffold as installed now and is made once per CLI run.
|
|
25
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Reads close before returning, and the returned map is owned by the caller.
|
|
26
|
+
*/
|
|
27
|
+
const renderWorkspaceScaffold = (props) => (0, attachScaffoldSyncState_1.attachScaffoldSyncState)((0, mergeScaffoldFiles_1.mergeScaffoldFiles)((0, renderScaffoldInstructions_1.renderScaffoldInstructions)(), (0, renderScaffoldLayer_1.renderScaffoldLayer)("workspace", (0, createScaffoldVariables_1.createScaffoldVariables)({
|
|
28
|
+
name: (0, assertScaffoldProjectName_1.assertScaffoldProjectName)(props.name),
|
|
29
|
+
skills: ".agents/skills",
|
|
30
|
+
dependencies: "release",
|
|
31
|
+
}))));
|
|
32
|
+
exports.renderWorkspaceScaffold = renderWorkspaceScaffold;
|
|
33
|
+
//# sourceMappingURL=renderWorkspaceScaffold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderWorkspaceScaffold.js","sourceRoot":"","sources":["../src/renderWorkspaceScaffold.ts"],"names":[],"mappings":";;;AACA,2EAAwE;AACxE,uEAAoE;AACpE,uEAAoE;AACpE,6DAA0D;AAC1D,6EAA0E;AAC1E,+DAA4D;AAE5D;;;;;;;;;;;;;;;;GAgBG;AACI,MAAM,uBAAuB,GAEN,CAC5B,KAA8B,EACN,EAAE,CAC1B,IAAA,iDAAuB,EACrB,IAAA,uCAAkB,EAChB,IAAA,uDAA0B,GAAE,EAC5B,IAAA,yCAAmB,EACjB,WAAW,EACX,IAAA,iDAAuB,EAAC;IACtB,IAAI,EAAE,IAAA,qDAAyB,EAAC,KAAK,CAAC,IAAI,CAAC;IAC3C,MAAM,EAAE,gBAAgB;IACxB,YAAY,EAAE,SAAS;CACxB,CAAC,CACH,CACF,CACF,CAAC;AAjBS,QAAA,uBAAuB,GAAvB,uBAAuB,CAiBhC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type IScaffoldFileSnapshot } from "./IScaffoldFileSnapshot";
|
|
2
|
+
import { type IScaffoldPhysicalDirectory } from "./IScaffoldPhysicalDirectory";
|
|
3
|
+
import { type ScaffoldFilePublicationOutcome } from "./ScaffoldFilePublicationOutcome";
|
|
4
|
+
/**
|
|
5
|
+
* Replace the directory entry of an existing scaffold file that other entries also name, such as a build cache's hard link.
|
|
6
|
+
*
|
|
7
|
+
* The new bytes go into a fresh single-link sibling `<name>.automovie-sync` through {@link publishNativeScaffoldFile}, which is then renamed over `existing.path`. The other names keep the old file and its old bytes, which is what the single-link rule of the in-place rewrite protects. Right before the rename, the pathname must still hold the inspected generation; right after it, the pathname must hold the staged file.
|
|
8
|
+
*
|
|
9
|
+
* `refused` means nothing changed. `partial` means the staged sibling exists but the target entry was not, or not provably, replaced; the sibling is left in place and named in the error, and nothing is retried or deleted.
|
|
10
|
+
*
|
|
11
|
+
* @param props.base Captured scaffold root; `parent` must lie inside it.
|
|
12
|
+
* @param props.bytes Exact file content.
|
|
13
|
+
* @param props.existing Inspected generation of the shared file.
|
|
14
|
+
* @param props.parent Captured parent directory of `existing.path`.
|
|
15
|
+
* @returns The frozen outcome.
|
|
16
|
+
*
|
|
17
|
+
* @evidence contracts/development/implementation.md#principled-implementation Replacing an entry by renaming a verified sibling over it changes only that name; every other hard link keeps its inode, so no other name observes the write.
|
|
18
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Native exclusive creation, generation checks and one rename compose the replacement; in-place rewriting stays with overwriteScaffoldFile for single-link files.
|
|
19
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The link-count safety is kept rather than weakened: a shared file is never truncated, a changed target refuses the rename, and failures are reported, never cleaned up or retried. A writer changing the target between the last check and the rename is the documented remaining race.
|
|
20
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the sibling name, both generation checks, what other names observe and what each outcome leaves on disk.
|
|
21
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One native create with write and readback, linear in the file size, plus a constant number of lstats and one rename.
|
|
22
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Every call writes one file and re-observes it, which is an effect that must not be shared.
|
|
23
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Handles belong to publishNativeScaffoldFile, which releases them before returning; this owner holds only scalar snapshots.
|
|
24
|
+
*/
|
|
25
|
+
export declare const replaceSharedScaffoldFile: (props: {
|
|
26
|
+
base: IScaffoldPhysicalDirectory;
|
|
27
|
+
bytes: Uint8Array;
|
|
28
|
+
existing: IScaffoldFileSnapshot;
|
|
29
|
+
parent: IScaffoldPhysicalDirectory;
|
|
30
|
+
}) => ScaffoldFilePublicationOutcome;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.replaceSharedScaffoldFile = void 0;
|
|
37
|
+
const fs = __importStar(require("node:fs"));
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
39
|
+
const assertScaffoldOwnership_1 = require("./assertScaffoldOwnership");
|
|
40
|
+
const captureScaffoldFile_1 = require("./captureScaffoldFile");
|
|
41
|
+
const publishNativeScaffoldFile_1 = require("./publishNativeScaffoldFile");
|
|
42
|
+
/**
|
|
43
|
+
* Replace the directory entry of an existing scaffold file that other entries also name, such as a build cache's hard link.
|
|
44
|
+
*
|
|
45
|
+
* The new bytes go into a fresh single-link sibling `<name>.automovie-sync` through {@link publishNativeScaffoldFile}, which is then renamed over `existing.path`. The other names keep the old file and its old bytes, which is what the single-link rule of the in-place rewrite protects. Right before the rename, the pathname must still hold the inspected generation; right after it, the pathname must hold the staged file.
|
|
46
|
+
*
|
|
47
|
+
* `refused` means nothing changed. `partial` means the staged sibling exists but the target entry was not, or not provably, replaced; the sibling is left in place and named in the error, and nothing is retried or deleted.
|
|
48
|
+
*
|
|
49
|
+
* @param props.base Captured scaffold root; `parent` must lie inside it.
|
|
50
|
+
* @param props.bytes Exact file content.
|
|
51
|
+
* @param props.existing Inspected generation of the shared file.
|
|
52
|
+
* @param props.parent Captured parent directory of `existing.path`.
|
|
53
|
+
* @returns The frozen outcome.
|
|
54
|
+
*
|
|
55
|
+
* @evidence contracts/development/implementation.md#principled-implementation Replacing an entry by renaming a verified sibling over it changes only that name; every other hard link keeps its inode, so no other name observes the write.
|
|
56
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Native exclusive creation, generation checks and one rename compose the replacement; in-place rewriting stays with overwriteScaffoldFile for single-link files.
|
|
57
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The link-count safety is kept rather than weakened: a shared file is never truncated, a changed target refuses the rename, and failures are reported, never cleaned up or retried. A writer changing the target between the last check and the rename is the documented remaining race.
|
|
58
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the sibling name, both generation checks, what other names observe and what each outcome leaves on disk.
|
|
59
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One native create with write and readback, linear in the file size, plus a constant number of lstats and one rename.
|
|
60
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Every call writes one file and re-observes it, which is an effect that must not be shared.
|
|
61
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Handles belong to publishNativeScaffoldFile, which releases them before returning; this owner holds only scalar snapshots.
|
|
62
|
+
*/
|
|
63
|
+
const replaceSharedScaffoldFile = (props) => {
|
|
64
|
+
const target = props.existing.path;
|
|
65
|
+
const childName = `${path.basename(target)}.automovie-sync`;
|
|
66
|
+
const staged = (0, publishNativeScaffoldFile_1.publishNativeScaffoldFile)({
|
|
67
|
+
bytes: props.bytes,
|
|
68
|
+
childName,
|
|
69
|
+
expectedParentIdentity: props.parent.identity,
|
|
70
|
+
parentPath: props.parent.path,
|
|
71
|
+
});
|
|
72
|
+
if (staged.status !== "completed")
|
|
73
|
+
return staged;
|
|
74
|
+
const staging = path.join(props.parent.path, childName);
|
|
75
|
+
try {
|
|
76
|
+
const fresh = (0, captureScaffoldFile_1.captureScaffoldFile)(staging);
|
|
77
|
+
if (fresh.shared)
|
|
78
|
+
throw new Error(`staged scaffold file gained another link: ${staging}`);
|
|
79
|
+
(0, assertScaffoldOwnership_1.assertScaffoldOwnership)(props.base, props.parent);
|
|
80
|
+
const current = (0, captureScaffoldFile_1.captureScaffoldFile)(target);
|
|
81
|
+
if (current.identity !== props.existing.identity ||
|
|
82
|
+
current.written !== props.existing.written)
|
|
83
|
+
throw new Error(`scaffold file changed since inspection: ${target}`);
|
|
84
|
+
fs.renameSync(staging, target);
|
|
85
|
+
const resident = (0, captureScaffoldFile_1.captureScaffoldFile)(target);
|
|
86
|
+
if (resident.identity !== fresh.identity ||
|
|
87
|
+
resident.written !== fresh.written ||
|
|
88
|
+
resident.shared)
|
|
89
|
+
throw new Error(`scaffold file changed during entry replacement: ${target}`);
|
|
90
|
+
(0, assertScaffoldOwnership_1.assertScaffoldOwnership)(props.base, props.parent);
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
return Object.freeze({
|
|
94
|
+
bytesWritten: props.bytes.byteLength,
|
|
95
|
+
error: new Error(`shared scaffold file was not replaced; staged copy remains at ${staging}`, { cause: error }),
|
|
96
|
+
parentIdentity: props.parent.identity,
|
|
97
|
+
status: "partial",
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return Object.freeze({
|
|
101
|
+
parentIdentity: props.parent.identity,
|
|
102
|
+
status: "completed",
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
exports.replaceSharedScaffoldFile = replaceSharedScaffoldFile;
|
|
106
|
+
//# sourceMappingURL=replaceSharedScaffoldFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replaceSharedScaffoldFile.js","sourceRoot":"","sources":["../src/replaceSharedScaffoldFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,EAAE,oCAAgB;AAC9B,MAAY,IAAI,sCAAkB;AAKlC,uEAAoE;AACpE,+DAA4D;AAC5D,2EAAwE;AAExE;;;;;;;;;;;;;;;;;;;;GAoBG;AACI,MAAM,yBAAyB,GAKC,CAAC,KAKvC,EAAkC,EAAE;IACnC,MAAM,MAAM,GAAW,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC3C,MAAM,SAAS,GAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC;IACpE,MAAM,MAAM,GAAmC,IAAA,qDAAyB,EAAC;QACvE,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,SAAS;QACT,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ;QAC7C,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;KAC9B,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW;QAAE,OAAO,MAAM,CAAC;IACjD,MAAM,OAAO,GAAW,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAChE,IAAI,CAAC;QACH,MAAM,KAAK,GAA0B,IAAA,yCAAmB,EAAC,OAAO,CAAC,CAAC;QAClE,IAAI,KAAK,CAAC,MAAM;YACd,MAAM,IAAI,KAAK,CAAC,6CAA6C,OAAO,EAAE,CAAC,CAAC;QAC1E,IAAA,iDAAuB,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAClD,MAAM,OAAO,GAA0B,IAAA,yCAAmB,EAAC,MAAM,CAAC,CAAC;QACnE,IACE,OAAO,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ,CAAC,QAAQ;YAC5C,OAAO,CAAC,OAAO,KAAK,KAAK,CAAC,QAAQ,CAAC,OAAO;YAE1C,MAAM,IAAI,KAAK,CAAC,2CAA2C,MAAM,EAAE,CAAC,CAAC;QACvE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC/B,MAAM,QAAQ,GAA0B,IAAA,yCAAmB,EAAC,MAAM,CAAC,CAAC;QACpE,IACE,QAAQ,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;YACpC,QAAQ,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO;YAClC,QAAQ,CAAC,MAAM;YAEf,MAAM,IAAI,KAAK,CAAC,mDAAmD,MAAM,EAAE,CAAC,CAAC;QAC/E,IAAA,iDAAuB,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,MAAM,CAAC,MAAM,CAAC;YACnB,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU;YACpC,KAAK,EAAE,IAAI,KAAK,CACd,iEAAiE,OAAO,EAAE,EAC1E,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB;YACD,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ;YACrC,MAAM,EAAE,SAAkB;SAC3B,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ;QACrC,MAAM,EAAE,WAAoB;KAC7B,CAAC,CAAC;AACL,CAAC,CAAC;AAxDW,QAAA,yBAAyB,GAAzB,yBAAyB,CAwDpC"}
|