@automovie/template 0.0.0-stage → 0.1.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 +489 -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/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,119 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Own the byte and membership witness of a host's declared disk inputs. Source, emitted modules and data remain separate files in the receipt; changing a source file does not certify that its emitted module was rebuilt. The application supplies its actual input roots and explicit files. Missing roots are recorded, so creation of a previously absent output changes the revision. Symlinks are followed with real-directory cycle protection.
|
|
7
|
+
*
|
|
8
|
+
* Refresh reads current bytes before publishing a revision. Files outside the supplied scope, including browser-transformed responses, are not certified by this witness. Callers must still check the revision after candidate load.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/development/implementation.md#principled-implementation Refreshes actual declared file bytes and missing membership into a sorted SHA-256 receipt, following symlink directories with real-path cycle protection.
|
|
11
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The existing disk owner separates current revision/input/error state from application-supplied source, emitted and data scopes; it creates no new watcher service.
|
|
12
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Changing source does not certify rebuilt output or browser response bytes, outside-scope files are unclaimed and a null-prototype input map preserves arbitrary relative filename keys.
|
|
13
|
+
* @evidence contracts/development/common.md#meaningful-documentation Documentation identifies declared scope, missing outputs, current-byte refresh and source-versus-emitted limitations before candidate load.
|
|
14
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Refresh walks declared membership, sorts F paths and reads/hashes total B bytes, costing O(F log F+B) plus filesystem traversal with O(F) witnesses and one full file buffer at a time.
|
|
15
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Identical sorted byte/membership receipts keep the revision but every refresh reads actual bytes; no mtime/size shortcut certifies unchanged content.
|
|
16
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The owner retains only its latest input-digest/error receipt and declared paths; walk sets and byte buffers leave each refresh, file count/individual bytes are uncapped and synchronous reads leave no open handles.
|
|
17
|
+
*/
|
|
18
|
+
export function createViewerDiskSource(props: {
|
|
19
|
+
/** Checkout root used to name retained source receipts. */
|
|
20
|
+
root: string;
|
|
21
|
+
/** Input trees, including ordinary compiler output when actually consumed. */
|
|
22
|
+
directories: readonly string[];
|
|
23
|
+
/** Configuration, HTML or other inputs outside those trees. */
|
|
24
|
+
files: readonly string[] | (() => readonly string[]);
|
|
25
|
+
}): {
|
|
26
|
+
current: () => {
|
|
27
|
+
revision: string;
|
|
28
|
+
inputs: Record<string, string>;
|
|
29
|
+
error?: string;
|
|
30
|
+
};
|
|
31
|
+
refresh: () => boolean;
|
|
32
|
+
watched: string[];
|
|
33
|
+
} {
|
|
34
|
+
const roots: string[] = props.directories.map((file: string): string =>
|
|
35
|
+
path.resolve(file),
|
|
36
|
+
);
|
|
37
|
+
const explicit: () => string[] = (): string[] =>
|
|
38
|
+
(typeof props.files === "function" ? props.files() : props.files).map(
|
|
39
|
+
(file: string): string => path.resolve(file),
|
|
40
|
+
);
|
|
41
|
+
let current:
|
|
42
|
+
| { revision: string; inputs: Record<string, string>; error?: string }
|
|
43
|
+
| undefined;
|
|
44
|
+
const refresh: () => boolean = (): boolean => {
|
|
45
|
+
try {
|
|
46
|
+
const files: Set<string> = new Set(explicit());
|
|
47
|
+
const visited: Set<string> = new Set();
|
|
48
|
+
const missing: Set<string> = new Set();
|
|
49
|
+
const walk: (directory: string) => void = (directory: string): void => {
|
|
50
|
+
if (!fs.existsSync(directory)) {
|
|
51
|
+
missing.add(directory);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const real: string = fs.realpathSync(directory);
|
|
55
|
+
if (visited.has(real)) return;
|
|
56
|
+
visited.add(real);
|
|
57
|
+
for (const entry of fs.readdirSync(directory, {
|
|
58
|
+
withFileTypes: true,
|
|
59
|
+
})) {
|
|
60
|
+
const file: string = path.join(directory, entry.name);
|
|
61
|
+
const stat: fs.Dirent | fs.Stats = entry.isSymbolicLink()
|
|
62
|
+
? fs.statSync(file)
|
|
63
|
+
: entry;
|
|
64
|
+
if (stat.isDirectory()) walk(file);
|
|
65
|
+
else if (stat.isFile()) files.add(file);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
roots.forEach(walk);
|
|
69
|
+
const inputs: Record<string, string> = Object.create(null) as Record<
|
|
70
|
+
string,
|
|
71
|
+
string
|
|
72
|
+
>;
|
|
73
|
+
for (const file of [...files, ...missing].sort(
|
|
74
|
+
(left: string, right: string): number =>
|
|
75
|
+
left < right ? -1 : left > right ? 1 : 0,
|
|
76
|
+
)) {
|
|
77
|
+
const name: string = path
|
|
78
|
+
.relative(props.root, file)
|
|
79
|
+
.replaceAll("\\", "/");
|
|
80
|
+
inputs[name] =
|
|
81
|
+
fs.existsSync(file) && fs.statSync(file).isFile()
|
|
82
|
+
? createHash("sha256").update(fs.readFileSync(file)).digest("hex")
|
|
83
|
+
: "missing";
|
|
84
|
+
}
|
|
85
|
+
const revision: string = createHash("sha256")
|
|
86
|
+
.update(JSON.stringify(inputs))
|
|
87
|
+
.digest("hex");
|
|
88
|
+
const changed: boolean =
|
|
89
|
+
current === undefined ||
|
|
90
|
+
current.revision !== revision ||
|
|
91
|
+
current.error !== undefined;
|
|
92
|
+
current = { revision, inputs };
|
|
93
|
+
return changed;
|
|
94
|
+
} catch (cause) {
|
|
95
|
+
const error: string =
|
|
96
|
+
cause instanceof Error ? cause.message : String(cause);
|
|
97
|
+
const changed: boolean = current === undefined || current.error !== error;
|
|
98
|
+
current = {
|
|
99
|
+
revision: current?.revision ?? "",
|
|
100
|
+
inputs: current?.inputs ?? {},
|
|
101
|
+
error,
|
|
102
|
+
};
|
|
103
|
+
return changed;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
refresh();
|
|
107
|
+
return {
|
|
108
|
+
/** Current declared disk receipt; an error refuses a new candidate. */
|
|
109
|
+
current: (): {
|
|
110
|
+
revision: string;
|
|
111
|
+
inputs: Record<string, string>;
|
|
112
|
+
error?: string;
|
|
113
|
+
} => current!,
|
|
114
|
+
/** Refresh current membership and bytes; true requests a source notification. */
|
|
115
|
+
refresh,
|
|
116
|
+
/** Exact watcher roots and explicit paths owned by this source witness. */
|
|
117
|
+
watched: [...roots, ...explicit()],
|
|
118
|
+
};
|
|
119
|
+
}
|
package/scaffold/production/src/executable/viewer/inspection/readViewerMaintainedSourceFiles.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Read maintained files in declared checkout source roots from Git's cached and nonignored working-tree membership. Runtime SDK caches are not source; explicit data and emitted-library roots retain separate filesystem owners. Added/unlinked authored files are observed each time, without a fixed census. The returned paths are absolute and ordered; no file bytes are read here. A selected path resolving outside the actual checkout refuses the receipt.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/development/implementation.md#principled-implementation Uses Git's cached and nonignored working-tree membership within declared source roots and requires each present selected file's real path to remain inside the checkout.
|
|
9
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Authored membership stays distinct from emitted/data filesystem ownership; this helper returns ordered absolute paths without reading source bytes.
|
|
10
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No fixed census or runtime SDK cache is treated as maintained source, and a source symlink outside the actual checkout refuses instead of widening scope.
|
|
11
|
+
* @evidence contracts/development/common.md#meaningful-documentation Documentation names Git membership, dynamic creation/unlink observation, physical checkout containment and no-byte-read behavior.
|
|
12
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Git inventory parsing scans its path bytes, each candidate compares declared scopes and performs required existence/real-path checks, and selected F paths sort in O(F log F).
|
|
13
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Each call reads current maintained membership; disk-source ownership separately shares unchanged byte receipts and no stale filename list is cached here.
|
|
14
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources execFileSync joins the Git subprocess and filesystem checks are synchronous; only the returned path array escapes, with no retained child, watcher or open file handle.
|
|
15
|
+
*/
|
|
16
|
+
export function readViewerMaintainedSourceFiles(
|
|
17
|
+
root: string,
|
|
18
|
+
directories: readonly string[],
|
|
19
|
+
): string[] {
|
|
20
|
+
const actualRoot: string = fs.realpathSync.native(root);
|
|
21
|
+
const inside: (file: string) => boolean = (file: string): boolean => {
|
|
22
|
+
const relative: string = path.relative(actualRoot, file);
|
|
23
|
+
return (
|
|
24
|
+
relative !== ".." &&
|
|
25
|
+
!relative.startsWith(".." + path.sep) &&
|
|
26
|
+
!path.isAbsolute(relative)
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
const scopes: string[] = directories.map((directory: string): string => {
|
|
30
|
+
const resolved: string = path.resolve(directory);
|
|
31
|
+
if (!inside(resolved))
|
|
32
|
+
throw new Error(
|
|
33
|
+
"A maintained source root must remain within the checkout: " + resolved,
|
|
34
|
+
);
|
|
35
|
+
return resolved + path.sep;
|
|
36
|
+
});
|
|
37
|
+
const inventory: string = execFileSync(
|
|
38
|
+
"git",
|
|
39
|
+
["ls-files", "--cached", "--others", "--exclude-standard", "-z"],
|
|
40
|
+
{
|
|
41
|
+
cwd: root,
|
|
42
|
+
encoding: "utf8",
|
|
43
|
+
windowsHide: true,
|
|
44
|
+
},
|
|
45
|
+
);
|
|
46
|
+
const selected: Set<string> = new Set();
|
|
47
|
+
for (const relative of inventory.split("\0")) {
|
|
48
|
+
if (relative === "") continue;
|
|
49
|
+
const file: string = path.resolve(root, relative);
|
|
50
|
+
if (
|
|
51
|
+
!scopes.some((scope: string): boolean => file.startsWith(scope)) ||
|
|
52
|
+
!fs.existsSync(file)
|
|
53
|
+
)
|
|
54
|
+
continue;
|
|
55
|
+
if (!inside(fs.realpathSync.native(file)))
|
|
56
|
+
throw new Error(
|
|
57
|
+
"A maintained source file resolves outside the checkout: " + file,
|
|
58
|
+
);
|
|
59
|
+
selected.add(file);
|
|
60
|
+
}
|
|
61
|
+
return [...selected].sort((left: string, right: string): number =>
|
|
62
|
+
left < right ? -1 : left > right ? 1 : 0,
|
|
63
|
+
);
|
|
64
|
+
}
|
package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessCaptureError.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { AutoMovieHeadlessCaptureErrorCode } from "./AutoMovieHeadlessCaptureErrorCode.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Error thrown by createHeadlessCaptureAdapter and captureFrame for their classified navigation, hook, style, screenshot, pass-list and empty-frame failures.
|
|
5
|
+
*
|
|
6
|
+
* `code` names the failed step, `message` names the route, hook, selector,
|
|
7
|
+
* pass or time involved, and `source` keeps the page's original error when the
|
|
8
|
+
* failure came from a guarded page call. Locator construction, caller writeFrame and session close failures propagate unwrapped.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/development/design.md#principled-representation A subclass of the built-in `Error` keeps the stack and `instanceof` checks while adding a typed code, and the original page error is kept as data so wrapping loses nothing a caller could inspect.
|
|
11
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface The class adds only the two fields a caller needs, a category to branch on and the wrapped cause, and sets `name` so logs identify the adapter as the thrower.
|
|
12
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts The class wraps errors without retrying, suppressing or translating them into success, and no page, route or test receives a special message.
|
|
13
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc says who throws it, what each of `code`, `message` and `source` carries, and that `writeFrame` failures are deliberately left unwrapped.
|
|
14
|
+
*/
|
|
15
|
+
export class AutoMovieHeadlessCaptureError extends Error {
|
|
16
|
+
/** The capture step that failed; see `AutoMovieHeadlessCaptureErrorCode`. */
|
|
17
|
+
public readonly code: AutoMovieHeadlessCaptureErrorCode;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The error the page call threw, or `undefined` when the adapter itself
|
|
21
|
+
* detected the failure, as for an empty pass list or a zero-byte frame.
|
|
22
|
+
*/
|
|
23
|
+
public readonly source: unknown;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param code The capture step that failed.
|
|
27
|
+
* @param message Human-readable description naming the route, hook,
|
|
28
|
+
* selector, pass or time involved.
|
|
29
|
+
* @param source The page error being wrapped, if any.
|
|
30
|
+
*/
|
|
31
|
+
public constructor(
|
|
32
|
+
code: AutoMovieHeadlessCaptureErrorCode,
|
|
33
|
+
message: string,
|
|
34
|
+
source?: unknown,
|
|
35
|
+
) {
|
|
36
|
+
super(message);
|
|
37
|
+
this.name = "AutoMovieHeadlessCaptureError";
|
|
38
|
+
this.code = code;
|
|
39
|
+
this.source = source;
|
|
40
|
+
}
|
|
41
|
+
}
|
package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessCaptureErrorCode.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which step of a headless capture failed, carried by
|
|
3
|
+
* `AutoMovieHeadlessCaptureError.code`.
|
|
4
|
+
*
|
|
5
|
+
* `route` is the navigation to the viewer URL. `seek-hook` is the seek global
|
|
6
|
+
* being absent at creation or throwing during a frame. `pass-hook` is an empty
|
|
7
|
+
* or unknown pass list, the pass global being absent when a non-beauty pass is
|
|
8
|
+
* requested, or that global throwing during a frame. `capture` is the UI-hiding
|
|
9
|
+
* style injection or the screenshot call. `empty-frame` is a screenshot that
|
|
10
|
+
* returned zero bytes.
|
|
11
|
+
*
|
|
12
|
+
* @evidence contracts/development/design.md#principled-representation A closed string union lets a caller branch on the failed capture step with exhaustive narrowing instead of parsing the message text, and each member names one call the adapter makes.
|
|
13
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface Five members cover the five page calls or results the adapter judges; style injection and screenshot share `capture` because both mean the page could not be captured, not that a viewer hook is missing.
|
|
14
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts The codes name adapter steps rather than particular routes, viewers or tests, and no code is reserved for a single caller.
|
|
15
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc maps every code to the page call or result that raises it, including the creation and per-frame cases of the two hook codes.
|
|
16
|
+
*/
|
|
17
|
+
export type AutoMovieHeadlessCaptureErrorCode =
|
|
18
|
+
| "route"
|
|
19
|
+
| "seek-hook"
|
|
20
|
+
| "pass-hook"
|
|
21
|
+
| "capture"
|
|
22
|
+
| "empty-frame";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The navigation milestone `IAutoMovieHeadlessPage.goto` waits for before the
|
|
3
|
+
* capture adapter looks for the viewer's hooks.
|
|
4
|
+
*
|
|
5
|
+
* The members are Playwright's `page.goto` `waitUntil` values, so a Playwright
|
|
6
|
+
* page satisfies the adapter's page surface without translation. The adapter
|
|
7
|
+
* defaults to `load`.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/development/design.md#principled-representation The union copies the four milestones Playwright's documented `goto` option accepts, so the value passes through to the host page unchanged and the adapter never maps or reinterprets it.
|
|
10
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface A named alias keeps the milestone list in one place for both the page method and the capture option that forwards to it.
|
|
11
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts No milestone is added or dropped for a particular viewer route, and the union is Playwright's own list rather than one chosen for a fixture.
|
|
12
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc says where the value is consumed, that its members are Playwright's own so a real page fits, and which milestone the adapter uses when none is given.
|
|
13
|
+
*/
|
|
14
|
+
export type AutoMovieHeadlessWaitUntil =
|
|
15
|
+
| "commit"
|
|
16
|
+
| "domcontentloaded"
|
|
17
|
+
| "load"
|
|
18
|
+
| "networkidle";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The element handle the capture adapter screenshots once per frame and pass.
|
|
3
|
+
*
|
|
4
|
+
* A Playwright `Locator` satisfies it structurally. The adapter obtains it once
|
|
5
|
+
* per session through `IAutoMovieHeadlessPage.locator` and reuses it for every
|
|
6
|
+
* frame, so the selector is resolved again by the host at each screenshot.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/development/design.md#principled-representation The surface is the one Playwright locator method the adapter calls, declared structurally so any host with the same call shape works without an adapter-specific wrapper.
|
|
9
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface One method is declared because the adapter uses exactly one, which keeps fakes and alternative browser drivers small.
|
|
10
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts The interface names no browser vendor, test double or route, and the adapter does not inspect the implementation behind it.
|
|
11
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc says which page call produces it, that it is reused across frames, and that a Playwright locator fits as is.
|
|
12
|
+
*/
|
|
13
|
+
export interface IAutoMovieHeadlessLocator {
|
|
14
|
+
/**
|
|
15
|
+
* Capture the located element as encoded PNG bytes.
|
|
16
|
+
*
|
|
17
|
+
* The adapter calls it once per frame and pass, after the seek hook and, for
|
|
18
|
+
* a guide pass, the pass hook have run. A rejection becomes a `capture`
|
|
19
|
+
* error, and a zero-length result becomes an `empty-frame` error. The
|
|
20
|
+
* returned array is handed to `writeFrame` unchanged.
|
|
21
|
+
*
|
|
22
|
+
* @param options Always `{ type: "png" }`, the format every frame file uses.
|
|
23
|
+
* @evidence contracts/development/implementation.md#principled-implementation PNG is requested explicitly because frame files are named `.png` and encoded losslessly, so the bytes on disk are exactly the pixels the page rendered.
|
|
24
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The option object mirrors Playwright's screenshot options with the single field the adapter sets, so the host call needs no translation layer.
|
|
25
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The method does not let the adapter pick a format per caller or fixture, and the adapter never post-processes the returned bytes.
|
|
26
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc says when it is called, how a rejection and an empty result are classified, and that the bytes reach `writeFrame` unchanged.
|
|
27
|
+
* @evidenceExclude contracts/development/implementation.md#efficient-algorithms The declaration has no body; rasterizing and PNG encoding are performed by the host browser.
|
|
28
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Every call captures a different frame or pass state, so no two screenshots are equivalent work.
|
|
29
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned bytes belong to the adapter only until `writeFrame` resolves; the adapter keeps no reference afterwards, so at most one frame's PNG is held per in-flight call.
|
|
30
|
+
*/
|
|
31
|
+
screenshot(options: { type: "png" }): Promise<Uint8Array>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { AutoMovieHeadlessWaitUntil } from "./AutoMovieHeadlessWaitUntil.js";
|
|
2
|
+
import type { IAutoMovieHeadlessLocator } from "./IAutoMovieHeadlessLocator.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The browser page the capture adapter drives, declared as the six Playwright
|
|
6
|
+
* `Page` methods it calls so a Playwright page fits structurally.
|
|
7
|
+
*
|
|
8
|
+
* The caller opens the page and passes it in. If `createHeadlessCaptureAdapter`
|
|
9
|
+
* rejects, the page stays open and remains the caller's to close; once it
|
|
10
|
+
* resolves, the returned session owns the page and its `close` closes it.
|
|
11
|
+
*
|
|
12
|
+
* @evidence contracts/development/design.md#principled-representation Structural typing over the Playwright methods the adapter calls keeps the viewer capture transport independent of a browser driver while a real Playwright page, or any driver with the same call shapes, satisfies it unchanged.
|
|
13
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface The interface lists exactly the methods the adapter calls, with the option shapes it passes, so the browser boundary is visible in one declaration and a test double implements only what is used.
|
|
14
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts No method exists for a particular viewer or test, and the adapter reaches the page only through these calls rather than patching browser globals from Node.
|
|
15
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc says who opens the page, who closes it on a failed creation, and when ownership passes to the session.
|
|
16
|
+
*/
|
|
17
|
+
export interface IAutoMovieHeadlessPage {
|
|
18
|
+
/**
|
|
19
|
+
* Navigate to the viewer route, resolving once `options.waitUntil` is
|
|
20
|
+
* reached.
|
|
21
|
+
*
|
|
22
|
+
* Called once per session, first. A rejection becomes a `route` error. The
|
|
23
|
+
* resolved value is ignored.
|
|
24
|
+
*
|
|
25
|
+
* @param url The capture route exactly as the caller supplied it.
|
|
26
|
+
* @param options The milestone to wait for.
|
|
27
|
+
* @evidence contracts/development/implementation.md#principled-implementation Navigation completes before any hook lookup because the viewer defines its seek and pass globals while loading, so waiting for the chosen milestone is what makes the following hook checks meaningful.
|
|
28
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The method takes only the URL and the wait option the adapter forwards, matching Playwright's signature so no wrapper sits between them.
|
|
29
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The adapter forwards the caller's URL without rewriting query parameters or adding route-specific flags.
|
|
30
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc states the call order, the error code a rejection maps to, and that the return value is unused.
|
|
31
|
+
* @evidenceExclude contracts/development/implementation.md#efficient-algorithms The declaration has no body; page loading is the browser's work.
|
|
32
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The adapter navigates once per session and every frame reuses that loaded document, seeking instead of reloading.
|
|
33
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Navigation reuses the page handle already counted on the interface and acquires nothing the adapter must release separately.
|
|
34
|
+
*/
|
|
35
|
+
goto(
|
|
36
|
+
url: string,
|
|
37
|
+
options: { waitUntil: AutoMovieHeadlessWaitUntil },
|
|
38
|
+
): Promise<unknown>;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Resolve once `predicate(arg)`, run in the page, returns a truthy value.
|
|
42
|
+
*
|
|
43
|
+
* The adapter uses it to wait for the seek global and, when guide passes are
|
|
44
|
+
* requested, the pass global, each named by `arg`. A rejection, such as the
|
|
45
|
+
* host's timeout, becomes a `seek-hook` or `pass-hook` error.
|
|
46
|
+
*
|
|
47
|
+
* @param predicate Page-side check; it must use only its argument because it
|
|
48
|
+
* is serialized into the page.
|
|
49
|
+
* @param arg Serializable argument passed to `predicate`.
|
|
50
|
+
* @evidence contracts/development/implementation.md#principled-implementation Polling a page-side predicate is Playwright's documented way to wait for script state, and passing the global's name as an argument keeps the serialized predicate free of closure variables.
|
|
51
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure A generic argument type lets the same declaration carry the hook name without a capture-specific overload.
|
|
52
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The adapter imposes no timeout or retry of its own; it relies on the host's wait and reports the host's rejection as is.
|
|
53
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc says what the adapter waits for, the constraint that the predicate use only its argument, and how a rejection is classified.
|
|
54
|
+
* @evidenceExclude contracts/development/implementation.md#efficient-algorithms The wait strategy and polling interval belong to the host implementation.
|
|
55
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Hook existence is polled once per session at creation; frames reuse that readiness check while separately awaiting each hook invocation through evaluate.
|
|
56
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Any polling timer is the host's and ends when the returned promise settles; the adapter holds nothing from it.
|
|
57
|
+
*/
|
|
58
|
+
waitForFunction<T>(predicate: (arg: T) => unknown, arg: T): Promise<unknown>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Add a style element with `options.content` to the page.
|
|
62
|
+
*
|
|
63
|
+
* The adapter calls it once per session, unless `hideSelector` is `null`,
|
|
64
|
+
* to hide viewer controls from screenshots. A rejection becomes a `capture`
|
|
65
|
+
* error.
|
|
66
|
+
*
|
|
67
|
+
* @param options The CSS text to inject.
|
|
68
|
+
* @evidence contracts/development/implementation.md#principled-implementation Hiding chrome with an injected `display:none!important` rule uses the cascade the page already honors, so the viewer's own code is not modified to produce clean frames.
|
|
69
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The method takes only `content` because the adapter never injects a style sheet by URL or path.
|
|
70
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The injected rule targets only the caller's selector and changes no other element or viewer behavior.
|
|
71
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc says when the adapter calls it, why, when it is skipped, and what a rejection becomes.
|
|
72
|
+
* @evidenceExclude contracts/development/implementation.md#efficient-algorithms The declaration has no body; style recalculation is performed by the browser.
|
|
73
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The rule is injected once per session and stays in the document for every later frame.
|
|
74
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The style element lives in the page document and is released with the page; the adapter keeps no reference to it.
|
|
75
|
+
*/
|
|
76
|
+
addStyleTag(options: { content: string }): Promise<unknown>;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Run `task(arg)` in the page and resolve when it finishes.
|
|
80
|
+
*
|
|
81
|
+
* The adapter uses it to call the seek global with the frame time and, for
|
|
82
|
+
* guide passes, the pass global with the pass name. A rejection becomes a
|
|
83
|
+
* `seek-hook` or `pass-hook` error. The resolved value is ignored.
|
|
84
|
+
*
|
|
85
|
+
* @param task Page-side function; it must use only its argument because it
|
|
86
|
+
* is serialized into the page.
|
|
87
|
+
* @param arg Serializable argument passed to `task`.
|
|
88
|
+
* @evidence contracts/development/implementation.md#principled-implementation Driving the viewer through a page-side call is Playwright's documented evaluation contract, and passing the hook name and value as an argument keeps the serialized function self-contained.
|
|
89
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One generic method serves both hooks because each is a single global call with one argument.
|
|
90
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The adapter evaluates only the named hook with the frame's own time or pass and never evaluates code that alters the viewer for capture.
|
|
91
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc says which hooks the adapter calls through it, the serialization constraint, and how a rejection is classified.
|
|
92
|
+
* @evidenceExclude contracts/development/implementation.md#efficient-algorithms The declaration has no body; script execution belongs to the host page.
|
|
93
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each evaluation moves the viewer to a different time or pass state, so none repeats another.
|
|
94
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources An evaluation acquires nothing that outlives its promise, and the adapter discards its result.
|
|
95
|
+
*/
|
|
96
|
+
evaluate<T>(task: (arg: T) => unknown, arg: T): Promise<unknown>;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Return a handle to the element matching `selector`.
|
|
100
|
+
*
|
|
101
|
+
* The adapter calls it once per session with `viewSelector` and screenshots
|
|
102
|
+
* through the returned handle for every frame.
|
|
103
|
+
*
|
|
104
|
+
* @param selector The caller's view selector, `#view` by default.
|
|
105
|
+
* @evidence contracts/development/implementation.md#principled-implementation A lazy locator re-resolves its selector at each screenshot, which is Playwright's documented behavior, so one handle stays valid even if the viewer replaces the element between frames.
|
|
106
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The method synchronously constructs the supplied selector's locator without a separate wrapper. If a host implementation throws during construction, creation rejects with that original error; this call is outside the adapter's classified page guards.
|
|
107
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The adapter passes the caller's selector unchanged and never chooses an element for a particular viewer.
|
|
108
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc says when it is called, with which selector, and that the handle is reused for all frames.
|
|
109
|
+
* @evidenceExclude contracts/development/implementation.md#efficient-algorithms Creating a locator performs no query; element resolution happens in the host at screenshot time.
|
|
110
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The adapter creates one locator per session and every frame and pass reuses it.
|
|
111
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The locator is a lightweight description bound to the page and is released with it.
|
|
112
|
+
*/
|
|
113
|
+
locator(selector: string): IAutoMovieHeadlessLocator;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Close the page.
|
|
117
|
+
*
|
|
118
|
+
* Called only by the session's `close`, never by a failed creation. The
|
|
119
|
+
* resolved value is ignored, and a rejection propagates unwrapped.
|
|
120
|
+
*
|
|
121
|
+
* @evidence contracts/development/implementation.md#principled-implementation Closing the page through its own method is the host's documented release path, and the adapter calls it only after it has taken ownership.
|
|
122
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The method takes no options because the adapter needs no unload handlers or reason text.
|
|
123
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A close failure is not swallowed or retried; it reaches the caller of the session's `close`.
|
|
124
|
+
* @evidence contracts/development/common.md#meaningful-documentation The doc says which code path calls it, that a failed creation does not, and that a rejection is not wrapped.
|
|
125
|
+
* @evidenceExclude contracts/development/implementation.md#efficient-algorithms The declaration has no body; tearing down the page is the browser's work.
|
|
126
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Closing is a one-time release with no result to share.
|
|
127
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources This is the release point of the page handle the session owns; the browser that created the page stays the caller's.
|
|
128
|
+
*/
|
|
129
|
+
close(): Promise<unknown>;
|
|
130
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AutoMovieGuidePass } from "@automovie/interface";
|
|
2
|
+
|
|
3
|
+
import type { AutoMovieHeadlessWaitUntil } from "./AutoMovieHeadlessWaitUntil.js";
|
|
4
|
+
import type { IAutoMovieHeadlessPage } from "./IAutoMovieHeadlessPage.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A caller-owned page and its published capture hooks. Passes are a nonempty, validated, deduplicated list supplied by the output planner. Defaults match the shipped viewer: #view, #clips, __afSeek, __afPass and load.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/development/design.md#principled-representation Structural page methods accept real browser drivers while the caller owns pass admission.
|
|
10
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface This input contains only page transport options, without Render schedules or output paths.
|
|
11
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts Defaults describe public viewer hooks and every selector/hook can be overridden.
|
|
12
|
+
* @evidence contracts/development/common.md#meaningful-documentation States pass premises, defaults and the meaning of null hiding.
|
|
13
|
+
*/
|
|
14
|
+
export interface IViewerCaptureOptions {
|
|
15
|
+
/** Transfers to the session only after successful creation. */
|
|
16
|
+
page: IAutoMovieHeadlessPage;
|
|
17
|
+
|
|
18
|
+
/** Fully resolved URL, navigated once unchanged. */
|
|
19
|
+
url: string;
|
|
20
|
+
|
|
21
|
+
/** Admitted capture modes in write order; never empty. */
|
|
22
|
+
passes: readonly AutoMovieGuidePass[];
|
|
23
|
+
|
|
24
|
+
/** Screenshot element selector; defaults to #view. */
|
|
25
|
+
viewSelector?: string;
|
|
26
|
+
|
|
27
|
+
/** Controls hidden once at creation; null preserves controls. Defaults to #clips. */
|
|
28
|
+
hideSelector?: string | null;
|
|
29
|
+
|
|
30
|
+
/** Page function called with each sample; defaults to __afSeek. Capture awaits its completion, including a returned promise, and discards its fulfilled value inside the page. */
|
|
31
|
+
seekFunction?: string;
|
|
32
|
+
|
|
33
|
+
/** Page function selecting each pass; defaults to __afPass. Capture awaits its completion, including a returned promise, and discards its fulfilled value inside the page. */
|
|
34
|
+
passFunction?: string;
|
|
35
|
+
|
|
36
|
+
/** Browser navigation milestone; defaults to load. */
|
|
37
|
+
waitUntil?: AutoMovieHeadlessWaitUntil;
|
|
38
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { AutoMovieGuidePass } from "@automovie/interface";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Exclusive capture access to one initialized page. Await each capture before another and close exactly once on success or failure. Sample values must be serializable and understood by the selected page hook.
|
|
5
|
+
*
|
|
6
|
+
* @evidence contracts/development/design.md#principled-representation Capture and close expose the two operations needed to use and release the page without importing Render types.
|
|
7
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface Samples and awaited byte delivery leave file paths, metadata and encoding with the caller.
|
|
8
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts The session does not hide failures or retry samples.
|
|
9
|
+
* @evidence contracts/development/common.md#meaningful-documentation States serialization, exclusivity, release and hook override requirements.
|
|
10
|
+
*/
|
|
11
|
+
export interface IViewerCaptureSession {
|
|
12
|
+
/**
|
|
13
|
+
* Seek one serializable sample, then await the writer for each requested pass. The optional hook overrides the session seek function for this call; it must already exist on the initialized page. Calls must not overlap. Page failures are classified; writer failures propagate unchanged.
|
|
14
|
+
*
|
|
15
|
+
* @evidence contracts/development/implementation.md#principled-implementation Explicit hook samples select viewer state before screenshotting; ordered awaited writers preserve pass identity and consumer backpressure.
|
|
16
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Byte delivery separates page observation from consumer naming, file writing and encoding.
|
|
17
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The sample reaches the selected public hook unchanged and writer failures are not retried or suppressed.
|
|
18
|
+
* @evidence contracts/development/common.md#meaningful-documentation States serializability, hook existence, non-overlap, write ordering and failure propagation.
|
|
19
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms The implementation seeks once and performs one screenshot and write for each of P passes, O(P) browser calls and image-sized transient bytes.
|
|
20
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Capture reuses the session page and locator; different samples and effectful writes cannot be cached.
|
|
21
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Non-overlap and awaited delivery keep one screenshot buffer in flight; writers own anything retained, while the session remains responsible for page close.
|
|
22
|
+
*/
|
|
23
|
+
capture(
|
|
24
|
+
sample: unknown,
|
|
25
|
+
write: (pass: AutoMovieGuidePass, bytes: Uint8Array) => Promise<void>,
|
|
26
|
+
hook?: string,
|
|
27
|
+
): Promise<void>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Release the page exactly once when capture ends. A rejection propagates unchanged; the caller must handle release failure. The enclosing browser remains caller-owned.
|
|
31
|
+
*
|
|
32
|
+
* @evidence contracts/development/implementation.md#principled-implementation Release delegates to the browser driver's page close, the owner API for that handle.
|
|
33
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure No output or options are needed to close this one owned page.
|
|
34
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The session neither swallows close failures nor retries teardown.
|
|
35
|
+
* @evidence contracts/development/common.md#meaningful-documentation States exact-once release, failure propagation and separate browser ownership.
|
|
36
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms The implementation forwards one driver call; browser teardown work belongs to the driver.
|
|
37
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Close is a one-time effect with no reusable result.
|
|
38
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources This is the session page release point; no browser handle is acquired or released here.
|
|
39
|
+
*/
|
|
40
|
+
close(): Promise<void>;
|
|
41
|
+
}
|